diff --git a/dist/assets/index-ButmEv-s.css b/dist/assets/index-ButmEv-s.css deleted file mode 100644 index 61e1ddf5..00000000 --- a/dist/assets/index-ButmEv-s.css +++ /dev/null @@ -1 +0,0 @@ -*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:var(--font-sans);font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--font-mono);font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}*{--tw-border-opacity: 1;border-color:hsl(var(--border) / var(--tw-border-opacity, 1))}body{--tw-bg-opacity: 1;background-color:hsl(var(--background) / var(--tw-bg-opacity, 1));font-family:var(--font-sans);--tw-text-opacity: 1;color:hsl(var(--foreground) / var(--tw-text-opacity, 1));-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.invisible{visibility:hidden}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.inset-16{top:4rem;right:4rem;bottom:4rem;left:4rem}.inset-8{top:2rem;right:2rem;bottom:2rem;left:2rem}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.-bottom-1{bottom:-.25rem}.-bottom-12{bottom:-3rem}.-bottom-8{bottom:-2rem}.-left-10{left:-2.5rem}.-left-12{left:-3rem}.-left-16{left:-4rem}.-left-24{left:-6rem}.-left-32{left:-8rem}.-left-8{left:-2rem}.-left-\[9px\]{left:-9px}.-right-12{right:-3rem}.-right-32{right:-8rem}.-top-10{top:-2.5rem}.-top-12{top:-3rem}.-top-24{top:-6rem}.-top-32{top:-8rem}.bottom-0{bottom:0}.bottom-1\/3{bottom:33.333333%}.bottom-10{bottom:2.5rem}.bottom-32{bottom:8rem}.bottom-8{bottom:2rem}.left-0{left:0}.left-1{left:.25rem}.left-1\/2{left:50%}.left-1\/4{left:25%}.left-2{left:.5rem}.left-8{left:2rem}.left-\[15\%\]{left:15%}.left-\[50\%\]{left:50%}.left-\[65\%\]{left:65%}.left-\[8\%\]{left:8%}.right-0{right:0}.right-1{right:.25rem}.right-1\/3{right:33.333333%}.right-1\/4{right:25%}.right-10{right:2.5rem}.right-2{right:.5rem}.right-3{right:.75rem}.right-4{right:1rem}.right-\[-80px\]{right:-80px}.right-\[10\%\]{right:10%}.right-\[12\%\]{right:12%}.right-\[20\%\]{right:20%}.right-\[8\%\]{right:8%}.top-0{top:0}.top-1{top:.25rem}.top-1\.5{top:.375rem}.top-1\/2{top:50%}.top-1\/3{top:33.333333%}.top-1\/4{top:25%}.top-10{top:2.5rem}.top-2{top:.5rem}.top-20{top:5rem}.top-3\.5{top:.875rem}.top-32{top:8rem}.top-4{top:1rem}.top-52{top:13rem}.top-6{top:1.5rem}.top-\[1px\]{top:1px}.top-\[50\%\]{top:50%}.top-\[60\%\]{top:60%}.top-full{top:100%}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\[100\]{z-index:100}.z-\[1\]{z-index:1}.z-\[90\]{z-index:90}.z-\[91\]{z-index:91}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-3\.5{margin-left:.875rem;margin-right:.875rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-0\.5{margin-top:.125rem;margin-bottom:.125rem}.my-1{margin-top:.25rem;margin-bottom:.25rem}.-ml-4{margin-left:-1rem}.-mt-4{margin-top:-1rem}.mb-1{margin-bottom:.25rem}.mb-12{margin-bottom:3rem}.mb-16{margin-bottom:4rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-auto{margin-left:auto}.mr-2{margin-right:.5rem}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-12{margin-top:3rem}.mt-2{margin-top:.5rem}.mt-24{margin-top:6rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.mt-auto{margin-top:auto}.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}.aspect-video{aspect-ratio:16 / 9}.size-4{width:1rem;height:1rem}.h-0\.5{height:.125rem}.h-1{height:.25rem}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-20{height:5rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-4{height:1rem}.h-48{height:12rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-64{height:16rem}.h-7{height:1.75rem}.h-72{height:18rem}.h-8{height:2rem}.h-80{height:20rem}.h-9{height:2.25rem}.h-96{height:24rem}.h-\[1px\]{height:1px}.h-\[2px\]{height:2px}.h-\[500px\]{height:500px}.h-\[600px\]{height:600px}.h-\[800px\]{height:800px}.h-\[var\(--radix-navigation-menu-viewport-height\)\]{height:var(--radix-navigation-menu-viewport-height)}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-auto{height:auto}.h-full{height:100%}.h-px{height:1px}.h-svh{height:100svh}.max-h-\[--radix-context-menu-content-available-height\]{max-height:var(--radix-context-menu-content-available-height)}.max-h-\[--radix-select-content-available-height\]{max-height:var(--radix-select-content-available-height)}.max-h-\[300px\]{max-height:300px}.max-h-\[var\(--radix-dropdown-menu-content-available-height\)\]{max-height:var(--radix-dropdown-menu-content-available-height)}.max-h-screen{max-height:100vh}.min-h-0{min-height:0px}.min-h-10{min-height:2.5rem}.min-h-8{min-height:2rem}.min-h-9{min-height:2.25rem}.min-h-\[80px\]{min-height:80px}.min-h-screen{min-height:100vh}.min-h-svh{min-height:100svh}.w-0{width:0px}.w-1{width:.25rem}.w-1\.5{width:.375rem}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-20{width:5rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-3\/4{width:75%}.w-4{width:1rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-96{width:24rem}.w-\[100px\]{width:100px}.w-\[180px\]{width:180px}.w-\[1px\]{width:1px}.w-\[500px\]{width:500px}.w-\[600px\]{width:600px}.w-\[800px\]{width:800px}.w-\[var\(--sidebar-width\)\]{width:var(--sidebar-width)}.w-auto{width:auto}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.w-px{width:1px}.min-w-0{min-width:0px}.min-w-10{min-width:2.5rem}.min-w-11{min-width:2.75rem}.min-w-5{min-width:1.25rem}.min-w-9{min-width:2.25rem}.min-w-\[12rem\]{min-width:12rem}.min-w-\[8rem\]{min-width:8rem}.min-w-\[96px\]{min-width:96px}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.min-w-full{min-width:100%}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-5xl{max-width:64rem}.max-w-6xl{max-width:72rem}.max-w-\[var\(--skeleton-width\)\]{max-width:var(--skeleton-width)}.max-w-lg{max-width:32rem}.max-w-max{max-width:-moz-max-content;max-width:max-content}.max-w-md{max-width:28rem}.max-w-xl{max-width:36rem}.flex-1{flex:1 1 0%}.flex-none{flex:none}.flex-shrink-0,.shrink-0{flex-shrink:0}.grow{flex-grow:1}.grow-0{flex-grow:0}.basis-full{flex-basis:100%}.caption-bottom{caption-side:bottom}.border-collapse{border-collapse:collapse}.origin-\[--radix-context-menu-content-transform-origin\]{transform-origin:var(--radix-context-menu-content-transform-origin)}.origin-\[--radix-dropdown-menu-content-transform-origin\]{transform-origin:var(--radix-dropdown-menu-content-transform-origin)}.origin-\[--radix-hover-card-content-transform-origin\]{transform-origin:var(--radix-hover-card-content-transform-origin)}.origin-\[--radix-menubar-content-transform-origin\]{transform-origin:var(--radix-menubar-content-transform-origin)}.origin-\[--radix-popover-content-transform-origin\]{transform-origin:var(--radix-popover-content-transform-origin)}.origin-\[--radix-select-content-transform-origin\]{transform-origin:var(--radix-select-content-transform-origin)}.origin-\[--radix-tooltip-content-transform-origin\]{transform-origin:var(--radix-tooltip-content-transform-origin)}.origin-left{transform-origin:left}.-translate-x-1\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-20{--tw-translate-x: -5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-4{--tw-translate-x: -1rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-px{--tw-translate-x: -1px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-2{--tw-translate-y: -.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-20{--tw-translate-x: 5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-4{--tw-translate-x: 1rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-\[-50\%\]{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-px{--tw-translate-x: 1px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-12{--tw-translate-y: 3rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-2{--tw-translate-y: .5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-4{--tw-translate-y: 1rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-6{--tw-translate-y: 1.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-8{--tw-translate-y: 2rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-\[-50\%\]{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-0{--tw-rotate: 0deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-12{--tw-rotate: 12deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-45{--tw-rotate: 45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-110{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-50{--tw-scale-x: .5;--tw-scale-y: .5;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-75{--tw-scale-x: .75;--tw-scale-y: .75;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-90{--tw-scale-x: .9;--tw-scale-y: .9;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-95{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-\[0\.98\]{--tw-scale-x: .98;--tw-scale-y: .98;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-x-0{--tw-scale-x: 0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-x-100{--tw-scale-x: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.animate-\[pulse_3s_ease-in-out_infinite\]{animation:pulse 3s ease-in-out infinite}.animate-\[pulse_4s_ease-in-out_infinite\]{animation:pulse 4s ease-in-out infinite}.animate-\[pulse_5s_ease-in-out_infinite\]{animation:pulse 5s ease-in-out infinite}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}.animate-bounce{animation:bounce 1s infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-default{cursor:default}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.list-none{list-style-type:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-12{gap:3rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-10>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2.5rem * var(--tw-space-y-reverse))}.space-y-12>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(3rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(3rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-border\/60>:not([hidden])~:not([hidden]){border-color:hsl(var(--border) / .6)}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.5rem}.rounded-\[2px\]{border-radius:2px}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5625rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.1875rem}.rounded-xl{border-radius:.75rem}.rounded-t-\[10px\]{border-top-left-radius:10px;border-top-right-radius:10px}.rounded-tl-sm{border-top-left-radius:.1875rem}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-\[1\.5px\]{border-width:1.5px}.border-y{border-top-width:1px;border-bottom-width:1px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-\[--color-border\]{border-color:var(--color-border)}.border-amber-400\/20{border-color:#fbbf2433}.border-amber-400\/40{border-color:#fbbf2466}.border-amber-400\/50{border-color:#fbbf2480}.border-blue-500\/40{border-color:#3b82f666}.border-border{--tw-border-opacity: 1;border-color:hsl(var(--border) / var(--tw-border-opacity, 1))}.border-border\/50{border-color:hsl(var(--border) / .5)}.border-border\/60{border-color:hsl(var(--border) / .6)}.border-border\/70{border-color:hsl(var(--border) / .7)}.border-card-border{--tw-border-opacity: 1;border-color:hsl(var(--card-border) / var(--tw-border-opacity, 1))}.border-destructive{--tw-border-opacity: 1;border-color:hsl(var(--destructive) / var(--tw-border-opacity, 1))}.border-destructive-border{border-color:var(--destructive-border)}.border-destructive\/50{border-color:hsl(var(--destructive) / .5)}.border-emerald-400\/30{border-color:#34d3994d}.border-emerald-400\/40{border-color:#34d39966}.border-emerald-400\/50{border-color:#34d39980}.border-emerald-500\/40{border-color:#10b98166}.border-emerald-500\/50{border-color:#10b98180}.border-input{--tw-border-opacity: 1;border-color:hsl(var(--input) / var(--tw-border-opacity, 1))}.border-muted-foreground\/30{border-color:hsl(var(--muted-foreground) / .3)}.border-primary{--tw-border-opacity: 1;border-color:hsl(var(--primary) / var(--tw-border-opacity, 1))}.border-primary-border{border-color:var(--primary-border)}.border-primary\/10{border-color:hsl(var(--primary) / .1)}.border-primary\/15{border-color:hsl(var(--primary) / .15)}.border-primary\/20{border-color:hsl(var(--primary) / .2)}.border-primary\/30{border-color:hsl(var(--primary) / .3)}.border-primary\/40{border-color:hsl(var(--primary) / .4)}.border-primary\/50{border-color:hsl(var(--primary) / .5)}.border-red-400\/40{border-color:#f8717166}.border-red-400\/50{border-color:#f8717180}.border-red-500\/40{border-color:#ef444466}.border-red-500\/50{border-color:#ef444480}.border-secondary-border{border-color:var(--secondary-border)}.border-sidebar-border{--tw-border-opacity: 1;border-color:hsl(var(--sidebar-border) / var(--tw-border-opacity, 1))}.border-sky-500\/40{border-color:#0ea5e966}.border-slate-400\/40{border-color:#94a3b866}.border-slate-400\/50{border-color:#94a3b880}.border-transparent{border-color:transparent}.border-white\/10{border-color:#ffffff1a}.border-white\/20{border-color:#fff3}.border-l-transparent{border-left-color:transparent}.border-t-transparent{border-top-color:transparent}.bg-\[--color-bg\]{background-color:var(--color-bg)}.bg-accent{--tw-bg-opacity: 1;background-color:hsl(var(--accent) / var(--tw-bg-opacity, 1))}.bg-amber-400\/10{background-color:#fbbf241a}.bg-amber-400\/15{background-color:#fbbf2426}.bg-amber-400\/20{background-color:#fbbf2433}.bg-amber-500\/10{background-color:#f59e0b1a}.bg-background{--tw-bg-opacity: 1;background-color:hsl(var(--background) / var(--tw-bg-opacity, 1))}.bg-background\/40{background-color:hsl(var(--background) / .4)}.bg-background\/50{background-color:hsl(var(--background) / .5)}.bg-background\/60{background-color:hsl(var(--background) / .6)}.bg-background\/80{background-color:hsl(var(--background) / .8)}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-black\/60{background-color:#0009}.bg-black\/80{background-color:#000c}.bg-blue-500\/20{background-color:#3b82f633}.bg-border{--tw-bg-opacity: 1;background-color:hsl(var(--border) / var(--tw-bg-opacity, 1))}.bg-card{--tw-bg-opacity: 1;background-color:hsl(var(--card) / var(--tw-bg-opacity, 1))}.bg-card\/30{background-color:hsl(var(--card) / .3)}.bg-card\/40{background-color:hsl(var(--card) / .4)}.bg-card\/50{background-color:hsl(var(--card) / .5)}.bg-card\/70{background-color:hsl(var(--card) / .7)}.bg-card\/80{background-color:hsl(var(--card) / .8)}.bg-chart-1\/10{background-color:hsl(var(--chart-1) / .1)}.bg-chart-1\/15{background-color:hsl(var(--chart-1) / .15)}.bg-chart-1\/20{background-color:hsl(var(--chart-1) / .2)}.bg-chart-2{--tw-bg-opacity: 1;background-color:hsl(var(--chart-2) / var(--tw-bg-opacity, 1))}.bg-chart-2\/10{background-color:hsl(var(--chart-2) / .1)}.bg-chart-2\/15{background-color:hsl(var(--chart-2) / .15)}.bg-chart-2\/20{background-color:hsl(var(--chart-2) / .2)}.bg-chart-2\/5{background-color:hsl(var(--chart-2) / .05)}.bg-chart-3\/10{background-color:hsl(var(--chart-3) / .1)}.bg-chart-3\/15{background-color:hsl(var(--chart-3) / .15)}.bg-chart-5\/20{background-color:hsl(var(--chart-5) / .2)}.bg-destructive{--tw-bg-opacity: 1;background-color:hsl(var(--destructive) / var(--tw-bg-opacity, 1))}.bg-emerald-400\/20{background-color:#34d39933}.bg-emerald-500\/10{background-color:#10b9811a}.bg-emerald-500\/15{background-color:#10b98126}.bg-emerald-500\/5{background-color:#10b9810d}.bg-foreground{--tw-bg-opacity: 1;background-color:hsl(var(--foreground) / var(--tw-bg-opacity, 1))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity, 1))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-muted{--tw-bg-opacity: 1;background-color:hsl(var(--muted) / var(--tw-bg-opacity, 1))}.bg-muted-foreground\/30{background-color:hsl(var(--muted-foreground) / .3)}.bg-muted-foreground\/50{background-color:hsl(var(--muted-foreground) / .5)}.bg-muted-foreground\/70{background-color:hsl(var(--muted-foreground) / .7)}.bg-muted\/20{background-color:hsl(var(--muted) / .2)}.bg-muted\/40{background-color:hsl(var(--muted) / .4)}.bg-muted\/50{background-color:hsl(var(--muted) / .5)}.bg-muted\/70{background-color:hsl(var(--muted) / .7)}.bg-popover{--tw-bg-opacity: 1;background-color:hsl(var(--popover) / var(--tw-bg-opacity, 1))}.bg-primary{--tw-bg-opacity: 1;background-color:hsl(var(--primary) / var(--tw-bg-opacity, 1))}.bg-primary\/10{background-color:hsl(var(--primary) / .1)}.bg-primary\/15{background-color:hsl(var(--primary) / .15)}.bg-primary\/20{background-color:hsl(var(--primary) / .2)}.bg-primary\/5{background-color:hsl(var(--primary) / .05)}.bg-red-400\/20{background-color:#f8717133}.bg-red-500\/10{background-color:#ef44441a}.bg-red-500\/15{background-color:#ef444426}.bg-red-500\/20{background-color:#ef444433}.bg-secondary{--tw-bg-opacity: 1;background-color:hsl(var(--secondary) / var(--tw-bg-opacity, 1))}.bg-sidebar{--tw-bg-opacity: 1;background-color:hsl(var(--sidebar) / var(--tw-bg-opacity, 1))}.bg-sidebar-border{--tw-bg-opacity: 1;background-color:hsl(var(--sidebar-border) / var(--tw-bg-opacity, 1))}.bg-sky-500\/10{background-color:#0ea5e91a}.bg-slate-400\/15{background-color:#94a3b826}.bg-slate-400\/20{background-color:#94a3b833}.bg-transparent{background-color:transparent}.bg-white\/10{background-color:#ffffff1a}.bg-white\/5{background-color:#ffffff0d}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity, 1))}.bg-\[radial-gradient\(circle_at_1px_1px\,rgba\(59\,130\,246\,0\.08\)\,transparent_0\)\]{background-image:radial-gradient(circle at 1px 1px,rgba(59,130,246,.08),transparent 0)}.bg-\[radial-gradient\(circle_at_1px_1px\,rgba\(59\,130\,246\,0\.12\)\,transparent_0\)\]{background-image:radial-gradient(circle at 1px 1px,rgba(59,130,246,.12),transparent 0)}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-background{--tw-gradient-from: hsl(var(--background) / 1) var(--tw-gradient-from-position);--tw-gradient-to: hsl(var(--background) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-background\/70{--tw-gradient-from: hsl(var(--background) / .7) var(--tw-gradient-from-position);--tw-gradient-to: hsl(var(--background) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-background\/80{--tw-gradient-from: hsl(var(--background) / .8) var(--tw-gradient-from-position);--tw-gradient-to: hsl(var(--background) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-chart-2\/15{--tw-gradient-from: hsl(var(--chart-2) / .15) var(--tw-gradient-from-position);--tw-gradient-to: hsl(var(--chart-2) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-primary{--tw-gradient-from: hsl(var(--primary) / 1) var(--tw-gradient-from-position);--tw-gradient-to: hsl(var(--primary) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-primary\/10{--tw-gradient-from: hsl(var(--primary) / .1) var(--tw-gradient-from-position);--tw-gradient-to: hsl(var(--primary) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-primary\/20{--tw-gradient-from: hsl(var(--primary) / .2) var(--tw-gradient-from-position);--tw-gradient-to: hsl(var(--primary) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-primary\/40{--tw-gradient-from: hsl(var(--primary) / .4) var(--tw-gradient-from-position);--tw-gradient-to: hsl(var(--primary) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-transparent{--tw-gradient-from: transparent var(--tw-gradient-from-position);--tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-white\/10{--tw-gradient-from: rgb(255 255 255 / .1) var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.via-background{--tw-gradient-to: hsl(var(--background) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), hsl(var(--background) / 1) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-background\/50{--tw-gradient-to: hsl(var(--background) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), hsl(var(--background) / .5) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-background\/60{--tw-gradient-to: hsl(var(--background) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), hsl(var(--background) / .6) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-background\/80{--tw-gradient-to: hsl(var(--background) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), hsl(var(--background) / .8) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-border\/60{--tw-gradient-to: hsl(var(--border) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), hsl(var(--border) / .6) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-chart-1{--tw-gradient-to: hsl(var(--chart-1) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), hsl(var(--chart-1) / 1) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-chart-1\/10{--tw-gradient-to: hsl(var(--chart-1) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), hsl(var(--chart-1) / .1) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-primary\/5{--tw-gradient-to: hsl(var(--primary) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), hsl(var(--primary) / .05) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-primary\/50{--tw-gradient-to: hsl(var(--primary) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), hsl(var(--primary) / .5) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-transparent{--tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), transparent var(--tw-gradient-via-position), var(--tw-gradient-to)}.to-background{--tw-gradient-to: hsl(var(--background) / 1) var(--tw-gradient-to-position)}.to-background\/70{--tw-gradient-to: hsl(var(--background) / .7) var(--tw-gradient-to-position)}.to-background\/80{--tw-gradient-to: hsl(var(--background) / .8) var(--tw-gradient-to-position)}.to-background\/90{--tw-gradient-to: hsl(var(--background) / .9) var(--tw-gradient-to-position)}.to-card\/80{--tw-gradient-to: hsl(var(--card) / .8) var(--tw-gradient-to-position)}.to-chart-1{--tw-gradient-to: hsl(var(--chart-1) / 1) var(--tw-gradient-to-position)}.to-muted\/30{--tw-gradient-to: hsl(var(--muted) / .3) var(--tw-gradient-to-position)}.to-primary{--tw-gradient-to: hsl(var(--primary) / 1) var(--tw-gradient-to-position)}.to-transparent{--tw-gradient-to: transparent var(--tw-gradient-to-position)}.bg-\[length\:200\%_100\%\]{background-size:200% 100%}.bg-clip-text{-webkit-background-clip:text;background-clip:text}.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-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.p-\[1px\]{padding:1px}.px-1{padding-left:.25rem;padding-right:.25rem}.px-10{padding-left:2.5rem;padding-right:2.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-16{padding-top:4rem;padding-bottom:4rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-24{padding-top:6rem;padding-bottom:6rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-32{padding-top:8rem;padding-bottom:8rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.pb-12{padding-bottom:3rem}.pb-16{padding-bottom:4rem}.pb-2{padding-bottom:.5rem}.pb-24{padding-bottom:6rem}.pb-3{padding-bottom:.75rem}.pb-32{padding-bottom:8rem}.pb-4{padding-bottom:1rem}.pb-40{padding-bottom:10rem}.pb-8{padding-bottom:2rem}.pl-2\.5{padding-left:.625rem}.pl-4{padding-left:1rem}.pl-6{padding-left:1.5rem}.pl-8{padding-left:2rem}.pr-2{padding-right:.5rem}.pr-2\.5{padding-right:.625rem}.pr-8{padding-right:2rem}.pt-0{padding-top:0}.pt-1{padding-top:.25rem}.pt-10{padding-top:2.5rem}.pt-16{padding-top:4rem}.pt-2{padding-top:.5rem}.pt-24{padding-top:6rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pt-6{padding-top:1.5rem}.pt-8{padding-top:2rem}.text-left{text-align:left}.text-center{text-align:center}.align-middle{vertical-align:middle}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-5xl{font-size:3rem;line-height:1}.text-\[0\.8rem\]{font-size:.8rem}.text-\[11px\]{font-size:11px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.leading-tight{line-height:1.25}.tracking-\[0\.15em\]{letter-spacing:.15em}.tracking-\[0\.18em\]{letter-spacing:.18em}.tracking-\[0\.25em\]{letter-spacing:.25em}.tracking-\[0\.2em\]{letter-spacing:.2em}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-widest{letter-spacing:.1em}.text-accent-foreground{--tw-text-opacity: 1;color:hsl(var(--accent-foreground) / var(--tw-text-opacity, 1))}.text-amber-200{--tw-text-opacity: 1;color:rgb(253 230 138 / var(--tw-text-opacity, 1))}.text-amber-300{--tw-text-opacity: 1;color:rgb(252 211 77 / var(--tw-text-opacity, 1))}.text-blue-200{--tw-text-opacity: 1;color:rgb(191 219 254 / var(--tw-text-opacity, 1))}.text-card-foreground{--tw-text-opacity: 1;color:hsl(var(--card-foreground) / var(--tw-text-opacity, 1))}.text-chart-1{--tw-text-opacity: 1;color:hsl(var(--chart-1) / var(--tw-text-opacity, 1))}.text-chart-2{--tw-text-opacity: 1;color:hsl(var(--chart-2) / var(--tw-text-opacity, 1))}.text-chart-2\/25{color:hsl(var(--chart-2) / .25)}.text-chart-3{--tw-text-opacity: 1;color:hsl(var(--chart-3) / var(--tw-text-opacity, 1))}.text-chart-3\/25{color:hsl(var(--chart-3) / .25)}.text-chart-5{--tw-text-opacity: 1;color:hsl(var(--chart-5) / var(--tw-text-opacity, 1))}.text-current{color:currentColor}.text-destructive{--tw-text-opacity: 1;color:hsl(var(--destructive) / var(--tw-text-opacity, 1))}.text-destructive-foreground{--tw-text-opacity: 1;color:hsl(var(--destructive-foreground) / var(--tw-text-opacity, 1))}.text-emerald-200{--tw-text-opacity: 1;color:rgb(167 243 208 / var(--tw-text-opacity, 1))}.text-emerald-300{--tw-text-opacity: 1;color:rgb(110 231 183 / var(--tw-text-opacity, 1))}.text-emerald-400{--tw-text-opacity: 1;color:rgb(52 211 153 / var(--tw-text-opacity, 1))}.text-emerald-500{--tw-text-opacity: 1;color:rgb(16 185 129 / var(--tw-text-opacity, 1))}.text-foreground{--tw-text-opacity: 1;color:hsl(var(--foreground) / var(--tw-text-opacity, 1))}.text-foreground\/50{color:hsl(var(--foreground) / .5)}.text-foreground\/80{color:hsl(var(--foreground) / .8)}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.text-green-200{--tw-text-opacity: 1;color:rgb(187 247 208 / var(--tw-text-opacity, 1))}.text-green-200\/80{color:#bbf7d0cc}.text-green-300\/70{color:#86efacb3}.text-green-300\/80{color:#86efaccc}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.text-muted-foreground{--tw-text-opacity: 1;color:hsl(var(--muted-foreground) / var(--tw-text-opacity, 1))}.text-muted-foreground\/60{color:hsl(var(--muted-foreground) / .6)}.text-popover-foreground{--tw-text-opacity: 1;color:hsl(var(--popover-foreground) / var(--tw-text-opacity, 1))}.text-primary{--tw-text-opacity: 1;color:hsl(var(--primary) / var(--tw-text-opacity, 1))}.text-primary-foreground{--tw-text-opacity: 1;color:hsl(var(--primary-foreground) / var(--tw-text-opacity, 1))}.text-primary\/25{color:hsl(var(--primary) / .25)}.text-primary\/80{color:hsl(var(--primary) / .8)}.text-red-200{--tw-text-opacity: 1;color:rgb(254 202 202 / var(--tw-text-opacity, 1))}.text-red-300{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-secondary-foreground{--tw-text-opacity: 1;color:hsl(var(--secondary-foreground) / var(--tw-text-opacity, 1))}.text-sidebar-foreground{--tw-text-opacity: 1;color:hsl(var(--sidebar-foreground) / var(--tw-text-opacity, 1))}.text-sidebar-foreground\/70{color:hsl(var(--sidebar-foreground) / .7)}.text-sky-200{--tw-text-opacity: 1;color:rgb(186 230 253 / var(--tw-text-opacity, 1))}.text-slate-200{--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-white\/70{color:#ffffffb3}.text-white\/90{color:#ffffffe6}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-30{opacity:.3}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-90{opacity:.9}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_0_0_1px_hsl\(var\(--sidebar-border\)\)\]{--tw-shadow: 0 0 0 1px hsl(var(--sidebar-border));--tw-shadow-colored: 0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_0_0_8px_rgba\(59\,130\,246\,0\.15\)\]{--tw-shadow: 0 0 0 8px rgba(59,130,246,.15);--tw-shadow-colored: 0 0 0 8px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_0_12px_rgba\(34\,211\,238\,0\.6\)\]{--tw-shadow: 0 0 12px rgba(34,211,238,.6);--tw-shadow-colored: 0 0 12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[0_10px_30px_rgba\(59\,130\,246\,0\.3\)\]{--tw-shadow: 0 10px 30px rgba(59,130,246,.3);--tw-shadow-colored: 0 10px 30px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-primary\/10{--tw-shadow-color: hsl(var(--primary) / .1);--tw-shadow: var(--tw-shadow-colored)}.shadow-primary\/20{--tw-shadow-color: hsl(var(--primary) / .2);--tw-shadow: var(--tw-shadow-colored)}.shadow-primary\/25{--tw-shadow-color: hsl(var(--primary) / .25);--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.outline-2{outline-width:2px}.outline-offset-2{outline-offset:2px}.outline-transparent{outline-color:transparent}.ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-ring{--tw-ring-opacity: 1;--tw-ring-color: hsl(var(--ring) / var(--tw-ring-opacity, 1))}.ring-sidebar-ring{--tw-ring-opacity: 1;--tw-ring-color: hsl(var(--sidebar-ring) / var(--tw-ring-opacity, 1))}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background) / 1)}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.blur-3xl{--tw-blur: blur(64px);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)}.blur-\[120px\]{--tw-blur: blur(120px);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)}.blur-\[140px\]{--tw-blur: blur(140px);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)}.drop-shadow-sm{--tw-drop-shadow: drop-shadow(0 1px 1px rgb(0 0 0 / .05));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-lg{--tw-backdrop-blur: blur(16px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.backdrop-blur-xl{--tw-backdrop-blur: blur(24px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[left\,right\,width\]{transition-property:left,right,width;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[margin\,opacity\]{transition-property:margin,opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[width\,height\,padding\]{transition-property:width,height,padding;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[width\]{transition-property:width;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.delay-100{transition-delay:.1s}.delay-1000{transition-delay:1s}.delay-200{transition-delay:.2s}.delay-300{transition-delay:.3s}.delay-500{transition-delay:.5s}.delay-700{transition-delay:.7s}.duration-1000{transition-duration:1s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.duration-700{transition-duration:.7s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-linear{transition-timing-function:linear}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.will-change-transform{will-change:transform}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.fade-in-0{--tw-enter-opacity: 0}.fade-in-80{--tw-enter-opacity: .8}.zoom-in-95{--tw-enter-scale: .95}.duration-1000{animation-duration:1s}.duration-200{animation-duration:.2s}.duration-300{animation-duration:.3s}.duration-500{animation-duration:.5s}.duration-700{animation-duration:.7s}.delay-100{animation-delay:.1s}.delay-1000{animation-delay:1s}.delay-200{animation-delay:.2s}.delay-300{animation-delay:.3s}.delay-500{animation-delay:.5s}.delay-700{animation-delay:.7s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.ease-linear{animation-timing-function:linear}.ease-out{animation-timing-function:cubic-bezier(0,0,.2,1)}.running{animation-play-state:running}input[type=search]::-webkit-search-cancel-button{display:none}[contenteditable][data-placeholder]:empty:before{content:attr(data-placeholder);color:hsl(var(--muted-foreground));pointer-events:none}.border.toggle-elevate:before{top:-1px;right:-1px;bottom:-1px;left:-1px}.hover-elevate:not(.no-default-hover-elevate),.active-elevate:not(.no-default-active-elevate),.hover-elevate-2:not(.no-default-hover-elevate),.active-elevate-2:not(.no-default-active-elevate){position:relative;z-index:0}.hover-elevate:not(.no-default-hover-elevate):after,.active-elevate:not(.no-default-active-elevate):after,.hover-elevate-2:not(.no-default-hover-elevate):after,.active-elevate-2:not(.no-default-active-elevate):after{content:"";pointer-events:none;position:absolute;top:0;right:0;bottom:0;left:0;border-radius:inherit;z-index:999}.hover-elevate:hover:not(.no-default-hover-elevate):after,.active-elevate:active:not(.no-default-active-elevate):after{background-color:var(--elevate-1)}.hover-elevate-2:hover:not(.no-default-hover-elevate):after,.active-elevate-2:active:not(.no-default-active-elevate):after{background-color:var(--elevate-2)}.border.hover-elevate:not(.no-hover-interaction-elevate):after,.border.active-elevate:not(.no-active-interaction-elevate):after,.border.hover-elevate-2:not(.no-hover-interaction-elevate):after,.border.active-elevate-2:not(.no-active-interaction-elevate):after{top:-1px;right:-1px;bottom:-1px;left:-1px}.\[background-size\:120px_120px\]{background-size:120px 120px}.\[background-size\:160px_160px\]{background-size:160px 160px}.\[border-color\:var\(--badge-outline\)\]{border-color:var(--badge-outline)}.\[border-color\:var\(--button-outline\)\]{border-color:var(--button-outline)}html{scroll-behavior:smooth}:root{--button-outline: rgba(0,0,0, .1);--badge-outline: rgba(0,0,0, .05);--opaque-button-border-intensity: -8;--elevate-1: rgba(0,0,0, .03);--elevate-2: rgba(0,0,0, .08);--background: 220 6% 97%;--foreground: 220 6% 12%;--border: 220 6% 90%;--card: 220 5% 95%;--card-foreground: 220 6% 12%;--card-border: 220 5% 88%;--sidebar: 220 5% 93%;--sidebar-foreground: 220 6% 12%;--sidebar-border: 220 5% 86%;--sidebar-primary: 220 65% 45%;--sidebar-primary-foreground: 220 65% 98%;--sidebar-accent: 220 8% 88%;--sidebar-accent-foreground: 220 8% 15%;--sidebar-ring: 220 65% 45%;--popover: 220 6% 91%;--popover-foreground: 220 6% 12%;--popover-border: 220 6% 84%;--primary: 220 65% 45%;--primary-foreground: 220 65% 98%;--secondary: 220 8% 85%;--secondary-foreground: 220 8% 15%;--muted: 220 8% 87%;--muted-foreground: 220 8% 30%;--accent: 220 12% 89%;--accent-foreground: 220 12% 18%;--destructive: 0 72% 42%;--destructive-foreground: 0 72% 98%;--input: 220 12% 72%;--ring: 220 65% 45%;--chart-1: 220 70% 38%;--chart-2: 195 70% 35%;--chart-3: 245 65% 40%;--chart-4: 280 60% 42%;--chart-5: 160 65% 35%;--font-sans: "Plus Jakarta Sans", sans-serif;--font-serif: "Source Serif 4", serif;--font-mono: "JetBrains Mono", monospace;--radius: .5rem;--shadow-2xs: 0px 2px 0px 0px hsl(220 6% 12% / 0);--shadow-xs: 0px 2px 0px 0px hsl(220 6% 12% / 0);--shadow-sm: 0px 2px 0px 0px hsl(220 6% 12% / 0), 0px 1px 2px -1px hsl(220 6% 12% / 0);--shadow: 0px 2px 0px 0px hsl(220 6% 12% / 0), 0px 1px 2px -1px hsl(220 6% 12% / 0);--shadow-md: 0px 2px 0px 0px hsl(220 6% 12% / 0), 0px 2px 4px -1px hsl(220 6% 12% / 0);--shadow-lg: 0px 2px 0px 0px hsl(220 6% 12% / 0), 0px 4px 6px -1px hsl(220 6% 12% / 0);--shadow-xl: 0px 2px 0px 0px hsl(220 6% 12% / 0), 0px 8px 10px -1px hsl(220 6% 12% / 0);--shadow-2xl: 0px 2px 0px 0px hsl(220 6% 12% / 0);--tracking-normal: 0em;--spacing: .25rem;--sidebar-primary-border: hsl(var(--sidebar-primary));--sidebar-primary-border: hsl(from hsl(var(--sidebar-primary)) h s calc(l + var(--opaque-button-border-intensity)) / alpha);--sidebar-accent-border: hsl(var(--sidebar-accent));--sidebar-accent-border: hsl(from hsl(var(--sidebar-accent)) h s calc(l + var(--opaque-button-border-intensity)) / alpha);--primary-border: hsl(var(--primary));--primary-border: hsl(from hsl(var(--primary)) h s calc(l + var(--opaque-button-border-intensity)) / alpha);--secondary-border: hsl(var(--secondary));--secondary-border: hsl(from hsl(var(--secondary)) h s calc(l + var(--opaque-button-border-intensity)) / alpha);--muted-border: hsl(var(--muted));--muted-border: hsl(from hsl(var(--muted)) h s calc(l + var(--opaque-button-border-intensity)) / alpha);--accent-border: hsl(var(--accent));--accent-border: hsl(from hsl(var(--accent)) h s calc(l + var(--opaque-button-border-intensity)) / alpha);--destructive-border: hsl(var(--destructive));--destructive-border: hsl(from hsl(var(--destructive)) h s calc(l + var(--opaque-button-border-intensity)) / alpha)}.dark{--button-outline: rgba(255,255,255, .1);--badge-outline: rgba(255,255,255, .05);--opaque-button-border-intensity: 9;--elevate-1: rgba(255,255,255, .04);--elevate-2: rgba(255,255,255, .09);--background: 220 15% 4%;--foreground: 220 10% 92%;--border: 220 12% 14%;--card: 220 14% 7%;--card-foreground: 220 10% 92%;--card-border: 220 12% 12%;--sidebar: 220 14% 6%;--sidebar-foreground: 220 10% 92%;--sidebar-border: 220 12% 12%;--sidebar-primary: 200 75% 50%;--sidebar-primary-foreground: 200 75% 98%;--sidebar-accent: 220 12% 12%;--sidebar-accent-foreground: 220 10% 88%;--sidebar-ring: 200 75% 50%;--popover: 220 14% 10%;--popover-foreground: 220 10% 92%;--popover-border: 220 12% 16%;--primary: 200 75% 50%;--primary-foreground: 200 75% 98%;--secondary: 220 12% 14%;--secondary-foreground: 220 10% 88%;--muted: 220 12% 12%;--muted-foreground: 220 10% 60%;--accent: 200 60% 12%;--accent-foreground: 200 60% 85%;--destructive: 0 65% 45%;--destructive-foreground: 0 65% 98%;--input: 220 12% 20%;--ring: 200 75% 50%;--chart-1: 200 75% 55%;--chart-2: 160 70% 50%;--chart-3: 220 70% 60%;--chart-4: 280 60% 55%;--chart-5: 40 75% 55%;--shadow-2xs: 0px 2px 0px 0px hsl(220 6% 95% / 0);--shadow-xs: 0px 2px 0px 0px hsl(220 6% 95% / 0);--shadow-sm: 0px 2px 0px 0px hsl(220 6% 95% / 0), 0px 1px 2px -1px hsl(220 6% 95% / 0);--shadow: 0px 2px 0px 0px hsl(220 6% 95% / 0), 0px 1px 2px -1px hsl(220 6% 95% / 0);--shadow-md: 0px 2px 0px 0px hsl(220 6% 95% / 0), 0px 2px 4px -1px hsl(220 6% 95% / 0);--shadow-lg: 0px 2px 0px 0px hsl(220 6% 95% / 0), 0px 4px 6px -1px hsl(220 6% 95% / 0);--shadow-xl: 0px 2px 0px 0px hsl(220 6% 95% / 0), 0px 8px 10px -1px hsl(220 6% 95% / 0);--shadow-2xl: 0px 2px 0px 0px hsl(220 6% 95% / 0);--sidebar-primary-border: hsl(var(--sidebar-primary));--sidebar-primary-border: hsl(from hsl(var(--sidebar-primary)) h s calc(l + var(--opaque-button-border-intensity)) / alpha);--sidebar-accent-border: hsl(var(--sidebar-accent));--sidebar-accent-border: hsl(from hsl(var(--sidebar-accent)) h s calc(l + var(--opaque-button-border-intensity)) / alpha);--primary-border: hsl(var(--primary));--primary-border: hsl(from hsl(var(--primary)) h s calc(l + var(--opaque-button-border-intensity)) / alpha);--secondary-border: hsl(var(--secondary));--secondary-border: hsl(from hsl(var(--secondary)) h s calc(l + var(--opaque-button-border-intensity)) / alpha);--muted-border: hsl(var(--muted));--muted-border: hsl(from hsl(var(--muted)) h s calc(l + var(--opaque-button-border-intensity)) / alpha);--accent-border: hsl(var(--accent));--accent-border: hsl(from hsl(var(--accent)) h s calc(l + var(--opaque-button-border-intensity)) / alpha);--destructive-border: hsl(var(--destructive));--destructive-border: hsl(from hsl(var(--destructive)) h s calc(l + var(--opaque-button-border-intensity)) / alpha)}.shimmer{position:relative;overflow:hidden}.shimmer:after{content:"";position:absolute;top:0;left:-150%;width:50%;height:100%;background:linear-gradient(120deg,transparent,rgba(255,255,255,.2),transparent);animation:button-shimmer 2.5s infinite;pointer-events:none}@keyframes button-shimmer{0%{left:-150%}to{left:150%}}.ambient-bg,.bg-ambient{background:linear-gradient(120deg,#020617,#0f172a,#020617);background-size:300% 300%;animation:ambientMove 18s ease infinite}@keyframes ambientMove{0%{background-position:0% 50%}50%{background-position:100% 50%}to{background-position:0% 50%}}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.file\:text-foreground::file-selector-button{--tw-text-opacity: 1;color:hsl(var(--foreground) / var(--tw-text-opacity, 1))}.placeholder\:text-muted-foreground::-moz-placeholder{--tw-text-opacity: 1;color:hsl(var(--muted-foreground) / var(--tw-text-opacity, 1))}.placeholder\:text-muted-foreground::placeholder{--tw-text-opacity: 1;color:hsl(var(--muted-foreground) / var(--tw-text-opacity, 1))}.after\:pointer-events-none:after{content:var(--tw-content);pointer-events:none}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:-inset-2:after{content:var(--tw-content);top:-.5rem;right:-.5rem;bottom:-.5rem;left:-.5rem}.after\:inset-0:after{content:var(--tw-content);top:0;right:0;bottom:0;left:0}.after\:inset-y-0:after{content:var(--tw-content);top:0;bottom:0}.after\:left-1\/2:after{content:var(--tw-content);left:50%}.after\:block:after{content:var(--tw-content);display:block}.after\:w-1:after{content:var(--tw-content);width:.25rem}.after\:w-\[2px\]:after{content:var(--tw-content);width:2px}.after\:-translate-x-1\/2:after{content:var(--tw-content);--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.after\:rounded-full:after{content:var(--tw-content);border-radius:9999px}.after\:border:after{content:var(--tw-content);border-width:1px}.after\:border-black\/10:after{content:var(--tw-content);border-color:#0000001a}.after\:content-\[\'\'\]:after{--tw-content: "";content:var(--tw-content)}.after\:border.toggle-elevate:after:before{content:var(--tw-content);top:-1px;right:-1px;bottom:-1px;left:-1px}.after\:border.hover-elevate:not(.no-hover-interaction-elevate):after:after,.after\:border.active-elevate:not(.no-active-interaction-elevate):after:after,.after\:border.hover-elevate-2:not(.no-hover-interaction-elevate):after:after,.after\:border.active-elevate-2:not(.no-active-interaction-elevate):after:after{content:var(--tw-content);top:-1px;right:-1px;bottom:-1px;left:-1px}.first\:rounded-l-md:first-child{border-top-left-radius:.375rem;border-bottom-left-radius:.375rem}.first\:border-l:first-child{border-left-width:1px}.last\:rounded-r-md:last-child{border-top-right-radius:.375rem;border-bottom-right-radius:.375rem}.focus-within\:relative:focus-within{position:relative}.focus-within\:z-20:focus-within{z-index:20}.hover\:-translate-y-0\.5:hover{--tw-translate-y: -.125rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:-translate-y-1:hover{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\:border-primary:hover{--tw-border-opacity: 1;border-color:hsl(var(--primary) / var(--tw-border-opacity, 1))}.hover\:border-primary\/50:hover{border-color:hsl(var(--primary) / .5)}.hover\:bg-accent:hover{--tw-bg-opacity: 1;background-color:hsl(var(--accent) / var(--tw-bg-opacity, 1))}.hover\:bg-muted:hover{--tw-bg-opacity: 1;background-color:hsl(var(--muted) / var(--tw-bg-opacity, 1))}.hover\:bg-muted-foreground\/50:hover{background-color:hsl(var(--muted-foreground) / .5)}.hover\:bg-muted\/40:hover{background-color:hsl(var(--muted) / .4)}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted) / .5)}.hover\:bg-primary:hover{--tw-bg-opacity: 1;background-color:hsl(var(--primary) / var(--tw-bg-opacity, 1))}.hover\:bg-primary\/15:hover{background-color:hsl(var(--primary) / .15)}.hover\:bg-secondary:hover{--tw-bg-opacity: 1;background-color:hsl(var(--secondary) / var(--tw-bg-opacity, 1))}.hover\:bg-sidebar-accent:hover{--tw-bg-opacity: 1;background-color:hsl(var(--sidebar-accent) / var(--tw-bg-opacity, 1))}.hover\:text-accent-foreground:hover{--tw-text-opacity: 1;color:hsl(var(--accent-foreground) / var(--tw-text-opacity, 1))}.hover\:text-foreground:hover{--tw-text-opacity: 1;color:hsl(var(--foreground) / var(--tw-text-opacity, 1))}.hover\:text-muted-foreground:hover{--tw-text-opacity: 1;color:hsl(var(--muted-foreground) / var(--tw-text-opacity, 1))}.hover\:text-primary-foreground:hover{--tw-text-opacity: 1;color:hsl(var(--primary-foreground) / var(--tw-text-opacity, 1))}.hover\:text-sidebar-accent-foreground:hover{--tw-text-opacity: 1;color:hsl(var(--sidebar-accent-foreground) / var(--tw-text-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:shadow-2xl:hover{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-\[0_0_0_1px_hsl\(var\(--sidebar-accent\)\)\]:hover{--tw-shadow: 0 0 0 1px hsl(var(--sidebar-accent));--tw-shadow-colored: 0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-\[0_14px_36px_rgba\(59\,130\,246\,0\.35\)\]:hover{--tw-shadow: 0 14px 36px rgba(59,130,246,.35);--tw-shadow-colored: 0 14px 36px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-\[0_20px_50px_rgba\(34\,211\,238\,0\.15\)\]:hover{--tw-shadow: 0 20px 50px rgba(34,211,238,.15);--tw-shadow-colored: 0 20px 50px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-lg:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-xl:hover{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-primary\/10:hover{--tw-shadow-color: hsl(var(--primary) / .1);--tw-shadow: var(--tw-shadow-colored)}.hover\:shadow-primary\/5:hover{--tw-shadow-color: hsl(var(--primary) / .05);--tw-shadow: var(--tw-shadow-colored)}.hover\:after\:bg-sidebar-border:hover:after{content:var(--tw-content);--tw-bg-opacity: 1;background-color:hsl(var(--sidebar-border) / var(--tw-bg-opacity, 1))}.focus\:bg-accent:focus{--tw-bg-opacity: 1;background-color:hsl(var(--accent) / var(--tw-bg-opacity, 1))}.focus\:bg-primary:focus{--tw-bg-opacity: 1;background-color:hsl(var(--primary) / var(--tw-bg-opacity, 1))}.focus\:text-accent-foreground:focus{--tw-text-opacity: 1;color:hsl(var(--accent-foreground) / var(--tw-text-opacity, 1))}.focus\:text-primary-foreground:focus{--tw-text-opacity: 1;color:hsl(var(--primary-foreground) / var(--tw-text-opacity, 1))}.focus\:opacity-100:focus{opacity:1}.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-opacity: 1;--tw-ring-color: hsl(var(--ring) / var(--tw-ring-opacity, 1))}.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\:outline:focus-visible{outline-style:solid}.focus-visible\:outline-2:focus-visible{outline-width:2px}.focus-visible\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\:outline-primary\/60:focus-visible{outline-color:hsl(var(--primary) / .6)}.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-opacity: 1;--tw-ring-color: hsl(var(--ring) / var(--tw-ring-opacity, 1))}.focus-visible\:ring-offset-1:focus-visible{--tw-ring-offset-width: 1px}.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) / 1)}.active\:bg-sidebar-accent:active{--tw-bg-opacity: 1;background-color:hsl(var(--sidebar-accent) / var(--tw-bg-opacity, 1))}.active\:text-sidebar-accent-foreground:active{--tw-text-opacity: 1;color:hsl(var(--sidebar-accent-foreground) / var(--tw-text-opacity, 1))}.active\:shadow-none:active{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group\/menu-item:focus-within .group-focus-within\/menu-item\:opacity-100{opacity:1}.group:hover .group-hover\:translate-x-1{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:scale-110{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\:scale-x-100{--tw-scale-x: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group\/menu-item:hover .group-hover\/menu-item\:opacity-100,.group:hover .group-hover\:opacity-100{opacity:1}.group.destructive .group-\[\.destructive\]\:border-muted\/40{border-color:hsl(var(--muted) / .4)}.group.destructive .group-\[\.destructive\]\:text-red-300{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.group.destructive .group-\[\.destructive\]\:hover\:border-destructive\/30:hover{border-color:hsl(var(--destructive) / .3)}.group.destructive .group-\[\.destructive\]\:hover\:bg-destructive:hover{--tw-bg-opacity: 1;background-color:hsl(var(--destructive) / var(--tw-bg-opacity, 1))}.group.destructive .group-\[\.destructive\]\:hover\:text-destructive-foreground:hover{--tw-text-opacity: 1;color:hsl(var(--destructive-foreground) / var(--tw-text-opacity, 1))}.group.destructive .group-\[\.destructive\]\:hover\:text-red-50:hover{--tw-text-opacity: 1;color:rgb(254 242 242 / var(--tw-text-opacity, 1))}.group.destructive .group-\[\.destructive\]\:focus\:ring-destructive:focus{--tw-ring-opacity: 1;--tw-ring-color: hsl(var(--destructive) / var(--tw-ring-opacity, 1))}.group.destructive .group-\[\.destructive\]\:focus\:ring-red-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(248 113 113 / var(--tw-ring-opacity, 1))}.group.destructive .group-\[\.destructive\]\:focus\:ring-offset-red-600:focus{--tw-ring-offset-color: #dc2626}.peer\/menu-button:hover~.peer-hover\/menu-button\:text-sidebar-accent-foreground{--tw-text-opacity: 1;color:hsl(var(--sidebar-accent-foreground) / var(--tw-text-opacity, 1))}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7}.has-\[\:disabled\]\:opacity-50:has(:disabled){opacity:.5}.aria-disabled\:pointer-events-none[aria-disabled=true]{pointer-events:none}.aria-disabled\:opacity-50[aria-disabled=true]{opacity:.5}.aria-selected\:bg-accent[aria-selected=true]{--tw-bg-opacity: 1;background-color:hsl(var(--accent) / var(--tw-bg-opacity, 1))}.aria-selected\:bg-accent\/50[aria-selected=true]{background-color:hsl(var(--accent) / .5)}.aria-selected\:text-accent-foreground[aria-selected=true]{--tw-text-opacity: 1;color:hsl(var(--accent-foreground) / var(--tw-text-opacity, 1))}.aria-selected\:text-muted-foreground[aria-selected=true]{--tw-text-opacity: 1;color:hsl(var(--muted-foreground) / var(--tw-text-opacity, 1))}.aria-selected\:opacity-100[aria-selected=true]{opacity:1}.data-\[disabled\=true\]\:pointer-events-none[data-disabled=true],.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[panel-group-direction\=vertical\]\:h-px[data-panel-group-direction=vertical]{height:1px}.data-\[panel-group-direction\=vertical\]\:w-full[data-panel-group-direction=vertical]{width:100%}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y: -.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=checked\]\:translate-x-5[data-state=checked]{--tw-translate-x: 1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked],.data-\[swipe\=cancel\]\:translate-x-0[data-swipe=cancel]{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[swipe\=end\]\:translate-x-\[var\(--radix-toast-swipe-end-x\)\][data-swipe=end]{--tw-translate-x: var(--radix-toast-swipe-end-x);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[swipe\=move\]\:translate-x-\[var\(--radix-toast-swipe-move-x\)\][data-swipe=move]{--tw-translate-x: var(--radix-toast-swipe-move-x);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes accordion-up{0%{height:var(--radix-accordion-content-height)}to{height:0}}.data-\[state\=closed\]\:animate-accordion-up[data-state=closed]{animation:accordion-up .2s ease-out}@keyframes accordion-down{0%{height:0}to{height:var(--radix-accordion-content-height)}}.data-\[state\=open\]\:animate-accordion-down[data-state=open]{animation:accordion-down .2s ease-out}.data-\[panel-group-direction\=vertical\]\:flex-col[data-panel-group-direction=vertical]{flex-direction:column}.data-\[active\=true\]\:bg-sidebar-accent[data-active=true]{--tw-bg-opacity: 1;background-color:hsl(var(--sidebar-accent) / var(--tw-bg-opacity, 1))}.data-\[selected\=\'true\'\]\:bg-accent[data-selected=true]{--tw-bg-opacity: 1;background-color:hsl(var(--accent) / var(--tw-bg-opacity, 1))}.data-\[state\=active\]\:bg-background[data-state=active]{--tw-bg-opacity: 1;background-color:hsl(var(--background) / var(--tw-bg-opacity, 1))}.data-\[state\=checked\]\:bg-primary[data-state=checked]{--tw-bg-opacity: 1;background-color:hsl(var(--primary) / var(--tw-bg-opacity, 1))}.data-\[state\=on\]\:bg-accent[data-state=on],.data-\[state\=open\]\:bg-accent[data-state=open]{--tw-bg-opacity: 1;background-color:hsl(var(--accent) / var(--tw-bg-opacity, 1))}.data-\[state\=open\]\:bg-accent\/50[data-state=open]{background-color:hsl(var(--accent) / .5)}.data-\[state\=open\]\:bg-secondary[data-state=open]{--tw-bg-opacity: 1;background-color:hsl(var(--secondary) / var(--tw-bg-opacity, 1))}.data-\[state\=selected\]\:bg-muted[data-state=selected]{--tw-bg-opacity: 1;background-color:hsl(var(--muted) / var(--tw-bg-opacity, 1))}.data-\[state\=unchecked\]\:bg-input[data-state=unchecked]{--tw-bg-opacity: 1;background-color:hsl(var(--input) / var(--tw-bg-opacity, 1))}.data-\[active\=true\]\:font-medium[data-active=true]{font-weight:500}.data-\[active\=true\]\:text-sidebar-accent-foreground[data-active=true]{--tw-text-opacity: 1;color:hsl(var(--sidebar-accent-foreground) / var(--tw-text-opacity, 1))}.data-\[placeholder\]\:text-muted-foreground[data-placeholder]{--tw-text-opacity: 1;color:hsl(var(--muted-foreground) / var(--tw-text-opacity, 1))}.data-\[selected\=true\]\:text-accent-foreground[data-selected=true]{--tw-text-opacity: 1;color:hsl(var(--accent-foreground) / var(--tw-text-opacity, 1))}.data-\[state\=active\]\:text-foreground[data-state=active]{--tw-text-opacity: 1;color:hsl(var(--foreground) / var(--tw-text-opacity, 1))}.data-\[state\=checked\]\:text-primary-foreground[data-state=checked]{--tw-text-opacity: 1;color:hsl(var(--primary-foreground) / var(--tw-text-opacity, 1))}.data-\[state\=on\]\:text-accent-foreground[data-state=on],.data-\[state\=open\]\:text-accent-foreground[data-state=open]{--tw-text-opacity: 1;color:hsl(var(--accent-foreground) / var(--tw-text-opacity, 1))}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{--tw-text-opacity: 1;color:hsl(var(--muted-foreground) / var(--tw-text-opacity, 1))}.data-\[disabled\=true\]\:opacity-50[data-disabled=true],.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[state\=open\]\:opacity-100[data-state=open]{opacity:1}.data-\[state\=active\]\:shadow-sm[data-state=active]{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.data-\[swipe\=move\]\:transition-none[data-swipe=move]{transition-property:none}.data-\[state\=closed\]\:duration-300[data-state=closed]{transition-duration:.3s}.data-\[state\=open\]\:duration-500[data-state=open]{transition-duration:.5s}.data-\[motion\^\=from-\]\:animate-in[data-motion^=from-],.data-\[state\=open\]\:animate-in[data-state=open],.data-\[state\=visible\]\:animate-in[data-state=visible]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\[motion\^\=to-\]\:animate-out[data-motion^=to-],.data-\[state\=closed\]\:animate-out[data-state=closed],.data-\[state\=hidden\]\:animate-out[data-state=hidden],.data-\[swipe\=end\]\:animate-out[data-swipe=end]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\[motion\^\=from-\]\:fade-in[data-motion^=from-]{--tw-enter-opacity: 0}.data-\[motion\^\=to-\]\:fade-out[data-motion^=to-],.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\[state\=closed\]\:fade-out-80[data-state=closed]{--tw-exit-opacity: .8}.data-\[state\=hidden\]\:fade-out[data-state=hidden]{--tw-exit-opacity: 0}.data-\[state\=open\]\:fade-in-0[data-state=open],.data-\[state\=visible\]\:fade-in[data-state=visible]{--tw-enter-opacity: 0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\[state\=open\]\:zoom-in-90[data-state=open]{--tw-enter-scale: .9}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\[motion\=from-end\]\:slide-in-from-right-52[data-motion=from-end]{--tw-enter-translate-x: 13rem}.data-\[motion\=from-start\]\:slide-in-from-left-52[data-motion=from-start]{--tw-enter-translate-x: -13rem}.data-\[motion\=to-end\]\:slide-out-to-right-52[data-motion=to-end]{--tw-exit-translate-x: 13rem}.data-\[motion\=to-start\]\:slide-out-to-left-52[data-motion=to-start]{--tw-exit-translate-x: -13rem}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}.data-\[state\=closed\]\:slide-out-to-bottom[data-state=closed]{--tw-exit-translate-y: 100%}.data-\[state\=closed\]\:slide-out-to-left[data-state=closed]{--tw-exit-translate-x: -100%}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x: -50%}.data-\[state\=closed\]\:slide-out-to-right[data-state=closed],.data-\[state\=closed\]\:slide-out-to-right-full[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\=open\]\:slide-in-from-top-full[data-state=open]{--tw-enter-translate-y: -100%}.data-\[state\=closed\]\:duration-300[data-state=closed]{animation-duration:.3s}.data-\[state\=open\]\:duration-500[data-state=open]{animation-duration:.5s}.data-\[panel-group-direction\=vertical\]\:after\:left-0[data-panel-group-direction=vertical]:after{content:var(--tw-content);left:0}.data-\[panel-group-direction\=vertical\]\:after\:h-1[data-panel-group-direction=vertical]:after{content:var(--tw-content);height:.25rem}.data-\[panel-group-direction\=vertical\]\:after\:w-full[data-panel-group-direction=vertical]:after{content:var(--tw-content);width:100%}.data-\[panel-group-direction\=vertical\]\:after\:-translate-y-1\/2[data-panel-group-direction=vertical]:after{content:var(--tw-content);--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[panel-group-direction\=vertical\]\:after\:translate-x-0[data-panel-group-direction=vertical]:after{content:var(--tw-content);--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=open\]\:hover\:bg-accent:hover[data-state=open]{--tw-bg-opacity: 1;background-color:hsl(var(--accent) / var(--tw-bg-opacity, 1))}.data-\[state\=open\]\:hover\:bg-sidebar-accent:hover[data-state=open]{--tw-bg-opacity: 1;background-color:hsl(var(--sidebar-accent) / var(--tw-bg-opacity, 1))}.data-\[state\=open\]\:hover\:text-sidebar-accent-foreground:hover[data-state=open]{--tw-text-opacity: 1;color:hsl(var(--sidebar-accent-foreground) / var(--tw-text-opacity, 1))}.data-\[state\=open\]\:focus\:bg-accent:focus[data-state=open]{--tw-bg-opacity: 1;background-color:hsl(var(--accent) / var(--tw-bg-opacity, 1))}.group[data-collapsible=offcanvas] .group-data-\[collapsible\=offcanvas\]\:left-\[calc\(var\(--sidebar-width\)\*-1\)\]{left:calc(var(--sidebar-width) * -1)}.group[data-collapsible=offcanvas] .group-data-\[collapsible\=offcanvas\]\:right-\[calc\(var\(--sidebar-width\)\*-1\)\]{right:calc(var(--sidebar-width) * -1)}.group[data-side=left] .group-data-\[side\=left\]\:-right-4{right:-1rem}.group[data-side=right] .group-data-\[side\=right\]\:left-0{left:0}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:-mt-8{margin-top:-2rem}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:hidden{display:none}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:w-\[calc\(var\(--sidebar-width-icon\)\+var\(--spacing-4\)\)\]{width:calc(var(--sidebar-width-icon) + var(--spacing-4))}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:w-\[calc\(var\(--sidebar-width-icon\)\+var\(--spacing-4\)\+2px\)\]{width:calc(var(--sidebar-width-icon) + var(--spacing-4) + 2px)}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:w-\[var\(--sidebar-width-icon\)\]{width:var(--sidebar-width-icon)}.group[data-collapsible=offcanvas] .group-data-\[collapsible\=offcanvas\]\:w-0{width:0px}.group[data-collapsible=offcanvas] .group-data-\[collapsible\=offcanvas\]\:translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group[data-side=right] .group-data-\[side\=right\]\:rotate-180,.group[data-state=open] .group-data-\[state\=open\]\:rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:overflow-hidden{overflow:hidden}.group[data-variant=floating] .group-data-\[variant\=floating\]\:rounded-lg{border-radius:.5625rem}.group[data-variant=floating] .group-data-\[variant\=floating\]\:border{border-width:1px}.group[data-side=left] .group-data-\[side\=left\]\:border-r{border-right-width:1px}.group[data-side=right] .group-data-\[side\=right\]\:border-l{border-left-width:1px}.group[data-variant=floating] .group-data-\[variant\=floating\]\:border-sidebar-border{--tw-border-opacity: 1;border-color:hsl(var(--sidebar-border) / var(--tw-border-opacity, 1))}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:opacity-0{opacity:0}.group[data-variant=floating] .group-data-\[variant\=floating\]\:shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.group[data-variant=floating] .group-data-\[variant\=floating\]\:border.toggle-elevate:before{top:-1px;right:-1px;bottom:-1px;left:-1px}.group[data-variant=floating] .group-data-\[variant\=floating\]\:border.hover-elevate:not(.no-hover-interaction-elevate):after,.group[data-variant=floating] .group-data-\[variant\=floating\]\:border.active-elevate:not(.no-active-interaction-elevate):after,.group[data-variant=floating] .group-data-\[variant\=floating\]\:border.hover-elevate-2:not(.no-hover-interaction-elevate):after,.group[data-variant=floating] .group-data-\[variant\=floating\]\:border.active-elevate-2:not(.no-active-interaction-elevate):after{top:-1px;right:-1px;bottom:-1px;left:-1px}.group[data-collapsible=offcanvas] .group-data-\[collapsible\=offcanvas\]\:after\:left-full:after{content:var(--tw-content);left:100%}.group[data-collapsible=offcanvas] .hover\:group-data-\[collapsible\=offcanvas\]\:bg-sidebar:hover{--tw-bg-opacity: 1;background-color:hsl(var(--sidebar) / var(--tw-bg-opacity, 1))}.peer\/menu-button[data-size=default]~.peer-data-\[size\=default\]\/menu-button\:top-1\.5{top:.375rem}.peer\/menu-button[data-size=lg]~.peer-data-\[size\=lg\]\/menu-button\:top-2\.5{top:.625rem}.peer\/menu-button[data-size=sm]~.peer-data-\[size\=sm\]\/menu-button\:top-1{top:.25rem}.peer\/menu-button[data-active=true]~.peer-data-\[active\=true\]\/menu-button\:text-sidebar-accent-foreground{--tw-text-opacity: 1;color:hsl(var(--sidebar-accent-foreground) / var(--tw-text-opacity, 1))}.dark\:border-destructive:is(.dark *){--tw-border-opacity: 1;border-color:hsl(var(--destructive) / var(--tw-border-opacity, 1))}.dark\:after\:border-white\/10:is(.dark *):after{content:var(--tw-content);border-color:#ffffff1a}@media (min-width: 640px){.sm\:bottom-0{bottom:0}.sm\:right-0{right:0}.sm\:top-auto{top:auto}.sm\:mt-0{margin-top:0}.sm\:flex{display:flex}.sm\:max-w-2xl{max-width:42rem}.sm\:max-w-lg{max-width:32rem}.sm\:max-w-sm{max-width:24rem}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:flex-col{flex-direction:column}.sm\:items-center{align-items:center}.sm\:justify-end{justify-content:flex-end}.sm\:justify-between{justify-content:space-between}.sm\:gap-2\.5{gap:.625rem}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.sm\:rounded-lg{border-radius:.5625rem}.sm\:text-left{text-align:left}.data-\[state\=open\]\:sm\:slide-in-from-bottom-full[data-state=open]{--tw-enter-translate-y: 100%}}@media (min-width: 768px){.md\:absolute{position:absolute}.md\:block{display:block}.md\:flex{display:flex}.md\:hidden{display:none}.md\:w-72{width:18rem}.md\:w-\[var\(--radix-navigation-menu-viewport-width\)\]{width:var(--radix-navigation-menu-viewport-width)}.md\:w-auto{width:auto}.md\:max-w-\[420px\]{max-width:420px}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.md\:grid-cols-\[1fr_auto\]{grid-template-columns:1fr auto}.md\:flex-row{flex-direction:row}.md\:items-end{align-items:flex-end}.md\:items-center{align-items:center}.md\:justify-between{justify-content:space-between}.md\:text-right{text-align:right}.md\:text-2xl{font-size:1.5rem;line-height:2rem}.md\:text-4xl{font-size:2.25rem;line-height:2.5rem}.md\:text-5xl{font-size:3rem;line-height:1}.md\:text-7xl{font-size:4.5rem;line-height:1}.md\:text-sm{font-size:.875rem;line-height:1.25rem}.md\:opacity-0{opacity:0}.md\:after\:hidden:after{content:var(--tw-content);display:none}.peer[data-variant=inset]~.md\:peer-data-\[variant\=inset\]\:m-2{margin:.5rem}.peer[data-variant=inset]~.md\:peer-data-\[variant\=inset\]\:ml-0{margin-left:0}.peer[data-variant=inset][data-state=collapsed]~.md\:peer-data-\[variant\=inset\]\:peer-data-\[state\=collapsed\]\:ml-2{margin-left:.5rem}.peer[data-variant=inset]~.md\:peer-data-\[variant\=inset\]\:rounded-xl{border-radius:.75rem}.peer[data-variant=inset]~.md\:peer-data-\[variant\=inset\]\:shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}}@media (min-width: 1024px){.lg\:w-60{width:15rem}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:flex-row{flex-direction:row}}.\[\&\:has\(\[aria-selected\]\)\]\:bg-accent:has([aria-selected]){--tw-bg-opacity: 1;background-color:hsl(var(--accent) / var(--tw-bg-opacity, 1))}.first\:\[\&\:has\(\[aria-selected\]\)\]\:rounded-l-md:has([aria-selected]):first-child{border-top-left-radius:.375rem;border-bottom-left-radius:.375rem}.last\:\[\&\:has\(\[aria-selected\]\)\]\:rounded-r-md:has([aria-selected]):last-child{border-top-right-radius:.375rem;border-bottom-right-radius:.375rem}.\[\&\:has\(\[aria-selected\]\.day-outside\)\]\:bg-accent\/50:has([aria-selected].day-outside){background-color:hsl(var(--accent) / .5)}.\[\&\:has\(\[aria-selected\]\.day-range-end\)\]\:rounded-r-md:has([aria-selected].day-range-end){border-top-right-radius:.375rem;border-bottom-right-radius:.375rem}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\&\>button\]\:hidden>button{display:none}.\[\&\>span\:last-child\]\:truncate>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.\[\&\>span\]\:line-clamp-1>span{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\[\&\>svg\+div\]\:translate-y-\[-3px\]>svg+div{--tw-translate-y: -3px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\[\&\>svg\]\:absolute>svg{position:absolute}.\[\&\>svg\]\:left-4>svg{left:1rem}.\[\&\>svg\]\:top-4>svg{top:1rem}.\[\&\>svg\]\:size-4>svg{width:1rem;height:1rem}.\[\&\>svg\]\:h-2\.5>svg{height:.625rem}.\[\&\>svg\]\:h-3>svg{height:.75rem}.\[\&\>svg\]\:h-3\.5>svg{height:.875rem}.\[\&\>svg\]\:h-4>svg{height:1rem}.\[\&\>svg\]\:w-2\.5>svg{width:.625rem}.\[\&\>svg\]\:w-3>svg{width:.75rem}.\[\&\>svg\]\:w-3\.5>svg{width:.875rem}.\[\&\>svg\]\:w-4>svg{width:1rem}.\[\&\>svg\]\:shrink-0>svg{flex-shrink:0}.\[\&\>svg\]\:text-destructive>svg{--tw-text-opacity: 1;color:hsl(var(--destructive) / var(--tw-text-opacity, 1))}.\[\&\>svg\]\:text-foreground>svg{--tw-text-opacity: 1;color:hsl(var(--foreground) / var(--tw-text-opacity, 1))}.\[\&\>svg\]\:text-muted-foreground>svg{--tw-text-opacity: 1;color:hsl(var(--muted-foreground) / var(--tw-text-opacity, 1))}.\[\&\>svg\]\:text-sidebar-accent-foreground>svg{--tw-text-opacity: 1;color:hsl(var(--sidebar-accent-foreground) / var(--tw-text-opacity, 1))}.\[\&\>svg\~\*\]\:pl-7>svg~*{padding-left:1.75rem}.\[\&\>tr\]\:last\:border-b-0:last-child>tr{border-bottom-width:0px}.\[\&\[data-panel-group-direction\=vertical\]\>div\]\:rotate-90[data-panel-group-direction=vertical]>div{--tw-rotate: 90deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\[\&\[data-state\=open\]\>svg\]\:rotate-180[data-state=open]>svg{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\[\&_\.recharts-cartesian-axis-tick_text\]\:fill-muted-foreground .recharts-cartesian-axis-tick text{fill:hsl(var(--muted-foreground) / 1)}.\[\&_\.recharts-cartesian-grid_line\[stroke\=\'\#ccc\'\]\]\:stroke-border\/50 .recharts-cartesian-grid line[stroke="#ccc"]{stroke:hsl(var(--border) / .5)}.\[\&_\.recharts-curve\.recharts-tooltip-cursor\]\:stroke-border .recharts-curve.recharts-tooltip-cursor{stroke:hsl(var(--border) / 1)}.\[\&_\.recharts-dot\[stroke\=\'\#fff\'\]\]\:stroke-transparent .recharts-dot[stroke="#fff"]{stroke:transparent}.\[\&_\.recharts-layer\]\:outline-none .recharts-layer{outline:2px solid transparent;outline-offset:2px}.\[\&_\.recharts-polar-grid_\[stroke\=\'\#ccc\'\]\]\:stroke-border .recharts-polar-grid [stroke="#ccc"]{stroke:hsl(var(--border) / 1)}.\[\&_\.recharts-radial-bar-background-sector\]\:fill-muted .recharts-radial-bar-background-sector,.\[\&_\.recharts-rectangle\.recharts-tooltip-cursor\]\:fill-muted .recharts-rectangle.recharts-tooltip-cursor{fill:hsl(var(--muted) / 1)}.\[\&_\.recharts-reference-line_\[stroke\=\'\#ccc\'\]\]\:stroke-border .recharts-reference-line [stroke="#ccc"]{stroke:hsl(var(--border) / 1)}.\[\&_\.recharts-sector\[stroke\=\'\#fff\'\]\]\:stroke-transparent .recharts-sector[stroke="#fff"]{stroke:transparent}.\[\&_\.recharts-sector\]\:outline-none .recharts-sector,.\[\&_\.recharts-surface\]\:outline-none .recharts-surface{outline:2px solid transparent;outline-offset:2px}.\[\&_\[cmdk-group-heading\]\]\:px-2 [cmdk-group-heading]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-group-heading\]\]\:py-1\.5 [cmdk-group-heading]{padding-top:.375rem;padding-bottom:.375rem}.\[\&_\[cmdk-group-heading\]\]\:text-xs [cmdk-group-heading]{font-size:.75rem;line-height:1rem}.\[\&_\[cmdk-group-heading\]\]\:font-medium [cmdk-group-heading]{font-weight:500}.\[\&_\[cmdk-group-heading\]\]\:text-muted-foreground [cmdk-group-heading]{--tw-text-opacity: 1;color:hsl(var(--muted-foreground) / var(--tw-text-opacity, 1))}.\[\&_\[cmdk-group\]\:not\(\[hidden\]\)_\~\[cmdk-group\]\]\:pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0}.\[\&_\[cmdk-group\]\]\:px-2 [cmdk-group]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-input-wrapper\]_svg\]\:h-5 [cmdk-input-wrapper] svg{height:1.25rem}.\[\&_\[cmdk-input-wrapper\]_svg\]\:w-5 [cmdk-input-wrapper] svg{width:1.25rem}.\[\&_\[cmdk-input\]\]\:h-12 [cmdk-input]{height:3rem}.\[\&_\[cmdk-item\]\]\:px-2 [cmdk-item]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-item\]\]\:py-3 [cmdk-item]{padding-top:.75rem;padding-bottom:.75rem}.\[\&_\[cmdk-item\]_svg\]\:h-5 [cmdk-item] svg{height:1.25rem}.\[\&_\[cmdk-item\]_svg\]\:w-5 [cmdk-item] svg{width:1.25rem}.\[\&_p\]\:leading-relaxed p{line-height:1.625}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-4 svg{width:1rem;height:1rem}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-width:0px}.\[\&_tr\]\:border-b tr{border-bottom-width:1px}[data-side=left][data-collapsible=offcanvas] .\[\[data-side\=left\]\[data-collapsible\=offcanvas\]_\&\]\:-right-2{right:-.5rem}[data-side=left][data-state=collapsed] .\[\[data-side\=left\]\[data-state\=collapsed\]_\&\]\:cursor-e-resize{cursor:e-resize}[data-side=right][data-collapsible=offcanvas] .\[\[data-side\=right\]\[data-collapsible\=offcanvas\]_\&\]\:-left-2{left:-.5rem}[data-side=right][data-state=collapsed] .\[\[data-side\=right\]\[data-state\=collapsed\]_\&\]\:cursor-w-resize{cursor:w-resize} diff --git a/dist/assets/index-z66hXP0q.js b/dist/assets/index-z66hXP0q.js deleted file mode 100644 index 372dd415..00000000 --- a/dist/assets/index-z66hXP0q.js +++ /dev/null @@ -1,379 +0,0 @@ -var JS=e=>{throw TypeError(e)};var Ny=(e,t,n)=>t.has(e)||JS("Cannot "+n);var _=(e,t,n)=>(Ny(e,t,"read from private field"),n?n.call(e):t.get(e)),te=(e,t,n)=>t.has(e)?JS("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Q=(e,t,n,r)=>(Ny(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),me=(e,t,n)=>(Ny(e,t,"access private method"),n);var Qd=(e,t,n,r)=>({set _(i){Q(e,t,i,n)},get _(){return _(e,t,r)}});function J3(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(i){if(i.ep)return;i.ep=!0;const a=n(i);fetch(i.href,a)}})();var Zd=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ie(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var SC={exports:{}},Jp={},jC={exports:{}},ge={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Pd=Symbol.for("react.element"),e4=Symbol.for("react.portal"),t4=Symbol.for("react.fragment"),n4=Symbol.for("react.strict_mode"),r4=Symbol.for("react.profiler"),i4=Symbol.for("react.provider"),a4=Symbol.for("react.context"),o4=Symbol.for("react.forward_ref"),s4=Symbol.for("react.suspense"),l4=Symbol.for("react.memo"),c4=Symbol.for("react.lazy"),ej=Symbol.iterator;function u4(e){return e===null||typeof e!="object"?null:(e=ej&&e[ej]||e["@@iterator"],typeof e=="function"?e:null)}var PC={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},NC=Object.assign,OC={};function Kl(e,t,n){this.props=e,this.context=t,this.refs=OC,this.updater=n||PC}Kl.prototype.isReactComponent={};Kl.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Kl.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function AC(){}AC.prototype=Kl.prototype;function vb(e,t,n){this.props=e,this.context=t,this.refs=OC,this.updater=n||PC}var gb=vb.prototype=new AC;gb.constructor=vb;NC(gb,Kl.prototype);gb.isPureReactComponent=!0;var tj=Array.isArray,EC=Object.prototype.hasOwnProperty,xb={current:null},TC={key:!0,ref:!0,__self:!0,__source:!0};function CC(e,t,n){var r,i={},a=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(a=""+t.key),t)EC.call(t,r)&&!TC.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1>>1,W=k[q];if(0>>1;qi(Pe,R))Mei(st,Pe)?(k[q]=st,k[Me]=R,q=Me):(k[q]=Pe,k[le]=R,q=le);else if(Mei(st,R))k[q]=st,k[Me]=R,q=Me;else break e}}return L}function i(k,L){var R=k.sortIndex-L.sortIndex;return R!==0?R:k.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var l=[],c=[],d=1,f=null,h=3,p=!1,g=!1,m=!1,y=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function b(k){for(var L=n(c);L!==null;){if(L.callback===null)r(c);else if(L.startTime<=k)r(c),L.sortIndex=L.expirationTime,t(l,L);else break;L=n(c)}}function P(k){if(m=!1,b(k),!g)if(n(l)!==null)g=!0,F(S);else{var L=n(c);L!==null&&B(P,L.startTime-k)}}function S(k,L){g=!1,m&&(m=!1,v(O),O=-1),p=!0;var R=h;try{for(b(L),f=n(l);f!==null&&(!(f.expirationTime>L)||k&&!T());){var q=f.callback;if(typeof q=="function"){f.callback=null,h=f.priorityLevel;var W=q(f.expirationTime<=L);L=e.unstable_now(),typeof W=="function"?f.callback=W:f===n(l)&&r(l),b(L)}else r(l);f=n(l)}if(f!==null)var ee=!0;else{var le=n(c);le!==null&&B(P,le.startTime-L),ee=!1}return ee}finally{f=null,h=R,p=!1}}var j=!1,N=null,O=-1,A=5,E=-1;function T(){return!(e.unstable_now()-Ek||125q?(k.sortIndex=R,t(c,k),n(l)===null&&k===n(c)&&(m?(v(O),O=-1):m=!0,B(P,R-q))):(k.sortIndex=W,t(l,k),g||p||(g=!0,F(S))),k},e.unstable_shouldYield=T,e.unstable_wrapCallback=function(k){var L=h;return function(){var R=h;h=L;try{return k.apply(this,arguments)}finally{h=R}}}})(DC);RC.exports=DC;var w4=RC.exports;/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var S4=w,Cn=w4;function K(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),dg=Object.prototype.hasOwnProperty,j4=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,rj={},ij={};function P4(e){return dg.call(ij,e)?!0:dg.call(rj,e)?!1:j4.test(e)?ij[e]=!0:(rj[e]=!0,!1)}function N4(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function O4(e,t,n,r){if(t===null||typeof t>"u"||N4(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function on(e,t,n,r,i,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var Ft={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ft[e]=new on(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ft[t]=new on(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ft[e]=new on(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ft[e]=new on(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ft[e]=new on(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ft[e]=new on(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ft[e]=new on(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ft[e]=new on(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ft[e]=new on(e,5,!1,e.toLowerCase(),null,!1,!1)});var wb=/[\-:]([a-z])/g;function Sb(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(wb,Sb);Ft[t]=new on(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(wb,Sb);Ft[t]=new on(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(wb,Sb);Ft[t]=new on(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ft[e]=new on(e,1,!1,e.toLowerCase(),null,!1,!1)});Ft.xlinkHref=new on("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ft[e]=new on(e,1,!1,e.toLowerCase(),null,!0,!0)});function jb(e,t,n,r){var i=Ft.hasOwnProperty(t)?Ft[t]:null;(i!==null?i.type!==0:r||!(2s||i[o]!==a[s]){var l=` -`+i[o].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=o&&0<=s);break}}}finally{Ey=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Bc(e):""}function A4(e){switch(e.tag){case 5:return Bc(e.type);case 16:return Bc("Lazy");case 13:return Bc("Suspense");case 19:return Bc("SuspenseList");case 0:case 2:case 15:return e=Ty(e.type,!1),e;case 11:return e=Ty(e.type.render,!1),e;case 1:return e=Ty(e.type,!0),e;default:return""}}function mg(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ys:return"Fragment";case ms:return"Portal";case fg:return"Profiler";case Pb:return"StrictMode";case hg:return"Suspense";case pg:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case FC:return(e.displayName||"Context")+".Consumer";case LC:return(e._context.displayName||"Context")+".Provider";case Nb:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ob:return t=e.displayName||null,t!==null?t:mg(e.type)||"Memo";case Qi:t=e._payload,e=e._init;try{return mg(e(t))}catch{}}return null}function E4(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return mg(t);case 8:return t===Pb?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Ca(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function zC(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function T4(e){var t=zC(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,a.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function tf(e){e._valueTracker||(e._valueTracker=T4(e))}function VC(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=zC(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function fh(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function yg(e,t){var n=t.checked;return at({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function oj(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ca(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function UC(e,t){t=t.checked,t!=null&&jb(e,"checked",t,!1)}function vg(e,t){UC(e,t);var n=Ca(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?gg(e,t.type,n):t.hasOwnProperty("defaultValue")&&gg(e,t.type,Ca(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function sj(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function gg(e,t,n){(t!=="number"||fh(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var zc=Array.isArray;function Rs(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=nf.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function hu(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Gc={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},C4=["Webkit","ms","Moz","O"];Object.keys(Gc).forEach(function(e){C4.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Gc[t]=Gc[e]})});function KC(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Gc.hasOwnProperty(e)&&Gc[e]?(""+t).trim():t+"px"}function GC(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=KC(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var _4=at({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function wg(e,t){if(t){if(_4[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(K(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(K(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(K(61))}if(t.style!=null&&typeof t.style!="object")throw Error(K(62))}}function Sg(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var jg=null;function Ab(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Pg=null,Ds=null,Is=null;function uj(e){if(e=Ad(e)){if(typeof Pg!="function")throw Error(K(280));var t=e.stateNode;t&&(t=im(t),Pg(e.stateNode,e.type,t))}}function YC(e){Ds?Is?Is.push(e):Is=[e]:Ds=e}function XC(){if(Ds){var e=Ds,t=Is;if(Is=Ds=null,uj(e),t)for(e=0;e>>=0,e===0?32:31-(V4(e)/U4|0)|0}var rf=64,af=4194304;function Vc(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function yh(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=n&268435455;if(o!==0){var s=o&~i;s!==0?r=Vc(s):(a&=o,a!==0&&(r=Vc(a)))}else o=n&~i,o!==0?r=Vc(o):a!==0&&(r=Vc(a));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,a=t&-t,i>=a||i===16&&(a&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Nd(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Sr(t),e[t]=n}function K4(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Xc),xj=" ",bj=!1;function y_(e,t){switch(e){case"keyup":return w5.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function v_(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var vs=!1;function j5(e,t){switch(e){case"compositionend":return v_(t);case"keypress":return t.which!==32?null:(bj=!0,xj);case"textInput":return e=t.data,e===xj&&bj?null:e;default:return null}}function P5(e,t){if(vs)return e==="compositionend"||!Rb&&y_(e,t)?(e=p_(),Kf=kb=ha=null,vs=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Pj(n)}}function w_(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?w_(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function S_(){for(var e=window,t=fh();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=fh(e.document)}return t}function Db(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function $5(e){var t=S_(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&w_(n.ownerDocument.documentElement,n)){if(r!==null&&Db(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=r.end===void 0?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=Nj(n,a);var o=Nj(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,gs=null,Cg=null,Zc=null,_g=!1;function Oj(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;_g||gs==null||gs!==fh(r)||(r=gs,"selectionStart"in r&&Db(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Zc&&xu(Zc,r)||(Zc=r,r=xh(Cg,"onSelect"),0ws||(e.current=Ig[ws],Ig[ws]=null,ws--)}function He(e,t){ws++,Ig[ws]=e.current,e.current=t}var _a={},Qt=Va(_a),hn=Va(!1),Co=_a;function dl(e,t){var n=e.type.contextTypes;if(!n)return _a;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in n)i[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function pn(e){return e=e.childContextTypes,e!=null}function wh(){Xe(hn),Xe(Qt)}function $j(e,t,n){if(Qt.current!==_a)throw Error(K(168));He(Qt,t),He(hn,n)}function __(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(K(108,E4(e)||"Unknown",i));return at({},n,r)}function Sh(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||_a,Co=Qt.current,He(Qt,e),He(hn,hn.current),!0}function Mj(e,t,n){var r=e.stateNode;if(!r)throw Error(K(169));n?(e=__(e,t,Co),r.__reactInternalMemoizedMergedChildContext=e,Xe(hn),Xe(Qt),He(Qt,e)):Xe(hn),He(hn,n)}var si=null,am=!1,Uy=!1;function k_(e){si===null?si=[e]:si.push(e)}function H5(e){am=!0,k_(e)}function Ua(){if(!Uy&&si!==null){Uy=!0;var e=0,t=ke;try{var n=si;for(ke=1;e>=o,i-=o,ci=1<<32-Sr(t)+i|n<O?(A=N,N=null):A=N.sibling;var E=h(v,N,b[O],P);if(E===null){N===null&&(N=A);break}e&&N&&E.alternate===null&&t(v,N),x=a(E,x,O),j===null?S=E:j.sibling=E,j=E,N=A}if(O===b.length)return n(v,N),Qe&&eo(v,O),S;if(N===null){for(;OO?(A=N,N=null):A=N.sibling;var T=h(v,N,E.value,P);if(T===null){N===null&&(N=A);break}e&&N&&T.alternate===null&&t(v,N),x=a(T,x,O),j===null?S=T:j.sibling=T,j=T,N=A}if(E.done)return n(v,N),Qe&&eo(v,O),S;if(N===null){for(;!E.done;O++,E=b.next())E=f(v,E.value,P),E!==null&&(x=a(E,x,O),j===null?S=E:j.sibling=E,j=E);return Qe&&eo(v,O),S}for(N=r(v,N);!E.done;O++,E=b.next())E=p(N,v,O,E.value,P),E!==null&&(e&&E.alternate!==null&&N.delete(E.key===null?O:E.key),x=a(E,x,O),j===null?S=E:j.sibling=E,j=E);return e&&N.forEach(function(C){return t(v,C)}),Qe&&eo(v,O),S}function y(v,x,b,P){if(typeof b=="object"&&b!==null&&b.type===ys&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case ef:e:{for(var S=b.key,j=x;j!==null;){if(j.key===S){if(S=b.type,S===ys){if(j.tag===7){n(v,j.sibling),x=i(j,b.props.children),x.return=v,v=x;break e}}else if(j.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Qi&&Ij(S)===j.type){n(v,j.sibling),x=i(j,b.props),x.ref=Pc(v,j,b),x.return=v,v=x;break e}n(v,j);break}else t(v,j);j=j.sibling}b.type===ys?(x=No(b.props.children,v.mode,P,b.key),x.return=v,v=x):(P=th(b.type,b.key,b.props,null,v.mode,P),P.ref=Pc(v,x,b),P.return=v,v=P)}return o(v);case ms:e:{for(j=b.key;x!==null;){if(x.key===j)if(x.tag===4&&x.stateNode.containerInfo===b.containerInfo&&x.stateNode.implementation===b.implementation){n(v,x.sibling),x=i(x,b.children||[]),x.return=v,v=x;break e}else{n(v,x);break}else t(v,x);x=x.sibling}x=Qy(b,v.mode,P),x.return=v,v=x}return o(v);case Qi:return j=b._init,y(v,x,j(b._payload),P)}if(zc(b))return g(v,x,b,P);if(xc(b))return m(v,x,b,P);ff(v,b)}return typeof b=="string"&&b!==""||typeof b=="number"?(b=""+b,x!==null&&x.tag===6?(n(v,x.sibling),x=i(x,b),x.return=v,v=x):(n(v,x),x=Xy(b,v.mode,P),x.return=v,v=x),o(v)):n(v,x)}return y}var hl=D_(!0),I_=D_(!1),Nh=Va(null),Oh=null,Ps=null,Bb=null;function zb(){Bb=Ps=Oh=null}function Vb(e){var t=Nh.current;Xe(Nh),e._currentValue=t}function Bg(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Fs(e,t){Oh=e,Bb=Ps=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(dn=!0),e.firstContext=null)}function rr(e){var t=e._currentValue;if(Bb!==e)if(e={context:e,memoizedValue:t,next:null},Ps===null){if(Oh===null)throw Error(K(308));Ps=e,Oh.dependencies={lanes:0,firstContext:e}}else Ps=Ps.next=e;return t}var lo=null;function Ub(e){lo===null?lo=[e]:lo.push(e)}function L_(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Ub(t)):(n.next=i.next,i.next=n),t.interleaved=n,Oi(e,r)}function Oi(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Zi=!1;function Wb(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function F_(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function mi(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function wa(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,je&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Oi(e,n)}return i=r.interleaved,i===null?(t.next=t,Ub(r)):(t.next=i.next,i.next=t),r.interleaved=t,Oi(e,n)}function Yf(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Tb(e,n)}}function Lj(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ah(e,t,n,r){var i=e.updateQueue;Zi=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var l=s,c=l.next;l.next=null,o===null?a=c:o.next=c,o=l;var d=e.alternate;d!==null&&(d=d.updateQueue,s=d.lastBaseUpdate,s!==o&&(s===null?d.firstBaseUpdate=c:s.next=c,d.lastBaseUpdate=l))}if(a!==null){var f=i.baseState;o=0,d=c=l=null,s=a;do{var h=s.lane,p=s.eventTime;if((r&h)===h){d!==null&&(d=d.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var g=e,m=s;switch(h=t,p=n,m.tag){case 1:if(g=m.payload,typeof g=="function"){f=g.call(p,f,h);break e}f=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=m.payload,h=typeof g=="function"?g.call(p,f,h):g,h==null)break e;f=at({},f,h);break e;case 2:Zi=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,h=i.effects,h===null?i.effects=[s]:h.push(s))}else p={eventTime:p,lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},d===null?(c=d=p,l=f):d=d.next=p,o|=h;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;h=s,s=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(d===null&&(l=f),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=d,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);$o|=o,e.lanes=o,e.memoizedState=f}}function Fj(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Hy.transition;Hy.transition={};try{e(!1),t()}finally{ke=n,Hy.transition=r}}function n2(){return ir().memoizedState}function Y5(e,t,n){var r=ja(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},r2(e))i2(t,n);else if(n=L_(e,t,n,r),n!==null){var i=rn();jr(n,e,r,i),a2(n,t,r)}}function X5(e,t,n){var r=ja(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(r2(e))i2(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Nr(s,o)){var l=t.interleaved;l===null?(i.next=i,Ub(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=L_(e,t,i,r),n!==null&&(i=rn(),jr(n,e,r,i),a2(n,t,r))}}function r2(e){var t=e.alternate;return e===it||t!==null&&t===it}function i2(e,t){Jc=Th=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function a2(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Tb(e,n)}}var Ch={readContext:rr,useCallback:zt,useContext:zt,useEffect:zt,useImperativeHandle:zt,useInsertionEffect:zt,useLayoutEffect:zt,useMemo:zt,useReducer:zt,useRef:zt,useState:zt,useDebugValue:zt,useDeferredValue:zt,useTransition:zt,useMutableSource:zt,useSyncExternalStore:zt,useId:zt,unstable_isNewReconciler:!1},Q5={readContext:rr,useCallback:function(e,t){return Rr().memoizedState=[e,t===void 0?null:t],e},useContext:rr,useEffect:zj,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Qf(4194308,4,Q_.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Qf(4194308,4,e,t)},useInsertionEffect:function(e,t){return Qf(4,2,e,t)},useMemo:function(e,t){var n=Rr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Rr();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Y5.bind(null,it,e),[r.memoizedState,e]},useRef:function(e){var t=Rr();return e={current:e},t.memoizedState=e},useState:Bj,useDebugValue:Zb,useDeferredValue:function(e){return Rr().memoizedState=e},useTransition:function(){var e=Bj(!1),t=e[0];return e=G5.bind(null,e[1]),Rr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=it,i=Rr();if(Qe){if(n===void 0)throw Error(K(407));n=n()}else{if(n=t(),Ct===null)throw Error(K(349));ko&30||U_(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,zj(H_.bind(null,r,a,e),[e]),r.flags|=2048,Au(9,W_.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=Rr(),t=Ct.identifierPrefix;if(Qe){var n=ui,r=ci;n=(r&~(1<<32-Sr(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Nu++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[zr]=t,e[Su]=r,m2(e,t,!1,!1),t.stateNode=e;e:{switch(o=Sg(n,r),n){case"dialog":Ke("cancel",e),Ke("close",e),i=r;break;case"iframe":case"object":case"embed":Ke("load",e),i=r;break;case"video":case"audio":for(i=0;iyl&&(t.flags|=128,r=!0,Nc(a,!1),t.lanes=4194304)}else{if(!r)if(e=Eh(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Nc(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!Qe)return Vt(t),null}else 2*ht()-a.renderingStartTime>yl&&n!==1073741824&&(t.flags|=128,r=!0,Nc(a,!1),t.lanes=4194304);a.isBackwards?(o.sibling=t.child,t.child=o):(n=a.last,n!==null?n.sibling=o:t.child=o,a.last=o)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=ht(),t.sibling=null,n=tt.current,He(tt,r?n&1|2:n&1),t):(Vt(t),null);case 22:case 23:return iw(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Sn&1073741824&&(Vt(t),t.subtreeFlags&6&&(t.flags|=8192)):Vt(t),null;case 24:return null;case 25:return null}throw Error(K(156,t.tag))}function aF(e,t){switch(Lb(t),t.tag){case 1:return pn(t.type)&&wh(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return pl(),Xe(hn),Xe(Qt),Kb(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return qb(t),null;case 13:if(Xe(tt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(K(340));fl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Xe(tt),null;case 4:return pl(),null;case 10:return Vb(t.type._context),null;case 22:case 23:return iw(),null;case 24:return null;default:return null}}var pf=!1,qt=!1,oF=typeof WeakSet=="function"?WeakSet:Set,Z=null;function Ns(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ut(e,t,r)}else n.current=null}function Yg(e,t,n){try{n()}catch(r){ut(e,t,r)}}var Zj=!1;function sF(e,t){if(kg=vh,e=S_(),Db(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var o=0,s=-1,l=-1,c=0,d=0,f=e,h=null;t:for(;;){for(var p;f!==n||i!==0&&f.nodeType!==3||(s=o+i),f!==a||r!==0&&f.nodeType!==3||(l=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(p=f.firstChild)!==null;)h=f,f=p;for(;;){if(f===e)break t;if(h===n&&++c===i&&(s=o),h===a&&++d===r&&(l=o),(p=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=p}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for($g={focusedElem:e,selectionRange:n},vh=!1,Z=t;Z!==null;)if(t=Z,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Z=e;else for(;Z!==null;){t=Z;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var m=g.memoizedProps,y=g.memoizedState,v=t.stateNode,x=v.getSnapshotBeforeUpdate(t.elementType===t.type?m:pr(t.type,m),y);v.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var b=t.stateNode.containerInfo;b.nodeType===1?b.textContent="":b.nodeType===9&&b.documentElement&&b.removeChild(b.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(K(163))}}catch(P){ut(t,t.return,P)}if(e=t.sibling,e!==null){e.return=t.return,Z=e;break}Z=t.return}return g=Zj,Zj=!1,g}function eu(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&Yg(t,n,a)}i=i.next}while(i!==r)}}function lm(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Xg(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function g2(e){var t=e.alternate;t!==null&&(e.alternate=null,g2(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[zr],delete t[Su],delete t[Dg],delete t[U5],delete t[W5])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function x2(e){return e.tag===5||e.tag===3||e.tag===4}function Jj(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||x2(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Qg(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=bh));else if(r!==4&&(e=e.child,e!==null))for(Qg(e,t,n),e=e.sibling;e!==null;)Qg(e,t,n),e=e.sibling}function Zg(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Zg(e,t,n),e=e.sibling;e!==null;)Zg(e,t,n),e=e.sibling}var Rt=null,yr=!1;function Ui(e,t,n){for(n=n.child;n!==null;)b2(e,t,n),n=n.sibling}function b2(e,t,n){if(Hr&&typeof Hr.onCommitFiberUnmount=="function")try{Hr.onCommitFiberUnmount(em,n)}catch{}switch(n.tag){case 5:qt||Ns(n,t);case 6:var r=Rt,i=yr;Rt=null,Ui(e,t,n),Rt=r,yr=i,Rt!==null&&(yr?(e=Rt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Rt.removeChild(n.stateNode));break;case 18:Rt!==null&&(yr?(e=Rt,n=n.stateNode,e.nodeType===8?Vy(e.parentNode,n):e.nodeType===1&&Vy(e,n),vu(e)):Vy(Rt,n.stateNode));break;case 4:r=Rt,i=yr,Rt=n.stateNode.containerInfo,yr=!0,Ui(e,t,n),Rt=r,yr=i;break;case 0:case 11:case 14:case 15:if(!qt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&Yg(n,t,o),i=i.next}while(i!==r)}Ui(e,t,n);break;case 1:if(!qt&&(Ns(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){ut(n,t,s)}Ui(e,t,n);break;case 21:Ui(e,t,n);break;case 22:n.mode&1?(qt=(r=qt)||n.memoizedState!==null,Ui(e,t,n),qt=r):Ui(e,t,n);break;default:Ui(e,t,n)}}function eP(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new oF),t.forEach(function(r){var i=yF.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function ur(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=o),r&=~a}if(r=i,r=ht()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*cF(r/1960))-r,10e?16:e,pa===null)var r=!1;else{if(e=pa,pa=null,$h=0,je&6)throw Error(K(331));var i=je;for(je|=4,Z=e.current;Z!==null;){var a=Z,o=a.child;if(Z.flags&16){var s=a.deletions;if(s!==null){for(var l=0;lht()-nw?Po(e,0):tw|=n),mn(e,t)}function E2(e,t){t===0&&(e.mode&1?(t=af,af<<=1,!(af&130023424)&&(af=4194304)):t=1);var n=rn();e=Oi(e,t),e!==null&&(Nd(e,t,n),mn(e,n))}function mF(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),E2(e,n)}function yF(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(K(314))}r!==null&&r.delete(t),E2(e,n)}var T2;T2=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||hn.current)dn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return dn=!1,rF(e,t,n);dn=!!(e.flags&131072)}else dn=!1,Qe&&t.flags&1048576&&$_(t,Ph,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Zf(e,t),e=t.pendingProps;var i=dl(t,Qt.current);Fs(t,n),i=Yb(null,t,r,e,i,n);var a=Xb();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,pn(r)?(a=!0,Sh(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Wb(t),i.updater=sm,t.stateNode=i,i._reactInternals=t,Vg(t,r,e,n),t=Hg(null,t,r,!0,a,n)):(t.tag=0,Qe&&a&&Ib(t),tn(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Zf(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=gF(r),e=pr(r,e),i){case 0:t=Wg(null,t,r,e,n);break e;case 1:t=Yj(null,t,r,e,n);break e;case 11:t=Kj(null,t,r,e,n);break e;case 14:t=Gj(null,t,r,pr(r.type,e),n);break e}throw Error(K(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:pr(r,i),Wg(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:pr(r,i),Yj(e,t,r,i,n);case 3:e:{if(f2(t),e===null)throw Error(K(387));r=t.pendingProps,a=t.memoizedState,i=a.element,F_(e,t),Ah(t,r,null,n);var o=t.memoizedState;if(r=o.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){i=ml(Error(K(423)),t),t=Xj(e,t,r,n,i);break e}else if(r!==i){i=ml(Error(K(424)),t),t=Xj(e,t,r,n,i);break e}else for(On=ba(t.stateNode.containerInfo.firstChild),An=t,Qe=!0,gr=null,n=I_(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(fl(),r===i){t=Ai(e,t,n);break e}tn(e,t,r,n)}t=t.child}return t;case 5:return B_(t),e===null&&Fg(t),r=t.type,i=t.pendingProps,a=e!==null?e.memoizedProps:null,o=i.children,Mg(r,i)?o=null:a!==null&&Mg(r,a)&&(t.flags|=32),d2(e,t),tn(e,t,o,n),t.child;case 6:return e===null&&Fg(t),null;case 13:return h2(e,t,n);case 4:return Hb(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=hl(t,null,r,n):tn(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:pr(r,i),Kj(e,t,r,i,n);case 7:return tn(e,t,t.pendingProps,n),t.child;case 8:return tn(e,t,t.pendingProps.children,n),t.child;case 12:return tn(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,a=t.memoizedProps,o=i.value,He(Nh,r._currentValue),r._currentValue=o,a!==null)if(Nr(a.value,o)){if(a.children===i.children&&!hn.current){t=Ai(e,t,n);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var s=a.dependencies;if(s!==null){o=a.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(a.tag===1){l=mi(-1,n&-n),l.tag=2;var c=a.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?l.next=l:(l.next=d.next,d.next=l),c.pending=l}}a.lanes|=n,l=a.alternate,l!==null&&(l.lanes|=n),Bg(a.return,n,t),s.lanes|=n;break}l=l.next}}else if(a.tag===10)o=a.type===t.type?null:a.child;else if(a.tag===18){if(o=a.return,o===null)throw Error(K(341));o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),Bg(o,n,t),o=a.sibling}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===t){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}tn(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Fs(t,n),i=rr(i),r=r(i),t.flags|=1,tn(e,t,r,n),t.child;case 14:return r=t.type,i=pr(r,t.pendingProps),i=pr(r.type,i),Gj(e,t,r,i,n);case 15:return c2(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:pr(r,i),Zf(e,t),t.tag=1,pn(r)?(e=!0,Sh(t)):e=!1,Fs(t,n),o2(t,r,i),Vg(t,r,i,n),Hg(null,t,r,!0,e,n);case 19:return p2(e,t,n);case 22:return u2(e,t,n)}throw Error(K(156,t.tag))};function C2(e,t){return r_(e,t)}function vF(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Jn(e,t,n,r){return new vF(e,t,n,r)}function ow(e){return e=e.prototype,!(!e||!e.isReactComponent)}function gF(e){if(typeof e=="function")return ow(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Nb)return 11;if(e===Ob)return 14}return 2}function Pa(e,t){var n=e.alternate;return n===null?(n=Jn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function th(e,t,n,r,i,a){var o=2;if(r=e,typeof e=="function")ow(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case ys:return No(n.children,i,a,t);case Pb:o=8,i|=8;break;case fg:return e=Jn(12,n,t,i|2),e.elementType=fg,e.lanes=a,e;case hg:return e=Jn(13,n,t,i),e.elementType=hg,e.lanes=a,e;case pg:return e=Jn(19,n,t,i),e.elementType=pg,e.lanes=a,e;case BC:return um(n,i,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case LC:o=10;break e;case FC:o=9;break e;case Nb:o=11;break e;case Ob:o=14;break e;case Qi:o=16,r=null;break e}throw Error(K(130,e==null?e:typeof e,""))}return t=Jn(o,n,t,i),t.elementType=e,t.type=r,t.lanes=a,t}function No(e,t,n,r){return e=Jn(7,e,r,t),e.lanes=n,e}function um(e,t,n,r){return e=Jn(22,e,r,t),e.elementType=BC,e.lanes=n,e.stateNode={isHidden:!1},e}function Xy(e,t,n){return e=Jn(6,e,null,t),e.lanes=n,e}function Qy(e,t,n){return t=Jn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function xF(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=_y(0),this.expirationTimes=_y(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_y(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function sw(e,t,n,r,i,a,o,s,l){return e=new xF(e,t,n,s,l),t===1?(t=1,a===!0&&(t|=8)):t=0,a=Jn(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Wb(a),e}function bF(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(M2)}catch(e){console.error(e)}}M2(),MC.exports=$n;var Td=MC.exports;const NF=Ie(Td);var R2,lP=Td;R2=lP.createRoot,lP.hydrateRoot;function OF(e,t){if(e instanceof RegExp)return{keys:!1,pattern:e};var n,r,i,a,o=[],s="",l=e.split("/");for(l[0]||l.shift();i=l.shift();)n=i[0],n==="*"?(o.push(n),s+=i[1]==="?"?"(?:/(.*))?":"/(.*)"):n===":"?(r=i.indexOf("?",1),a=i.indexOf(".",1),o.push(i.substring(1,~r?r:~a?a:i.length)),s+=~r&&!~a?"(?:/([^/]+?))?":"/([^/]+?)",~a&&(s+=(~r?"?":"")+"\\"+i.substring(a))):s+="/"+i;return{keys:o,pattern:new RegExp("^"+s+(t?"(?=$|/)":"/?$"),"i")}}var D2={exports:{}},I2={};/** - * @license React - * use-sync-external-store-shim.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var vl=w;function AF(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var EF=typeof Object.is=="function"?Object.is:AF,TF=vl.useState,CF=vl.useEffect,_F=vl.useLayoutEffect,kF=vl.useDebugValue;function $F(e,t){var n=t(),r=TF({inst:{value:n,getSnapshot:t}}),i=r[0].inst,a=r[1];return _F(function(){i.value=n,i.getSnapshot=t,Zy(i)&&a({inst:i})},[e,n,t]),CF(function(){return Zy(i)&&a({inst:i}),e(function(){Zy(i)&&a({inst:i})})},[e]),kF(n),n}function Zy(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!EF(e,n)}catch{return!0}}function MF(e,t){return t()}var RF=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?MF:$F;I2.useSyncExternalStore=vl.useSyncExternalStore!==void 0?vl.useSyncExternalStore:RF;D2.exports=I2;var DF=D2.exports;const IF=kC.useInsertionEffect,LF=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",FF=LF?w.useLayoutEffect:w.useEffect,BF=IF||FF,L2=e=>{const t=w.useRef([e,(...n)=>t[0](...n)]).current;return BF(()=>{t[0]=e}),t[1]},zF="popstate",dw="pushState",fw="replaceState",VF="hashchange",cP=[zF,dw,fw,VF],UF=e=>{for(const t of cP)addEventListener(t,e);return()=>{for(const t of cP)removeEventListener(t,e)}},F2=(e,t)=>DF.useSyncExternalStore(UF,e,t),WF=()=>location.search,HF=({ssrSearch:e=""}={})=>F2(WF,()=>e),uP=()=>location.pathname,qF=({ssrPath:e}={})=>F2(uP,e?()=>e:uP),KF=(e,{replace:t=!1,state:n=null}={})=>history[t?fw:dw](n,"",e),GF=(e={})=>[qF(e),KF],dP=Symbol.for("wouter_v3");if(typeof history<"u"&&typeof window[dP]>"u"){for(const e of[dw,fw]){const t=history[e];history[e]=function(){const n=t.apply(this,arguments),r=new Event(e);return r.arguments=arguments,dispatchEvent(r),n}}Object.defineProperty(window,dP,{value:!0})}const YF=(e,t)=>t.toLowerCase().indexOf(e.toLowerCase())?"~"+t:t.slice(e.length)||"/",B2=(e="")=>e==="/"?"":e,XF=(e,t)=>e[0]==="~"?e.slice(1):B2(t)+e,QF=(e="",t)=>YF(fP(B2(e)),fP(t)),fP=e=>{try{return decodeURI(e)}catch{return e}},z2={hook:GF,searchHook:HF,parser:OF,base:"",ssrPath:void 0,ssrSearch:void 0,hrefs:e=>e},V2=w.createContext(z2),Xl=()=>w.useContext(V2),U2={},W2=w.createContext(U2),ZF=()=>w.useContext(W2),mm=e=>{const[t,n]=e.hook(e);return[QF(e.base,t),L2((r,i)=>n(XF(r,e.base),i))]},Cd=()=>mm(Xl()),hw=(e,t,n,r)=>{const{pattern:i,keys:a}=t instanceof RegExp?{keys:!1,pattern:t}:e(t||"*",r),o=i.exec(n)||[],[s,...l]=o;return s!==void 0?[!0,(()=>{const c=a!==!1?Object.fromEntries(a.map((f,h)=>[f,l[h]])):o.groups;let d={...l};return c&&Object.assign(d,c),d})(),...r?[s]:[]]:[!1,null]},hP=e=>hw(Xl().parser,e,Cd()[0]),JF=({children:e,...t})=>{var d,f;const n=Xl(),r=t.hook?z2:n;let i=r;const[a,o]=((d=t.ssrPath)==null?void 0:d.split("?"))??[];o&&(t.ssrSearch=o,t.ssrPath=a),t.hrefs=t.hrefs??((f=t.hook)==null?void 0:f.hrefs);let s=w.useRef({}),l=s.current,c=l;for(let h in r){const p=h==="base"?r[h]+(t[h]||""):t[h]||r[h];l===c&&p!==c[h]&&(s.current=c={...c}),c[h]=p,p!==r[h]&&(i=c)}return w.createElement(V2.Provider,{value:i,children:e})},pP=({children:e,component:t},n)=>t?w.createElement(t,{params:n}):typeof e=="function"?e(n):e,e6=e=>{let t=w.useRef(U2),n=t.current;for(const r in e)e[r]!==n[r]&&(n=e);return Object.keys(e).length===0&&(n=e),t.current=n},Ue=({path:e,nest:t,match:n,...r})=>{const i=Xl(),[a]=mm(i),[o,s,l]=n??hw(i.parser,e,a,t),c=e6({...ZF(),...s});if(!o)return null;const d=l?w.createElement(JF,{base:l},pP(r,c)):pP(r,c);return w.createElement(W2.Provider,{value:c,children:d})},gl=w.forwardRef((e,t)=>{const n=Xl(),[r,i]=mm(n),{to:a="",href:o=a,onClick:s,asChild:l,children:c,className:d,replace:f,state:h,...p}=e,g=L2(y=>{y.ctrlKey||y.metaKey||y.altKey||y.shiftKey||y.button!==0||(s==null||s(y),y.defaultPrevented||(y.preventDefault(),i(o,e)))}),m=n.hrefs(o[0]==="~"?o.slice(1):n.base+o,n);return l&&w.isValidElement(c)?w.cloneElement(c,{onClick:g,href:m}):w.createElement("a",{...p,onClick:g,href:m,className:d!=null&&d.call?d(r===o):d,children:c,ref:t})}),H2=e=>Array.isArray(e)?e.flatMap(t=>H2(t&&t.type===w.Fragment?t.props.children:t)):[e],q2=({children:e,location:t})=>{const n=Xl(),[r]=mm(n);for(const i of H2(e)){let a=0;if(w.isValidElement(i)&&(a=hw(n.parser,i.props.path,t||r,i.props.nest))[0])return w.cloneElement(i,{match:a})}return null};var Ql=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(){}},Ro=typeof window>"u"||"Deno"in globalThis;function Yn(){}function t6(e,t){return typeof e=="function"?e(t):e}function r0(e){return typeof e=="number"&&e>=0&&e!==1/0}function K2(e,t){return Math.max(e+(t||0)-Date.now(),0)}function zs(e,t){return typeof e=="function"?e(t):e}function xr(e,t){return typeof e=="function"?e(t):e}function mP(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==pw(o,t.options))return!1}else if(!Tu(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function yP(e,t){const{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(Do(t.options.mutationKey)!==Do(a))return!1}else if(!Tu(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function pw(e,t){return((t==null?void 0:t.queryKeyHashFn)||Do)(e)}function Do(e){return JSON.stringify(e,(t,n)=>i0(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Tu(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Tu(e[n],t[n])):!1}function G2(e,t){if(e===t)return e;const n=vP(e)&&vP(t);if(n||i0(e)&&i0(t)){const r=n?e:Object.keys(e),i=r.length,a=n?t:Object.keys(t),o=a.length,s=n?[]:{};let l=0;for(let c=0;c{setTimeout(t,e)})}function a0(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?G2(e,t):t}function r6(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function i6(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var mw=Symbol();function Y2(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===mw?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var vo,ia,Qs,fC,a6=(fC=class extends Ql{constructor(){super();te(this,vo);te(this,ia);te(this,Qs);Q(this,Qs,t=>{if(!Ro&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){_(this,ia)||this.setEventListener(_(this,Qs))}onUnsubscribe(){var t;this.hasListeners()||((t=_(this,ia))==null||t.call(this),Q(this,ia,void 0))}setEventListener(t){var n;Q(this,Qs,t),(n=_(this,ia))==null||n.call(this),Q(this,ia,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){_(this,vo)!==t&&(Q(this,vo,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof _(this,vo)=="boolean"?_(this,vo):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},vo=new WeakMap,ia=new WeakMap,Qs=new WeakMap,fC),yw=new a6,Zs,aa,Js,hC,o6=(hC=class extends Ql{constructor(){super();te(this,Zs,!0);te(this,aa);te(this,Js);Q(this,Js,t=>{if(!Ro&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){_(this,aa)||this.setEventListener(_(this,Js))}onUnsubscribe(){var t;this.hasListeners()||((t=_(this,aa))==null||t.call(this),Q(this,aa,void 0))}setEventListener(t){var n;Q(this,Js,t),(n=_(this,aa))==null||n.call(this),Q(this,aa,t(this.setOnline.bind(this)))}setOnline(t){_(this,Zs)!==t&&(Q(this,Zs,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return _(this,Zs)}},Zs=new WeakMap,aa=new WeakMap,Js=new WeakMap,hC),Ih=new o6;function o0(){let e,t;const n=new Promise((i,a)=>{e=i,t=a});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}function s6(e){return Math.min(1e3*2**e,3e4)}function X2(e){return(e??"online")==="online"?Ih.isOnline():!0}var Q2=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Jy(e){return e instanceof Q2}function Z2(e){let t=!1,n=0,r=!1,i;const a=o0(),o=m=>{var y;r||(h(new Q2(m)),(y=e.abort)==null||y.call(e))},s=()=>{t=!0},l=()=>{t=!1},c=()=>yw.isFocused()&&(e.networkMode==="always"||Ih.isOnline())&&e.canRun(),d=()=>X2(e.networkMode)&&e.canRun(),f=m=>{var y;r||(r=!0,(y=e.onSuccess)==null||y.call(e,m),i==null||i(),a.resolve(m))},h=m=>{var y;r||(r=!0,(y=e.onError)==null||y.call(e,m),i==null||i(),a.reject(m))},p=()=>new Promise(m=>{var y;i=v=>{(r||c())&&m(v)},(y=e.onPause)==null||y.call(e)}).then(()=>{var m;i=void 0,r||(m=e.onContinue)==null||m.call(e)}),g=()=>{if(r)return;let m;const y=n===0?e.initialPromise:void 0;try{m=y??e.fn()}catch(v){m=Promise.reject(v)}Promise.resolve(m).then(f).catch(v=>{var j;if(r)return;const x=e.retry??(Ro?0:3),b=e.retryDelay??s6,P=typeof b=="function"?b(n,v):b,S=x===!0||typeof x=="number"&&nc()?void 0:p()).then(()=>{t?h(v):g()})})};return{promise:a,cancel:o,continue:()=>(i==null||i(),a),cancelRetry:s,continueRetry:l,canStart:d,start:()=>(d()?g():p().then(g),a)}}function l6(){let e=[],t=0,n=s=>{s()},r=s=>{s()},i=s=>setTimeout(s,0);const a=s=>{t?e.push(s):i(()=>{n(s)})},o=()=>{const s=e;e=[],s.length&&i(()=>{r(()=>{s.forEach(l=>{n(l)})})})};return{batch:s=>{let l;t++;try{l=s()}finally{t--,t||o()}return l},batchCalls:s=>(...l)=>{a(()=>{s(...l)})},schedule:a,setNotifyFunction:s=>{n=s},setBatchNotifyFunction:s=>{r=s},setScheduler:s=>{i=s}}}var jt=l6(),go,pC,J2=(pC=class{constructor(){te(this,go)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),r0(this.gcTime)&&Q(this,go,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ro?1/0:5*60*1e3))}clearGcTimeout(){_(this,go)&&(clearTimeout(_(this,go)),Q(this,go,void 0))}},go=new WeakMap,pC),el,tl,Gn,Ut,bd,xo,mr,ai,mC,c6=(mC=class extends J2{constructor(t){super();te(this,mr);te(this,el);te(this,tl);te(this,Gn);te(this,Ut);te(this,bd);te(this,xo);Q(this,xo,!1),Q(this,bd,t.defaultOptions),this.setOptions(t.options),this.observers=[],Q(this,Gn,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,Q(this,el,u6(this.options)),this.state=t.state??_(this,el),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=_(this,Ut))==null?void 0:t.promise}setOptions(t){this.options={..._(this,bd),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&_(this,Gn).remove(this)}setData(t,n){const r=a0(this.state.data,t,this.options);return me(this,mr,ai).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){me(this,mr,ai).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=_(this,Ut))==null?void 0:r.promise;return(i=_(this,Ut))==null||i.cancel(t),n?n.then(Yn).catch(Yn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(_(this,el))}isActive(){return this.observers.some(t=>xr(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===mw||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!K2(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=_(this,Ut))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=_(this,Ut))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),_(this,Gn).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(_(this,Ut)&&(_(this,xo)?_(this,Ut).cancel({revert:!0}):_(this,Ut).cancelRetry()),this.scheduleGc()),_(this,Gn).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||me(this,mr,ai).call(this,{type:"invalidate"})}fetch(t,n){var l,c,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(_(this,Ut))return _(this,Ut).continueRetry(),_(this,Ut).promise}if(t&&this.setOptions(t),!this.options.queryFn){const f=this.observers.find(h=>h.options.queryFn);f&&this.setOptions(f.options)}const r=new AbortController,i=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(Q(this,xo,!0),r.signal)})},a=()=>{const f=Y2(this.options,n),h={queryKey:this.queryKey,meta:this.meta};return i(h),Q(this,xo,!1),this.options.persister?this.options.persister(f,h,this):f(h)},o={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:a};i(o),(l=this.options.behavior)==null||l.onFetch(o,this),Q(this,tl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=o.fetchOptions)==null?void 0:c.meta))&&me(this,mr,ai).call(this,{type:"fetch",meta:(d=o.fetchOptions)==null?void 0:d.meta});const s=f=>{var h,p,g,m;Jy(f)&&f.silent||me(this,mr,ai).call(this,{type:"error",error:f}),Jy(f)||((p=(h=_(this,Gn).config).onError)==null||p.call(h,f,this),(m=(g=_(this,Gn).config).onSettled)==null||m.call(g,this.state.data,f,this)),this.scheduleGc()};return Q(this,Ut,Z2({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:f=>{var h,p,g,m;if(f===void 0){s(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(f)}catch(y){s(y);return}(p=(h=_(this,Gn).config).onSuccess)==null||p.call(h,f,this),(m=(g=_(this,Gn).config).onSettled)==null||m.call(g,f,this.state.error,this),this.scheduleGc()},onError:s,onFail:(f,h)=>{me(this,mr,ai).call(this,{type:"failed",failureCount:f,error:h})},onPause:()=>{me(this,mr,ai).call(this,{type:"pause"})},onContinue:()=>{me(this,mr,ai).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),_(this,Ut).start()}},el=new WeakMap,tl=new WeakMap,Gn=new WeakMap,Ut=new WeakMap,bd=new WeakMap,xo=new WeakMap,mr=new WeakSet,ai=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...ek(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return Jy(i)&&i.revert&&_(this,tl)?{..._(this,tl),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),jt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),_(this,Gn).notify({query:this,type:"updated",action:t})})},mC);function ek(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:X2(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function u6(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Ir,yC,d6=(yC=class extends Ql{constructor(t={}){super();te(this,Ir);this.config=t,Q(this,Ir,new Map)}build(t,n,r){const i=n.queryKey,a=n.queryHash??pw(i,n);let o=this.get(a);return o||(o=new c6({cache:this,queryKey:i,queryHash:a,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){_(this,Ir).has(t.queryHash)||(_(this,Ir).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=_(this,Ir).get(t.queryHash);n&&(t.destroy(),n===t&&_(this,Ir).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){jt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return _(this,Ir).get(t)}getAll(){return[..._(this,Ir).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>mP(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>mP(t,r)):n}notify(t){jt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){jt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){jt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Ir=new WeakMap,yC),Lr,Jt,bo,Fr,Ki,vC,f6=(vC=class extends J2{constructor(t){super();te(this,Fr);te(this,Lr);te(this,Jt);te(this,bo);this.mutationId=t.mutationId,Q(this,Jt,t.mutationCache),Q(this,Lr,[]),this.state=t.state||tk(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){_(this,Lr).includes(t)||(_(this,Lr).push(t),this.clearGcTimeout(),_(this,Jt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){Q(this,Lr,_(this,Lr).filter(n=>n!==t)),this.scheduleGc(),_(this,Jt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){_(this,Lr).length||(this.state.status==="pending"?this.scheduleGc():_(this,Jt).remove(this))}continue(){var t;return((t=_(this,bo))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,a,o,s,l,c,d,f,h,p,g,m,y,v,x,b,P,S,j,N;Q(this,bo,Z2({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(O,A)=>{me(this,Fr,Ki).call(this,{type:"failed",failureCount:O,error:A})},onPause:()=>{me(this,Fr,Ki).call(this,{type:"pause"})},onContinue:()=>{me(this,Fr,Ki).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>_(this,Jt).canRun(this)}));const n=this.state.status==="pending",r=!_(this,bo).canStart();try{if(!n){me(this,Fr,Ki).call(this,{type:"pending",variables:t,isPaused:r}),await((a=(i=_(this,Jt).config).onMutate)==null?void 0:a.call(i,t,this));const A=await((s=(o=this.options).onMutate)==null?void 0:s.call(o,t));A!==this.state.context&&me(this,Fr,Ki).call(this,{type:"pending",context:A,variables:t,isPaused:r})}const O=await _(this,bo).start();return await((c=(l=_(this,Jt).config).onSuccess)==null?void 0:c.call(l,O,t,this.state.context,this)),await((f=(d=this.options).onSuccess)==null?void 0:f.call(d,O,t,this.state.context)),await((p=(h=_(this,Jt).config).onSettled)==null?void 0:p.call(h,O,null,this.state.variables,this.state.context,this)),await((m=(g=this.options).onSettled)==null?void 0:m.call(g,O,null,t,this.state.context)),me(this,Fr,Ki).call(this,{type:"success",data:O}),O}catch(O){try{throw await((v=(y=_(this,Jt).config).onError)==null?void 0:v.call(y,O,t,this.state.context,this)),await((b=(x=this.options).onError)==null?void 0:b.call(x,O,t,this.state.context)),await((S=(P=_(this,Jt).config).onSettled)==null?void 0:S.call(P,void 0,O,this.state.variables,this.state.context,this)),await((N=(j=this.options).onSettled)==null?void 0:N.call(j,void 0,O,t,this.state.context)),O}finally{me(this,Fr,Ki).call(this,{type:"error",error:O})}}finally{_(this,Jt).runNext(this)}}},Lr=new WeakMap,Jt=new WeakMap,bo=new WeakMap,Fr=new WeakSet,Ki=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),jt.batch(()=>{_(this,Lr).forEach(r=>{r.onMutationUpdate(t)}),_(this,Jt).notify({mutation:this,type:"updated",action:t})})},vC);function tk(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var wn,wd,gC,h6=(gC=class extends Ql{constructor(t={}){super();te(this,wn);te(this,wd);this.config=t,Q(this,wn,new Map),Q(this,wd,Date.now())}build(t,n,r){const i=new f6({mutationCache:this,mutationId:++Qd(this,wd)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){const n=vf(t),r=_(this,wn).get(n)??[];r.push(t),_(this,wn).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=vf(t);if(_(this,wn).has(n)){const i=(r=_(this,wn).get(n))==null?void 0:r.filter(a=>a!==t);i&&(i.length===0?_(this,wn).delete(n):_(this,wn).set(n,i))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=_(this,wn).get(vf(t)))==null?void 0:r.find(i=>i.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=_(this,wn).get(vf(t)))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){jt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[..._(this,wn).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>yP(n,r))}findAll(t={}){return this.getAll().filter(n=>yP(t,n))}notify(t){jt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return jt.batch(()=>Promise.all(t.map(n=>n.continue().catch(Yn))))}},wn=new WeakMap,wd=new WeakMap,gC);function vf(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function xP(e){return{onFetch:(t,n)=>{var d,f,h,p,g;const r=t.options,i=(h=(f=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:f.fetchMore)==null?void 0:h.direction,a=((p=t.state.data)==null?void 0:p.pages)||[],o=((g=t.state.data)==null?void 0:g.pageParams)||[];let s={pages:[],pageParams:[]},l=0;const c=async()=>{let m=!1;const y=b=>{Object.defineProperty(b,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},v=Y2(t.options,t.fetchOptions),x=async(b,P,S)=>{if(m)return Promise.reject();if(P==null&&b.pages.length)return Promise.resolve(b);const j={queryKey:t.queryKey,pageParam:P,direction:S?"backward":"forward",meta:t.options.meta};y(j);const N=await v(j),{maxPages:O}=t.options,A=S?i6:r6;return{pages:A(b.pages,N,O),pageParams:A(b.pageParams,P,O)}};if(i&&a.length){const b=i==="backward",P=b?p6:bP,S={pages:a,pageParams:o},j=P(r,S);s=await x(S,j,b)}else{const b=e??a.length;do{const P=l===0?o[0]??r.initialPageParam:bP(r,s);if(l>0&&P==null)break;s=await x(s,P),l++}while(l{var m,y;return(y=(m=t.options).persister)==null?void 0:y.call(m,c,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function bP(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function p6(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var lt,oa,sa,nl,rl,la,il,al,xC,m6=(xC=class{constructor(e={}){te(this,lt);te(this,oa);te(this,sa);te(this,nl);te(this,rl);te(this,la);te(this,il);te(this,al);Q(this,lt,e.queryCache||new d6),Q(this,oa,e.mutationCache||new h6),Q(this,sa,e.defaultOptions||{}),Q(this,nl,new Map),Q(this,rl,new Map),Q(this,la,0)}mount(){Qd(this,la)._++,_(this,la)===1&&(Q(this,il,yw.subscribe(async e=>{e&&(await this.resumePausedMutations(),_(this,lt).onFocus())})),Q(this,al,Ih.subscribe(async e=>{e&&(await this.resumePausedMutations(),_(this,lt).onOnline())})))}unmount(){var e,t;Qd(this,la)._--,_(this,la)===0&&((e=_(this,il))==null||e.call(this),Q(this,il,void 0),(t=_(this,al))==null||t.call(this),Q(this,al,void 0))}isFetching(e){return _(this,lt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return _(this,oa).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=_(this,lt).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=_(this,lt).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(zs(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return _(this,lt).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=_(this,lt).get(r.queryHash),a=i==null?void 0:i.state.data,o=t6(t,a);if(o!==void 0)return _(this,lt).build(this,r).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return jt.batch(()=>_(this,lt).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=_(this,lt).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=_(this,lt);jt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=_(this,lt),r={type:"active",...e};return jt.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e={},t={}){const n={revert:!0,...t},r=jt.batch(()=>_(this,lt).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Yn).catch(Yn)}invalidateQueries(e={},t={}){return jt.batch(()=>{if(_(this,lt).findAll(e).forEach(r=>{r.invalidate()}),e.refetchType==="none")return Promise.resolve();const n={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e={},t){const n={...t,cancelRefetch:(t==null?void 0:t.cancelRefetch)??!0},r=jt.batch(()=>_(this,lt).findAll(e).filter(i=>!i.isDisabled()).map(i=>{let a=i.fetch(void 0,n);return n.throwOnError||(a=a.catch(Yn)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(r).then(Yn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=_(this,lt).build(this,t);return n.isStaleByTime(zs(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Yn).catch(Yn)}fetchInfiniteQuery(e){return e.behavior=xP(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Yn).catch(Yn)}ensureInfiniteQueryData(e){return e.behavior=xP(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ih.isOnline()?_(this,oa).resumePausedMutations():Promise.resolve()}getQueryCache(){return _(this,lt)}getMutationCache(){return _(this,oa)}getDefaultOptions(){return _(this,sa)}setDefaultOptions(e){Q(this,sa,e)}setQueryDefaults(e,t){_(this,nl).set(Do(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[..._(this,nl).values()];let n={};return t.forEach(r=>{Tu(e,r.queryKey)&&(n={...n,...r.defaultOptions})}),n}setMutationDefaults(e,t){_(this,rl).set(Do(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[..._(this,rl).values()];let n={};return t.forEach(r=>{Tu(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={..._(this,sa).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=pw(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.enabled!==!0&&t.queryFn===mw&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{..._(this,sa).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){_(this,lt).clear(),_(this,oa).clear()}},lt=new WeakMap,oa=new WeakMap,sa=new WeakMap,nl=new WeakMap,rl=new WeakMap,la=new WeakMap,il=new WeakMap,al=new WeakMap,xC),ln,xe,Sd,en,wo,ol,ca,Br,jd,sl,ll,So,jo,ua,cl,_e,Wc,s0,l0,c0,u0,d0,f0,h0,nk,bC,y6=(bC=class extends Ql{constructor(t,n){super();te(this,_e);te(this,ln);te(this,xe);te(this,Sd);te(this,en);te(this,wo);te(this,ol);te(this,ca);te(this,Br);te(this,jd);te(this,sl);te(this,ll);te(this,So);te(this,jo);te(this,ua);te(this,cl,new Set);this.options=n,Q(this,ln,t),Q(this,Br,null),Q(this,ca,o0()),this.options.experimental_prefetchInRender||_(this,ca).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(_(this,xe).addObserver(this),wP(_(this,xe),this.options)?me(this,_e,Wc).call(this):this.updateResult(),me(this,_e,u0).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return p0(_(this,xe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return p0(_(this,xe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,me(this,_e,d0).call(this),me(this,_e,f0).call(this),_(this,xe).removeObserver(this)}setOptions(t,n){const r=this.options,i=_(this,xe);if(this.options=_(this,ln).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof xr(this.options.enabled,_(this,xe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");me(this,_e,h0).call(this),_(this,xe).setOptions(this.options),r._defaulted&&!Dh(this.options,r)&&_(this,ln).getQueryCache().notify({type:"observerOptionsUpdated",query:_(this,xe),observer:this});const a=this.hasListeners();a&&SP(_(this,xe),i,this.options,r)&&me(this,_e,Wc).call(this),this.updateResult(n),a&&(_(this,xe)!==i||xr(this.options.enabled,_(this,xe))!==xr(r.enabled,_(this,xe))||zs(this.options.staleTime,_(this,xe))!==zs(r.staleTime,_(this,xe)))&&me(this,_e,s0).call(this);const o=me(this,_e,l0).call(this);a&&(_(this,xe)!==i||xr(this.options.enabled,_(this,xe))!==xr(r.enabled,_(this,xe))||o!==_(this,ua))&&me(this,_e,c0).call(this,o)}getOptimisticResult(t){const n=_(this,ln).getQueryCache().build(_(this,ln),t),r=this.createResult(n,t);return g6(this,r)&&(Q(this,en,r),Q(this,ol,this.options),Q(this,wo,_(this,xe).state)),r}getCurrentResult(){return _(this,en)}trackResult(t,n){const r={};return Object.keys(t).forEach(i=>{Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(i),n==null||n(i),t[i])})}),r}trackProp(t){_(this,cl).add(t)}getCurrentQuery(){return _(this,xe)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=_(this,ln).defaultQueryOptions(t),r=_(this,ln).getQueryCache().build(_(this,ln),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return me(this,_e,Wc).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),_(this,en)))}createResult(t,n){var O;const r=_(this,xe),i=this.options,a=_(this,en),o=_(this,wo),s=_(this,ol),c=t!==r?t.state:_(this,Sd),{state:d}=t;let f={...d},h=!1,p;if(n._optimisticResults){const A=this.hasListeners(),E=!A&&wP(t,n),T=A&&SP(t,r,n,i);(E||T)&&(f={...f,...ek(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:g,errorUpdatedAt:m,status:y}=f;if(n.select&&f.data!==void 0)if(a&&f.data===(o==null?void 0:o.data)&&n.select===_(this,jd))p=_(this,sl);else try{Q(this,jd,n.select),p=n.select(f.data),p=a0(a==null?void 0:a.data,p,n),Q(this,sl,p),Q(this,Br,null)}catch(A){Q(this,Br,A)}else p=f.data;if(n.placeholderData!==void 0&&p===void 0&&y==="pending"){let A;if(a!=null&&a.isPlaceholderData&&n.placeholderData===(s==null?void 0:s.placeholderData))A=a.data;else if(A=typeof n.placeholderData=="function"?n.placeholderData((O=_(this,ll))==null?void 0:O.state.data,_(this,ll)):n.placeholderData,n.select&&A!==void 0)try{A=n.select(A),Q(this,Br,null)}catch(E){Q(this,Br,E)}A!==void 0&&(y="success",p=a0(a==null?void 0:a.data,A,n),h=!0)}_(this,Br)&&(g=_(this,Br),p=_(this,sl),m=Date.now(),y="error");const v=f.fetchStatus==="fetching",x=y==="pending",b=y==="error",P=x&&v,S=p!==void 0,N={status:y,fetchStatus:f.fetchStatus,isPending:x,isSuccess:y==="success",isError:b,isInitialLoading:P,isLoading:P,data:p,dataUpdatedAt:f.dataUpdatedAt,error:g,errorUpdatedAt:m,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>c.dataUpdateCount||f.errorUpdateCount>c.errorUpdateCount,isFetching:v,isRefetching:v&&!x,isLoadingError:b&&!S,isPaused:f.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:b&&S,isStale:vw(t,n),refetch:this.refetch,promise:_(this,ca)};if(this.options.experimental_prefetchInRender){const A=C=>{N.status==="error"?C.reject(N.error):N.data!==void 0&&C.resolve(N.data)},E=()=>{const C=Q(this,ca,N.promise=o0());A(C)},T=_(this,ca);switch(T.status){case"pending":t.queryHash===r.queryHash&&A(T);break;case"fulfilled":(N.status==="error"||N.data!==T.value)&&E();break;case"rejected":(N.status!=="error"||N.error!==T.reason)&&E();break}}return N}updateResult(t){const n=_(this,en),r=this.createResult(_(this,xe),this.options);if(Q(this,wo,_(this,xe).state),Q(this,ol,this.options),_(this,wo).data!==void 0&&Q(this,ll,_(this,xe)),Dh(r,n))return;Q(this,en,r);const i={},a=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,s=typeof o=="function"?o():o;if(s==="all"||!s&&!_(this,cl).size)return!0;const l=new Set(s??_(this,cl));return this.options.throwOnError&&l.add("error"),Object.keys(_(this,en)).some(c=>{const d=c;return _(this,en)[d]!==n[d]&&l.has(d)})};(t==null?void 0:t.listeners)!==!1&&a()&&(i.listeners=!0),me(this,_e,nk).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&me(this,_e,u0).call(this)}},ln=new WeakMap,xe=new WeakMap,Sd=new WeakMap,en=new WeakMap,wo=new WeakMap,ol=new WeakMap,ca=new WeakMap,Br=new WeakMap,jd=new WeakMap,sl=new WeakMap,ll=new WeakMap,So=new WeakMap,jo=new WeakMap,ua=new WeakMap,cl=new WeakMap,_e=new WeakSet,Wc=function(t){me(this,_e,h0).call(this);let n=_(this,xe).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Yn)),n},s0=function(){me(this,_e,d0).call(this);const t=zs(this.options.staleTime,_(this,xe));if(Ro||_(this,en).isStale||!r0(t))return;const r=K2(_(this,en).dataUpdatedAt,t)+1;Q(this,So,setTimeout(()=>{_(this,en).isStale||this.updateResult()},r))},l0=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(_(this,xe)):this.options.refetchInterval)??!1},c0=function(t){me(this,_e,f0).call(this),Q(this,ua,t),!(Ro||xr(this.options.enabled,_(this,xe))===!1||!r0(_(this,ua))||_(this,ua)===0)&&Q(this,jo,setInterval(()=>{(this.options.refetchIntervalInBackground||yw.isFocused())&&me(this,_e,Wc).call(this)},_(this,ua)))},u0=function(){me(this,_e,s0).call(this),me(this,_e,c0).call(this,me(this,_e,l0).call(this))},d0=function(){_(this,So)&&(clearTimeout(_(this,So)),Q(this,So,void 0))},f0=function(){_(this,jo)&&(clearInterval(_(this,jo)),Q(this,jo,void 0))},h0=function(){const t=_(this,ln).getQueryCache().build(_(this,ln),this.options);if(t===_(this,xe))return;const n=_(this,xe);Q(this,xe,t),Q(this,Sd,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},nk=function(t){jt.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(_(this,en))}),_(this,ln).getQueryCache().notify({query:_(this,xe),type:"observerResultsUpdated"})})},bC);function v6(e,t){return xr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function wP(e,t){return v6(e,t)||e.state.data!==void 0&&p0(e,t,t.refetchOnMount)}function p0(e,t,n){if(xr(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&vw(e,t)}return!1}function SP(e,t,n,r){return(e!==t||xr(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&vw(e,n)}function vw(e,t){return xr(t.enabled,e)!==!1&&e.isStaleByTime(zs(t.staleTime,e))}function g6(e,t){return!Dh(e.getCurrentResult(),t)}var da,fa,cn,li,ji,nh,m0,wC,x6=(wC=class extends Ql{constructor(n,r){super();te(this,ji);te(this,da);te(this,fa);te(this,cn);te(this,li);Q(this,da,n),this.setOptions(r),this.bindMethods(),me(this,ji,nh).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var i;const r=this.options;this.options=_(this,da).defaultMutationOptions(n),Dh(this.options,r)||_(this,da).getMutationCache().notify({type:"observerOptionsUpdated",mutation:_(this,cn),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Do(r.mutationKey)!==Do(this.options.mutationKey)?this.reset():((i=_(this,cn))==null?void 0:i.state.status)==="pending"&&_(this,cn).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=_(this,cn))==null||n.removeObserver(this)}onMutationUpdate(n){me(this,ji,nh).call(this),me(this,ji,m0).call(this,n)}getCurrentResult(){return _(this,fa)}reset(){var n;(n=_(this,cn))==null||n.removeObserver(this),Q(this,cn,void 0),me(this,ji,nh).call(this),me(this,ji,m0).call(this)}mutate(n,r){var i;return Q(this,li,r),(i=_(this,cn))==null||i.removeObserver(this),Q(this,cn,_(this,da).getMutationCache().build(_(this,da),this.options)),_(this,cn).addObserver(this),_(this,cn).execute(n)}},da=new WeakMap,fa=new WeakMap,cn=new WeakMap,li=new WeakMap,ji=new WeakSet,nh=function(){var r;const n=((r=_(this,cn))==null?void 0:r.state)??tk();Q(this,fa,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},m0=function(n){jt.batch(()=>{var r,i,a,o,s,l,c,d;if(_(this,li)&&this.hasListeners()){const f=_(this,fa).variables,h=_(this,fa).context;(n==null?void 0:n.type)==="success"?((i=(r=_(this,li)).onSuccess)==null||i.call(r,n.data,f,h),(o=(a=_(this,li)).onSettled)==null||o.call(a,n.data,null,f,h)):(n==null?void 0:n.type)==="error"&&((l=(s=_(this,li)).onError)==null||l.call(s,n.error,f,h),(d=(c=_(this,li)).onSettled)==null||d.call(c,void 0,n.error,f,h))}this.listeners.forEach(f=>{f(_(this,fa))})})},wC),rk=w.createContext(void 0),_d=e=>{const t=w.useContext(rk);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},b6=({client:e,children:t})=>(w.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),u.jsx(rk.Provider,{value:e,children:t})),ik=w.createContext(!1),w6=()=>w.useContext(ik);ik.Provider;function S6(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var j6=w.createContext(S6()),P6=()=>w.useContext(j6);function ak(e,t){return typeof e=="function"?e(...t):!!e}function y0(){}var N6=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},O6=e=>{w.useEffect(()=>{e.clearReset()},[e])},A6=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&ak(n,[e.error,r]),E6=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},T6=(e,t)=>e.isLoading&&e.isFetching&&!t,C6=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,jP=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function _6(e,t,n){var d,f,h,p,g;const r=_d(),i=w6(),a=P6(),o=r.defaultQueryOptions(e);(f=(d=r.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||f.call(d,o),o._optimisticResults=i?"isRestoring":"optimistic",E6(o),N6(o,a),O6(a);const s=!r.getQueryCache().get(o.queryHash),[l]=w.useState(()=>new t(r,o)),c=l.getOptimisticResult(o);if(w.useSyncExternalStore(w.useCallback(m=>{const y=i?y0:l.subscribe(jt.batchCalls(m));return l.updateResult(),y},[l,i]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),w.useEffect(()=>{l.setOptions(o,{listeners:!1})},[o,l]),C6(o,c))throw jP(o,l,a);if(A6({result:c,errorResetBoundary:a,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw c.error;if((p=(h=r.getDefaultOptions().queries)==null?void 0:h._experimental_afterQuery)==null||p.call(h,o,c),o.experimental_prefetchInRender&&!Ro&&T6(c,i)){const m=s?jP(o,l,a):(g=r.getQueryCache().get(o.queryHash))==null?void 0:g.promise;m==null||m.catch(y0).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?c:l.trackResult(c)}function vt(e,t){return _6(e,y6)}function Oo(e,t){const n=_d(),[r]=w.useState(()=>new x6(n,e));w.useEffect(()=>{r.setOptions(e)},[r,e]);const i=w.useSyncExternalStore(w.useCallback(o=>r.subscribe(jt.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=w.useCallback((o,s)=>{r.mutate(o,s).catch(y0)},[r]);if(i.error&&ak(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}const ev={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},PP=ev==null?void 0:ev.VITE_API_BASE_URL,NP=PP?PP.replace(/\/+$/,""):"";function ok(e){return e.startsWith("http://")||e.startsWith("https://")||!NP?e:`${NP}${e}`}async function sk(e){if(!e.ok){const t=await e.text()||e.statusText;throw new Error(`${e.status}: ${t}`)}}async function Ze(e,t,n){const r=await fetch(ok(t),{method:e,headers:n?{"Content-Type":"application/json"}:{},body:n?JSON.stringify(n):void 0,credentials:"include"});return await sk(r),r}const yi=({on401:e})=>async({queryKey:t})=>{const n=await fetch(ok(t.join("/")),{credentials:"include"});return e==="returnNull"&&n.status===401?null:(await sk(n),await n.json())},k6=new m6({defaultOptions:{queries:{queryFn:yi({on401:"throw"}),refetchInterval:!1,refetchOnWindowFocus:!1,staleTime:1/0,retry:!1},mutations:{retry:!1}}}),$6=1,M6=1e6;let tv=0;function R6(){return tv=(tv+1)%Number.MAX_SAFE_INTEGER,tv.toString()}const nv=new Map,OP=e=>{if(nv.has(e))return;const t=setTimeout(()=>{nv.delete(e),ru({type:"REMOVE_TOAST",toastId:e})},M6);nv.set(e,t)},D6=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,$6)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?OP(n):e.toasts.forEach(r=>{OP(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},rh=[];let ih={toasts:[]};function ru(e){ih=D6(ih,e),rh.forEach(t=>{t(ih)})}function yt({...e}){const t=R6(),n=i=>ru({type:"UPDATE_TOAST",toast:{...i,id:t}}),r=()=>ru({type:"DISMISS_TOAST",toastId:t});return ru({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:i=>{i||r()}}}),{id:t,dismiss:r,update:n}}function I6(){const[e,t]=w.useState(ih);return w.useEffect(()=>(rh.push(t),()=>{const n=rh.indexOf(t);n>-1&&rh.splice(n,1)}),[e]),{...e,toast:yt,dismiss:n=>ru({type:"DISMISS_TOAST",toastId:n})}}function Be(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function AP(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function lk(...e){return t=>{let n=!1;const r=e.map(i=>{const a=AP(i,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let i=0;i{const{children:o,...s}=a,l=w.useMemo(()=>s,Object.values(s));return u.jsx(n.Provider,{value:l,children:o})};r.displayName=e+"Provider";function i(a){const o=w.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,i]}function Xo(e,t=[]){let n=[];function r(a,o){const s=w.createContext(o),l=n.length;n=[...n,o];const c=f=>{var v;const{scope:h,children:p,...g}=f,m=((v=h==null?void 0:h[e])==null?void 0:v[l])||s,y=w.useMemo(()=>g,Object.values(g));return u.jsx(m.Provider,{value:y,children:p})};c.displayName=a+"Provider";function d(f,h){var m;const p=((m=h==null?void 0:h[e])==null?void 0:m[l])||s,g=w.useContext(p);if(g)return g;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${a}\``)}return[c,d]}const i=()=>{const a=n.map(o=>w.createContext(o));return function(s){const l=(s==null?void 0:s[e])||a;return w.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,F6(i,...t)]}function F6(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(a){const o=r.reduce((s,{useScope:l,scopeName:c})=>{const f=l(a)[`__scope${c}`];return{...s,...f}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function Cu(e){const t=z6(e),n=w.forwardRef((r,i)=>{const{children:a,...o}=r,s=w.Children.toArray(a),l=s.find(V6);if(l){const c=l.props.children,d=s.map(f=>f===l?w.Children.count(c)>1?w.Children.only(null):w.isValidElement(c)?c.props.children:null:f);return u.jsx(t,{...o,ref:i,children:w.isValidElement(c)?w.cloneElement(c,void 0,d):null})}return u.jsx(t,{...o,ref:i,children:a})});return n.displayName=`${e}.Slot`,n}var B6=Cu("Slot");function z6(e){const t=w.forwardRef((n,r)=>{const{children:i,...a}=n;if(w.isValidElement(i)){const o=W6(i),s=U6(a,i.props);return i.type!==w.Fragment&&(s.ref=r?lk(r,o):o),w.cloneElement(i,s)}return w.Children.count(i)>1?w.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ck=Symbol("radix.slottable");function uk(e){const t=({children:n})=>u.jsx(u.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=ck,t}function V6(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ck}function U6(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...s)=>{a(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...a}:r==="className"&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}function W6(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function H6(e){const t=e+"CollectionProvider",[n,r]=Xo(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=m=>{const{scope:y,children:v}=m,x=$.useRef(null),b=$.useRef(new Map).current;return u.jsx(i,{scope:y,itemMap:b,collectionRef:x,children:v})};o.displayName=t;const s=e+"CollectionSlot",l=Cu(s),c=$.forwardRef((m,y)=>{const{scope:v,children:x}=m,b=a(s,v),P=_t(y,b.collectionRef);return u.jsx(l,{ref:P,children:x})});c.displayName=s;const d=e+"CollectionItemSlot",f="data-radix-collection-item",h=Cu(d),p=$.forwardRef((m,y)=>{const{scope:v,children:x,...b}=m,P=$.useRef(null),S=_t(y,P),j=a(d,v);return $.useEffect(()=>(j.itemMap.set(P,{ref:P,...b}),()=>void j.itemMap.delete(P))),u.jsx(h,{[f]:"",ref:S,children:x})});p.displayName=d;function g(m){const y=a(e+"CollectionConsumer",m);return $.useCallback(()=>{const x=y.collectionRef.current;if(!x)return[];const b=Array.from(x.querySelectorAll(`[${f}]`));return Array.from(y.itemMap.values()).sort((j,N)=>b.indexOf(j.ref.current)-b.indexOf(N.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:o,Slot:c,ItemSlot:p},g,r]}var q6=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],ot=q6.reduce((e,t)=>{const n=Cu(`Primitive.${t}`),r=w.forwardRef((i,a)=>{const{asChild:o,...s}=i,l=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(l,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function dk(e,t){e&&Td.flushSync(()=>e.dispatchEvent(t))}function ar(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),w.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function K6(e,t=globalThis==null?void 0:globalThis.document){const n=ar(e);w.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var G6="DismissableLayer",v0="dismissableLayer.update",Y6="dismissableLayer.pointerDownOutside",X6="dismissableLayer.focusOutside",EP,fk=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ym=w.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...l}=e,c=w.useContext(fk),[d,f]=w.useState(null),h=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=w.useState({}),g=_t(t,N=>f(N)),m=Array.from(c.layers),[y]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=m.indexOf(y),x=d?m.indexOf(d):-1,b=c.layersWithOutsidePointerEventsDisabled.size>0,P=x>=v,S=Z6(N=>{const O=N.target,A=[...c.branches].some(E=>E.contains(O));!P||A||(i==null||i(N),o==null||o(N),N.defaultPrevented||s==null||s())},h),j=J6(N=>{const O=N.target;[...c.branches].some(E=>E.contains(O))||(a==null||a(N),o==null||o(N),N.defaultPrevented||s==null||s())},h);return K6(N=>{x===c.layers.size-1&&(r==null||r(N),!N.defaultPrevented&&s&&(N.preventDefault(),s()))},h),w.useEffect(()=>{if(d)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(EP=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),TP(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=EP)}},[d,h,n,c]),w.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),TP())},[d,c]),w.useEffect(()=>{const N=()=>p({});return document.addEventListener(v0,N),()=>document.removeEventListener(v0,N)},[]),u.jsx(ot.div,{...l,ref:g,style:{pointerEvents:b?P?"auto":"none":void 0,...e.style},onFocusCapture:Be(e.onFocusCapture,j.onFocusCapture),onBlurCapture:Be(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:Be(e.onPointerDownCapture,S.onPointerDownCapture)})});ym.displayName=G6;var Q6="DismissableLayerBranch",hk=w.forwardRef((e,t)=>{const n=w.useContext(fk),r=w.useRef(null),i=_t(t,r);return w.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),u.jsx(ot.div,{...e,ref:i})});hk.displayName=Q6;function Z6(e,t=globalThis==null?void 0:globalThis.document){const n=ar(e),r=w.useRef(!1),i=w.useRef(()=>{});return w.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let l=function(){pk(Y6,n,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);r.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",a),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function J6(e,t=globalThis==null?void 0:globalThis.document){const n=ar(e),r=w.useRef(!1);return w.useEffect(()=>{const i=a=>{a.target&&!r.current&&pk(X6,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function TP(){const e=new CustomEvent(v0);document.dispatchEvent(e)}function pk(e,t,n,{discrete:r}){const i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?dk(i,a):i.dispatchEvent(a)}var eB=ym,tB=hk,ka=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{},nB="Portal",gw=w.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[i,a]=w.useState(!1);ka(()=>a(!0),[]);const o=n||i&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return o?NF.createPortal(u.jsx(ot.div,{...r,ref:t}),o):null});gw.displayName=nB;function rB(e,t){return w.useReducer((n,r)=>t[n][r]??n,e)}var Qo=e=>{const{present:t,children:n}=e,r=iB(t),i=typeof n=="function"?n({present:r.isPresent}):w.Children.only(n),a=_t(r.ref,aB(i));return typeof n=="function"||r.isPresent?w.cloneElement(i,{ref:a}):null};Qo.displayName="Presence";function iB(e){const[t,n]=w.useState(),r=w.useRef({}),i=w.useRef(e),a=w.useRef("none"),o=e?"mounted":"unmounted",[s,l]=rB(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const c=gf(r.current);a.current=s==="mounted"?c:"none"},[s]),ka(()=>{const c=r.current,d=i.current;if(d!==e){const h=a.current,p=gf(c);e?l("MOUNT"):p==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(d&&h!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),ka(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,f=p=>{const m=gf(r.current).includes(p.animationName);if(p.target===t&&m&&(l("ANIMATION_END"),!i.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},h=p=>{p.target===t&&(a.current=gf(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:w.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function gf(e){return(e==null?void 0:e.animationName)||"none"}function aB(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function xw({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=oB({defaultProp:t,onChange:n}),a=e!==void 0,o=a?e:r,s=ar(n),l=w.useCallback(c=>{if(a){const f=typeof c=="function"?c(e):c;f!==e&&s(f)}else i(c)},[a,e,i,s]);return[o,l]}function oB({defaultProp:e,onChange:t}){const n=w.useState(e),[r]=n,i=w.useRef(r),a=ar(t);return w.useEffect(()=>{i.current!==r&&(a(r),i.current=r)},[r,i,a]),n}var sB="VisuallyHidden",vm=w.forwardRef((e,t)=>u.jsx(ot.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));vm.displayName=sB;var lB=vm,bw="ToastProvider",[ww,cB,uB]=H6("Toast"),[mk,Zxe]=Xo("Toast",[uB]),[dB,gm]=mk(bw),yk=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:i="right",swipeThreshold:a=50,children:o}=e,[s,l]=w.useState(null),[c,d]=w.useState(0),f=w.useRef(!1),h=w.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${bw}\`. Expected non-empty \`string\`.`),u.jsx(ww.Provider,{scope:t,children:u.jsx(dB,{scope:t,label:n,duration:r,swipeDirection:i,swipeThreshold:a,toastCount:c,viewport:s,onViewportChange:l,onToastAdd:w.useCallback(()=>d(p=>p+1),[]),onToastRemove:w.useCallback(()=>d(p=>p-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:h,children:o})})};yk.displayName=bw;var vk="ToastViewport",fB=["F8"],g0="toast.viewportPause",x0="toast.viewportResume",gk=w.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=fB,label:i="Notifications ({hotkey})",...a}=e,o=gm(vk,n),s=cB(n),l=w.useRef(null),c=w.useRef(null),d=w.useRef(null),f=w.useRef(null),h=_t(t,f,o.onViewportChange),p=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),g=o.toastCount>0;w.useEffect(()=>{const y=v=>{var b;r.length!==0&&r.every(P=>v[P]||v.code===P)&&((b=f.current)==null||b.focus())};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[r]),w.useEffect(()=>{const y=l.current,v=f.current;if(g&&y&&v){const x=()=>{if(!o.isClosePausedRef.current){const j=new CustomEvent(g0);v.dispatchEvent(j),o.isClosePausedRef.current=!0}},b=()=>{if(o.isClosePausedRef.current){const j=new CustomEvent(x0);v.dispatchEvent(j),o.isClosePausedRef.current=!1}},P=j=>{!y.contains(j.relatedTarget)&&b()},S=()=>{y.contains(document.activeElement)||b()};return y.addEventListener("focusin",x),y.addEventListener("focusout",P),y.addEventListener("pointermove",x),y.addEventListener("pointerleave",S),window.addEventListener("blur",x),window.addEventListener("focus",b),()=>{y.removeEventListener("focusin",x),y.removeEventListener("focusout",P),y.removeEventListener("pointermove",x),y.removeEventListener("pointerleave",S),window.removeEventListener("blur",x),window.removeEventListener("focus",b)}}},[g,o.isClosePausedRef]);const m=w.useCallback(({tabbingDirection:y})=>{const x=s().map(b=>{const P=b.ref.current,S=[P,...NB(P)];return y==="forwards"?S:S.reverse()});return(y==="forwards"?x.reverse():x).flat()},[s]);return w.useEffect(()=>{const y=f.current;if(y){const v=x=>{var S,j,N;const b=x.altKey||x.ctrlKey||x.metaKey;if(x.key==="Tab"&&!b){const O=document.activeElement,A=x.shiftKey;if(x.target===y&&A){(S=c.current)==null||S.focus();return}const C=m({tabbingDirection:A?"backwards":"forwards"}),D=C.findIndex(M=>M===O);rv(C.slice(D+1))?x.preventDefault():A?(j=c.current)==null||j.focus():(N=d.current)==null||N.focus()}};return y.addEventListener("keydown",v),()=>y.removeEventListener("keydown",v)}},[s,m]),u.jsxs(tB,{ref:l,role:"region","aria-label":i.replace("{hotkey}",p),tabIndex:-1,style:{pointerEvents:g?void 0:"none"},children:[g&&u.jsx(b0,{ref:c,onFocusFromOutsideViewport:()=>{const y=m({tabbingDirection:"forwards"});rv(y)}}),u.jsx(ww.Slot,{scope:n,children:u.jsx(ot.ol,{tabIndex:-1,...a,ref:h})}),g&&u.jsx(b0,{ref:d,onFocusFromOutsideViewport:()=>{const y=m({tabbingDirection:"backwards"});rv(y)}})]})});gk.displayName=vk;var xk="ToastFocusProxy",b0=w.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...i}=e,a=gm(xk,n);return u.jsx(vm,{"aria-hidden":!0,tabIndex:0,...i,ref:t,style:{position:"fixed"},onFocus:o=>{var c;const s=o.relatedTarget;!((c=a.viewport)!=null&&c.contains(s))&&r()}})});b0.displayName=xk;var xm="Toast",hB="toast.swipeStart",pB="toast.swipeMove",mB="toast.swipeCancel",yB="toast.swipeEnd",bk=w.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:i,onOpenChange:a,...o}=e,[s=!0,l]=xw({prop:r,defaultProp:i,onChange:a});return u.jsx(Qo,{present:n||s,children:u.jsx(xB,{open:s,...o,ref:t,onClose:()=>l(!1),onPause:ar(e.onPause),onResume:ar(e.onResume),onSwipeStart:Be(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:Be(e.onSwipeMove,c=>{const{x:d,y:f}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:Be(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:Be(e.onSwipeEnd,c=>{const{x:d,y:f}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),l(!1)})})})});bk.displayName=xm;var[vB,gB]=mk(xm,{onClose(){}}),xB=w.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:i,open:a,onClose:o,onEscapeKeyDown:s,onPause:l,onResume:c,onSwipeStart:d,onSwipeMove:f,onSwipeCancel:h,onSwipeEnd:p,...g}=e,m=gm(xm,n),[y,v]=w.useState(null),x=_t(t,M=>v(M)),b=w.useRef(null),P=w.useRef(null),S=i||m.duration,j=w.useRef(0),N=w.useRef(S),O=w.useRef(0),{onToastAdd:A,onToastRemove:E}=m,T=ar(()=>{var I;(y==null?void 0:y.contains(document.activeElement))&&((I=m.viewport)==null||I.focus()),o()}),C=w.useCallback(M=>{!M||M===1/0||(window.clearTimeout(O.current),j.current=new Date().getTime(),O.current=window.setTimeout(T,M))},[T]);w.useEffect(()=>{const M=m.viewport;if(M){const I=()=>{C(N.current),c==null||c()},F=()=>{const B=new Date().getTime()-j.current;N.current=N.current-B,window.clearTimeout(O.current),l==null||l()};return M.addEventListener(g0,F),M.addEventListener(x0,I),()=>{M.removeEventListener(g0,F),M.removeEventListener(x0,I)}}},[m.viewport,S,l,c,C]),w.useEffect(()=>{a&&!m.isClosePausedRef.current&&C(S)},[a,S,m.isClosePausedRef,C]),w.useEffect(()=>(A(),()=>E()),[A,E]);const D=w.useMemo(()=>y?Ak(y):null,[y]);return m.viewport?u.jsxs(u.Fragment,{children:[D&&u.jsx(bB,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:D}),u.jsx(vB,{scope:n,onClose:T,children:Td.createPortal(u.jsx(ww.ItemSlot,{scope:n,children:u.jsx(eB,{asChild:!0,onEscapeKeyDown:Be(s,()=>{m.isFocusedToastEscapeKeyDownRef.current||T(),m.isFocusedToastEscapeKeyDownRef.current=!1}),children:u.jsx(ot.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":a?"open":"closed","data-swipe-direction":m.swipeDirection,...g,ref:x,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:Be(e.onKeyDown,M=>{M.key==="Escape"&&(s==null||s(M.nativeEvent),M.nativeEvent.defaultPrevented||(m.isFocusedToastEscapeKeyDownRef.current=!0,T()))}),onPointerDown:Be(e.onPointerDown,M=>{M.button===0&&(b.current={x:M.clientX,y:M.clientY})}),onPointerMove:Be(e.onPointerMove,M=>{if(!b.current)return;const I=M.clientX-b.current.x,F=M.clientY-b.current.y,B=!!P.current,k=["left","right"].includes(m.swipeDirection),L=["left","up"].includes(m.swipeDirection)?Math.min:Math.max,R=k?L(0,I):0,q=k?0:L(0,F),W=M.pointerType==="touch"?10:2,ee={x:R,y:q},le={originalEvent:M,delta:ee};B?(P.current=ee,xf(pB,f,le,{discrete:!1})):CP(ee,m.swipeDirection,W)?(P.current=ee,xf(hB,d,le,{discrete:!1}),M.target.setPointerCapture(M.pointerId)):(Math.abs(I)>W||Math.abs(F)>W)&&(b.current=null)}),onPointerUp:Be(e.onPointerUp,M=>{const I=P.current,F=M.target;if(F.hasPointerCapture(M.pointerId)&&F.releasePointerCapture(M.pointerId),P.current=null,b.current=null,I){const B=M.currentTarget,k={originalEvent:M,delta:I};CP(I,m.swipeDirection,m.swipeThreshold)?xf(yB,p,k,{discrete:!0}):xf(mB,h,k,{discrete:!0}),B.addEventListener("click",L=>L.preventDefault(),{once:!0})}})})})}),m.viewport)})]}):null}),bB=e=>{const{__scopeToast:t,children:n,...r}=e,i=gm(xm,t),[a,o]=w.useState(!1),[s,l]=w.useState(!1);return jB(()=>o(!0)),w.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),s?null:u.jsx(gw,{asChild:!0,children:u.jsx(vm,{...r,children:a&&u.jsxs(u.Fragment,{children:[i.label," ",n]})})})},wB="ToastTitle",wk=w.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return u.jsx(ot.div,{...r,ref:t})});wk.displayName=wB;var SB="ToastDescription",Sk=w.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return u.jsx(ot.div,{...r,ref:t})});Sk.displayName=SB;var jk="ToastAction",Pk=w.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?u.jsx(Ok,{altText:n,asChild:!0,children:u.jsx(Sw,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${jk}\`. Expected non-empty \`string\`.`),null)});Pk.displayName=jk;var Nk="ToastClose",Sw=w.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,i=gB(Nk,n);return u.jsx(Ok,{asChild:!0,children:u.jsx(ot.button,{type:"button",...r,ref:t,onClick:Be(e.onClick,i.onClose)})})});Sw.displayName=Nk;var Ok=w.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...i}=e;return u.jsx(ot.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...i,ref:t})});function Ak(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),PB(r)){const i=r.ariaHidden||r.hidden||r.style.display==="none",a=r.dataset.radixToastAnnounceExclude==="";if(!i)if(a){const o=r.dataset.radixToastAnnounceAlt;o&&t.push(o)}else t.push(...Ak(r))}}),t}function xf(e,t,n,{discrete:r}){const i=n.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?dk(i,a):i.dispatchEvent(a)}var CP=(e,t,n=0)=>{const r=Math.abs(e.x),i=Math.abs(e.y),a=r>i;return t==="left"||t==="right"?a&&r>n:!a&&i>n};function jB(e=()=>{}){const t=ar(e);ka(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function PB(e){return e.nodeType===e.ELEMENT_NODE}function NB(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function rv(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var OB=yk,Ek=gk,Tk=bk,Ck=wk,_k=Sk,kk=Pk,$k=Sw;function Mk(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;ttypeof e=="boolean"?`${e}`:e===0?"0":e,kP=Se,bm=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return kP(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:a}=t,o=Object.keys(i).map(c=>{const d=n==null?void 0:n[c],f=a==null?void 0:a[c];if(d===null)return null;const h=_P(d)||_P(f);return i[c][h]}),s=n&&Object.entries(n).reduce((c,d)=>{let[f,h]=d;return h===void 0||(c[f]=h),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,d)=>{let{class:f,className:h,...p}=d;return Object.entries(p).every(g=>{let[m,y]=g;return Array.isArray(y)?y.includes({...a,...s}[m]):{...a,...s}[m]===y})?[...c,f,h]:c},[]);return kP(e,o,l,n==null?void 0:n.class,n==null?void 0:n.className)};/** - * @license lucide-react v0.453.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const AB=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Rk=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/** - * @license lucide-react v0.453.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */var EB={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** - * @license lucide-react v0.453.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const TB=w.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:a,iconNode:o,...s},l)=>w.createElement("svg",{ref:l,...EB,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Rk("lucide",i),...s},[...o.map(([c,d])=>w.createElement(c,d)),...Array.isArray(a)?a:[a]]));/** - * @license lucide-react v0.453.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ve=(e,t)=>{const n=w.forwardRef(({className:r,...i},a)=>w.createElement(TB,{ref:a,iconNode:t,className:Rk(`lucide-${AB(e)}`,r),...i}));return n.displayName=`${e}`,n};/** - * @license lucide-react v0.453.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Dk=Ve("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/** - * @license lucide-react v0.453.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const jw=Ve("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** - * @license lucide-react v0.453.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Pw=Ve("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);/** - * @license lucide-react v0.453.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const CB=Ve("CalendarClock",[["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M17.5 17.5 16 16.3V14",key:"akvzfd"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]]);/** - * @license lucide-react v0.453.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const _u=Ve("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/** - * @license lucide-react v0.453.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const _B=Ve("ChartLine",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]]);/** - * @license lucide-react v0.453.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const kB=Ve("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** - * @license lucide-react v0.453.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ik=Ve("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/** - * @license lucide-react v0.453.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const $B=Ve("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** - * @license lucide-react v0.453.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const $P=Ve("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);/** - * @license lucide-react v0.453.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const MB=Ve("IndianRupee",[["path",{d:"M6 3h12",key:"ggurg9"}],["path",{d:"M6 8h12",key:"6g4wlu"}],["path",{d:"m6 13 8.5 8",key:"u1kupk"}],["path",{d:"M6 13h3",key:"wdp6ag"}],["path",{d:"M9 13c6.667 0 6.667-10 0-10",key:"1nkvk2"}]]);/** - * @license lucide-react v0.453.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const RB=Ve("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/** - * @license lucide-react v0.453.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const DB=Ve("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** - * @license lucide-react v0.453.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const IB=Ve("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/** - * @license lucide-react v0.453.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const LB=Ve("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/** - * @license lucide-react v0.453.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const w0=Ve("PlugZap",[["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m18 3-4 4h6l-4 4",key:"16psg9"}]]);/** - * @license lucide-react v0.453.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Lk=Ve("RefreshCcw",[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]]);/** - * @license lucide-react v0.453.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const FB=Ve("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** - * @license lucide-react v0.453.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const BB=Ve("Repeat",[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}]]);/** - * @license lucide-react v0.453.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const zB=Ve("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** - * @license lucide-react v0.453.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Vs=Ve("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** - * @license lucide-react v0.453.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Nw=Ve("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/** - * @license lucide-react v0.453.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Lh=Ve("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/** - * @license lucide-react v0.453.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ow=Ve("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/** - * @license lucide-react v0.453.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ah=Ve("Wallet",[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]]);/** - * @license lucide-react v0.453.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const iv=Ve("Workflow",[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]]);/** - * @license lucide-react v0.453.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Aw=Ve("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Ew="-",VB=e=>{const t=WB(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:o=>{const s=o.split(Ew);return s[0]===""&&s.length!==1&&s.shift(),Fk(s,t)||UB(o)},getConflictingClassGroupIds:(o,s)=>{const l=n[o]||[];return s&&r[o]?[...l,...r[o]]:l}}},Fk=(e,t)=>{var o;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?Fk(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const a=e.join(Ew);return(o=t.validators.find(({validator:s})=>s(a)))==null?void 0:o.classGroupId},MP=/^\[(.+)\]$/,UB=e=>{if(MP.test(e)){const t=MP.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},WB=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return qB(Object.entries(e.classGroups),n).forEach(([a,o])=>{S0(o,r,a,t)}),r},S0=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const a=i===""?t:RP(t,i);a.classGroupId=n;return}if(typeof i=="function"){if(HB(i)){S0(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([a,o])=>{S0(o,RP(t,a),n,r)})})},RP=(e,t)=>{let n=e;return t.split(Ew).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},HB=e=>e.isThemeGetter,qB=(e,t)=>t?e.map(([n,r])=>{const i=r.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([o,s])=>[t+o,s])):a);return[n,i]}):e,KB=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(a,o)=>{n.set(a,o),t++,t>e&&(t=0,r=n,n=new Map)};return{get(a){let o=n.get(a);if(o!==void 0)return o;if((o=r.get(a))!==void 0)return i(a,o),o},set(a,o){n.has(a)?n.set(a,o):i(a,o)}}},Bk="!",GB=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],a=t.length,o=s=>{const l=[];let c=0,d=0,f;for(let y=0;yd?f-d:void 0;return{modifiers:l,hasImportantModifier:p,baseClassName:g,maybePostfixModifierPosition:m}};return n?s=>n({className:s,parseClassName:o}):o},YB=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},XB=e=>({cache:KB(e.cacheSize),parseClassName:GB(e),...VB(e)}),QB=/\s+/,ZB=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,a=[],o=e.trim().split(QB);let s="";for(let l=o.length-1;l>=0;l-=1){const c=o[l],{modifiers:d,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:p}=n(c);let g=!!p,m=r(g?h.substring(0,p):h);if(!m){if(!g){s=c+(s.length>0?" "+s:s);continue}if(m=r(h),!m){s=c+(s.length>0?" "+s:s);continue}g=!1}const y=YB(d).join(":"),v=f?y+Bk:y,x=v+m;if(a.includes(x))continue;a.push(x);const b=i(m,g);for(let P=0;P0?" "+s:s)}return s};function JB(){let e=0,t,n,r="";for(;e{if(typeof e=="string")return e;let t,n="";for(let r=0;rf(d),e());return n=XB(c),r=n.cache.get,i=n.cache.set,a=s,s(l)}function s(l){const c=r(l);if(c)return c;const d=ZB(l,n);return i(l,d),d}return function(){return a(JB.apply(null,arguments))}}const qe=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Vk=/^\[(?:([a-z-]+):)?(.+)\]$/i,tz=/^\d+\/\d+$/,nz=new Set(["px","full","screen"]),rz=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,iz=/\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$/,az=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,oz=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,sz=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ri=e=>Us(e)||nz.has(e)||tz.test(e),Wi=e=>Zl(e,"length",mz),Us=e=>!!e&&!Number.isNaN(Number(e)),av=e=>Zl(e,"number",Us),Ac=e=>!!e&&Number.isInteger(Number(e)),lz=e=>e.endsWith("%")&&Us(e.slice(0,-1)),fe=e=>Vk.test(e),Hi=e=>rz.test(e),cz=new Set(["length","size","percentage"]),uz=e=>Zl(e,cz,Uk),dz=e=>Zl(e,"position",Uk),fz=new Set(["image","url"]),hz=e=>Zl(e,fz,vz),pz=e=>Zl(e,"",yz),Ec=()=>!0,Zl=(e,t,n)=>{const r=Vk.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},mz=e=>iz.test(e)&&!az.test(e),Uk=()=>!1,yz=e=>oz.test(e),vz=e=>sz.test(e),gz=()=>{const e=qe("colors"),t=qe("spacing"),n=qe("blur"),r=qe("brightness"),i=qe("borderColor"),a=qe("borderRadius"),o=qe("borderSpacing"),s=qe("borderWidth"),l=qe("contrast"),c=qe("grayscale"),d=qe("hueRotate"),f=qe("invert"),h=qe("gap"),p=qe("gradientColorStops"),g=qe("gradientColorStopPositions"),m=qe("inset"),y=qe("margin"),v=qe("opacity"),x=qe("padding"),b=qe("saturate"),P=qe("scale"),S=qe("sepia"),j=qe("skew"),N=qe("space"),O=qe("translate"),A=()=>["auto","contain","none"],E=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto",fe,t],C=()=>[fe,t],D=()=>["",ri,Wi],M=()=>["auto",Us,fe],I=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],F=()=>["solid","dashed","dotted","double","none"],B=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],k=()=>["start","end","center","between","around","evenly","stretch"],L=()=>["","0",fe],R=()=>["auto","avoid","all","avoid-page","page","left","right","column"],q=()=>[Us,fe];return{cacheSize:500,separator:":",theme:{colors:[Ec],spacing:[ri,Wi],blur:["none","",Hi,fe],brightness:q(),borderColor:[e],borderRadius:["none","","full",Hi,fe],borderSpacing:C(),borderWidth:D(),contrast:q(),grayscale:L(),hueRotate:q(),invert:L(),gap:C(),gradientColorStops:[e],gradientColorStopPositions:[lz,Wi],inset:T(),margin:T(),opacity:q(),padding:C(),saturate:q(),scale:q(),sepia:L(),skew:q(),space:C(),translate:C()},classGroups:{aspect:[{aspect:["auto","square","video",fe]}],container:["container"],columns:[{columns:[Hi]}],"break-after":[{"break-after":R()}],"break-before":[{"break-before":R()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...I(),fe]}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ac,fe]}],basis:[{basis:T()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",fe]}],grow:[{grow:L()}],shrink:[{shrink:L()}],order:[{order:["first","last","none",Ac,fe]}],"grid-cols":[{"grid-cols":[Ec]}],"col-start-end":[{col:["auto",{span:["full",Ac,fe]},fe]}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":[Ec]}],"row-start-end":[{row:["auto",{span:[Ac,fe]},fe]}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",fe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",fe]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...k()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...k(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...k(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[N]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[N]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",fe,t]}],"min-w":[{"min-w":[fe,t,"min","max","fit"]}],"max-w":[{"max-w":[fe,t,"none","full","min","max","fit","prose",{screen:[Hi]},Hi]}],h:[{h:[fe,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[fe,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[fe,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[fe,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Hi,Wi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",av]}],"font-family":[{font:[Ec]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",fe]}],"line-clamp":[{"line-clamp":["none",Us,av]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ri,fe]}],"list-image":[{"list-image":["none",fe]}],"list-style-type":[{list:["none","disc","decimal",fe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ri,Wi]}],"underline-offset":[{"underline-offset":["auto",ri,fe]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",fe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",fe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...I(),dz]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",uz]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},hz]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],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:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[v]}],"border-style":[{border:[...F(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[v]}],"divide-style":[{divide:F()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...F()]}],"outline-offset":[{"outline-offset":[ri,fe]}],"outline-w":[{outline:[ri,Wi]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:D()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[ri,Wi]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Hi,pz]}],"shadow-color":[{shadow:[Ec]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":[...B(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":B()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Hi,fe]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[b]}],sepia:[{sepia:[S]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[S]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",fe]}],duration:[{duration:q()}],ease:[{ease:["linear","in","out","in-out",fe]}],delay:[{delay:q()}],animate:[{animate:["none","spin","ping","pulse","bounce",fe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[P]}],"scale-x":[{"scale-x":[P]}],"scale-y":[{"scale-y":[P]}],rotate:[{rotate:[Ac,fe]}],"translate-x":[{"translate-x":[O]}],"translate-y":[{"translate-y":[O]}],"skew-x":[{"skew-x":[j]}],"skew-y":[{"skew-y":[j]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",fe]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",fe]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"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",fe]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ri,Wi,av]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},xz=ez(gz);function de(...e){return xz(Se(e))}const bz=OB,Wk=w.forwardRef(({className:e,...t},n)=>u.jsx(Ek,{ref:n,className:de("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));Wk.displayName=Ek.displayName;const wz=bm("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Hk=w.forwardRef(({className:e,variant:t,...n},r)=>u.jsx(Tk,{ref:r,className:de(wz({variant:t}),e),...n}));Hk.displayName=Tk.displayName;const Sz=w.forwardRef(({className:e,...t},n)=>u.jsx(kk,{ref:n,className:de("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));Sz.displayName=kk.displayName;const qk=w.forwardRef(({className:e,...t},n)=>u.jsx($k,{ref:n,className:de("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:u.jsx(Aw,{className:"h-4 w-4"})}));qk.displayName=$k.displayName;const Kk=w.forwardRef(({className:e,...t},n)=>u.jsx(Ck,{ref:n,className:de("text-sm font-semibold",e),...t}));Kk.displayName=Ck.displayName;const Gk=w.forwardRef(({className:e,...t},n)=>u.jsx(_k,{ref:n,className:de("text-sm opacity-90",e),...t}));Gk.displayName=_k.displayName;function jz(){const{toasts:e}=I6();return u.jsxs(bz,{children:[e.map(function({id:t,title:n,description:r,action:i,...a}){return u.jsxs(Hk,{...a,children:[u.jsxs("div",{className:"grid gap-1",children:[n&&u.jsx(Kk,{children:n}),r&&u.jsx(Gk,{children:r})]}),i,u.jsx(qk,{})]},t)}),u.jsx(Wk,{})]})}var Pz=kC[" useId ".trim().toString()]||(()=>{}),Nz=0;function ov(e){const[t,n]=w.useState(Pz());return ka(()=>{e||n(r=>r??String(Nz++))},[e]),e||(t?`radix-${t}`:"")}const Oz=["top","right","bottom","left"],$a=Math.min,Pn=Math.max,Fh=Math.round,bf=Math.floor,Kr=e=>({x:e,y:e}),Az={left:"right",right:"left",bottom:"top",top:"bottom"},Ez={start:"end",end:"start"};function j0(e,t,n){return Pn(e,$a(t,n))}function Ei(e,t){return typeof e=="function"?e(t):e}function Ti(e){return e.split("-")[0]}function Jl(e){return e.split("-")[1]}function Tw(e){return e==="x"?"y":"x"}function Cw(e){return e==="y"?"height":"width"}function Ma(e){return["top","bottom"].includes(Ti(e))?"y":"x"}function _w(e){return Tw(Ma(e))}function Tz(e,t,n){n===void 0&&(n=!1);const r=Jl(e),i=_w(e),a=Cw(i);let o=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(o=Bh(o)),[o,Bh(o)]}function Cz(e){const t=Bh(e);return[P0(e),t,P0(t)]}function P0(e){return e.replace(/start|end/g,t=>Ez[t])}function _z(e,t,n){const r=["left","right"],i=["right","left"],a=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?a:o;default:return[]}}function kz(e,t,n,r){const i=Jl(e);let a=_z(Ti(e),n==="start",r);return i&&(a=a.map(o=>o+"-"+i),t&&(a=a.concat(a.map(P0)))),a}function Bh(e){return e.replace(/left|right|bottom|top/g,t=>Az[t])}function $z(e){return{top:0,right:0,bottom:0,left:0,...e}}function Yk(e){return typeof e!="number"?$z(e):{top:e,right:e,bottom:e,left:e}}function zh(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function DP(e,t,n){let{reference:r,floating:i}=e;const a=Ma(t),o=_w(t),s=Cw(o),l=Ti(t),c=a==="y",d=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,h=r[s]/2-i[s]/2;let p;switch(l){case"top":p={x:d,y:r.y-i.height};break;case"bottom":p={x:d,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-i.width,y:f};break;default:p={x:r.x,y:r.y}}switch(Jl(t)){case"start":p[o]-=h*(n&&c?-1:1);break;case"end":p[o]+=h*(n&&c?-1:1);break}return p}const Mz=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:a=[],platform:o}=n,s=a.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let c=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:f}=DP(c,r,l),h=r,p={},g=0;for(let m=0;m({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:l}=t,{element:c,padding:d=0}=Ei(e,t)||{};if(c==null)return{};const f=Yk(d),h={x:n,y:r},p=_w(i),g=Cw(p),m=await o.getDimensions(c),y=p==="y",v=y?"top":"left",x=y?"bottom":"right",b=y?"clientHeight":"clientWidth",P=a.reference[g]+a.reference[p]-h[p]-a.floating[g],S=h[p]-a.reference[p],j=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let N=j?j[b]:0;(!N||!await(o.isElement==null?void 0:o.isElement(j)))&&(N=s.floating[b]||a.floating[g]);const O=P/2-S/2,A=N/2-m[g]/2-1,E=$a(f[v],A),T=$a(f[x],A),C=E,D=N-m[g]-T,M=N/2-m[g]/2+O,I=j0(C,M,D),F=!l.arrow&&Jl(i)!=null&&M!==I&&a.reference[g]/2-(MM<=0)){var T,C;const M=(((T=a.flip)==null?void 0:T.index)||0)+1,I=N[M];if(I)return{data:{index:M,overflows:E},reset:{placement:I}};let F=(C=E.filter(B=>B.overflows[0]<=0).sort((B,k)=>B.overflows[1]-k.overflows[1])[0])==null?void 0:C.placement;if(!F)switch(p){case"bestFit":{var D;const B=(D=E.filter(k=>{if(j){const L=Ma(k.placement);return L===x||L==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(L=>L>0).reduce((L,R)=>L+R,0)]).sort((k,L)=>k[1]-L[1])[0])==null?void 0:D[0];B&&(F=B);break}case"initialPlacement":F=s;break}if(i!==F)return{reset:{placement:F}}}return{}}}};function IP(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function LP(e){return Oz.some(t=>e[t]>=0)}const Iz=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=Ei(e,t);switch(r){case"referenceHidden":{const a=await ku(t,{...i,elementContext:"reference"}),o=IP(a,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:LP(o)}}}case"escaped":{const a=await ku(t,{...i,altBoundary:!0}),o=IP(a,n.floating);return{data:{escapedOffsets:o,escaped:LP(o)}}}default:return{}}}}};async function Lz(e,t){const{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Ti(n),s=Jl(n),l=Ma(n)==="y",c=["left","top"].includes(o)?-1:1,d=a&&l?-1:1,f=Ei(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:g}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&typeof g=="number"&&(p=s==="end"?g*-1:g),l?{x:p*d,y:h*c}:{x:h*c,y:p*d}}const Fz=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:a,placement:o,middlewareData:s}=t,l=await Lz(t,e);return o===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:a+l.y,data:{...l,placement:o}}}}},Bz=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:s={fn:y=>{let{x:v,y:x}=y;return{x:v,y:x}}},...l}=Ei(e,t),c={x:n,y:r},d=await ku(t,l),f=Ma(Ti(i)),h=Tw(f);let p=c[h],g=c[f];if(a){const y=h==="y"?"top":"left",v=h==="y"?"bottom":"right",x=p+d[y],b=p-d[v];p=j0(x,p,b)}if(o){const y=f==="y"?"top":"left",v=f==="y"?"bottom":"right",x=g+d[y],b=g-d[v];g=j0(x,g,b)}const m=s.fn({...t,[h]:p,[f]:g});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[h]:a,[f]:o}}}}}},zz=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=Ei(e,t),d={x:n,y:r},f=Ma(i),h=Tw(f);let p=d[h],g=d[f];const m=Ei(s,t),y=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const b=h==="y"?"height":"width",P=a.reference[h]-a.floating[b]+y.mainAxis,S=a.reference[h]+a.reference[b]-y.mainAxis;pS&&(p=S)}if(c){var v,x;const b=h==="y"?"width":"height",P=["top","left"].includes(Ti(i)),S=a.reference[f]-a.floating[b]+(P&&((v=o.offset)==null?void 0:v[f])||0)+(P?0:y.crossAxis),j=a.reference[f]+a.reference[b]+(P?0:((x=o.offset)==null?void 0:x[f])||0)-(P?y.crossAxis:0);gj&&(g=j)}return{[h]:p,[f]:g}}}},Vz=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:a,platform:o,elements:s}=t,{apply:l=()=>{},...c}=Ei(e,t),d=await ku(t,c),f=Ti(i),h=Jl(i),p=Ma(i)==="y",{width:g,height:m}=a.floating;let y,v;f==="top"||f==="bottom"?(y=f,v=h===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?"start":"end")?"left":"right"):(v=f,y=h==="end"?"top":"bottom");const x=m-d.top-d.bottom,b=g-d.left-d.right,P=$a(m-d[y],x),S=$a(g-d[v],b),j=!t.middlewareData.shift;let N=P,O=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(O=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(N=x),j&&!h){const E=Pn(d.left,0),T=Pn(d.right,0),C=Pn(d.top,0),D=Pn(d.bottom,0);p?O=g-2*(E!==0||T!==0?E+T:Pn(d.left,d.right)):N=m-2*(C!==0||D!==0?C+D:Pn(d.top,d.bottom))}await l({...t,availableWidth:O,availableHeight:N});const A=await o.getDimensions(s.floating);return g!==A.width||m!==A.height?{reset:{rects:!0}}:{}}}};function wm(){return typeof window<"u"}function ec(e){return Xk(e)?(e.nodeName||"").toLowerCase():"#document"}function En(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ei(e){var t;return(t=(Xk(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Xk(e){return wm()?e instanceof Node||e instanceof En(e).Node:!1}function Or(e){return wm()?e instanceof Element||e instanceof En(e).Element:!1}function Zr(e){return wm()?e instanceof HTMLElement||e instanceof En(e).HTMLElement:!1}function FP(e){return!wm()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof En(e).ShadowRoot}function kd(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Ar(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function Uz(e){return["table","td","th"].includes(ec(e))}function Sm(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function kw(e){const t=$w(),n=Or(e)?Ar(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Wz(e){let t=Ra(e);for(;Zr(t)&&!xl(t);){if(kw(t))return t;if(Sm(t))return null;t=Ra(t)}return null}function $w(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function xl(e){return["html","body","#document"].includes(ec(e))}function Ar(e){return En(e).getComputedStyle(e)}function jm(e){return Or(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ra(e){if(ec(e)==="html")return e;const t=e.assignedSlot||e.parentNode||FP(e)&&e.host||ei(e);return FP(t)?t.host:t}function Qk(e){const t=Ra(e);return xl(t)?e.ownerDocument?e.ownerDocument.body:e.body:Zr(t)&&kd(t)?t:Qk(t)}function $u(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Qk(e),a=i===((r=e.ownerDocument)==null?void 0:r.body),o=En(i);if(a){const s=N0(o);return t.concat(o,o.visualViewport||[],kd(i)?i:[],s&&n?$u(s):[])}return t.concat(i,$u(i,[],n))}function N0(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Zk(e){const t=Ar(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Zr(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Fh(n)!==a||Fh(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Mw(e){return Or(e)?e:e.contextElement}function Ws(e){const t=Mw(e);if(!Zr(t))return Kr(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Zk(t);let o=(a?Fh(n.width):n.width)/r,s=(a?Fh(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}const Hz=Kr(0);function Jk(e){const t=En(e);return!$w()||!t.visualViewport?Hz:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function qz(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==En(e)?!1:t}function Io(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),a=Mw(e);let o=Kr(1);t&&(r?Or(r)&&(o=Ws(r)):o=Ws(e));const s=qz(a,n,r)?Jk(a):Kr(0);let l=(i.left+s.x)/o.x,c=(i.top+s.y)/o.y,d=i.width/o.x,f=i.height/o.y;if(a){const h=En(a),p=r&&Or(r)?En(r):r;let g=h,m=N0(g);for(;m&&r&&p!==g;){const y=Ws(m),v=m.getBoundingClientRect(),x=Ar(m),b=v.left+(m.clientLeft+parseFloat(x.paddingLeft))*y.x,P=v.top+(m.clientTop+parseFloat(x.paddingTop))*y.y;l*=y.x,c*=y.y,d*=y.x,f*=y.y,l+=b,c+=P,g=En(m),m=N0(g)}}return zh({width:d,height:f,x:l,y:c})}function Rw(e,t){const n=jm(e).scrollLeft;return t?t.left+n:Io(ei(e)).left+n}function e$(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-(n?0:Rw(e,r)),a=r.top+t.scrollTop;return{x:i,y:a}}function Kz(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const a=i==="fixed",o=ei(r),s=t?Sm(t.floating):!1;if(r===o||s&&a)return n;let l={scrollLeft:0,scrollTop:0},c=Kr(1);const d=Kr(0),f=Zr(r);if((f||!f&&!a)&&((ec(r)!=="body"||kd(o))&&(l=jm(r)),Zr(r))){const p=Io(r);c=Ws(r),d.x=p.x+r.clientLeft,d.y=p.y+r.clientTop}const h=o&&!f&&!a?e$(o,l,!0):Kr(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x+h.x,y:n.y*c.y-l.scrollTop*c.y+d.y+h.y}}function Gz(e){return Array.from(e.getClientRects())}function Yz(e){const t=ei(e),n=jm(e),r=e.ownerDocument.body,i=Pn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Pn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+Rw(e);const s=-n.scrollTop;return Ar(r).direction==="rtl"&&(o+=Pn(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}function Xz(e,t){const n=En(e),r=ei(e),i=n.visualViewport;let a=r.clientWidth,o=r.clientHeight,s=0,l=0;if(i){a=i.width,o=i.height;const c=$w();(!c||c&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:a,height:o,x:s,y:l}}function Qz(e,t){const n=Io(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Zr(e)?Ws(e):Kr(1),o=e.clientWidth*a.x,s=e.clientHeight*a.y,l=i*a.x,c=r*a.y;return{width:o,height:s,x:l,y:c}}function BP(e,t,n){let r;if(t==="viewport")r=Xz(e,n);else if(t==="document")r=Yz(ei(e));else if(Or(t))r=Qz(t,n);else{const i=Jk(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return zh(r)}function t$(e,t){const n=Ra(e);return n===t||!Or(n)||xl(n)?!1:Ar(n).position==="fixed"||t$(n,t)}function Zz(e,t){const n=t.get(e);if(n)return n;let r=$u(e,[],!1).filter(s=>Or(s)&&ec(s)!=="body"),i=null;const a=Ar(e).position==="fixed";let o=a?Ra(e):e;for(;Or(o)&&!xl(o);){const s=Ar(o),l=kw(o);!l&&s.position==="fixed"&&(i=null),(a?!l&&!i:!l&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||kd(o)&&!l&&t$(e,o))?r=r.filter(d=>d!==o):i=s,o=Ra(o)}return t.set(e,r),r}function Jz(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?Sm(t)?[]:Zz(t,this._c):[].concat(n),r],s=o[0],l=o.reduce((c,d)=>{const f=BP(t,d,i);return c.top=Pn(f.top,c.top),c.right=$a(f.right,c.right),c.bottom=$a(f.bottom,c.bottom),c.left=Pn(f.left,c.left),c},BP(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function eV(e){const{width:t,height:n}=Zk(e);return{width:t,height:n}}function tV(e,t,n){const r=Zr(t),i=ei(t),a=n==="fixed",o=Io(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const l=Kr(0);if(r||!r&&!a)if((ec(t)!=="body"||kd(i))&&(s=jm(t)),r){const h=Io(t,!0,a,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else i&&(l.x=Rw(i));const c=i&&!r&&!a?e$(i,s):Kr(0),d=o.left+s.scrollLeft-l.x-c.x,f=o.top+s.scrollTop-l.y-c.y;return{x:d,y:f,width:o.width,height:o.height}}function sv(e){return Ar(e).position==="static"}function zP(e,t){if(!Zr(e)||Ar(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ei(e)===n&&(n=n.ownerDocument.body),n}function n$(e,t){const n=En(e);if(Sm(e))return n;if(!Zr(e)){let i=Ra(e);for(;i&&!xl(i);){if(Or(i)&&!sv(i))return i;i=Ra(i)}return n}let r=zP(e,t);for(;r&&Uz(r)&&sv(r);)r=zP(r,t);return r&&xl(r)&&sv(r)&&!kw(r)?n:r||Wz(e)||n}const nV=async function(e){const t=this.getOffsetParent||n$,n=this.getDimensions,r=await n(e.floating);return{reference:tV(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function rV(e){return Ar(e).direction==="rtl"}const iV={convertOffsetParentRelativeRectToViewportRelativeRect:Kz,getDocumentElement:ei,getClippingRect:Jz,getOffsetParent:n$,getElementRects:nV,getClientRects:Gz,getDimensions:eV,getScale:Ws,isElement:Or,isRTL:rV};function r$(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function aV(e,t){let n=null,r;const i=ei(e);function a(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function o(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),a();const c=e.getBoundingClientRect(),{left:d,top:f,width:h,height:p}=c;if(s||t(),!h||!p)return;const g=bf(f),m=bf(i.clientWidth-(d+h)),y=bf(i.clientHeight-(f+p)),v=bf(d),b={rootMargin:-g+"px "+-m+"px "+-y+"px "+-v+"px",threshold:Pn(0,$a(1,l))||1};let P=!0;function S(j){const N=j[0].intersectionRatio;if(N!==l){if(!P)return o();N?o(!1,N):r=setTimeout(()=>{o(!1,1e-7)},1e3)}N===1&&!r$(c,e.getBoundingClientRect())&&o(),P=!1}try{n=new IntersectionObserver(S,{...b,root:i.ownerDocument})}catch{n=new IntersectionObserver(S,b)}n.observe(e)}return o(!0),a}function oV(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Mw(e),d=i||a?[...c?$u(c):[],...$u(t)]:[];d.forEach(v=>{i&&v.addEventListener("scroll",n,{passive:!0}),a&&v.addEventListener("resize",n)});const f=c&&s?aV(c,n):null;let h=-1,p=null;o&&(p=new ResizeObserver(v=>{let[x]=v;x&&x.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var b;(b=p)==null||b.observe(t)})),n()}),c&&!l&&p.observe(c),p.observe(t));let g,m=l?Io(e):null;l&&y();function y(){const v=Io(e);m&&!r$(m,v)&&n(),m=v,g=requestAnimationFrame(y)}return n(),()=>{var v;d.forEach(x=>{i&&x.removeEventListener("scroll",n),a&&x.removeEventListener("resize",n)}),f==null||f(),(v=p)==null||v.disconnect(),p=null,l&&cancelAnimationFrame(g)}}const sV=Fz,lV=Bz,cV=Dz,uV=Vz,dV=Iz,VP=Rz,fV=zz,hV=(e,t,n)=>{const r=new Map,i={platform:iV,...n},a={...i.platform,_c:r};return Mz(e,t,{...i,platform:a})};var oh=typeof document<"u"?w.useLayoutEffect:w.useEffect;function Vh(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Vh(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const a=i[r];if(!(a==="_owner"&&e.$$typeof)&&!Vh(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function i$(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function UP(e,t){const n=i$(e);return Math.round(t*n)/n}function lv(e){const t=w.useRef(e);return oh(()=>{t.current=e}),t}function pV(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[d,f]=w.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=w.useState(r);Vh(h,r)||p(r);const[g,m]=w.useState(null),[y,v]=w.useState(null),x=w.useCallback(k=>{k!==j.current&&(j.current=k,m(k))},[]),b=w.useCallback(k=>{k!==N.current&&(N.current=k,v(k))},[]),P=a||g,S=o||y,j=w.useRef(null),N=w.useRef(null),O=w.useRef(d),A=l!=null,E=lv(l),T=lv(i),C=lv(c),D=w.useCallback(()=>{if(!j.current||!N.current)return;const k={placement:t,strategy:n,middleware:h};T.current&&(k.platform=T.current),hV(j.current,N.current,k).then(L=>{const R={...L,isPositioned:C.current!==!1};M.current&&!Vh(O.current,R)&&(O.current=R,Td.flushSync(()=>{f(R)}))})},[h,t,n,T,C]);oh(()=>{c===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,f(k=>({...k,isPositioned:!1})))},[c]);const M=w.useRef(!1);oh(()=>(M.current=!0,()=>{M.current=!1}),[]),oh(()=>{if(P&&(j.current=P),S&&(N.current=S),P&&S){if(E.current)return E.current(P,S,D);D()}},[P,S,D,E,A]);const I=w.useMemo(()=>({reference:j,floating:N,setReference:x,setFloating:b}),[x,b]),F=w.useMemo(()=>({reference:P,floating:S}),[P,S]),B=w.useMemo(()=>{const k={position:n,left:0,top:0};if(!F.floating)return k;const L=UP(F.floating,d.x),R=UP(F.floating,d.y);return s?{...k,transform:"translate("+L+"px, "+R+"px)",...i$(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:L,top:R}},[n,s,F.floating,d.x,d.y]);return w.useMemo(()=>({...d,update:D,refs:I,elements:F,floatingStyles:B}),[d,D,I,F,B])}const mV=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?VP({element:r.current,padding:i}).fn(n):{}:r?VP({element:r,padding:i}).fn(n):{}}}},yV=(e,t)=>({...sV(e),options:[e,t]}),vV=(e,t)=>({...lV(e),options:[e,t]}),gV=(e,t)=>({...fV(e),options:[e,t]}),xV=(e,t)=>({...cV(e),options:[e,t]}),bV=(e,t)=>({...uV(e),options:[e,t]}),wV=(e,t)=>({...dV(e),options:[e,t]}),SV=(e,t)=>({...mV(e),options:[e,t]});var jV="Arrow",a$=w.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...a}=e;return u.jsx(ot.svg,{...a,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:u.jsx("polygon",{points:"0,0 30,0 15,10"})})});a$.displayName=jV;var PV=a$;function o$(e){const[t,n]=w.useState(void 0);return ka(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const a=i[0];let o,s;if("borderBoxSize"in a){const l=a.borderBoxSize,c=Array.isArray(l)?l[0]:l;o=c.inlineSize,s=c.blockSize}else o=e.offsetWidth,s=e.offsetHeight;n({width:o,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var s$="Popper",[l$,c$]=Xo(s$),[Jxe,u$]=l$(s$),d$="PopperAnchor",f$=w.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,a=u$(d$,n),o=w.useRef(null),s=_t(t,o);return w.useEffect(()=>{a.onAnchorChange((r==null?void 0:r.current)||o.current)}),r?null:u.jsx(ot.div,{...i,ref:s})});f$.displayName=d$;var Dw="PopperContent",[NV,OV]=l$(Dw),h$=w.forwardRef((e,t)=>{var st,Ae,X,ne,re,V;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:a="center",alignOffset:o=0,arrowPadding:s=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:g,...m}=e,y=u$(Dw,n),[v,x]=w.useState(null),b=_t(t,ye=>x(ye)),[P,S]=w.useState(null),j=o$(P),N=(j==null?void 0:j.width)??0,O=(j==null?void 0:j.height)??0,A=r+(a!=="center"?"-"+a:""),E=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},T=Array.isArray(c)?c:[c],C=T.length>0,D={padding:E,boundary:T.filter(EV),altBoundary:C},{refs:M,floatingStyles:I,placement:F,isPositioned:B,middlewareData:k}=pV({strategy:"fixed",placement:A,whileElementsMounted:(...ye)=>oV(...ye,{animationFrame:p==="always"}),elements:{reference:y.anchor},middleware:[yV({mainAxis:i+O,alignmentAxis:o}),l&&vV({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?gV():void 0,...D}),l&&xV({...D}),bV({...D,apply:({elements:ye,rects:oe,availableWidth:Ne,availableHeight:se})=>{const{width:et,height:pt}=oe.reference,pe=ye.floating.style;pe.setProperty("--radix-popper-available-width",`${Ne}px`),pe.setProperty("--radix-popper-available-height",`${se}px`),pe.setProperty("--radix-popper-anchor-width",`${et}px`),pe.setProperty("--radix-popper-anchor-height",`${pt}px`)}}),P&&SV({element:P,padding:s}),TV({arrowWidth:N,arrowHeight:O}),h&&wV({strategy:"referenceHidden",...D})]}),[L,R]=y$(F),q=ar(g);ka(()=>{B&&(q==null||q())},[B,q]);const W=(st=k.arrow)==null?void 0:st.x,ee=(Ae=k.arrow)==null?void 0:Ae.y,le=((X=k.arrow)==null?void 0:X.centerOffset)!==0,[Pe,Me]=w.useState();return ka(()=>{v&&Me(window.getComputedStyle(v).zIndex)},[v]),u.jsx("div",{ref:M.setFloating,"data-radix-popper-content-wrapper":"",style:{...I,transform:B?I.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Pe,"--radix-popper-transform-origin":[(ne=k.transformOrigin)==null?void 0:ne.x,(re=k.transformOrigin)==null?void 0:re.y].join(" "),...((V=k.hide)==null?void 0:V.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:u.jsx(NV,{scope:n,placedSide:L,onArrowChange:S,arrowX:W,arrowY:ee,shouldHideArrow:le,children:u.jsx(ot.div,{"data-side":L,"data-align":R,...m,ref:b,style:{...m.style,animation:B?void 0:"none"}})})})});h$.displayName=Dw;var p$="PopperArrow",AV={top:"bottom",right:"left",bottom:"top",left:"right"},m$=w.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,a=OV(p$,r),o=AV[a.placedSide];return u.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:u.jsx(PV,{...i,ref:n,style:{...i.style,display:"block"}})})});m$.displayName=p$;function EV(e){return e!==null}var TV=e=>({name:"transformOrigin",options:e,fn(t){var y,v,x;const{placement:n,rects:r,middlewareData:i}=t,o=((y=i.arrow)==null?void 0:y.centerOffset)!==0,s=o?0:e.arrowWidth,l=o?0:e.arrowHeight,[c,d]=y$(n),f={start:"0%",center:"50%",end:"100%"}[d],h=(((v=i.arrow)==null?void 0:v.x)??0)+s/2,p=(((x=i.arrow)==null?void 0:x.y)??0)+l/2;let g="",m="";return c==="bottom"?(g=o?f:`${h}px`,m=`${-l}px`):c==="top"?(g=o?f:`${h}px`,m=`${r.floating.height+l}px`):c==="right"?(g=`${-l}px`,m=o?f:`${p}px`):c==="left"&&(g=`${r.floating.width+l}px`,m=o?f:`${p}px`),{data:{x:g,y:m}}}});function y$(e){const[t,n="center"]=e.split("-");return[t,n]}var CV=f$,_V=h$,kV=m$,[Pm,ebe]=Xo("Tooltip",[c$]),Iw=c$(),v$="TooltipProvider",$V=700,WP="tooltip.open",[MV,g$]=Pm(v$),x$=e=>{const{__scopeTooltip:t,delayDuration:n=$V,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=w.useRef(!0),s=w.useRef(!1),l=w.useRef(0);return w.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),u.jsx(MV,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:w.useCallback(()=>{window.clearTimeout(l.current),o.current=!1},[]),onClose:w.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:w.useCallback(c=>{s.current=c},[]),disableHoverableContent:i,children:a})};x$.displayName=v$;var b$="Tooltip",[tbe,Nm]=Pm(b$),O0="TooltipTrigger",RV=w.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=Nm(O0,n),a=g$(O0,n),o=Iw(n),s=w.useRef(null),l=_t(t,s,i.onTriggerChange),c=w.useRef(!1),d=w.useRef(!1),f=w.useCallback(()=>c.current=!1,[]);return w.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),u.jsx(CV,{asChild:!0,...o,children:u.jsx(ot.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:l,onPointerMove:Be(e.onPointerMove,h=>{h.pointerType!=="touch"&&!d.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),d.current=!0)}),onPointerLeave:Be(e.onPointerLeave,()=>{i.onTriggerLeave(),d.current=!1}),onPointerDown:Be(e.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:Be(e.onFocus,()=>{c.current||i.onOpen()}),onBlur:Be(e.onBlur,i.onClose),onClick:Be(e.onClick,i.onClose)})})});RV.displayName=O0;var DV="TooltipPortal",[nbe,IV]=Pm(DV,{forceMount:void 0}),bl="TooltipContent",w$=w.forwardRef((e,t)=>{const n=IV(bl,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...a}=e,o=Nm(bl,e.__scopeTooltip);return u.jsx(Qo,{present:r||o.open,children:o.disableHoverableContent?u.jsx(S$,{side:i,...a,ref:t}):u.jsx(LV,{side:i,...a,ref:t})})}),LV=w.forwardRef((e,t)=>{const n=Nm(bl,e.__scopeTooltip),r=g$(bl,e.__scopeTooltip),i=w.useRef(null),a=_t(t,i),[o,s]=w.useState(null),{trigger:l,onClose:c}=n,d=i.current,{onPointerInTransitChange:f}=r,h=w.useCallback(()=>{s(null),f(!1)},[f]),p=w.useCallback((g,m)=>{const y=g.currentTarget,v={x:g.clientX,y:g.clientY},x=UV(v,y.getBoundingClientRect()),b=WV(v,x),P=HV(m.getBoundingClientRect()),S=KV([...b,...P]);s(S),f(!0)},[f]);return w.useEffect(()=>()=>h(),[h]),w.useEffect(()=>{if(l&&d){const g=y=>p(y,d),m=y=>p(y,l);return l.addEventListener("pointerleave",g),d.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",g),d.removeEventListener("pointerleave",m)}}},[l,d,p,h]),w.useEffect(()=>{if(o){const g=m=>{const y=m.target,v={x:m.clientX,y:m.clientY},x=(l==null?void 0:l.contains(y))||(d==null?void 0:d.contains(y)),b=!qV(v,o);x?h():b&&(h(),c())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[l,d,o,c,h]),u.jsx(S$,{...e,ref:a})}),[FV,BV]=Pm(b$,{isInside:!1}),zV=uk("TooltipContent"),S$=w.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...s}=e,l=Nm(bl,n),c=Iw(n),{onClose:d}=l;return w.useEffect(()=>(document.addEventListener(WP,d),()=>document.removeEventListener(WP,d)),[d]),w.useEffect(()=>{if(l.trigger){const f=h=>{const p=h.target;p!=null&&p.contains(l.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,d]),u.jsx(ym,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:u.jsxs(_V,{"data-state":l.stateAttribute,...c,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[u.jsx(zV,{children:r}),u.jsx(FV,{scope:n,isInside:!0,children:u.jsx(lB,{id:l.contentId,role:"tooltip",children:i||r})})]})})});w$.displayName=bl;var j$="TooltipArrow",VV=w.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=Iw(n);return BV(j$,n).isInside?null:u.jsx(kV,{...i,...r,ref:t})});VV.displayName=j$;function UV(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function WV(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function HV(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function qV(e,t){const{x:n,y:r}=e;let i=!1;for(let a=0,o=t.length-1;ar!=d>r&&n<(c-s)*(r-l)/(d-l)+s&&(i=!i)}return i}function KV(e){const t=e.slice();return t.sort((n,r)=>n.xr.x?1:n.yr.y?1:0),GV(t)}function GV(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r=2;){const a=t[t.length-1],o=t[t.length-2];if((a.x-o.x)*(i.y-o.y)>=(a.y-o.y)*(i.x-o.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const a=n[n.length-1],o=n[n.length-2];if((a.x-o.x)*(i.y-o.y)>=(a.y-o.y)*(i.x-o.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var YV=x$,P$=w$;const XV=YV,QV=w.forwardRef(({className:e,sideOffset:t=4,...n},r)=>u.jsx(P$,{ref:r,sideOffset:t,className:de("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",e),...n}));QV.displayName=P$.displayName;const $d=w.forwardRef(({className:e,...t},n)=>u.jsx("div",{ref:n,className:de("shadcn-card rounded-xl border bg-card border-card-border text-card-foreground shadow-sm",e),...t}));$d.displayName="Card";const Un=w.forwardRef(({className:e,...t},n)=>u.jsx("div",{ref:n,className:de("flex flex-col space-y-1.5 p-6",e),...t}));Un.displayName="CardHeader";const Wn=w.forwardRef(({className:e,...t},n)=>u.jsx("div",{ref:n,className:de("text-2xl font-semibold leading-none tracking-tight",e),...t}));Wn.displayName="CardTitle";const Hn=w.forwardRef(({className:e,...t},n)=>u.jsx("div",{ref:n,className:de("text-sm text-muted-foreground",e),...t}));Hn.displayName="CardDescription";const Kn=w.forwardRef(({className:e,...t},n)=>u.jsx("div",{ref:n,className:de("p-6 pt-0",e),...t}));Kn.displayName="CardContent";const ZV=w.forwardRef(({className:e,...t},n)=>u.jsx("div",{ref:n,className:de("flex items-center p-6 pt-0",e),...t}));ZV.displayName="CardFooter";function N$(){return u.jsx("div",{className:"min-h-screen w-full flex items-center justify-center bg-gray-50",children:u.jsx($d,{className:"w-full max-w-md mx-4",children:u.jsxs(Kn,{className:"pt-6",children:[u.jsxs("div",{className:"flex mb-4 gap-2",children:[u.jsx(Ik,{className:"h-8 w-8 text-red-500"}),u.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"404 Page Not Found"})]}),u.jsx("p",{className:"mt-4 text-sm text-gray-600",children:"Did you forget to add the page to the router?"})]})})})}const Lw=bm("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover-elevate active-elevate-2",{variants:{variant:{default:"bg-primary text-primary-foreground border border-primary-border",destructive:"bg-destructive text-destructive-foreground border border-destructive-border",outline:" border [border-color:var(--button-outline)] shadow-xs active:shadow-none ",secondary:"border bg-secondary text-secondary-foreground border border-secondary-border ",ghost:"border border-transparent"},size:{default:"min-h-9 px-4 py-2",sm:"min-h-8 rounded-md px-3 text-xs",lg:"min-h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),ue=w.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},a)=>{const o=r?B6:"button";return u.jsx(o,{className:de(Lw({variant:t,size:n,className:e})),ref:a,...i})});ue.displayName="Button";var cv="focusScope.autoFocusOnMount",uv="focusScope.autoFocusOnUnmount",HP={bubbles:!1,cancelable:!0},JV="FocusScope",O$=w.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,l]=w.useState(null),c=ar(i),d=ar(a),f=w.useRef(null),h=_t(t,m=>l(m)),p=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(r){let m=function(b){if(p.paused||!s)return;const P=b.target;s.contains(P)?f.current=P:Gi(f.current,{select:!0})},y=function(b){if(p.paused||!s)return;const P=b.relatedTarget;P!==null&&(s.contains(P)||Gi(f.current,{select:!0}))},v=function(b){if(document.activeElement===document.body)for(const S of b)S.removedNodes.length>0&&Gi(s)};document.addEventListener("focusin",m),document.addEventListener("focusout",y);const x=new MutationObserver(v);return s&&x.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",y),x.disconnect()}}},[r,s,p.paused]),w.useEffect(()=>{if(s){KP.add(p);const m=document.activeElement;if(!s.contains(m)){const v=new CustomEvent(cv,HP);s.addEventListener(cv,c),s.dispatchEvent(v),v.defaultPrevented||(e8(a8(A$(s)),{select:!0}),document.activeElement===m&&Gi(s))}return()=>{s.removeEventListener(cv,c),setTimeout(()=>{const v=new CustomEvent(uv,HP);s.addEventListener(uv,d),s.dispatchEvent(v),v.defaultPrevented||Gi(m??document.body,{select:!0}),s.removeEventListener(uv,d),KP.remove(p)},0)}}},[s,c,d,p]);const g=w.useCallback(m=>{if(!n&&!r||p.paused)return;const y=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,v=document.activeElement;if(y&&v){const x=m.currentTarget,[b,P]=t8(x);b&&P?!m.shiftKey&&v===P?(m.preventDefault(),n&&Gi(b,{select:!0})):m.shiftKey&&v===b&&(m.preventDefault(),n&&Gi(P,{select:!0})):v===x&&m.preventDefault()}},[n,r,p.paused]);return u.jsx(ot.div,{tabIndex:-1,...o,ref:h,onKeyDown:g})});O$.displayName=JV;function e8(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Gi(r,{select:t}),document.activeElement!==n)return}function t8(e){const t=A$(e),n=qP(t,e),r=qP(t.reverse(),e);return[n,r]}function A$(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function qP(e,t){for(const n of e)if(!n8(n,{upTo:t}))return n}function n8(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function r8(e){return e instanceof HTMLInputElement&&"select"in e}function Gi(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&r8(e)&&t&&e.select()}}var KP=i8();function i8(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=GP(e,t),e.unshift(t)},remove(t){var n;e=GP(e,t),(n=e[0])==null||n.resume()}}}function GP(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function a8(e){return e.filter(t=>t.tagName!=="A")}var dv=0;function o8(){w.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??YP()),document.body.insertAdjacentElement("beforeend",e[1]??YP()),dv++,()=>{dv===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),dv--}},[])}function YP(){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 Vr=function(){return Vr=Object.assign||function(t){for(var n,r=1,i=arguments.length;r"u")return j8;var t=P8(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},O8=_$(),Hs="data-scroll-locked",A8=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n="margin"),` - .`.concat(l8,` { - overflow: hidden `).concat(r,`; - padding-right: `).concat(s,"px ").concat(r,`; - } - body[`).concat(Hs,`] { - overflow: hidden `).concat(r,`; - overscroll-behavior: contain; - `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&` - padding-left: `.concat(i,`px; - padding-top: `).concat(a,`px; - padding-right: `).concat(o,`px; - margin-left:0; - margin-top:0; - margin-right: `).concat(s,"px ").concat(r,`; - `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),` - } - - .`).concat(sh,` { - right: `).concat(s,"px ").concat(r,`; - } - - .`).concat(lh,` { - margin-right: `).concat(s,"px ").concat(r,`; - } - - .`).concat(sh," .").concat(sh,` { - right: 0 `).concat(r,`; - } - - .`).concat(lh," .").concat(lh,` { - margin-right: 0 `).concat(r,`; - } - - body[`).concat(Hs,`] { - `).concat(c8,": ").concat(s,`px; - } -`)},QP=function(){var e=parseInt(document.body.getAttribute(Hs)||"0",10);return isFinite(e)?e:0},E8=function(){w.useEffect(function(){return document.body.setAttribute(Hs,(QP()+1).toString()),function(){var e=QP()-1;e<=0?document.body.removeAttribute(Hs):document.body.setAttribute(Hs,e.toString())}},[])},T8=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;E8();var a=w.useMemo(function(){return N8(i)},[i]);return w.createElement(O8,{styles:A8(a,!t,i,n?"":"!important")})},A0=!1;if(typeof window<"u")try{var wf=Object.defineProperty({},"passive",{get:function(){return A0=!0,!0}});window.addEventListener("test",wf,wf),window.removeEventListener("test",wf,wf)}catch{A0=!1}var ss=A0?{passive:!1}:!1,C8=function(e){return e.tagName==="TEXTAREA"},k$=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!C8(e)&&n[t]==="visible")},_8=function(e){return k$(e,"overflowY")},k8=function(e){return k$(e,"overflowX")},ZP=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=$$(e,r);if(i){var a=M$(e,r),o=a[1],s=a[2];if(o>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},$8=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},M8=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},$$=function(e,t){return e==="v"?_8(t):k8(t)},M$=function(e,t){return e==="v"?$8(t):M8(t)},R8=function(e,t){return e==="h"&&t==="rtl"?-1:1},D8=function(e,t,n,r,i){var a=R8(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,l=t.contains(s),c=!1,d=o>0,f=0,h=0;do{var p=M$(e,s),g=p[0],m=p[1],y=p[2],v=m-y-a*g;(g||v)&&$$(e,s)&&(f+=v,h+=g),s instanceof ShadowRoot?s=s.host:s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(d&&(Math.abs(f)<1||!i)||!d&&(Math.abs(h)<1||!i))&&(c=!0),c},Sf=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},JP=function(e){return[e.deltaX,e.deltaY]},eN=function(e){return e&&"current"in e?e.current:e},I8=function(e,t){return e[0]===t[0]&&e[1]===t[1]},L8=function(e){return` - .block-interactivity-`.concat(e,` {pointer-events: none;} - .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},F8=0,ls=[];function B8(e){var t=w.useRef([]),n=w.useRef([0,0]),r=w.useRef(),i=w.useState(F8++)[0],a=w.useState(_$)[0],o=w.useRef(e);w.useEffect(function(){o.current=e},[e]),w.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var m=s8([e.lockRef.current],(e.shards||[]).map(eN),!0).filter(Boolean);return m.forEach(function(y){return y.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),m.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=w.useCallback(function(m,y){if("touches"in m&&m.touches.length===2||m.type==="wheel"&&m.ctrlKey)return!o.current.allowPinchZoom;var v=Sf(m),x=n.current,b="deltaX"in m?m.deltaX:x[0]-v[0],P="deltaY"in m?m.deltaY:x[1]-v[1],S,j=m.target,N=Math.abs(b)>Math.abs(P)?"h":"v";if("touches"in m&&N==="h"&&j.type==="range")return!1;var O=ZP(N,j);if(!O)return!0;if(O?S=N:(S=N==="v"?"h":"v",O=ZP(N,j)),!O)return!1;if(!r.current&&"changedTouches"in m&&(b||P)&&(r.current=S),!S)return!0;var A=r.current||S;return D8(A,y,m,A==="h"?b:P,!0)},[]),l=w.useCallback(function(m){var y=m;if(!(!ls.length||ls[ls.length-1]!==a)){var v="deltaY"in y?JP(y):Sf(y),x=t.current.filter(function(S){return S.name===y.type&&(S.target===y.target||y.target===S.shadowParent)&&I8(S.delta,v)})[0];if(x&&x.should){y.cancelable&&y.preventDefault();return}if(!x){var b=(o.current.shards||[]).map(eN).filter(Boolean).filter(function(S){return S.contains(y.target)}),P=b.length>0?s(y,b[0]):!o.current.noIsolation;P&&y.cancelable&&y.preventDefault()}}},[]),c=w.useCallback(function(m,y,v,x){var b={name:m,delta:y,target:v,should:x,shadowParent:z8(v)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(P){return P!==b})},1)},[]),d=w.useCallback(function(m){n.current=Sf(m),r.current=void 0},[]),f=w.useCallback(function(m){c(m.type,JP(m),m.target,s(m,e.lockRef.current))},[]),h=w.useCallback(function(m){c(m.type,Sf(m),m.target,s(m,e.lockRef.current))},[]);w.useEffect(function(){return ls.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",l,ss),document.addEventListener("touchmove",l,ss),document.addEventListener("touchstart",d,ss),function(){ls=ls.filter(function(m){return m!==a}),document.removeEventListener("wheel",l,ss),document.removeEventListener("touchmove",l,ss),document.removeEventListener("touchstart",d,ss)}},[]);var p=e.removeScrollBar,g=e.inert;return w.createElement(w.Fragment,null,g?w.createElement(a,{styles:L8(i)}):null,p?w.createElement(T8,{gapMode:e.gapMode}):null)}function z8(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const V8=y8(C$,B8);var R$=w.forwardRef(function(e,t){return w.createElement(Om,Vr({},e,{ref:t,sideCar:V8}))});R$.classNames=Om.classNames;var U8=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},cs=new WeakMap,jf=new WeakMap,Pf={},mv=0,D$=function(e){return e&&(e.host||D$(e.parentNode))},W8=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=D$(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},H8=function(e,t,n,r){var i=W8(t,Array.isArray(e)?e:[e]);Pf[n]||(Pf[n]=new WeakMap);var a=Pf[n],o=[],s=new Set,l=new Set(i),c=function(f){!f||s.has(f)||(s.add(f),c(f.parentNode))};i.forEach(c);var d=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(h){if(s.has(h))d(h);else try{var p=h.getAttribute(r),g=p!==null&&p!=="false",m=(cs.get(h)||0)+1,y=(a.get(h)||0)+1;cs.set(h,m),a.set(h,y),o.push(h),m===1&&g&&jf.set(h,!0),y===1&&h.setAttribute(n,"true"),g||h.setAttribute(r,"true")}catch(v){console.error("aria-hidden: cannot operate on ",h,v)}})};return d(t),s.clear(),mv++,function(){o.forEach(function(f){var h=cs.get(f)-1,p=a.get(f)-1;cs.set(f,h),a.set(f,p),h||(jf.has(f)||f.removeAttribute(r),jf.delete(f)),p||f.removeAttribute(n)}),mv--,mv||(cs=new WeakMap,cs=new WeakMap,jf=new WeakMap,Pf={})}},q8=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=U8(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),H8(r,i,n,"aria-hidden")):function(){return null}},Fw="Dialog",[I$,L$]=Xo(Fw),[K8,Er]=I$(Fw),F$=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=w.useRef(null),l=w.useRef(null),[c=!1,d]=xw({prop:r,defaultProp:i,onChange:a});return u.jsx(K8,{scope:t,triggerRef:s,contentRef:l,contentId:ov(),titleId:ov(),descriptionId:ov(),open:c,onOpenChange:d,onOpenToggle:w.useCallback(()=>d(f=>!f),[d]),modal:o,children:n})};F$.displayName=Fw;var B$="DialogTrigger",z$=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Er(B$,n),a=_t(t,i.triggerRef);return u.jsx(ot.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Vw(i.open),...r,ref:a,onClick:Be(e.onClick,i.onOpenToggle)})});z$.displayName=B$;var Bw="DialogPortal",[G8,V$]=I$(Bw,{forceMount:void 0}),U$=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=Er(Bw,t);return u.jsx(G8,{scope:t,forceMount:n,children:w.Children.map(r,o=>u.jsx(Qo,{present:n||a.open,children:u.jsx(gw,{asChild:!0,container:i,children:o})}))})};U$.displayName=Bw;var Uh="DialogOverlay",W$=w.forwardRef((e,t)=>{const n=V$(Uh,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Er(Uh,e.__scopeDialog);return a.modal?u.jsx(Qo,{present:r||a.open,children:u.jsx(X8,{...i,ref:t})}):null});W$.displayName=Uh;var Y8=Cu("DialogOverlay.RemoveScroll"),X8=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Er(Uh,n);return u.jsx(R$,{as:Y8,allowPinchZoom:!0,shards:[i.contentRef],children:u.jsx(ot.div,{"data-state":Vw(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Lo="DialogContent",H$=w.forwardRef((e,t)=>{const n=V$(Lo,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Er(Lo,e.__scopeDialog);return u.jsx(Qo,{present:r||a.open,children:a.modal?u.jsx(Q8,{...i,ref:t}):u.jsx(Z8,{...i,ref:t})})});H$.displayName=Lo;var Q8=w.forwardRef((e,t)=>{const n=Er(Lo,e.__scopeDialog),r=w.useRef(null),i=_t(t,n.contentRef,r);return w.useEffect(()=>{const a=r.current;if(a)return q8(a)},[]),u.jsx(q$,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Be(e.onCloseAutoFocus,a=>{var o;a.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:Be(e.onPointerDownOutside,a=>{const o=a.detail.originalEvent,s=o.button===0&&o.ctrlKey===!0;(o.button===2||s)&&a.preventDefault()}),onFocusOutside:Be(e.onFocusOutside,a=>a.preventDefault())})}),Z8=w.forwardRef((e,t)=>{const n=Er(Lo,e.__scopeDialog),r=w.useRef(!1),i=w.useRef(!1);return u.jsx(q$,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var o,s;(o=e.onCloseAutoFocus)==null||o.call(e,a),a.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.focus(),a.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:a=>{var l,c;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const o=a.target;((c=n.triggerRef.current)==null?void 0:c.contains(o))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&i.current&&a.preventDefault()}})}),q$=w.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=Er(Lo,n),l=w.useRef(null),c=_t(t,l);return o8(),u.jsxs(u.Fragment,{children:[u.jsx(O$,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:u.jsx(ym,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Vw(s.open),...o,ref:c,onDismiss:()=>s.onOpenChange(!1)})}),u.jsxs(u.Fragment,{children:[u.jsx(eU,{titleId:s.titleId}),u.jsx(nU,{contentRef:l,descriptionId:s.descriptionId})]})]})}),zw="DialogTitle",K$=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Er(zw,n);return u.jsx(ot.h2,{id:i.titleId,...r,ref:t})});K$.displayName=zw;var G$="DialogDescription",Y$=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Er(G$,n);return u.jsx(ot.p,{id:i.descriptionId,...r,ref:t})});Y$.displayName=G$;var X$="DialogClose",Q$=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Er(X$,n);return u.jsx(ot.button,{type:"button",...r,ref:t,onClick:Be(e.onClick,()=>i.onOpenChange(!1))})});Q$.displayName=X$;function Vw(e){return e?"open":"closed"}var Z$="DialogTitleWarning",[J8,J$]=L6(Z$,{contentName:Lo,titleName:zw,docsSlug:"dialog"}),eU=({titleId:e})=>{const t=J$(Z$),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. - -If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. - -For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return w.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},tU="DialogDescriptionWarning",nU=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${J$(tU).contentName}}.`;return w.useEffect(()=>{var a;const i=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},eM=F$,tM=z$,nM=U$,Uw=W$,Ww=H$,Hw=K$,qw=Y$,Kw=Q$;const wl=eM,tN=tM,rU=nM,rM=w.forwardRef(({className:e,...t},n)=>u.jsx(Uw,{ref:n,className:de("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",e),...t}));rM.displayName=Uw.displayName;const Fo=w.forwardRef(({className:e,children:t,...n},r)=>u.jsxs(rU,{children:[u.jsx(rM,{}),u.jsxs(Ww,{ref:r,className:de("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",e),...n,children:[t,u.jsxs(Kw,{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:[u.jsx(Aw,{className:"h-4 w-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Fo.displayName=Ww.displayName;const Bo=({className:e,...t})=>u.jsx("div",{className:de("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Bo.displayName="DialogHeader";const Wh=({className:e,...t})=>u.jsx("div",{className:de("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Wh.displayName="DialogFooter";const zo=w.forwardRef(({className:e,...t},n)=>u.jsx(Hw,{ref:n,className:de("text-lg font-semibold leading-none tracking-tight",e),...t}));zo.displayName=Hw.displayName;const Vo=w.forwardRef(({className:e,...t},n)=>u.jsx(qw,{ref:n,className:de("text-sm text-muted-foreground",e),...t}));Vo.displayName=qw.displayName;const xt=w.forwardRef(({className:e,type:t,...n},r)=>u.jsx("input",{type:t,className:de("flex h-9 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background 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-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));xt.displayName="Input";var iU="Label",iM=w.forwardRef((e,t)=>u.jsx(ot.label,{...e,ref:t,onMouseDown:n=>{var i;n.target.closest("button, input, select, textarea")||((i=e.onMouseDown)==null||i.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));iM.displayName=iU;var aM=iM;const aU=bm("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Tt=w.forwardRef(({className:e,...t},n)=>u.jsx(aM,{ref:n,className:de(aU(),e),...t}));Tt.displayName=aM.displayName;function nN({layout:e="desktop"}){const t=_d(),[n,r]=w.useState(!1),[i,a]=w.useState(!1),[o,s]=w.useState({email:"",password:""}),[l,c]=w.useState({email:"",password:""});vt({queryKey:["/api/me"],queryFn:yi({on401:"returnNull"})});const d=(y,v)=>{t.setQueryData(["/api/me"],y),t.invalidateQueries({queryKey:["/api/broker/status"]}),yt({title:v==="signup"?"Account created":"Signed in",description:v==="signup"?"Your account has been created.":`Welcome back ${y.username}`}),r(!1),a(!1)},f=Oo({mutationFn:async y=>(await Ze("POST","/api/signup",{username:y.email,password:y.password})).json(),onSuccess:y=>d(y,"signup"),onError:y=>{yt({title:"Signup failed",description:y.message})}}),h=Oo({mutationFn:async y=>(await Ze("POST","/api/login",y)).json(),onSuccess:y=>d(y,"login"),onError:y=>{yt({title:"Login failed",description:y.message})}}),p=y=>{y.preventDefault(),f.mutate(o)},g=y=>{y.preventDefault(),h.mutate(l)},m=e==="mobile"?"w-full justify-center":"px-4 rounded-xl min-w-[96px]";return u.jsxs("div",{className:e==="mobile"?"flex flex-col gap-3":"flex items-center gap-3",children:[u.jsxs(wl,{open:n,onOpenChange:r,children:[u.jsx(tN,{asChild:!0,children:u.jsx(ue,{variant:"outline",className:m,children:"Sign up"})}),u.jsxs(Fo,{children:[u.jsxs(Bo,{className:"space-y-2",children:[u.jsx(zo,{children:"Create account"}),u.jsx(Vo,{children:"Create an account with your email and a password."})]}),u.jsxs("form",{className:"space-y-4",onSubmit:p,children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx(Tt,{htmlFor:"signup-email",children:"Email"}),u.jsx(xt,{id:"signup-email",type:"email",required:!0,placeholder:"you@example.com",value:o.email,onChange:y=>s(v=>({...v,email:y.target.value.trim()}))})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(Tt,{htmlFor:"signup-password",children:"Password"}),u.jsx(xt,{id:"signup-password",type:"password",required:!0,minLength:6,value:o.password,onChange:y=>s(v=>({...v,password:y.target.value}))})]}),u.jsx(ue,{type:"submit",className:"w-full",disabled:f.isPending,children:f.isPending?"Creating account...":"Create account"})]})]})]}),u.jsxs(wl,{open:i,onOpenChange:a,children:[u.jsx(tN,{asChild:!0,children:u.jsx(ue,{className:m,children:"Log in"})}),u.jsxs(Fo,{children:[u.jsxs(Bo,{className:"space-y-2",children:[u.jsx(zo,{children:"Log in"}),u.jsx(Vo,{children:"Enter your email and password to access your account."})]}),u.jsxs("form",{className:"space-y-4",onSubmit:g,children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx(Tt,{htmlFor:"login-email",children:"Email"}),u.jsx(xt,{id:"login-email",type:"email",required:!0,placeholder:"you@example.com",value:l.email,onChange:y=>c(v=>({...v,email:y.target.value.trim()}))})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(Tt,{htmlFor:"login-password",children:"Password"}),u.jsx(xt,{id:"login-password",type:"password",required:!0,value:l.password,onChange:y=>c(v=>({...v,password:y.target.value}))})]}),u.jsx(ue,{type:"submit",className:"w-full",disabled:h.isPending,children:h.isPending?"Signing in...":"Log in"})]})]})]})]})}function oU(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,i)=>i==="create"?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}function Am(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const E0=e=>Array.isArray(e);function oM(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Gw(e,t,n,r){if(typeof t=="function"){const[i,a]=rN(r);t=t(n!==void 0?n:e.custom,i,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,a]=rN(r);t=t(n!==void 0?n:e.custom,i,a)}return t}function Em(e,t,n){const r=e.getProps();return Gw(r,t,n!==void 0?n:r.custom,e)}const Yw=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Xw=["initial",...Yw],Md=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Zo=new Set(Md),vi=e=>e*1e3,gi=e=>e/1e3,sU={type:"spring",stiffness:500,damping:25,restSpeed:10},lU=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),cU={type:"keyframes",duration:.8},uU={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},dU=(e,{keyframes:t})=>t.length>2?cU:Zo.has(e)?e.startsWith("scale")?lU(t[1]):sU:uU;function Qw(e,t){return e?e[t]||e.default||e:void 0}const fU={skipAnimations:!1,useManualTiming:!1},hU=e=>e!==null;function Tm(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(hU),a=t&&n!=="loop"&&t%2===1?0:i.length-1;return!a||r===void 0?i[a]:r}const Xt=e=>e;let T0=Xt;function pU(e){let t=new Set,n=new Set,r=!1,i=!1;const a=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function s(c){a.has(c)&&(l.schedule(c),e()),c(o)}const l={schedule:(c,d=!1,f=!1)=>{const p=f&&r?t:n;return d&&a.add(c),p.has(c)||p.add(c),c},cancel:c=>{n.delete(c),a.delete(c)},process:c=>{if(o=c,r){i=!0;return}r=!0,[t,n]=[n,t],n.clear(),t.forEach(s),r=!1,i&&(i=!1,l.process(c))}};return l}const Nf=["read","resolveKeyframes","update","preRender","render","postRender"],mU=40;function sM(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=Nf.reduce((v,x)=>(v[x]=pU(a),v),{}),{read:s,resolveKeyframes:l,update:c,preRender:d,render:f,postRender:h}=o,p=()=>{const v=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(v-i.timestamp,mU),1),i.timestamp=v,i.isProcessing=!0,s.process(i),l.process(i),c.process(i),d.process(i),f.process(i),h.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(p))},g=()=>{n=!0,r=!0,i.isProcessing||e(p)};return{schedule:Nf.reduce((v,x)=>{const b=o[x];return v[x]=(P,S=!1,j=!1)=>(n||g(),b.schedule(P,S,j)),v},{}),cancel:v=>{for(let x=0;x(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,yU=1e-7,vU=12;function gU(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=lM(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>yU&&++sgU(a,0,1,e,n);return a=>a===0||a===1?a:lM(i(a),t,r)}const cM=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,uM=e=>t=>1-e(1-t),dM=Rd(.33,1.53,.69,.99),Zw=uM(dM),fM=cM(Zw),hM=e=>(e*=2)<1?.5*Zw(e):.5*(2-Math.pow(2,-10*(e-1))),Jw=e=>1-Math.sin(Math.acos(e)),pM=uM(Jw),mM=cM(Jw),yM=e=>/^0[^.\s]+$/u.test(e);function xU(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||yM(e):!0}const vM=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),gM=e=>t=>typeof t=="string"&&t.startsWith(e),xM=gM("--"),bU=gM("var(--"),e1=e=>bU(e)?wU.test(e.split("/*")[0].trim()):!1,wU=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,SU=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function jU(e){const t=SU.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function bM(e,t,n=1){const[r,i]=jU(e);if(!r)return;const a=window.getComputedStyle(t).getPropertyValue(r);if(a){const o=a.trim();return vM(o)?parseFloat(o):o}return e1(i)?bM(i,t,n+1):i}const Ci=(e,t,n)=>n>t?t:ntypeof e=="number",parse:parseFloat,transform:e=>e},Ru={...tc,transform:e=>Ci(0,1,e)},Of={...tc,default:1},Dd=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Yi=Dd("deg"),Gr=Dd("%"),ae=Dd("px"),PU=Dd("vh"),NU=Dd("vw"),iN={...Gr,parse:e=>Gr.parse(e)/100,transform:e=>Gr.transform(e*100)},OU=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),aN=e=>e===tc||e===ae,oN=(e,t)=>parseFloat(e.split(", ")[t]),sN=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return oN(i[1],t);{const a=r.match(/^matrix\((.+)\)$/u);return a?oN(a[1],e):0}},AU=new Set(["x","y","z"]),EU=Md.filter(e=>!AU.has(e));function TU(e){const t=[];return EU.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Sl={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:sN(4,13),y:sN(5,14)};Sl.translateX=Sl.x;Sl.translateY=Sl.y;const wM=e=>t=>t.test(e),CU={test:e=>e==="auto",parse:e=>e},SM=[tc,ae,Gr,Yi,NU,PU,CU],lN=e=>SM.find(wM(e)),Ao=new Set;let C0=!1,_0=!1;function jM(){if(_0){const e=Array.from(Ao).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=TU(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([a,o])=>{var s;(s=r.getValue(a))===null||s===void 0||s.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}_0=!1,C0=!1,Ao.forEach(e=>e.complete()),Ao.clear()}function PM(){Ao.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(_0=!0)})}function _U(){PM(),jM()}class t1{constructor(t,n,r,i,a,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=a,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Ao.add(this),C0||(C0=!0,De.read(PM),De.resolveKeyframes(jM))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let a=0;aMath.round(e*1e5)/1e5,n1=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function kU(e){return e==null}const $U=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,r1=(e,t)=>n=>!!(typeof n=="string"&&$U.test(n)&&n.startsWith(e)||t&&!kU(n)&&Object.prototype.hasOwnProperty.call(n,t)),NM=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,a,o,s]=r.match(n1);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s!==void 0?parseFloat(s):1}},MU=e=>Ci(0,255,e),vv={...tc,transform:e=>Math.round(MU(e))},uo={test:r1("rgb","red"),parse:NM("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+vv.transform(e)+", "+vv.transform(t)+", "+vv.transform(n)+", "+iu(Ru.transform(r))+")"};function RU(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const k0={test:r1("#"),parse:RU,transform:uo.transform},As={test:r1("hsl","hue"),parse:NM("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Gr.transform(iu(t))+", "+Gr.transform(iu(n))+", "+iu(Ru.transform(r))+")"},Wt={test:e=>uo.test(e)||k0.test(e)||As.test(e),parse:e=>uo.test(e)?uo.parse(e):As.test(e)?As.parse(e):k0.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?uo.transform(e):As.transform(e)},DU=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function IU(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(n1))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(DU))===null||n===void 0?void 0:n.length)||0)>0}const OM="number",AM="color",LU="var",FU="var(",cN="${}",BU=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Du(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let a=0;const s=t.replace(BU,l=>(Wt.test(l)?(r.color.push(a),i.push(AM),n.push(Wt.parse(l))):l.startsWith(FU)?(r.var.push(a),i.push(LU),n.push(l)):(r.number.push(a),i.push(OM),n.push(parseFloat(l))),++a,cN)).split(cN);return{values:n,split:s,indexes:r,types:i}}function EM(e){return Du(e).values}function TM(e){const{split:t,types:n}=Du(e),r=t.length;return i=>{let a="";for(let o=0;otypeof e=="number"?0:e;function VU(e){const t=EM(e);return TM(e)(t.map(zU))}const Ia={test:IU,parse:EM,createTransformer:TM,getAnimatableNone:VU},UU=new Set(["brightness","contrast","saturate","opacity"]);function WU(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(n1)||[];if(!r)return e;const i=n.replace(r,"");let a=UU.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+i+")"}const HU=/\b([a-z-]*)\(.*?\)/gu,$0={...Ia,getAnimatableNone:e=>{const t=e.match(HU);return t?t.map(WU).join(" "):e}},qU={borderWidth:ae,borderTopWidth:ae,borderRightWidth:ae,borderBottomWidth:ae,borderLeftWidth:ae,borderRadius:ae,radius:ae,borderTopLeftRadius:ae,borderTopRightRadius:ae,borderBottomRightRadius:ae,borderBottomLeftRadius:ae,width:ae,maxWidth:ae,height:ae,maxHeight:ae,top:ae,right:ae,bottom:ae,left:ae,padding:ae,paddingTop:ae,paddingRight:ae,paddingBottom:ae,paddingLeft:ae,margin:ae,marginTop:ae,marginRight:ae,marginBottom:ae,marginLeft:ae,backgroundPositionX:ae,backgroundPositionY:ae},KU={rotate:Yi,rotateX:Yi,rotateY:Yi,rotateZ:Yi,scale:Of,scaleX:Of,scaleY:Of,scaleZ:Of,skew:Yi,skewX:Yi,skewY:Yi,distance:ae,translateX:ae,translateY:ae,translateZ:ae,x:ae,y:ae,z:ae,perspective:ae,transformPerspective:ae,opacity:Ru,originX:iN,originY:iN,originZ:ae},uN={...tc,transform:Math.round},i1={...qU,...KU,zIndex:uN,size:ae,fillOpacity:Ru,strokeOpacity:Ru,numOctaves:uN},GU={...i1,color:Wt,backgroundColor:Wt,outlineColor:Wt,fill:Wt,stroke:Wt,borderColor:Wt,borderTopColor:Wt,borderRightColor:Wt,borderBottomColor:Wt,borderLeftColor:Wt,filter:$0,WebkitFilter:$0},a1=e=>GU[e];function CM(e,t){let n=a1(e);return n!==$0&&(n=Ia),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const YU=new Set(["auto","none","0"]);function XU(e,t,n){let r=0,i;for(;r{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}function o1(e){return typeof e=="function"}let ch;function QU(){ch=void 0}const Yr={now:()=>(ch===void 0&&Yr.set(Dt.isProcessing||fU.useManualTiming?Dt.timestamp:performance.now()),ch),set:e=>{ch=e,queueMicrotask(QU)}},dN=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ia.test(e)||e==="0")&&!e.startsWith("url("));function ZU(e){const t=e[0];if(e.length===1)return!0;for(let n=0;neW?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&_U(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Yr.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:a,delay:o,onComplete:s,onUpdate:l,isGenerator:c}=this.options;if(!c&&!JU(t,r,i,a))if(o)this.options.duration=0;else{l==null||l(Tm(t,this.options,n)),s==null||s(),this.resolveFinishedPromise();return}const d=this.initPlayback(t,n);d!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...d},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const jl=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},$M=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let a=0;a{const d=c*o,f=d*e,h=d-n,p=M0(c,o),g=Math.exp(-f);return gv-h/p*g},a=c=>{const f=c*o*e,h=f*n+n,p=Math.pow(o,2)*Math.pow(c,2)*e,g=Math.exp(-f),m=M0(Math.pow(c,2),o);return(-i(c)+gv>0?-1:1)*((h-p)*g)/m}):(i=c=>{const d=Math.exp(-c*e),f=(c-n)*e+1;return-gv+d*f},a=c=>{const d=Math.exp(-c*e),f=(n-c)*(e*e);return d*f});const s=5/e,l=iW(i,a,s);if(e=vi(e),isNaN(l))return{stiffness:ct.stiffness,damping:ct.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:o*2*Math.sqrt(r*c),duration:e}}}const rW=12;function iW(e,t,n){let r=n;for(let i=1;i=R0?1/0:t}const aW=["duration","bounce"],oW=["stiffness","damping","mass"];function fN(e,t){return t.some(n=>e[n]!==void 0)}function sW(e){let t={velocity:ct.velocity,stiffness:ct.stiffness,damping:ct.damping,mass:ct.mass,isResolvedFromDuration:!1,...e};if(!fN(e,oW)&&fN(e,aW))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*Ci(.05,1,1-e.bounce)*Math.sqrt(i);t={...t,mass:ct.mass,stiffness:i,damping:a}}else{const n=nW(e);t={...t,...n,mass:ct.mass},t.isResolvedFromDuration=!0}return t}function IM(e=ct.visualDuration,t=ct.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:l,damping:c,mass:d,duration:f,velocity:h,isResolvedFromDuration:p}=sW({...n,velocity:-gi(n.velocity||0)}),g=h||0,m=c/(2*Math.sqrt(l*d)),y=o-a,v=gi(Math.sqrt(l/d)),x=Math.abs(y)<5;r||(r=x?ct.restSpeed.granular:ct.restSpeed.default),i||(i=x?ct.restDelta.granular:ct.restDelta.default);let b;if(m<1){const S=M0(v,m);b=j=>{const N=Math.exp(-m*v*j);return o-N*((g+m*v*y)/S*Math.sin(S*j)+y*Math.cos(S*j))}}else if(m===1)b=S=>o-Math.exp(-v*S)*(y+(g+v*y)*S);else{const S=v*Math.sqrt(m*m-1);b=j=>{const N=Math.exp(-m*v*j),O=Math.min(S*j,300);return o-N*((g+m*v*y)*Math.sinh(O)+S*y*Math.cosh(O))/S}}const P={calculatedDuration:p&&f||null,next:S=>{const j=b(S);if(p)s.done=S>=f;else{let N=0;m<1&&(N=S===0?vi(g):RM(b,S,j));const O=Math.abs(N)<=r,A=Math.abs(o-j)<=i;s.done=O&&A}return s.value=s.done?o:j,s},toString:()=>{const S=Math.min(DM(P),R0),j=$M(N=>P.next(S*N).value,S,30);return S+"ms "+j}};return P}function hN({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:l,restDelta:c=.5,restSpeed:d}){const f=e[0],h={done:!1,value:f},p=O=>s!==void 0&&Ol,g=O=>s===void 0?l:l===void 0||Math.abs(s-O)-m*Math.exp(-O/r),b=O=>v+x(O),P=O=>{const A=x(O),E=b(O);h.done=Math.abs(A)<=c,h.value=h.done?v:E};let S,j;const N=O=>{p(h.value)&&(S=O,j=IM({keyframes:[h.value,g(h.value)],velocity:RM(b,O,h.value),damping:i,stiffness:a,restDelta:c,restSpeed:d}))};return N(0),{calculatedDuration:null,next:O=>{let A=!1;return!j&&S===void 0&&(A=!0,P(O),N(O)),S!==void 0&&O>=S?j.next(O-S):(!A&&P(O),h)}}}const lW=Rd(.42,0,1,1),cW=Rd(0,0,.58,1),LM=Rd(.42,0,.58,1),uW=e=>Array.isArray(e)&&typeof e[0]!="number",s1=e=>Array.isArray(e)&&typeof e[0]=="number",pN={linear:Xt,easeIn:lW,easeInOut:LM,easeOut:cW,circIn:Jw,circInOut:mM,circOut:pM,backIn:Zw,backInOut:fM,backOut:dM,anticipate:hM},mN=e=>{if(s1(e)){T0(e.length===4);const[t,n,r,i]=e;return Rd(t,n,r,i)}else if(typeof e=="string")return T0(pN[e]!==void 0),pN[e];return e},dW=(e,t)=>n=>t(e(n)),Na=(...e)=>e.reduce(dW),nt=(e,t,n)=>e+(t-e)*n;function xv(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function fW({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=xv(l,s,e+1/3),a=xv(l,s,e),o=xv(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function Hh(e,t){return n=>n>0?t:e}const bv=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},hW=[k0,uo,As],pW=e=>hW.find(t=>t.test(e));function yN(e){const t=pW(e);if(!t)return!1;let n=t.parse(e);return t===As&&(n=fW(n)),n}const vN=(e,t)=>{const n=yN(e),r=yN(t);if(!n||!r)return Hh(e,t);const i={...n};return a=>(i.red=bv(n.red,r.red,a),i.green=bv(n.green,r.green,a),i.blue=bv(n.blue,r.blue,a),i.alpha=nt(n.alpha,r.alpha,a),uo.transform(i))},D0=new Set(["none","hidden"]);function mW(e,t){return D0.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function yW(e,t){return n=>nt(e,t,n)}function l1(e){return typeof e=="number"?yW:typeof e=="string"?e1(e)?Hh:Wt.test(e)?vN:xW:Array.isArray(e)?FM:typeof e=="object"?Wt.test(e)?vN:vW:Hh}function FM(e,t){const n=[...e],r=n.length,i=e.map((a,o)=>l1(a)(a,t[o]));return a=>{for(let o=0;o{for(const a in r)n[a]=r[a](i);return n}}function gW(e,t){var n;const r=[],i={color:0,var:0,number:0};for(let a=0;a{const n=Ia.createTransformer(t),r=Du(e),i=Du(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?D0.has(e)&&!i.values.length||D0.has(t)&&!r.values.length?mW(e,t):Na(FM(gW(r,i),i.values),n):Hh(e,t)};function BM(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?nt(e,t,n):l1(e)(e,t)}function bW(e,t,n){const r=[],i=n||BM,a=e.length-1;for(let o=0;ot[0];if(a===2&&e[0]===e[1])return()=>t[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=bW(t,r,i),s=o.length,l=c=>{let d=0;if(s>1)for(;dl(Ci(e[0],e[a-1],c)):l}function SW(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=jl(0,t,r);e.push(nt(n,1,i))}}function jW(e){const t=[0];return SW(t,e.length-1),t}function PW(e,t){return e.map(n=>n*t)}function NW(e,t){return e.map(()=>t||LM).splice(0,e.length-1)}function qh({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=uW(r)?r.map(mN):mN(r),a={done:!1,value:t[0]},o=PW(n&&n.length===t.length?n:jW(t),e),s=wW(o,t,{ease:Array.isArray(i)?i:NW(t,i)});return{calculatedDuration:e,next:l=>(a.value=s(l),a.done=l>=e,a)}}const OW=e=>{const t=({timestamp:n})=>e(n);return{start:()=>De.update(t,!0),stop:()=>Da(t),now:()=>Dt.isProcessing?Dt.timestamp:Yr.now()}},AW={decay:hN,inertia:hN,tween:qh,keyframes:qh,spring:IM},EW=e=>e/100;class c1 extends kM{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:i,keyframes:a}=this.options,o=(i==null?void 0:i.KeyframeResolver)||t1,s=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new o(a,s,n,r,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:a,velocity:o=0}=this.options,s=o1(n)?n:AW[n]||qh;let l,c;s!==qh&&typeof t[0]!="number"&&(l=Na(EW,BM(t[0],t[1])),t=[0,100]);const d=s({...this.options,keyframes:t});a==="mirror"&&(c=s({...this.options,keyframes:[...t].reverse(),velocity:-o})),d.calculatedDuration===null&&(d.calculatedDuration=DM(d));const{calculatedDuration:f}=d,h=f+i,p=h*(r+1)-i;return{generator:d,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:f,resolvedDuration:h,totalDuration:p}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:O}=this.options;return{done:!0,value:O[O.length-1]}}const{finalKeyframe:i,generator:a,mirroredGenerator:o,mapPercentToKeyframes:s,keyframes:l,calculatedDuration:c,totalDuration:d,resolvedDuration:f}=r;if(this.startTime===null)return a.next(0);const{delay:h,repeat:p,repeatType:g,repeatDelay:m,onUpdate:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-d/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const v=this.currentTime-h*(this.speed>=0?1:-1),x=this.speed>=0?v<0:v>d;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=d);let b=this.currentTime,P=a;if(p){const O=Math.min(this.currentTime,d)/f;let A=Math.floor(O),E=O%1;!E&&O>=1&&(E=1),E===1&&A--,A=Math.min(A,p+1),!!(A%2)&&(g==="reverse"?(E=1-E,m&&(E-=m/f)):g==="mirror"&&(P=o)),b=Ci(0,1,E)*f}const S=x?{done:!1,value:l[0]}:P.next(b);s&&(S.value=s(S.value));let{done:j}=S;!x&&c!==null&&(j=this.speed>=0?this.currentTime>=d:this.currentTime<=0);const N=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&j);return N&&i!==void 0&&(S.value=Tm(l,this.options,i)),y&&y(S.value),N&&this.finish(),S}get duration(){const{resolved:t}=this;return t?gi(t.calculatedDuration):0}get time(){return gi(this.currentTime)}set time(t){t=vi(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=gi(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=OW,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(a=>this.tick(a))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const TW=new Set(["opacity","clipPath","filter","transform"]);function u1(e){let t;return()=>(t===void 0&&(t=e()),t)}const CW={linearEasing:void 0};function _W(e,t){const n=u1(e);return()=>{var r;return(r=CW[t])!==null&&r!==void 0?r:n()}}const Kh=_W(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");function zM(e){return!!(typeof e=="function"&&Kh()||!e||typeof e=="string"&&(e in I0||Kh())||s1(e)||Array.isArray(e)&&e.every(zM))}const Hc=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,I0={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Hc([0,.65,.55,1]),circOut:Hc([.55,0,1,.45]),backIn:Hc([.31,.01,.66,-.59]),backOut:Hc([.33,1.53,.69,.99])};function VM(e,t){if(e)return typeof e=="function"&&Kh()?$M(e,t):s1(e)?Hc(e):Array.isArray(e)?e.map(n=>VM(n,t)||I0.easeOut):I0[e]}function kW(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o="loop",ease:s="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const d=VM(s,i);return Array.isArray(d)&&(c.easing=d),e.animate(c,{delay:r,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:a+1,direction:o==="reverse"?"alternate":"normal"})}function gN(e,t){e.timeline=t,e.onfinish=null}const $W=u1(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Gh=10,MW=2e4;function RW(e){return o1(e.type)||e.type==="spring"||!zM(e.ease)}function DW(e,t){const n=new c1({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let a=0;for(;!r.done&&athis.onKeyframesResolved(o,s),n,r,i),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:i=300,times:a,ease:o,type:s,motionValue:l,name:c,startTime:d}=this.options;if(!(!((r=l.owner)===null||r===void 0)&&r.current))return!1;if(typeof o=="string"&&Kh()&&IW(o)&&(o=UM[o]),RW(this.options)){const{onComplete:h,onUpdate:p,motionValue:g,element:m,...y}=this.options,v=DW(t,y);t=v.keyframes,t.length===1&&(t[1]=t[0]),i=v.duration,a=v.times,o=v.ease,s="keyframes"}const f=kW(l.owner.current,c,t,{...this.options,duration:i,times:a,ease:o});return f.startTime=d??this.calcStartTime(),this.pendingTimeline?(gN(f,this.pendingTimeline),this.pendingTimeline=void 0):f.onfinish=()=>{const{onComplete:h}=this.options;l.set(Tm(t,this.options,n)),h&&h(),this.cancel(),this.resolveFinishedPromise()},{animation:f,duration:i,times:a,type:s,ease:o,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return gi(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return gi(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=vi(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Xt;const{animation:r}=n;gN(r,t)}return Xt}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:i,type:a,ease:o,times:s}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:d,onComplete:f,element:h,...p}=this.options,g=new c1({...p,keyframes:r,duration:i,type:a,ease:o,times:s,isGenerator:!0}),m=vi(this.time);c.setWithVelocity(g.sample(m-Gh).value,g.sample(m).value,Gh)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:i,repeatType:a,damping:o,type:s}=t;return $W()&&r&&TW.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!i&&a!=="mirror"&&o!==0&&s!=="inertia"}}const LW=u1(()=>window.ScrollTimeline!==void 0);class FW{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}then(t,n){return Promise.all(this.animations).then(t).catch(n)}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;rLW()&&i.attachTimeline?i.attachTimeline(t):n(i));return()=>{r.forEach((i,a)=>{i&&i(),this.animations[a].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;nn[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function BW({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:a,repeatType:o,repeatDelay:s,from:l,elapsed:c,...d}){return!!Object.keys(d).length}const d1=(e,t,n,r={},i,a)=>o=>{const s=Qw(r,e)||{},l=s.delay||r.delay||0;let{elapsed:c=0}=r;c=c-vi(l);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-c,onUpdate:h=>{t.set(h),s.onUpdate&&s.onUpdate(h)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};BW(s)||(d={...d,...dU(e,d)}),d.duration&&(d.duration=vi(d.duration)),d.repeatDelay&&(d.repeatDelay=vi(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(f=!0)),f&&!a&&t.get()!==void 0){const h=Tm(d.keyframes,s);if(h!==void 0)return De.update(()=>{d.onUpdate(h),d.onComplete()}),new FW([])}return!a&&xN.supports(d)?new xN(d):new c1(d)},zW=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),VW=e=>E0(e)?e[e.length-1]||0:e;function f1(e,t){e.indexOf(t)===-1&&e.push(t)}function h1(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class p1{constructor(){this.subscriptions=[]}add(t){return f1(this.subscriptions,t),()=>h1(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let a=0;a!isNaN(parseFloat(e));class WW{constructor(t,n={}){this.version="11.13.1",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const a=Yr.now();this.updatedAt!==a&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Yr.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=UW(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new p1);const r=this.events[t].add(n);return t==="change"?()=>{r(),De.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Yr.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>bN)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,bN);return MM(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Iu(e,t){return new WW(e,t)}function HW(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Iu(n))}function qW(e,t){const n=Em(e,t);let{transitionEnd:r={},transition:i={},...a}=n||{};a={...a,...r};for(const o in a){const s=VW(a[o]);HW(e,o,s)}}const m1=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),KW="framerAppearId",WM="data-"+m1(KW);function HM(e){return e.props[WM]}const Yt=e=>!!(e&&e.getVelocity);function GW(e){return!!(Yt(e)&&e.add)}function L0(e,t){const n=e.getValue("willChange");if(GW(n))return n.add(t)}function YW({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function qM(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var a;let{transition:o=e.getDefaultTransition(),transitionEnd:s,...l}=t;r&&(o=r);const c=[],d=i&&e.animationState&&e.animationState.getState()[i];for(const f in l){const h=e.getValue(f,(a=e.latestValues[f])!==null&&a!==void 0?a:null),p=l[f];if(p===void 0||d&&YW(d,f))continue;const g={delay:n,...Qw(o||{},f)};let m=!1;if(window.MotionHandoffAnimation){const v=HM(e);if(v){const x=window.MotionHandoffAnimation(v,f,De);x!==null&&(g.startTime=x,m=!0)}}L0(e,f),h.start(d1(f,h,p,e.shouldReduceMotion&&Zo.has(f)?{type:!1}:g,e,m));const y=h.animation;y&&c.push(y)}return s&&Promise.all(c).then(()=>{De.update(()=>{s&&qW(e,s)})}),c}function F0(e,t,n={}){var r;const i=Em(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:a=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(a=n.transitionOverride);const o=i?()=>Promise.all(qM(e,i,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:d=0,staggerChildren:f,staggerDirection:h}=a;return XW(e,t,d+c,f,h,n)}:()=>Promise.resolve(),{when:l}=a;if(l){const[c,d]=l==="beforeChildren"?[o,s]:[s,o];return c().then(()=>d())}else return Promise.all([o(),s(n.delay)])}function XW(e,t,n=0,r=0,i=1,a){const o=[],s=(e.variantChildren.size-1)*r,l=i===1?(c=0)=>c*r:(c=0)=>s-c*r;return Array.from(e.variantChildren).sort(QW).forEach((c,d)=>{c.notify("AnimationStart",t),o.push(F0(c,t,{...a,delay:n+l(d)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(o)}function QW(e,t){return e.sortNodePosition(t)}function ZW(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(a=>F0(e,a,n));r=Promise.all(i)}else if(typeof t=="string")r=F0(e,t,n);else{const i=typeof t=="function"?Em(e,t,n.custom):t;r=Promise.all(qM(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const JW=Xw.length;function KM(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?KM(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;nPromise.all(t.map(({animation:n,options:r})=>ZW(e,n,r)))}function rH(e){let t=nH(e),n=wN(),r=!0;const i=l=>(c,d)=>{var f;const h=Em(e,d,l==="exit"?(f=e.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(h){const{transition:p,transitionEnd:g,...m}=h;c={...c,...m,...g}}return c};function a(l){t=l(e)}function o(l){const{props:c}=e,d=KM(e.parent)||{},f=[],h=new Set;let p={},g=1/0;for(let y=0;yg&&P,A=!1;const E=Array.isArray(b)?b:[b];let T=E.reduce(i(v),{});S===!1&&(T={});const{prevResolvedValues:C={}}=x,D={...C,...T},M=B=>{O=!0,h.has(B)&&(A=!0,h.delete(B)),x.needsAnimating[B]=!0;const k=e.getValue(B);k&&(k.liveStyle=!1)};for(const B in D){const k=T[B],L=C[B];if(p.hasOwnProperty(B))continue;let R=!1;E0(k)&&E0(L)?R=!oM(k,L):R=k!==L,R?k!=null?M(B):h.add(B):k!==void 0&&h.has(B)?M(B):x.protectedKeys[B]=!0}x.prevProp=b,x.prevResolvedValues=T,x.isActive&&(p={...p,...T}),r&&e.blockInitialAnimation&&(O=!1),O&&(!(j&&N)||A)&&f.push(...E.map(B=>({animation:B,options:{type:v}})))}if(h.size){const y={};h.forEach(v=>{const x=e.getBaseTarget(v),b=e.getValue(v);b&&(b.liveStyle=!0),y[v]=x??null}),f.push({animation:y})}let m=!!f.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(f):Promise.resolve()}function s(l,c){var d;if(n[l].isActive===c)return Promise.resolve();(d=e.variantChildren)===null||d===void 0||d.forEach(h=>{var p;return(p=h.animationState)===null||p===void 0?void 0:p.setActive(l,c)}),n[l].isActive=c;const f=o(l);for(const h in n)n[h].protectedKeys={};return f}return{animateChanges:o,setActive:s,setAnimateFunction:a,getState:()=>n,reset:()=>{n=wN(),r=!0}}}function iH(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!oM(t,e):!1}function Za(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function wN(){return{animate:Za(!0),whileInView:Za(),whileHover:Za(),whileTap:Za(),whileDrag:Za(),whileFocus:Za(),exit:Za()}}class Wa{constructor(t){this.isMounted=!1,this.node=t}update(){}}class aH extends Wa{constructor(t){super(t),t.animationState||(t.animationState=rH(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Am(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let oH=0;class sH extends Wa{constructor(){super(...arguments),this.id=oH++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const lH={animation:{Feature:aH},exit:{Feature:sH}};function cH(e,t,n){var r;if(e instanceof Element)return[e];if(typeof e=="string"){let i=document;const a=(r=void 0)!==null&&r!==void 0?r:i.querySelectorAll(e);return a?Array.from(a):[]}return Array.from(e)}const hr={x:!1,y:!1};function GM(){return hr.x||hr.y}function SN(e){return t=>{t.pointerType==="touch"||GM()||e(t)}}function uH(e,t,n={}){const r=new AbortController,i={passive:!0,...n,signal:r.signal},a=SN(o=>{const{target:s}=o,l=t(o);if(!l||!s)return;const c=SN(d=>{l(d),s.removeEventListener("pointerleave",c)});s.addEventListener("pointerleave",c,i)});return cH(e).forEach(o=>{o.addEventListener("pointerenter",a,i)}),()=>r.abort()}function dH(e){return e==="x"||e==="y"?hr[e]?null:(hr[e]=!0,()=>{hr[e]=!1}):hr.x||hr.y?null:(hr.x=hr.y=!0,()=>{hr.x=hr.y=!1})}const YM=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Id(e){return{point:{x:e.pageX,y:e.pageY}}}const fH=e=>t=>YM(t)&&e(t,Id(t));function di(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Oa(e,t,n,r){return di(e,t,fH(n),r)}const jN=(e,t)=>Math.abs(e-t);function hH(e,t){const n=jN(e.x,t.x),r=jN(e.y,t.y);return Math.sqrt(n**2+r**2)}class XM{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:a=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=Sv(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,p=hH(f.offset,{x:0,y:0})>=3;if(!h&&!p)return;const{point:g}=f,{timestamp:m}=Dt;this.history.push({...g,timestamp:m});const{onStart:y,onMove:v}=this.handlers;h||(y&&y(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=wv(h,this.transformPagePoint),De.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:p,onSessionEnd:g,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=Sv(f.type==="pointercancel"?this.lastMoveEventInfo:wv(h,this.transformPagePoint),this.history);this.startEvent&&p&&p(f,y),g&&g(f,y)},!YM(t))return;this.dragSnapToOrigin=a,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const o=Id(t),s=wv(o,this.transformPagePoint),{point:l}=s,{timestamp:c}=Dt;this.history=[{...l,timestamp:c}];const{onSessionStart:d}=n;d&&d(t,Sv(s,this.history)),this.removeListeners=Na(Oa(this.contextWindow,"pointermove",this.handlePointerMove),Oa(this.contextWindow,"pointerup",this.handlePointerUp),Oa(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Da(this.updatePoint)}}function wv(e,t){return t?{point:t(e.point)}:e}function PN(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Sv({point:e},t){return{point:e,delta:PN(e,QM(t)),offset:PN(e,pH(t)),velocity:mH(t,.1)}}function pH(e){return e[0]}function QM(e){return e[e.length-1]}function mH(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=QM(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>vi(t)));)n--;if(!r)return{x:0,y:0};const a=gi(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};const o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Es(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}const ZM=1e-4,yH=1-ZM,vH=1+ZM,JM=.01,gH=0-JM,xH=0+JM;function _n(e){return e.max-e.min}function bH(e,t,n){return Math.abs(e-t)<=n}function NN(e,t,n,r=.5){e.origin=r,e.originPoint=nt(t.min,t.max,e.origin),e.scale=_n(n)/_n(t),e.translate=nt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=yH&&e.scale<=vH||isNaN(e.scale))&&(e.scale=1),(e.translate>=gH&&e.translate<=xH||isNaN(e.translate))&&(e.translate=0)}function au(e,t,n,r){NN(e.x,t.x,n.x,r?r.originX:void 0),NN(e.y,t.y,n.y,r?r.originY:void 0)}function ON(e,t,n){e.min=n.min+t.min,e.max=e.min+_n(t)}function wH(e,t,n){ON(e.x,t.x,n.x),ON(e.y,t.y,n.y)}function AN(e,t,n){e.min=t.min-n.min,e.max=e.min+_n(t)}function ou(e,t,n){AN(e.x,t.x,n.x),AN(e.y,t.y,n.y)}function SH(e,{min:t,max:n},r){return t!==void 0&&en&&(e=r?nt(n,e,r.max):Math.min(e,n)),e}function EN(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function jH(e,{top:t,left:n,bottom:r,right:i}){return{x:EN(e.x,n,i),y:EN(e.y,t,r)}}function TN(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.minr?n=jl(t.min,t.max-r,e.min):r>i&&(n=jl(e.min,e.max-i,t.min)),Ci(0,1,n)}function OH(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const B0=.35;function AH(e=B0){return e===!1?e=0:e===!0&&(e=B0),{x:CN(e,"left","right"),y:CN(e,"top","bottom")}}function CN(e,t,n){return{min:_N(e,t),max:_N(e,n)}}function _N(e,t){return typeof e=="number"?e:e[t]||0}const kN=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ts=()=>({x:kN(),y:kN()}),$N=()=>({min:0,max:0}),ft=()=>({x:$N(),y:$N()});function qn(e){return[e("x"),e("y")]}function eR({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function EH({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function TH(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function jv(e){return e===void 0||e===1}function z0({scale:e,scaleX:t,scaleY:n}){return!jv(e)||!jv(t)||!jv(n)}function no(e){return z0(e)||tR(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function tR(e){return MN(e.x)||MN(e.y)}function MN(e){return e&&e!=="0%"}function Yh(e,t,n){const r=e-n,i=t*r;return n+i}function RN(e,t,n,r,i){return i!==void 0&&(e=Yh(e,i,r)),Yh(e,n,r)+t}function V0(e,t=0,n=1,r,i){e.min=RN(e.min,t,n,r,i),e.max=RN(e.max,t,n,r,i)}function nR(e,{x:t,y:n}){V0(e.x,t.translate,t.scale,t.originPoint),V0(e.y,n.translate,n.scale,n.originPoint)}const DN=.999999999999,IN=1.0000000000001;function CH(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;sDN&&(t.x=1),t.yDN&&(t.y=1)}function Cs(e,t){e.min=e.min+t,e.max=e.max+t}function LN(e,t,n,r,i=.5){const a=nt(e.min,e.max,i);V0(e,t,n,a,r)}function _s(e,t){LN(e.x,t.x,t.scaleX,t.scale,t.originX),LN(e.y,t.y,t.scaleY,t.scale,t.originY)}function rR(e,t){return eR(TH(e.getBoundingClientRect(),t))}function _H(e,t,n){const r=rR(e,n),{scroll:i}=t;return i&&(Cs(r.x,i.offset.x),Cs(r.y,i.offset.y)),r}const iR=({current:e})=>e?e.ownerDocument.defaultView:null,kH=new WeakMap;class $H{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=ft(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=d=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Id(d).point)},a=(d,f)=>{const{drag:h,dragPropagation:p,onDragStart:g}=this.getProps();if(h&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=dH(h),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),qn(y=>{let v=this.getAxisMotionValue(y).get()||0;if(Gr.test(v)){const{projection:x}=this.visualElement;if(x&&x.layout){const b=x.layout.layoutBox[y];b&&(v=_n(b)*(parseFloat(v)/100))}}this.originPoint[y]=v}),g&&De.postRender(()=>g(d,f)),L0(this.visualElement,"transform");const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},o=(d,f)=>{const{dragPropagation:h,dragDirectionLock:p,onDirectionLock:g,onDrag:m}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:y}=f;if(p&&this.currentDirection===null){this.currentDirection=MH(y),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",f.point,y),this.updateAxis("y",f.point,y),this.visualElement.render(),m&&m(d,f)},s=(d,f)=>this.stop(d,f),l=()=>qn(d=>{var f;return this.getAnimationState(d)==="paused"&&((f=this.getAxisMotionValue(d).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new XM(t,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:iR(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:a}=this.getProps();a&&De.postRender(()=>a(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Af(t,i,this.currentDirection))return;const a=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=SH(o,this.constraints[t],this.elastic[t])),a.set(o)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,a=this.constraints;n&&Es(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=jH(i.layoutBox,n):this.constraints=!1,this.elastic=AH(r),a!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&qn(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=OH(i.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Es(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const a=_H(r,i.root,this.visualElement.getTransformPagePoint());let o=PH(i.layout.layoutBox,a);if(n){const s=n(EH(o));this.hasMutatedConstraints=!!s,s&&(o=eR(s))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:a,dragSnapToOrigin:o,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},c=qn(d=>{if(!Af(d,n,this.currentDirection))return;let f=l&&l[d]||{};o&&(f={min:0,max:0});const h=i?200:1e6,p=i?40:1e7,g={type:"inertia",velocity:r?t[d]:0,bounceStiffness:h,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...a,...f};return this.startAxisValueAnimation(d,g)});return Promise.all(c).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return L0(this.visualElement,t),r.start(d1(t,r,0,n,this.visualElement,!1))}stopAnimation(){qn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){qn(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){qn(n=>{const{drag:r}=this.getProps();if(!Af(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,a=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:s}=i.layout.layoutBox[n];a.set(t[n]-nt(o,s,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Es(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};qn(o=>{const s=this.getAxisMotionValue(o);if(s&&this.constraints!==!1){const l=s.get();i[o]=NH({min:l,max:l},this.constraints[o])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),qn(o=>{if(!Af(o,t,null))return;const s=this.getAxisMotionValue(o),{min:l,max:c}=this.constraints[o];s.set(nt(l,c,i[o]))})}addListeners(){if(!this.visualElement.current)return;kH.set(this.visualElement,this);const t=this.visualElement.current,n=Oa(t,"pointerdown",l=>{const{drag:c,dragListener:d=!0}=this.getProps();c&&d&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();Es(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,a=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),De.read(r);const o=di(window,"resize",()=>this.scalePositionWithinConstraints()),s=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(qn(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=l[d].translate,f.set(f.get()+l[d].translate))}),this.visualElement.render())});return()=>{o(),n(),a(),s&&s()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:a=!1,dragElastic:o=B0,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:a,dragElastic:o,dragMomentum:s}}}function Af(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function MH(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class RH extends Wa{constructor(t){super(t),this.removeGroupControls=Xt,this.removeListeners=Xt,this.controls=new $H(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Xt}unmount(){this.removeGroupControls(),this.removeListeners()}}const FN=e=>(t,n)=>{e&&De.postRender(()=>e(t,n))};class DH extends Wa{constructor(){super(...arguments),this.removePointerDownListener=Xt}onPointerDown(t){this.session=new XM(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:iR(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:FN(t),onStart:FN(n),onMove:r,onEnd:(a,o)=>{delete this.session,i&&De.postRender(()=>i(a,o))}}}mount(){this.removePointerDownListener=Oa(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Cm=w.createContext(null);function IH(){const e=w.useContext(Cm);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=w.useId();w.useEffect(()=>r(i),[]);const a=w.useCallback(()=>n&&n(i),[i,n]);return!t&&n?[!1,a]:[!0]}const y1=w.createContext({}),aR=w.createContext({}),uh={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function BN(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Tc={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(ae.test(e))e=parseFloat(e);else return e;const n=BN(e,t.target.x),r=BN(e,t.target.y);return`${n}% ${r}%`}},LH={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Ia.parse(e);if(i.length>5)return r;const a=Ia.createTransformer(e),o=typeof i[0]!="number"?1:0,s=n.x.scale*t.x,l=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=l;const c=nt(s,l,.5);return typeof i[2+o]=="number"&&(i[2+o]/=c),typeof i[3+o]=="number"&&(i[3+o]/=c),a(i)}},Xh={};function FH(e){Object.assign(Xh,e)}const{schedule:v1,cancel:rbe}=sM(queueMicrotask,!1);class BH extends w.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:a}=t;FH(zH),a&&(n.group&&n.group.add(a),r&&r.register&&i&&r.register(a),a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,onExitComplete:()=>this.safeToRemove()})),uh.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:a}=this.props,o=r.projection;return o&&(o.isPresent=a,i||t.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?o.promote():o.relegate()||De.postRender(()=>{const s=o.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),v1.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function oR(e){const[t,n]=IH(),r=w.useContext(y1);return u.jsx(BH,{...e,layoutGroup:r,switchLayoutGroup:w.useContext(aR),isPresent:t,safeToRemove:n})}const zH={borderRadius:{...Tc,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Tc,borderTopRightRadius:Tc,borderBottomLeftRadius:Tc,borderBottomRightRadius:Tc,boxShadow:LH},sR=["TopLeft","TopRight","BottomLeft","BottomRight"],VH=sR.length,zN=e=>typeof e=="string"?parseFloat(e):e,VN=e=>typeof e=="number"||ae.test(e);function UH(e,t,n,r,i,a){i?(e.opacity=nt(0,n.opacity!==void 0?n.opacity:1,WH(r)),e.opacityExit=nt(t.opacity!==void 0?t.opacity:1,0,HH(r))):a&&(e.opacity=nt(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let o=0;ort?1:n(jl(e,t,r))}function WN(e,t){e.min=t.min,e.max=t.max}function Ln(e,t){WN(e.x,t.x),WN(e.y,t.y)}function HN(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function qN(e,t,n,r,i){return e-=t,e=Yh(e,1/n,r),i!==void 0&&(e=Yh(e,1/i,r)),e}function qH(e,t=0,n=1,r=.5,i,a=e,o=e){if(Gr.test(t)&&(t=parseFloat(t),t=nt(o.min,o.max,t/100)-o.min),typeof t!="number")return;let s=nt(a.min,a.max,r);e===a&&(s-=t),e.min=qN(e.min,t,n,s,i),e.max=qN(e.max,t,n,s,i)}function KN(e,t,[n,r,i],a,o){qH(e,t[n],t[r],t[i],t.scale,a,o)}const KH=["x","scaleX","originX"],GH=["y","scaleY","originY"];function GN(e,t,n,r){KN(e.x,t,KH,n?n.x:void 0,r?r.x:void 0),KN(e.y,t,GH,n?n.y:void 0,r?r.y:void 0)}function YN(e){return e.translate===0&&e.scale===1}function cR(e){return YN(e.x)&&YN(e.y)}function XN(e,t){return e.min===t.min&&e.max===t.max}function YH(e,t){return XN(e.x,t.x)&&XN(e.y,t.y)}function QN(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function uR(e,t){return QN(e.x,t.x)&&QN(e.y,t.y)}function ZN(e){return _n(e.x)/_n(e.y)}function JN(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class XH{constructor(){this.members=[]}add(t){f1(this.members,t),t.scheduleRender()}remove(t){if(h1(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const a=this.members[i];if(a.isPresent!==!1){r=a;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function QH(e,t,n){let r="";const i=e.x.translate/t.x,a=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:d,rotateX:f,rotateY:h,skewX:p,skewY:g}=n;c&&(r=`perspective(${c}px) ${r}`),d&&(r+=`rotate(${d}deg) `),f&&(r+=`rotateX(${f}deg) `),h&&(r+=`rotateY(${h}deg) `),p&&(r+=`skewX(${p}deg) `),g&&(r+=`skewY(${g}deg) `)}const s=e.x.scale*t.x,l=e.y.scale*t.y;return(s!==1||l!==1)&&(r+=`scale(${s}, ${l})`),r||"none"}const ZH=(e,t)=>e.depth-t.depth;class JH{constructor(){this.children=[],this.isDirty=!1}add(t){f1(this.children,t),this.isDirty=!0}remove(t){h1(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(ZH),this.isDirty=!1,this.children.forEach(t)}}function dh(e){const t=Yt(e)?e.get():e;return zW(t)?t.toValue():t}function eq(e,t){const n=Yr.now(),r=({timestamp:i})=>{const a=i-n;a>=t&&(Da(r),e(a-t))};return De.read(r,!0),()=>Da(r)}function tq(e){return e instanceof SVGElement&&e.tagName!=="svg"}function nq(e,t,n){const r=Yt(e)?e:Iu(e);return r.start(d1("",r,t,n)),r.animation}const ro={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},qc=typeof window<"u"&&window.MotionDebug!==void 0,Pv=["","X","Y","Z"],rq={visibility:"hidden"},eO=1e3;let iq=0;function Nv(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function dR(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=HM(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",De,!(i||a))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&dR(r)}function fR({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(o={},s=t==null?void 0:t()){this.id=iq++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,qc&&(ro.totalNodes=ro.resolvedTargetDeltas=ro.recalculatedProjection=0),this.nodes.forEach(sq),this.nodes.forEach(fq),this.nodes.forEach(hq),this.nodes.forEach(lq),qc&&window.MotionDebug.record(ro)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let l=0;lthis.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=eq(h,250),uh.hasAnimatedSinceResize&&(uh.hasAnimatedSinceResize=!1,this.nodes.forEach(nO))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&d&&(l||c)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:h,hasRelativeTargetChanged:p,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||d.getDefaultTransition()||gq,{onLayoutAnimationStart:y,onLayoutAnimationComplete:v}=d.getProps(),x=!this.targetLayout||!uR(this.targetLayout,g)||p,b=!h&&p;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||b||h&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,b);const P={...Qw(m,"layout"),onPlay:y,onComplete:v};(d.shouldReduceMotion||this.options.layoutRoot)&&(P.delay=0,P.type=!1),this.startAnimation(P)}else h||nO(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Da(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(pq),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&dR(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{const S=P/1e3;rO(f.x,o.x,S),rO(f.y,o.y,S),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ou(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),yq(this.relativeTarget,this.relativeTargetOrigin,h,S),b&&YH(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=ft()),Ln(b,this.relativeTarget)),m&&(this.animationValues=d,UH(d,c,this.latestValues,S,x,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Da(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=De.update(()=>{uh.hasAnimatedSinceResize=!0,this.currentAnimation=nq(0,eO,{...o,onUpdate:s=>{this.mixTargetDelta(s),o.onUpdate&&o.onUpdate(s)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(eO),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:s,target:l,layout:c,latestValues:d}=o;if(!(!s||!l||!c)){if(this!==o&&this.layout&&c&&hR(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||ft();const f=_n(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+f;const h=_n(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+h}Ln(s,l),_s(s,d),au(this.projectionDeltaWithTransform,this.layoutCorrected,s,d)}}registerSharedNode(o,s){this.sharedNodes.has(o)||this.sharedNodes.set(o,new XH),this.sharedNodes.get(o).add(s);const c=s.options.initialPromotionConfig;s.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(s):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:s}=this.options;return s?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:s}=this.options;return s?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:s,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let s=!1;const{latestValues:l}=o;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(s=!0),!s)return;const c={};l.z&&Nv("z",o,c,this.animationValues);for(let d=0;d{var s;return(s=o.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(tO),this.root.sharedNodes.clear()}}}function aq(e){e.updateLayout()}function oq(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:a}=e.options,o=n.source!==e.layout.source;a==="size"?qn(f=>{const h=o?n.measuredBox[f]:n.layoutBox[f],p=_n(h);h.min=r[f].min,h.max=h.min+p}):hR(a,n.layoutBox,r)&&qn(f=>{const h=o?n.measuredBox[f]:n.layoutBox[f],p=_n(r[f]);h.max=h.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+p)});const s=Ts();au(s,r,n.layoutBox);const l=Ts();o?au(l,e.applyTransform(i,!0),n.measuredBox):au(l,r,n.layoutBox);const c=!cR(s);let d=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:p}=f;if(h&&p){const g=ft();ou(g,n.layoutBox,h.layoutBox);const m=ft();ou(m,r,p.layoutBox),uR(g,m)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=g,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:s,hasLayoutChanged:c,hasRelativeTargetChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function sq(e){qc&&ro.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function lq(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function cq(e){e.clearSnapshot()}function tO(e){e.clearMeasurements()}function uq(e){e.isLayoutDirty=!1}function dq(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function nO(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function fq(e){e.resolveTargetDelta()}function hq(e){e.calcProjection()}function pq(e){e.resetSkewAndRotation()}function mq(e){e.removeLeadSnapshot()}function rO(e,t,n){e.translate=nt(t.translate,0,n),e.scale=nt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function iO(e,t,n,r){e.min=nt(t.min,n.min,r),e.max=nt(t.max,n.max,r)}function yq(e,t,n,r){iO(e.x,t.x,n.x,r),iO(e.y,t.y,n.y,r)}function vq(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const gq={duration:.45,ease:[.4,0,.1,1]},aO=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),oO=aO("applewebkit/")&&!aO("chrome/")?Math.round:Xt;function sO(e){e.min=oO(e.min),e.max=oO(e.max)}function xq(e){sO(e.x),sO(e.y)}function hR(e,t,n){return e==="position"||e==="preserve-aspect"&&!bH(ZN(t),ZN(n),.2)}function bq(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const wq=fR({attachResizeListener:(e,t)=>di(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ov={current:void 0},pR=fR({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ov.current){const e=new wq({});e.mount(window),e.setOptions({layoutScroll:!0}),Ov.current=e}return Ov.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Sq={pan:{Feature:DH},drag:{Feature:RH,ProjectionNode:pR,MeasureLayout:oR}};function lO(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n);const i=r[n?"onHoverStart":"onHoverEnd"];i&&De.postRender(()=>i(t,Id(t)))}class jq extends Wa{mount(){const{current:t,props:n}=this.node;t&&(this.unmount=uH(t,r=>(lO(this.node,r,!0),i=>lO(this.node,i,!1)),{passive:!n.onHoverStart&&!n.onHoverEnd}))}unmount(){}}class Pq extends Wa{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Na(di(this.node.current,"focus",()=>this.onFocus()),di(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const mR=(e,t)=>t?e===t?!0:mR(e,t.parentElement):!1;function Av(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Id(n))}class Nq extends Wa{constructor(){super(...arguments),this.removeStartListeners=Xt,this.removeEndListeners=Xt,this.removeAccessibleListeners=Xt,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),a=Oa(window,"pointerup",(s,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:d,globalTapTarget:f}=this.node.getProps(),h=!f&&!mR(this.node.current,s.target)?d:c;h&&De.update(()=>h(s,l))},{passive:!(r.onTap||r.onPointerUp)}),o=Oa(window,"pointercancel",(s,l)=>this.cancelPress(s,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=Na(a,o),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=a=>{if(a.key!=="Enter"||this.isPressing)return;const o=s=>{s.key!=="Enter"||!this.checkPressEnd()||Av("up",(l,c)=>{const{onTap:d}=this.node.getProps();d&&De.postRender(()=>d(l,c))})};this.removeEndListeners(),this.removeEndListeners=di(this.node.current,"keyup",o),Av("down",(s,l)=>{this.startPress(s,l)})},n=di(this.node.current,"keydown",t),r=()=>{this.isPressing&&Av("cancel",(a,o)=>this.cancelPress(a,o))},i=di(this.node.current,"blur",r);this.removeAccessibleListeners=Na(n,i)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&De.postRender(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!GM()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&De.postRender(()=>r(t,n))}mount(){const t=this.node.getProps(),n=Oa(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=di(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Na(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const U0=new WeakMap,Ev=new WeakMap,Oq=e=>{const t=U0.get(e.target);t&&t(e)},Aq=e=>{e.forEach(Oq)};function Eq({root:e,...t}){const n=e||document;Ev.has(n)||Ev.set(n,{});const r=Ev.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Aq,{root:e,...t})),r[i]}function Tq(e,t,n){const r=Eq(t);return U0.set(e,n),r.observe(e),()=>{U0.delete(e),r.unobserve(e)}}const Cq={some:0,all:1};class _q extends Wa{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:a}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:Cq[i]},s=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,a&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:d,onViewportLeave:f}=this.node.getProps(),h=c?d:f;h&&h(l)};return Tq(this.node.current,o,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(kq(t,n))&&this.startObserver()}unmount(){}}function kq({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const $q={inView:{Feature:_q},tap:{Feature:Nq},focus:{Feature:Pq},hover:{Feature:jq}},Mq={layout:{ProjectionNode:pR,MeasureLayout:oR}},g1=w.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),_m=w.createContext({}),x1=typeof window<"u",yR=x1?w.useLayoutEffect:w.useEffect,vR=w.createContext({strict:!1});function Rq(e,t,n,r,i){var a,o;const{visualElement:s}=w.useContext(_m),l=w.useContext(vR),c=w.useContext(Cm),d=w.useContext(g1).reducedMotion,f=w.useRef();r=r||l.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:s,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:d}));const h=f.current,p=w.useContext(aR);h&&!h.projection&&i&&(h.type==="html"||h.type==="svg")&&Dq(f.current,n,i,p);const g=w.useRef(!1);w.useInsertionEffect(()=>{h&&g.current&&h.update(n,c)});const m=n[WM],y=w.useRef(!!m&&!(!((a=window.MotionHandoffIsComplete)===null||a===void 0)&&a.call(window,m))&&((o=window.MotionHasOptimisedAnimation)===null||o===void 0?void 0:o.call(window,m)));return yR(()=>{h&&(g.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),v1.render(h.render),y.current&&h.animationState&&h.animationState.animateChanges())}),w.useEffect(()=>{h&&(!y.current&&h.animationState&&h.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var v;(v=window.MotionHandoffMarkAsComplete)===null||v===void 0||v.call(window,m)}),y.current=!1))}),h}function Dq(e,t,n,r){const{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:gR(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&Es(s),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function gR(e){if(e)return e.options.allowProjection!==!1?e.projection:gR(e.parent)}function Iq(e,t,n){return w.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Es(n)&&(n.current=r))},[t])}function km(e){return Am(e.animate)||Xw.some(t=>Mu(e[t]))}function xR(e){return!!(km(e)||e.variants)}function Lq(e,t){if(km(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Mu(n)?n:void 0,animate:Mu(r)?r:void 0}}return e.inherit!==!1?t:{}}function Fq(e){const{initial:t,animate:n}=Lq(e,w.useContext(_m));return w.useMemo(()=>({initial:t,animate:n}),[cO(t),cO(n)])}function cO(e){return Array.isArray(e)?e.join(" "):e}const uO={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Pl={};for(const e in uO)Pl[e]={isEnabled:t=>uO[e].some(n=>!!t[n])};function Bq(e){for(const t in e)Pl[t]={...Pl[t],...e[t]}}const zq=Symbol.for("motionComponentSymbol");function Vq({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&Bq(e);function a(s,l){let c;const d={...w.useContext(g1),...s,layoutId:Uq(s)},{isStatic:f}=d,h=Fq(s),p=r(s,f);if(!f&&x1){Wq();const g=Hq(d);c=g.MeasureLayout,h.visualElement=Rq(i,p,d,t,g.ProjectionNode)}return u.jsxs(_m.Provider,{value:h,children:[c&&h.visualElement?u.jsx(c,{visualElement:h.visualElement,...d}):null,n(i,s,Iq(p,h.visualElement,l),p,f,h.visualElement)]})}const o=w.forwardRef(a);return o[zq]=i,o}function Uq({layoutId:e}){const t=w.useContext(y1).id;return t&&e!==void 0?t+"-"+e:e}function Wq(e,t){w.useContext(vR).strict}function Hq(e){const{drag:t,layout:n}=Pl;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const qq=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function b1(e){return typeof e!="string"||e.includes("-")?!1:!!(qq.indexOf(e)>-1||/[A-Z]/u.test(e))}function bR(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const a in n)e.style.setProperty(a,n[a])}const wR=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function SR(e,t,n,r){bR(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(wR.has(i)?i:m1(i),t.attrs[i])}function jR(e,{layout:t,layoutId:n}){return Zo.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Xh[e]||e==="opacity")}function w1(e,t,n){var r;const{style:i}=e,a={};for(const o in i)(Yt(i[o])||t.style&&Yt(t.style[o])||jR(o,e)||((r=n==null?void 0:n.getValue(o))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(a[o]=i[o]);return a}function PR(e,t,n){const r=w1(e,t,n);for(const i in e)if(Yt(e[i])||Yt(t[i])){const a=Md.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[a]=e[i]}return r}function S1(e){const t=w.useRef(null);return t.current===null&&(t.current=e()),t.current}function Kq({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,a){const o={latestValues:Gq(r,i,a,e),renderState:t()};return n&&(o.mount=s=>n(r,s,o)),o}const NR=e=>(t,n)=>{const r=w.useContext(_m),i=w.useContext(Cm),a=()=>Kq(e,t,r,i);return n?a():S1(a)};function Gq(e,t,n,r){const i={},a=r(e,{});for(const h in a)i[h]=dh(a[h]);let{initial:o,animate:s}=e;const l=km(e),c=xR(e);t&&c&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let d=n?n.initial===!1:!1;d=d||o===!1;const f=d?s:o;if(f&&typeof f!="boolean"&&!Am(f)){const h=Array.isArray(f)?f:[f];for(let p=0;p({style:{},transform:{},transformOrigin:{},vars:{}}),OR=()=>({...j1(),attrs:{}}),AR=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Yq={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Xq=Md.length;function Qq(e,t,n){let r="",i=!0;for(let a=0;atypeof e=="string"&&e.toLowerCase()==="svg",n9={useVisualState:NR({scrapeMotionValuesFromProps:PR,createRenderState:OR,onMount:(e,t,{renderState:n,latestValues:r})=>{De.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),De.render(()=>{N1(n,r,O1(t.tagName),e.transformTemplate),SR(t,n)})}})},r9={useVisualState:NR({scrapeMotionValuesFromProps:w1,createRenderState:j1})};function ER(e,t,n){for(const r in t)!Yt(t[r])&&!jR(r,n)&&(e[r]=t[r])}function i9({transformTemplate:e},t){return w.useMemo(()=>{const n=j1();return P1(n,t,e),Object.assign({},n.vars,n.style)},[t])}function a9(e,t){const n=e.style||{},r={};return ER(r,n,e),Object.assign(r,i9(e,t)),r}function o9(e,t){const n={},r=a9(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const s9=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Qh(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||s9.has(e)}let TR=e=>!Qh(e);function l9(e){e&&(TR=t=>t.startsWith("on")?!Qh(t):e(t))}try{l9(require("@emotion/is-prop-valid").default)}catch{}function c9(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(TR(i)||n===!0&&Qh(i)||!t&&!Qh(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function u9(e,t,n,r){const i=w.useMemo(()=>{const a=OR();return N1(a,t,O1(r),e.transformTemplate),{...a.attrs,style:{...a.style}}},[t]);if(e.style){const a={};ER(a,e.style,e),i.style={...a,...i.style}}return i}function d9(e=!1){return(n,r,i,{latestValues:a},o)=>{const l=(b1(n)?u9:o9)(r,a,o,n),c=c9(r,typeof n=="string",e),d=n!==w.Fragment?{...c,...l,ref:i}:{},{children:f}=r,h=w.useMemo(()=>Yt(f)?f.get():f,[f]);return w.createElement(n,{...d,children:h})}}function f9(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const o={...b1(r)?n9:r9,preloadedFeatures:e,useRender:d9(i),createVisualElement:t,Component:r};return Vq(o)}}const Zh={current:null},A1={current:!1};function CR(){if(A1.current=!0,!!x1)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Zh.current=e.matches;e.addListener(t),t()}else Zh.current=!1}function h9(e,t,n){for(const r in t){const i=t[r],a=n[r];if(Yt(i))e.addValue(r,i);else if(Yt(a))e.addValue(r,Iu(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=e.getStaticValue(r);e.addValue(r,Iu(o!==void 0?o:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const fO=new WeakMap,p9=[...SM,Wt,Ia],m9=e=>p9.find(wM(e)),hO=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class y9{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=t1,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const h=Yr.now();this.renderScheduledAtthis.bindToMotionValue(r,n)),A1.current||CR(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Zh.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){fO.delete(this.current),this.projection&&this.projection.unmount(),Da(this.notifyUpdate),Da(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Zo.has(t),i=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&De.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),a=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),a(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Pl){const n=Pl[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const a=this.features[t];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ft()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;rn.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Iu(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(vM(i)||yM(i))?i=parseFloat(i):!m9(i)&&Ia.test(n)&&(i=CM(t,n)),this.setBaseTarget(t,Yt(i)?i.get():i)),Yt(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let i;if(typeof r=="string"||typeof r=="object"){const o=Gw(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);o&&(i=o[t])}if(r&&i!==void 0)return i;const a=this.getBaseTargetFromProps(this.props,t);return a!==void 0&&!Yt(a)?a:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new p1),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class _R extends y9{constructor(){super(...arguments),this.KeyframeResolver=_M}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Yt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function v9(e){return window.getComputedStyle(e)}class g9 extends _R{constructor(){super(...arguments),this.type="html",this.renderInstance=bR}readValueFromInstance(t,n){if(Zo.has(n)){const r=a1(n);return r&&r.default||0}else{const r=v9(t),i=(xM(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return rR(t,n)}build(t,n,r){P1(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return w1(t,n,r)}}class x9 extends _R{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ft}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Zo.has(n)){const r=a1(n);return r&&r.default||0}return n=wR.has(n)?n:m1(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return PR(t,n,r)}build(t,n,r){N1(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){SR(t,n,r,i)}mount(t){this.isSVGTag=O1(t.tagName),super.mount(t)}}const b9=(e,t)=>b1(e)?new x9(t):new g9(t,{allowProjection:e!==w.Fragment}),w9=f9({...lH,...$q,...Sq,...Mq},b9),Y=oU(w9);class S9 extends w.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function j9({children:e,isPresent:t}){const n=w.useId(),r=w.useRef(null),i=w.useRef({width:0,height:0,top:0,left:0}),{nonce:a}=w.useContext(g1);return w.useInsertionEffect(()=>{const{width:o,height:s,top:l,left:c}=i.current;if(t||!r.current||!o||!s)return;r.current.dataset.motionPopId=n;const d=document.createElement("style");return a&&(d.nonce=a),document.head.appendChild(d),d.sheet&&d.sheet.insertRule(` - [data-motion-pop-id="${n}"] { - position: absolute !important; - width: ${o}px !important; - height: ${s}px !important; - top: ${l}px !important; - left: ${c}px !important; - } - `),()=>{document.head.removeChild(d)}},[t]),u.jsx(S9,{isPresent:t,childRef:r,sizeRef:i,children:w.cloneElement(e,{ref:r})})}const P9=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o})=>{const s=S1(N9),l=w.useId(),c=w.useCallback(f=>{s.set(f,!0);for(const h of s.values())if(!h)return;r&&r()},[s,r]),d=w.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:c,register:f=>(s.set(f,!1),()=>s.delete(f))}),a?[Math.random(),c]:[n,c]);return w.useMemo(()=>{s.forEach((f,h)=>s.set(h,!1))},[n]),w.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),o==="popLayout"&&(e=u.jsx(j9,{isPresent:n,children:e})),u.jsx(Cm.Provider,{value:d,children:e})};function N9(){return new Map}const Ef=e=>e.key||"";function pO(e){const t=[];return w.Children.forEach(e,n=>{w.isValidElement(n)&&t.push(n)}),t}const O9=({children:e,exitBeforeEnter:t,custom:n,initial:r=!0,onExitComplete:i,presenceAffectsLayout:a=!0,mode:o="sync"})=>{const s=w.useMemo(()=>pO(e),[e]),l=s.map(Ef),c=w.useRef(!0),d=w.useRef(s),f=S1(()=>new Map),[h,p]=w.useState(s),[g,m]=w.useState(s);yR(()=>{c.current=!1,d.current=s;for(let x=0;x{const b=Ef(x),P=s===g||l.includes(b),S=()=>{if(f.has(b))f.set(b,!0);else return;let j=!0;f.forEach(N=>{N||(j=!1)}),j&&(v==null||v(),m(d.current),i&&i())};return u.jsx(P9,{isPresent:P,initial:!c.current||r?void 0:!1,custom:P?void 0:n,presenceAffectsLayout:a,mode:o,onExitComplete:P?void 0:S,children:x},b)})})};function Jo(){!A1.current&&CR();const[e]=w.useState(Zh.current);return e}const A9=bm("whitespace-nowrap inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 hover-elevate ",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow-xs",secondary:"border-transparent bg-secondary text-secondary-foreground",destructive:"border-transparent bg-destructive text-destructive-foreground shadow-xs",outline:" border [border-color:var(--badge-outline)] shadow-xs"}},defaultVariants:{variant:"default"}});function Fe({className:e,variant:t,...n}){return u.jsx("div",{className:de(A9({variant:t}),e),...n})}var kR="AlertDialog",[E9,abe]=Xo(kR,[L$]),Di=L$(),$R=e=>{const{__scopeAlertDialog:t,...n}=e,r=Di(t);return u.jsx(eM,{...r,...n,modal:!0})};$R.displayName=kR;var T9="AlertDialogTrigger",C9=w.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Di(n);return u.jsx(tM,{...i,...r,ref:t})});C9.displayName=T9;var _9="AlertDialogPortal",MR=e=>{const{__scopeAlertDialog:t,...n}=e,r=Di(t);return u.jsx(nM,{...r,...n})};MR.displayName=_9;var k9="AlertDialogOverlay",RR=w.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Di(n);return u.jsx(Uw,{...i,...r,ref:t})});RR.displayName=k9;var qs="AlertDialogContent",[$9,M9]=E9(qs),R9=uk("AlertDialogContent"),DR=w.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...i}=e,a=Di(n),o=w.useRef(null),s=_t(t,o),l=w.useRef(null);return u.jsx(J8,{contentName:qs,titleName:IR,docsSlug:"alert-dialog",children:u.jsx($9,{scope:n,cancelRef:l,children:u.jsxs(Ww,{role:"alertdialog",...a,...i,ref:s,onOpenAutoFocus:Be(i.onOpenAutoFocus,c=>{var d;c.preventDefault(),(d=l.current)==null||d.focus({preventScroll:!0})}),onPointerDownOutside:c=>c.preventDefault(),onInteractOutside:c=>c.preventDefault(),children:[u.jsx(R9,{children:r}),u.jsx(I9,{contentRef:o})]})})})});DR.displayName=qs;var IR="AlertDialogTitle",LR=w.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Di(n);return u.jsx(Hw,{...i,...r,ref:t})});LR.displayName=IR;var FR="AlertDialogDescription",BR=w.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Di(n);return u.jsx(qw,{...i,...r,ref:t})});BR.displayName=FR;var D9="AlertDialogAction",zR=w.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Di(n);return u.jsx(Kw,{...i,...r,ref:t})});zR.displayName=D9;var VR="AlertDialogCancel",UR=w.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=M9(VR,n),a=Di(n),o=_t(t,i);return u.jsx(Kw,{...a,...r,ref:o})});UR.displayName=VR;var I9=({contentRef:e})=>{const t=`\`${qs}\` requires a description for the component to be accessible for screen reader users. - -You can add a description to the \`${qs}\` by passing a \`${FR}\` component as a child, which also benefits sighted users by adding visible context to the dialog. - -Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${qs}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component. - -For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return w.useEffect(()=>{var r;document.getElementById((r=e.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},L9=$R,F9=MR,WR=RR,HR=DR,qR=zR,KR=UR,GR=LR,YR=BR;const B9=L9,z9=F9,XR=w.forwardRef(({className:e,...t},n)=>u.jsx(WR,{className:de("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",e),...t,ref:n}));XR.displayName=WR.displayName;const QR=w.forwardRef(({className:e,...t},n)=>u.jsxs(z9,{children:[u.jsx(XR,{}),u.jsx(HR,{ref:n,className:de("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",e),...t})]}));QR.displayName=HR.displayName;const ZR=({className:e,...t})=>u.jsx("div",{className:de("flex flex-col space-y-2 text-center sm:text-left",e),...t});ZR.displayName="AlertDialogHeader";const JR=({className:e,...t})=>u.jsx("div",{className:de("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});JR.displayName="AlertDialogFooter";const eD=w.forwardRef(({className:e,...t},n)=>u.jsx(GR,{ref:n,className:de("text-lg font-semibold",e),...t}));eD.displayName=GR.displayName;const tD=w.forwardRef(({className:e,...t},n)=>u.jsx(YR,{ref:n,className:de("text-sm text-muted-foreground",e),...t}));tD.displayName=YR.displayName;const nD=w.forwardRef(({className:e,...t},n)=>u.jsx(qR,{ref:n,className:de(Lw(),e),...t}));nD.displayName=qR.displayName;const V9=w.forwardRef(({className:e,...t},n)=>u.jsx(KR,{ref:n,className:de(Lw({variant:"outline"}),"mt-2 sm:mt-0",e),...t}));V9.displayName=KR.displayName;function W0({open:e,onOpenChange:t,context:n,title:r,message:i}){const a=i||(n?`Please log in to ${n}.`:"Please log in to proceed."),o=r||"Login required";return u.jsx(B9,{open:e,onOpenChange:t,children:u.jsxs(QR,{children:[u.jsxs(ZR,{children:[u.jsx(eD,{children:o}),u.jsx(tD,{children:a})]}),u.jsx(JR,{children:u.jsx(nD,{children:"OK"})})]})})}const Tv="zerodha:callback",U9=5*60*1e3;function H0({layout:e="desktop",open:t,onOpenChange:n}){const r=w.useMemo(()=>e==="mobile"?"w-full justify-center shimmer":"px-4 rounded-xl shimmer",[e]),[i,a]=w.useState(!1),o=t!==void 0,s=o?t:i,l=E=>{o||a(E),n==null||n(E)},[c,d]=w.useState(!1),[f,h]=w.useState(""),[p,g]=w.useState(""),[m,y]=w.useState([]),{data:v}=vt({queryKey:["/api/me"],queryFn:yi({on401:"returnNull"})}),{data:x,refetch:b}=vt({queryKey:["/api/broker/status"],queryFn:yi({on401:"returnNull"}),staleTime:0,refetchOnMount:"always"}),P=Oo({mutationFn:async()=>{if(!f.trim())throw new Error("API key is required");if(!p.trim())throw new Error("API secret is required");const E=`${window.location.origin}/login`;return(await Ze("POST","/api/broker/zerodha/login",{apiKey:f,apiSecret:p,redirectUrl:E})).json()},onSuccess:({loginUrl:E})=>{window.open(E,"_blank","noopener,noreferrer"),yt({title:"Continue in Zerodha",description:"Log in and return here. We will connect your broker automatically."})},onError:E=>yt({title:"Could not start Zerodha login",description:(E==null?void 0:E.message)||"Try again."})}),S=Oo({mutationFn:async()=>(await Ze("GET","/api/zerodha/holdings")).json(),onSuccess:E=>{y((E==null?void 0:E.holdings)||[]),yt({title:"Holdings fetched",description:"Latest positions pulled from Zerodha."})},onError:E=>yt({title:"Could not fetch holdings",description:(E==null?void 0:E.message)||"Check your Zerodha session and try again."})}),j=Oo({mutationFn:async()=>(await Ze("POST","/api/broker/disconnect")).json(),onSuccess:()=>{b(),yt({title:"Broker disconnected",description:"Your broker has been unlinked."})},onError:E=>yt({title:"Disconnect failed",description:(E==null?void 0:E.message)||"Try again."})}),N=!!(x!=null&&x.connected),O=x!=null&&x.connected_at?new Date(x.connected_at):null,A=()=>{if(!v){d(!0);return}l(!0)};return w.useEffect(()=>{const E=C=>{const D=C||localStorage.getItem(Tv);if(D){localStorage.removeItem(Tv);try{const M=JSON.parse(D);if(M.ts&&Date.now()-M.ts>U9)return;M.status==="success"?(b(),yt({title:"Zerodha connected",description:"Your broker connection has been completed."}),l(!1)):M.status==="error"&&yt({title:"Zerodha login failed",description:M.message||"Please retry the login."})}catch{return}}};E();const T=C=>{C.key!==Tv||!C.newValue||E(C.newValue)};return window.addEventListener("storage",T),()=>window.removeEventListener("storage",T)},[b]),u.jsxs(u.Fragment,{children:[u.jsxs(wl,{open:s,onOpenChange:l,children:[u.jsxs(ue,{variant:"secondary",className:r,onClick:A,children:[u.jsx(w0,{className:"h-4 w-4"}),N?"Broker connected":"Connect broker"]}),u.jsx(Fo,{className:"sm:max-w-2xl border-border/70 bg-gradient-to-br from-background via-background to-muted/30",children:u.jsxs(Y.div,{className:"space-y-4",initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{duration:.6,ease:"easeOut"},children:[u.jsxs(Bo,{className:"space-y-2",children:[u.jsx(zo,{children:"Connect your broker"}),u.jsx(Vo,{children:"Link your brokerage to pull positions and keep your dashboard in sync."})]}),u.jsxs("div",{className:"space-y-4 rounded-xl border border-border/70 bg-card/70 p-4",children:[u.jsxs("div",{className:"flex flex-col gap-3 rounded-lg border border-border/60 bg-gradient-to-r from-primary/10 via-background to-background px-3 py-3",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("div",{className:"rounded-full bg-primary/15 p-2 text-primary",children:u.jsx(w0,{className:"h-4 w-4"})}),u.jsxs("div",{className:"text-sm leading-tight",children:[u.jsx("p",{className:"font-medium",children:"Secure brokerage linking"}),u.jsx("p",{className:"text-muted-foreground",children:"Start in Zerodha and we will complete the connection automatically."})]}),u.jsx(Fe,{variant:N?"secondary":"outline",className:"ml-auto",children:N?"Connected":"Not connected"})]}),N&&u.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[u.jsx(Vs,{className:"h-4 w-4 text-primary"}),u.jsxs("span",{children:[x!=null&&x.userName?`Linked as ${x.userName}`:`Linked to ${(x==null?void 0:x.broker)||"broker"}`," ","-"," ",O?O.toLocaleString():"just now"]})]})]}),u.jsxs(Y.div,{className:"space-y-3 rounded-lg border border-border/60 bg-background/60 p-4 shadow-sm",whileHover:{y:-6,boxShadow:"0 20px 40px rgba(0,0,0,0.18)"},transition:{type:"spring",stiffness:300,damping:24},children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx("p",{className:"text-sm font-semibold",children:"Zerodha"}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Provide your Kite API key & secret to launch the login and connect your account."})]}),u.jsx(Fe,{variant:"secondary",children:"Live"})]}),u.jsxs("div",{className:"grid gap-3 md:grid-cols-2",children:[u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Tt,{htmlFor:"zerodha-api-key",children:"API key"}),u.jsx(xt,{id:"zerodha-api-key",placeholder:"Enter Zerodha API key",value:f,onChange:E=>h(E.target.value)})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx(Tt,{htmlFor:"zerodha-api-secret",children:"API secret"}),u.jsx(xt,{id:"zerodha-api-secret",placeholder:"Enter Zerodha API secret",type:"password",value:p,onChange:E=>g(E.target.value)})]})]}),u.jsxs("div",{className:"flex flex-wrap gap-2",children:[u.jsxs(ue,{variant:"outline",onClick:()=>P.mutate(),disabled:P.isPending,children:[u.jsx(Pw,{className:"h-4 w-4"}),P.isPending?"Opening Zerodha...":"Open Zerodha login"]}),N?u.jsxs(ue,{variant:"secondary",onClick:()=>S.mutate(),disabled:S.isPending,children:[u.jsx(Lk,{className:"h-4 w-4"}),S.isPending?"Fetching...":"Fetch holdings"]}):null,N?u.jsx(ue,{variant:"outline",onClick:()=>j.mutate(),disabled:j.isPending,children:j.isPending?"Disconnecting...":"Disconnect broker"}):null]}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"After you log in with your Zerodha account, we will connect automatically. Keep this tab open until the login completes."})]}),u.jsxs("div",{className:"space-y-2 rounded-lg border border-dashed border-border/50 p-4 text-sm text-muted-foreground",children:[u.jsx("p",{className:"font-medium text-foreground",children:"Other brokers"}),u.jsxs("div",{className:"flex flex-wrap gap-2",children:[u.jsx(Fe,{variant:"outline",children:"Groww (coming soon)"}),u.jsx(Fe,{variant:"outline",children:"Angel One (coming soon)"}),u.jsx(Fe,{variant:"outline",children:"ICICI Direct (coming soon)"}),u.jsx(Fe,{variant:"outline",children:"HDFC Securities (coming soon)"})]})]}),N&&u.jsxs("div",{className:"space-y-2 rounded-lg border border-border/60 bg-background/80 p-4",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Vs,{className:"h-4 w-4 text-primary"}),u.jsx("p",{className:"text-sm font-semibold",children:"Latest holdings"})]}),m.length===0?u.jsx("p",{className:"text-xs text-muted-foreground",children:"No holdings pulled yet. Click “Fetch holdings” after connecting."}):u.jsx("div",{className:"grid gap-2",children:m.map((E,T)=>u.jsxs("div",{className:"flex items-center justify-between rounded-md border border-border/50 bg-card/40 px-3 py-2 text-sm",children:[u.jsxs("div",{children:[u.jsx("p",{className:"font-medium",children:E.tradingsymbol||E.symbol||"Instrument"}),u.jsxs("p",{className:"text-xs text-muted-foreground",children:["Qty: ",E.quantity??E.qty??"-"," | Avg:"," ",E.average_price??E.avg_price??"-"]})]}),u.jsx(Fe,{variant:"secondary",children:E.exchange||E.exchange_type||"N/A"})]},`${E.tradingsymbol||E.instrument_token||T}`))})]})]})]})})]}),u.jsx(W0,{open:c,onOpenChange:d,context:"connect your broker"})]})}function Tr(){const[e,t]=w.useState(!1),[n,r]=w.useState(!1),[i,a]=w.useState(null),o=w.useRef(null),s=w.useMemo(()=>["philosophy","strategies","how-it-works"],[]),[l,c]=Cd(),d=_d(),{data:f}=vt({queryKey:["/api/me"],queryFn:yi({on401:"returnNull"})}),h=Oo({mutationFn:async()=>{await Ze("POST","/api/logout")},onSuccess:()=>{d.setQueryData(["/api/me"],null),d.removeQueries({queryKey:["/api/broker/status"]}),window.location.assign("/")}});w.useEffect(()=>{const x=()=>t(window.scrollY>20);return window.addEventListener("scroll",x,{passive:!0}),()=>window.removeEventListener("scroll",x)},[]);const p=x=>{if(!x){window.scrollTo({top:0,behavior:"smooth"});return}const b=document.getElementById(x);if(b)try{b.scrollIntoView({behavior:"smooth",block:"start"})}catch{window.scrollTo({top:b.offsetTop-80,behavior:"smooth"})}},g=w.useMemo(()=>[{label:"Philosophy",href:"#philosophy"},{label:"Portfolio",href:"/portfolio",newTab:!0},{label:"Strategies",href:"#strategies"},{label:"How It Works",href:"#how-it-works"}],[]),m=x=>{const b=x.startsWith("#")?x.slice(1):"";if(x.startsWith("/")&&!x.startsWith("#")){c(x);return}l==="/"?p(b):(o.current=b,c("/"))};w.useEffect(()=>{if(l!=="/")return;const x=o.current||window.location.hash.replace("#","");if(!x)return;const b=P=>{if(document.getElementById(x)){p(x),o.current=null;return}P>10||requestAnimationFrame(()=>b(P+1))};b(0)},[l]),w.useEffect(()=>{if(l!=="/"){a(null);return}if(window.matchMedia("(prefers-reduced-motion: reduce)").matches){a(null);return}const x=new IntersectionObserver(b=>{b.forEach(P=>{P.isIntersecting&&a(P.target.id)})},{threshold:.4});return s.forEach(b=>{const P=document.getElementById(b);P&&x.observe(P)}),()=>x.disconnect()},[l,s]);const y=x=>x.startsWith("#")?l==="/"&&i===x.slice(1):l===x||l.startsWith(`${x}/`),v=({link:x})=>u.jsxs("button",{onClick:()=>m(x.href),className:`group relative text-sm font-medium transition-colors duration-300 ${y(x.href)?"text-foreground":"text-muted-foreground hover:text-foreground"}`,"data-testid":`link-nav-${x.label.toLowerCase().replace(/\s/g,"-")}`,children:[x.label,u.jsx("span",{className:`pointer-events-none absolute -bottom-1 left-0 h-[2px] w-full origin-left scale-x-0 bg-primary transition-transform duration-300 ${y(x.href)?"scale-x-100":"group-hover:scale-x-100"}`})]});return u.jsx("nav",{"data-testid":"navigation",className:`fixed top-0 left-0 right-0 z-50 transition-all duration-500 ${e?"bg-background/80 backdrop-blur-xl border-b border-border":"bg-transparent"}`,children:u.jsxs("div",{className:"max-w-6xl mx-auto px-6 py-4",children:[u.jsxs("div",{className:"flex items-center justify-between gap-4",children:[u.jsx("button",{onClick:()=>m("#"),className:"text-xl font-bold tracking-tight text-foreground","data-testid":"link-logo",children:"QuantFortune"}),u.jsx("div",{className:"hidden md:flex items-center gap-8",children:g.map(x=>u.jsx(v,{link:x},x.label))}),u.jsx("div",{className:"hidden md:flex items-center gap-3",children:f?u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"flex items-center gap-2 rounded-full border border-primary/40 bg-primary/10 px-3 py-1 text-sm font-medium text-primary",children:[u.jsx("span",{className:"h-2 w-2 rounded-full bg-primary"}),f.username]}),u.jsx(ue,{variant:"outline",size:"sm",onClick:()=>h.mutate(),disabled:h.isPending,children:h.isPending?"Logging out...":"Log out"}),u.jsx(H0,{})]}):u.jsx(nN,{})}),u.jsx(ue,{variant:"ghost",size:"icon",className:"md:hidden",onClick:()=>r(!n),"data-testid":"button-mobile-menu",children:n?u.jsx(Aw,{className:"h-5 w-5"}):u.jsx(LB,{className:"h-5 w-5"})})]}),n&&u.jsx("div",{className:"md:hidden mt-4 pb-4 border-t border-border pt-4",children:u.jsxs("div",{className:"flex flex-col gap-4",children:[g.map(x=>u.jsx(v,{link:x},x.label)),u.jsx("div",{className:"pt-2 border-t border-border",children:u.jsx("div",{className:"flex flex-col gap-3",children:f?u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"flex items-center gap-2 rounded-xl border border-primary/40 bg-primary/10 px-3 py-2 text-sm font-medium text-primary",children:[u.jsx("span",{className:"h-2 w-2 rounded-full bg-primary"}),f.username]}),u.jsx(ue,{variant:"outline",onClick:()=>{h.mutate(),r(!1)},disabled:h.isPending,children:h.isPending?"Logging out...":"Log out"}),u.jsx(H0,{layout:"mobile"})]}):u.jsx(nN,{layout:"mobile"})})})]})})]})})}const W9="/assets/abstract_finance_visualization_video-B8_d38Ab.mp4";function H9({onExploreStrategies:e}){const t=w.useRef(null),[n,r]=w.useState({x:0,y:0}),[i,a]=w.useState(!1),[o,s]=w.useState(0),[,l]=Cd();w.useEffect(()=>{a(!0)},[]),w.useEffect(()=>{const h=()=>{s(window.scrollY)};return window.addEventListener("scroll",h,{passive:!0}),()=>window.removeEventListener("scroll",h)},[]),w.useEffect(()=>{const h=g=>{if(!t.current)return;const m=t.current.getBoundingClientRect(),y=(g.clientX-m.left-m.width/2)/m.width,v=(g.clientY-m.top-m.height/2)/m.height;r({x:y*30,y:v*30})},p=t.current;return p==null||p.addEventListener("mousemove",h),()=>p==null?void 0:p.removeEventListener("mousemove",h)},[]);const c=o*.5,d=1+o*3e-4,f=Math.max(.4-o*5e-4,.15);return u.jsxs("section",{ref:t,className:"relative min-h-screen flex items-center justify-center overflow-hidden","data-testid":"section-hero",style:{perspective:"1000px"},children:[u.jsxs("div",{className:"absolute inset-0 z-0",style:{transform:`translateY(${c}px) scale(${d})`,transformOrigin:"center center"},children:[u.jsx("video",{autoPlay:!0,loop:!0,muted:!0,playsInline:!0,className:`absolute inset-0 w-full h-full object-cover transition-opacity duration-1000 ${i?"opacity-100":"opacity-0"}`,style:{opacity:f,filter:"blur(1px) saturate(0.8)"},children:u.jsx("source",{src:W9,type:"video/mp4"})}),u.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-background/70 via-background/50 to-background"})]}),u.jsxs("div",{className:"absolute inset-0 transition-transform duration-300 ease-out z-10",style:{transform:`translate3d(${n.x*.3}px, ${n.y*.3}px, 0) rotateX(${n.y*.02}deg) rotateY(${-n.x*.02}deg)`,transformStyle:"preserve-3d"},children:[u.jsx("div",{className:`absolute top-1/4 left-1/4 w-96 h-96 bg-primary/20 rounded-full blur-3xl transition-all duration-1000 ${i?"opacity-100 scale-100":"opacity-0 scale-50"}`,style:{transform:"translateZ(50px)"}}),u.jsx("div",{className:`absolute bottom-1/3 right-1/4 w-80 h-80 bg-chart-2/20 rounded-full blur-3xl transition-all duration-1000 delay-200 ${i?"opacity-100 scale-100":"opacity-0 scale-50"}`,style:{transform:"translateZ(30px)"}}),u.jsx("div",{className:`absolute top-1/2 right-1/3 w-64 h-64 bg-chart-3/15 rounded-full blur-3xl transition-all duration-1000 delay-500 ${i?"opacity-100 scale-100":"opacity-0 scale-50"}`,style:{transform:"translateZ(70px)"}})]}),u.jsx("div",{className:"absolute inset-0 overflow-hidden z-10",children:[...Array(25)].map((h,p)=>u.jsx("div",{className:`absolute rounded-full transition-all duration-700 ${i?"opacity-60":"opacity-0"}`,style:{width:`${3+p%4*2}px`,height:`${3+p%4*2}px`,left:`${5+p*3.8}%`,top:`${15+Math.sin(p*.7)*35}%`,background:p%3===0?"hsl(var(--primary))":p%3===1?"hsl(var(--chart-2))":"hsl(var(--chart-3))",transform:`translate3d(${n.x*(.5+p*.08)}px, ${n.y*(.5+p*.08)}px, ${p*5}px)`,transitionDelay:`${p*30}ms`,animation:`float-3d ${4+p%4}s ease-in-out infinite`,animationDelay:`${p*.15}s`}},p))}),u.jsxs("div",{className:"absolute inset-0 z-10 pointer-events-none",style:{transform:`translate3d(${n.x*.1}px, ${n.y*.1}px, 0)`},children:[u.jsx("div",{className:`absolute top-20 left-[15%] w-20 h-20 transition-all duration-1000 ${i?"opacity-100 rotate-12":"opacity-0 rotate-0"}`,style:{transform:`rotate(${12+n.x*.3}deg) translateZ(100px)`,animation:"float-rotate 8s ease-in-out infinite"},"aria-hidden":"true",children:u.jsx($P,{className:"w-full h-full text-primary/25 drop-shadow-sm",strokeWidth:1.25})}),u.jsx("div",{className:`absolute bottom-32 right-[20%] w-16 h-16 transition-all duration-1000 delay-300 ${i?"opacity-100":"opacity-0"}`,style:{transform:"translateZ(80px)",animation:"pulse-float 6s ease-in-out infinite"},"aria-hidden":"true",children:u.jsx(MB,{className:"w-full h-full text-chart-2/25 drop-shadow-sm",strokeWidth:1.25})}),u.jsx("div",{className:`absolute top-1/3 right-[10%] w-12 h-12 transition-all duration-1000 delay-500 ${i?"opacity-100 rotate-45":"opacity-0 rotate-0"}`,style:{transform:`rotate(${45+n.y*.5}deg) translateZ(60px)`,animation:"float-rotate-reverse 10s ease-in-out infinite"},"aria-hidden":"true",children:u.jsx($P,{className:"w-full h-full text-chart-3/25 drop-shadow-sm",strokeWidth:1.25})})]}),u.jsxs("div",{className:"relative z-20 max-w-4xl mx-auto px-6 text-center",style:{transform:`translate3d(${n.x*.15}px, ${n.y*.15}px, 100px)`,transformStyle:"preserve-3d"},children:[u.jsx("div",{className:`transition-all duration-1000 delay-300 ${i?"opacity-100 translate-y-0":"opacity-0 translate-y-8"}`,children:u.jsxs("h1",{className:"text-5xl md:text-7xl font-bold tracking-tight mb-6 leading-tight","data-testid":"text-hero-headline",style:{transform:"translateZ(20px)"},children:[u.jsx("span",{className:"inline-block animate-fade-in-up",style:{animationDelay:"0.4s"},children:"Invest with"}),u.jsx("br",{}),u.jsx("span",{className:"text-primary inline-block animate-fade-in-up bg-clip-text",style:{animationDelay:"0.6s",textShadow:"0 0 60px hsl(var(--primary) / 0.3)"},children:"Clarity"})]})}),u.jsx("p",{className:`text-xl md:text-2xl text-muted-foreground max-w-2xl mx-auto mb-12 leading-relaxed transition-all duration-1000 delay-700 ${i?"opacity-100 translate-y-0":"opacity-0 translate-y-8"}`,"data-testid":"text-hero-subheadline",style:{transform:"translateZ(10px)"},children:"Simple, disciplined strategies for long-term wealth building. No noise. Just steady growth."}),u.jsxs("div",{className:`flex flex-col sm:flex-row items-center justify-center gap-4 transition-all duration-1000 delay-1000 ${i?"opacity-100 translate-y-0":"opacity-0 translate-y-8"}`,style:{transform:"translateZ(30px)"},children:[u.jsxs(ue,{size:"lg",className:"rounded-xl px-8 py-6 text-lg group relative overflow-hidden shadow-lg shadow-primary/20","data-testid":"button-explore-strategies",onClick:e,children:[u.jsxs("span",{className:"relative z-10 flex items-center",children:["Explore Strategies",u.jsx(jw,{className:"ml-2 h-5 w-5 transition-transform group-hover:translate-x-1"})]}),u.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-primary to-chart-1 opacity-0 group-hover:opacity-100 transition-opacity duration-500"})]}),u.jsx(ue,{variant:"ghost",size:"lg",className:"rounded-xl px-8 py-6 text-lg text-muted-foreground backdrop-blur-sm","data-testid":"button-learn-more",onClick:()=>l("/learn-more"),children:"Learn More"})]})]}),u.jsx("div",{className:`absolute bottom-8 left-1/2 -translate-x-1/2 z-20 transition-all duration-1000 delay-1500 ${i?"opacity-100 translate-y-0":"opacity-0 translate-y-4"}`,children:u.jsx("div",{className:"w-6 h-10 border-2 border-muted-foreground/30 rounded-full flex justify-center pt-2 backdrop-blur-sm",children:u.jsx("div",{className:"w-1.5 h-3 bg-muted-foreground/50 rounded-full animate-bounce"})})}),u.jsx("style",{children:` - @keyframes float-3d { - 0%, 100% { transform: translateY(0px) translateZ(0px); } - 50% { transform: translateY(-15px) translateZ(10px); } - } - @keyframes fade-in-up { - from { opacity: 0; transform: translateY(20px) translateZ(0); } - to { opacity: 1; transform: translateY(0) translateZ(20px); } - } - @keyframes float-rotate { - 0%, 100% { transform: rotate(12deg) translateY(0) translateZ(100px); } - 50% { transform: rotate(18deg) translateY(-20px) translateZ(120px); } - } - @keyframes float-rotate-reverse { - 0%, 100% { transform: rotate(45deg) translateY(0) translateZ(60px); } - 50% { transform: rotate(35deg) translateY(-15px) translateZ(80px); } - } - @keyframes pulse-float { - 0%, 100% { transform: scale(1) translateY(0) translateZ(80px); opacity: 0.6; } - 50% { transform: scale(1.1) translateY(-10px) translateZ(100px); opacity: 0.8; } - } - .animate-fade-in-up { - animation: fade-in-up 0.8s ease-out forwards; - opacity: 0; - } - `})]})}const q9=["Simplicity beats complexity.","Discipline over timing.","Growth compounds quietly.","Patience is the strategy."];function K9(){const e=w.useRef(null),[t,n]=w.useState([]),[r,i]=w.useState(0);return w.useEffect(()=>{var s;const a=new IntersectionObserver(l=>{l.forEach(c=>{const d=parseInt(c.target.getAttribute("data-index")||"0");c.isIntersecting&&(n(f=>f.includes(d)?f:[...f,d]),i(d))})},{threshold:.5,rootMargin:"-10% 0px"}),o=(s=e.current)==null?void 0:s.querySelectorAll("[data-index]");return o==null||o.forEach(l=>a.observe(l)),()=>a.disconnect()},[]),u.jsxs("section",{ref:e,id:"philosophy",className:"py-32 px-6 relative overflow-hidden","data-testid":"section-philosophy",children:[u.jsx("div",{className:"absolute inset-0 pointer-events-none",children:u.jsx("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 w-1 h-32 bg-gradient-to-b from-transparent via-primary/50 to-transparent transition-all duration-700",style:{top:`${25+r*15}%`}})}),u.jsxs("div",{className:"max-w-4xl mx-auto",children:[u.jsx("p",{className:"text-sm uppercase tracking-widest text-muted-foreground mb-12 text-center",children:"Our Philosophy"}),u.jsx("div",{className:"space-y-12",children:q9.map((a,o)=>u.jsxs("div",{"data-index":o,className:`transition-all duration-1000 ease-out relative ${t.includes(o)?"opacity-100 translate-y-0":"opacity-0 translate-y-12"}`,style:{transitionDelay:`${o*150}ms`},children:[u.jsx("div",{className:`absolute -left-8 top-1/2 -translate-y-1/2 w-2 h-2 rounded-full transition-all duration-500 ${r===o?"bg-primary scale-100":"bg-muted-foreground/30 scale-75"}`}),u.jsx("p",{className:`text-3xl md:text-5xl font-semibold text-center leading-tight transition-all duration-500 ${r===o?"text-foreground":"text-muted-foreground/60"}`,"data-testid":`text-philosophy-${o}`,children:a.split("").map((s,l)=>u.jsx("span",{className:`inline-block transition-all duration-300 ${t.includes(o)?"opacity-100 translate-y-0":"opacity-0 translate-y-2"}`,style:{transitionDelay:`${o*150+l*15}ms`},children:s===" "?" ":s},l))})]},o))})]})]})}function mO({title:e,description:t,returnRange:n,riskLevel:r,icon:i,isVisible:a=!0,delay:o=0,clickable:s=!0,comingSoon:l=!1}){const c=w.useRef(null),[d,f]=w.useState({rotateX:0,rotateY:0,scale:1}),h=m=>{if(!c.current)return;const y=c.current.getBoundingClientRect(),v=(m.clientX-y.left)/y.width-.5,x=(m.clientY-y.top)/y.height-.5;f({rotateX:x*-8,rotateY:v*8,scale:1.02})},p=()=>{f({rotateX:0,rotateY:0,scale:1})},g={Low:"bg-chart-2/20 text-chart-2",Medium:"bg-chart-5/20 text-chart-5",Moderate:"bg-chart-1/20 text-chart-1"};return u.jsx("div",{ref:c,className:`transition-all duration-700 ease-out ${a?"opacity-100 translate-y-0 scale-100":"opacity-0 translate-y-12 scale-95"}`,style:{transitionDelay:`${o}ms`,perspective:"1000px"},onMouseMove:h,onMouseLeave:p,children:u.jsxs($d,{className:`p-8 ${s?"cursor-pointer":"cursor-default"} group relative overflow-visible border-card-border bg-card/50 backdrop-blur-sm transition-shadow duration-300 hover:shadow-xl hover:shadow-primary/5`,style:{transform:`perspective(1000px) rotateX(${d.rotateX}deg) rotateY(${d.rotateY}deg) scale(${d.scale})`,transition:"transform 0.15s ease-out"},"data-testid":`card-strategy-${e.toLowerCase().replace(/\s/g,"-")}`,children:[u.jsxs("div",{className:"flex items-start justify-between gap-4 mb-6",children:[u.jsx("div",{className:"w-12 h-12 rounded-xl bg-primary/10 flex items-center justify-center text-primary",children:i}),l?u.jsx(Fe,{variant:"outline",className:"border-dashed text-muted-foreground",children:"Coming Soon"}):u.jsx(Pw,{className:"w-5 h-5 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity duration-300"})]}),u.jsx("h3",{className:"text-xl font-semibold mb-2","data-testid":`text-strategy-title-${e.toLowerCase().replace(/\s/g,"-")}`,children:e}),u.jsx("p",{className:"text-muted-foreground mb-6 leading-relaxed",children:t}),u.jsxs("div",{className:"flex items-center justify-between gap-4 flex-wrap",children:[u.jsxs("div",{children:[u.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"Expected Returns"}),u.jsx("p",{className:"text-lg font-semibold text-chart-2",children:n})]}),u.jsxs(Fe,{variant:"secondary",className:`${g[r]} border-0`,children:[r," Risk"]})]})]})})}const E1="/strategies/golden-nifty",G9=[{title:"Golden Nifty",description:"A balanced approach combining Nifty 50 index with tactical gold allocation for stability.",returnRange:"12-15% p.a.",riskLevel:"Low",icon:u.jsx(Ow,{className:"w-6 h-6"}),href:E1},{title:"Bluechip Growth",description:"Focused on large-cap leaders with proven track records and consistent dividend yields.",returnRange:"13-18% p.a.",riskLevel:"Medium",icon:u.jsx(Nw,{className:"w-6 h-6"}),comingSoon:!0},{title:"Flexi Momentum",description:"Dynamic allocation across market caps based on momentum signals and sector strength.",returnRange:"14-18% p.a.",riskLevel:"Moderate",icon:u.jsx(Lh,{className:"w-6 h-6"}),comingSoon:!0}];function Y9(){const e=w.useRef(null),[t,n]=w.useState(!1),[r,i]=w.useState(null),a={hidden:{},show:{transition:{staggerChildren:.12}}},o={hidden:{opacity:0,y:14},show:{opacity:1,y:0}};return w.useEffect(()=>{const s=new IntersectionObserver(([l])=>{l.isIntersecting&&n(!0)},{threshold:.2});return e.current&&s.observe(e.current),()=>s.disconnect()},[]),u.jsxs("section",{ref:e,id:"strategies",className:"py-32 px-6 relative overflow-hidden","data-testid":"section-strategies",children:[u.jsx("div",{className:`absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[600px] h-[600px] bg-primary/5 rounded-full blur-3xl transition-all duration-1000 ${t?"opacity-100 scale-100":"opacity-0 scale-50"}`}),u.jsxs("div",{className:"max-w-6xl mx-auto relative",children:[u.jsxs("div",{className:"text-center mb-16",children:[u.jsx("p",{className:`text-sm uppercase tracking-widest text-muted-foreground mb-4 transition-all duration-700 ${t?"opacity-100 translate-y-0":"opacity-0 translate-y-4"}`,children:"Strategies"}),u.jsx("h2",{className:`text-4xl md:text-5xl font-bold mb-4 transition-all duration-700 delay-100 ${t?"opacity-100 translate-y-0":"opacity-0 translate-y-4"}`,"data-testid":"text-strategies-headline",children:"Choose Your Path"}),u.jsx("p",{className:`text-xl text-muted-foreground max-w-2xl mx-auto transition-all duration-700 delay-200 ${t?"opacity-100 translate-y-0":"opacity-0 translate-y-4"}`,children:"Proven approaches designed for steady, long-term growth."})]}),u.jsx(Y.div,{className:"grid md:grid-cols-3 gap-6",variants:a,initial:"hidden",animate:t?"show":"hidden",children:G9.map((s,l)=>u.jsx(Y.div,{variants:o,onMouseEnter:()=>i(l),onMouseLeave:()=>i(null),className:`transition-all duration-500 ${r!==null&&r!==l?"opacity-60 scale-[0.98]":"opacity-100 scale-100"}`,whileHover:{y:-6,boxShadow:"0 20px 40px rgba(0,0,0,0.18)"},transition:{type:"spring",stiffness:300,damping:24},children:s.href?u.jsx("a",{href:s.href,target:"_blank",rel:"noreferrer",className:"block",children:u.jsx(mO,{...s,isVisible:t,delay:300+l*150,clickable:!0})}):u.jsx(mO,{...s,isVisible:t,delay:300+l*150,clickable:!1})},s.title))}),u.jsx("p",{className:"text-center text-sm text-muted-foreground mt-8",children:"Detailed playbook is live for Golden Nifty. More strategies are coming soon."})]})]})}function X9(){const e=w.useRef(null),[t,n]=w.useState(!1),[r,i]=w.useState(0),[a,o]=w.useState(null);w.useEffect(()=>{const j=new IntersectionObserver(([N])=>{N.isIntersecting&&!t&&n(!0)},{threshold:.4});return e.current&&j.observe(e.current),()=>j.disconnect()},[t]),w.useEffect(()=>{if(t){const j=setTimeout(()=>i(1),300),N=setTimeout(()=>i(2),1800),O=setTimeout(()=>i(3),3e3);return()=>{clearTimeout(j),clearTimeout(N),clearTimeout(O)}}},[t]);const s=600,l=340,c={left:70,right:30,top:30,bottom:50},d=s-c.left-c.right,f=l-c.top-c.bottom,h=[{year:0,invested:0,portfolio:0},{year:1,invested:1200,portfolio:1290},{year:2,invested:2400,portfolio:2760},{year:3,invested:3600,portfolio:4440},{year:4,invested:4800,portfolio:6370},{year:5,invested:6e3,portfolio:8590},{year:6,invested:7200,portfolio:11150},{year:7,invested:8400,portfolio:14110},{year:8,invested:9600,portfolio:17540},{year:9,invested:10800,portfolio:21520},{year:10,invested:12e3,portfolio:26140}],p=28e3,g=0,m=j=>c.left+j/10*d,y=j=>c.top+f-(j-g)/(p-g)*f,v=h.map((j,N)=>`${N===0?"M":"L"} ${m(j.year)} ${y(j.invested)}`).join(" "),x=h.map((j,N)=>`${N===0?"M":"L"} ${m(j.year)} ${y(j.portfolio)}`).join(" "),b=`${x} L ${m(10)} ${y(0)} L ${m(0)} ${y(0)} Z`,P=[0,5e3,1e4,15e3,2e4,25e3],S=j=>j>=1e3?`₹${(j/1e3).toFixed(j>=1e4?0:1)}K`:`₹${j}`;return u.jsxs("section",{ref:e,className:"py-32 px-6 bg-card/30 relative overflow-hidden","data-testid":"section-performance",children:[u.jsx("div",{className:`absolute top-0 right-0 w-96 h-96 bg-chart-2/5 rounded-full blur-3xl transition-all duration-1000 ${t?"opacity-100 translate-x-0":"opacity-0 translate-x-20"}`}),u.jsxs("div",{className:"max-w-4xl mx-auto relative",children:[u.jsxs("div",{className:"text-center mb-16",children:[u.jsx("p",{className:`text-sm uppercase tracking-widest text-muted-foreground mb-4 transition-all duration-700 ${t?"opacity-100 translate-y-0":"opacity-0 translate-y-4"}`,children:"The Power of Compounding"}),u.jsx("h2",{className:`text-4xl md:text-5xl font-bold mb-4 transition-all duration-700 delay-100 ${t?"opacity-100 translate-y-0":"opacity-0 translate-y-4"}`,"data-testid":"text-performance-headline",children:"Watch Your Wealth Grow"}),u.jsx("p",{className:`text-xl text-muted-foreground transition-all duration-700 delay-200 ${t?"opacity-100 translate-y-0":"opacity-0 translate-y-4"}`,children:"₹100/month SIP over 10 years at 14% XIRR"})]}),u.jsxs("div",{className:`relative bg-card rounded-2xl p-8 border border-card-border transition-all duration-700 delay-300 ${t?"opacity-100 translate-y-0":"opacity-0 translate-y-8"}`,children:[u.jsxs("svg",{viewBox:`0 0 ${s} ${l}`,className:"w-full h-auto",preserveAspectRatio:"xMidYMid meet",children:[u.jsxs("defs",{children:[u.jsxs("linearGradient",{id:"investedGradient",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[u.jsx("stop",{offset:"0%",stopColor:"hsl(var(--muted-foreground))",stopOpacity:"0.4"}),u.jsx("stop",{offset:"100%",stopColor:"hsl(var(--muted-foreground))",stopOpacity:"0.8"})]}),u.jsxs("linearGradient",{id:"portfolioGradient",x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[u.jsx("stop",{offset:"0%",stopColor:"hsl(var(--chart-2))"}),u.jsx("stop",{offset:"100%",stopColor:"hsl(var(--chart-1))"})]}),u.jsxs("linearGradient",{id:"areaGradient",x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[u.jsx("stop",{offset:"0%",stopColor:"hsl(var(--chart-2))",stopOpacity:"0.3"}),u.jsx("stop",{offset:"100%",stopColor:"hsl(var(--chart-2))",stopOpacity:"0"})]}),u.jsxs("filter",{id:"glow",children:[u.jsx("feGaussianBlur",{stdDeviation:"3",result:"coloredBlur"}),u.jsxs("feMerge",{children:[u.jsx("feMergeNode",{in:"coloredBlur"}),u.jsx("feMergeNode",{in:"SourceGraphic"})]})]})]}),P.map((j,N)=>u.jsxs("g",{children:[u.jsx("line",{x1:c.left,y1:y(j),x2:s-c.right,y2:y(j),stroke:"hsl(var(--border))",strokeWidth:"1",strokeDasharray:"4 4",className:"transition-opacity duration-500",style:{opacity:t?.3:0,transitionDelay:`${N*100}ms`}}),u.jsx("text",{x:c.left-10,y:y(j)+4,fill:"hsl(var(--muted-foreground))",fontSize:"11",textAnchor:"end",className:"font-sans",style:{opacity:t?1:0,transition:`opacity 0.5s ease ${N*100}ms`},children:S(j)})]},j)),u.jsx("line",{x1:c.left,y1:l-c.bottom,x2:s-c.right,y2:l-c.bottom,stroke:"hsl(var(--border))",strokeWidth:"1"}),[0,2,4,6,8,10].map(j=>u.jsx("text",{x:m(j),y:l-c.bottom+25,fill:"hsl(var(--muted-foreground))",fontSize:"11",textAnchor:"middle",className:"font-sans",children:j===0?"Start":`Year ${j}`},j)),r>=2&&u.jsx("path",{d:b,fill:"url(#areaGradient)",className:"transition-opacity duration-1000",style:{opacity:r>=3?1:0}}),u.jsx("path",{d:v,fill:"none",stroke:"url(#investedGradient)",strokeWidth:"3",strokeLinecap:"round",strokeDasharray:"600",strokeDashoffset:r>=1?0:600,style:{transition:"stroke-dashoffset 1.5s ease-out"}}),u.jsx("path",{d:x,fill:"none",stroke:"url(#portfolioGradient)",strokeWidth:"3",strokeLinecap:"round",strokeDasharray:"600",strokeDashoffset:r>=2?0:600,style:{transition:"stroke-dashoffset 1.5s ease-out"},filter:r>=3?"url(#glow)":"none"}),r>=1&&h.slice(1).map((j,N)=>u.jsx("circle",{cx:m(j.year),cy:y(j.invested),r:"4",fill:"hsl(var(--background))",stroke:"hsl(var(--muted-foreground))",strokeWidth:"2",className:"cursor-pointer transition-all duration-300",style:{opacity:r>=1?1:0,transform:`scale(${r>=1?1:0})`,transformOrigin:`${m(j.year)}px ${y(j.invested)}px`,transition:`all 0.3s ease-out ${N*.1}s`},onMouseEnter:()=>o({x:m(j.year),y:y(j.invested),label:"Invested",value:`₹${j.invested.toLocaleString("en-IN")}`}),onMouseLeave:()=>o(null)},`inv-${N}`)),r>=2&&h.slice(1).map((j,N)=>u.jsx("circle",{cx:m(j.year),cy:y(j.portfolio),r:"5",fill:"hsl(var(--chart-2))",className:"cursor-pointer",style:{opacity:r>=2?1:0,transform:`scale(${r>=2?1:0})`,transformOrigin:`${m(j.year)}px ${y(j.portfolio)}px`,transition:`all 0.3s ease-out ${N*.1}s`},onMouseEnter:()=>o({x:m(j.year),y:y(j.portfolio),label:"Portfolio",value:`₹${j.portfolio.toLocaleString("en-IN")}`}),onMouseLeave:()=>o(null)},`port-${N}`)),a&&u.jsxs("g",{children:[u.jsx("rect",{x:a.x-55,y:a.y-40,width:"110",height:"30",rx:"6",fill:"hsl(var(--popover))",stroke:"hsl(var(--border))"}),u.jsxs("text",{x:a.x,y:a.y-20,textAnchor:"middle",fill:"hsl(var(--foreground))",fontSize:"12",fontWeight:"500",className:"font-sans",children:[a.label,": ",a.value]})]}),r>=3&&u.jsxs("g",{children:[u.jsx("rect",{x:m(10)-45,y:y(26140)-35,width:"90",height:"28",rx:"6",fill:"hsl(var(--chart-2))",fillOpacity:"0.15",stroke:"hsl(var(--chart-2))",strokeOpacity:"0.3"}),u.jsx("text",{x:m(10),y:y(26140)-16,textAnchor:"middle",fill:"hsl(var(--chart-2))",fontSize:"13",fontWeight:"bold",className:"font-sans animate-pulse",children:"+118% gains"})]})]}),u.jsxs("div",{className:"flex items-center justify-center gap-8 mt-8 flex-wrap",children:[u.jsxs("div",{className:`flex items-center gap-3 transition-all duration-500 ${r>=1?"opacity-100 translate-x-0":"opacity-0 -translate-x-4"}`,children:[u.jsx("div",{className:"w-4 h-1 rounded-full bg-muted-foreground/70"}),u.jsx("span",{className:"text-sm text-muted-foreground",children:"Total Invested: ₹12,000"})]}),u.jsxs("div",{className:`flex items-center gap-3 transition-all duration-500 delay-500 ${r>=2?"opacity-100 translate-x-0":"opacity-0 translate-x-4"}`,children:[u.jsx("div",{className:"w-4 h-1 rounded-full bg-chart-2"}),u.jsx("span",{className:"text-sm text-muted-foreground",children:"Portfolio Value: ₹26,140"})]})]}),u.jsx("p",{className:`text-center text-xs text-muted-foreground/60 mt-6 transition-all duration-500 delay-700 ${r>=3?"opacity-100":"opacity-0"}`,children:"Based on 14% XIRR average returns. Past performance does not guarantee future results."})]})]})]})}const Cv=[{icon:u.jsx(zB,{className:"w-6 h-6"}),title:"Choose Strategy",description:"Select a strategy that aligns with your goals and risk appetite."},{icon:u.jsx(RB,{className:"w-6 h-6"}),title:"Link Your Broker",description:"Connect your existing brokerage account securely."},{icon:u.jsx(FB,{className:"w-6 h-6"}),title:"Auto-Invest",description:"Set up automatic monthly investments with a single click."},{icon:u.jsx(_B,{className:"w-6 h-6"}),title:"Track Growth",description:"Watch your portfolio grow steadily over time."}];function Q9(){const e=w.useRef(null),[t,n]=w.useState([]),[r,i]=w.useState(0);return w.useEffect(()=>{var s;const a=new IntersectionObserver(l=>{l.forEach(c=>{const d=parseInt(c.target.getAttribute("data-step")||"0");c.isIntersecting&&n(f=>f.includes(d)?f:[...f,d])})},{threshold:.5}),o=(s=e.current)==null?void 0:s.querySelectorAll("[data-step]");return o==null||o.forEach(l=>a.observe(l)),()=>a.disconnect()},[]),w.useEffect(()=>{if(t.length>0){const a=setInterval(()=>{i(o=>(o+1)%Cv.length)},3e3);return()=>clearInterval(a)}},[t]),u.jsxs("section",{ref:e,id:"how-it-works",className:"py-32 px-6 relative overflow-hidden","data-testid":"section-how-it-works",children:[u.jsxs("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-[800px] h-[800px] opacity-30",children:[u.jsx("div",{className:"absolute inset-0 rounded-full border border-primary/20",style:{animation:"pulse-ring 4s ease-out infinite"}}),u.jsx("div",{className:"absolute inset-8 rounded-full border border-primary/15",style:{animation:"pulse-ring 4s ease-out infinite 1s"}}),u.jsx("div",{className:"absolute inset-16 rounded-full border border-primary/10",style:{animation:"pulse-ring 4s ease-out infinite 2s"}})]}),u.jsxs("div",{className:"max-w-4xl mx-auto relative",children:[u.jsxs("div",{className:"text-center mb-16",children:[u.jsx("p",{className:"text-sm uppercase tracking-widest text-muted-foreground mb-4",children:"How It Works"}),u.jsx("h2",{className:"text-4xl md:text-5xl font-bold mb-4","data-testid":"text-how-it-works-headline",children:"Four Simple Steps"}),u.jsx("p",{className:"text-xl text-muted-foreground",children:"Start your investment journey in minutes."})]}),u.jsx("div",{className:"grid md:grid-cols-2 gap-8",children:Cv.map((a,o)=>u.jsxs("div",{"data-step":o,className:`flex gap-5 transition-all duration-700 ease-out group cursor-pointer ${t.includes(o)?"opacity-100 translate-y-0":"opacity-0 translate-y-8"}`,style:{transitionDelay:`${o*150}ms`},onMouseEnter:()=>i(o),children:[u.jsx("div",{className:`flex-shrink-0 w-14 h-14 rounded-xl flex items-center justify-center transition-all duration-500 ${r===o?"bg-primary text-primary-foreground scale-110 shadow-lg shadow-primary/25":"bg-primary/10 text-primary"}`,children:u.jsx("div",{className:`transition-transform duration-500 ${r===o?"scale-110":""}`,children:a.icon})}),u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[u.jsxs("span",{className:`text-sm font-medium transition-colors duration-300 ${r===o?"text-primary":"text-muted-foreground"}`,children:["0",o+1]}),u.jsx("h3",{className:`text-lg font-semibold transition-colors duration-300 ${r===o?"text-foreground":"text-foreground/80"}`,"data-testid":`text-step-title-${o}`,children:a.title})]}),u.jsx("p",{className:"text-muted-foreground leading-relaxed",children:a.description}),u.jsx("div",{className:`h-0.5 bg-primary mt-4 transition-all duration-500 origin-left ${r===o?"scale-x-100 opacity-100":"scale-x-0 opacity-0"}`})]})]},a.title))}),u.jsx("div",{className:"flex justify-center gap-2 mt-12",children:Cv.map((a,o)=>u.jsx("button",{onClick:()=>i(o),className:`w-2 h-2 rounded-full transition-all duration-300 ${r===o?"bg-primary w-8":"bg-muted-foreground/30 hover:bg-muted-foreground/50"}`,"data-testid":`button-step-indicator-${o}`},o))})]}),u.jsx("style",{children:` - @keyframes pulse-ring { - 0% { transform: scale(0.8); opacity: 1; } - 100% { transform: scale(1.2); opacity: 0; } - } - `})]})}const Z9=[{name:"Zerodha",initials:"Z"},{name:"Groww",initials:"G"},{name:"Upstox",initials:"U"},{name:"Angel One",initials:"A"},{name:"ICICI Direct",initials:"I"},{name:"HDFC Securities",initials:"H"}],J9=[{icon:u.jsx(Nw,{className:"w-5 h-5"}),text:"SEBI Registered"},{icon:u.jsx(IB,{className:"w-5 h-5"}),text:"Bank-grade Security"},{icon:u.jsx($B,{className:"w-5 h-5"}),text:"Audited Annually"}];function e7(){const e=w.useRef(null),[t,n]=w.useState(!1),[r,i]=w.useState(null);return w.useEffect(()=>{const a=new IntersectionObserver(([o])=>{o.isIntersecting&&n(!0)},{threshold:.3});return e.current&&a.observe(e.current),()=>a.disconnect()},[]),u.jsxs("section",{ref:e,className:"py-32 px-6 bg-card/30 relative overflow-hidden","data-testid":"section-trust",children:[u.jsxs("div",{className:"absolute inset-0 pointer-events-none",children:[u.jsx("div",{className:`absolute -left-32 top-1/2 -translate-y-1/2 w-64 h-64 bg-chart-2/5 rounded-full blur-3xl transition-all duration-1000 ${t?"opacity-100 translate-x-0":"opacity-0 -translate-x-20"}`}),u.jsx("div",{className:`absolute -right-32 top-1/3 w-64 h-64 bg-primary/5 rounded-full blur-3xl transition-all duration-1000 delay-300 ${t?"opacity-100 translate-x-0":"opacity-0 translate-x-20"}`})]}),u.jsxs("div",{className:"max-w-4xl mx-auto relative",children:[u.jsxs("div",{className:"text-center mb-16",children:[u.jsx("p",{className:`text-sm uppercase tracking-widest text-muted-foreground mb-4 transition-all duration-700 ${t?"opacity-100 translate-y-0":"opacity-0 translate-y-4"}`,children:"Your Money, Your Control"}),u.jsx("h2",{className:`text-4xl md:text-5xl font-bold mb-4 transition-all duration-700 delay-100 ${t?"opacity-100 translate-y-0":"opacity-0 translate-y-4"}`,"data-testid":"text-trust-headline",children:"We Never Hold Your Money"}),u.jsx("p",{className:`text-xl text-muted-foreground max-w-2xl mx-auto transition-all duration-700 delay-200 ${t?"opacity-100 translate-y-0":"opacity-0 translate-y-4"}`,children:"Your investments stay with your broker. We only provide the strategy."})]}),u.jsx("div",{className:"flex items-center justify-center gap-3 mb-12 flex-wrap",children:J9.map((a,o)=>u.jsxs("div",{className:`flex items-center gap-2 px-4 py-2 rounded-full bg-card border border-card-border transition-all duration-500 group cursor-default ${t?"opacity-100 translate-y-0":"opacity-0 translate-y-4"}`,style:{transitionDelay:`${300+o*100}ms`},children:[u.jsx("span",{className:"text-primary transition-transform duration-300 group-hover:scale-110",children:a.icon}),u.jsx("span",{className:"text-sm font-medium",children:a.text})]},a.text))}),u.jsx("div",{className:"text-center mb-8",children:u.jsx("p",{className:`text-sm text-muted-foreground uppercase tracking-wide transition-all duration-500 delay-500 ${t?"opacity-100":"opacity-0"}`,children:"Trusted Partner Brokers"})}),u.jsx("div",{className:"flex items-center justify-center gap-6 flex-wrap",children:Z9.map((a,o)=>u.jsxs("div",{className:`relative transition-all duration-500 ${t?"opacity-100 scale-100":"opacity-0 scale-90"}`,style:{transitionDelay:`${600+o*80}ms`},onMouseEnter:()=>i(o),onMouseLeave:()=>i(null),children:[u.jsx("div",{className:`w-16 h-16 rounded-xl bg-card border border-card-border flex items-center justify-center transition-all duration-300 cursor-pointer ${r===o?"bg-primary/10 border-primary/30 scale-110 shadow-lg shadow-primary/10":""}`,title:a.name,"data-testid":`logo-broker-${a.name.toLowerCase().replace(/\s/g,"-")}`,children:u.jsx("span",{className:`text-xl font-bold transition-colors duration-300 ${r===o?"text-primary":"text-muted-foreground"}`,children:a.initials})}),u.jsx("div",{className:`absolute -bottom-8 left-1/2 -translate-x-1/2 text-xs text-muted-foreground whitespace-nowrap transition-all duration-300 ${r===o?"opacity-100 translate-y-0":"opacity-0 -translate-y-2"}`,children:a.name})]},a.name))})]})]})}function t7({onExploreStrategies:e}){const t=w.useRef(null),[n,r]=w.useState(!1),[i,a]=w.useState({x:0,y:0});w.useEffect(()=>{const s=new IntersectionObserver(([l])=>{l.isIntersecting&&r(!0)},{threshold:.4});return t.current&&s.observe(t.current),()=>s.disconnect()},[]);const o=s=>{if(!t.current)return;const l=t.current.getBoundingClientRect(),c=(s.clientX-l.left-l.width/2)/l.width,d=(s.clientY-l.top-l.height/2)/l.height;a({x:c*30,y:d*30})};return u.jsxs("section",{ref:t,className:"py-32 px-6 relative overflow-hidden","data-testid":"section-final-cta",onMouseMove:o,children:[u.jsx("div",{className:`absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[500px] h-[500px] transition-all duration-1000 ${n?"opacity-100 scale-100":"opacity-0 scale-50"}`,style:{transform:`translate(calc(-50% + ${i.x}px), calc(-50% + ${i.y}px))`},children:u.jsx("div",{className:"absolute inset-0 bg-primary/10 rounded-full blur-3xl animate-pulse"})}),u.jsx("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[...Array(8)].map((s,l)=>u.jsx("div",{className:`absolute w-2 h-2 rounded-full transition-all duration-1000 ${n?"opacity-40":"opacity-0"}`,style:{left:`${15+l*10}%`,top:`${30+Math.sin(l*.8)*20}%`,background:l%2===0?"hsl(var(--primary))":"hsl(var(--chart-2))",transitionDelay:`${l*100}ms`,animation:n?`float-particle ${3+l*.5}s ease-in-out ${l*.3}s infinite`:"none"}},l))}),u.jsxs("div",{className:`max-w-3xl mx-auto text-center relative transition-all duration-1000 ${n?"opacity-100 translate-y-0":"opacity-0 translate-y-8"}`,children:[u.jsxs("h2",{className:"text-4xl md:text-5xl font-bold mb-6 leading-tight","data-testid":"text-final-cta-headline",children:[u.jsx("span",{className:`inline-block transition-all duration-700 ${n?"opacity-100 translate-y-0":"opacity-0 translate-y-4"}`,children:"Start Investing"}),u.jsx("br",{}),u.jsx("span",{className:`text-muted-foreground inline-block transition-all duration-700 delay-200 ${n?"opacity-100 translate-y-0":"opacity-0 translate-y-4"}`,children:"With Clarity"})]}),u.jsx("p",{className:`text-xl text-muted-foreground mb-12 max-w-xl mx-auto transition-all duration-700 delay-400 ${n?"opacity-100 translate-y-0":"opacity-0 translate-y-4"}`,children:"Take your time. Explore our strategies at your own pace. There's no rush when you're building for the long term."}),u.jsx("div",{className:`transition-all duration-700 delay-600 ${n?"opacity-100 translate-y-0":"opacity-0 translate-y-4"}`,children:u.jsxs(ue,{size:"lg",className:"rounded-xl px-10 py-6 text-lg group relative overflow-hidden","data-testid":"button-final-cta",onClick:e,children:[u.jsxs("span",{className:"relative z-10 flex items-center",children:["Explore Strategies",u.jsx(jw,{className:"ml-2 h-5 w-5 transition-transform group-hover:translate-x-1"})]}),u.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-primary via-chart-1 to-primary bg-[length:200%_100%] opacity-0 group-hover:opacity-100 transition-opacity duration-500",style:{animation:"shimmer 2s linear infinite"}})]})})]}),u.jsx("style",{children:` - @keyframes float-particle { - 0%, 100% { transform: translateY(0) rotate(0deg); } - 50% { transform: translateY(-20px) rotate(180deg); } - } - @keyframes shimmer { - 0% { background-position: 200% 0; } - 100% { background-position: -200% 0; } - } - `})]})}function Cr(){const e={Product:[{label:"Strategies",href:E1,newTab:!0},{label:"Pricing",href:"#"},{label:"How It Works",href:"#how-it-works"}],Company:[{label:"About",href:"/about"},{label:"Blog",href:"/blog"}],Legal:[{label:"Privacy",href:"/privacy"},{label:"Terms",href:"/terms"},{label:"Disclosures",href:"/disclosures"}]};return u.jsx("footer",{className:"py-16 px-6 border-t border-border","data-testid":"footer",children:u.jsxs("div",{className:"max-w-6xl mx-auto",children:[u.jsxs("div",{className:"grid md:grid-cols-4 gap-12 mb-12",children:[u.jsxs("div",{children:[u.jsx("a",{href:"#",className:"text-xl font-bold tracking-tight mb-4 block","data-testid":"link-footer-logo",children:"QuantFortune"}),u.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:"Simple, disciplined investment strategies for long-term wealth building."})]}),Object.entries(e).map(([t,n])=>u.jsxs("div",{children:[u.jsx("h4",{className:"font-semibold mb-4 text-sm",children:t}),u.jsx("ul",{className:"space-y-3",children:n.map(r=>u.jsx("li",{children:u.jsx("a",{href:r.href,target:r.newTab?"_blank":void 0,rel:r.newTab?"noreferrer":void 0,className:"text-sm text-muted-foreground hover:text-foreground transition-colors","data-testid":`link-footer-${r.label.toLowerCase()}`,children:r.label})},r.label))})]},t))]}),u.jsxs("div",{className:"pt-8 border-t border-border flex flex-col md:flex-row items-center justify-between gap-4",children:[u.jsx("p",{className:"text-sm text-muted-foreground",children:"2025 QuantFortune. All rights reserved."}),u.jsx("p",{className:"text-xs text-muted-foreground max-w-md text-center md:text-right",children:"Investment in securities market are subject to market risks. Read all related documents carefully before investing."})]})]})})}function _r({children:e,className:t}){return u.jsx(Y.div,{className:t,initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{duration:.7,ease:"easeOut"},children:e})}function _v({title:e,description:t,status:n,cta:r,disabled:i=!1,icon:a,onClick:o}){const s=n==="Active"&&!i;return u.jsxs("button",{type:"button",onClick:i?void 0:o,disabled:i,className:`group relative w-full rounded-2xl border border-white/10 bg-white/5 p-6 text-left transition-all duration-300 ${s?"hover:-translate-y-1 hover:border-primary/50 hover:shadow-[0_20px_50px_rgba(34,211,238,0.15)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary/60":"opacity-50 cursor-not-allowed"}`,children:[u.jsxs("div",{className:"flex items-center justify-between gap-4",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("span",{className:`flex h-11 w-11 items-center justify-center rounded-xl border ${s?"border-primary/40 bg-primary/10 text-primary":"border-white/10 text-muted-foreground"}`,children:a}),u.jsxs("div",{children:[u.jsx("h3",{className:"text-lg font-semibold text-foreground",children:e}),u.jsx("p",{className:"text-sm text-muted-foreground",children:t})]})]}),u.jsx("span",{className:`rounded-full px-3 py-1 text-xs font-semibold ${s?"bg-emerald-500/15 text-emerald-200 border border-emerald-400/30":"bg-white/5 text-muted-foreground border border-white/10"}`,children:n})]}),s&&r?u.jsxs("div",{className:"mt-5 flex items-center justify-between",children:[u.jsx("span",{className:"text-sm font-semibold text-primary",children:r}),u.jsx("span",{className:"h-2 w-2 rounded-full bg-primary shadow-[0_0_12px_rgba(34,211,238,0.6)]"})]}):u.jsx("div",{className:"mt-5 text-xs text-muted-foreground",children:"Stay tuned for the launch."}),s&&u.jsx("div",{className:"pointer-events-none absolute inset-0 rounded-2xl opacity-0 transition-opacity duration-300 group-hover:opacity-100",children:u.jsx("div",{className:"absolute inset-0 rounded-2xl bg-gradient-to-br from-primary/10 via-transparent to-transparent"})})]})}const n7=["a[href]","button:not([disabled])","textarea","input","select","[tabindex]:not([tabindex='-1'])"].join(",");function r7({open:e,onClose:t}){const n=w.useRef(null),[,r]=Cd(),i=w.useMemo(()=>n.current?Array.from(n.current.querySelectorAll(n7)):[],[e]);w.useEffect(()=>{if(!e)return;const o=i[0];o==null||o.focus();const s=l=>{if(l.key==="Escape"){l.preventDefault(),t();return}if(l.key!=="Tab"||i.length===0)return;const c=i[0],d=i[i.length-1];l.shiftKey&&document.activeElement===c?(l.preventDefault(),d==null||d.focus()):!l.shiftKey&&document.activeElement===d&&(l.preventDefault(),c==null||c.focus())};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[e,i,t]);const a=()=>{t(),window.setTimeout(()=>{r(E1)},200)};return u.jsx(O9,{children:e&&u.jsxs(Y.div,{className:"fixed inset-0 z-[90] flex items-center justify-center px-6 py-10",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:[u.jsx(Y.button,{type:"button","aria-label":"Close strategies modal",className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:t,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0}}),u.jsxs(Y.div,{ref:n,role:"dialog","aria-modal":"true","aria-labelledby":"strategy-modal-title","aria-describedby":"strategy-modal-subtitle",className:"relative z-[91] w-full max-w-4xl rounded-3xl border border-white/10 bg-gradient-to-br from-white/10 via-background/80 to-background/90 p-8 shadow-2xl",initial:{opacity:0,scale:.95,y:16},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:16},transition:{duration:.3,ease:"easeOut"},onClick:o=>o.stopPropagation(),children:[u.jsxs("div",{className:"flex items-start justify-between gap-6",children:[u.jsxs("div",{children:[u.jsx("h2",{id:"strategy-modal-title",className:"text-2xl font-semibold text-foreground",children:"Choose Your Strategy"}),u.jsx("p",{id:"strategy-modal-subtitle",className:"mt-2 text-sm text-muted-foreground",children:"Systematic paths for long-term wealth"})]}),u.jsx("button",{type:"button",onClick:t,className:"rounded-full border border-white/10 bg-white/10 px-3 py-1 text-xs text-muted-foreground hover:text-foreground",children:"Close"})]}),u.jsxs("div",{className:"mt-8 grid gap-4 md:grid-cols-3",children:[u.jsx(_v,{title:"Golden Nifty",description:"Balanced Nifty + Gold allocation for stability.",status:"Active",cta:"View Strategy",icon:u.jsx(Ow,{className:"h-5 w-5"}),onClick:a}),u.jsx(_v,{title:"Bluechip Growth",description:"Large-cap leaders with dividend focus.",status:"Coming Soon",disabled:!0,icon:u.jsx(Nw,{className:"h-5 w-5"})}),u.jsx(_v,{title:"Flexi Momentum",description:"Momentum-led allocation across caps.",status:"Coming Soon",disabled:!0,icon:u.jsx(Lh,{className:"h-5 w-5"})})]})]})]})})}function i7(){const[e,t]=w.useState(!1),n=()=>t(!0),r=()=>t(!1);return u.jsxs("div",{className:"min-h-screen text-foreground",children:[u.jsx(Tr,{}),u.jsx(_r,{children:u.jsxs("main",{children:[u.jsx(H9,{onExploreStrategies:n}),u.jsx(K9,{}),u.jsx(Y9,{}),u.jsx(X9,{}),u.jsx(Q9,{}),u.jsx(e7,{}),u.jsx(t7,{onExploreStrategies:n})]})}),u.jsx(r7,{open:e,onClose:r}),u.jsx(Cr,{})]})}const T1="/api";async function rD(e){return(await fetch(`${T1}/strategy/start`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(e)})).json()}async function iD(){return(await fetch(`${T1}/strategy/stop`,{method:"POST",credentials:"include"})).json()}async function aD(){return(await fetch(`${T1}/strategy/status`,{credentials:"include"})).json()}function a7(e){if(typeof e=="string"){try{const t=JSON.parse(e);if(t&&typeof t=="object")return t}catch{return{message:e}}return{message:e}}return e&&typeof e=="object"?e:{message:"Unknown log entry"}}function kv(e){if(!e)return"Unknown time";const n=/Z|[+-]\d{2}:?\d{2}$/.test(e)?e:`${e}Z`,r=new Date(n);return Number.isNaN(r.getTime())?e:r.toLocaleString()}function $v(e){return e.run_id??"unknown"}function yO(e){return typeof e.seq=="number"?e.seq:0}function vO(e){const t=(e.event??"UNKNOWN").toUpperCase(),n=e.meta??{};if(t==="STRATEGY_STARTED")return{label:"START",className:"border-blue-500/40 bg-blue-500/20 text-blue-200"};if(t==="STRATEGY_STOPPED")return{label:"STOP",className:"border-slate-400/40 bg-slate-400/20 text-slate-200"};if(t==="ORDER_PLACED"){const r=typeof n.side=="string"?n.side.toUpperCase():"";return r==="BUY"?{label:"BUY",className:"border-emerald-400/40 bg-emerald-400/20 text-emerald-200"}:r==="SELL"?{label:"SELL",className:"border-red-400/40 bg-red-400/20 text-red-200"}:{label:"ORDER",className:"border-emerald-400/40 bg-emerald-400/20 text-emerald-200"}}return t==="ERROR"?{label:"ERROR",className:"border-red-400/50 bg-red-500/20 text-red-200"}:t==="MARKET_CLOSED"?{label:"MARKET",className:"border-amber-400/40 bg-amber-400/20 text-amber-200"}:{label:t,className:"border-white/20 bg-white/10 text-white/70"}}function o7(e){const t=e.find(n=>n.event==="STRATEGY_STARTED")??e[0];return(t==null?void 0:t.ts)??(t==null?void 0:t.timestamp)}function s7(e){return e.length===0?!1:e[e.length-1].event!=="STRATEGY_STOPPED"}function l7(e){var r;const t=[...e].reverse().find(i=>i.event==="STRATEGY_STOPPED"),n=(r=t==null?void 0:t.meta)==null?void 0:r.reason;return typeof n=="string"?n:null}function oD(){const[e,t]=w.useState([]),n=w.useRef(0);w.useEffect(()=>{const i=async()=>{try{const s=await(await fetch(`/api/logs?since_seq=${n.current}`,{credentials:"include"})).json(),c=(Array.isArray(s==null?void 0:s.events)?s.events:[]).map(a7);if(t(d=>{const f=new Set(d.map(p=>p.seq).filter(p=>typeof p=="number")),h=c.filter(p=>typeof p.seq!="number"||!f.has(p.seq));return[...d,...h]}),typeof(s==null?void 0:s.latest_seq)=="number")n.current=s.latest_seq;else{const d=c.reduce((f,h)=>Math.max(f,h.seq??0),n.current);n.current=d}}catch{return}};i();const a=setInterval(i,5e3);return()=>clearInterval(a)},[]);const r=w.useMemo(()=>{const i=e.map((o,s)=>({entry:o,index:s}));i.sort((o,s)=>{const l=$v(s.entry).localeCompare($v(o.entry));if(l!==0)return l;const c=yO(o.entry)-yO(s.entry);return c!==0?c:o.index-s.index});const a=[];for(const{entry:o}of i){const s=$v(o),l=a[a.length-1];!l||l.runId!==s?a.push({runId:s,events:[o]}):l.events.push(o)}return a},[e]);return u.jsxs("div",{className:"bg-black rounded-lg p-4 text-sm text-green-400 h-64 overflow-auto",children:[u.jsx("div",{className:"font-bold mb-2",children:"Strategy Timeline"}),r.length===0?u.jsx("div",{className:"text-xs text-green-300/70",children:"No events yet."}):r.map(i=>{const a=s7(i.events),o=o7(i.events),s=l7(i.events),l=i.events[i.events.length-1],c=vO(l);return u.jsxs("div",{className:`mb-4 rounded-lg border p-3 ${a?"border-emerald-500/40 bg-emerald-500/5":"border-white/10 bg-white/5"}`,children:[u.jsxs("div",{className:"flex items-start justify-between gap-3",children:[u.jsxs("div",{children:[u.jsxs("div",{className:"text-sm font-semibold text-white/90",children:["▶ Run started at ",kv(o)]}),u.jsxs("div",{className:"text-xs text-green-300/70",children:["Run ID: ",i.runId]})]}),u.jsx("div",{className:`rounded-full border px-2 py-0.5 text-[11px] font-semibold uppercase tracking-wide ${a?"border-emerald-400/50 bg-emerald-400/20 text-emerald-200":"border-slate-400/50 bg-slate-400/20 text-slate-200"}`,children:a?"Active":"Stopped"})]}),u.jsxs("div",{className:"mt-2 flex items-center gap-2 text-xs text-green-300/80",children:[u.jsx("span",{className:`inline-flex items-center rounded-full border px-2 py-0.5 text-[11px] font-semibold ${c.className}`,children:c.label}),u.jsxs("span",{children:["Last event: ",l.event??"UNKNOWN"," at"," ",kv(l.ts??l.timestamp)]})]}),s?u.jsxs("div",{className:"mt-1 text-xs text-green-300/80",children:["Reason: ",s]}):null,u.jsx("div",{className:"mt-3 space-y-3",children:i.events.map((d,f)=>{const h=vO(d),p=d.ts??d.timestamp,g=d.message??d.event??"Unknown event",m=d.meta??{},y=Object.keys(m);return u.jsxs("div",{className:"flex items-start gap-3",children:[u.jsx("span",{className:`inline-flex items-center rounded-full border px-2 py-0.5 text-[11px] font-semibold ${h.className}`,children:h.label}),u.jsxs("div",{className:"flex-1",children:[u.jsxs("div",{className:"text-xs text-green-300/80",children:[kv(p)," • ",d.event??"UNKNOWN"]}),g&&g!==d.event?u.jsx("div",{className:"text-sm text-green-200",children:g}):null,typeof m.reason=="string"?u.jsxs("div",{className:"text-xs text-green-300/80",children:["Reason: ",m.reason]}):null,y.length>0?u.jsxs("details",{className:"mt-1",children:[u.jsx("summary",{className:"cursor-pointer text-xs text-green-300/70",children:"Details"}),u.jsx("pre",{className:"whitespace-pre-wrap text-xs text-green-200/80",children:JSON.stringify(m,null,2)})]}):null]})]},d.seq??`${i.runId}-${f}`)})})]},i.runId)})]})}var c7=Array.isArray,vn=c7,u7=typeof Zd=="object"&&Zd&&Zd.Object===Object&&Zd,sD=u7,d7=sD,f7=typeof self=="object"&&self&&self.Object===Object&&self,h7=d7||f7||Function("return this")(),ti=h7,p7=ti,m7=p7.Symbol,Ld=m7,gO=Ld,lD=Object.prototype,y7=lD.hasOwnProperty,v7=lD.toString,Cc=gO?gO.toStringTag:void 0;function g7(e){var t=y7.call(e,Cc),n=e[Cc];try{e[Cc]=void 0;var r=!0}catch{}var i=v7.call(e);return r&&(t?e[Cc]=n:delete e[Cc]),i}var x7=g7,b7=Object.prototype,w7=b7.toString;function S7(e){return w7.call(e)}var j7=S7,xO=Ld,P7=x7,N7=j7,O7="[object Null]",A7="[object Undefined]",bO=xO?xO.toStringTag:void 0;function E7(e){return e==null?e===void 0?A7:O7:bO&&bO in Object(e)?P7(e):N7(e)}var Ii=E7;function T7(e){return e!=null&&typeof e=="object"}var Li=T7,C7=Ii,_7=Li,k7="[object Symbol]";function $7(e){return typeof e=="symbol"||_7(e)&&C7(e)==k7}var nc=$7,M7=vn,R7=nc,D7=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,I7=/^\w*$/;function L7(e,t){if(M7(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||R7(e)?!0:I7.test(e)||!D7.test(e)||t!=null&&e in Object(t)}var C1=L7;function F7(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ha=F7;const rc=Ie(Ha);var B7=Ii,z7=Ha,V7="[object AsyncFunction]",U7="[object Function]",W7="[object GeneratorFunction]",H7="[object Proxy]";function q7(e){if(!z7(e))return!1;var t=B7(e);return t==U7||t==W7||t==V7||t==H7}var _1=q7;const he=Ie(_1);var K7=ti,G7=K7["__core-js_shared__"],Y7=G7,Mv=Y7,wO=function(){var e=/[^.]+$/.exec(Mv&&Mv.keys&&Mv.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function X7(e){return!!wO&&wO in e}var Q7=X7,Z7=Function.prototype,J7=Z7.toString;function eK(e){if(e!=null){try{return J7.call(e)}catch{}try{return e+""}catch{}}return""}var cD=eK,tK=_1,nK=Q7,rK=Ha,iK=cD,aK=/[\\^$.*+?()[\]{}|]/g,oK=/^\[object .+?Constructor\]$/,sK=Function.prototype,lK=Object.prototype,cK=sK.toString,uK=lK.hasOwnProperty,dK=RegExp("^"+cK.call(uK).replace(aK,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function fK(e){if(!rK(e)||nK(e))return!1;var t=tK(e)?dK:oK;return t.test(iK(e))}var hK=fK;function pK(e,t){return e==null?void 0:e[t]}var mK=pK,yK=hK,vK=mK;function gK(e,t){var n=vK(e,t);return yK(n)?n:void 0}var es=gK,xK=es,bK=xK(Object,"create"),$m=bK,SO=$m;function wK(){this.__data__=SO?SO(null):{},this.size=0}var SK=wK;function jK(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var PK=jK,NK=$m,OK="__lodash_hash_undefined__",AK=Object.prototype,EK=AK.hasOwnProperty;function TK(e){var t=this.__data__;if(NK){var n=t[e];return n===OK?void 0:n}return EK.call(t,e)?t[e]:void 0}var CK=TK,_K=$m,kK=Object.prototype,$K=kK.hasOwnProperty;function MK(e){var t=this.__data__;return _K?t[e]!==void 0:$K.call(t,e)}var RK=MK,DK=$m,IK="__lodash_hash_undefined__";function LK(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=DK&&t===void 0?IK:t,this}var FK=LK,BK=SK,zK=PK,VK=CK,UK=RK,WK=FK;function ic(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1}var sG=oG,lG=Mm;function cG(e,t){var n=this.__data__,r=lG(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var uG=cG,dG=KK,fG=tG,hG=iG,pG=sG,mG=uG;function ac(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t0?1:-1},fo=function(t){return Fd(t)&&t.indexOf("%")===t.length-1},G=function(t){return IY(t)&&!sc(t)},Nt=function(t){return G(t)||Fd(t)},zY=0,Bd=function(t){var n=++zY;return"".concat(t||"").concat(n)},Uo=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!G(t)&&!Fd(t))return r;var a;if(fo(t)){var o=t.indexOf("%");a=n*parseFloat(t.slice(0,o))/100}else a=+t;return sc(a)&&(a=r),i&&a>n&&(a=n),a},ra=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},VY=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function GY(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function K0(e){"@babel/helpers - typeof";return K0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},K0(e)}var TO={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},xi=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},CO=null,Dv=null,z1=function e(t){if(t===CO&&Array.isArray(Dv))return Dv;var n=[];return w.Children.forEach(t,function(r){be(r)||(kY.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),Dv=n,CO=t,n};function Pr(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return xi(i)}):r=[xi(t)],z1(e).forEach(function(i){var a=nr(i,"type.displayName")||nr(i,"type.name");r.indexOf(a)!==-1&&n.push(i)}),n}function jn(e,t){var n=Pr(e,t);return n&&n[0]}var _O=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,i=n.height;return!(!G(r)||r<=0||!G(i)||i<=0)},YY=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],XY=function(t){return t&&t.type&&Fd(t.type)&&YY.indexOf(t.type)>=0},QY=function(t){return t&&K0(t)==="object"&&"clipDot"in t},ZY=function(t,n,r,i){var a,o=(a=Rv==null?void 0:Rv[i])!==null&&a!==void 0?a:[];return n.startsWith("data-")||!he(t)&&(i&&o.includes(n)||WY.includes(n))||r&&B1.includes(n)},ve=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(w.isValidElement(t)&&(i=t.props),!rc(i))return null;var a={};return Object.keys(i).forEach(function(o){var s;ZY((s=i)===null||s===void 0?void 0:s[o],o,n,r)&&(a[o]=i[o])}),a},G0=function e(t,n){if(t===n)return!0;var r=w.Children.count(t);if(r!==w.Children.count(n))return!1;if(r===0)return!0;if(r===1)return kO(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function rX(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function X0(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,a=e.className,o=e.style,s=e.title,l=e.desc,c=nX(e,tX),d=i||{width:n,height:r,x:0,y:0},f=Se("recharts-surface",a);return $.createElement("svg",Y0({},ve(c,!0,"svg"),{className:f,width:n,height:r,style:o,viewBox:"".concat(d.x," ").concat(d.y," ").concat(d.width," ").concat(d.height)}),$.createElement("title",null,s),$.createElement("desc",null,l),t)}var iX=["children","className"];function Q0(){return Q0=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function oX(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var rt=$.forwardRef(function(e,t){var n=e.children,r=e.className,i=aX(e,iX),a=Se("recharts-layer",r);return $.createElement("g",Q0({className:a},ve(i,!0),{ref:t}),n)}),bi=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),a=2;ai?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r=r?e:cX(e,t,n)}var dX=uX,fX="\\ud800-\\udfff",hX="\\u0300-\\u036f",pX="\\ufe20-\\ufe2f",mX="\\u20d0-\\u20ff",yX=hX+pX+mX,vX="\\ufe0e\\ufe0f",gX="\\u200d",xX=RegExp("["+gX+fX+yX+vX+"]");function bX(e){return xX.test(e)}var xD=bX;function wX(e){return e.split("")}var SX=wX,bD="\\ud800-\\udfff",jX="\\u0300-\\u036f",PX="\\ufe20-\\ufe2f",NX="\\u20d0-\\u20ff",OX=jX+PX+NX,AX="\\ufe0e\\ufe0f",EX="["+bD+"]",Z0="["+OX+"]",J0="\\ud83c[\\udffb-\\udfff]",TX="(?:"+Z0+"|"+J0+")",wD="[^"+bD+"]",SD="(?:\\ud83c[\\udde6-\\uddff]){2}",jD="[\\ud800-\\udbff][\\udc00-\\udfff]",CX="\\u200d",PD=TX+"?",ND="["+AX+"]?",_X="(?:"+CX+"(?:"+[wD,SD,jD].join("|")+")"+ND+PD+")*",kX=ND+PD+_X,$X="(?:"+[wD+Z0+"?",Z0,SD,jD,EX].join("|")+")",MX=RegExp(J0+"(?="+J0+")|"+$X+kX,"g");function RX(e){return e.match(MX)||[]}var DX=RX,IX=SX,LX=xD,FX=DX;function BX(e){return LX(e)?FX(e):IX(e)}var zX=BX,VX=dX,UX=xD,WX=zX,HX=hD;function qX(e){return function(t){t=HX(t);var n=UX(t)?WX(t):void 0,r=n?n[0]:t.charAt(0),i=n?VX(n,1).join(""):t.slice(1);return r[e]()+i}}var KX=qX,GX=KX,YX=GX("toUpperCase"),XX=YX;const Gm=Ie(XX);function We(e){return function(){return e}}const OD=Math.cos,np=Math.sin,kr=Math.sqrt,rp=Math.PI,Ym=2*rp,ex=Math.PI,tx=2*ex,io=1e-6,QX=tx-io;function AD(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return AD;const n=10**t;return function(r){this._+=r[0];for(let i=1,a=r.length;iio)if(!(Math.abs(f*l-c*d)>io)||!a)this._append`L${this._x1=t},${this._y1=n}`;else{let p=r-o,g=i-s,m=l*l+c*c,y=p*p+g*g,v=Math.sqrt(m),x=Math.sqrt(h),b=a*Math.tan((ex-Math.acos((m+h-y)/(2*v*x)))/2),P=b/x,S=b/v;Math.abs(P-1)>io&&this._append`L${t+P*d},${n+P*f}`,this._append`A${a},${a},0,0,${+(f*p>d*g)},${this._x1=t+S*l},${this._y1=n+S*c}`}}arc(t,n,r,i,a,o){if(t=+t,n=+n,r=+r,o=!!o,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),l=r*Math.sin(i),c=t+s,d=n+l,f=1^o,h=o?i-a:a-i;this._x1===null?this._append`M${c},${d}`:(Math.abs(this._x1-c)>io||Math.abs(this._y1-d)>io)&&this._append`L${c},${d}`,r&&(h<0&&(h=h%tx+tx),h>QX?this._append`A${r},${r},0,1,${f},${t-s},${n-l}A${r},${r},0,1,${f},${this._x1=c},${this._y1=d}`:h>io&&this._append`A${r},${r},0,${+(h>=ex)},${f},${this._x1=t+r*Math.cos(a)},${this._y1=n+r*Math.sin(a)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function V1(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new JX(t)}function U1(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function ED(e){this._context=e}ED.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Xm(e){return new ED(e)}function TD(e){return e[0]}function CD(e){return e[1]}function _D(e,t){var n=We(!0),r=null,i=Xm,a=null,o=V1(s);e=typeof e=="function"?e:e===void 0?TD:We(e),t=typeof t=="function"?t:t===void 0?CD:We(t);function s(l){var c,d=(l=U1(l)).length,f,h=!1,p;for(r==null&&(a=i(p=o())),c=0;c<=d;++c)!(c=p;--g)s.point(b[g],P[g]);s.lineEnd(),s.areaEnd()}v&&(b[h]=+e(y,h,f),P[h]=+t(y,h,f),s.point(r?+r(y,h,f):b[h],n?+n(y,h,f):P[h]))}if(x)return s=null,x+""||null}function d(){return _D().defined(i).curve(o).context(a)}return c.x=function(f){return arguments.length?(e=typeof f=="function"?f:We(+f),r=null,c):e},c.x0=function(f){return arguments.length?(e=typeof f=="function"?f:We(+f),c):e},c.x1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:We(+f),c):r},c.y=function(f){return arguments.length?(t=typeof f=="function"?f:We(+f),n=null,c):t},c.y0=function(f){return arguments.length?(t=typeof f=="function"?f:We(+f),c):t},c.y1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:We(+f),c):n},c.lineX0=c.lineY0=function(){return d().x(e).y(t)},c.lineY1=function(){return d().x(e).y(n)},c.lineX1=function(){return d().x(r).y(t)},c.defined=function(f){return arguments.length?(i=typeof f=="function"?f:We(!!f),c):i},c.curve=function(f){return arguments.length?(o=f,a!=null&&(s=o(a)),c):o},c.context=function(f){return arguments.length?(f==null?a=s=null:s=o(a=f),c):a},c}class kD{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function eQ(e){return new kD(e,!0)}function tQ(e){return new kD(e,!1)}const W1={draw(e,t){const n=kr(t/rp);e.moveTo(n,0),e.arc(0,0,n,0,Ym)}},nQ={draw(e,t){const n=kr(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},$D=kr(1/3),rQ=$D*2,iQ={draw(e,t){const n=kr(t/rQ),r=n*$D;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},aQ={draw(e,t){const n=kr(t),r=-n/2;e.rect(r,r,n,n)}},oQ=.8908130915292852,MD=np(rp/10)/np(7*rp/10),sQ=np(Ym/10)*MD,lQ=-OD(Ym/10)*MD,cQ={draw(e,t){const n=kr(t*oQ),r=sQ*n,i=lQ*n;e.moveTo(0,-n),e.lineTo(r,i);for(let a=1;a<5;++a){const o=Ym*a/5,s=OD(o),l=np(o);e.lineTo(l*n,-s*n),e.lineTo(s*r-l*i,l*r+s*i)}e.closePath()}},Iv=kr(3),uQ={draw(e,t){const n=-kr(t/(Iv*3));e.moveTo(0,n*2),e.lineTo(-Iv*n,-n),e.lineTo(Iv*n,-n),e.closePath()}},Fn=-.5,Bn=kr(3)/2,nx=1/kr(12),dQ=(nx/2+1)*3,fQ={draw(e,t){const n=kr(t/dQ),r=n/2,i=n*nx,a=r,o=n*nx+n,s=-a,l=o;e.moveTo(r,i),e.lineTo(a,o),e.lineTo(s,l),e.lineTo(Fn*r-Bn*i,Bn*r+Fn*i),e.lineTo(Fn*a-Bn*o,Bn*a+Fn*o),e.lineTo(Fn*s-Bn*l,Bn*s+Fn*l),e.lineTo(Fn*r+Bn*i,Fn*i-Bn*r),e.lineTo(Fn*a+Bn*o,Fn*o-Bn*a),e.lineTo(Fn*s+Bn*l,Fn*l-Bn*s),e.closePath()}};function hQ(e,t){let n=null,r=V1(i);e=typeof e=="function"?e:We(e||W1),t=typeof t=="function"?t:We(t===void 0?64:+t);function i(){let a;if(n||(n=a=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),a)return n=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:We(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:We(+a),i):t},i.context=function(a){return arguments.length?(n=a??null,i):n},i}function ip(){}function ap(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function RD(e){this._context=e}RD.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:ap(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:ap(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function pQ(e){return new RD(e)}function DD(e){this._context=e}DD.prototype={areaStart:ip,areaEnd:ip,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:ap(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function mQ(e){return new DD(e)}function ID(e){this._context=e}ID.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:ap(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function yQ(e){return new ID(e)}function LD(e){this._context=e}LD.prototype={areaStart:ip,areaEnd:ip,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function vQ(e){return new LD(e)}function MO(e){return e<0?-1:1}function RO(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(MO(a)+MO(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function DO(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Lv(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function op(e){this._context=e}op.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Lv(this,this._t0,DO(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Lv(this,DO(this,n=RO(this,e,t)),n);break;default:Lv(this,this._t0,n=RO(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function FD(e){this._context=new BD(e)}(FD.prototype=Object.create(op.prototype)).point=function(e,t){op.prototype.point.call(this,t,e)};function BD(e){this._context=e}BD.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function gQ(e){return new op(e)}function xQ(e){return new FD(e)}function zD(e){this._context=e}zD.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=IO(e),i=IO(t),a=0,o=1;o=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function wQ(e){return new Qm(e,.5)}function SQ(e){return new Qm(e,0)}function jQ(e){return new Qm(e,1)}function Nl(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n=0;)n[t]=t;return n}function PQ(e,t){return e[t]}function NQ(e){const t=[];return t.key=e,t}function OQ(){var e=We([]),t=rx,n=Nl,r=PQ;function i(a){var o=Array.from(e.apply(this,arguments),NQ),s,l=o.length,c=-1,d;for(const f of a)for(s=0,++c;s0){for(var n,r,i=0,a=e[0].length,o;i0){for(var n=0,r=e[t[0]],i,a=r.length;n0)||!((a=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,a,o;r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function RQ(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var VD={symbolCircle:W1,symbolCross:nQ,symbolDiamond:iQ,symbolSquare:aQ,symbolStar:cQ,symbolTriangle:uQ,symbolWye:fQ},DQ=Math.PI/180,IQ=function(t){var n="symbol".concat(Gm(t));return VD[n]||W1},LQ=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*DQ;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},FQ=function(t,n){VD["symbol".concat(Gm(t))]=n},H1=function(t){var n=t.type,r=n===void 0?"circle":n,i=t.size,a=i===void 0?64:i,o=t.sizeType,s=o===void 0?"area":o,l=MQ(t,CQ),c=FO(FO({},l),{},{type:r,size:a,sizeType:s}),d=function(){var y=IQ(r),v=hQ().type(y).size(LQ(a,s,r));return v()},f=c.className,h=c.cx,p=c.cy,g=ve(c,!0);return h===+h&&p===+p&&a===+a?$.createElement("path",ix({},g,{className:Se("recharts-symbols",f),transform:"translate(".concat(h,", ").concat(p,")"),d:d()})):null};H1.registerSymbol=FQ;function Ol(e){"@babel/helpers - typeof";return Ol=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ol(e)}function ax(){return ax=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var x=p.inactive?c:p.color;return $.createElement("li",ax({className:y,style:f,key:"legend-item-".concat(g)},tp(r.props,p,g)),$.createElement(X0,{width:o,height:o,viewBox:d,style:h},r.renderIcon(p)),$.createElement("span",{className:"recharts-legend-item-text",style:{color:x}},m?m(v,p,g):v))})}},{key:"render",value:function(){var r=this.props,i=r.payload,a=r.layout,o=r.align;if(!i||!i.length)return null;var s={padding:0,margin:0,textAlign:a==="horizontal"?o:"left"};return $.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(w.PureComponent);Fu(q1,"displayName","Legend");Fu(q1,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var YQ=Rm;function XQ(){this.__data__=new YQ,this.size=0}var QQ=XQ;function ZQ(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var JQ=ZQ;function eZ(e){return this.__data__.get(e)}var tZ=eZ;function nZ(e){return this.__data__.has(e)}var rZ=nZ,iZ=Rm,aZ=$1,oZ=M1,sZ=200;function lZ(e,t){var n=this.__data__;if(n instanceof iZ){var r=n.__data__;if(!aZ||r.lengths))return!1;var c=a.get(e),d=a.get(t);if(c&&d)return c==t&&d==e;var f=-1,h=!0,p=n&CZ?new OZ:void 0;for(a.set(e,t),a.set(t,e);++f-1&&e%1==0&&e-1&&e%1==0&&e<=MJ}var X1=RJ,DJ=Ii,IJ=X1,LJ=Li,FJ="[object Arguments]",BJ="[object Array]",zJ="[object Boolean]",VJ="[object Date]",UJ="[object Error]",WJ="[object Function]",HJ="[object Map]",qJ="[object Number]",KJ="[object Object]",GJ="[object RegExp]",YJ="[object Set]",XJ="[object String]",QJ="[object WeakMap]",ZJ="[object ArrayBuffer]",JJ="[object DataView]",eee="[object Float32Array]",tee="[object Float64Array]",nee="[object Int8Array]",ree="[object Int16Array]",iee="[object Int32Array]",aee="[object Uint8Array]",oee="[object Uint8ClampedArray]",see="[object Uint16Array]",lee="[object Uint32Array]",Ge={};Ge[eee]=Ge[tee]=Ge[nee]=Ge[ree]=Ge[iee]=Ge[aee]=Ge[oee]=Ge[see]=Ge[lee]=!0;Ge[FJ]=Ge[BJ]=Ge[ZJ]=Ge[zJ]=Ge[JJ]=Ge[VJ]=Ge[UJ]=Ge[WJ]=Ge[HJ]=Ge[qJ]=Ge[KJ]=Ge[GJ]=Ge[YJ]=Ge[XJ]=Ge[QJ]=!1;function cee(e){return LJ(e)&&IJ(e.length)&&!!Ge[DJ(e)]}var uee=cee;function dee(e){return function(t){return e(t)}}var JD=dee,up={exports:{}};up.exports;(function(e,t){var n=sD,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===r,o=a&&n.process,s=function(){try{var l=i&&i.require&&i.require("util").types;return l||o&&o.binding&&o.binding("util")}catch{}}();e.exports=s})(up,up.exports);var fee=up.exports,hee=uee,pee=JD,qO=fee,KO=qO&&qO.isTypedArray,mee=KO?pee(KO):hee,eI=mee,yee=xJ,vee=G1,gee=vn,xee=ZD,bee=Y1,wee=eI,See=Object.prototype,jee=See.hasOwnProperty;function Pee(e,t){var n=gee(e),r=!n&&vee(e),i=!n&&!r&&xee(e),a=!n&&!r&&!i&&wee(e),o=n||r||i||a,s=o?yee(e.length,String):[],l=s.length;for(var c in e)(t||jee.call(e,c))&&!(o&&(c=="length"||i&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||bee(c,l)))&&s.push(c);return s}var Nee=Pee,Oee=Object.prototype;function Aee(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Oee;return e===n}var Eee=Aee;function Tee(e,t){return function(n){return e(t(n))}}var tI=Tee,Cee=tI,_ee=Cee(Object.keys,Object),kee=_ee,$ee=Eee,Mee=kee,Ree=Object.prototype,Dee=Ree.hasOwnProperty;function Iee(e){if(!$ee(e))return Mee(e);var t=[];for(var n in Object(e))Dee.call(e,n)&&n!="constructor"&&t.push(n);return t}var Lee=Iee,Fee=_1,Bee=X1;function zee(e){return e!=null&&Bee(e.length)&&!Fee(e)}var zd=zee,Vee=Nee,Uee=Lee,Wee=zd;function Hee(e){return Wee(e)?Vee(e):Uee(e)}var Zm=Hee,qee=sJ,Kee=vJ,Gee=Zm;function Yee(e){return qee(e,Gee,Kee)}var Xee=Yee,GO=Xee,Qee=1,Zee=Object.prototype,Jee=Zee.hasOwnProperty;function ete(e,t,n,r,i,a){var o=n&Qee,s=GO(e),l=s.length,c=GO(t),d=c.length;if(l!=d&&!o)return!1;for(var f=l;f--;){var h=s[f];if(!(o?h in t:Jee.call(t,h)))return!1}var p=a.get(e),g=a.get(t);if(p&&g)return p==t&&g==e;var m=!0;a.set(e,t),a.set(t,e);for(var y=o;++f-1}var Zne=Qne;function Jne(e,t,n){for(var r=-1,i=e==null?0:e.length;++r=pre){var c=t?null:fre(e);if(c)return hre(c);o=!1,i=dre,l=new lre}else l=t?[]:s;e:for(;++r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Cre(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function _re(e){return e.value}function kre(e,t){if($.isValidElement(e))return $.cloneElement(e,t);if(typeof e=="function")return $.createElement(e,t);t.ref;var n=Tre(t,wre);return $.createElement(q1,n)}var uA=1,Gs=function(e){function t(){var n;Sre(this,t);for(var r=arguments.length,i=new Array(r),a=0;auA||Math.abs(i.height-this.lastBoundingBox.height)>uA)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,r&&r(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?ii({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var i=this.props,a=i.layout,o=i.align,s=i.verticalAlign,l=i.margin,c=i.chartWidth,d=i.chartHeight,f,h;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(o==="center"&&a==="vertical"){var p=this.getBBoxSnapshot();f={left:((c||0)-p.width)/2}}else f=o==="right"?{right:l&&l.right||0}:{left:l&&l.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(s==="middle"){var g=this.getBBoxSnapshot();h={top:((d||0)-g.height)/2}}else h=s==="bottom"?{bottom:l&&l.bottom||0}:{top:l&&l.top||0};return ii(ii({},f),h)}},{key:"render",value:function(){var r=this,i=this.props,a=i.content,o=i.width,s=i.height,l=i.wrapperStyle,c=i.payloadUniqBy,d=i.payload,f=ii(ii({position:"absolute",width:o||"auto",height:s||"auto"},this.getDefaultPosition(l)),l);return $.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(p){r.wrapperNode=p}},kre(a,ii(ii({},this.props),{},{payload:lI(d,c,_re)})))}}],[{key:"getWithHeight",value:function(r,i){var a=ii(ii({},this.defaultProps),r.props),o=a.layout;return o==="vertical"&&G(r.props.height)?{height:r.props.height}:o==="horizontal"?{width:r.props.width||i}:null}}])}(w.PureComponent);Jm(Gs,"displayName","Legend");Jm(Gs,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var dA=Ld,$re=G1,Mre=vn,fA=dA?dA.isConcatSpreadable:void 0;function Rre(e){return Mre(e)||$re(e)||!!(fA&&e&&e[fA])}var Dre=Rre,Ire=XD,Lre=Dre;function dI(e,t,n,r,i){var a=-1,o=e.length;for(n||(n=Lre),i||(i=[]);++a0&&n(s)?t>1?dI(s,t-1,n,r,i):Ire(i,s):r||(i[i.length]=s)}return i}var fI=dI;function Fre(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var l=o[e?s:++i];if(n(a[l],l,a)===!1)break}return t}}var Bre=Fre,zre=Bre,Vre=zre(),Ure=Vre,Wre=Ure,Hre=Zm;function qre(e,t){return e&&Wre(e,t,Hre)}var hI=qre,Kre=zd;function Gre(e,t){return function(n,r){if(n==null)return n;if(!Kre(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=Object(n);(t?a--:++at||a&&o&&l&&!s&&!c||r&&o&&l||!n&&l||!i)return 1;if(!r&&!a&&!c&&e=s)return l;var c=n[r];return l*(c=="desc"?-1:1)}}return e.index-t.index}var lie=sie,Vv=D1,cie=I1,uie=qa,die=pI,fie=rie,hie=JD,pie=lie,mie=uc,yie=vn;function vie(e,t,n){t.length?t=Vv(t,function(a){return yie(a)?function(o){return cie(o,a.length===1?a[0]:a)}:a}):t=[mie];var r=-1;t=Vv(t,hie(uie));var i=die(e,function(a,o,s){var l=Vv(t,function(c){return c(a)});return{criteria:l,index:++r,value:a}});return fie(i,function(a,o){return pie(a,o,n)})}var gie=vie;function xie(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var bie=xie,wie=bie,pA=Math.max;function Sie(e,t,n){return t=pA(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=pA(r.length-t,0),o=Array(a);++i0){if(++t>=kie)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Die=Rie,Iie=_ie,Lie=Die,Fie=Lie(Iie),Bie=Fie,zie=uc,Vie=jie,Uie=Bie;function Wie(e,t){return Uie(Vie(e,t,zie),e+"")}var Hie=Wie,qie=k1,Kie=zd,Gie=Y1,Yie=Ha;function Xie(e,t,n){if(!Yie(n))return!1;var r=typeof t;return(r=="number"?Kie(n)&&Gie(t,n.length):r=="string"&&t in n)?qie(n[t],e):!1}var ey=Xie,Qie=fI,Zie=gie,Jie=Hie,yA=ey,eae=Jie(function(e,t){if(e==null)return[];var n=t.length;return n>1&&yA(e,t[0],t[1])?t=[]:n>2&&yA(t[0],t[1],t[2])&&(t=[t[0]]),Zie(e,Qie(t,1),[])}),tae=eae;const J1=Ie(tae);function Bu(e){"@babel/helpers - typeof";return Bu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bu(e)}function hx(){return hx=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t.x),"".concat(_c,"-left"),G(n)&&t&&G(t.x)&&n=t.y),"".concat(_c,"-top"),G(r)&&t&&G(t.y)&&rm?Math.max(d,l[r]):Math.max(f,l[r])}function yae(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function vae(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,a=e.reverseDirection,o=e.tooltipBox,s=e.useTranslate3d,l=e.viewBox,c,d,f;return o.height>0&&o.width>0&&n?(d=xA({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:l,viewBoxDimension:l.width}),f=xA({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:l,viewBoxDimension:l.height}),c=yae({translateX:d,translateY:f,useTranslate3d:s})):c=pae,{cssProperties:c,cssClasses:mae({translateX:d,translateY:f,coordinate:n})}}function El(e){"@babel/helpers - typeof";return El=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},El(e)}function bA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function wA(e){for(var t=1;tSA||Math.abs(r.height-this.state.lastBoundingBox.height)>SA)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,i=this.props,a=i.active,o=i.allowEscapeViewBox,s=i.animationDuration,l=i.animationEasing,c=i.children,d=i.coordinate,f=i.hasPayload,h=i.isAnimationActive,p=i.offset,g=i.position,m=i.reverseDirection,y=i.useTranslate3d,v=i.viewBox,x=i.wrapperStyle,b=vae({allowEscapeViewBox:o,coordinate:d,offsetTopLeft:p,position:g,reverseDirection:m,tooltipBox:this.state.lastBoundingBox,useTranslate3d:y,viewBox:v}),P=b.cssClasses,S=b.cssProperties,j=wA(wA({transition:h&&a?"transform ".concat(s,"ms ").concat(l):void 0},S),{},{pointerEvents:"none",visibility:!this.state.dismissed&&a&&f?"visible":"hidden",position:"absolute",top:0,left:0},x);return $.createElement("div",{tabIndex:-1,className:P,style:j,ref:function(O){r.wrapperNode=O}},c)}}])}(w.PureComponent),Aae=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},wi={isSsr:Aae(),get:function(t){return wi[t]},set:function(t,n){if(typeof t=="string")wi[t]=n;else{var r=Object.keys(t);r&&r.length&&r.forEach(function(i){wi[i]=t[i]})}}};function Tl(e){"@babel/helpers - typeof";return Tl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tl(e)}function jA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function PA(e){for(var t=1;t0;return $.createElement(Oae,{allowEscapeViewBox:o,animationDuration:s,animationEasing:l,isAnimationActive:h,active:a,coordinate:d,hasPayload:j,offset:p,position:y,reverseDirection:v,useTranslate3d:x,viewBox:b,wrapperStyle:P},Iae(c,PA(PA({},this.props),{},{payload:S})))}}])}(w.PureComponent);eS(Dr,"displayName","Tooltip");eS(Dr,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!wi.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var Lae=ti,Fae=function(){return Lae.Date.now()},Bae=Fae,zae=/\s/;function Vae(e){for(var t=e.length;t--&&zae.test(e.charAt(t)););return t}var Uae=Vae,Wae=Uae,Hae=/^\s+/;function qae(e){return e&&e.slice(0,Wae(e)+1).replace(Hae,"")}var Kae=qae,Gae=Kae,NA=Ha,Yae=nc,OA=NaN,Xae=/^[-+]0x[0-9a-f]+$/i,Qae=/^0b[01]+$/i,Zae=/^0o[0-7]+$/i,Jae=parseInt;function eoe(e){if(typeof e=="number")return e;if(Yae(e))return OA;if(NA(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=NA(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Gae(e);var n=Qae.test(e);return n||Zae.test(e)?Jae(e.slice(2),n?2:8):Xae.test(e)?OA:+e}var bI=eoe,toe=Ha,Wv=Bae,AA=bI,noe="Expected a function",roe=Math.max,ioe=Math.min;function aoe(e,t,n){var r,i,a,o,s,l,c=0,d=!1,f=!1,h=!0;if(typeof e!="function")throw new TypeError(noe);t=AA(t)||0,toe(n)&&(d=!!n.leading,f="maxWait"in n,a=f?roe(AA(n.maxWait)||0,t):a,h="trailing"in n?!!n.trailing:h);function p(j){var N=r,O=i;return r=i=void 0,c=j,o=e.apply(O,N),o}function g(j){return c=j,s=setTimeout(v,t),d?p(j):o}function m(j){var N=j-l,O=j-c,A=t-N;return f?ioe(A,a-O):A}function y(j){var N=j-l,O=j-c;return l===void 0||N>=t||N<0||f&&O>=a}function v(){var j=Wv();if(y(j))return x(j);s=setTimeout(v,m(j))}function x(j){return s=void 0,h&&r?p(j):(r=i=void 0,o)}function b(){s!==void 0&&clearTimeout(s),c=0,r=l=i=s=void 0}function P(){return s===void 0?o:x(Wv())}function S(){var j=Wv(),N=y(j);if(r=arguments,i=this,l=j,N){if(s===void 0)return g(l);if(f)return clearTimeout(s),s=setTimeout(v,t),p(l)}return s===void 0&&(s=setTimeout(v,t)),o}return S.cancel=b,S.flush=P,S}var ooe=aoe,soe=ooe,loe=Ha,coe="Expected a function";function uoe(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(coe);return loe(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),soe(e,t,{leading:r,maxWait:t,trailing:i})}var doe=uoe;const wI=Ie(doe);function Vu(e){"@babel/helpers - typeof";return Vu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vu(e)}function EA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function kf(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(D=wI(D,m,{trailing:!0,leading:!1}));var M=new ResizeObserver(D),I=S.current.getBoundingClientRect(),F=I.width,B=I.height;return T(F,B),M.observe(S.current),function(){M.disconnect()}},[T,m]);var C=w.useMemo(function(){var D=A.containerWidth,M=A.containerHeight;if(D<0||M<0)return null;bi(fo(o)||fo(l),`The width(%s) and height(%s) are both fixed numbers, - maybe you don't need to use a ResponsiveContainer.`,o,l),bi(!n||n>0,"The aspect(%s) must be greater than zero.",n);var I=fo(o)?D:o,F=fo(l)?M:l;n&&n>0&&(I?F=I/n:F&&(I=F*n),h&&F>h&&(F=h)),bi(I>0||F>0,`The width(%s) and height(%s) of chart should be greater than 0, - please check the style of container, or the props width(%s) and height(%s), - or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the - height and width.`,I,F,o,l,d,f,n);var B=!Array.isArray(p)&&xi(p.type).endsWith("Chart");return $.Children.map(p,function(k){return $.isValidElement(k)?w.cloneElement(k,kf({width:I,height:F},B?{style:kf({height:"100%",width:"100%",maxHeight:F,maxWidth:I},k.props.style)}:{})):k})},[n,p,l,h,f,d,A,o]);return $.createElement("div",{id:y?"".concat(y):void 0,className:Se("recharts-responsive-container",v),style:kf(kf({},P),{},{width:o,height:l,minWidth:d,minHeight:f,maxHeight:h}),ref:S},C)}),SI=function(t){return null};SI.displayName="Cell";function Uu(e){"@babel/helpers - typeof";return Uu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Uu(e)}function CA(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function gx(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||wi.isSsr)return{width:0,height:0};var r=Noe(n),i=JSON.stringify({text:t,copyStyle:r});if(us.widthCache[i])return us.widthCache[i];try{var a=document.getElementById(_A);a||(a=document.createElement("span"),a.setAttribute("id",_A),a.setAttribute("aria-hidden","true"),document.body.appendChild(a));var o=gx(gx({},Poe),r);Object.assign(a.style,o),a.textContent="".concat(t);var s=a.getBoundingClientRect(),l={width:s.width,height:s.height};return us.widthCache[i]=l,++us.cacheCount>joe&&(us.cacheCount=0,us.widthCache={}),l}catch{return{width:0,height:0}}},Ooe=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Wu(e){"@babel/helpers - typeof";return Wu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wu(e)}function pp(e,t){return Coe(e)||Toe(e,t)||Eoe(e,t)||Aoe()}function Aoe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Eoe(e,t){if(e){if(typeof e=="string")return kA(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return kA(e,t)}}function kA(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Woe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function LA(e,t){return Goe(e)||Koe(e,t)||qoe(e,t)||Hoe()}function Hoe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qoe(e,t){if(e){if(typeof e=="string")return FA(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return FA(e,t)}}function FA(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:[];return I.reduce(function(F,B){var k=B.word,L=B.width,R=F[F.length-1];if(R&&(i==null||a||R.width+L+rB.width?F:B})};if(!d)return p;for(var m="…",y=function(I){var F=f.slice(0,I),B=OI({breakAll:c,style:l,children:F+m}).wordsWithComputedWidth,k=h(B),L=k.length>o||g(k).width>Number(i);return[L,k]},v=0,x=f.length-1,b=0,P;v<=x&&b<=f.length-1;){var S=Math.floor((v+x)/2),j=S-1,N=y(j),O=LA(N,2),A=O[0],E=O[1],T=y(S),C=LA(T,1),D=C[0];if(!A&&!D&&(v=S+1),A&&D&&(x=S-1),!A&&D){P=E;break}b++}return P||p},BA=function(t){var n=be(t)?[]:t.toString().split(NI);return[{words:n}]},Xoe=function(t){var n=t.width,r=t.scaleToFit,i=t.children,a=t.style,o=t.breakAll,s=t.maxLines;if((n||r)&&!wi.isSsr){var l,c,d=OI({breakAll:o,children:i,style:a});if(d){var f=d.wordsWithComputedWidth,h=d.spaceWidth;l=f,c=h}else return BA(i);return Yoe({breakAll:o,children:i,maxLines:s,style:a},l,c,n,r)}return BA(i)},zA="#808080",mp=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,a=i===void 0?0:i,o=t.lineHeight,s=o===void 0?"1em":o,l=t.capHeight,c=l===void 0?"0.71em":l,d=t.scaleToFit,f=d===void 0?!1:d,h=t.textAnchor,p=h===void 0?"start":h,g=t.verticalAnchor,m=g===void 0?"end":g,y=t.fill,v=y===void 0?zA:y,x=IA(t,Voe),b=w.useMemo(function(){return Xoe({breakAll:x.breakAll,children:x.children,maxLines:x.maxLines,scaleToFit:f,style:x.style,width:x.width})},[x.breakAll,x.children,x.maxLines,f,x.style,x.width]),P=x.dx,S=x.dy,j=x.angle,N=x.className,O=x.breakAll,A=IA(x,Uoe);if(!Nt(r)||!Nt(a))return null;var E=r+(G(P)?P:0),T=a+(G(S)?S:0),C;switch(m){case"start":C=Hv("calc(".concat(c,")"));break;case"middle":C=Hv("calc(".concat((b.length-1)/2," * -").concat(s," + (").concat(c," / 2))"));break;default:C=Hv("calc(".concat(b.length-1," * -").concat(s,")"));break}var D=[];if(f){var M=b[0].width,I=x.width;D.push("scale(".concat((G(I)?I/M:1)/M,")"))}return j&&D.push("rotate(".concat(j,", ").concat(E,", ").concat(T,")")),D.length&&(A.transform=D.join(" ")),$.createElement("text",xx({},ve(A,!0),{x:E,y:T,className:Se("recharts-text",N),textAnchor:p,fill:v.includes("url")?zA:v}),b.map(function(F,B){var k=F.words.join(O?"":" ");return $.createElement("tspan",{x:E,dy:B===0?C:s,key:"".concat(k,"-").concat(B)},k)}))};function Aa(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function Qoe(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function tS(e){let t,n,r;e.length!==2?(t=Aa,n=(s,l)=>Aa(e(s),l),r=(s,l)=>e(s)-l):(t=e===Aa||e===Qoe?e:Zoe,n=e,r=e);function i(s,l,c=0,d=s.length){if(c>>1;n(s[f],l)<0?c=f+1:d=f}while(c>>1;n(s[f],l)<=0?c=f+1:d=f}while(cc&&r(s[f-1],l)>-r(s[f],l)?f-1:f}return{left:i,center:o,right:a}}function Zoe(){return 0}function AI(e){return e===null?NaN:+e}function*Joe(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const ese=tS(Aa),Vd=ese.right;tS(AI).center;class VA extends Map{constructor(t,n=rse){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(UA(this,t))}has(t){return super.has(UA(this,t))}set(t,n){return super.set(tse(this,t),n)}delete(t){return super.delete(nse(this,t))}}function UA({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function tse({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function nse({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function rse(e){return e!==null&&typeof e=="object"?e.valueOf():e}function ise(e=Aa){if(e===Aa)return EI;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function EI(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const ase=Math.sqrt(50),ose=Math.sqrt(10),sse=Math.sqrt(2);function yp(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/Math.pow(10,i),o=a>=ase?10:a>=ose?5:a>=sse?2:1;let s,l,c;return i<0?(c=Math.pow(10,-i)/o,s=Math.round(e*c),l=Math.round(t*c),s/ct&&--l,c=-c):(c=Math.pow(10,i)*o,s=Math.round(e/c),l=Math.round(t/c),s*ct&&--l),l0))return[];if(e===t)return[e];const r=t=i))return[];const s=a-i+1,l=new Array(s);if(r)if(o<0)for(let c=0;c=r)&&(n=r);return n}function HA(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function TI(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?EI:ise(i);r>n;){if(r-n>600){const l=r-n+1,c=t-n+1,d=Math.log(l),f=.5*Math.exp(2*d/3),h=.5*Math.sqrt(d*f*(l-f)/l)*(c-l/2<0?-1:1),p=Math.max(n,Math.floor(t-c*f/l+h)),g=Math.min(r,Math.floor(t+(l-c)*f/l+h));TI(e,t,p,g,i)}const a=e[t];let o=n,s=r;for(kc(e,n,t),i(e[r],a)>0&&kc(e,n,r);o0;)--s}i(e[n],a)===0?kc(e,n,s):(++s,kc(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function kc(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function lse(e,t,n){if(e=Float64Array.from(Joe(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return HA(e);if(t>=1)return WA(e);var r,i=(r-1)*t,a=Math.floor(i),o=WA(TI(e,a).subarray(0,a+1)),s=HA(e.subarray(a+1));return o+(s-o)*(i-a)}}function cse(e,t,n=AI){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,a=Math.floor(i),o=+n(e[a],a,e),s=+n(e[a+1],a+1,e);return o+(s-o)*(i-a)}}function use(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=new Array(i);++r>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Mf(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Mf(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=fse.exec(e))?new fn(t[1],t[2],t[3],1):(t=hse.exec(e))?new fn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=pse.exec(e))?Mf(t[1],t[2],t[3],t[4]):(t=mse.exec(e))?Mf(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=yse.exec(e))?ZA(t[1],t[2]/100,t[3]/100,1):(t=vse.exec(e))?ZA(t[1],t[2]/100,t[3]/100,t[4]):qA.hasOwnProperty(e)?YA(qA[e]):e==="transparent"?new fn(NaN,NaN,NaN,0):null}function YA(e){return new fn(e>>16&255,e>>8&255,e&255,1)}function Mf(e,t,n,r){return r<=0&&(e=t=n=NaN),new fn(e,t,n,r)}function bse(e){return e instanceof Ud||(e=Gu(e)),e?(e=e.rgb(),new fn(e.r,e.g,e.b,e.opacity)):new fn}function Px(e,t,n,r){return arguments.length===1?bse(e):new fn(e,t,n,r??1)}function fn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}rS(fn,Px,_I(Ud,{brighter(e){return e=e==null?vp:Math.pow(vp,e),new fn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?qu:Math.pow(qu,e),new fn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new fn(Eo(this.r),Eo(this.g),Eo(this.b),gp(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:XA,formatHex:XA,formatHex8:wse,formatRgb:QA,toString:QA}));function XA(){return`#${ho(this.r)}${ho(this.g)}${ho(this.b)}`}function wse(){return`#${ho(this.r)}${ho(this.g)}${ho(this.b)}${ho((isNaN(this.opacity)?1:this.opacity)*255)}`}function QA(){const e=gp(this.opacity);return`${e===1?"rgb(":"rgba("}${Eo(this.r)}, ${Eo(this.g)}, ${Eo(this.b)}${e===1?")":`, ${e})`}`}function gp(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Eo(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ho(e){return e=Eo(e),(e<16?"0":"")+e.toString(16)}function ZA(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new br(e,t,n,r)}function kI(e){if(e instanceof br)return new br(e.h,e.s,e.l,e.opacity);if(e instanceof Ud||(e=Gu(e)),!e)return new br;if(e instanceof br)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,l=(a+i)/2;return s?(t===a?o=(n-r)/s+(n0&&l<1?0:o,new br(o,s,l,e.opacity)}function Sse(e,t,n,r){return arguments.length===1?kI(e):new br(e,t,n,r??1)}function br(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}rS(br,Sse,_I(Ud,{brighter(e){return e=e==null?vp:Math.pow(vp,e),new br(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?qu:Math.pow(qu,e),new br(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new fn(qv(e>=240?e-240:e+120,i,r),qv(e,i,r),qv(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new br(JA(this.h),Rf(this.s),Rf(this.l),gp(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=gp(this.opacity);return`${e===1?"hsl(":"hsla("}${JA(this.h)}, ${Rf(this.s)*100}%, ${Rf(this.l)*100}%${e===1?")":`, ${e})`}`}}));function JA(e){return e=(e||0)%360,e<0?e+360:e}function Rf(e){return Math.max(0,Math.min(1,e||0))}function qv(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const iS=e=>()=>e;function jse(e,t){return function(n){return e+n*t}}function Pse(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function Nse(e){return(e=+e)==1?$I:function(t,n){return n-t?Pse(t,n,e):iS(isNaN(t)?n:t)}}function $I(e,t){var n=t-e;return n?jse(e,n):iS(isNaN(e)?t:e)}const eE=function e(t){var n=Nse(t);function r(i,a){var o=n((i=Px(i)).r,(a=Px(a)).r),s=n(i.g,a.g),l=n(i.b,a.b),c=$I(i.opacity,a.opacity);return function(d){return i.r=o(d),i.g=s(d),i.b=l(d),i.opacity=c(d),i+""}}return r.gamma=e,r}(1);function Ose(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;in&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,l.push({i:o,x:xp(r,i)})),n=Kv.lastIndex;return nt&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function Ise(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i2?Lse:Ise,l=c=null,f}function f(h){return h==null||isNaN(h=+h)?a:(l||(l=s(e.map(r),t,n)))(r(o(h)))}return f.invert=function(h){return o(i((c||(c=s(t,e.map(r),xp)))(h)))},f.domain=function(h){return arguments.length?(e=Array.from(h,bp),d()):e.slice()},f.range=function(h){return arguments.length?(t=Array.from(h),d()):t.slice()},f.rangeRound=function(h){return t=Array.from(h),n=aS,d()},f.clamp=function(h){return arguments.length?(o=h?!0:nn,d()):o!==nn},f.interpolate=function(h){return arguments.length?(n=h,d()):n},f.unknown=function(h){return arguments.length?(a=h,f):a},function(h,p){return r=h,i=p,d()}}function oS(){return ty()(nn,nn)}function Fse(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function wp(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Cl(e){return e=wp(Math.abs(e)),e?e[1]:NaN}function Bse(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),a.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function zse(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var Vse=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Yu(e){if(!(t=Vse.exec(e)))throw new Error("invalid format: "+e);var t;return new sS({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Yu.prototype=sS.prototype;function sS(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}sS.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Use(e){e:for(var t=e.length,n=1,r=-1,i;n0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var MI;function Wse(e,t){var n=wp(e,t);if(!n)return e+"";var r=n[0],i=n[1],a=i-(MI=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+wp(e,Math.max(0,t+a-1))[0]}function nE(e,t){var n=wp(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const rE={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:Fse,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>nE(e*100,t),r:nE,s:Wse,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function iE(e){return e}var aE=Array.prototype.map,oE=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Hse(e){var t=e.grouping===void 0||e.thousands===void 0?iE:Bse(aE.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?iE:zse(aE.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(f){f=Yu(f);var h=f.fill,p=f.align,g=f.sign,m=f.symbol,y=f.zero,v=f.width,x=f.comma,b=f.precision,P=f.trim,S=f.type;S==="n"?(x=!0,S="g"):rE[S]||(b===void 0&&(b=12),P=!0,S="g"),(y||h==="0"&&p==="=")&&(y=!0,h="0",p="=");var j=m==="$"?n:m==="#"&&/[boxX]/.test(S)?"0"+S.toLowerCase():"",N=m==="$"?r:/[%p]/.test(S)?o:"",O=rE[S],A=/[defgprs%]/.test(S);b=b===void 0?6:/[gprs]/.test(S)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b));function E(T){var C=j,D=N,M,I,F;if(S==="c")D=O(T)+D,T="";else{T=+T;var B=T<0||1/T<0;if(T=isNaN(T)?l:O(Math.abs(T),b),P&&(T=Use(T)),B&&+T==0&&g!=="+"&&(B=!1),C=(B?g==="("?g:s:g==="-"||g==="("?"":g)+C,D=(S==="s"?oE[8+MI/3]:"")+D+(B&&g==="("?")":""),A){for(M=-1,I=T.length;++MF||F>57){D=(F===46?i+T.slice(M+1):T.slice(M))+D,T=T.slice(0,M);break}}}x&&!y&&(T=t(T,1/0));var k=C.length+T.length+D.length,L=k>1)+C+T+D+L.slice(k);break;default:T=L+C+T+D;break}return a(T)}return E.toString=function(){return f+""},E}function d(f,h){var p=c((f=Yu(f),f.type="f",f)),g=Math.max(-8,Math.min(8,Math.floor(Cl(h)/3)))*3,m=Math.pow(10,-g),y=oE[8+g/3];return function(v){return p(m*v)+y}}return{format:c,formatPrefix:d}}var Df,lS,RI;qse({thousands:",",grouping:[3],currency:["$",""]});function qse(e){return Df=Hse(e),lS=Df.format,RI=Df.formatPrefix,Df}function Kse(e){return Math.max(0,-Cl(Math.abs(e)))}function Gse(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Cl(t)/3)))*3-Cl(Math.abs(e)))}function Yse(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Cl(t)-Cl(e))+1}function DI(e,t,n,r){var i=Sx(e,t,n),a;switch(r=Yu(r??",f"),r.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=Gse(i,o))&&(r.precision=a),RI(r,o)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(a=Yse(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(a=Kse(i))&&(r.precision=a-(r.type==="%")*2);break}}return lS(r)}function Ka(e){var t=e.domain;return e.ticks=function(n){var r=t();return bx(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return DI(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],l,c,d=10;for(s0;){if(c=wx(o,s,n),c===l)return r[i]=o,r[a]=s,t(r);if(c>0)o=Math.floor(o/c)*c,s=Math.ceil(s/c)*c;else if(c<0)o=Math.ceil(o*c)/c,s=Math.floor(s*c)/c;else break;l=c}return e},e}function Sp(){var e=oS();return e.copy=function(){return Wd(e,Sp())},lr.apply(e,arguments),Ka(e)}function II(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,bp),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return II(e).unknown(t)},e=arguments.length?Array.from(e,bp):[0,1],Ka(n)}function LI(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return aMath.pow(e,t)}function ele(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function cE(e){return(t,n)=>-e(-t,n)}function cS(e){const t=e(sE,lE),n=t.domain;let r=10,i,a;function o(){return i=ele(r),a=Jse(r),n()[0]<0?(i=cE(i),a=cE(a),e(Xse,Qse)):e(sE,lE),t}return t.base=function(s){return arguments.length?(r=+s,o()):r},t.domain=function(s){return arguments.length?(n(s),o()):n()},t.ticks=s=>{const l=n();let c=l[0],d=l[l.length-1];const f=d0){for(;h<=p;++h)for(g=1;gd)break;v.push(m)}}else for(;h<=p;++h)for(g=r-1;g>=1;--g)if(m=h>0?g/a(-h):g*a(h),!(md)break;v.push(m)}v.length*2{if(s==null&&(s=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=Yu(l)).precision==null&&(l.trim=!0),l=lS(l)),s===1/0)return l;const c=Math.max(1,r*s/t.ticks().length);return d=>{let f=d/a(Math.round(i(d)));return f*rn(LI(n(),{floor:s=>a(Math.floor(i(s))),ceil:s=>a(Math.ceil(i(s)))})),t}function FI(){const e=cS(ty()).domain([1,10]);return e.copy=()=>Wd(e,FI()).base(e.base()),lr.apply(e,arguments),e}function uE(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function dE(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function uS(e){var t=1,n=e(uE(t),dE(t));return n.constant=function(r){return arguments.length?e(uE(t=+r),dE(t)):t},Ka(n)}function BI(){var e=uS(ty());return e.copy=function(){return Wd(e,BI()).constant(e.constant())},lr.apply(e,arguments)}function fE(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function tle(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function nle(e){return e<0?-e*e:e*e}function dS(e){var t=e(nn,nn),n=1;function r(){return n===1?e(nn,nn):n===.5?e(tle,nle):e(fE(n),fE(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},Ka(t)}function fS(){var e=dS(ty());return e.copy=function(){return Wd(e,fS()).exponent(e.exponent())},lr.apply(e,arguments),e}function rle(){return fS.apply(null,arguments).exponent(.5)}function hE(e){return Math.sign(e)*e*e}function ile(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function zI(){var e=oS(),t=[0,1],n=!1,r;function i(a){var o=ile(e(a));return isNaN(o)?r:n?Math.round(o):o}return i.invert=function(a){return e.invert(hE(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,bp)).map(hE)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(n=!!a,i):n},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return zI(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},lr.apply(i,arguments),Ka(i)}function VI(){var e=[],t=[],n=[],r;function i(){var o=0,s=Math.max(1,t.length);for(n=new Array(s-1);++o0?n[s-1]:e[0],s=n?[r[n-1],t]:[r[c-1],r[c]]},o.unknown=function(l){return arguments.length&&(a=l),o},o.thresholds=function(){return r.slice()},o.copy=function(){return UI().domain([e,t]).range(i).unknown(a)},lr.apply(Ka(o),arguments)}function WI(){var e=[.5],t=[0,1],n,r=1;function i(a){return a!=null&&a<=a?t[Vd(e,a,0,r)]:n}return i.domain=function(a){return arguments.length?(e=Array.from(a),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var o=t.indexOf(a);return[e[o-1],e[o]]},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return WI().domain(e).range(t).unknown(n)},lr.apply(i,arguments)}const Gv=new Date,Yv=new Date;function Ot(e,t,n,r){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const o=i(a),s=i.ceil(a);return a-o(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,s)=>{const l=[];if(a=i.ceil(a),s=s==null?1:Math.floor(s),!(a0))return l;let c;do l.push(c=new Date(+a)),t(a,s),e(a);while(cOt(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!a(o););else for(;--s>=0;)for(;t(o,1),!a(o););}),n&&(i.count=(a,o)=>(Gv.setTime(+a),Yv.setTime(+o),e(Gv),e(Yv),Math.floor(n(Gv,Yv))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(r?o=>r(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const jp=Ot(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);jp.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Ot(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):jp);jp.range;const fi=1e3,er=fi*60,hi=er*60,_i=hi*24,hS=_i*7,pE=_i*30,Xv=_i*365,po=Ot(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*fi)},(e,t)=>(t-e)/fi,e=>e.getUTCSeconds());po.range;const pS=Ot(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*fi)},(e,t)=>{e.setTime(+e+t*er)},(e,t)=>(t-e)/er,e=>e.getMinutes());pS.range;const mS=Ot(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*er)},(e,t)=>(t-e)/er,e=>e.getUTCMinutes());mS.range;const yS=Ot(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*fi-e.getMinutes()*er)},(e,t)=>{e.setTime(+e+t*hi)},(e,t)=>(t-e)/hi,e=>e.getHours());yS.range;const vS=Ot(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*hi)},(e,t)=>(t-e)/hi,e=>e.getUTCHours());vS.range;const Hd=Ot(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*er)/_i,e=>e.getDate()-1);Hd.range;const ny=Ot(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/_i,e=>e.getUTCDate()-1);ny.range;const HI=Ot(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/_i,e=>Math.floor(e/_i));HI.range;function ts(e){return Ot(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*er)/hS)}const ry=ts(0),Pp=ts(1),ale=ts(2),ole=ts(3),_l=ts(4),sle=ts(5),lle=ts(6);ry.range;Pp.range;ale.range;ole.range;_l.range;sle.range;lle.range;function ns(e){return Ot(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/hS)}const iy=ns(0),Np=ns(1),cle=ns(2),ule=ns(3),kl=ns(4),dle=ns(5),fle=ns(6);iy.range;Np.range;cle.range;ule.range;kl.range;dle.range;fle.range;const gS=Ot(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());gS.range;const xS=Ot(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());xS.range;const ki=Ot(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());ki.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ot(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});ki.range;const $i=Ot(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());$i.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Ot(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});$i.range;function qI(e,t,n,r,i,a){const o=[[po,1,fi],[po,5,5*fi],[po,15,15*fi],[po,30,30*fi],[a,1,er],[a,5,5*er],[a,15,15*er],[a,30,30*er],[i,1,hi],[i,3,3*hi],[i,6,6*hi],[i,12,12*hi],[r,1,_i],[r,2,2*_i],[n,1,hS],[t,1,pE],[t,3,3*pE],[e,1,Xv]];function s(c,d,f){const h=dy).right(o,h);if(p===o.length)return e.every(Sx(c/Xv,d/Xv,f));if(p===0)return jp.every(Math.max(Sx(c,d,f),1));const[g,m]=o[h/o[p-1][2]53)return null;"w"in V||(V.w=1),"Z"in V?(oe=Zv($c(V.y,0,1)),Ne=oe.getUTCDay(),oe=Ne>4||Ne===0?Np.ceil(oe):Np(oe),oe=ny.offset(oe,(V.V-1)*7),V.y=oe.getUTCFullYear(),V.m=oe.getUTCMonth(),V.d=oe.getUTCDate()+(V.w+6)%7):(oe=Qv($c(V.y,0,1)),Ne=oe.getDay(),oe=Ne>4||Ne===0?Pp.ceil(oe):Pp(oe),oe=Hd.offset(oe,(V.V-1)*7),V.y=oe.getFullYear(),V.m=oe.getMonth(),V.d=oe.getDate()+(V.w+6)%7)}else("W"in V||"U"in V)&&("w"in V||(V.w="u"in V?V.u%7:"W"in V?1:0),Ne="Z"in V?Zv($c(V.y,0,1)).getUTCDay():Qv($c(V.y,0,1)).getDay(),V.m=0,V.d="W"in V?(V.w+6)%7+V.W*7-(Ne+5)%7:V.w+V.U*7-(Ne+6)%7);return"Z"in V?(V.H+=V.Z/100|0,V.M+=V.Z%100,Zv(V)):Qv(V)}}function O(X,ne,re,V){for(var ye=0,oe=ne.length,Ne=re.length,se,et;ye=Ne)return-1;if(se=ne.charCodeAt(ye++),se===37){if(se=ne.charAt(ye++),et=S[se in mE?ne.charAt(ye++):se],!et||(V=et(X,re,V))<0)return-1}else if(se!=re.charCodeAt(V++))return-1}return V}function A(X,ne,re){var V=c.exec(ne.slice(re));return V?(X.p=d.get(V[0].toLowerCase()),re+V[0].length):-1}function E(X,ne,re){var V=p.exec(ne.slice(re));return V?(X.w=g.get(V[0].toLowerCase()),re+V[0].length):-1}function T(X,ne,re){var V=f.exec(ne.slice(re));return V?(X.w=h.get(V[0].toLowerCase()),re+V[0].length):-1}function C(X,ne,re){var V=v.exec(ne.slice(re));return V?(X.m=x.get(V[0].toLowerCase()),re+V[0].length):-1}function D(X,ne,re){var V=m.exec(ne.slice(re));return V?(X.m=y.get(V[0].toLowerCase()),re+V[0].length):-1}function M(X,ne,re){return O(X,t,ne,re)}function I(X,ne,re){return O(X,n,ne,re)}function F(X,ne,re){return O(X,r,ne,re)}function B(X){return o[X.getDay()]}function k(X){return a[X.getDay()]}function L(X){return l[X.getMonth()]}function R(X){return s[X.getMonth()]}function q(X){return i[+(X.getHours()>=12)]}function W(X){return 1+~~(X.getMonth()/3)}function ee(X){return o[X.getUTCDay()]}function le(X){return a[X.getUTCDay()]}function Pe(X){return l[X.getUTCMonth()]}function Me(X){return s[X.getUTCMonth()]}function st(X){return i[+(X.getUTCHours()>=12)]}function Ae(X){return 1+~~(X.getUTCMonth()/3)}return{format:function(X){var ne=j(X+="",b);return ne.toString=function(){return X},ne},parse:function(X){var ne=N(X+="",!1);return ne.toString=function(){return X},ne},utcFormat:function(X){var ne=j(X+="",P);return ne.toString=function(){return X},ne},utcParse:function(X){var ne=N(X+="",!0);return ne.toString=function(){return X},ne}}}var mE={"-":"",_:" ",0:"0"},kt=/^\s*\d+/,gle=/^%/,xle=/[\\^$*+?|[\]().{}]/g;function Oe(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",a=i.length;return r+(a[t.toLowerCase(),n]))}function wle(e,t,n){var r=kt.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Sle(e,t,n){var r=kt.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function jle(e,t,n){var r=kt.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Ple(e,t,n){var r=kt.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Nle(e,t,n){var r=kt.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function yE(e,t,n){var r=kt.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function vE(e,t,n){var r=kt.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Ole(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Ale(e,t,n){var r=kt.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Ele(e,t,n){var r=kt.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function gE(e,t,n){var r=kt.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Tle(e,t,n){var r=kt.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function xE(e,t,n){var r=kt.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Cle(e,t,n){var r=kt.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function _le(e,t,n){var r=kt.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function kle(e,t,n){var r=kt.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function $le(e,t,n){var r=kt.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Mle(e,t,n){var r=gle.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Rle(e,t,n){var r=kt.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Dle(e,t,n){var r=kt.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function bE(e,t){return Oe(e.getDate(),t,2)}function Ile(e,t){return Oe(e.getHours(),t,2)}function Lle(e,t){return Oe(e.getHours()%12||12,t,2)}function Fle(e,t){return Oe(1+Hd.count(ki(e),e),t,3)}function KI(e,t){return Oe(e.getMilliseconds(),t,3)}function Ble(e,t){return KI(e,t)+"000"}function zle(e,t){return Oe(e.getMonth()+1,t,2)}function Vle(e,t){return Oe(e.getMinutes(),t,2)}function Ule(e,t){return Oe(e.getSeconds(),t,2)}function Wle(e){var t=e.getDay();return t===0?7:t}function Hle(e,t){return Oe(ry.count(ki(e)-1,e),t,2)}function GI(e){var t=e.getDay();return t>=4||t===0?_l(e):_l.ceil(e)}function qle(e,t){return e=GI(e),Oe(_l.count(ki(e),e)+(ki(e).getDay()===4),t,2)}function Kle(e){return e.getDay()}function Gle(e,t){return Oe(Pp.count(ki(e)-1,e),t,2)}function Yle(e,t){return Oe(e.getFullYear()%100,t,2)}function Xle(e,t){return e=GI(e),Oe(e.getFullYear()%100,t,2)}function Qle(e,t){return Oe(e.getFullYear()%1e4,t,4)}function Zle(e,t){var n=e.getDay();return e=n>=4||n===0?_l(e):_l.ceil(e),Oe(e.getFullYear()%1e4,t,4)}function Jle(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Oe(t/60|0,"0",2)+Oe(t%60,"0",2)}function wE(e,t){return Oe(e.getUTCDate(),t,2)}function ece(e,t){return Oe(e.getUTCHours(),t,2)}function tce(e,t){return Oe(e.getUTCHours()%12||12,t,2)}function nce(e,t){return Oe(1+ny.count($i(e),e),t,3)}function YI(e,t){return Oe(e.getUTCMilliseconds(),t,3)}function rce(e,t){return YI(e,t)+"000"}function ice(e,t){return Oe(e.getUTCMonth()+1,t,2)}function ace(e,t){return Oe(e.getUTCMinutes(),t,2)}function oce(e,t){return Oe(e.getUTCSeconds(),t,2)}function sce(e){var t=e.getUTCDay();return t===0?7:t}function lce(e,t){return Oe(iy.count($i(e)-1,e),t,2)}function XI(e){var t=e.getUTCDay();return t>=4||t===0?kl(e):kl.ceil(e)}function cce(e,t){return e=XI(e),Oe(kl.count($i(e),e)+($i(e).getUTCDay()===4),t,2)}function uce(e){return e.getUTCDay()}function dce(e,t){return Oe(Np.count($i(e)-1,e),t,2)}function fce(e,t){return Oe(e.getUTCFullYear()%100,t,2)}function hce(e,t){return e=XI(e),Oe(e.getUTCFullYear()%100,t,2)}function pce(e,t){return Oe(e.getUTCFullYear()%1e4,t,4)}function mce(e,t){var n=e.getUTCDay();return e=n>=4||n===0?kl(e):kl.ceil(e),Oe(e.getUTCFullYear()%1e4,t,4)}function yce(){return"+0000"}function SE(){return"%"}function jE(e){return+e}function PE(e){return Math.floor(+e/1e3)}var ds,QI,ZI;vce({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function vce(e){return ds=vle(e),QI=ds.format,ds.parse,ZI=ds.utcFormat,ds.utcParse,ds}function gce(e){return new Date(e)}function xce(e){return e instanceof Date?+e:+new Date(+e)}function bS(e,t,n,r,i,a,o,s,l,c){var d=oS(),f=d.invert,h=d.domain,p=c(".%L"),g=c(":%S"),m=c("%I:%M"),y=c("%I %p"),v=c("%a %d"),x=c("%b %d"),b=c("%B"),P=c("%Y");function S(j){return(l(j)t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,a)=>lse(e,a/r))},n.copy=function(){return nL(t).domain(e)},Fi.apply(n,arguments)}function oy(){var e=0,t=.5,n=1,r=1,i,a,o,s,l,c=nn,d,f=!1,h;function p(m){return isNaN(m=+m)?h:(m=.5+((m=+d(m))-a)*(r*mt}var Ace=Oce,Ece=oL,Tce=Ace,Cce=uc;function _ce(e){return e&&e.length?Ece(e,Cce,Tce):void 0}var kce=_ce;const ma=Ie(kce);function $ce(e,t){return ee.e^a.s<0?1:-1;for(r=a.d.length,i=e.d.length,t=0,n=re.d[t]^a.s<0?1:-1;return r===i?0:r>i^a.s<0?1:-1};J.decimalPlaces=J.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*Ye;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};J.dividedBy=J.div=function(e){return Si(this,new this.constructor(e))};J.dividedToIntegerBy=J.idiv=function(e){var t=this,n=t.constructor;return ze(Si(t,new n(e),0,1),n.precision)};J.equals=J.eq=function(e){return!this.cmp(e)};J.exponent=function(){return bt(this)};J.greaterThan=J.gt=function(e){return this.cmp(e)>0};J.greaterThanOrEqualTo=J.gte=function(e){return this.cmp(e)>=0};J.isInteger=J.isint=function(){return this.e>this.d.length-2};J.isNegative=J.isneg=function(){return this.s<0};J.isPositive=J.ispos=function(){return this.s>0};J.isZero=function(){return this.s===0};J.lessThan=J.lt=function(e){return this.cmp(e)<0};J.lessThanOrEqualTo=J.lte=function(e){return this.cmp(e)<1};J.logarithm=J.log=function(e){var t,n=this,r=n.constructor,i=r.precision,a=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Nn))throw Error(or+"NaN");if(n.s<1)throw Error(or+(n.s?"NaN":"-Infinity"));return n.eq(Nn)?new r(0):(Je=!1,t=Si(Qu(n,a),Qu(e,a),a),Je=!0,ze(t,i))};J.minus=J.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?uL(t,e):lL(t,(e.s=-e.s,e))};J.modulo=J.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(or+"NaN");return n.s?(Je=!1,t=Si(n,e,0,1).times(e),Je=!0,n.minus(t)):ze(new r(n),i)};J.naturalExponential=J.exp=function(){return cL(this)};J.naturalLogarithm=J.ln=function(){return Qu(this)};J.negated=J.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};J.plus=J.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?lL(t,e):uL(t,(e.s=-e.s,e))};J.precision=J.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(To+e);if(t=bt(i)+1,r=i.d.length-1,n=r*Ye+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};J.squareRoot=J.sqrt=function(){var e,t,n,r,i,a,o,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(or+"NaN")}for(e=bt(s),Je=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=Ur(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=hc((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new l(t)):r=new l(i.toString()),n=l.precision,i=o=n+3;;)if(a=r,r=a.plus(Si(s,a,o+2)).times(.5),Ur(a.d).slice(0,o)===(t=Ur(r.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if(ze(a,n+1,0),a.times(a).eq(s)){r=a;break}}else if(t!="9999")break;o+=4}return Je=!0,ze(r,n)};J.times=J.mul=function(e){var t,n,r,i,a,o,s,l,c,d=this,f=d.constructor,h=d.d,p=(e=new f(e)).d;if(!d.s||!e.s)return new f(0);for(e.s*=d.s,n=d.e+e.e,l=h.length,c=p.length,l=0;){for(t=0,i=l+r;i>r;)s=a[i]+p[r]*h[i-r-1]+t,a[i--]=s%At|0,t=s/At|0;a[i]=(a[i]+t)%At|0}for(;!a[--o];)a.pop();return t?++n:a.shift(),e.d=a,e.e=n,Je?ze(e,f.precision):e};J.toDecimalPlaces=J.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Jr(e,0,fc),t===void 0?t=r.rounding:Jr(t,0,8),ze(n,e+bt(n)+1,t))};J.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=Wo(r,!0):(Jr(e,0,fc),t===void 0?t=i.rounding:Jr(t,0,8),r=ze(new i(r),e+1,t),n=Wo(r,!0,e+1)),n};J.toFixed=function(e,t){var n,r,i=this,a=i.constructor;return e===void 0?Wo(i):(Jr(e,0,fc),t===void 0?t=a.rounding:Jr(t,0,8),r=ze(new a(i),e+bt(i)+1,t),n=Wo(r.abs(),!1,e+bt(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};J.toInteger=J.toint=function(){var e=this,t=e.constructor;return ze(new t(e),bt(e)+1,t.rounding)};J.toNumber=function(){return+this};J.toPower=J.pow=function(e){var t,n,r,i,a,o,s=this,l=s.constructor,c=12,d=+(e=new l(e));if(!e.s)return new l(Nn);if(s=new l(s),!s.s){if(e.s<1)throw Error(or+"Infinity");return s}if(s.eq(Nn))return s;if(r=l.precision,e.eq(Nn))return ze(s,r);if(t=e.e,n=e.d.length-1,o=t>=n,a=s.s,o){if((n=d<0?-d:d)<=sL){for(i=new l(Nn),t=Math.ceil(r/Ye+4),Je=!1;n%2&&(i=i.times(s),AE(i.d,t)),n=hc(n/2),n!==0;)s=s.times(s),AE(s.d,t);return Je=!0,e.s<0?new l(Nn).div(i):ze(i,r)}}else if(a<0)throw Error(or+"NaN");return a=a<0&&e.d[Math.max(t,n)]&1?-1:1,s.s=1,Je=!1,i=e.times(Qu(s,r+c)),Je=!0,i=cL(i),i.s=a,i};J.toPrecision=function(e,t){var n,r,i=this,a=i.constructor;return e===void 0?(n=bt(i),r=Wo(i,n<=a.toExpNeg||n>=a.toExpPos)):(Jr(e,1,fc),t===void 0?t=a.rounding:Jr(t,0,8),i=ze(new a(i),e,t),n=bt(i),r=Wo(i,e<=n||n<=a.toExpNeg,e)),r};J.toSignificantDigits=J.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Jr(e,1,fc),t===void 0?t=r.rounding:Jr(t,0,8)),ze(new r(n),e,t)};J.toString=J.valueOf=J.val=J.toJSON=J[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=bt(e),n=e.constructor;return Wo(e,t<=n.toExpNeg||t>=n.toExpPos)};function lL(e,t){var n,r,i,a,o,s,l,c,d=e.constructor,f=d.precision;if(!e.s||!t.s)return t.s||(t=new d(e)),Je?ze(t,f):t;if(l=e.d,c=t.d,o=e.e,i=t.e,l=l.slice(),a=o-i,a){for(a<0?(r=l,a=-a,s=c.length):(r=c,i=o,s=l.length),o=Math.ceil(f/Ye),s=o>s?o+1:s+1,a>s&&(a=s,r.length=1),r.reverse();a--;)r.push(0);r.reverse()}for(s=l.length,a=c.length,s-a<0&&(a=s,r=c,c=l,l=r),n=0;a;)n=(l[--a]=l[a]+c[a]+n)/At|0,l[a]%=At;for(n&&(l.unshift(n),++i),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=i,Je?ze(t,f):t}function Jr(e,t,n){if(e!==~~e||en)throw Error(To+e)}function Ur(e){var t,n,r,i=e.length-1,a="",o=e[0];if(i>0){for(a+=o,t=1;to?1:-1;else for(s=l=0;si[s]?1:-1;break}return l}function n(r,i,a){for(var o=0;a--;)r[a]-=o,o=r[a]1;)r.shift()}return function(r,i,a,o){var s,l,c,d,f,h,p,g,m,y,v,x,b,P,S,j,N,O,A=r.constructor,E=r.s==i.s?1:-1,T=r.d,C=i.d;if(!r.s)return new A(r);if(!i.s)throw Error(or+"Division by zero");for(l=r.e-i.e,N=C.length,S=T.length,p=new A(E),g=p.d=[],c=0;C[c]==(T[c]||0);)++c;if(C[c]>(T[c]||0)&&--l,a==null?x=a=A.precision:o?x=a+(bt(r)-bt(i))+1:x=a,x<0)return new A(0);if(x=x/Ye+2|0,c=0,N==1)for(d=0,C=C[0],x++;(c1&&(C=e(C,d),T=e(T,d),N=C.length,S=T.length),P=N,m=T.slice(0,N),y=m.length;y=At/2&&++j;do d=0,s=t(C,m,N,y),s<0?(v=m[0],N!=y&&(v=v*At+(m[1]||0)),d=v/j|0,d>1?(d>=At&&(d=At-1),f=e(C,d),h=f.length,y=m.length,s=t(f,m,h,y),s==1&&(d--,n(f,N16)throw Error(jS+bt(e));if(!e.s)return new d(Nn);for(t==null?(Je=!1,s=f):s=t,o=new d(.03125);e.abs().gte(.1);)e=e.times(o),c+=5;for(r=Math.log(oo(2,c))/Math.LN10*2+5|0,s+=r,n=i=a=new d(Nn),d.precision=s;;){if(i=ze(i.times(e),s),n=n.times(++l),o=a.plus(Si(i,n,s)),Ur(o.d).slice(0,s)===Ur(a.d).slice(0,s)){for(;c--;)a=ze(a.times(a),s);return d.precision=f,t==null?(Je=!0,ze(a,f)):a}a=o}}function bt(e){for(var t=e.e*Ye,n=e.d[0];n>=10;n/=10)t++;return t}function Jv(e,t,n){if(t>e.LN10.sd())throw Je=!0,n&&(e.precision=n),Error(or+"LN10 precision limit exceeded");return ze(new e(e.LN10),t)}function Ji(e){for(var t="";e--;)t+="0";return t}function Qu(e,t){var n,r,i,a,o,s,l,c,d,f=1,h=10,p=e,g=p.d,m=p.constructor,y=m.precision;if(p.s<1)throw Error(or+(p.s?"NaN":"-Infinity"));if(p.eq(Nn))return new m(0);if(t==null?(Je=!1,c=y):c=t,p.eq(10))return t==null&&(Je=!0),Jv(m,c);if(c+=h,m.precision=c,n=Ur(g),r=n.charAt(0),a=bt(p),Math.abs(a)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)p=p.times(e),n=Ur(p.d),r=n.charAt(0),f++;a=bt(p),r>1?(p=new m("0."+n),a++):p=new m(r+"."+n.slice(1))}else return l=Jv(m,c+2,y).times(a+""),p=Qu(new m(r+"."+n.slice(1)),c-h).plus(l),m.precision=y,t==null?(Je=!0,ze(p,y)):p;for(s=o=p=Si(p.minus(Nn),p.plus(Nn),c),d=ze(p.times(p),c),i=3;;){if(o=ze(o.times(d),c),l=s.plus(Si(o,new m(i),c)),Ur(l.d).slice(0,c)===Ur(s.d).slice(0,c))return s=s.times(2),a!==0&&(s=s.plus(Jv(m,c+2,y).times(a+""))),s=Si(s,new m(f),c),m.precision=y,t==null?(Je=!0,ze(s,y)):s;s=l,i+=2}}function OE(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(r,i),t){if(i-=r,n=n-r-1,e.e=hc(n/Ye),e.d=[],r=(n+1)%Ye,n<0&&(r+=Ye),rOp||e.e<-Op))throw Error(jS+n)}else e.s=0,e.e=0,e.d=[0];return e}function ze(e,t,n){var r,i,a,o,s,l,c,d,f=e.d;for(o=1,a=f[0];a>=10;a/=10)o++;if(r=t-o,r<0)r+=Ye,i=t,c=f[d=0];else{if(d=Math.ceil((r+1)/Ye),a=f.length,d>=a)return e;for(c=a=f[d],o=1;a>=10;a/=10)o++;r%=Ye,i=r-Ye+o}if(n!==void 0&&(a=oo(10,o-i-1),s=c/a%10|0,l=t<0||f[d+1]!==void 0||c%a,l=n<4?(s||l)&&(n==0||n==(e.s<0?3:2)):s>5||s==5&&(n==4||l||n==6&&(r>0?i>0?c/oo(10,o-i):0:f[d-1])%10&1||n==(e.s<0?8:7))),t<1||!f[0])return l?(a=bt(e),f.length=1,t=t-a-1,f[0]=oo(10,(Ye-t%Ye)%Ye),e.e=hc(-t/Ye)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(r==0?(f.length=d,a=1,d--):(f.length=d+1,a=oo(10,Ye-r),f[d]=i>0?(c/oo(10,o-i)%oo(10,i)|0)*a:0),l)for(;;)if(d==0){(f[0]+=a)==At&&(f[0]=1,++e.e);break}else{if(f[d]+=a,f[d]!=At)break;f[d--]=0,a=1}for(r=f.length;f[--r]===0;)f.pop();if(Je&&(e.e>Op||e.e<-Op))throw Error(jS+bt(e));return e}function uL(e,t){var n,r,i,a,o,s,l,c,d,f,h=e.constructor,p=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),Je?ze(t,p):t;if(l=e.d,f=t.d,r=t.e,c=e.e,l=l.slice(),o=c-r,o){for(d=o<0,d?(n=l,o=-o,s=f.length):(n=f,r=c,s=l.length),i=Math.max(Math.ceil(p/Ye),s)+2,o>i&&(o=i,n.length=1),n.reverse(),i=o;i--;)n.push(0);n.reverse()}else{for(i=l.length,s=f.length,d=i0;--i)l[s++]=0;for(i=f.length;i>o;){if(l[--i]0?a=a.charAt(0)+"."+a.slice(1)+Ji(r):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+Ji(-i-1)+a,n&&(r=n-o)>0&&(a+=Ji(r))):i>=o?(a+=Ji(i+1-o),n&&(r=n-i-1)>0&&(a=a+"."+Ji(r))):((r=i+1)0&&(i+1===o&&(a+="."),a+=Ji(r))),e.s<0?"-"+a:a}function AE(e,t){if(e.length>t)return e.length=t,!0}function dL(e){var t,n,r;function i(a){var o=this;if(!(o instanceof i))return new i(a);if(o.constructor=i,a instanceof i){o.s=a.s,o.e=a.e,o.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(To+a);if(a>0)o.s=1;else if(a<0)a=-a,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(a===~~a&&a<1e7){o.e=0,o.d=[a];return}return OE(o,a.toString())}else if(typeof a!="string")throw Error(To+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,tue.test(a))OE(o,a);else throw Error(To+a)}if(i.prototype=J,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=dL,i.config=i.set=nue,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(To+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(To+n+": "+r);return this}var PS=dL(eue);Nn=new PS(1);const Re=PS;function rue(e){return sue(e)||oue(e)||aue(e)||iue()}function iue(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function aue(e,t){if(e){if(typeof e=="string")return Ax(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ax(e,t)}}function oue(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function sue(e){if(Array.isArray(e))return Ax(e)}function Ax(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t?n.apply(void 0,i):e(t-o,EE(function(){for(var s=arguments.length,l=new Array(s),c=0;ce.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(r=(s=o.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(l){i=!0,a=l}finally{try{!r&&o.return!=null&&o.return()}finally{if(i)throw a}}return n}}function Sue(e){if(Array.isArray(e))return e}function yL(e){var t=Zu(e,2),n=t[0],r=t[1],i=n,a=r;return n>r&&(i=r,a=n),[i,a]}function vL(e,t,n){if(e.lte(0))return new Re(0);var r=cy.getDigitCount(e.toNumber()),i=new Re(10).pow(r),a=e.div(i),o=r!==1?.05:.1,s=new Re(Math.ceil(a.div(o).toNumber())).add(n).mul(o),l=s.mul(i);return t?l:new Re(Math.ceil(l))}function jue(e,t,n){var r=1,i=new Re(e);if(!i.isint()&&n){var a=Math.abs(e);a<1?(r=new Re(10).pow(cy.getDigitCount(e)-1),i=new Re(Math.floor(i.div(r).toNumber())).mul(r)):a>1&&(i=new Re(Math.floor(e)))}else e===0?i=new Re(Math.floor((t-1)/2)):n||(i=new Re(Math.floor(e)));var o=Math.floor((t-1)/2),s=due(uue(function(l){return i.add(new Re(l-o).mul(r)).toNumber()}),Ex);return s(0,t)}function gL(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new Re(0),tickMin:new Re(0),tickMax:new Re(0)};var a=vL(new Re(t).sub(e).div(n-1),r,i),o;e<=0&&t>=0?o=new Re(0):(o=new Re(e).add(t).div(2),o=o.sub(new Re(o).mod(a)));var s=Math.ceil(o.sub(e).div(a).toNumber()),l=Math.ceil(new Re(t).sub(o).div(a).toNumber()),c=s+l+1;return c>n?gL(e,t,n,r,i+1):(c0?l+(n-c):l,s=t>0?s:s+(n-c)),{step:a,tickMin:o.sub(new Re(s).mul(a)),tickMax:o.add(new Re(l).mul(a))})}function Pue(e){var t=Zu(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(i,2),s=yL([n,r]),l=Zu(s,2),c=l[0],d=l[1];if(c===-1/0||d===1/0){var f=d===1/0?[c].concat(Cx(Ex(0,i-1).map(function(){return 1/0}))):[].concat(Cx(Ex(0,i-1).map(function(){return-1/0})),[d]);return n>r?Tx(f):f}if(c===d)return jue(c,i,a);var h=gL(c,d,o,a),p=h.step,g=h.tickMin,m=h.tickMax,y=cy.rangeStep(g,m.add(new Re(.1).mul(p)),p);return n>r?Tx(y):y}function Nue(e,t){var n=Zu(e,2),r=n[0],i=n[1],a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=yL([r,i]),s=Zu(o,2),l=s[0],c=s[1];if(l===-1/0||c===1/0)return[r,i];if(l===c)return[l];var d=Math.max(t,2),f=vL(new Re(c).sub(l).div(d-1),a,0),h=[].concat(Cx(cy.rangeStep(new Re(l),new Re(c).sub(new Re(.99).mul(f)),f)),[c]);return r>i?Tx(h):h}var Oue=pL(Pue),Aue=pL(Nue),Eue="Invariant failed";function Ho(e,t){throw new Error(Eue)}var Tue=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function $l(e){"@babel/helpers - typeof";return $l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$l(e)}function Ap(){return Ap=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Due(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Iue(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Lue(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,a=arguments.length>3?arguments[3]:void 0,o=-1,s=(n=r==null?void 0:r.length)!==null&&n!==void 0?n:0;if(s<=1)return 0;if(a&&a.axisType==="angleAxis"&&Math.abs(Math.abs(a.range[1]-a.range[0])-360)<=1e-6)for(var l=a.range,c=0;c0?i[c-1].coordinate:i[s-1].coordinate,f=i[c].coordinate,h=c>=s-1?i[0].coordinate:i[c+1].coordinate,p=void 0;if(wr(f-d)!==wr(h-f)){var g=[];if(wr(h-f)===wr(l[1]-l[0])){p=h;var m=f+l[1]-l[0];g[0]=Math.min(m,(m+d)/2),g[1]=Math.max(m,(m+d)/2)}else{p=d;var y=h+l[1]-l[0];g[0]=Math.min(f,(y+f)/2),g[1]=Math.max(f,(y+f)/2)}var v=[Math.min(f,(p+f)/2),Math.max(f,(p+f)/2)];if(t>v[0]&&t<=v[1]||t>=g[0]&&t<=g[1]){o=i[c].index;break}}else{var x=Math.min(d,h),b=Math.max(d,h);if(t>(x+f)/2&&t<=(b+f)/2){o=i[c].index;break}}}else for(var P=0;P0&&P(r[P].coordinate+r[P-1].coordinate)/2&&t<=(r[P].coordinate+r[P+1].coordinate)/2||P===s-1&&t>(r[P].coordinate+r[P-1].coordinate)/2){o=r[P].index;break}return o},NS=function(t){var n,r=t,i=r.type.displayName,a=(n=t.type)!==null&&n!==void 0&&n.defaultProps?dt(dt({},t.type.defaultProps),t.props):t.props,o=a.stroke,s=a.fill,l;switch(i){case"Line":l=o;break;case"Area":case"Radar":l=o&&o!=="none"?o:s;break;default:l=s;break}return l},tde=function(t){var n=t.barSize,r=t.totalSize,i=t.stackGroups,a=i===void 0?{}:i;if(!a)return{};for(var o={},s=Object.keys(a),l=0,c=s.length;l=0});if(v&&v.length){var x=v[0].type.defaultProps,b=x!==void 0?dt(dt({},x),v[0].props):v[0].props,P=b.barSize,S=b[y];o[S]||(o[S]=[]);var j=be(P)?n:P;o[S].push({item:v[0],stackList:v.slice(1),barSize:be(j)?void 0:Uo(j,r,0)})}}return o},nde=function(t){var n=t.barGap,r=t.barCategoryGap,i=t.bandSize,a=t.sizeList,o=a===void 0?[]:a,s=t.maxBarSize,l=o.length;if(l<1)return null;var c=Uo(n,i,0,!0),d,f=[];if(o[0].barSize===+o[0].barSize){var h=!1,p=i/l,g=o.reduce(function(P,S){return P+S.barSize||0},0);g+=(l-1)*c,g>=i&&(g-=(l-1)*c,c=0),g>=i&&p>0&&(h=!0,p*=.9,g=l*p);var m=(i-g)/2>>0,y={offset:m-c,size:0};d=o.reduce(function(P,S){var j={item:S.item,position:{offset:y.offset+y.size+c,size:h?p:S.barSize}},N=[].concat(_E(P),[j]);return y=N[N.length-1].position,S.stackList&&S.stackList.length&&S.stackList.forEach(function(O){N.push({item:O,position:y})}),N},f)}else{var v=Uo(r,i,0,!0);i-2*v-(l-1)*c<=0&&(c=0);var x=(i-2*v-(l-1)*c)/l;x>1&&(x>>=0);var b=s===+s?Math.min(x,s):x;d=o.reduce(function(P,S,j){var N=[].concat(_E(P),[{item:S.item,position:{offset:v+(x+c)*j+(x-b)/2,size:b}}]);return S.stackList&&S.stackList.length&&S.stackList.forEach(function(O){N.push({item:O,position:N[N.length-1].position})}),N},f)}return d},rde=function(t,n,r,i){var a=r.children,o=r.width,s=r.margin,l=o-(s.left||0)-(s.right||0),c=SL({children:a,legendWidth:l});if(c){var d=i||{},f=d.width,h=d.height,p=c.align,g=c.verticalAlign,m=c.layout;if((m==="vertical"||m==="horizontal"&&g==="middle")&&p!=="center"&&G(t[p]))return dt(dt({},t),{},Xs({},p,t[p]+(f||0)));if((m==="horizontal"||m==="vertical"&&p==="center")&&g!=="middle"&&G(t[g]))return dt(dt({},t),{},Xs({},g,t[g]+(h||0)))}return t},ide=function(t,n,r){return be(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},jL=function(t,n,r,i,a){var o=n.props.children,s=Pr(o,uy).filter(function(c){return ide(i,a,c.props.direction)});if(s&&s.length){var l=s.map(function(c){return c.props.dataKey});return t.reduce(function(c,d){var f=kn(d,r);if(be(f))return c;var h=Array.isArray(f)?[sy(f),ma(f)]:[f,f],p=l.reduce(function(g,m){var y=kn(d,m,0),v=h[0]-Math.abs(Array.isArray(y)?y[0]:y),x=h[1]+Math.abs(Array.isArray(y)?y[1]:y);return[Math.min(v,g[0]),Math.max(x,g[1])]},[1/0,-1/0]);return[Math.min(p[0],c[0]),Math.max(p[1],c[1])]},[1/0,-1/0])}return null},ade=function(t,n,r,i,a){var o=n.map(function(s){return jL(t,s,r,a,i)}).filter(function(s){return!be(s)});return o&&o.length?o.reduce(function(s,l){return[Math.min(s[0],l[0]),Math.max(s[1],l[1])]},[1/0,-1/0]):null},PL=function(t,n,r,i,a){var o=n.map(function(l){var c=l.props.dataKey;return r==="number"&&c&&jL(t,l,c,i)||cu(t,c,r,a)});if(r==="number")return o.reduce(function(l,c){return[Math.min(l[0],c[0]),Math.max(l[1],c[1])]},[1/0,-1/0]);var s={};return o.reduce(function(l,c){for(var d=0,f=c.length;d=2?wr(s[0]-s[1])*2*c:c,n&&(t.ticks||t.niceTicks)){var d=(t.ticks||t.niceTicks).map(function(f){var h=a?a.indexOf(f):f;return{coordinate:i(h)+c,value:f,offset:c}});return d.filter(function(f){return!sc(f.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(f,h){return{coordinate:i(f)+c,value:f,index:h,offset:c}}):i.ticks&&!r?i.ticks(t.tickCount).map(function(f){return{coordinate:i(f)+c,value:f,offset:c}}):i.domain().map(function(f,h){return{coordinate:i(f)+c,value:a?a[f]:f,index:h,offset:c}})},eg=new WeakMap,If=function(t,n){if(typeof n!="function")return t;eg.has(t)||eg.set(t,new WeakMap);var r=eg.get(t);if(r.has(n))return r.get(n);var i=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,i),i},ode=function(t,n,r){var i=t.scale,a=t.type,o=t.layout,s=t.axisType;if(i==="auto")return o==="radial"&&s==="radiusAxis"?{scale:Hu(),realScaleType:"band"}:o==="radial"&&s==="angleAxis"?{scale:Sp(),realScaleType:"linear"}:a==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:lu(),realScaleType:"point"}:a==="category"?{scale:Hu(),realScaleType:"band"}:{scale:Sp(),realScaleType:"linear"};if(Fd(i)){var l="scale".concat(Gm(i));return{scale:(NE[l]||lu)(),realScaleType:NE[l]?l:"point"}}return he(i)?{scale:i}:{scale:lu(),realScaleType:"point"}},$E=1e-4,sde=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,i=t.range(),a=Math.min(i[0],i[1])-$E,o=Math.max(i[0],i[1])+$E,s=t(n[0]),l=t(n[r-1]);(so||lo)&&t.domain([n[0],n[r-1]])}},lde=function(t,n){if(!t)return null;for(var r=0,i=t.length;ri)&&(a[1]=i),a[0]>i&&(a[0]=i),a[1]=0?(t[s][r][0]=a,t[s][r][1]=a+l,a=t[s][r][1]):(t[s][r][0]=o,t[s][r][1]=o+l,o=t[s][r][1])}},dde=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r=0?(t[o][r][0]=a,t[o][r][1]=a+s,a=t[o][r][1]):(t[o][r][0]=0,t[o][r][1]=0)}},fde={sign:ude,expand:AQ,none:Nl,silhouette:EQ,wiggle:TQ,positive:dde},hde=function(t,n,r){var i=n.map(function(s){return s.props.dataKey}),a=fde[r],o=OQ().keys(i).value(function(s,l){return+kn(s,l,0)}).order(rx).offset(a);return o(t)},pde=function(t,n,r,i,a,o){if(!t)return null;var s=o?n.reverse():n,l={},c=s.reduce(function(f,h){var p,g=(p=h.type)!==null&&p!==void 0&&p.defaultProps?dt(dt({},h.type.defaultProps),h.props):h.props,m=g.stackId,y=g.hide;if(y)return f;var v=g[r],x=f[v]||{hasStack:!1,stackGroups:{}};if(Nt(m)){var b=x.stackGroups[m]||{numericAxisId:r,cateAxisId:i,items:[]};b.items.push(h),x.hasStack=!0,x.stackGroups[m]=b}else x.stackGroups[Bd("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[h]};return dt(dt({},f),{},Xs({},v,x))},l),d={};return Object.keys(c).reduce(function(f,h){var p=c[h];if(p.hasStack){var g={};p.stackGroups=Object.keys(p.stackGroups).reduce(function(m,y){var v=p.stackGroups[y];return dt(dt({},m),{},Xs({},y,{numericAxisId:r,cateAxisId:i,items:v.items,stackedData:hde(t,v.items,a)}))},g)}return dt(dt({},f),{},Xs({},h,p))},d)},mde=function(t,n){var r=n.realScaleType,i=n.type,a=n.tickCount,o=n.originalDomain,s=n.allowDecimals,l=r||n.scale;if(l!=="auto"&&l!=="linear")return null;if(a&&i==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var c=t.domain();if(!c.length)return null;var d=Oue(c,a,s);return t.domain([sy(d),ma(d)]),{niceTicks:d}}if(a&&i==="number"){var f=t.domain(),h=Aue(f,a,s);return{niceTicks:h}}return null};function ME(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,a=e.index,o=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!be(i[t.dataKey])){var s=Jh(n,"value",i[t.dataKey]);if(s)return s.coordinate+r/2}return n[a]?n[a].coordinate+r/2:null}var l=kn(i,be(o)?t.dataKey:o);return be(l)?null:t.scale(l)}var RE=function(t){var n=t.axis,r=t.ticks,i=t.offset,a=t.bandSize,o=t.entry,s=t.index;if(n.type==="category")return r[s]?r[s].coordinate+i:null;var l=kn(o,n.dataKey,n.domain[s]);return be(l)?null:n.scale(l)-a/2+i},yde=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var i=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]);return i<=0&&a>=0?0:a<0?a:i}return r[0]},vde=function(t,n){var r,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?dt(dt({},t.type.defaultProps),t.props):t.props,a=i.stackId;if(Nt(a)){var o=n[a];if(o){var s=o.items.indexOf(t);return s>=0?o.stackedData[s]:null}}return null},gde=function(t){return t.reduce(function(n,r){return[sy(r.concat([n[0]]).filter(G)),ma(r.concat([n[1]]).filter(G))]},[1/0,-1/0])},AL=function(t,n,r){return Object.keys(t).reduce(function(i,a){var o=t[a],s=o.stackedData,l=s.reduce(function(c,d){var f=gde(d.slice(n,r+1));return[Math.min(c[0],f[0]),Math.max(c[1],f[1])]},[1/0,-1/0]);return[Math.min(l[0],i[0]),Math.max(l[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},DE=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,IE=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Mx=function(t,n,r){if(he(t))return t(n,r);if(!Array.isArray(t))return n;var i=[];if(G(t[0]))i[0]=r?t[0]:Math.min(t[0],n[0]);else if(DE.test(t[0])){var a=+DE.exec(t[0])[1];i[0]=n[0]-a}else he(t[0])?i[0]=t[0](n[0]):i[0]=n[0];if(G(t[1]))i[1]=r?t[1]:Math.max(t[1],n[1]);else if(IE.test(t[1])){var o=+IE.exec(t[1])[1];i[1]=n[1]+o}else he(t[1])?i[1]=t[1](n[1]):i[1]=n[1];return i},Tp=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!r||i>0)return i}if(t&&n&&n.length>=2){for(var a=J1(n,function(f){return f.coordinate}),o=1/0,s=1,l=a.length;so&&(c=2*Math.PI-c),{radius:s,angle:Sde(c),angleInRadian:c}},Nde=function(t){var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),a=Math.floor(r/360),o=Math.min(i,a);return{startAngle:n-o*360,endAngle:r-o*360}},Ode=function(t,n){var r=n.startAngle,i=n.endAngle,a=Math.floor(r/360),o=Math.floor(i/360),s=Math.min(a,o);return t+s*360},zE=function(t,n){var r=t.x,i=t.y,a=Pde({x:r,y:i},n),o=a.radius,s=a.angle,l=n.innerRadius,c=n.outerRadius;if(oc)return!1;if(o===0)return!0;var d=Nde(n),f=d.startAngle,h=d.endAngle,p=s,g;if(f<=h){for(;p>h;)p-=360;for(;p=f&&p<=h}else{for(;p>f;)p-=360;for(;p=h&&p<=f}return g?BE(BE({},n),{},{radius:o,angle:Ode(p,n)}):null};function nd(e){"@babel/helpers - typeof";return nd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nd(e)}var Ade=["offset"];function Ede(e){return kde(e)||_de(e)||Cde(e)||Tde()}function Tde(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Cde(e,t){if(e){if(typeof e=="string")return Rx(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Rx(e,t)}}function _de(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function kde(e){if(Array.isArray(e))return Rx(e)}function Rx(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Mde(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function wt(e){for(var t=1;t=0?1:-1,b,P;i==="insideStart"?(b=p+x*o,P=m):i==="insideEnd"?(b=g-x*o,P=!m):i==="end"&&(b=g+x*o,P=m),P=v<=0?P:!P;var S=It(c,d,y,b),j=It(c,d,y,b+(P?1:-1)*359),N="M".concat(S.x,",").concat(S.y,` - A`).concat(y,",").concat(y,",0,1,").concat(P?0:1,`, - `).concat(j.x,",").concat(j.y),O=be(t.id)?Bd("recharts-radial-line-"):t.id;return $.createElement("text",rd({},r,{dominantBaseline:"central",className:Se("recharts-radial-bar-label",s)}),$.createElement("defs",null,$.createElement("path",{id:O,d:N})),$.createElement("textPath",{xlinkHref:"#".concat(O)},n))},zde=function(t){var n=t.viewBox,r=t.offset,i=t.position,a=n,o=a.cx,s=a.cy,l=a.innerRadius,c=a.outerRadius,d=a.startAngle,f=a.endAngle,h=(d+f)/2;if(i==="outside"){var p=It(o,s,c+r,h),g=p.x,m=p.y;return{x:g,y:m,textAnchor:g>=o?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:o,y:s,textAnchor:"middle",verticalAnchor:"end"};var y=(l+c)/2,v=It(o,s,y,h),x=v.x,b=v.y;return{x,y:b,textAnchor:"middle",verticalAnchor:"middle"}},Vde=function(t){var n=t.viewBox,r=t.parentViewBox,i=t.offset,a=t.position,o=n,s=o.x,l=o.y,c=o.width,d=o.height,f=d>=0?1:-1,h=f*i,p=f>0?"end":"start",g=f>0?"start":"end",m=c>=0?1:-1,y=m*i,v=m>0?"end":"start",x=m>0?"start":"end";if(a==="top"){var b={x:s+c/2,y:l-f*i,textAnchor:"middle",verticalAnchor:p};return wt(wt({},b),r?{height:Math.max(l-r.y,0),width:c}:{})}if(a==="bottom"){var P={x:s+c/2,y:l+d+h,textAnchor:"middle",verticalAnchor:g};return wt(wt({},P),r?{height:Math.max(r.y+r.height-(l+d),0),width:c}:{})}if(a==="left"){var S={x:s-y,y:l+d/2,textAnchor:v,verticalAnchor:"middle"};return wt(wt({},S),r?{width:Math.max(S.x-r.x,0),height:d}:{})}if(a==="right"){var j={x:s+c+y,y:l+d/2,textAnchor:x,verticalAnchor:"middle"};return wt(wt({},j),r?{width:Math.max(r.x+r.width-j.x,0),height:d}:{})}var N=r?{width:c,height:d}:{};return a==="insideLeft"?wt({x:s+y,y:l+d/2,textAnchor:x,verticalAnchor:"middle"},N):a==="insideRight"?wt({x:s+c-y,y:l+d/2,textAnchor:v,verticalAnchor:"middle"},N):a==="insideTop"?wt({x:s+c/2,y:l+h,textAnchor:"middle",verticalAnchor:g},N):a==="insideBottom"?wt({x:s+c/2,y:l+d-h,textAnchor:"middle",verticalAnchor:p},N):a==="insideTopLeft"?wt({x:s+y,y:l+h,textAnchor:x,verticalAnchor:g},N):a==="insideTopRight"?wt({x:s+c-y,y:l+h,textAnchor:v,verticalAnchor:g},N):a==="insideBottomLeft"?wt({x:s+y,y:l+d-h,textAnchor:x,verticalAnchor:p},N):a==="insideBottomRight"?wt({x:s+c-y,y:l+d-h,textAnchor:v,verticalAnchor:p},N):rc(a)&&(G(a.x)||fo(a.x))&&(G(a.y)||fo(a.y))?wt({x:s+Uo(a.x,c),y:l+Uo(a.y,d),textAnchor:"end",verticalAnchor:"end"},N):wt({x:s+c/2,y:l+d/2,textAnchor:"middle",verticalAnchor:"middle"},N)},Ude=function(t){return"cx"in t&&G(t.cx)};function Kt(e){var t=e.offset,n=t===void 0?5:t,r=$de(e,Ade),i=wt({offset:n},r),a=i.viewBox,o=i.position,s=i.value,l=i.children,c=i.content,d=i.className,f=d===void 0?"":d,h=i.textBreakAll;if(!a||be(s)&&be(l)&&!w.isValidElement(c)&&!he(c))return null;if(w.isValidElement(c))return w.cloneElement(c,i);var p;if(he(c)){if(p=w.createElement(c,i),w.isValidElement(p))return p}else p=Lde(i);var g=Ude(a),m=ve(i,!0);if(g&&(o==="insideStart"||o==="insideEnd"||o==="end"))return Bde(i,p,m);var y=g?zde(i):Vde(i);return $.createElement(mp,rd({className:Se("recharts-label",f)},m,y,{breakAll:h}),p)}Kt.displayName="Label";var TL=function(t){var n=t.cx,r=t.cy,i=t.angle,a=t.startAngle,o=t.endAngle,s=t.r,l=t.radius,c=t.innerRadius,d=t.outerRadius,f=t.x,h=t.y,p=t.top,g=t.left,m=t.width,y=t.height,v=t.clockWise,x=t.labelViewBox;if(x)return x;if(G(m)&&G(y)){if(G(f)&&G(h))return{x:f,y:h,width:m,height:y};if(G(p)&&G(g))return{x:p,y:g,width:m,height:y}}return G(f)&&G(h)?{x:f,y:h,width:0,height:0}:G(n)&&G(r)?{cx:n,cy:r,startAngle:a||i||0,endAngle:o||i||0,innerRadius:c||0,outerRadius:d||l||s||0,clockWise:v}:t.viewBox?t.viewBox:{}},Wde=function(t,n){return t?t===!0?$.createElement(Kt,{key:"label-implicit",viewBox:n}):Nt(t)?$.createElement(Kt,{key:"label-implicit",viewBox:n,value:t}):w.isValidElement(t)?t.type===Kt?w.cloneElement(t,{key:"label-implicit",viewBox:n}):$.createElement(Kt,{key:"label-implicit",content:t,viewBox:n}):he(t)?$.createElement(Kt,{key:"label-implicit",content:t,viewBox:n}):rc(t)?$.createElement(Kt,rd({viewBox:n},t,{key:"label-implicit"})):null:null},Hde=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var i=t.children,a=TL(t),o=Pr(i,Kt).map(function(l,c){return w.cloneElement(l,{viewBox:n||a,key:"label-".concat(c)})});if(!r)return o;var s=Wde(t.label,n||a);return[s].concat(Ede(o))};Kt.parseViewBox=TL;Kt.renderCallByParent=Hde;function qde(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var Kde=qde;const Gde=Ie(Kde);function id(e){"@babel/helpers - typeof";return id=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},id(e)}var Yde=["valueAccessor"],Xde=["data","dataKey","clockWise","id","textBreakAll"];function Qde(e){return tfe(e)||efe(e)||Jde(e)||Zde()}function Zde(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jde(e,t){if(e){if(typeof e=="string")return Dx(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Dx(e,t)}}function efe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function tfe(e){if(Array.isArray(e))return Dx(e)}function Dx(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function afe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var ofe=function(t){return Array.isArray(t.value)?Gde(t.value):t.value};function Ea(e){var t=e.valueAccessor,n=t===void 0?ofe:t,r=HE(e,Yde),i=r.data,a=r.dataKey,o=r.clockWise,s=r.id,l=r.textBreakAll,c=HE(r,Xde);return!i||!i.length?null:$.createElement(rt,{className:"recharts-label-list"},i.map(function(d,f){var h=be(a)?n(d,f):kn(d&&d.payload,a),p=be(s)?{}:{id:"".concat(s,"-").concat(f)};return $.createElement(Kt,_p({},ve(d,!0),c,p,{parentViewBox:d.parentViewBox,value:h,textBreakAll:l,viewBox:Kt.parseViewBox(be(o)?d:WE(WE({},d),{},{clockWise:o})),key:"label-".concat(f),index:f}))}))}Ea.displayName="LabelList";function sfe(e,t){return e?e===!0?$.createElement(Ea,{key:"labelList-implicit",data:t}):$.isValidElement(e)||he(e)?$.createElement(Ea,{key:"labelList-implicit",data:t,content:e}):rc(e)?$.createElement(Ea,_p({data:t},e,{key:"labelList-implicit"})):null:null}function lfe(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,i=Pr(r,Ea).map(function(o,s){return w.cloneElement(o,{data:t,key:"labelList-".concat(s)})});if(!n)return i;var a=sfe(e.label,t);return[a].concat(Qde(i))}Ea.renderCallByParent=lfe;function ad(e){"@babel/helpers - typeof";return ad=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ad(e)}function Ix(){return Ix=Object.assign?Object.assign.bind():function(e){for(var t=1;t180),",").concat(+(o>c),`, - `).concat(f.x,",").concat(f.y,` - `);if(i>0){var p=It(n,r,i,o),g=It(n,r,i,c);h+="L ".concat(g.x,",").concat(g.y,` - A `).concat(i,",").concat(i,`,0, - `).concat(+(Math.abs(l)>180),",").concat(+(o<=c),`, - `).concat(p.x,",").concat(p.y," Z")}else h+="L ".concat(n,",").concat(r," Z");return h},hfe=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,a=t.outerRadius,o=t.cornerRadius,s=t.forceCornerRadius,l=t.cornerIsExternal,c=t.startAngle,d=t.endAngle,f=wr(d-c),h=Lf({cx:n,cy:r,radius:a,angle:c,sign:f,cornerRadius:o,cornerIsExternal:l}),p=h.circleTangency,g=h.lineTangency,m=h.theta,y=Lf({cx:n,cy:r,radius:a,angle:d,sign:-f,cornerRadius:o,cornerIsExternal:l}),v=y.circleTangency,x=y.lineTangency,b=y.theta,P=l?Math.abs(c-d):Math.abs(c-d)-m-b;if(P<0)return s?"M ".concat(g.x,",").concat(g.y,` - a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0 - a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0 - `):CL({cx:n,cy:r,innerRadius:i,outerRadius:a,startAngle:c,endAngle:d});var S="M ".concat(g.x,",").concat(g.y,` - A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(p.x,",").concat(p.y,` - A`).concat(a,",").concat(a,",0,").concat(+(P>180),",").concat(+(f<0),",").concat(v.x,",").concat(v.y,` - A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(x.x,",").concat(x.y,` - `);if(i>0){var j=Lf({cx:n,cy:r,radius:i,angle:c,sign:f,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),N=j.circleTangency,O=j.lineTangency,A=j.theta,E=Lf({cx:n,cy:r,radius:i,angle:d,sign:-f,isExternal:!0,cornerRadius:o,cornerIsExternal:l}),T=E.circleTangency,C=E.lineTangency,D=E.theta,M=l?Math.abs(c-d):Math.abs(c-d)-A-D;if(M<0&&o===0)return"".concat(S,"L").concat(n,",").concat(r,"Z");S+="L".concat(C.x,",").concat(C.y,` - A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(T.x,",").concat(T.y,` - A`).concat(i,",").concat(i,",0,").concat(+(M>180),",").concat(+(f>0),",").concat(N.x,",").concat(N.y,` - A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(O.x,",").concat(O.y,"Z")}else S+="L".concat(n,",").concat(r,"Z");return S},pfe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},_L=function(t){var n=KE(KE({},pfe),t),r=n.cx,i=n.cy,a=n.innerRadius,o=n.outerRadius,s=n.cornerRadius,l=n.forceCornerRadius,c=n.cornerIsExternal,d=n.startAngle,f=n.endAngle,h=n.className;if(o0&&Math.abs(d-f)<360?y=hfe({cx:r,cy:i,innerRadius:a,outerRadius:o,cornerRadius:Math.min(m,g/2),forceCornerRadius:l,cornerIsExternal:c,startAngle:d,endAngle:f}):y=CL({cx:r,cy:i,innerRadius:a,outerRadius:o,startAngle:d,endAngle:f}),$.createElement("path",Ix({},ve(n,!0),{className:p,d:y,role:"img"}))};function od(e){"@babel/helpers - typeof";return od=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},od(e)}function Lx(){return Lx=Object.assign?Object.assign.bind():function(e){for(var t=1;t0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function $fe(e,t){return rs(e.getTime(),t.getTime())}function Mfe(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function Rfe(e,t){return e===t}function tT(e,t,n){var r=e.size;if(r!==t.size)return!1;if(!r)return!0;for(var i=new Array(r),a=e.entries(),o,s,l=0;(o=a.next())&&!o.done;){for(var c=t.entries(),d=!1,f=0;(s=c.next())&&!s.done;){if(i[f]){f++;continue}var h=o.value,p=s.value;if(n.equals(h[0],p[0],l,f,e,t,n)&&n.equals(h[1],p[1],h[0],p[0],e,t,n)){d=i[f]=!0;break}f++}if(!d)return!1;l++}return!0}var Dfe=rs;function Ife(e,t,n){var r=eT(e),i=r.length;if(eT(t).length!==i)return!1;for(;i-- >0;)if(!RL(e,t,n,r[i]))return!1;return!0}function Lc(e,t,n){var r=ZE(e),i=r.length;if(ZE(t).length!==i)return!1;for(var a,o,s;i-- >0;)if(a=r[i],!RL(e,t,n,a)||(o=JE(e,a),s=JE(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function Lfe(e,t){return rs(e.valueOf(),t.valueOf())}function Ffe(e,t){return e.source===t.source&&e.flags===t.flags}function nT(e,t,n){var r=e.size;if(r!==t.size)return!1;if(!r)return!0;for(var i=new Array(r),a=e.values(),o,s;(o=a.next())&&!o.done;){for(var l=t.values(),c=!1,d=0;(s=l.next())&&!s.done;){if(!i[d]&&n.equals(o.value,s.value,o.value,s.value,e,t,n)){c=i[d]=!0;break}d++}if(!c)return!1}return!0}function Bfe(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function zfe(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function RL(e,t,n,r){return(r===_fe||r===Cfe||r===Tfe)&&(e.$$typeof||t.$$typeof)?!0:Efe(t,r)&&n.equals(e[r],t[r],r,r,e,t,n)}var Vfe="[object Arguments]",Ufe="[object Boolean]",Wfe="[object Date]",Hfe="[object Error]",qfe="[object Map]",Kfe="[object Number]",Gfe="[object Object]",Yfe="[object RegExp]",Xfe="[object Set]",Qfe="[object String]",Zfe="[object URL]",Jfe=Array.isArray,rT=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,iT=Object.assign,ehe=Object.prototype.toString.call.bind(Object.prototype.toString);function the(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areErrorsEqual,i=e.areFunctionsEqual,a=e.areMapsEqual,o=e.areNumbersEqual,s=e.areObjectsEqual,l=e.arePrimitiveWrappersEqual,c=e.areRegExpsEqual,d=e.areSetsEqual,f=e.areTypedArraysEqual,h=e.areUrlsEqual;return function(g,m,y){if(g===m)return!0;if(g==null||m==null)return!1;var v=typeof g;if(v!==typeof m)return!1;if(v!=="object")return v==="number"?o(g,m,y):v==="function"?i(g,m,y):!1;var x=g.constructor;if(x!==m.constructor)return!1;if(x===Object)return s(g,m,y);if(Jfe(g))return t(g,m,y);if(rT!=null&&rT(g))return f(g,m,y);if(x===Date)return n(g,m,y);if(x===RegExp)return c(g,m,y);if(x===Map)return a(g,m,y);if(x===Set)return d(g,m,y);var b=ehe(g);return b===Wfe?n(g,m,y):b===Yfe?c(g,m,y):b===qfe?a(g,m,y):b===Xfe?d(g,m,y):b===Gfe?typeof g.then!="function"&&typeof m.then!="function"&&s(g,m,y):b===Zfe?h(g,m,y):b===Hfe?r(g,m,y):b===Vfe?s(g,m,y):b===Ufe||b===Kfe||b===Qfe?l(g,m,y):!1}}function nhe(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,i={areArraysEqual:r?Lc:kfe,areDatesEqual:$fe,areErrorsEqual:Mfe,areFunctionsEqual:Rfe,areMapsEqual:r?QE(tT,Lc):tT,areNumbersEqual:Dfe,areObjectsEqual:r?Lc:Ife,arePrimitiveWrappersEqual:Lfe,areRegExpsEqual:Ffe,areSetsEqual:r?QE(nT,Lc):nT,areTypedArraysEqual:r?Lc:Bfe,areUrlsEqual:zfe};if(n&&(i=iT({},i,n(i))),t){var a=Bf(i.areArraysEqual),o=Bf(i.areMapsEqual),s=Bf(i.areObjectsEqual),l=Bf(i.areSetsEqual);i=iT({},i,{areArraysEqual:a,areMapsEqual:o,areObjectsEqual:s,areSetsEqual:l})}return i}function rhe(e){return function(t,n,r,i,a,o,s){return e(t,n,s)}}function ihe(e){var t=e.circular,n=e.comparator,r=e.createState,i=e.equals,a=e.strict;if(r)return function(l,c){var d=r(),f=d.cache,h=f===void 0?t?new WeakMap:void 0:f,p=d.meta;return n(l,c,{cache:h,equals:i,meta:p,strict:a})};if(t)return function(l,c){return n(l,c,{cache:new WeakMap,equals:i,meta:void 0,strict:a})};var o={cache:void 0,equals:i,meta:void 0,strict:a};return function(l,c){return n(l,c,o)}}var ahe=Ya();Ya({strict:!0});Ya({circular:!0});Ya({circular:!0,strict:!0});Ya({createInternalComparator:function(){return rs}});Ya({strict:!0,createInternalComparator:function(){return rs}});Ya({circular:!0,createInternalComparator:function(){return rs}});Ya({circular:!0,createInternalComparator:function(){return rs},strict:!0});function Ya(e){e===void 0&&(e={});var t=e.circular,n=t===void 0?!1:t,r=e.createInternalComparator,i=e.createState,a=e.strict,o=a===void 0?!1:a,s=nhe(e),l=the(s),c=r?r(l):rhe(l);return ihe({circular:n,comparator:l,createState:i,equals:c,strict:o})}function ohe(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function aT(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function i(a){n<0&&(n=a),a-n>t?(e(a),n=-1):ohe(i)};requestAnimationFrame(r)}function Fx(e){"@babel/helpers - typeof";return Fx=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fx(e)}function she(e){return dhe(e)||uhe(e)||che(e)||lhe()}function lhe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function che(e,t){if(e){if(typeof e=="string")return oT(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return oT(e,t)}}function oT(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?1:v<0?0:v},m=function(v){for(var x=v>1?1:v,b=x,P=0;P<8;++P){var S=f(b)-x,j=p(b);if(Math.abs(S-x)0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,i=t.damping,a=i===void 0?8:i,o=t.dt,s=o===void 0?17:o,l=function(d,f,h){var p=-(d-f)*r,g=h*a,m=h+(p-g)*s/1e3,y=h*s/1e3+d;return Math.abs(y-f)e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Vhe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a=0)&&(n[i]=e[i]);return n}function tg(e){return qhe(e)||Hhe(e)||Whe(e)||Uhe()}function Uhe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Whe(e,t){if(e){if(typeof e=="string")return Wx(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Wx(e,t)}}function Hhe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function qhe(e){if(Array.isArray(e))return Wx(e)}function Wx(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Mp(e){return Mp=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Mp(e)}var Mi=function(e){Qhe(n,e);var t=Zhe(n);function n(r,i){var a;Khe(this,n),a=t.call(this,r,i);var o=a.props,s=o.isActive,l=o.attributeName,c=o.from,d=o.to,f=o.steps,h=o.children,p=o.duration;if(a.handleStyleChange=a.handleStyleChange.bind(Kx(a)),a.changeStyle=a.changeStyle.bind(Kx(a)),!s||p<=0)return a.state={style:{}},typeof h=="function"&&(a.state={style:d}),qx(a);if(f&&f.length)a.state={style:f[0].style};else if(c){if(typeof h=="function")return a.state={style:c},qx(a);a.state={style:l?Kc({},l,c):c}}else a.state={style:{}};return a}return Yhe(n,[{key:"componentDidMount",value:function(){var i=this.props,a=i.isActive,o=i.canBegin;this.mounted=!0,!(!a||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var a=this.props,o=a.isActive,s=a.canBegin,l=a.attributeName,c=a.shouldReAnimate,d=a.to,f=a.from,h=this.state.style;if(s){if(!o){var p={style:l?Kc({},l,d):d};this.state&&h&&(l&&h[l]!==d||!l&&h!==d)&&this.setState(p);return}if(!(ahe(i.to,d)&&i.canBegin&&i.isActive)){var g=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var m=g||c?f:i.to;if(this.state&&h){var y={style:l?Kc({},l,m):m};(l&&h[l]!==m||!l&&h!==m)&&this.setState(y)}this.runAnimation(dr(dr({},this.props),{},{from:m,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var a=this,o=i.from,s=i.to,l=i.duration,c=i.easing,d=i.begin,f=i.onAnimationEnd,h=i.onAnimationStart,p=Fhe(o,s,Ehe(c),l,this.changeStyle),g=function(){a.stopJSAnimation=p()};this.manager.start([h,d,g,l,f])}},{key:"runStepAnimation",value:function(i){var a=this,o=i.steps,s=i.begin,l=i.onAnimationStart,c=o[0],d=c.style,f=c.duration,h=f===void 0?0:f,p=function(m,y,v){if(v===0)return m;var x=y.duration,b=y.easing,P=b===void 0?"ease":b,S=y.style,j=y.properties,N=y.onAnimationEnd,O=v>0?o[v-1]:y,A=j||Object.keys(S);if(typeof P=="function"||P==="spring")return[].concat(tg(m),[a.runJSAnimation.bind(a,{from:O.style,to:S,duration:x,easing:P}),x]);var E=cT(A,x,P),T=dr(dr(dr({},O.style),S),{},{transition:E});return[].concat(tg(m),[T,x,N]).filter(yhe)};return this.manager.start([l].concat(tg(o.reduce(p,[d,Math.max(h,s)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=fhe());var a=i.begin,o=i.duration,s=i.attributeName,l=i.to,c=i.easing,d=i.onAnimationStart,f=i.onAnimationEnd,h=i.steps,p=i.children,g=this.manager;if(this.unSubscribe=g.subscribe(this.handleStyleChange),typeof c=="function"||typeof p=="function"||c==="spring"){this.runJSAnimation(i);return}if(h.length>1){this.runStepAnimation(i);return}var m=s?Kc({},s,l):l,y=cT(Object.keys(m),o,c);g.start([d,a,dr(dr({},m),{},{transition:y}),o,f])}},{key:"render",value:function(){var i=this.props,a=i.children;i.begin;var o=i.duration;i.attributeName,i.easing;var s=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var l=zhe(i,Bhe),c=w.Children.count(a),d=this.state.style;if(typeof a=="function")return a(d);if(!s||c===0||o<=0)return a;var f=function(p){var g=p.props,m=g.style,y=m===void 0?{}:m,v=g.className,x=w.cloneElement(p,dr(dr({},l),{},{style:dr(dr({},y),d),className:v}));return x};return c===1?f(w.Children.only(a)):$.createElement("div",null,w.Children.map(a,function(h){return f(h)}))}}]),n}(w.PureComponent);Mi.displayName="Animate";Mi.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};Mi.propTypes={from:Ce.oneOfType([Ce.object,Ce.string]),to:Ce.oneOfType([Ce.object,Ce.string]),attributeName:Ce.string,duration:Ce.number,begin:Ce.number,easing:Ce.oneOfType([Ce.string,Ce.func]),steps:Ce.arrayOf(Ce.shape({duration:Ce.number.isRequired,style:Ce.object.isRequired,easing:Ce.oneOfType([Ce.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Ce.func]),properties:Ce.arrayOf("string"),onAnimationEnd:Ce.func})),children:Ce.oneOfType([Ce.node,Ce.func]),isActive:Ce.bool,canBegin:Ce.bool,onAnimationEnd:Ce.func,shouldReAnimate:Ce.bool,onAnimationStart:Ce.func,onAnimationReStart:Ce.func};function cd(e){"@babel/helpers - typeof";return cd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cd(e)}function Rp(){return Rp=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0?1:-1,l=r>=0?1:-1,c=i>=0&&r>=0||i<0&&r<0?1:0,d;if(o>0&&a instanceof Array){for(var f=[0,0,0,0],h=0,p=4;ho?o:a[h];d="M".concat(t,",").concat(n+s*f[0]),f[0]>0&&(d+="A ".concat(f[0],",").concat(f[0],",0,0,").concat(c,",").concat(t+l*f[0],",").concat(n)),d+="L ".concat(t+r-l*f[1],",").concat(n),f[1]>0&&(d+="A ".concat(f[1],",").concat(f[1],",0,0,").concat(c,`, - `).concat(t+r,",").concat(n+s*f[1])),d+="L ".concat(t+r,",").concat(n+i-s*f[2]),f[2]>0&&(d+="A ".concat(f[2],",").concat(f[2],",0,0,").concat(c,`, - `).concat(t+r-l*f[2],",").concat(n+i)),d+="L ".concat(t+l*f[3],",").concat(n+i),f[3]>0&&(d+="A ".concat(f[3],",").concat(f[3],",0,0,").concat(c,`, - `).concat(t,",").concat(n+i-s*f[3])),d+="Z"}else if(o>0&&a===+a&&a>0){var g=Math.min(o,a);d="M ".concat(t,",").concat(n+s*g,` - A `).concat(g,",").concat(g,",0,0,").concat(c,",").concat(t+l*g,",").concat(n,` - L `).concat(t+r-l*g,",").concat(n,` - A `).concat(g,",").concat(g,",0,0,").concat(c,",").concat(t+r,",").concat(n+s*g,` - L `).concat(t+r,",").concat(n+i-s*g,` - A `).concat(g,",").concat(g,",0,0,").concat(c,",").concat(t+r-l*g,",").concat(n+i,` - L `).concat(t+l*g,",").concat(n+i,` - A `).concat(g,",").concat(g,",0,0,").concat(c,",").concat(t,",").concat(n+i-s*g," Z")}else d="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return d},lpe=function(t,n){if(!t||!n)return!1;var r=t.x,i=t.y,a=n.x,o=n.y,s=n.width,l=n.height;if(Math.abs(s)>0&&Math.abs(l)>0){var c=Math.min(a,a+s),d=Math.max(a,a+s),f=Math.min(o,o+l),h=Math.max(o,o+l);return r>=c&&r<=d&&i>=f&&i<=h}return!1},cpe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},OS=function(t){var n=vT(vT({},cpe),t),r=w.useRef(),i=w.useState(-1),a=epe(i,2),o=a[0],s=a[1];w.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var P=r.current.getTotalLength();P&&s(P)}catch{}},[]);var l=n.x,c=n.y,d=n.width,f=n.height,h=n.radius,p=n.className,g=n.animationEasing,m=n.animationDuration,y=n.animationBegin,v=n.isAnimationActive,x=n.isUpdateAnimationActive;if(l!==+l||c!==+c||d!==+d||f!==+f||d===0||f===0)return null;var b=Se("recharts-rectangle",p);return x?$.createElement(Mi,{canBegin:o>0,from:{width:d,height:f,x:l,y:c},to:{width:d,height:f,x:l,y:c},duration:m,animationEasing:g,isActive:x},function(P){var S=P.width,j=P.height,N=P.x,O=P.y;return $.createElement(Mi,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:m,isActive:v,easing:g},$.createElement("path",Rp({},ve(n,!0),{className:b,d:gT(N,O,S,j,h),ref:r})))}):$.createElement("path",Rp({},ve(n,!0),{className:b,d:gT(l,c,d,f,h)}))};function Gx(){return Gx=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ype(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var vpe=function(t,n,r,i,a,o){return"M".concat(t,",").concat(a,"v").concat(i,"M").concat(o,",").concat(n,"h").concat(r)},gpe=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,a=i===void 0?0:i,o=t.top,s=o===void 0?0:o,l=t.left,c=l===void 0?0:l,d=t.width,f=d===void 0?0:d,h=t.height,p=h===void 0?0:h,g=t.className,m=mpe(t,upe),y=dpe({x:r,y:a,top:s,left:c,width:f,height:p},m);return!G(r)||!G(a)||!G(f)||!G(p)||!G(s)||!G(c)?null:$.createElement("path",Yx({},ve(y,!0),{className:Se("recharts-cross",g),d:vpe(r,a,f,p,s,c)}))},xpe=tI,bpe=xpe(Object.getPrototypeOf,Object),wpe=bpe,Spe=Ii,jpe=wpe,Ppe=Li,Npe="[object Object]",Ope=Function.prototype,Ape=Object.prototype,VL=Ope.toString,Epe=Ape.hasOwnProperty,Tpe=VL.call(Object);function Cpe(e){if(!Ppe(e)||Spe(e)!=Npe)return!1;var t=jpe(e);if(t===null)return!0;var n=Epe.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&VL.call(n)==Tpe}var _pe=Cpe;const kpe=Ie(_pe);var $pe=Ii,Mpe=Li,Rpe="[object Boolean]";function Dpe(e){return e===!0||e===!1||Mpe(e)&&$pe(e)==Rpe}var Ipe=Dpe;const Lpe=Ie(Ipe);function dd(e){"@babel/helpers - typeof";return dd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dd(e)}function Dp(){return Dp=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0,from:{upperWidth:0,lowerWidth:0,height:h,x:l,y:c},to:{upperWidth:d,lowerWidth:f,height:h,x:l,y:c},duration:m,animationEasing:g,isActive:v},function(b){var P=b.upperWidth,S=b.lowerWidth,j=b.height,N=b.x,O=b.y;return $.createElement(Mi,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:m,easing:g},$.createElement("path",Dp({},ve(n,!0),{className:x,d:jT(N,O,P,S,j),ref:r})))}):$.createElement("g",null,$.createElement("path",Dp({},ve(n,!0),{className:x,d:jT(l,c,d,f,h)})))},Ype=["option","shapeType","propTransformer","activeClassName","isActive"];function fd(e){"@babel/helpers - typeof";return fd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fd(e)}function Xpe(e,t){if(e==null)return{};var n=Qpe(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Qpe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function PT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ip(e){for(var t=1;t0&&r.handleDrag(i.changedTouches[0])}),bn(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,a=i.endIndex,o=i.onDragEnd,s=i.startIndex;o==null||o({endIndex:a,startIndex:s})}),r.detachDragEndListener()}),bn(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),bn(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),bn(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),bn(r,"handleSlideDragStart",function(i){var a=_T(i)?i.changedTouches[0]:i;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:a.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return Rme(t,e),_me(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var i=r.startX,a=r.endX,o=this.state.scaleValues,s=this.props,l=s.gap,c=s.data,d=c.length-1,f=Math.min(i,a),h=Math.max(i,a),p=t.getIndexInRange(o,f),g=t.getIndexInRange(o,h);return{startIndex:p-p%l,endIndex:g===d?d:g-g%l}}},{key:"getTextOfTick",value:function(r){var i=this.props,a=i.data,o=i.tickFormatter,s=i.dataKey,l=kn(a[r],s,r);return he(o)?o(l,r):l}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var i=this.state,a=i.slideMoveStartX,o=i.startX,s=i.endX,l=this.props,c=l.x,d=l.width,f=l.travellerWidth,h=l.startIndex,p=l.endIndex,g=l.onChange,m=r.pageX-a;m>0?m=Math.min(m,c+d-f-s,c+d-f-o):m<0&&(m=Math.max(m,c-o,c-s));var y=this.getIndex({startX:o+m,endX:s+m});(y.startIndex!==h||y.endIndex!==p)&&g&&g(y),this.setState({startX:o+m,endX:s+m,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var a=_T(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:a.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var i=this.state,a=i.brushMoveStartX,o=i.movingTravellerId,s=i.endX,l=i.startX,c=this.state[o],d=this.props,f=d.x,h=d.width,p=d.travellerWidth,g=d.onChange,m=d.gap,y=d.data,v={startX:this.state.startX,endX:this.state.endX},x=r.pageX-a;x>0?x=Math.min(x,f+h-p-c):x<0&&(x=Math.max(x,f-c)),v[o]=c+x;var b=this.getIndex(v),P=b.startIndex,S=b.endIndex,j=function(){var O=y.length-1;return o==="startX"&&(s>l?P%m===0:S%m===0)||sl?S%m===0:P%m===0)||s>l&&S===O};this.setState(bn(bn({},o,c+x),"brushMoveStartX",r.pageX),function(){g&&j()&&g(b)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var a=this,o=this.state,s=o.scaleValues,l=o.startX,c=o.endX,d=this.state[i],f=s.indexOf(d);if(f!==-1){var h=f+r;if(!(h===-1||h>=s.length)){var p=s[h];i==="startX"&&p>=c||i==="endX"&&p<=l||this.setState(bn({},i,p),function(){a.props.onChange(a.getIndex({startX:a.state.startX,endX:a.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,i=r.x,a=r.y,o=r.width,s=r.height,l=r.fill,c=r.stroke;return $.createElement("rect",{stroke:c,fill:l,x:i,y:a,width:o,height:s})}},{key:"renderPanorama",value:function(){var r=this.props,i=r.x,a=r.y,o=r.width,s=r.height,l=r.data,c=r.children,d=r.padding,f=w.Children.only(c);return f?$.cloneElement(f,{x:i,y:a,width:o,height:s,margin:d,compact:!0,data:l}):null}},{key:"renderTravellerLayer",value:function(r,i){var a,o,s=this,l=this.props,c=l.y,d=l.travellerWidth,f=l.height,h=l.traveller,p=l.ariaLabel,g=l.data,m=l.startIndex,y=l.endIndex,v=Math.max(r,this.props.x),x=rg(rg({},ve(this.props,!1)),{},{x:v,y:c,width:d,height:f}),b=p||"Min value: ".concat((a=g[m])===null||a===void 0?void 0:a.name,", Max value: ").concat((o=g[y])===null||o===void 0?void 0:o.name);return $.createElement(rt,{tabIndex:0,role:"slider","aria-label":b,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(S){["ArrowLeft","ArrowRight"].includes(S.key)&&(S.preventDefault(),S.stopPropagation(),s.handleTravellerMoveKeyboard(S.key==="ArrowRight"?1:-1,i))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(h,x))}},{key:"renderSlide",value:function(r,i){var a=this.props,o=a.y,s=a.height,l=a.stroke,c=a.travellerWidth,d=Math.min(r,i)+c,f=Math.max(Math.abs(i-r)-c,0);return $.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:l,fillOpacity:.2,x:d,y:o,width:f,height:s})}},{key:"renderText",value:function(){var r=this.props,i=r.startIndex,a=r.endIndex,o=r.y,s=r.height,l=r.travellerWidth,c=r.stroke,d=this.state,f=d.startX,h=d.endX,p=5,g={pointerEvents:"none",fill:c};return $.createElement(rt,{className:"recharts-brush-texts"},$.createElement(mp,Fp({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,h)-p,y:o+s/2},g),this.getTextOfTick(i)),$.createElement(mp,Fp({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,h)+l+p,y:o+s/2},g),this.getTextOfTick(a)))}},{key:"render",value:function(){var r=this.props,i=r.data,a=r.className,o=r.children,s=r.x,l=r.y,c=r.width,d=r.height,f=r.alwaysShowText,h=this.state,p=h.startX,g=h.endX,m=h.isTextActive,y=h.isSlideMoving,v=h.isTravellerMoving,x=h.isTravellerFocused;if(!i||!i.length||!G(s)||!G(l)||!G(c)||!G(d)||c<=0||d<=0)return null;var b=Se("recharts-brush",a),P=$.Children.count(o)===1,S=Tme("userSelect","none");return $.createElement(rt,{className:b,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:S},this.renderBackground(),P&&this.renderPanorama(),this.renderSlide(p,g),this.renderTravellerLayer(p,"startX"),this.renderTravellerLayer(g,"endX"),(m||y||v||x||f)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,a=r.y,o=r.width,s=r.height,l=r.stroke,c=Math.floor(a+s/2)-1;return $.createElement($.Fragment,null,$.createElement("rect",{x:i,y:a,width:o,height:s,fill:l,stroke:"none"}),$.createElement("line",{x1:i+1,y1:c,x2:i+o-1,y2:c,fill:"none",stroke:"#fff"}),$.createElement("line",{x1:i+1,y1:c+2,x2:i+o-1,y2:c+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,i){var a;return $.isValidElement(r)?a=$.cloneElement(r,i):he(r)?a=r(i):a=t.renderDefaultTraveller(i),a}},{key:"getDerivedStateFromProps",value:function(r,i){var a=r.data,o=r.width,s=r.x,l=r.travellerWidth,c=r.updateId,d=r.startIndex,f=r.endIndex;if(a!==i.prevData||c!==i.prevUpdateId)return rg({prevData:a,prevTravellerWidth:l,prevUpdateId:c,prevX:s,prevWidth:o},a&&a.length?Ime({data:a,width:o,x:s,travellerWidth:l,startIndex:d,endIndex:f}):{scale:null,scaleValues:null});if(i.scale&&(o!==i.prevWidth||s!==i.prevX||l!==i.prevTravellerWidth)){i.scale.range([s,s+o-l]);var h=i.scale.domain().map(function(p){return i.scale(p)});return{prevData:a,prevTravellerWidth:l,prevUpdateId:c,prevX:s,prevWidth:o,startX:i.scale(r.startIndex),endX:i.scale(r.endIndex),scaleValues:h}}return null}},{key:"getIndexInRange",value:function(r,i){for(var a=r.length,o=0,s=a-1;s-o>1;){var l=Math.floor((o+s)/2);r[l]>i?s=l:o=l}return i>=r[s]?s:o}}])}(w.PureComponent);bn(Dl,"displayName","Brush");bn(Dl,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var Lme=Z1;function Fme(e,t){var n;return Lme(e,function(r,i,a){return n=t(r,i,a),!n}),!!n}var Bme=Fme,zme=KD,Vme=qa,Ume=Bme,Wme=vn,Hme=ey;function qme(e,t,n){var r=Wme(e)?zme:Ume;return n&&Hme(e,t,n)&&(t=void 0),r(e,Vme(t))}var Kme=qme;const Gme=Ie(Kme);var Qr=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},kT=mI;function Yme(e,t,n){t=="__proto__"&&kT?kT(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var Xme=Yme,Qme=Xme,Zme=hI,Jme=qa;function eye(e,t){var n={};return t=Jme(t),Zme(e,function(r,i,a){Qme(n,i,t(r,i,a))}),n}var tye=eye;const nye=Ie(tye);function rye(e,t){for(var n=-1,r=e==null?0:e.length;++n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function bye(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function wye(e,t){var n=e.x,r=e.y,i=xye(e,mye),a="".concat(n),o=parseInt(a,10),s="".concat(r),l=parseInt(s,10),c="".concat(t.height||i.height),d=parseInt(c,10),f="".concat(t.width||i.width),h=parseInt(f,10);return Fc(Fc(Fc(Fc(Fc({},t),i),o?{x:o}:{}),l?{y:l}:{}),{},{height:d,width:h,name:t.name,radius:t.radius})}function MT(e){return $.createElement(ime,Qx({shapeType:"rectangle",propTransformer:wye,activeClassName:"recharts-active-bar"},e))}var Sye=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,i){if(typeof t=="number")return t;var a=typeof r=="number";return a?t(r,i):(a||Ho(),n)}},jye=["value","background"],GL;function Il(e){"@babel/helpers - typeof";return Il=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Il(e)}function Pye(e,t){if(e==null)return{};var n=Nye(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Nye(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function zp(){return zp=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(I)0&&Math.abs(M)0&&(D=Math.min((le||0)-(M[Pe-1]||0),D))}),Number.isFinite(D)){var I=D/C,F=m.layout==="vertical"?r.height:r.width;if(m.padding==="gap"&&(N=I*F/2),m.padding==="no-gap"){var B=Uo(t.barCategoryGap,I*F),k=I*F/2;N=k-B-(k-B)/F*B}}}i==="xAxis"?O=[r.left+(b.left||0)+(N||0),r.left+r.width-(b.right||0)-(N||0)]:i==="yAxis"?O=l==="horizontal"?[r.top+r.height-(b.bottom||0),r.top+(b.top||0)]:[r.top+(b.top||0)+(N||0),r.top+r.height-(b.bottom||0)-(N||0)]:O=m.range,S&&(O=[O[1],O[0]]);var L=ode(m,a,h),R=L.scale,q=L.realScaleType;R.domain(v).range(O),sde(R);var W=mde(R,vr(vr({},m),{},{realScaleType:q}));i==="xAxis"?(T=y==="top"&&!P||y==="bottom"&&P,A=r.left,E=f[j]-T*m.height):i==="yAxis"&&(T=y==="left"&&!P||y==="right"&&P,A=f[j]-T*m.width,E=r.top);var ee=vr(vr(vr({},m),W),{},{realScaleType:q,x:A,y:E,scale:R,width:i==="xAxis"?r.width:m.width,height:i==="yAxis"?r.height:m.height});return ee.bandSize=Tp(ee,W),!m.hide&&i==="xAxis"?f[j]+=(T?-1:1)*ee.height:m.hide||(f[j]+=(T?-1:1)*ee.width),vr(vr({},p),{},hy({},g,ee))},{})},JL=function(t,n){var r=t.x,i=t.y,a=n.x,o=n.y;return{x:Math.min(r,a),y:Math.min(i,o),width:Math.abs(a-r),height:Math.abs(o-i)}},Dye=function(t){var n=t.x1,r=t.y1,i=t.x2,a=t.y2;return JL({x:n,y:r},{x:i,y:a})},e3=function(){function e(t){$ye(this,e),this.scale=t}return Mye(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.bandAware,a=r.position;if(n!==void 0){if(a)switch(a){case"start":return this.scale(n);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+o}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(n)+s}default:return this.scale(n)}if(i){var l=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+l}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),i=r[0],a=r[r.length-1];return i<=a?n>=i&&n<=a:n>=a&&n<=i}}],[{key:"create",value:function(n){return new e(n)}}])}();hy(e3,"EPS",1e-4);var ES=function(t){var n=Object.keys(t).reduce(function(r,i){return vr(vr({},r),{},hy({},i,e3.create(t[i])))},{});return vr(vr({},n),{},{apply:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.bandAware,s=a.position;return nye(i,function(l,c){return n[c].apply(l,{bandAware:o,position:s})})},isInRange:function(i){return KL(i,function(a,o){return n[o].isInRange(a)})}})};function Iye(e){return(e%180+180)%180}var Lye=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=Iye(i),o=a*Math.PI/180,s=Math.atan(r/n),l=o>s&&o-1?i[a?t[o]:o]:void 0}}var Uye=Vye,Wye=UL;function Hye(e){var t=Wye(e),n=t%1;return t===t?n?t-n:t:0}var qye=Hye,Kye=sI,Gye=qa,Yye=qye,Xye=Math.max;function Qye(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:Yye(n);return i<0&&(i=Xye(r+i,0)),Kye(e,Gye(t),i)}var Zye=Qye,Jye=Uye,eve=Zye,tve=Jye(eve),nve=tve;const rve=Ie(nve);var ive=HG(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),TS=w.createContext(void 0),CS=w.createContext(void 0),t3=w.createContext(void 0),n3=w.createContext({}),r3=w.createContext(void 0),i3=w.createContext(0),a3=w.createContext(0),FT=function(t){var n=t.state,r=n.xAxisMap,i=n.yAxisMap,a=n.offset,o=t.clipPathId,s=t.children,l=t.width,c=t.height,d=ive(a);return $.createElement(TS.Provider,{value:r},$.createElement(CS.Provider,{value:i},$.createElement(n3.Provider,{value:a},$.createElement(t3.Provider,{value:d},$.createElement(r3.Provider,{value:o},$.createElement(i3.Provider,{value:c},$.createElement(a3.Provider,{value:l},s)))))))},ave=function(){return w.useContext(r3)},o3=function(t){var n=w.useContext(TS);n==null&&Ho();var r=n[t];return r==null&&Ho(),r},ove=function(){var t=w.useContext(TS);return ra(t)},sve=function(){var t=w.useContext(CS),n=rve(t,function(r){return KL(r.domain,Number.isFinite)});return n||ra(t)},s3=function(t){var n=w.useContext(CS);n==null&&Ho();var r=n[t];return r==null&&Ho(),r},lve=function(){var t=w.useContext(t3);return t},cve=function(){return w.useContext(n3)},_S=function(){return w.useContext(a3)},kS=function(){return w.useContext(i3)};function Ll(e){"@babel/helpers - typeof";return Ll=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ll(e)}function uve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dve(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne*i)return!1;var a=n();return e*(t-e*a/2-r)>=0&&e*(t+e*a/2-i)<=0}function qve(e,t){return p3(e,t+1)}function Kve(e,t,n,r,i){for(var a=(r||[]).slice(),o=t.start,s=t.end,l=0,c=1,d=o,f=function(){var g=r==null?void 0:r[l];if(g===void 0)return{v:p3(r,c)};var m=l,y,v=function(){return y===void 0&&(y=n(g,m)),y},x=g.coordinate,b=l===0||qp(e,x,v,d,s);b||(l=0,d=o,c+=1),b&&(d=x+e*(v()/2+i),l+=c)},h;c<=a.length;)if(h=f(),h)return h.v;return[]}function vd(e){"@babel/helpers - typeof";return vd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vd(e)}function KT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ht(e){for(var t=1;t0?p.coordinate-y*e:p.coordinate})}else a[h]=p=Ht(Ht({},p),{},{tickCoord:p.coordinate});var v=qp(e,p.tickCoord,m,s,l);v&&(l=p.tickCoord-e*(m()/2+i),a[h]=Ht(Ht({},p),{},{isShow:!0}))},d=o-1;d>=0;d--)c(d);return a}function Zve(e,t,n,r,i,a){var o=(r||[]).slice(),s=o.length,l=t.start,c=t.end;if(a){var d=r[s-1],f=n(d,s-1),h=e*(d.coordinate+e*f/2-c);o[s-1]=d=Ht(Ht({},d),{},{tickCoord:h>0?d.coordinate-h*e:d.coordinate});var p=qp(e,d.tickCoord,function(){return f},l,c);p&&(c=d.tickCoord-e*(f/2+i),o[s-1]=Ht(Ht({},d),{},{isShow:!0}))}for(var g=a?s-1:s,m=function(x){var b=o[x],P,S=function(){return P===void 0&&(P=n(b,x)),P};if(x===0){var j=e*(b.coordinate-e*S()/2-l);o[x]=b=Ht(Ht({},b),{},{tickCoord:j<0?b.coordinate-j*e:b.coordinate})}else o[x]=b=Ht(Ht({},b),{},{tickCoord:b.coordinate});var N=qp(e,b.tickCoord,S,l,c);N&&(l=b.tickCoord+e*(S()/2+i),o[x]=Ht(Ht({},b),{},{isShow:!0}))},y=0;y=2?wr(i[1].coordinate-i[0].coordinate):1,v=Hve(a,y,p);return l==="equidistantPreserveStart"?Kve(y,v,m,i,o):(l==="preserveStart"||l==="preserveStartEnd"?h=Zve(y,v,m,i,o,l==="preserveStartEnd"):h=Qve(y,v,m,i,o),h.filter(function(x){return x.isShow}))}var Jve=["viewBox"],ege=["viewBox"],tge=["ticks"];function zl(e){"@babel/helpers - typeof";return zl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zl(e)}function $s(){return $s=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function nge(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function rge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function YT(e,t){for(var n=0;n0?l(this.props):l(p)),o<=0||s<=0||!g||!g.length?null:$.createElement(rt,{className:Se("recharts-cartesian-axis",c),ref:function(y){r.layerReference=y}},a&&this.renderAxisLine(),this.renderTicks(g,this.state.fontSize,this.state.letterSpacing),Kt.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,a){var o;return $.isValidElement(r)?o=$.cloneElement(r,i):he(r)?o=r(i):o=$.createElement(mp,$s({},i,{className:"recharts-cartesian-axis-tick-value"}),a),o}}])}(w.Component);RS(pc,"displayName","CartesianAxis");RS(pc,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var uge=["x1","y1","x2","y2","key"],dge=["offset"];function qo(e){"@babel/helpers - typeof";return qo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qo(e)}function XT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Gt(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function mge(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var yge=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,i=t.x,a=t.y,o=t.width,s=t.height,l=t.ry;return $.createElement("rect",{x:i,y:a,ry:l,width:o,height:s,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function v3(e,t){var n;if($.isValidElement(e))n=$.cloneElement(e,t);else if(he(e))n=e(t);else{var r=t.x1,i=t.y1,a=t.x2,o=t.y2,s=t.key,l=QT(t,uge),c=ve(l,!1);c.offset;var d=QT(c,dge);n=$.createElement("line",mo({},d,{x1:r,y1:i,x2:a,y2:o,fill:"none",key:s}))}return n}function vge(e){var t=e.x,n=e.width,r=e.horizontal,i=r===void 0?!0:r,a=e.horizontalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(s,l){var c=Gt(Gt({},e),{},{x1:t,y1:s,x2:t+n,y2:s,key:"line-".concat(l),index:l});return v3(i,c)});return $.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function gge(e){var t=e.y,n=e.height,r=e.vertical,i=r===void 0?!0:r,a=e.verticalPoints;if(!i||!a||!a.length)return null;var o=a.map(function(s,l){var c=Gt(Gt({},e),{},{x1:s,y1:t,x2:s,y2:t+n,key:"line-".concat(l),index:l});return v3(i,c)});return $.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function xge(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,i=e.y,a=e.width,o=e.height,s=e.horizontalPoints,l=e.horizontal,c=l===void 0?!0:l;if(!c||!t||!t.length)return null;var d=s.map(function(h){return Math.round(h+i-i)}).sort(function(h,p){return h-p});i!==d[0]&&d.unshift(0);var f=d.map(function(h,p){var g=!d[p+1],m=g?i+o-h:d[p+1]-h;if(m<=0)return null;var y=p%t.length;return $.createElement("rect",{key:"react-".concat(p),y:h,x:r,height:m,width:a,stroke:"none",fill:t[y],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return $.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},f)}function bge(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,i=e.fillOpacity,a=e.x,o=e.y,s=e.width,l=e.height,c=e.verticalPoints;if(!n||!r||!r.length)return null;var d=c.map(function(h){return Math.round(h+a-a)}).sort(function(h,p){return h-p});a!==d[0]&&d.unshift(0);var f=d.map(function(h,p){var g=!d[p+1],m=g?a+s-h:d[p+1]-h;if(m<=0)return null;var y=p%r.length;return $.createElement("rect",{key:"react-".concat(p),x:h,y:o,width:m,height:l,stroke:"none",fill:r[y],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return $.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},f)}var wge=function(t,n){var r=t.xAxis,i=t.width,a=t.height,o=t.offset;return OL(MS(Gt(Gt(Gt({},pc.defaultProps),r),{},{ticks:pi(r,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.left,o.left+o.width,n)},Sge=function(t,n){var r=t.yAxis,i=t.width,a=t.height,o=t.offset;return OL(MS(Gt(Gt(Gt({},pc.defaultProps),r),{},{ticks:pi(r,!0),viewBox:{x:0,y:0,width:i,height:a}})),o.top,o.top+o.height,n)},fs={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function DS(e){var t,n,r,i,a,o,s=_S(),l=kS(),c=cve(),d=Gt(Gt({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:fs.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:fs.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:fs.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:fs.horizontalFill,vertical:(a=e.vertical)!==null&&a!==void 0?a:fs.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:fs.verticalFill,x:G(e.x)?e.x:c.left,y:G(e.y)?e.y:c.top,width:G(e.width)?e.width:c.width,height:G(e.height)?e.height:c.height}),f=d.x,h=d.y,p=d.width,g=d.height,m=d.syncWithTicks,y=d.horizontalValues,v=d.verticalValues,x=ove(),b=sve();if(!G(p)||p<=0||!G(g)||g<=0||!G(f)||f!==+f||!G(h)||h!==+h)return null;var P=d.verticalCoordinatesGenerator||wge,S=d.horizontalCoordinatesGenerator||Sge,j=d.horizontalPoints,N=d.verticalPoints;if((!j||!j.length)&&he(S)){var O=y&&y.length,A=S({yAxis:b?Gt(Gt({},b),{},{ticks:O?y:b.ticks}):void 0,width:s,height:l,offset:c},O?!0:m);bi(Array.isArray(A),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(qo(A),"]")),Array.isArray(A)&&(j=A)}if((!N||!N.length)&&he(P)){var E=v&&v.length,T=P({xAxis:x?Gt(Gt({},x),{},{ticks:E?v:x.ticks}):void 0,width:s,height:l,offset:c},E?!0:m);bi(Array.isArray(T),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(qo(T),"]")),Array.isArray(T)&&(N=T)}return $.createElement("g",{className:"recharts-cartesian-grid"},$.createElement(yge,{fill:d.fill,fillOpacity:d.fillOpacity,x:d.x,y:d.y,width:d.width,height:d.height,ry:d.ry}),$.createElement(vge,mo({},d,{offset:c,horizontalPoints:j,xAxis:x,yAxis:b})),$.createElement(gge,mo({},d,{offset:c,verticalPoints:N,xAxis:x,yAxis:b})),$.createElement(xge,mo({},d,{horizontalPoints:j})),$.createElement(bge,mo({},d,{verticalPoints:N})))}DS.displayName="CartesianGrid";var jge=["layout","type","stroke","connectNulls","isRange","ref"],Pge=["key"],g3;function Vl(e){"@babel/helpers - typeof";return Vl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vl(e)}function x3(e,t){if(e==null)return{};var n=Nge(e,t),r,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Nge(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function yo(){return yo=Object.assign?Object.assign.bind():function(e){for(var t=1;t0||!Xu(d,o)||!Xu(f,s))?this.renderAreaWithAnimation(r,i):this.renderAreaStatically(o,s,r,i)}},{key:"render",value:function(){var r,i=this.props,a=i.hide,o=i.dot,s=i.points,l=i.className,c=i.top,d=i.left,f=i.xAxis,h=i.yAxis,p=i.width,g=i.height,m=i.isAnimationActive,y=i.id;if(a||!s||!s.length)return null;var v=this.state.isAnimationFinished,x=s.length===1,b=Se("recharts-area",l),P=f&&f.allowDataOverflow,S=h&&h.allowDataOverflow,j=P||S,N=be(y)?this.id:y,O=(r=ve(o,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},A=O.r,E=A===void 0?3:A,T=O.strokeWidth,C=T===void 0?2:T,D=QY(o)?o:{},M=D.clipDot,I=M===void 0?!0:M,F=E*2+C;return $.createElement(rt,{className:b},P||S?$.createElement("defs",null,$.createElement("clipPath",{id:"clipPath-".concat(N)},$.createElement("rect",{x:P?d:d-p/2,y:S?c:c-g/2,width:P?p:p*2,height:S?g:g*2})),!I&&$.createElement("clipPath",{id:"clipPath-dots-".concat(N)},$.createElement("rect",{x:d-F/2,y:c-F/2,width:p+F,height:g+F}))):null,x?null:this.renderArea(j,N),(o||x)&&this.renderDots(j,I,N),(!m||v)&&Ea.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,curBaseLine:r.baseLine,prevPoints:i.curPoints,prevBaseLine:i.curBaseLine}:r.points!==i.curPoints||r.baseLine!==i.curBaseLine?{curPoints:r.points,curBaseLine:r.baseLine}:null}}])}(w.PureComponent);g3=Bi;Wr(Bi,"displayName","Area");Wr(Bi,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!wi.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});Wr(Bi,"getBaseValue",function(e,t,n,r){var i=e.layout,a=e.baseValue,o=t.props.baseValue,s=o??a;if(G(s)&&typeof s=="number")return s;var l=i==="horizontal"?r:n,c=l.scale.domain();if(l.type==="number"){var d=Math.max(c[0],c[1]),f=Math.min(c[0],c[1]);return s==="dataMin"?f:s==="dataMax"||d<0?d:Math.max(Math.min(c[0],c[1]),0)}return s==="dataMin"?c[0]:s==="dataMax"?c[1]:c[0]});Wr(Bi,"getComposedData",function(e){var t=e.props,n=e.item,r=e.xAxis,i=e.yAxis,a=e.xAxisTicks,o=e.yAxisTicks,s=e.bandSize,l=e.dataKey,c=e.stackedData,d=e.dataStartIndex,f=e.displayedData,h=e.offset,p=t.layout,g=c&&c.length,m=g3.getBaseValue(t,n,r,i),y=p==="horizontal",v=!1,x=f.map(function(P,S){var j;g?j=c[d+S]:(j=kn(P,l),Array.isArray(j)?v=!0:j=[m,j]);var N=j[1]==null||g&&kn(P,l)==null;return y?{x:ME({axis:r,ticks:a,bandSize:s,entry:P,index:S}),y:N?null:i.scale(j[1]),value:j,payload:P}:{x:N?null:r.scale(j[1]),y:ME({axis:i,ticks:o,bandSize:s,entry:P,index:S}),value:j,payload:P}}),b;return g||v?b=x.map(function(P){var S=Array.isArray(P.value)?P.value[0]:null;return y?{x:P.x,y:S!=null&&P.y!=null?i.scale(S):null}:{x:S!=null?r.scale(S):null,y:P.y}}):b=y?i.scale(m):r.scale(m),Xi({points:x,baseLine:b,layout:p,isRange:v},h)});Wr(Bi,"renderDotItem",function(e,t){var n;if($.isValidElement(e))n=$.cloneElement(e,t);else if(he(e))n=e(t);else{var r=Se("recharts-area-dot",typeof e!="boolean"?e.className:""),i=t.key,a=x3(t,Pge);n=$.createElement(AS,yo({},a,{key:i,className:r}))}return n});function Ul(e){"@babel/helpers - typeof";return Ul=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ul(e)}function $ge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Mge(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function b0e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function w0e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function S0e(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?o:t&&t.length&&G(i)&&G(a)?t.slice(i,a+1):[]};function R3(e){return e==="number"?[0,"auto"]:void 0}var mb=function(t,n,r,i){var a=t.graphicalItems,o=t.tooltipAxis,s=xy(n,t);return r<0||!a||!a.length||r>=s.length?null:a.reduce(function(l,c){var d,f=(d=c.props.data)!==null&&d!==void 0?d:n;f&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(f=f.slice(t.dataStartIndex,t.dataEndIndex+1));var h;if(o.dataKey&&!o.allowDuplicatedCategory){var p=f===void 0?s:f;h=Jh(p,o.dataKey,i)}else h=f&&f[r]||s[r];return h?[].concat(ql(l),[EL(c,h)]):l},[])},aC=function(t,n,r,i){var a=i||{x:t.chartX,y:t.chartY},o=M0e(a,r),s=t.orderedTooltipTicks,l=t.tooltipAxis,c=t.tooltipTicks,d=ede(o,s,c,l);if(d>=0&&c){var f=c[d]&&c[d].value,h=mb(t,n,d,f),p=R0e(r,s,d,a);return{activeTooltipIndex:d,activeLabel:f,activePayload:h,activeCoordinate:p}}return null},D0e=function(t,n){var r=n.axes,i=n.graphicalItems,a=n.axisType,o=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,d=t.layout,f=t.children,h=t.stackOffset,p=NL(d,a);return r.reduce(function(g,m){var y,v=m.type.defaultProps!==void 0?z(z({},m.type.defaultProps),m.props):m.props,x=v.type,b=v.dataKey,P=v.allowDataOverflow,S=v.allowDuplicatedCategory,j=v.scale,N=v.ticks,O=v.includeHidden,A=v[o];if(g[A])return g;var E=xy(t.data,{graphicalItems:i.filter(function(W){var ee,le=o in W.props?W.props[o]:(ee=W.type.defaultProps)===null||ee===void 0?void 0:ee[o];return le===A}),dataStartIndex:l,dataEndIndex:c}),T=E.length,C,D,M;l0e(v.domain,P,x)&&(C=Mx(v.domain,null,P),p&&(x==="number"||j!=="auto")&&(M=cu(E,b,"category")));var I=R3(x);if(!C||C.length===0){var F,B=(F=v.domain)!==null&&F!==void 0?F:I;if(b){if(C=cu(E,b,x),x==="category"&&p){var k=VY(C);S&&k?(D=C,C=Lp(0,T)):S||(C=LE(B,C,m).reduce(function(W,ee){return W.indexOf(ee)>=0?W:[].concat(ql(W),[ee])},[]))}else if(x==="category")S?C=C.filter(function(W){return W!==""&&!be(W)}):C=LE(B,C,m).reduce(function(W,ee){return W.indexOf(ee)>=0||ee===""||be(ee)?W:[].concat(ql(W),[ee])},[]);else if(x==="number"){var L=ade(E,i.filter(function(W){var ee,le,Pe=o in W.props?W.props[o]:(ee=W.type.defaultProps)===null||ee===void 0?void 0:ee[o],Me="hide"in W.props?W.props.hide:(le=W.type.defaultProps)===null||le===void 0?void 0:le.hide;return Pe===A&&(O||!Me)}),b,a,d);L&&(C=L)}p&&(x==="number"||j!=="auto")&&(M=cu(E,b,"category"))}else p?C=Lp(0,T):s&&s[A]&&s[A].hasStack&&x==="number"?C=h==="expand"?[0,1]:AL(s[A].stackGroups,l,c):C=PL(E,i.filter(function(W){var ee=o in W.props?W.props[o]:W.type.defaultProps[o],le="hide"in W.props?W.props.hide:W.type.defaultProps.hide;return ee===A&&(O||!le)}),x,d,!0);if(x==="number")C=fb(f,C,A,a,N),B&&(C=Mx(B,C,P));else if(x==="category"&&B){var R=B,q=C.every(function(W){return R.indexOf(W)>=0});q&&(C=R)}}return z(z({},g),{},ie({},A,z(z({},v),{},{axisType:a,domain:C,categoricalDomain:M,duplicateDomain:D,originalDomain:(y=v.domain)!==null&&y!==void 0?y:I,isCategorical:p,layout:d})))},{})},I0e=function(t,n){var r=n.graphicalItems,i=n.Axis,a=n.axisType,o=n.axisIdKey,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,d=t.layout,f=t.children,h=xy(t.data,{graphicalItems:r,dataStartIndex:l,dataEndIndex:c}),p=h.length,g=NL(d,a),m=-1;return r.reduce(function(y,v){var x=v.type.defaultProps!==void 0?z(z({},v.type.defaultProps),v.props):v.props,b=x[o],P=R3("number");if(!y[b]){m++;var S;return g?S=Lp(0,p):s&&s[b]&&s[b].hasStack?(S=AL(s[b].stackGroups,l,c),S=fb(f,S,b,a)):(S=Mx(P,PL(h,r.filter(function(j){var N,O,A=o in j.props?j.props[o]:(N=j.type.defaultProps)===null||N===void 0?void 0:N[o],E="hide"in j.props?j.props.hide:(O=j.type.defaultProps)===null||O===void 0?void 0:O.hide;return A===b&&!E}),"number",d),i.defaultProps.allowDataOverflow),S=fb(f,S,b,a)),z(z({},y),{},ie({},b,z(z({axisType:a},i.defaultProps),{},{hide:!0,orientation:nr(k0e,"".concat(a,".").concat(m%2),null),domain:S,originalDomain:P,isCategorical:g,layout:d})))}return y},{})},L0e=function(t,n){var r=n.axisType,i=r===void 0?"xAxis":r,a=n.AxisComp,o=n.graphicalItems,s=n.stackGroups,l=n.dataStartIndex,c=n.dataEndIndex,d=t.children,f="".concat(i,"Id"),h=Pr(d,a),p={};return h&&h.length?p=D0e(t,{axes:h,graphicalItems:o,axisType:i,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:c}):o&&o.length&&(p=I0e(t,{Axis:a,graphicalItems:o,axisType:i,axisIdKey:f,stackGroups:s,dataStartIndex:l,dataEndIndex:c})),p},F0e=function(t){var n=ra(t),r=pi(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:J1(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:Tp(n,r)}},oC=function(t){var n=t.children,r=t.defaultShowTooltip,i=jn(n,Dl),a=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(a=i.props.startIndex),i.props.endIndex>=0&&(o=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:a,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!r}},B0e=function(t){return!t||!t.length?!1:t.some(function(n){var r=xi(n&&n.type);return r&&r.indexOf("Bar")>=0})},sC=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},z0e=function(t,n){var r=t.props,i=t.graphicalItems,a=t.xAxisMap,o=a===void 0?{}:a,s=t.yAxisMap,l=s===void 0?{}:s,c=r.width,d=r.height,f=r.children,h=r.margin||{},p=jn(f,Dl),g=jn(f,Gs),m=Object.keys(l).reduce(function(S,j){var N=l[j],O=N.orientation;return!N.mirror&&!N.hide?z(z({},S),{},ie({},O,S[O]+N.width)):S},{left:h.left||0,right:h.right||0}),y=Object.keys(o).reduce(function(S,j){var N=o[j],O=N.orientation;return!N.mirror&&!N.hide?z(z({},S),{},ie({},O,nr(S,"".concat(O))+N.height)):S},{top:h.top||0,bottom:h.bottom||0}),v=z(z({},y),m),x=v.bottom;p&&(v.bottom+=p.props.height||Dl.defaultProps.height),g&&n&&(v=rde(v,i,r,n));var b=c-v.left-v.right,P=d-v.top-v.bottom;return z(z({brushBottom:x},v),{},{width:Math.max(b,0),height:Math.max(P,0)})},V0e=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},D3=function(t){var n=t.chartName,r=t.GraphicalChild,i=t.defaultTooltipEventType,a=i===void 0?"axis":i,o=t.validateTooltipEventTypes,s=o===void 0?["axis"]:o,l=t.axisComponents,c=t.legendContent,d=t.formatAxisMap,f=t.defaultProps,h=function(v,x){var b=x.graphicalItems,P=x.stackGroups,S=x.offset,j=x.updateId,N=x.dataStartIndex,O=x.dataEndIndex,A=v.barSize,E=v.layout,T=v.barGap,C=v.barCategoryGap,D=v.maxBarSize,M=sC(E),I=M.numericAxisName,F=M.cateAxisName,B=B0e(b),k=[];return b.forEach(function(L,R){var q=xy(v.data,{graphicalItems:[L],dataStartIndex:N,dataEndIndex:O}),W=L.type.defaultProps!==void 0?z(z({},L.type.defaultProps),L.props):L.props,ee=W.dataKey,le=W.maxBarSize,Pe=W["".concat(I,"Id")],Me=W["".concat(F,"Id")],st={},Ae=l.reduce(function(Bt,cr){var Rn=x["".concat(cr.axisType,"Map")],Xa=W["".concat(cr.axisType,"Id")];Rn&&Rn[Xa]||cr.axisType==="zAxis"||Ho();var Qa=Rn[Xa];return z(z({},Bt),{},ie(ie({},cr.axisType,Qa),"".concat(cr.axisType,"Ticks"),pi(Qa)))},st),X=Ae[F],ne=Ae["".concat(F,"Ticks")],re=P&&P[Pe]&&P[Pe].hasStack&&vde(L,P[Pe].stackGroups),V=xi(L.type).indexOf("Bar")>=0,ye=Tp(X,ne),oe=[],Ne=B&&tde({barSize:A,stackGroups:P,totalSize:V0e(Ae,F)});if(V){var se,et,pt=be(le)?D:le,pe=(se=(et=Tp(X,ne,!0))!==null&&et!==void 0?et:pt)!==null&&se!==void 0?se:0;oe=nde({barGap:T,barCategoryGap:C,bandSize:pe!==ye?pe:ye,sizeList:Ne[Me],maxBarSize:pt}),pe!==ye&&(oe=oe.map(function(Bt){return z(z({},Bt),{},{position:z(z({},Bt.position),{},{offset:Bt.position.offset-pe/2})})}))}var zi=L&&L.type&&L.type.getComposedData;zi&&k.push({props:z(z({},zi(z(z({},Ae),{},{displayedData:q,props:v,dataKey:ee,item:L,bandSize:ye,barPosition:oe,offset:S,stackedData:re,layout:E,dataStartIndex:N,dataEndIndex:O}))),{},ie(ie(ie({key:L.key||"item-".concat(R)},I,Ae[I]),F,Ae[F]),"animationId",j)),childIndex:eX(L,v.children),item:L})}),k},p=function(v,x){var b=v.props,P=v.dataStartIndex,S=v.dataEndIndex,j=v.updateId;if(!_O({props:b}))return null;var N=b.children,O=b.layout,A=b.stackOffset,E=b.data,T=b.reverseStackOrder,C=sC(O),D=C.numericAxisName,M=C.cateAxisName,I=Pr(N,r),F=pde(E,I,"".concat(D,"Id"),"".concat(M,"Id"),A,T),B=l.reduce(function(W,ee){var le="".concat(ee.axisType,"Map");return z(z({},W),{},ie({},le,L0e(b,z(z({},ee),{},{graphicalItems:I,stackGroups:ee.axisType===D&&F,dataStartIndex:P,dataEndIndex:S}))))},{}),k=z0e(z(z({},B),{},{props:b,graphicalItems:I}),x==null?void 0:x.legendBBox);Object.keys(B).forEach(function(W){B[W]=d(b,B[W],k,W.replace("Map",""),n)});var L=B["".concat(M,"Map")],R=F0e(L),q=h(b,z(z({},B),{},{dataStartIndex:P,dataEndIndex:S,updateId:j,graphicalItems:I,stackGroups:F,offset:k}));return z(z({formattedGraphicalItems:q,graphicalItems:I,offset:k,stackGroups:F},R),B)},g=function(y){function v(x){var b,P,S;return w0e(this,v),S=P0e(this,v,[x]),ie(S,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),ie(S,"accessibilityManager",new s0e),ie(S,"handleLegendBBoxUpdate",function(j){if(j){var N=S.state,O=N.dataStartIndex,A=N.dataEndIndex,E=N.updateId;S.setState(z({legendBBox:j},p({props:S.props,dataStartIndex:O,dataEndIndex:A,updateId:E},z(z({},S.state),{},{legendBBox:j}))))}}),ie(S,"handleReceiveSyncEvent",function(j,N,O){if(S.props.syncId===j){if(O===S.eventEmitterSymbol&&typeof S.props.syncMethod!="function")return;S.applySyncEvent(N)}}),ie(S,"handleBrushChange",function(j){var N=j.startIndex,O=j.endIndex;if(N!==S.state.dataStartIndex||O!==S.state.dataEndIndex){var A=S.state.updateId;S.setState(function(){return z({dataStartIndex:N,dataEndIndex:O},p({props:S.props,dataStartIndex:N,dataEndIndex:O,updateId:A},S.state))}),S.triggerSyncEvent({dataStartIndex:N,dataEndIndex:O})}}),ie(S,"handleMouseEnter",function(j){var N=S.getMouseInfo(j);if(N){var O=z(z({},N),{},{isTooltipActive:!0});S.setState(O),S.triggerSyncEvent(O);var A=S.props.onMouseEnter;he(A)&&A(O,j)}}),ie(S,"triggeredAfterMouseMove",function(j){var N=S.getMouseInfo(j),O=N?z(z({},N),{},{isTooltipActive:!0}):{isTooltipActive:!1};S.setState(O),S.triggerSyncEvent(O);var A=S.props.onMouseMove;he(A)&&A(O,j)}),ie(S,"handleItemMouseEnter",function(j){S.setState(function(){return{isTooltipActive:!0,activeItem:j,activePayload:j.tooltipPayload,activeCoordinate:j.tooltipPosition||{x:j.cx,y:j.cy}}})}),ie(S,"handleItemMouseLeave",function(){S.setState(function(){return{isTooltipActive:!1}})}),ie(S,"handleMouseMove",function(j){j.persist(),S.throttleTriggeredAfterMouseMove(j)}),ie(S,"handleMouseLeave",function(j){S.throttleTriggeredAfterMouseMove.cancel();var N={isTooltipActive:!1};S.setState(N),S.triggerSyncEvent(N);var O=S.props.onMouseLeave;he(O)&&O(N,j)}),ie(S,"handleOuterEvent",function(j){var N=JY(j),O=nr(S.props,"".concat(N));if(N&&he(O)){var A,E;/.*touch.*/i.test(N)?E=S.getMouseInfo(j.changedTouches[0]):E=S.getMouseInfo(j),O((A=E)!==null&&A!==void 0?A:{},j)}}),ie(S,"handleClick",function(j){var N=S.getMouseInfo(j);if(N){var O=z(z({},N),{},{isTooltipActive:!0});S.setState(O),S.triggerSyncEvent(O);var A=S.props.onClick;he(A)&&A(O,j)}}),ie(S,"handleMouseDown",function(j){var N=S.props.onMouseDown;if(he(N)){var O=S.getMouseInfo(j);N(O,j)}}),ie(S,"handleMouseUp",function(j){var N=S.props.onMouseUp;if(he(N)){var O=S.getMouseInfo(j);N(O,j)}}),ie(S,"handleTouchMove",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&S.throttleTriggeredAfterMouseMove(j.changedTouches[0])}),ie(S,"handleTouchStart",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&S.handleMouseDown(j.changedTouches[0])}),ie(S,"handleTouchEnd",function(j){j.changedTouches!=null&&j.changedTouches.length>0&&S.handleMouseUp(j.changedTouches[0])}),ie(S,"handleDoubleClick",function(j){var N=S.props.onDoubleClick;if(he(N)){var O=S.getMouseInfo(j);N(O,j)}}),ie(S,"handleContextMenu",function(j){var N=S.props.onContextMenu;if(he(N)){var O=S.getMouseInfo(j);N(O,j)}}),ie(S,"triggerSyncEvent",function(j){S.props.syncId!==void 0&&ag.emit(og,S.props.syncId,j,S.eventEmitterSymbol)}),ie(S,"applySyncEvent",function(j){var N=S.props,O=N.layout,A=N.syncMethod,E=S.state.updateId,T=j.dataStartIndex,C=j.dataEndIndex;if(j.dataStartIndex!==void 0||j.dataEndIndex!==void 0)S.setState(z({dataStartIndex:T,dataEndIndex:C},p({props:S.props,dataStartIndex:T,dataEndIndex:C,updateId:E},S.state)));else if(j.activeTooltipIndex!==void 0){var D=j.chartX,M=j.chartY,I=j.activeTooltipIndex,F=S.state,B=F.offset,k=F.tooltipTicks;if(!B)return;if(typeof A=="function")I=A(k,j);else if(A==="value"){I=-1;for(var L=0;L=0){var re,V;if(D.dataKey&&!D.allowDuplicatedCategory){var ye=typeof D.dataKey=="function"?ne:"payload.".concat(D.dataKey.toString());re=Jh(L,ye,I),V=R&&q&&Jh(q,ye,I)}else re=L==null?void 0:L[M],V=R&&q&&q[M];if(Me||Pe){var oe=j.props.activeIndex!==void 0?j.props.activeIndex:M;return[w.cloneElement(j,z(z(z({},A.props),Ae),{},{activeIndex:oe})),null,null]}if(!be(re))return[X].concat(ql(S.renderActivePoints({item:A,activePoint:re,basePoint:V,childIndex:M,isRange:R})))}else{var Ne,se=(Ne=S.getItemByXY(S.state.activeCoordinate))!==null&&Ne!==void 0?Ne:{graphicalItem:X},et=se.graphicalItem,pt=et.item,pe=pt===void 0?j:pt,zi=et.childIndex,Bt=z(z(z({},A.props),Ae),{},{activeIndex:zi});return[w.cloneElement(pe,Bt),null,null]}return R?[X,null,null]:[X,null]}),ie(S,"renderCustomized",function(j,N,O){return w.cloneElement(j,z(z({key:"recharts-customized-".concat(O)},S.props),S.state))}),ie(S,"renderMap",{CartesianGrid:{handler:Vf,once:!0},ReferenceArea:{handler:S.renderReferenceElement},ReferenceLine:{handler:Vf},ReferenceDot:{handler:S.renderReferenceElement},XAxis:{handler:Vf},YAxis:{handler:Vf},Brush:{handler:S.renderBrush,once:!0},Bar:{handler:S.renderGraphicChild},Line:{handler:S.renderGraphicChild},Area:{handler:S.renderGraphicChild},Radar:{handler:S.renderGraphicChild},RadialBar:{handler:S.renderGraphicChild},Scatter:{handler:S.renderGraphicChild},Pie:{handler:S.renderGraphicChild},Funnel:{handler:S.renderGraphicChild},Tooltip:{handler:S.renderCursor,once:!0},PolarGrid:{handler:S.renderPolarGrid,once:!0},PolarAngleAxis:{handler:S.renderPolarAxis},PolarRadiusAxis:{handler:S.renderPolarAxis},Customized:{handler:S.renderCustomized}}),S.clipPathId="".concat((b=x.id)!==null&&b!==void 0?b:Bd("recharts"),"-clip"),S.throttleTriggeredAfterMouseMove=wI(S.triggeredAfterMouseMove,(P=x.throttleDelay)!==null&&P!==void 0?P:1e3/60),S.state={},S}return A0e(v,y),j0e(v,[{key:"componentDidMount",value:function(){var b,P;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(b=this.props.margin.left)!==null&&b!==void 0?b:0,top:(P=this.props.margin.top)!==null&&P!==void 0?P:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var b=this.props,P=b.children,S=b.data,j=b.height,N=b.layout,O=jn(P,Dr);if(O){var A=O.props.defaultIndex;if(!(typeof A!="number"||A<0||A>this.state.tooltipTicks.length-1)){var E=this.state.tooltipTicks[A]&&this.state.tooltipTicks[A].value,T=mb(this.state,S,A,E),C=this.state.tooltipTicks[A].coordinate,D=(this.state.offset.top+j)/2,M=N==="horizontal",I=M?{x:C,y:D}:{y:C,x:D},F=this.state.formattedGraphicalItems.find(function(k){var L=k.item;return L.type.name==="Scatter"});F&&(I=z(z({},I),F.props.points[A].tooltipPosition),T=F.props.points[A].tooltipPayload);var B={activeTooltipIndex:A,isTooltipActive:!0,activeLabel:E,activePayload:T,activeCoordinate:I};this.setState(B),this.renderCursor(O),this.accessibilityManager.setIndex(A)}}}},{key:"getSnapshotBeforeUpdate",value:function(b,P){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==P.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==b.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==b.margin){var S,j;this.accessibilityManager.setDetails({offset:{left:(S=this.props.margin.left)!==null&&S!==void 0?S:0,top:(j=this.props.margin.top)!==null&&j!==void 0?j:0}})}return null}},{key:"componentDidUpdate",value:function(b){G0([jn(b.children,Dr)],[jn(this.props.children,Dr)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var b=jn(this.props.children,Dr);if(b&&typeof b.props.shared=="boolean"){var P=b.props.shared?"axis":"item";return s.indexOf(P)>=0?P:a}return a}},{key:"getMouseInfo",value:function(b){if(!this.container)return null;var P=this.container,S=P.getBoundingClientRect(),j=Ooe(S),N={chartX:Math.round(b.pageX-j.left),chartY:Math.round(b.pageY-j.top)},O=S.width/P.offsetWidth||1,A=this.inRange(N.chartX,N.chartY,O);if(!A)return null;var E=this.state,T=E.xAxisMap,C=E.yAxisMap,D=this.getTooltipEventType(),M=aC(this.state,this.props.data,this.props.layout,A);if(D!=="axis"&&T&&C){var I=ra(T).scale,F=ra(C).scale,B=I&&I.invert?I.invert(N.chartX):null,k=F&&F.invert?F.invert(N.chartY):null;return z(z({},N),{},{xValue:B,yValue:k},M)}return M?z(z({},N),M):null}},{key:"inRange",value:function(b,P){var S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,j=this.props.layout,N=b/S,O=P/S;if(j==="horizontal"||j==="vertical"){var A=this.state.offset,E=N>=A.left&&N<=A.left+A.width&&O>=A.top&&O<=A.top+A.height;return E?{x:N,y:O}:null}var T=this.state,C=T.angleAxisMap,D=T.radiusAxisMap;if(C&&D){var M=ra(C);return zE({x:N,y:O},M)}return null}},{key:"parseEventsOfWrapper",value:function(){var b=this.props.children,P=this.getTooltipEventType(),S=jn(b,Dr),j={};S&&P==="axis"&&(S.props.trigger==="click"?j={onClick:this.handleClick}:j={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var N=ep(this.props,this.handleOuterEvent);return z(z({},N),j)}},{key:"addListener",value:function(){ag.on(og,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){ag.removeListener(og,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(b,P,S){for(var j=this.state.formattedGraphicalItems,N=0,O=j.length;N");return e}const IS=w.forwardRef(({id:e,className:t,children:n,config:r,...i},a)=>{const o=w.useId(),s=`chart-${e||o.replace(/:/g,"")}`;return u.jsx(L3.Provider,{value:{config:r},children:u.jsxs("div",{"data-chart":s,ref:a,className:de("flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none",t),...i,children:[u.jsx(W0e,{id:s,config:r}),u.jsx(vx,{children:n})]})})});IS.displayName="Chart";const W0e=({id:e,config:t})=>{const n=Object.entries(t).filter(([,r])=>r.theme||r.color);return n.length?u.jsx("style",{dangerouslySetInnerHTML:{__html:Object.entries(U0e).map(([r,i])=>` -${i} [data-chart=${e}] { -${n.map(([a,o])=>{var l;const s=((l=o.theme)==null?void 0:l[r])||o.color;return s?` --color-${a}: ${s};`:null}).join(` -`)} -} -`).join(` -`)}}):null},B3=Dr,LS=w.forwardRef(({active:e,payload:t,className:n,indicator:r="dot",hideLabel:i=!1,hideIndicator:a=!1,label:o,labelFormatter:s,labelClassName:l,formatter:c,color:d,nameKey:f,labelKey:h},p)=>{const{config:g}=F3(),m=w.useMemo(()=>{var S;if(i||!(t!=null&&t.length))return null;const[v]=t,x=`${h||(v==null?void 0:v.dataKey)||(v==null?void 0:v.name)||"value"}`,b=yb(g,v,x),P=!h&&typeof o=="string"?((S=g[o])==null?void 0:S.label)||o:b==null?void 0:b.label;return s?u.jsx("div",{className:de("font-medium",l),children:s(P,t)}):P?u.jsx("div",{className:de("font-medium",l),children:P}):null},[o,s,t,i,l,g,h]);if(!e||!(t!=null&&t.length))return null;const y=t.length===1&&r!=="dot";return u.jsxs("div",{ref:p,className:de("grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl",n),children:[y?null:m,u.jsx("div",{className:"grid gap-1.5",children:t.map((v,x)=>{const b=`${f||v.name||v.dataKey||"value"}`,P=yb(g,v,b),S=d||v.payload.fill||v.color;return u.jsx("div",{className:de("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",r==="dot"&&"items-center"),children:c&&(v==null?void 0:v.value)!==void 0&&v.name?c(v.value,v.name,v,x,v.payload):u.jsxs(u.Fragment,{children:[P!=null&&P.icon?u.jsx(P.icon,{}):!a&&u.jsx("div",{className:de("shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]",{"h-2.5 w-2.5":r==="dot","w-1":r==="line","w-0 border-[1.5px] border-dashed bg-transparent":r==="dashed","my-0.5":y&&r==="dashed"}),style:{"--color-bg":S,"--color-border":S}}),u.jsxs("div",{className:de("flex flex-1 justify-between leading-none",y?"items-end":"items-center"),children:[u.jsxs("div",{className:"grid gap-1.5",children:[y?m:null,u.jsx("span",{className:"text-muted-foreground",children:(P==null?void 0:P.label)||v.name})]}),v.value&&u.jsx("span",{className:"font-mono font-medium tabular-nums text-foreground",children:v.value.toLocaleString()})]})]})},v.dataKey)})})]})});LS.displayName="ChartTooltip";const H0e=w.forwardRef(({className:e,hideIcon:t=!1,payload:n,verticalAlign:r="bottom",nameKey:i},a)=>{const{config:o}=F3();return n!=null&&n.length?u.jsx("div",{ref:a,className:de("flex items-center justify-center gap-4",r==="top"?"pb-3":"pt-3",e),children:n.map(s=>{const l=`${i||s.dataKey||"value"}`,c=yb(o,s,l);return u.jsxs("div",{className:de("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"),children:[c!=null&&c.icon&&!t?u.jsx(c.icon,{}):u.jsx("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:s.color}}),c==null?void 0:c.label]},s.value)})}):null});H0e.displayName="ChartLegend";function yb(e,t,n){if(typeof t!="object"||t===null)return;const r="payload"in t&&typeof t.payload=="object"&&t.payload!==null?t.payload:void 0;let i=n;return n in t&&typeof t[n]=="string"?i=t[n]:r&&n in r&&typeof r[n]=="string"&&(i=r[n]),i in e?e[i]:e[n]}const q0e=Y(ue);function qi(e,t){const n=(t==null?void 0:t.decimals)??2;return new Intl.NumberFormat("en-IN",{style:"currency",currency:"INR",minimumFractionDigits:n,maximumFractionDigits:n}).format(e||0)}function lg(e){return e.toISOString().slice(0,10)}function cg(e){return e.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}function K0e(e){if(!Number.isFinite(e))return"";if(e<=0)return"now";const t=Math.round(e),n=Math.floor(t/86400),r=Math.floor(t%86400/3600),i=Math.floor(t%3600/60),a=[];return n&&a.push(`${n}d`),r&&a.push(`${r}h`),!n&&i&&a.push(`${i}m`),a.length===0&&a.push("less than 1m"),`in ${a.join(" ")}`}function G0e(){const[e,t]=w.useState(!1);return w.useEffect(()=>{const n=window.matchMedia("(prefers-reduced-motion: reduce)"),r=()=>t(n.matches);return r(),n.addEventListener?(n.addEventListener("change",r),()=>n.removeEventListener("change",r)):(n.addListener(r),()=>n.removeListener(r))},[]),e}function Y0e(){var BS,zS,VS,US,WS,HS,qS,KS,GS,YS,XS,QS;const e=w.useRef(null),[t,n]=w.useState(!1),[r,i]=w.useState(0),a=G0e(),[o,s]=w.useState(!1),[l,c]=w.useState(!1),[d,f]=w.useState(!1),[h,p]=w.useState(!1),[g,m]=w.useState(!1),[y,v]=w.useState([]),[x,b]=w.useState(null),[P,S]=w.useState(null),[j,N]=w.useState(null),{data:O,isFetching:A,refetch:E}=vt({queryKey:["/api/broker/status"],queryFn:yi({on401:"returnNull"}),staleTime:0,refetchOnMount:"always"}),{data:T}=vt({queryKey:["/api/me"],queryFn:yi({on401:"returnNull"})}),C=vt({queryKey:["/api/system/status"],queryFn:yi({on401:"throw"}),refetchInterval:15e3}),D=Oo({mutationFn:async()=>{var we;const U=await fetch("/api/system/arm",{method:"POST",credentials:"include"});if(U.status===401){let $t={};try{$t=await U.json()}catch{}const ni=((we=$t==null?void 0:$t.detail)==null?void 0:we.redirect_url)||($t==null?void 0:$t.redirect_url)||"/api/broker/login";return window.location.assign(ni),null}if(!U.ok){const $t=await U.text();throw new Error($t||U.statusText)}return await U.json()},onSuccess:U=>{U&&(N(U),yt({title:"System armed",description:U.next_execution?`Next execution at ${new Date(U.next_execution).toLocaleString()}`:"All strategies are armed."}),C.refetch(),E())},onError:U=>yt({title:"Arm failed",description:(U==null?void 0:U.message)||"Unable to arm system."})}),M=vt({queryKey:["/api/zerodha/holdings"],queryFn:async()=>(await Ze("GET","/api/zerodha/holdings")).json(),enabled:!!(O!=null&&O.connected),retry:1,retryDelay:600,onSuccess:U=>{v((U==null?void 0:U.holdings)||[]),p(!1),m(!1)},onError:()=>{O!=null&&O.connected&&p(!0)}}),I=vt({queryKey:["/api/zerodha/funds"],queryFn:async()=>(await Ze("GET","/api/zerodha/funds")).json(),enabled:!!(O!=null&&O.connected),retry:1,retryDelay:600,onSuccess:U=>{b((U==null?void 0:U.funds)??null),p(!1),m(!1)},onError:()=>{O!=null&&O.connected&&p(!0)}}),[F,B]=w.useState(()=>lg(new Date(Date.now()-90*24*60*60*1e3))),[k,L]=w.useState(5e3),[R,q]=w.useState(30),[W,ee]=w.useState("STOPPED"),[le,Pe]=w.useState(!1),[Me,st]=w.useState(!1),[Ae,X]=w.useState(null),[ne,re]=w.useState(null),V=O!=null&&O.connected_at?new Date(O.connected_at):null,ye=V&&!isNaN(V.getTime())?lg(V):void 0;w.useEffect(()=>{ye&&B(U=>U===ye?U:ye)},[ye]);const oe=w.useCallback(async()=>{try{const U=await aD();ee((U==null?void 0:U.status)??"STOPPED")}catch{ee("STOPPED")}},[]);w.useEffect(()=>{oe();const U=window.setInterval(oe,15e3);return()=>window.clearInterval(U)},[oe]),w.useEffect(()=>{const U=async()=>{try{const ni=await(await fetch("/api/engine/status")).json();X(ni)}catch{X(null)}};U();const we=window.setInterval(U,5e3);return()=>window.clearInterval(we)},[]),w.useEffect(()=>{const U=async()=>{try{const ni=await(await fetch("/api/market/status")).json();re(ni)}catch{re(null)}};U();const we=window.setInterval(U,5e3);return()=>window.clearInterval(we)},[]),w.useEffect(()=>{if(a){n(!0);return}const U=new IntersectionObserver(([we])=>{we.isIntersecting&&n(!0)},{threshold:.2});return e.current&&U.observe(e.current),()=>U.disconnect()},[a]),w.useEffect(()=>{if(a){i(0);return}let U=null;const we=()=>{U===null&&(U=window.requestAnimationFrame(()=>{i(window.scrollY),U=null}))};return window.addEventListener("scroll",we,{passive:!0}),we(),()=>{window.removeEventListener("scroll",we),U!==null&&window.cancelAnimationFrame(U)}},[a]);const Ne=vt({queryKey:["/api/zerodha/equity-curve",F],queryFn:async()=>(await Ze("GET",`/api/zerodha/equity-curve${F?`?from=${F}`:""}`)).json(),enabled:!!(O!=null&&O.connected),retry:1,retryDelay:600,onSuccess:U=>{S(U??null),p(!1),m(!1)},onError:()=>{O!=null&&O.connected&&p(!0)}}),se=!!(O!=null&&O.connected),et=O!==null,pt=M.data?M.data.holdings:y,pe=((BS=I.data)==null?void 0:BS.funds)??x,zi=pt.length===0,Bt=((zS=C.data)==null?void 0:zS.runs)??[],cr=Bt.filter(U=>(U.status||"").toUpperCase()==="RUNNING").length,Rn=w.useMemo(()=>{const U=Bt.map(we=>we.next_run?new Date(we.next_run):null).filter(we=>!!we&&!Number.isNaN(we.getTime()));return U.length?(U.sort((we,$t)=>we.getTime()-$t.getTime()),U[0]):null},[Bt]);w.useEffect(()=>{se||(p(!1),m(!1))},[se]),w.useEffect(()=>{!h||g||!se||(m(!0),(async()=>{try{await E(),await Promise.all([M.refetch(),I.refetch(),Ne.refetch()])}catch{return}})())},[h,g,se,E,M,I,Ne]);const Xa=(pe==null?void 0:pe.balance)??(pe==null?void 0:pe.net)??(pe==null?void 0:pe.withdrawable)??(pe==null?void 0:pe.cash)??((VS=pe==null?void 0:pe.raw)==null?void 0:VS.net)??((WS=(US=pe==null?void 0:pe.raw)==null?void 0:US.available)==null?void 0:WS.live_balance)??((qS=(HS=pe==null?void 0:pe.raw)==null?void 0:HS.available)==null?void 0:qS.opening_balance)??0,{totalValue:Qa,totalPnl:by}=w.useMemo(()=>pt.reduce((U,we)=>{const $t=Number(we.quantity??we.qty??0),ni=Number(we.last_price??we.average_price??0),Xd=Number(we.pnl??0);return{totalValue:U.totalValue+$t*ni,totalPnl:U.totalPnl+Xd}},{totalValue:0,totalPnl:0}),[pt]),gn=Ne.data??P,is=(gn==null?void 0:gn.points)??[],qd=h&&se,mc=W==="RUNNING"?"RUNNING":"STOPPED",Kd=mc==="RUNNING",Gd=Ae!=null&&Ae.last_heartbeat_ts?(Date.now()-new Date(Ae.last_heartbeat_ts).getTime())/1e3:1/0;let sn;Ae?Ae.state!=="RUNNING"?sn="STOPPED":Gd<10?sn="ACTIVE":Gd<30?sn="STALLED":sn="DEAD":sn="DEAD";const wy=sn==="ACTIVE"?"border-emerald-500/50 bg-emerald-500/15 text-emerald-300":sn==="STALLED"?"border-amber-400/50 bg-amber-400/15 text-amber-200":sn==="DEAD"?"border-red-500/50 bg-red-500/15 text-red-300":"border-slate-400/40 bg-slate-400/15 text-slate-200",Vi=(ne==null?void 0:ne.status)??"UNKNOWN",Yd=Vi==="OPEN"&&(sn==="ACTIVE"||sn==="STOPPED"),H=Ae!=null&&Ae.next_eligible_ts?new Date(Ae.next_eligible_ts):null,Ee=H&&!Number.isNaN(H.getTime()),Le=Ee?(H.getTime()-Date.now())/1e3:1/0,Te=Le<=0,xn=K0e(Le);let Dn="—",In="First execution pending",$r="text-muted-foreground";Ee&&(In=null,Te&&Vi==="OPEN"?(Dn="Now",In="Eligible — execution imminent",$r="text-emerald-400"):Te&&Vi==="CLOSED"?(Dn=`${cg(H)} (eligible)`,In="Eligible — waiting for market open",$r="text-amber-300"):(Dn=`${cg(H)} (${xn})`,In="Not eligible yet",$r="text-muted-foreground"));const yc=w.useCallback(()=>T?!0:(s(!0),!1),[T]),Sy=w.useCallback(()=>{yc()&&f(!0)},[yc]),jy=async()=>{if(yc()){if(!se){c(!0);return}Pe(!0);try{const U=await rD({strategy_name:"Golden Nifty",initial_cash:Xa,sip_amount:k,sip_frequency:{value:R,unit:"days"},mode:"PAPER"});(U==null?void 0:U.status)==="already_running"&&yt({title:"Strategy already running",description:"The engine is already active."})}finally{Pe(!1),await oe()}}},q3=async()=>{st(!0);try{await iD()}finally{st(!1),await oe()}},K3=[{icon:u.jsx(ah,{className:"h-5 w-5"}),label:"Available funds",value:qi(se?Xa:0,{decimals:2}),muted:!se,subText:se&&((GS=(KS=I.data)==null?void 0:KS.funds)==null?void 0:GS.utilized)!==void 0?`Utilized: ${qi(((XS=(YS=I.data)==null?void 0:YS.funds)==null?void 0:XS.utilized)||0,{decimals:2})}`:void 0},{icon:u.jsx(ah,{className:"h-5 w-5"}),label:"Portfolio value",value:qi(Qa,{decimals:2}),muted:!se},{icon:u.jsx(_u,{className:"h-5 w-5"}),label:"Positions",value:pt.length.toString(),muted:!se},{icon:u.jsx(Ik,{className:"h-5 w-5"}),label:"Unrealized P&L",value:qi(by,{decimals:2}),muted:!se}],as=a?"":"transition-all duration-700",G3=a?"opacity-100":t?"opacity-100 translate-y-0":"opacity-0 translate-y-6",vc=a?"opacity-100":t?"opacity-100 translate-y-0":"opacity-0 translate-y-4",gc=a?"":"transition-all duration-300 hover:-translate-y-1 hover:shadow-2xl hover:shadow-primary/10",Py=a?0:Math.min(r*.3,220),Y3={hidden:{},show:{transition:{staggerChildren:.12}}},X3={hidden:{opacity:0,y:14},show:{opacity:1,y:0}},Q3=a||t?"show":"hidden",Z3=a?{}:{whileHover:{scale:1.02},whileTap:{scale:.97},transition:{type:"spring",stiffness:400,damping:25}};return u.jsxs("section",{ref:e,id:"portfolio",className:`relative overflow-hidden py-32 px-6 pb-32 bg-gradient-to-b from-background to-background/80 ${as} ${G3}`,children:[u.jsx(W0,{open:o,onOpenChange:s,context:"start the strategy"}),u.jsx(W0,{open:l,onOpenChange:c,title:"Connect broker",message:"Connect your broker to start the strategy."}),u.jsxs("div",{className:"absolute inset-0 pointer-events-none",children:[u.jsx("div",{className:"absolute -top-24 left-1/4 h-72 w-72 rounded-full bg-primary/10 blur-3xl",style:{transform:`translate3d(0, ${Py}px, 0)`}}),u.jsx("div",{className:"absolute top-6 right-[8%] h-80 w-80 rounded-full bg-chart-2/10 blur-3xl",style:{transform:`translate3d(0, ${Py}px, 0)`}}),u.jsx("div",{className:"absolute top-32 left-8 h-48 w-48 rounded-full bg-chart-3/10 blur-3xl",style:{transform:`translate3d(0, ${Py}px, 0)`}})]}),u.jsxs("div",{className:"relative z-10 max-w-6xl mx-auto space-y-10",children:[u.jsxs("div",{className:"flex flex-col md:flex-row md:items-center md:justify-between gap-4",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx("p",{className:"text-sm uppercase tracking-[0.25em] text-muted-foreground",children:"Portfolio"}),u.jsx("h3",{className:"text-3xl md:text-4xl font-bold",children:"Your holdings & live positions"}),u.jsx("p",{className:"text-muted-foreground max-w-2xl",children:"Connect your broker to sync holdings. When disconnected, values stay at zero and you will see a prompt to connect."}),se&&(O!=null&&O.userName||O!=null&&O.broker)?u.jsxs("div",{className:"inline-flex items-center gap-2 rounded-full border border-primary/50 bg-primary/10 px-3 py-1 text-sm font-medium text-primary",children:[u.jsx(ah,{className:"h-4 w-4"}),O!=null&&O.userName?u.jsxs(u.Fragment,{children:["Connected as ",u.jsx("span",{className:"font-semibold",children:O.userName})]}):u.jsxs(u.Fragment,{children:["Connected to ",u.jsx("span",{className:"font-semibold",children:O==null?void 0:O.broker})]})]}):null]}),u.jsxs("div",{className:"flex flex-wrap gap-2",children:[u.jsx(H0,{open:d,onOpenChange:f}),u.jsx(ue,{variant:"secondary",asChild:!0,children:u.jsx("a",{href:"/portfolio/paper",target:"_blank",rel:"noreferrer",children:"Paper Trading Portfolio"})}),se?u.jsxs(ue,{variant:"outline",onClick:()=>{M.refetch(),I.refetch(),Ne.refetch(),E()},disabled:M.isFetching||Ne.isFetching,children:[u.jsx(Lk,{className:"h-4 w-4"}),M.isFetching||Ne.isFetching?"Refreshing...":"Refresh data"]}):null]})]}),u.jsx(Y.div,{className:"grid gap-4 md:grid-cols-3",variants:Y3,initial:"hidden",animate:Q3,children:K3.map(U=>u.jsx(Y.div,{variants:X3,whileHover:{y:-6,boxShadow:"0 20px 40px rgba(0,0,0,0.18)"},transition:{type:"spring",stiffness:300,damping:24},children:u.jsx(X0e,{...U,prefersReducedMotion:a})},U.label))}),u.jsxs("div",{className:`rounded-2xl border border-border/60 bg-card/70 shadow-xl overflow-hidden ${gc} ${as} ${vc}`,style:a?void 0:{transitionDelay:"500ms"},children:[u.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border/50",children:[u.jsxs("div",{className:"space-y-1",children:[u.jsx("p",{className:"text-sm font-semibold",children:"Holdings"}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Current positions pulled from your connected broker."})]}),u.jsx(Fe,{variant:se?"secondary":"outline",children:se?"Broker connected":"Not connected"})]}),et?A?u.jsx(Vn,{message:"Checking broker status..."}):se?M.isLoading?u.jsx(Vn,{message:"Fetching holdings..."}):M.isError&&pt.length===0?u.jsx(Vn,{message:qd?"Session expired. Reconnect to refresh holdings and funds.":"Could not fetch holdings. Try refreshing."}):zi?u.jsx(Vn,{message:"No holdings yet. Refresh after connecting."}):u.jsxs("div",{className:"overflow-x-auto",children:[qd?u.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2 px-6 py-3 text-xs text-amber-200 bg-amber-500/10 border-b border-amber-400/20",children:[u.jsx("span",{children:"Session expired. Showing the last known holdings. Reconnect to refresh."}),u.jsx(ue,{size:"sm",variant:"secondary",onClick:Sy,children:"Reconnect broker"})]}):null,u.jsxs("table",{className:"min-w-full text-sm",children:[u.jsx("thead",{className:"bg-muted/40 text-muted-foreground",children:u.jsxs("tr",{children:[u.jsx("th",{className:"px-6 py-3 text-left font-medium",children:"Symbol"}),u.jsx("th",{className:"px-6 py-3 text-left font-medium",children:"Qty"}),u.jsx("th",{className:"px-6 py-3 text-left font-medium",children:"Avg price"}),u.jsx("th",{className:"px-6 py-3 text-left font-medium",children:"LTP"}),u.jsx("th",{className:"px-6 py-3 text-left font-medium",children:"P&L"})]})}),u.jsx("tbody",{className:"divide-y divide-border/60",children:pt.map((U,we)=>{const $t=Number(U.quantity??U.qty??0),ni=Number(U.average_price??U.avg_price??0),Xd=Number(U.last_price??0),ZS=Number(U.pnl??0);return u.jsxs("tr",{children:[u.jsx("td",{className:"px-6 py-3",children:u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"font-semibold",children:U.tradingsymbol||U.symbol||"Instrument"}),u.jsx(Fe,{variant:"outline",children:U.exchange||U.exchange_type||"N/A"})]})}),u.jsx("td",{className:"px-6 py-3",children:$t}),u.jsx("td",{className:"px-6 py-3",children:qi(ni,{decimals:2})}),u.jsx("td",{className:"px-6 py-3",children:Xd?qi(Xd,{decimals:2}):"-"}),u.jsx("td",{className:"px-6 py-3",children:u.jsx("span",{className:ZS>=0?"text-emerald-500":"text-red-500",children:qi(ZS,{decimals:2})})})]},`${U.tradingsymbol||U.instrument_token||we}`)})})]})]}):u.jsx(Vn,{message:"Connect to broker to see your portfolio."}):u.jsx(Vn,{message:"Log in and connect your broker to see your portfolio."})]}),u.jsxs("div",{className:`rounded-2xl border border-border/60 bg-card/70 shadow-xl overflow-hidden ${gc} ${as} ${vc}`,style:a?void 0:{transitionDelay:"560ms"},children:[u.jsxs("div",{className:"flex flex-col md:flex-row md:items-center md:justify-between gap-3 px-6 py-4 border-b border-border/50",children:[u.jsxs("div",{className:"space-y-1",children:[u.jsx("p",{className:"text-sm font-semibold",children:"System arm"}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Re-arm all active strategies after broker login."})]}),u.jsxs(ue,{className:"shimmer",onClick:()=>D.mutate(),disabled:D.isPending||!se,children:[u.jsx(w0,{className:"h-4 w-4"}),D.isPending?"Arming...":"Arm All Strategies"]})]}),u.jsxs("div",{className:"grid gap-4 md:grid-cols-5 px-6 py-4 text-sm",children:[u.jsxs("div",{className:"space-y-1",children:[u.jsx("p",{className:"text-xs uppercase tracking-[0.18em] text-muted-foreground",children:"Broker"}),u.jsx("p",{className:"font-semibold",children:se?"Connected":"Not connected"})]}),u.jsxs("div",{className:"space-y-1",children:[u.jsx("p",{className:"text-xs uppercase tracking-[0.18em] text-muted-foreground",children:"Armed"}),u.jsx("p",{className:"font-semibold",children:cr})]}),u.jsxs("div",{className:"space-y-1",children:[u.jsx("p",{className:"text-xs uppercase tracking-[0.18em] text-muted-foreground",children:"Market"}),u.jsx("p",{className:"font-semibold",children:Vi})]}),u.jsxs("div",{className:"space-y-1",children:[u.jsx("p",{className:"text-xs uppercase tracking-[0.18em] text-muted-foreground",children:"Next execution"}),u.jsx("p",{className:"font-semibold",children:Rn?cg(Rn):"Unknown"})]}),u.jsxs("div",{className:"space-y-1",children:[u.jsx("p",{className:"text-xs uppercase tracking-[0.18em] text-muted-foreground",children:"Engine"}),u.jsx("p",{className:"font-semibold",children:sn})]})]}),j?u.jsxs("div",{className:"px-6 pb-4 text-xs text-muted-foreground",children:["System armed. ",(QS=j.failed_runs)!=null&&QS.length?"Some runs failed to arm.":"All runs armed."]}):null]}),u.jsxs("div",{className:`rounded-2xl border border-border/60 bg-card/70 shadow-xl overflow-hidden ${gc} ${as} ${vc}`,style:a?void 0:{transitionDelay:"580ms"},children:[u.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border/50",children:[u.jsxs("div",{className:"space-y-1",children:[u.jsx("p",{className:"text-sm font-semibold",children:"Strategy status"}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Live status for every configured strategy run."})]}),u.jsxs(Fe,{variant:"outline",children:[Bt.length," total"]})]}),C.isLoading?u.jsx(Vn,{message:"Loading strategy status..."}):Bt.length===0?u.jsx(Vn,{message:"No strategies configured yet."}):u.jsx("div",{className:"overflow-x-auto",children:u.jsxs("table",{className:"min-w-full text-sm",children:[u.jsx("thead",{className:"bg-muted/40 text-muted-foreground",children:u.jsxs("tr",{children:[u.jsx("th",{className:"px-6 py-3 text-left font-medium",children:"Strategy"}),u.jsx("th",{className:"px-6 py-3 text-left font-medium",children:"Mode"}),u.jsx("th",{className:"px-6 py-3 text-left font-medium",children:"Status"}),u.jsx("th",{className:"px-6 py-3 text-left font-medium",children:"Next run"}),u.jsx("th",{className:"px-6 py-3 text-left font-medium",children:"Broker"}),u.jsx("th",{className:"px-6 py-3 text-left font-medium",children:"Lifecycle"})]})}),u.jsx("tbody",{className:"divide-y divide-border/60",children:Bt.map(U=>u.jsxs("tr",{children:[u.jsx("td",{className:"px-6 py-3",children:U.strategy||"Strategy"}),u.jsx("td",{className:"px-6 py-3",children:U.mode||"-"}),u.jsx("td",{className:"px-6 py-3",children:U.status}),u.jsx("td",{className:"px-6 py-3",children:U.next_run?new Date(U.next_run).toLocaleString():"-"}),u.jsx("td",{className:"px-6 py-3",children:U.broker||"-"}),u.jsx("td",{className:"px-6 py-3",children:U.lifecycle||U.status})]},U.run_id))})]})})]}),u.jsxs("div",{className:`rounded-2xl border border-border/60 bg-card/70 shadow-xl overflow-hidden ${gc} ${as} ${vc}`,style:a?void 0:{transitionDelay:"600ms"},children:[u.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border/50",children:[u.jsxs("div",{className:"space-y-1",children:[u.jsx("p",{className:"text-sm font-semibold",children:"Strategy control"}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Start or stop the Golden Nifty SIP engine from the dashboard."})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Fe,{variant:"outline",className:wy,children:sn}),u.jsx(Fe,{variant:"outline",className:mc==="RUNNING"?"border-emerald-500/50 bg-emerald-500/10 text-emerald-400":"border-red-500/40 bg-red-500/10 text-red-400",children:mc})]})]}),u.jsxs("div",{className:"p-6 space-y-4",children:[u.jsxs("div",{className:"rounded-lg border border-border/60 bg-background/40 px-4 py-3",children:[u.jsx("div",{className:"text-xs uppercase tracking-[0.18em] text-muted-foreground",children:"Next eligible SIP"}),u.jsx("div",{className:"text-sm font-semibold text-foreground",children:Dn}),In?u.jsx("div",{className:`text-xs ${$r}`,children:In}):null]}),u.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx(Tt,{htmlFor:"strategy-sip",children:"SIP Amount"}),u.jsx(xt,{id:"strategy-sip",type:"number",min:0,step:100,value:k,onChange:U=>{const we=Number(U.target.value);L(Number.isNaN(we)?0:we)}})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(Tt,{htmlFor:"strategy-frequency",children:"Frequency (days)"}),u.jsx(xt,{id:"strategy-frequency",type:"number",min:1,step:1,value:R,onChange:U=>{const we=Number(U.target.value);q(Number.isNaN(we)?1:we)}})]})]}),u.jsxs("div",{className:"flex flex-wrap gap-2",children:[u.jsx(q0e,{...Z3,onClick:jy,disabled:le||!Yd||Kd,className:"shimmer",children:le?"Starting...":"Start Strategy"}),u.jsx(ue,{variant:"outline",onClick:q3,disabled:Me,children:Me?"Stopping...":"Stop Strategy"})]}),Vi==="CLOSED"?u.jsx("p",{className:"text-xs text-muted-foreground",children:"Market closed — execution will resume at next session"}):null,Kd?u.jsx("p",{className:"text-xs text-muted-foreground",children:"Strategy running — next SIP will execute when eligible"}):null]})]}),u.jsx(oD,{}),u.jsxs("div",{className:`rounded-2xl border border-border/60 bg-card/70 shadow-xl p-6 space-y-4 ${gc} ${as} ${vc}`,style:a?void 0:{transitionDelay:"700ms"},children:[u.jsxs("div",{className:"flex flex-col md:flex-row md:items-center md:justify-between gap-3",children:[u.jsxs("div",{children:[u.jsx("p",{className:"text-sm font-semibold",children:"Equity curve"}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Track your account value over time from your demat open date."})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Tt,{htmlFor:"equity-start",className:"text-xs text-muted-foreground",children:"From"}),u.jsx(xt,{id:"equity-start",type:"date",value:F,max:lg(new Date),min:ye,onChange:U=>B(U.target.value),className:"w-[180px]",disabled:!se})]})]}),se?Ne.isLoading&&is.length===0?u.jsx(Vn,{message:"Loading equity curve..."}):Ne.isError&&is.length===0?u.jsx(Vn,{message:"Could not load equity curve."}):is.length===0?u.jsx(Vn,{message:"Could not load equity curve."}):u.jsxs("div",{className:"h-80",children:[u.jsx(IS,{config:{equity:{label:"Equity",color:"hsl(var(--chart-1))"}},className:"rounded-xl bg-background/60",children:u.jsxs(I3,{data:is,children:[u.jsx(DS,{strokeDasharray:"3 3",stroke:"var(--border)"}),u.jsx(Fa,{dataKey:"date",tickFormatter:U=>new Date(U).toLocaleDateString("en-IN",{month:"short",day:"numeric"}),tickLine:!1,axisLine:!1,minTickGap:24}),u.jsx(Ba,{tickFormatter:U=>new Intl.NumberFormat("en-IN",{maximumFractionDigits:0,notation:"compact"}).format(U),width:80}),u.jsx(B3,{content:u.jsx(LS,{labelFormatter:U=>new Date(U).toLocaleDateString("en-IN",{year:"numeric",month:"short",day:"numeric"}),formatter:U=>qi(Number(U))})}),u.jsx(Bi,{type:"monotone",dataKey:"value",stroke:"var(--color-equity)",fill:"var(--color-equity)",fillOpacity:.15,strokeWidth:2})]})}),u.jsxs("p",{className:"text-xs text-muted-foreground mt-2",children:["Account open date: ",gn!=null&&gn.accountOpenDate?new Date(gn.accountOpenDate).toLocaleDateString("en-IN"):"unknown"]})]}):u.jsx(Vn,{message:"Connect to broker to see your equity curve."})]})]})]})}function X0e({icon:e,label:t,value:n,muted:r,subText:i,prefersReducedMotion:a}){const o=w.useRef(null),[s,l]=w.useState({rotateX:0,rotateY:0,scale:1}),c=a?"":"transition-all duration-300",d=p=>{if(a||!o.current)return;const g=o.current.getBoundingClientRect(),m=(p.clientX-g.left)/g.width-.5,y=(p.clientY-g.top)/g.height-.5;l({rotateX:y*-8,rotateY:m*8,scale:1.02})},f=()=>{a||l({rotateX:0,rotateY:0,scale:1})},h=a?void 0:{transform:`perspective(900px) rotateX(${s.rotateX}deg) rotateY(${s.rotateY}deg) scale(${s.scale})`,transition:"transform 0.12s ease-out"};return u.jsx("div",{ref:o,className:`rounded-xl border border-border/70 bg-card/80 p-4 shadow-sm ${c}`,style:a?void 0:{perspective:"900px"},onMouseMove:d,onMouseLeave:f,children:u.jsx("div",{className:"will-change-transform",style:h,children:u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("div",{className:"rounded-full bg-primary/10 p-2 text-primary",children:e}),u.jsxs("div",{children:[u.jsx("p",{className:"text-xs uppercase tracking-[0.18em] text-muted-foreground",children:t}),u.jsx("p",{className:`text-xl font-semibold ${r?"text-muted-foreground":"text-foreground"}`,children:u.jsx(Y.span,{initial:{opacity:.6,y:3},animate:{opacity:1,y:0},transition:{duration:.25,ease:"easeOut"},children:n},n)}),i?u.jsx("p",{className:"text-xs text-muted-foreground",children:i}):null]})]})})})}function Vn({message:e}){return u.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 px-6 py-12 text-center",children:[u.jsx("div",{className:"rounded-full bg-muted/70 p-3 text-muted-foreground",children:u.jsx(ah,{className:"h-6 w-6"})}),u.jsx("p",{className:"text-sm font-medium",children:e}),u.jsx("p",{className:"text-xs text-muted-foreground max-w-md",children:"Once connected, we will pull your latest holdings and live positions securely from your broker."})]})}function cC(){return u.jsxs("div",{className:"min-h-screen text-foreground",children:[u.jsx(Tr,{}),u.jsx(_r,{children:u.jsx("main",{className:"pt-24 pb-40",children:u.jsx(Y0e,{})})}),u.jsx(Cr,{})]})}function Q0e(e){const t=w.useRef({value:e,previous:e});return w.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var FS="Checkbox",[Z0e,obe]=Xo(FS),[J0e,exe]=Z0e(FS),z3=w.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:l="on",onCheckedChange:c,form:d,...f}=e,[h,p]=w.useState(null),g=_t(t,P=>p(P)),m=w.useRef(!1),y=h?d||!!h.closest("form"):!0,[v=!1,x]=xw({prop:i,defaultProp:a,onChange:c}),b=w.useRef(v);return w.useEffect(()=>{const P=h==null?void 0:h.form;if(P){const S=()=>x(b.current);return P.addEventListener("reset",S),()=>P.removeEventListener("reset",S)}},[h,x]),u.jsxs(J0e,{scope:n,state:v,disabled:s,children:[u.jsx(ot.button,{type:"button",role:"checkbox","aria-checked":Ta(v)?"mixed":v,"aria-required":o,"data-state":W3(v),"data-disabled":s?"":void 0,disabled:s,value:l,...f,ref:g,onKeyDown:Be(e.onKeyDown,P=>{P.key==="Enter"&&P.preventDefault()}),onClick:Be(e.onClick,P=>{x(S=>Ta(S)?!0:!S),y&&(m.current=P.isPropagationStopped(),m.current||P.stopPropagation())})}),y&&u.jsx(txe,{control:h,bubbles:!m.current,name:r,value:l,checked:v,required:o,disabled:s,form:d,style:{transform:"translateX(-100%)"},defaultChecked:Ta(a)?!1:a})]})});z3.displayName=FS;var V3="CheckboxIndicator",U3=w.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...i}=e,a=exe(V3,n);return u.jsx(Qo,{present:r||Ta(a.state)||a.state===!0,children:u.jsx(ot.span,{"data-state":W3(a.state),"data-disabled":a.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});U3.displayName=V3;var txe=e=>{const{control:t,checked:n,bubbles:r=!0,defaultChecked:i,...a}=e,o=w.useRef(null),s=Q0e(n),l=o$(t);w.useEffect(()=>{const d=o.current,f=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(f,"checked").set;if(s!==n&&p){const g=new Event("click",{bubbles:r});d.indeterminate=Ta(n),p.call(d,Ta(n)?!1:n),d.dispatchEvent(g)}},[s,n,r]);const c=w.useRef(Ta(n)?!1:n);return u.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:i??c.current,...a,tabIndex:-1,ref:o,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Ta(e){return e==="indeterminate"}function W3(e){return Ta(e)?"indeterminate":e?"checked":"unchecked"}var H3=z3,nxe=U3;const Zp=w.forwardRef(({className:e,...t},n)=>u.jsx(H3,{ref:n,className:de("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:u.jsx(nxe,{className:de("flex items-center justify-center text-current"),children:u.jsx(kB,{className:"h-4 w-4"})})}));Zp.displayName=H3.displayName;const rxe=Y(ue);function ea(e,t=2){return new Intl.NumberFormat("en-IN",{style:"currency",currency:"INR",minimumFractionDigits:t,maximumFractionDigits:t}).format(e||0)}function ixe(e,t=2){if(e===0)return ea(0,t);const n=ea(Math.abs(e),t);return`${e>0?"+":"-"}${n}`}function axe(e){if(!e)return"—";const t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function oxe(){var Vi,Yd;const e=Jo(),[t,n]=w.useState(5e3),[r,i]=w.useState(""),[a,o]=w.useState(10),[s,l]=w.useState("minutes"),[c,d]=w.useState("STOPPED"),[f,h]=w.useState(null),[p,g]=w.useState(null),[m,y]=w.useState(!1),[v,x]=w.useState(!1),[b,P]=w.useState(!1),[S,j]=w.useState(!1),[N,O]=w.useState(""),[A,E]=w.useState(!1),[T,C]=w.useState([]),[D,M]=w.useState(null),[I,F]=w.useState(null),[B,k]=w.useState(null),[L,R]=w.useState(null),[q,W]=w.useState(null),[ee,le]=w.useState([]),[Pe,Me]=w.useState(!1),[st,Ae]=w.useState(null),[X,ne]=w.useState(0),re=w.useRef(!0),V=vt({queryKey:["/api/paper/funds"],queryFn:async()=>(await Ze("GET","/api/paper/funds")).json()}),ye=vt({queryKey:["/api/paper/positions"],queryFn:async()=>(await Ze("GET","/api/paper/positions")).json()}),oe=vt({queryKey:["/api/paper/orders"],queryFn:async()=>(await Ze("GET","/api/paper/orders")).json(),refetchInterval:1e4,refetchIntervalInBackground:!0}),Ne=((Vi=ye.data)==null?void 0:Vi.positions)??[],se=((Yd=oe.data)==null?void 0:Yd.orders)??[],et=T.length>0?T.map(H=>{const Ee=H.avg_price*H.qty,Le=Ee?H.pnl/Ee*100:0;return{symbol:H.symbol,qty:H.qty,avg_price:H.avg_price,last_price:H.ltp,pnl:H.pnl,pnl_pct:Le}}):Ne,pt=ee,pe=w.useCallback(async()=>{try{const H=await aD();d((H==null?void 0:H.status)??"STOPPED"),h((H==null?void 0:H.next_eligible_ts)??null)}catch{d("STOPPED"),h(null)}},[]);w.useEffect(()=>{pe();const H=window.setInterval(pe,15e3);return()=>window.clearInterval(H)},[pe]),w.useEffect(()=>{window.sessionStorage.getItem("paperReset")==="1"&&(window.sessionStorage.removeItem("paperReset"),yt({title:"Paper account reset",description:"Ready for new run."}))},[]),w.useEffect(()=>{if(!f){g(null);return}const H=()=>{const Le=new Date(f).getTime();if(Number.isNaN(Le)){g(null);return}const Te=Le-Date.now();if(Te<=0){g("now");return}const xn=Math.floor(Te/1e3),Dn=Math.floor(xn/3600),In=Math.floor(xn%3600/60),$r=xn%60,yc=Dn>0?`${Dn}h `:"",Sy=`${In}`.padStart(2,"0"),jy=`${$r}`.padStart(2,"0");g(`${yc}${Sy}:${jy}`)};H();const Ee=window.setInterval(H,1e3);return()=>window.clearInterval(Ee)},[f]),w.useEffect(()=>{let H;const Ee=async()=>{try{const Le=await fetch("/api/paper/mtm",{credentials:"include"});if(!Le.ok)return;const Te=await Le.json();C(Array.isArray(Te.positions)?Te.positions:[]),typeof Te.equity=="number"&&M(Te.equity),typeof Te.initial_cash=="number"&&F(Te.initial_cash),typeof Te.cash=="number"&&k(Te.cash),typeof Te.positions_value=="number"&&R(Te.positions_value),typeof Te.unrealized_pnl=="number"&&W(Te.unrealized_pnl),typeof Te.price_stale=="boolean"&&Me(Te.price_stale),Te.ts&&typeof Te.unrealized_pnl=="number"&&le(xn=>{if(re.current&&xn.length===0)return re.current=!1,xn;const Dn=xn[xn.length-1];if((Dn==null?void 0:Dn.date)===Te.ts){if(Dn.pnl===Te.unrealized_pnl)return xn;const $r=[...xn];return $r[$r.length-1]={date:Te.ts,pnl:Te.unrealized_pnl},$r}const In=[...xn,{date:Te.ts,pnl:Te.unrealized_pnl}];return In.length>200?In.slice(-200):In})}catch(Le){console.error("MTM poll failed",Le)}};return Ee(),H=window.setInterval(()=>{document.hidden||Ee()},5e3),()=>window.clearInterval(H)},[]),w.useEffect(()=>{const H=async()=>{try{const Le=await fetch("/api/market/status",{credentials:"include"});if(!Le.ok)return;const Te=await Le.json();Ae(Te)}catch{Ae(null)}};H();const Ee=window.setInterval(H,5e3);return()=>window.clearInterval(Ee)},[]);const zi=async()=>{if(window.confirm(`This will RESET the entire paper account. - -- All positions -- All orders -- Strategy state - -This cannot be undone. Continue?`)){P(!0);try{if(!(await fetch("/api/paper/reset",{method:"POST"})).ok)throw new Error("Reset failed");C([]),M(null),F(null),k(null),R(null),W(null),le([]),re.current=!0,i(""),V.refetch(),ye.refetch(),oe.refetch(),await pe(),ne(Le=>Le+1),P(!1)}catch(Ee){P(!1),alert("Reset failed. Check backend logs."),console.error(Ee)}}},Bt=async()=>{if(!(typeof r!="number"||r<1e4)){re.current=!0,y(!0);try{const H=await rD({strategy_name:"Golden Nifty",initial_cash:r,sip_amount:t,sip_frequency:{value:a,unit:s},mode:"PAPER"});(H==null?void 0:H.status)==="already_running"&&yt({title:"Strategy already running",description:"The paper strategy is already active."}),(H==null?void 0:H.status)==="unsupported_mode"&&yt({title:"Unsupported mode",description:"Paper trading is the only available mode right now."})}finally{y(!1),await pe()}}},cr=async()=>{x(!0);try{await iD()}finally{x(!1),await pe()}},Rn=c==="RUNNING"?"RUNNING":c==="WAITING"?"WAITING":"STOPPED",Xa=typeof r=="number"&&r>=1e4,Qa=S&&typeof N=="number"&&N>0,by=Rn==="RUNNING"?"bg-green-500 text-white":Rn==="WAITING"?"bg-yellow-500 text-white":"bg-gray-400 text-white",gn=(st==null?void 0:st.status)??"UNKNOWN",is=gn==="OPEN"?"border-emerald-500/50 bg-emerald-500/15 text-emerald-300":gn==="CLOSED"?"border-amber-400/50 bg-amber-400/15 text-amber-200":"border-slate-400/40 bg-slate-400/15 text-slate-200",qd=Pe?"border-amber-400/50 bg-amber-400/15 text-amber-200":"border-emerald-500/50 bg-emerald-500/15 text-emerald-300",mc=[{label:"Initial Cash",value:I??0},{label:"Cash Available",value:B??0},{label:"Invested Value",value:L??0},{label:"Total Equity",value:D??0},{label:"Unrealized P&L",value:q??0}],Kd=e?{}:{whileHover:{scale:1.02},whileTap:{scale:.97},transition:{type:"spring",stiffness:400,damping:25}},Gd={hidden:{},show:{transition:{staggerChildren:.12}}},sn={hidden:{opacity:0,y:14},show:{opacity:1,y:0}},wy=async()=>{if(!(!Qa||typeof N!="number")){E(!0);try{await Ze("POST","/api/paper/add-cash",{amount:N}),k(H=>typeof H=="number"?H+N:N),F(H=>typeof H=="number"?H+N:N),M(H=>typeof H=="number"?H+N:N),V.refetch(),yt({title:"Cash added",description:`${ea(N)} added to available cash.`}),O("")}catch(H){yt({title:"Add cash failed",description:"Please try again."}),console.error(H)}finally{E(!1)}}};return u.jsxs("div",{className:"min-h-screen text-foreground",children:[u.jsx(Tr,{}),u.jsx(_r,{children:u.jsx("main",{className:"pt-24 pb-40",children:u.jsxs("section",{className:"max-w-6xl mx-auto px-6 py-10 space-y-8",children:[u.jsxs("div",{className:"flex flex-col gap-4 md:flex-row md:items-center md:justify-between",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx("p",{className:"text-sm uppercase tracking-[0.25em] text-muted-foreground",children:"Paper Trading Portfolio"}),u.jsx("h2",{className:"text-3xl md:text-4xl font-bold",children:"Paper trading (simulated)"}),u.jsx("p",{className:"text-muted-foreground max-w-2xl",children:"This dashboard mirrors live execution flow with simulated orders and balances."})]}),u.jsxs("div",{className:"flex flex-wrap gap-2",children:[u.jsx(Fe,{variant:"secondary",children:"Paper trading (simulated)"}),u.jsx(ue,{variant:"outline",onClick:()=>{V.refetch(),ye.refetch(),oe.refetch()},children:"Refresh"})]})]}),u.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/70 shadow-xl overflow-hidden",children:[u.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border/50",children:[u.jsxs("div",{className:"space-y-1",children:[u.jsx("p",{className:"text-sm font-semibold",children:"Paper Strategy Control"}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Strategy: Golden Nifty (Paper) · Assets: NIFTYBEES + GOLDBEES"}),f&&u.jsxs("p",{className:"text-xs text-muted-foreground",children:["Next SIP ",p?`in ${p}`:""," (",new Date(f).toLocaleTimeString(),")"]})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:`px-2 py-1 rounded text-xs ${by}`,children:Rn}),u.jsx(Fe,{variant:"outline",className:is,children:gn==="OPEN"?"Market OPEN":gn==="CLOSED"?"Market CLOSED":"Market UNKNOWN"}),Pe&&u.jsx(Fe,{variant:"outline",className:qd,children:"Price STALE"})]})]}),u.jsxs("div",{className:"p-6 space-y-4",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx(Tt,{htmlFor:"paper-initial-cash",children:"Initial Cash (Paper)"}),u.jsx(xt,{id:"paper-initial-cash",type:"number",min:1e4,value:r,disabled:Rn==="RUNNING",onChange:H=>{const Ee=H.target.value;if(Ee===""){i("");return}const Le=Number(Ee);i(Number.isNaN(Le)?"":Le)}}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Used only for paper trading. No real funds involved."})]}),u.jsxs("div",{className:"space-y-3 rounded-lg border border-border/60 bg-background/50 px-4 py-3",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(Zp,{id:"paper-add-cash-toggle",checked:S,onCheckedChange:H=>j(H===!0)}),u.jsx(Tt,{htmlFor:"paper-add-cash-toggle",children:"Add cash during run"})]}),u.jsxs("div",{className:"grid gap-2 md:grid-cols-[1fr_auto] md:items-end",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx(Tt,{htmlFor:"paper-add-cash",children:"Amount to add"}),u.jsx(xt,{id:"paper-add-cash",type:"number",min:1,step:100,value:N,disabled:!S||A,onChange:H=>{const Ee=H.target.value;if(Ee===""){O("");return}const Le=Number(Ee);O(Number.isNaN(Le)?"":Le)}})]}),u.jsx(ue,{variant:"secondary",onClick:wy,disabled:!Qa||A,children:A?"Adding...":"Add cash"})]}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Adds to available cash immediately while the strategy keeps running."})]}),u.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx(Tt,{htmlFor:"paper-sip",children:"SIP Amount"}),u.jsx(xt,{id:"paper-sip",type:"number",min:0,step:100,value:t,onChange:H=>{const Ee=Number(H.target.value);n(Number.isNaN(Ee)?0:Ee)}})]}),u.jsxs("div",{className:"space-y-3",children:[u.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx(Tt,{htmlFor:"paper-frequency",children:"Frequency"}),u.jsx(xt,{id:"paper-frequency",type:"number",min:1,step:1,value:a,onChange:H=>{const Ee=Number(H.target.value);o(Number.isNaN(Ee)?1:Ee)}})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(Tt,{htmlFor:"paper-frequency-unit",children:"Unit"}),u.jsxs("select",{id:"paper-frequency-unit",value:s,onChange:H=>l(H.target.value),className:"flex h-9 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 md:text-sm",children:[u.jsx("option",{value:"minutes",children:"Minutes (testing)"}),u.jsx("option",{value:"days",children:"Days (long-term)"})]})]})]}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Minutes mode is for paper testing only. Live SIP uses days."})]})]}),u.jsxs("div",{className:"flex flex-wrap gap-2",children:[u.jsx(rxe,{...Kd,onClick:Bt,disabled:!Xa||m||b||Rn==="RUNNING",className:"shimmer",children:m?"Starting...":"Start Paper Strategy"}),u.jsx(ue,{variant:"outline",onClick:cr,disabled:v,children:v?"Stopping...":"Stop Paper Strategy"}),u.jsx(ue,{variant:"destructive",onClick:zi,disabled:b,children:b?"Resetting...":"Reset Paper Account"})]}),gn==="CLOSED"?u.jsx("p",{className:"text-xs text-muted-foreground",children:"Market CLOSED - orders will execute when the next session opens."}):null]})]}),u.jsx(oD,{},X),u.jsx(Y.div,{className:"grid gap-4 md:grid-cols-3",variants:Gd,initial:"hidden",animate:"show",children:mc.map(H=>u.jsxs(Y.div,{className:"rounded-xl border border-border/70 bg-card/80 p-4 shadow-sm",variants:sn,whileHover:{y:-6,boxShadow:"0 20px 40px rgba(0,0,0,0.18)"},transition:{type:"spring",stiffness:300,damping:24},children:[u.jsx("p",{className:"text-xs uppercase tracking-[0.18em] text-muted-foreground",children:H.label}),u.jsx("p",{className:"text-2xl font-semibold",children:u.jsx(Y.span,{initial:{opacity:.6,y:3},animate:{opacity:1,y:0},transition:{duration:.25,ease:"easeOut"},children:ea(H.value)},H.value??0)})]},H.label))}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Delivery SIP · No leverage"}),u.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/70 shadow-xl overflow-hidden",children:[u.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border/50",children:[u.jsxs("div",{className:"space-y-1",children:[u.jsx("p",{className:"text-sm font-semibold",children:"Positions"}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Current paper positions and unrealized P&L."})]}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("span",{className:"text-xs text-muted-foreground",children:"Live prices · 5s refresh"}),u.jsxs(Fe,{variant:"outline",children:[et.length," positions"]})]})]}),ye.isLoading&&et.length===0?u.jsx("div",{className:"px-6 py-6 text-sm text-muted-foreground",children:"Loading positions..."}):et.length===0?u.jsx("div",{className:"px-6 py-6 text-sm text-muted-foreground",children:"No paper positions yet."}):u.jsx("div",{className:"overflow-x-auto",children:u.jsxs("table",{className:"min-w-full text-sm",children:[u.jsx("thead",{className:"bg-muted/40 text-muted-foreground",children:u.jsxs("tr",{children:[u.jsx("th",{className:"px-6 py-3 text-left font-medium",children:"Symbol"}),u.jsx("th",{className:"px-6 py-3 text-left font-medium",children:"Qty"}),u.jsx("th",{className:"px-6 py-3 text-left font-medium",children:"Avg price"}),u.jsx("th",{className:"px-6 py-3 text-left font-medium",children:"LTP"}),u.jsx("th",{className:"px-6 py-3 text-left font-medium",children:"P&L"})]})}),u.jsx("tbody",{className:"divide-y divide-border/60",children:et.map(H=>u.jsxs("tr",{children:[u.jsx("td",{className:"px-6 py-3 font-semibold",children:H.symbol}),u.jsx("td",{className:"px-6 py-3",children:H.qty}),u.jsx("td",{className:"px-6 py-3",children:ea(H.avg_price,2)}),u.jsx("td",{className:"px-6 py-3",children:ea(H.last_price,2)}),u.jsx("td",{className:"px-6 py-3",children:u.jsxs("span",{className:H.pnl>=0?"text-emerald-400":"text-red-400",children:[ea(H.pnl,2)," (",H.pnl_pct.toFixed(2),"%)"]})})]},H.symbol))})]})})]}),u.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/70 shadow-xl overflow-hidden",children:[u.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border/50",children:[u.jsxs("div",{className:"space-y-1",children:[u.jsx("p",{className:"text-sm font-semibold",children:"Orders"}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Paper order history."})]}),u.jsxs(Fe,{variant:"outline",children:[se.length," orders"]})]}),oe.isLoading?u.jsx("div",{className:"px-6 py-6 text-sm text-muted-foreground",children:"Loading orders..."}):se.length===0?u.jsx("div",{className:"px-6 py-6 text-sm text-muted-foreground",children:"No paper orders yet."}):u.jsx("div",{className:"overflow-x-auto",children:u.jsxs("table",{className:"min-w-full text-sm",children:[u.jsx("thead",{className:"bg-muted/40 text-muted-foreground",children:u.jsxs("tr",{children:[u.jsx("th",{className:"px-6 py-3 text-left font-medium",children:"Order ID"}),u.jsx("th",{className:"px-6 py-3 text-left font-medium",children:"Time"}),u.jsx("th",{className:"px-6 py-3 text-left font-medium",children:"Symbol"}),u.jsx("th",{className:"px-6 py-3 text-left font-medium",children:"Side"}),u.jsx("th",{className:"px-6 py-3 text-left font-medium",children:"Qty"}),u.jsx("th",{className:"px-6 py-3 text-left font-medium",children:"Price"}),u.jsx("th",{className:"px-6 py-3 text-left font-medium",children:"Status"})]})}),u.jsx("tbody",{className:"divide-y divide-border/60",children:se.map(H=>u.jsxs("tr",{children:[u.jsx("td",{className:"px-6 py-3 font-mono text-xs",children:H.id}),u.jsx("td",{className:"px-6 py-3 text-xs text-muted-foreground",children:axe(H.timestamp)}),u.jsx("td",{className:"px-6 py-3",children:H.symbol}),u.jsx("td",{className:"px-6 py-3",children:H.side}),u.jsx("td",{className:"px-6 py-3",children:H.qty}),u.jsx("td",{className:"px-6 py-3",children:ea(H.price,2)}),u.jsx("td",{className:"px-6 py-3",children:u.jsx(Fe,{variant:"outline",children:H.status})})]},H.id))})]})})]}),u.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/70 shadow-xl p-6 space-y-4",children:[u.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[u.jsxs("div",{className:"space-y-1",children:[u.jsx("p",{className:"text-sm font-semibold",children:"P&L curve"}),u.jsx("p",{className:"text-xs text-muted-foreground",children:"Paper P&L over time."})]}),u.jsx("span",{className:"text-xs text-muted-foreground",children:"Live P&L · updates every 5s"})]}),pt.length===0?u.jsx("div",{className:"text-sm text-muted-foreground",children:"No P&L history yet."}):u.jsx("div",{className:"h-80",children:u.jsx(IS,{config:{pnl:{label:"P&L",color:"hsl(var(--chart-1))"}},className:"rounded-xl bg-background/60",children:u.jsxs(I3,{data:pt,children:[u.jsx(DS,{strokeDasharray:"3 3",stroke:"var(--border)"}),u.jsx(Fa,{dataKey:"date",tickFormatter:H=>new Date(H).toLocaleDateString("en-IN",{month:"short",day:"numeric"}),tickLine:!1,axisLine:!1,minTickGap:24}),u.jsx(Ba,{tickFormatter:H=>{const Ee=Number(H),Le=new Intl.NumberFormat("en-IN",{maximumFractionDigits:0,notation:"compact"}).format(Math.abs(Ee));return Ee>0?`+${Le}`:Ee<0?`-${Le}`:Le},label:{value:"P&L (₹)",angle:-90,position:"insideLeft"},width:80}),u.jsx(py,{y:0,stroke:"var(--border)",strokeDasharray:"3 3"}),u.jsx(B3,{content:u.jsx(LS,{labelFormatter:H=>new Date(H).toLocaleDateString("en-IN",{year:"numeric",month:"short",day:"numeric"}),formatter:H=>ixe(Number(H))})}),u.jsx(Bi,{type:"monotone",dataKey:"pnl",stroke:"var(--color-pnl)",fill:"var(--color-pnl)",fillOpacity:.15,strokeWidth:2})]})})})]})]})})}),u.jsx(Cr,{})]})}const sxe=[{title:"Limits deep losses",description:"When trends weaken, allocations shift defensively instead of doubling down into falling markets."},{title:"Automatic defensive shifts",description:"Sustained weakness routes new capital to the protective sleeve without panic selling."},{title:"Position sizing",description:"Cap any single ETF/Index fund at 20% of the total portfolio to avoid issuer concentration."}],lxe=[{title:"Market regime check",detail:"Assess trend and valuation to decide whether equity should lean higher or stay defensive."},{title:"Set allocation bands",detail:"Equity floats within defined bands; gold auto-balances as the counterweight instead of a fixed split."},{title:"Rebalance on schedule",detail:"Monthly cadence with drift checks. New SIP cash fixes misweights before selling."},{title:"Stay funded",detail:"Dividends and SIP flows top up underweight legs first, reducing churn and taxes."}],cxe=[{label:"Regime filter",value:"Long-term trend and valuation bands",icon:u.jsx(Dk,{className:"w-4 h-4"})},{label:"Review cadence",value:"Monthly, with drift alerts",icon:u.jsx(CB,{className:"w-4 h-4"})},{label:"Expected profile",value:"Low-to-moderate risk, smoother equity curve",icon:u.jsx(_u,{className:"w-4 h-4"})}],uxe=[{title:"SIP-aware max drawdown",ours:{value:"-13.13%",detail:"Peak: Jan 2020 → Trough: Mar 2020"},nifty:{value:"-27.64%",detail:"Peak: Dec 2019 → Trough: Mar 2020"},note:"Defense during 2020 crash without stopping SIPs."},{title:"Worst rolling 24m SIP XIRR",ours:{value:"11.51%",detail:"Jan 2010 → Jan 2012"},nifty:{value:"-2.69%",detail:"Jan 2010 → Jan 2012"},note:"Stayed positive even in the worst 24 months."},{title:"Full-period SIP XIRR",ours:{value:"13.79%",detail:"Flow-based execution"},nifty:{value:"12.98%",detail:"Benchmark SIP"},note:"Higher compounded return with the same monthly cashflows."}],dxe=[{label:"Our strategy (adaptive SIP)",value:24200},{label:"Nifty SIP",value:23200}],ug=6;function fxe(){const[e,t]=w.useState(!1);return w.useEffect(()=>{const n=window.matchMedia("(prefers-reduced-motion: reduce)"),r=()=>t(n.matches);return r(),n.addEventListener?(n.addEventListener("change",r),()=>n.removeEventListener("change",r)):(n.addListener(r),()=>n.removeListener(r))},[]),e}function fr({children:e,className:t,wrapperClassName:n,wrapperStyle:r,cardStyle:i,prefersReducedMotion:a}){const o=w.useRef(null),[s,l]=w.useState({rotateX:0,rotateY:0,scale:1}),c=h=>{if(a||!o.current)return;const p=o.current.getBoundingClientRect(),g=(h.clientX-p.left)/p.width-.5,m=(h.clientY-p.top)/p.height-.5;l({rotateX:m*-8,rotateY:g*8,scale:1.02})},d=()=>{a||l({rotateX:0,rotateY:0,scale:1})},f=a?i:{...i,transform:`perspective(900px) rotateX(${s.rotateX}deg) rotateY(${s.rotateY}deg) scale(${s.scale})`,transition:"transform 0.12s ease-out",willChange:"transform"};return u.jsx("div",{ref:o,className:n,style:r,onMouseMove:c,onMouseLeave:d,children:u.jsx($d,{className:t,style:f,children:e})})}function hxe(){Math.max(...dxe.map(p=>p.value));const e=fxe(),[t,n]=w.useState(Array(ug).fill(!1)),[r,i]=w.useState(0),a=w.useRef([]),o=e?"":"transition-all duration-700",s=e?"":"hover:-translate-y-1 hover:shadow-xl hover:shadow-primary/10",l=e?"":"transition-all duration-300 hover:-translate-y-1 hover:shadow-lg hover:shadow-primary/10",c=p=>!!t[p],d=p=>e?"opacity-100":c(p)?"opacity-100 translate-y-0":"opacity-0 translate-y-6",f=p=>e?"opacity-100":c(p)?"opacity-100 translate-y-0":"opacity-0 translate-y-4",h=e?0:Math.min(r*.3,240);return w.useEffect(()=>{if(e){n(Array(ug).fill(!0));return}const p=new IntersectionObserver(g=>{n(m=>{const y=m.length?[...m]:Array(ug).fill(!1);return g.forEach(v=>{const x=Number(v.target.getAttribute("data-section-index"));v.isIntersecting&&Number.isFinite(x)&&(y[x]=!0)}),y})},{threshold:.2});return a.current.forEach(g=>{g&&p.observe(g)}),()=>p.disconnect()},[e]),w.useEffect(()=>{if(e){i(0);return}let p=null;const g=()=>{p===null&&(p=window.requestAnimationFrame(()=>{i(window.scrollY),p=null}))};return window.addEventListener("scroll",g,{passive:!0}),g(),()=>{window.removeEventListener("scroll",g),p!==null&&window.cancelAnimationFrame(p)}},[e]),u.jsxs("div",{className:"min-h-screen text-foreground",children:[u.jsx(Tr,{}),u.jsx(_r,{children:u.jsxs("main",{className:"relative overflow-hidden pt-24 pb-24",children:[u.jsxs("div",{className:"absolute inset-0 pointer-events-none",children:[u.jsx("div",{className:"absolute -top-32 left-[8%] h-80 w-80 rounded-full bg-primary/10 blur-3xl",style:{transform:`translate3d(0, ${h}px, 0)`}}),u.jsx("div",{className:"absolute top-10 right-[12%] h-96 w-96 rounded-full bg-chart-2/10 blur-3xl",style:{transform:`translate3d(0, ${h}px, 0)`}}),u.jsx("div",{className:"absolute top-52 left-[65%] h-64 w-64 rounded-full bg-chart-3/10 blur-3xl",style:{transform:`translate3d(0, ${h}px, 0)`}})]}),u.jsxs("section",{ref:p=>a.current[0]=p,"data-section-index":0,className:`relative px-6 py-16 overflow-hidden ${o} ${d(0)}`,children:[u.jsxs("div",{className:"absolute inset-0 pointer-events-none",children:[u.jsx("div",{className:"absolute -left-10 top-10 w-72 h-72 rounded-full bg-primary/10 blur-3xl"}),u.jsx("div",{className:"absolute right-[-80px] bottom-10 w-80 h-80 rounded-full bg-chart-2/10 blur-3xl"})]}),u.jsxs("div",{className:"max-w-6xl mx-auto grid lg:grid-cols-2 gap-12 items-center relative z-10",children:[u.jsxs("div",{className:"space-y-6",children:[u.jsx(Fe,{className:"w-fit bg-primary/15 text-primary border-primary/30",children:"Hybrid equity + gold"}),u.jsx("h1",{className:"text-4xl md:text-5xl font-bold leading-tight",children:"Golden Nifty Strategy"}),u.jsx("p",{className:"text-base text-muted-foreground",children:"Not a fixed 60/40. Allocation adapts monthly based on market regime and relative valuation."}),u.jsx("p",{className:"text-lg text-muted-foreground leading-relaxed",children:"A disciplined system that keeps you invested through cycles without decision fatigue. Equity drives growth, gold counters stress, and monthly flows are steered by rules instead of gut feel."}),u.jsx("p",{className:"text-sm text-muted-foreground",children:"The strategy’s edge is not prediction — it is consistency under uncertainty."}),u.jsxs("div",{className:"flex flex-wrap gap-3",children:[u.jsx(Fe,{variant:"secondary",className:"bg-chart-2/15 text-chart-2 border-0",children:"Process driven"}),u.jsx(Fe,{variant:"secondary",className:"bg-chart-1/15 text-chart-1 border-0",children:"Regime aware"}),u.jsx(Fe,{variant:"secondary",className:"bg-chart-3/15 text-chart-3 border-0",children:"Low drift"})]}),u.jsxs("div",{className:"flex flex-wrap gap-4",children:[u.jsx(fr,{prefersReducedMotion:e,className:"bg-card/80 backdrop-blur-sm border-card-border",wrapperClassName:`${o} ${f(0)} ${s}`,wrapperStyle:e?void 0:{transitionDelay:"150ms"},children:u.jsxs(Un,{className:"pb-2",children:[u.jsxs(Wn,{className:"flex items-center gap-2 text-base",children:[u.jsx(Ow,{className:"w-4 h-4 text-chart-2"}),"Growth intent"]}),u.jsx(Hn,{children:"Targeting steady 12-15% p.a. with smoother equity curves."})]})}),u.jsx(fr,{prefersReducedMotion:e,className:"bg-card/80 backdrop-blur-sm border-card-border",wrapperClassName:`${o} ${f(0)} ${s}`,wrapperStyle:e?void 0:{transitionDelay:"250ms"},children:u.jsxs(Un,{className:"pb-2",children:[u.jsxs(Wn,{className:"flex items-center gap-2 text-base",children:[u.jsx(Vs,{className:"w-4 h-4 text-chart-1"}),"Risk posture"]}),u.jsx(Hn,{children:"Low-to-moderate with automatic defensive shifts when trends weaken."})]})})]})]}),u.jsxs(fr,{prefersReducedMotion:e,className:"bg-card/70 backdrop-blur-sm border-card-border",wrapperClassName:`${o} ${f(0)} ${s}`,wrapperStyle:e?void 0:{transitionDelay:"300ms"},children:[u.jsxs(Un,{children:[u.jsxs(Wn,{className:"flex items-center gap-2",children:[u.jsx(Lh,{className:"w-5 h-5 text-primary"}),"Strategy at a glance"]}),u.jsx(Hn,{children:"The exact playbook used to run the Golden Nifty allocation every month."})]}),u.jsxs(Kn,{className:"space-y-6",children:[u.jsxs("div",{className:"grid sm:grid-cols-2 gap-4",children:[u.jsxs("div",{className:`p-4 rounded-xl border border-border/60 bg-background/60 ${l}`,children:[u.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"Core structure"}),u.jsxs("ul",{className:"text-sm text-muted-foreground space-y-1",children:[u.jsxs("li",{children:[u.jsx("span",{className:"text-foreground font-semibold",children:"Equity growth engine:"})," Nifty 50 exposure."]}),u.jsxs("li",{children:[u.jsx("span",{className:"text-foreground font-semibold",children:"Defensive counterweight:"})," Gold that offsets stress."]}),u.jsxs("li",{children:[u.jsx("span",{className:"text-foreground font-semibold",children:"Monthly capital flow:"})," SIP-driven, not lump-sum timing."]})]}),u.jsx("p",{className:"text-sm text-muted-foreground mt-3",children:"Allocation is driven by rules, not forecasts."})]}),u.jsxs("div",{className:`p-4 rounded-xl border border-border/60 bg-background/60 ${l}`,children:[u.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"Adaptive weights"}),u.jsx("p",{className:"text-lg font-semibold",children:"Bands, not fixed ratios"}),u.jsx("p",{className:"text-sm text-muted-foreground",children:"Equity flexes within guardrails; gold adjusts automatically as the counterweight."}),u.jsx("p",{className:"text-sm text-muted-foreground mt-2",children:"Monthly reviews with drift alerts. New cash repairs weights before any sells."})]})]}),u.jsxs("div",{className:"space-y-4",children:[u.jsxs("div",{className:"flex items-start gap-3",children:[u.jsx("div",{className:"w-10 h-10 rounded-lg bg-primary/10 text-primary flex items-center justify-center",children:u.jsx(iv,{className:"w-5 h-5"})}),u.jsxs("div",{children:[u.jsx("p",{className:"font-semibold",children:"Regime aware"}),u.jsx("p",{className:"text-muted-foreground",children:"Long-term trend and valuation guide whether we stay aggressive or move to a protective mix."})]})]}),u.jsxs("div",{className:"flex items-start gap-3",children:[u.jsx("div",{className:"w-10 h-10 rounded-lg bg-chart-2/10 text-chart-2 flex items-center justify-center",children:u.jsx(_u,{className:"w-5 h-5"})}),u.jsxs("div",{children:[u.jsx("p",{className:"font-semibold",children:"Tax + cost aware"}),u.jsx("p",{className:"text-muted-foreground",children:"Prefer cashflows and minor top-ups to fix drift before selling, keeping turnover low."})]})]})]})]})]})]})]}),u.jsx("section",{ref:p=>a.current[1]=p,"data-section-index":1,className:`px-6 pt-10 max-w-6xl mx-auto ${o} ${d(1)}`,children:u.jsxs("div",{className:"grid lg:grid-cols-3 gap-6",children:[u.jsxs(fr,{prefersReducedMotion:e,className:"bg-card/80 backdrop-blur-sm border-card-border",wrapperClassName:`${o} ${f(1)} ${s}`,wrapperStyle:e?void 0:{transitionDelay:"150ms"},children:[u.jsxs(Un,{children:[u.jsx(Wn,{children:"Growth mode"}),u.jsx(Hn,{children:"When equity trends are healthy, the strategy allows equity exposure to rise within defined risk limits."})]}),u.jsxs(Kn,{className:"space-y-3",children:[u.jsx("p",{className:"text-3xl font-semibold text-chart-2",children:"Equity leans higher"}),u.jsxs("ul",{className:"text-muted-foreground space-y-2 text-sm",children:[u.jsx("li",{children:"- Equity range: roughly 55–75%, with gold flexing as the counterweight."}),u.jsx("li",{children:"- New SIP flows lean into equity first, staying inside guardrails."}),u.jsx("li",{children:"- Index-only exposure keeps single-stock risk out of the system."})]})]})]}),u.jsxs(fr,{prefersReducedMotion:e,className:"bg-card/80 backdrop-blur-sm border-card-border",wrapperClassName:`${o} ${f(1)} ${s}`,wrapperStyle:e?void 0:{transitionDelay:"250ms"},children:[u.jsxs(Un,{children:[u.jsx(Wn,{children:"Protective mode"}),u.jsx(Hn,{children:"When trends weaken, new capital is defensively allocated without forced selling."})]}),u.jsxs(Kn,{className:"space-y-3",children:[u.jsx("p",{className:"text-3xl font-semibold text-chart-1",children:"Defense steps up"}),u.jsxs("ul",{className:"text-muted-foreground space-y-2 text-sm",children:[u.jsx("li",{children:"- Equity tilts down toward the lower band; gold sleeve scales up automatically."}),u.jsx("li",{children:"- New SIP money routes defensively; existing holdings are adjusted gradually."}),u.jsx("li",{children:"- Controls drawdowns while keeping exposure to an eventual recovery."})]})]})]}),u.jsxs(fr,{prefersReducedMotion:e,className:"bg-card/80 backdrop-blur-sm border-card-border",wrapperClassName:`${o} ${f(1)} ${s}`,wrapperStyle:e?void 0:{transitionDelay:"350ms"},children:[u.jsxs(Un,{children:[u.jsx(Wn,{children:"Why it works"}),u.jsx(Hn,{children:"Pairing growth with a crisis hedge, enforced by automation."})]}),u.jsxs(Kn,{className:"space-y-3",children:[u.jsxs("ul",{className:"text-muted-foreground space-y-2 text-sm",children:[u.jsx("li",{children:"- Nifty 50 captures structural economic growth."}),u.jsx("li",{children:"- Gold offsets equity stress and inflation spikes when they hit."}),u.jsx("li",{children:"- Flow-based, rule-based tilts make execution repeatable instead of emotional."})]}),u.jsx("div",{className:"flex flex-wrap gap-2",children:cxe.map(p=>u.jsxs(Fe,{variant:"secondary",className:"bg-background/80 border-border/60 text-foreground flex items-center gap-2",children:[p.icon,u.jsxs("span",{className:"font-medium",children:[p.label,":"]}),u.jsx("span",{className:"text-muted-foreground",children:p.value})]},p.label))})]})]})]})}),u.jsx("section",{ref:p=>a.current[2]=p,"data-section-index":2,className:`px-6 pt-16 max-w-6xl mx-auto ${o} ${d(2)}`,children:u.jsxs("div",{className:"flex flex-col gap-6",children:[u.jsxs("div",{className:"flex flex-col gap-2",children:[u.jsx("h3",{className:"text-2xl font-semibold",children:"How it holds up vs. Nifty SIP"}),u.jsx("p",{className:"text-muted-foreground text-sm",children:"No gold-only comparisons. Just our adaptive SIP vs a plain Nifty SIP across drawdowns, rolling pain points, and overall returns."})]}),u.jsx("div",{className:"grid md:grid-cols-3 gap-4",children:uxe.map((p,g)=>u.jsxs(fr,{prefersReducedMotion:e,className:"bg-card/80 backdrop-blur-sm border-card-border",wrapperClassName:`${o} ${f(2)} ${s}`,wrapperStyle:e?void 0:{transitionDelay:`${150+g*120}ms`},children:[u.jsxs(Un,{children:[u.jsx(Wn,{className:"text-lg",children:p.title}),u.jsx(Hn,{children:p.note})]}),u.jsxs(Kn,{className:"space-y-3",children:[u.jsxs("div",{className:"flex items-start justify-between gap-3",children:[u.jsxs("div",{children:[u.jsx("p",{className:"text-xs uppercase tracking-wide text-muted-foreground",children:"Our strategy"}),u.jsx("p",{className:"text-2xl font-semibold text-chart-2",children:p.ours.value}),u.jsx("p",{className:"text-xs text-muted-foreground",children:p.ours.detail})]}),u.jsx(Fe,{variant:"secondary",className:"bg-chart-2/15 text-chart-2 border-0",children:"Better defense"})]}),u.jsx("div",{className:"flex items-start justify-between gap-3",children:u.jsxs("div",{children:[u.jsx("p",{className:"text-xs uppercase tracking-wide text-muted-foreground",children:"Nifty SIP"}),u.jsx("p",{className:"text-2xl font-semibold text-muted-foreground",children:p.nifty.value}),u.jsx("p",{className:"text-xs text-muted-foreground",children:p.nifty.detail})]})})]})]},p.title))})]})}),u.jsx("section",{ref:p=>a.current[3]=p,"data-section-index":3,className:`px-6 pt-16 max-w-6xl mx-auto ${o} ${d(3)}`,children:u.jsxs("div",{className:"grid lg:grid-cols-2 gap-8",children:[u.jsxs(fr,{prefersReducedMotion:e,className:"bg-card/80 backdrop-blur-sm border-card-border",wrapperClassName:`${o} ${f(3)} ${s}`,wrapperStyle:e?void 0:{transitionDelay:"150ms"},children:[u.jsxs(Un,{children:[u.jsx(Wn,{children:"Execution checklist"}),u.jsx(Hn,{children:"Follow the same steps every month."})]}),u.jsxs(Kn,{className:"space-y-5",children:[u.jsx("p",{className:"text-sm text-muted-foreground",children:"Every investor fails not because of bad strategies, but because they stop executing them. This checklist removes discretion."}),lxe.map((p,g)=>u.jsxs("div",{className:"flex gap-4",children:[u.jsx("div",{className:"flex-none",children:u.jsx("div",{className:"w-10 h-10 rounded-full bg-primary/10 text-primary flex items-center justify-center font-semibold",children:g+1})}),u.jsxs("div",{children:[u.jsx("p",{className:"font-semibold",children:p.title}),u.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed",children:p.detail})]})]},p.title))]})]}),u.jsxs(fr,{prefersReducedMotion:e,className:"bg-card/80 backdrop-blur-sm border-card-border",wrapperClassName:`${o} ${f(3)} ${s}`,wrapperStyle:e?void 0:{transitionDelay:"250ms"},children:[u.jsxs(Un,{children:[u.jsx(Wn,{children:"Guardrails"}),u.jsx(Hn,{children:"Automatic rules to keep the portfolio within a defined risk band."})]}),u.jsxs(Kn,{className:"space-y-4",children:[sxe.map(p=>u.jsxs("div",{className:"flex gap-3",children:[u.jsx("div",{className:"flex-none w-10 h-10 rounded-lg bg-chart-1/10 text-chart-1 flex items-center justify-center",children:u.jsx(Vs,{className:"w-5 h-5"})}),u.jsxs("div",{children:[u.jsx("p",{className:"font-semibold",children:p.title}),u.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed",children:p.description})]})]},p.title)),u.jsxs("div",{className:`p-4 rounded-xl border border-dashed border-border/60 bg-background/60 ${l}`,children:[u.jsx("p",{className:"font-semibold mb-1",children:"Exit discipline"}),u.jsx("p",{className:"text-muted-foreground text-sm",children:"If both equity and gold weaken together for a stretch, pause new allocations and re-evaluate the backdrop before re-entering. No forced trades."})]})]})]})]})}),u.jsx("section",{ref:p=>a.current[4]=p,"data-section-index":4,className:`px-6 pt-16 max-w-6xl mx-auto ${o} ${d(4)}`,children:u.jsxs(fr,{prefersReducedMotion:e,className:"bg-card/80 backdrop-blur-sm border-card-border",wrapperClassName:`${o} ${f(4)} ${s}`,wrapperStyle:e?void 0:{transitionDelay:"150ms"},children:[u.jsxs(Un,{children:[u.jsx(Wn,{children:"Why this isn't a DIY strategy"}),u.jsx(Hn,{children:"Clients pay for discipline, not a tutorial."})]}),u.jsxs(Kn,{className:"grid md:grid-cols-3 gap-6",children:[u.jsxs("div",{className:`p-4 rounded-xl border border-border/60 bg-background/60 space-y-2 ${l}`,children:[u.jsxs("p",{className:"font-semibold flex items-center gap-2",children:[u.jsx(iv,{className:"w-4 h-4 text-primary"}),"Execution discipline"]}),u.jsx("p",{className:"text-muted-foreground text-sm",children:"Most investors fail to rebalance correctly during drawdowns. This system keeps doing it anyway."})]}),u.jsxs("div",{className:`p-4 rounded-xl border border-border/60 bg-background/60 space-y-2 ${l}`,children:[u.jsxs("p",{className:"font-semibold flex items-center gap-2",children:[u.jsx(Dk,{className:"w-4 h-4 text-chart-2"}),"Valuation-aware SIP"]}),u.jsx("p",{className:"text-muted-foreground text-sm",children:"Monthly allocations adapt based on relative pricing — not fixed ratios that ignore where the market is."})]}),u.jsxs("div",{className:`p-4 rounded-xl border border-border/60 bg-background/60 space-y-2 ${l}`,children:[u.jsxs("p",{className:"font-semibold flex items-center gap-2",children:[u.jsx(Vs,{className:"w-4 h-4 text-chart-1"}),"Behavior protection"]}),u.jsx("p",{className:"text-muted-foreground text-sm",children:"Rules prevent panic exits and performance chasing, so the edge compounds instead of leaking away."})]})]})]})}),u.jsx("section",{ref:p=>a.current[5]=p,"data-section-index":5,className:`px-6 pt-16 max-w-6xl mx-auto ${o} ${d(5)}`,children:u.jsxs(fr,{prefersReducedMotion:e,className:"bg-card/80 backdrop-blur-sm border-card-border",wrapperClassName:`${o} ${f(5)} ${s}`,wrapperStyle:e?void 0:{transitionDelay:"150ms"},children:[u.jsxs(Un,{className:"flex flex-col md:flex-row md:items-center md:justify-between gap-4",children:[u.jsxs("div",{children:[u.jsx(Wn,{children:"Keeping it actionable"}),u.jsx(Hn,{children:"What to track, what to automate, and how to stay consistent."})]}),u.jsx(ue,{variant:"secondary",className:"rounded-lg group",asChild:!0,children:u.jsxs("a",{href:"/",className:"flex items-center gap-2",children:["Back to Home",u.jsx(jw,{className:"w-4 h-4 transition-transform group-hover:translate-x-1"})]})})]}),u.jsxs(Kn,{className:"grid md:grid-cols-3 gap-6",children:[u.jsxs("div",{className:`p-4 rounded-xl border border-border/60 bg-background/60 space-y-2 ${l}`,children:[u.jsxs("p",{className:"font-semibold flex items-center gap-2",children:[u.jsx(Lh,{className:"w-4 h-4 text-primary"}),"Signals to watch"]}),u.jsx("p",{className:"text-muted-foreground text-sm",children:"Nifty 50 trend strength vs. long-term average, USDINR spikes, and India VIX. These inform when to expect regime shifts."})]}),u.jsxs("div",{className:`p-4 rounded-xl border border-border/60 bg-background/60 space-y-2 ${l}`,children:[u.jsxs("p",{className:"font-semibold flex items-center gap-2",children:[u.jsx(iv,{className:"w-4 h-4 text-chart-2"}),"Automation"]}),u.jsx("p",{className:"text-muted-foreground text-sm",children:"Scheduled monthly rebalance task, alerts when drift crosses 5%, and a simple checklist stored alongside trade logs."})]}),u.jsxs("div",{className:`p-4 rounded-xl border border-border/60 bg-background/60 space-y-2 ${l}`,children:[u.jsxs("p",{className:"font-semibold flex items-center gap-2",children:[u.jsx(_u,{className:"w-4 h-4 text-chart-3"}),"Review cadence"]}),u.jsx("p",{className:"text-muted-foreground text-sm",children:"Quarterly lookback on drawdowns, hit-rates of regime filter, and transaction costs to ensure the edge persists."})]})]})]})})]})}),u.jsx(Cr,{})]})}const pxe="zerodha:callback",mxe="/portfolio",yxe=()=>{const e=new URLSearchParams(window.location.search);return{status:(e.get("status")||"").trim(),requestToken:(e.get("request_token")||"").trim(),error:(e.get("error")||e.get("error_type")||"").trim(),errorDescription:(e.get("error_description")||"").trim()}};function vxe(){return w.useEffect(()=>{const e=yxe(),t=(r,i)=>{try{localStorage.setItem(pxe,JSON.stringify({status:r,message:i||"",ts:Date.now()}))}catch{}window.close(),window.location.replace(mxe)};if(e.error||e.status&&e.status!=="success"){t("error",e.errorDescription||"Zerodha login was not successful.");return}if(!e.requestToken){t("error","Missing request_token in the redirect URL.");return}const n=`/api/broker/zerodha/callback?request_token=${encodeURIComponent(e.requestToken)}`;Ze("GET",n).then(()=>t("success")).catch(r=>t("error",(r==null?void 0:r.message)||"Unable to complete the login."))},[]),u.jsx("div",{className:"min-h-screen w-full flex items-center justify-center bg-gray-50 px-4",children:u.jsx(_r,{children:u.jsx($d,{className:"w-full max-w-md",children:u.jsxs(Kn,{className:"pt-6 space-y-3",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(DB,{className:"h-8 w-8 text-muted-foreground animate-spin"}),u.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Completing Zerodha login"})]}),u.jsx("p",{className:"text-sm text-gray-600",children:"You can close this tab if it does not close automatically."})]})})})})}const gxe=[{href:"/admin",label:"Overview"},{href:"/admin/users",label:"Users"},{href:"/admin/runs",label:"Runs"},{href:"/admin/invariants",label:"Invariants"}];function xxe({children:e}){const[t]=Cd();return u.jsxs("div",{className:"min-h-screen text-foreground",children:[u.jsx(Tr,{}),u.jsx("main",{className:"pt-24 pb-24",children:u.jsx("div",{className:"max-w-6xl mx-auto px-6",children:u.jsxs("div",{className:"flex flex-col gap-6 lg:flex-row",children:[u.jsx("aside",{className:"lg:w-60",children:u.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/70 p-4 shadow-sm",children:[u.jsx("p",{className:"text-xs uppercase tracking-[0.2em] text-muted-foreground",children:"Admin Control Plane"}),u.jsx("nav",{className:"mt-4 flex flex-col gap-2 text-sm",children:gxe.map(n=>{const r=t===n.href;return u.jsx(gl,{href:n.href,children:u.jsx("a",{className:`rounded-lg px-3 py-2 transition ${r?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground hover:bg-muted/40"}`,children:n.label})},n.href)})})]})}),u.jsx("section",{className:"flex-1",children:e})]})})}),u.jsx(Cr,{})]})}const hs=({label:e,value:t})=>u.jsxs("div",{className:"rounded-xl border border-border/60 bg-card/70 p-4 shadow-sm",children:[u.jsx("p",{className:"text-xs uppercase tracking-[0.2em] text-muted-foreground",children:e}),u.jsx("p",{className:"mt-2 text-2xl font-semibold",children:t})]});function bxe(){const e=vt({queryKey:["/api/admin/overview"],queryFn:async()=>(await Ze("GET","/api/admin/overview")).json()});if(e.isLoading)return u.jsx("div",{className:"text-sm text-muted-foreground",children:"Loading overview…"});if(!e.data)return u.jsx("div",{className:"text-sm text-muted-foreground",children:"No data."});const t=e.data,n=[{name:"RUNNING",value:t.running_runs},{name:"STOPPED",value:t.stopped_runs},{name:"ERROR",value:t.error_runs}],r=[{name:"Orders",value:t.orders_last_24h},{name:"Trades",value:t.trades_last_24h},{name:"SIP",value:t.sip_executed_last_24h}];return u.jsxs("div",{className:"space-y-6",children:[u.jsx("div",{className:"rounded-2xl border border-border/60 bg-card/70 p-6 shadow-sm",children:u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx("p",{className:"text-xs uppercase tracking-[0.2em] text-muted-foreground",children:"Overview"}),u.jsx("h2",{className:"text-2xl font-semibold",children:"System health snapshot"})]}),u.jsx(Fe,{variant:"secondary",children:"Admin"})]})}),u.jsxs("div",{className:"grid gap-4 md:grid-cols-3",children:[u.jsx(hs,{label:"Total Users",value:t.total_users}),u.jsx(hs,{label:"Active Users (24h)",value:t.users_logged_in_last_24h}),u.jsx(hs,{label:"Total Runs",value:t.total_runs}),u.jsx(hs,{label:"Running Runs",value:t.running_runs}),u.jsx(hs,{label:"Paper Runs",value:t.paper_runs_count}),u.jsx(hs,{label:"Live Runs",value:t.live_runs_count})]}),u.jsxs("div",{className:"grid gap-4 lg:grid-cols-2",children:[u.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/70 p-6 shadow-sm",children:[u.jsx("p",{className:"text-sm font-semibold",children:"Run Status"}),u.jsx("div",{className:"h-64 mt-4",children:u.jsx(vx,{width:"100%",height:"100%",children:u.jsxs(lC,{data:n,children:[u.jsx(Fa,{dataKey:"name",tickLine:!1,axisLine:!1}),u.jsx(Ba,{tickLine:!1,axisLine:!1}),u.jsx(La,{dataKey:"value",fill:"hsl(var(--chart-1))",radius:[6,6,0,0]})]})})})]}),u.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/70 p-6 shadow-sm",children:[u.jsx("p",{className:"text-sm font-semibold",children:"Activity (last 24h)"}),u.jsx("div",{className:"h-64 mt-4",children:u.jsx(vx,{width:"100%",height:"100%",children:u.jsxs(lC,{data:r,children:[u.jsx(Fa,{dataKey:"name",tickLine:!1,axisLine:!1}),u.jsx(Ba,{tickLine:!1,axisLine:!1}),u.jsx(La,{dataKey:"value",fill:"hsl(var(--chart-2))",radius:[6,6,0,0]})]})})})]})]}),u.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/70 p-6 shadow-sm",children:[u.jsx("p",{className:"text-sm font-semibold",children:"Latest Errors"}),t.top_errors.length===0?u.jsx("p",{className:"text-sm text-muted-foreground mt-4",children:"No recent errors."}):u.jsx("div",{className:"mt-4 space-y-3",children:t.top_errors.map((i,a)=>u.jsxs("div",{className:"rounded-lg border border-border/60 bg-background/60 p-3 text-sm",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{className:"font-semibold",children:i.event}),u.jsx("span",{className:"text-xs text-muted-foreground",children:i.ts})]}),u.jsxs("p",{className:"text-xs text-muted-foreground",children:[i.source," • ",i.user_id??"unknown"," • ",i.run_id??"n/a"]}),u.jsx("p",{className:"mt-1",children:i.message??"No message"})]},`${i.ts}-${a}`))})]})]})}const wxe={USER:"border-border/60 bg-muted/20 text-muted-foreground",ADMIN:"border-sky-500/40 bg-sky-500/10 text-sky-200",SUPER_ADMIN:"border-amber-400/50 bg-amber-400/10 text-amber-200"};function Sxe({role:e,isSelf:t}){return u.jsxs("span",{className:`inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-[11px] uppercase tracking-[0.15em] ${wxe[e]}`,children:[e==="SUPER_ADMIN"&&u.jsx("span",{"aria-hidden":!0,children:"👑"}),e,t&&u.jsx("span",{"aria-hidden":!0,children:"🔒"})]})}const Uf={"make-admin":"Grant Admin","revoke-admin":"Revoke Admin","make-super-admin":"Make Super Admin"},jxe={"make-admin":"Are you sure you want to promote this user to ADMIN?","revoke-admin":"Are you sure you want to revoke admin privileges for this user?","make-super-admin":"Are you sure you want to promote this user to SUPER_ADMIN?"},Pxe={"make-admin":"make-admin","revoke-admin":"revoke-admin","make-super-admin":"make-super-admin"};function Nxe({target:e,isSelf:t,isSuperAdmin:n,onUpdated:r}){const[i,a]=w.useState(null),[o,s]=w.useState(null),[l,c]=w.useState(!1);if(!n)return null;const d=t&&e.role==="SUPER_ADMIN",f=async()=>{if(i){c(!0),s(null);try{await Ze("POST",`/api/admin/users/${e.user_id}/${Pxe[i]}`),r(),a(null)}catch(h){const p=h instanceof Error?h.message:"Role update failed";s(p)}finally{c(!1)}}};return u.jsxs("div",{className:"flex flex-wrap gap-2",children:[u.jsx(ue,{variant:"outline",size:"sm",disabled:e.role==="ADMIN"||e.role==="SUPER_ADMIN",onClick:()=>a("make-admin"),children:Uf["make-admin"]}),u.jsx(ue,{variant:"outline",size:"sm",disabled:d||e.role==="USER",onClick:()=>a("revoke-admin"),children:Uf["revoke-admin"]}),u.jsx(ue,{variant:"secondary",size:"sm",disabled:e.role==="SUPER_ADMIN",onClick:()=>a("make-super-admin"),children:Uf["make-super-admin"]}),u.jsx(wl,{open:!!i,onOpenChange:h=>!h&&a(null),children:u.jsxs(Fo,{children:[u.jsxs(Bo,{children:[u.jsx(zo,{children:i?Uf[i]:"Confirm role change"}),u.jsx(Vo,{children:i?jxe[i]:""})]}),o&&u.jsx("p",{className:"text-xs text-destructive",children:o}),u.jsxs(Wh,{className:"flex flex-col gap-2 sm:flex-row sm:justify-end",children:[u.jsx(ue,{variant:"outline",onClick:()=>a(null),disabled:l,children:"Cancel"}),u.jsx(ue,{onClick:f,disabled:l,children:l?"Updating...":"Confirm"})]})]})})]})}function uC(){var k,L;const[e,t]=w.useState(1),[n,r]=w.useState(""),[i,a]=w.useState(null),[o,s]=w.useState(!1),[l,c]=w.useState(null),[d,f]=w.useState(!1),[h,p]=w.useState(null),[g,m]=w.useState(!1),[y,v]=w.useState(null),[x,b]=w.useState(!1),P=_d(),S=20,j=w.useMemo(()=>{const R=new URLSearchParams;return R.set("page",String(e)),R.set("page_size",String(S)),n.trim()&&R.set("query",n.trim()),R.toString()},[e,S,n]),N=vt({queryKey:["/api/admin/users",e,n],queryFn:async()=>(await Ze("GET",`/api/admin/users?${j}`)).json()}),O=vt({queryKey:["/api/me"],queryFn:yi({on401:"returnNull"})}),A=!!i&&o&&!d,E=!!h&&g&&!x,T=async()=>{if(i){f(!0),c(null);try{await(await Ze("DELETE",`/api/admin/users/${i.user_id}?hard=true`)).json(),a(null),s(!1),await P.invalidateQueries({queryKey:["/api/admin/users"]}),await P.invalidateQueries({queryKey:["/api/admin/overview"]})}catch(R){const q=R instanceof Error?R.message:"Delete failed";c(q)}finally{f(!1)}}},C=async()=>{if(h){b(!0),v(null);try{await(await Ze("POST",`/api/admin/users/${h.user_id}/hard-reset`)).json(),p(null),m(!1),await P.invalidateQueries({queryKey:["/api/admin/users"]}),await P.invalidateQueries({queryKey:["/api/admin/overview"]})}catch(R){const q=R instanceof Error?R.message:"Reset failed";v(q)}finally{b(!1)}}};if(N.isLoading)return u.jsx("div",{className:"text-sm text-muted-foreground",children:"Loading users..."});const D=N.data;if(!D)return u.jsx("div",{className:"text-sm text-muted-foreground",children:"No users."});const M=Math.max(1,Math.ceil(D.total/D.page_size)),I=(k=O.data)==null?void 0:k.id,B=(((L=O.data)==null?void 0:L.role)??"USER")==="SUPER_ADMIN";return u.jsxs("div",{className:"space-y-6",children:[u.jsx("div",{className:"rounded-2xl border border-border/60 bg-card/70 p-6 shadow-sm",children:u.jsxs("div",{className:"flex flex-col gap-4 md:flex-row md:items-center md:justify-between",children:[u.jsxs("div",{children:[u.jsx("p",{className:"text-xs uppercase tracking-[0.2em] text-muted-foreground",children:"Users"}),u.jsx("h2",{className:"text-2xl font-semibold",children:"User directory"})]}),u.jsx(xt,{className:"md:w-72",placeholder:"Search by email or ID",value:n,onChange:R=>{r(R.target.value),t(1)}})]})}),u.jsx("div",{className:"rounded-2xl border border-border/60 bg-card/70 p-6 shadow-sm overflow-x-auto",children:u.jsxs("table",{className:"min-w-full text-sm",children:[u.jsx("thead",{className:"text-muted-foreground",children:u.jsxs("tr",{children:[u.jsx("th",{className:"px-4 py-2 text-left",children:"User"}),u.jsx("th",{className:"px-4 py-2 text-left",children:"Role"}),u.jsx("th",{className:"px-4 py-2 text-left",children:"Last login"}),u.jsx("th",{className:"px-4 py-2 text-left",children:"Runs"}),u.jsx("th",{className:"px-4 py-2 text-left",children:"Active run"}),u.jsx("th",{className:"px-4 py-2 text-left",children:"Broker"}),B&&u.jsx("th",{className:"px-4 py-2 text-left",children:"Actions"})]})}),u.jsx("tbody",{className:"divide-y divide-border/60",children:D.users.map(R=>u.jsxs("tr",{children:[u.jsx("td",{className:"px-4 py-2",children:u.jsx(gl,{href:`/admin/users/${R.user_id}`,children:u.jsx("a",{className:"text-primary hover:underline",children:R.username})})}),u.jsx("td",{className:"px-4 py-2",children:u.jsx(Sxe,{role:R.role,isSelf:R.user_id===I})}),u.jsx("td",{className:"px-4 py-2 text-xs text-muted-foreground",children:R.last_login_at??"-"}),u.jsx("td",{className:"px-4 py-2",children:R.runs_count}),u.jsx("td",{className:"px-4 py-2 text-xs",children:R.active_run_status?`${R.active_run_status}`:"-"}),u.jsx("td",{className:"px-4 py-2 text-xs",children:R.broker_connected?"Connected":"Not connected"}),B&&u.jsxs("td",{className:"px-4 py-2 space-y-2",children:[u.jsx(Nxe,{target:R,isSelf:R.user_id===I,isSuperAdmin:B,onUpdated:()=>{P.invalidateQueries({queryKey:["/api/admin/users"]}),P.invalidateQueries({queryKey:["/api/admin/overview"]})}}),u.jsx(ue,{variant:"outline",size:"sm",onClick:()=>{p(R),m(!1),v(null)},children:"Hard reset data"}),u.jsx(ue,{variant:"destructive",size:"sm",disabled:R.user_id===I&&R.role==="SUPER_ADMIN",onClick:()=>{a(R),s(!1),c(null)},children:"Delete user"})]})]},R.user_id))})]})}),u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx(ue,{variant:"outline",disabled:e<=1,onClick:()=>t(R=>Math.max(1,R-1)),children:"Prev"}),u.jsxs("span",{className:"text-xs text-muted-foreground",children:["Page ",e," of ",M]}),u.jsx(ue,{variant:"outline",disabled:e>=M,onClick:()=>t(R=>Math.min(M,R+1)),children:"Next"})]}),u.jsx(wl,{open:!!i,onOpenChange:R=>{R||a(null)},children:u.jsxs(Fo,{className:"sm:max-w-lg",children:[u.jsxs(Bo,{children:[u.jsx(zo,{children:"Delete user"}),u.jsx(Vo,{children:"This will permanently delete all trading history, orders, logs, sessions, and broker links for this user. This action cannot be undone."})]}),i&&u.jsxs("div",{className:"space-y-4",children:[u.jsxs("label",{className:"flex items-start gap-3 text-sm",children:[u.jsx(Zp,{checked:o,onCheckedChange:R=>s(!!R)}),u.jsx("span",{className:"text-muted-foreground",children:"I understand this action is permanent and cannot be undone."})]}),l&&u.jsx("p",{className:"text-xs text-destructive",children:l})]}),u.jsxs(Wh,{className:"flex flex-col gap-2 sm:flex-row sm:justify-end",children:[u.jsx(ue,{variant:"outline",onClick:()=>a(null),disabled:d,children:"Cancel"}),u.jsx(ue,{variant:"destructive",onClick:T,disabled:!A,children:d?"Deleting...":"Delete permanently"})]})]})}),u.jsx(wl,{open:!!h,onOpenChange:R=>{R||p(null)},children:u.jsxs(Fo,{className:"sm:max-w-lg",children:[u.jsxs(Bo,{children:[u.jsx(zo,{children:"Hard reset user data"}),u.jsx(Vo,{children:"This clears all runs, orders, trades, positions, MTM, logs, and events for this user. The account stays, but trading history is wiped. This cannot be undone."})]}),h&&u.jsxs("div",{className:"space-y-4",children:[u.jsxs("label",{className:"flex items-start gap-3 text-sm",children:[u.jsx(Zp,{checked:g,onCheckedChange:R=>m(!!R)}),u.jsx("span",{className:"text-muted-foreground",children:"I understand this will permanently wipe all trading history for this user."})]}),y&&u.jsx("p",{className:"text-xs text-destructive",children:y})]}),u.jsxs(Wh,{className:"flex flex-col gap-2 sm:flex-row sm:justify-end",children:[u.jsx(ue,{variant:"outline",onClick:()=>p(null),disabled:x,children:"Cancel"}),u.jsx(ue,{variant:"destructive",onClick:C,disabled:!E,children:x?"Resetting...":"Reset data"})]})]})})]})}function Oxe({userId:e}){const t=vt({queryKey:["/api/admin/users",e],queryFn:async()=>(await Ze("GET",`/api/admin/users/${e}`)).json()});if(t.isLoading)return u.jsx("div",{className:"text-sm text-muted-foreground",children:"Loading user…"});if(!t.data)return u.jsx("div",{className:"text-sm text-muted-foreground",children:"User not found."});const{user:n,runs:r,current_config:i,events:a,capital_summary:o}=t.data;return u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/70 p-6 shadow-sm",children:[u.jsx(gl,{href:"/admin/users",children:u.jsx("a",{className:"text-xs text-primary hover:underline",children:"← Back to users"})}),u.jsx("h2",{className:"mt-2 text-2xl font-semibold",children:n.username}),u.jsxs("p",{className:"text-xs text-muted-foreground",children:["User ID: ",n.user_id]})]}),u.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[u.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/70 p-6 shadow-sm",children:[u.jsx("p",{className:"text-sm font-semibold",children:"Capital Summary"}),u.jsxs("div",{className:"mt-3 space-y-1 text-xs text-muted-foreground",children:[u.jsxs("p",{children:["Cash: ",o.cash??"—"]}),u.jsxs("p",{children:["Invested: ",o.invested??"—"]}),u.jsxs("p",{children:["MTM: ",o.mtm??"—"]}),u.jsxs("p",{children:["Equity: ",o.equity??"—"]}),u.jsxs("p",{children:["PnL: ",o.pnl??"—"]})]})]}),u.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/70 p-6 shadow-sm",children:[u.jsx("p",{className:"text-sm font-semibold",children:"Current Config"}),u.jsx("pre",{className:"mt-3 text-xs text-muted-foreground whitespace-pre-wrap",children:JSON.stringify(i,null,2)})]})]}),u.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/70 p-6 shadow-sm",children:[u.jsx("p",{className:"text-sm font-semibold",children:"Recent Runs"}),u.jsx("div",{className:"mt-4 space-y-2",children:r.map(s=>u.jsxs("div",{className:"flex items-center justify-between text-xs",children:[u.jsx(gl,{href:`/admin/runs/${s.run_id}`,children:u.jsx("a",{className:"text-primary hover:underline",children:s.run_id})}),u.jsx("span",{className:"text-muted-foreground",children:s.status}),u.jsx("span",{className:"text-muted-foreground",children:s.created_at??"—"})]},s.run_id))})]}),u.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/70 p-6 shadow-sm",children:[u.jsx("p",{className:"text-sm font-semibold",children:"Recent Events"}),u.jsx("div",{className:"mt-4 space-y-2",children:a.map((s,l)=>u.jsxs("div",{className:"text-xs text-muted-foreground",children:[u.jsx("span",{className:"text-foreground",children:s.event})," ",u.jsxs("span",{children:["(",s.source,")"]})," ",u.jsx("span",{children:s.ts??"—"})]},`${s.ts}-${l}`))})]})]})}function dC(){const[e,t]=w.useState(1),[n,r]=w.useState(""),[i,a]=w.useState(""),[o,s]=w.useState(""),l=20,c=w.useMemo(()=>{const p=new URLSearchParams;return p.set("page",String(e)),p.set("page_size",String(l)),n&&p.set("status",n),i&&p.set("mode",i),o.trim()&&p.set("user_id",o.trim()),p.toString()},[e,l,n,i,o]),d=vt({queryKey:["/api/admin/runs",e,n,i,o],queryFn:async()=>(await Ze("GET",`/api/admin/runs?${c}`)).json()});if(d.isLoading)return u.jsx("div",{className:"text-sm text-muted-foreground",children:"Loading runs…"});const f=d.data;if(!f)return u.jsx("div",{className:"text-sm text-muted-foreground",children:"No runs."});const h=Math.max(1,Math.ceil(f.total/f.page_size));return u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/70 p-6 shadow-sm",children:[u.jsx("p",{className:"text-xs uppercase tracking-[0.2em] text-muted-foreground",children:"Runs"}),u.jsx("h2",{className:"text-2xl font-semibold",children:"Strategy runs"}),u.jsxs("div",{className:"mt-4 grid gap-3 md:grid-cols-3",children:[u.jsx(xt,{placeholder:"Filter by user_id",value:o,onChange:p=>{s(p.target.value),t(1)}}),u.jsx(xt,{placeholder:"Status (RUNNING/STOPPED/ERROR)",value:n,onChange:p=>{r(p.target.value.toUpperCase()),t(1)}}),u.jsx(xt,{placeholder:"Mode (PAPER/LIVE)",value:i,onChange:p=>{a(p.target.value.toUpperCase()),t(1)}})]})]}),u.jsx("div",{className:"rounded-2xl border border-border/60 bg-card/70 p-6 shadow-sm overflow-x-auto",children:u.jsxs("table",{className:"min-w-full text-sm",children:[u.jsx("thead",{className:"text-muted-foreground",children:u.jsxs("tr",{children:[u.jsx("th",{className:"px-4 py-2 text-left",children:"Run"}),u.jsx("th",{className:"px-4 py-2 text-left",children:"User"}),u.jsx("th",{className:"px-4 py-2 text-left",children:"Status"}),u.jsx("th",{className:"px-4 py-2 text-left",children:"Mode"}),u.jsx("th",{className:"px-4 py-2 text-left",children:"Orders"}),u.jsx("th",{className:"px-4 py-2 text-left",children:"Trades"})]})}),u.jsx("tbody",{className:"divide-y divide-border/60",children:f.runs.map(p=>u.jsxs("tr",{children:[u.jsx("td",{className:"px-4 py-2",children:u.jsx(gl,{href:`/admin/runs/${p.run_id}`,children:u.jsx("a",{className:"text-primary hover:underline",children:p.run_id})})}),u.jsx("td",{className:"px-4 py-2 text-xs",children:p.user_id}),u.jsx("td",{className:"px-4 py-2 text-xs",children:p.status}),u.jsx("td",{className:"px-4 py-2 text-xs",children:p.mode??"—"}),u.jsx("td",{className:"px-4 py-2 text-xs",children:p.order_count}),u.jsx("td",{className:"px-4 py-2 text-xs",children:p.trade_count})]},p.run_id))})]})}),u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx(ue,{variant:"outline",disabled:e<=1,onClick:()=>t(p=>Math.max(1,p-1)),children:"Prev"}),u.jsxs("span",{className:"text-xs text-muted-foreground",children:["Page ",e," of ",h]}),u.jsx(ue,{variant:"outline",disabled:e>=h,onClick:()=>t(p=>Math.min(h,p+1)),children:"Next"})]})]})}function Axe({runId:e}){const t=vt({queryKey:["/api/admin/runs",e],queryFn:async()=>(await Ze("GET",`/api/admin/runs/${e}`)).json()});if(t.isLoading)return u.jsx("div",{className:"text-sm text-muted-foreground",children:"Loading run…"});if(!t.data)return u.jsx("div",{className:"text-sm text-muted-foreground",children:"Run not found."});const{run:n,config:r,engine_status:i,state_snapshot:a,ledger_events:o,orders:s,trades:l,invariants:c}=t.data;return u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/70 p-6 shadow-sm",children:[u.jsx(gl,{href:"/admin/runs",children:u.jsx("a",{className:"text-xs text-primary hover:underline",children:"← Back to runs"})}),u.jsx("h2",{className:"mt-2 text-2xl font-semibold",children:n.run_id}),u.jsxs("p",{className:"text-xs text-muted-foreground",children:["User: ",n.user_id]})]}),u.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[u.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/70 p-6 shadow-sm",children:[u.jsx("p",{className:"text-sm font-semibold",children:"Metadata"}),u.jsxs("div",{className:"mt-3 space-y-1 text-xs text-muted-foreground",children:[u.jsxs("p",{children:["Status: ",n.status]}),u.jsxs("p",{children:["Mode: ",n.mode??"—"]}),u.jsxs("p",{children:["Strategy: ",n.strategy??"—"]}),u.jsxs("p",{children:["Started: ",n.started_at??"—"]}),u.jsxs("p",{children:["Last event: ",n.last_event_time??"—"]})]})]}),u.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/70 p-6 shadow-sm",children:[u.jsx("p",{className:"text-sm font-semibold",children:"Engine Status"}),u.jsxs("div",{className:"mt-3 space-y-1 text-xs text-muted-foreground",children:[u.jsxs("p",{children:["Status: ",(i==null?void 0:i.status)??"—"]}),u.jsxs("p",{children:["Updated: ",(i==null?void 0:i.last_updated)??"—"]})]})]})]}),u.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[u.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/70 p-6 shadow-sm",children:[u.jsx("p",{className:"text-sm font-semibold",children:"Config"}),u.jsx("pre",{className:"mt-3 text-xs text-muted-foreground whitespace-pre-wrap",children:JSON.stringify(r,null,2)})]}),u.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/70 p-6 shadow-sm",children:[u.jsx("p",{className:"text-sm font-semibold",children:"State Snapshot"}),u.jsx("pre",{className:"mt-3 text-xs text-muted-foreground whitespace-pre-wrap",children:JSON.stringify(a,null,2)})]})]}),u.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/70 p-6 shadow-sm",children:[u.jsx("p",{className:"text-sm font-semibold",children:"Invariants"}),u.jsx("div",{className:"mt-3 grid gap-2 text-xs text-muted-foreground md:grid-cols-2",children:Object.entries(c).map(([d,f])=>u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx("span",{children:d}),u.jsx("span",{className:f?"text-red-400":"text-emerald-400",children:f})]},d))})]}),u.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/70 p-6 shadow-sm",children:[u.jsx("p",{className:"text-sm font-semibold",children:"Ledger Events"}),u.jsx("div",{className:"mt-3 space-y-2 text-xs text-muted-foreground",children:o.map((d,f)=>u.jsxs("div",{children:[u.jsx("span",{className:"text-foreground",children:String(d.event)})," ",u.jsx("span",{children:String(d.timestamp??"")})]},f))})]}),u.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[u.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/70 p-6 shadow-sm overflow-x-auto",children:[u.jsx("p",{className:"text-sm font-semibold",children:"Orders"}),u.jsxs("table",{className:"min-w-full text-xs mt-3",children:[u.jsx("thead",{className:"text-muted-foreground",children:u.jsxs("tr",{children:[u.jsx("th",{className:"px-2 py-1 text-left",children:"ID"}),u.jsx("th",{className:"px-2 py-1 text-left",children:"Symbol"}),u.jsx("th",{className:"px-2 py-1 text-left",children:"Side"})]})}),u.jsx("tbody",{className:"divide-y divide-border/60",children:s.map((d,f)=>u.jsxs("tr",{children:[u.jsx("td",{className:"px-2 py-1",children:String(d.id)}),u.jsx("td",{className:"px-2 py-1",children:String(d.symbol)}),u.jsx("td",{className:"px-2 py-1",children:String(d.side)})]},f))})]})]}),u.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/70 p-6 shadow-sm overflow-x-auto",children:[u.jsx("p",{className:"text-sm font-semibold",children:"Trades"}),u.jsxs("table",{className:"min-w-full text-xs mt-3",children:[u.jsx("thead",{className:"text-muted-foreground",children:u.jsxs("tr",{children:[u.jsx("th",{className:"px-2 py-1 text-left",children:"ID"}),u.jsx("th",{className:"px-2 py-1 text-left",children:"Symbol"}),u.jsx("th",{className:"px-2 py-1 text-left",children:"Side"})]})}),u.jsx("tbody",{className:"divide-y divide-border/60",children:l.map((d,f)=>u.jsxs("tr",{children:[u.jsx("td",{className:"px-2 py-1",children:String(d.id)}),u.jsx("td",{className:"px-2 py-1",children:String(d.symbol)}),u.jsx("td",{className:"px-2 py-1",children:String(d.side)})]},f))})]})]})]})]})}function Exe(){const e=vt({queryKey:["/api/admin/health/invariants"],queryFn:async()=>(await Ze("GET","/api/admin/health/invariants")).json()});if(e.isLoading)return u.jsx("div",{className:"text-sm text-muted-foreground",children:"Loading invariants…"});if(!e.data)return u.jsx("div",{className:"text-sm text-muted-foreground",children:"No invariant data."});const t=e.data;return u.jsxs("div",{className:"space-y-6",children:[u.jsxs("div",{className:"rounded-2xl border border-border/60 bg-card/70 p-6 shadow-sm",children:[u.jsx("p",{className:"text-xs uppercase tracking-[0.2em] text-muted-foreground",children:"Invariants"}),u.jsx("h2",{className:"text-2xl font-semibold",children:"Health checks"})]}),u.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:Object.entries(t).map(([n,r])=>u.jsxs("div",{className:"rounded-xl border border-border/60 bg-card/70 p-4 shadow-sm",children:[u.jsx("p",{className:"text-xs uppercase tracking-[0.18em] text-muted-foreground",children:n}),u.jsx("p",{className:`mt-2 text-2xl font-semibold ${r?"text-red-400":"text-emerald-400"}`,children:r})]},n))})]})}function ps(){const[e,t]=w.useState("loading"),[n,r]=w.useState({email:"",password:""}),[i,a]=w.useState(null),[o,s]=w.useState(!1),[,l]=hP("/admin/users/:userId"),[,c]=hP("/admin/runs/:runId"),d=w.useCallback(async()=>{try{const h=await fetch("/api/admin/overview",{credentials:"include"});if(h.status===401){t("unauthenticated");return}if(h.status===403){t("forbidden");return}if(!h.ok){t("forbidden");return}t("allowed")}catch{t("forbidden")}},[]);w.useEffect(()=>{d()},[d]);const f=async h=>{if(h.preventDefault(),!n.email.trim()||!n.password){a("Email and password are required.");return}s(!0),a(null);try{await Ze("POST","/api/login",{email:n.email.trim(),password:n.password}),await d()}catch(p){const g=p instanceof Error?p.message:"Login failed";a(g),t("unauthenticated")}finally{s(!1)}};return e==="loading"?u.jsx("div",{className:"min-h-screen text-muted-foreground",children:"Loading admin..."}):e==="unauthenticated"?u.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background px-4",children:u.jsxs("div",{className:"w-full max-w-md rounded-2xl border border-border/60 bg-card/80 p-6 shadow-lg space-y-4",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx("p",{className:"text-xs uppercase tracking-[0.2em] text-muted-foreground",children:"Admin login"}),u.jsx("h1",{className:"text-2xl font-semibold",children:"Sign in to continue"}),u.jsx("p",{className:"text-sm text-muted-foreground",children:"Enter your admin credentials to access the control plane."})]}),u.jsxs("form",{className:"space-y-4",onSubmit:f,children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx(Tt,{htmlFor:"admin-login-email",children:"Email"}),u.jsx(xt,{id:"admin-login-email",type:"email",required:!0,placeholder:"you@example.com",value:n.email,onChange:h=>r(p=>({...p,email:h.target.value}))})]}),u.jsxs("div",{className:"space-y-2",children:[u.jsx(Tt,{htmlFor:"admin-login-password",children:"Password"}),u.jsx(xt,{id:"admin-login-password",type:"password",required:!0,value:n.password,onChange:h=>r(p=>({...p,password:h.target.value}))})]}),i&&u.jsx("p",{className:"text-xs text-destructive",children:i}),u.jsx(ue,{type:"submit",className:"w-full",disabled:o,children:o?"Signing in...":"Log in"})]})]})}):e==="forbidden"?u.jsx("div",{className:"min-h-screen flex items-center justify-center text-muted-foreground",children:u.jsxs("div",{className:"space-y-3 text-center",children:[u.jsx("h1",{className:"text-xl font-semibold text-foreground",children:"Admin access required"}),u.jsx("p",{className:"text-sm",children:"Your account is signed in but does not have admin privileges."})]})}):u.jsx(xxe,{children:u.jsxs(q2,{children:[u.jsx(Ue,{path:"/admin",component:bxe}),u.jsx(Ue,{path:"/admin/users",component:uC}),u.jsx(Ue,{path:"/admin/users/:userId",children:()=>l!=null&&l.userId?u.jsx(Oxe,{userId:l.userId}):u.jsx(uC,{})}),u.jsx(Ue,{path:"/admin/runs",component:dC}),u.jsx(Ue,{path:"/admin/runs/:runId",children:()=>c!=null&&c.runId?u.jsx(Axe,{runId:c.runId}):u.jsx(dC,{})}),u.jsx(Ue,{path:"/admin/invariants",component:Exe}),u.jsx(Ue,{component:N$})]})})}const ce={hidden:{opacity:0,y:20},visible:{opacity:1,y:0,transition:{duration:.6,ease:"easeOut"}}},Tn=(e=.08)=>({hidden:{},visible:{transition:{staggerChildren:e}}}),Ko={whileHover:{y:-6,boxShadow:"0 24px 48px rgba(59,130,246,0.20)",borderColor:"rgba(59,130,246,0.35)"}},yn={initial:{opacity:0,y:12},animate:{opacity:1,y:0,transition:{duration:.5,ease:"easeOut"}}},Txe=[{title:"Evidence first",body:"We prioritize rules backed by data, not noise. Every decision is codified, tested, and repeatable."},{title:"Risk discipline",body:"Position sizing and rebalancing are built to protect the downside while staying exposed to compounding."},{title:"Transparency",body:"Clear logic, consistent reporting, and no opaque black boxes. You always know what drives your portfolio."}],Cxe=[{title:"Systematic Strategies",body:"Rule-based portfolios like Golden Nifty, built to stay patient through cycles."},{title:"Execution Guardrails",body:"Eligibility checks, market state awareness, and heartbeat monitoring keep runs healthy."},{title:"Live Monitoring",body:"Positions, P&L, and state timelines stay in sync with your broker for real-time clarity."}],_xe=[{label:"Design",text:"Every strategy starts with a hypothesis, validation, and risk definition."},{label:"Simulate",text:"We test against varied regimes to avoid overfitting and fragility."},{label:"Deploy",text:"Live checks, session health, and incremental rollouts keep execution safe."},{label:"Adapt",text:"Feedback loops improve sizing, cadence, and monitoring without changing core rules."}];function kxe(){const e=Jo(),t=e?{}:yn;return u.jsxs("div",{className:"min-h-screen bg-background text-foreground",children:[u.jsx(Tr,{}),u.jsx(_r,{children:u.jsxs("main",{className:"pt-24 pb-16",children:[u.jsxs(Y.section,{className:"relative overflow-hidden",initial:t.initial,animate:t.animate,transition:t.transition,children:[u.jsxs("div",{className:"absolute inset-0 pointer-events-none",children:[u.jsx("div",{className:"absolute -left-24 top-0 h-80 w-80 bg-gradient-to-br from-primary/20 via-primary/5 to-transparent blur-[120px]"}),u.jsx("div",{className:"absolute right-0 top-10 h-96 w-96 bg-gradient-to-br from-chart-2/15 via-chart-1/10 to-transparent blur-[120px]"})]}),u.jsxs("div",{className:"relative max-w-5xl mx-auto px-6 py-16 text-center space-y-4",children:[u.jsx(Y.h1,{className:"text-4xl md:text-5xl font-bold tracking-tight",variants:ce,initial:"hidden",animate:"visible",children:"About QuantFortune"}),u.jsx(Y.p,{className:"text-lg text-muted-foreground max-w-3xl mx-auto",variants:ce,initial:"hidden",animate:"visible",transition:{delay:.08,duration:.6},children:"Systematic investing, built for long-term clarity."})]})]}),u.jsxs("section",{className:"max-w-6xl mx-auto px-6 py-12 space-y-12",children:[u.jsxs(Y.div,{className:"space-y-6",variants:Tn(.12),initial:"hidden",whileInView:"visible",viewport:{once:!0,margin:"-50px"},children:[u.jsx(Y.h2,{className:"text-2xl font-semibold",variants:ce,children:"Philosophy"}),u.jsx(Y.div,{className:"grid gap-6 md:grid-cols-3",variants:ce,children:Txe.map(n=>u.jsxs(Y.div,{className:"rounded-2xl border border-border/60 bg-card/80 p-6 shadow-lg",variants:ce,whileHover:e?void 0:{y:-6,boxShadow:"0 18px 36px rgba(59,130,246,0.18)"},transition:{type:"spring",stiffness:260,damping:24},children:[u.jsx("p",{className:"text-sm uppercase tracking-[0.2em] text-primary mb-2",children:n.title}),u.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:n.body})]},n.title))})]}),u.jsxs(Y.div,{className:"space-y-6",variants:Tn(.12),initial:"hidden",whileInView:"visible",viewport:{once:!0,margin:"-50px"},children:[u.jsx(Y.h2,{className:"text-2xl font-semibold",variants:ce,children:"What We Build"}),u.jsx(Y.div,{className:"grid gap-6 md:grid-cols-3",variants:ce,children:Cxe.map(n=>u.jsxs(Y.div,{className:"rounded-2xl border border-border/60 bg-gradient-to-br from-background/80 via-background/60 to-card/80 p-6 shadow-xl backdrop-blur-sm",variants:ce,...e?{}:Ko,children:[u.jsx("p",{className:"text-base font-semibold mb-2",children:n.title}),u.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:n.body})]},n.title))})]}),u.jsxs(Y.div,{className:"space-y-6",variants:Tn(.1),initial:"hidden",whileInView:"visible",viewport:{once:!0,margin:"-80px"},children:[u.jsx(Y.h2,{className:"text-2xl font-semibold",variants:ce,children:"Trust & Discipline"}),u.jsxs(Y.div,{className:"relative space-y-6 border-l border-border/60 pl-6",variants:ce,children:[u.jsx("div",{className:"absolute left-0 top-0 h-full w-px bg-gradient-to-b from-primary/40 via-border/60 to-transparent animate-[pulse_4s_ease-in-out_infinite]"}),_xe.map((n,r)=>u.jsxs(Y.div,{className:"relative pl-4",variants:ce,transition:{delay:r*.05,duration:.5},children:[u.jsx("span",{className:"absolute -left-[9px] top-1 h-3 w-3 rounded-full bg-primary shadow-[0_0_0_8px_rgba(59,130,246,0.15)]"}),u.jsx("p",{className:"text-sm font-semibold",children:n.label}),u.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:n.text})]},n.label))]})]})]})]})}),u.jsx(Cr,{})]})}const $xe=[{title:"How we structure Golden Nifty for patience through cycles",summary:"From frequency controls to eligibility checks, here’s how we keep SIPs disciplined when markets whipsaw.",date:"Jan 2026",tag:"Strategies"},{title:"Execution health: heartbeats, stalls, and restarts",summary:"Why engine liveness matters more than timing luck, and how we guard against silent failures.",date:"Jan 2026",tag:"Infrastructure"},{title:"Reading market structure without prediction",summary:"Using rules and thresholds instead of forecasts to stay consistent in uncertain regimes.",date:"Dec 2025",tag:"Research"}];function Mxe(){const e=Jo(),t=e?{}:yn,[n,r]=w.useState(!0);return w.useEffect(()=>{const i=setTimeout(()=>r(!1),500);return()=>clearTimeout(i)},[]),u.jsxs("div",{className:"min-h-screen bg-background text-foreground",children:[u.jsx(Tr,{}),u.jsx(_r,{children:u.jsxs("main",{className:"pt-24 pb-16",children:[u.jsxs(Y.section,{className:"relative overflow-hidden px-6 py-16",initial:t.initial,animate:t.animate,transition:t.transition,children:[u.jsxs("div",{className:"absolute inset-0 pointer-events-none",children:[u.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(circle_at_1px_1px,rgba(59,130,246,0.12),transparent_0)] [background-size:120px_120px] opacity-40"}),u.jsx("div",{className:"absolute -top-10 right-10 h-64 w-64 rounded-full bg-chart-2/20 blur-[120px]"})]}),u.jsxs("div",{className:"relative max-w-4xl mx-auto text-center space-y-4",children:[u.jsx(Y.h1,{className:"text-4xl md:text-5xl font-bold tracking-tight",variants:ce,initial:"hidden",animate:"visible",children:"Insights & Research"}),u.jsx(Y.p,{className:"text-lg text-muted-foreground max-w-2xl mx-auto",variants:ce,initial:"hidden",animate:"visible",transition:{delay:.08,duration:.6},children:"Market structure, strategy logic, long-term thinking."})]})]}),u.jsx("section",{className:"max-w-6xl mx-auto px-6 pb-12",children:u.jsx(Y.div,{className:"grid gap-6 md:grid-cols-2 lg:grid-cols-3",variants:Tn(.12),initial:"hidden",animate:"visible",children:n?Array.from({length:3}).map((i,a)=>u.jsx("div",{className:"h-48 rounded-2xl border border-border/50 bg-muted/20 animate-pulse"},a)):$xe.map(i=>u.jsxs(Y.article,{className:"relative overflow-hidden rounded-2xl border border-border/60 bg-card/80 p-6 shadow-lg",variants:ce,...e?{}:Ko,children:[u.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground mb-2",children:[u.jsx("span",{className:"uppercase tracking-[0.18em] text-primary",children:i.tag}),u.jsx("span",{children:i.date})]}),u.jsx("h3",{className:"text-lg font-semibold mb-2",children:i.title}),u.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:i.summary})]},i.title))})})]})}),u.jsx(Cr,{})]})}const Rxe=[{title:"Data Collection",body:"We collect only the data required to provide portfolio insights and broker connectivity. This includes identifiers, session tokens, and execution status logs."},{title:"Use of Data",body:"Data is used solely for account authentication, syncing holdings, computing P&L, and improving reliability of the platform. We do not sell or rent your data."},{title:"Storage & Security",body:"Credentials are stored using industry-standard encryption. Sensitive broker tokens are scoped and rotated as per broker policies."},{title:"Third Parties",body:"Brokerage APIs (e.g., Zerodha) are accessed only with your consent. No unauthorized sharing with any other party."},{title:"User Control",body:"You can disconnect brokers and request deletion of stored personal data and tokens, subject to applicable retention requirements."}],Dxe=[{label:"Consent",text:"You authorize broker linking and data access through explicit user actions."},{label:"Processing",text:"Data is processed to sync holdings, calculate metrics, and display portfolio views."},{label:"Retention",text:"We retain only as long as needed for compliance, troubleshooting, and continuity of service."},{label:"Revocation",text:"Broker access can be revoked anytime; cached data is then purged in line with policy."}];function Ixe(){const e=Jo();return w.useEffect(()=>{document.title="Privacy Policy | QuantFortune"},[]),u.jsxs("div",{className:"min-h-screen bg-background text-foreground",children:[u.jsx(Tr,{}),u.jsx(_r,{className:"pt-24 pb-16",children:u.jsxs("main",{children:[u.jsxs(Y.section,{className:"relative overflow-hidden px-6 py-16",initial:e?void 0:yn.initial,animate:e?void 0:yn.animate,transition:e?void 0:yn.transition,children:[u.jsxs("div",{className:"absolute inset-0 pointer-events-none",children:[u.jsx("div",{className:"absolute -left-24 top-0 h-80 w-80 bg-gradient-to-br from-primary/18 via-primary/5 to-transparent blur-[120px]"}),u.jsx("div",{className:"absolute right-0 top-10 h-96 w-96 bg-gradient-to-br from-chart-2/15 via-chart-1/10 to-transparent blur-[120px]"})]}),u.jsxs("div",{className:"relative max-w-5xl mx-auto text-center space-y-4",children:[u.jsx(Y.h1,{className:"text-4xl md:text-5xl font-bold tracking-tight",variants:ce,initial:"hidden",animate:"visible",children:"Privacy Policy"}),u.jsx(Y.p,{className:"text-lg text-muted-foreground max-w-3xl mx-auto",variants:ce,initial:"hidden",animate:"visible",transition:{delay:.08,duration:.6},children:"Your data stays secure, purpose-limited, and under your control."})]})]}),u.jsxs("section",{className:"max-w-6xl mx-auto px-6 pb-12 space-y-12",children:[u.jsx(Y.div,{className:"grid gap-6 md:grid-cols-2 lg:grid-cols-3",variants:Tn(.12),initial:"hidden",whileInView:"visible",viewport:{once:!0,margin:"-60px"},children:Rxe.map(t=>u.jsxs(Y.div,{className:"rounded-2xl border border-border/60 bg-card/80 p-6 shadow-xl backdrop-blur-sm",variants:ce,...e?{}:Ko,children:[u.jsx("p",{className:"text-base font-semibold mb-2",children:t.title}),u.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:t.body})]},t.title))}),u.jsxs(Y.div,{className:"space-y-6",variants:Tn(.1),initial:"hidden",whileInView:"visible",viewport:{once:!0,margin:"-80px"},children:[u.jsx(Y.h2,{className:"text-2xl font-semibold",variants:ce,children:"Data Lifecycle"}),u.jsxs(Y.div,{className:"relative space-y-6 border-l border-border/60 pl-6",variants:ce,children:[u.jsx("div",{className:"absolute left-0 top-0 h-full w-px bg-gradient-to-b from-primary/40 via-border/60 to-transparent animate-[pulse_4s_ease-in-out_infinite]"}),Dxe.map((t,n)=>u.jsxs(Y.div,{className:"relative pl-4",variants:ce,transition:{delay:n*.05,duration:.5},children:[u.jsx("span",{className:"absolute -left-[9px] top-1 h-3 w-3 rounded-full bg-primary shadow-[0_0_0_8px_rgba(59,130,246,0.15)]"}),u.jsx("p",{className:"text-sm font-semibold",children:t.label}),u.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:t.text})]},t.label))]})]})]}),u.jsx("section",{className:"max-w-6xl mx-auto px-6 pb-8",children:u.jsxs("div",{className:"rounded-2xl border border-border/50 bg-card/70 p-4 flex flex-col md:flex-row md:items-center md:justify-between gap-3 shadow-lg",children:[u.jsx("div",{className:"text-sm text-muted-foreground",children:"Last updated: Jan 2026 · This policy may change to align with regulatory requirements."}),u.jsx("div",{className:"text-xs text-primary/80 animate-[pulse_3s_ease-in-out_infinite]",children:"Compliance note: No investment advice is provided; see disclosures."})]})})]})}),u.jsx(Cr,{})]})}const Lxe=[{title:"Acceptance of Terms",body:"By accessing QuantFortune you agree to these Terms, our Privacy Policy, and Disclosures. Do not use the service if you disagree."},{title:"No Investment Advice",body:"Content and tools are for information and execution support only. We do not provide personalized recommendations or portfolio advice."},{title:"Eligibility & Accounts",body:"You are responsible for keeping credentials secure and ensuring you are authorized to operate linked brokerage accounts."},{title:"Execution & Data",body:"Broker connectivity, pricing, and P&L are subject to third-party APIs. Interruptions may occur; verify before acting."},{title:"Liability",body:"You bear market, execution, and connectivity risks. QuantFortune is not liable for losses arising from use of the service."}],Fxe=[{label:"Use of Service",text:"Use only for lawful purposes and comply with broker and exchange rules."},{label:"Changes",text:"We may update terms, features, and availability; continued use implies acceptance."},{label:"Termination",text:"We may suspend or terminate access for misuse, fraud, or regulatory requirements."},{label:"Governing Law",text:"These terms are governed by Indian law; disputes subject to appropriate jurisdiction."}];function Bxe(){const e=Jo();return w.useEffect(()=>{document.title="Terms of Service | QuantFortune"},[]),u.jsxs("div",{className:"min-h-screen bg-background text-foreground",children:[u.jsx(Tr,{}),u.jsx(_r,{className:"pt-24 pb-16",children:u.jsxs("main",{children:[u.jsxs(Y.section,{className:"relative overflow-hidden px-6 py-16",initial:e?void 0:yn.initial,animate:e?void 0:yn.animate,transition:e?void 0:yn.transition,children:[u.jsxs("div",{className:"absolute inset-0 pointer-events-none",children:[u.jsx("div",{className:"absolute -left-24 top-0 h-80 w-80 bg-gradient-to-br from-primary/18 via-primary/5 to-transparent blur-[120px]"}),u.jsx("div",{className:"absolute right-0 top-10 h-96 w-96 bg-gradient-to-br from-chart-2/15 via-chart-1/10 to-transparent blur-[120px]"})]}),u.jsxs("div",{className:"relative max-w-5xl mx-auto text-center space-y-4",children:[u.jsx(Y.h1,{className:"text-4xl md:text-5xl font-bold tracking-tight",variants:ce,initial:"hidden",animate:"visible",children:"Terms of Service"}),u.jsx(Y.p,{className:"text-lg text-muted-foreground max-w-3xl mx-auto",variants:ce,initial:"hidden",animate:"visible",transition:{delay:.08,duration:.6},children:"Clear obligations, limited scope, and disciplined usage expectations."})]})]}),u.jsxs("section",{className:"max-w-6xl mx-auto px-6 pb-12 space-y-12",children:[u.jsx(Y.div,{className:"grid gap-6 md:grid-cols-2 lg:grid-cols-3",variants:Tn(.12),initial:"hidden",whileInView:"visible",viewport:{once:!0,margin:"-60px"},children:Lxe.map(t=>u.jsxs(Y.div,{className:"rounded-2xl border border-border/60 bg-card/80 p-6 shadow-xl backdrop-blur-sm",variants:ce,...e?{}:Ko,children:[u.jsx("p",{className:"text-base font-semibold mb-2",children:t.title}),u.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:t.body})]},t.title))}),u.jsxs(Y.div,{className:"space-y-6",variants:Tn(.1),initial:"hidden",whileInView:"visible",viewport:{once:!0,margin:"-80px"},children:[u.jsx(Y.h2,{className:"text-2xl font-semibold",variants:ce,children:"Key Clauses"}),u.jsxs(Y.div,{className:"relative space-y-6 border-l border-border/60 pl-6",variants:ce,children:[u.jsx("div",{className:"absolute left-0 top-0 h-full w-px bg-gradient-to-b from-primary/40 via-border/60 to-transparent animate-[pulse_4s_ease-in-out_infinite]"}),Fxe.map((t,n)=>u.jsxs(Y.div,{className:"relative pl-4",variants:ce,transition:{delay:n*.05,duration:.5},children:[u.jsx("span",{className:"absolute -left-[9px] top-1 h-3 w-3 rounded-full bg-primary shadow-[0_0_0_8px_rgba(59,130,246,0.15)]"}),u.jsx("p",{className:"text-sm font-semibold",children:t.label}),u.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:t.text})]},t.label))]})]})]}),u.jsx("section",{className:"max-w-6xl mx-auto px-6 pb-8",children:u.jsxs("div",{className:"rounded-2xl border border-border/50 bg-card/70 p-4 flex flex-col md:flex-row md:items-center md:justify-between gap-3 shadow-lg",children:[u.jsx("div",{className:"text-sm text-muted-foreground",children:"Last updated: Jan 2026 · Subject to change with product or regulatory updates."}),u.jsx("div",{className:"text-xs text-primary/80 animate-[pulse_3s_ease-in-out_infinite]",children:"Compliance note: Use at your discretion; verify execution and data before acting."})]})})]})}),u.jsx(Cr,{})]})}const zxe=[{title:"No Investment Advice",body:"QuantFortune is a rules-based execution and monitoring platform. We do not provide investment, tax, or legal advice."},{title:"Market Risk",body:"Investments in securities are subject to market and liquidity risks. Past performance does not guarantee future results."},{title:"Execution Dependency",body:"Positions, pricing, and P&L rely on third-party broker APIs. Interruptions or delays may impact displayed data and execution."},{title:"Data Sources",body:"Quotes and holdings are fetched from your linked broker. We do not guarantee accuracy or completeness of third-party data."},{title:"User Responsibility",body:"You are responsible for verifying trades, reviewing contract notes, and ensuring suitability for your risk profile."}],Vxe=[{label:"Transparency",text:"We show strategy logic, state, and timestamps; no hidden signals or discretionary overrides."},{label:"Limits",text:"We do not rebalance without explicit rules and eligibility checks; pauses may occur when markets are closed."},{label:"Compliance",text:"Built for disciplined execution; not a registered investment advisor or PMS. Use alongside your own diligence."},{label:"Support",text:"Operational support is available, but we cannot opine on instrument suitability or allocations."}];function Uxe(){const e=Jo();return w.useEffect(()=>{document.title="Disclosures | QuantFortune"},[]),u.jsxs("div",{className:"min-h-screen bg-background text-foreground",children:[u.jsx(Tr,{}),u.jsx(_r,{className:"pt-24 pb-16",children:u.jsxs("main",{children:[u.jsxs(Y.section,{className:"relative overflow-hidden px-6 py-16",initial:e?void 0:yn.initial,animate:e?void 0:yn.animate,transition:e?void 0:yn.transition,children:[u.jsxs("div",{className:"absolute inset-0 pointer-events-none",children:[u.jsx("div",{className:"absolute -left-24 top-0 h-80 w-80 bg-gradient-to-br from-primary/18 via-primary/5 to-transparent blur-[120px]"}),u.jsx("div",{className:"absolute right-0 top-10 h-96 w-96 bg-gradient-to-br from-chart-2/15 via-chart-1/10 to-transparent blur-[120px]"})]}),u.jsxs("div",{className:"relative max-w-5xl mx-auto text-center space-y-4",children:[u.jsx(Y.h1,{className:"text-4xl md:text-5xl font-bold tracking-tight",variants:ce,initial:"hidden",animate:"visible",children:"Disclosures"}),u.jsx(Y.p,{className:"text-lg text-muted-foreground max-w-3xl mx-auto",variants:ce,initial:"hidden",animate:"visible",transition:{delay:.08,duration:.6},children:"Clarity on scope, risk, and how to use QuantFortune responsibly."})]})]}),u.jsxs("section",{className:"max-w-6xl mx-auto px-6 pb-12 space-y-12",children:[u.jsx(Y.div,{className:"grid gap-6 md:grid-cols-2 lg:grid-cols-3",variants:Tn(.12),initial:"hidden",whileInView:"visible",viewport:{once:!0,margin:"-60px"},children:zxe.map(t=>u.jsxs(Y.div,{className:"rounded-2xl border border-border/60 bg-card/80 p-6 shadow-xl backdrop-blur-sm",variants:ce,...e?{}:Ko,children:[u.jsx("p",{className:"text-base font-semibold mb-2",children:t.title}),u.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:t.body})]},t.title))}),u.jsxs(Y.div,{className:"space-y-6",variants:Tn(.1),initial:"hidden",whileInView:"visible",viewport:{once:!0,margin:"-80px"},children:[u.jsx(Y.h2,{className:"text-2xl font-semibold",variants:ce,children:"Key Disclosures"}),u.jsxs(Y.div,{className:"relative space-y-6 border-l border-border/60 pl-6",variants:ce,children:[u.jsx("div",{className:"absolute left-0 top-0 h-full w-px bg-gradient-to-b from-primary/40 via-border/60 to-transparent animate-[pulse_4s_ease-in-out_infinite]"}),Vxe.map((t,n)=>u.jsxs(Y.div,{className:"relative pl-4",variants:ce,transition:{delay:n*.05,duration:.5},children:[u.jsx("span",{className:"absolute -left-[9px] top-1 h-3 w-3 rounded-full bg-primary shadow-[0_0_0_8px_rgba(59,130,246,0.15)]"}),u.jsx("p",{className:"text-sm font-semibold",children:t.label}),u.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:t.text})]},t.label))]})]})]}),u.jsx("section",{className:"max-w-6xl mx-auto px-6 pb-8",children:u.jsxs("div",{className:"rounded-2xl border border-border/50 bg-card/70 p-4 flex flex-col md:flex-row md:items-center md:justify-between gap-3 shadow-lg",children:[u.jsx("div",{className:"text-sm text-muted-foreground",children:"Last updated: Jan 2026 · Disclosures may change with regulatory guidance or broker policies."}),u.jsx("div",{className:"text-xs text-primary/80 animate-[pulse_3s_ease-in-out_infinite]",children:"Compliance note: Verify trades independently. QuantFortune is not a registered advisor."})]})})]})}),u.jsx(Cr,{})]})}const Wxe=[{title:"Emotional decisions",body:"Buying highs, selling lows, and reacting to noise instead of process."},{title:"Timing mistakes",body:"Overconfidence in entries and exits without a tested framework."},{title:"Overtrading",body:"Chasing moves increases cost, taxes, and errors."},{title:"Lack of process",body:"No repeatable rules to stay invested through cycles."}],Hxe=[{label:"Rule-based strategies",text:"Every move is codified and testable. No discretionary overrides."},{label:"Regime awareness",text:"Frequency and eligibility checks respect market sessions and state."},{label:"Risk bands",text:"Sizing and bands to contain drawdowns and avoid overexposure."},{label:"Rebalancing discipline",text:"Periodic, rules-driven actions to keep portfolios aligned."}],qxe=[{title:"Long-term focus",body:"Built to stay patient through volatility, compounding over time.",icon:u.jsx(Vs,{className:"h-5 w-5"})},{title:"Automated execution",body:"Runs when eligible; pauses when not. Heartbeats monitor health.",icon:u.jsx(BB,{className:"h-5 w-5"})},{title:"Transparent logic",body:"You see the strategy state, timeline, and rules—no black boxes.",icon:u.jsx(_u,{className:"h-5 w-5"})},{title:"Lower decision fatigue",body:"Clear rules reduce the urge to tinker; focus on staying the course.",icon:u.jsx(Pw,{className:"h-5 w-5"})}];function Kxe(){const e=Jo();return w.useEffect(()=>{document.title="Learn More | QuantFortune"},[]),u.jsxs("div",{className:"min-h-screen bg-background text-foreground",children:[u.jsx(Tr,{}),u.jsx(_r,{className:"pt-24 pb-16",children:u.jsxs("main",{children:[u.jsxs(Y.section,{className:"relative overflow-hidden px-6 py-16",initial:e?void 0:yn.initial,animate:e?void 0:yn.animate,transition:e?void 0:yn.transition,children:[u.jsxs("div",{className:"absolute inset-0 pointer-events-none",children:[u.jsx("div",{className:"absolute -left-16 top-0 h-80 w-80 bg-gradient-to-br from-primary/20 via-primary/5 to-transparent blur-[120px]"}),u.jsx("div",{className:"absolute right-0 top-10 h-96 w-96 bg-gradient-to-br from-chart-2/15 via-chart-1/10 to-transparent blur-[140px]"}),u.jsx("div",{className:"absolute inset-0 bg-[radial-gradient(circle_at_1px_1px,rgba(59,130,246,0.08),transparent_0)] [background-size:160px_160px] opacity-40"})]}),u.jsxs("div",{className:"relative max-w-5xl mx-auto text-center space-y-4",children:[u.jsx(Y.h1,{className:"text-4xl md:text-5xl font-bold tracking-tight",variants:ce,initial:"hidden",animate:"visible",children:"Built for Clarity. Designed for the Long Term."}),u.jsx(Y.p,{className:"text-lg text-muted-foreground max-w-3xl mx-auto",variants:ce,initial:"hidden",animate:"visible",transition:{delay:.08,duration:.6},children:"A systematic approach to investing that replaces noise with process."})]})]}),u.jsxs("section",{className:"max-w-6xl mx-auto px-6 pb-12 space-y-10",children:[u.jsxs(Y.div,{className:"space-y-6",variants:Tn(.12),initial:"hidden",whileInView:"visible",viewport:{once:!0,margin:"-60px"},children:[u.jsx(Y.h2,{className:"text-2xl font-semibold",variants:ce,children:"The Problem with Traditional Investing"}),u.jsx(Y.div,{className:"grid gap-6 md:grid-cols-2 lg:grid-cols-4",variants:ce,children:Wxe.map(t=>u.jsxs(Y.div,{className:"rounded-2xl border border-border/60 bg-card/80 p-5 shadow-lg backdrop-blur-sm",variants:ce,...e?{}:Ko,children:[u.jsx("p",{className:"text-base font-semibold mb-2",children:t.title}),u.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:t.body})]},t.title))})]}),u.jsxs(Y.div,{className:"space-y-6",variants:Tn(.1),initial:"hidden",whileInView:"visible",viewport:{once:!0,margin:"-80px"},children:[u.jsx(Y.h2,{className:"text-2xl font-semibold",variants:ce,children:"The QuantFortune Approach"}),u.jsxs(Y.div,{className:"relative space-y-6 border-l border-border/60 pl-6",variants:ce,children:[u.jsx("div",{className:"absolute left-0 top-0 h-full w-px bg-gradient-to-b from-primary/40 via-border/60 to-transparent animate-[pulse_5s_ease-in-out_infinite]"}),Hxe.map((t,n)=>u.jsxs(Y.div,{className:"relative pl-4",variants:ce,transition:{delay:n*.06,duration:.5},children:[u.jsx("span",{className:"absolute -left-[9px] top-1 h-3 w-3 rounded-full bg-primary shadow-[0_0_0_8px_rgba(59,130,246,0.15)]"}),u.jsx("p",{className:"text-sm font-semibold",children:t.label}),u.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:t.text})]},t.label))]})]}),u.jsxs(Y.div,{className:"space-y-6",variants:Tn(.12),initial:"hidden",whileInView:"visible",viewport:{once:!0,margin:"-60px"},children:[u.jsx(Y.h2,{className:"text-2xl font-semibold",variants:ce,children:"What You Get"}),u.jsx(Y.div,{className:"grid gap-6 md:grid-cols-2",variants:ce,children:qxe.map((t,n)=>u.jsxs(Y.div,{className:"rounded-2xl border border-border/60 bg-gradient-to-br from-background/80 via-background/60 to-card/80 p-6 shadow-xl backdrop-blur-sm flex gap-3",variants:ce,transition:{delay:n*.05},...e?{}:Ko,children:[u.jsx("div",{className:"h-10 w-10 rounded-full bg-primary/10 text-primary flex items-center justify-center",children:t.icon}),u.jsxs("div",{children:[u.jsx("p",{className:"text-base font-semibold",children:t.title}),u.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:t.body})]})]},t.title))})]}),u.jsx(Y.div,{className:"rounded-2xl border border-border/60 bg-card/80 p-8 shadow-2xl backdrop-blur-lg mt-4",variants:ce,initial:"hidden",whileInView:"visible",viewport:{once:!0,margin:"-40px"},children:u.jsxs("div",{className:"flex flex-col md:flex-row md:items-center md:justify-between gap-4",children:[u.jsxs("div",{className:"space-y-2",children:[u.jsx("p",{className:"text-lg font-semibold",children:"Ready to see it in action?"}),u.jsx("p",{className:"text-sm text-muted-foreground",children:"Explore live strategy flows or view a portfolio demo built for disciplined, long-term investing."})]}),u.jsxs("div",{className:"flex flex-wrap gap-3",children:[u.jsx(Y.a,{href:"/strategies/golden-nifty",className:"inline-flex items-center gap-2 rounded-xl bg-primary text-primary-foreground px-4 py-2 text-sm font-semibold shadow-[0_10px_30px_rgba(59,130,246,0.3)] transition hover:-translate-y-0.5 hover:shadow-[0_14px_36px_rgba(59,130,246,0.35)]",whileHover:e?void 0:{scale:1.02},whileTap:e?void 0:{scale:.98},children:"Explore Strategies"}),u.jsx(Y.a,{href:"/portfolio/paper",className:"inline-flex items-center gap-2 rounded-xl border border-primary/50 px-4 py-2 text-sm font-semibold text-primary bg-primary/10 transition hover:-translate-y-0.5 hover:border-primary hover:bg-primary/15",whileHover:e?void 0:{scale:1.02},whileTap:e?void 0:{scale:.98},children:"View Portfolio Demo"})]})]})})]})]})}),u.jsx(Cr,{})]})}function Gxe(){return u.jsxs(q2,{children:[u.jsx(Ue,{path:"/",component:i7}),u.jsx(Ue,{path:"/login",component:vxe}),u.jsx(Ue,{path:"/dashboard",component:cC}),u.jsx(Ue,{path:"/portfolio",component:cC}),u.jsx(Ue,{path:"/portfolio/paper",component:oxe}),u.jsx(Ue,{path:"/strategies/golden-nifty",component:hxe}),u.jsx(Ue,{path:"/about",component:kxe}),u.jsx(Ue,{path:"/blog",component:Mxe}),u.jsx(Ue,{path:"/learn-more",component:Kxe}),u.jsx(Ue,{path:"/privacy",component:Ixe}),u.jsx(Ue,{path:"/terms",component:Bxe}),u.jsx(Ue,{path:"/disclosures",component:Uxe}),u.jsx(Ue,{path:"/admin",component:ps}),u.jsx(Ue,{path:"/admin/users",component:ps}),u.jsx(Ue,{path:"/admin/users/:userId",component:ps}),u.jsx(Ue,{path:"/admin/runs",component:ps}),u.jsx(Ue,{path:"/admin/runs/:runId",component:ps}),u.jsx(Ue,{path:"/admin/invariants",component:ps}),u.jsx(Ue,{component:N$})]})}function Yxe(){return u.jsx(b6,{client:k6,children:u.jsxs(XV,{children:[u.jsx(jz,{}),u.jsx(Gxe,{})]})})}R2(document.getElementById("root")).render(u.jsx(Yxe,{})); diff --git a/dist/index.html b/dist/index.html index e5fcbd63..2c750f2a 100644 --- a/dist/index.html +++ b/dist/index.html @@ -1,20 +1,20 @@ - - - - - - QuantFortune | Long-Term Investment Strategies - - - - - - - - - - - -
- + + + + + + QuantFortune | Long-Term Investment Strategies + + + + + + + + + + + +
+ \ No newline at end of file diff --git a/src/components/landing/AuthDialogs.tsx b/src/components/landing/AuthDialogs.tsx index 05c83648..632f74eb 100644 --- a/src/components/landing/AuthDialogs.tsx +++ b/src/components/landing/AuthDialogs.tsx @@ -45,7 +45,7 @@ export default function AuthDialogs({ layout = "desktop" }: AuthDialogsProps) { }); useQuery({ - queryKey: ["/api/me"], + queryKey: ["/me"], queryFn: getQueryFn({ on401: "returnNull" }), }); @@ -53,8 +53,8 @@ export default function AuthDialogs({ layout = "desktop" }: AuthDialogsProps) { user: SessionUser, action: "signup" | "login", ) => { - queryClient.setQueryData(["/api/me"], user); - queryClient.invalidateQueries({ queryKey: ["/api/broker/status"] }); + queryClient.setQueryData(["/me"], user); + queryClient.invalidateQueries({ queryKey: ["/broker/status"] }); toast({ title: action === "signup" ? "Account created" : "Signed in", description: @@ -68,7 +68,7 @@ export default function AuthDialogs({ layout = "desktop" }: AuthDialogsProps) { const signupMutation = useMutation({ mutationFn: async (payload) => { - const res = await apiRequest("POST", "/api/signup", { + const res = await apiRequest("POST", "/signup", { username: payload.email, password: payload.password, }); @@ -85,7 +85,7 @@ export default function AuthDialogs({ layout = "desktop" }: AuthDialogsProps) { const loginMutation = useMutation({ mutationFn: async (payload) => { - const res = await apiRequest("POST", "/api/login", payload); + const res = await apiRequest("POST", "/login", payload); return res.json(); }, onSuccess: (user) => handleAuthSuccess(user, "login"), @@ -109,7 +109,7 @@ export default function AuthDialogs({ layout = "desktop" }: AuthDialogsProps) { const resetRequestMutation = useMutation({ mutationFn: async (email: string) => { - const res = await apiRequest("POST", "/api/password-reset/request", { email }); + const res = await apiRequest("POST", "/password-reset/request", { email }); return res.json(); }, onSuccess: () => { @@ -123,7 +123,7 @@ export default function AuthDialogs({ layout = "desktop" }: AuthDialogsProps) { const resetConfirmMutation = useMutation({ mutationFn: async () => { - const res = await apiRequest("POST", "/api/password-reset/confirm", { + const res = await apiRequest("POST", "/password-reset/confirm", { email: resetEmail.trim(), otp: resetOtp.trim(), new_password: resetPassword, diff --git a/src/components/landing/AuthSection.tsx b/src/components/landing/AuthSection.tsx index a8171b82..92e63b7d 100644 --- a/src/components/landing/AuthSection.tsx +++ b/src/components/landing/AuthSection.tsx @@ -36,13 +36,13 @@ export default function AuthSection() { }); const meQuery = useQuery({ - queryKey: ["/api/me"], + queryKey: ["/me"], queryFn: getQueryFn({ on401: "returnNull" }), }); const handleAuthSuccess = (user: SessionUser, action: "signup" | "login") => { - queryClient.setQueryData(["/api/me"], user); - queryClient.invalidateQueries({ queryKey: ["/api/broker/status"] }); + queryClient.setQueryData(["/me"], user); + queryClient.invalidateQueries({ queryKey: ["/broker/status"] }); toast({ title: action === "signup" ? "Account created" : "Signed in", description: `Welcome ${user.username}`, @@ -51,7 +51,7 @@ export default function AuthSection() { const signupMutation = useMutation({ mutationFn: async (payload) => { - const res = await apiRequest("POST", "/api/signup", { + const res = await apiRequest("POST", "/signup", { username: payload.email, password: payload.password, }); @@ -68,7 +68,7 @@ export default function AuthSection() { const loginMutation = useMutation({ mutationFn: async (payload) => { - const res = await apiRequest("POST", "/api/login", payload); + const res = await apiRequest("POST", "/login", payload); return res.json(); }, onSuccess: (user) => handleAuthSuccess(user, "login"), @@ -82,11 +82,11 @@ export default function AuthSection() { const logoutMutation = useMutation({ mutationFn: async () => { - await apiRequest("POST", "/api/logout"); + await apiRequest("POST", "/logout"); }, onSuccess: () => { - queryClient.setQueryData(["/api/me"], null); - queryClient.removeQueries({ queryKey: ["/api/broker/status"] }); + queryClient.setQueryData(["/me"], null); + queryClient.removeQueries({ queryKey: ["/broker/status"] }); toast({ title: "Signed out" }); window.location.assign("/"); }, diff --git a/src/components/landing/BrokerConnectDialog.tsx b/src/components/landing/BrokerConnectDialog.tsx index e030f05d..3d98da0a 100644 --- a/src/components/landing/BrokerConnectDialog.tsx +++ b/src/components/landing/BrokerConnectDialog.tsx @@ -62,12 +62,12 @@ export default function BrokerConnectDialog({ const [holdings, setHoldings] = useState([]); const { data: sessionUser } = useQuery({ - queryKey: ["/api/me"], + queryKey: ["/me"], queryFn: getQueryFn({ on401: "returnNull" }), }); const { data: brokerStatus, refetch: refetchStatus } = useQuery({ - queryKey: ["/api/broker/status"], + queryKey: ["/broker/status"], queryFn: getQueryFn({ on401: "returnNull" }), staleTime: 0, refetchOnMount: "always", @@ -82,7 +82,7 @@ export default function BrokerConnectDialog({ throw new Error("API secret is required"); } const redirectUrl = `${window.location.origin}/login`; - const res = await apiRequest("POST", "/api/broker/zerodha/login", { + const res = await apiRequest("POST", "/broker/zerodha/login", { apiKey, apiSecret, redirectUrl, @@ -102,7 +102,7 @@ export default function BrokerConnectDialog({ const holdingsMutation = useMutation({ mutationFn: async () => { - const res = await apiRequest("GET", "/api/zerodha/holdings"); + const res = await apiRequest("GET", "/zerodha/holdings"); return res.json() as Promise<{ holdings: any[] }>; }, onSuccess: (data) => { @@ -118,7 +118,7 @@ export default function BrokerConnectDialog({ const disconnectMutation = useMutation({ mutationFn: async () => { - const res = await apiRequest("POST", "/api/broker/disconnect"); + const res = await apiRequest("POST", "/broker/disconnect"); return res.json() as Promise<{ connected: boolean }>; }, onSuccess: () => { diff --git a/src/components/landing/Navigation.tsx b/src/components/landing/Navigation.tsx index b9920624..a6352e2e 100644 --- a/src/components/landing/Navigation.tsx +++ b/src/components/landing/Navigation.tsx @@ -20,17 +20,17 @@ export default function Navigation() { const queryClient = useQueryClient(); const { data: sessionUser } = useQuery({ - queryKey: ["/api/me"], + queryKey: ["/me"], queryFn: getQueryFn({ on401: "returnNull" }), }); const logoutMutation = useMutation({ mutationFn: async () => { - await apiRequest("POST", "/api/logout"); + await apiRequest("POST", "/logout"); }, onSuccess: () => { - queryClient.setQueryData(["/api/me"], null); - queryClient.removeQueries({ queryKey: ["/api/broker/status"] }); + queryClient.setQueryData(["/me"], null); + queryClient.removeQueries({ queryKey: ["/broker/status"] }); window.location.assign("/"); }, }); diff --git a/src/components/landing/PortfolioSection.tsx b/src/components/landing/PortfolioSection.tsx index b6964581..657cf5a4 100644 --- a/src/components/landing/PortfolioSection.tsx +++ b/src/components/landing/PortfolioSection.tsx @@ -183,23 +183,23 @@ export default function PortfolioSection() { isFetching: brokerStatusLoading, refetch: refetchBrokerStatus, } = useQuery({ - queryKey: ["/api/broker/status"], + queryKey: ["/broker/status"], queryFn: getQueryFn({ on401: "returnNull" }), staleTime: 0, refetchOnMount: "always", }); const { data: sessionUser } = useQuery({ - queryKey: ["/api/me"], + queryKey: ["/me"], queryFn: getQueryFn({ on401: "returnNull" }), }); const systemStatusQuery = useQuery({ - queryKey: ["/api/system/status"], + queryKey: ["/system/status"], queryFn: getQueryFn({ on401: "throw" }), refetchInterval: 15000, }); const armMutation = useMutation({ mutationFn: async () => { - const res = await fetch("/api/system/arm", { + const res = await fetch("/system/arm", { method: "POST", credentials: "include", }); @@ -211,7 +211,7 @@ export default function PortfolioSection() { const redirect = payload?.detail?.redirect_url || payload?.redirect_url || - "/api/broker/login"; + "/broker/login"; window.location.assign(redirect); return null; } @@ -241,9 +241,9 @@ export default function PortfolioSection() { }); const holdingsQuery = useQuery({ - queryKey: ["/api/zerodha/holdings"], + queryKey: ["/zerodha/holdings"], queryFn: async () => { - const res = await apiRequest("GET", "/api/zerodha/holdings"); + const res = await apiRequest("GET", "/zerodha/holdings"); return res.json(); }, enabled: !!brokerStatus?.connected, @@ -262,9 +262,9 @@ export default function PortfolioSection() { }); const fundsQuery = useQuery({ - queryKey: ["/api/zerodha/funds"], + queryKey: ["/zerodha/funds"], queryFn: async () => { - const res = await apiRequest("GET", "/api/zerodha/funds"); + const res = await apiRequest("GET", "/zerodha/funds"); return res.json(); }, enabled: !!brokerStatus?.connected, @@ -325,7 +325,7 @@ export default function PortfolioSection() { useEffect(() => { const fetchStatus = async () => { try { - const res = await fetch("/api/engine/status"); + const res = await fetch("/engine/status"); const data = await res.json(); setEngineStatus(data); } catch { @@ -341,7 +341,7 @@ export default function PortfolioSection() { useEffect(() => { const fetchMarketStatus = async () => { try { - const res = await fetch("/api/market/status"); + const res = await fetch("/market/status"); const data = await res.json(); setMarketStatus(data); } catch { @@ -403,11 +403,11 @@ export default function PortfolioSection() { }, [prefersReducedMotion]); const equityCurveQuery = useQuery({ - queryKey: ["/api/zerodha/equity-curve", startDate], + queryKey: ["/zerodha/equity-curve", startDate], queryFn: async () => { const res = await apiRequest( "GET", - `/api/zerodha/equity-curve${startDate ? `?from=${startDate}` : ""}`, + `/zerodha/equity-curve${startDate ? `?from=${startDate}` : ""}`, ); return res.json(); }, diff --git a/src/pages/PaperPortfolio.tsx b/src/pages/PaperPortfolio.tsx index 8f87577a..7ed51553 100644 --- a/src/pages/PaperPortfolio.tsx +++ b/src/pages/PaperPortfolio.tsx @@ -138,25 +138,25 @@ function PaperTradingPortfolio() { const skipFirstPnlPointRef = useRef(true); const fundsQuery = useQuery({ - queryKey: ["/api/paper/funds"], + queryKey: ["/paper/funds"], queryFn: async () => { - const res = await apiRequest("GET", "/api/paper/funds"); + const res = await apiRequest("GET", "/paper/funds"); return res.json(); }, }); const positionsQuery = useQuery({ - queryKey: ["/api/paper/positions"], + queryKey: ["/paper/positions"], queryFn: async () => { - const res = await apiRequest("GET", "/api/paper/positions"); + const res = await apiRequest("GET", "/paper/positions"); return res.json(); }, }); const ordersQuery = useQuery({ - queryKey: ["/api/paper/orders"], + queryKey: ["/paper/orders"], queryFn: async () => { - const res = await apiRequest("GET", "/api/paper/orders"); + const res = await apiRequest("GET", "/paper/orders"); return res.json(); }, refetchInterval: 10000, @@ -246,7 +246,7 @@ function PaperTradingPortfolio() { let timer: number; const poll = async () => { try { - const res = await fetch("/api/paper/mtm", { + const res = await fetch("/paper/mtm", { credentials: "include", }); if (!res.ok) { @@ -307,7 +307,7 @@ function PaperTradingPortfolio() { useEffect(() => { const fetchMarketStatus = async () => { try { - const res = await fetch("/api/market/status", { + const res = await fetch("/market/status", { credentials: "include", }); if (!res.ok) { @@ -340,7 +340,7 @@ function PaperTradingPortfolio() { setIsResetting(true); try { - const res = await fetch("/api/paper/reset", { method: "POST" }); + const res = await fetch("/paper/reset", { method: "POST" }); if (!res.ok) { throw new Error("Reset failed"); } @@ -474,7 +474,7 @@ function PaperTradingPortfolio() { setIsAddingCash(true); try { - await apiRequest("POST", "/api/paper/add-cash", { amount: addCashAmount }); + await apiRequest("POST", "/paper/add-cash", { amount: addCashAmount }); setMtmCash((prev) => typeof prev === "number" ? prev + addCashAmount : addCashAmount ); diff --git a/src/pages/Support.tsx b/src/pages/Support.tsx index 9c64cd11..5fb1a44c 100644 --- a/src/pages/Support.tsx +++ b/src/pages/Support.tsx @@ -32,7 +32,7 @@ export default function SupportPage() { const [submitting, setSubmitting] = useState(false); const [checking, setChecking] = useState(false); const { data: sessionUser } = useQuery({ - queryKey: ["/api/me"], + queryKey: ["/me"], queryFn: getQueryFn({ on401: "returnNull" }), }); const sessionEmail = sessionUser?.username?.trim() || ""; @@ -52,7 +52,7 @@ export default function SupportPage() { } setSubmitting(true); try { - const res = await apiRequest("POST", "/api/support/ticket", { + const res = await apiRequest("POST", "/support/ticket", { ...form, email: effectiveEmail, }); @@ -75,7 +75,7 @@ export default function SupportPage() { } setChecking(true); try { - const res = await apiRequest("POST", `/api/support/ticket/status/${ticketId.trim()}`, { + const res = await apiRequest("POST", `/support/ticket/status/${ticketId.trim()}`, { email: effectiveEmail, }); const data = await res.json(); diff --git a/src/pages/ZerodhaCallback.tsx b/src/pages/ZerodhaCallback.tsx index 228e6112..efabedb4 100644 --- a/src/pages/ZerodhaCallback.tsx +++ b/src/pages/ZerodhaCallback.tsx @@ -48,7 +48,7 @@ export default function ZerodhaCallback() { return; } - const url = `/api/broker/zerodha/callback?request_token=${encodeURIComponent(params.requestToken)}`; + const url = `/broker/zerodha/callback?request_token=${encodeURIComponent(params.requestToken)}`; apiRequest("GET", url) .then(() => finalize("success")) .catch((err: any) => finalize("error", err?.message || "Unable to complete the login.")); diff --git a/src/pages/admin/AdminInvariants.tsx b/src/pages/admin/AdminInvariants.tsx index 491941d8..67cab651 100644 --- a/src/pages/admin/AdminInvariants.tsx +++ b/src/pages/admin/AdminInvariants.tsx @@ -4,9 +4,9 @@ import type { InvariantsResponse } from "./types"; export default function AdminInvariants() { const invariantsQuery = useQuery({ - queryKey: ["/api/admin/health/invariants"], + queryKey: ["admin/health/invariants"], queryFn: async () => { - const res = await apiRequest("GET", "/api/admin/health/invariants"); + const res = await apiRequest("GET", "admin/health/invariants"); return res.json(); }, }); diff --git a/src/pages/admin/AdminOverview.tsx b/src/pages/admin/AdminOverview.tsx index 81258bd9..23bd5b6e 100644 --- a/src/pages/admin/AdminOverview.tsx +++ b/src/pages/admin/AdminOverview.tsx @@ -13,9 +13,9 @@ const StatCard = ({ label, value }: { label: string; value: number | string }) = export default function AdminOverview() { const overviewQuery = useQuery({ - queryKey: ["/api/admin/overview"], + queryKey: ["admin/overview"], queryFn: async () => { - const res = await apiRequest("GET", "/api/admin/overview"); + const res = await apiRequest("GET", "admin/overview"); return res.json(); }, }); diff --git a/src/pages/admin/AdminPage.tsx b/src/pages/admin/AdminPage.tsx index b0cd92e8..8d8159be 100644 --- a/src/pages/admin/AdminPage.tsx +++ b/src/pages/admin/AdminPage.tsx @@ -31,7 +31,7 @@ export default function AdminPage() { const checkAccess = useCallback(async () => { try { - const res = await fetch("/api/admin/overview", { credentials: "include" }); + const res = await fetch("admin/overview", { credentials: "include" }); if (res.status === 401) { setAccessState("unauthenticated"); return; @@ -63,7 +63,7 @@ export default function AdminPage() { setLoginPending(true); setLoginError(null); try { - await apiRequest("POST", "/api/login", { + await apiRequest("POST", "login", { email: loginForm.email.trim(), password: loginForm.password, }); diff --git a/src/pages/admin/AdminRunDetail.tsx b/src/pages/admin/AdminRunDetail.tsx index a3db54e9..232de3c4 100644 --- a/src/pages/admin/AdminRunDetail.tsx +++ b/src/pages/admin/AdminRunDetail.tsx @@ -5,9 +5,9 @@ import type { RunDetailResponse } from "./types"; export default function AdminRunDetail({ runId }: { runId: string }) { const detailQuery = useQuery({ - queryKey: ["/api/admin/runs", runId], + queryKey: ["admin/runs", runId], queryFn: async () => { - const res = await apiRequest("GET", `/api/admin/runs/${runId}`); + const res = await apiRequest("GET", `admin/runs/${runId}`); return res.json(); }, }); diff --git a/src/pages/admin/AdminRuns.tsx b/src/pages/admin/AdminRuns.tsx index 3ad89c0a..7adc2b25 100644 --- a/src/pages/admin/AdminRuns.tsx +++ b/src/pages/admin/AdminRuns.tsx @@ -24,9 +24,9 @@ export default function AdminRuns() { }, [page, pageSize, status, mode, userId]); const runsQuery = useQuery({ - queryKey: ["/api/admin/runs", page, status, mode, userId], + queryKey: ["admin/runs", page, status, mode, userId], queryFn: async () => { - const res = await apiRequest("GET", `/api/admin/runs?${queryString}`); + const res = await apiRequest("GET", `admin/runs?${queryString}`); return res.json(); }, }); diff --git a/src/pages/admin/AdminSupportTickets.tsx b/src/pages/admin/AdminSupportTickets.tsx index 75d1c09d..ab040be0 100644 --- a/src/pages/admin/AdminSupportTickets.tsx +++ b/src/pages/admin/AdminSupportTickets.tsx @@ -26,7 +26,7 @@ type TicketsResponse = { export default function AdminSupportTickets() { const queryClient = useQueryClient(); const { data, isLoading } = useQuery({ - queryKey: ["/api/admin/support-tickets"], + queryKey: ["admin/support-tickets"], queryFn: getQueryFn({ on401: "throw" }), }); @@ -34,9 +34,9 @@ export default function AdminSupportTickets() { const confirmed = window.confirm("Delete this ticket? This cannot be undone."); if (!confirmed) return; try { - await apiRequest("DELETE", `/api/admin/support-tickets/${ticketId}`); + await apiRequest("DELETE", `admin/support-tickets/${ticketId}`); toast({ title: "Ticket deleted" }); - queryClient.invalidateQueries({ queryKey: ["/api/admin/support-tickets"] }); + queryClient.invalidateQueries({ queryKey: ["admin/support-tickets"] }); } catch (err: any) { toast({ title: "Delete failed", description: err?.message || "Try again." }); } diff --git a/src/pages/admin/AdminUserDetail.tsx b/src/pages/admin/AdminUserDetail.tsx index 35e8f1e8..e8a2629b 100644 --- a/src/pages/admin/AdminUserDetail.tsx +++ b/src/pages/admin/AdminUserDetail.tsx @@ -5,9 +5,9 @@ import type { UserDetailResponse } from "./types"; export default function AdminUserDetail({ userId }: { userId: string }) { const detailQuery = useQuery({ - queryKey: ["/api/admin/users", userId], + queryKey: ["admin/users", userId], queryFn: async () => { - const res = await apiRequest("GET", `/api/admin/users/${userId}`); + const res = await apiRequest("GET", `admin/users/${userId}`); return res.json(); }, }); diff --git a/src/pages/admin/AdminUsers.tsx b/src/pages/admin/AdminUsers.tsx index f9e49f8b..c1dec4f6 100644 --- a/src/pages/admin/AdminUsers.tsx +++ b/src/pages/admin/AdminUsers.tsx @@ -42,15 +42,15 @@ export default function AdminUsers() { }, [page, pageSize, query]); const usersQuery = useQuery({ - queryKey: ["/api/admin/users", page, query], + queryKey: ["admin/users", page, query], queryFn: async () => { - const res = await apiRequest("GET", `/api/admin/users?${queryString}`); + const res = await apiRequest("GET", `admin/users?${queryString}`); return res.json(); }, }); const meQuery = useQuery<{ id: string; username: string; role?: string } | null>({ - queryKey: ["/api/me"], + queryKey: ["me"], queryFn: getQueryFn({ on401: "returnNull" }), }); @@ -66,13 +66,13 @@ export default function AdminUsers() { try { const res = await apiRequest( "DELETE", - `/api/admin/users/${deleteTarget.user_id}?hard=true`, + `admin/users/${deleteTarget.user_id}?hard=true`, ); (await res.json()) as DeleteUserResponse; setDeleteTarget(null); setConfirmChecked(false); - await queryClient.invalidateQueries({ queryKey: ["/api/admin/users"] }); - await queryClient.invalidateQueries({ queryKey: ["/api/admin/overview"] }); + await queryClient.invalidateQueries({ queryKey: ["admin/users"] }); + await queryClient.invalidateQueries({ queryKey: ["admin/overview"] }); } catch (err) { const message = err instanceof Error ? err.message : "Delete failed"; setDeleteError(message); @@ -90,13 +90,13 @@ export default function AdminUsers() { try { const res = await apiRequest( "POST", - `/api/admin/users/${resetTarget.user_id}/hard-reset`, + `admin/users/${resetTarget.user_id}/hard-reset`, ); (await res.json()) as HardResetResponse; setResetTarget(null); setResetChecked(false); - await queryClient.invalidateQueries({ queryKey: ["/api/admin/users"] }); - await queryClient.invalidateQueries({ queryKey: ["/api/admin/overview"] }); + await queryClient.invalidateQueries({ queryKey: ["admin/users"] }); + await queryClient.invalidateQueries({ queryKey: ["admin/overview"] }); } catch (err) { const message = err instanceof Error ? err.message : "Reset failed"; setResetError(message); @@ -180,8 +180,8 @@ export default function AdminUsers() { isSelf={user.user_id === currentUserId} isSuperAdmin={isSuperAdmin} onUpdated={() => { - queryClient.invalidateQueries({ queryKey: ["/api/admin/users"] }); - queryClient.invalidateQueries({ queryKey: ["/api/admin/overview"] }); + queryClient.invalidateQueries({ queryKey: ["admin/users"] }); + queryClient.invalidateQueries({ queryKey: ["admin/overview"] }); }} />