From 044bdbdac80c6e2b89383f850967d24acfff7291 Mon Sep 17 00:00:00 2001 From: David Arranz Date: Sun, 25 Oct 2026 19:22:50 +0100 Subject: [PATCH] Refactor code structure for improved readability and maintainability --- dist/client/assets/index-B-CIYKVW.css | 1 + dist/client/assets/index-BG_gEWso.js | 296 ---------------- .../{index-zvH6W8yt.js => index-C3U0yXJT.js} | 144 ++++---- dist/client/assets/index-Ce3s5e6O.js | 334 ++++++++++++++++++ dist/client/assets/index-Cipqnmx2.css | 1 - dist/client/index.html | 4 +- dist/client/version.json | 2 +- 7 files changed, 410 insertions(+), 372 deletions(-) create mode 100644 dist/client/assets/index-B-CIYKVW.css delete mode 100644 dist/client/assets/index-BG_gEWso.js rename dist/client/assets/{index-zvH6W8yt.js => index-C3U0yXJT.js} (67%) create mode 100644 dist/client/assets/index-Ce3s5e6O.js delete mode 100644 dist/client/assets/index-Cipqnmx2.css diff --git a/dist/client/assets/index-B-CIYKVW.css b/dist/client/assets/index-B-CIYKVW.css new file mode 100644 index 0000000..a37b7ae --- /dev/null +++ b/dist/client/assets/index-B-CIYKVW.css @@ -0,0 +1 @@ +._\!container_1cqh6_1{width:100%!important;margin-right:auto!important;margin-left:auto!important;padding-right:2rem!important;padding-left:2rem!important}._container_1cqh6_1{width:100%;margin-right:auto;margin-left:auto;padding-right:2rem;padding-left:2rem}@media (min-width: 1400px){._\!container_1cqh6_1{max-width:1400px!important}._container_1cqh6_1{max-width:1400px}}._LoadingIndicator_1cqh6_4{display:flex;max-width:20rem;flex-direction:column;align-items:center;margin-left:auto;margin-right:auto;height:100%;width:100%;justify-content:center}._LoadingIndicator__title_1cqh6_9{margin-top:1.5rem;text-align:center;font-size:1.25rem;line-height:1.75rem;font-weight:600;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}._LoadingIndicator__subtitle_1cqh6_13{text-align:center;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}._LoadingIndicator__lighttext_1cqh6_17{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}._LoadingIndicator__darktext_1cqh6_21{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}:root{--react-pdf-annotation-layer: 1;--annotation-unfocused-field-background: url("data:image/svg+xml;charset=UTF-8,");--input-focus-border-color: Highlight;--input-focus-outline: 1px solid Canvas;--input-unfocused-border-color: transparent;--input-disabled-border-color: transparent;--input-hover-border-color: black;--link-outline: none}@media screen and (forced-colors: active){:root{--input-focus-border-color: CanvasText;--input-unfocused-border-color: ActiveText;--input-disabled-border-color: GrayText;--input-hover-border-color: Highlight;--link-outline: 1.5px solid LinkText}.annotationLayer .textWidgetAnnotation :is(input,textarea):required,.annotationLayer .choiceWidgetAnnotation select:required,.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input:required{outline:1.5px solid selectedItem}.annotationLayer .linkAnnotation:hover{-webkit-backdrop-filter:invert(100%);backdrop-filter:invert(100%)}}.annotationLayer{position:absolute;top:0;left:0;pointer-events:none;transform-origin:0 0;z-index:3}.annotationLayer[data-main-rotation="90"] .norotate{transform:rotate(270deg) translate(-100%)}.annotationLayer[data-main-rotation="180"] .norotate{transform:rotate(180deg) translate(-100%,-100%)}.annotationLayer[data-main-rotation="270"] .norotate{transform:rotate(90deg) translateY(-100%)}.annotationLayer canvas{position:absolute;width:100%;height:100%}.annotationLayer section{position:absolute;text-align:initial;pointer-events:auto;box-sizing:border-box;margin:0;transform-origin:0 0}.annotationLayer .linkAnnotation{outline:var(--link-outline)}.annotationLayer :is(.linkAnnotation,.buttonWidgetAnnotation.pushButton)>a{position:absolute;font-size:1em;top:0;left:0;width:100%;height:100%}.annotationLayer :is(.linkAnnotation,.buttonWidgetAnnotation.pushButton)>a:hover{opacity:.2;background:#ff0;box-shadow:0 2px 10px #ff0}.annotationLayer .textAnnotation img{position:absolute;cursor:pointer;width:100%;height:100%;top:0;left:0}.annotationLayer .textWidgetAnnotation :is(input,textarea),.annotationLayer .choiceWidgetAnnotation select,.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input{background-image:var(--annotation-unfocused-field-background);border:2px solid var(--input-unfocused-border-color);box-sizing:border-box;font:calc(9px * var(--scale-factor)) sans-serif;height:100%;margin:0;vertical-align:top;width:100%}.annotationLayer .textWidgetAnnotation :is(input,textarea):required,.annotationLayer .choiceWidgetAnnotation select:required,.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input:required{outline:1.5px solid red}.annotationLayer .choiceWidgetAnnotation select option{padding:0}.annotationLayer .buttonWidgetAnnotation.radioButton input{border-radius:50%}.annotationLayer .textWidgetAnnotation textarea{resize:none}.annotationLayer .textWidgetAnnotation :is(input,textarea)[disabled],.annotationLayer .choiceWidgetAnnotation select[disabled],.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input[disabled]{background:none;border:2px solid var(--input-disabled-border-color);cursor:not-allowed}.annotationLayer .textWidgetAnnotation :is(input,textarea):hover,.annotationLayer .choiceWidgetAnnotation select:hover,.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input:hover{border:2px solid var(--input-hover-border-color)}.annotationLayer .textWidgetAnnotation :is(input,textarea):hover,.annotationLayer .choiceWidgetAnnotation select:hover,.annotationLayer .buttonWidgetAnnotation.checkBox input:hover{border-radius:2px}.annotationLayer .textWidgetAnnotation :is(input,textarea):focus,.annotationLayer .choiceWidgetAnnotation select:focus{background:none;border:2px solid var(--input-focus-border-color);border-radius:2px;outline:var(--input-focus-outline)}.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) :focus{background-image:none;background-color:transparent}.annotationLayer .buttonWidgetAnnotation.checkBox :focus{border:2px solid var(--input-focus-border-color);border-radius:2px;outline:var(--input-focus-outline)}.annotationLayer .buttonWidgetAnnotation.radioButton :focus{border:2px solid var(--input-focus-border-color);outline:var(--input-focus-outline)}.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before,.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after,.annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before{background-color:CanvasText;content:"";display:block;position:absolute}.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before,.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after{height:80%;left:45%;width:1px}.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before{transform:rotate(45deg)}.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after{transform:rotate(-45deg)}.annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before{border-radius:50%;height:50%;left:30%;top:20%;width:50%}.annotationLayer .textWidgetAnnotation input.comb{font-family:monospace;padding-left:2px;padding-right:0}.annotationLayer .textWidgetAnnotation input.comb:focus{width:103%}.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input{-webkit-appearance:none;-moz-appearance:none;appearance:none}.annotationLayer .popupTriggerArea{height:100%;width:100%}.annotationLayer .fileAttachmentAnnotation .popupTriggerArea{position:absolute}.annotationLayer .popupWrapper{position:absolute;font-size:calc(9px * var(--scale-factor));width:100%;min-width:calc(180px * var(--scale-factor));pointer-events:none}.annotationLayer .popup{position:absolute;max-width:calc(180px * var(--scale-factor));background-color:#ff9;box-shadow:0 calc(2px * var(--scale-factor)) calc(5px * var(--scale-factor)) #888;border-radius:calc(2px * var(--scale-factor));padding:calc(6px * var(--scale-factor));margin-left:calc(5px * var(--scale-factor));cursor:pointer;font:message-box;white-space:normal;word-wrap:break-word;pointer-events:auto}.annotationLayer .popup>*{font-size:calc(9px * var(--scale-factor))}.annotationLayer .popup h1{display:inline-block}.annotationLayer .popupDate{display:inline-block;margin-left:calc(5px * var(--scale-factor))}.annotationLayer .popupContent{border-top:1px solid rgba(51,51,51,1);margin-top:calc(2px * var(--scale-factor));padding-top:calc(2px * var(--scale-factor))}.annotationLayer .richText>*{white-space:pre-wrap;font-size:calc(9px * var(--scale-factor))}.annotationLayer .highlightAnnotation,.annotationLayer .underlineAnnotation,.annotationLayer .squigglyAnnotation,.annotationLayer .strikeoutAnnotation,.annotationLayer .freeTextAnnotation,.annotationLayer .lineAnnotation svg line,.annotationLayer .squareAnnotation svg rect,.annotationLayer .circleAnnotation svg ellipse,.annotationLayer .polylineAnnotation svg polyline,.annotationLayer .polygonAnnotation svg polygon,.annotationLayer .caretAnnotation,.annotationLayer .inkAnnotation svg polyline,.annotationLayer .stampAnnotation,.annotationLayer .fileAttachmentAnnotation{cursor:pointer}.annotationLayer section svg{position:absolute;width:100%;height:100%;top:0;left:0}.annotationLayer .annotationTextContent{position:absolute;width:100%;height:100%;opacity:0;color:transparent;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none}.annotationLayer .annotationTextContent span{width:100%;display:inline-block}:root{--react-pdf-text-layer: 1;--highlight-bg-color: rgba(180, 0, 170, 1);--highlight-selected-bg-color: rgba(0, 100, 0, 1)}@media screen and (forced-colors: active){:root{--highlight-bg-color: Highlight;--highlight-selected-bg-color: ButtonText}}[data-main-rotation="90"]{transform:rotate(90deg) translateY(-100%)}[data-main-rotation="180"]{transform:rotate(180deg) translate(-100%,-100%)}[data-main-rotation="270"]{transform:rotate(270deg) translate(-100%)}.textLayer{position:absolute;text-align:initial;top:0;right:0;bottom:0;left:0;overflow:hidden;line-height:1;-webkit-text-size-adjust:none;-moz-text-size-adjust:none;text-size-adjust:none;forced-color-adjust:none;transform-origin:0 0;z-index:2}.textLayer :is(span,br){color:transparent;position:absolute;white-space:pre;cursor:text;margin:0;transform-origin:0 0}.textLayer span.markedContent{top:0;height:0}.textLayer .highlight{margin:-1px;padding:1px;background-color:var(--highlight-bg-color);border-radius:4px}.textLayer .highlight.appended{position:initial}.textLayer .highlight.begin{border-radius:4px 0 0 4px}.textLayer .highlight.end{border-radius:0 4px 4px 0}.textLayer .highlight.middle{border-radius:0}.textLayer .highlight.selected{background-color:var(--highlight-selected-bg-color)}.textLayer br::-moz-selection{background:transparent}.textLayer br::selection{background:transparent}.textLayer .endOfContent{display:block;position:absolute;top:100%;right:0;bottom:0;left:0;z-index:-1;cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none}.textLayer .endOfContent.active{top:0}.hiddenCanvasElement{position:absolute;top:0;left:0;width:0;height:0;display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,: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:Poppins,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}html{font-size:16px}:root{--background: 0 0% 100% --foreground: 240 10% 3.9% --card: 0 0% 100% --card-foreground: 240 10% 3.9% --popover: 0 0% 100% --popover-foreground: 240 10% 3.9% --primary: 346.8 77.2% 49.8% --primary-foreground: 355.7 100% 97.3% --secondary: 240 4.8% 95.9% --secondary-foreground: 240 5.9% 10% --muted: 240 4.8% 95.9% --muted-foreground: 240 3.8% 46.1% --accent: 240 4.8% 95.9% --accent-foreground: 240 5.9% 10% --destructive: 0 84.2% 60.2% --destructive-foreground: 0 0% 98% --border: 240 5.9% 90% --input: 240 5.9% 90% --ring: 346.8 77.2% 49.8% --radius: .3rem}.dark{--background: 20 14.3% 4.1% --foreground: 0 0% 95% --card: 24 9.8% 10% --card-foreground: 0 0% 95% --popover: 0 0% 9% --popover-foreground: 0 0% 95% --primary: 346.8 77.2% 49.8% --primary-foreground: 355.7 100% 97.3% --secondary: 240 3.7% 15.9% --secondary-foreground: 0 0% 98% --muted: 0 0% 15% --muted-foreground: 240 5% 64.9% --accent: 12 6.5% 15.1% --accent-foreground: 0 0% 98% --destructive: 0 62.8% 30.6% --destructive-foreground: 0 85.7% 97.3% --border: 240 3.7% 15.9% --input: 240 3.7% 15.9% --ring: 346.8 77.2% 49.8% }*{--tw-border-opacity: 1;border-color:hsl(240 5.9% 90% / var(--tw-border-opacity, 1))}body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-feature-settings:normal;font-variation-settings:normal;height:100%;--tw-bg-opacity: 1;background-color:hsl(0 0% 100% / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:hsl(240 10% 3.9% / var(--tw-text-opacity, 1));font-feature-settings:"rlig" 1,"calt" 1}#uecko{display:flex;min-height:100vh;min-width:320px;flex-direction:column}.\!container{width:100%!important;margin-right:auto!important;margin-left:auto!important;padding-right:2rem!important;padding-left:2rem!important}.container{width:100%;margin-right:auto;margin-left:auto;padding-right:2rem;padding-left:2rem}@media (min-width: 1400px){.\!container{max-width:1400px!important}.container{max-width:1400px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-0{left:0;right:0}.inset-y-0{top:0;bottom:0}.-bottom-12{bottom:-3rem}.-left-12{left:-3rem}.-left-2{left:-.5rem}.-right-1{right:-.25rem}.-right-12{right:-3rem}.-top-1{top:-.25rem}.-top-12{top:-3rem}.-top-2{top:-.5rem}.bottom-0{bottom:0}.bottom-1{bottom:.25rem}.bottom-4{bottom:1rem}.left-0{left:0}.left-1{left:.25rem}.left-1\/2{left:50%}.left-2{left:.5rem}.left-2\.5{left:.625rem}.left-4{left:1rem}.left-\[50\%\]{left:50%}.right-0{right:0}.right-1{right:.25rem}.right-2{right:.5rem}.right-4{right:1rem}.top-0{top:0}.top-1\/2{top:50%}.top-16{top:4rem}.top-2{top:.5rem}.top-2\.5{top:.625rem}.top-4{top:1rem}.top-\[1px\]{top:1px}.top-\[50\%\]{top:50%}.top-\[60\%\]{top:60%}.top-full{top:100%}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\[100\]{z-index:100}.z-\[1\]{z-index:1}.col-span-2{grid-column:span 2 / span 2}.col-span-3{grid-column:span 3 / span 3}.row-span-2{grid-row:span 2 / span 2}.m-0{margin:0}.m-auto{margin:auto}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.mx-3{margin-left:.75rem;margin-right:.75rem}.mx-auto{margin-left:auto;margin-right:auto}.my-0\.5{margin-top:.125rem;margin-bottom:.125rem}.my-1{margin-top:.25rem;margin-bottom:.25rem}.my-4{margin-top:1rem;margin-bottom:1rem}.my-6{margin-top:1.5rem;margin-bottom:1.5rem}.-mb-6{margin-bottom:-1.5rem}.-ml-3{margin-left:-.75rem}.-ml-4{margin-left:-1rem}.-ml-px{margin-left:-1px}.-mt-2{margin-top:-.5rem}.-mt-4{margin-top:-1rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml-1{margin-left:.25rem}.ml-1\.5{margin-left:.375rem}.ml-2{margin-left:.5rem}.ml-auto{margin-left:auto}.mr-0{margin-right:0}.mr-2{margin-right:.5rem}.mr-2\.5{margin-right:.625rem}.mr-4{margin-right:1rem}.mr-6{margin-right:1.5rem}.mr-auto{margin-right:auto}.mt-1{margin-top:.25rem}.mt-1\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.mt-24{margin-top:6rem}.mt-32{margin-top:8rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-auto{margin-top:auto}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.\!table{display:table!important}.table{display:table}.grid{display:grid}.\!contents{display:contents!important}.contents{display:contents}.hidden{display:none}.aspect-\[3\/4\]{aspect-ratio:3/4}.aspect-auto{aspect-ratio:auto}.aspect-square{aspect-ratio:1 / 1}.aspect-video{aspect-ratio:16 / 9}.size-6{width:1.5rem;height:1.5rem}.size-7{width:1.75rem;height:1.75rem}.h-1\.5{height:.375rem}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-16{height:4rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-24{height:6rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-40{height:10rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-96{height:24rem}.h-\[1px\]{height:1px}.h-\[200px\]{height:200px}.h-\[20px\]{height:20px}.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-screen{height:100vh}.max-h-96{max-height:24rem}.max-h-\[300px\]{max-height:300px}.max-h-\[85vh\]{max-height:85vh}.max-h-screen{max-height:100vh}.min-h-10{min-height:2.5rem}.min-h-9{min-height:2.25rem}.min-h-96{min-height:24rem}.min-h-\[100dvh\]{min-height:100dvh}.min-h-\[80px\]{min-height:80px}.min-h-\[calc\(100vh_-_theme\(spacing\.36\)\)\]{min-height:calc(100vh - 9rem)}.min-h-screen{min-height:100vh}.w-0{width:0px}.w-1{width:.25rem}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-11\/12{width:91.666667%}.w-12{width:3rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-20{width:5rem}.w-24{width:6rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-3\/4{width:75%}.w-32{width:8rem}.w-4{width:1rem}.w-40{width:10rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-6{width:1.5rem}.w-6\/12{width:50%}.w-64{width:16rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-\[100px\]{width:100px}.w-\[140px\]{width:140px}.w-\[150px\]{width:150px}.w-\[1px\]{width:1px}.w-\[200px\]{width:200px}.w-\[390px\]{width:390px}.w-\[4\.5rem\]{width:4.5rem}.w-\[400px\]{width:400px}.w-\[535px\]{width:535px}.w-\[5px\]{width:5px}.w-\[650px\]{width:650px}.w-\[70px\]{width:70px}.w-\[calc\(100\%_-_2rem\)\]{width:calc(100% - 2rem)}.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-4{min-width:1rem}.min-w-48,.min-w-\[12rem\]{min-width:12rem}.min-w-\[250px\]{min-width:250px}.min-w-\[300px\]{min-width:300px}.min-w-\[50px\]{min-width:50px}.min-w-\[8rem\]{min-width:8rem}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.max-w-32{max-width:8rem}.max-w-3xl{max-width:48rem}.max-w-6xl{max-width:72rem}.max-w-\[750px\]{max-width:750px}.max-w-\[90rem\]{max-width:90rem}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.max-w-max{max-width:-moz-max-content;max-width:max-content}.max-w-md{max-width:28rem}.max-w-none{max-width:none}.max-w-sm{max-width:24rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.grow-0{flex-grow:0}.basis-full{flex-basis:100%}.table-auto{table-layout:auto}.table-fixed{table-layout:fixed}.caption-bottom{caption-side:bottom}.border-collapse{border-collapse:collapse}.border-separate{border-collapse:separate}.border-spacing-0{--tw-border-spacing-x: 0px;--tw-border-spacing-y: 0px;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}.-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))}.-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-y-1{--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))}.-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-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))}.translate-x-2{--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-\[-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-y-1{--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))}.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))}.translate-y-\[0px\]{--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-\[2px\]{--tw-translate-y: 2px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rotate-1{--tw-rotate: -1deg;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-1{--tw-rotate: 1deg;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-2{--tw-rotate: 2deg;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))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes 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-col-resize{cursor:col-resize}.cursor-default{cursor:default}.cursor-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.select-all{-webkit-user-select:all;-moz-user-select:all;user-select:all}.resize-y{resize:vertical}.resize{resize:both}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.auto-rows-max{grid-auto-rows:max-content}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-6{grid-template-columns:repeat(6,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}.place-items-center{place-items:center}.content-center{align-content:center}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.items-stretch{align-items:stretch}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-0{gap:0px}.gap-0\.5{gap:.125rem}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-y-2{row-gap:.5rem}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-6>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1.5rem * var(--tw-space-x-reverse));margin-left:calc(1.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(2rem * var(--tw-space-x-reverse));margin-left:calc(2rem * 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-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-2\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.625rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.625rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.self-center{align-self:center}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.text-ellipsis{text-overflow:ellipsis}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.whitespace-break-spaces{white-space:break-spaces}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-\[2px\]{border-radius:2px}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.3rem}.rounded-md{border-radius:calc(.3rem - 2px)}.rounded-sm{border-radius:calc(.3rem - 4px)}.rounded-t-\[10px\]{border-top-left-radius:10px;border-top-right-radius:10px}.rounded-tl-sm{border-top-left-radius:calc(.3rem - 4px)}.border{border-width:1px}.border-0{border-width:0px}.border-2{border-width:2px}.border-\[1\.5px\]{border-width:1.5px}.border-b{border-bottom-width:1px}.border-b-0{border-bottom-width:0px}.border-l{border-left-width:1px}.border-l-4{border-left-width:4px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-t-0{border-top-width:0px}.border-dashed{border-style:dashed}.border-\[--color-border\]{border-color:var(--color-border)}.border-background{--tw-border-opacity: 1;border-color:hsl(0 0% 100% / var(--tw-border-opacity, 1))}.border-border{--tw-border-opacity: 1;border-color:hsl(240 5.9% 90% / var(--tw-border-opacity, 1))}.border-border\/50{border-color:#e4e4e780}.border-destructive{--tw-border-opacity: 1;border-color:hsl(0 84.2% 60.2% / var(--tw-border-opacity, 1))}.border-destructive\/20{border-color:#ef444433}.border-destructive\/30{border-color:#ef44444d}.border-destructive\/50{border-color:#ef444480}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.border-green-400{--tw-border-opacity: 1;border-color:rgb(74 222 128 / var(--tw-border-opacity, 1))}.border-input{--tw-border-opacity: 1;border-color:hsl(240 5.9% 90% / var(--tw-border-opacity, 1))}.border-muted-foreground\/50{border-color:#71717a80}.border-primary{--tw-border-opacity: 1;border-color:hsl(346.8 77.2% 49.8% / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.border-l-destructive{--tw-border-opacity: 1;border-left-color:hsl(0 84.2% 60.2% / var(--tw-border-opacity, 1))}.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(240 4.8% 95.9% / var(--tw-bg-opacity, 1))}.bg-background{--tw-bg-opacity: 1;background-color:hsl(0 0% 100% / var(--tw-bg-opacity, 1))}.bg-background\/85{background-color:#ffffffd9}.bg-black\/10{background-color:#0000001a}.bg-black\/80{background-color:#000c}.bg-blue-200{--tw-bg-opacity: 1;background-color:rgb(191 219 254 / var(--tw-bg-opacity, 1))}.bg-border{--tw-bg-opacity: 1;background-color:hsl(240 5.9% 90% / var(--tw-bg-opacity, 1))}.bg-card{--tw-bg-opacity: 1;background-color:hsl(0 0% 100% / var(--tw-bg-opacity, 1))}.bg-card\/90{background-color:#ffffffe6}.bg-destructive{--tw-bg-opacity: 1;background-color:hsl(0 84.2% 60.2% / var(--tw-bg-opacity, 1))}.bg-destructive\/5{background-color:#ef44440d}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.bg-green-200{--tw-bg-opacity: 1;background-color:rgb(187 247 208 / var(--tw-bg-opacity, 1))}.bg-green-300{--tw-bg-opacity: 1;background-color:rgb(134 239 172 / var(--tw-bg-opacity, 1))}.bg-muted{--tw-bg-opacity: 1;background-color:hsl(240 4.8% 95.9% / var(--tw-bg-opacity, 1))}.bg-muted-foreground\/30{background-color:#71717a4d}.bg-muted\/20{background-color:#f4f4f533}.bg-muted\/30{background-color:#f4f4f54d}.bg-muted\/40{background-color:#f4f4f566}.bg-muted\/50{background-color:#f4f4f580}.bg-muted\/60{background-color:#f4f4f599}.bg-popover{--tw-bg-opacity: 1;background-color:hsl(0 0% 100% / var(--tw-bg-opacity, 1))}.bg-primary{--tw-bg-opacity: 1;background-color:hsl(346.8 77.2% 49.8% / var(--tw-bg-opacity, 1))}.bg-purple-200{--tw-bg-opacity: 1;background-color:rgb(233 213 255 / var(--tw-bg-opacity, 1))}.bg-red-200{--tw-bg-opacity: 1;background-color:rgb(254 202 202 / var(--tw-bg-opacity, 1))}.bg-secondary{--tw-bg-opacity: 1;background-color:hsl(240 4.8% 95.9% / var(--tw-bg-opacity, 1))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-yellow-200{--tw-bg-opacity: 1;background-color:rgb(254 240 138 / var(--tw-bg-opacity, 1))}.bg-zinc-700{--tw-bg-opacity: 1;background-color:rgb(63 63 70 / var(--tw-bg-opacity, 1))}.fill-current{fill:currentColor}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.p-\[1px\]{padding:1px}.px-0{padding-left:0;padding-right:0}.px-1{padding-left:.25rem;padding-right:.25rem}.px-10{padding-left:2.5rem;padding-right:2.5rem}.px-12{padding-left:3rem;padding-right:3rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0{padding-top:0;padding-bottom:0}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.pb-0{padding-bottom:0}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pl-2\.5{padding-left:.625rem}.pl-3{padding-left:.75rem}.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-5{padding-right:1.25rem}.pr-8{padding-right:2rem}.pt-0{padding-top:0}.pt-1{padding-top:.25rem}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-\[0\.8rem\]{font-size:.8rem}.text-\[10px\]{font-size:10px}.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}.capitalize{text-transform:capitalize}.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-loose{line-height:2}.leading-none{line-height:1}.leading-normal{line-height:1.5}.leading-relaxed{line-height:1.625}.leading-tight{line-height:1.25}.tracking-normal{letter-spacing:0em}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-widest{letter-spacing:.1em}.text-accent-foreground{--tw-text-opacity: 1;color:hsl(240 5.9% 10% / var(--tw-text-opacity, 1))}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.text-card-foreground{--tw-text-opacity: 1;color:hsl(240 10% 3.9% / var(--tw-text-opacity, 1))}.text-current{color:currentColor}.text-destructive{--tw-text-opacity: 1;color:hsl(0 84.2% 60.2% / var(--tw-text-opacity, 1))}.text-destructive-foreground{--tw-text-opacity: 1;color:hsl(0 0% 98% / var(--tw-text-opacity, 1))}.text-foreground{--tw-text-opacity: 1;color:hsl(240 10% 3.9% / var(--tw-text-opacity, 1))}.text-foreground\/50{color:#09090b80}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-green-700{--tw-text-opacity: 1;color:rgb(21 128 61 / var(--tw-text-opacity, 1))}.text-green-800{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity, 1))}.text-input{--tw-text-opacity: 1;color:hsl(240 5.9% 90% / var(--tw-text-opacity, 1))}.text-muted-foreground{--tw-text-opacity: 1;color:hsl(240 3.8% 46.1% / var(--tw-text-opacity, 1))}.text-muted-foreground\/30{color:#71717a4d}.text-muted-foreground\/50{color:#71717a80}.text-muted-foreground\/70{color:#71717ab3}.text-popover-foreground{--tw-text-opacity: 1;color:hsl(240 10% 3.9% / var(--tw-text-opacity, 1))}.text-primary{--tw-text-opacity: 1;color:hsl(346.8 77.2% 49.8% / var(--tw-text-opacity, 1))}.text-primary-foreground{--tw-text-opacity: 1;color:hsl(355.7 100% 97.3% / var(--tw-text-opacity, 1))}.text-purple-700{--tw-text-opacity: 1;color:rgb(126 34 206 / var(--tw-text-opacity, 1))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.text-ring{--tw-text-opacity: 1;color:hsl(346.8 77.2% 49.8% / var(--tw-text-opacity, 1))}.text-secondary-foreground{--tw-text-opacity: 1;color:hsl(240 5.9% 10% / var(--tw-text-opacity, 1))}.text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity, 1))}.text-slate-900{--tw-text-opacity: 1;color:rgb(15 23 42 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.text-yellow-700{--tw-text-opacity: 1;color:rgb(161 98 7 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.accent-current{accent-color:currentColor}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-25{opacity:.25}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.opacity-90{opacity:.9}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-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)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-offset-background{--tw-ring-offset-color: hsl(0, 0%, 100%)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-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-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-1000{transition-duration:1s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.fade-in-0{--tw-enter-opacity: 0}.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}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.ease-out{animation-timing-function:cubic-bezier(0,0,.2,1)}.running{animation-play-state:running}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.placeholder\:text-muted-foreground::-moz-placeholder{--tw-text-opacity: 1;color:hsl(240 3.8% 46.1% / var(--tw-text-opacity, 1))}.placeholder\:text-muted-foreground::placeholder{--tw-text-opacity: 1;color:hsl(240 3.8% 46.1% / var(--tw-text-opacity, 1))}.placeholder\:text-muted-foreground\/75::-moz-placeholder{color:#71717abf}.placeholder\:text-muted-foreground\/75::placeholder{color:#71717abf}.after\:absolute:after{content:var(--tw-content);position:absolute}.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\:w-1:after{content:var(--tw-content);width:.25rem}.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))}.focus-within\:relative:focus-within{position:relative}.focus-within\:z-20:focus-within{z-index:20}.focus-within\:bg-accent:focus-within{--tw-bg-opacity: 1;background-color:hsl(240 4.8% 95.9% / var(--tw-bg-opacity, 1))}.focus-within\:bg-destructive\/5:focus-within{background-color:#ef44440d}.hover\:border-input:hover{--tw-border-opacity: 1;border-color:hsl(240 5.9% 90% / var(--tw-border-opacity, 1))}.hover\:bg-accent:hover{--tw-bg-opacity: 1;background-color:hsl(240 4.8% 95.9% / var(--tw-bg-opacity, 1))}.hover\:bg-background:hover{--tw-bg-opacity: 1;background-color:hsl(0 0% 100% / var(--tw-bg-opacity, 1))}.hover\:bg-blue-300:hover{--tw-bg-opacity: 1;background-color:rgb(147 197 253 / var(--tw-bg-opacity, 1))}.hover\:bg-card:hover{--tw-bg-opacity: 1;background-color:hsl(0 0% 100% / var(--tw-bg-opacity, 1))}.hover\:bg-destructive\/10:hover{background-color:#ef44441a}.hover\:bg-destructive\/5:hover{background-color:#ef44440d}.hover\:bg-destructive\/80:hover{background-color:#ef4444cc}.hover\:bg-destructive\/90:hover{background-color:#ef4444e6}.hover\:bg-gray-300:hover{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity, 1))}.hover\:bg-green-100:hover{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.hover\:bg-green-300:hover{--tw-bg-opacity: 1;background-color:rgb(134 239 172 / var(--tw-bg-opacity, 1))}.hover\:bg-muted:hover{--tw-bg-opacity: 1;background-color:hsl(240 4.8% 95.9% / var(--tw-bg-opacity, 1))}.hover\:bg-muted\/30:hover{background-color:#f4f4f54d}.hover\:bg-muted\/50:hover{background-color:#f4f4f580}.hover\:bg-muted\/60:hover{background-color:#f4f4f599}.hover\:bg-primary:hover{--tw-bg-opacity: 1;background-color:hsl(346.8 77.2% 49.8% / var(--tw-bg-opacity, 1))}.hover\:bg-primary\/80:hover{background-color:#e11d48cc}.hover\:bg-primary\/90:hover{background-color:#e11d48e6}.hover\:bg-purple-300:hover{--tw-bg-opacity: 1;background-color:rgb(216 180 254 / var(--tw-bg-opacity, 1))}.hover\:bg-red-300:hover{--tw-bg-opacity: 1;background-color:rgb(252 165 165 / var(--tw-bg-opacity, 1))}.hover\:bg-secondary:hover{--tw-bg-opacity: 1;background-color:hsl(240 4.8% 95.9% / var(--tw-bg-opacity, 1))}.hover\:bg-secondary\/80:hover{background-color:#f4f4f5cc}.hover\:bg-transparent:hover{background-color:transparent}.hover\:bg-white:hover{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.hover\:bg-yellow-300:hover{--tw-bg-opacity: 1;background-color:rgb(253 224 71 / var(--tw-bg-opacity, 1))}.hover\:bg-zinc-700:hover{--tw-bg-opacity: 1;background-color:rgb(63 63 70 / var(--tw-bg-opacity, 1))}.hover\:text-accent-foreground:hover{--tw-text-opacity: 1;color:hsl(240 5.9% 10% / var(--tw-text-opacity, 1))}.hover\:text-blue-900:hover{--tw-text-opacity: 1;color:rgb(30 58 138 / var(--tw-text-opacity, 1))}.hover\:text-destructive:hover{--tw-text-opacity: 1;color:hsl(0 84.2% 60.2% / var(--tw-text-opacity, 1))}.hover\:text-foreground:hover{--tw-text-opacity: 1;color:hsl(240 10% 3.9% / var(--tw-text-opacity, 1))}.hover\:text-gray-900:hover{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.hover\:text-green-800:hover{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity, 1))}.hover\:text-green-900:hover{--tw-text-opacity: 1;color:rgb(20 83 45 / var(--tw-text-opacity, 1))}.hover\:text-muted-foreground:hover{--tw-text-opacity: 1;color:hsl(240 3.8% 46.1% / var(--tw-text-opacity, 1))}.hover\:text-primary:hover{--tw-text-opacity: 1;color:hsl(346.8 77.2% 49.8% / var(--tw-text-opacity, 1))}.hover\:text-primary-foreground:hover{--tw-text-opacity: 1;color:hsl(355.7 100% 97.3% / var(--tw-text-opacity, 1))}.hover\:text-purple-900:hover{--tw-text-opacity: 1;color:rgb(88 28 135 / var(--tw-text-opacity, 1))}.hover\:text-red-900:hover{--tw-text-opacity: 1;color:rgb(127 29 29 / var(--tw-text-opacity, 1))}.hover\:text-yellow-900:hover{--tw-text-opacity: 1;color:rgb(113 63 18 / var(--tw-text-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:focus-within\:bg-accent:focus-within:hover{--tw-bg-opacity: 1;background-color:hsl(240 4.8% 95.9% / var(--tw-bg-opacity, 1))}.focus\:bg-accent:focus{--tw-bg-opacity: 1;background-color:hsl(240 4.8% 95.9% / var(--tw-bg-opacity, 1))}.focus\:bg-primary:focus{--tw-bg-opacity: 1;background-color:hsl(346.8 77.2% 49.8% / var(--tw-bg-opacity, 1))}.focus\:text-accent-foreground:focus{--tw-text-opacity: 1;color:hsl(240 5.9% 10% / var(--tw-text-opacity, 1))}.focus\:text-primary-foreground:focus{--tw-text-opacity: 1;color:hsl(355.7 100% 97.3% / 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-primary:focus{--tw-ring-opacity: 1;--tw-ring-color: hsl(346.8 77.2% 49.8% / var(--tw-ring-opacity, 1))}.focus\:ring-ring:focus{--tw-ring-opacity: 1;--tw-ring-color: hsl(346.8 77.2% 49.8% / var(--tw-ring-opacity, 1))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:border:focus-visible{border-width:1px}.focus-visible\:border-input:focus-visible{--tw-border-opacity: 1;border-color:hsl(240 5.9% 90% / var(--tw-border-opacity, 1))}.focus-visible\:bg-background:focus-visible{--tw-bg-opacity: 1;background-color:hsl(0 0% 100% / var(--tw-bg-opacity, 1))}.focus-visible\:opacity-100:focus-visible{opacity:1}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-0: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(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)}.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-destructive:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: hsl(0 84.2% 60.2% / var(--tw-ring-opacity, 1))}.focus-visible\:ring-ring:focus-visible{--tw-ring-opacity: 1;--tw-ring-color: hsl(346.8 77.2% 49.8% / var(--tw-ring-opacity, 1))}.focus-visible\:ring-offset-0:focus-visible{--tw-ring-offset-width: 0px}.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(0, 0%, 100%)}.active\:cursor-grabbing:active{cursor:grabbing}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:text-secondary-foreground:disabled{--tw-text-opacity: 1;color:hsl(240 5.9% 10% / var(--tw-text-opacity, 1))}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:underline{text-decoration-line:underline}.group\/chapter:hover .group-hover\/chapter\:opacity-100,.group\/detail:hover .group-hover\/detail\:opacity-100,.group:hover .group-hover\:opacity-100{opacity:1}.group.destructive .group-\[\.destructive\]\:border-muted\/40{border-color:#f4f4f566}.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:#ef44444d}.group.destructive .group-\[\.destructive\]\:hover\:bg-destructive:hover{--tw-bg-opacity: 1;background-color:hsl(0 84.2% 60.2% / var(--tw-bg-opacity, 1))}.group.destructive .group-\[\.destructive\]\:hover\:text-destructive-foreground:hover{--tw-text-opacity: 1;color:hsl(0 0% 98% / 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(0 84.2% 60.2% / 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:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7}.aria-selected\:bg-accent[aria-selected=true]{--tw-bg-opacity: 1;background-color:hsl(240 4.8% 95.9% / var(--tw-bg-opacity, 1))}.aria-selected\:bg-accent\/50[aria-selected=true]{background-color:#f4f4f580}.aria-selected\:text-accent-foreground[aria-selected=true]{--tw-text-opacity: 1;color:hsl(240 5.9% 10% / var(--tw-text-opacity, 1))}.aria-selected\:text-muted-foreground[aria-selected=true]{--tw-text-opacity: 1;color:hsl(240 3.8% 46.1% / var(--tw-text-opacity, 1))}.aria-selected\:opacity-100[aria-selected=true]{opacity:1}.aria-selected\:opacity-30[aria-selected=true]{opacity:.3}.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\]\:bg-accent\/50[data-active]{background-color:#f4f4f580}.data-\[state\=active\]\:bg-background[data-state=active]{--tw-bg-opacity: 1;background-color:hsl(0 0% 100% / var(--tw-bg-opacity, 1))}.data-\[state\=checked\]\:bg-primary[data-state=checked]{--tw-bg-opacity: 1;background-color:hsl(346.8 77.2% 49.8% / 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(240 4.8% 95.9% / var(--tw-bg-opacity, 1))}.data-\[state\=open\]\:bg-accent\/50[data-state=open]{background-color:#f4f4f580}.data-\[state\=open\]\:bg-secondary[data-state=open],.data-\[state\=selected\]\:bg-muted[data-state=selected]{--tw-bg-opacity: 1;background-color:hsl(240 4.8% 95.9% / var(--tw-bg-opacity, 1))}.data-\[state\=unchecked\]\:bg-input[data-state=unchecked]{--tw-bg-opacity: 1;background-color:hsl(240 5.9% 90% / var(--tw-bg-opacity, 1))}.data-\[state\=active\]\:text-foreground[data-state=active]{--tw-text-opacity: 1;color:hsl(240 10% 3.9% / var(--tw-text-opacity, 1))}.data-\[state\=checked\]\:text-primary-foreground[data-state=checked]{--tw-text-opacity: 1;color:hsl(355.7 100% 97.3% / 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(240 5.9% 10% / var(--tw-text-opacity, 1))}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{--tw-text-opacity: 1;color:hsl(240 3.8% 46.1% / var(--tw-text-opacity, 1))}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[state\=checked\]\:opacity-100[data-state=checked]{opacity:1}.data-\[state\=active\]\:shadow[data-state=active]{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.data-\[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],.data-\[state\=closed\]\:slide-out-to-bottom-full[data-state=closed]{--tw-exit-translate-y: 100%}.data-\[state\=closed\]\:slide-out-to-left[data-state=closed]{--tw-exit-translate-x: -100%}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x: -50%}.data-\[state\=closed\]\:slide-out-to-right[data-state=closed]{--tw-exit-translate-x: 100%}.data-\[state\=closed\]\:slide-out-to-top[data-state=closed]{--tw-exit-translate-y: -100%}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-bottom[data-state=open]{--tw-enter-translate-y: 100%}.data-\[state\=open\]\:slide-in-from-left[data-state=open]{--tw-enter-translate-x: -100%}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x: -50%}.data-\[state\=open\]\:slide-in-from-right[data-state=open]{--tw-enter-translate-x: 100%}.data-\[state\=open\]\:slide-in-from-top[data-state=open]{--tw-enter-translate-y: -100%}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y: -48%}.data-\[state\=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))}.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))}@media (prefers-reduced-motion: reduce){.motion-reduce\:transition-none{transition-property:none}}.dark\:border-destructive:is(.dark *){--tw-border-opacity: 1;border-color:hsl(0 84.2% 60.2% / var(--tw-border-opacity, 1))}.dark\:brightness-\[0\.2\]:is(.dark *){--tw-brightness: brightness(.2);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)}.dark\:grayscale:is(.dark *){--tw-grayscale: grayscale(100%);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)}@media (min-width: 640px){.sm\: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}.sm\:not-sr-only{position:static;width:auto;height:auto;padding:0;margin:0;overflow:visible;clip:auto;white-space:normal}.sm\:bottom-0{bottom:0}.sm\:left-0{left:0}.sm\:right-0{right:0}.sm\:top-auto{top:auto}.sm\:mb-0{margin-bottom:0}.sm\:ml-0{margin-left:0}.sm\:mr-2{margin-right:.5rem}.sm\:mt-0{margin-top:0}.sm\:block{display:block}.sm\:flex{display:flex}.sm\:hidden{display:none}.sm\:w-\[300px\]{width:300px}.sm\:w-auto{width:auto}.sm\:max-w-\[425px\]{max-width:425px}.sm\:max-w-md{max-width:28rem}.sm\:max-w-sm{max-width:24rem}.sm\:max-w-xl{max-width:36rem}.sm\:grow-0{flex-grow:0}.sm\:flex-row{flex-direction:row}.sm\:flex-col{flex-direction:column}.sm\:flex-nowrap{flex-wrap:nowrap}.sm\:items-center{align-items:center}.sm\:justify-end{justify-content:flex-end}.sm\:gap-2\.5{gap:.625rem}.sm\:gap-6{gap:1.5rem}.sm\:gap-8{gap:2rem}.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:.3rem}.sm\:p-8{padding:2rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:py-0{padding-top:0;padding-bottom:0}.sm\:text-left{text-align:left}.sm\:text-4xl{font-size:2.25rem;line-height:2.5rem}.data-\[state\=open\]\:sm\:slide-in-from-bottom-full[data-state=open]{--tw-enter-translate-y: 100%}}@media (min-width: 768px){.md\:not-sr-only{position:static;width:auto;height:auto;padding:0;margin:0;overflow:visible;clip:auto;white-space:normal}.md\:absolute{position:absolute}.md\:col-span-2{grid-column:span 2 / span 2}.md\:col-span-3{grid-column:span 3 / span 3}.md\:col-span-4{grid-column:span 4 / span 4}.md\:col-span-6{grid-column:span 6 / span 6}.md\:ml-4{margin-left:1rem}.md\:ml-auto{margin-left:auto}.md\:mr-2{margin-right:.5rem}.md\:block{display:block}.md\:inline{display:inline}.md\:flex{display:flex}.md\:hidden{display:none}.md\:w-9\/12{width:75%}.md\:w-\[200px\]{width:200px}.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-12{grid-template-columns:repeat(12,minmax(0,1fr))}.md\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.md\:grid-cols-\[180px_1fr\]{grid-template-columns:180px 1fr}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}.md\:gap-2{gap:.5rem}.md\:gap-8{gap:2rem}.md\:whitespace-nowrap{white-space:nowrap}.md\:p-10{padding:2.5rem}.md\:p-8{padding:2rem}.md\:px-6{padding-left:1.5rem;padding-right:1.5rem}.md\:py-12{padding-top:3rem;padding-bottom:3rem}.md\:text-2xl{font-size:1.5rem;line-height:2rem}.md\:text-3xl{font-size:1.875rem;line-height:2.25rem}.md\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 1024px){.lg\:col-span-2{grid-column:span 2 / span 2}.lg\:block{display:block}.lg\:flex{display:flex}.lg\:grid{display:grid}.lg\:hidden{display:none}.lg\:min-h-\[600px\]{min-height:600px}.lg\:w-10\/12{width:83.333333%}.lg\:w-60{width:15rem}.lg\:w-\[300px\]{width:300px}.lg\:max-w-5xl{max-width:64rem}.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-\[250px_1fr\]{grid-template-columns:250px 1fr}.lg\:gap-4{gap:1rem}.lg\:gap-8{gap:2rem}.lg\:space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(2rem * var(--tw-space-x-reverse));margin-left:calc(2rem * calc(1 - var(--tw-space-x-reverse)))}.lg\:px-3{padding-left:.75rem;padding-right:.75rem}.lg\:px-8{padding-left:2rem;padding-right:2rem}}@media (min-width: 1280px){.xl\:not-sr-only{position:static;width:auto;height:auto;padding:0;margin:0;overflow:visible;clip:auto;white-space:normal}.xl\:ml-auto{margin-left:auto}.xl\:block{display:block}.xl\:hidden{display:none}.xl\:min-h-\[800px\]{min-height:800px}.xl\:w-\[550px\]{width:550px}.xl\:w-auto{width:auto}.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.xl\:flex-row{flex-direction:row}.xl\:whitespace-nowrap{white-space:nowrap}.xl\:border-t-0{border-top-width:0px}.xl\:pt-0{padding-top:0}}@media (min-width: 1536px){.\32xl\:block{display:block}.\32xl\:hidden{display:none}.\32xl\:w-\[750px\]{width:750px}}.\[\&\:has\(\[aria-selected\]\)\]\:bg-accent:has([aria-selected]){--tw-bg-opacity: 1;background-color:hsl(240 4.8% 95.9% / var(--tw-bg-opacity, 1))}.first\:\[\&\:has\(\[aria-selected\]\)\]\:rounded-l-md:has([aria-selected]):first-child{border-top-left-radius:calc(.3rem - 2px);border-bottom-left-radius:calc(.3rem - 2px)}.last\:\[\&\:has\(\[aria-selected\]\)\]\:rounded-r-md:has([aria-selected]):last-child{border-top-right-radius:calc(.3rem - 2px);border-bottom-right-radius:calc(.3rem - 2px)}.\[\&\:has\(\[aria-selected\]\.day-outside\)\]\:bg-accent\/50:has([aria-selected].day-outside){background-color:#f4f4f580}.\[\&\:has\(\[aria-selected\]\.day-range-end\)\]\:rounded-r-md:has([aria-selected].day-range-end){border-top-right-radius:calc(.3rem - 2px);border-bottom-right-radius:calc(.3rem - 2px)}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\&\>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-3\.5>svg{width:.875rem;height:.875rem}.\[\&\>svg\]\:h-2\.5>svg{height:.625rem}.\[\&\>svg\]\:h-3>svg{height:.75rem}.\[\&\>svg\]\:w-2\.5>svg{width:.625rem}.\[\&\>svg\]\:w-3>svg{width:.75rem}.\[\&\>svg\]\:text-destructive>svg{--tw-text-opacity: 1;color:hsl(0 84.2% 60.2% / var(--tw-text-opacity, 1))}.\[\&\>svg\]\:text-foreground>svg{--tw-text-opacity: 1;color:hsl(240 10% 3.9% / var(--tw-text-opacity, 1))}.\[\&\>svg\]\:text-muted-foreground>svg{--tw-text-opacity: 1;color:hsl(240 3.8% 46.1% / var(--tw-text-opacity, 1))}.\[\&\>svg\~\*\]\:pl-7>svg~*{padding-left:1.75rem}.\[\&\>td\:first-child\]\:rounded-bl-md>td:first-child{border-bottom-left-radius:calc(.3rem - 2px)}.\[\&\>td\:first-child\]\:rounded-tl-md>td:first-child{border-top-left-radius:calc(.3rem - 2px)}.\[\&\>td\:last-child\]\:rounded-br-md>td:last-child{border-bottom-right-radius:calc(.3rem - 2px)}.\[\&\>td\:last-child\]\:rounded-tr-md>td:last-child{border-top-right-radius:calc(.3rem - 2px)}.\[\&\>td\]\:border-t>td{border-top-width:1px}.\[\&\>td\]\:border-t-2>td{border-top-width:2px}.\[\&\>td\]\:py-3>td{padding-top:.75rem;padding-bottom:.75rem}.\[\&\>tr\:not\(\[data-chapter-gap\]\)\:not\(\[data-active-item\]\)\>\:first-child\]\:border-l>tr:not([data-chapter-gap]):not([data-active-item])>:first-child{border-left-width:1px}.\[\&\>tr\:not\(\[data-chapter-gap\]\)\:not\(\[data-active-item\]\)\>\:first-child\]\:border-l-border>tr:not([data-chapter-gap]):not([data-active-item])>:first-child{--tw-border-opacity: 1;border-left-color:hsl(240 5.9% 90% / var(--tw-border-opacity, 1))}.\[\&\>tr\:not\(\[data-chapter-gap\]\)\:not\(\[data-active-item\]\)\>\:last-child\]\:border-r>tr:not([data-chapter-gap]):not([data-active-item])>:last-child{border-right-width:1px}.\[\&\>tr\:not\(\[data-chapter-gap\]\)\:not\(\[data-active-item\]\)\>\:last-child\]\:border-r-border>tr:not([data-chapter-gap]):not([data-active-item])>:last-child{--tw-border-opacity: 1;border-right-color:hsl(240 5.9% 90% / var(--tw-border-opacity, 1))}.\[\&\>tr\:not\(\[data-chapter-gap\]\)\:not\(\[data-active-item\]\)\>td\]\:border-b>tr:not([data-chapter-gap]):not([data-active-item])>td{border-bottom-width:1px}.\[\&\>tr\:not\(\[data-chapter-gap\]\)\:not\(\[data-active-item\]\)\>td\]\:border-b-border>tr:not([data-chapter-gap]):not([data-active-item])>td{--tw-border-opacity: 1;border-bottom-color:hsl(240 5.9% 90% / var(--tw-border-opacity, 1))}.\[\&\>tr\[data-active-item\=actions\]\>td\]\:border-b>tr[data-active-item=actions]>td{border-bottom-width:1px}.\[\&\>tr\[data-active-item\=detail\]\>td\]\:border-b-0>tr[data-active-item=detail]>td{border-bottom-width:0px}.\[\&\>tr\[data-active-item\=detail\]\>td\]\:border-t>tr[data-active-item=detail]>td{border-top-width:1px}.\[\&\>tr\[data-active-item\]\>td\:first-child\]\:border-l-4>tr[data-active-item]>td:first-child{border-left-width:4px}.\[\&\>tr\[data-active-item\]\>td\:first-child\]\:border-l-destructive>tr[data-active-item]>td:first-child{--tw-border-opacity: 1;border-left-color:hsl(0 84.2% 60.2% / var(--tw-border-opacity, 1))}.\[\&\>tr\[data-active-item\]\>td\:last-child\]\:border-r>tr[data-active-item]>td:last-child{border-right-width:1px}.\[\&\>tr\[data-active-item\]\>td\]\:border-destructive\/30>tr[data-active-item]>td{border-color:#ef44444d}.\[\&\>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:#71717a}.\[\&_\.recharts-cartesian-grid_line\[stroke\=\'\#ccc\'\]\]\:stroke-border\/50 .recharts-cartesian-grid line[stroke="#ccc"]{stroke:#e4e4e780}.\[\&_\.recharts-curve\.recharts-tooltip-cursor\]\:stroke-border .recharts-curve.recharts-tooltip-cursor{stroke:#e4e4e7}.\[\&_\.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:#e4e4e7}.\[\&_\.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:#f4f4f5}.\[\&_\.recharts-reference-line_\[stroke\=\'\#ccc\'\]\]\:stroke-border .recharts-reference-line [stroke="#ccc"]{stroke:#e4e4e7}.\[\&_\.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(240 3.8% 46.1% / 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\]\:invisible svg{visibility:hidden}.\[\&_svg\]\:h-6 svg{height:1.5rem}.\[\&_svg\]\:w-6 svg{width:1.5rem}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-width:0px}.\[\&_tr\]\:border-b tr{border-bottom-width:1px}@media (hover:none){.\[\@media\(hover\:none\)\]\:opacity-100{opacity:1}} diff --git a/dist/client/assets/index-BG_gEWso.js b/dist/client/assets/index-BG_gEWso.js deleted file mode 100644 index 1e6d56c..0000000 --- a/dist/client/assets/index-BG_gEWso.js +++ /dev/null @@ -1,296 +0,0 @@ -var Ov=Object.defineProperty;var Pv=(n,o,r)=>o in n?Ov(n,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[o]=r;var je=(n,o,r)=>Pv(n,typeof o!="symbol"?o+"":o,r);import{u as Fc,a as rn,b as Ut,c as qn,d as Ee,j as i,P as qv,e as kv,f as pe,g as $v,N as as,R as qe,J as At,h as ke,i as fr,D as gr,l as Ba,M as Ot,V as Uv,r as M,k as Dc,m as Tc,n as pr,o as Mc,B as H,C as Bv,p as xr,q as _r,s as vr,S as mo,t as br,v as es,w,x as ho,y as os,z as ls,A as us,E as Wr,F as po,G as kn,H as $n,I as Un,K as Bn,L as Vv,O as Vt,Q as zv,T as Gv,U as Hv,W as st,X as Oe,Y as dt,Z as Ve,_ as We,$ as Pe,a0 as bn,a1 as xo,a2 as Kv,a3 as _o,a4 as wn,a5 as vo,a6 as bo,a7 as Xr,a8 as Et,a9 as Lc,aa as Wv,ab as ts,ac as Gn,ad as wo,ae as So,af as On,ag as Co,ah as Oc,ai as jo,aj as yo,ak as No,al as cs,am as Qv,an as Ln,ao as xc,ap as Yv,aq as Xv,ar as Zv,as as Ro,at as _n,au as Gt,av as jn,aw as ds,ax as Pc,ay as Jv,az as qc,aA as e0,aB as ae,aC as fs,aD as to,aE as kc,aF as $c,aG as Uc,aH as Vn,aI as Bc,aJ as gs,aK as ei,aL as ti,aM as ni,aN as Zr,aO as t0,aP as Vc,aQ as Qe,aR as Ye,aS as no,aT as Xe,aU as mr,aV as wr,aW as hr,aX as n0,aY as r0,aZ as i0,a_ as ro,a$ as s0,b0 as a0,b1 as ur,b2 as zc,b3 as ns,b4 as Gc,b5 as zn,b6 as Jr,b7 as Bt,b8 as o0,b9 as hn,ba as ms,bb as Hc,bc as l0,bd as hs,be as u0,bf as Kc,bg as Wc,bh as Qc,bi as Yc,bj as Xc,bk as Zc,bl as Jc,bm as ed,bn as td,bo as c0,bp as Qi,bq as d0,br as f0,bs as g0,bt as m0,bu as h0,bv as p0,bw as x0,bx as _0,by as v0,bz as b0,bA as w0,bB as _c,bC as nd,bD as rd,bE as id,bF as sd,bG as ad,bH as od,bI as ld,bJ as S0,bK as Va,bL as Qr,bM as C0,bN as ud,bO as j0,bP as y0,bQ as cd,bR as dd,bS as io,bT as so,bU as N0,bV as R0,bW as E0}from"./index-zvH6W8yt.js";const A0=n=>{const{onSuccess:o,...r}=n||{},a=qn(),{login:l}=Fc(),c=rn();return Ut({mutationKey:a().auth().action("login").get(),mutationFn:l,onSuccess:async(d,m,p)=>{d.success&&c.removeQueries({queryKey:a().auth().get()}),await(o==null?void 0:o(d,m,p))},...r})};/** - * @license lucide-react v0.427.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const fd=Ee("Archive",[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]);/** - * @license lucide-react v0.427.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const I0=Ee("ArrowDownUp",[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"m21 8-4-4-4 4",key:"1c9v7m"}],["path",{d:"M17 4v16",key:"7dpous"}]]);/** - * @license lucide-react v0.427.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const vc=Ee("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/** - * @license lucide-react v0.427.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const bc=Ee("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/** - * @license lucide-react v0.427.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const F0=Ee("ChevronsLeft",[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]]);/** - * @license lucide-react v0.427.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const D0=Ee("ChevronsRight",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]);/** - * @license lucide-react v0.427.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const gd=Ee("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.427.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const T0=Ee("CirclePlus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);/** - * @license lucide-react v0.427.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const M0=Ee("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/** - * @license lucide-react v0.427.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const L0=Ee("CopyPlus",[["line",{x1:"15",x2:"15",y1:"12",y2:"18",key:"1p7wdc"}],["line",{x1:"12",x2:"18",y1:"15",y2:"15",key:"1nscbv"}],["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** - * @license lucide-react v0.427.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Eo=Ee("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** - * @license lucide-react v0.427.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const md=Ee("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/** - * @license lucide-react v0.427.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const O0=Ee("EllipsisVertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);/** - * @license lucide-react v0.427.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const hd=Ee("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/** - * @license lucide-react v0.427.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const P0=Ee("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** - * @license lucide-react v0.427.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const q0=Ee("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/** - * @license lucide-react v0.427.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const pd=Ee("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/** - * @license lucide-react v0.427.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const k0=Ee("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** - * @license lucide-react v0.427.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ao=Ee("PackagePlus",[["path",{d:"M16 16h6",key:"100bgy"}],["path",{d:"M19 13v6",key:"85cyf1"}],["path",{d:"M21 10V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l2-1.14",key:"e7tb2h"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["line",{x1:"12",x2:"12",y1:"22",y2:"12",key:"a4e8g8"}]]);/** - * @license lucide-react v0.427.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Io=Ee("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** - * @license lucide-react v0.427.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const $0=Ee("Scan",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}]]);/** - * @license lucide-react v0.427.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const U0=Ee("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]);/** - * @license lucide-react v0.427.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const B0=Ee("Settings2",[["path",{d:"M20 7h-9",key:"3s1dr2"}],["path",{d:"M14 17H5",key:"gfn3mx"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);/** - * @license lucide-react v0.427.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const xd=Ee("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/** - * @license lucide-react v0.427.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const _d=Ee("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),V0=({className:n,...o})=>i.jsx(kv,{className:pe("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",n),...o}),wc=qv,z0=({withHandle:n,className:o,...r})=>i.jsx($v,{className:pe("relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",o),...r,children:n&&i.jsx("div",{className:"z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border",children:i.jsx(pd,{className:"h-2.5 w-2.5"})})});function ct({className:n,...o}){return i.jsx("div",{className:pe("animate-pulse rounded-md bg-muted",n),...o})}const G0=n=>typeof n=="object"&&n!==null&&n.hasOwnProperty("total_items");let Yi;const H0=new Uint8Array(16);function K0(){if(!Yi&&(Yi=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Yi))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Yi(H0)}const Ke=[];for(let n=0;n<256;++n)Ke.push((n+256).toString(16).slice(1));function W0(n,o=0){return Ke[n[o+0]]+Ke[n[o+1]]+Ke[n[o+2]]+Ke[n[o+3]]+"-"+Ke[n[o+4]]+Ke[n[o+5]]+"-"+Ke[n[o+6]]+Ke[n[o+7]]+"-"+Ke[n[o+8]]+Ke[n[o+9]]+"-"+Ke[n[o+10]]+Ke[n[o+11]]+Ke[n[o+12]]+Ke[n[o+13]]+Ke[n[o+14]]+Ke[n[o+15]]}const Q0=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Sc={randomUUID:Q0};function Y0(n,o,r){if(Sc.randomUUID&&!n)return Sc.randomUUID();n=n||{};const a=n.random||(n.rng||K0)();return a[6]=a[6]&15|64,a[8]=a[8]&63|128,W0(a)}class pn extends as{static validate(o,r){const a=qe.RULE_ALLOW_EMPTY.default(""),l=At.string().guid({version:["uuidv4"]}).label(r.label?r.label:"id"),c=At.alternatives(a,l);return qe.validate(c,o)}static sanitize(o){return o.trim()}static create(o,r={}){const a={label:"id",generateOnEmpty:!1,...r};if(!o&&!a.generateOnEmpty)return ke.fail(fr(gr.INVALID_INPUT_DATA,"ID is null or empty"));if(o){const l=pn.validate(o,a);return l.isFailure?ke.fail(fr(gr.INVALID_INPUT_DATA,l.error.message,a)):ke.ok(new pn(pn.sanitize(l.object)))}return a.generateOnEmpty?pn.generateNewID():ke.ok(new pn(null))}static generateNewID(){return ke.ok(new pn(Y0()))}get value(){return String(this.props)}toString(){return String(this.props)}toPrimitive(){return this.toString()}}const za={aa:{name:"Afar",nativeName:"Afaraf"},ab:{name:"Abkhaz",nativeName:"аҧсуа бызшәа"},ae:{name:"Avestan",nativeName:"avesta"},af:{name:"Afrikaans",nativeName:"Afrikaans"},ak:{name:"Akan",nativeName:"Akan"},am:{name:"Amharic",nativeName:"አማርኛ"},an:{name:"Aragonese",nativeName:"aragonés"},ar:{name:"Arabic",nativeName:"اَلْعَرَبِيَّةُ"},as:{name:"Assamese",nativeName:"অসমীয়া"},av:{name:"Avaric",nativeName:"авар мацӀ"},ay:{name:"Aymara",nativeName:"aymar aru"},az:{name:"Azerbaijani",nativeName:"azərbaycan dili"},ba:{name:"Bashkir",nativeName:"башҡорт теле"},be:{name:"Belarusian",nativeName:"беларуская мова"},bg:{name:"Bulgarian",nativeName:"български език"},bi:{name:"Bislama",nativeName:"Bislama"},bm:{name:"Bambara",nativeName:"bamanankan"},bn:{name:"Bengali",nativeName:"বাংলা"},bo:{name:"Tibetan",nativeName:"བོད་ཡིག"},br:{name:"Breton",nativeName:"brezhoneg"},bs:{name:"Bosnian",nativeName:"bosanski jezik"},ca:{name:"Catalan",nativeName:"Català"},ce:{name:"Chechen",nativeName:"нохчийн мотт"},ch:{name:"Chamorro",nativeName:"Chamoru"},co:{name:"Corsican",nativeName:"corsu"},cr:{name:"Cree",nativeName:"ᓀᐦᐃᔭᐍᐏᐣ"},cs:{name:"Czech",nativeName:"čeština"},cu:{name:"Old Church Slavonic",nativeName:"ѩзыкъ словѣньскъ"},cv:{name:"Chuvash",nativeName:"чӑваш чӗлхи"},cy:{name:"Welsh",nativeName:"Cymraeg"},da:{name:"Danish",nativeName:"dansk"},de:{name:"German",nativeName:"Deutsch"},dv:{name:"Divehi",nativeName:"ދިވެހި"},dz:{name:"Dzongkha",nativeName:"རྫོང་ཁ"},ee:{name:"Ewe",nativeName:"Eʋegbe"},el:{name:"Greek",nativeName:"Ελληνικά"},en:{name:"English",nativeName:"English"},eo:{name:"Esperanto",nativeName:"Esperanto"},es:{name:"Spanish",nativeName:"Español"},et:{name:"Estonian",nativeName:"eesti"},eu:{name:"Basque",nativeName:"euskara"},fa:{name:"Persian",nativeName:"فارسی"},ff:{name:"Fula",nativeName:"Fulfulde"},fi:{name:"Finnish",nativeName:"suomi"},fj:{name:"Fijian",nativeName:"vosa Vakaviti"},fo:{name:"Faroese",nativeName:"føroyskt"},fr:{name:"French",nativeName:"Français"},fy:{name:"Western Frisian",nativeName:"Frysk"},ga:{name:"Irish",nativeName:"Gaeilge"},gd:{name:"Scottish Gaelic",nativeName:"Gàidhlig"},gl:{name:"Galician",nativeName:"galego"},gn:{name:"Guaraní",nativeName:"Avañe'ẽ"},gu:{name:"Gujarati",nativeName:"ગુજરાતી"},gv:{name:"Manx",nativeName:"Gaelg"},ha:{name:"Hausa",nativeName:"هَوُسَ"},he:{name:"Hebrew",nativeName:"עברית"},hi:{name:"Hindi",nativeName:"हिन्दी"},ho:{name:"Hiri Motu",nativeName:"Hiri Motu"},hr:{name:"Croatian",nativeName:"Hrvatski"},ht:{name:"Haitian",nativeName:"Kreyòl ayisyen"},hu:{name:"Hungarian",nativeName:"magyar"},hy:{name:"Armenian",nativeName:"Հայերեն"},hz:{name:"Herero",nativeName:"Otjiherero"},ia:{name:"Interlingua",nativeName:"Interlingua"},id:{name:"Indonesian",nativeName:"Bahasa Indonesia"},ie:{name:"Interlingue",nativeName:"Interlingue"},ig:{name:"Igbo",nativeName:"Asụsụ Igbo"},ii:{name:"Nuosu",nativeName:"ꆈꌠ꒿ Nuosuhxop"},ik:{name:"Inupiaq",nativeName:"Iñupiaq"},io:{name:"Ido",nativeName:"Ido"},is:{name:"Icelandic",nativeName:"Íslenska"},it:{name:"Italian",nativeName:"Italiano"},iu:{name:"Inuktitut",nativeName:"ᐃᓄᒃᑎᑐᑦ"},ja:{name:"Japanese",nativeName:"日本語"},jv:{name:"Javanese",nativeName:"basa Jawa"},ka:{name:"Georgian",nativeName:"ქართული"},kg:{name:"Kongo",nativeName:"Kikongo"},ki:{name:"Kikuyu",nativeName:"Gĩkũyũ"},kj:{name:"Kwanyama",nativeName:"Kuanyama"},kk:{name:"Kazakh",nativeName:"қазақ тілі"},kl:{name:"Kalaallisut",nativeName:"kalaallisut"},km:{name:"Khmer",nativeName:"ខេមរភាសា"},kn:{name:"Kannada",nativeName:"ಕನ್ನಡ"},ko:{name:"Korean",nativeName:"한국어"},kr:{name:"Kanuri",nativeName:"Kanuri"},ks:{name:"Kashmiri",nativeName:"कश्मीरी"},ku:{name:"Kurdish",nativeName:"Kurdî"},kv:{name:"Komi",nativeName:"коми кыв"},kw:{name:"Cornish",nativeName:"Kernewek"},ky:{name:"Kyrgyz",nativeName:"Кыргызча"},la:{name:"Latin",nativeName:"latine"},lb:{name:"Luxembourgish",nativeName:"Lëtzebuergesch"},lg:{name:"Ganda",nativeName:"Luganda"},li:{name:"Limburgish",nativeName:"Limburgs"},ln:{name:"Lingala",nativeName:"Lingála"},lo:{name:"Lao",nativeName:"ພາສາລາວ"},lt:{name:"Lithuanian",nativeName:"lietuvių kalba"},lu:{name:"Luba-Katanga",nativeName:"Kiluba"},lv:{name:"Latvian",nativeName:"latviešu valoda"},mg:{name:"Malagasy",nativeName:"fiteny malagasy"},mh:{name:"Marshallese",nativeName:"Kajin M̧ajeļ"},mi:{name:"Māori",nativeName:"te reo Māori"},mk:{name:"Macedonian",nativeName:"македонски јазик"},ml:{name:"Malayalam",nativeName:"മലയാളം"},mn:{name:"Mongolian",nativeName:"Монгол хэл"},mr:{name:"Marathi",nativeName:"मराठी"},ms:{name:"Malay",nativeName:"Bahasa Melayu"},mt:{name:"Maltese",nativeName:"Malti"},my:{name:"Burmese",nativeName:"ဗမာစာ"},na:{name:"Nauru",nativeName:"Dorerin Naoero"},nb:{name:"Norwegian Bokmål",nativeName:"Norsk bokmål"},nd:{name:"Northern Ndebele",nativeName:"isiNdebele"},ne:{name:"Nepali",nativeName:"नेपाली"},ng:{name:"Ndonga",nativeName:"Owambo"},nl:{name:"Dutch",nativeName:"Nederlands"},nn:{name:"Norwegian Nynorsk",nativeName:"Norsk nynorsk"},no:{name:"Norwegian",nativeName:"Norsk"},nr:{name:"Southern Ndebele",nativeName:"isiNdebele"},nv:{name:"Navajo",nativeName:"Diné bizaad"},ny:{name:"Chichewa",nativeName:"chiCheŵa"},oc:{name:"Occitan",nativeName:"occitan"},oj:{name:"Ojibwe",nativeName:"ᐊᓂᔑᓈᐯᒧᐎᓐ"},om:{name:"Oromo",nativeName:"Afaan Oromoo"},or:{name:"Oriya",nativeName:"ଓଡ଼ିଆ"},os:{name:"Ossetian",nativeName:"ирон æвзаг"},pa:{name:"Panjabi",nativeName:"ਪੰਜਾਬੀ"},pi:{name:"Pāli",nativeName:"पाऴि"},pl:{name:"Polish",nativeName:"Polski"},ps:{name:"Pashto",nativeName:"پښتو"},pt:{name:"Portuguese",nativeName:"Português"},qu:{name:"Quechua",nativeName:"Runa Simi"},rm:{name:"Romansh",nativeName:"rumantsch grischun"},rn:{name:"Kirundi",nativeName:"Ikirundi"},ro:{name:"Romanian",nativeName:"Română"},ru:{name:"Russian",nativeName:"Русский"},rw:{name:"Kinyarwanda",nativeName:"Ikinyarwanda"},sa:{name:"Sanskrit",nativeName:"संस्कृतम्"},sc:{name:"Sardinian",nativeName:"sardu"},sd:{name:"Sindhi",nativeName:"सिन्धी"},se:{name:"Northern Sami",nativeName:"Davvisámegiella"},sg:{name:"Sango",nativeName:"yângâ tî sängö"},si:{name:"Sinhala",nativeName:"සිංහල"},sk:{name:"Slovak",nativeName:"slovenčina"},sl:{name:"Slovenian",nativeName:"slovenščina"},sm:{name:"Samoan",nativeName:"gagana fa'a Samoa"},sn:{name:"Shona",nativeName:"chiShona"},so:{name:"Somali",nativeName:"Soomaaliga"},sq:{name:"Albanian",nativeName:"Shqip"},sr:{name:"Serbian",nativeName:"српски језик"},ss:{name:"Swati",nativeName:"SiSwati"},st:{name:"Southern Sotho",nativeName:"Sesotho"},su:{name:"Sundanese",nativeName:"Basa Sunda"},sv:{name:"Swedish",nativeName:"Svenska"},sw:{name:"Swahili",nativeName:"Kiswahili"},ta:{name:"Tamil",nativeName:"தமிழ்"},te:{name:"Telugu",nativeName:"తెలుగు"},tg:{name:"Tajik",nativeName:"тоҷикӣ"},th:{name:"Thai",nativeName:"ไทย"},ti:{name:"Tigrinya",nativeName:"ትግርኛ"},tk:{name:"Turkmen",nativeName:"Türkmençe"},tl:{name:"Tagalog",nativeName:"Wikang Tagalog"},tn:{name:"Tswana",nativeName:"Setswana"},to:{name:"Tonga",nativeName:"faka Tonga"},tr:{name:"Turkish",nativeName:"Türkçe"},ts:{name:"Tsonga",nativeName:"Xitsonga"},tt:{name:"Tatar",nativeName:"татар теле"},tw:{name:"Twi",nativeName:"Twi"},ty:{name:"Tahitian",nativeName:"Reo Tahiti"},ug:{name:"Uyghur",nativeName:"ئۇيغۇرچە‎"},uk:{name:"Ukrainian",nativeName:"Українська"},ur:{name:"Urdu",nativeName:"اردو"},uz:{name:"Uzbek",nativeName:"Ўзбек"},ve:{name:"Venda",nativeName:"Tshivenḓa"},vi:{name:"Vietnamese",nativeName:"Tiếng Việt"},vo:{name:"Volapük",nativeName:"Volapük"},wa:{name:"Walloon",nativeName:"walon"},wo:{name:"Wolof",nativeName:"Wollof"},xh:{name:"Xhosa",nativeName:"isiXhosa"},yi:{name:"Yiddish",nativeName:"ייִדיש"},yo:{name:"Yoruba",nativeName:"Yorùbá"},za:{name:"Zhuang",nativeName:"Saɯ cueŋƅ"},zh:{name:"Chinese",nativeName:"中文"},zu:{name:"Zulu",nativeName:"isiZulu"}},xn=class xn extends as{constructor(){super(...arguments);je(this,"toString",()=>this.code)}static validate(r,a){const l=At.alternatives(qe.RULE_ALLOW_EMPTY.default(""),At.string().lowercase().valid(...Object.keys(za)).label(String(a.label)));return qe.validate(l,r)}static sanitize(r){return r?String(r).toLowerCase():void 0}static createFromCode(r,a={}){const l={...a,label:a.label?a.label:"lang_code"},c=xn.validate(r,l);if(c.isFailure)return ke.fail(fr(gr.INVALID_INPUT_DATA,c.error.message,l));const d=xn.sanitize(c.object),m=d?{...za[c.object],code:d}:void 0;return ke.ok(new xn(m))}static createDefaultCode(){return xn.createFromCode(this.DEFAULT_LANGUAGE_CODE)}get name(){return this.props?String(this.props.name):""}get nativeName(){return this.props?String(this.props.nativeName):""}get code(){return this.props?String(this.props.code):""}isEmpty(){return this.isNull()||this.props===void 0}toPrimitive(){return this.toString()}};je(xn,"DEFAULT_LANGUAGE_CODE","es"),je(xn,"LANGUAGES",za);let cr=xn;class vd{constructor(o){je(this,"_collection",[]);this._collection=o??[]}add(o){this._collection.push(o)}reset(){this._collection=[]}hasSomeFaultyResult(){return this._collection.some(o=>o.isFailure)}getFirstFaultyResult(){return this._collection.find(o=>o.isFailure)}getAllFaultyResults(){return this._collection.filter(o=>o.isFailure)}get objects(){return this._collection.filter(o=>o.isSuccess).map(o=>o.object)}get errors(){return this._collection.filter(o=>o.isFailure).map(o=>o.error)}}const bd=2,Ga={amount:0,scale:bd},we=class we extends as{constructor(r,a,l){super(r);je(this,"_isNull");je(this,"_options");je(this,"isEmpty",()=>this.isNull());je(this,"isNull",()=>this._isNull);this._isNull=Object.freeze(a),this._options=Object.freeze(l)}static validate(r,a,l){const c=qe.RULE_ALLOW_NULL_OR_UNDEFINED,d=qe.RULE_ALLOW_EMPTY,m=qe.RULE_IS_TYPE_NUMBER.label(l.label?l.label:"amount"),p=qe.RULE_IS_TYPE_STRING.regex(/^[-]?\d+$/).label(l.label?l.label:"amount"),x=At.number().min(we.MIN_SCALE).max(we.MAX_SCALE).label(l.label?l.label:"scale"),_=new vd([qe.validate(At.alternatives(c,d,m,p),r),qe.validate(At.alternatives(qe.RULE_IS_TYPE_NUMBER.label(l.label?l.label:"scale"),x),a)]);if(_.hasSomeFaultyResult())return _.getFirstFaultyResult();let C=typeof r=="string"?parseInt(r,10):Number(r),y=Ba.isNull(a)?we.DEFAULT_SCALE:Number(a);const v=C/Math.pow(10,y);return vwe.MAX_VALUE?ke.fail(new Error(`Value with scale is out of range: ${v}`)):ke.ok()}static create(r=Ga,a={}){if(r===null)throw new Error("InvalidParams: props params is missing");const{amount:l=Ga.amount,scale:c=Ga.scale}=r,d={label:"percentage",...a},m=we.validate(l,c,d);if(m.isFailure)return ke.fail(fr(gr.INVALID_INPUT_DATA,m.error.message,d));let p=we._sanitize(l);const x={amount:Ba.isNull(p)?0:p,scale:c};return ke.ok(new this(x,Ba.isNull(p),a))}static createFromFormattedValue(r,a={}){if(r===null||r==="")return we.create({amount:null,scale:we.DEFAULT_SCALE});const l=String(r),[c,d]=l.split(",");let m=c,p=2;return d===void 0?p=0:(d===""&&(m=c+d.padEnd(1,"0"),p=1),d.length===1?(m=c+d.padEnd(1,"0"),p=1):d.length===2&&(m=c+d.padEnd(2,"0"),p=2)),we.create({amount:m,scale:p},a)}static _sanitize(r){let a=null;return typeof r=="string"?a=parseInt(r,10):a=r,a}static _toString(r,a){if(r===null)return"";const l=Math.pow(10,a);return(Number(r)/l).toFixed(a)}static _isWithinRange(r,a){const l=Number(we._toString(r,a));return l>=we.MIN_VALUE&&l<=we.MAX_VALUE}get amount(){var r;return this.isNull()?null:Number((r=this.props)==null?void 0:r.amount)}get scale(){var r;return Number((r=this.props)==null?void 0:r.scale)}getAmount(){var r;return this.isNull()?null:Number((r=this.props)==null?void 0:r.amount)}getScale(){var r;return this.isNull()?0:Number((r=this.props)==null?void 0:r.scale)}toString(){return we._toString(this.amount,this.scale)}toNumber(){return this.isNull()?0:Number(this.toString())}toFormat(){return this._isNull?"":Intl.NumberFormat("es-ES",{maximumFractionDigits:2}).format(this.toNumber())}toPrimitive(){return this.scale!==we.DEFAULT_SCALE?this.convertScale(we.DEFAULT_SCALE).toPrimitive():this.amount}toPrimitives(){return this.toObject()}toObject(){return{amount:this.amount,scale:this.scale}}convertScale(r){if(rwe.MAX_SCALE)throw new Error(`Scale out of range: ${r}`);if(this.isNull())return new we({amount:null,scale:r},!0,this._options);const a=Math.pow(10,this.scale),l=Number(this.amount)/a,c=Math.pow(10,r),d=Math.round(l*c);if(!we._isWithinRange(d,r))throw new Error(`Value out of range after conversion: ${d} ${r}`);return new we({amount:d,scale:r},!1,this._options)}hasSameScale(r){return this.scale===r.scale}isWithinRange(){return we._isWithinRange(this.amount,this.scale)}};je(we,"DEFAULT_SCALE",bd),je(we,"MIN_VALUE",0),je(we,"MAX_VALUE",100),je(we,"MIN_SCALE",0),je(we,"MAX_SCALE",2);let zt=we;const wd=2,Ha={amount:0,scale:wd},Se=class Se extends as{constructor(r,a,l){super(r);je(this,"_isNull");je(this,"_options");je(this,"isEmpty",()=>this.isNull());je(this,"isNull",()=>this._isNull);this._isNull=Object.freeze(a),this._options=Object.freeze(l)}static validate(r,a,l={}){const c=qe.RULE_ALLOW_NULL_OR_UNDEFINED,d=qe.RULE_ALLOW_EMPTY,m=qe.RULE_IS_TYPE_NUMBER.label(l.label?l.label:"amount"),p=qe.RULE_IS_TYPE_STRING.regex(/^[-]?\d+$/).label(l.label?l.label:"amount"),x=At.number().min(Se.MIN_SCALE).max(Se.MAX_SCALE).label(l.label?l.label:"scale"),_=new vd([qe.validate(At.alternatives(c,d,m,p),r),qe.validate(At.alternatives(qe.RULE_IS_TYPE_NUMBER.label(l.label?l.label:"scale"),x),a)]);return _.hasSomeFaultyResult()?_.getFirstFaultyResult():ke.ok()}static create(r=Ha,a={}){if(r===null)throw new Error("InvalidParams: props params is missing");const{amount:l=Ha.amount,scale:c=Ha.scale}=r,d={label:"quantity",...a},m=Se.validate(l,c,d);if(m.isFailure)return ke.fail(fr(gr.INVALID_INPUT_DATA,m.error.message,d));let p=Se._sanitize(l);const x={amount:p===null?0:p,scale:c};return ke.ok(new Se(x,p===null,a))}static createFromFormattedValue(r,a={}){if(r===null||r==="")return Se.create({amount:null,scale:Se.DEFAULT_SCALE});const l=String(r),[c,d]=l.split(",");let m=c,p=2;return d===void 0?p=0:(d===""&&(m=c+d.padEnd(1,"0"),p=1),d.length===1?(m=c+d.padEnd(1,"0"),p=1):d.length===2&&(m=c+d.padEnd(2,"0"),p=2)),Se.create({amount:m,scale:p},a)}static _sanitize(r){let a=null;return typeof r=="string"?a=parseInt(r,10):a=r,a}static _toString(r,a){if(r===null)return"";const l=Math.pow(10,a);return(Number(r)/l).toFixed(a)}get amount(){var r;return this.isNull()?null:Number((r=this.props)==null?void 0:r.amount)}get scale(){var r;return Number((r=this.props)==null?void 0:r.scale)}getAmount(){var r;return this.isNull()?null:Number((r=this.props)==null?void 0:r.amount)}getScale(){var r;return this.isNull()?0:Number((r=this.props)==null?void 0:r.scale)}toString(){return Se._toString(this.amount,this.scale)}toNumber(){return this.isNull()?0:Number(this.toString())}toFormat(){return this._isNull?"":Intl.NumberFormat("es-ES",{maximumFractionDigits:2}).format(this.toNumber())}toPrimitive(){return this.scale!==Se.DEFAULT_SCALE?this.convertScale(Se.DEFAULT_SCALE).toPrimitive():this.amount}toPrimitives(){return this.toObject()}toObject(){return{amount:this.amount,scale:this.scale}}convertScale(r){if(rSe.MAX_SCALE)throw new Error(`Scale out of range: ${r}`);if(this.isNull())return new Se({amount:null,scale:r},!0,this._options);const a=Math.pow(10,this.scale),l=Number(this.amount)/a,c=Math.pow(10,r),d=Math.round(l*c);return new Se({amount:d,scale:r},!1,this._options)}hasSameScale(r){return this.scale===r.scale}increment(r){return this.isNull()?r?Se.create(r.toObject()):Se.create():r?this.hasSameScale(r)?Se.create({amount:Number(this.amount)+Number(r.amount),scale:this.scale},this._options):ke.fail(Error("No se pueden sumar cantidades con diferentes escalas.")):Se.create({amount:Number(this.amount)+1,scale:this.scale},this._options)}decrement(r){return this.isNull()?r?Se.create(r.toObject()):Se.create():r?this.hasSameScale(r)?Se.create({amount:Number(this.amount)-Number(r.amount),scale:this.scale},this._options):ke.fail(Error("No se pueden restar cantidades con diferentes escalas.")):Se.create({amount:Number(this.amount)-1,scale:this.scale},this._options)}};je(Se,"DEFAULT_SCALE",wd),je(Se,"MIN_SCALE",0),je(Se,"MAX_SCALE",2);let Sn=Se;const Cc=2;class X0 extends Ot{static create(o){const{amount:r,currencyCode:a,scale:l=Cc}=o,c=Ot.create({amount:r,currencyCode:a,scale:l});if(c.isFailure)return c;const d=c.object.convertScale(Cc);return ke.ok(d)}}class dr extends Uv{constructor(){super(...arguments);je(this,"isValid",()=>!isNaN(this.props.valueOf())&&this.props.valueOf()!==0);je(this,"isEmpty",()=>!this.isValid());je(this,"toISO8601",()=>this.isValid()?this.props.toISOString():"");je(this,"toDateString",()=>this.isValid()?this.props.toDateString():"");je(this,"toLocaleDateString",(r,a)=>this.isValid()?this.props.toLocaleDateString(r,a):"");je(this,"toLocaleTimeString",()=>this.isValid()?this.props.toLocaleTimeString():"")}static validate(r,a){const l=qe.RULE_ALLOW_EMPTY.default(0),c=At.date().label(String(a.label)),d=At.alternatives(l,c);return qe.validate(d,r)}static createCurrentDate(){return ke.ok(new dr(new Date))}static create(r,a={}){const l={...a,dateFormat:a.dateFormat?a.dateFormat:"YYYY-MM-DD",label:a.label?a.label:"date"},c=dr.validate(r,l);return c.isFailure?ke.fail(fr(gr.INVALID_INPUT_DATA,c.error.message,l)):ke.ok(new dr(new Date(c.object)))}toString(){if(!this.isEmpty()){const r=this.props.getFullYear(),a=String(this.props.getMonth()+1).padStart(2,"0"),l=String(this.props.getDate()).padStart(2,"0");return`${r}-${a}-${l}`}return""}toPrimitive(){return this.toISO8601()}}const Z0=({isPending:n,interval:o=1e3,onInterval:r})=>{const[a,l]=M.useState(void 0);return M.useEffect(()=>{let c;return n&&(c=setInterval(()=>{l(d=>d===void 0?o:d+o)},o)),()=>{clearInterval(c),l(void 0)}},[n,o]),M.useEffect(()=>{r&&a&&r(a)},[a]),{elapsedTime:a}},J0=2*60*1e3,eb=60*1e3,Fo=({queryKey:n,queryFn:o,enabled:r,select:a,queryOptions:l={},overtimeOptions:c})=>{const[d,m]=M.useState(!1),p=Dc({queryKey:n,queryFn:o,placeholderData:Tc,staleTime:eb,refetchInterval:J0,refetchOnWindowFocus:!0,enabled:r&&!!o,select:a,...l});M.useEffect(()=>{p.isSuccess&&G0(p.data)&&m(p.data.total_items===0)},[p]);const{elapsedTime:x}=Z0({isPending:p.isFetching,interval:c==null?void 0:c.interval,onInterval:c==null?void 0:c.onInterval});return{...p,overtime:{elapsedTime:x},isEmpty:d}},Sd=n=>Dc({placeholderData:Tc,...n});function tb(n){return Ut({...n})}/** - * table-core - * - * Copyright (c) TanStack - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function nb(){return{accessor:(n,o)=>typeof n=="function"?{...o,accessorFn:n}:{...o,accessorKey:n},display:n=>n,group:n=>n}}function vn(n,o){return typeof n=="function"?n(o):n}function _t(n,o){return r=>{o.setState(a=>({...a,[n]:vn(r,a[n])}))}}function ps(n){return n instanceof Function}function rb(n){return Array.isArray(n)&&n.every(o=>typeof o=="number")}function ib(n,o){const r=[],a=l=>{l.forEach(c=>{r.push(c);const d=o(c);d!=null&&d.length&&a(d)})};return a(n),r}function Z(n,o,r){let a=[],l;return c=>{let d;r.key&&r.debug&&(d=Date.now());const m=n(c);if(!(m.length!==a.length||m.some((_,C)=>a[C]!==_)))return l;a=m;let x;if(r.key&&r.debug&&(x=Date.now()),l=o(...m),r==null||r.onChange==null||r.onChange(l),r.key&&r.debug&&r!=null&&r.debug()){const _=Math.round((Date.now()-d)*100)/100,C=Math.round((Date.now()-x)*100)/100,y=C/16,v=(R,E)=>{for(R=String(R);R.length{var l;return(l=n==null?void 0:n.debugAll)!=null?l:n[o]},key:!1,onChange:a}}function sb(n,o,r,a){const l=()=>{var d;return(d=c.getValue())!=null?d:n.options.renderFallbackValue},c={id:`${o.id}_${r.id}`,row:o,column:r,getValue:()=>o.getValue(a),renderValue:l,getContext:Z(()=>[n,r,o,c],(d,m,p,x)=>({table:d,column:m,row:p,cell:x,getValue:x.getValue,renderValue:x.renderValue}),J(n.options,"debugCells"))};return n._features.forEach(d=>{d.createCell==null||d.createCell(c,r,o,n)},{}),c}function ab(n,o,r,a){var l,c;const m={...n._getDefaultColumnDef(),...o},p=m.accessorKey;let x=(l=(c=m.id)!=null?c:p?typeof String.prototype.replaceAll=="function"?p.replaceAll(".","_"):p.replace(/\./g,"_"):void 0)!=null?l:typeof m.header=="string"?m.header:void 0,_;if(m.accessorFn?_=m.accessorFn:p&&(p.includes(".")?_=y=>{let v=y;for(const E of p.split(".")){var R;v=(R=v)==null?void 0:R[E]}return v}:_=y=>y[m.accessorKey]),!x)throw new Error;let C={id:`${String(x)}`,accessorFn:_,parent:a,depth:r,columnDef:m,columns:[],getFlatColumns:Z(()=>[!0],()=>{var y;return[C,...(y=C.columns)==null?void 0:y.flatMap(v=>v.getFlatColumns())]},J(n.options,"debugColumns")),getLeafColumns:Z(()=>[n._getOrderColumnsFn()],y=>{var v;if((v=C.columns)!=null&&v.length){let R=C.columns.flatMap(E=>E.getLeafColumns());return y(R)}return[C]},J(n.options,"debugColumns"))};for(const y of n._features)y.createColumn==null||y.createColumn(C,n);return C}const et="debugHeaders";function jc(n,o,r){var a;let c={id:(a=r.id)!=null?a:o.id,column:o,index:r.index,isPlaceholder:!!r.isPlaceholder,placeholderId:r.placeholderId,depth:r.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const d=[],m=p=>{p.subHeaders&&p.subHeaders.length&&p.subHeaders.map(m),d.push(p)};return m(c),d},getContext:()=>({table:n,header:c,column:o})};return n._features.forEach(d=>{d.createHeader==null||d.createHeader(c,n)}),c}const ob={createTable:n=>{n.getHeaderGroups=Z(()=>[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.left,n.getState().columnPinning.right],(o,r,a,l)=>{var c,d;const m=(c=a==null?void 0:a.map(C=>r.find(y=>y.id===C)).filter(Boolean))!=null?c:[],p=(d=l==null?void 0:l.map(C=>r.find(y=>y.id===C)).filter(Boolean))!=null?d:[],x=r.filter(C=>!(a!=null&&a.includes(C.id))&&!(l!=null&&l.includes(C.id)));return Xi(o,[...m,...x,...p],n)},J(n.options,et)),n.getCenterHeaderGroups=Z(()=>[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.left,n.getState().columnPinning.right],(o,r,a,l)=>(r=r.filter(c=>!(a!=null&&a.includes(c.id))&&!(l!=null&&l.includes(c.id))),Xi(o,r,n,"center")),J(n.options,et)),n.getLeftHeaderGroups=Z(()=>[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.left],(o,r,a)=>{var l;const c=(l=a==null?void 0:a.map(d=>r.find(m=>m.id===d)).filter(Boolean))!=null?l:[];return Xi(o,c,n,"left")},J(n.options,et)),n.getRightHeaderGroups=Z(()=>[n.getAllColumns(),n.getVisibleLeafColumns(),n.getState().columnPinning.right],(o,r,a)=>{var l;const c=(l=a==null?void 0:a.map(d=>r.find(m=>m.id===d)).filter(Boolean))!=null?l:[];return Xi(o,c,n,"right")},J(n.options,et)),n.getFooterGroups=Z(()=>[n.getHeaderGroups()],o=>[...o].reverse(),J(n.options,et)),n.getLeftFooterGroups=Z(()=>[n.getLeftHeaderGroups()],o=>[...o].reverse(),J(n.options,et)),n.getCenterFooterGroups=Z(()=>[n.getCenterHeaderGroups()],o=>[...o].reverse(),J(n.options,et)),n.getRightFooterGroups=Z(()=>[n.getRightHeaderGroups()],o=>[...o].reverse(),J(n.options,et)),n.getFlatHeaders=Z(()=>[n.getHeaderGroups()],o=>o.map(r=>r.headers).flat(),J(n.options,et)),n.getLeftFlatHeaders=Z(()=>[n.getLeftHeaderGroups()],o=>o.map(r=>r.headers).flat(),J(n.options,et)),n.getCenterFlatHeaders=Z(()=>[n.getCenterHeaderGroups()],o=>o.map(r=>r.headers).flat(),J(n.options,et)),n.getRightFlatHeaders=Z(()=>[n.getRightHeaderGroups()],o=>o.map(r=>r.headers).flat(),J(n.options,et)),n.getCenterLeafHeaders=Z(()=>[n.getCenterFlatHeaders()],o=>o.filter(r=>{var a;return!((a=r.subHeaders)!=null&&a.length)}),J(n.options,et)),n.getLeftLeafHeaders=Z(()=>[n.getLeftFlatHeaders()],o=>o.filter(r=>{var a;return!((a=r.subHeaders)!=null&&a.length)}),J(n.options,et)),n.getRightLeafHeaders=Z(()=>[n.getRightFlatHeaders()],o=>o.filter(r=>{var a;return!((a=r.subHeaders)!=null&&a.length)}),J(n.options,et)),n.getLeafHeaders=Z(()=>[n.getLeftHeaderGroups(),n.getCenterHeaderGroups(),n.getRightHeaderGroups()],(o,r,a)=>{var l,c,d,m,p,x;return[...(l=(c=o[0])==null?void 0:c.headers)!=null?l:[],...(d=(m=r[0])==null?void 0:m.headers)!=null?d:[],...(p=(x=a[0])==null?void 0:x.headers)!=null?p:[]].map(_=>_.getLeafHeaders()).flat()},J(n.options,et))}};function Xi(n,o,r,a){var l,c;let d=0;const m=function(y,v){v===void 0&&(v=1),d=Math.max(d,v),y.filter(R=>R.getIsVisible()).forEach(R=>{var E;(E=R.columns)!=null&&E.length&&m(R.columns,v+1)},0)};m(n);let p=[];const x=(y,v)=>{const R={depth:v,id:[a,`${v}`].filter(Boolean).join("_"),headers:[]},E=[];y.forEach(k=>{const D=[...E].reverse()[0],F=k.column.depth===R.depth;let q,U=!1;if(F&&k.column.parent?q=k.column.parent:(q=k.column,U=!0),D&&(D==null?void 0:D.column)===q)D.subHeaders.push(k);else{const O=jc(r,q,{id:[a,v,q.id,k==null?void 0:k.id].filter(Boolean).join("_"),isPlaceholder:U,placeholderId:U?`${E.filter(V=>V.column===q).length}`:void 0,depth:v,index:E.length});O.subHeaders.push(k),E.push(O)}R.headers.push(k),k.headerGroup=R}),p.push(R),v>0&&x(E,v-1)},_=o.map((y,v)=>jc(r,y,{depth:d,index:v}));x(_,d-1),p.reverse();const C=y=>y.filter(R=>R.column.getIsVisible()).map(R=>{let E=0,k=0,D=[0];R.subHeaders&&R.subHeaders.length?(D=[],C(R.subHeaders).forEach(q=>{let{colSpan:U,rowSpan:O}=q;E+=U,D.push(O)})):E=1;const F=Math.min(...D);return k=k+F,R.colSpan=E,R.rowSpan=k,{colSpan:E,rowSpan:k}});return C((l=(c=p[0])==null?void 0:c.headers)!=null?l:[]),p}const Do=(n,o,r,a,l,c,d)=>{let m={id:o,index:a,original:r,depth:l,parentId:d,_valuesCache:{},_uniqueValuesCache:{},getValue:p=>{if(m._valuesCache.hasOwnProperty(p))return m._valuesCache[p];const x=n.getColumn(p);if(x!=null&&x.accessorFn)return m._valuesCache[p]=x.accessorFn(m.original,a),m._valuesCache[p]},getUniqueValues:p=>{if(m._uniqueValuesCache.hasOwnProperty(p))return m._uniqueValuesCache[p];const x=n.getColumn(p);if(x!=null&&x.accessorFn)return x.columnDef.getUniqueValues?(m._uniqueValuesCache[p]=x.columnDef.getUniqueValues(m.original,a),m._uniqueValuesCache[p]):(m._uniqueValuesCache[p]=[m.getValue(p)],m._uniqueValuesCache[p])},renderValue:p=>{var x;return(x=m.getValue(p))!=null?x:n.options.renderFallbackValue},subRows:[],getLeafRows:()=>ib(m.subRows,p=>p.subRows),getParentRow:()=>m.parentId?n.getRow(m.parentId,!0):void 0,getParentRows:()=>{let p=[],x=m;for(;;){const _=x.getParentRow();if(!_)break;p.push(_),x=_}return p.reverse()},getAllCells:Z(()=>[n.getAllLeafColumns()],p=>p.map(x=>sb(n,m,x,x.id)),J(n.options,"debugRows")),_getAllCellsByColumnId:Z(()=>[m.getAllCells()],p=>p.reduce((x,_)=>(x[_.column.id]=_,x),{}),J(n.options,"debugRows"))};for(let p=0;p{n._getFacetedRowModel=o.options.getFacetedRowModel&&o.options.getFacetedRowModel(o,n.id),n.getFacetedRowModel=()=>n._getFacetedRowModel?n._getFacetedRowModel():o.getPreFilteredRowModel(),n._getFacetedUniqueValues=o.options.getFacetedUniqueValues&&o.options.getFacetedUniqueValues(o,n.id),n.getFacetedUniqueValues=()=>n._getFacetedUniqueValues?n._getFacetedUniqueValues():new Map,n._getFacetedMinMaxValues=o.options.getFacetedMinMaxValues&&o.options.getFacetedMinMaxValues(o,n.id),n.getFacetedMinMaxValues=()=>{if(n._getFacetedMinMaxValues)return n._getFacetedMinMaxValues()}}},Cd=(n,o,r)=>{var a,l;const c=r==null||(a=r.toString())==null?void 0:a.toLowerCase();return!!(!((l=n.getValue(o))==null||(l=l.toString())==null||(l=l.toLowerCase())==null)&&l.includes(c))};Cd.autoRemove=n=>Pt(n);const jd=(n,o,r)=>{var a;return!!(!((a=n.getValue(o))==null||(a=a.toString())==null)&&a.includes(r))};jd.autoRemove=n=>Pt(n);const yd=(n,o,r)=>{var a;return((a=n.getValue(o))==null||(a=a.toString())==null?void 0:a.toLowerCase())===(r==null?void 0:r.toLowerCase())};yd.autoRemove=n=>Pt(n);const Nd=(n,o,r)=>{var a;return(a=n.getValue(o))==null?void 0:a.includes(r)};Nd.autoRemove=n=>Pt(n);const Rd=(n,o,r)=>!r.some(a=>{var l;return!((l=n.getValue(o))!=null&&l.includes(a))});Rd.autoRemove=n=>Pt(n)||!(n!=null&&n.length);const Ed=(n,o,r)=>r.some(a=>{var l;return(l=n.getValue(o))==null?void 0:l.includes(a)});Ed.autoRemove=n=>Pt(n)||!(n!=null&&n.length);const Ad=(n,o,r)=>n.getValue(o)===r;Ad.autoRemove=n=>Pt(n);const Id=(n,o,r)=>n.getValue(o)==r;Id.autoRemove=n=>Pt(n);const To=(n,o,r)=>{let[a,l]=r;const c=n.getValue(o);return c>=a&&c<=l};To.resolveFilterValue=n=>{let[o,r]=n,a=typeof o!="number"?parseFloat(o):o,l=typeof r!="number"?parseFloat(r):r,c=o===null||Number.isNaN(a)?-1/0:a,d=r===null||Number.isNaN(l)?1/0:l;if(c>d){const m=c;c=d,d=m}return[c,d]};To.autoRemove=n=>Pt(n)||Pt(n[0])&&Pt(n[1]);const nn={includesString:Cd,includesStringSensitive:jd,equalsString:yd,arrIncludes:Nd,arrIncludesAll:Rd,arrIncludesSome:Ed,equals:Ad,weakEquals:Id,inNumberRange:To};function Pt(n){return n==null||n===""}const ub={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:n=>({columnFilters:[],...n}),getDefaultOptions:n=>({onColumnFiltersChange:_t("columnFilters",n),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(n,o)=>{n.getAutoFilterFn=()=>{const r=o.getCoreRowModel().flatRows[0],a=r==null?void 0:r.getValue(n.id);return typeof a=="string"?nn.includesString:typeof a=="number"?nn.inNumberRange:typeof a=="boolean"||a!==null&&typeof a=="object"?nn.equals:Array.isArray(a)?nn.arrIncludes:nn.weakEquals},n.getFilterFn=()=>{var r,a;return ps(n.columnDef.filterFn)?n.columnDef.filterFn:n.columnDef.filterFn==="auto"?n.getAutoFilterFn():(r=(a=o.options.filterFns)==null?void 0:a[n.columnDef.filterFn])!=null?r:nn[n.columnDef.filterFn]},n.getCanFilter=()=>{var r,a,l;return((r=n.columnDef.enableColumnFilter)!=null?r:!0)&&((a=o.options.enableColumnFilters)!=null?a:!0)&&((l=o.options.enableFilters)!=null?l:!0)&&!!n.accessorFn},n.getIsFiltered=()=>n.getFilterIndex()>-1,n.getFilterValue=()=>{var r;return(r=o.getState().columnFilters)==null||(r=r.find(a=>a.id===n.id))==null?void 0:r.value},n.getFilterIndex=()=>{var r,a;return(r=(a=o.getState().columnFilters)==null?void 0:a.findIndex(l=>l.id===n.id))!=null?r:-1},n.setFilterValue=r=>{o.setColumnFilters(a=>{const l=n.getFilterFn(),c=a==null?void 0:a.find(_=>_.id===n.id),d=vn(r,c?c.value:void 0);if(yc(l,d,n)){var m;return(m=a==null?void 0:a.filter(_=>_.id!==n.id))!=null?m:[]}const p={id:n.id,value:d};if(c){var x;return(x=a==null?void 0:a.map(_=>_.id===n.id?p:_))!=null?x:[]}return a!=null&&a.length?[...a,p]:[p]})}},createRow:(n,o)=>{n.columnFilters={},n.columnFiltersMeta={}},createTable:n=>{n.setColumnFilters=o=>{const r=n.getAllLeafColumns(),a=l=>{var c;return(c=vn(o,l))==null?void 0:c.filter(d=>{const m=r.find(p=>p.id===d.id);if(m){const p=m.getFilterFn();if(yc(p,d.value,m))return!1}return!0})};n.options.onColumnFiltersChange==null||n.options.onColumnFiltersChange(a)},n.resetColumnFilters=o=>{var r,a;n.setColumnFilters(o?[]:(r=(a=n.initialState)==null?void 0:a.columnFilters)!=null?r:[])},n.getPreFilteredRowModel=()=>n.getCoreRowModel(),n.getFilteredRowModel=()=>(!n._getFilteredRowModel&&n.options.getFilteredRowModel&&(n._getFilteredRowModel=n.options.getFilteredRowModel(n)),n.options.manualFiltering||!n._getFilteredRowModel?n.getPreFilteredRowModel():n._getFilteredRowModel())}};function yc(n,o,r){return(n&&n.autoRemove?n.autoRemove(o,r):!1)||typeof o>"u"||typeof o=="string"&&!o}const cb=(n,o,r)=>r.reduce((a,l)=>{const c=l.getValue(n);return a+(typeof c=="number"?c:0)},0),db=(n,o,r)=>{let a;return r.forEach(l=>{const c=l.getValue(n);c!=null&&(a>c||a===void 0&&c>=c)&&(a=c)}),a},fb=(n,o,r)=>{let a;return r.forEach(l=>{const c=l.getValue(n);c!=null&&(a=c)&&(a=c)}),a},gb=(n,o,r)=>{let a,l;return r.forEach(c=>{const d=c.getValue(n);d!=null&&(a===void 0?d>=d&&(a=l=d):(a>d&&(a=d),l{let r=0,a=0;if(o.forEach(l=>{let c=l.getValue(n);c!=null&&(c=+c)>=c&&(++r,a+=c)}),r)return a/r},hb=(n,o)=>{if(!o.length)return;const r=o.map(c=>c.getValue(n));if(!rb(r))return;if(r.length===1)return r[0];const a=Math.floor(r.length/2),l=r.sort((c,d)=>c-d);return r.length%2!==0?l[a]:(l[a-1]+l[a])/2},pb=(n,o)=>Array.from(new Set(o.map(r=>r.getValue(n))).values()),xb=(n,o)=>new Set(o.map(r=>r.getValue(n))).size,_b=(n,o)=>o.length,Ka={sum:cb,min:db,max:fb,extent:gb,mean:mb,median:hb,unique:pb,uniqueCount:xb,count:_b},vb={getDefaultColumnDef:()=>({aggregatedCell:n=>{var o,r;return(o=(r=n.getValue())==null||r.toString==null?void 0:r.toString())!=null?o:null},aggregationFn:"auto"}),getInitialState:n=>({grouping:[],...n}),getDefaultOptions:n=>({onGroupingChange:_t("grouping",n),groupedColumnMode:"reorder"}),createColumn:(n,o)=>{n.toggleGrouping=()=>{o.setGrouping(r=>r!=null&&r.includes(n.id)?r.filter(a=>a!==n.id):[...r??[],n.id])},n.getCanGroup=()=>{var r,a;return((r=n.columnDef.enableGrouping)!=null?r:!0)&&((a=o.options.enableGrouping)!=null?a:!0)&&(!!n.accessorFn||!!n.columnDef.getGroupingValue)},n.getIsGrouped=()=>{var r;return(r=o.getState().grouping)==null?void 0:r.includes(n.id)},n.getGroupedIndex=()=>{var r;return(r=o.getState().grouping)==null?void 0:r.indexOf(n.id)},n.getToggleGroupingHandler=()=>{const r=n.getCanGroup();return()=>{r&&n.toggleGrouping()}},n.getAutoAggregationFn=()=>{const r=o.getCoreRowModel().flatRows[0],a=r==null?void 0:r.getValue(n.id);if(typeof a=="number")return Ka.sum;if(Object.prototype.toString.call(a)==="[object Date]")return Ka.extent},n.getAggregationFn=()=>{var r,a;if(!n)throw new Error;return ps(n.columnDef.aggregationFn)?n.columnDef.aggregationFn:n.columnDef.aggregationFn==="auto"?n.getAutoAggregationFn():(r=(a=o.options.aggregationFns)==null?void 0:a[n.columnDef.aggregationFn])!=null?r:Ka[n.columnDef.aggregationFn]}},createTable:n=>{n.setGrouping=o=>n.options.onGroupingChange==null?void 0:n.options.onGroupingChange(o),n.resetGrouping=o=>{var r,a;n.setGrouping(o?[]:(r=(a=n.initialState)==null?void 0:a.grouping)!=null?r:[])},n.getPreGroupedRowModel=()=>n.getFilteredRowModel(),n.getGroupedRowModel=()=>(!n._getGroupedRowModel&&n.options.getGroupedRowModel&&(n._getGroupedRowModel=n.options.getGroupedRowModel(n)),n.options.manualGrouping||!n._getGroupedRowModel?n.getPreGroupedRowModel():n._getGroupedRowModel())},createRow:(n,o)=>{n.getIsGrouped=()=>!!n.groupingColumnId,n.getGroupingValue=r=>{if(n._groupingValuesCache.hasOwnProperty(r))return n._groupingValuesCache[r];const a=o.getColumn(r);return a!=null&&a.columnDef.getGroupingValue?(n._groupingValuesCache[r]=a.columnDef.getGroupingValue(n.original),n._groupingValuesCache[r]):n.getValue(r)},n._groupingValuesCache={}},createCell:(n,o,r,a)=>{n.getIsGrouped=()=>o.getIsGrouped()&&o.id===r.groupingColumnId,n.getIsPlaceholder=()=>!n.getIsGrouped()&&o.getIsGrouped(),n.getIsAggregated=()=>{var l;return!n.getIsGrouped()&&!n.getIsPlaceholder()&&!!((l=r.subRows)!=null&&l.length)}}};function bb(n,o,r){if(!(o!=null&&o.length)||!r)return n;const a=n.filter(c=>!o.includes(c.id));return r==="remove"?a:[...o.map(c=>n.find(d=>d.id===c)).filter(Boolean),...a]}const wb={getInitialState:n=>({columnOrder:[],...n}),getDefaultOptions:n=>({onColumnOrderChange:_t("columnOrder",n)}),createColumn:(n,o)=>{n.getIndex=Z(r=>[Yr(o,r)],r=>r.findIndex(a=>a.id===n.id),J(o.options,"debugColumns")),n.getIsFirstColumn=r=>{var a;return((a=Yr(o,r)[0])==null?void 0:a.id)===n.id},n.getIsLastColumn=r=>{var a;const l=Yr(o,r);return((a=l[l.length-1])==null?void 0:a.id)===n.id}},createTable:n=>{n.setColumnOrder=o=>n.options.onColumnOrderChange==null?void 0:n.options.onColumnOrderChange(o),n.resetColumnOrder=o=>{var r;n.setColumnOrder(o?[]:(r=n.initialState.columnOrder)!=null?r:[])},n._getOrderColumnsFn=Z(()=>[n.getState().columnOrder,n.getState().grouping,n.options.groupedColumnMode],(o,r,a)=>l=>{let c=[];if(!(o!=null&&o.length))c=l;else{const d=[...o],m=[...l];for(;m.length&&d.length;){const p=d.shift(),x=m.findIndex(_=>_.id===p);x>-1&&c.push(m.splice(x,1)[0])}c=[...c,...m]}return bb(c,r,a)},J(n.options,"debugTable"))}},Wa=()=>({left:[],right:[]}),Sb={getInitialState:n=>({columnPinning:Wa(),...n}),getDefaultOptions:n=>({onColumnPinningChange:_t("columnPinning",n)}),createColumn:(n,o)=>{n.pin=r=>{const a=n.getLeafColumns().map(l=>l.id).filter(Boolean);o.setColumnPinning(l=>{var c,d;if(r==="right"){var m,p;return{left:((m=l==null?void 0:l.left)!=null?m:[]).filter(C=>!(a!=null&&a.includes(C))),right:[...((p=l==null?void 0:l.right)!=null?p:[]).filter(C=>!(a!=null&&a.includes(C))),...a]}}if(r==="left"){var x,_;return{left:[...((x=l==null?void 0:l.left)!=null?x:[]).filter(C=>!(a!=null&&a.includes(C))),...a],right:((_=l==null?void 0:l.right)!=null?_:[]).filter(C=>!(a!=null&&a.includes(C)))}}return{left:((c=l==null?void 0:l.left)!=null?c:[]).filter(C=>!(a!=null&&a.includes(C))),right:((d=l==null?void 0:l.right)!=null?d:[]).filter(C=>!(a!=null&&a.includes(C)))}})},n.getCanPin=()=>n.getLeafColumns().some(a=>{var l,c,d;return((l=a.columnDef.enablePinning)!=null?l:!0)&&((c=(d=o.options.enableColumnPinning)!=null?d:o.options.enablePinning)!=null?c:!0)}),n.getIsPinned=()=>{const r=n.getLeafColumns().map(m=>m.id),{left:a,right:l}=o.getState().columnPinning,c=r.some(m=>a==null?void 0:a.includes(m)),d=r.some(m=>l==null?void 0:l.includes(m));return c?"left":d?"right":!1},n.getPinnedIndex=()=>{var r,a;const l=n.getIsPinned();return l?(r=(a=o.getState().columnPinning)==null||(a=a[l])==null?void 0:a.indexOf(n.id))!=null?r:-1:0}},createRow:(n,o)=>{n.getCenterVisibleCells=Z(()=>[n._getAllVisibleCells(),o.getState().columnPinning.left,o.getState().columnPinning.right],(r,a,l)=>{const c=[...a??[],...l??[]];return r.filter(d=>!c.includes(d.column.id))},J(o.options,"debugRows")),n.getLeftVisibleCells=Z(()=>[n._getAllVisibleCells(),o.getState().columnPinning.left],(r,a)=>(a??[]).map(c=>r.find(d=>d.column.id===c)).filter(Boolean).map(c=>({...c,position:"left"})),J(o.options,"debugRows")),n.getRightVisibleCells=Z(()=>[n._getAllVisibleCells(),o.getState().columnPinning.right],(r,a)=>(a??[]).map(c=>r.find(d=>d.column.id===c)).filter(Boolean).map(c=>({...c,position:"right"})),J(o.options,"debugRows"))},createTable:n=>{n.setColumnPinning=o=>n.options.onColumnPinningChange==null?void 0:n.options.onColumnPinningChange(o),n.resetColumnPinning=o=>{var r,a;return n.setColumnPinning(o?Wa():(r=(a=n.initialState)==null?void 0:a.columnPinning)!=null?r:Wa())},n.getIsSomeColumnsPinned=o=>{var r;const a=n.getState().columnPinning;if(!o){var l,c;return!!((l=a.left)!=null&&l.length||(c=a.right)!=null&&c.length)}return!!((r=a[o])!=null&&r.length)},n.getLeftLeafColumns=Z(()=>[n.getAllLeafColumns(),n.getState().columnPinning.left],(o,r)=>(r??[]).map(a=>o.find(l=>l.id===a)).filter(Boolean),J(n.options,"debugColumns")),n.getRightLeafColumns=Z(()=>[n.getAllLeafColumns(),n.getState().columnPinning.right],(o,r)=>(r??[]).map(a=>o.find(l=>l.id===a)).filter(Boolean),J(n.options,"debugColumns")),n.getCenterLeafColumns=Z(()=>[n.getAllLeafColumns(),n.getState().columnPinning.left,n.getState().columnPinning.right],(o,r,a)=>{const l=[...r??[],...a??[]];return o.filter(c=>!l.includes(c.id))},J(n.options,"debugColumns"))}},Zi={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Qa=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),Cb={getDefaultColumnDef:()=>Zi,getInitialState:n=>({columnSizing:{},columnSizingInfo:Qa(),...n}),getDefaultOptions:n=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:_t("columnSizing",n),onColumnSizingInfoChange:_t("columnSizingInfo",n)}),createColumn:(n,o)=>{n.getSize=()=>{var r,a,l;const c=o.getState().columnSizing[n.id];return Math.min(Math.max((r=n.columnDef.minSize)!=null?r:Zi.minSize,(a=c??n.columnDef.size)!=null?a:Zi.size),(l=n.columnDef.maxSize)!=null?l:Zi.maxSize)},n.getStart=Z(r=>[r,Yr(o,r),o.getState().columnSizing],(r,a)=>a.slice(0,n.getIndex(r)).reduce((l,c)=>l+c.getSize(),0),J(o.options,"debugColumns")),n.getAfter=Z(r=>[r,Yr(o,r),o.getState().columnSizing],(r,a)=>a.slice(n.getIndex(r)+1).reduce((l,c)=>l+c.getSize(),0),J(o.options,"debugColumns")),n.resetSize=()=>{o.setColumnSizing(r=>{let{[n.id]:a,...l}=r;return l})},n.getCanResize=()=>{var r,a;return((r=n.columnDef.enableResizing)!=null?r:!0)&&((a=o.options.enableColumnResizing)!=null?a:!0)},n.getIsResizing=()=>o.getState().columnSizingInfo.isResizingColumn===n.id},createHeader:(n,o)=>{n.getSize=()=>{let r=0;const a=l=>{if(l.subHeaders.length)l.subHeaders.forEach(a);else{var c;r+=(c=l.column.getSize())!=null?c:0}};return a(n),r},n.getStart=()=>{if(n.index>0){const r=n.headerGroup.headers[n.index-1];return r.getStart()+r.getSize()}return 0},n.getResizeHandler=r=>{const a=o.getColumn(n.column.id),l=a==null?void 0:a.getCanResize();return c=>{if(!a||!l||(c.persist==null||c.persist(),Ya(c)&&c.touches&&c.touches.length>1))return;const d=n.getSize(),m=n?n.getLeafHeaders().map(D=>[D.column.id,D.column.getSize()]):[[a.id,a.getSize()]],p=Ya(c)?Math.round(c.touches[0].clientX):c.clientX,x={},_=(D,F)=>{typeof F=="number"&&(o.setColumnSizingInfo(q=>{var U,O;const V=o.options.columnResizeDirection==="rtl"?-1:1,$=(F-((U=q==null?void 0:q.startOffset)!=null?U:0))*V,le=Math.max($/((O=q==null?void 0:q.startSize)!=null?O:0),-.999999);return q.columnSizingStart.forEach(oe=>{let[G,ne]=oe;x[G]=Math.round(Math.max(ne+ne*le,0)*100)/100}),{...q,deltaOffset:$,deltaPercentage:le}}),(o.options.columnResizeMode==="onChange"||D==="end")&&o.setColumnSizing(q=>({...q,...x})))},C=D=>_("move",D),y=D=>{_("end",D),o.setColumnSizingInfo(F=>({...F,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},v=r||typeof document<"u"?document:null,R={moveHandler:D=>C(D.clientX),upHandler:D=>{v==null||v.removeEventListener("mousemove",R.moveHandler),v==null||v.removeEventListener("mouseup",R.upHandler),y(D.clientX)}},E={moveHandler:D=>(D.cancelable&&(D.preventDefault(),D.stopPropagation()),C(D.touches[0].clientX),!1),upHandler:D=>{var F;v==null||v.removeEventListener("touchmove",E.moveHandler),v==null||v.removeEventListener("touchend",E.upHandler),D.cancelable&&(D.preventDefault(),D.stopPropagation()),y((F=D.touches[0])==null?void 0:F.clientX)}},k=jb()?{passive:!1}:!1;Ya(c)?(v==null||v.addEventListener("touchmove",E.moveHandler,k),v==null||v.addEventListener("touchend",E.upHandler,k)):(v==null||v.addEventListener("mousemove",R.moveHandler,k),v==null||v.addEventListener("mouseup",R.upHandler,k)),o.setColumnSizingInfo(D=>({...D,startOffset:p,startSize:d,deltaOffset:0,deltaPercentage:0,columnSizingStart:m,isResizingColumn:a.id}))}}},createTable:n=>{n.setColumnSizing=o=>n.options.onColumnSizingChange==null?void 0:n.options.onColumnSizingChange(o),n.setColumnSizingInfo=o=>n.options.onColumnSizingInfoChange==null?void 0:n.options.onColumnSizingInfoChange(o),n.resetColumnSizing=o=>{var r;n.setColumnSizing(o?{}:(r=n.initialState.columnSizing)!=null?r:{})},n.resetHeaderSizeInfo=o=>{var r;n.setColumnSizingInfo(o?Qa():(r=n.initialState.columnSizingInfo)!=null?r:Qa())},n.getTotalSize=()=>{var o,r;return(o=(r=n.getHeaderGroups()[0])==null?void 0:r.headers.reduce((a,l)=>a+l.getSize(),0))!=null?o:0},n.getLeftTotalSize=()=>{var o,r;return(o=(r=n.getLeftHeaderGroups()[0])==null?void 0:r.headers.reduce((a,l)=>a+l.getSize(),0))!=null?o:0},n.getCenterTotalSize=()=>{var o,r;return(o=(r=n.getCenterHeaderGroups()[0])==null?void 0:r.headers.reduce((a,l)=>a+l.getSize(),0))!=null?o:0},n.getRightTotalSize=()=>{var o,r;return(o=(r=n.getRightHeaderGroups()[0])==null?void 0:r.headers.reduce((a,l)=>a+l.getSize(),0))!=null?o:0}}};let Ji=null;function jb(){if(typeof Ji=="boolean")return Ji;let n=!1;try{const o={get passive(){return n=!0,!1}},r=()=>{};window.addEventListener("test",r,o),window.removeEventListener("test",r)}catch{n=!1}return Ji=n,Ji}function Ya(n){return n.type==="touchstart"}const yb={getInitialState:n=>({columnVisibility:{},...n}),getDefaultOptions:n=>({onColumnVisibilityChange:_t("columnVisibility",n)}),createColumn:(n,o)=>{n.toggleVisibility=r=>{n.getCanHide()&&o.setColumnVisibility(a=>({...a,[n.id]:r??!n.getIsVisible()}))},n.getIsVisible=()=>{var r,a;const l=n.columns;return(r=l.length?l.some(c=>c.getIsVisible()):(a=o.getState().columnVisibility)==null?void 0:a[n.id])!=null?r:!0},n.getCanHide=()=>{var r,a;return((r=n.columnDef.enableHiding)!=null?r:!0)&&((a=o.options.enableHiding)!=null?a:!0)},n.getToggleVisibilityHandler=()=>r=>{n.toggleVisibility==null||n.toggleVisibility(r.target.checked)}},createRow:(n,o)=>{n._getAllVisibleCells=Z(()=>[n.getAllCells(),o.getState().columnVisibility],r=>r.filter(a=>a.column.getIsVisible()),J(o.options,"debugRows")),n.getVisibleCells=Z(()=>[n.getLeftVisibleCells(),n.getCenterVisibleCells(),n.getRightVisibleCells()],(r,a,l)=>[...r,...a,...l],J(o.options,"debugRows"))},createTable:n=>{const o=(r,a)=>Z(()=>[a(),a().filter(l=>l.getIsVisible()).map(l=>l.id).join("_")],l=>l.filter(c=>c.getIsVisible==null?void 0:c.getIsVisible()),J(n.options,"debugColumns"));n.getVisibleFlatColumns=o("getVisibleFlatColumns",()=>n.getAllFlatColumns()),n.getVisibleLeafColumns=o("getVisibleLeafColumns",()=>n.getAllLeafColumns()),n.getLeftVisibleLeafColumns=o("getLeftVisibleLeafColumns",()=>n.getLeftLeafColumns()),n.getRightVisibleLeafColumns=o("getRightVisibleLeafColumns",()=>n.getRightLeafColumns()),n.getCenterVisibleLeafColumns=o("getCenterVisibleLeafColumns",()=>n.getCenterLeafColumns()),n.setColumnVisibility=r=>n.options.onColumnVisibilityChange==null?void 0:n.options.onColumnVisibilityChange(r),n.resetColumnVisibility=r=>{var a;n.setColumnVisibility(r?{}:(a=n.initialState.columnVisibility)!=null?a:{})},n.toggleAllColumnsVisible=r=>{var a;r=(a=r)!=null?a:!n.getIsAllColumnsVisible(),n.setColumnVisibility(n.getAllLeafColumns().reduce((l,c)=>({...l,[c.id]:r||!(c.getCanHide!=null&&c.getCanHide())}),{}))},n.getIsAllColumnsVisible=()=>!n.getAllLeafColumns().some(r=>!(r.getIsVisible!=null&&r.getIsVisible())),n.getIsSomeColumnsVisible=()=>n.getAllLeafColumns().some(r=>r.getIsVisible==null?void 0:r.getIsVisible()),n.getToggleAllColumnsVisibilityHandler=()=>r=>{var a;n.toggleAllColumnsVisible((a=r.target)==null?void 0:a.checked)}}};function Yr(n,o){return o?o==="center"?n.getCenterVisibleLeafColumns():o==="left"?n.getLeftVisibleLeafColumns():n.getRightVisibleLeafColumns():n.getVisibleLeafColumns()}const Nb={createTable:n=>{n._getGlobalFacetedRowModel=n.options.getFacetedRowModel&&n.options.getFacetedRowModel(n,"__global__"),n.getGlobalFacetedRowModel=()=>n.options.manualFiltering||!n._getGlobalFacetedRowModel?n.getPreFilteredRowModel():n._getGlobalFacetedRowModel(),n._getGlobalFacetedUniqueValues=n.options.getFacetedUniqueValues&&n.options.getFacetedUniqueValues(n,"__global__"),n.getGlobalFacetedUniqueValues=()=>n._getGlobalFacetedUniqueValues?n._getGlobalFacetedUniqueValues():new Map,n._getGlobalFacetedMinMaxValues=n.options.getFacetedMinMaxValues&&n.options.getFacetedMinMaxValues(n,"__global__"),n.getGlobalFacetedMinMaxValues=()=>{if(n._getGlobalFacetedMinMaxValues)return n._getGlobalFacetedMinMaxValues()}}},Rb={getInitialState:n=>({globalFilter:void 0,...n}),getDefaultOptions:n=>({onGlobalFilterChange:_t("globalFilter",n),globalFilterFn:"auto",getColumnCanGlobalFilter:o=>{var r;const a=(r=n.getCoreRowModel().flatRows[0])==null||(r=r._getAllCellsByColumnId()[o.id])==null?void 0:r.getValue();return typeof a=="string"||typeof a=="number"}}),createColumn:(n,o)=>{n.getCanGlobalFilter=()=>{var r,a,l,c;return((r=n.columnDef.enableGlobalFilter)!=null?r:!0)&&((a=o.options.enableGlobalFilter)!=null?a:!0)&&((l=o.options.enableFilters)!=null?l:!0)&&((c=o.options.getColumnCanGlobalFilter==null?void 0:o.options.getColumnCanGlobalFilter(n))!=null?c:!0)&&!!n.accessorFn}},createTable:n=>{n.getGlobalAutoFilterFn=()=>nn.includesString,n.getGlobalFilterFn=()=>{var o,r;const{globalFilterFn:a}=n.options;return ps(a)?a:a==="auto"?n.getGlobalAutoFilterFn():(o=(r=n.options.filterFns)==null?void 0:r[a])!=null?o:nn[a]},n.setGlobalFilter=o=>{n.options.onGlobalFilterChange==null||n.options.onGlobalFilterChange(o)},n.resetGlobalFilter=o=>{n.setGlobalFilter(o?void 0:n.initialState.globalFilter)}}},Eb={getInitialState:n=>({expanded:{},...n}),getDefaultOptions:n=>({onExpandedChange:_t("expanded",n),paginateExpandedRows:!0}),createTable:n=>{let o=!1,r=!1;n._autoResetExpanded=()=>{var a,l;if(!o){n._queue(()=>{o=!0});return}if((a=(l=n.options.autoResetAll)!=null?l:n.options.autoResetExpanded)!=null?a:!n.options.manualExpanding){if(r)return;r=!0,n._queue(()=>{n.resetExpanded(),r=!1})}},n.setExpanded=a=>n.options.onExpandedChange==null?void 0:n.options.onExpandedChange(a),n.toggleAllRowsExpanded=a=>{a??!n.getIsAllRowsExpanded()?n.setExpanded(!0):n.setExpanded({})},n.resetExpanded=a=>{var l,c;n.setExpanded(a?{}:(l=(c=n.initialState)==null?void 0:c.expanded)!=null?l:{})},n.getCanSomeRowsExpand=()=>n.getPrePaginationRowModel().flatRows.some(a=>a.getCanExpand()),n.getToggleAllRowsExpandedHandler=()=>a=>{a.persist==null||a.persist(),n.toggleAllRowsExpanded()},n.getIsSomeRowsExpanded=()=>{const a=n.getState().expanded;return a===!0||Object.values(a).some(Boolean)},n.getIsAllRowsExpanded=()=>{const a=n.getState().expanded;return typeof a=="boolean"?a===!0:!(!Object.keys(a).length||n.getRowModel().flatRows.some(l=>!l.getIsExpanded()))},n.getExpandedDepth=()=>{let a=0;return(n.getState().expanded===!0?Object.keys(n.getRowModel().rowsById):Object.keys(n.getState().expanded)).forEach(c=>{const d=c.split(".");a=Math.max(a,d.length)}),a},n.getPreExpandedRowModel=()=>n.getSortedRowModel(),n.getExpandedRowModel=()=>(!n._getExpandedRowModel&&n.options.getExpandedRowModel&&(n._getExpandedRowModel=n.options.getExpandedRowModel(n)),n.options.manualExpanding||!n._getExpandedRowModel?n.getPreExpandedRowModel():n._getExpandedRowModel())},createRow:(n,o)=>{n.toggleExpanded=r=>{o.setExpanded(a=>{var l;const c=a===!0?!0:!!(a!=null&&a[n.id]);let d={};if(a===!0?Object.keys(o.getRowModel().rowsById).forEach(m=>{d[m]=!0}):d=a,r=(l=r)!=null?l:!c,!c&&r)return{...d,[n.id]:!0};if(c&&!r){const{[n.id]:m,...p}=d;return p}return a})},n.getIsExpanded=()=>{var r;const a=o.getState().expanded;return!!((r=o.options.getIsRowExpanded==null?void 0:o.options.getIsRowExpanded(n))!=null?r:a===!0||a!=null&&a[n.id])},n.getCanExpand=()=>{var r,a,l;return(r=o.options.getRowCanExpand==null?void 0:o.options.getRowCanExpand(n))!=null?r:((a=o.options.enableExpanding)!=null?a:!0)&&!!((l=n.subRows)!=null&&l.length)},n.getIsAllParentsExpanded=()=>{let r=!0,a=n;for(;r&&a.parentId;)a=o.getRow(a.parentId,!0),r=a.getIsExpanded();return r},n.getToggleExpandedHandler=()=>{const r=n.getCanExpand();return()=>{r&&n.toggleExpanded()}}}},ao=0,oo=10,Xa=()=>({pageIndex:ao,pageSize:oo}),Ab={getInitialState:n=>({...n,pagination:{...Xa(),...n==null?void 0:n.pagination}}),getDefaultOptions:n=>({onPaginationChange:_t("pagination",n)}),createTable:n=>{let o=!1,r=!1;n._autoResetPageIndex=()=>{var a,l;if(!o){n._queue(()=>{o=!0});return}if((a=(l=n.options.autoResetAll)!=null?l:n.options.autoResetPageIndex)!=null?a:!n.options.manualPagination){if(r)return;r=!0,n._queue(()=>{n.resetPageIndex(),r=!1})}},n.setPagination=a=>{const l=c=>vn(a,c);return n.options.onPaginationChange==null?void 0:n.options.onPaginationChange(l)},n.resetPagination=a=>{var l;n.setPagination(a?Xa():(l=n.initialState.pagination)!=null?l:Xa())},n.setPageIndex=a=>{n.setPagination(l=>{let c=vn(a,l.pageIndex);const d=typeof n.options.pageCount>"u"||n.options.pageCount===-1?Number.MAX_SAFE_INTEGER:n.options.pageCount-1;return c=Math.max(0,Math.min(c,d)),{...l,pageIndex:c}})},n.resetPageIndex=a=>{var l,c;n.setPageIndex(a?ao:(l=(c=n.initialState)==null||(c=c.pagination)==null?void 0:c.pageIndex)!=null?l:ao)},n.resetPageSize=a=>{var l,c;n.setPageSize(a?oo:(l=(c=n.initialState)==null||(c=c.pagination)==null?void 0:c.pageSize)!=null?l:oo)},n.setPageSize=a=>{n.setPagination(l=>{const c=Math.max(1,vn(a,l.pageSize)),d=l.pageSize*l.pageIndex,m=Math.floor(d/c);return{...l,pageIndex:m,pageSize:c}})},n.setPageCount=a=>n.setPagination(l=>{var c;let d=vn(a,(c=n.options.pageCount)!=null?c:-1);return typeof d=="number"&&(d=Math.max(-1,d)),{...l,pageCount:d}}),n.getPageOptions=Z(()=>[n.getPageCount()],a=>{let l=[];return a&&a>0&&(l=[...new Array(a)].fill(null).map((c,d)=>d)),l},J(n.options,"debugTable")),n.getCanPreviousPage=()=>n.getState().pagination.pageIndex>0,n.getCanNextPage=()=>{const{pageIndex:a}=n.getState().pagination,l=n.getPageCount();return l===-1?!0:l===0?!1:an.setPageIndex(a=>a-1),n.nextPage=()=>n.setPageIndex(a=>a+1),n.firstPage=()=>n.setPageIndex(0),n.lastPage=()=>n.setPageIndex(n.getPageCount()-1),n.getPrePaginationRowModel=()=>n.getExpandedRowModel(),n.getPaginationRowModel=()=>(!n._getPaginationRowModel&&n.options.getPaginationRowModel&&(n._getPaginationRowModel=n.options.getPaginationRowModel(n)),n.options.manualPagination||!n._getPaginationRowModel?n.getPrePaginationRowModel():n._getPaginationRowModel()),n.getPageCount=()=>{var a;return(a=n.options.pageCount)!=null?a:Math.ceil(n.getRowCount()/n.getState().pagination.pageSize)},n.getRowCount=()=>{var a;return(a=n.options.rowCount)!=null?a:n.getPrePaginationRowModel().rows.length}}},Za=()=>({top:[],bottom:[]}),Ib={getInitialState:n=>({rowPinning:Za(),...n}),getDefaultOptions:n=>({onRowPinningChange:_t("rowPinning",n)}),createRow:(n,o)=>{n.pin=(r,a,l)=>{const c=a?n.getLeafRows().map(p=>{let{id:x}=p;return x}):[],d=l?n.getParentRows().map(p=>{let{id:x}=p;return x}):[],m=new Set([...d,n.id,...c]);o.setRowPinning(p=>{var x,_;if(r==="bottom"){var C,y;return{top:((C=p==null?void 0:p.top)!=null?C:[]).filter(E=>!(m!=null&&m.has(E))),bottom:[...((y=p==null?void 0:p.bottom)!=null?y:[]).filter(E=>!(m!=null&&m.has(E))),...Array.from(m)]}}if(r==="top"){var v,R;return{top:[...((v=p==null?void 0:p.top)!=null?v:[]).filter(E=>!(m!=null&&m.has(E))),...Array.from(m)],bottom:((R=p==null?void 0:p.bottom)!=null?R:[]).filter(E=>!(m!=null&&m.has(E)))}}return{top:((x=p==null?void 0:p.top)!=null?x:[]).filter(E=>!(m!=null&&m.has(E))),bottom:((_=p==null?void 0:p.bottom)!=null?_:[]).filter(E=>!(m!=null&&m.has(E)))}})},n.getCanPin=()=>{var r;const{enableRowPinning:a,enablePinning:l}=o.options;return typeof a=="function"?a(n):(r=a??l)!=null?r:!0},n.getIsPinned=()=>{const r=[n.id],{top:a,bottom:l}=o.getState().rowPinning,c=r.some(m=>a==null?void 0:a.includes(m)),d=r.some(m=>l==null?void 0:l.includes(m));return c?"top":d?"bottom":!1},n.getPinnedIndex=()=>{var r,a;const l=n.getIsPinned();if(!l)return-1;const c=(r=l==="top"?o.getTopRows():o.getBottomRows())==null?void 0:r.map(d=>{let{id:m}=d;return m});return(a=c==null?void 0:c.indexOf(n.id))!=null?a:-1}},createTable:n=>{n.setRowPinning=o=>n.options.onRowPinningChange==null?void 0:n.options.onRowPinningChange(o),n.resetRowPinning=o=>{var r,a;return n.setRowPinning(o?Za():(r=(a=n.initialState)==null?void 0:a.rowPinning)!=null?r:Za())},n.getIsSomeRowsPinned=o=>{var r;const a=n.getState().rowPinning;if(!o){var l,c;return!!((l=a.top)!=null&&l.length||(c=a.bottom)!=null&&c.length)}return!!((r=a[o])!=null&&r.length)},n._getPinnedRows=(o,r,a)=>{var l;return((l=n.options.keepPinnedRows)==null||l?(r??[]).map(d=>{const m=n.getRow(d,!0);return m.getIsAllParentsExpanded()?m:null}):(r??[]).map(d=>o.find(m=>m.id===d))).filter(Boolean).map(d=>({...d,position:a}))},n.getTopRows=Z(()=>[n.getRowModel().rows,n.getState().rowPinning.top],(o,r)=>n._getPinnedRows(o,r,"top"),J(n.options,"debugRows")),n.getBottomRows=Z(()=>[n.getRowModel().rows,n.getState().rowPinning.bottom],(o,r)=>n._getPinnedRows(o,r,"bottom"),J(n.options,"debugRows")),n.getCenterRows=Z(()=>[n.getRowModel().rows,n.getState().rowPinning.top,n.getState().rowPinning.bottom],(o,r,a)=>{const l=new Set([...r??[],...a??[]]);return o.filter(c=>!l.has(c.id))},J(n.options,"debugRows"))}},Fb={getInitialState:n=>({rowSelection:{},...n}),getDefaultOptions:n=>({onRowSelectionChange:_t("rowSelection",n),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:n=>{n.setRowSelection=o=>n.options.onRowSelectionChange==null?void 0:n.options.onRowSelectionChange(o),n.resetRowSelection=o=>{var r;return n.setRowSelection(o?{}:(r=n.initialState.rowSelection)!=null?r:{})},n.toggleAllRowsSelected=o=>{n.setRowSelection(r=>{o=typeof o<"u"?o:!n.getIsAllRowsSelected();const a={...r},l=n.getPreGroupedRowModel().flatRows;return o?l.forEach(c=>{c.getCanSelect()&&(a[c.id]=!0)}):l.forEach(c=>{delete a[c.id]}),a})},n.toggleAllPageRowsSelected=o=>n.setRowSelection(r=>{const a=typeof o<"u"?o:!n.getIsAllPageRowsSelected(),l={...r};return n.getRowModel().rows.forEach(c=>{lo(l,c.id,a,!0,n)}),l}),n.getPreSelectedRowModel=()=>n.getCoreRowModel(),n.getSelectedRowModel=Z(()=>[n.getState().rowSelection,n.getCoreRowModel()],(o,r)=>Object.keys(o).length?Ja(n,r):{rows:[],flatRows:[],rowsById:{}},J(n.options,"debugTable")),n.getFilteredSelectedRowModel=Z(()=>[n.getState().rowSelection,n.getFilteredRowModel()],(o,r)=>Object.keys(o).length?Ja(n,r):{rows:[],flatRows:[],rowsById:{}},J(n.options,"debugTable")),n.getGroupedSelectedRowModel=Z(()=>[n.getState().rowSelection,n.getSortedRowModel()],(o,r)=>Object.keys(o).length?Ja(n,r):{rows:[],flatRows:[],rowsById:{}},J(n.options,"debugTable")),n.getIsAllRowsSelected=()=>{const o=n.getFilteredRowModel().flatRows,{rowSelection:r}=n.getState();let a=!!(o.length&&Object.keys(r).length);return a&&o.some(l=>l.getCanSelect()&&!r[l.id])&&(a=!1),a},n.getIsAllPageRowsSelected=()=>{const o=n.getPaginationRowModel().flatRows.filter(l=>l.getCanSelect()),{rowSelection:r}=n.getState();let a=!!o.length;return a&&o.some(l=>!r[l.id])&&(a=!1),a},n.getIsSomeRowsSelected=()=>{var o;const r=Object.keys((o=n.getState().rowSelection)!=null?o:{}).length;return r>0&&r{const o=n.getPaginationRowModel().flatRows;return n.getIsAllPageRowsSelected()?!1:o.filter(r=>r.getCanSelect()).some(r=>r.getIsSelected()||r.getIsSomeSelected())},n.getToggleAllRowsSelectedHandler=()=>o=>{n.toggleAllRowsSelected(o.target.checked)},n.getToggleAllPageRowsSelectedHandler=()=>o=>{n.toggleAllPageRowsSelected(o.target.checked)}},createRow:(n,o)=>{n.toggleSelected=(r,a)=>{const l=n.getIsSelected();o.setRowSelection(c=>{var d;if(r=typeof r<"u"?r:!l,n.getCanSelect()&&l===r)return c;const m={...c};return lo(m,n.id,r,(d=a==null?void 0:a.selectChildren)!=null?d:!0,o),m})},n.getIsSelected=()=>{const{rowSelection:r}=o.getState();return Mo(n,r)},n.getIsSomeSelected=()=>{const{rowSelection:r}=o.getState();return uo(n,r)==="some"},n.getIsAllSubRowsSelected=()=>{const{rowSelection:r}=o.getState();return uo(n,r)==="all"},n.getCanSelect=()=>{var r;return typeof o.options.enableRowSelection=="function"?o.options.enableRowSelection(n):(r=o.options.enableRowSelection)!=null?r:!0},n.getCanSelectSubRows=()=>{var r;return typeof o.options.enableSubRowSelection=="function"?o.options.enableSubRowSelection(n):(r=o.options.enableSubRowSelection)!=null?r:!0},n.getCanMultiSelect=()=>{var r;return typeof o.options.enableMultiRowSelection=="function"?o.options.enableMultiRowSelection(n):(r=o.options.enableMultiRowSelection)!=null?r:!0},n.getToggleSelectedHandler=()=>{const r=n.getCanSelect();return a=>{var l;r&&n.toggleSelected((l=a.target)==null?void 0:l.checked)}}}},lo=(n,o,r,a,l)=>{var c;const d=l.getRow(o,!0);r?(d.getCanMultiSelect()||Object.keys(n).forEach(m=>delete n[m]),d.getCanSelect()&&(n[o]=!0)):delete n[o],a&&(c=d.subRows)!=null&&c.length&&d.getCanSelectSubRows()&&d.subRows.forEach(m=>lo(n,m.id,r,a,l))};function Ja(n,o){const r=n.getState().rowSelection,a=[],l={},c=function(d,m){return d.map(p=>{var x;const _=Mo(p,r);if(_&&(a.push(p),l[p.id]=p),(x=p.subRows)!=null&&x.length&&(p={...p,subRows:c(p.subRows)}),_)return p}).filter(Boolean)};return{rows:c(o.rows),flatRows:a,rowsById:l}}function Mo(n,o){var r;return(r=o[n.id])!=null?r:!1}function uo(n,o,r){var a;if(!((a=n.subRows)!=null&&a.length))return!1;let l=!0,c=!1;return n.subRows.forEach(d=>{if(!(c&&!l)&&(d.getCanSelect()&&(Mo(d,o)?c=!0:l=!1),d.subRows&&d.subRows.length)){const m=uo(d,o);m==="all"?c=!0:(m==="some"&&(c=!0),l=!1)}}),l?"all":c?"some":!1}const co=/([0-9]+)/gm,Db=(n,o,r)=>Fd(Cn(n.getValue(r)).toLowerCase(),Cn(o.getValue(r)).toLowerCase()),Tb=(n,o,r)=>Fd(Cn(n.getValue(r)),Cn(o.getValue(r))),Mb=(n,o,r)=>Lo(Cn(n.getValue(r)).toLowerCase(),Cn(o.getValue(r)).toLowerCase()),Lb=(n,o,r)=>Lo(Cn(n.getValue(r)),Cn(o.getValue(r))),Ob=(n,o,r)=>{const a=n.getValue(r),l=o.getValue(r);return a>l?1:aLo(n.getValue(r),o.getValue(r));function Lo(n,o){return n===o?0:n>o?1:-1}function Cn(n){return typeof n=="number"?isNaN(n)||n===1/0||n===-1/0?"":String(n):typeof n=="string"?n:""}function Fd(n,o){const r=n.split(co).filter(Boolean),a=o.split(co).filter(Boolean);for(;r.length&&a.length;){const l=r.shift(),c=a.shift(),d=parseInt(l,10),m=parseInt(c,10),p=[d,m].sort();if(isNaN(p[0])){if(l>c)return 1;if(c>l)return-1;continue}if(isNaN(p[1]))return isNaN(d)?-1:1;if(d>m)return 1;if(m>d)return-1}return r.length-a.length}const Hr={alphanumeric:Db,alphanumericCaseSensitive:Tb,text:Mb,textCaseSensitive:Lb,datetime:Ob,basic:Pb},qb={getInitialState:n=>({sorting:[],...n}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:n=>({onSortingChange:_t("sorting",n),isMultiSortEvent:o=>o.shiftKey}),createColumn:(n,o)=>{n.getAutoSortingFn=()=>{const r=o.getFilteredRowModel().flatRows.slice(10);let a=!1;for(const l of r){const c=l==null?void 0:l.getValue(n.id);if(Object.prototype.toString.call(c)==="[object Date]")return Hr.datetime;if(typeof c=="string"&&(a=!0,c.split(co).length>1))return Hr.alphanumeric}return a?Hr.text:Hr.basic},n.getAutoSortDir=()=>{const r=o.getFilteredRowModel().flatRows[0];return typeof(r==null?void 0:r.getValue(n.id))=="string"?"asc":"desc"},n.getSortingFn=()=>{var r,a;if(!n)throw new Error;return ps(n.columnDef.sortingFn)?n.columnDef.sortingFn:n.columnDef.sortingFn==="auto"?n.getAutoSortingFn():(r=(a=o.options.sortingFns)==null?void 0:a[n.columnDef.sortingFn])!=null?r:Hr[n.columnDef.sortingFn]},n.toggleSorting=(r,a)=>{const l=n.getNextSortingOrder(),c=typeof r<"u"&&r!==null;o.setSorting(d=>{const m=d==null?void 0:d.find(v=>v.id===n.id),p=d==null?void 0:d.findIndex(v=>v.id===n.id);let x=[],_,C=c?r:l==="desc";if(d!=null&&d.length&&n.getCanMultiSort()&&a?m?_="toggle":_="add":d!=null&&d.length&&p!==d.length-1?_="replace":m?_="toggle":_="replace",_==="toggle"&&(c||l||(_="remove")),_==="add"){var y;x=[...d,{id:n.id,desc:C}],x.splice(0,x.length-((y=o.options.maxMultiSortColCount)!=null?y:Number.MAX_SAFE_INTEGER))}else _==="toggle"?x=d.map(v=>v.id===n.id?{...v,desc:C}:v):_==="remove"?x=d.filter(v=>v.id!==n.id):x=[{id:n.id,desc:C}];return x})},n.getFirstSortDir=()=>{var r,a;return((r=(a=n.columnDef.sortDescFirst)!=null?a:o.options.sortDescFirst)!=null?r:n.getAutoSortDir()==="desc")?"desc":"asc"},n.getNextSortingOrder=r=>{var a,l;const c=n.getFirstSortDir(),d=n.getIsSorted();return d?d!==c&&((a=o.options.enableSortingRemoval)==null||a)&&(!(r&&(l=o.options.enableMultiRemove)!=null)||l)?!1:d==="desc"?"asc":"desc":c},n.getCanSort=()=>{var r,a;return((r=n.columnDef.enableSorting)!=null?r:!0)&&((a=o.options.enableSorting)!=null?a:!0)&&!!n.accessorFn},n.getCanMultiSort=()=>{var r,a;return(r=(a=n.columnDef.enableMultiSort)!=null?a:o.options.enableMultiSort)!=null?r:!!n.accessorFn},n.getIsSorted=()=>{var r;const a=(r=o.getState().sorting)==null?void 0:r.find(l=>l.id===n.id);return a?a.desc?"desc":"asc":!1},n.getSortIndex=()=>{var r,a;return(r=(a=o.getState().sorting)==null?void 0:a.findIndex(l=>l.id===n.id))!=null?r:-1},n.clearSorting=()=>{o.setSorting(r=>r!=null&&r.length?r.filter(a=>a.id!==n.id):[])},n.getToggleSortingHandler=()=>{const r=n.getCanSort();return a=>{r&&(a.persist==null||a.persist(),n.toggleSorting==null||n.toggleSorting(void 0,n.getCanMultiSort()?o.options.isMultiSortEvent==null?void 0:o.options.isMultiSortEvent(a):!1))}}},createTable:n=>{n.setSorting=o=>n.options.onSortingChange==null?void 0:n.options.onSortingChange(o),n.resetSorting=o=>{var r,a;n.setSorting(o?[]:(r=(a=n.initialState)==null?void 0:a.sorting)!=null?r:[])},n.getPreSortedRowModel=()=>n.getGroupedRowModel(),n.getSortedRowModel=()=>(!n._getSortedRowModel&&n.options.getSortedRowModel&&(n._getSortedRowModel=n.options.getSortedRowModel(n)),n.options.manualSorting||!n._getSortedRowModel?n.getPreSortedRowModel():n._getSortedRowModel())}},kb=[ob,yb,wb,Sb,lb,ub,Nb,Rb,qb,vb,Eb,Ab,Ib,Fb,Cb];function $b(n){var o,r;const a=[...kb,...(o=n._features)!=null?o:[]];let l={_features:a};const c=l._features.reduce((y,v)=>Object.assign(y,v.getDefaultOptions==null?void 0:v.getDefaultOptions(l)),{}),d=y=>l.options.mergeOptions?l.options.mergeOptions(c,y):{...c,...y};let p={...{},...(r=n.initialState)!=null?r:{}};l._features.forEach(y=>{var v;p=(v=y.getInitialState==null?void 0:y.getInitialState(p))!=null?v:p});const x=[];let _=!1;const C={_features:a,options:{...c,...n},initialState:p,_queue:y=>{x.push(y),_||(_=!0,Promise.resolve().then(()=>{for(;x.length;)x.shift()();_=!1}).catch(v=>setTimeout(()=>{throw v})))},reset:()=>{l.setState(l.initialState)},setOptions:y=>{const v=vn(y,l.options);l.options=d(v)},getState:()=>l.options.state,setState:y=>{l.options.onStateChange==null||l.options.onStateChange(y)},_getRowId:(y,v,R)=>{var E;return(E=l.options.getRowId==null?void 0:l.options.getRowId(y,v,R))!=null?E:`${R?[R.id,v].join("."):v}`},getCoreRowModel:()=>(l._getCoreRowModel||(l._getCoreRowModel=l.options.getCoreRowModel(l)),l._getCoreRowModel()),getRowModel:()=>l.getPaginationRowModel(),getRow:(y,v)=>{let R=(v?l.getPrePaginationRowModel():l.getRowModel()).rowsById[y];if(!R&&(R=l.getCoreRowModel().rowsById[y],!R))throw new Error;return R},_getDefaultColumnDef:Z(()=>[l.options.defaultColumn],y=>{var v;return y=(v=y)!=null?v:{},{header:R=>{const E=R.header.column.columnDef;return E.accessorKey?E.accessorKey:E.accessorFn?E.id:null},cell:R=>{var E,k;return(E=(k=R.renderValue())==null||k.toString==null?void 0:k.toString())!=null?E:null},...l._features.reduce((R,E)=>Object.assign(R,E.getDefaultColumnDef==null?void 0:E.getDefaultColumnDef()),{}),...y}},J(n,"debugColumns")),_getColumnDefs:()=>l.options.columns,getAllColumns:Z(()=>[l._getColumnDefs()],y=>{const v=function(R,E,k){return k===void 0&&(k=0),R.map(D=>{const F=ab(l,D,k,E),q=D;return F.columns=q.columns?v(q.columns,F,k+1):[],F})};return v(y)},J(n,"debugColumns")),getAllFlatColumns:Z(()=>[l.getAllColumns()],y=>y.flatMap(v=>v.getFlatColumns()),J(n,"debugColumns")),_getAllFlatColumnsById:Z(()=>[l.getAllFlatColumns()],y=>y.reduce((v,R)=>(v[R.id]=R,v),{}),J(n,"debugColumns")),getAllLeafColumns:Z(()=>[l.getAllColumns(),l._getOrderColumnsFn()],(y,v)=>{let R=y.flatMap(E=>E.getLeafColumns());return v(R)},J(n,"debugColumns")),getColumn:y=>l._getAllFlatColumnsById()[y]};Object.assign(l,C);for(let y=0;yZ(()=>[n.options.data],o=>{const r={rows:[],flatRows:[],rowsById:{}},a=function(l,c,d){c===void 0&&(c=0);const m=[];for(let x=0;xn._autoResetPageIndex()))}function Td(n,o,r){return r.options.filterFromLeafRows?Ub(n,o,r):Bb(n,o,r)}function Ub(n,o,r){var a;const l=[],c={},d=(a=r.options.maxLeafRowFilterDepth)!=null?a:100,m=function(p,x){x===void 0&&(x=0);const _=[];for(let y=0;yZ(()=>[n.getPreFilteredRowModel(),n.getState().columnFilters,n.getState().globalFilter,n.getFilteredRowModel()],(r,a,l)=>{if(!r.rows.length||!(a!=null&&a.length)&&!l)return r;const c=[...a.map(m=>m.id).filter(m=>m!==o),l?"__global__":void 0].filter(Boolean),d=m=>{for(let p=0;pZ(()=>{var r;return[(r=n.getColumn(o))==null?void 0:r.getFacetedRowModel()]},r=>{if(!r)return new Map;let a=new Map;for(let c=0;cZ(()=>[n.getPreFilteredRowModel(),n.getState().columnFilters,n.getState().globalFilter],(o,r,a)=>{if(!o.rows.length||!(r!=null&&r.length)&&!a){for(let y=0;y{var v;const R=n.getColumn(y.id);if(!R)return;const E=R.getFilterFn();E&&l.push({id:y.id,filterFn:E,resolvedValue:(v=E.resolveFilterValue==null?void 0:E.resolveFilterValue(y.value))!=null?v:y.value})});const d=(r??[]).map(y=>y.id),m=n.getGlobalFilterFn(),p=n.getAllLeafColumns().filter(y=>y.getCanGlobalFilter());a&&m&&p.length&&(d.push("__global__"),p.forEach(y=>{var v;c.push({id:y.id,filterFn:m,resolvedValue:(v=m.resolveFilterValue==null?void 0:m.resolveFilterValue(a))!=null?v:a})}));let x,_;for(let y=0;y{v.columnFiltersMeta[E]=k})}if(c.length){for(let R=0;R{v.columnFiltersMeta[E]=k})){v.columnFilters.__global__=!0;break}}v.columnFilters.__global__!==!0&&(v.columnFilters.__global__=!1)}}const C=y=>{for(let v=0;vn._autoResetPageIndex()))}function Hb(){return n=>Z(()=>[n.getState().sorting,n.getPreSortedRowModel()],(o,r)=>{if(!r.rows.length||!(o!=null&&o.length))return r;const a=n.getState().sorting,l=[],c=a.filter(p=>{var x;return(x=n.getColumn(p.id))==null?void 0:x.getCanSort()}),d={};c.forEach(p=>{const x=n.getColumn(p.id);x&&(d[p.id]={sortUndefined:x.columnDef.sortUndefined,invertSorting:x.columnDef.invertSorting,sortingFn:x.getSortingFn()})});const m=p=>{const x=p.map(_=>({..._}));return x.sort((_,C)=>{for(let v=0;v{var C;l.push(_),(C=_.subRows)!=null&&C.length&&(_.subRows=m(_.subRows))}),x};return{rows:m(r.rows),flatRows:l,rowsById:r.rowsById}},J(n.options,"debugTable","getSortedRowModel",()=>n._autoResetPageIndex()))}/** - * react-table - * - * Copyright (c) TanStack - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function rs(n,o){return n?Kb(n)?M.createElement(n,o):n:null}function Kb(n){return Wb(n)||typeof n=="function"||Qb(n)}function Wb(n){return typeof n=="function"&&(()=>{const o=Object.getPrototypeOf(n);return o.prototype&&o.prototype.isReactComponent})()}function Qb(n){return typeof n=="object"&&typeof n.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(n.$$typeof.description)}function Md(n){const o={state:{},onStateChange:()=>{},renderFallbackValue:null,...n},[r]=M.useState(()=>({current:$b(o)})),[a,l]=M.useState(()=>r.current.initialState);return r.current.setOptions(c=>({...c,...n,state:{...a,...n.state},onStateChange:d=>{l(d),n.onStateChange==null||n.onStateChange(d)}})),r.current}const Yb=({buttonText:n,title:o="",content:r,className:a=""})=>i.jsx("div",{className:`flex items-baseline justify-center mr-4 font-medium ${a}`,children:i.jsxs(pr,{children:[i.jsx(Mc,{asChild:!0,children:i.jsxs(H,{variant:"link",className:"inline-flex items-center font-medium group",children:[i.jsx("span",{className:"underline-offset-4 group-hover:underline",children:n}),i.jsx(Bv,{className:"w-4 h-4 ml-1 text-muted-foreground"})]})}),i.jsxs(xr,{className:"sm:max-w-[425px]",children:[i.jsx(_r,{children:i.jsx(vr,{children:o})}),i.jsxs(mo,{className:"grid gap-4 py-2",children:[r,i.jsx(br,{children:i.jsx(es,{asChild:!0,children:i.jsx(H,{type:"button",children:w("common.close")})})})]})]})]})});function Xb(n){let a=0;for(let _=0;_>_*8&255;l+=("00"+C.toString(16)).substr(-2)}const c=parseInt(l.substr(1,2),16),d=parseInt(l.substr(3,2),16),m=parseInt(l.substr(5,2),16),p=`#${(c*.7|0).toString(16).padStart(2,"0")}${(d*.7|0).toString(16).padStart(2,"0")}${(m*.7|0).toString(16).padStart(2,"0")}`,x=`#${Math.min(255,Math.floor(c+(255-c)*.7)).toString(16).padStart(2,"0")}${Math.min(255,Math.floor(d+(255-d)*.7)).toString(16).padStart(2,"0")}${Math.min(255,Math.floor(m+(255-m)*.7)).toString(16).padStart(2,"0")}`;return[p,x]}const Ld=({label:n,className:o})=>{const[r,a]=Xb(n);return i.jsx(ho,{className:o,style:o?{}:{backgroundColor:a,color:r},children:n})};function Od({table:n,header:o,className:r}){return o.column.getCanSort()?i.jsx("div",{className:pe("flex items-center space-x-2",r),children:i.jsxs(os,{children:[i.jsx(ls,{asChild:!0,children:i.jsxs(H,{"aria-label":o.column.getIsSorted()==="desc"?w("common.sort_desc_description"):o.column.getIsSorted()==="asc"?w("common.sort_asc_description"):w("common.sort_none_description"),size:"sm",variant:"ghost",className:"-ml-3 h-8 data-[state=open]:bg-accent font-bold text-muted-foreground",children:[rs(o.column.columnDef.header,o.getContext()),o.column.getIsSorted()==="desc"?i.jsx(vc,{className:"w-4 h-4 ml-2","aria-hidden":"true"}):o.column.getIsSorted()==="asc"?i.jsx(bc,{className:"w-4 h-4 ml-2","aria-hidden":"true"}):i.jsx(I0,{className:"w-4 h-4 ml-2 text-muted-foreground/30","aria-hidden":"true"})]})}),i.jsxs(us,{align:"start",children:[o.column.getCanSort()&&i.jsxs(i.Fragment,{children:[i.jsxs(Wr,{onClick:()=>o.column.toggleSorting(!1),"aria-label":w("common.sort_asc"),children:[i.jsx(bc,{className:"mr-2 h-3.5 w-3.5 text-muted-foreground/70","aria-hidden":"true"}),w("common.sort_asc")]}),i.jsxs(Wr,{onClick:()=>o.column.toggleSorting(!0),"aria-label":w("common.sort_desc"),children:[i.jsx(vc,{className:"mr-2 h-3.5 w-3.5 text-muted-foreground/70","aria-hidden":"true"}),w("common.sort_desc")]})]}),o.column.getCanSort()&&o.column.getCanHide()&&i.jsx(po,{}),o.column.getCanHide()&&i.jsxs(Wr,{onClick:()=>o.column.toggleVisibility(!1),"aria-label":w("common.hide"),children:[i.jsx(hd,{className:"mr-2 h-3.5 w-3.5 text-muted-foreground/70","aria-hidden":"true"}),w("common.hide")]})]})]})}):i.jsxs(i.Fragment,{children:[i.jsx("div",{className:pe("data-[state=open]:bg-accent tracking-wide text-ellipsis",r),children:o.isPlaceholder?null:rs(o.column.columnDef.header,o.getContext())}),!1]})}function Zb({table:n,className:o,enablePageSizeSelector:r=!0,visible:a="auto"}){const l=M.useMemo(()=>a===!0,[a]),c=M.useMemo(()=>a==="auto",[a]);return!l||c&&n.getPageCount()<1?null:i.jsxs("div",{className:o,children:[i.jsx("div",{className:"flex-1 text-base text-muted-foreground",children:n.getSelectedRowModel().rows.length>0&&i.jsx(i.Fragment,{children:w("common.rows_selected_of_total",{count:n.getFilteredSelectedRowModel().rows.length,total:n.getFilteredRowModel().rows.length})})}),i.jsxs("div",{className:"flex justify-between space-x-6 lg:space-x-8",children:[r&&i.jsxs("div",{className:"flex items-center space-x-2 grow",children:[i.jsx("p",{className:"text-sm font-medium",children:w("common.rows_per_page")}),i.jsxs(kn,{value:`${n.getState().pagination.pageSize}`,onValueChange:d=>{n.setPageSize(Number(d))},children:[i.jsx($n,{className:"h-8 w-[70px]",children:i.jsx(Un,{placeholder:n.getState().pagination.pageSize})}),i.jsx(Bn,{side:"top",children:Vv.map(d=>i.jsx(Vt,{value:`${d}`,children:d},d))})]})]}),i.jsxs("div",{className:pe("flex space-x-2 flex-1",r?"justify-end":"justify-between"),children:[i.jsx("div",{className:"flex w-[150px] items-center justify-start",children:i.jsx("p",{className:"text-sm font-medium ",children:w("common.num_page_of_total",{count:n.getState().pagination.pageIndex+1,total:n.getPageCount()})})}),i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsxs(H,{type:"button",variant:"outline",className:"hidden w-8 h-8 p-0 lg:flex",onClick:()=>n.setPageIndex(zv),disabled:!n.getCanPreviousPage(),children:[i.jsx("span",{className:"sr-only",children:w("common.go_to_first_page")}),i.jsx(F0,{className:"w-4 h-4"})]}),i.jsxs(H,{type:"button",variant:"outline",className:"w-8 h-8 p-0",onClick:()=>n.previousPage(),disabled:!n.getCanPreviousPage(),children:[i.jsx("span",{className:"sr-only",children:w("common.go_to_prev_page")}),i.jsx(Gv,{className:"w-4 h-4"})]}),i.jsxs(H,{type:"button",variant:"outline",className:"w-8 h-8 p-0",onClick:()=>n.nextPage(),disabled:!n.getCanNextPage(),children:[i.jsx("span",{className:"sr-only",children:w("common.go_to_next_page")}),i.jsx(Hv,{className:"w-4 h-4"})]}),i.jsxs(H,{type:"button",variant:"outline",className:"hidden w-8 h-8 p-0 lg:flex",onClick:()=>n.setPageIndex(n.getPageCount()+1),disabled:!n.getCanNextPage(),children:[i.jsx("span",{className:"sr-only",children:w("common.go_to_last_page")}),i.jsx(D0,{className:"w-4 h-4"})]})]})]})]})]})}function xs({table:n,title:o,description:r,caption:a,paginationOptions:l,headerOptions:c={visible:!0},children:d,className:m,contentClassName:p,footerClassName:x,rowClassName:_,cellClassName:C,onRowClick:y,activeRowIndex:v}){var k;const{t:R}=st(),E=c==null?void 0:c.visible;return i.jsxs(Oe,{className:m,children:[(o||r)&&i.jsxs(dt,{className:"pb-0",children:[i.jsx(Ve,{children:o}),i.jsx(We,{children:r})]}),i.jsxs(Pe,{className:pe("pt-6",p),children:[d&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"flex space-x-2",children:d}),i.jsx(bn,{className:"my-4"})]}),i.jsxs(xo,{children:[typeof a<"u"&&i.jsx(Kv,{children:a}),E&&n.getHeaderGroups().length&&i.jsx(_o,{children:n.getHeaderGroups().map(D=>i.jsx(wn,{className:_,children:D.headers.map(F=>i.jsx(vo,{colSpan:F.colSpan,style:{width:F.getSize()===Number.MAX_SAFE_INTEGER?"auto":F.getSize()},children:i.jsx(Od,{table:n,header:F})},F.id))},D.id))}),i.jsx(bo,{children:(k=n.getRowModel().rows)!=null&&k.length?n.getRowModel().rows.map(D=>i.jsx(wn,{onClick:()=>{y&&y(D)},tabIndex:0,"data-state":D.getIsSelected()&&"selected",className:pe(D.getIsSelected()||v===D.index?"bg-accent cursor-pointer hover:bg-accent":"cursor-pointer",_),children:D.getVisibleCells().map(F=>i.jsx(Xr,{className:C,style:{width:F.column.getSize()===Number.MAX_SAFE_INTEGER?"auto":F.column.getSize()},children:rs(F.column.columnDef.cell,F.getContext())},F.id))},D.id)):i.jsx(wn,{className:_,children:i.jsx(Xr,{className:pe("h-24 text-center",C),colSpan:n.getAllColumns.length,children:R("components.data_table.no_results")})})})]})]}),i.jsx(Et,{className:x,children:i.jsx(Zb,{className:"flex-1",table:n,...l})})]})}function Jb({actions:n,rowContext:o}){return i.jsxs(os,{children:[i.jsx(ls,{asChild:!0,children:i.jsxs(H,{size:"icon",variant:"outline",className:"w-8 h-8",children:[i.jsx(O0,{className:"h-3.5 w-3.5"}),i.jsx("span",{className:"sr-only",children:w("common.open_menu")})]})}),i.jsxs(us,{align:"end",children:[i.jsxs(Lc,{children:[w("common.actions")," "]}),n&&n(o).map((r,a)=>r.label==="-"?i.jsx(po,{},a):i.jsxs(Wr,{onClick:l=>r.onClick?r.onClick(o,l):null,children:[r.icon&&i.jsx(i.Fragment,{children:r.icon}),r.label,r.shortcut&&i.jsx(Wv,{children:r.shortcut})]},a))]})]})}function ew(){return{id:"select",header:({table:n})=>i.jsx(ts,{id:"select-all",checked:n.getIsAllPageRowsSelected()||n.getIsSomePageRowsSelected()&&"indeterminate",onCheckedChange:o=>n.toggleAllPageRowsSelected(!!o),"aria-label":w("common.select_all"),className:"translate-y-[2px]"}),cell:({row:n})=>i.jsx(ts,{id:`select-row-${n.id}`,checked:n.getIsSelected(),onCheckedChange:o=>{n.toggleSelected(!!o)},"aria-label":w("common.select_row"),className:"translate-y-[2px]"}),enableSorting:!1,enableHiding:!1}}function _s({columnCount:n,rowCount:o=10,searchableColumnCount:r=0,filterableColumnCount:a=0,showViewOptions:l=!0,cellWidths:c=["auto"],withPagination:d=!0,shrinkZero:m=!1,className:p,...x}){return i.jsxs("div",{className:pe("w-full space-y-2.5 overflow-auto",p),...x,children:[i.jsxs("div",{className:"flex items-center justify-between w-full p-1 space-x-2 overflow-auto",children:[i.jsxs("div",{className:"flex items-center flex-1 space-x-2",children:[r>0?Array.from({length:r}).map((_,C)=>i.jsx(ct,{className:"w-40 h-7 lg:w-60"},C)):null,a>0?Array.from({length:a}).map((_,C)=>i.jsx(ct,{className:"h-7 w-[4.5rem] border-dashed"},C)):null]}),l?i.jsx(ct,{className:"ml-auto hidden h-7 w-[4.5rem] lg:flex"}):null]}),i.jsx("div",{className:"border rounded-md",children:i.jsxs(xo,{children:[i.jsx(_o,{children:Array.from({length:1}).map((_,C)=>i.jsx(wn,{className:"hover:bg-transparent",children:Array.from({length:n}).map((y,v)=>i.jsx(vo,{style:{width:c[v],minWidth:m?c[v]:"auto"},children:i.jsx(ct,{className:"w-full h-6"})},v))},C))}),i.jsx(bo,{children:Array.from({length:o}).map((_,C)=>i.jsx(wn,{className:"hover:bg-transparent",children:Array.from({length:n}).map((y,v)=>i.jsx(Xr,{style:{width:c[v],minWidth:m?c[v]:"auto"},children:i.jsx(ct,{className:"w-full h-6"})},v))},C))})]})}),d?i.jsxs("div",{className:"flex items-center justify-between w-full gap-4 p-1 overflow-auto sm:gap-8",children:[i.jsx(ct,{className:"w-40 h-7 shrink-0"}),i.jsxs("div",{className:"flex items-center gap-4 sm:gap-6 lg:gap-8",children:[i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(ct,{className:"w-24 h-7"}),i.jsx(ct,{className:"h-7 w-[4.5rem]"})]}),i.jsx("div",{className:"flex items-center justify-center text-sm font-medium",children:i.jsx(ct,{className:"w-20 h-7"})}),i.jsxs("div",{className:"flex items-center space-x-2",children:[i.jsx(ct,{className:"hidden size-7 lg:block"}),i.jsx(ct,{className:"size-7"}),i.jsx(ct,{className:"size-7"}),i.jsx(ct,{className:"hidden size-7 lg:block"})]})]})]}):null]})}const vs=({title:n=w("components.empty_state.title"),subtitle:o=w("components.empty_state.subtitle"),buttonText:r=w("components.empty_state.button"),onButtonClick:a=()=>{},actions:l=()=>i.jsx(i.Fragment,{})})=>i.jsxs("div",{className:"text-center",children:[i.jsx("svg",{className:"w-12 h-12 mx-auto text-slate-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true",children:i.jsx("path",{vectorEffect:"non-scaling-stroke",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 13h6m-3-3v6m-9 1V7a2 2 0 012-2h6l2 2h6a2 2 0 012 2v8a2 2 0 01-2 2H5a2 2 0 01-2-2z"})}),i.jsx("h3",{className:"mt-2 text-lg font-semibold text-slate-900",children:n}),i.jsx("p",{className:"mt-1 text-base text-slate-500",children:o}),i.jsxs("div",{className:"items-center mt-6",children:[l&&i.jsx(i.Fragment,{children:l}),!l&&i.jsxs(H,{className:"my-4",onClick:a,children:[i.jsx(Io,{}),r]})]})]}),tw=jo("flex h-10 w-full rounded-md bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",{variants:{variant:{default:"border border-input ring-offset-background focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ",outline:"focus-visible:border focus-visible:border-input"}},defaultVariants:{variant:"default"}}),is=n=>{const{name:o,label:r,hint:a,description:l,placeholder:c,className:d,disabled:m,defaultValue:p,rules:x,readOnly:_,scale:C,variant:y}=n,{control:v}=Gn(),[R,E]=M.useState(""),k={input:D=>{if(typeof D!="object")return D;const F=zt.create(D);if(F.isFailure)throw F.error;const q=F.object.toString();return R.endsWith(",")?q.replace(/.0$/,","):q},output:(D,F,q)=>{const{value:U}=q??{value:null};E(U??"");const O=zt.createFromFormattedValue(U);if(O.isFailure)throw O.error;return O.object.toObject()}};return i.jsx(wo,{defaultValue:p,control:v,name:o,disabled:m,rules:{max:100,min:0,...x},render:({field:D})=>{const F=k.input(D.value),q=m||D.disabled,U=!!((x==null?void 0:x.required)??!1);return i.jsxs(So,{className:pe(d,"space-y-3"),children:[r&&i.jsx(On,{label:r,hint:a,required:U}),i.jsx(Co,{children:i.jsx(Oc,{name:D.name,ref:D.ref,onBlur:D.onBlur,disabled:q,readOnly:_,className:pe(tw({variant:y,className:d})),groupSeparator:".",decimalSeparator:",",placeholder:c,allowDecimals:C!==0,decimalsLimit:C,decimalScale:C,step:1,value:F,onValueChange:(O,V,$)=>D.onChange(k.output(O,V,$))})}),l&&i.jsx(yo,{children:l}),i.jsx(No,{})]})}})},nw=jo("flex h-10 w-full rounded-md bg-background px-3 py-2 text-sm placeholder:text-muted-foreground focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",{variants:{variant:{default:"border border-input ring-offset-background focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ",outline:"focus-visible:border focus-visible:border-input"}},defaultVariants:{variant:"default"}}),rw=n=>{const{name:o,label:r,hint:a,description:l,placeholder:c,className:d,disabled:m,defaultValue:p,rules:x,readOnly:_,scale:C,variant:y}=n,{control:v}=Gn(),[R,E]=M.useState(""),k={input:D=>{if(typeof D!="object")return D;const F=Sn.create(D);if(F.isFailure)throw F.error;const q=F.object.toString();return R.endsWith(",")?q.replace(/.0$/,","):q},output:(D,F,q)=>{const{value:U}=q??{value:null};E(U??"");const O=Sn.createFromFormattedValue(U);if(O.isFailure)throw O.error;return O.object.toObject()}};return i.jsx(wo,{defaultValue:p,control:v,name:o,disabled:m,rules:x,render:({field:D})=>{const F=k.input(D.value),q=m||D.disabled,U=!!((x==null?void 0:x.required)??!1);return i.jsxs(So,{className:pe(d,"space-y-3"),children:[r&&i.jsx(On,{label:r,hint:a,required:U}),i.jsx(Co,{children:i.jsx(Oc,{name:D.name,ref:D.ref,onBlur:D.onBlur,disabled:q,readOnly:_,className:pe(nw({variant:y,className:d})),groupSeparator:".",decimalSeparator:",",placeholder:c,allowDecimals:C!==0,decimalsLimit:C,decimalScale:C,step:1,value:F,onValueChange:(O,V,$)=>D.onChange(k.output(O,V,$))})}),l&&i.jsx(yo,{children:l}),i.jsx(No,{})]})}})},iw=jo("",{variants:{variant:{default:"",ghost:"border-0 focus-visible:border focus-visible:border-input focus-visible:ring-0 focus-visible:ring-offset-0 "}},defaultVariants:{variant:"default"}}),Pn=n=>{const{name:o,label:r,hint:a,description:l,placeholder:c,className:d,disabled:m,rules:p,required:x,type:_,variant:C}=n,{control:y}=Gn();return i.jsx(wo,{control:y,name:o,disabled:m,rules:{required:x,...p},render:({field:v,fieldState:R})=>{const E=!!((p==null?void 0:p.required)??x);return i.jsxs(So,{className:pe(d,"space-y-3"),children:[r&&i.jsx(On,{label:r,hint:a,required:E}),i.jsx(Co,{className:"block",children:i.jsx(cs,{type:_,placeholder:c,className:pe(R.error?"border-destructive focus-visible:ring-destructive":"",iw({variant:C,className:d})),...v})}),l&&i.jsx(yo,{children:l}),i.jsx(No,{})]})}})};function sw(n=!1){const[o,r]=M.useState(n);return[o,()=>r(l=>!l)]}const Hn=()=>{const n=M.useContext(Qv);if(n===null)throw new Error("useDataTableContext must be used within a DataTableProvider");return n};function bs({data:n,columns:o,pageCount:r,enableSorting:a=!1,enableHiding:l=!1,enableRowSelection:c=!1,initialState:d,onPaginationChange:m,meta:p}){const{pagination:x,setPagination:_,sorting:C}=Hn(),[y,v]=Ln.useState({}),[R,E]=Ln.useState((d==null?void 0:d.columnVisibility)||{}),k=U=>{if(typeof U=="function"){const O=U(x);_(O)}m&&m(U)},D=U=>{},F=M.useCallback(()=>{const U=o;return c&&U.unshift(ew()),U},[o,c]);return{table:Md({data:n,columns:F(),pageCount:r??-1,meta:p,getCoreRowModel:Dd(),initialState:d,state:{pagination:x,sorting:C,columnVisibility:R,rowSelection:y},enableRowSelection:c,onRowSelectionChange:v,manualSorting:!0,enableSorting:a,getSortedRowModel:Hb(),onSortingChange:D,enableHiding:l,onColumnVisibilityChange:E,manualPagination:!0,onPaginationChange:k,manualFiltering:!0,getFilteredRowModel:Gb(),getFacetedRowModel:Vb(),getFacetedUniqueValues:zb(),debugTable:!1,debugHeaders:!1,debugColumns:!1,defaultColumn:{minSize:0,size:Number.MAX_SAFE_INTEGER,maxSize:Number.MAX_SAFE_INTEGER}})}}const aw=({setSize:n,setControllerCallback:o,setPercentageCallback:r,setErrorCallback:a})=>l=>{if(!l.ok)throw Error(`${l.status} ${l.type} ${l.statusText}`);if(!l.body)throw Error("ReadableStream not yet supported in this browser.");const c=l.body,d=l.headers.get("content-encoding"),m=l.headers.get(d?"x-file-size":"content-length"),p=parseInt(m||"0",10);n(()=>p);let x=0;const _=new ReadableStream({start(C){o(C);const y=c.getReader();async function v(){return y.read().then(({done:R,value:E})=>R?C.close():(x+=(E==null?void 0:E.byteLength)||0,E&&C.enqueue(E),r({loaded:x,total:p}),v())).catch(R=>(a(R),y.cancel("Cancelled"),C.error(R)))}return v()}});return new Response(_)},Nc=(n,o,r)=>{const a=[n],l=new Blob(a,{type:r||"application/octet-stream"});if(typeof window.navigator.msSaveBlob<"u")return window.navigator.msSaveBlob(l,o);const c=window.URL&&window.URL.createObjectURL?window.URL.createObjectURL(l):window.webkitURL.createObjectURL(l),d=document.createElement("a");return d.style.display="none",d.href=c,d.setAttribute("download",o),typeof d.download>"u"&&d.setAttribute("target","_blank"),document.body.appendChild(d),d.click(),setTimeout(()=>{document.body.removeChild(d),window.URL.revokeObjectURL(c)},200)};function Rc({customHandleDownload:n,...o}={}){var U;let r=!1;try{r=process?!!((U=process==null?void 0:process.env)!=null&&U.REACT_APP_DEBUG_MODE):!1}catch{r=!1}const[a,l]=M.useState(0),[c,d]=M.useState(0),[m,p]=M.useState(0),[x,_]=M.useState(null),[C,y]=M.useState(!1),v=M.useRef(null),R=M.useCallback(({loaded:O,total:V})=>{const $=Math.round(O/V*100);d(()=>$)},[]),E=M.useCallback(O=>{const V={"Failed to execute 'enqueue' on 'ReadableStreamDefaultController': Cannot enqueue a chunk into an errored readable stream":"Download canceled","The user aborted a request.":"Download timed out"};_(()=>({errorMessage:V[O.message]?V[O.message]:O.message}))},[]),k=M.useCallback(O=>{v.current=O},[]),D=M.useCallback(()=>{v.current&&v.current.error()},[]),F=M.useCallback(()=>{k(null),l(()=>0),d(()=>0),p(()=>0),y(()=>!1)},[k]),q=M.useCallback(async(O,V,$=0,le={})=>{if(C)return null;F(),_(()=>null),y(()=>!0);const oe=setInterval(()=>l(xe=>xe+1),r?1:1e3),G=aw({setSize:p,setControllerCallback:k,setPercentageCallback:R,setErrorCallback:E}),ne=new AbortController,K=setTimeout(()=>{$>0&&ne.abort()},$),ie=n||Nc;try{const xe=await fetch(O,{method:"GET",...o,...le,signal:ne.signal}),Y=await G(xe).blob();ie(Y,V),F()}catch(xe){F(),_(tt=>{const{message:Y}=xe;return Y!=="Failed to fetch"?{errorMessage:Y}:tt}),clearTimeout(K)}finally{clearInterval(oe)}},[C,F,r,k,R,E,o,n]);return M.useMemo(()=>({elapsed:a,percentage:c,size:m,download:q,cancel:D,error:x,isInProgress:C,jsDownload:Nc}),[a,c,m,q,D,x,C])}const Pd=()=>{const{i18n:n}=st();return qd({locale:n.language})},qd=n=>{const{locale:o}=n,r=M.useCallback(d=>{if(d==null)return"";const{amount:m,scale:p,currency_code:x}=d;return new Intl.NumberFormat(o??"ES",{style:"currency",currency:x,currencyDisplay:"symbol",useGrouping:!0,maximumFractionDigits:p}).format(m===null?0:xc({amount:m,scale:p}))},[o]),a=M.useCallback(d=>{if(d==null)return"";const{amount:m,scale:p}=d;return new Intl.NumberFormat("es",{minimumFractionDigits:p,useGrouping:!0}).format(m===null?0:xc({amount:m,scale:p}))},[o]),l=M.useCallback(d=>{if(d==null)return"";const{amount:m,scale:p}=d;return new Intl.NumberFormat(o,{style:"decimal",minimumFractionDigits:p}).format(m===null?0:m)},[o]),c=M.useCallback(d=>{var m;return((m=new Intl.NumberFormat(o??"es",{style:"currency",currency:d,currencyDisplay:"name"}).formatToParts(1).find(p=>p.type==="currency"))==null?void 0:m.value)??d},[o]);return{formatCurrency:r,formatNumber:a,formatPercentage:l,formatCurrencyName:c}};function kd(n){const[o,r]=M.useState(!1);return M.useEffect(()=>{function a(c){r(c.matches)}const l=matchMedia(n);return l.addEventListener("change",a),r(l.matches),()=>l.removeEventListener("change",a)},[n]),o}const ow=()=>{const n=M.useContext(Yv);if(n===null)throw new Error("useWarnAboutChange must be used within a UnsavedWarnProvider");return n},Oo=({isDirty:n=!1,title:o=w("hooks.use_unsaved_changes_notifier.title"),subtitle:r=w("hooks.use_unsaved_changes_notifier.subtitle"),confirmText:a=w("hooks.use_unsaved_changes_notifier.confirm_text"),cancelText:l=w("hooks.use_unsaved_changes_notifier.cancel_text"),onConfirm:c,onCancel:d,type:m="warning"})=>{const p=Xv(n),{show:x}=ow(),_=M.useCallback(()=>n?new Promise(C=>{x({title:o,subtitle:r,confirmText:a,cancelText:l,type:m,onConfirm:()=>{C(!0),c==null||c()},onCancel:()=>{C(!1),d==null||d()}})}):Promise.resolve(!0),[l,a,n,d,c,x,r,o,m]);return M.useEffect(()=>{p.state==="blocked"&&_().then(C=>{C?p.proceed():p.reset()})},[p,_]),M.useEffect(()=>(n&&(window.onbeforeunload=()=>r),()=>{window.onbeforeunload=null}),[n,r]),{confirm:_}},$d=n=>{const{isSubmitting:o,isLoading:r,isValidating:a}=Zv();return i.jsx(Ro,{disabled:o||r||a,...n})};$d.displayName="FormSubmitButton";const sn=[{code:"es",name:"Español",flagClassName:"fi fi-es"},{code:"en",name:"English",flagClassName:"fi fi-gb"},{code:"fr",name:"Français",flagClassName:"fi fi-fr"}],lw=n=>_n.object({email:_n.string().email({tlds:{allow:!1}}).required().messages({"any.required":n("login_page.validation.email_required"),"string.empty":n("login_page.validation.email_required"),"string.base":n("login_page.validation.email_invalid"),"string.email":n("login_page.validation.email_invalid")}),password:_n.string().min(4).alphanum().required().messages({"any.required":n("login_page.validation.password_required"),"string.empty":n("login_page.validation.password_required"),"string.base":n("login_page.validation.password_alphanum"),"string.min":n("login_page.validation.password_min",{count:4}),"string.alphanum":n("login_page.validation.password_alphanum")})}),tS=()=>{var v,R,E,k,D;const{t:n,i18n:o}=st(),[r,a]=M.useState(o.language),l=Gt(),{toast:c}=jn();M.useEffect(()=>{const F=navigator.language.split("-")[0],q=sn.find(U=>U.code===F);q&&d(q.code)},[]);const d=F=>{o.changeLanguage(F),a(F)},{mutate:m,status:p}=A0({onSuccess:F=>{const{success:q,error:U}=F;!q&&U&&x.setError("root",{type:U.name,message:U.message}),q&&l("/quotes",{replace:!0})},onError:F=>{const{message:q}=F;c({description:q,title:n("common.error")}),console.log(F)}}),x=ds({mode:"onBlur",defaultValues:{email:"",password:""},resolver:Pc(lw(n))}),{getFieldState:_,trigger:C}=x;M.useEffect(()=>{const F=["email","password"].filter(q=>_(q).invalid);F.length&&C(F)},[o.resolvedLanguage,_,C]);const y=async F=>{m({email:F.email,password:F.password},{})};return i.jsxs(Jv,{variant:"full",className:"p-0 lg:grid lg:min-h-[600px] lg:grid-cols-2 xl:min-h-[800px] h-screen ",children:[i.jsx("div",{className:"flex items-center justify-center py-12 ",children:i.jsxs("div",{className:"mx-auto grid w-[650px] gap-6 relative ",children:[i.jsx("div",{className:"absolute flex space-x-2 top-4 right-4 ",children:i.jsxs(os,{children:[i.jsx(ls,{asChild:!0,children:i.jsxs(H,{variant:"outline",className:"w-[140px] justify-start",children:[i.jsx("span",{className:"mr-2",children:i.jsx("span",{"aria-hidden":"true",className:(v=sn.find(F=>F.code===r))==null?void 0:v.flagClassName})}),(R=sn.find(F=>F.code===r))==null?void 0:R.name,i.jsx(qc,{className:"w-4 h-4 ml-auto opacity-50"})]})}),i.jsx(us,{className:"w-[140px]",children:sn.map(F=>i.jsxs(Wr,{onSelect:()=>d(F.code),children:[i.jsx("span",{"aria-hidden":"true",className:`mr-2 ${F.flagClassName}`}),F.name]},F.code))})]})}),i.jsxs(Oe,{className:"px-12 py-6 bg-muted/50",children:[i.jsxs(dt,{children:[i.jsx(e0,{className:"inline-block m-auto mb-6 align-middle max-w-32"}),i.jsx(Ve,{children:i.jsx(ae,{i18nKey:"login_page.title"})}),i.jsx(We,{children:i.jsx(ae,{i18nKey:"login_page.description"})})]}),i.jsx(Pe,{children:i.jsx(fs,{...x,children:i.jsx("form",{onSubmit:x.handleSubmit(y),children:i.jsxs("div",{className:"grid items-start gap-6",children:[i.jsx("div",{className:"grid gap-6",children:i.jsx(Pn,{required:!0,disabled:p==="pending",name:"email",label:n("login_page.email_label"),type:"email",placeholder:n("login_page.email_placeholder")})}),i.jsxs("div",{className:"grid gap-6",children:[i.jsx(Pn,{required:!0,disabled:p==="pending",name:"password",label:n("login_page.password_label"),type:"password"}),i.jsxs("div",{className:"mb-4 -mt-2 text-sm",children:[i.jsx(ae,{i18nKey:"login_page.forgotten_password"}),i.jsx("br",{}),i.jsx(to,{to:"https://uecko.com/distribuidores",className:"underline",children:i.jsx(ae,{i18nKey:"login_page.contact_us"})})]})]}),((E=x.formState.errors.root)==null?void 0:E.message)&&i.jsxs(kc,{variant:"destructive",children:[i.jsx(gd,{className:"w-4 h-4"}),i.jsx($c,{children:i.jsx(ae,{i18nKey:"common.error"})}),i.jsx(Uc,{children:((k=x.formState.errors.root)==null?void 0:k.type)==="InvalidCredentials"?n("login_page.invalid_credentials"):(D=x.formState.errors.root)==null?void 0:D.message})]}),i.jsx($d,{className:"w-full",disabled:p==="pending"}),i.jsxs("div",{className:"mt-4 text-sm text-center",children:[i.jsx(ae,{i18nKey:"login_page.become_dealer"}),i.jsx("br",{}),i.jsx(to,{to:"https://uecko.com/distribuidores",className:"underline",children:i.jsx(ae,{i18nKey:"login_page.contact_us"})}),i.jsx("br",{}),i.jsxs("p",{className:"mx-auto mt-4 -mb-6 text-xs text-muted-foreground/50",children:["v.","1.2.7"]})]})]})})})})]}),i.jsx("img",{className:"block w-11/12 mx-auto aspect-auto",src:"/img/uecko-footer_logos.jpg"})]})}),i.jsx("div",{className:"hidden bg-muted lg:block",children:i.jsx("img",{src:"/img/nara2.jpg",alt:"",width:"1920",height:"1080",className:"h-full w-full object-cover dark:brightness-[0.2] dark:grayscale"})})]})},uw=n=>{const{onSuccess:o,onError:r,...a}=n||{},l=rn(),c=qn(),{logout:d}=Fc(),m=Gt(),{toast:p}=jn();return Ut({mutationKey:c().auth().action("logout").get(),mutationFn:d,onSuccess:async(x,_,C)=>{l.clear();const{success:y,redirectTo:v}=x;y&&v&&m(v||"/"),o&&o(x,_,C)},onError:(x,_,C)=>{const{message:y}=x;p({title:w("common.error"),description:y,variant:"destructive"}),r&&r(x,_,C)},...a})},nS=()=>{const{mutate:n}=uw({});return M.useEffect(()=>n(),[n]),i.jsx(Vn,{})},cw=M.createContext(null),dw=({children:n})=>{const[o,r]=Bc();return i.jsx(cw.Provider,{value:{pagination:o,setPagination:r},children:n})},rS=({children:n})=>i.jsx(gs,{children:i.jsx(dw,{children:i.jsxs(ei,{className:"catalog-layout",children:[i.jsx(ti,{}),i.jsx(ni,{children:n})]})})}),Ud=n=>{const o=Zr(),r=qn(),{pagination:a,searchTerm:l=[],enabled:c=!0,queryOptions:d}=n;return Fo({queryKey:r().data().resource("catalog").action("list").params(n).get(),queryFn:()=>o.getList({resource:"catalog",quickSearchTerm:l,pagination:a}),enabled:c,queryOptions:d})};function Bd({table:n,className:o,children:r,...a}){const{globalFilter:l,isFiltered:c,setGlobalFilter:d,resetGlobalFilter:m}=Hn(),p=Ln.useRef(null),[x,_]=Ln.useState(""),C=Ln.useCallback(R=>{R.key==="Enter"&&x.trim()&&(R.preventDefault(),d(E=>[...E,x.trim()]),_("")),R.key==="Backspace"&&!x&&l.length>0&&(R.preventDefault(),d(E=>E.slice(0,-1)))},[l,x]),y=Ln.useCallback(R=>{d(E=>E.filter(k=>k!==R))},[]),v=Ln.useCallback(()=>{var R;x.trim()&&(d(E=>[...E,x.trim()]),_(""),(R=p.current)==null||R.focus())},[x]);return i.jsx(t0,{children:i.jsxs("div",{className:"w-full space-y-2",...a,children:[i.jsxs("div",{className:pe("relative flex items-center flex-1 p-2 space-x-2 border rounded-md",c?"border-primary":"border-input"),children:[i.jsx(Vc,{className:pe("w-4 h-4 text-gray-500")}),i.jsxs("div",{className:"flex flex-wrap items-center flex-1 gap-2",children:[l&&l.map(R=>i.jsxs(ho,{variant:"default",className:"px-1 text-base font-normal rounded-sm",children:[R,i.jsxs(H,{variant:"ghost",onClick:()=>y(R),className:"h-auto p-0 px-1 ml-1 hover:bg-transparent",children:[i.jsxs(Qe,{children:[i.jsx(Ye,{asChild:!0,children:i.jsx(no,{className:"w-4 h-4"})}),i.jsx(Xe,{children:i.jsx("p",{children:w("common.filter.badget_remove_tooltip")})})]}),i.jsx("span",{className:"sr-only",children:w("common.filter.badget_remove_tooltip")})]})]},R)),i.jsxs("div",{className:"flex-1 flex items-center min-w-[300px]",children:[i.jsx("input",{ref:p,value:x,onChange:R=>_(R.target.value),onKeyDown:C,placeholder:w("common.filter.input_placeholder"),className:"flex-1 w-full h-8 bg-transparent outline-none placeholder:text-muted-foreground"}),i.jsxs(mr,{children:[c&&i.jsxs(Qe,{children:[i.jsx(Ye,{asChild:!0,children:i.jsxs(H,{variant:"ghost",onClick:()=>m(),className:"h-8 px-2 transition-all lg:px-3 text-primary",children:[i.jsx(no,{className:"w-4 h-4 mr-2"}),w("common.filter.reset_filter")]})}),i.jsx(Xe,{children:i.jsx("p",{children:w("common.filter.reset_filter")})})]}),i.jsxs(Qe,{children:[i.jsx(Ye,{asChild:!0,children:i.jsxs(H,{variant:"default",size:"icon",disabled:!x,onClick:v,className:"w-8 h-8 p-0 transition-all",children:[i.jsx(Io,{className:"w-4 h-4"}),i.jsx("span",{className:"sr-only",children:w("common.filter.button_add_term")})]})}),i.jsx(Xe,{children:i.jsx("p",{children:w("common.filter.button_add_term_tooltip")})})]})]})]})]})]}),i.jsx("p",{className:"text-sm text-muted-foreground",children:w("common.filter.help_text")})]})})}const fw=()=>{const n=Gt(),{pagination:o,globalFilter:r,isFiltered:a}=Hn(),{data:l,isPending:c,isError:d,error:m}=Ud({pagination:{pageIndex:o.pageIndex,pageSize:o.pageSize},searchTerm:r}),p=M.useMemo(()=>[{id:"id",accessorKey:"id"},{id:"id_article",accessorKey:"id_article"},{id:"catalog_name",accessorKey:"catalog_name"},{id:"description",accessorKey:"description",header:()=>i.jsx(i.Fragment,{children:w("catalog.list.columns.description")})},{id:"points",accessorKey:"points",header:()=>i.jsx("div",{className:"text-right",children:w("catalog.list.columns.points")}),cell:({renderValue:_})=>i.jsx("div",{className:"text-right",children:_()})},{id:"retail_price",accessorKey:"retail_price",header:()=>i.jsx("div",{className:"text-right",children:w("catalog.list.columns.retail_price")}),cell:({row:_})=>{const C=Ot.create(_.original.retail_price).object;return i.jsx("div",{className:"text-right",children:C.toFormat()})}}],[]),{table:x}=bs({data:(l==null?void 0:l.items)??[],columns:p,pageCount:(l==null?void 0:l.total_pages)??-1,initialState:{columnVisibility:{id:!1,id_article:!1,catalog_name:!1}}});return d?i.jsx(wr,{subtitle:m.message}):c?i.jsx(Oe,{children:i.jsx(Pe,{children:i.jsx(_s,{columnCount:6,searchableColumnCount:1,filterableColumnCount:2,shrinkZero:!0})})}):(l==null?void 0:l.total_items)===0&&!a?i.jsx(vs,{subtitle:w("catalog.list.empty_state.subtitle"),buttonText:"",onButtonClick:()=>n("/catalog/add")}):i.jsx(xs,{table:x,paginationOptions:{visible:!0},children:i.jsx(Bd,{table:x})})},iS=()=>i.jsxs(hr,{children:[i.jsx("div",{className:"flex items-center justify-between space-y-2",children:i.jsx("div",{children:i.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:i.jsx(ae,{i18nKey:"catalog.list.title"})})})}),i.jsx(fw,{})]}),sS=()=>{const{data:n,status:o}=n0();return i.jsxs(ei,{children:[i.jsx(ti,{}),i.jsx(ni,{children:o==="success"?i.jsx("div",{className:"flex items-center",children:i.jsx("h1",{className:"text-lg font-semibold md:text-2xl",children:`${w("dashboard.welcome")}, ${n==null?void 0:n.name}`})}):i.jsx(ct,{className:"w-[100px] h-[20px] rounded-full"})})]})},aS=({children:n})=>i.jsx(gs,{children:i.jsxs(ei,{className:"dealers-layout",children:[i.jsx(ti,{}),i.jsx(ni,{children:n})]})});function gw({table:n}){return i.jsxs(os,{children:[i.jsx(ls,{asChild:!0,children:i.jsxs(H,{variant:"outline",size:"sm",className:"hidden h-8 ml-auto lg:flex",children:[i.jsx(B0,{className:"w-4 h-4 mr-2"}),w("components.data_table.columns")]})}),i.jsxs(us,{align:"end",className:"w-[150px]",children:[i.jsx(Lc,{children:w("components.data_table.columns")}),i.jsx(po,{}),n.getAllColumns().filter(o=>typeof o.accessorFn<"u"&&o.getCanHide()).map(o=>i.jsx(r0,{className:"capitalize",checked:o.getIsVisible(),onCheckedChange:r=>o.toggleVisibility(!!r),children:i.jsx(i.Fragment,{children:o.columnDef.header})},o.id))]})]})}function Vd({table:n,className:o,children:r,...a}){const{globalFilter:l,isFiltered:c,setGlobalFilter:d,resetGlobalFilter:m}=Hn(),p=x=>{const _=String(x.target.value);_===""?m():d([_])};return i.jsxs("div",{className:pe("flex w-full items-center justify-between space-x-2 overflow-auto p-1",o),...a,children:[i.jsxs("div",{className:"flex items-center flex-1 space-x-2",children:[i.jsx(Vc,{className:"w-4 h-4 text-gray-500"}),i.jsx(cs,{placeholder:w("common.filter.input_placeholder"),value:l,onChange:p,className:pe("h-8 w-full transition-all")},"global-filter"),c&&i.jsxs(H,{variant:"outline",onClick:()=>m(),className:"h-8 px-2 transition-all lg:px-3",children:[i.jsx(no,{className:"w-4 h-4 mr-2"}),w("common.filter.reset_filter")]})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[r,n.options.enableHiding&&i.jsx(gw,{table:n})]})]})}const mw=n=>{const o=Zr(),r=qn(),{pagination:a,searchTerm:l=void 0,enabled:c=!0,queryOptions:d}=n;return Fo({queryKey:r().data().resource("dealer").action("list").params(n).get(),queryFn:()=>o.getList({resource:"dealers",quickSearchTerm:l,pagination:a}),enabled:c,queryOptions:d})},hw=()=>{const{t:n}=st(),o=Gt(),{pagination:r,globalFilter:a,isFiltered:l}=Hn(),{data:c,isPending:d,isError:m,error:p}=mw({pagination:{pageIndex:r.pageIndex,pageSize:r.pageSize},searchTerm:a}),x=M.useMemo(()=>[{id:"id",accessorKey:"id",header:()=>n("common.identifier"),enableResizing:!1,size:10},{id:"name",accessorKey:"name",header:()=>n("common.name"),enableResizing:!1,size:10}],[n]),{table:_}=bs({data:(c==null?void 0:c.items)??[],columns:x,pageCount:(c==null?void 0:c.total_pages)??-1});return m?i.jsx(wr,{subtitle:p.message}):d?i.jsx(Oe,{children:i.jsx(Pe,{children:i.jsx(_s,{columnCount:6,searchableColumnCount:1,filterableColumnCount:2,shrinkZero:!0})})}):(c==null?void 0:c.total_items)===0&&!l?i.jsx(vs,{subtitle:n("catalog.list.empty_state.subtitle"),buttonText:"",onButtonClick:()=>o("/catalog/add")}):i.jsx(i.Fragment,{children:i.jsx(xs,{table:_,paginationOptions:{visible:!0},children:i.jsx(Vd,{table:_})})})},oS=()=>i.jsx(hr,{children:i.jsx(hw,{})}),lS=()=>{const{t:n}=st();return i.jsx("div",{className:"flex min-h-[100dvh] flex-col items-center justify-center bg-background px-4 py-12 sm:px-6 lg:px-8",children:i.jsxs("div",{className:"max-w-md mx-auto text-center",children:[i.jsx("div",{className:"w-12 h-12 mx-auto text-primary"}),i.jsx("h1",{className:"mt-4 text-3xl font-bold tracking-tight text-foreground sm:text-4xl",children:n("error_page.title")}),i.jsx("p",{className:"mt-4 text-muted-foreground",children:n("error_page.description")}),i.jsx("div",{className:"mt-6",children:i.jsx(H,{asChild:!0,className:"inline-flex items-center px-4 py-2 text-sm font-medium transition-colors rounded-md shadow-sm bg-primary text-primary-foreground hover:bg-primary/90 focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2",children:i.jsx(to,{to:"/",children:n("error_page.go_home")})})})]})})},pw={"any.unknown":"{{#label}}: no está permitido","any.invalid":"{{#label}}: contiene un valor invalido","any.empty":"{{#label}}: no está permitido que sea vacío","any.required":"{{#label}}: es un campo requerido","any.allowOnly":"{{#label}}: debería ser uno de las siguientes variantes: {{valids}}","any.default":"emitió un error cuando se ejecutó el metodo default","alternatives.base":"{{#label}}: no coincide con ninguna de las alternativas permitidas","array.base":"{{#label}}: debe ser un array","array.includes":"{{#label}}: en la posición {{pos}} no coincide con ninguno de los tipos permitidos","array.includesSingle":'{{#label}}: el valor de "{{!key}}" no coincide con ninguno de los tipos permitidos',"array.includesOne":"{{#label}}: en la posición {{pos}} falló porque {{reason}}","array.includesOneSingle":'{{#label}}: el valor "{{!key}}" falló porque {{reason}}',"array.includesRequiredUnknowns":"{{#label}}: no contiene valor/es requerido/s: {{unknownMisses}} ","array.includesRequiredKnowns":"{{#label}}: no contiene: {{knownMisses}}","array.includesRequiredBoth":"{{#label}}: no contiene {{knownMisses}} y {{unknownMisses}} otros valores requeridos","array.excludes":"{{#label}}: en la posición {{pos}} contiene un valor excluído","array.excludesSingle":'{{#label}}: el valor "{{!key}}" contiene un valor excluído',"array.min":"{{#label}}: debe contener al menos {{limit}} items","array.max":"{{#label}}: debe contener máximo {{limit}} items","array.length":"{{#label}}: debe contener exactamente {{limit}} items","array.ordered":"{{#label}}: en la posición {{pos}} falló porque {{reason}}","array.orderedLength":"{{#label}}: en la posición {{pos}} falló porque el array debre contener como máximo {{limit}} items","array.sparse":"{{#label}}: no debe ser un array esparcido","array.unique":"{{#label}}: posición {{pos}} contiene un valor duplicado","boolean.base":"{{#label}}: debe ser un valor verdadero/falso o si/no","binary.base":"{{#label}}: debe ser un buffer o un string","binary.min":"{{#label}}: debe ser como mínimo de {{limit}} bytes","binary.max":"{{#label}}: debe ser como máximo de {{limit}} bytes","binary.length":"{{#label}}: debe tener exactamente {{limit}} bytes","date.base":"{{#label}}: debe ser una cantidad de milisegundos o una fecha en cadena de texto válida","date.min":'{{#label}}: debe ser mayor o igual a "{{limit}}"',"date.max":'{{#label}}: debe ser menor o igual que "{{limit}}"',"date.isoDate":"{{#label}}: debe ser una fecha en formato ISO 8601","date.ref":'referencia a "{{ref}}", que no es una fecha válida',"function.base":"{{#label}}: debe ser una función","object.base":"{{#label}}: debe ser un objeto","object.child":'hijo "{{!key}}" falló porque {{reason}}',"object.min":"{{#label}}: debe tener como mínimo {{limit}} hijo","object.max":"{{#label}}: debe tener menos o a lo sumo {{limit}} hijo","object.length":"{{#label}}: debe tener máximo {{limit}} hijo/s","object.allowUnknown":"no está permitido","object.with":'peer faltante: "{{peer}}"',"object.without":'conflicto con peer prohibido: "{{peer}}"',"object.missing":"{{#label}}: debe contener al menos uno de: {{peers}}","object.xor":"{{#label}}: contiene un conflicto con alguno de: {{peers}}","object.or":"{{#label}}: debe contener al menos uno de: {{peers}}","object.and":"contiene {{present}} sin el requerido: {{missing}}","object.nand":'!!"{{main}}" no debe existir simultáneamente con {{peers}}',"object.assert":'!!"{{ref}}" falló validacion porque "{{ref}}" falló a {{message}}',"object.rename.multiple":'{{#label}}: no se puede renombrar el hijo "{{from}}" porque múltiples re-nombramientos estan deshabilitados y otra clave fue renombrada a "{{to}}"',"object.rename.override":'{{#label}}: no se puede renombrar el hijo "{{from}}" porque la sobre escritura esta deshabilitada y el target "{{to}}" existe',"object.type":'{{#label}}: debe ser una instancia de "{{type}}"',"number.base":"{{#label}}: debe ser un número","number.min":"{{#label}}: debe ser mayor o igual que {{limit}}","number.max":"{{#label}}: debe ser menor o igual que {{limit}}","number.less":"{{#label}}: debe ser menor a {{limit}}","number.greater":"{{#label}}: debe ser mayor a {{limit}}","number.float":"{{#label}}: debe ser un numero flotante","number.integer":"{{#label}}: debe ser un número entero","number.negative":"{{#label}}: debe ser un número negativo","number.positive":"{{#label}}: debe ser un número positivo","number.precision":"{{#label}}: no debe tener mas de {{limit}} decimales","number.ref":'{{#label}}: referencia a "{{ref}}" que no es un número',"number.multiple":"{{#label}}: debe ser un múltiplo de {{multiple}}","string.base":"{{#label}}: debe ser una cadena de texto","string.empty":"{{#label}}: no está permitido que sea vacío","string.min":"{{#label}}: debe ser mínimo de {{limit}} caracteres de largo","string.max":"{{#label}}: debe ser de máximo {{limit}} caracteres de largo","string.length":"{{#label}}: debe ser exactamente de {{limit}} caracteres de largo","string.alphanum":"{{#label}}: debe contener solo letras y números","string.token":"{{#label}}: debe contener solo letras, números y guines bajos","string.regex.base":'{{#label}}: el valor "{{!value}}" no coincide con el pattern requerido: {{pattern}}',"string.regex.name":'{{#label}}: el valor "{{!value}}" no coincide con el nombre de pattern {{name}}',"string.email":"{{#label}}: debe ser un email válido","string.uri":"{{#label}}: debe sre una uri válida","string.uriCustomScheme":"{{#label}}: debe ser una uri válida con el esquema concidiente con el patrón {{scheme}}","string.isoDate":"{{#label}}: debe ser una fecha en formato ISO 8601 válida","string.guid":"{{#label}}: debe ser un GUID valido","string.hex":"{{#label}}: debe contener solo caracteres hexadecimales","string.hostname":"{{#label}}: deber ser un hostname válido","string.lowercase":"{{#label}}: solo debe contener minúsculas","string.uppercase":"{{#label}}: solo debe contener mayúsculas","string.trim":"{{#label}}: no debe tener espacios en blanco delante o atrás","string.creditCard":"{{#label}}: debe ser una tarjeta de crédito","string.ref":'Referencia "{{ref}}" que no es un número',"string.ip":"{{#label}}: debe ser una dirección ip válida con un CDIR {{cidr}}","string.ipVersion":"{{#label}}: debe ser una dirección ip válida de una de las siguientes versiones {{version}} con un CDIR {{cidr}}","object.unknown":"{{#label}}: es un campo no es permitido","luxon.lt":"{{#label}}: must be before {{#date}}","luxon.gt":"{{#label}}: must be after {{#date}}","luxon.lte":"{{#label}}: must be same as or before {{#date}}","luxon.gte":"{{#label}}: must be same as or after {{#date}}"},zd=M.createContext({attributes:{role:"button",tabIndex:0,"aria-disabled":!1,"aria-pressed":void 0,"aria-roledescription":"sortable","aria-describedby":""},listeners:void 0,ref(){},isDragging:!1});function xw(n){return n.isSorting||n.wasDragging?s0(n):!0}function _w({id:n,children:o,isActive:r=!1,onActivate:a}){const{attributes:l,isDragging:c,listeners:d,setNodeRef:m,setActivatorNodeRef:p,transform:x,transition:_}=i0({animateLayoutChanges:xw,id:n}),C={transform:ro.Translate.toString(x),transition:_},y=M.useMemo(()=>({attributes:l,listeners:d,ref:p,isDragging:c}),[l,c,d,p]);return i.jsx(zd.Provider,{value:y,children:i.jsx(wn,{id:String(n),className:pe(c?"opacity-60":"opacity-100",r?"border border-destructive/30 border-b-0 border-l-4 border-l-destructive bg-destructive/5 hover:bg-destructive/5 focus-within:bg-destructive/5":"hover:bg-muted hover:focus-within:bg-accent focus-within:bg-accent","m-0"),ref:m,style:C,onClick:a,onFocusCapture:a,children:o},n)})}const vw=({className:n})=>{const{attributes:o,isDragging:r,listeners:a,ref:l}=M.useContext(zd);return i.jsxs(H,{ref:l,onClick:c=>{c.preventDefault()},size:"icon",variant:"link",className:pe(r?"cursor-grabbing":"cursor-grab","w-4 h-4 mt-2 text-ring hover:text-muted-foreground",n),...o,...a,children:[i.jsx(pd,{className:"w-4 h-4"}),i.jsx("span",{className:"sr-only",children:w("common.move_row")})]})};function bw(n,o={}){const{t:r,i18n:a}=st(),{enableDragHandleColumn:l=!1,enableSelectionColumn:c=!1,enableActionsColumn:d=!1,rowActionFn:m=void 0}=o;return M.useMemo(()=>(l&&n.unshift({id:"row_drag_handle",header:()=>null,cell:()=>i.jsx(vw,{}),enableSorting:!1,enableHiding:!1,size:40}),c&&n.unshift({id:"select",header:({table:p})=>i.jsx(ts,{id:"select-all",checked:p.getIsAllPageRowsSelected()||p.getIsSomePageRowsSelected()&&"indeterminate",onCheckedChange:x=>p.toggleAllPageRowsSelected(!!x),"aria-label":r("common.select_all"),className:"translate-y-[0px]"}),cell:({row:p})=>i.jsx(ts,{id:`select-row-${p.id}`,checked:p.getIsSelected(),disabled:!p.getCanSelect(),onCheckedChange:p.getToggleSelectedHandler(),"aria-label":r("common.select_row"),className:"mt-2"}),enableSorting:!1,enableHiding:!1,size:40}),d&&n.push({id:"row_actions",cell:p=>i.jsx(Jb,{rowContext:p,actions:m}),enableSorting:!1,enableHiding:!1,size:48}),n),[d,l,c,r,a.resolvedLanguage])}var Gd={exports:{}};(function(n,o){(function(r,a,l){n.exports=l(),n.exports.default=l()})("slugify",ur,function(){var r=JSON.parse(`{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","¢":"cent","£":"pound","¤":"currency","¥":"yen","©":"(c)","ª":"a","®":"(r)","º":"o","À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"DJ","đ":"dj","Ē":"E","ē":"e","Ė":"E","ė":"e","Ę":"e","ę":"e","Ě":"E","ě":"e","Ğ":"G","ğ":"g","Ģ":"G","ģ":"g","Ĩ":"I","ĩ":"i","Ī":"i","ī":"i","Į":"I","į":"i","İ":"I","ı":"i","Ķ":"k","ķ":"k","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ł":"L","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","Ō":"O","ō":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ũ":"U","ũ":"u","Ū":"u","ū":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","Ə":"E","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Lj":"LJ","lj":"lj","Nj":"NJ","nj":"nj","Ș":"S","ș":"s","Ț":"T","ț":"t","ə":"e","˚":"o","Ά":"A","Έ":"E","Ή":"H","Ί":"I","Ό":"O","Ύ":"Y","Ώ":"W","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"H","Θ":"8","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"3","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Υ":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ϊ":"I","Ϋ":"Y","ά":"a","έ":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","ς":"s","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ϊ":"i","ϋ":"y","ό":"o","ύ":"y","ώ":"w","Ё":"Yo","Ђ":"DJ","Є":"Ye","І":"I","Ї":"Yi","Ј":"J","Љ":"LJ","Њ":"NJ","Ћ":"C","Џ":"DZ","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ж":"Zh","З":"Z","И":"I","Й":"J","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"U","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"u","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","ё":"yo","ђ":"dj","є":"ye","і":"i","ї":"yi","ј":"j","љ":"lj","њ":"nj","ћ":"c","ѝ":"u","џ":"dz","Ґ":"G","ґ":"g","Ғ":"GH","ғ":"gh","Қ":"KH","қ":"kh","Ң":"NG","ң":"ng","Ү":"UE","ү":"ue","Ұ":"U","ұ":"u","Һ":"H","һ":"h","Ә":"AE","ә":"ae","Ө":"OE","ө":"oe","Ա":"A","Բ":"B","Գ":"G","Դ":"D","Ե":"E","Զ":"Z","Է":"E'","Ը":"Y'","Թ":"T'","Ժ":"JH","Ի":"I","Լ":"L","Խ":"X","Ծ":"C'","Կ":"K","Հ":"H","Ձ":"D'","Ղ":"GH","Ճ":"TW","Մ":"M","Յ":"Y","Ն":"N","Շ":"SH","Չ":"CH","Պ":"P","Ջ":"J","Ռ":"R'","Ս":"S","Վ":"V","Տ":"T","Ր":"R","Ց":"C","Փ":"P'","Ք":"Q'","Օ":"O''","Ֆ":"F","և":"EV","ء":"a","آ":"aa","أ":"a","ؤ":"u","إ":"i","ئ":"e","ا":"a","ب":"b","ة":"h","ت":"t","ث":"th","ج":"j","ح":"h","خ":"kh","د":"d","ذ":"th","ر":"r","ز":"z","س":"s","ش":"sh","ص":"s","ض":"dh","ط":"t","ظ":"z","ع":"a","غ":"gh","ف":"f","ق":"q","ك":"k","ل":"l","م":"m","ن":"n","ه":"h","و":"w","ى":"a","ي":"y","ً":"an","ٌ":"on","ٍ":"en","َ":"a","ُ":"u","ِ":"e","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","پ":"p","چ":"ch","ژ":"zh","ک":"k","گ":"g","ی":"y","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","฿":"baht","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"f","ქ":"k","ღ":"gh","ყ":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","Ṣ":"S","ṣ":"s","Ẁ":"W","ẁ":"w","Ẃ":"W","ẃ":"w","Ẅ":"W","ẅ":"w","ẞ":"SS","Ạ":"A","ạ":"a","Ả":"A","ả":"a","Ấ":"A","ấ":"a","Ầ":"A","ầ":"a","Ẩ":"A","ẩ":"a","Ẫ":"A","ẫ":"a","Ậ":"A","ậ":"a","Ắ":"A","ắ":"a","Ằ":"A","ằ":"a","Ẳ":"A","ẳ":"a","Ẵ":"A","ẵ":"a","Ặ":"A","ặ":"a","Ẹ":"E","ẹ":"e","Ẻ":"E","ẻ":"e","Ẽ":"E","ẽ":"e","Ế":"E","ế":"e","Ề":"E","ề":"e","Ể":"E","ể":"e","Ễ":"E","ễ":"e","Ệ":"E","ệ":"e","Ỉ":"I","ỉ":"i","Ị":"I","ị":"i","Ọ":"O","ọ":"o","Ỏ":"O","ỏ":"o","Ố":"O","ố":"o","Ồ":"O","ồ":"o","Ổ":"O","ổ":"o","Ỗ":"O","ỗ":"o","Ộ":"O","ộ":"o","Ớ":"O","ớ":"o","Ờ":"O","ờ":"o","Ở":"O","ở":"o","Ỡ":"O","ỡ":"o","Ợ":"O","ợ":"o","Ụ":"U","ụ":"u","Ủ":"U","ủ":"u","Ứ":"U","ứ":"u","Ừ":"U","ừ":"u","Ử":"U","ử":"u","Ữ":"U","ữ":"u","Ự":"U","ự":"u","Ỳ":"Y","ỳ":"y","Ỵ":"Y","ỵ":"y","Ỷ":"Y","ỷ":"y","Ỹ":"Y","ỹ":"y","–":"-","‘":"'","’":"'","“":"\\"","”":"\\"","„":"\\"","†":"+","•":"*","…":"...","₠":"ecu","₢":"cruzeiro","₣":"french franc","₤":"lira","₥":"mill","₦":"naira","₧":"peseta","₨":"rupee","₩":"won","₪":"new shequel","₫":"dong","€":"euro","₭":"kip","₮":"tugrik","₯":"drachma","₰":"penny","₱":"peso","₲":"guarani","₳":"austral","₴":"hryvnia","₵":"cedi","₸":"kazakhstani tenge","₹":"indian rupee","₺":"turkish lira","₽":"russian ruble","₿":"bitcoin","℠":"sm","™":"tm","∂":"d","∆":"delta","∑":"sum","∞":"infinity","♥":"love","元":"yuan","円":"yen","﷼":"rial","ﻵ":"laa","ﻷ":"laa","ﻹ":"lai","ﻻ":"la"}`),a=JSON.parse('{"bg":{"Й":"Y","Ц":"Ts","Щ":"Sht","Ъ":"A","Ь":"Y","й":"y","ц":"ts","щ":"sht","ъ":"a","ь":"y"},"de":{"Ä":"AE","ä":"ae","Ö":"OE","ö":"oe","Ü":"UE","ü":"ue","ß":"ss","%":"prozent","&":"und","|":"oder","∑":"summe","∞":"unendlich","♥":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","¢":"centavos","£":"libras","¤":"moneda","₣":"francos","∑":"suma","∞":"infinito","♥":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","¢":"centime","£":"livre","¤":"devise","₣":"franc","∑":"somme","∞":"infini","♥":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","¢":"centavo","∑":"soma","£":"libra","∞":"infinito","♥":"amor"},"uk":{"И":"Y","и":"y","Й":"Y","й":"y","Ц":"Ts","ц":"ts","Х":"Kh","х":"kh","Щ":"Shch","щ":"shch","Г":"H","г":"h"},"vi":{"Đ":"D","đ":"d"},"da":{"Ø":"OE","ø":"oe","Å":"AA","å":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"større end"},"nb":{"&":"og","Å":"AA","Æ":"AE","Ø":"OE","å":"aa","æ":"ae","ø":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","Å":"AA","Ä":"AE","Ö":"OE","å":"aa","ä":"ae","ö":"oe"}}');function l(c,d){if(typeof c!="string")throw new Error("slugify: string argument expected");d=typeof d=="string"?{replacement:d}:d||{};var m=a[d.locale]||{},p=d.replacement===void 0?"-":d.replacement,x=d.trim===void 0?!0:d.trim,_=c.normalize().split("").reduce(function(C,y){var v=m[y];return v===void 0&&(v=r[y]),v===void 0&&(v=y),v===p&&(v=" "),C+v.replace(d.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")},"");return d.strict&&(_=_.replace(/[^A-Za-z0-9\s]/g,"")),x&&(_=_.trim()),_=_.replace(/\s+/g,p),d.lower&&(_=_.toLowerCase()),_}return l.extend=function(c){Object.assign(r,c)},l})})(Gd);var ww=Gd.exports;const Sw=a0(ww),Sr=()=>{const n=Zr(),o=qn(),{i18n:r}=st(),a=M.useCallback(d=>`${n.getApiUrl()}/quotes/${d}/report`,[n]),l=M.useCallback(d=>`quote-${Sw(d.reference,{lower:!0,strict:!0,locale:"en",trim:!0})}.pdf`,[]),c={useList:d=>{const m=Zr(),p=qn(),{pagination:x,status:_="draft",quickSearchTerm:C=void 0,enabled:y=!0,queryOptions:v}=d;return Fo({queryKey:p().data().resource("quotes").action("list").params(d).get(),queryFn:()=>m.getList({resource:"quotes",quickSearchTerm:C,filters:_!=="all"?[{field:"status",operator:"eq",value:_}]:[{field:"status",operator:"ne",value:"archived"}],pagination:x}),enabled:y,queryOptions:v})},useCreate:()=>{const d=rn();return tb({mutationFn:m=>{const{date:p}=m,x=pn.generateNewID().object.toString();return n.createOne({resource:"quotes",data:{...m,date:new Date(p).toISOString().slice(0,10),status:"draft",id:x}})},onSuccess:()=>{d.invalidateQueries({queryKey:["data","default","quotes"]})}})},useUpdate:d=>{const m=rn();return Ut({mutationKey:o().data().resource("quotes").action("one").id(d).params().get(),mutationFn:p=>n.updateOne({resource:"quotes",id:d,data:p}),onSuccess:()=>{m.invalidateQueries({queryKey:["data","default","quotes"]})}})},useExchangeRate:()=>Ut({mutationFn:({currency:d,date:m})=>n.custom({url:`${n.getApiUrl()}/quotes/exchange-rate?currency=${encodeURIComponent(d)}&date=${encodeURIComponent(m)}`,method:"get"})}),useSetStatus:()=>{const d=rn();return Ut({mutationFn:m=>{const{id:p,newStatus:x}=m;return n.custom({url:`${n.getApiUrl()}/quotes/${p}/setStatus`,method:"put",data:{newStatus:x}})},onSuccess:()=>{d.invalidateQueries({queryKey:["data","default","quotes"]})}})},useDuplicate:()=>{const d=rn();return Ut({mutationFn:m=>{const{id:p}=m;return n.custom({url:`${n.getApiUrl()}/quotes/${p}/duplicate`,method:"post"})},onSuccess:()=>{d.invalidateQueries({queryKey:["data","default","quotes"]})}})},useSentTo:d=>{const m=rn();return Ut({mutationKey:o().data().resource("quotes").action("one").id(d).params().get(),mutationFn:p=>{const{sent_date:x}=p;return n.custom({url:`${n.getApiUrl()}/quotes/${d}/send`,method:"put",data:{sent_date:x}})},onSuccess:()=>{m.invalidateQueries({queryKey:["data","default","quotes"]})}})},useOne:(d,m)=>Sd({queryKey:o().data().resource("quotes").action("one").id(d).params({language:r.language}).get(),queryFn:()=>n.getOne({resource:"quotes",id:String(d)}),enabled:!!d,...m}),getQuotePDFDownloadURL:a,getQuotePDFFilename:l,useReport:()=>{const d=n.getApiAuthorization(),[m,p]=M.useState(void 0),{download:x,..._}=Rc({headers:{Authorization:d},customHandleDownload:M.useCallback(y=>{const v=[y],R=new Blob(v,{type:"application/octet-stream"});return p(R),!0},[p])}),C=M.useCallback(y=>x(c.getQuotePDFDownloadURL(y),""),[x]);return{..._,preview:C,report:m}},useDownloader:()=>{const d=n.getApiAuthorization(),m=Rc({headers:{Authorization:d}});return{...m,download:(x,_)=>{const C=c.getQuotePDFDownloadURL(x);return m.download(C,_)}}}};return c},uS=()=>{const n=Gt(),{i18n:o}=st(),{toast:r}=jn(),{useCreate:a}=Sr(),{mutateAsync:l,isPending:c}=a(),[d,m]=M.useState(),p=o.resolvedLanguage??o.language,x=sn.some(({code:F})=>F===p)?p:"es",_=M.useMemo(()=>({date:new Date(Date.now()).toUTCString(),lang_code:x,customer_reference:"",customer_information:""}),[x]),C=ds({mode:"onBlur",defaultValues:_,resolver:Pc(_n.object({customer_reference:_n.string(),date:_n.date().required(),customer_information:_n.string().required(),lang_code:_n.string().valid(...sn.map(({code:F})=>F)).required()}),{messages:{es:pw}})}),{formState:y,reset:v,handleSubmit:R}=C,{isSubmitting:E,isDirty:k}=y;Oo({isDirty:k}),M.useEffect(()=>{d&&n(`/quotes/edit/${d}`,{relative:"path"})},[d,n]);const D=async F=>{try{const q=await l(F);v(F),r({title:w("quotes.notifications.created"),variant:"default"}),m(q.id)}catch(q){console.debug(q),r({title:w("common.error"),description:q.message,variant:"destructive"})}};return E?i.jsx(Vn,{title:w("quotes.notifications.saving")}):c?i.jsx(Vn,{}):i.jsx(fs,{...C,children:i.jsx("form",{onSubmit:R(D),children:i.jsxs("div",{className:"mx-auto grid max-w-[90rem] flex-1 auto-rows-max gap-6",children:[i.jsxs("div",{className:"flex items-center gap-4",children:[i.jsx(zc,{}),i.jsx("h1",{className:"flex-1 text-xl font-semibold tracking-tight shrink-0 whitespace-nowrap sm:grow-0",children:w("quotes.create.title")})]}),i.jsx("div",{className:"grid w-6/12 gap-6 mx-auto",children:i.jsxs(ns,{className:"md:col-span-4",title:w("quotes.create.form_groups.general.title"),description:w("quotes.create.form_groups.general.desc"),footerActions:i.jsxs("div",{className:"flex items-stretch justify-between flex-1",children:[i.jsx(H,{type:"button",size:"sm",variant:"outline",onClick:()=>n("/quotes"),children:w("common.discard")}),i.jsx(Ro,{size:"sm",label:w("common.continue")})]}),children:[i.jsx(Pn,{required:!0,name:"customer_reference",label:w("quotes.form_fields.customer_reference.label"),description:w("quotes.form_fields.customer_reference.desc"),placeholder:w("quotes.form_fields.customer_reference.placeholder")}),i.jsx(Gc,{required:!0,label:w("quotes.form_fields.date.label"),description:w("quotes.form_fields.date.desc"),placeholder:w("quotes.form_fields.date.placeholder"),name:"date"}),i.jsxs("div",{className:"grid gap-2",children:[i.jsx(zn,{htmlFor:"lang_code",className:"font-semibold",children:w("quotes.form_fields.lang_code.label")}),i.jsx(Jr,{control:C.control,name:"lang_code",render:({field:F})=>i.jsxs(kn,{value:F.value||"es",onValueChange:F.onChange,children:[i.jsx($n,{id:"lang_code","aria-label":w("quotes.form_fields.lang_code.label"),children:i.jsx(Un,{})}),i.jsx(Bn,{children:sn.map(q=>i.jsxs(Vt,{value:q.code,children:[i.jsx("span",{"aria-hidden":"true",className:`mr-2 ${q.flagClassName}`}),q.name]},q.code))})]})}),i.jsx("p",{className:"text-sm text-muted-foreground",children:w("quotes.form_fields.lang_code.desc")})]}),i.jsx(bn,{}),i.jsx(Bt,{rows:4,className:"row-span-2",name:"customer_information",required:!0,label:w("quotes.form_fields.customer_information.label"),description:w("quotes.form_fields.customer_information.desc"),placeholder:w("quotes.form_fields.customer_information.placeholder")})]})})]})})})},eo=(n,o=!1)=>{const{discount:r,tax:a,subtotal_price:l}=n||{},c=zt.create(r||{amount:null,scale:2});if(c.isFailure)throw c.error;const d=c.object,m=zt.create(a||{amount:null,scale:2});if(m.isFailure)throw m.error;const p=m.object,x=Ot.create(l||{amount:null,scale:2});if(x.isFailure)throw x.error;const _=o?Cw(n.items).convertScale(2):x.object,C=_.percentage(d.toNumber()).convertScale(2),y=_.subtract(C).convertScale(2),v=y.percentage(p.toNumber()).convertScale(2),R=y.add(v).convertScale(2);return{subtotal_price:_,discount:n.discount,discount_price:C,before_tax_price:y,tax:p,tax_price:v,total_price:R}},Cw=n=>{let o=Ot.create({amount:0,scale:2}).object;return n&&n.map(r=>{const a=fo(r);o=o.add(a.total_price)}),o},fo=n=>{const{quantity:o,unit_price:r,discount:a}=n||{};if((!o||o&&o.amount===null)&&(!r||r&&r.amount===null)&&(!a||a&&a.amount===null))return{quantity:Sn.create({amount:null,scale:0}).object,unit_price:Ot.create({amount:null,scale:2}).object,subtotal_price:Ot.create({amount:null,scale:2}).object,discount:zt.create({amount:null,scale:2}).object,total_price:Ot.create({amount:null,scale:2}).object};const l=Sn.create(o);if(l.isFailure)throw l.error;const c=l.object,d=Ot.create(r);if(d.isFailure)throw d.error;const m=d.object,p=zt.create(a);if(p.isFailure)throw p.error;const x=p.object,_=m.multiply(c.toNumber()),C=_.subtract(_.percentage(x.toNumber()));return{quantity:c,unit_price:m,subtotal_price:_,discount:x,total_price:C}},jw=()=>{const{id:n}=o0();return n};var ss={exports:{}};/** - * @license - * Lodash - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ss.exports;(function(n,o){(function(){var r,a="4.17.21",l=200,c="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",d="Expected a function",m="Invalid `variable` option passed into `_.template`",p="__lodash_hash_undefined__",x=500,_="__lodash_placeholder__",C=1,y=2,v=4,R=1,E=2,k=1,D=2,F=4,q=8,U=16,O=32,V=64,$=128,le=256,oe=512,G=30,ne="...",K=800,ie=16,xe=1,tt=2,Y=3,ze=1/0,ve=9007199254740991,Ae=17976931348623157e292,Q=NaN,Ne=4294967295,vt=Ne-1,Cr=Ne>>>1,yn=[["ary",$],["bind",k],["bindKey",D],["curry",q],["curryRight",U],["flip",oe],["partial",O],["partialRight",V],["rearg",le]],Kn="[object Arguments]",ri="[object Array]",Yd="[object AsyncFunction]",jr="[object Boolean]",yr="[object Date]",Xd="[object DOMException]",ii="[object Error]",si="[object Function]",$o="[object GeneratorFunction]",It="[object Map]",Nr="[object Number]",Zd="[object Null]",Ht="[object Object]",Uo="[object Promise]",Jd="[object Proxy]",Rr="[object RegExp]",Ft="[object Set]",Er="[object String]",ai="[object Symbol]",ef="[object Undefined]",Ar="[object WeakMap]",tf="[object WeakSet]",Ir="[object ArrayBuffer]",Wn="[object DataView]",ws="[object Float32Array]",Ss="[object Float64Array]",Cs="[object Int8Array]",js="[object Int16Array]",ys="[object Int32Array]",Ns="[object Uint8Array]",Rs="[object Uint8ClampedArray]",Es="[object Uint16Array]",As="[object Uint32Array]",nf=/\b__p \+= '';/g,rf=/\b(__p \+=) '' \+/g,sf=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Bo=/&(?:amp|lt|gt|quot|#39);/g,Vo=/[&<>"']/g,af=RegExp(Bo.source),of=RegExp(Vo.source),lf=/<%-([\s\S]+?)%>/g,uf=/<%([\s\S]+?)%>/g,zo=/<%=([\s\S]+?)%>/g,cf=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,df=/^\w*$/,ff=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Is=/[\\^$.*+?()[\]{}|]/g,gf=RegExp(Is.source),Fs=/^\s+/,mf=/\s/,hf=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,pf=/\{\n\/\* \[wrapped with (.+)\] \*/,xf=/,? & /,_f=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,vf=/[()=,{}\[\]\/\s]/,bf=/\\(\\)?/g,wf=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Go=/\w*$/,Sf=/^[-+]0x[0-9a-f]+$/i,Cf=/^0b[01]+$/i,jf=/^\[object .+?Constructor\]$/,yf=/^0o[0-7]+$/i,Nf=/^(?:0|[1-9]\d*)$/,Rf=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,oi=/($^)/,Ef=/['\n\r\u2028\u2029\\]/g,li="\\ud800-\\udfff",Af="\\u0300-\\u036f",If="\\ufe20-\\ufe2f",Ff="\\u20d0-\\u20ff",Ho=Af+If+Ff,Ko="\\u2700-\\u27bf",Wo="a-z\\xdf-\\xf6\\xf8-\\xff",Df="\\xac\\xb1\\xd7\\xf7",Tf="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Mf="\\u2000-\\u206f",Lf=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Qo="A-Z\\xc0-\\xd6\\xd8-\\xde",Yo="\\ufe0e\\ufe0f",Xo=Df+Tf+Mf+Lf,Ds="['’]",Of="["+li+"]",Zo="["+Xo+"]",ui="["+Ho+"]",Jo="\\d+",Pf="["+Ko+"]",el="["+Wo+"]",tl="[^"+li+Xo+Jo+Ko+Wo+Qo+"]",Ts="\\ud83c[\\udffb-\\udfff]",qf="(?:"+ui+"|"+Ts+")",nl="[^"+li+"]",Ms="(?:\\ud83c[\\udde6-\\uddff]){2}",Ls="[\\ud800-\\udbff][\\udc00-\\udfff]",Qn="["+Qo+"]",rl="\\u200d",il="(?:"+el+"|"+tl+")",kf="(?:"+Qn+"|"+tl+")",sl="(?:"+Ds+"(?:d|ll|m|re|s|t|ve))?",al="(?:"+Ds+"(?:D|LL|M|RE|S|T|VE))?",ol=qf+"?",ll="["+Yo+"]?",$f="(?:"+rl+"(?:"+[nl,Ms,Ls].join("|")+")"+ll+ol+")*",Uf="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Bf="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ul=ll+ol+$f,Vf="(?:"+[Pf,Ms,Ls].join("|")+")"+ul,zf="(?:"+[nl+ui+"?",ui,Ms,Ls,Of].join("|")+")",Gf=RegExp(Ds,"g"),Hf=RegExp(ui,"g"),Os=RegExp(Ts+"(?="+Ts+")|"+zf+ul,"g"),Kf=RegExp([Qn+"?"+el+"+"+sl+"(?="+[Zo,Qn,"$"].join("|")+")",kf+"+"+al+"(?="+[Zo,Qn+il,"$"].join("|")+")",Qn+"?"+il+"+"+sl,Qn+"+"+al,Bf,Uf,Jo,Vf].join("|"),"g"),Wf=RegExp("["+rl+li+Ho+Yo+"]"),Qf=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Yf=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Xf=-1,Re={};Re[ws]=Re[Ss]=Re[Cs]=Re[js]=Re[ys]=Re[Ns]=Re[Rs]=Re[Es]=Re[As]=!0,Re[Kn]=Re[ri]=Re[Ir]=Re[jr]=Re[Wn]=Re[yr]=Re[ii]=Re[si]=Re[It]=Re[Nr]=Re[Ht]=Re[Rr]=Re[Ft]=Re[Er]=Re[Ar]=!1;var ye={};ye[Kn]=ye[ri]=ye[Ir]=ye[Wn]=ye[jr]=ye[yr]=ye[ws]=ye[Ss]=ye[Cs]=ye[js]=ye[ys]=ye[It]=ye[Nr]=ye[Ht]=ye[Rr]=ye[Ft]=ye[Er]=ye[ai]=ye[Ns]=ye[Rs]=ye[Es]=ye[As]=!0,ye[ii]=ye[si]=ye[Ar]=!1;var Zf={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Jf={"&":"&","<":"<",">":">",'"':""","'":"'"},eg={"&":"&","<":"<",">":">",""":'"',"'":"'"},tg={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ng=parseFloat,rg=parseInt,cl=typeof ur=="object"&&ur&&ur.Object===Object&&ur,ig=typeof self=="object"&&self&&self.Object===Object&&self,Ge=cl||ig||Function("return this")(),Ps=o&&!o.nodeType&&o,Nn=Ps&&!0&&n&&!n.nodeType&&n,dl=Nn&&Nn.exports===Ps,qs=dl&&cl.process,bt=function(){try{var j=Nn&&Nn.require&&Nn.require("util").types;return j||qs&&qs.binding&&qs.binding("util")}catch{}}(),fl=bt&&bt.isArrayBuffer,gl=bt&&bt.isDate,ml=bt&&bt.isMap,hl=bt&&bt.isRegExp,pl=bt&&bt.isSet,xl=bt&&bt.isTypedArray;function ft(j,I,A){switch(A.length){case 0:return j.call(I);case 1:return j.call(I,A[0]);case 2:return j.call(I,A[0],A[1]);case 3:return j.call(I,A[0],A[1],A[2])}return j.apply(I,A)}function sg(j,I,A,z){for(var re=-1,he=j==null?0:j.length;++re-1}function ks(j,I,A){for(var z=-1,re=j==null?0:j.length;++z-1;);return A}function yl(j,I){for(var A=j.length;A--&&Yn(I,j[A],0)>-1;);return A}function mg(j,I){for(var A=j.length,z=0;A--;)j[A]===I&&++z;return z}var hg=Vs(Zf),pg=Vs(Jf);function xg(j){return"\\"+tg[j]}function _g(j,I){return j==null?r:j[I]}function Xn(j){return Wf.test(j)}function vg(j){return Qf.test(j)}function bg(j){for(var I,A=[];!(I=j.next()).done;)A.push(I.value);return A}function Ks(j){var I=-1,A=Array(j.size);return j.forEach(function(z,re){A[++I]=[re,z]}),A}function Nl(j,I){return function(A){return j(I(A))}}function ln(j,I){for(var A=-1,z=j.length,re=0,he=[];++A-1}function om(e,t){var s=this.__data__,u=Ri(s,e);return u<0?(++this.size,s.push([e,t])):s[u][1]=t,this}Kt.prototype.clear=rm,Kt.prototype.delete=im,Kt.prototype.get=sm,Kt.prototype.has=am,Kt.prototype.set=om;function Wt(e){var t=-1,s=e==null?0:e.length;for(this.clear();++t=t?e:t)),e}function jt(e,t,s,u,f,h){var b,S=t&C,N=t&y,T=t&v;if(s&&(b=f?s(e,u,f,h):s(e)),b!==r)return b;if(!Fe(e))return e;var L=se(e);if(L){if(b=dh(e),!S)return at(e,b)}else{var P=Je(e),B=P==si||P==$o;if(mn(e))return lu(e,S);if(P==Ht||P==Kn||B&&!f){if(b=N||B?{}:Ru(e),!S)return N?eh(e,Cm(b,e)):Jm(e,ql(b,e))}else{if(!ye[P])return f?e:{};b=fh(e,P,S)}}h||(h=new Tt);var W=h.get(e);if(W)return W;h.set(e,b),nc(e)?e.forEach(function(te){b.add(jt(te,t,s,te,e,h))}):ec(e)&&e.forEach(function(te,fe){b.set(fe,jt(te,t,s,fe,e,h))});var ee=T?N?va:_a:N?lt:Be,ce=L?r:ee(e);return wt(ce||e,function(te,fe){ce&&(fe=te,te=e[fe]),Pr(b,fe,jt(te,t,s,fe,e,h))}),b}function jm(e){var t=Be(e);return function(s){return kl(s,e,t)}}function kl(e,t,s){var u=s.length;if(e==null)return!u;for(e=Ce(e);u--;){var f=s[u],h=t[f],b=e[f];if(b===r&&!(f in e)||!h(b))return!1}return!0}function $l(e,t,s){if(typeof e!="function")throw new St(d);return zr(function(){e.apply(r,s)},t)}function qr(e,t,s,u){var f=-1,h=ci,b=!0,S=e.length,N=[],T=t.length;if(!S)return N;s&&(t=Ie(t,gt(s))),u?(h=ks,b=!1):t.length>=l&&(h=Fr,b=!1,t=new An(t));e:for(;++ff?0:f+s),u=u===r||u>f?f:ue(u),u<0&&(u+=f),u=s>u?0:ic(u);s0&&s(S)?t>1?He(S,t-1,s,u,f):on(f,S):u||(f[f.length]=S)}return f}var ea=mu(),Vl=mu(!0);function qt(e,t){return e&&ea(e,t,Be)}function ta(e,t){return e&&Vl(e,t,Be)}function Ai(e,t){return an(t,function(s){return Jt(e[s])})}function Fn(e,t){t=fn(t,e);for(var s=0,u=t.length;e!=null&&st}function Rm(e,t){return e!=null&&be.call(e,t)}function Em(e,t){return e!=null&&t in Ce(e)}function Am(e,t,s){return e>=Ze(t,s)&&e=120&&L.length>=120)?new An(b&&L):r}L=e[0];var P=-1,B=S[0];e:for(;++P-1;)S!==e&&bi.call(S,N,1),bi.call(e,N,1);return e}function eu(e,t){for(var s=e?t.length:0,u=s-1;s--;){var f=t[s];if(s==u||f!==h){var h=f;Zt(f)?bi.call(e,f,1):da(e,f)}}return e}function la(e,t){return e+Ci(Ml()*(t-e+1))}function Bm(e,t,s,u){for(var f=-1,h=Ue(Si((t-e)/(s||1)),0),b=A(h);h--;)b[u?h:++f]=e,e+=s;return b}function ua(e,t){var s="";if(!e||t<1||t>ve)return s;do t%2&&(s+=e),t=Ci(t/2),t&&(e+=e);while(t);return s}function de(e,t){return Na(Iu(e,t,ut),e+"")}function Vm(e){return Pl(lr(e))}function zm(e,t){var s=lr(e);return $i(s,In(t,0,s.length))}function Ur(e,t,s,u){if(!Fe(e))return e;t=fn(t,e);for(var f=-1,h=t.length,b=h-1,S=e;S!=null&&++ff?0:f+t),s=s>f?f:s,s<0&&(s+=f),f=t>s?0:s-t>>>0,t>>>=0;for(var h=A(f);++u>>1,b=e[h];b!==null&&!ht(b)&&(s?b<=t:b=l){var T=t?null:ih(e);if(T)return fi(T);b=!1,f=Fr,N=new An}else N=t?[]:S;e:for(;++u=u?e:yt(e,t,s)}var ou=Lg||function(e){return Ge.clearTimeout(e)};function lu(e,t){if(t)return e.slice();var s=e.length,u=Al?Al(s):new e.constructor(s);return e.copy(u),u}function ha(e){var t=new e.constructor(e.byteLength);return new _i(t).set(new _i(e)),t}function Qm(e,t){var s=t?ha(e.buffer):e.buffer;return new e.constructor(s,e.byteOffset,e.byteLength)}function Ym(e){var t=new e.constructor(e.source,Go.exec(e));return t.lastIndex=e.lastIndex,t}function Xm(e){return Or?Ce(Or.call(e)):{}}function uu(e,t){var s=t?ha(e.buffer):e.buffer;return new e.constructor(s,e.byteOffset,e.length)}function cu(e,t){if(e!==t){var s=e!==r,u=e===null,f=e===e,h=ht(e),b=t!==r,S=t===null,N=t===t,T=ht(t);if(!S&&!T&&!h&&e>t||h&&b&&N&&!S&&!T||u&&b&&N||!s&&N||!f)return 1;if(!u&&!h&&!T&&e=S)return N;var T=s[u];return N*(T=="desc"?-1:1)}}return e.index-t.index}function du(e,t,s,u){for(var f=-1,h=e.length,b=s.length,S=-1,N=t.length,T=Ue(h-b,0),L=A(N+T),P=!u;++S1?s[f-1]:r,b=f>2?s[2]:r;for(h=e.length>3&&typeof h=="function"?(f--,h):r,b&&rt(s[0],s[1],b)&&(h=f<3?r:h,f=1),t=Ce(t);++u-1?f[h?t[b]:b]:r}}function xu(e){return Xt(function(t){var s=t.length,u=s,f=Ct.prototype.thru;for(e&&t.reverse();u--;){var h=t[u];if(typeof h!="function")throw new St(d);if(f&&!b&&qi(h)=="wrapper")var b=new Ct([],!0)}for(u=b?u:s;++u1&&me.reverse(),L&&NS))return!1;var T=h.get(e),L=h.get(t);if(T&&L)return T==t&&L==e;var P=-1,B=!0,W=s&E?new An:r;for(h.set(e,t),h.set(t,e);++P1?"& ":"")+t[u],t=t.join(s>2?", ":" "),e.replace(hf,`{ -/* [wrapped with `+t+`] */ -`)}function mh(e){return se(e)||Mn(e)||!!(Dl&&e&&e[Dl])}function Zt(e,t){var s=typeof e;return t=t??ve,!!t&&(s=="number"||s!="symbol"&&Nf.test(e))&&e>-1&&e%1==0&&e0){if(++t>=K)return arguments[0]}else t=0;return e.apply(r,arguments)}}function $i(e,t){var s=-1,u=e.length,f=u-1;for(t=t===r?u:t;++s1?e[t-1]:r;return s=typeof s=="function"?(e.pop(),s):r,Bu(e,s)});function Vu(e){var t=g(e);return t.__chain__=!0,t}function yp(e,t){return t(e),e}function Ui(e,t){return t(e)}var Np=Xt(function(e){var t=e.length,s=t?e[0]:0,u=this.__wrapped__,f=function(h){return Js(h,e)};return t>1||this.__actions__.length||!(u instanceof ge)||!Zt(s)?this.thru(f):(u=u.slice(s,+s+(t?1:0)),u.__actions__.push({func:Ui,args:[f],thisArg:r}),new Ct(u,this.__chain__).thru(function(h){return t&&!h.length&&h.push(r),h}))});function Rp(){return Vu(this)}function Ep(){return new Ct(this.value(),this.__chain__)}function Ap(){this.__values__===r&&(this.__values__=rc(this.value()));var e=this.__index__>=this.__values__.length,t=e?r:this.__values__[this.__index__++];return{done:e,value:t}}function Ip(){return this}function Fp(e){for(var t,s=this;s instanceof Ni;){var u=Ou(s);u.__index__=0,u.__values__=r,t?f.__wrapped__=u:t=u;var f=u;s=s.__wrapped__}return f.__wrapped__=e,t}function Dp(){var e=this.__wrapped__;if(e instanceof ge){var t=e;return this.__actions__.length&&(t=new ge(this)),t=t.reverse(),t.__actions__.push({func:Ui,args:[Ra],thisArg:r}),new Ct(t,this.__chain__)}return this.thru(Ra)}function Tp(){return su(this.__wrapped__,this.__actions__)}var Mp=Ti(function(e,t,s){be.call(e,s)?++e[s]:Qt(e,s,1)});function Lp(e,t,s){var u=se(e)?_l:ym;return s&&rt(e,t,s)&&(t=r),u(e,X(t,3))}function Op(e,t){var s=se(e)?an:Bl;return s(e,X(t,3))}var Pp=pu(Pu),qp=pu(qu);function kp(e,t){return He(Bi(e,t),1)}function $p(e,t){return He(Bi(e,t),ze)}function Up(e,t,s){return s=s===r?1:ue(s),He(Bi(e,t),s)}function zu(e,t){var s=se(e)?wt:cn;return s(e,X(t,3))}function Gu(e,t){var s=se(e)?ag:Ul;return s(e,X(t,3))}var Bp=Ti(function(e,t,s){be.call(e,s)?e[s].push(t):Qt(e,s,[t])});function Vp(e,t,s,u){e=ot(e)?e:lr(e),s=s&&!u?ue(s):0;var f=e.length;return s<0&&(s=Ue(f+s,0)),Ki(e)?s<=f&&e.indexOf(t,s)>-1:!!f&&Yn(e,t,s)>-1}var zp=de(function(e,t,s){var u=-1,f=typeof t=="function",h=ot(e)?A(e.length):[];return cn(e,function(b){h[++u]=f?ft(t,b,s):kr(b,t,s)}),h}),Gp=Ti(function(e,t,s){Qt(e,s,t)});function Bi(e,t){var s=se(e)?Ie:Wl;return s(e,X(t,3))}function Hp(e,t,s,u){return e==null?[]:(se(t)||(t=t==null?[]:[t]),s=u?r:s,se(s)||(s=s==null?[]:[s]),Zl(e,t,s))}var Kp=Ti(function(e,t,s){e[s?0:1].push(t)},function(){return[[],[]]});function Wp(e,t,s){var u=se(e)?$s:Sl,f=arguments.length<3;return u(e,X(t,4),s,f,cn)}function Qp(e,t,s){var u=se(e)?og:Sl,f=arguments.length<3;return u(e,X(t,4),s,f,Ul)}function Yp(e,t){var s=se(e)?an:Bl;return s(e,Gi(X(t,3)))}function Xp(e){var t=se(e)?Pl:Vm;return t(e)}function Zp(e,t,s){(s?rt(e,t,s):t===r)?t=1:t=ue(t);var u=se(e)?bm:zm;return u(e,t)}function Jp(e){var t=se(e)?wm:Hm;return t(e)}function ex(e){if(e==null)return 0;if(ot(e))return Ki(e)?Zn(e):e.length;var t=Je(e);return t==It||t==Ft?e.size:sa(e).length}function tx(e,t,s){var u=se(e)?Us:Km;return s&&rt(e,t,s)&&(t=r),u(e,X(t,3))}var nx=de(function(e,t){if(e==null)return[];var s=t.length;return s>1&&rt(e,t[0],t[1])?t=[]:s>2&&rt(t[0],t[1],t[2])&&(t=[t[0]]),Zl(e,He(t,1),[])}),Vi=Og||function(){return Ge.Date.now()};function rx(e,t){if(typeof t!="function")throw new St(d);return e=ue(e),function(){if(--e<1)return t.apply(this,arguments)}}function Hu(e,t,s){return t=s?r:t,t=e&&t==null?e.length:t,Yt(e,$,r,r,r,r,t)}function Ku(e,t){var s;if(typeof t!="function")throw new St(d);return e=ue(e),function(){return--e>0&&(s=t.apply(this,arguments)),e<=1&&(t=r),s}}var Aa=de(function(e,t,s){var u=k;if(s.length){var f=ln(s,ar(Aa));u|=O}return Yt(e,u,t,s,f)}),Wu=de(function(e,t,s){var u=k|D;if(s.length){var f=ln(s,ar(Wu));u|=O}return Yt(t,u,e,s,f)});function Qu(e,t,s){t=s?r:t;var u=Yt(e,q,r,r,r,r,r,t);return u.placeholder=Qu.placeholder,u}function Yu(e,t,s){t=s?r:t;var u=Yt(e,U,r,r,r,r,r,t);return u.placeholder=Yu.placeholder,u}function Xu(e,t,s){var u,f,h,b,S,N,T=0,L=!1,P=!1,B=!0;if(typeof e!="function")throw new St(d);t=Rt(t)||0,Fe(s)&&(L=!!s.leading,P="maxWait"in s,h=P?Ue(Rt(s.maxWait)||0,t):h,B="trailing"in s?!!s.trailing:B);function W(Le){var Lt=u,tn=f;return u=f=r,T=Le,b=e.apply(tn,Lt),b}function ee(Le){return T=Le,S=zr(fe,t),L?W(Le):b}function ce(Le){var Lt=Le-N,tn=Le-T,pc=t-Lt;return P?Ze(pc,h-tn):pc}function te(Le){var Lt=Le-N,tn=Le-T;return N===r||Lt>=t||Lt<0||P&&tn>=h}function fe(){var Le=Vi();if(te(Le))return me(Le);S=zr(fe,ce(Le))}function me(Le){return S=r,B&&u?W(Le):(u=f=r,b)}function pt(){S!==r&&ou(S),T=0,u=N=f=S=r}function it(){return S===r?b:me(Vi())}function xt(){var Le=Vi(),Lt=te(Le);if(u=arguments,f=this,N=Le,Lt){if(S===r)return ee(N);if(P)return ou(S),S=zr(fe,t),W(N)}return S===r&&(S=zr(fe,t)),b}return xt.cancel=pt,xt.flush=it,xt}var ix=de(function(e,t){return $l(e,1,t)}),sx=de(function(e,t,s){return $l(e,Rt(t)||0,s)});function ax(e){return Yt(e,oe)}function zi(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new St(d);var s=function(){var u=arguments,f=t?t.apply(this,u):u[0],h=s.cache;if(h.has(f))return h.get(f);var b=e.apply(this,u);return s.cache=h.set(f,b)||h,b};return s.cache=new(zi.Cache||Wt),s}zi.Cache=Wt;function Gi(e){if(typeof e!="function")throw new St(d);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function ox(e){return Ku(2,e)}var lx=Wm(function(e,t){t=t.length==1&&se(t[0])?Ie(t[0],gt(X())):Ie(He(t,1),gt(X()));var s=t.length;return de(function(u){for(var f=-1,h=Ze(u.length,s);++f=t}),Mn=Gl(function(){return arguments}())?Gl:function(e){return De(e)&&be.call(e,"callee")&&!Fl.call(e,"callee")},se=A.isArray,Cx=fl?gt(fl):Fm;function ot(e){return e!=null&&Hi(e.length)&&!Jt(e)}function Me(e){return De(e)&&ot(e)}function jx(e){return e===!0||e===!1||De(e)&&nt(e)==jr}var mn=qg||Ua,yx=gl?gt(gl):Dm;function Nx(e){return De(e)&&e.nodeType===1&&!Gr(e)}function Rx(e){if(e==null)return!0;if(ot(e)&&(se(e)||typeof e=="string"||typeof e.splice=="function"||mn(e)||or(e)||Mn(e)))return!e.length;var t=Je(e);if(t==It||t==Ft)return!e.size;if(Vr(e))return!sa(e).length;for(var s in e)if(be.call(e,s))return!1;return!0}function Ex(e,t){return $r(e,t)}function Ax(e,t,s){s=typeof s=="function"?s:r;var u=s?s(e,t):r;return u===r?$r(e,t,r,s):!!u}function Fa(e){if(!De(e))return!1;var t=nt(e);return t==ii||t==Xd||typeof e.message=="string"&&typeof e.name=="string"&&!Gr(e)}function Ix(e){return typeof e=="number"&&Tl(e)}function Jt(e){if(!Fe(e))return!1;var t=nt(e);return t==si||t==$o||t==Yd||t==Jd}function Ju(e){return typeof e=="number"&&e==ue(e)}function Hi(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=ve}function Fe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function De(e){return e!=null&&typeof e=="object"}var ec=ml?gt(ml):Mm;function Fx(e,t){return e===t||ia(e,t,wa(t))}function Dx(e,t,s){return s=typeof s=="function"?s:r,ia(e,t,wa(t),s)}function Tx(e){return tc(e)&&e!=+e}function Mx(e){if(xh(e))throw new re(c);return Hl(e)}function Lx(e){return e===null}function Ox(e){return e==null}function tc(e){return typeof e=="number"||De(e)&&nt(e)==Nr}function Gr(e){if(!De(e)||nt(e)!=Ht)return!1;var t=vi(e);if(t===null)return!0;var s=be.call(t,"constructor")&&t.constructor;return typeof s=="function"&&s instanceof s&&hi.call(s)==Dg}var Da=hl?gt(hl):Lm;function Px(e){return Ju(e)&&e>=-9007199254740991&&e<=ve}var nc=pl?gt(pl):Om;function Ki(e){return typeof e=="string"||!se(e)&&De(e)&&nt(e)==Er}function ht(e){return typeof e=="symbol"||De(e)&&nt(e)==ai}var or=xl?gt(xl):Pm;function qx(e){return e===r}function kx(e){return De(e)&&Je(e)==Ar}function $x(e){return De(e)&&nt(e)==tf}var Ux=Pi(aa),Bx=Pi(function(e,t){return e<=t});function rc(e){if(!e)return[];if(ot(e))return Ki(e)?Dt(e):at(e);if(Dr&&e[Dr])return bg(e[Dr]());var t=Je(e),s=t==It?Ks:t==Ft?fi:lr;return s(e)}function en(e){if(!e)return e===0?e:0;if(e=Rt(e),e===ze||e===-1/0){var t=e<0?-1:1;return t*Ae}return e===e?e:0}function ue(e){var t=en(e),s=t%1;return t===t?s?t-s:t:0}function ic(e){return e?In(ue(e),0,Ne):0}function Rt(e){if(typeof e=="number")return e;if(ht(e))return Q;if(Fe(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Fe(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Cl(e);var s=Cf.test(e);return s||yf.test(e)?rg(e.slice(2),s?2:8):Sf.test(e)?Q:+e}function sc(e){return kt(e,lt(e))}function Vx(e){return e?In(ue(e),-9007199254740991,ve):e===0?e:0}function _e(e){return e==null?"":mt(e)}var zx=ir(function(e,t){if(Vr(t)||ot(t)){kt(t,Be(t),e);return}for(var s in t)be.call(t,s)&&Pr(e,s,t[s])}),ac=ir(function(e,t){kt(t,lt(t),e)}),Wi=ir(function(e,t,s,u){kt(t,lt(t),e,u)}),Gx=ir(function(e,t,s,u){kt(t,Be(t),e,u)}),Hx=Xt(Js);function Kx(e,t){var s=rr(e);return t==null?s:ql(s,t)}var Wx=de(function(e,t){e=Ce(e);var s=-1,u=t.length,f=u>2?t[2]:r;for(f&&rt(t[0],t[1],f)&&(u=1);++s1),h}),kt(e,va(e),s),u&&(s=jt(s,C|y|v,sh));for(var f=t.length;f--;)da(s,t[f]);return s});function f_(e,t){return lc(e,Gi(X(t)))}var g_=Xt(function(e,t){return e==null?{}:$m(e,t)});function lc(e,t){if(e==null)return{};var s=Ie(va(e),function(u){return[u]});return t=X(t),Jl(e,s,function(u,f){return t(u,f[0])})}function m_(e,t,s){t=fn(t,e);var u=-1,f=t.length;for(f||(f=1,e=r);++ut){var u=e;e=t,t=u}if(s||e%1||t%1){var f=Ml();return Ze(e+f*(t-e+ng("1e-"+((f+"").length-1))),t)}return la(e,t)}var y_=sr(function(e,t,s){return t=t.toLowerCase(),e+(s?dc(t):t)});function dc(e){return La(_e(e).toLowerCase())}function fc(e){return e=_e(e),e&&e.replace(Rf,hg).replace(Hf,"")}function N_(e,t,s){e=_e(e),t=mt(t);var u=e.length;s=s===r?u:In(ue(s),0,u);var f=s;return s-=t.length,s>=0&&e.slice(s,f)==t}function R_(e){return e=_e(e),e&&of.test(e)?e.replace(Vo,pg):e}function E_(e){return e=_e(e),e&&gf.test(e)?e.replace(Is,"\\$&"):e}var A_=sr(function(e,t,s){return e+(s?"-":"")+t.toLowerCase()}),I_=sr(function(e,t,s){return e+(s?" ":"")+t.toLowerCase()}),F_=hu("toLowerCase");function D_(e,t,s){e=_e(e),t=ue(t);var u=t?Zn(e):0;if(!t||u>=t)return e;var f=(t-u)/2;return Oi(Ci(f),s)+e+Oi(Si(f),s)}function T_(e,t,s){e=_e(e),t=ue(t);var u=t?Zn(e):0;return t&&u>>0,s?(e=_e(e),e&&(typeof t=="string"||t!=null&&!Da(t))&&(t=mt(t),!t&&Xn(e))?gn(Dt(e),0,s):e.split(t,s)):[]}var $_=sr(function(e,t,s){return e+(s?" ":"")+La(t)});function U_(e,t,s){return e=_e(e),s=s==null?0:In(ue(s),0,e.length),t=mt(t),e.slice(s,s+t.length)==t}function B_(e,t,s){var u=g.templateSettings;s&&rt(e,t,s)&&(t=r),e=_e(e),t=Wi({},t,u,Su);var f=Wi({},t.imports,u.imports,Su),h=Be(f),b=Hs(f,h),S,N,T=0,L=t.interpolate||oi,P="__p += '",B=Ws((t.escape||oi).source+"|"+L.source+"|"+(L===zo?wf:oi).source+"|"+(t.evaluate||oi).source+"|$","g"),W="//# sourceURL="+(be.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Xf+"]")+` -`;e.replace(B,function(te,fe,me,pt,it,xt){return me||(me=pt),P+=e.slice(T,xt).replace(Ef,xg),fe&&(S=!0,P+=`' + -__e(`+fe+`) + -'`),it&&(N=!0,P+=`'; -`+it+`; -__p += '`),me&&(P+=`' + -((__t = (`+me+`)) == null ? '' : __t) + -'`),T=xt+te.length,te}),P+=`'; -`;var ee=be.call(t,"variable")&&t.variable;if(!ee)P=`with (obj) { -`+P+` -} -`;else if(vf.test(ee))throw new re(m);P=(N?P.replace(nf,""):P).replace(rf,"$1").replace(sf,"$1;"),P="function("+(ee||"obj")+`) { -`+(ee?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(S?", __e = _.escape":"")+(N?`, __j = Array.prototype.join; -function print() { __p += __j.call(arguments, '') } -`:`; -`)+P+`return __p -}`;var ce=mc(function(){return he(h,W+"return "+P).apply(r,b)});if(ce.source=P,Fa(ce))throw ce;return ce}function V_(e){return _e(e).toLowerCase()}function z_(e){return _e(e).toUpperCase()}function G_(e,t,s){if(e=_e(e),e&&(s||t===r))return Cl(e);if(!e||!(t=mt(t)))return e;var u=Dt(e),f=Dt(t),h=jl(u,f),b=yl(u,f)+1;return gn(u,h,b).join("")}function H_(e,t,s){if(e=_e(e),e&&(s||t===r))return e.slice(0,Rl(e)+1);if(!e||!(t=mt(t)))return e;var u=Dt(e),f=yl(u,Dt(t))+1;return gn(u,0,f).join("")}function K_(e,t,s){if(e=_e(e),e&&(s||t===r))return e.replace(Fs,"");if(!e||!(t=mt(t)))return e;var u=Dt(e),f=jl(u,Dt(t));return gn(u,f).join("")}function W_(e,t){var s=G,u=ne;if(Fe(t)){var f="separator"in t?t.separator:f;s="length"in t?ue(t.length):s,u="omission"in t?mt(t.omission):u}e=_e(e);var h=e.length;if(Xn(e)){var b=Dt(e);h=b.length}if(s>=h)return e;var S=s-Zn(u);if(S<1)return u;var N=b?gn(b,0,S).join(""):e.slice(0,S);if(f===r)return N+u;if(b&&(S+=N.length-S),Da(f)){if(e.slice(S).search(f)){var T,L=N;for(f.global||(f=Ws(f.source,_e(Go.exec(f))+"g")),f.lastIndex=0;T=f.exec(L);)var P=T.index;N=N.slice(0,P===r?S:P)}}else if(e.indexOf(mt(f),S)!=S){var B=N.lastIndexOf(f);B>-1&&(N=N.slice(0,B))}return N+u}function Q_(e){return e=_e(e),e&&af.test(e)?e.replace(Bo,jg):e}var Y_=sr(function(e,t,s){return e+(s?" ":"")+t.toUpperCase()}),La=hu("toUpperCase");function gc(e,t,s){return e=_e(e),t=s?r:t,t===r?vg(e)?Rg(e):cg(e):e.match(t)||[]}var mc=de(function(e,t){try{return ft(e,r,t)}catch(s){return Fa(s)?s:new re(s)}}),X_=Xt(function(e,t){return wt(t,function(s){s=$t(s),Qt(e,s,Aa(e[s],e))}),e});function Z_(e){var t=e==null?0:e.length,s=X();return e=t?Ie(e,function(u){if(typeof u[1]!="function")throw new St(d);return[s(u[0]),u[1]]}):[],de(function(u){for(var f=-1;++fve)return[];var s=Ne,u=Ze(e,Ne);t=X(t),e-=Ne;for(var f=Gs(u,t);++s0||t<0)?new ge(s):(e<0?s=s.takeRight(-e):e&&(s=s.drop(e)),t!==r&&(t=ue(t),s=t<0?s.dropRight(-t):s.take(t-e)),s)},ge.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},ge.prototype.toArray=function(){return this.take(Ne)},qt(ge.prototype,function(e,t){var s=/^(?:filter|find|map|reject)|While$/.test(t),u=/^(?:head|last)$/.test(t),f=g[u?"take"+(t=="last"?"Right":""):t],h=u||/^find/.test(t);f&&(g.prototype[t]=function(){var b=this.__wrapped__,S=u?[1]:arguments,N=b instanceof ge,T=S[0],L=N||se(b),P=function(fe){var me=f.apply(g,on([fe],S));return u&&B?me[0]:me};L&&s&&typeof T=="function"&&T.length!=1&&(N=L=!1);var B=this.__chain__,W=!!this.__actions__.length,ee=h&&!B,ce=N&&!W;if(!h&&L){b=ce?b:new ge(this);var te=e.apply(b,S);return te.__actions__.push({func:Ui,args:[P],thisArg:r}),new Ct(te,B)}return ee&&ce?e.apply(this,S):(te=this.thru(P),ee?u?te.value()[0]:te.value():te)})}),wt(["pop","push","shift","sort","splice","unshift"],function(e){var t=gi[e],s=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",u=/^(?:pop|shift)$/.test(e);g.prototype[e]=function(){var f=arguments;if(u&&!this.__chain__){var h=this.value();return t.apply(se(h)?h:[],f)}return this[s](function(b){return t.apply(se(b)?b:[],f)})}}),qt(ge.prototype,function(e,t){var s=g[t];if(s){var u=s.name+"";be.call(nr,u)||(nr[u]=[]),nr[u].push({name:t,func:s})}}),nr[Mi(r,D).name]=[{name:"wrapper",func:r}],ge.prototype.clone=Qg,ge.prototype.reverse=Yg,ge.prototype.value=Xg,g.prototype.at=Np,g.prototype.chain=Rp,g.prototype.commit=Ep,g.prototype.next=Ap,g.prototype.plant=Fp,g.prototype.reverse=Dp,g.prototype.toJSON=g.prototype.valueOf=g.prototype.value=Tp,g.prototype.first=g.prototype.head,Dr&&(g.prototype[Dr]=Ip),g},Jn=Eg();Nn?((Nn.exports=Jn)._=Jn,Ps._=Jn):Ge._=Jn}).call(ur)})(ss,ss.exports);var Te=ss.exports;const yw=n=>{const o=zt.create(n[1]||{amount:null,scale:2});if(o.isFailure)throw o.error;const r=o.object,a=zt.create(n[2]||{amount:null,scale:2});if(a.isFailure)throw a.error;const l=a.object,c=Ot.create(n[0]||{amount:null,scale:2});if(c.isFailure)throw c.error;const d=c.object,m=d.percentage(r.toNumber()).convertScale(2),p=d.subtract(m).convertScale(2),x=p.percentage(l.toNumber()).convertScale(2),_=p.add(x).convertScale(2);return{subtotalPrice:d.toObject(),discount:r.toObject(),discountPrice:m.toObject(),priceBeforeTaxes:p.toObject(),tax:l.toObject(),taxesPrice:x.toObject(),totalPrice:_.toObject()}},Nw=({currency:n})=>{const{formState:o,control:r}=Gn(),{formatNumber:a}=Pd(),l=hn({control:r,name:["subtotal_price","discount","tax"]}),c=hn({control:r,name:"tax_label"})||w("quotes.form_fields.tax.label"),d=yw(l),m=a(d.subtotalPrice),p=a(d.discountPrice),x=a(d.taxesPrice),_=a(d.totalPrice),C=M.useMemo(()=>n.symbol||"",[n]);return i.jsx(Oe,{className:"w-full bg-muted",children:i.jsxs(Pe,{className:"flex flex-row items-end gap-2 p-4 border-t",children:[i.jsx("div",{className:"grid flex-1 h-16 grid-cols-1 auto-rows-max",children:i.jsxs("div",{className:"grid gap-1 font-semibold text-right text-muted-foreground",children:[i.jsx(We,{className:"text-sm",children:w("quotes.form_fields.subtotal_price.label")}),i.jsxs(Ve,{className:"flex items-baseline justify-end text-2xl tabular-nums",children:[m,i.jsx("span",{className:"ml-1 text-lg tracking-normal",children:C})]})]})}),i.jsx(bn,{orientation:"vertical",className:"w-px h-16 mx-2"}),i.jsxs("div",{className:"grid flex-1 h-16 grid-cols-2 gap-6 auto-rows-max",children:[i.jsxs("div",{className:"grid gap-1 font-medium text-muted-foreground",children:[i.jsx(We,{className:"text-sm",children:w("quotes.form_fields.discount.label")}),i.jsx(is,{scale:2,disabled:o.disabled,placeholder:w("quotes.form_fields.discount.placeholder"),name:"discount",onChange:y=>{}})]}),i.jsxs("div",{className:"grid gap-1 font-semibold text-muted-foreground",children:[i.jsx(We,{className:"text-sm text-right",children:w("quotes.form_fields.discount_price.label")}),i.jsxs(Ve,{className:"flex items-baseline justify-end text-2xl tabular-nums",children:[p,i.jsx("span",{className:"ml-1 text-lg tracking-normal",children:C})]})]})]}),i.jsx(bn,{orientation:"vertical",className:"w-px h-16 mx-2"}),i.jsxs("div",{className:"grid flex-1 h-16 grid-cols-2 gap-6 auto-rows-max",children:[i.jsxs("div",{className:"grid gap-1 font-medium text-muted-foreground",children:[i.jsx(We,{className:"text-sm",children:c}),i.jsx(is,{scale:2,disabled:o.disabled,placeholder:w("quotes.form_fields.tax.placeholder"),name:"tax"})]}),i.jsxs("div",{className:"grid gap-1 font-semibold text-muted-foreground",children:[i.jsx(We,{className:"text-sm text-right",children:w("quotes.form_fields.tax_price.label",{label:""})}),i.jsxs(Ve,{className:"flex items-baseline justify-end gap-1 text-2xl tabular-nums",children:[x,i.jsx("span",{className:"text-base font-medium tracking-normal",children:C})]})]})]})," ",i.jsx(bn,{orientation:"vertical",className:"w-px h-16 mx-2"}),i.jsx("div",{className:"grid flex-1 h-16 grid-cols-1 auto-rows-max",children:i.jsxs("div",{className:"grid gap-0",children:[i.jsx(We,{className:"text-sm font-semibold text-right text-foreground",children:w("quotes.form_fields.total_price.label")}),i.jsxs(Ve,{className:"flex items-baseline justify-end gap-1 text-3xl tabular-nums",children:[_,i.jsx("span",{className:"ml-1 text-lg tracking-normal",children:C})]})]})})]})})},Hd=n=>{const{t:o}=st(),{percentage:r,cancel:a,error:l,isInProgress:c,onFinishDownload:d}=n,m=M.useId();return M.useEffect(()=>{c&&!l&&r===100&&d&&d()},[r,c,l,d]),i.jsx(pr,{open:c,children:i.jsxs(xr,{className:"sm:max-w-md",children:[i.jsxs(_r,{children:[i.jsx(vr,{children:o("quotes.downloading_dialog.title")}),i.jsx(ms,{children:o("quotes.downloading_dialog.description")})]}),i.jsxs("div",{className:"mb-4 space-y-2",id:m,children:[i.jsx(zn,{children:o("quotes.downloading_dialog.progress.label",{status:o(c?"quotes.downloading_dialog.progress.status_in_progress":"quotes.downloading_dialog.progress.status_stopped")})}),i.jsx(Hc,{value:r,max:100,getValueLabel:()=>o("quotes.downloading_dialog.progress.label",{})}),l&&i.jsx("p",{role:"alert",children:o("quotes.downloading_dialog.error")})]}),i.jsx(br,{className:"sm:justify-end",children:i.jsx(es,{asChild:!0,children:i.jsx(H,{type:"button",variant:"secondary",onClick:()=>a(),children:o("quotes.downloading_dialog.cancel_button")})})})]})})},Rw=({isInProgress:n,percentage:o,elapsed:r,cancel:a,error:l,className:c})=>{const[d,m]=M.useState(10);return M.useEffect(()=>{if(n&&o>0){const p=r/o*100;m(Math.max(0,Math.round(p-r)))}},[n,o,r]),!n&&!(l!=null&&l.errorMessage)?null:i.jsxs(Oe,{className:pe("overflow-hidden",c),children:[i.jsx(dt,{children:i.jsxs(Ve,{className:"flex items-center justify-between",children:[l!=null&&l.errorMessage?w("quotes.pdf_generation.error"):w("quotes.pdf_generation.title"),n&&i.jsx(k0,{className:"w-4 h-4 animate-spin"}),(l==null?void 0:l.errorMessage)&&i.jsx(M0,{className:"w-4 h-4 text-destructive"})]})}),i.jsx(Pe,{children:l!=null&&l.errorMessage?i.jsx("div",{className:"text-destructive",children:l==null?void 0:l.errorMessage}):i.jsxs("div",{className:"flex flex-col items-center space-y-4",children:[i.jsxs("div",{className:"relative w-32 h-40 overflow-hidden rounded-lg bg-muted",children:[i.jsx("div",{className:"absolute bottom-0 left-0 right-0 transition-all duration-1000 ease-out bg-primary",style:{height:`${o}%`}}),i.jsx(q0,{className:"absolute transform -translate-x-1/2 -translate-y-1/2 animate-pulse top-1/2 left-1/2 text-muted-foreground",size:48})]}),i.jsx(Hc,{value:o,className:"w-full"}),i.jsxs("div",{className:"text-sm text-center text-muted-foreground",children:[i.jsx("p",{children:w("quotes.pdf_generation.progress",{percentage:o})}),i.jsxs("div",{className:"hidden",children:[i.jsx("p",{children:w("quotes.pdf_generation.elapsed",{elapsed:r})}),d>0&&i.jsx("p",{children:w("quotes.pdf_generation.remaining",{estimatedTime:d})})]})]}),i.jsx(H,{variant:"destructive",onClick:a,className:"hidden",children:w("quotes.pdf_generation.cancel")})]})})]})},Kd=({quote:n,className:o})=>{const{useReport:r,getQuotePDFFilename:a,useDownloader:l}=Sr(),{download:c}=l(),{report:d,preview:m,isInProgress:p,...x}=r(),[_,C]=M.useState(void 0),y=M.useCallback(()=>{n&&c(n.id,a(n))},[n]);return M.useEffect(()=>{const v=setTimeout(()=>{n&&n.id&&m(n.id)},200);return()=>clearTimeout(v)},[n]),M.useEffect(()=>{if(!p&&d){const v=window.URL&&window.URL.createObjectURL?window.URL.createObjectURL(d):window.webkitURL.createObjectURL(d);return console.log(v),C(v),()=>{C(void 0),window.URL.revokeObjectURL(v)}}},[d,p]),n?p?i.jsx(Rw,{isInProgress:p,...x}):i.jsx(l0,{file:_,className:"object-contain",onThumbnailClick:y}):i.jsx(Oe,{className:pe("overflow-hidden",o),children:i.jsx(Pe,{className:"px-4 py-6 text-center",children:i.jsx("p",{className:"mx-auto",children:w("quotes.list.resume.select_quote")})})})};Kd.whyDidYouRender=!0;const Kr=nb();function Ew({row:n,table:o}){var l;const r=(l=o.options.meta)==null?void 0:l.catalogPicker;if(!r)return null;const a=r.quantities[n.index]??1;return i.jsx(cs,{type:"number",name:"quantity",min:1,className:"w-24",value:a,onChange:c=>{const d=c.target.value;r.setQuantity(n.index,d===""?"":Number(d))}})}function Aw({row:n,table:o}){var a;const r=(a=o.options.meta)==null?void 0:a.catalogPicker;return i.jsxs(H,{size:"sm",variant:"outline",className:"h-8 gap-1",onClick:l=>{l.preventDefault(),r==null||r.selectArticle(n.original,n.index)},children:[i.jsx(Ao,{className:"h-3.5 w-3.5"}),i.jsx("span",{className:"sr-only xl:not-sr-only xl:whitespace-nowrap",children:r==null?void 0:r.t("common.add")})]})}const go=({onSelect:n})=>{const o=Gt(),{t:r,i18n:a}=st(),{pagination:l,globalFilter:c,isFiltered:d}=Hn(),[m,p]=M.useState([]),x=M.useCallback((F,q)=>{p(U=>{const O=[...U];return O[F]=q,O})},[]),_=()=>{p([])},{data:C,isPending:y,isError:v,error:R}=Ud({pagination:{pageIndex:l.pageIndex,pageSize:l.pageSize},searchTerm:c});M.useEffect(()=>{_()},[l,c,d]);const E=M.useMemo(()=>({catalogPicker:{quantities:m,t:r,setQuantity:x,selectArticle:(F,q)=>n(F,m[q]===""?1:m[q]??1)}}),[x,n,m,r]),k=M.useMemo(()=>[Kr.accessor("description",{id:"description",header:()=>i.jsx(i.Fragment,{children:r("catalog.list.columns.description")})}),Kr.accessor("points",{id:"points",header:()=>i.jsx("div",{className:"text-right",children:r("catalog.list.columns.points")}),cell:({renderValue:F})=>i.jsx("div",{className:"text-right",children:F()})}),Kr.accessor("retail_price",{id:"retail_price",header:()=>i.jsx("div",{className:"text-right",children:r("catalog.list.columns.retail_price")}),cell:({row:F})=>{const q=Ot.create(F.original.retail_price).object;return i.jsx("div",{className:"text-right",children:q.toFormat()})}}),Kr.display({id:"quantity",header:()=>i.jsx("div",{className:"font-medium text-right text-foreground",children:r("catalog.list.columns.quantity")}),cell:Ew}),Kr.display({id:"row-actions",header:()=>null,cell:Aw})],[r,a.resolvedLanguage]),{table:D}=bs({data:[...(C==null?void 0:C.items)||[]],columns:k,pageCount:(C==null?void 0:C.total_pages)??-1,meta:E});return v?i.jsx(wr,{subtitle:R.message}):y?i.jsx(_s,{columnCount:6,searchableColumnCount:1,filterableColumnCount:2,shrinkZero:!0}):(C==null?void 0:C.total_items)===0&&!d?i.jsx(vs,{subtitle:r("catalog.list.empty_state.subtitle"),buttonText:"",onButtonClick:()=>o("/catalog/add")}):i.jsx(xs,{className:"bg-transparent border-0 shadow-none",table:D,paginationOptions:{visible:!0,enablePageSizeSelector:!1},footerClassName:"px-10 pt-2 border-t",children:i.jsx(Bd,{table:D})})},Po=M.forwardRef(({label:n=w("common.append_block"),className:o,...r},a)=>i.jsxs(H,{type:"button",variant:"outline",ref:a,...r,children:[" ",i.jsx(Ao,{className:n?"w-4 h-4 mr-2":"w-4 h-4"}),n&&i.jsx(i.Fragment,{children:n})]}));Po.displayName="AppendBlockRowButton";const qo=M.forwardRef(({label:n=w("common.append_article"),className:o,...r},a)=>i.jsxs(H,{type:"button",variant:"outline",ref:a,...r,children:[" ",i.jsx(Ao,{className:n?"w-4 h-4 mr-2":"w-4 h-4"}),n&&i.jsx(i.Fragment,{children:n})]}));qo.displayName="AppendCatalogArticleRowButton";const ko=M.forwardRef(({label:n=w("common.append_empty_row"),className:o,...r},a)=>i.jsxs(H,{type:"button",variant:"outline",ref:a,...r,children:[i.jsx(T0,{className:n?"w-4 h-4 mr-2":"w-4 h-4"}),n&&i.jsx(i.Fragment,{children:n})]}));ko.displayName="AppendEmptyRowButton";const Iw=({table:n,showLineDiscountColumn:o,hasLineDiscounts:r,onShowLineDiscountColumnChange:a})=>{const l=n.getSelectedRowModel().rows.length,[c,d]=M.useState(!1),m=x=>{if(!x&&o&&r){d(!0);return}a(x)},p=i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"flex items-center gap-2 ml-auto",children:[i.jsx("div",{className:"grid gap-0.5",children:i.jsx(On,{label:w("quotes.discount_column.label")})}),i.jsx(hs,{id:"show-line-discount-column",checked:o,onCheckedChange:m})]}),i.jsx(pr,{open:c,onOpenChange:d,children:i.jsxs(xr,{children:[i.jsxs(_r,{children:[i.jsx(vr,{children:w("quotes.discount_column.confirmation.title")}),i.jsx(ms,{children:w("quotes.discount_column.confirmation.description")})]}),i.jsxs(br,{children:[i.jsx(H,{type:"button",variant:"secondary",onClick:()=>d(!1),children:w("common.cancel")}),i.jsx(H,{type:"button",onClick:()=>{a(!1),d(!1)},children:w("quotes.discount_column.confirmation.confirm")})]})]})})]});return l?i.jsx("nav",{className:"flex items-center h-12 p-1 rounded-md text-muted-foreground bg-muted ",children:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsxs(Qe,{children:[i.jsx(Ye,{asChild:!0,children:i.jsxs(H,{type:"button",variant:"link",disabled:!n.getSelectedRowModel().rows.length,onClick:()=>{var x;return(x=n.options.meta)==null?void 0:x.duplicateItems()},children:[i.jsx(L0,{className:"w-4 h-4 sm:mr-2"}),i.jsx("span",{className:"sr-only sm:not-sr-only",children:w("common.duplicate_selected_rows")})]})}),i.jsx(Xe,{children:w("common.duplicate_selected_rows_tooltip")})]}),i.jsxs(Qe,{children:[i.jsx(Ye,{asChild:!0,children:i.jsxs(H,{type:"button",variant:"link",disabled:!n.getSelectedRowModel().rows.length,onClick:()=>{var x;return(x=n.options.meta)==null?void 0:x.deleteItems()},children:[i.jsx(_d,{className:"w-4 h-4 sm:mr-2"}),i.jsx("span",{className:"sr-only sm:not-sr-only",children:w("common.remove_selected_rows")})]})}),i.jsx(Xe,{children:w("common.remove_selected_rows_tooltip")})]}),i.jsxs(Qe,{children:[i.jsx(Ye,{asChild:!0,children:i.jsxs(H,{type:"button",variant:"link",disabled:!n.getSelectedRowModel().rows.length,onClick:()=>n.resetRowSelection(),children:[i.jsx($0,{className:"w-4 h-4 sm:mr-2"}),i.jsx("span",{className:"sr-only sm:not-sr-only",children:w("common.reset_selected_rows")})]})}),i.jsx(Xe,{children:w("common.reset_selected_rows_tooltip")})]}),i.jsx(bn,{orientation:"vertical",className:"h-6 ml-1 mr-4"}),i.jsx("p",{className:"text-sm font-normal",children:w("common.rows_selected",{count:l})}),p]})}):i.jsxs("nav",{className:"flex items-center h-12 p-1 rounded-md bg-accent/75 text-muted-foreground",children:[i.jsxs("div",{className:"flex space-x-2",children:[i.jsxs(Qe,{children:[i.jsx(Ye,{asChild:!0,children:i.jsx(ko,{variant:"link",onClick:()=>{var x;return(x=n.options.meta)==null?void 0:x.appendItem()}})}),i.jsx(Xe,{children:w("common.append_empty_row_tooltip")})]}),i.jsxs(Qe,{children:[i.jsx(Ye,{asChild:!0,children:i.jsx(qo,{variant:"link",onClick:()=>{var x;n.options.meta&&n.options.meta.pickCatalogArticle&&((x=n.options.meta)==null||x.pickCatalogArticle())}})}),i.jsx(Xe,{children:w("common.append_article_tooltip")})]}),i.jsxs(Qe,{children:[i.jsx(Ye,{asChild:!0,children:i.jsx(Po,{variant:"link",onClick:()=>{var x;n.options.meta&&n.options.meta.pickBlock&&((x=n.options.meta)==null||x.pickBlock())}})}),i.jsx(Xe,{children:w("common.append_block_tooltip")})]})]}),p]})},Fw=({row:n,table:o,onDelete:r})=>{const a=()=>{var l;(l=o.options.meta)==null||l.deleteItems(n.index),r()};return i.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[i.jsxs(H,{type:"button",variant:"outline",size:"sm",onClick:()=>{var l;return(l=o.options.meta)==null?void 0:l.insertItem(n.index)},children:[i.jsx(u0,{className:"w-4 h-4 mr-2"}),w("common.insert_row_above")]}),i.jsxs(H,{type:"button",variant:"outline",size:"sm",onClick:()=>{var l;return(l=o.options.meta)==null?void 0:l.insertItem(n.index+1)},children:[i.jsx(qc,{className:"w-4 h-4 mr-2"}),w("common.insert_row_below")]}),i.jsxs(H,{type:"button",variant:"outline",size:"sm",onClick:()=>{var l;return(l=o.options.meta)==null?void 0:l.duplicateItems(n.index)},children:[i.jsx(Eo,{className:"w-4 h-4 mr-2"}),w("common.duplicate_row")]}),i.jsxs(Kc,{children:[i.jsx(Wc,{asChild:!0,children:i.jsxs(H,{type:"button",variant:"destructive",size:"sm",children:[i.jsx(_d,{className:"w-4 h-4 mr-2"}),w("common.remove_row")]})}),i.jsxs(Qc,{children:[i.jsxs(Yc,{children:[i.jsx(Xc,{children:w("quotes.inline_row_actions.delete_confirmation.title")}),i.jsx(Zc,{children:w("quotes.inline_row_actions.delete_confirmation.description")})]}),i.jsxs(Jc,{children:[i.jsx(ed,{children:w("common.cancel")}),i.jsx(td,{asChild:!0,children:i.jsx(H,{type:"button",variant:"destructive",onClick:a,children:w("quotes.inline_row_actions.delete_confirmation.confirm")})})]})]})]})]})},Dw={droppable:{strategy:g0.Always}},Tw={keyframes({transform:n}){return[{opacity:1,transform:ro.Transform.toString(n.initial)},{opacity:0,transform:ro.Transform.toString({...n.final,x:n.final.x+5,y:n.final.y+5})}]},easing:"ease-out",sideEffects({active:n}){n.node.animate([{opacity:0},{opacity:1}],{duration:_c.duration,easing:_c.easing})}};function Ec({columns:n,data:o,defaultValues:r,initialState:a,actions:l,showLineDiscountColumn:c,hasLineDiscounts:d,onShowLineDiscountColumnChange:m}){const[p,x]=M.useState({}),[_,C]=M.useState(),[y,v]=M.useState(null),R=M.useMemo(()=>o.map(O=>O.id),[o]),E=Md({data:o,columns:n,enableColumnResizing:!1,columnResizeMode:"onChange",autoResetAll:!1,initialState:a,state:{rowSelection:p,columnVisibility:{...a==null?void 0:a.columnVisibility,discount:c}},enableRowSelection:!0,enableMultiRowSelection:!0,enableSorting:!1,enableHiding:!0,onRowSelectionChange:x,getCoreRowModel:Dd(),getRowId:O=>O==null?void 0:O.id,debugTable:!1,debugHeaders:!1,debugColumns:!1,defaultColumn:{minSize:0,size:Number.MAX_SAFE_INTEGER,maxSize:Number.MAX_SAFE_INTEGER},meta:{insertItem:(O,V)=>{l.insert(O,V||(r==null?void 0:r.items[0]),{shouldFocus:!0})},appendItem:O=>{l.append(O||(r==null?void 0:r.items[0]),{shouldFocus:!0})},pickCatalogArticle:()=>{l.pickCatalogArticle&&(l==null||l.pickCatalogArticle())},pickBlock:()=>{l.pickBlock&&(l==null||l.pickBlock())},duplicateItems:O=>{var V;if(O!=null){const $=((V=l.getItem)==null?void 0:V.call(l,O))??E.getRowModel().rows[O].original;l.insert(O+1,{...$,id:void 0},{shouldFocus:!0})}else if(E.getSelectedRowModel().rows.length){const $=E.getSelectedRowModel().rows[E.getSelectedRowModel().rows.length-1].index,le=E.getSelectedRowModel().rows.map(oe=>({...oe.original,id:void 0}));E.getRowModel().rows.length<$+1?l.append(le):l.insert($+1,le,{shouldFocus:!0}),E.resetRowSelection()}},deleteItems:O=>{if(O!=null)l.remove(O);else if(E.getSelectedRowModel().rows.length>0){let V=E.getSelectedRowModel().rows.length-1;for(;V>=0;V--){const $=R.indexOf(String(E.getSelectedRowModel().rows[V].id));l.remove($),R.splice($,1)}E.resetRowSelection()}else l.remove()},updateItem:(O,V,$,le)=>{l.update(O,{...V,[`${$}`]:le})}}}),k=c0(Qi(w0,{}),Qi(b0,{}),Qi(v0,{}),Qi(_0,{}));function D(O){var le;let V=O.active.id,$=(le=O.over)==null?void 0:le.id;if($!==void 0&&V!==$){let oe=R.indexOf(String($));if(E.getSelectedRowModel().rows.length>1)E.getSelectedRowModel().rows.forEach((G,ne)=>{const K=R.indexOf(String(G.id));ne>0&&(V=G.id,oe=R.indexOf(String($)),oe{const $=typeof V=="string"?V:V.id;return $===_||!E.getSelectedRowModel().rowsById[$]}):O}return i.jsx(d0,{measuring:Dw,sensors:k,onDragEnd:D,onDragStart:F,onDragCancel:q,collisionDetection:f0,children:i.jsxs(Oe,{children:[i.jsx(dt,{className:"sticky z-10 top-16 bg-card/90",children:i.jsx(Ve,{children:i.jsx(Iw,{table:E,showLineDiscountColumn:c,hasLineDiscounts:d,onShowLineDiscountColumnChange:m})})}),i.jsxs(Pe,{children:[i.jsxs(xo,{className:"table-fixed",children:[i.jsx(_o,{className:"sticky top-0 z-10 bg-background",children:E.getHeaderGroups().map(O=>i.jsx(wn,{className:"hover:bg-transparent",children:O.headers.map(V=>i.jsx(vo,{className:"px-2 py-1",style:{width:V.getSize()===Number.MAX_SAFE_INTEGER?"auto":V.getSize()},children:V.isPlaceholder?null:i.jsx(Od,{table:E,header:V})},V.id))},O.id))}),i.jsx(bo,{children:i.jsx(h0,{items:U(R),strategy:p0,children:U(E.getRowModel().rows).map(O=>{const V=O,$=V.id===y;return i.jsxs(M.Fragment,{children:[i.jsx(_w,{id:V.id,isActive:$,onActivate:()=>v(V.id),children:V.getVisibleCells().map(le=>i.jsx(Xr,{className:"px-2 py-2 align-top",style:{width:le.column.getSize()===Number.MAX_SAFE_INTEGER?"auto":le.column.getSize()},children:rs(le.column.columnDef.cell,le.getContext())},le.id))}),$&&i.jsx(wn,{className:"border border-t-0 border-destructive/30 border-l-4 border-l-destructive bg-destructive/5 hover:bg-destructive/5",children:i.jsx(Xr,{colSpan:V.getVisibleCells().length,className:"px-2 py-2",children:i.jsx(Fw,{row:V,table:E,onDelete:()=>v(null)})})})]},V.id)})})})]}),m0.createPortal(i.jsx(x0,{dropAnimation:Tw,className:"z-40 opacity-100",children:_&&i.jsx("div",{className:"relative flex flex-wrap",children:E.getSelectedRowModel().rows.length?i.jsx(ho,{variant:"destructive",className:"absolute z-50 flex items-center justify-center w-2 h-2 p-3 rounded-full top left -left-2 -top-2",children:E.getSelectedRowModel().rows.length}):null})}),document.body),!1]}),i.jsx(Et,{children:i.jsxs(mr,{children:[i.jsx(ko,{onClick:()=>{var O;return(O=E.options.meta)==null?void 0:O.appendItem()}}),i.jsx(qo,{onClick:()=>{var O;E.options.meta&&E.options.meta.pickCatalogArticle&&((O=E.options.meta)==null||O.pickCatalogArticle())}}),i.jsx(Po,{onClick:()=>{var O;E.options.meta&&E.options.meta.pickBlock&&((O=E.options.meta)==null||O.pickBlock())}})]})})]})})}const Mw=[{id:50,code:"CAP_SEP_AMBIENTES_ES",title:"CARACTERISTICAS SEPARACIÓN DE AMBIENTES",body:`Medida de Hueco: 2450x3000 mm.\r -Modelo: LYN / Acabado: ANODIZADO / Color: NEGRO\r -Nº de travesaños: 2 TRAVESAÑOS HORIZONTALES\r -Acabado paneles: TRANSPARENTE TEMPLADO \r -Tirador: DOBLE POR PUERTA\r -Freno: DOBLE POR PUERTA (APERTURA Y CIERRE)\r -Guía: VISTA (DOBLE EMBELLECEDOR)\r -Nº de hojas: 2 CORREDERAS + 2 FIJOS`},{id:51,code:"CAP_FRE_ARM_CORREDERA_ES",title:"CARACTERISTICAS FRENTE DE ARMARIO CORREDERA",body:`Medida de Hueco:2440x5180mm.\r -Modelo: PANORAMIC P.O. / Acabado: LACADO / Color: BLANCO\r -Nº de lístelos: SIN LISTELOS / Acabado paneles: PANEL LACADO\r -Tirador:\r -Cerco perimetral: \r -Nº de hojas:\r -FRENO HIDRAULICO INCORPORADO O FRENO MAGNETICO INCORPORADO\r -Compuesto por:`},{id:52,code:"CAP_FRE_ARM_ABATIBLE_ES",title:"CARACTERISTICAS FRENTE DE ARMARIO",body:`Medida de hueco: 2275x1390 mm.\r -Modelo: ARGO / Acabado: LACADO / Color: A DETERMINAR\r -Grosor hoja: 22 o 19 mm\r -Acabado de hojas: LISAS\r -Tirador: UÑERO A DETERMINAR\r -Acabado herrajes: CROMADO O ANTRACITA\r -Jambas perimetrales: VISTAS, REMETIDAS O COMBI A DETERMINAR.\r -Nº de hojas: 2\r -Compuesto por:`},{id:53,code:"CAP_INT_ARM_FORRADO_ES",title:"CARACTERISTICAS INTERIOR DE ARMARIO",body:`Acabado: MELAMINA / color: A DETERMINAR\r -Espesor bloque: 19 mm. / Espesor complementos: 19 mm.\r -Barras de colgar: CROMO/ NEGRA/ BRONCE\r -Frentes cristal cajones: RECTO / “U” – FLOAT BRONCE C-424\r -Tirador cajones: FRENTE BAJO / Cajones: 4 DE 180 MM. A DETERMINAR\r -Baldas deslizantes: X DE 145 MM. A DETERMINAR\r -Compuesto por:`},{id:54,code:"CAP_CLA_SEMI_SUSPENDIDO_ES",title:"Acabado: MELAMINA / color: A DETERMINAR",body:`Medida de Hueco: 2450x3000 mm.\r -Espesor bloque: 25 mm. / Espesor complementos: 25 mm.\r -Barras de colgar: CROMO/ NEGRA/ BRONCE\r -Frentes cristal cajones: RECTO / “U” – FLOAT BRONCE C-424\r -Tirador cajones: FRENTE BAJO / Cajones: 4 DE 180 MM. A DETERMINAR\r -Baldas deslizantes: X DE 145 MM. A DETERMINAR\r -Compuesto por:`},{id:2000000108,code:"CAP_INT_EST_CRISTAL_ES",title:"Acabado bastidores: ANODIZADO NEGRO",body:`Acabado panel bastidores laterales: CRISTAL TEMPLADO FLOAT BRONCE C-424\r -Acabado trasera: CRISTAL TEMPLADO FLOAT BRONCE C-424\r -Acabado complementos: MELAMINA / Color: ROBLE DENBER M-242\r -Espesor complementos: 25 mm.\r -Barras de colgar: NEGRA\r -Frentes cristal cajones: RECTO / “U” – FLOAT BRONCE C-424 \r -Tirador cajones: xxxxx / Cajones: 4 DE 180 MM.\r -Compuesto por:`}],Lw=[{id:2000000098,code:"CAP_CLA_SEMI_SUSPENDIDO_EN",title:"Finish: MELAMINE / colour: TO BE DETERMINED",body:`Size of opening: 2450x3000 mm.\r -Thickness block: 19 mm / Thickness complements: 19 mm.\r -Hanging rods: CHROME/ BLACK\r -Glass drawer fronts: STRAIGHT / "U" - FLOAT BRONZE C-424 \r -Drawer handle: xxxxx / Drawers: 4 DE 180 MM.\r -Shoe rack door: YES/NO / Profile finish: BLACK LACQUER / SILVER MATTE\r -Shoe cabinet door glass finish: FLOAT BRONZE C-424\r -Composed of:`},{id:2000000084,code:"CAP_FRE_ARM_ABATIBLE_EN",title:"CHARACTERISTICS OF THE FRONT OF THE HINGED WARDROBE",body:`Size of opening: 2275x1390 mm.\r -Model: ARGO / Finish: LACQUER / Colour: TO BE DETERMINED\r -Door thickness: 22 or 19 mm\r -Door finish: SMOOTH \r -Handle: KNOB TO BE DETERMINED\r -Hardware finish: CHROME OR ANTHRACITE\r -Perimetral doorposts: VISIBLE, REMETED OR COMBI TO BE DETERMINED.\r -Number of doors: 2 \r -Composed of:`},{id:2000000089,code:"CAP_FRE_ARM_CORREDERA_EN",title:"Size of opening: 2440x5180mm. ",body:`Model: PANORAMIC P.O. / Finish: LACQUER / Colour: WHITE\r -No. of listers: NO LISTELS / Panels finish: LACQUERED PANEL \r -Handle: \r -Perimeter frame: \r -Nº of doors: \r -INCORPORATED HYDRAULIC BRAKE (not available in lower doors of 650 mm.) OR INCORPORATED MAGNETIC BRAKE. \r -Composed of:`},{id:2000000092,code:"CAP_INT_ARM_FORRADO_EN",title:"Finish: MELAMINE / colour: TO BE DETERMINED",body:`Thickness block: 19 mm / Thickness complements: 19 mm.\r -Hanging rods: CHROME/ BLACK\r -Glass drawer fronts: STRAIGHT / "U" - FLOAT BRONZE C-424 \r -Drawer handle: xxxxx / Drawers: 4 DE 180 MM.\r -Composed of:`},{id:2000000109,code:"CAP_INT_EST_CRISTAL_EN",title:"Frames finish: BLACK ANODIZED",body:`Side frame panel finish: BRONZE FLOAT BRONZE GLASS C-424\r -Rear panel finish: BRONZE FLOAT GLASS C-424\r -Complements finish: MELAMIN / Colour: DENBER OAK M-242\r -Thickness of accessories: 25 mm.\r -Hanging bars: BLACK\r -Glass drawer fronts: STRAIGHT / "U" - FLOAT BRONZE C-424 \r -Drawer handle: xxxxx / Drawers: 4 DE 180 MM.\r -Composed of:`},{id:2000000095,code:"CAP_SEP_AMBIENTES_EN",title:"CHARACTERISTICS SEPARATION OF ROOMS",body:`Size of opening: 2450x3000 mm.\r -Model: LYN / Finish: ANODISED / Colour: BLACK\r -No. of crosspieces: 2 HORIZONTAL CROSSBARS\r -Panel finish: TRANSPARENT TEMPLARED \r -Handle: DOUBLE PER DOOR\r -Brake: DOUBLE PER DOOR (OPENING AND CLOSING)\r -Guide: VISTA (DOUBLE EMBELLECEDOR)\r -Number of panels: 2 SLIDING + 2 FIXED`}],Ow=[{id:2000000121,code:"CAP_CLA_SEMI_SUSPENDIDO_FR",title:"CARACTÉRISTIQUES DRESSING CLASSIQUE / SEMI-SUSPENDU / SUSPENDU",body:`Finition : MÉLAMINE / Couleur : À DÉTERMINER\r -Épaisseur du bloc : 19 mm / Épaisseur des accessoires : 19 mm\r -Barres de penderie : CHROME / NOIR\r -Façades des tiroirs en verre : DROITE / “U” – FLOAT BRONZE C-424\r -Poignée des tiroirs : xxxxx\r -Tiroirs : 4 DE 180 MM\r -Porte de chaussures : OUI / NON\r -Finition du profil : LAQUÉ NOIR / ARGENT MAT\r -Finition du verre de la porte de chaussures : FLOAT BRONZE C-424\r -Composé de :`},{id:2000000123,code:"CAP_FRE_ARM_ABATIBLE_FR",title:"CARACTÉRISTIQUES FAÇADE DE PLACARD BATTANT",body:`Dimension de l’ouverture : 2275x1390 mm\r -Modèle : ARGO / Finition : LAQUÉE / Couleur : À DÉTERMINER\r -Épaisseur des vantaux : 22 ou 19 mm\r -Finition des vantaux : LISSES\r -Poignée : PRISE DE MAIN À DÉTERMINER\r -Finition des ferrures : CHROMÉ OU ANTHRACITE\r -Jambages périmétraux : APPARENTS, ENCASTRÉS OU COMBINÉS À DÉTERMINER\r -Nombre de vantaux : 2\r -Composé de :`},{id:2000000125,code:"CAP_FRE_ARM_CORREDERA_FR",title:"CARACTÉRISTIQUES FAÇADE DE PLACARD COULISSANT",body:`Dimension de l’ouverture : 2440x5180mm\r -Modèle : PANORAMIC P.O. / Finition : LAQUÉE / Couleur : BLANC\r -Nombre de listels : SANS LISTELS\r -Finition des panneaux : PANNEAU LAQUÉ\r -Poignée :\r -Encadrement périmétral :\r -Nombre de vantaux :\r -FREIN HYDRAULIQUE INTÉGRÉ (non disponible pour les portes inférieures à 650 mm) OU FREIN MAGNÉTIQUE INTÉGRÉ\r -Composé de :`},{id:2000000129,code:"CAP_INT_ARM_FORRADO_FR",title:"CARACTÉRISTIQUES INTÉRIEUR DE PLACARD HABILLÉ",body:`Finition : MÉLAMINE / Couleur : À DÉTERMINER\r -Épaisseur du bloc : 19 mm / Épaisseur des accessoires : 19 mm\r -Barres de penderie : CHROME / NOIR\r -Façades des tiroirs en verre : DROITE / “U” – FLOAT BRONZE C-424\r -Poignée des tiroirs : xxxxx\r -Tiroirs : 4 DE 180 MM\r -Composé de :`},{id:2000000131,code:"CAP_INT_EST_CRISTAL_FR",title:"CARACTÉRISTIQUES INTÉRIEUR DE PLACARD STRUCTURE EN VERRE",body:`Finition des cadres : ANODISÉ NOIR\r -Finition des panneaux des cadres latéraux : VERRE TREMPÉ FLOAT BRONZE C-424\r -Finition du dos : VERRE TREMPÉ FLOAT BRONZE C-424\r -Finition des accessoires : MÉLAMINE / Couleur : CHÊNE DENBER M-242\r -Épaisseur des accessoires : 25 mm\r -Barres de penderie : NOIRES\r -Façades des tiroirs en verre : DROITE / “U” – FLOAT BRONZE C-424\r -Poignée des tiroirs : xxxxx\r -Tiroirs : 4 DE 180 MM\r -Composé de :`},{id:2000000127,code:"CAP_INSTALACION_FR",title:"SERVICE D'INSTALLATION - PRIX NET",body:"Armoire d'installation x"},{id:2000000134,code:"CAP_SUMINISTRO_FR",title:"SERVICE DE FOURNITURE - PRIX NET",body:"Livraison du matériel au domicile du client"}],Ac={es:Mw,en:Lw,fr:Ow},Ic=({onSelect:n,languageCode:o})=>{const r=Ac[o.toLowerCase()]??Ac.es;return i.jsx(mo,{className:"h-96",children:i.jsx("div",{className:"flex flex-col gap-2 p-4 pt-0",children:r&&r.filter(({title:a,body:l})=>a||l).sort((a,l)=>a.title.localeCompare(l.title)).map(a=>i.jsx("button",{className:"flex flex-col items-start gap-2 p-3 text-sm text-left transition-all border rounded-lg hover:bg-accent",onClick:()=>n&&n(a,1),children:i.jsxs("div",{className:"flex flex-col w-full gap-1",children:[i.jsx("div",{className:"flex items-center",children:i.jsx("div",{className:"flex items-center gap-2",children:i.jsx("div",{className:"font-semibold",children:a.title})})}),i.jsx("div",{className:"text-xs line-clamp-2 text-muted-foreground",children:i.jsx("p",{dangerouslySetInnerHTML:{__html:a.body.substring(0,300).replace(`\r -`,"
")}})})]})},a.code))})})},Pw=({isOpen:n,onOpenChange:o,onSelect:r,languageCode:a})=>kd("(min-width: 768px)")?i.jsx(pr,{modal:!0,open:n,onOpenChange:o,children:i.jsxs(xr,{className:"w-full max-w-full md:w-9/12 lg:w-10/12",children:[i.jsxs(_r,{children:[i.jsx(vr,{children:w("quotes.blocks_picker_dialog.title")}),i.jsx(ms,{children:w("quotes.blocks_picker_dialog.description")})]}),i.jsx(Ic,{languageCode:a,onSelect:r}),i.jsx(br,{children:i.jsx(H,{type:"submit",onClick:()=>o(!1),children:w("common.close")})})]})}):i.jsx(nd,{open:n,onOpenChange:o,children:i.jsxs(rd,{children:[i.jsxs(id,{className:"text-left",children:[i.jsx(sd,{children:w("quotes.blocks_picker_dialog.title")}),i.jsx(ad,{children:w("quotes.blocks_picker_dialog.description")})]}),i.jsx(Ic,{languageCode:a,onSelect:r}),i.jsx(od,{className:"pt-2",children:i.jsx(ld,{asChild:!0,children:i.jsx(H,{variant:"outline",children:w("common.close")})})})]})}),qw=({isOpen:n,onOpenChange:o,onSelect:r})=>kd("(min-width: 768px)")?i.jsx(pr,{modal:!0,open:n,onOpenChange:o,children:i.jsxs(xr,{className:"w-full max-w-full md:w-9/12 lg:w-10/12",children:[i.jsxs(_r,{children:[i.jsx(vr,{children:w("quotes.catalog_picker_dialog.title")}),i.jsx(ms,{children:w("quotes.catalog_picker_dialog.description")})]}),i.jsx(hr,{syncWithLocation:!1,initialPageSize:5,children:i.jsx(go,{onSelect:r})}),i.jsx(br,{children:i.jsx(H,{type:"submit",onClick:()=>o(!1),children:w("common.close")})})]})}):i.jsx(nd,{open:n,onOpenChange:o,children:i.jsxs(rd,{children:[i.jsxs(id,{className:"text-left",children:[i.jsx(sd,{children:w("quotes.catalog_picker_dialog.title")}),i.jsx(ad,{children:w("quotes.catalog_picker_dialog.description")})]}),i.jsx(hr,{syncWithLocation:!1,initialPageSize:5,children:i.jsx(go,{onSelect:r})}),i.jsx(od,{className:"pt-2",children:i.jsx(ld,{asChild:!0,children:i.jsx(H,{variant:"outline",children:w("common.close")})})})]})}),kw=({currency:n,language:o,defaultValues:r})=>{var oe;const{toast:a}=jn(),{control:l,getValues:c,setValue:d,watch:m}=Gn(),p=m("lang_code")||cr.DEFAULT_LANGUAGE_CODE,x=m("show_line_discount_column")??!0,_=!!((oe=c("items"))!=null&&oe.some(G=>{var ne;return Number((ne=G.discount)==null?void 0:ne.amount)>0})),[C]=M.useState("dialog"),[y,v]=M.useState(!1),[R,E]=M.useState(!1),{fields:k,...D}=S0({control:l,name:"items"}),F=bw([{id:"description",accessorKey:"description",header:w("quotes.form_fields.items.description.label"),cell:({row:{index:G,original:ne}})=>ne!=null&&ne.id_article?i.jsx("div",{className:"min-h-10 whitespace-pre-wrap px-3 py-2 text-sm",children:ne.localized_description??ne.description}):i.jsx(Bt,{autoSize:!0,name:`items.${G}.description`}),minSize:200,size:400},{id:"quantity",accessorKey:"quantity",header:()=>i.jsx("div",{className:"text-right",children:w("quotes.form_fields.items.quantity.label")}),cell:({row:{index:G}})=>i.jsx(rw,{scale:0,className:"text-right",name:`items.${G}.quantity`}),size:75},{id:"unit_price",accessorKey:"unit_price",header:()=>i.jsx("div",{className:"text-right",children:w("quotes.form_fields.items.unit_price.label")}),cell:({row:{index:G}})=>i.jsx(Va,{currency:n,language:o,scale:2,className:"text-right",name:`items.${G}.unit_price`}),size:125},{id:"subtotal_price",accessorKey:"subtotal_price",header:()=>i.jsx("div",{className:"text-right",children:w("quotes.form_fields.items.subtotal_price.label")}),cell:({row:{index:G}})=>i.jsx(Va,{variant:"ghost",currency:n,language:o,scale:2,readOnly:!0,className:"text-right",name:`items.${G}.subtotal_price`}),size:150},{id:"discount",accessorKey:"discount",header:()=>i.jsx("div",{className:"text-right",children:w("quotes.form_fields.items.discount.label")}),cell:({row:{index:G}})=>i.jsx(is,{scale:2,className:"text-right",name:`items.${G}.discount`}),size:100},{id:"total_price",accessorKey:"total_price",header:()=>i.jsx("div",{className:"text-right",children:w("quotes.form_fields.items.total_price.label")}),cell:({row:{index:G}})=>i.jsx(Va,{variant:"ghost",currency:n,language:o,scale:2,readOnly:!0,className:"font-semibold text-right",name:`items.${G}.total_price`}),size:150}],{enableDragHandleColumn:!0,enableSelectionColumn:!0}),q=M.useCallback((G,ne=1)=>{D.append({...G,quantity:{amount:100*ne,scale:Sn.DEFAULT_SCALE},unit_price:G.retail_price,discount:{amount:null,scale:2}}),a({title:w("quotes.catalog_picker_dialog.toast_article_added"),description:G.description})},[D]),U=M.useCallback(G=>{D.append({id_article:"",description:`${G.title} -${G.body}`,quantity:{amount:null,scale:Sn.DEFAULT_SCALE},unit_price:{amount:null,scale:X0.DEFAULT_SCALE},discount:{amount:null,scale:2}}),a({title:w("quotes.blocks_picker_dialog.toast_article_added"),description:G.title})},[D]),[O,V]=M.useState(!1),$=[265,440,655],le=4;return C==="dialog"?i.jsxs("div",{className:"relative",children:[i.jsx(Ec,{actions:{...D,getItem:G=>c(`items.${G}`),pickCatalogArticle:()=>v(!0),pickBlock:()=>E(!0)},columns:F,data:k,defaultValues:r,showLineDiscountColumn:x,hasLineDiscounts:_,onShowLineDiscountColumnChange:G=>d("show_line_discount_column",G,{shouldDirty:!0})}),i.jsx(qw,{onSelect:q,isOpen:y,onOpenChange:v}),i.jsx(Pw,{languageCode:p,onSelect:U,isOpen:R,onOpenChange:E})]}):i.jsxs(V0,{direction:"horizontal",autoSaveId:"uecko.quotes.details_layout",className:"items-stretch h-full",children:[i.jsx(wc,{defaultSize:$[0],collapsedSize:le,collapsible:!0,minSize:50,maxSize:90,onCollapse:()=>{V(!0)},onExpand:()=>{V(!1)},className:pe(O&&"min-w-[50px] transition-all duration-300 ease-in-out"),children:i.jsx(Ec,{actions:{...D,getItem:G=>c(`items.${G}`)},columns:F,data:k,defaultValues:r,showLineDiscountColumn:x,hasLineDiscounts:_,onShowLineDiscountColumnChange:G=>d("show_line_discount_column",G,{shouldDirty:!0})})}),i.jsx(z0,{withHandle:!0,className:"mx-3"}),i.jsx(wc,{defaultSize:$[1],minSize:10,children:i.jsx(hr,{syncWithLocation:!1,children:i.jsx(go,{onSelect:q})})})]})},$w=()=>{const{formState:n,control:o}=Gn();return i.jsxs("div",{className:"grid gap-6 md:grid-cols-6",children:[i.jsxs(ns,{className:"md:col-span-6",title:w("quotes.create.form_groups.general.title"),description:w("quotes.create.form_groups.general.desc"),actions:i.jsxs("div",{className:"grid min-w-48 gap-1",children:[i.jsx(zn,{htmlFor:"lang_code",className:"text-xs text-muted-foreground",children:w("quotes.form_fields.lang_code.label")}),i.jsx(Jr,{control:o,name:"lang_code",render:({field:r})=>i.jsxs(kn,{value:r.value||"es",onValueChange:r.onChange,children:[i.jsx($n,{id:"lang_code","aria-label":w("quotes.form_fields.lang_code.label"),children:i.jsx(Un,{placeholder:w("quotes.form_fields.lang_code.placeholder")})}),i.jsx(Bn,{children:sn.map(a=>i.jsxs(Vt,{value:a.code,children:[i.jsx("span",{"aria-hidden":"true",className:`mr-2 ${a.flagClassName}`}),a.name]},a.code))})]})})]}),children:[i.jsxs("div",{className:"grid grid-cols-6 gap-6",children:[i.jsx(Pn,{required:!0,className:"col-span-2",label:w("quotes.form_fields.customer_reference.label"),description:w("quotes.form_fields.customer_reference.desc"),disabled:n.disabled,placeholder:w("quotes.form_fields.customer_reference.placeholder"),name:"customer_reference"}),i.jsx(Gc,{required:!0,label:w("quotes.form_fields.date.label"),description:w("quotes.form_fields.date.desc"),disabled:n.disabled,placeholder:w("quotes.form_fields.date.placeholder"),name:"date"}),i.jsx(Pn,{label:w("quotes.form_fields.validity.label"),description:w("quotes.form_fields.validity.desc"),disabled:n.disabled,placeholder:w("quotes.form_fields.validity.placeholder"),name:"validity"}),i.jsx(Bt,{className:"col-span-2",label:w("quotes.form_fields.payment_method.label"),description:w("quotes.form_fields.payment_method.desc"),disabled:n.disabled,placeholder:w("quotes.form_fields.payment_method.placeholder"),name:"payment_method"})]}),i.jsxs("div",{className:"grid grid-cols-6 gap-6",children:[i.jsx(Bt,{className:"col-span-3",required:!0,label:w("quotes.form_fields.customer_information.label"),description:w("quotes.form_fields.customer_information.desc"),disabled:n.disabled,placeholder:w("quotes.form_fields.customer_information.placeholder"),name:"customer_information",errors:n.errors}),i.jsx(Bt,{className:"col-span-3",label:w("quotes.form_fields.notes.label"),description:w("quotes.form_fields.notes.desc"),disabled:n.disabled,placeholder:w("quotes.form_fields.notes.placeholder"),name:"notes"})]})]}),i.jsx(ns,{className:"hidden md:col-span-2",title:w("quotes.create.form_groups.status.title"),description:w("quotes.create.form_groups.status.desc"),children:i.jsxs("div",{className:"grid gap-6",children:[i.jsxs("div",{className:"grid gap-3",children:[i.jsx(zn,{htmlFor:"status",children:w("quotes.create.form_groups.status.title")}),i.jsxs(kn,{children:[i.jsx($n,{id:"status","aria-label":w("quotes.list.select_status"),children:i.jsx(Un,{placeholder:w("quotes.list.select_status")})}),i.jsxs(Bn,{children:[i.jsx(Vt,{value:"draft",children:w("quotes.status.draft")}),i.jsx(Vt,{value:"published",children:w("quotes.status.ready")}),i.jsx(Vt,{value:"archived",children:w("quotes.status.archived")})]})]})]}),i.jsx(Pn,{required:!0,label:w("quotes.form_fields.currency_code.label"),description:w("quotes.form_fields.currency_code.desc"),placeholder:w("quotes.form_fields.currency_code.placeholder"),name:"currency_code"})]})})]})},Uw=n=>{const o=new Date(n);if(Number.isNaN(o.getTime()))return;const r=new Date,a=o>r?r:o,l=a.getFullYear(),c=String(a.getMonth()+1).padStart(2,"0"),d=String(a.getDate()).padStart(2,"0");return`${l}-${c}-${d}`},Bw=()=>{const{control:n,formState:o,getValues:r,setValue:a}=Gn(),{formatNumber:l,formatCurrencyName:c}=Pd(),{useExchangeRate:d}=Sr(),{mutate:m,isPending:p}=d(),x=!!hn({control:n,name:"additional_currency_code"}),_=hn({control:n,name:"additional_currency_code"}),C=hn({control:n,name:"date"}),y=hn({control:n,name:"additional_currency_date"}),v=hn({control:n,name:"additional_currency_rate"}),R=hn({control:n,name:"total_price"}),E=C?new Date(C).getTime():void 0,k=M.useRef(E),D=Object.values(Qr.CURRENCIES),F=["EUR","USD","GBP","CHF","SAR"],q=F.map(ne=>D.find(K=>K.code===ne)).filter(ne=>!!ne),U=D.filter(ne=>!F.includes(ne.code)).sort((ne,K)=>ne.code.localeCompare(K.code)),O=(R==null?void 0:R.amount)!=null&&v?R.amount/100*Number(v):null,V=O===null?null:l({amount:Math.round(O*100),scale:2,currency_code:_}),$=M.useMemo(()=>_?Qr.createFromCode(_).object.symbol:"",[_]),le=M.useCallback((ne,K=C)=>{const ie=Uw(K);!ne||!ie||m({currency:ne,date:ie},{onSuccess:xe=>{r("additional_currency_code")===xe.currency_code&&(a("additional_currency_rate",xe.rate,{shouldDirty:!0}),a("additional_currency_date",xe.date,{shouldDirty:!0}))}})},[r,m,C,a]),oe=()=>le(_);M.useEffect(()=>{k.current!==E&&(k.current=E,x&&_&&le(_,C))},[_,x,C,E,le]);const G=ne=>{if(!ne){a("additional_currency_code",null,{shouldDirty:!0}),a("additional_currency_rate",null,{shouldDirty:!0}),a("additional_currency_date",null,{shouldDirty:!0});return}const K="USD";a("additional_currency_code",K,{shouldDirty:!0}),!y&&!v&&le(K)};return i.jsx(ns,{title:w("quotes.additional_currency.title"),description:w("quotes.additional_currency.description"),actions:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(On,{label:w("quotes.additional_currency.enabled")}),i.jsx(hs,{id:"additional_currency_enabled",checked:x,disabled:o.disabled,onCheckedChange:G})]}),children:x&&i.jsxs("div",{className:"grid gap-4 md:grid-cols-12",children:[i.jsxs("div",{className:"grid gap-2 md:col-span-3",children:[i.jsx(On,{label:w("quotes.additional_currency.currency")}),i.jsx(Jr,{control:n,name:"additional_currency_code",render:({field:ne})=>i.jsxs(kn,{value:ne.value||"USD",onValueChange:K=>{ne.onChange(K),a("additional_currency_rate",null,{shouldDirty:!0}),a("additional_currency_date",null,{shouldDirty:!0}),le(K)},children:[i.jsx($n,{id:"additional_currency_code",disabled:o.disabled,children:i.jsx(Un,{})}),i.jsxs(Bn,{children:[q.map(K=>i.jsxs(Vt,{value:K.code,disabled:K.code==="EUR",children:[K.code," - ",c(K.code)]},K.code)),i.jsx(C0,{}),U.map(K=>i.jsxs(Vt,{value:K.code,children:[K.code," - ",c(K.code)]},K.code))]})]})})]}),i.jsxs("div",{className:"grid gap-2 md:col-span-2",children:[i.jsx(On,{label:w("quotes.additional_currency.refresh")}),i.jsxs(H,{id:"additional_currency_refresh",className:"w-full",type:"button",variant:"secondary",size:"sm",disabled:o.disabled||!_||!C||p,onClick:oe,children:[i.jsx(ud,{className:"w-4 h-4 mr-2"}),w("quotes.additional_currency.refresh")]})]}),i.jsxs("div",{className:"grid content-center gap-1 md:col-span-2",children:[i.jsx("p",{className:"text-sm font-semibold text-muted-foreground",children:w("quotes.additional_currency.date")}),i.jsx("p",{className:"font-medium tabular-nums",children:y?new Date(y).toLocaleDateString():"—"})]}),i.jsxs("div",{className:"grid content-center gap-1 md:col-span-3",children:[i.jsx("p",{className:"text-sm font-semibold text-muted-foreground",children:w("quotes.additional_currency.rate")}),i.jsx("p",{className:"font-medium tabular-nums",children:v?`1 EUR = ${Number(v).toLocaleString()} ${_}`:"—"})]}),i.jsxs("div",{className:"p-3 text-right rounded-md bg-muted md:col-span-2",children:[i.jsx("p",{className:"text-sm font-semibold text-muted-foreground",children:w("quotes.additional_currency.total",{code:_})}),i.jsxs("p",{className:"flex items-baseline justify-end text-2xl font-bold tabular-nums",children:[V??"—",V&&i.jsx("span",{className:"ml-1 text-lg tracking-normal",children:$})]})]})]})})},Wd=({id:n,onSentTo:o,disabled:r})=>{const a=()=>{o(n)};return i.jsxs(Kc,{children:[i.jsx(Wc,{asChild:!0,disabled:r,children:i.jsxs(H,{variant:"ghost",className:"h-10 gap-1 text-primary disabled:text-secondary-foreground",children:[i.jsx(U0,{className:"w-4 h-4"}),w("quotes.quote_sent_to_editor.trigger_button")]})}),i.jsxs(Qc,{children:[i.jsxs(Yc,{children:[i.jsx(Xc,{children:w("quotes.quote_sent_to_editor.title")}),i.jsx(Zc,{children:w("quotes.quote_sent_to_editor.description")})]}),i.jsxs(Jc,{children:[i.jsx(ed,{children:w("common.cancel")}),i.jsx(td,{asChild:!0,children:i.jsx(H,{onClick:a,children:w("common.continue")})})]})]})]})},Vw=["draft","ready","delivered","accepted","rejected","archived"],zw={draft:["draft","ready","archived"],ready:["ready","delivered","archived"],delivered:["delivered","accepted","rejected","archived"],accepted:["accepted","rejected","archived"],rejected:["rejected","accepted","archived"],archived:["archived","draft","ready","delivered","accepted","rejected"]},Qd=({type:n="button",status:o,onChangeStatus:r})=>{const[a,l]=M.useState(o),c=m=>l(m);M.useEffect(()=>{o&&l(o)},[o]);const d=()=>{a!==o&&r(a,o)};return i.jsxs(pr,{children:[i.jsx(Mc,{asChild:!0,children:n==="button"?i.jsxs(H,{size:"sm",variant:"outline",className:"h-8 gap-1",children:[i.jsx(ud,{className:"h-3.5 w-3.5"}),i.jsx("span",{className:"sr-only md:not-sr-only md:whitespace-nowrap",children:w("quotes.quote_status_editor.trigger_button")})]}):i.jsx(j0,{status:o,isEditable:!0})}),i.jsxs(xr,{children:[i.jsx(_r,{children:i.jsx(vr,{children:w("quotes.quote_status_editor.title")})}),i.jsx(y0,{}),i.jsx("div",{className:"grid gap-4 py-4",children:Vw.map(m=>{const p=!zw[o].includes(m);return i.jsxs("div",{className:"flex items-start space-x-4",children:[i.jsx(hs,{id:m,checked:a===m,onCheckedChange:()=>c(m),disabled:p}),i.jsxs("div",{className:"grid gap-1.5 leading-none",children:[i.jsx(zn,{htmlFor:m,className:pe("font-medium",p?"text-input":"text-foreground"),children:w(`quotes.quote_status_editor.status.${m}.title`)}),i.jsx("p",{className:pe("text-sm",p?"text-input":"text-muted-foreground"),children:w(`quotes.quote_status_editor.status.${m}.description`)})]})]},m)})}),i.jsxs(br,{className:"pt-6 border-t",children:[i.jsx(es,{asChild:!0,children:i.jsx(H,{type:"button",variant:"secondary",children:w("common.cancel")})}),i.jsx(es,{asChild:!0,children:i.jsx(H,{onClick:d,disabled:a===o,children:w("quotes.quote_status_editor.submit_button")})})]})]})]})},Gw=({quoteId:n,className:o})=>{const r=Gt(),{toast:a}=jn(),{useOne:l,useSetStatus:c,useSentTo:d,useDownloader:m,useDuplicate:p,getQuotePDFFilename:x}=Sr(),{data:_,status:C}=l(n),{mutate:y}=c(),{mutate:v}=d(n),{mutate:R}=p(),{download:E,...k}=m(),{formatCurrency:D,formatNumber:F}=qd({locale:(_==null?void 0:_.lang_code)||"ES"}),q=M.useMemo(()=>_?{subtotal_price:D(_.subtotal_price),discount:F(_.discount),discount_price:D(_.discount_price),tax:F(_.tax),tax_price:D(_.tax_price),total_price:D(_.total_price)}:{subtotal_price:"0,00 €",discount:"0",discount_price:"0,00 €",tax:"0",tax_price:"0,00 €",total_price:"0,00 €"},[_]),U=M.useMemo(()=>(_==null?void 0:_.status)==="accepted"&&!(_!=null&&_.date_sent),[_]),O=M.useMemo(()=>(_==null?void 0:_.status)==="accepted"&&!!(_!=null&&_.date_sent),[_]),V=K=>{y({id:_.id,newStatus:K},{onSuccess:()=>{a({description:w("quotes.quote_status_editor.toast_status_changed"),variant:"success"})}})},$=K=>{v({sent_date:N0(new Date)},{onSuccess:()=>{a({description:w("quotes.quote_sent_to_editor.toast_status_changed"),variant:"success"})}})},le=M.useCallback(()=>{a({description:w("quotes.downloading_dialog.toast_success"),variant:"success"})},[a]),oe=M.useCallback(()=>{_&&E(_.id,x(_))},[_]);if(C==="error"||C!=="success")return null;if(!_)return i.jsx(Oe,{className:pe("overflow-hidden",o),children:i.jsx(Pe,{className:"px-4 py-6 text-center",children:i.jsx("p",{className:"mx-auto",children:w("quotes.list.resume.select_quote")})})});const G=K=>{R({id:K},{onSuccess(ie){a({description:w("quotes.duplicate_action.toast_success"),variant:"success"}),r(`/quotes/edit/${ie.id}`,{relative:"path"})}})},ne=K=>{y({id:K,newStatus:"archived"},{onSuccess:()=>{a({description:w("quotes.quote_status_editor.toast_status_changed",{newStatus:w("quotes.status.archived")}),variant:"success"})}})};return i.jsxs(i.Fragment,{children:[i.jsx(Hd,{...k,onFinishDownload:le}),i.jsx(cd,{defaultValue:"resume",children:i.jsxs(Oe,{className:"w-[390px] overflow-hidden",children:[i.jsxs(dt,{className:"gap-3 border-b bg-accent",children:[i.jsxs(Ve,{className:"flex items-center justify-between text-lg",children:[i.jsx("span",{children:w("quotes.list.resume.title")}),i.jsx(Qd,{status:_.status,onChangeStatus:V,type:"badge"})]}),i.jsx("div",{className:"flex w-full mr-auto text-foreground",children:i.jsxs("div",{className:"flex justify-between w-full",children:[i.jsxs(mr,{className:"gap-0",children:[i.jsxs(Qe,{children:[i.jsx(Ye,{asChild:!0,children:i.jsxs(H,{variant:"outline",size:"icon",disabled:O,onClick:K=>{K.preventDefault(),r(`/quotes/edit/${_.id}`,{relative:"path"})},children:[i.jsx(xd,{className:"w-4 h-4"}),i.jsx("span",{className:"sr-only",children:w("common.edit")})]})}),i.jsx(Xe,{children:i.jsx("p",{children:w("common.edit")})})]}),i.jsxs(Qe,{children:[i.jsx(Ye,{asChild:!0,children:i.jsxs(H,{variant:"outline",size:"icon",onClick:K=>{K.preventDefault(),G(_.id)},children:[i.jsx(Eo,{className:"w-4 h-4"}),i.jsx("span",{className:"sr-only",children:w("common.duplicate")})]})}),i.jsx(Xe,{children:i.jsx("p",{children:w("common.duplicate")})})]}),i.jsxs(Qe,{children:[i.jsx(Ye,{asChild:!0,children:i.jsxs(H,{variant:"outline",size:"icon",onClick:oe,children:[i.jsx(md,{className:"w-4 h-4"}),i.jsx("span",{className:"sr-only",children:w("common.download")})]})}),i.jsx(Xe,{children:i.jsx("p",{children:w("common.download")})})]}),i.jsxs(Qe,{children:[i.jsx(Ye,{asChild:!0,children:i.jsxs(H,{variant:"outline",size:"icon",disabled:O,onClick:K=>{K.preventDefault(),ne(_.id)},children:[i.jsx(fd,{className:"w-4 h-4"}),i.jsx("span",{className:"sr-only",children:w("common.archive")})]})}),i.jsx(Xe,{children:i.jsx("p",{children:w("common.archive")})})]})]}),i.jsx(mr,{children:i.jsx(Wd,{disabled:O||!U,id:_.id,onSentTo:$})})]})})]}),i.jsxs(Pe,{className:"p-6 text-sm",children:[i.jsxs(dd,{className:"grid w-full grid-cols-2",children:[i.jsx(io,{value:"resume",children:w("quotes.list.resume.tabs.resume")}),i.jsx(io,{value:"preview",children:w("quotes.list.resume.tabs.preview")})]}),i.jsx(so,{value:"resume",className:"pt-4",children:i.jsxs("div",{className:"grid gap-3",children:[i.jsxs("div",{className:"grid gap-3",children:[i.jsx("div",{className:"font-semibold",children:w("quotes.list.resume.quote_information")}),i.jsxs("dl",{className:"grid gap-3",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("dt",{className:"text-muted-foreground",children:w("quotes.form_fields.reference.label")}),i.jsx("dd",{className:"font-medium",children:_.reference})]}),i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx("dt",{className:"text-muted-foreground",children:w("quotes.form_fields.date.label")}),i.jsx("dd",{className:"font-medium",children:new Date(_.date).toLocaleDateString()})]}),i.jsxs("div",{className:"flex items-start justify-between",children:[i.jsx("dt",{className:"text-muted-foreground whitespace-nowrap",children:w("quotes.form_fields.customer_reference.label")}),i.jsx("dd",{className:"font-medium text-right whitespace-break-spaces",children:_.customer_reference})]})]})]}),i.jsx(bn,{className:"my-4"}),i.jsxs("div",{className:"grid gap-3",children:[i.jsx("div",{className:"font-semibold",children:w("quotes.list.resume.customer_information")}),i.jsx("div",{children:_.customer_information})]}),i.jsx(bn,{className:"my-4"}),i.jsx("div",{className:"font-semibold",children:w("quotes.list.resume.price_information")}),i.jsxs("ul",{className:"grid gap-3",children:[i.jsxs("li",{className:"flex items-center justify-between",children:[i.jsx("span",{className:"text-muted-foreground",children:w("quotes.form_fields.subtotal_price.label")}),i.jsx("span",{children:q.subtotal_price})]}),i.jsxs("li",{className:"flex items-center justify-between",children:[i.jsx("span",{className:"text-muted-foreground",children:w("quotes.form_fields.discount_value.label",{value:q.discount})}),i.jsx("span",{children:q.discount_price})]}),i.jsxs("li",{className:"flex items-center justify-between",children:[i.jsx("span",{className:"text-muted-foreground",children:w("quotes.form_fields.tax_value.label",{label:_.tax_label,value:q.tax})}),i.jsx("span",{children:q.tax_price})]}),i.jsxs("li",{className:"flex items-center justify-between font-semibold",children:[i.jsx("span",{className:"text-muted-foreground",children:w("quotes.form_fields.total_price.label")}),i.jsx("span",{children:q.total_price})]})]})]})}),i.jsx(so,{value:"preview",children:i.jsx(Kd,{quote:_})})]}),i.jsx(Et,{className:"flex flex-row items-center px-6 py-3 border-t bg-accent",children:i.jsx("div",{className:"text-xs text-muted-foreground"})})]})})]})},Hw=({status:n="all",preview:o=!1})=>{const r=Gt(),{toast:a}=jn(),{t:l,i18n:c}=st(),d=M.useId(),m=M.useId(),{pagination:p,globalFilter:x,isFiltered:_}=Hn(),[C,y]=M.useState(void 0),{useList:v,useDownloader:R,useSetStatus:E,useDuplicate:k,getQuotePDFFilename:D}=Sr(),{mutate:F}=E(),{mutate:q}=k(),{data:U,isPending:O,isError:V,error:$}=v({pagination:{pageIndex:p.pageIndex,pageSize:p.pageSize},status:n,quickSearchTerm:x}),{download:le,...oe}=R(),G=ve=>{y(ve)},ne=M.useCallback(()=>{a({description:l("quotes.downloading_dialog.toast_success")})},[a]),K=M.useCallback(ve=>{r(`/quotes/edit/${ve.id}`,{relative:"path"})},[r,a]),ie=ve=>{q({id:ve},{onSuccess(Ae){a({description:l("quotes.duplicate_action.toast_success"),variant:"success"}),r(`/quotes/edit/${Ae.id}`,{relative:"path"})}})},xe=ve=>{F({id:ve,newStatus:"archived"},{onSuccess:()=>{a({description:l("quotes.quote_status_editor.toast_status_changed",{newStatus:l("quotes.status.archived")}),variant:"success"})}})},tt=(ve,Ae)=>{F({id:ve,newStatus:Ae},{onSuccess:()=>{a({description:l("quotes.quote_status_editor.toast_status_changed",{newStatus:l(`quotes.status.${Ae}`)}),variant:"success"})}})},Y=M.useMemo(()=>{const ve=[{id:"reference",accessorKey:"reference",header:()=>i.jsx(i.Fragment,{children:l("quotes.list.columns.reference")}),cell:({row:{original:Q},renderValue:Ne})=>{const vt=!!((Q==null?void 0:Q.status)==="accepted"&&(Q!=null&&Q.date_sent));return i.jsx(H,{size:"sm",variant:"link",disabled:vt,className:"h-8 gap-1 px-0 text-left text-ellipsis",onClick:Cr=>{Cr.preventDefault(),K(Q)},children:i.jsx("div",{className:"",children:Ne()})})}},{id:"status",accessorKey:"status",header:()=>i.jsx(i.Fragment,{children:l("quotes.list.columns.status")}),cell:({row:{original:Q}})=>i.jsx(Qd,{type:"badge",status:Q.status,onChangeStatus:Ne=>tt(Q.id,Ne)})},{id:"date_sent",accessor:"date_sent",header:()=>i.jsx("div",{className:"text-left text-ellipsis",children:l("quotes.list.columns.date_sent")}),cell:({row:{original:Q}})=>{const Ne=dr.create(Q.date_sent),vt=Ne.isSuccess&&!Ne.object.isEmpty();return i.jsx("div",{className:"text-left text-ellipsis",children:vt?i.jsx(Ld,{label:Ne.object.toLocaleDateString("es-ES"),className:"text-green-800 bg-green-100 hover:text-green-800 hover:bg-green-100"}):i.jsx(i.Fragment,{})})}},{id:"date",accessor:"date",header:()=>i.jsx("div",{className:"text-left text-ellipsis",children:l("quotes.list.columns.date")}),cell:({row:{original:Q}})=>{const Ne=dr.create(Q.date);return i.jsx("div",{className:"text-left text-ellipsis",children:Ne.isSuccess?Ne.object.toLocaleDateString("es-ES"):"-"})}},{id:"customer_reference",accessorKey:"customer_reference",header:()=>i.jsx(i.Fragment,{children:l("quotes.list.columns.customer_reference")}),cell:({renderValue:Q})=>i.jsx("div",{className:"text-left text-ellipsis",children:Q()})},{id:"customer_information",accessorKey:"customer_information",header:()=>i.jsx(i.Fragment,{children:l("quotes.list.columns.customer_information")}),cell:({row:{original:Q}})=>i.jsx("div",{className:"text-left text-ellipsis",children:Q.customer_information.split(` -`).map((Ne,vt)=>i.jsxs("span",{className:vt===0?"font-medium":"hidden text-sm text-muted-foreground md:inline",children:[Ne,i.jsx("br",{})]},vt))}),size:500}],Ae=[{id:"row-actions",header:()=>null,cell:({row:{original:Q}})=>{const Ne=(Q==null?void 0:Q.status)==="accepted"&&!(Q!=null&&Q.date_sent),vt=(Q==null?void 0:Q.status)==="accepted"&&!!(Q!=null&&Q.date_sent),Cr=(Q==null?void 0:Q.status)==="archived";return i.jsxs("div",{className:"flex gap-1",children:[i.jsxs(mr,{className:"gap-0",children:[i.jsxs(Qe,{children:[i.jsx(Ye,{asChild:!0,children:i.jsxs(H,{variant:"ghost",size:"icon",disabled:vt,onClick:yn=>{yn.preventDefault(),K(Q)},children:[i.jsx(xd,{className:"w-4 h-4"}),i.jsx("span",{className:"sr-only",children:l("common.edit")})]})}),i.jsx(Xe,{children:i.jsx("p",{children:l("common.edit")})})]}),i.jsxs(Qe,{children:[i.jsx(Ye,{asChild:!0,children:i.jsxs(H,{variant:"ghost",size:"icon",onClick:yn=>{yn.preventDefault(),ie(Q.id)},children:[i.jsx(Eo,{className:"w-4 h-4"}),i.jsx("span",{className:"sr-only",children:l("common.duplicate")})]})}),i.jsx(Xe,{children:i.jsx("p",{children:l("common.duplicate")})})]}),i.jsxs(Qe,{children:[i.jsx(Ye,{asChild:!0,children:i.jsxs(H,{variant:"ghost",size:"icon",onClick:()=>{le(Q.id,D(Q))},children:[i.jsx(md,{className:"w-4 h-4"}),i.jsx("span",{className:"sr-only",children:l("common.download")})]})}),i.jsx(Xe,{children:i.jsx("p",{children:l("common.download")})})]}),i.jsxs(Qe,{children:[i.jsx(Ye,{asChild:!0,children:i.jsxs(H,{variant:"ghost",size:"icon",disabled:Cr||vt,onClick:yn=>{yn.preventDefault(),xe(Q.id)},children:[i.jsx(fd,{className:"w-4 h-4"}),i.jsx("span",{className:"sr-only",children:l("common.archive")})]})}),i.jsx(Xe,{children:i.jsx("p",{children:l("common.archive")})})]})]}),i.jsx(mr,{children:i.jsx(Wd,{id:Q.id,onSentTo:()=>null,disabled:vt||!Ne})})]})}}];return o?ve:[...ve,...Ae]},[o,l,c.resolvedLanguage]),{table:ze}=bs({data:(U==null?void 0:U.items)??[],columns:Y,pageCount:(U==null?void 0:U.total_pages)??-1});return M.useEffect(()=>{ze&&U&&(U==null?void 0:U.total_pages)>0&&y(ze.getRowModel().rows[0])},[U,ze]),V?i.jsx(wr,{subtitle:$.message}):O?i.jsxs("div",{className:"grid items-start flex-1 gap-4 sm:py-0 md:gap-8 lg:grid-cols-3 xl:grid-cols-3",children:[i.jsx(Oe,{className:"grid items-start gap-4 auto-rows-max md:gap-8 lg:col-span-2",children:i.jsx(Pe,{children:i.jsx(_s,{columnCount:6,searchableColumnCount:1,filterableColumnCount:2,shrinkZero:!0})})}),i.jsx("div",{})]}):(U==null?void 0:U.total_items)===0&&!_?i.jsx(Oe,{children:i.jsx(Pe,{children:i.jsx(vs,{subtitle:l("quotes.list.empty_state.subtitle"),buttonText:l("quotes.create.title"),onButtonClick:()=>r("add",{relative:"path"})})})}):i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"flex flex-col items-stretch flex-1 gap-4 xl:flex-row",children:[i.jsx("div",{id:d,className:"flex items-stretch flex-1",children:i.jsx(xs,{table:ze,paginationOptions:{visible:!0},className:"grid items-start flex-1 gap-4 auto-rows-max md:gap-8 lg:col-span-2",onRowClick:G,activeRowIndex:C==null?void 0:C.index,children:i.jsx(Vd,{table:ze})})}),o&&i.jsx("div",{id:m,className:"flex items-stretch ",children:i.jsx(Gw,{quoteId:C==null?void 0:C.original.id})})]}),i.jsx(Hd,{...oe,onFinishDownload:ne})]})},cS=()=>{const{t:n}=st(),o=Gt(),r=jw(),{toast:a}=jn(),[l,c]=M.useState(Qr.createDefaultCode().object),[d,m]=M.useState(cr.createDefaultCode().object),p=M.useMemo(()=>({date:"",reference:"",customer_reference:"",customer_information:"",lang_code:"",currency_code:"",payment_method:"",notes:"",validity:"",show_line_discount_column:!0,additional_currency_code:null,additional_currency_rate:null,additional_currency_date:null,additional_currency_total:null,subtotal_price:{amount:void 0,scale:2,currency_code:""},discount:{amount:0,scale:0},discount_price:{amount:0,scale:0,currency_code:""},before_tax_price:{amount:void 0,scale:2,currency_code:""},tax:{amount:void 0,scale:0},tax_label:n("settings.form_fields.default_tax_label.placeholder"),tax_price:{amount:void 0,scale:2,currency_code:""},total_price:{amount:void 0,scale:2,currency_code:""},items:[{id_article:"",description:"",quantity:{amount:null,scale:2},unit_price:{amount:null,scale:2,currency_code:l.code},subtotal_price:{amount:null,scale:2,currency_code:l.code},discount:{amount:null,scale:2},total_price:{amount:null,scale:2,currency_code:l.code}}]}),[l.code,n]),{useOne:x,useUpdate:_}=Sr(),{data:C,status:y,error:v}=x(r),{mutate:R,isPending:E}=_(String(r)),k=ds({mode:"onBlur",defaultValues:p}),{getValues:D,reset:F,handleSubmit:q,formState:U,control:O,watch:V,setValue:$}=k,{isSubmitting:le,isDirty:oe}=U;Oo({isDirty:oe}),M.useEffect(()=>{if(!oe)return;const{unsubscribe:K}=V((ie,{name:xe,type:tt})=>{if(xe==="items"){ie.items&&ie.items.map((ze,ve)=>{if(ze){const Ae=fo(ze);Te.isEqual(Ae.subtotal_price.toObject(),ze.subtotal_price)||$(`items.${ve}.subtotal_price`,Ae.subtotal_price.toObject()),Te.isEqual(Ae.total_price.toObject(),ze.total_price)||$(`items.${ve}.total_price`,Ae.total_price.toObject())}});const Y=eo(ie,!0);Te.isEqual(Y.subtotal_price.toObject(),ie.total_price)||$("subtotal_price",Y.subtotal_price.toObject()),Te.isEqual(Y.discount_price.toObject(),ie.total_price)||$("discount_price",Y.discount_price.toObject()),Te.isEqual(Y.before_tax_price.toObject(),ie.before_tax_price)||$("before_tax_price",Y.before_tax_price.toObject()),Te.isEqual(Y.tax_price.toObject(),ie.tax_price)||$("tax_price",Y.tax_price.toObject()),Te.isEqual(Y.total_price.toObject(),ie.total_price)||$("total_price",Y.total_price.toObject())}else if(xe&&tt==="change"){if(xe==="currency_code"){const Y=Qr.createFromCode(ie.currency_code??Qr.DEFAULT_CURRENCY_CODE);if(Y.isFailure)throw console.error(Y.error),Y.error;c(Y.object)}if(xe==="lang_code"){const Y=cr.createFromCode(ie.lang_code??cr.DEFAULT_LANGUAGE_CODE);if(Y.isFailure)throw console.error(Y.error),Y.error;m(Y.object)}if(["discount","tax"].includes(xe)){const Y=eo(ie,!0);Te.isEqual(Y.subtotal_price.toObject(),ie.total_price)||$("subtotal_price",Y.subtotal_price.toObject()),Te.isEqual(Y.discount_price.toObject(),ie.total_price)||$("discount_price",Y.discount_price.toObject()),Te.isEqual(Y.before_tax_price.toObject(),ie.before_tax_price)||$("before_tax_price",Y.before_tax_price.toObject()),Te.isEqual(Y.tax_price.toObject(),ie.tax_price)||$("tax_price",Y.tax_price.toObject()),Te.isEqual(Y.total_price.toObject(),ie.total_price)||$("total_price",Y.total_price.toObject())}if(xe!=null&&xe.startsWith("items")){const Y=Number(xe.split(".")[1]),ze=xe.split(".")[2];if(["quantity","unit_price","discount"].includes(ze)&&ie.items&&ie.items[Y]){const ve=ie.items[Y],Ae=fo(ve);Te.isEqual(Ae.quantity.toObject(),ve.quantity)||$(`items.${Y}.quantity`,Ae.quantity.toObject()),Te.isEqual(Ae.unit_price.toObject(),ve.unit_price)||$(`items.${Y}.unit_price`,Ae.unit_price.toObject()),Te.isEqual(Ae.discount.toObject(),ve.discount)||$(`items.${Y}.discount`,Ae.discount.toObject()),Te.isEqual(Ae.subtotal_price.toObject(),ve.subtotal_price)||$(`items.${Y}.subtotal_price`,Ae.subtotal_price.toObject()),Te.isEqual(Ae.total_price.toObject(),ve.total_price)||$(`items.${Y}.total_price`,Ae.total_price.toObject());const Q=eo(ie,!0);Te.isEqual(Q.subtotal_price.toObject(),ie.total_price)||$("subtotal_price",Q.subtotal_price.toObject()),Te.isEqual(Q.discount_price.toObject(),ie.total_price)||$("discount_price",Q.discount_price.toObject()),Te.isEqual(Q.before_tax_price.toObject(),ie.before_tax_price)||$("before_tax_price",Q.before_tax_price.toObject()),Te.isEqual(Q.tax_price.toObject(),ie.tax_price)||$("tax_price",Q.tax_price.toObject()),Te.isEqual(Q.total_price.toObject(),ie.total_price)||$("total_price",Q.total_price.toObject())}}}});return()=>K()},[V,oe,$]);const G=async(K,ie)=>{const xe={...K,items:K.items.map(({localized_description:tt,...Y})=>Y)};R(xe,{onError:tt=>{console.error(tt),a({title:n("common.error"),description:tt.message,variant:"destructive"})},onSuccess:()=>{F(D()),a({title:n("quotes.notifications.saved"),variant:"success"}),ie&&o("/quotes")}})},ne=M.useCallback(()=>{o("/quotes",{state:{id:r}})},[o,r]);return M.useEffect(()=>{y==="success"&&C&&F(C)},[y,C,F]),y==="error"?i.jsx(wr,{errorMessage:v.message}):y!=="success"?i.jsx(Vn,{}):i.jsxs(i.Fragment,{children:[(le||E)&&i.jsx(Vn,{title:n("quotes.notifications.saving")}),i.jsx(fs,{...k,children:i.jsx("form",{onSubmit:q(K=>G(K,!1)),children:i.jsxs("div",{className:"mx-auto grid max-w-[90rem] flex-1 auto-rows-max gap-6",children:[i.jsxs("div",{className:"flex items-center gap-4",children:[i.jsx(zc,{}),i.jsxs("h1",{className:"flex-1 text-xl font-semibold tracking-tight shrink-0 whitespace-nowrap sm:grow-0",children:[n("quotes.edit.title")," ",C.reference]}),i.jsx(Ld,{label:n(`quotes.status.${C.status}`),className:"ml-auto sm:ml-0"}),i.jsxs("div",{className:"items-center hidden gap-2 md:ml-auto md:flex",children:[i.jsx(R0,{label:n("common.close"),variant:"secondary",size:"sm",onClick:ne}),i.jsx(Ro,{label:n("common.save"),size:"sm",disabled:U.isSubmitting||U.isLoading||U.isValidating}),i.jsx(H,{size:"sm",disabled:U.isSubmitting||U.isLoading||U.isValidating,onClick:q(K=>G(K,!0)),children:n("common.save_close")})]})]}),i.jsx($w,{}),i.jsx(Nw,{currency:l}),i.jsx(Bw,{}),i.jsx(kw,{currency:l,language:d,defaultValues:p}),i.jsxs("div",{className:"flex items-center justify-center gap-2 md:hidden",children:[i.jsx(H,{variant:"outline",size:"sm",children:n("common.discard")}),i.jsx(H,{onClick:q(K=>G(K,!1)),size:"sm",children:n("quotes.edit.buttons.save_quote")})]})]})})}),!1]})},Kw=M.createContext(null),Ww=({children:n})=>{const[o,r]=Bc();return i.jsx(Kw.Provider,{value:{pagination:o,setPagination:r},children:n})},dS=({children:n})=>i.jsx(gs,{children:i.jsx(Ww,{children:i.jsxs(ei,{className:"quotes-layout",children:[i.jsx(ti,{}),i.jsx(ni,{children:n})]})})}),fS=()=>{const{t:n}=st(),o=Gt(),[r,a]=M.useState("all"),[l,c]=sw(!0),d=[{value:"all",label:n("quotes.list.tabs.all")},{value:"draft",label:n("quotes.list.tabs.draft")},{value:"ready",label:n("quotes.list.tabs.ready")},{value:"delivered",label:n("quotes.list.tabs.delivered")},{value:"accepted",label:n("quotes.list.tabs.accepted")},{value:"rejected",label:n("quotes.list.tabs.rejected")},{value:"archived",label:n("quotes.list.tabs.archived")}];return i.jsxs(hr,{children:[i.jsxs("div",{className:"flex items-center justify-between space-y-2",children:[i.jsxs("div",{children:[i.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:i.jsx(ae,{i18nKey:"quotes.list.title"})}),i.jsx("p",{className:"text-muted-foreground",children:i.jsx(ae,{i18nKey:"quotes.list.subtitle"})})]}),i.jsx("div",{className:"flex items-center space-x-2",children:i.jsxs(H,{onClick:()=>o("/quotes/add"),children:[i.jsx(Io,{className:"w-4 h-4 mr-2"}),n("quotes.create.title")]})})]}),i.jsxs(cd,{value:r,onValueChange:a,children:[i.jsxs("div",{className:"flex flex-col items-start justify-between mb-4 sm:flex-row sm:items-center",children:[i.jsxs("div",{className:"w-full mb-4 sm:w-auto sm:mb-0",children:[i.jsx(dd,{className:"hidden sm:flex",children:d.map(m=>i.jsx(io,{value:m.value,children:m.label},m.value))}),i.jsxs("div",{className:"flex items-center w-full space-x-2 sm:hidden",children:[i.jsx(zn,{children:n("quotes.list.tabs_title")}),i.jsxs(kn,{value:r,onValueChange:a,children:[i.jsx($n,{children:i.jsx(Un,{placeholder:n("quotes.list.select_status")})}),i.jsx(Bn,{children:d.map(m=>i.jsx(Vt,{value:m.value,children:m.label},m.value))})]})]})]}),i.jsx("div",{className:"flex items-baseline justify-center mr-4 font-medium",children:i.jsx(Yb,{buttonText:n("common.help"),title:n("quotes.list.status_help.title"),content:i.jsx(Qw,{})})}),i.jsx("div",{className:"flex items-center gap-2 ml-auto",children:i.jsx(E0,{"aria-label":n("quotes.list.preview_aria"),variant:"outline",defaultPressed:!1,pressed:l,onPressedChange:c,children:l?i.jsxs(i.Fragment,{children:[i.jsx(hd,{className:"w-4 h-4 mr-2"}),n("common.disable_preview")]}):i.jsxs(i.Fragment,{children:[i.jsx(P0,{className:"w-4 h-4 mr-2"}),n("common.enable_preview")]})})})]}),d.map(m=>i.jsx(so,{value:m.value,children:i.jsx(Hw,{status:m.value,preview:l})},m.value))]})]})},Qw=()=>{const{t:n}=st();return i.jsxs(mo,{className:"grid gap-4 py-4",children:[i.jsx("p",{children:n("quotes.list.status_help.intro")}),i.jsx("p",{children:n("quotes.list.status_help.possible")}),i.jsxs("ul",{className:"pl-6 space-y-2 list-disc",children:[i.jsxs("li",{children:[i.jsxs("strong",{children:[n("quotes.status.draft"),":"]})," ",n("quotes.quote_status_editor.status.draft.description")]}),i.jsxs("li",{children:[i.jsxs("strong",{children:[n("quotes.status.ready"),":"]})," ",n("quotes.quote_status_editor.status.ready.description")]}),i.jsxs("li",{children:[i.jsxs("strong",{children:[n("quotes.status.delivered"),":"]})," ",n("quotes.quote_status_editor.status.delivered.description")]}),i.jsxs("li",{children:[i.jsxs("strong",{children:[n("quotes.status.accepted"),":"]})," ",n("quotes.quote_status_editor.status.accepted.description")]}),i.jsxs("li",{children:[i.jsxs("strong",{children:[n("quotes.status.rejected"),":"]})," ",n("quotes.quote_status_editor.status.rejected.description")]}),i.jsxs("li",{children:[i.jsxs("strong",{children:[n("quotes.status.archived"),":"]})," ",n("quotes.quote_status_editor.status.archived.description")]})]}),i.jsx("p",{children:n("quotes.list.status_help.outro")})]})},Yw=n=>{const o=Zr(),r=qn(),a=r().data().resource("settings").action("one").id("me").params().get(),l=r().auth().action("profile").get();return{useOne:()=>Sd({queryKey:a,queryFn:()=>o.getOne({resource:"profile",id:""}),...n}),useUpdate:()=>{const c=rn();return Ut({mutationKey:a,mutationFn:d=>o.updateOne({resource:"profile",data:d,id:""}),onSuccess:(d,m)=>{const p=x=>x&&{...x,lang_code:m.lang_code??x.lang_code,dealer:{...x.dealer,...d}};return c.setQueryData(a,p),c.setQueryData(l,p),Promise.all([c.invalidateQueries({queryKey:a}),c.invalidateQueries({queryKey:l})])}})},useUploadLogo:()=>{const c=rn(),{mutate:d,mutateAsync:m,...p}=Ut({mutationKey:["data","default","settings"],mutationFn:x=>o.uploadFile({path:"profile/logo",file:x,key:"logo"}),onError:()=>c.invalidateQueries({queryKey:["data","default","settings"]}),onSuccess:()=>{c.invalidateQueries({queryKey:["data","default","settings"]})}});return{upload:d,uploadAsync:m,...p}}}},gS=()=>{var $,le;const[n,o]=M.useState("profile"),{useOne:r,useUpdate:a,useUploadLogo:l}=Yw(),{toast:c}=jn(),{t:d,i18n:m}=st(),{data:p,status:x,error:_}=r(),C=M.useMemo(()=>({lang_code:"es",contact_information:"",default_payment_method:"",default_notes:"",default_legal_terms:"",default_quote_validity:"",default_show_line_discount_column:!0,default_tax:{amount:void 0,scale:2},default_tax_label:d("settings.form_fields.default_tax_label.placeholder")}),[d]),{mutate:y}=a(),{upload:v}=l(),R=ds({mode:"onBlur",values:p?{...p.dealer,lang_code:p.lang_code}:void 0,defaultValues:C}),{formState:E,reset:k,getValues:D,handleSubmit:F}=R,{isSubmitting:q,isDirty:U}=E,O=oe=>{var ne;const G=(ne=oe.target.files)==null?void 0:ne[0];if(G){if(G.type!=="image/png"&&G.type!=="image/jpeg"){alert(d("settings.form_fields.logo.invalid_format"));return}const K=new FileReader;K.onloadend=()=>{const ie=new Image;ie.onload=()=>{const xe=ie.width,tt=ie.height,Y=xe/tt===2;xe<200||tt<100||!Y?alert(d("settings.form_fields.logo.invalid_dimensions")):v(G)},ie.src=K.result},K.readAsDataURL(G)}};Oo({isDirty:U});const V=async oe=>{y(oe,{onError:G=>{console.debug(G),c({title:d("common.error"),description:G.message,variant:"destructive"})},onSuccess:()=>{m.language!==oe.lang_code&&m.changeLanguage(oe.lang_code??"es"),k(D()),c({description:d("settings.notifications.saved"),variant:"success"})}})};return q?i.jsx(Vn,{title:d("settings.notifications.saving")}):x==="error"?i.jsx(wr,{errorMessage:_.message}):x!=="success"?i.jsx(Vn,{}):i.jsx(fs,{...R,children:i.jsx("form",{onSubmit:F(V),children:i.jsxs("div",{className:"mx-auto grid w-full max-w-6xl items-start gap-6 md:grid-cols-[180px_1fr] lg:grid-cols-[250px_1fr]",children:[(($=R.formState.errors.root)==null?void 0:$.message)&&i.jsxs(kc,{variant:"destructive",children:[i.jsx(gd,{className:"w-4 h-4"}),i.jsx($c,{children:i.jsx(ae,{i18nKey:"common.error"})}),i.jsx(Uc,{children:(le=R.formState.errors.root)==null?void 0:le.message})]}),i.jsxs("nav",{className:"grid gap-4 text-sm text-muted-foreground",children:[i.jsx("a",{onClick:()=>o("profile"),className:n==="profile"?"font-semibold text-primary":"cursor-pointer",children:i.jsx(ae,{i18nKey:"settings.edit.tabs.profile"})}),i.jsx("a",{onClick:()=>o("quotes"),className:n==="quotes"?"font-semibold text-primary":"cursor-pointer ",children:i.jsx(ae,{i18nKey:"settings.edit.tabs.quotes"})}),i.jsx("a",{onClick:()=>o("legal"),className:n==="legal"?"font-semibold text-primary":"cursor-pointer ",children:i.jsx(ae,{i18nKey:"settings.edit.tabs.legal"})})]}),i.jsxs("div",{className:pe("grid gap-6",n==="profile"?"visible":"hidden"),children:[i.jsxs(Oe,{children:[i.jsxs(dt,{children:[i.jsx(Ve,{children:i.jsx(ae,{i18nKey:"settings.form_fields.language.label"})}),i.jsx(We,{children:i.jsx(ae,{i18nKey:"settings.form_fields.language.desc"})})]}),i.jsx(Pe,{children:i.jsx(Jr,{control:R.control,name:"lang_code",render:({field:oe})=>i.jsxs(kn,{value:oe.value,onValueChange:oe.onChange,children:[i.jsx($n,{"aria-label":d("settings.form_fields.language.label"),children:i.jsx(Un,{placeholder:d("settings.form_fields.language.placeholder")})}),i.jsx(Bn,{children:sn.map(G=>i.jsxs(Vt,{value:G.code,children:[i.jsx("span",{"aria-hidden":"true",className:`mr-2 ${G.flagClassName}`}),G.name]},G.code))})]})})}),i.jsx(Et,{className:"px-6 py-4 border-t",children:i.jsx(H,{children:i.jsx(ae,{i18nKey:"common.save"})})})]}),i.jsxs(Oe,{children:[i.jsxs(dt,{children:[i.jsx(Ve,{children:i.jsx(ae,{i18nKey:"settings.form_fields.contact_information.label"})}),i.jsx(We,{children:i.jsx(ae,{i18nKey:"settings.form_fields.contact_information.desc"})})]}),i.jsx(Pe,{children:i.jsx(Bt,{rows:8,placeholder:d("settings.form_fields.contact_information.placeholder"),name:"contact_information",required:!0})}),i.jsx(Et,{className:"px-6 py-4 border-t",children:i.jsx(H,{children:i.jsx(ae,{i18nKey:"common.save"})})})]}),i.jsxs(Oe,{children:[i.jsxs(dt,{children:[i.jsx(Ve,{children:i.jsx(ae,{i18nKey:"settings.form_fields.logo.label"})}),i.jsx(We,{children:i.jsx(ae,{i18nKey:"settings.form_fields.logo.desc"})})]}),i.jsx(Pe,{children:i.jsxs("div",{className:"flex items-center space-x-4",children:[i.jsx("div",{className:"w-[400px] h-[200px] border border-gray-300 flex items-center justify-center overflow-hidden",children:i.jsx("img",{src:p.dealer.logo?p.dealer.logo:"https://via.placeholder.com/200x100",width:400,height:200,style:{objectFit:"contain"}})}),i.jsx("div",{children:i.jsx("p",{className:"mt-2 text-sm text-gray-500",children:i.jsx(ae,{i18nKey:"settings.form_fields.logo.requirements"})})})]})}),i.jsxs(Et,{className:"px-6 py-4 border-t",children:[i.jsx(zn,{htmlFor:"logo-upload",className:"inline-flex items-center justify-center h-10 px-4 py-2 text-sm font-medium transition-colors rounded-md cursor-pointer bg-primary text-primary-foreground hover:bg-primary/90 whitespace-nowrap ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",children:i.jsx(ae,{i18nKey:"settings.form_fields.logo.upload"})}),i.jsx(cs,{id:"logo-upload",type:"file",accept:".png,.jpg,.jpeg",onChange:O,className:"hidden"})]})]})]}),i.jsxs("div",{className:pe("grid gap-6",n==="quotes"?"visible":"hidden"),children:[i.jsxs(Oe,{children:[i.jsxs(dt,{children:[i.jsx(Ve,{children:i.jsx(ae,{i18nKey:"settings.form_fields.default_show_line_discount_column.label"})}),i.jsx(We,{children:i.jsx(ae,{i18nKey:"settings.form_fields.default_show_line_discount_column.desc"})})]}),i.jsx(Pe,{children:i.jsx(Jr,{control:R.control,name:"default_show_line_discount_column",render:({field:oe})=>i.jsx(hs,{checked:oe.value??!0,onCheckedChange:oe.onChange})})}),i.jsx(Et,{className:"px-6 py-4 border-t",children:i.jsx(H,{children:i.jsx(ae,{i18nKey:"common.save"})})})]}),i.jsxs(Oe,{children:[i.jsxs(dt,{children:[i.jsx(Ve,{children:i.jsx(ae,{i18nKey:"settings.form_fields.default_tax.label"})}),i.jsx(We,{children:i.jsx(ae,{i18nKey:"settings.form_fields.default_tax.desc"})})]}),i.jsxs(Pe,{children:[i.jsx(Pn,{maxLength:32,placeholder:d("settings.form_fields.default_tax_label.placeholder"),name:"default_tax_label",required:!0,description:d("settings.form_fields.default_tax_label.desc")}),i.jsx("br",{}),i.jsx(is,{scale:2,disabled:E.disabled,placeholder:d("settings.form_fields.default_tax.desc"),name:"default_tax",required:!0,description:d("settings.form_fields.default_tax.desc")})]}),i.jsx(Et,{className:"px-6 py-4 border-t",children:i.jsx(H,{children:i.jsx(ae,{i18nKey:"common.save"})})})]}),i.jsxs(Oe,{children:[i.jsxs(dt,{children:[i.jsx(Ve,{children:i.jsx(ae,{i18nKey:"settings.form_fields.default_payment_method.label"})}),i.jsx(We,{children:i.jsx(ae,{i18nKey:"settings.form_fields.default_payment_method.desc"})})]}),i.jsx(Pe,{children:i.jsx(Bt,{autoSize:!0,placeholder:d("settings.form_fields.default_payment_method.placeholder"),name:"default_payment_method",required:!0,errors:R.formState.errors})}),i.jsx(Et,{className:"px-6 py-4 border-t",children:i.jsx(H,{children:i.jsx(ae,{i18nKey:"common.save"})})})]}),i.jsxs(Oe,{children:[i.jsxs(dt,{children:[i.jsx(Ve,{children:i.jsx(ae,{i18nKey:"settings.form_fields.default_quote_validity.label"})}),i.jsx(We,{children:i.jsx(ae,{i18nKey:"settings.form_fields.default_quote_validity.desc"})})]}),i.jsx(Pe,{children:i.jsx(Bt,{autoSize:!0,placeholder:d("settings.form_fields.default_quote_validity.placeholder"),name:"default_quote_validity",required:!0})}),i.jsx(Et,{className:"px-6 py-4 border-t",children:i.jsx(H,{children:i.jsx(ae,{i18nKey:"common.save"})})})]}),i.jsxs(Oe,{children:[i.jsxs(dt,{children:[i.jsx(Ve,{children:i.jsx(ae,{i18nKey:"settings.form_fields.default_notes.label"})}),i.jsx(We,{children:i.jsx(ae,{i18nKey:"settings.form_fields.default_notes.desc"})})]}),i.jsx(Pe,{children:i.jsx(Bt,{autoSize:!0,placeholder:d("settings.form_fields.default_notes.placeholder"),name:"default_notes"})}),i.jsx(Et,{className:"px-6 py-4 border-t",children:i.jsx(H,{children:i.jsx(ae,{i18nKey:"common.save"})})})]})]}),i.jsx("div",{className:pe("grid gap-6",n==="legal"?"visible":"hidden"),children:i.jsxs(Oe,{className:"h-",children:[i.jsxs(dt,{children:[i.jsx(Ve,{children:i.jsx(ae,{i18nKey:"settings.form_fields.default_legal_terms.label"})}),i.jsx(We,{children:i.jsx(ae,{i18nKey:"settings.form_fields.default_legal_terms.desc"})})]}),i.jsx(Pe,{children:i.jsx(Bt,{rows:25,placeholder:d("settings.form_fields.default_legal_terms.placeholder"),name:"default_legal_terms"})}),i.jsx(Et,{className:"px-6 py-4 border-t",children:i.jsx(H,{children:i.jsx(ae,{i18nKey:"common.save"})})})]})})]})})})},Xw=M.createContext(null),Zw=({children:n})=>i.jsx(Xw.Provider,{value:{},children:n}),mS=({children:n})=>i.jsx(gs,{children:i.jsx(Zw,{children:i.jsxs(ei,{className:"settings-layout",children:[i.jsx(ti,{}),i.jsxs(ni,{children:[i.jsx("div",{className:"grid w-full max-w-6xl gap-2 mx-auto",children:i.jsx("h1",{className:"text-2xl font-semibold md:text-3xl",children:i.jsx(ae,{i18nKey:"settings.edit.title"})})}),n]})]})})});export{rS as CatalogLayout,iS as CatalogList,sS as DashboardPage,aS as DealerLayout,oS as DealersList,lS as ErrorPage,tS as LoginPageWithLanguageSelector,nS as LogoutPage,uS as QuoteCreate,cS as QuoteEdit,dS as QuotesLayout,fS as QuotesList,gS as SettingsEditor,mS as SettingsLayout}; diff --git a/dist/client/assets/index-zvH6W8yt.js b/dist/client/assets/index-C3U0yXJT.js similarity index 67% rename from dist/client/assets/index-zvH6W8yt.js rename to dist/client/assets/index-C3U0yXJT.js index dfb605d..7a11a2b 100644 --- a/dist/client/assets/index-zvH6W8yt.js +++ b/dist/client/assets/index-C3U0yXJT.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-BG_gEWso.js","assets/index-DtTssDoC.css"])))=>i.map(i=>d[i]); -var Cle=Object.defineProperty;var kF=t=>{throw TypeError(t)};var Ale=(t,e,n)=>e in t?Cle(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var He=(t,e,n)=>Ale(t,typeof e!="symbol"?e+"":e,n),CP=(t,e,n)=>e.has(t)||kF("Cannot "+n);var C=(t,e,n)=>(CP(t,e,"read from private field"),n?n.call(t):e.get(t)),z=(t,e,n)=>e.has(t)?kF("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),$=(t,e,n,r)=>(CP(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),B=(t,e,n)=>(CP(t,e,"access private method"),n);var bs=(t,e,n,r)=>({set _(s){$(t,e,s,n)},get _(){return C(t,e,r)}});function vH(t,e){for(var n=0;nr[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();var yr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Od(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Rle(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var s=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:function(){return t[r]}})}),n}var yH={exports:{}},bC={},bH={exports:{}},Lt={};/** +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Ce3s5e6O.js","assets/index-DtTssDoC.css"])))=>i.map(i=>d[i]); +var Rle=Object.defineProperty;var kF=t=>{throw TypeError(t)};var Ple=(t,e,n)=>e in t?Rle(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var He=(t,e,n)=>Ple(t,typeof e!="symbol"?e+"":e,n),CP=(t,e,n)=>e.has(t)||kF("Cannot "+n);var C=(t,e,n)=>(CP(t,e,"read from private field"),n?n.call(t):e.get(t)),z=(t,e,n)=>e.has(t)?kF("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),$=(t,e,n,r)=>(CP(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),B=(t,e,n)=>(CP(t,e,"access private method"),n);var bs=(t,e,n,r)=>({set _(s){$(t,e,s,n)},get _(){return C(t,e,r)}});function vH(t,e){for(var n=0;nr[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();var yr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Od(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Tle(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var s=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:function(){return t[r]}})}),n}var yH={exports:{}},b1={},bH={exports:{}},Lt={};/** * @license React * react.production.min.js * @@ -7,7 +7,7 @@ var Cle=Object.defineProperty;var kF=t=>{throw TypeError(t)};var Ale=(t,e,n)=>e * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Y0=Symbol.for("react.element"),Ple=Symbol.for("react.portal"),Tle=Symbol.for("react.fragment"),kle=Symbol.for("react.strict_mode"),Dle=Symbol.for("react.profiler"),Nle=Symbol.for("react.provider"),Mle=Symbol.for("react.context"),Ole=Symbol.for("react.forward_ref"),Lle=Symbol.for("react.suspense"),Ile=Symbol.for("react.memo"),$le=Symbol.for("react.lazy"),DF=Symbol.iterator;function jle(t){return t===null||typeof t!="object"?null:(t=DF&&t[DF]||t["@@iterator"],typeof t=="function"?t:null)}var wH={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_H=Object.assign,xH={};function yv(t,e,n){this.props=t,this.context=e,this.refs=xH,this.updater=n||wH}yv.prototype.isReactComponent={};yv.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=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,t,e,"setState")};yv.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function SH(){}SH.prototype=yv.prototype;function uO(t,e,n){this.props=t,this.context=e,this.refs=xH,this.updater=n||wH}var dO=uO.prototype=new SH;dO.constructor=uO;_H(dO,yv.prototype);dO.isPureReactComponent=!0;var NF=Array.isArray,EH=Object.prototype.hasOwnProperty,fO={current:null},CH={key:!0,ref:!0,__self:!0,__source:!0};function AH(t,e,n){var r,s={},i=null,a=null;if(e!=null)for(r in e.ref!==void 0&&(a=e.ref),e.key!==void 0&&(i=""+e.key),e)EH.call(e,r)&&!CH.hasOwnProperty(r)&&(s[r]=e[r]);var o=arguments.length-2;if(o===1)s.children=n;else if(1{throw TypeError(t)};var Ale=(t,e,n)=>e * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Hle=_,Wle=Symbol.for("react.element"),Vle=Symbol.for("react.fragment"),qle=Object.prototype.hasOwnProperty,Gle=Hle.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Kle={key:!0,ref:!0,__self:!0,__source:!0};function PH(t,e,n){var r,s={},i=null,a=null;n!==void 0&&(i=""+n),e.key!==void 0&&(i=""+e.key),e.ref!==void 0&&(a=e.ref);for(r in e)qle.call(e,r)&&!Kle.hasOwnProperty(r)&&(s[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)s[r]===void 0&&(s[r]=e[r]);return{$$typeof:Wle,type:t,key:i,ref:a,props:s,_owner:Gle.current}}bC.Fragment=Vle;bC.jsx=PH;bC.jsxs=PH;yH.exports=bC;var P=yH.exports,Ck={},TH={exports:{}},co={},kH={exports:{}},DH={};/** + */var Vle=_,qle=Symbol.for("react.element"),Gle=Symbol.for("react.fragment"),Kle=Object.prototype.hasOwnProperty,Yle=Vle.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Xle={key:!0,ref:!0,__self:!0,__source:!0};function PH(t,e,n){var r,s={},i=null,a=null;n!==void 0&&(i=""+n),e.key!==void 0&&(i=""+e.key),e.ref!==void 0&&(a=e.ref);for(r in e)Kle.call(e,r)&&!Xle.hasOwnProperty(r)&&(s[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)s[r]===void 0&&(s[r]=e[r]);return{$$typeof:qle,type:t,key:i,ref:a,props:s,_owner:Yle.current}}b1.Fragment=Gle;b1.jsx=PH;b1.jsxs=PH;yH.exports=b1;var P=yH.exports,Ck={},TH={exports:{}},co={},kH={exports:{}},DH={};/** * @license React * scheduler.production.min.js * @@ -23,7 +23,7 @@ var Cle=Object.defineProperty;var kF=t=>{throw TypeError(t)};var Ale=(t,e,n)=>e * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */(function(t){function e(H,ee){var re=H.length;H.push(ee);e:for(;0>>1,G=H[X];if(0>>1;Xs(ue,re))des(ie,ue)?(H[X]=ie,H[de]=re,X=de):(H[X]=ue,H[J]=re,X=J);else if(des(ie,re))H[X]=ie,H[de]=re,X=de;else break e}}return ee}function s(H,ee){var re=H.sortIndex-ee.sortIndex;return re!==0?re:H.id-ee.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;t.unstable_now=function(){return i.now()}}else{var a=Date,o=a.now();t.unstable_now=function(){return a.now()-o}}var c=[],u=[],f=1,l=null,d=3,m=!1,p=!1,h=!1,y=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(H){for(var ee=n(u);ee!==null;){if(ee.callback===null)r(u);else if(ee.startTime<=H)r(u),ee.sortIndex=ee.expirationTime,e(c,ee);else break;ee=n(u)}}function x(H){if(h=!1,w(H),!p)if(n(c)!==null)p=!0,Y(A);else{var ee=n(u);ee!==null&&W(x,ee.startTime-H)}}function A(H,ee){p=!1,h&&(h=!1,g(E),E=-1),m=!0;var re=d;try{for(w(ee),l=n(c);l!==null&&(!(l.expirationTime>ee)||H&&!M());){var X=l.callback;if(typeof X=="function"){l.callback=null,d=l.priorityLevel;var G=X(l.expirationTime<=ee);ee=t.unstable_now(),typeof G=="function"?l.callback=G:l===n(c)&&r(c),w(ee)}else r(c);l=n(c)}if(l!==null)var K=!0;else{var J=n(u);J!==null&&W(x,J.startTime-ee),K=!1}return K}finally{l=null,d=re,m=!1}}var k=!1,R=null,E=-1,T=5,D=-1;function M(){return!(t.unstable_now()-DH||125X?(H.sortIndex=re,e(u,H),n(c)===null&&H===n(u)&&(h?(g(E),E=-1):h=!0,W(x,re-X))):(H.sortIndex=G,e(c,H),p||m||(p=!0,Y(A))),H},t.unstable_shouldYield=M,t.unstable_wrapCallback=function(H){var ee=d;return function(){var re=d;d=ee;try{return H.apply(this,arguments)}finally{d=re}}}})(DH);kH.exports=DH;var Yle=kH.exports;/** + */(function(t){function e(H,ee){var re=H.length;H.push(ee);e:for(;0>>1,G=H[X];if(0>>1;Xs(ue,re))des(ie,ue)?(H[X]=ie,H[de]=re,X=de):(H[X]=ue,H[J]=re,X=J);else if(des(ie,re))H[X]=ie,H[de]=re,X=de;else break e}}return ee}function s(H,ee){var re=H.sortIndex-ee.sortIndex;return re!==0?re:H.id-ee.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;t.unstable_now=function(){return i.now()}}else{var a=Date,o=a.now();t.unstable_now=function(){return a.now()-o}}var c=[],u=[],f=1,l=null,d=3,m=!1,p=!1,h=!1,y=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(H){for(var ee=n(u);ee!==null;){if(ee.callback===null)r(u);else if(ee.startTime<=H)r(u),ee.sortIndex=ee.expirationTime,e(c,ee);else break;ee=n(u)}}function x(H){if(h=!1,w(H),!p)if(n(c)!==null)p=!0,Y(A);else{var ee=n(u);ee!==null&&W(x,ee.startTime-H)}}function A(H,ee){p=!1,h&&(h=!1,g(E),E=-1),m=!0;var re=d;try{for(w(ee),l=n(c);l!==null&&(!(l.expirationTime>ee)||H&&!M());){var X=l.callback;if(typeof X=="function"){l.callback=null,d=l.priorityLevel;var G=X(l.expirationTime<=ee);ee=t.unstable_now(),typeof G=="function"?l.callback=G:l===n(c)&&r(c),w(ee)}else r(c);l=n(c)}if(l!==null)var K=!0;else{var J=n(u);J!==null&&W(x,J.startTime-ee),K=!1}return K}finally{l=null,d=re,m=!1}}var k=!1,R=null,E=-1,T=5,D=-1;function M(){return!(t.unstable_now()-DH||125X?(H.sortIndex=re,e(u,H),n(c)===null&&H===n(u)&&(h?(g(E),E=-1):h=!0,W(x,re-X))):(H.sortIndex=G,e(c,H),p||m||(p=!0,Y(A))),H},t.unstable_shouldYield=M,t.unstable_wrapCallback=function(H){var ee=d;return function(){var re=d;d=ee;try{return H.apply(this,arguments)}finally{d=re}}}})(DH);kH.exports=DH;var Qle=kH.exports;/** * @license React * react-dom.production.min.js * @@ -31,49 +31,49 @@ var Cle=Object.defineProperty;var kF=t=>{throw TypeError(t)};var Ale=(t,e,n)=>e * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Xle=_,ao=Yle;function ke(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ak=Object.prototype.hasOwnProperty,Qle=/^[: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]*$/,OF={},LF={};function Jle(t){return Ak.call(LF,t)?!0:Ak.call(OF,t)?!1:Qle.test(t)?LF[t]=!0:(OF[t]=!0,!1)}function Zle(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function ece(t,e,n,r){if(e===null||typeof e>"u"||Zle(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function ti(t,e,n,r,s,i,a){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=i,this.removeEmptyString=a}var ps={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){ps[t]=new ti(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];ps[e]=new ti(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){ps[t]=new ti(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){ps[t]=new ti(t,2,!1,t,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(t){ps[t]=new ti(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){ps[t]=new ti(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){ps[t]=new ti(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){ps[t]=new ti(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){ps[t]=new ti(t,5,!1,t.toLowerCase(),null,!1,!1)});var pO=/[\-:]([a-z])/g;function mO(t){return t[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(t){var e=t.replace(pO,mO);ps[e]=new ti(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(pO,mO);ps[e]=new ti(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(pO,mO);ps[e]=new ti(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){ps[t]=new ti(t,1,!1,t.toLowerCase(),null,!1,!1)});ps.xlinkHref=new ti("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){ps[t]=new ti(t,1,!1,t.toLowerCase(),null,!0,!0)});function gO(t,e,n,r){var s=ps.hasOwnProperty(e)?ps[e]:null;(s!==null?s.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ak=Object.prototype.hasOwnProperty,Zle=/^[: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]*$/,OF={},LF={};function ece(t){return Ak.call(LF,t)?!0:Ak.call(OF,t)?!1:Zle.test(t)?LF[t]=!0:(OF[t]=!0,!1)}function tce(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function nce(t,e,n,r){if(e===null||typeof e>"u"||tce(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function ti(t,e,n,r,s,i,a){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=i,this.removeEmptyString=a}var ps={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){ps[t]=new ti(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];ps[e]=new ti(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){ps[t]=new ti(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){ps[t]=new ti(t,2,!1,t,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(t){ps[t]=new ti(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){ps[t]=new ti(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){ps[t]=new ti(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){ps[t]=new ti(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){ps[t]=new ti(t,5,!1,t.toLowerCase(),null,!1,!1)});var pO=/[\-:]([a-z])/g;function mO(t){return t[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(t){var e=t.replace(pO,mO);ps[e]=new ti(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(pO,mO);ps[e]=new ti(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(pO,mO);ps[e]=new ti(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){ps[t]=new ti(t,1,!1,t.toLowerCase(),null,!1,!1)});ps.xlinkHref=new ti("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){ps[t]=new ti(t,1,!1,t.toLowerCase(),null,!0,!0)});function gO(t,e,n,r){var s=ps.hasOwnProperty(e)?ps[e]:null;(s!==null?s.type!==0:r||!(2o||s[a]!==i[o]){var c=` -`+s[a].replace(" at new "," at ");return t.displayName&&c.includes("")&&(c=c.replace("",t.displayName)),c}while(1<=a&&0<=o);break}}}finally{PP=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?My(t):""}function tce(t){switch(t.tag){case 5:return My(t.type);case 16:return My("Lazy");case 13:return My("Suspense");case 19:return My("SuspenseList");case 0:case 2:case 15:return t=TP(t.type,!1),t;case 11:return t=TP(t.type.render,!1),t;case 1:return t=TP(t.type,!0),t;default:return""}}function kk(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case fm:return"Fragment";case dm:return"Portal";case Rk:return"Profiler";case vO:return"StrictMode";case Pk:return"Suspense";case Tk:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case OH:return(t.displayName||"Context")+".Consumer";case MH:return(t._context.displayName||"Context")+".Provider";case yO:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case bO:return e=t.displayName||null,e!==null?e:kk(t.type)||"Memo";case Au:e=t._payload,t=t._init;try{return kk(t(e))}catch{}}return null}function nce(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return kk(e);case 8:return e===vO?"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 e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Ed(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function IH(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function rce(t){var e=IH(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return s.call(this)},set:function(a){r=""+a,i.call(this,a)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Ix(t){t._valueTracker||(t._valueTracker=rce(t))}function $H(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=IH(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function PE(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function Dk(t,e){var n=e.checked;return rr({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function $F(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=Ed(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function jH(t,e){e=e.checked,e!=null&&gO(t,"checked",e,!1)}function Nk(t,e){jH(t,e);var n=Ed(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?Mk(t,e.type,n):e.hasOwnProperty("defaultValue")&&Mk(t,e.type,Ed(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function jF(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function Mk(t,e,n){(e!=="number"||PE(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var Oy=Array.isArray;function Rm(t,e,n,r){if(t=t.options,e){e={};for(var s=0;s"+e.valueOf().toString()+"",e=$x.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Rb(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var ob={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},sce=["Webkit","ms","Moz","O"];Object.keys(ob).forEach(function(t){sce.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),ob[e]=ob[t]})});function UH(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||ob.hasOwnProperty(t)&&ob[t]?(""+e).trim():e+"px"}function HH(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=UH(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,s):t[n]=s}}var ice=rr({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 Ik(t,e){if(e){if(ice[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(ke(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(ke(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(ke(61))}if(e.style!=null&&typeof e.style!="object")throw Error(ke(62))}}function $k(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){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 jk=null;function wO(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Fk=null,Pm=null,Tm=null;function BF(t){if(t=Z0(t)){if(typeof Fk!="function")throw Error(ke(280));var e=t.stateNode;e&&(e=EC(e),Fk(t.stateNode,t.type,e))}}function WH(t){Pm?Tm?Tm.push(t):Tm=[t]:Pm=t}function VH(){if(Pm){var t=Pm,e=Tm;if(Tm=Pm=null,BF(t),e)for(t=0;t>>=0,t===0?32:31-(gce(t)/vce|0)|0}var jx=64,Fx=4194304;function Ly(t){switch(t&-t){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 t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function NE(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,s=t.suspendedLanes,i=t.pingedLanes,a=n&268435455;if(a!==0){var o=a&~s;o!==0?r=Ly(o):(i&=a,i!==0&&(r=Ly(i)))}else a=n&~s,a!==0?r=Ly(a):i!==0&&(r=Ly(i));if(r===0)return 0;if(e!==0&&e!==r&&!(e&s)&&(s=r&-r,i=e&-e,s>=i||s===16&&(i&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0n;n++)e.push(t);return e}function Q0(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-xa(e),t[e]=n}function _ce(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0=lb),XF=" ",QF=!1;function d5(t,e){switch(t){case"keyup":return Yce.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function f5(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var hm=!1;function Qce(t,e){switch(t){case"compositionend":return f5(e);case"keypress":return e.which!==32?null:(QF=!0,XF);case"textInput":return t=e.data,t===XF&&QF?null:t;default:return null}}function Jce(t,e){if(hm)return t==="compositionend"||!PO&&d5(t,e)?(t=c5(),MS=CO=dd=null,hm=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=t3(n)}}function g5(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?g5(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function v5(){for(var t=window,e=PE();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=PE(t.document)}return e}function TO(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function aue(t){var e=v5(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&g5(n.ownerDocument.documentElement,n)){if(r!==null&&TO(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!t.extend&&i>r&&(s=r,r=i,i=s),s=n3(n,i);var a=n3(n,r);s&&a&&(t.rangeCount!==1||t.anchorNode!==s.node||t.anchorOffset!==s.offset||t.focusNode!==a.node||t.focusOffset!==a.offset)&&(e=e.createRange(),e.setStart(s.node,s.offset),t.removeAllRanges(),i>r?(t.addRange(e),t.extend(a.node,a.offset)):(e.setEnd(a.node,a.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,pm=null,Vk=null,ub=null,qk=!1;function r3(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;qk||pm==null||pm!==PE(r)||(r=pm,"selectionStart"in r&&TO(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}),ub&&Mb(ub,r)||(ub=r,r=LE(Vk,"onSelect"),0vm||(t.current=Jk[vm],Jk[vm]=null,vm--)}function On(t,e){vm++,Jk[vm]=t.current,t.current=e}var Cd={},Os=Id(Cd),Si=Id(!1),Fh=Cd;function nv(t,e){var n=t.type.contextTypes;if(!n)return Cd;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=e[i];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=s),s}function Ei(t){return t=t.childContextTypes,t!=null}function $E(){Un(Si),Un(Os)}function u3(t,e,n){if(Os.current!==Cd)throw Error(ke(168));On(Os,e),On(Si,n)}function A5(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in e))throw Error(ke(108,nce(t)||"Unknown",s));return rr({},n,r)}function jE(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Cd,Fh=Os.current,On(Os,t),On(Si,Si.current),!0}function d3(t,e,n){var r=t.stateNode;if(!r)throw Error(ke(169));n?(t=A5(t,e,Fh),r.__reactInternalMemoizedMergedChildContext=t,Un(Si),Un(Os),On(Os,t)):Un(Si),On(Si,n)}var tc=null,CC=!1,HP=!1;function R5(t){tc===null?tc=[t]:tc.push(t)}function bue(t){CC=!0,R5(t)}function $d(){if(!HP&&tc!==null){HP=!0;var t=0,e=mn;try{var n=tc;for(mn=1;t>=a,s-=a,Dc=1<<32-xa(e)+s|n<E?(T=R,R=null):T=R.sibling;var D=d(g,R,w[E],x);if(D===null){R===null&&(R=T);break}t&&R&&D.alternate===null&&e(g,R),v=i(D,v,E),k===null?A=D:k.sibling=D,k=D,R=T}if(E===w.length)return n(g,R),Kn&&df(g,E),A;if(R===null){for(;EE?(T=R,R=null):T=R.sibling;var M=d(g,R,D.value,x);if(M===null){R===null&&(R=T);break}t&&R&&M.alternate===null&&e(g,R),v=i(M,v,E),k===null?A=M:k.sibling=M,k=M,R=T}if(D.done)return n(g,R),Kn&&df(g,E),A;if(R===null){for(;!D.done;E++,D=w.next())D=l(g,D.value,x),D!==null&&(v=i(D,v,E),k===null?A=D:k.sibling=D,k=D);return Kn&&df(g,E),A}for(R=r(g,R);!D.done;E++,D=w.next())D=m(R,g,E,D.value,x),D!==null&&(t&&D.alternate!==null&&R.delete(D.key===null?E:D.key),v=i(D,v,E),k===null?A=D:k.sibling=D,k=D);return t&&R.forEach(function(L){return e(g,L)}),Kn&&df(g,E),A}function y(g,v,w,x){if(typeof w=="object"&&w!==null&&w.type===fm&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case Lx:e:{for(var A=w.key,k=v;k!==null;){if(k.key===A){if(A=w.type,A===fm){if(k.tag===7){n(g,k.sibling),v=s(k,w.props.children),v.return=g,g=v;break e}}else if(k.elementType===A||typeof A=="object"&&A!==null&&A.$$typeof===Au&&p3(A)===k.type){n(g,k.sibling),v=s(k,w.props),v.ref=fy(g,k,w),v.return=g,g=v;break e}n(g,k);break}else e(g,k);k=k.sibling}w.type===fm?(v=Oh(w.props.children,g.mode,x,w.key),v.return=g,g=v):(x=BS(w.type,w.key,w.props,null,g.mode,x),x.ref=fy(g,v,w),x.return=g,g=x)}return a(g);case dm:e:{for(k=w.key;v!==null;){if(v.key===k)if(v.tag===4&&v.stateNode.containerInfo===w.containerInfo&&v.stateNode.implementation===w.implementation){n(g,v.sibling),v=s(v,w.children||[]),v.return=g,g=v;break e}else{n(g,v);break}else e(g,v);v=v.sibling}v=QP(w,g.mode,x),v.return=g,g=v}return a(g);case Au:return k=w._init,y(g,v,k(w._payload),x)}if(Oy(w))return p(g,v,w,x);if(ay(w))return h(g,v,w,x);qx(g,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,v!==null&&v.tag===6?(n(g,v.sibling),v=s(v,w),v.return=g,g=v):(n(g,v),v=XP(w,g.mode,x),v.return=g,g=v),a(g)):n(g,v)}return y}var sv=D5(!0),N5=D5(!1),BE=Id(null),UE=null,wm=null,MO=null;function OO(){MO=wm=UE=null}function LO(t){var e=BE.current;Un(BE),t._currentValue=e}function tD(t,e,n){for(;t!==null;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,r!==null&&(r.childLanes|=e)):r!==null&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===n)break;t=t.return}}function Dm(t,e){UE=t,MO=wm=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(yi=!0),t.firstContext=null)}function zo(t){var e=t._currentValue;if(MO!==t)if(t={context:t,memoizedValue:e,next:null},wm===null){if(UE===null)throw Error(ke(308));wm=t,UE.dependencies={lanes:0,firstContext:t}}else wm=wm.next=t;return e}var Sf=null;function IO(t){Sf===null?Sf=[t]:Sf.push(t)}function M5(t,e,n,r){var s=e.interleaved;return s===null?(n.next=n,IO(e)):(n.next=s.next,s.next=n),e.interleaved=n,Hc(t,r)}function Hc(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var Ru=!1;function $O(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function O5(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Mc(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function yd(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,Kt&2){var s=r.pending;return s===null?e.next=e:(e.next=s.next,s.next=e),r.pending=e,Hc(t,n)}return s=r.interleaved,s===null?(e.next=e,IO(r)):(e.next=s.next,s.next=e),r.interleaved=e,Hc(t,n)}function LS(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,xO(t,n)}}function m3(t,e){var n=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?s=i=a:i=i.next=a,n=n.next}while(n!==null);i===null?s=i=e:i=i.next=e}else s=i=e;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:r.shared,effects:r.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function HE(t,e,n,r){var s=t.updateQueue;Ru=!1;var i=s.firstBaseUpdate,a=s.lastBaseUpdate,o=s.shared.pending;if(o!==null){s.shared.pending=null;var c=o,u=c.next;c.next=null,a===null?i=u:a.next=u,a=c;var f=t.alternate;f!==null&&(f=f.updateQueue,o=f.lastBaseUpdate,o!==a&&(o===null?f.firstBaseUpdate=u:o.next=u,f.lastBaseUpdate=c))}if(i!==null){var l=s.baseState;a=0,f=u=c=null,o=i;do{var d=o.lane,m=o.eventTime;if((r&d)===d){f!==null&&(f=f.next={eventTime:m,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var p=t,h=o;switch(d=e,m=n,h.tag){case 1:if(p=h.payload,typeof p=="function"){l=p.call(m,l,d);break e}l=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=h.payload,d=typeof p=="function"?p.call(m,l,d):p,d==null)break e;l=rr({},l,d);break e;case 2:Ru=!0}}o.callback!==null&&o.lane!==0&&(t.flags|=64,d=s.effects,d===null?s.effects=[o]:d.push(o))}else m={eventTime:m,lane:d,tag:o.tag,payload:o.payload,callback:o.callback,next:null},f===null?(u=f=m,c=l):f=f.next=m,a|=d;if(o=o.next,o===null){if(o=s.shared.pending,o===null)break;d=o,o=d.next,d.next=null,s.lastBaseUpdate=d,s.shared.pending=null}}while(!0);if(f===null&&(c=l),s.baseState=c,s.firstBaseUpdate=u,s.lastBaseUpdate=f,e=s.shared.interleaved,e!==null){s=e;do a|=s.lane,s=s.next;while(s!==e)}else i===null&&(s.shared.lanes=0);Uh|=a,t.lanes=a,t.memoizedState=l}}function g3(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;en?n:4,t(!0);var r=VP.transition;VP.transition={};try{t(!1),e()}finally{mn=n,VP.transition=r}}function Q5(){return Bo().memoizedState}function Sue(t,e,n){var r=wd(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},J5(t))Z5(e,n);else if(n=M5(t,e,n,r),n!==null){var s=Xs();Sa(n,t,r,s),eW(n,e,r)}}function Eue(t,e,n){var r=wd(t),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(J5(t))Z5(e,s);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var a=e.lastRenderedState,o=i(a,n);if(s.hasEagerState=!0,s.eagerState=o,Aa(o,a)){var c=e.interleaved;c===null?(s.next=s,IO(e)):(s.next=c.next,c.next=s),e.interleaved=s;return}}catch{}finally{}n=M5(t,e,s,r),n!==null&&(s=Xs(),Sa(n,t,r,s),eW(n,e,r))}}function J5(t){var e=t.alternate;return t===nr||e!==null&&e===nr}function Z5(t,e){db=VE=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function eW(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,xO(t,n)}}var qE={readContext:zo,useCallback:ws,useContext:ws,useEffect:ws,useImperativeHandle:ws,useInsertionEffect:ws,useLayoutEffect:ws,useMemo:ws,useReducer:ws,useRef:ws,useState:ws,useDebugValue:ws,useDeferredValue:ws,useTransition:ws,useMutableSource:ws,useSyncExternalStore:ws,useId:ws,unstable_isNewReconciler:!1},Cue={readContext:zo,useCallback:function(t,e){return Va().memoizedState=[t,e===void 0?null:e],t},useContext:zo,useEffect:y3,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,$S(4194308,4,q5.bind(null,e,t),n)},useLayoutEffect:function(t,e){return $S(4194308,4,t,e)},useInsertionEffect:function(t,e){return $S(4,2,t,e)},useMemo:function(t,e){var n=Va();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=Va();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=Sue.bind(null,nr,t),[r.memoizedState,t]},useRef:function(t){var e=Va();return t={current:t},e.memoizedState=t},useState:v3,useDebugValue:VO,useDeferredValue:function(t){return Va().memoizedState=t},useTransition:function(){var t=v3(!1),e=t[0];return t=xue.bind(null,t[1]),Va().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=nr,s=Va();if(Kn){if(n===void 0)throw Error(ke(407));n=n()}else{if(n=e(),Zr===null)throw Error(ke(349));Bh&30||j5(r,e,n)}s.memoizedState=n;var i={value:n,getSnapshot:e};return s.queue=i,y3(z5.bind(null,r,i,t),[t]),r.flags|=2048,Bb(9,F5.bind(null,r,i,n,e),void 0,null),n},useId:function(){var t=Va(),e=Zr.identifierPrefix;if(Kn){var n=Nc,r=Dc;n=(r&~(1<<32-xa(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=Fb++,0")&&(c=c.replace("",t.displayName)),c}while(1<=a&&0<=o);break}}}finally{PP=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?My(t):""}function rce(t){switch(t.tag){case 5:return My(t.type);case 16:return My("Lazy");case 13:return My("Suspense");case 19:return My("SuspenseList");case 0:case 2:case 15:return t=TP(t.type,!1),t;case 11:return t=TP(t.type.render,!1),t;case 1:return t=TP(t.type,!0),t;default:return""}}function kk(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case fm:return"Fragment";case dm:return"Portal";case Rk:return"Profiler";case vO:return"StrictMode";case Pk:return"Suspense";case Tk:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case OH:return(t.displayName||"Context")+".Consumer";case MH:return(t._context.displayName||"Context")+".Provider";case yO:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case bO:return e=t.displayName||null,e!==null?e:kk(t.type)||"Memo";case Au:e=t._payload,t=t._init;try{return kk(t(e))}catch{}}return null}function sce(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return kk(e);case 8:return e===vO?"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 e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Ed(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function IH(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function ice(t){var e=IH(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return s.call(this)},set:function(a){r=""+a,i.call(this,a)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Ix(t){t._valueTracker||(t._valueTracker=ice(t))}function $H(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=IH(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function PE(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function Dk(t,e){var n=e.checked;return rr({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function $F(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=Ed(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function jH(t,e){e=e.checked,e!=null&&gO(t,"checked",e,!1)}function Nk(t,e){jH(t,e);var n=Ed(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?Mk(t,e.type,n):e.hasOwnProperty("defaultValue")&&Mk(t,e.type,Ed(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function jF(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function Mk(t,e,n){(e!=="number"||PE(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var Oy=Array.isArray;function Rm(t,e,n,r){if(t=t.options,e){e={};for(var s=0;s"+e.valueOf().toString()+"",e=$x.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Rb(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var ob={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},oce=["Webkit","ms","Moz","O"];Object.keys(ob).forEach(function(t){oce.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),ob[e]=ob[t]})});function UH(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||ob.hasOwnProperty(t)&&ob[t]?(""+e).trim():e+"px"}function HH(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=UH(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,s):t[n]=s}}var ace=rr({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 Ik(t,e){if(e){if(ace[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(ke(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(ke(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(ke(61))}if(e.style!=null&&typeof e.style!="object")throw Error(ke(62))}}function $k(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){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 jk=null;function wO(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Fk=null,Pm=null,Tm=null;function BF(t){if(t=Z_(t)){if(typeof Fk!="function")throw Error(ke(280));var e=t.stateNode;e&&(e=E1(e),Fk(t.stateNode,t.type,e))}}function WH(t){Pm?Tm?Tm.push(t):Tm=[t]:Pm=t}function VH(){if(Pm){var t=Pm,e=Tm;if(Tm=Pm=null,BF(t),e)for(t=0;t>>=0,t===0?32:31-(yce(t)/bce|0)|0}var jx=64,Fx=4194304;function Ly(t){switch(t&-t){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 t&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function NE(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,s=t.suspendedLanes,i=t.pingedLanes,a=n&268435455;if(a!==0){var o=a&~s;o!==0?r=Ly(o):(i&=a,i!==0&&(r=Ly(i)))}else a=n&~s,a!==0?r=Ly(a):i!==0&&(r=Ly(i));if(r===0)return 0;if(e!==0&&e!==r&&!(e&s)&&(s=r&-r,i=e&-e,s>=i||s===16&&(i&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0n;n++)e.push(t);return e}function Q_(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-xa(e),t[e]=n}function Sce(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0=lb),XF=" ",QF=!1;function d5(t,e){switch(t){case"keyup":return Qce.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function f5(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var hm=!1;function Zce(t,e){switch(t){case"compositionend":return f5(e);case"keypress":return e.which!==32?null:(QF=!0,XF);case"textInput":return t=e.data,t===XF&&QF?null:t;default:return null}}function eue(t,e){if(hm)return t==="compositionend"||!PO&&d5(t,e)?(t=c5(),MS=CO=dd=null,hm=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=t3(n)}}function g5(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?g5(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function v5(){for(var t=window,e=PE();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=PE(t.document)}return e}function TO(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function cue(t){var e=v5(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&g5(n.ownerDocument.documentElement,n)){if(r!==null&&TO(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!t.extend&&i>r&&(s=r,r=i,i=s),s=n3(n,i);var a=n3(n,r);s&&a&&(t.rangeCount!==1||t.anchorNode!==s.node||t.anchorOffset!==s.offset||t.focusNode!==a.node||t.focusOffset!==a.offset)&&(e=e.createRange(),e.setStart(s.node,s.offset),t.removeAllRanges(),i>r?(t.addRange(e),t.extend(a.node,a.offset)):(e.setEnd(a.node,a.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,pm=null,Vk=null,ub=null,qk=!1;function r3(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;qk||pm==null||pm!==PE(r)||(r=pm,"selectionStart"in r&&TO(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}),ub&&Mb(ub,r)||(ub=r,r=LE(Vk,"onSelect"),0vm||(t.current=Jk[vm],Jk[vm]=null,vm--)}function On(t,e){vm++,Jk[vm]=t.current,t.current=e}var Cd={},Os=Id(Cd),Si=Id(!1),Fh=Cd;function nv(t,e){var n=t.type.contextTypes;if(!n)return Cd;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=e[i];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=s),s}function Ei(t){return t=t.childContextTypes,t!=null}function $E(){Un(Si),Un(Os)}function u3(t,e,n){if(Os.current!==Cd)throw Error(ke(168));On(Os,e),On(Si,n)}function A5(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in e))throw Error(ke(108,sce(t)||"Unknown",s));return rr({},n,r)}function jE(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||Cd,Fh=Os.current,On(Os,t),On(Si,Si.current),!0}function d3(t,e,n){var r=t.stateNode;if(!r)throw Error(ke(169));n?(t=A5(t,e,Fh),r.__reactInternalMemoizedMergedChildContext=t,Un(Si),Un(Os),On(Os,t)):Un(Si),On(Si,n)}var tc=null,C1=!1,HP=!1;function R5(t){tc===null?tc=[t]:tc.push(t)}function _ue(t){C1=!0,R5(t)}function $d(){if(!HP&&tc!==null){HP=!0;var t=0,e=mn;try{var n=tc;for(mn=1;t>=a,s-=a,Dc=1<<32-xa(e)+s|n<E?(T=R,R=null):T=R.sibling;var D=d(g,R,w[E],x);if(D===null){R===null&&(R=T);break}t&&R&&D.alternate===null&&e(g,R),v=i(D,v,E),k===null?A=D:k.sibling=D,k=D,R=T}if(E===w.length)return n(g,R),Kn&&df(g,E),A;if(R===null){for(;EE?(T=R,R=null):T=R.sibling;var M=d(g,R,D.value,x);if(M===null){R===null&&(R=T);break}t&&R&&M.alternate===null&&e(g,R),v=i(M,v,E),k===null?A=M:k.sibling=M,k=M,R=T}if(D.done)return n(g,R),Kn&&df(g,E),A;if(R===null){for(;!D.done;E++,D=w.next())D=l(g,D.value,x),D!==null&&(v=i(D,v,E),k===null?A=D:k.sibling=D,k=D);return Kn&&df(g,E),A}for(R=r(g,R);!D.done;E++,D=w.next())D=m(R,g,E,D.value,x),D!==null&&(t&&D.alternate!==null&&R.delete(D.key===null?E:D.key),v=i(D,v,E),k===null?A=D:k.sibling=D,k=D);return t&&R.forEach(function(L){return e(g,L)}),Kn&&df(g,E),A}function y(g,v,w,x){if(typeof w=="object"&&w!==null&&w.type===fm&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case Lx:e:{for(var A=w.key,k=v;k!==null;){if(k.key===A){if(A=w.type,A===fm){if(k.tag===7){n(g,k.sibling),v=s(k,w.props.children),v.return=g,g=v;break e}}else if(k.elementType===A||typeof A=="object"&&A!==null&&A.$$typeof===Au&&p3(A)===k.type){n(g,k.sibling),v=s(k,w.props),v.ref=fy(g,k,w),v.return=g,g=v;break e}n(g,k);break}else e(g,k);k=k.sibling}w.type===fm?(v=Oh(w.props.children,g.mode,x,w.key),v.return=g,g=v):(x=BS(w.type,w.key,w.props,null,g.mode,x),x.ref=fy(g,v,w),x.return=g,g=x)}return a(g);case dm:e:{for(k=w.key;v!==null;){if(v.key===k)if(v.tag===4&&v.stateNode.containerInfo===w.containerInfo&&v.stateNode.implementation===w.implementation){n(g,v.sibling),v=s(v,w.children||[]),v.return=g,g=v;break e}else{n(g,v);break}else e(g,v);v=v.sibling}v=QP(w,g.mode,x),v.return=g,g=v}return a(g);case Au:return k=w._init,y(g,v,k(w._payload),x)}if(Oy(w))return p(g,v,w,x);if(ay(w))return h(g,v,w,x);qx(g,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,v!==null&&v.tag===6?(n(g,v.sibling),v=s(v,w),v.return=g,g=v):(n(g,v),v=XP(w,g.mode,x),v.return=g,g=v),a(g)):n(g,v)}return y}var sv=D5(!0),N5=D5(!1),BE=Id(null),UE=null,wm=null,MO=null;function OO(){MO=wm=UE=null}function LO(t){var e=BE.current;Un(BE),t._currentValue=e}function tD(t,e,n){for(;t!==null;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,r!==null&&(r.childLanes|=e)):r!==null&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===n)break;t=t.return}}function Dm(t,e){UE=t,MO=wm=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(yi=!0),t.firstContext=null)}function zo(t){var e=t._currentValue;if(MO!==t)if(t={context:t,memoizedValue:e,next:null},wm===null){if(UE===null)throw Error(ke(308));wm=t,UE.dependencies={lanes:0,firstContext:t}}else wm=wm.next=t;return e}var Sf=null;function IO(t){Sf===null?Sf=[t]:Sf.push(t)}function M5(t,e,n,r){var s=e.interleaved;return s===null?(n.next=n,IO(e)):(n.next=s.next,s.next=n),e.interleaved=n,Hc(t,r)}function Hc(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var Ru=!1;function $O(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function O5(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Mc(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function yd(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,Kt&2){var s=r.pending;return s===null?e.next=e:(e.next=s.next,s.next=e),r.pending=e,Hc(t,n)}return s=r.interleaved,s===null?(e.next=e,IO(r)):(e.next=s.next,s.next=e),r.interleaved=e,Hc(t,n)}function LS(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,xO(t,n)}}function m3(t,e){var n=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?s=i=a:i=i.next=a,n=n.next}while(n!==null);i===null?s=i=e:i=i.next=e}else s=i=e;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:r.shared,effects:r.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function HE(t,e,n,r){var s=t.updateQueue;Ru=!1;var i=s.firstBaseUpdate,a=s.lastBaseUpdate,o=s.shared.pending;if(o!==null){s.shared.pending=null;var c=o,u=c.next;c.next=null,a===null?i=u:a.next=u,a=c;var f=t.alternate;f!==null&&(f=f.updateQueue,o=f.lastBaseUpdate,o!==a&&(o===null?f.firstBaseUpdate=u:o.next=u,f.lastBaseUpdate=c))}if(i!==null){var l=s.baseState;a=0,f=u=c=null,o=i;do{var d=o.lane,m=o.eventTime;if((r&d)===d){f!==null&&(f=f.next={eventTime:m,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var p=t,h=o;switch(d=e,m=n,h.tag){case 1:if(p=h.payload,typeof p=="function"){l=p.call(m,l,d);break e}l=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=h.payload,d=typeof p=="function"?p.call(m,l,d):p,d==null)break e;l=rr({},l,d);break e;case 2:Ru=!0}}o.callback!==null&&o.lane!==0&&(t.flags|=64,d=s.effects,d===null?s.effects=[o]:d.push(o))}else m={eventTime:m,lane:d,tag:o.tag,payload:o.payload,callback:o.callback,next:null},f===null?(u=f=m,c=l):f=f.next=m,a|=d;if(o=o.next,o===null){if(o=s.shared.pending,o===null)break;d=o,o=d.next,d.next=null,s.lastBaseUpdate=d,s.shared.pending=null}}while(!0);if(f===null&&(c=l),s.baseState=c,s.firstBaseUpdate=u,s.lastBaseUpdate=f,e=s.shared.interleaved,e!==null){s=e;do a|=s.lane,s=s.next;while(s!==e)}else i===null&&(s.shared.lanes=0);Uh|=a,t.lanes=a,t.memoizedState=l}}function g3(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;en?n:4,t(!0);var r=VP.transition;VP.transition={};try{t(!1),e()}finally{mn=n,VP.transition=r}}function Q5(){return Bo().memoizedState}function Cue(t,e,n){var r=wd(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},J5(t))Z5(e,n);else if(n=M5(t,e,n,r),n!==null){var s=Xs();Sa(n,t,r,s),eW(n,e,r)}}function Aue(t,e,n){var r=wd(t),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(J5(t))Z5(e,s);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var a=e.lastRenderedState,o=i(a,n);if(s.hasEagerState=!0,s.eagerState=o,Aa(o,a)){var c=e.interleaved;c===null?(s.next=s,IO(e)):(s.next=c.next,c.next=s),e.interleaved=s;return}}catch{}finally{}n=M5(t,e,s,r),n!==null&&(s=Xs(),Sa(n,t,r,s),eW(n,e,r))}}function J5(t){var e=t.alternate;return t===nr||e!==null&&e===nr}function Z5(t,e){db=VE=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function eW(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,xO(t,n)}}var qE={readContext:zo,useCallback:ws,useContext:ws,useEffect:ws,useImperativeHandle:ws,useInsertionEffect:ws,useLayoutEffect:ws,useMemo:ws,useReducer:ws,useRef:ws,useState:ws,useDebugValue:ws,useDeferredValue:ws,useTransition:ws,useMutableSource:ws,useSyncExternalStore:ws,useId:ws,unstable_isNewReconciler:!1},Rue={readContext:zo,useCallback:function(t,e){return Va().memoizedState=[t,e===void 0?null:e],t},useContext:zo,useEffect:y3,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,$S(4194308,4,q5.bind(null,e,t),n)},useLayoutEffect:function(t,e){return $S(4194308,4,t,e)},useInsertionEffect:function(t,e){return $S(4,2,t,e)},useMemo:function(t,e){var n=Va();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=Va();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=Cue.bind(null,nr,t),[r.memoizedState,t]},useRef:function(t){var e=Va();return t={current:t},e.memoizedState=t},useState:v3,useDebugValue:VO,useDeferredValue:function(t){return Va().memoizedState=t},useTransition:function(){var t=v3(!1),e=t[0];return t=Eue.bind(null,t[1]),Va().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=nr,s=Va();if(Kn){if(n===void 0)throw Error(ke(407));n=n()}else{if(n=e(),Zr===null)throw Error(ke(349));Bh&30||j5(r,e,n)}s.memoizedState=n;var i={value:n,getSnapshot:e};return s.queue=i,y3(z5.bind(null,r,i,t),[t]),r.flags|=2048,Bb(9,F5.bind(null,r,i,n,e),void 0,null),n},useId:function(){var t=Va(),e=Zr.identifierPrefix;if(Kn){var n=Nc,r=Dc;n=(r&~(1<<32-xa(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=Fb++,0<\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=a.createElement(n,{is:r.is}):(t=a.createElement(n),n==="select"&&(a=t,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):t=a.createElementNS(t,n),t[fl]=e,t[Ib]=r,uW(t,e,!1,!1),e.stateNode=t;e:{switch(a=$k(n,r),n){case"dialog":zn("cancel",t),zn("close",t),s=r;break;case"iframe":case"object":case"embed":zn("load",t),s=r;break;case"video":case"audio":for(s=0;sav&&(e.flags|=128,r=!0,hy(i,!1),e.lanes=4194304)}else{if(!r)if(t=WE(a),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),hy(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!Kn)return _s(e),null}else 2*vr()-i.renderingStartTime>av&&n!==1073741824&&(e.flags|=128,r=!0,hy(i,!1),e.lanes=4194304);i.isBackwards?(a.sibling=e.child,e.child=a):(n=i.last,n!==null?n.sibling=a:e.child=a,i.last=a)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=vr(),e.sibling=null,n=tr.current,On(tr,r?n&1|2:n&1),e):(_s(e),null);case 22:case 23:return QO(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?Qi&1073741824&&(_s(e),e.subtreeFlags&6&&(e.flags|=8192)):_s(e),null;case 24:return null;case 25:return null}throw Error(ke(156,e.tag))}function Mue(t,e){switch(DO(e),e.tag){case 1:return Ei(e.type)&&$E(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return iv(),Un(Si),Un(Os),zO(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return FO(e),null;case 13:if(Un(tr),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(ke(340));rv()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Un(tr),null;case 4:return iv(),null;case 10:return LO(e.type._context),null;case 22:case 23:return QO(),null;case 24:return null;default:return null}}var Kx=!1,Ts=!1,Oue=typeof WeakSet=="function"?WeakSet:Set,qe=null;function _m(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ur(t,e,r)}else n.current=null}function uD(t,e,n){try{n()}catch(r){ur(t,e,r)}}var T3=!1;function Lue(t,e){if(Gk=ME,t=v5(),TO(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var a=0,o=-1,c=-1,u=0,f=0,l=t,d=null;t:for(;;){for(var m;l!==n||s!==0&&l.nodeType!==3||(o=a+s),l!==i||r!==0&&l.nodeType!==3||(c=a+r),l.nodeType===3&&(a+=l.nodeValue.length),(m=l.firstChild)!==null;)d=l,l=m;for(;;){if(l===t)break t;if(d===n&&++u===s&&(o=a),d===i&&++f===r&&(c=a),(m=l.nextSibling)!==null)break;l=d,d=l.parentNode}l=m}n=o===-1||c===-1?null:{start:o,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Kk={focusedElem:t,selectionRange:n},ME=!1,qe=e;qe!==null;)if(e=qe,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,qe=t;else for(;qe!==null;){e=qe;try{var p=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var h=p.memoizedProps,y=p.memoizedState,g=e.stateNode,v=g.getSnapshotBeforeUpdate(e.elementType===e.type?h:ea(e.type,h),y);g.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var w=e.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ke(163))}}catch(x){ur(e,e.return,x)}if(t=e.sibling,t!==null){t.return=e.return,qe=t;break}qe=e.return}return p=T3,T3=!1,p}function fb(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&t)===t){var i=s.destroy;s.destroy=void 0,i!==void 0&&uD(e,n,i)}s=s.next}while(s!==r)}}function PC(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function dD(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function hW(t){var e=t.alternate;e!==null&&(t.alternate=null,hW(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[fl],delete e[Ib],delete e[Qk],delete e[vue],delete e[yue])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function pW(t){return t.tag===5||t.tag===3||t.tag===4}function k3(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||pW(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function fD(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=IE));else if(r!==4&&(t=t.child,t!==null))for(fD(t,e,n),t=t.sibling;t!==null;)fD(t,e,n),t=t.sibling}function hD(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(hD(t,e,n),t=t.sibling;t!==null;)hD(t,e,n),t=t.sibling}var ds=null,va=!1;function hu(t,e,n){for(n=n.child;n!==null;)mW(t,e,n),n=n.sibling}function mW(t,e,n){if(vl&&typeof vl.onCommitFiberUnmount=="function")try{vl.onCommitFiberUnmount(wC,n)}catch{}switch(n.tag){case 5:Ts||_m(n,e);case 6:var r=ds,s=va;ds=null,hu(t,e,n),ds=r,va=s,ds!==null&&(va?(t=ds,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):ds.removeChild(n.stateNode));break;case 18:ds!==null&&(va?(t=ds,n=n.stateNode,t.nodeType===8?UP(t.parentNode,n):t.nodeType===1&&UP(t,n),Db(t)):UP(ds,n.stateNode));break;case 4:r=ds,s=va,ds=n.stateNode.containerInfo,va=!0,hu(t,e,n),ds=r,va=s;break;case 0:case 11:case 14:case 15:if(!Ts&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,a=i.destroy;i=i.tag,a!==void 0&&(i&2||i&4)&&uD(n,e,a),s=s.next}while(s!==r)}hu(t,e,n);break;case 1:if(!Ts&&(_m(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(o){ur(n,e,o)}hu(t,e,n);break;case 21:hu(t,e,n);break;case 22:n.mode&1?(Ts=(r=Ts)||n.memoizedState!==null,hu(t,e,n),Ts=r):hu(t,e,n);break;default:hu(t,e,n)}}function D3(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new Oue),e.forEach(function(r){var s=Wue.bind(null,t,r);n.has(r)||(n.add(r),r.then(s,s))})}}function Jo(t,e){var n=e.deletions;if(n!==null)for(var r=0;rs&&(s=a),r&=~i}if(r=s,r=vr()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*$ue(r/1960))-r,10t?16:t,fd===null)var r=!1;else{if(t=fd,fd=null,YE=0,Kt&6)throw Error(ke(331));var s=Kt;for(Kt|=4,qe=t.current;qe!==null;){var i=qe,a=i.child;if(qe.flags&16){var o=i.deletions;if(o!==null){for(var c=0;cvr()-YO?Mh(t,0):KO|=n),Ci(t,e)}function SW(t,e){e===0&&(t.mode&1?(e=Fx,Fx<<=1,!(Fx&130023424)&&(Fx=4194304)):e=1);var n=Xs();t=Hc(t,e),t!==null&&(Q0(t,e,n),Ci(t,n))}function Hue(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),SW(t,n)}function Wue(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,s=t.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(ke(314))}r!==null&&r.delete(e),SW(t,n)}var EW;EW=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||Si.current)yi=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return yi=!1,Due(t,e,n);yi=!!(t.flags&131072)}else yi=!1,Kn&&e.flags&1048576&&P5(e,zE,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;jS(t,e),t=e.pendingProps;var s=nv(e,Os.current);Dm(e,n),s=UO(null,e,r,t,s,n);var i=HO();return e.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Ei(r)?(i=!0,jE(e)):i=!1,e.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,$O(e),s.updater=RC,e.stateNode=s,s._reactInternals=e,rD(e,r,t,n),e=oD(null,e,r,!0,i,n)):(e.tag=0,Kn&&i&&kO(e),Vs(null,e,s,n),e=e.child),e;case 16:r=e.elementType;e:{switch(jS(t,e),t=e.pendingProps,s=r._init,r=s(r._payload),e.type=r,s=e.tag=que(r),t=ea(r,t),s){case 0:e=iD(null,e,r,t,n);break e;case 1:e=A3(null,e,r,t,n);break e;case 11:e=E3(null,e,r,t,n);break e;case 14:e=C3(null,e,r,ea(r.type,t),n);break e}throw Error(ke(306,r,""))}return e;case 0:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:ea(r,s),iD(t,e,r,s,n);case 1:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:ea(r,s),A3(t,e,r,s,n);case 3:e:{if(aW(e),t===null)throw Error(ke(387));r=e.pendingProps,i=e.memoizedState,s=i.element,O5(t,e),HE(e,r,null,n);var a=e.memoizedState;if(r=a.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},e.updateQueue.baseState=i,e.memoizedState=i,e.flags&256){s=ov(Error(ke(423)),e),e=R3(t,e,r,n,s);break e}else if(r!==s){s=ov(Error(ke(424)),e),e=R3(t,e,r,n,s);break e}else for(ro=vd(e.stateNode.containerInfo.firstChild),so=e,Kn=!0,ba=null,n=N5(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(rv(),r===s){e=Wc(t,e,n);break e}Vs(t,e,r,n)}e=e.child}return e;case 5:return L5(e),t===null&&eD(e),r=e.type,s=e.pendingProps,i=t!==null?t.memoizedProps:null,a=s.children,Yk(r,s)?a=null:i!==null&&Yk(r,i)&&(e.flags|=32),oW(t,e),Vs(t,e,a,n),e.child;case 6:return t===null&&eD(e),null;case 13:return lW(t,e,n);case 4:return jO(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=sv(e,null,r,n):Vs(t,e,r,n),e.child;case 11:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:ea(r,s),E3(t,e,r,s,n);case 7:return Vs(t,e,e.pendingProps,n),e.child;case 8:return Vs(t,e,e.pendingProps.children,n),e.child;case 12:return Vs(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,s=e.pendingProps,i=e.memoizedProps,a=s.value,On(BE,r._currentValue),r._currentValue=a,i!==null)if(Aa(i.value,a)){if(i.children===s.children&&!Si.current){e=Wc(t,e,n);break e}}else for(i=e.child,i!==null&&(i.return=e);i!==null;){var o=i.dependencies;if(o!==null){a=i.child;for(var c=o.firstContext;c!==null;){if(c.context===r){if(i.tag===1){c=Mc(-1,n&-n),c.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var f=u.pending;f===null?c.next=c:(c.next=f.next,f.next=c),u.pending=c}}i.lanes|=n,c=i.alternate,c!==null&&(c.lanes|=n),tD(i.return,n,e),o.lanes|=n;break}c=c.next}}else if(i.tag===10)a=i.type===e.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(ke(341));a.lanes|=n,o=a.alternate,o!==null&&(o.lanes|=n),tD(a,n,e),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===e){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}Vs(t,e,s.children,n),e=e.child}return e;case 9:return s=e.type,r=e.pendingProps.children,Dm(e,n),s=zo(s),r=r(s),e.flags|=1,Vs(t,e,r,n),e.child;case 14:return r=e.type,s=ea(r,e.pendingProps),s=ea(r.type,s),C3(t,e,r,s,n);case 15:return sW(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:ea(r,s),jS(t,e),e.tag=1,Ei(r)?(t=!0,jE(e)):t=!1,Dm(e,n),tW(e,r,s),rD(e,r,s,n),oD(null,e,r,!0,t,n);case 19:return cW(t,e,n);case 22:return iW(t,e,n)}throw Error(ke(156,e.tag))};function CW(t,e){return JH(t,e)}function Vue(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,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 Lo(t,e,n,r){return new Vue(t,e,n,r)}function ZO(t){return t=t.prototype,!(!t||!t.isReactComponent)}function que(t){if(typeof t=="function")return ZO(t)?1:0;if(t!=null){if(t=t.$$typeof,t===yO)return 11;if(t===bO)return 14}return 2}function _d(t,e){var n=t.alternate;return n===null?(n=Lo(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function BS(t,e,n,r,s,i){var a=2;if(r=t,typeof t=="function")ZO(t)&&(a=1);else if(typeof t=="string")a=5;else e:switch(t){case fm:return Oh(n.children,s,i,e);case vO:a=8,s|=8;break;case Rk:return t=Lo(12,n,e,s|2),t.elementType=Rk,t.lanes=i,t;case Pk:return t=Lo(13,n,e,s),t.elementType=Pk,t.lanes=i,t;case Tk:return t=Lo(19,n,e,s),t.elementType=Tk,t.lanes=i,t;case LH:return kC(n,s,i,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case MH:a=10;break e;case OH:a=9;break e;case yO:a=11;break e;case bO:a=14;break e;case Au:a=16,r=null;break e}throw Error(ke(130,t==null?t:typeof t,""))}return e=Lo(a,n,e,s),e.elementType=t,e.type=r,e.lanes=i,e}function Oh(t,e,n,r){return t=Lo(7,t,r,e),t.lanes=n,t}function kC(t,e,n,r){return t=Lo(22,t,r,e),t.elementType=LH,t.lanes=n,t.stateNode={isHidden:!1},t}function XP(t,e,n){return t=Lo(6,t,null,e),t.lanes=n,t}function QP(t,e,n){return e=Lo(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function Gue(t,e,n,r,s){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=DP(0),this.expirationTimes=DP(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=DP(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function eL(t,e,n,r,s,i,a,o,c){return t=new Gue(t,e,n,o,c),e===1?(e=1,i===!0&&(e|=8)):e=0,i=Lo(3,null,null,e),t.current=i,i.stateNode=t,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},$O(i),t}function Kue(t,e,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(TW)}catch(t){console.error(t)}}TW(),TH.exports=co;var Ns=TH.exports;const t_=Od(Ns),Zue=vH({__proto__:null,default:t_},[Ns]);var F3=Ns;Ck.createRoot=F3.createRoot,Ck.hydrateRoot=F3.hydrateRoot;const kW=_.createContext({}),ede=({children:t,authActions:e})=>{const n=i=>{var a;try{return Promise.resolve((a=e.login)==null?void 0:a.call(e,i))}catch(o){return console.error(o),Promise.reject(o)}},r=i=>{var a;try{return Promise.resolve((a=e.logout)==null?void 0:a.call(e,i))}catch(o){return console.error(o),Promise.reject(o)}},s=async()=>{var i;try{return Promise.resolve((i=e.check)==null?void 0:i.call(e))}catch(a){return console.error(a),Promise.reject(a)}};return P.jsx(kW.Provider,{value:{...e,login:n,logout:r,check:s},children:t})},DW=()=>{const t=_.useContext(kW);if(t===null)throw new Error("useAuth must be used within a AuthProvider");return t};var _v=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Wh=typeof window>"u"||"Deno"in globalThis;function Ao(){}function tde(t,e){return typeof t=="function"?t(e):t}function yD(t){return typeof t=="number"&&t>=0&&t!==1/0}function NW(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Mm(t,e){return typeof t=="function"?t(e):t}function wa(t,e){return typeof t=="function"?t(e):t}function z3(t,e){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:a,stale:o}=t;if(a){if(r){if(e.queryHash!==sL(a,e.options))return!1}else if(!Hb(e.queryKey,a))return!1}if(n!=="all"){const c=e.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof o=="boolean"&&e.isStale()!==o||s&&s!==e.state.fetchStatus||i&&!i(e))}function B3(t,e){const{exact:n,status:r,predicate:s,mutationKey:i}=t;if(i){if(!e.options.mutationKey)return!1;if(n){if(Vh(e.options.mutationKey)!==Vh(i))return!1}else if(!Hb(e.options.mutationKey,i))return!1}return!(r&&e.state.status!==r||s&&!s(e))}function sL(t,e){return((e==null?void 0:e.queryKeyHashFn)||Vh)(t)}function Vh(t){return JSON.stringify(t,(e,n)=>bD(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function Hb(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(n=>Hb(t[n],e[n])):!1}function MW(t,e){if(t===e)return t;const n=U3(t)&&U3(e);if(n||bD(t)&&bD(e)){const r=n?t:Object.keys(t),s=r.length,i=n?e:Object.keys(e),a=i.length,o=n?[]:{};let c=0;for(let u=0;u{setTimeout(e,t)})}function wD(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?MW(t,e):e}function PHe(t){return t}function rde(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function sde(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var iL=Symbol();function OW(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===iL?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}var kf,Lu,Gm,iH,ide=(iH=class extends _v{constructor(){super();z(this,kf);z(this,Lu);z(this,Gm);$(this,Gm,e=>{if(!Wh&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){C(this,Lu)||this.setEventListener(C(this,Gm))}onUnsubscribe(){var e;this.hasListeners()||((e=C(this,Lu))==null||e.call(this),$(this,Lu,void 0))}setEventListener(e){var n;$(this,Gm,e),(n=C(this,Lu))==null||n.call(this),$(this,Lu,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){C(this,kf)!==e&&($(this,kf,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){var e;return typeof C(this,kf)=="boolean"?C(this,kf):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},kf=new WeakMap,Lu=new WeakMap,Gm=new WeakMap,iH),oL=new ide,Km,Iu,Ym,oH,ode=(oH=class extends _v{constructor(){super();z(this,Km,!0);z(this,Iu);z(this,Ym);$(this,Ym,e=>{if(!Wh&&window.addEventListener){const n=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){C(this,Iu)||this.setEventListener(C(this,Ym))}onUnsubscribe(){var e;this.hasListeners()||((e=C(this,Iu))==null||e.call(this),$(this,Iu,void 0))}setEventListener(e){var n;$(this,Ym,e),(n=C(this,Iu))==null||n.call(this),$(this,Iu,e(this.setOnline.bind(this)))}setOnline(e){C(this,Km)!==e&&($(this,Km,e),this.listeners.forEach(r=>{r(e)}))}isOnline(){return C(this,Km)}},Km=new WeakMap,Iu=new WeakMap,Ym=new WeakMap,oH),ZE=new ode;function _D(){let t,e;const n=new Promise((s,i)=>{t=s,e=i});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),t(s)},n.reject=s=>{r({status:"rejected",reason:s}),e(s)},n}function ade(t){return Math.min(1e3*2**t,3e4)}function LW(t){return(t??"online")==="online"?ZE.isOnline():!0}var IW=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function JP(t){return t instanceof IW}function $W(t){let e=!1,n=0,r=!1,s;const i=_D(),a=h=>{var y;r||(d(new IW(h)),(y=t.abort)==null||y.call(t))},o=()=>{e=!0},c=()=>{e=!1},u=()=>oL.isFocused()&&(t.networkMode==="always"||ZE.isOnline())&&t.canRun(),f=()=>LW(t.networkMode)&&t.canRun(),l=h=>{var y;r||(r=!0,(y=t.onSuccess)==null||y.call(t,h),s==null||s(),i.resolve(h))},d=h=>{var y;r||(r=!0,(y=t.onError)==null||y.call(t,h),s==null||s(),i.reject(h))},m=()=>new Promise(h=>{var y;s=g=>{(r||u())&&h(g)},(y=t.onPause)==null||y.call(t)}).then(()=>{var h;s=void 0,r||(h=t.onContinue)==null||h.call(t)}),p=()=>{if(r)return;let h;const y=n===0?t.initialPromise:void 0;try{h=y??t.fn()}catch(g){h=Promise.reject(g)}Promise.resolve(h).then(l).catch(g=>{var k;if(r)return;const v=t.retry??(Wh?0:3),w=t.retryDelay??ade,x=typeof w=="function"?w(n,g):w,A=v===!0||typeof v=="number"&&nu()?void 0:m()).then(()=>{e?d(g):p()})})};return{promise:i,cancel:a,continue:()=>(s==null||s(),i),cancelRetry:o,continueRetry:c,canStart:f,start:()=>(f()?p():m().then(p),i)}}var lde=t=>setTimeout(t,0);function cde(){let t=[],e=0,n=o=>{o()},r=o=>{o()},s=lde;const i=o=>{e?t.push(o):s(()=>{n(o)})},a=()=>{const o=t;t=[],o.length&&s(()=>{r(()=>{o.forEach(c=>{n(c)})})})};return{batch:o=>{let c;e++;try{c=o()}finally{e--,e||a()}return c},batchCalls:o=>(...c)=>{i(()=>{o(...c)})},schedule:i,setNotifyFunction:o=>{n=o},setBatchNotifyFunction:o=>{r=o},setScheduler:o=>{s=o}}}var Ur=cde(),Df,aH,jW=(aH=class{constructor(){z(this,Df)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),yD(this.gcTime)&&$(this,Df,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Wh?1/0:5*60*1e3))}clearGcTimeout(){C(this,Df)&&(clearTimeout(C(this,Df)),$(this,Df,void 0))}},Df=new WeakMap,aH),Xm,Qm,_o,Nf,Cs,hw,Mf,na,Kl,lH,ude=(lH=class extends jW{constructor(e){super();z(this,na);z(this,Xm);z(this,Qm);z(this,_o);z(this,Nf);z(this,Cs);z(this,hw);z(this,Mf);$(this,Mf,!1),$(this,hw,e.defaultOptions),this.setOptions(e.options),this.observers=[],$(this,Nf,e.client),$(this,_o,C(this,Nf).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,$(this,Xm,dde(this.options)),this.state=e.state??C(this,Xm),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=C(this,Cs))==null?void 0:e.promise}setOptions(e){this.options={...C(this,hw),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&C(this,_o).remove(this)}setData(e,n){const r=wD(this.state.data,e,this.options);return B(this,na,Kl).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(e,n){B(this,na,Kl).call(this,{type:"setState",state:e,setStateOptions:n})}cancel(e){var r,s;const n=(r=C(this,Cs))==null?void 0:r.promise;return(s=C(this,Cs))==null||s.cancel(e),n?n.then(Ao).catch(Ao):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(C(this,Xm))}isActive(){return this.observers.some(e=>wa(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===iL||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(e=0){return this.state.isInvalidated||this.state.data===void 0||!NW(this.state.dataUpdatedAt,e)}onFocus(){var n;const e=this.observers.find(r=>r.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(n=C(this,Cs))==null||n.continue()}onOnline(){var n;const e=this.observers.find(r=>r.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(n=C(this,Cs))==null||n.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),C(this,_o).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(C(this,Cs)&&(C(this,Mf)?C(this,Cs).cancel({revert:!0}):C(this,Cs).cancelRetry()),this.scheduleGc()),C(this,_o).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||B(this,na,Kl).call(this,{type:"invalidate"})}fetch(e,n){var c,u,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(C(this,Cs))return C(this,Cs).continueRetry(),C(this,Cs).promise}if(e&&this.setOptions(e),!this.options.queryFn){const l=this.observers.find(d=>d.options.queryFn);l&&this.setOptions(l.options)}const r=new AbortController,s=l=>{Object.defineProperty(l,"signal",{enumerable:!0,get:()=>($(this,Mf,!0),r.signal)})},i=()=>{const l=OW(this.options,n),d={client:C(this,Nf),queryKey:this.queryKey,meta:this.meta};return s(d),$(this,Mf,!1),this.options.persister?this.options.persister(l,d,this):l(d)},a={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:C(this,Nf),state:this.state,fetchFn:i};s(a),(c=this.options.behavior)==null||c.onFetch(a,this),$(this,Qm,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=a.fetchOptions)==null?void 0:u.meta))&&B(this,na,Kl).call(this,{type:"fetch",meta:(f=a.fetchOptions)==null?void 0:f.meta});const o=l=>{var d,m,p,h;JP(l)&&l.silent||B(this,na,Kl).call(this,{type:"error",error:l}),JP(l)||((m=(d=C(this,_o).config).onError)==null||m.call(d,l,this),(h=(p=C(this,_o).config).onSettled)==null||h.call(p,this.state.data,l,this)),this.scheduleGc()};return $(this,Cs,$W({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:l=>{var d,m,p,h;if(l===void 0){o(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(l)}catch(y){o(y);return}(m=(d=C(this,_o).config).onSuccess)==null||m.call(d,l,this),(h=(p=C(this,_o).config).onSettled)==null||h.call(p,l,this.state.error,this),this.scheduleGc()},onError:o,onFail:(l,d)=>{B(this,na,Kl).call(this,{type:"failed",failureCount:l,error:d})},onPause:()=>{B(this,na,Kl).call(this,{type:"pause"})},onContinue:()=>{B(this,na,Kl).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),C(this,Cs).start()}},Xm=new WeakMap,Qm=new WeakMap,_o=new WeakMap,Nf=new WeakMap,Cs=new WeakMap,hw=new WeakMap,Mf=new WeakMap,na=new WeakSet,Kl=function(e){const n=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...FW(r.data,this.options),fetchMeta:e.meta??null};case"success":return{...r,data:e.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=e.error;return JP(s)&&s.revert&&C(this,Qm)?{...C(this,Qm),fetchStatus:"idle"}:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=n(this.state),Ur.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),C(this,_o).notify({query:this,type:"updated",action:e})})},lH);function FW(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:LW(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function dde(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,r=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,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 qa,cH,fde=(cH=class extends _v{constructor(e={}){super();z(this,qa);this.config=e,$(this,qa,new Map)}build(e,n,r){const s=n.queryKey,i=n.queryHash??sL(s,n);let a=this.get(i);return a||(a=new ude({client:e,queryKey:s,queryHash:i,options:e.defaultQueryOptions(n),state:r,defaultOptions:e.getQueryDefaults(s)}),this.add(a)),a}add(e){C(this,qa).has(e.queryHash)||(C(this,qa).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=C(this,qa).get(e.queryHash);n&&(e.destroy(),n===e&&C(this,qa).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Ur.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return C(this,qa).get(e)}getAll(){return[...C(this,qa).values()]}find(e){const n={exact:!0,...e};return this.getAll().find(r=>z3(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>z3(e,r)):n}notify(e){Ur.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){Ur.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Ur.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},qa=new WeakMap,cH),Ga,Bs,Of,Ka,yu,uH,hde=(uH=class extends jW{constructor(e){super();z(this,Ka);z(this,Ga);z(this,Bs);z(this,Of);this.mutationId=e.mutationId,$(this,Bs,e.mutationCache),$(this,Ga,[]),this.state=e.state||zW(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){C(this,Ga).includes(e)||(C(this,Ga).push(e),this.clearGcTimeout(),C(this,Bs).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){$(this,Ga,C(this,Ga).filter(n=>n!==e)),this.scheduleGc(),C(this,Bs).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){C(this,Ga).length||(this.state.status==="pending"?this.scheduleGc():C(this,Bs).remove(this))}continue(){var e;return((e=C(this,Of))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var s,i,a,o,c,u,f,l,d,m,p,h,y,g,v,w,x,A,k,R;$(this,Of,$W({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(E,T)=>{B(this,Ka,yu).call(this,{type:"failed",failureCount:E,error:T})},onPause:()=>{B(this,Ka,yu).call(this,{type:"pause"})},onContinue:()=>{B(this,Ka,yu).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>C(this,Bs).canRun(this)}));const n=this.state.status==="pending",r=!C(this,Of).canStart();try{if(!n){B(this,Ka,yu).call(this,{type:"pending",variables:e,isPaused:r}),await((i=(s=C(this,Bs).config).onMutate)==null?void 0:i.call(s,e,this));const T=await((o=(a=this.options).onMutate)==null?void 0:o.call(a,e));T!==this.state.context&&B(this,Ka,yu).call(this,{type:"pending",context:T,variables:e,isPaused:r})}const E=await C(this,Of).start();return await((u=(c=C(this,Bs).config).onSuccess)==null?void 0:u.call(c,E,e,this.state.context,this)),await((l=(f=this.options).onSuccess)==null?void 0:l.call(f,E,e,this.state.context)),await((m=(d=C(this,Bs).config).onSettled)==null?void 0:m.call(d,E,null,this.state.variables,this.state.context,this)),await((h=(p=this.options).onSettled)==null?void 0:h.call(p,E,null,e,this.state.context)),B(this,Ka,yu).call(this,{type:"success",data:E}),E}catch(E){try{throw await((g=(y=C(this,Bs).config).onError)==null?void 0:g.call(y,E,e,this.state.context,this)),await((w=(v=this.options).onError)==null?void 0:w.call(v,E,e,this.state.context)),await((A=(x=C(this,Bs).config).onSettled)==null?void 0:A.call(x,void 0,E,this.state.variables,this.state.context,this)),await((R=(k=this.options).onSettled)==null?void 0:R.call(k,void 0,E,e,this.state.context)),E}finally{B(this,Ka,yu).call(this,{type:"error",error:E})}}finally{C(this,Bs).runNext(this)}}},Ga=new WeakMap,Bs=new WeakMap,Of=new WeakMap,Ka=new WeakSet,yu=function(e){const n=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Ur.batch(()=>{C(this,Ga).forEach(r=>{r.onMutationUpdate(e)}),C(this,Bs).notify({mutation:this,type:"updated",action:e})})},uH);function zW(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var sc,ra,pw,dH,pde=(dH=class extends _v{constructor(e={}){super();z(this,sc);z(this,ra);z(this,pw);this.config=e,$(this,sc,new Set),$(this,ra,new Map),$(this,pw,0)}build(e,n,r){const s=new hde({mutationCache:this,mutationId:++bs(this,pw)._,options:e.defaultMutationOptions(n),state:r});return this.add(s),s}add(e){C(this,sc).add(e);const n=Qx(e);if(typeof n=="string"){const r=C(this,ra).get(n);r?r.push(e):C(this,ra).set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(C(this,sc).delete(e)){const n=Qx(e);if(typeof n=="string"){const r=C(this,ra).get(n);if(r)if(r.length>1){const s=r.indexOf(e);s!==-1&&r.splice(s,1)}else r[0]===e&&C(this,ra).delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=Qx(e);if(typeof n=="string"){const r=C(this,ra).get(n),s=r==null?void 0:r.find(i=>i.state.status==="pending");return!s||s===e}else return!0}runNext(e){var r;const n=Qx(e);if(typeof n=="string"){const s=(r=C(this,ra).get(n))==null?void 0:r.find(i=>i!==e&&i.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ur.batch(()=>{C(this,sc).forEach(e=>{this.notify({type:"removed",mutation:e})}),C(this,sc).clear(),C(this,ra).clear()})}getAll(){return Array.from(C(this,sc))}find(e){const n={exact:!0,...e};return this.getAll().find(r=>B3(n,r))}findAll(e={}){return this.getAll().filter(n=>B3(e,n))}notify(e){Ur.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return Ur.batch(()=>Promise.all(e.map(n=>n.continue().catch(Ao))))}},sc=new WeakMap,ra=new WeakMap,pw=new WeakMap,dH);function Qx(t){var e;return(e=t.options.scope)==null?void 0:e.id}function W3(t){return{onFetch:(e,n)=>{var f,l,d,m,p;const r=e.options,s=(d=(l=(f=e.fetchOptions)==null?void 0:f.meta)==null?void 0:l.fetchMore)==null?void 0:d.direction,i=((m=e.state.data)==null?void 0:m.pages)||[],a=((p=e.state.data)==null?void 0:p.pageParams)||[];let o={pages:[],pageParams:[]},c=0;const u=async()=>{let h=!1;const y=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(e.signal.aborted?h=!0:e.signal.addEventListener("abort",()=>{h=!0}),e.signal)})},g=OW(e.options,e.fetchOptions),v=async(w,x,A)=>{if(h)return Promise.reject();if(x==null&&w.pages.length)return Promise.resolve(w);const k={client:e.client,queryKey:e.queryKey,pageParam:x,direction:A?"backward":"forward",meta:e.options.meta};y(k);const R=await g(k),{maxPages:E}=e.options,T=A?sde:rde;return{pages:T(w.pages,R,E),pageParams:T(w.pageParams,x,E)}};if(s&&i.length){const w=s==="backward",x=w?mde:V3,A={pages:i,pageParams:a},k=x(r,A);o=await v(A,k,w)}else{const w=t??i.length;do{const x=c===0?a[0]??r.initialPageParam:V3(r,o);if(c>0&&x==null)break;o=await v(o,x),c++}while(c{var h,y;return(y=(h=e.options).persister)==null?void 0:y.call(h,u,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n)}:e.fetchFn=u}}}function V3(t,{pages:e,pageParams:n}){const r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,n[r],n):void 0}function mde(t,{pages:e,pageParams:n}){var r;return e.length>0?(r=t.getPreviousPageParam)==null?void 0:r.call(t,e[0],e,n[0],n):void 0}var lr,$u,ju,Jm,Zm,Fu,eg,tg,fH,gde=(fH=class{constructor(t={}){z(this,lr);z(this,$u);z(this,ju);z(this,Jm);z(this,Zm);z(this,Fu);z(this,eg);z(this,tg);$(this,lr,t.queryCache||new fde),$(this,$u,t.mutationCache||new pde),$(this,ju,t.defaultOptions||{}),$(this,Jm,new Map),$(this,Zm,new Map),$(this,Fu,0)}mount(){bs(this,Fu)._++,C(this,Fu)===1&&($(this,eg,oL.subscribe(async t=>{t&&(await this.resumePausedMutations(),C(this,lr).onFocus())})),$(this,tg,ZE.subscribe(async t=>{t&&(await this.resumePausedMutations(),C(this,lr).onOnline())})))}unmount(){var t,e;bs(this,Fu)._--,C(this,Fu)===0&&((t=C(this,eg))==null||t.call(this),$(this,eg,void 0),(e=C(this,tg))==null||e.call(this),$(this,tg,void 0))}isFetching(t){return C(this,lr).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return C(this,$u).findAll({...t,status:"pending"}).length}getQueryData(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=C(this,lr).get(e.queryHash))==null?void 0:n.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),n=C(this,lr).build(this,e),r=n.state.data;return r===void 0?this.fetchQuery(t):(t.revalidateIfStale&&n.isStaleByTime(Mm(e.staleTime,n))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(t){return C(this,lr).findAll(t).map(({queryKey:e,state:n})=>{const r=n.data;return[e,r]})}setQueryData(t,e,n){const r=this.defaultQueryOptions({queryKey:t}),s=C(this,lr).get(r.queryHash),i=s==null?void 0:s.state.data,a=tde(e,i);if(a!==void 0)return C(this,lr).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(t,e,n){return Ur.batch(()=>C(this,lr).findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,e,n)]))}getQueryState(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=C(this,lr).get(e.queryHash))==null?void 0:n.state}removeQueries(t){const e=C(this,lr);Ur.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=C(this,lr);return Ur.batch(()=>(n.findAll(t).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const n={revert:!0,...e},r=Ur.batch(()=>C(this,lr).findAll(t).map(s=>s.cancel(n)));return Promise.all(r).then(Ao).catch(Ao)}invalidateQueries(t,e={}){return Ur.batch(()=>(C(this,lr).findAll(t).forEach(n=>{n.invalidate()}),(t==null?void 0:t.refetchType)==="none"?Promise.resolve():this.refetchQueries({...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"},e)))}refetchQueries(t,e={}){const n={...e,cancelRefetch:e.cancelRefetch??!0},r=Ur.batch(()=>C(this,lr).findAll(t).filter(s=>!s.isDisabled()).map(s=>{let i=s.fetch(void 0,n);return n.throwOnError||(i=i.catch(Ao)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Ao)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=C(this,lr).build(this,e);return n.isStaleByTime(Mm(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Ao).catch(Ao)}fetchInfiniteQuery(t){return t.behavior=W3(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Ao).catch(Ao)}ensureInfiniteQueryData(t){return t.behavior=W3(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return ZE.isOnline()?C(this,$u).resumePausedMutations():Promise.resolve()}getQueryCache(){return C(this,lr)}getMutationCache(){return C(this,$u)}getDefaultOptions(){return C(this,ju)}setDefaultOptions(t){$(this,ju,t)}setQueryDefaults(t,e){C(this,Jm).set(Vh(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...C(this,Jm).values()],n={};return e.forEach(r=>{Hb(t,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(t,e){C(this,Zm).set(Vh(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...C(this,Zm).values()],n={};return e.forEach(r=>{Hb(t,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...C(this,ju).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=sL(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===iL&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...C(this,ju).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){C(this,lr).clear(),C(this,$u).clear()}},lr=new WeakMap,$u=new WeakMap,ju=new WeakMap,Jm=new WeakMap,Zm=new WeakMap,Fu=new WeakMap,eg=new WeakMap,tg=new WeakMap,fH),ui,zt,mw,Us,Lf,ng,zu,Ya,gw,rg,sg,If,$f,Bu,ig,on,$y,xD,SD,ED,CD,AD,RD,PD,BW,hH,vde=(hH=class extends _v{constructor(e,n){super();z(this,on);z(this,ui);z(this,zt);z(this,mw);z(this,Us);z(this,Lf);z(this,ng);z(this,zu);z(this,Ya);z(this,gw);z(this,rg);z(this,sg);z(this,If);z(this,$f);z(this,Bu);z(this,ig,new Set);this.options=n,$(this,ui,e),$(this,Ya,null),$(this,zu,_D()),this.options.experimental_prefetchInRender||C(this,zu).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&&(C(this,zt).addObserver(this),q3(C(this,zt),this.options)?B(this,on,$y).call(this):this.updateResult(),B(this,on,CD).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return TD(C(this,zt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return TD(C(this,zt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,B(this,on,AD).call(this),B(this,on,RD).call(this),C(this,zt).removeObserver(this)}setOptions(e){const n=this.options,r=C(this,zt);if(this.options=C(this,ui).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof wa(this.options.enabled,C(this,zt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");B(this,on,PD).call(this),C(this,zt).setOptions(this.options),n._defaulted&&!JE(this.options,n)&&C(this,ui).getQueryCache().notify({type:"observerOptionsUpdated",query:C(this,zt),observer:this});const s=this.hasListeners();s&&G3(C(this,zt),r,this.options,n)&&B(this,on,$y).call(this),this.updateResult(),s&&(C(this,zt)!==r||wa(this.options.enabled,C(this,zt))!==wa(n.enabled,C(this,zt))||Mm(this.options.staleTime,C(this,zt))!==Mm(n.staleTime,C(this,zt)))&&B(this,on,xD).call(this);const i=B(this,on,SD).call(this);s&&(C(this,zt)!==r||wa(this.options.enabled,C(this,zt))!==wa(n.enabled,C(this,zt))||i!==C(this,Bu))&&B(this,on,ED).call(this,i)}getOptimisticResult(e){const n=C(this,ui).getQueryCache().build(C(this,ui),e),r=this.createResult(n,e);return bde(this,r)&&($(this,Us,r),$(this,ng,this.options),$(this,Lf,C(this,zt).state)),r}getCurrentResult(){return C(this,Us)}trackResult(e,n){const r={};return Object.keys(e).forEach(s=>{Object.defineProperty(r,s,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(s),n==null||n(s),e[s])})}),r}trackProp(e){C(this,ig).add(e)}getCurrentQuery(){return C(this,zt)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const n=C(this,ui).defaultQueryOptions(e),r=C(this,ui).getQueryCache().build(C(this,ui),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(e){return B(this,on,$y).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),C(this,Us)))}createResult(e,n){var E;const r=C(this,zt),s=this.options,i=C(this,Us),a=C(this,Lf),o=C(this,ng),u=e!==r?e.state:C(this,mw),{state:f}=e;let l={...f},d=!1,m;if(n._optimisticResults){const T=this.hasListeners(),D=!T&&q3(e,n),M=T&&G3(e,r,n,s);(D||M)&&(l={...l,...FW(f.data,e.options)}),n._optimisticResults==="isRestoring"&&(l.fetchStatus="idle")}let{error:p,errorUpdatedAt:h,status:y}=l;if(n.select&&l.data!==void 0)if(i&&l.data===(a==null?void 0:a.data)&&n.select===C(this,gw))m=C(this,rg);else try{$(this,gw,n.select),m=n.select(l.data),m=wD(i==null?void 0:i.data,m,n),$(this,rg,m),$(this,Ya,null)}catch(T){$(this,Ya,T)}else m=l.data;if(n.placeholderData!==void 0&&m===void 0&&y==="pending"){let T;if(i!=null&&i.isPlaceholderData&&n.placeholderData===(o==null?void 0:o.placeholderData))T=i.data;else if(T=typeof n.placeholderData=="function"?n.placeholderData((E=C(this,sg))==null?void 0:E.state.data,C(this,sg)):n.placeholderData,n.select&&T!==void 0)try{T=n.select(T),$(this,Ya,null)}catch(D){$(this,Ya,D)}T!==void 0&&(y="success",m=wD(i==null?void 0:i.data,T,n),d=!0)}C(this,Ya)&&(p=C(this,Ya),m=C(this,rg),h=Date.now(),y="error");const g=l.fetchStatus==="fetching",v=y==="pending",w=y==="error",x=v&&g,A=m!==void 0,R={status:y,fetchStatus:l.fetchStatus,isPending:v,isSuccess:y==="success",isError:w,isInitialLoading:x,isLoading:x,data:m,dataUpdatedAt:l.dataUpdatedAt,error:p,errorUpdatedAt:h,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:l.dataUpdateCount>0||l.errorUpdateCount>0,isFetchedAfterMount:l.dataUpdateCount>u.dataUpdateCount||l.errorUpdateCount>u.errorUpdateCount,isFetching:g,isRefetching:g&&!v,isLoadingError:w&&!A,isPaused:l.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:w&&A,isStale:aL(e,n),refetch:this.refetch,promise:C(this,zu)};if(this.options.experimental_prefetchInRender){const T=L=>{R.status==="error"?L.reject(R.error):R.data!==void 0&&L.resolve(R.data)},D=()=>{const L=$(this,zu,R.promise=_D());T(L)},M=C(this,zu);switch(M.status){case"pending":e.queryHash===r.queryHash&&T(M);break;case"fulfilled":(R.status==="error"||R.data!==M.value)&&D();break;case"rejected":(R.status!=="error"||R.error!==M.reason)&&D();break}}return R}updateResult(){const e=C(this,Us),n=this.createResult(C(this,zt),this.options);if($(this,Lf,C(this,zt).state),$(this,ng,this.options),C(this,Lf).data!==void 0&&$(this,sg,C(this,zt)),JE(n,e))return;$(this,Us,n);const r=()=>{if(!e)return!0;const{notifyOnChangeProps:s}=this.options,i=typeof s=="function"?s():s;if(i==="all"||!i&&!C(this,ig).size)return!0;const a=new Set(i??C(this,ig));return this.options.throwOnError&&a.add("error"),Object.keys(C(this,Us)).some(o=>{const c=o;return C(this,Us)[c]!==e[c]&&a.has(c)})};B(this,on,BW).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&B(this,on,CD).call(this)}},ui=new WeakMap,zt=new WeakMap,mw=new WeakMap,Us=new WeakMap,Lf=new WeakMap,ng=new WeakMap,zu=new WeakMap,Ya=new WeakMap,gw=new WeakMap,rg=new WeakMap,sg=new WeakMap,If=new WeakMap,$f=new WeakMap,Bu=new WeakMap,ig=new WeakMap,on=new WeakSet,$y=function(e){B(this,on,PD).call(this);let n=C(this,zt).fetch(this.options,e);return e!=null&&e.throwOnError||(n=n.catch(Ao)),n},xD=function(){B(this,on,AD).call(this);const e=Mm(this.options.staleTime,C(this,zt));if(Wh||C(this,Us).isStale||!yD(e))return;const r=NW(C(this,Us).dataUpdatedAt,e)+1;$(this,If,setTimeout(()=>{C(this,Us).isStale||this.updateResult()},r))},SD=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(C(this,zt)):this.options.refetchInterval)??!1},ED=function(e){B(this,on,RD).call(this),$(this,Bu,e),!(Wh||wa(this.options.enabled,C(this,zt))===!1||!yD(C(this,Bu))||C(this,Bu)===0)&&$(this,$f,setInterval(()=>{(this.options.refetchIntervalInBackground||oL.isFocused())&&B(this,on,$y).call(this)},C(this,Bu)))},CD=function(){B(this,on,xD).call(this),B(this,on,ED).call(this,B(this,on,SD).call(this))},AD=function(){C(this,If)&&(clearTimeout(C(this,If)),$(this,If,void 0))},RD=function(){C(this,$f)&&(clearInterval(C(this,$f)),$(this,$f,void 0))},PD=function(){const e=C(this,ui).getQueryCache().build(C(this,ui),this.options);if(e===C(this,zt))return;const n=C(this,zt);$(this,zt,e),$(this,mw,e.state),this.hasListeners()&&(n==null||n.removeObserver(this),e.addObserver(this))},BW=function(e){Ur.batch(()=>{e.listeners&&this.listeners.forEach(n=>{n(C(this,Us))}),C(this,ui).getQueryCache().notify({query:C(this,zt),type:"observerResultsUpdated"})})},hH);function yde(t,e){return wa(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function q3(t,e){return yde(t,e)||t.state.data!==void 0&&TD(t,e,e.refetchOnMount)}function TD(t,e,n){if(wa(e.enabled,t)!==!1){const r=typeof n=="function"?n(t):n;return r==="always"||r!==!1&&aL(t,e)}return!1}function G3(t,e,n,r){return(t!==e||wa(r.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&aL(t,n)}function aL(t,e){return wa(e.enabled,t)!==!1&&t.isStaleByTime(Mm(e.staleTime,t))}function bde(t,e){return!JE(t.getCurrentResult(),e)}var Uu,Hu,di,ic,jc,US,kD,pH,wde=(pH=class extends _v{constructor(n,r){super();z(this,jc);z(this,Uu);z(this,Hu);z(this,di);z(this,ic);$(this,Uu,n),this.setOptions(r),this.bindMethods(),B(this,jc,US).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var s;const r=this.options;this.options=C(this,Uu).defaultMutationOptions(n),JE(this.options,r)||C(this,Uu).getMutationCache().notify({type:"observerOptionsUpdated",mutation:C(this,di),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Vh(r.mutationKey)!==Vh(this.options.mutationKey)?this.reset():((s=C(this,di))==null?void 0:s.state.status)==="pending"&&C(this,di).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=C(this,di))==null||n.removeObserver(this)}onMutationUpdate(n){B(this,jc,US).call(this),B(this,jc,kD).call(this,n)}getCurrentResult(){return C(this,Hu)}reset(){var n;(n=C(this,di))==null||n.removeObserver(this),$(this,di,void 0),B(this,jc,US).call(this),B(this,jc,kD).call(this)}mutate(n,r){var s;return $(this,ic,r),(s=C(this,di))==null||s.removeObserver(this),$(this,di,C(this,Uu).getMutationCache().build(C(this,Uu),this.options)),C(this,di).addObserver(this),C(this,di).execute(n)}},Uu=new WeakMap,Hu=new WeakMap,di=new WeakMap,ic=new WeakMap,jc=new WeakSet,US=function(){var r;const n=((r=C(this,di))==null?void 0:r.state)??zW();$(this,Hu,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},kD=function(n){Ur.batch(()=>{var r,s,i,a,o,c,u,f;if(C(this,ic)&&this.hasListeners()){const l=C(this,Hu).variables,d=C(this,Hu).context;(n==null?void 0:n.type)==="success"?((s=(r=C(this,ic)).onSuccess)==null||s.call(r,n.data,l,d),(a=(i=C(this,ic)).onSettled)==null||a.call(i,n.data,null,l,d)):(n==null?void 0:n.type)==="error"&&((c=(o=C(this,ic)).onError)==null||c.call(o,n.error,l,d),(f=(u=C(this,ic)).onSettled)==null||f.call(u,void 0,n.error,l,d))}this.listeners.forEach(l=>{l(C(this,Hu))})})},pH),UW=_.createContext(void 0),HW=t=>{const e=_.useContext(UW);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},_de=({client:t,children:e})=>(_.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),P.jsx(UW.Provider,{value:t,children:e})),WW=_.createContext(!1),xde=()=>_.useContext(WW);WW.Provider;function Sde(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var Ede=_.createContext(Sde()),Cde=()=>_.useContext(Ede);function VW(t,e){return typeof t=="function"?t(...e):!!t}function DD(){}var Ade=(t,e)=>{(t.suspense||t.throwOnError||t.experimental_prefetchInRender)&&(e.isReset()||(t.retryOnMount=!1))},Rde=t=>{_.useEffect(()=>{t.clearReset()},[t])},Pde=({result:t,errorResetBoundary:e,throwOnError:n,query:r,suspense:s})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&(s&&t.data===void 0||VW(n,[t.error,r])),Tde=t=>{const e=t.staleTime;t.suspense&&(t.staleTime=typeof e=="function"?(...n)=>Math.max(e(...n),1e3):Math.max(e??1e3,1e3),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3)))},kde=(t,e)=>t.isLoading&&t.isFetching&&!e,Dde=(t,e)=>(t==null?void 0:t.suspense)&&e.isPending,K3=(t,e,n)=>e.fetchOptimistic(t).catch(()=>{n.clearReset()});function Nde(t,e,n){var l,d,m,p,h;const r=HW(),s=xde(),i=Cde(),a=r.defaultQueryOptions(t);(d=(l=r.getDefaultOptions().queries)==null?void 0:l._experimental_beforeQuery)==null||d.call(l,a),a._optimisticResults=s?"isRestoring":"optimistic",Tde(a),Ade(a,i),Rde(i);const o=!r.getQueryCache().get(a.queryHash),[c]=_.useState(()=>new e(r,a)),u=c.getOptimisticResult(a),f=!s&&t.subscribed!==!1;if(_.useSyncExternalStore(_.useCallback(y=>{const g=f?c.subscribe(Ur.batchCalls(y)):DD;return c.updateResult(),g},[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),_.useEffect(()=>{c.setOptions(a)},[a,c]),Dde(a,u))throw K3(a,c,i);if(Pde({result:u,errorResetBoundary:i,throwOnError:a.throwOnError,query:r.getQueryCache().get(a.queryHash),suspense:a.suspense}))throw u.error;if((p=(m=r.getDefaultOptions().queries)==null?void 0:m._experimental_afterQuery)==null||p.call(m,a,u),a.experimental_prefetchInRender&&!Wh&&kde(u,s)){const y=o?K3(a,c,i):(h=r.getQueryCache().get(a.queryHash))==null?void 0:h.promise;y==null||y.catch(DD).finally(()=>{c.updateResult()})}return a.notifyOnChangeProps?u:c.trackResult(u)}function qW(t,e){return Nde(t,vde)}function Mde(t,e){const n=HW(),[r]=_.useState(()=>new wde(n,t));_.useEffect(()=>{r.setOptions(t)},[r,t]);const s=_.useSyncExternalStore(_.useCallback(a=>r.subscribe(Ur.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=_.useCallback((a,o)=>{r.mutate(a,o).catch(DD)},[r]);if(s.error&&VW(r.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:i,mutateAsync:s.mutate}}class Uo{constructor(e=[]){He(this,"segments",[]);this.segments=e}key(){return this.segments}get(){return this.segments}}class jd extends Uo{params(e){return new Uo([...this.segments,e])}}class Ode extends Uo{id(e){return new jd([...this.segments,e?String(e):void 0])}}class Lde extends Uo{ids(...e){return new jd([...this.segments,...e.length?[e.map(n=>String(n))]:[]])}}class Ide extends Uo{action(e){if(["one","report"].includes(e))return new Ode([...this.segments,e]);if(e==="many")return new Lde([...this.segments,e]);if(["list","infinite"].includes(e))return new jd([...this.segments,e]);throw new Error("Invalid action type")}}class $de extends Uo{resource(e){return new Ide([...this.segments,e])}mutation(e){return new jd([...e==="custom"?this.segments:[this.segments[0]],e])}}class jde extends Uo{action(e){return new jd([...this.segments,e])}}class Fde extends Uo{action(e){return new jd([...this.segments,e])}}class zde extends Uo{resource(e){return new Fde([...this.segments,e])}}class Bde extends Uo{action(e){return new jd([...this.segments,e])}}class Ude extends Uo{resource(e){return new Bde([...this.segments,e])}action(e){return new jd([...this.segments,e])}}class Hde extends Uo{data(e){return new $de(["data",e||"default"])}auth(){return new jde(["auth"])}access(){return new zde(["access"])}audit(){return new Ude(["audit"])}}const Wde=()=>new Hde([]),GW=()=>Wde,KW=t=>{const e=GW(),{getProfile:n}=DW();return qW({queryKey:e().auth().action("profile").get(),queryFn:n,...t})},Vde=t=>{const e=GW(),{check:n}=DW();return qW({queryKey:e().auth().action("check").get(),queryFn:n,retry:!1,...t})};function qde(t,e){const n=_.createContext(e);function r(i){const{children:a,...o}=i,c=_.useMemo(()=>o,Object.values(o));return P.jsx(n.Provider,{value:c,children:a})}function s(i){const a=_.useContext(n);if(a)return a;if(e!==void 0)return e;throw new Error(`\`${i}\` must be used within \`${t}\``)}return r.displayName=t+"Provider",[r,s]}function Tn(t,e=[]){let n=[];function r(i,a){const o=_.createContext(a),c=n.length;n=[...n,a];function u(l){const{scope:d,children:m,...p}=l,h=(d==null?void 0:d[t][c])||o,y=_.useMemo(()=>p,Object.values(p));return P.jsx(h.Provider,{value:y,children:m})}function f(l,d){const m=(d==null?void 0:d[t][c])||o,p=_.useContext(m);if(p)return p;if(a!==void 0)return a;throw new Error(`\`${l}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,f]}const s=()=>{const i=n.map(a=>_.createContext(a));return function(o){const c=(o==null?void 0:o[t])||i;return _.useMemo(()=>({[`__scope${t}`]:{...o,[t]:c}}),[o,c])}};return s.scopeName=t,[r,Gde(s,...e)]}function Gde(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const a=r.reduce((o,{useScope:c,scopeName:u})=>{const l=c(i)[`__scope${u}`];return{...o,...l}},{});return _.useMemo(()=>({[`__scope${e.scopeName}`]:a}),[a])}};return n.scopeName=e.scopeName,n}function Kde(t,e){typeof t=="function"?t(e):t!=null&&(t.current=e)}function n_(...t){return e=>t.forEach(n=>Kde(n,e))}function tt(...t){return _.useCallback(n_(...t),t)}var Ra=_.forwardRef((t,e)=>{const{children:n,...r}=t,s=_.Children.toArray(n),i=s.find(Yde);if(i){const a=i.props.children,o=s.map(c=>c===i?_.Children.count(a)>1?_.Children.only(null):_.isValidElement(a)?a.props.children:null:c);return P.jsx(ND,{...r,ref:e,children:_.isValidElement(a)?_.cloneElement(a,void 0,o):null})}return P.jsx(ND,{...r,ref:e,children:n})});Ra.displayName="Slot";var ND=_.forwardRef((t,e)=>{const{children:n,...r}=t;if(_.isValidElement(n)){const s=Qde(n);return _.cloneElement(n,{...Xde(r,n.props),ref:e?n_(e,s):s})}return _.Children.count(n)>1?_.Children.only(null):null});ND.displayName="SlotClone";var lL=({children:t})=>P.jsx(P.Fragment,{children:t});function Yde(t){return _.isValidElement(t)&&t.type===lL}function Xde(t,e){const n={...e};for(const r in e){const s=t[r],i=e[r];/^on[A-Z]/.test(r)?s&&i?n[r]=(...o)=>{i(...o),s(...o)}:s&&(n[r]=s):r==="style"?n[r]={...s,...i}:r==="className"&&(n[r]=[s,i].filter(Boolean).join(" "))}return{...t,...n}}function Qde(t){var r,s;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function Xc(t){const e=t+"CollectionProvider",[n,r]=Tn(e),[s,i]=n(e,{collectionRef:{current:null},itemMap:new Map}),a=m=>{const{scope:p,children:h}=m,y=se.useRef(null),g=se.useRef(new Map).current;return P.jsx(s,{scope:p,itemMap:g,collectionRef:y,children:h})};a.displayName=e;const o=t+"CollectionSlot",c=se.forwardRef((m,p)=>{const{scope:h,children:y}=m,g=i(o,h),v=tt(p,g.collectionRef);return P.jsx(Ra,{ref:v,children:y})});c.displayName=o;const u=t+"CollectionItemSlot",f="data-radix-collection-item",l=se.forwardRef((m,p)=>{const{scope:h,children:y,...g}=m,v=se.useRef(null),w=tt(p,v),x=i(u,h);return se.useEffect(()=>(x.itemMap.set(v,{ref:v,...g}),()=>void x.itemMap.delete(v))),P.jsx(Ra,{[f]:"",ref:w,children:y})});l.displayName=u;function d(m){const p=i(t+"CollectionConsumer",m);return se.useCallback(()=>{const y=p.collectionRef.current;if(!y)return[];const g=Array.from(y.querySelectorAll(`[${f}]`));return Array.from(p.itemMap.values()).sort((x,A)=>g.indexOf(x.ref.current)-g.indexOf(A.ref.current))},[p.collectionRef,p.itemMap])}return[{Provider:a,Slot:c,ItemSlot:l},d,r]}function me(t,e,{checkForDefaultPrevented:n=!0}={}){return function(s){if(t==null||t(s),n===!1||!s.defaultPrevented)return e==null?void 0:e(s)}}function Ut(t){const e=_.useRef(t);return _.useEffect(()=>{e.current=t}),_.useMemo(()=>(...n)=>{var r;return(r=e.current)==null?void 0:r.call(e,...n)},[])}function sr({prop:t,defaultProp:e,onChange:n=()=>{}}){const[r,s]=Jde({defaultProp:e,onChange:n}),i=t!==void 0,a=i?t:r,o=Ut(n),c=_.useCallback(u=>{if(i){const l=typeof u=="function"?u(t):u;l!==t&&o(l)}else s(u)},[i,t,s,o]);return[a,c]}function Jde({defaultProp:t,onChange:e}){const n=_.useState(t),[r]=n,s=_.useRef(r),i=Ut(e);return _.useEffect(()=>{s.current!==r&&(i(r),s.current=r)},[r,s,i]),n}var Zde=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],De=Zde.reduce((t,e)=>{const n=_.forwardRef((r,s)=>{const{asChild:i,...a}=r,o=i?Ra:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),P.jsx(o,{...a,ref:s})});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{});function Wb(t,e){t&&Ns.flushSync(()=>t.dispatchEvent(e))}var Ln=globalThis!=null&&globalThis.document?_.useLayoutEffect:()=>{};function efe(t,e){return _.useReducer((n,r)=>e[n][r]??n,t)}var Hn=t=>{const{present:e,children:n}=t,r=tfe(e),s=typeof n=="function"?n({present:r.isPresent}):_.Children.only(n),i=tt(r.ref,nfe(s));return typeof n=="function"||r.isPresent?_.cloneElement(s,{ref:i}):null};Hn.displayName="Presence";function tfe(t){const[e,n]=_.useState(),r=_.useRef({}),s=_.useRef(t),i=_.useRef("none"),a=t?"mounted":"unmounted",[o,c]=efe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return _.useEffect(()=>{const u=Jx(r.current);i.current=o==="mounted"?u:"none"},[o]),Ln(()=>{const u=r.current,f=s.current;if(f!==t){const d=i.current,m=Jx(u);t?c("MOUNT"):m==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(f&&d!==m?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,c]),Ln(()=>{if(e){const u=l=>{const m=Jx(r.current).includes(l.animationName);l.target===e&&m&&Ns.flushSync(()=>c("ANIMATION_END"))},f=l=>{l.target===e&&(i.current=Jx(r.current))};return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",u),e.addEventListener("animationend",u),()=>{e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",u),e.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:_.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Jx(t){return(t==null?void 0:t.animationName)||"none"}function nfe(t){var r,s;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var rfe=X0.useId||(()=>{}),sfe=0;function Vr(t){const[e,n]=_.useState(rfe());return Ln(()=>{n(r=>r??String(sfe++))},[t]),e?`radix-${e}`:""}var cL="Collapsible",[ife,YW]=Tn(cL),[ofe,uL]=ife(cL),XW=_.forwardRef((t,e)=>{const{__scopeCollapsible:n,open:r,defaultOpen:s,disabled:i,onOpenChange:a,...o}=t,[c=!1,u]=sr({prop:r,defaultProp:s,onChange:a});return P.jsx(ofe,{scope:n,disabled:i,contentId:Vr(),open:c,onOpenToggle:_.useCallback(()=>u(f=>!f),[u]),children:P.jsx(De.div,{"data-state":fL(c),"data-disabled":i?"":void 0,...o,ref:e})})});XW.displayName=cL;var QW="CollapsibleTrigger",JW=_.forwardRef((t,e)=>{const{__scopeCollapsible:n,...r}=t,s=uL(QW,n);return P.jsx(De.button,{type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":fL(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...r,ref:e,onClick:me(t.onClick,s.onOpenToggle)})});JW.displayName=QW;var dL="CollapsibleContent",ZW=_.forwardRef((t,e)=>{const{forceMount:n,...r}=t,s=uL(dL,t.__scopeCollapsible);return P.jsx(Hn,{present:n||s.open,children:({present:i})=>P.jsx(afe,{...r,ref:e,present:i})})});ZW.displayName=dL;var afe=_.forwardRef((t,e)=>{const{__scopeCollapsible:n,present:r,children:s,...i}=t,a=uL(dL,n),[o,c]=_.useState(r),u=_.useRef(null),f=tt(e,u),l=_.useRef(0),d=l.current,m=_.useRef(0),p=m.current,h=a.open||o,y=_.useRef(h),g=_.useRef();return _.useEffect(()=>{const v=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(v)},[]),Ln(()=>{const v=u.current;if(v){g.current=g.current||{transitionDuration:v.style.transitionDuration,animationName:v.style.animationName},v.style.transitionDuration="0s",v.style.animationName="none";const w=v.getBoundingClientRect();l.current=w.height,m.current=w.width,y.current||(v.style.transitionDuration=g.current.transitionDuration,v.style.animationName=g.current.animationName),c(r)}},[a.open,r]),P.jsx(De.div,{"data-state":fL(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!h,...i,ref:f,style:{"--radix-collapsible-content-height":d?`${d}px`:void 0,"--radix-collapsible-content-width":p?`${p}px`:void 0,...t.style},children:h&&s})});function fL(t){return t?"open":"closed"}var lfe=XW,cfe=JW,ufe=ZW,dfe=_.createContext(void 0);function Ma(t){const e=_.useContext(dfe);return t||e||"ltr"}var Qc="Accordion",ffe=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[hL,hfe,pfe]=Xc(Qc),[LC,kHe]=Tn(Qc,[pfe,YW]),pL=YW(),mfe=se.forwardRef((t,e)=>{const{type:n,...r}=t,s=r,i=r;return P.jsx(hL.Provider,{scope:t.__scopeAccordion,children:n==="multiple"?P.jsx(bfe,{...i,ref:e}):P.jsx(yfe,{...s,ref:e})})});mfe.displayName=Qc;var[eV,gfe]=LC(Qc),[tV,vfe]=LC(Qc,{collapsible:!1}),yfe=se.forwardRef((t,e)=>{const{value:n,defaultValue:r,onValueChange:s=()=>{},collapsible:i=!1,...a}=t,[o,c]=sr({prop:n,defaultProp:r,onChange:s});return P.jsx(eV,{scope:t.__scopeAccordion,value:o?[o]:[],onItemOpen:c,onItemClose:se.useCallback(()=>i&&c(""),[i,c]),children:P.jsx(tV,{scope:t.__scopeAccordion,collapsible:i,children:P.jsx(nV,{...a,ref:e})})})}),bfe=se.forwardRef((t,e)=>{const{value:n,defaultValue:r,onValueChange:s=()=>{},...i}=t,[a=[],o]=sr({prop:n,defaultProp:r,onChange:s}),c=se.useCallback(f=>o((l=[])=>[...l,f]),[o]),u=se.useCallback(f=>o((l=[])=>l.filter(d=>d!==f)),[o]);return P.jsx(eV,{scope:t.__scopeAccordion,value:a,onItemOpen:c,onItemClose:u,children:P.jsx(tV,{scope:t.__scopeAccordion,collapsible:!0,children:P.jsx(nV,{...i,ref:e})})})}),[wfe,IC]=LC(Qc),nV=se.forwardRef((t,e)=>{const{__scopeAccordion:n,disabled:r,dir:s,orientation:i="vertical",...a}=t,o=se.useRef(null),c=tt(o,e),u=hfe(n),l=Ma(s)==="ltr",d=me(t.onKeyDown,m=>{var E;if(!ffe.includes(m.key))return;const p=m.target,h=u().filter(T=>{var D;return!((D=T.ref.current)!=null&&D.disabled)}),y=h.findIndex(T=>T.ref.current===p),g=h.length;if(y===-1)return;m.preventDefault();let v=y;const w=0,x=g-1,A=()=>{v=y+1,v>x&&(v=w)},k=()=>{v=y-1,v{const{__scopeAccordion:n,value:r,...s}=t,i=IC(e1,n),a=gfe(e1,n),o=pL(n),c=Vr(),u=r&&a.value.includes(r)||!1,f=i.disabled||t.disabled;return P.jsx(_fe,{scope:n,open:u,disabled:f,triggerId:c,children:P.jsx(lfe,{"data-orientation":i.orientation,"data-state":cV(u),...o,...s,ref:e,disabled:f,open:u,onOpenChange:l=>{l?a.onItemOpen(r):a.onItemClose(r)}})})});rV.displayName=e1;var sV="AccordionHeader",iV=se.forwardRef((t,e)=>{const{__scopeAccordion:n,...r}=t,s=IC(Qc,n),i=mL(sV,n);return P.jsx(De.h3,{"data-orientation":s.orientation,"data-state":cV(i.open),"data-disabled":i.disabled?"":void 0,...r,ref:e})});iV.displayName=sV;var MD="AccordionTrigger",oV=se.forwardRef((t,e)=>{const{__scopeAccordion:n,...r}=t,s=IC(Qc,n),i=mL(MD,n),a=vfe(MD,n),o=pL(n);return P.jsx(hL.ItemSlot,{scope:n,children:P.jsx(cfe,{"aria-disabled":i.open&&!a.collapsible||void 0,"data-orientation":s.orientation,id:i.triggerId,...o,...r,ref:e})})});oV.displayName=MD;var aV="AccordionContent",lV=se.forwardRef((t,e)=>{const{__scopeAccordion:n,...r}=t,s=IC(Qc,n),i=mL(aV,n),a=pL(n);return P.jsx(ufe,{role:"region","aria-labelledby":i.triggerId,"data-orientation":s.orientation,...a,...r,ref:e,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...t.style}})});lV.displayName=aV;function cV(t){return t?"open":"closed"}var xfe=rV,Sfe=iV,uV=oV,dV=lV;/** +`+i.stack}return{value:t,source:e,stack:s,digest:null}}function KP(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function sD(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var kue=typeof WeakMap=="function"?WeakMap:Map;function nW(t,e,n){n=Mc(-1,n),n.tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){KE||(KE=!0,pD=r),sD(t,e)},n}function rW(t,e,n){n=Mc(-1,n),n.tag=3;var r=t.type.getDerivedStateFromError;if(typeof r=="function"){var s=e.value;n.payload=function(){return r(s)},n.callback=function(){sD(t,e)}}var i=t.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){sD(t,e),typeof r!="function"&&(bd===null?bd=new Set([this]):bd.add(this));var a=e.stack;this.componentDidCatch(e.value,{componentStack:a!==null?a:""})}),n}function _3(t,e,n){var r=t.pingCache;if(r===null){r=t.pingCache=new kue;var s=new Set;r.set(e,s)}else s=r.get(e),s===void 0&&(s=new Set,r.set(e,s));s.has(n)||(s.add(n),t=Wue.bind(null,t,e,n),e.then(t,t))}function x3(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function S3(t,e,n,r,s){return t.mode&1?(t.flags|=65536,t.lanes=s,t):(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(e=Mc(-1,1),e.tag=2,yd(n,e,1))),n.lanes|=1),t)}var Due=Yc.ReactCurrentOwner,yi=!1;function Vs(t,e,n,r){e.child=t===null?N5(e,null,n,r):sv(e,t.child,n,r)}function E3(t,e,n,r,s){n=n.render;var i=e.ref;return Dm(e,s),r=UO(t,e,n,r,i,s),n=HO(),t!==null&&!yi?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,Wc(t,e,s)):(Kn&&n&&kO(e),e.flags|=1,Vs(t,e,r,s),e.child)}function C3(t,e,n,r,s){if(t===null){var i=n.type;return typeof i=="function"&&!ZO(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=i,sW(t,e,i,r,s)):(t=BS(n.type,null,r,e,e.mode,s),t.ref=e.ref,t.return=e,e.child=t)}if(i=t.child,!(t.lanes&s)){var a=i.memoizedProps;if(n=n.compare,n=n!==null?n:Mb,n(a,r)&&t.ref===e.ref)return Wc(t,e,s)}return e.flags|=1,t=_d(i,r),t.ref=e.ref,t.return=e,e.child=t}function sW(t,e,n,r,s){if(t!==null){var i=t.memoizedProps;if(Mb(i,r)&&t.ref===e.ref)if(yi=!1,e.pendingProps=r=i,(t.lanes&s)!==0)t.flags&131072&&(yi=!0);else return e.lanes=t.lanes,Wc(t,e,s)}return iD(t,e,n,r,s)}function iW(t,e,n){var r=e.pendingProps,s=r.children,i=t!==null?t.memoizedState:null;if(r.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},On(xm,Qi),Qi|=n;else{if(!(n&1073741824))return t=i!==null?i.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,On(xm,Qi),Qi|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,On(xm,Qi),Qi|=r}else i!==null?(r=i.baseLanes|n,e.memoizedState=null):r=n,On(xm,Qi),Qi|=r;return Vs(t,e,s,n),e.child}function oW(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}function iD(t,e,n,r,s){var i=Ei(n)?Fh:Os.current;return i=nv(e,i),Dm(e,s),n=UO(t,e,n,r,i,s),r=HO(),t!==null&&!yi?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~s,Wc(t,e,s)):(Kn&&r&&kO(e),e.flags|=1,Vs(t,e,n,s),e.child)}function A3(t,e,n,r,s){if(Ei(n)){var i=!0;jE(e)}else i=!1;if(Dm(e,s),e.stateNode===null)jS(t,e),tW(e,n,r),rD(e,n,r,s),r=!0;else if(t===null){var a=e.stateNode,o=e.memoizedProps;a.props=o;var c=a.context,u=n.contextType;typeof u=="object"&&u!==null?u=zo(u):(u=Ei(n)?Fh:Os.current,u=nv(e,u));var f=n.getDerivedStateFromProps,l=typeof f=="function"||typeof a.getSnapshotBeforeUpdate=="function";l||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==r||c!==u)&&w3(e,a,r,u),Ru=!1;var d=e.memoizedState;a.state=d,HE(e,r,a,s),c=e.memoizedState,o!==r||d!==c||Si.current||Ru?(typeof f=="function"&&(nD(e,n,f,r),c=e.memoizedState),(o=Ru||b3(e,n,o,r,d,c,u))?(l||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(e.flags|=4194308)):(typeof a.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=c),a.props=r,a.state=c,a.context=u,r=o):(typeof a.componentDidMount=="function"&&(e.flags|=4194308),r=!1)}else{a=e.stateNode,O5(t,e),o=e.memoizedProps,u=e.type===e.elementType?o:ea(e.type,o),a.props=u,l=e.pendingProps,d=a.context,c=n.contextType,typeof c=="object"&&c!==null?c=zo(c):(c=Ei(n)?Fh:Os.current,c=nv(e,c));var m=n.getDerivedStateFromProps;(f=typeof m=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==l||d!==c)&&w3(e,a,r,c),Ru=!1,d=e.memoizedState,a.state=d,HE(e,r,a,s);var p=e.memoizedState;o!==l||d!==p||Si.current||Ru?(typeof m=="function"&&(nD(e,n,m,r),p=e.memoizedState),(u=Ru||b3(e,n,u,r,d,p,c)||!1)?(f||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate=="function"&&(e.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof a.componentDidUpdate!="function"||o===t.memoizedProps&&d===t.memoizedState||(e.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===t.memoizedProps&&d===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!="function"||o===t.memoizedProps&&d===t.memoizedState||(e.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===t.memoizedProps&&d===t.memoizedState||(e.flags|=1024),r=!1)}return oD(t,e,n,r,i,s)}function oD(t,e,n,r,s,i){oW(t,e);var a=(e.flags&128)!==0;if(!r&&!a)return s&&d3(e,n,!1),Wc(t,e,i);r=e.stateNode,Due.current=e;var o=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return e.flags|=1,t!==null&&a?(e.child=sv(e,t.child,null,i),e.child=sv(e,null,o,i)):Vs(t,e,o,i),e.memoizedState=r.state,s&&d3(e,n,!0),e.child}function aW(t){var e=t.stateNode;e.pendingContext?u3(t,e.pendingContext,e.pendingContext!==e.context):e.context&&u3(t,e.context,!1),jO(t,e.containerInfo)}function R3(t,e,n,r,s){return rv(),NO(s),e.flags|=256,Vs(t,e,n,r),e.child}var aD={dehydrated:null,treeContext:null,retryLane:0};function lD(t){return{baseLanes:t,cachePool:null,transitions:null}}function lW(t,e,n){var r=e.pendingProps,s=tr.current,i=!1,a=(e.flags&128)!==0,o;if((o=a)||(o=t!==null&&t.memoizedState===null?!1:(s&2)!==0),o?(i=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(s|=1),On(tr,s&1),t===null)return eD(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(a=r.children,t=r.fallback,i?(r=e.mode,i=e.child,a={mode:"hidden",children:a},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=a):i=k1(a,r,0,null),t=Oh(t,r,n,null),i.return=e,t.return=e,i.sibling=t,e.child=i,e.child.memoizedState=lD(n),e.memoizedState=aD,t):qO(e,a));if(s=t.memoizedState,s!==null&&(o=s.dehydrated,o!==null))return Nue(t,e,a,r,o,s,n);if(i){i=r.fallback,a=e.mode,s=t.child,o=s.sibling;var c={mode:"hidden",children:r.children};return!(a&1)&&e.child!==s?(r=e.child,r.childLanes=0,r.pendingProps=c,e.deletions=null):(r=_d(s,c),r.subtreeFlags=s.subtreeFlags&14680064),o!==null?i=_d(o,i):(i=Oh(i,a,n,null),i.flags|=2),i.return=e,r.return=e,r.sibling=i,e.child=r,r=i,i=e.child,a=t.child.memoizedState,a=a===null?lD(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},i.memoizedState=a,i.childLanes=t.childLanes&~n,e.memoizedState=aD,r}return i=t.child,t=i.sibling,r=_d(i,{mode:"visible",children:r.children}),!(e.mode&1)&&(r.lanes=n),r.return=e,r.sibling=null,t!==null&&(n=e.deletions,n===null?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=r,e.memoizedState=null,r}function qO(t,e){return e=k1({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function Gx(t,e,n,r){return r!==null&&NO(r),sv(e,t.child,null,n),t=qO(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function Nue(t,e,n,r,s,i,a){if(n)return e.flags&256?(e.flags&=-257,r=KP(Error(ke(422))),Gx(t,e,a,r)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(i=r.fallback,s=e.mode,r=k1({mode:"visible",children:r.children},s,0,null),i=Oh(i,s,a,null),i.flags|=2,r.return=e,i.return=e,r.sibling=i,e.child=r,e.mode&1&&sv(e,t.child,null,a),e.child.memoizedState=lD(a),e.memoizedState=aD,i);if(!(e.mode&1))return Gx(t,e,a,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var o=r.dgst;return r=o,i=Error(ke(419)),r=KP(i,r,void 0),Gx(t,e,a,r)}if(o=(a&t.childLanes)!==0,yi||o){if(r=Zr,r!==null){switch(a&-a){case 4:s=2;break;case 16:s=8;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|a)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,Hc(t,s),Sa(r,t,s,-1))}return JO(),r=KP(Error(ke(421))),Gx(t,e,a,r)}return s.data==="$?"?(e.flags|=128,e.child=t.child,e=Vue.bind(null,t),s._reactRetry=e,null):(t=i.treeContext,ro=vd(s.nextSibling),so=e,Kn=!0,ba=null,t!==null&&(ko[Do++]=Dc,ko[Do++]=Nc,ko[Do++]=zh,Dc=t.id,Nc=t.overflow,zh=e),e=qO(e,r.children),e.flags|=4096,e)}function P3(t,e,n){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),tD(t.return,e,n)}function YP(t,e,n,r,s){var i=t.memoizedState;i===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(i.isBackwards=e,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=s)}function cW(t,e,n){var r=e.pendingProps,s=r.revealOrder,i=r.tail;if(Vs(t,e,r.children,n),r=tr.current,r&2)r=r&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&P3(t,n,e);else if(t.tag===19)P3(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(On(tr,r),!(e.mode&1))e.memoizedState=null;else switch(s){case"forwards":for(n=e.child,s=null;n!==null;)t=n.alternate,t!==null&&WE(t)===null&&(s=n),n=n.sibling;n=s,n===null?(s=e.child,e.child=null):(s=n.sibling,n.sibling=null),YP(e,!1,s,n,i);break;case"backwards":for(n=null,s=e.child,e.child=null;s!==null;){if(t=s.alternate,t!==null&&WE(t)===null){e.child=s;break}t=s.sibling,s.sibling=n,n=s,s=t}YP(e,!0,n,null,i);break;case"together":YP(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function jS(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}function Wc(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),Uh|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(ke(153));if(e.child!==null){for(t=e.child,n=_d(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=_d(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function Mue(t,e,n){switch(e.tag){case 3:aW(e),rv();break;case 5:L5(e);break;case 1:Ei(e.type)&&jE(e);break;case 4:jO(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,s=e.memoizedProps.value;On(BE,r._currentValue),r._currentValue=s;break;case 13:if(r=e.memoizedState,r!==null)return r.dehydrated!==null?(On(tr,tr.current&1),e.flags|=128,null):n&e.child.childLanes?lW(t,e,n):(On(tr,tr.current&1),t=Wc(t,e,n),t!==null?t.sibling:null);On(tr,tr.current&1);break;case 19:if(r=(n&e.childLanes)!==0,t.flags&128){if(r)return cW(t,e,n);e.flags|=128}if(s=e.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),On(tr,tr.current),r)break;return null;case 22:case 23:return e.lanes=0,iW(t,e,n)}return Wc(t,e,n)}var uW,cD,dW,fW;uW=function(t,e){for(var n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};cD=function(){};dW=function(t,e,n,r){var s=t.memoizedProps;if(s!==r){t=e.stateNode,Ef(yl.current);var i=null;switch(n){case"input":s=Dk(t,s),r=Dk(t,r),i=[];break;case"select":s=rr({},s,{value:void 0}),r=rr({},r,{value:void 0}),i=[];break;case"textarea":s=Ok(t,s),r=Ok(t,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(t.onclick=IE)}Ik(n,r);var a;n=null;for(u in s)if(!r.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var o=s[u];for(a in o)o.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Ab.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var c=r[u];if(o=s!=null?s[u]:void 0,r.hasOwnProperty(u)&&c!==o&&(c!=null||o!=null))if(u==="style")if(o){for(a in o)!o.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in c)c.hasOwnProperty(a)&&o[a]!==c[a]&&(n||(n={}),n[a]=c[a])}else n||(i||(i=[]),i.push(u,n)),n=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,o=o?o.__html:void 0,c!=null&&o!==c&&(i=i||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(i=i||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Ab.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&zn("scroll",t),i||o===c||(i=[])):(i=i||[]).push(u,c))}n&&(i=i||[]).push("style",n);var u=i;(e.updateQueue=u)&&(e.flags|=4)}};fW=function(t,e,n,r){n!==r&&(e.flags|=4)};function hy(t,e){if(!Kn)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null}}function _s(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,r=0;if(e)for(var s=t.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=t,s=s.sibling;else for(s=t.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=t,s=s.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}function Oue(t,e,n){var r=e.pendingProps;switch(DO(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return _s(e),null;case 1:return Ei(e.type)&&$E(),_s(e),null;case 3:return r=e.stateNode,iv(),Un(Si),Un(Os),zO(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&(Vx(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,ba!==null&&(vD(ba),ba=null))),cD(t,e),_s(e),null;case 5:FO(e);var s=Ef(jb.current);if(n=e.type,t!==null&&e.stateNode!=null)dW(t,e,n,r,s),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(e.stateNode===null)throw Error(ke(166));return _s(e),null}if(t=Ef(yl.current),Vx(e)){r=e.stateNode,n=e.type;var i=e.memoizedProps;switch(r[fl]=e,r[Ib]=i,t=(e.mode&1)!==0,n){case"dialog":zn("cancel",r),zn("close",r);break;case"iframe":case"object":case"embed":zn("load",r);break;case"video":case"audio":for(s=0;s<\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=a.createElement(n,{is:r.is}):(t=a.createElement(n),n==="select"&&(a=t,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):t=a.createElementNS(t,n),t[fl]=e,t[Ib]=r,uW(t,e,!1,!1),e.stateNode=t;e:{switch(a=$k(n,r),n){case"dialog":zn("cancel",t),zn("close",t),s=r;break;case"iframe":case"object":case"embed":zn("load",t),s=r;break;case"video":case"audio":for(s=0;sav&&(e.flags|=128,r=!0,hy(i,!1),e.lanes=4194304)}else{if(!r)if(t=WE(a),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),hy(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!Kn)return _s(e),null}else 2*vr()-i.renderingStartTime>av&&n!==1073741824&&(e.flags|=128,r=!0,hy(i,!1),e.lanes=4194304);i.isBackwards?(a.sibling=e.child,e.child=a):(n=i.last,n!==null?n.sibling=a:e.child=a,i.last=a)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=vr(),e.sibling=null,n=tr.current,On(tr,r?n&1|2:n&1),e):(_s(e),null);case 22:case 23:return QO(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?Qi&1073741824&&(_s(e),e.subtreeFlags&6&&(e.flags|=8192)):_s(e),null;case 24:return null;case 25:return null}throw Error(ke(156,e.tag))}function Lue(t,e){switch(DO(e),e.tag){case 1:return Ei(e.type)&&$E(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return iv(),Un(Si),Un(Os),zO(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return FO(e),null;case 13:if(Un(tr),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(ke(340));rv()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Un(tr),null;case 4:return iv(),null;case 10:return LO(e.type._context),null;case 22:case 23:return QO(),null;case 24:return null;default:return null}}var Kx=!1,Ts=!1,Iue=typeof WeakSet=="function"?WeakSet:Set,qe=null;function _m(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ur(t,e,r)}else n.current=null}function uD(t,e,n){try{n()}catch(r){ur(t,e,r)}}var T3=!1;function $ue(t,e){if(Gk=ME,t=v5(),TO(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var a=0,o=-1,c=-1,u=0,f=0,l=t,d=null;t:for(;;){for(var m;l!==n||s!==0&&l.nodeType!==3||(o=a+s),l!==i||r!==0&&l.nodeType!==3||(c=a+r),l.nodeType===3&&(a+=l.nodeValue.length),(m=l.firstChild)!==null;)d=l,l=m;for(;;){if(l===t)break t;if(d===n&&++u===s&&(o=a),d===i&&++f===r&&(c=a),(m=l.nextSibling)!==null)break;l=d,d=l.parentNode}l=m}n=o===-1||c===-1?null:{start:o,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Kk={focusedElem:t,selectionRange:n},ME=!1,qe=e;qe!==null;)if(e=qe,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,qe=t;else for(;qe!==null;){e=qe;try{var p=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(p!==null){var h=p.memoizedProps,y=p.memoizedState,g=e.stateNode,v=g.getSnapshotBeforeUpdate(e.elementType===e.type?h:ea(e.type,h),y);g.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var w=e.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ke(163))}}catch(x){ur(e,e.return,x)}if(t=e.sibling,t!==null){t.return=e.return,qe=t;break}qe=e.return}return p=T3,T3=!1,p}function fb(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&t)===t){var i=s.destroy;s.destroy=void 0,i!==void 0&&uD(e,n,i)}s=s.next}while(s!==r)}}function P1(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function dD(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function hW(t){var e=t.alternate;e!==null&&(t.alternate=null,hW(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[fl],delete e[Ib],delete e[Qk],delete e[bue],delete e[wue])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function pW(t){return t.tag===5||t.tag===3||t.tag===4}function k3(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||pW(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function fD(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=IE));else if(r!==4&&(t=t.child,t!==null))for(fD(t,e,n),t=t.sibling;t!==null;)fD(t,e,n),t=t.sibling}function hD(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(hD(t,e,n),t=t.sibling;t!==null;)hD(t,e,n),t=t.sibling}var ds=null,va=!1;function hu(t,e,n){for(n=n.child;n!==null;)mW(t,e,n),n=n.sibling}function mW(t,e,n){if(vl&&typeof vl.onCommitFiberUnmount=="function")try{vl.onCommitFiberUnmount(w1,n)}catch{}switch(n.tag){case 5:Ts||_m(n,e);case 6:var r=ds,s=va;ds=null,hu(t,e,n),ds=r,va=s,ds!==null&&(va?(t=ds,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):ds.removeChild(n.stateNode));break;case 18:ds!==null&&(va?(t=ds,n=n.stateNode,t.nodeType===8?UP(t.parentNode,n):t.nodeType===1&&UP(t,n),Db(t)):UP(ds,n.stateNode));break;case 4:r=ds,s=va,ds=n.stateNode.containerInfo,va=!0,hu(t,e,n),ds=r,va=s;break;case 0:case 11:case 14:case 15:if(!Ts&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,a=i.destroy;i=i.tag,a!==void 0&&(i&2||i&4)&&uD(n,e,a),s=s.next}while(s!==r)}hu(t,e,n);break;case 1:if(!Ts&&(_m(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(o){ur(n,e,o)}hu(t,e,n);break;case 21:hu(t,e,n);break;case 22:n.mode&1?(Ts=(r=Ts)||n.memoizedState!==null,hu(t,e,n),Ts=r):hu(t,e,n);break;default:hu(t,e,n)}}function D3(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new Iue),e.forEach(function(r){var s=que.bind(null,t,r);n.has(r)||(n.add(r),r.then(s,s))})}}function Jo(t,e){var n=e.deletions;if(n!==null)for(var r=0;rs&&(s=a),r&=~i}if(r=s,r=vr()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Fue(r/1960))-r,10t?16:t,fd===null)var r=!1;else{if(t=fd,fd=null,YE=0,Kt&6)throw Error(ke(331));var s=Kt;for(Kt|=4,qe=t.current;qe!==null;){var i=qe,a=i.child;if(qe.flags&16){var o=i.deletions;if(o!==null){for(var c=0;cvr()-YO?Mh(t,0):KO|=n),Ci(t,e)}function SW(t,e){e===0&&(t.mode&1?(e=Fx,Fx<<=1,!(Fx&130023424)&&(Fx=4194304)):e=1);var n=Xs();t=Hc(t,e),t!==null&&(Q_(t,e,n),Ci(t,n))}function Vue(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),SW(t,n)}function que(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,s=t.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(ke(314))}r!==null&&r.delete(e),SW(t,n)}var EW;EW=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||Si.current)yi=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return yi=!1,Mue(t,e,n);yi=!!(t.flags&131072)}else yi=!1,Kn&&e.flags&1048576&&P5(e,zE,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;jS(t,e),t=e.pendingProps;var s=nv(e,Os.current);Dm(e,n),s=UO(null,e,r,t,s,n);var i=HO();return e.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Ei(r)?(i=!0,jE(e)):i=!1,e.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,$O(e),s.updater=R1,e.stateNode=s,s._reactInternals=e,rD(e,r,t,n),e=oD(null,e,r,!0,i,n)):(e.tag=0,Kn&&i&&kO(e),Vs(null,e,s,n),e=e.child),e;case 16:r=e.elementType;e:{switch(jS(t,e),t=e.pendingProps,s=r._init,r=s(r._payload),e.type=r,s=e.tag=Kue(r),t=ea(r,t),s){case 0:e=iD(null,e,r,t,n);break e;case 1:e=A3(null,e,r,t,n);break e;case 11:e=E3(null,e,r,t,n);break e;case 14:e=C3(null,e,r,ea(r.type,t),n);break e}throw Error(ke(306,r,""))}return e;case 0:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:ea(r,s),iD(t,e,r,s,n);case 1:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:ea(r,s),A3(t,e,r,s,n);case 3:e:{if(aW(e),t===null)throw Error(ke(387));r=e.pendingProps,i=e.memoizedState,s=i.element,O5(t,e),HE(e,r,null,n);var a=e.memoizedState;if(r=a.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},e.updateQueue.baseState=i,e.memoizedState=i,e.flags&256){s=ov(Error(ke(423)),e),e=R3(t,e,r,n,s);break e}else if(r!==s){s=ov(Error(ke(424)),e),e=R3(t,e,r,n,s);break e}else for(ro=vd(e.stateNode.containerInfo.firstChild),so=e,Kn=!0,ba=null,n=N5(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(rv(),r===s){e=Wc(t,e,n);break e}Vs(t,e,r,n)}e=e.child}return e;case 5:return L5(e),t===null&&eD(e),r=e.type,s=e.pendingProps,i=t!==null?t.memoizedProps:null,a=s.children,Yk(r,s)?a=null:i!==null&&Yk(r,i)&&(e.flags|=32),oW(t,e),Vs(t,e,a,n),e.child;case 6:return t===null&&eD(e),null;case 13:return lW(t,e,n);case 4:return jO(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=sv(e,null,r,n):Vs(t,e,r,n),e.child;case 11:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:ea(r,s),E3(t,e,r,s,n);case 7:return Vs(t,e,e.pendingProps,n),e.child;case 8:return Vs(t,e,e.pendingProps.children,n),e.child;case 12:return Vs(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,s=e.pendingProps,i=e.memoizedProps,a=s.value,On(BE,r._currentValue),r._currentValue=a,i!==null)if(Aa(i.value,a)){if(i.children===s.children&&!Si.current){e=Wc(t,e,n);break e}}else for(i=e.child,i!==null&&(i.return=e);i!==null;){var o=i.dependencies;if(o!==null){a=i.child;for(var c=o.firstContext;c!==null;){if(c.context===r){if(i.tag===1){c=Mc(-1,n&-n),c.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var f=u.pending;f===null?c.next=c:(c.next=f.next,f.next=c),u.pending=c}}i.lanes|=n,c=i.alternate,c!==null&&(c.lanes|=n),tD(i.return,n,e),o.lanes|=n;break}c=c.next}}else if(i.tag===10)a=i.type===e.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(ke(341));a.lanes|=n,o=a.alternate,o!==null&&(o.lanes|=n),tD(a,n,e),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===e){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}Vs(t,e,s.children,n),e=e.child}return e;case 9:return s=e.type,r=e.pendingProps.children,Dm(e,n),s=zo(s),r=r(s),e.flags|=1,Vs(t,e,r,n),e.child;case 14:return r=e.type,s=ea(r,e.pendingProps),s=ea(r.type,s),C3(t,e,r,s,n);case 15:return sW(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,s=e.pendingProps,s=e.elementType===r?s:ea(r,s),jS(t,e),e.tag=1,Ei(r)?(t=!0,jE(e)):t=!1,Dm(e,n),tW(e,r,s),rD(e,r,s,n),oD(null,e,r,!0,t,n);case 19:return cW(t,e,n);case 22:return iW(t,e,n)}throw Error(ke(156,e.tag))};function CW(t,e){return JH(t,e)}function Gue(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,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 Lo(t,e,n,r){return new Gue(t,e,n,r)}function ZO(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Kue(t){if(typeof t=="function")return ZO(t)?1:0;if(t!=null){if(t=t.$$typeof,t===yO)return 11;if(t===bO)return 14}return 2}function _d(t,e){var n=t.alternate;return n===null?(n=Lo(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function BS(t,e,n,r,s,i){var a=2;if(r=t,typeof t=="function")ZO(t)&&(a=1);else if(typeof t=="string")a=5;else e:switch(t){case fm:return Oh(n.children,s,i,e);case vO:a=8,s|=8;break;case Rk:return t=Lo(12,n,e,s|2),t.elementType=Rk,t.lanes=i,t;case Pk:return t=Lo(13,n,e,s),t.elementType=Pk,t.lanes=i,t;case Tk:return t=Lo(19,n,e,s),t.elementType=Tk,t.lanes=i,t;case LH:return k1(n,s,i,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case MH:a=10;break e;case OH:a=9;break e;case yO:a=11;break e;case bO:a=14;break e;case Au:a=16,r=null;break e}throw Error(ke(130,t==null?t:typeof t,""))}return e=Lo(a,n,e,s),e.elementType=t,e.type=r,e.lanes=i,e}function Oh(t,e,n,r){return t=Lo(7,t,r,e),t.lanes=n,t}function k1(t,e,n,r){return t=Lo(22,t,r,e),t.elementType=LH,t.lanes=n,t.stateNode={isHidden:!1},t}function XP(t,e,n){return t=Lo(6,t,null,e),t.lanes=n,t}function QP(t,e,n){return e=Lo(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function Yue(t,e,n,r,s){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=DP(0),this.expirationTimes=DP(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=DP(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function eL(t,e,n,r,s,i,a,o,c){return t=new Yue(t,e,n,o,c),e===1?(e=1,i===!0&&(e|=8)):e=0,i=Lo(3,null,null,e),t.current=i,i.stateNode=t,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},$O(i),t}function Xue(t,e,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(TW)}catch(t){console.error(t)}}TW(),TH.exports=co;var Ns=TH.exports;const t0=Od(Ns),tde=vH({__proto__:null,default:t0},[Ns]);var F3=Ns;Ck.createRoot=F3.createRoot,Ck.hydrateRoot=F3.hydrateRoot;const kW=_.createContext({}),nde=({children:t,authActions:e})=>{const n=i=>{var a;try{return Promise.resolve((a=e.login)==null?void 0:a.call(e,i))}catch(o){return console.error(o),Promise.reject(o)}},r=i=>{var a;try{return Promise.resolve((a=e.logout)==null?void 0:a.call(e,i))}catch(o){return console.error(o),Promise.reject(o)}},s=async()=>{var i;try{return Promise.resolve((i=e.check)==null?void 0:i.call(e))}catch(a){return console.error(a),Promise.reject(a)}};return P.jsx(kW.Provider,{value:{...e,login:n,logout:r,check:s},children:t})},DW=()=>{const t=_.useContext(kW);if(t===null)throw new Error("useAuth must be used within a AuthProvider");return t};var _v=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Wh=typeof window>"u"||"Deno"in globalThis;function Ao(){}function rde(t,e){return typeof t=="function"?t(e):t}function yD(t){return typeof t=="number"&&t>=0&&t!==1/0}function NW(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Mm(t,e){return typeof t=="function"?t(e):t}function wa(t,e){return typeof t=="function"?t(e):t}function z3(t,e){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:a,stale:o}=t;if(a){if(r){if(e.queryHash!==sL(a,e.options))return!1}else if(!Hb(e.queryKey,a))return!1}if(n!=="all"){const c=e.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof o=="boolean"&&e.isStale()!==o||s&&s!==e.state.fetchStatus||i&&!i(e))}function B3(t,e){const{exact:n,status:r,predicate:s,mutationKey:i}=t;if(i){if(!e.options.mutationKey)return!1;if(n){if(Vh(e.options.mutationKey)!==Vh(i))return!1}else if(!Hb(e.options.mutationKey,i))return!1}return!(r&&e.state.status!==r||s&&!s(e))}function sL(t,e){return((e==null?void 0:e.queryKeyHashFn)||Vh)(t)}function Vh(t){return JSON.stringify(t,(e,n)=>bD(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function Hb(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(n=>Hb(t[n],e[n])):!1}function MW(t,e){if(t===e)return t;const n=U3(t)&&U3(e);if(n||bD(t)&&bD(e)){const r=n?t:Object.keys(t),s=r.length,i=n?e:Object.keys(e),a=i.length,o=n?[]:{};let c=0;for(let u=0;u{setTimeout(e,t)})}function wD(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?MW(t,e):e}function kHe(t){return t}function ide(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function ode(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var iL=Symbol();function OW(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===iL?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}var kf,Lu,Gm,iH,ade=(iH=class extends _v{constructor(){super();z(this,kf);z(this,Lu);z(this,Gm);$(this,Gm,e=>{if(!Wh&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){C(this,Lu)||this.setEventListener(C(this,Gm))}onUnsubscribe(){var e;this.hasListeners()||((e=C(this,Lu))==null||e.call(this),$(this,Lu,void 0))}setEventListener(e){var n;$(this,Gm,e),(n=C(this,Lu))==null||n.call(this),$(this,Lu,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){C(this,kf)!==e&&($(this,kf,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){var e;return typeof C(this,kf)=="boolean"?C(this,kf):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},kf=new WeakMap,Lu=new WeakMap,Gm=new WeakMap,iH),oL=new ade,Km,Iu,Ym,oH,lde=(oH=class extends _v{constructor(){super();z(this,Km,!0);z(this,Iu);z(this,Ym);$(this,Ym,e=>{if(!Wh&&window.addEventListener){const n=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){C(this,Iu)||this.setEventListener(C(this,Ym))}onUnsubscribe(){var e;this.hasListeners()||((e=C(this,Iu))==null||e.call(this),$(this,Iu,void 0))}setEventListener(e){var n;$(this,Ym,e),(n=C(this,Iu))==null||n.call(this),$(this,Iu,e(this.setOnline.bind(this)))}setOnline(e){C(this,Km)!==e&&($(this,Km,e),this.listeners.forEach(r=>{r(e)}))}isOnline(){return C(this,Km)}},Km=new WeakMap,Iu=new WeakMap,Ym=new WeakMap,oH),ZE=new lde;function _D(){let t,e;const n=new Promise((s,i)=>{t=s,e=i});n.status="pending",n.catch(()=>{});function r(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{r({status:"fulfilled",value:s}),t(s)},n.reject=s=>{r({status:"rejected",reason:s}),e(s)},n}function cde(t){return Math.min(1e3*2**t,3e4)}function LW(t){return(t??"online")==="online"?ZE.isOnline():!0}var IW=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function JP(t){return t instanceof IW}function $W(t){let e=!1,n=0,r=!1,s;const i=_D(),a=h=>{var y;r||(d(new IW(h)),(y=t.abort)==null||y.call(t))},o=()=>{e=!0},c=()=>{e=!1},u=()=>oL.isFocused()&&(t.networkMode==="always"||ZE.isOnline())&&t.canRun(),f=()=>LW(t.networkMode)&&t.canRun(),l=h=>{var y;r||(r=!0,(y=t.onSuccess)==null||y.call(t,h),s==null||s(),i.resolve(h))},d=h=>{var y;r||(r=!0,(y=t.onError)==null||y.call(t,h),s==null||s(),i.reject(h))},m=()=>new Promise(h=>{var y;s=g=>{(r||u())&&h(g)},(y=t.onPause)==null||y.call(t)}).then(()=>{var h;s=void 0,r||(h=t.onContinue)==null||h.call(t)}),p=()=>{if(r)return;let h;const y=n===0?t.initialPromise:void 0;try{h=y??t.fn()}catch(g){h=Promise.reject(g)}Promise.resolve(h).then(l).catch(g=>{var k;if(r)return;const v=t.retry??(Wh?0:3),w=t.retryDelay??cde,x=typeof w=="function"?w(n,g):w,A=v===!0||typeof v=="number"&&nu()?void 0:m()).then(()=>{e?d(g):p()})})};return{promise:i,cancel:a,continue:()=>(s==null||s(),i),cancelRetry:o,continueRetry:c,canStart:f,start:()=>(f()?p():m().then(p),i)}}var ude=t=>setTimeout(t,0);function dde(){let t=[],e=0,n=o=>{o()},r=o=>{o()},s=ude;const i=o=>{e?t.push(o):s(()=>{n(o)})},a=()=>{const o=t;t=[],o.length&&s(()=>{r(()=>{o.forEach(c=>{n(c)})})})};return{batch:o=>{let c;e++;try{c=o()}finally{e--,e||a()}return c},batchCalls:o=>(...c)=>{i(()=>{o(...c)})},schedule:i,setNotifyFunction:o=>{n=o},setBatchNotifyFunction:o=>{r=o},setScheduler:o=>{s=o}}}var Ur=dde(),Df,aH,jW=(aH=class{constructor(){z(this,Df)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),yD(this.gcTime)&&$(this,Df,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Wh?1/0:5*60*1e3))}clearGcTimeout(){C(this,Df)&&(clearTimeout(C(this,Df)),$(this,Df,void 0))}},Df=new WeakMap,aH),Xm,Qm,_o,Nf,Cs,hw,Mf,na,Kl,lH,fde=(lH=class extends jW{constructor(e){super();z(this,na);z(this,Xm);z(this,Qm);z(this,_o);z(this,Nf);z(this,Cs);z(this,hw);z(this,Mf);$(this,Mf,!1),$(this,hw,e.defaultOptions),this.setOptions(e.options),this.observers=[],$(this,Nf,e.client),$(this,_o,C(this,Nf).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,$(this,Xm,hde(this.options)),this.state=e.state??C(this,Xm),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=C(this,Cs))==null?void 0:e.promise}setOptions(e){this.options={...C(this,hw),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&C(this,_o).remove(this)}setData(e,n){const r=wD(this.state.data,e,this.options);return B(this,na,Kl).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(e,n){B(this,na,Kl).call(this,{type:"setState",state:e,setStateOptions:n})}cancel(e){var r,s;const n=(r=C(this,Cs))==null?void 0:r.promise;return(s=C(this,Cs))==null||s.cancel(e),n?n.then(Ao).catch(Ao):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(C(this,Xm))}isActive(){return this.observers.some(e=>wa(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===iL||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(e=0){return this.state.isInvalidated||this.state.data===void 0||!NW(this.state.dataUpdatedAt,e)}onFocus(){var n;const e=this.observers.find(r=>r.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(n=C(this,Cs))==null||n.continue()}onOnline(){var n;const e=this.observers.find(r=>r.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(n=C(this,Cs))==null||n.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),C(this,_o).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(C(this,Cs)&&(C(this,Mf)?C(this,Cs).cancel({revert:!0}):C(this,Cs).cancelRetry()),this.scheduleGc()),C(this,_o).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||B(this,na,Kl).call(this,{type:"invalidate"})}fetch(e,n){var c,u,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(C(this,Cs))return C(this,Cs).continueRetry(),C(this,Cs).promise}if(e&&this.setOptions(e),!this.options.queryFn){const l=this.observers.find(d=>d.options.queryFn);l&&this.setOptions(l.options)}const r=new AbortController,s=l=>{Object.defineProperty(l,"signal",{enumerable:!0,get:()=>($(this,Mf,!0),r.signal)})},i=()=>{const l=OW(this.options,n),d={client:C(this,Nf),queryKey:this.queryKey,meta:this.meta};return s(d),$(this,Mf,!1),this.options.persister?this.options.persister(l,d,this):l(d)},a={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:C(this,Nf),state:this.state,fetchFn:i};s(a),(c=this.options.behavior)==null||c.onFetch(a,this),$(this,Qm,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=a.fetchOptions)==null?void 0:u.meta))&&B(this,na,Kl).call(this,{type:"fetch",meta:(f=a.fetchOptions)==null?void 0:f.meta});const o=l=>{var d,m,p,h;JP(l)&&l.silent||B(this,na,Kl).call(this,{type:"error",error:l}),JP(l)||((m=(d=C(this,_o).config).onError)==null||m.call(d,l,this),(h=(p=C(this,_o).config).onSettled)==null||h.call(p,this.state.data,l,this)),this.scheduleGc()};return $(this,Cs,$W({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:l=>{var d,m,p,h;if(l===void 0){o(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(l)}catch(y){o(y);return}(m=(d=C(this,_o).config).onSuccess)==null||m.call(d,l,this),(h=(p=C(this,_o).config).onSettled)==null||h.call(p,l,this.state.error,this),this.scheduleGc()},onError:o,onFail:(l,d)=>{B(this,na,Kl).call(this,{type:"failed",failureCount:l,error:d})},onPause:()=>{B(this,na,Kl).call(this,{type:"pause"})},onContinue:()=>{B(this,na,Kl).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),C(this,Cs).start()}},Xm=new WeakMap,Qm=new WeakMap,_o=new WeakMap,Nf=new WeakMap,Cs=new WeakMap,hw=new WeakMap,Mf=new WeakMap,na=new WeakSet,Kl=function(e){const n=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...FW(r.data,this.options),fetchMeta:e.meta??null};case"success":return{...r,data:e.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=e.error;return JP(s)&&s.revert&&C(this,Qm)?{...C(this,Qm),fetchStatus:"idle"}:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=n(this.state),Ur.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),C(this,_o).notify({query:this,type:"updated",action:e})})},lH);function FW(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:LW(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function hde(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,r=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,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 qa,cH,pde=(cH=class extends _v{constructor(e={}){super();z(this,qa);this.config=e,$(this,qa,new Map)}build(e,n,r){const s=n.queryKey,i=n.queryHash??sL(s,n);let a=this.get(i);return a||(a=new fde({client:e,queryKey:s,queryHash:i,options:e.defaultQueryOptions(n),state:r,defaultOptions:e.getQueryDefaults(s)}),this.add(a)),a}add(e){C(this,qa).has(e.queryHash)||(C(this,qa).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=C(this,qa).get(e.queryHash);n&&(e.destroy(),n===e&&C(this,qa).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Ur.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return C(this,qa).get(e)}getAll(){return[...C(this,qa).values()]}find(e){const n={exact:!0,...e};return this.getAll().find(r=>z3(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>z3(e,r)):n}notify(e){Ur.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){Ur.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Ur.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},qa=new WeakMap,cH),Ga,Bs,Of,Ka,yu,uH,mde=(uH=class extends jW{constructor(e){super();z(this,Ka);z(this,Ga);z(this,Bs);z(this,Of);this.mutationId=e.mutationId,$(this,Bs,e.mutationCache),$(this,Ga,[]),this.state=e.state||zW(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){C(this,Ga).includes(e)||(C(this,Ga).push(e),this.clearGcTimeout(),C(this,Bs).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){$(this,Ga,C(this,Ga).filter(n=>n!==e)),this.scheduleGc(),C(this,Bs).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){C(this,Ga).length||(this.state.status==="pending"?this.scheduleGc():C(this,Bs).remove(this))}continue(){var e;return((e=C(this,Of))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var s,i,a,o,c,u,f,l,d,m,p,h,y,g,v,w,x,A,k,R;$(this,Of,$W({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(E,T)=>{B(this,Ka,yu).call(this,{type:"failed",failureCount:E,error:T})},onPause:()=>{B(this,Ka,yu).call(this,{type:"pause"})},onContinue:()=>{B(this,Ka,yu).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>C(this,Bs).canRun(this)}));const n=this.state.status==="pending",r=!C(this,Of).canStart();try{if(!n){B(this,Ka,yu).call(this,{type:"pending",variables:e,isPaused:r}),await((i=(s=C(this,Bs).config).onMutate)==null?void 0:i.call(s,e,this));const T=await((o=(a=this.options).onMutate)==null?void 0:o.call(a,e));T!==this.state.context&&B(this,Ka,yu).call(this,{type:"pending",context:T,variables:e,isPaused:r})}const E=await C(this,Of).start();return await((u=(c=C(this,Bs).config).onSuccess)==null?void 0:u.call(c,E,e,this.state.context,this)),await((l=(f=this.options).onSuccess)==null?void 0:l.call(f,E,e,this.state.context)),await((m=(d=C(this,Bs).config).onSettled)==null?void 0:m.call(d,E,null,this.state.variables,this.state.context,this)),await((h=(p=this.options).onSettled)==null?void 0:h.call(p,E,null,e,this.state.context)),B(this,Ka,yu).call(this,{type:"success",data:E}),E}catch(E){try{throw await((g=(y=C(this,Bs).config).onError)==null?void 0:g.call(y,E,e,this.state.context,this)),await((w=(v=this.options).onError)==null?void 0:w.call(v,E,e,this.state.context)),await((A=(x=C(this,Bs).config).onSettled)==null?void 0:A.call(x,void 0,E,this.state.variables,this.state.context,this)),await((R=(k=this.options).onSettled)==null?void 0:R.call(k,void 0,E,e,this.state.context)),E}finally{B(this,Ka,yu).call(this,{type:"error",error:E})}}finally{C(this,Bs).runNext(this)}}},Ga=new WeakMap,Bs=new WeakMap,Of=new WeakMap,Ka=new WeakSet,yu=function(e){const n=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Ur.batch(()=>{C(this,Ga).forEach(r=>{r.onMutationUpdate(e)}),C(this,Bs).notify({mutation:this,type:"updated",action:e})})},uH);function zW(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var sc,ra,pw,dH,gde=(dH=class extends _v{constructor(e={}){super();z(this,sc);z(this,ra);z(this,pw);this.config=e,$(this,sc,new Set),$(this,ra,new Map),$(this,pw,0)}build(e,n,r){const s=new mde({mutationCache:this,mutationId:++bs(this,pw)._,options:e.defaultMutationOptions(n),state:r});return this.add(s),s}add(e){C(this,sc).add(e);const n=Qx(e);if(typeof n=="string"){const r=C(this,ra).get(n);r?r.push(e):C(this,ra).set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(C(this,sc).delete(e)){const n=Qx(e);if(typeof n=="string"){const r=C(this,ra).get(n);if(r)if(r.length>1){const s=r.indexOf(e);s!==-1&&r.splice(s,1)}else r[0]===e&&C(this,ra).delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=Qx(e);if(typeof n=="string"){const r=C(this,ra).get(n),s=r==null?void 0:r.find(i=>i.state.status==="pending");return!s||s===e}else return!0}runNext(e){var r;const n=Qx(e);if(typeof n=="string"){const s=(r=C(this,ra).get(n))==null?void 0:r.find(i=>i!==e&&i.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Ur.batch(()=>{C(this,sc).forEach(e=>{this.notify({type:"removed",mutation:e})}),C(this,sc).clear(),C(this,ra).clear()})}getAll(){return Array.from(C(this,sc))}find(e){const n={exact:!0,...e};return this.getAll().find(r=>B3(n,r))}findAll(e={}){return this.getAll().filter(n=>B3(e,n))}notify(e){Ur.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return Ur.batch(()=>Promise.all(e.map(n=>n.continue().catch(Ao))))}},sc=new WeakMap,ra=new WeakMap,pw=new WeakMap,dH);function Qx(t){var e;return(e=t.options.scope)==null?void 0:e.id}function W3(t){return{onFetch:(e,n)=>{var f,l,d,m,p;const r=e.options,s=(d=(l=(f=e.fetchOptions)==null?void 0:f.meta)==null?void 0:l.fetchMore)==null?void 0:d.direction,i=((m=e.state.data)==null?void 0:m.pages)||[],a=((p=e.state.data)==null?void 0:p.pageParams)||[];let o={pages:[],pageParams:[]},c=0;const u=async()=>{let h=!1;const y=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(e.signal.aborted?h=!0:e.signal.addEventListener("abort",()=>{h=!0}),e.signal)})},g=OW(e.options,e.fetchOptions),v=async(w,x,A)=>{if(h)return Promise.reject();if(x==null&&w.pages.length)return Promise.resolve(w);const k={client:e.client,queryKey:e.queryKey,pageParam:x,direction:A?"backward":"forward",meta:e.options.meta};y(k);const R=await g(k),{maxPages:E}=e.options,T=A?ode:ide;return{pages:T(w.pages,R,E),pageParams:T(w.pageParams,x,E)}};if(s&&i.length){const w=s==="backward",x=w?vde:V3,A={pages:i,pageParams:a},k=x(r,A);o=await v(A,k,w)}else{const w=t??i.length;do{const x=c===0?a[0]??r.initialPageParam:V3(r,o);if(c>0&&x==null)break;o=await v(o,x),c++}while(c{var h,y;return(y=(h=e.options).persister)==null?void 0:y.call(h,u,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n)}:e.fetchFn=u}}}function V3(t,{pages:e,pageParams:n}){const r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,n[r],n):void 0}function vde(t,{pages:e,pageParams:n}){var r;return e.length>0?(r=t.getPreviousPageParam)==null?void 0:r.call(t,e[0],e,n[0],n):void 0}var lr,$u,ju,Jm,Zm,Fu,eg,tg,fH,yde=(fH=class{constructor(t={}){z(this,lr);z(this,$u);z(this,ju);z(this,Jm);z(this,Zm);z(this,Fu);z(this,eg);z(this,tg);$(this,lr,t.queryCache||new pde),$(this,$u,t.mutationCache||new gde),$(this,ju,t.defaultOptions||{}),$(this,Jm,new Map),$(this,Zm,new Map),$(this,Fu,0)}mount(){bs(this,Fu)._++,C(this,Fu)===1&&($(this,eg,oL.subscribe(async t=>{t&&(await this.resumePausedMutations(),C(this,lr).onFocus())})),$(this,tg,ZE.subscribe(async t=>{t&&(await this.resumePausedMutations(),C(this,lr).onOnline())})))}unmount(){var t,e;bs(this,Fu)._--,C(this,Fu)===0&&((t=C(this,eg))==null||t.call(this),$(this,eg,void 0),(e=C(this,tg))==null||e.call(this),$(this,tg,void 0))}isFetching(t){return C(this,lr).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return C(this,$u).findAll({...t,status:"pending"}).length}getQueryData(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=C(this,lr).get(e.queryHash))==null?void 0:n.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),n=C(this,lr).build(this,e),r=n.state.data;return r===void 0?this.fetchQuery(t):(t.revalidateIfStale&&n.isStaleByTime(Mm(e.staleTime,n))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(t){return C(this,lr).findAll(t).map(({queryKey:e,state:n})=>{const r=n.data;return[e,r]})}setQueryData(t,e,n){const r=this.defaultQueryOptions({queryKey:t}),s=C(this,lr).get(r.queryHash),i=s==null?void 0:s.state.data,a=rde(e,i);if(a!==void 0)return C(this,lr).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(t,e,n){return Ur.batch(()=>C(this,lr).findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,e,n)]))}getQueryState(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=C(this,lr).get(e.queryHash))==null?void 0:n.state}removeQueries(t){const e=C(this,lr);Ur.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=C(this,lr);return Ur.batch(()=>(n.findAll(t).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const n={revert:!0,...e},r=Ur.batch(()=>C(this,lr).findAll(t).map(s=>s.cancel(n)));return Promise.all(r).then(Ao).catch(Ao)}invalidateQueries(t,e={}){return Ur.batch(()=>(C(this,lr).findAll(t).forEach(n=>{n.invalidate()}),(t==null?void 0:t.refetchType)==="none"?Promise.resolve():this.refetchQueries({...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"},e)))}refetchQueries(t,e={}){const n={...e,cancelRefetch:e.cancelRefetch??!0},r=Ur.batch(()=>C(this,lr).findAll(t).filter(s=>!s.isDisabled()).map(s=>{let i=s.fetch(void 0,n);return n.throwOnError||(i=i.catch(Ao)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Ao)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=C(this,lr).build(this,e);return n.isStaleByTime(Mm(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Ao).catch(Ao)}fetchInfiniteQuery(t){return t.behavior=W3(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Ao).catch(Ao)}ensureInfiniteQueryData(t){return t.behavior=W3(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return ZE.isOnline()?C(this,$u).resumePausedMutations():Promise.resolve()}getQueryCache(){return C(this,lr)}getMutationCache(){return C(this,$u)}getDefaultOptions(){return C(this,ju)}setDefaultOptions(t){$(this,ju,t)}setQueryDefaults(t,e){C(this,Jm).set(Vh(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...C(this,Jm).values()],n={};return e.forEach(r=>{Hb(t,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(t,e){C(this,Zm).set(Vh(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...C(this,Zm).values()],n={};return e.forEach(r=>{Hb(t,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...C(this,ju).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=sL(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===iL&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...C(this,ju).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){C(this,lr).clear(),C(this,$u).clear()}},lr=new WeakMap,$u=new WeakMap,ju=new WeakMap,Jm=new WeakMap,Zm=new WeakMap,Fu=new WeakMap,eg=new WeakMap,tg=new WeakMap,fH),ui,zt,mw,Us,Lf,ng,zu,Ya,gw,rg,sg,If,$f,Bu,ig,on,$y,xD,SD,ED,CD,AD,RD,PD,BW,hH,bde=(hH=class extends _v{constructor(e,n){super();z(this,on);z(this,ui);z(this,zt);z(this,mw);z(this,Us);z(this,Lf);z(this,ng);z(this,zu);z(this,Ya);z(this,gw);z(this,rg);z(this,sg);z(this,If);z(this,$f);z(this,Bu);z(this,ig,new Set);this.options=n,$(this,ui,e),$(this,Ya,null),$(this,zu,_D()),this.options.experimental_prefetchInRender||C(this,zu).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&&(C(this,zt).addObserver(this),q3(C(this,zt),this.options)?B(this,on,$y).call(this):this.updateResult(),B(this,on,CD).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return TD(C(this,zt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return TD(C(this,zt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,B(this,on,AD).call(this),B(this,on,RD).call(this),C(this,zt).removeObserver(this)}setOptions(e){const n=this.options,r=C(this,zt);if(this.options=C(this,ui).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof wa(this.options.enabled,C(this,zt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");B(this,on,PD).call(this),C(this,zt).setOptions(this.options),n._defaulted&&!JE(this.options,n)&&C(this,ui).getQueryCache().notify({type:"observerOptionsUpdated",query:C(this,zt),observer:this});const s=this.hasListeners();s&&G3(C(this,zt),r,this.options,n)&&B(this,on,$y).call(this),this.updateResult(),s&&(C(this,zt)!==r||wa(this.options.enabled,C(this,zt))!==wa(n.enabled,C(this,zt))||Mm(this.options.staleTime,C(this,zt))!==Mm(n.staleTime,C(this,zt)))&&B(this,on,xD).call(this);const i=B(this,on,SD).call(this);s&&(C(this,zt)!==r||wa(this.options.enabled,C(this,zt))!==wa(n.enabled,C(this,zt))||i!==C(this,Bu))&&B(this,on,ED).call(this,i)}getOptimisticResult(e){const n=C(this,ui).getQueryCache().build(C(this,ui),e),r=this.createResult(n,e);return _de(this,r)&&($(this,Us,r),$(this,ng,this.options),$(this,Lf,C(this,zt).state)),r}getCurrentResult(){return C(this,Us)}trackResult(e,n){const r={};return Object.keys(e).forEach(s=>{Object.defineProperty(r,s,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(s),n==null||n(s),e[s])})}),r}trackProp(e){C(this,ig).add(e)}getCurrentQuery(){return C(this,zt)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const n=C(this,ui).defaultQueryOptions(e),r=C(this,ui).getQueryCache().build(C(this,ui),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(e){return B(this,on,$y).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),C(this,Us)))}createResult(e,n){var E;const r=C(this,zt),s=this.options,i=C(this,Us),a=C(this,Lf),o=C(this,ng),u=e!==r?e.state:C(this,mw),{state:f}=e;let l={...f},d=!1,m;if(n._optimisticResults){const T=this.hasListeners(),D=!T&&q3(e,n),M=T&&G3(e,r,n,s);(D||M)&&(l={...l,...FW(f.data,e.options)}),n._optimisticResults==="isRestoring"&&(l.fetchStatus="idle")}let{error:p,errorUpdatedAt:h,status:y}=l;if(n.select&&l.data!==void 0)if(i&&l.data===(a==null?void 0:a.data)&&n.select===C(this,gw))m=C(this,rg);else try{$(this,gw,n.select),m=n.select(l.data),m=wD(i==null?void 0:i.data,m,n),$(this,rg,m),$(this,Ya,null)}catch(T){$(this,Ya,T)}else m=l.data;if(n.placeholderData!==void 0&&m===void 0&&y==="pending"){let T;if(i!=null&&i.isPlaceholderData&&n.placeholderData===(o==null?void 0:o.placeholderData))T=i.data;else if(T=typeof n.placeholderData=="function"?n.placeholderData((E=C(this,sg))==null?void 0:E.state.data,C(this,sg)):n.placeholderData,n.select&&T!==void 0)try{T=n.select(T),$(this,Ya,null)}catch(D){$(this,Ya,D)}T!==void 0&&(y="success",m=wD(i==null?void 0:i.data,T,n),d=!0)}C(this,Ya)&&(p=C(this,Ya),m=C(this,rg),h=Date.now(),y="error");const g=l.fetchStatus==="fetching",v=y==="pending",w=y==="error",x=v&&g,A=m!==void 0,R={status:y,fetchStatus:l.fetchStatus,isPending:v,isSuccess:y==="success",isError:w,isInitialLoading:x,isLoading:x,data:m,dataUpdatedAt:l.dataUpdatedAt,error:p,errorUpdatedAt:h,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:l.dataUpdateCount>0||l.errorUpdateCount>0,isFetchedAfterMount:l.dataUpdateCount>u.dataUpdateCount||l.errorUpdateCount>u.errorUpdateCount,isFetching:g,isRefetching:g&&!v,isLoadingError:w&&!A,isPaused:l.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:w&&A,isStale:aL(e,n),refetch:this.refetch,promise:C(this,zu)};if(this.options.experimental_prefetchInRender){const T=L=>{R.status==="error"?L.reject(R.error):R.data!==void 0&&L.resolve(R.data)},D=()=>{const L=$(this,zu,R.promise=_D());T(L)},M=C(this,zu);switch(M.status){case"pending":e.queryHash===r.queryHash&&T(M);break;case"fulfilled":(R.status==="error"||R.data!==M.value)&&D();break;case"rejected":(R.status!=="error"||R.error!==M.reason)&&D();break}}return R}updateResult(){const e=C(this,Us),n=this.createResult(C(this,zt),this.options);if($(this,Lf,C(this,zt).state),$(this,ng,this.options),C(this,Lf).data!==void 0&&$(this,sg,C(this,zt)),JE(n,e))return;$(this,Us,n);const r=()=>{if(!e)return!0;const{notifyOnChangeProps:s}=this.options,i=typeof s=="function"?s():s;if(i==="all"||!i&&!C(this,ig).size)return!0;const a=new Set(i??C(this,ig));return this.options.throwOnError&&a.add("error"),Object.keys(C(this,Us)).some(o=>{const c=o;return C(this,Us)[c]!==e[c]&&a.has(c)})};B(this,on,BW).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&B(this,on,CD).call(this)}},ui=new WeakMap,zt=new WeakMap,mw=new WeakMap,Us=new WeakMap,Lf=new WeakMap,ng=new WeakMap,zu=new WeakMap,Ya=new WeakMap,gw=new WeakMap,rg=new WeakMap,sg=new WeakMap,If=new WeakMap,$f=new WeakMap,Bu=new WeakMap,ig=new WeakMap,on=new WeakSet,$y=function(e){B(this,on,PD).call(this);let n=C(this,zt).fetch(this.options,e);return e!=null&&e.throwOnError||(n=n.catch(Ao)),n},xD=function(){B(this,on,AD).call(this);const e=Mm(this.options.staleTime,C(this,zt));if(Wh||C(this,Us).isStale||!yD(e))return;const r=NW(C(this,Us).dataUpdatedAt,e)+1;$(this,If,setTimeout(()=>{C(this,Us).isStale||this.updateResult()},r))},SD=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(C(this,zt)):this.options.refetchInterval)??!1},ED=function(e){B(this,on,RD).call(this),$(this,Bu,e),!(Wh||wa(this.options.enabled,C(this,zt))===!1||!yD(C(this,Bu))||C(this,Bu)===0)&&$(this,$f,setInterval(()=>{(this.options.refetchIntervalInBackground||oL.isFocused())&&B(this,on,$y).call(this)},C(this,Bu)))},CD=function(){B(this,on,xD).call(this),B(this,on,ED).call(this,B(this,on,SD).call(this))},AD=function(){C(this,If)&&(clearTimeout(C(this,If)),$(this,If,void 0))},RD=function(){C(this,$f)&&(clearInterval(C(this,$f)),$(this,$f,void 0))},PD=function(){const e=C(this,ui).getQueryCache().build(C(this,ui),this.options);if(e===C(this,zt))return;const n=C(this,zt);$(this,zt,e),$(this,mw,e.state),this.hasListeners()&&(n==null||n.removeObserver(this),e.addObserver(this))},BW=function(e){Ur.batch(()=>{e.listeners&&this.listeners.forEach(n=>{n(C(this,Us))}),C(this,ui).getQueryCache().notify({query:C(this,zt),type:"observerResultsUpdated"})})},hH);function wde(t,e){return wa(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function q3(t,e){return wde(t,e)||t.state.data!==void 0&&TD(t,e,e.refetchOnMount)}function TD(t,e,n){if(wa(e.enabled,t)!==!1){const r=typeof n=="function"?n(t):n;return r==="always"||r!==!1&&aL(t,e)}return!1}function G3(t,e,n,r){return(t!==e||wa(r.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&aL(t,n)}function aL(t,e){return wa(e.enabled,t)!==!1&&t.isStaleByTime(Mm(e.staleTime,t))}function _de(t,e){return!JE(t.getCurrentResult(),e)}var Uu,Hu,di,ic,jc,US,kD,pH,xde=(pH=class extends _v{constructor(n,r){super();z(this,jc);z(this,Uu);z(this,Hu);z(this,di);z(this,ic);$(this,Uu,n),this.setOptions(r),this.bindMethods(),B(this,jc,US).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var s;const r=this.options;this.options=C(this,Uu).defaultMutationOptions(n),JE(this.options,r)||C(this,Uu).getMutationCache().notify({type:"observerOptionsUpdated",mutation:C(this,di),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Vh(r.mutationKey)!==Vh(this.options.mutationKey)?this.reset():((s=C(this,di))==null?void 0:s.state.status)==="pending"&&C(this,di).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=C(this,di))==null||n.removeObserver(this)}onMutationUpdate(n){B(this,jc,US).call(this),B(this,jc,kD).call(this,n)}getCurrentResult(){return C(this,Hu)}reset(){var n;(n=C(this,di))==null||n.removeObserver(this),$(this,di,void 0),B(this,jc,US).call(this),B(this,jc,kD).call(this)}mutate(n,r){var s;return $(this,ic,r),(s=C(this,di))==null||s.removeObserver(this),$(this,di,C(this,Uu).getMutationCache().build(C(this,Uu),this.options)),C(this,di).addObserver(this),C(this,di).execute(n)}},Uu=new WeakMap,Hu=new WeakMap,di=new WeakMap,ic=new WeakMap,jc=new WeakSet,US=function(){var r;const n=((r=C(this,di))==null?void 0:r.state)??zW();$(this,Hu,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},kD=function(n){Ur.batch(()=>{var r,s,i,a,o,c,u,f;if(C(this,ic)&&this.hasListeners()){const l=C(this,Hu).variables,d=C(this,Hu).context;(n==null?void 0:n.type)==="success"?((s=(r=C(this,ic)).onSuccess)==null||s.call(r,n.data,l,d),(a=(i=C(this,ic)).onSettled)==null||a.call(i,n.data,null,l,d)):(n==null?void 0:n.type)==="error"&&((c=(o=C(this,ic)).onError)==null||c.call(o,n.error,l,d),(f=(u=C(this,ic)).onSettled)==null||f.call(u,void 0,n.error,l,d))}this.listeners.forEach(l=>{l(C(this,Hu))})})},pH),UW=_.createContext(void 0),HW=t=>{const e=_.useContext(UW);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},Sde=({client:t,children:e})=>(_.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),P.jsx(UW.Provider,{value:t,children:e})),WW=_.createContext(!1),Ede=()=>_.useContext(WW);WW.Provider;function Cde(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var Ade=_.createContext(Cde()),Rde=()=>_.useContext(Ade);function VW(t,e){return typeof t=="function"?t(...e):!!t}function DD(){}var Pde=(t,e)=>{(t.suspense||t.throwOnError||t.experimental_prefetchInRender)&&(e.isReset()||(t.retryOnMount=!1))},Tde=t=>{_.useEffect(()=>{t.clearReset()},[t])},kde=({result:t,errorResetBoundary:e,throwOnError:n,query:r,suspense:s})=>t.isError&&!e.isReset()&&!t.isFetching&&r&&(s&&t.data===void 0||VW(n,[t.error,r])),Dde=t=>{const e=t.staleTime;t.suspense&&(t.staleTime=typeof e=="function"?(...n)=>Math.max(e(...n),1e3):Math.max(e??1e3,1e3),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3)))},Nde=(t,e)=>t.isLoading&&t.isFetching&&!e,Mde=(t,e)=>(t==null?void 0:t.suspense)&&e.isPending,K3=(t,e,n)=>e.fetchOptimistic(t).catch(()=>{n.clearReset()});function Ode(t,e,n){var l,d,m,p,h;const r=HW(),s=Ede(),i=Rde(),a=r.defaultQueryOptions(t);(d=(l=r.getDefaultOptions().queries)==null?void 0:l._experimental_beforeQuery)==null||d.call(l,a),a._optimisticResults=s?"isRestoring":"optimistic",Dde(a),Pde(a,i),Tde(i);const o=!r.getQueryCache().get(a.queryHash),[c]=_.useState(()=>new e(r,a)),u=c.getOptimisticResult(a),f=!s&&t.subscribed!==!1;if(_.useSyncExternalStore(_.useCallback(y=>{const g=f?c.subscribe(Ur.batchCalls(y)):DD;return c.updateResult(),g},[c,f]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),_.useEffect(()=>{c.setOptions(a)},[a,c]),Mde(a,u))throw K3(a,c,i);if(kde({result:u,errorResetBoundary:i,throwOnError:a.throwOnError,query:r.getQueryCache().get(a.queryHash),suspense:a.suspense}))throw u.error;if((p=(m=r.getDefaultOptions().queries)==null?void 0:m._experimental_afterQuery)==null||p.call(m,a,u),a.experimental_prefetchInRender&&!Wh&&Nde(u,s)){const y=o?K3(a,c,i):(h=r.getQueryCache().get(a.queryHash))==null?void 0:h.promise;y==null||y.catch(DD).finally(()=>{c.updateResult()})}return a.notifyOnChangeProps?u:c.trackResult(u)}function qW(t,e){return Ode(t,bde)}function Lde(t,e){const n=HW(),[r]=_.useState(()=>new xde(n,t));_.useEffect(()=>{r.setOptions(t)},[r,t]);const s=_.useSyncExternalStore(_.useCallback(a=>r.subscribe(Ur.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=_.useCallback((a,o)=>{r.mutate(a,o).catch(DD)},[r]);if(s.error&&VW(r.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:i,mutateAsync:s.mutate}}class Uo{constructor(e=[]){He(this,"segments",[]);this.segments=e}key(){return this.segments}get(){return this.segments}}class jd extends Uo{params(e){return new Uo([...this.segments,e])}}class Ide extends Uo{id(e){return new jd([...this.segments,e?String(e):void 0])}}class $de extends Uo{ids(...e){return new jd([...this.segments,...e.length?[e.map(n=>String(n))]:[]])}}class jde extends Uo{action(e){if(["one","report"].includes(e))return new Ide([...this.segments,e]);if(e==="many")return new $de([...this.segments,e]);if(["list","infinite"].includes(e))return new jd([...this.segments,e]);throw new Error("Invalid action type")}}class Fde extends Uo{resource(e){return new jde([...this.segments,e])}mutation(e){return new jd([...e==="custom"?this.segments:[this.segments[0]],e])}}class zde extends Uo{action(e){return new jd([...this.segments,e])}}class Bde extends Uo{action(e){return new jd([...this.segments,e])}}class Ude extends Uo{resource(e){return new Bde([...this.segments,e])}}class Hde extends Uo{action(e){return new jd([...this.segments,e])}}class Wde extends Uo{resource(e){return new Hde([...this.segments,e])}action(e){return new jd([...this.segments,e])}}class Vde extends Uo{data(e){return new Fde(["data",e||"default"])}auth(){return new zde(["auth"])}access(){return new Ude(["access"])}audit(){return new Wde(["audit"])}}const qde=()=>new Vde([]),GW=()=>qde,KW=t=>{const e=GW(),{getProfile:n}=DW();return qW({queryKey:e().auth().action("profile").get(),queryFn:n,...t})},Gde=t=>{const e=GW(),{check:n}=DW();return qW({queryKey:e().auth().action("check").get(),queryFn:n,retry:!1,...t})};function Kde(t,e){const n=_.createContext(e);function r(i){const{children:a,...o}=i,c=_.useMemo(()=>o,Object.values(o));return P.jsx(n.Provider,{value:c,children:a})}function s(i){const a=_.useContext(n);if(a)return a;if(e!==void 0)return e;throw new Error(`\`${i}\` must be used within \`${t}\``)}return r.displayName=t+"Provider",[r,s]}function Tn(t,e=[]){let n=[];function r(i,a){const o=_.createContext(a),c=n.length;n=[...n,a];function u(l){const{scope:d,children:m,...p}=l,h=(d==null?void 0:d[t][c])||o,y=_.useMemo(()=>p,Object.values(p));return P.jsx(h.Provider,{value:y,children:m})}function f(l,d){const m=(d==null?void 0:d[t][c])||o,p=_.useContext(m);if(p)return p;if(a!==void 0)return a;throw new Error(`\`${l}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,f]}const s=()=>{const i=n.map(a=>_.createContext(a));return function(o){const c=(o==null?void 0:o[t])||i;return _.useMemo(()=>({[`__scope${t}`]:{...o,[t]:c}}),[o,c])}};return s.scopeName=t,[r,Yde(s,...e)]}function Yde(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const a=r.reduce((o,{useScope:c,scopeName:u})=>{const l=c(i)[`__scope${u}`];return{...o,...l}},{});return _.useMemo(()=>({[`__scope${e.scopeName}`]:a}),[a])}};return n.scopeName=e.scopeName,n}function Xde(t,e){typeof t=="function"?t(e):t!=null&&(t.current=e)}function n0(...t){return e=>t.forEach(n=>Xde(n,e))}function tt(...t){return _.useCallback(n0(...t),t)}var Ra=_.forwardRef((t,e)=>{const{children:n,...r}=t,s=_.Children.toArray(n),i=s.find(Qde);if(i){const a=i.props.children,o=s.map(c=>c===i?_.Children.count(a)>1?_.Children.only(null):_.isValidElement(a)?a.props.children:null:c);return P.jsx(ND,{...r,ref:e,children:_.isValidElement(a)?_.cloneElement(a,void 0,o):null})}return P.jsx(ND,{...r,ref:e,children:n})});Ra.displayName="Slot";var ND=_.forwardRef((t,e)=>{const{children:n,...r}=t;if(_.isValidElement(n)){const s=Zde(n);return _.cloneElement(n,{...Jde(r,n.props),ref:e?n0(e,s):s})}return _.Children.count(n)>1?_.Children.only(null):null});ND.displayName="SlotClone";var lL=({children:t})=>P.jsx(P.Fragment,{children:t});function Qde(t){return _.isValidElement(t)&&t.type===lL}function Jde(t,e){const n={...e};for(const r in e){const s=t[r],i=e[r];/^on[A-Z]/.test(r)?s&&i?n[r]=(...o)=>{i(...o),s(...o)}:s&&(n[r]=s):r==="style"?n[r]={...s,...i}:r==="className"&&(n[r]=[s,i].filter(Boolean).join(" "))}return{...t,...n}}function Zde(t){var r,s;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function Xc(t){const e=t+"CollectionProvider",[n,r]=Tn(e),[s,i]=n(e,{collectionRef:{current:null},itemMap:new Map}),a=m=>{const{scope:p,children:h}=m,y=se.useRef(null),g=se.useRef(new Map).current;return P.jsx(s,{scope:p,itemMap:g,collectionRef:y,children:h})};a.displayName=e;const o=t+"CollectionSlot",c=se.forwardRef((m,p)=>{const{scope:h,children:y}=m,g=i(o,h),v=tt(p,g.collectionRef);return P.jsx(Ra,{ref:v,children:y})});c.displayName=o;const u=t+"CollectionItemSlot",f="data-radix-collection-item",l=se.forwardRef((m,p)=>{const{scope:h,children:y,...g}=m,v=se.useRef(null),w=tt(p,v),x=i(u,h);return se.useEffect(()=>(x.itemMap.set(v,{ref:v,...g}),()=>void x.itemMap.delete(v))),P.jsx(Ra,{[f]:"",ref:w,children:y})});l.displayName=u;function d(m){const p=i(t+"CollectionConsumer",m);return se.useCallback(()=>{const y=p.collectionRef.current;if(!y)return[];const g=Array.from(y.querySelectorAll(`[${f}]`));return Array.from(p.itemMap.values()).sort((x,A)=>g.indexOf(x.ref.current)-g.indexOf(A.ref.current))},[p.collectionRef,p.itemMap])}return[{Provider:a,Slot:c,ItemSlot:l},d,r]}function me(t,e,{checkForDefaultPrevented:n=!0}={}){return function(s){if(t==null||t(s),n===!1||!s.defaultPrevented)return e==null?void 0:e(s)}}function Ut(t){const e=_.useRef(t);return _.useEffect(()=>{e.current=t}),_.useMemo(()=>(...n)=>{var r;return(r=e.current)==null?void 0:r.call(e,...n)},[])}function sr({prop:t,defaultProp:e,onChange:n=()=>{}}){const[r,s]=efe({defaultProp:e,onChange:n}),i=t!==void 0,a=i?t:r,o=Ut(n),c=_.useCallback(u=>{if(i){const l=typeof u=="function"?u(t):u;l!==t&&o(l)}else s(u)},[i,t,s,o]);return[a,c]}function efe({defaultProp:t,onChange:e}){const n=_.useState(t),[r]=n,s=_.useRef(r),i=Ut(e);return _.useEffect(()=>{s.current!==r&&(i(r),s.current=r)},[r,s,i]),n}var tfe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],De=tfe.reduce((t,e)=>{const n=_.forwardRef((r,s)=>{const{asChild:i,...a}=r,o=i?Ra:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),P.jsx(o,{...a,ref:s})});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{});function Wb(t,e){t&&Ns.flushSync(()=>t.dispatchEvent(e))}var Ln=globalThis!=null&&globalThis.document?_.useLayoutEffect:()=>{};function nfe(t,e){return _.useReducer((n,r)=>e[n][r]??n,t)}var Hn=t=>{const{present:e,children:n}=t,r=rfe(e),s=typeof n=="function"?n({present:r.isPresent}):_.Children.only(n),i=tt(r.ref,sfe(s));return typeof n=="function"||r.isPresent?_.cloneElement(s,{ref:i}):null};Hn.displayName="Presence";function rfe(t){const[e,n]=_.useState(),r=_.useRef({}),s=_.useRef(t),i=_.useRef("none"),a=t?"mounted":"unmounted",[o,c]=nfe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return _.useEffect(()=>{const u=Jx(r.current);i.current=o==="mounted"?u:"none"},[o]),Ln(()=>{const u=r.current,f=s.current;if(f!==t){const d=i.current,m=Jx(u);t?c("MOUNT"):m==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(f&&d!==m?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,c]),Ln(()=>{if(e){const u=l=>{const m=Jx(r.current).includes(l.animationName);l.target===e&&m&&Ns.flushSync(()=>c("ANIMATION_END"))},f=l=>{l.target===e&&(i.current=Jx(r.current))};return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",u),e.addEventListener("animationend",u),()=>{e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",u),e.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:_.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Jx(t){return(t==null?void 0:t.animationName)||"none"}function sfe(t){var r,s;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var ife=X_.useId||(()=>{}),ofe=0;function Vr(t){const[e,n]=_.useState(ife());return Ln(()=>{n(r=>r??String(ofe++))},[t]),e?`radix-${e}`:""}var cL="Collapsible",[afe,YW]=Tn(cL),[lfe,uL]=afe(cL),XW=_.forwardRef((t,e)=>{const{__scopeCollapsible:n,open:r,defaultOpen:s,disabled:i,onOpenChange:a,...o}=t,[c=!1,u]=sr({prop:r,defaultProp:s,onChange:a});return P.jsx(lfe,{scope:n,disabled:i,contentId:Vr(),open:c,onOpenToggle:_.useCallback(()=>u(f=>!f),[u]),children:P.jsx(De.div,{"data-state":fL(c),"data-disabled":i?"":void 0,...o,ref:e})})});XW.displayName=cL;var QW="CollapsibleTrigger",JW=_.forwardRef((t,e)=>{const{__scopeCollapsible:n,...r}=t,s=uL(QW,n);return P.jsx(De.button,{type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":fL(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...r,ref:e,onClick:me(t.onClick,s.onOpenToggle)})});JW.displayName=QW;var dL="CollapsibleContent",ZW=_.forwardRef((t,e)=>{const{forceMount:n,...r}=t,s=uL(dL,t.__scopeCollapsible);return P.jsx(Hn,{present:n||s.open,children:({present:i})=>P.jsx(cfe,{...r,ref:e,present:i})})});ZW.displayName=dL;var cfe=_.forwardRef((t,e)=>{const{__scopeCollapsible:n,present:r,children:s,...i}=t,a=uL(dL,n),[o,c]=_.useState(r),u=_.useRef(null),f=tt(e,u),l=_.useRef(0),d=l.current,m=_.useRef(0),p=m.current,h=a.open||o,y=_.useRef(h),g=_.useRef();return _.useEffect(()=>{const v=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(v)},[]),Ln(()=>{const v=u.current;if(v){g.current=g.current||{transitionDuration:v.style.transitionDuration,animationName:v.style.animationName},v.style.transitionDuration="0s",v.style.animationName="none";const w=v.getBoundingClientRect();l.current=w.height,m.current=w.width,y.current||(v.style.transitionDuration=g.current.transitionDuration,v.style.animationName=g.current.animationName),c(r)}},[a.open,r]),P.jsx(De.div,{"data-state":fL(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!h,...i,ref:f,style:{"--radix-collapsible-content-height":d?`${d}px`:void 0,"--radix-collapsible-content-width":p?`${p}px`:void 0,...t.style},children:h&&s})});function fL(t){return t?"open":"closed"}var ufe=XW,dfe=JW,ffe=ZW,hfe=_.createContext(void 0);function Ma(t){const e=_.useContext(hfe);return t||e||"ltr"}var Qc="Accordion",pfe=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[hL,mfe,gfe]=Xc(Qc),[L1,NHe]=Tn(Qc,[gfe,YW]),pL=YW(),vfe=se.forwardRef((t,e)=>{const{type:n,...r}=t,s=r,i=r;return P.jsx(hL.Provider,{scope:t.__scopeAccordion,children:n==="multiple"?P.jsx(_fe,{...i,ref:e}):P.jsx(wfe,{...s,ref:e})})});vfe.displayName=Qc;var[eV,yfe]=L1(Qc),[tV,bfe]=L1(Qc,{collapsible:!1}),wfe=se.forwardRef((t,e)=>{const{value:n,defaultValue:r,onValueChange:s=()=>{},collapsible:i=!1,...a}=t,[o,c]=sr({prop:n,defaultProp:r,onChange:s});return P.jsx(eV,{scope:t.__scopeAccordion,value:o?[o]:[],onItemOpen:c,onItemClose:se.useCallback(()=>i&&c(""),[i,c]),children:P.jsx(tV,{scope:t.__scopeAccordion,collapsible:i,children:P.jsx(nV,{...a,ref:e})})})}),_fe=se.forwardRef((t,e)=>{const{value:n,defaultValue:r,onValueChange:s=()=>{},...i}=t,[a=[],o]=sr({prop:n,defaultProp:r,onChange:s}),c=se.useCallback(f=>o((l=[])=>[...l,f]),[o]),u=se.useCallback(f=>o((l=[])=>l.filter(d=>d!==f)),[o]);return P.jsx(eV,{scope:t.__scopeAccordion,value:a,onItemOpen:c,onItemClose:u,children:P.jsx(tV,{scope:t.__scopeAccordion,collapsible:!0,children:P.jsx(nV,{...i,ref:e})})})}),[xfe,I1]=L1(Qc),nV=se.forwardRef((t,e)=>{const{__scopeAccordion:n,disabled:r,dir:s,orientation:i="vertical",...a}=t,o=se.useRef(null),c=tt(o,e),u=mfe(n),l=Ma(s)==="ltr",d=me(t.onKeyDown,m=>{var E;if(!pfe.includes(m.key))return;const p=m.target,h=u().filter(T=>{var D;return!((D=T.ref.current)!=null&&D.disabled)}),y=h.findIndex(T=>T.ref.current===p),g=h.length;if(y===-1)return;m.preventDefault();let v=y;const w=0,x=g-1,A=()=>{v=y+1,v>x&&(v=w)},k=()=>{v=y-1,v{const{__scopeAccordion:n,value:r,...s}=t,i=I1(eC,n),a=yfe(eC,n),o=pL(n),c=Vr(),u=r&&a.value.includes(r)||!1,f=i.disabled||t.disabled;return P.jsx(Sfe,{scope:n,open:u,disabled:f,triggerId:c,children:P.jsx(ufe,{"data-orientation":i.orientation,"data-state":cV(u),...o,...s,ref:e,disabled:f,open:u,onOpenChange:l=>{l?a.onItemOpen(r):a.onItemClose(r)}})})});rV.displayName=eC;var sV="AccordionHeader",iV=se.forwardRef((t,e)=>{const{__scopeAccordion:n,...r}=t,s=I1(Qc,n),i=mL(sV,n);return P.jsx(De.h3,{"data-orientation":s.orientation,"data-state":cV(i.open),"data-disabled":i.disabled?"":void 0,...r,ref:e})});iV.displayName=sV;var MD="AccordionTrigger",oV=se.forwardRef((t,e)=>{const{__scopeAccordion:n,...r}=t,s=I1(Qc,n),i=mL(MD,n),a=bfe(MD,n),o=pL(n);return P.jsx(hL.ItemSlot,{scope:n,children:P.jsx(dfe,{"aria-disabled":i.open&&!a.collapsible||void 0,"data-orientation":s.orientation,id:i.triggerId,...o,...r,ref:e})})});oV.displayName=MD;var aV="AccordionContent",lV=se.forwardRef((t,e)=>{const{__scopeAccordion:n,...r}=t,s=I1(Qc,n),i=mL(aV,n),a=pL(n);return P.jsx(ffe,{role:"region","aria-labelledby":i.triggerId,"data-orientation":s.orientation,...a,...r,ref:e,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...t.style}})});lV.displayName=aV;function cV(t){return t?"open":"closed"}var Efe=rV,Cfe=iV,uV=oV,dV=lV;/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Efe=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),fV=(...t)=>t.filter((e,n,r)=>!!e&&r.indexOf(e)===n).join(" ");/** + */const Afe=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),fV=(...t)=>t.filter((e,n,r)=>!!e&&r.indexOf(e)===n).join(" ");/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */var Cfe={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"};/** + */var Rfe={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.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Afe=_.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:i,iconNode:a,...o},c)=>_.createElement("svg",{ref:c,...Cfe,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:fV("lucide",s),...o},[...a.map(([u,f])=>_.createElement(u,f)),...Array.isArray(i)?i:[i]]));/** + */const Pfe=_.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:i,iconNode:a,...o},c)=>_.createElement("svg",{ref:c,...Rfe,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:fV("lucide",s),...o},[...a.map(([u,f])=>_.createElement(u,f)),...Array.isArray(i)?i:[i]]));/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const ts=(t,e)=>{const n=_.forwardRef(({className:r,...s},i)=>_.createElement(Afe,{ref:i,iconNode:e,className:fV(`lucide-${Efe(t)}`,r),...s}));return n.displayName=`${t}`,n};/** + */const ts=(t,e)=>{const n=_.forwardRef(({className:r,...s},i)=>_.createElement(Pfe,{ref:i,iconNode:e,className:fV(`lucide-${Afe(t)}`,r),...s}));return n.displayName=`${t}`,n};/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Rfe=ts("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/** + */const Tfe=ts("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const r_=ts("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** + */const r0=ts("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const $C=ts("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** + */const $1=ts("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. @@ -83,73 +83,73 @@ Error generating stack: `+i.message+` * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const s_=ts("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** + */const s0=ts("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Pfe=ts("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** + */const kfe=ts("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Tfe=ts("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** + */const Dfe=ts("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const kfe=ts("CircleUser",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]]);/** + */const Nfe=ts("CircleUser",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const jC=ts("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** + */const j1=ts("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Dfe=ts("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/** + */const Mfe=ts("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Nfe=ts("Loader",[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]]);/** + */const Ofe=ts("Loader",[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Mfe=ts("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/** + */const Lfe=ts("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Ofe=ts("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"}]]);/** + */const Ife=ts("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.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Lfe=ts("Package2",[["path",{d:"M3 9h18v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V9Z",key:"1ront0"}],["path",{d:"m3 9 2.45-4.9A2 2 0 0 1 7.24 3h9.52a2 2 0 0 1 1.8 1.1L21 9",key:"19h2x1"}],["path",{d:"M12 3v6",key:"1holv5"}]]);/** + */const $fe=ts("Package2",[["path",{d:"M3 9h18v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V9Z",key:"1ront0"}],["path",{d:"m3 9 2.45-4.9A2 2 0 0 1 7.24 3h9.52a2 2 0 0 1 1.8 1.1L21 9",key:"19h2x1"}],["path",{d:"M12 3v6",key:"1holv5"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Ife=ts("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"}]]);/** + */const jfe=ts("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.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const $fe=ts("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** + */const Ffe=ts("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const jfe=ts("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** + */const zfe=ts("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** * @license lucide-react v0.427.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const vL=ts("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function hV(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e{const e=Bfe(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:a=>{const o=a.split(yL);return o[0]===""&&o.length!==1&&o.shift(),pV(o,e)||zfe(a)},getConflictingClassGroupIds:(a,o)=>{const c=n[a]||[];return o&&r[a]?[...c,...r[a]]:c}}},pV=(t,e)=>{var a;if(t.length===0)return e.classGroupId;const n=t[0],r=e.nextPart.get(n),s=r?pV(t.slice(1),r):void 0;if(s)return s;if(e.validators.length===0)return;const i=t.join(yL);return(a=e.validators.find(({validator:o})=>o(i)))==null?void 0:a.classGroupId},Y3=/^\[(.+)\]$/,zfe=t=>{if(Y3.test(t)){const e=Y3.exec(t)[1],n=e==null?void 0:e.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}},Bfe=t=>{const{theme:e,prefix:n}=t,r={nextPart:new Map,validators:[]};return Hfe(Object.entries(t.classGroups),n).forEach(([i,a])=>{OD(a,r,i,e)}),r},OD=(t,e,n,r)=>{t.forEach(s=>{if(typeof s=="string"){const i=s===""?e:X3(e,s);i.classGroupId=n;return}if(typeof s=="function"){if(Ufe(s)){OD(s(r),e,n,r);return}e.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([i,a])=>{OD(a,X3(e,i),n,r)})})},X3=(t,e)=>{let n=t;return e.split(yL).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Ufe=t=>t.isThemeGetter,Hfe=(t,e)=>e?t.map(([n,r])=>{const s=r.map(i=>typeof i=="string"?e+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([a,o])=>[e+a,o])):i);return[n,s]}):t,Wfe=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,r=new Map;const s=(i,a)=>{n.set(i,a),e++,e>t&&(e=0,r=n,n=new Map)};return{get(i){let a=n.get(i);if(a!==void 0)return a;if((a=r.get(i))!==void 0)return s(i,a),a},set(i,a){n.has(i)?n.set(i,a):s(i,a)}}},mV="!",Vfe=t=>{const{separator:e,experimentalParseClassName:n}=t,r=e.length===1,s=e[0],i=e.length,a=o=>{const c=[];let u=0,f=0,l;for(let y=0;yf?l-f:void 0;return{modifiers:c,hasImportantModifier:m,baseClassName:p,maybePostfixModifierPosition:h}};return n?o=>n({className:o,parseClassName:a}):a},qfe=t=>{if(t.length<=1)return t;const e=[];let n=[];return t.forEach(r=>{r[0]==="["?(e.push(...n.sort(),r),n=[]):n.push(r)}),e.push(...n.sort()),e},Gfe=t=>({cache:Wfe(t.cacheSize),parseClassName:Vfe(t),...Ffe(t)}),Kfe=/\s+/,Yfe=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=e,i=[],a=t.trim().split(Kfe);let o="";for(let c=a.length-1;c>=0;c-=1){const u=a[c],{modifiers:f,hasImportantModifier:l,baseClassName:d,maybePostfixModifierPosition:m}=n(u);let p=!!m,h=r(p?d.substring(0,m):d);if(!h){if(!p){o=u+(o.length>0?" "+o:o);continue}if(h=r(d),!h){o=u+(o.length>0?" "+o:o);continue}p=!1}const y=qfe(f).join(":"),g=l?y+mV:y,v=g+h;if(i.includes(v))continue;i.push(v);const w=s(h,p);for(let x=0;x0?" "+o:o)}return o};function Xfe(){let t=0,e,n,r="";for(;t{if(typeof t=="string")return t;let e,n="";for(let r=0;rl(f),t());return n=Gfe(u),r=n.cache.get,s=n.cache.set,i=o,o(c)}function o(c){const u=r(c);if(u)return u;const f=Yfe(c,n);return s(c,f),f}return function(){return i(Xfe.apply(null,arguments))}}const jn=t=>{const e=n=>n[t]||[];return e.isThemeGetter=!0,e},vV=/^\[(?:([a-z-]+):)?(.+)\]$/i,Jfe=/^\d+\/\d+$/,Zfe=new Set(["px","full","screen"]),ehe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,the=/\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$/,nhe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,rhe=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,she=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Hl=t=>Om(t)||Zfe.has(t)||Jfe.test(t),pu=t=>xv(t,"length",fhe),Om=t=>!!t&&!Number.isNaN(Number(t)),ZP=t=>xv(t,"number",Om),my=t=>!!t&&Number.isInteger(Number(t)),ihe=t=>t.endsWith("%")&&Om(t.slice(0,-1)),St=t=>vV.test(t),mu=t=>ehe.test(t),ohe=new Set(["length","size","percentage"]),ahe=t=>xv(t,ohe,yV),lhe=t=>xv(t,"position",yV),che=new Set(["image","url"]),uhe=t=>xv(t,che,phe),dhe=t=>xv(t,"",hhe),gy=()=>!0,xv=(t,e,n)=>{const r=vV.exec(t);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):n(r[2]):!1},fhe=t=>the.test(t)&&!nhe.test(t),yV=()=>!1,hhe=t=>rhe.test(t),phe=t=>she.test(t),mhe=()=>{const t=jn("colors"),e=jn("spacing"),n=jn("blur"),r=jn("brightness"),s=jn("borderColor"),i=jn("borderRadius"),a=jn("borderSpacing"),o=jn("borderWidth"),c=jn("contrast"),u=jn("grayscale"),f=jn("hueRotate"),l=jn("invert"),d=jn("gap"),m=jn("gradientColorStops"),p=jn("gradientColorStopPositions"),h=jn("inset"),y=jn("margin"),g=jn("opacity"),v=jn("padding"),w=jn("saturate"),x=jn("scale"),A=jn("sepia"),k=jn("skew"),R=jn("space"),E=jn("translate"),T=()=>["auto","contain","none"],D=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto",St,e],L=()=>[St,e],I=()=>["",Hl,pu],j=()=>["auto",Om,St],U=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Y=()=>["solid","dashed","dotted","double","none"],W=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],H=()=>["start","end","center","between","around","evenly","stretch"],ee=()=>["","0",St],re=()=>["auto","avoid","all","avoid-page","page","left","right","column"],X=()=>[Om,St];return{cacheSize:500,separator:":",theme:{colors:[gy],spacing:[Hl,pu],blur:["none","",mu,St],brightness:X(),borderColor:[t],borderRadius:["none","","full",mu,St],borderSpacing:L(),borderWidth:I(),contrast:X(),grayscale:ee(),hueRotate:X(),invert:ee(),gap:L(),gradientColorStops:[t],gradientColorStopPositions:[ihe,pu],inset:M(),margin:M(),opacity:X(),padding:L(),saturate:X(),scale:X(),sepia:ee(),skew:X(),space:L(),translate:L()},classGroups:{aspect:[{aspect:["auto","square","video",St]}],container:["container"],columns:[{columns:[mu]}],"break-after":[{"break-after":re()}],"break-before":[{"break-before":re()}],"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:[...U(),St]}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",my,St]}],basis:[{basis:M()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",St]}],grow:[{grow:ee()}],shrink:[{shrink:ee()}],order:[{order:["first","last","none",my,St]}],"grid-cols":[{"grid-cols":[gy]}],"col-start-end":[{col:["auto",{span:["full",my,St]},St]}],"col-start":[{"col-start":j()}],"col-end":[{"col-end":j()}],"grid-rows":[{"grid-rows":[gy]}],"row-start-end":[{row:["auto",{span:[my,St]},St]}],"row-start":[{"row-start":j()}],"row-end":[{"row-end":j()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",St]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",St]}],gap:[{gap:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal",...H()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...H(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...H(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],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":[R]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[R]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",St,e]}],"min-w":[{"min-w":[St,e,"min","max","fit"]}],"max-w":[{"max-w":[St,e,"none","full","min","max","fit","prose",{screen:[mu]},mu]}],h:[{h:[St,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[St,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[St,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[St,e,"auto","min","max","fit"]}],"font-size":[{text:["base",mu,pu]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ZP]}],"font-family":[{font:[gy]}],"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",St]}],"line-clamp":[{"line-clamp":["none",Om,ZP]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Hl,St]}],"list-image":[{"list-image":["none",St]}],"list-style-type":[{list:["none","disc","decimal",St]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Y(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Hl,pu]}],"underline-offset":[{"underline-offset":["auto",Hl,St]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:L()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",St]}],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",St]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...U(),lhe]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ahe]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},uhe]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[o]}],"border-w-x":[{"border-x":[o]}],"border-w-y":[{"border-y":[o]}],"border-w-s":[{"border-s":[o]}],"border-w-e":[{"border-e":[o]}],"border-w-t":[{"border-t":[o]}],"border-w-r":[{"border-r":[o]}],"border-w-b":[{"border-b":[o]}],"border-w-l":[{"border-l":[o]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[...Y(),"hidden"]}],"divide-x":[{"divide-x":[o]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[o]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:Y()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...Y()]}],"outline-offset":[{"outline-offset":[Hl,St]}],"outline-w":[{outline:[Hl,pu]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:I()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[Hl,pu]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",mu,dhe]}],"shadow-color":[{shadow:[gy]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...W(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":W()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",mu,St]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[l]}],saturate:[{saturate:[w]}],sepia:[{sepia:[A]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[l]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[A]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",St]}],duration:[{duration:X()}],ease:[{ease:["linear","in","out","in-out",St]}],delay:[{delay:X()}],animate:[{animate:["none","spin","ping","pulse","bounce",St]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[my,St]}],"translate-x":[{"translate-x":[E]}],"translate-y":[{"translate-y":[E]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",St]}],accent:[{accent:["auto",t]}],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",St]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"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",St]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[Hl,pu,ZP]}],stroke:[{stroke:[t,"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"]}}},ghe=Qfe(mhe);function ce(...t){return ghe(hp(t))}const vhe=_.forwardRef(({className:t,...e},n)=>P.jsx(xfe,{ref:n,className:ce("border-b",t),...e}));vhe.displayName="AccordionItem";const yhe=_.forwardRef(({className:t,children:e,...n},r)=>P.jsx(Sfe,{className:"flex",children:P.jsxs(uV,{ref:r,className:ce("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",t),...n,children:[e,P.jsx($C,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));yhe.displayName=uV.displayName;const bhe=_.forwardRef(({className:t,children:e,...n},r)=>P.jsx(dV,{ref:r,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:P.jsx("div",{className:ce("pb-4 pt-0",t),children:e})}));bhe.displayName=dV.displayName;const Q3=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,J3=hp,Ho=(t,e)=>n=>{var r;if((e==null?void 0:e.variants)==null)return J3(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:i}=e,a=Object.keys(s).map(u=>{const f=n==null?void 0:n[u],l=i==null?void 0:i[u];if(f===null)return null;const d=Q3(f)||Q3(l);return s[u][d]}),o=n&&Object.entries(n).reduce((u,f)=>{let[l,d]=f;return d===void 0||(u[l]=d),u},{}),c=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((u,f)=>{let{class:l,className:d,...m}=f;return Object.entries(m).every(p=>{let[h,y]=p;return Array.isArray(y)?y.includes({...i,...o}[h]):{...i,...o}[h]===y})?[...u,l,d]:u},[]);return J3(t,a,c,n==null?void 0:n.class,n==null?void 0:n.className)},whe=Ho("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),_he=_.forwardRef(({className:t,variant:e,...n},r)=>P.jsx("div",{ref:r,role:"alert",className:ce(whe({variant:e}),t),...n}));_he.displayName="Alert";const xhe=_.forwardRef(({className:t,...e},n)=>P.jsx("h5",{ref:n,className:ce("mb-1 font-medium leading-none tracking-tight",t),...e}));xhe.displayName="AlertTitle";const She=_.forwardRef(({className:t,...e},n)=>P.jsx("div",{ref:n,className:ce("text-sm [&_p]:leading-relaxed",t),...e}));She.displayName="AlertDescription";function bV(t,e=globalThis==null?void 0:globalThis.document){const n=Ut(t);_.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return e.addEventListener("keydown",r,{capture:!0}),()=>e.removeEventListener("keydown",r,{capture:!0})},[n,e])}var Ehe="DismissableLayer",LD="dismissableLayer.update",Che="dismissableLayer.pointerDownOutside",Ahe="dismissableLayer.focusOutside",Z3,wV=_.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Jc=_.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:a,onDismiss:o,...c}=t,u=_.useContext(wV),[f,l]=_.useState(null),d=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=_.useState({}),p=tt(e,R=>l(R)),h=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=h.indexOf(y),v=f?h.indexOf(f):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,x=v>=g,A=Phe(R=>{const E=R.target,T=[...u.branches].some(D=>D.contains(E));!x||T||(s==null||s(R),a==null||a(R),R.defaultPrevented||o==null||o())},d),k=The(R=>{const E=R.target;[...u.branches].some(D=>D.contains(E))||(i==null||i(R),a==null||a(R),R.defaultPrevented||o==null||o())},d);return bV(R=>{v===u.layers.size-1&&(r==null||r(R),!R.defaultPrevented&&o&&(R.preventDefault(),o()))},d),_.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Z3=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),ez(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=Z3)}},[f,d,n,u]),_.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),ez())},[f,u]),_.useEffect(()=>{const R=()=>m({});return document.addEventListener(LD,R),()=>document.removeEventListener(LD,R)},[]),P.jsx(De.div,{...c,ref:p,style:{pointerEvents:w?x?"auto":"none":void 0,...t.style},onFocusCapture:me(t.onFocusCapture,k.onFocusCapture),onBlurCapture:me(t.onBlurCapture,k.onBlurCapture),onPointerDownCapture:me(t.onPointerDownCapture,A.onPointerDownCapture)})});Jc.displayName=Ehe;var Rhe="DismissableLayerBranch",_V=_.forwardRef((t,e)=>{const n=_.useContext(wV),r=_.useRef(null),s=tt(e,r);return _.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),P.jsx(De.div,{...t,ref:s})});_V.displayName=Rhe;function Phe(t,e=globalThis==null?void 0:globalThis.document){const n=Ut(t),r=_.useRef(!1),s=_.useRef(()=>{});return _.useEffect(()=>{const i=o=>{if(o.target&&!r.current){let c=function(){xV(Che,n,u,{discrete:!0})};const u={originalEvent:o};o.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=c,e.addEventListener("click",s.current,{once:!0})):c()}else e.removeEventListener("click",s.current);r.current=!1},a=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),e.removeEventListener("pointerdown",i),e.removeEventListener("click",s.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function The(t,e=globalThis==null?void 0:globalThis.document){const n=Ut(t),r=_.useRef(!1);return _.useEffect(()=>{const s=i=>{i.target&&!r.current&&xV(Ahe,n,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ez(){const t=new CustomEvent(LD);document.dispatchEvent(t)}function xV(t,e,n,{discrete:r}){const s=n.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&s.addEventListener(t,e,{once:!0}),r?Wb(s,i):s.dispatchEvent(i)}var khe=Jc,Dhe=_V,eT="focusScope.autoFocusOnMount",tT="focusScope.autoFocusOnUnmount",tz={bubbles:!1,cancelable:!0},Nhe="FocusScope",i_=_.forwardRef((t,e)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...a}=t,[o,c]=_.useState(null),u=Ut(s),f=Ut(i),l=_.useRef(null),d=tt(e,h=>c(h)),m=_.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;_.useEffect(()=>{if(r){let h=function(w){if(m.paused||!o)return;const x=w.target;o.contains(x)?l.current=x:bu(l.current,{select:!0})},y=function(w){if(m.paused||!o)return;const x=w.relatedTarget;x!==null&&(o.contains(x)||bu(l.current,{select:!0}))},g=function(w){if(document.activeElement===document.body)for(const A of w)A.removedNodes.length>0&&bu(o)};document.addEventListener("focusin",h),document.addEventListener("focusout",y);const v=new MutationObserver(g);return o&&v.observe(o,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",y),v.disconnect()}}},[r,o,m.paused]),_.useEffect(()=>{if(o){rz.add(m);const h=document.activeElement;if(!o.contains(h)){const g=new CustomEvent(eT,tz);o.addEventListener(eT,u),o.dispatchEvent(g),g.defaultPrevented||(Mhe(jhe(SV(o)),{select:!0}),document.activeElement===h&&bu(o))}return()=>{o.removeEventListener(eT,u),setTimeout(()=>{const g=new CustomEvent(tT,tz);o.addEventListener(tT,f),o.dispatchEvent(g),g.defaultPrevented||bu(h??document.body,{select:!0}),o.removeEventListener(tT,f),rz.remove(m)},0)}}},[o,u,f,m]);const p=_.useCallback(h=>{if(!n&&!r||m.paused)return;const y=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,g=document.activeElement;if(y&&g){const v=h.currentTarget,[w,x]=Ohe(v);w&&x?!h.shiftKey&&g===x?(h.preventDefault(),n&&bu(w,{select:!0})):h.shiftKey&&g===w&&(h.preventDefault(),n&&bu(x,{select:!0})):g===v&&h.preventDefault()}},[n,r,m.paused]);return P.jsx(De.div,{tabIndex:-1,...a,ref:d,onKeyDown:p})});i_.displayName=Nhe;function Mhe(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(bu(r,{select:e}),document.activeElement!==n)return}function Ohe(t){const e=SV(t),n=nz(e,t),r=nz(e.reverse(),t);return[n,r]}function SV(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function nz(t,e){for(const n of t)if(!Lhe(n,{upTo:e}))return n}function Lhe(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function Ihe(t){return t instanceof HTMLInputElement&&"select"in t}function bu(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&Ihe(t)&&e&&t.select()}}var rz=$he();function $he(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=sz(t,e),t.unshift(e)},remove(e){var n;t=sz(t,e),(n=t[0])==null||n.resume()}}}function sz(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}function jhe(t){return t.filter(e=>e.tagName!=="A")}var Fhe="Portal",Sv=_.forwardRef((t,e)=>{var o;const{container:n,...r}=t,[s,i]=_.useState(!1);Ln(()=>i(!0),[]);const a=n||s&&((o=globalThis==null?void 0:globalThis.document)==null?void 0:o.body);return a?t_.createPortal(P.jsx(De.div,{...r,ref:e}),a):null});Sv.displayName=Fhe;var nT=0;function FC(){_.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??iz()),document.body.insertAdjacentElement("beforeend",t[1]??iz()),nT++,()=>{nT===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),nT--}},[])}function iz(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",t}var fr=function(){return fr=Object.assign||function(e){for(var n,r=1,s=arguments.length;r"u")return Jhe;var e=Zhe(t),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-n+e[2]-e[0])}},tpe=UC(),$m="data-scroll-locked",npe=function(t,e,n,r){var s=t.left,i=t.top,a=t.right,o=t.gap;return n===void 0&&(n="margin"),` - .`.concat(zhe,` { + */const vL=ts("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function hV(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e{const e=Hfe(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:a=>{const o=a.split(yL);return o[0]===""&&o.length!==1&&o.shift(),pV(o,e)||Ufe(a)},getConflictingClassGroupIds:(a,o)=>{const c=n[a]||[];return o&&r[a]?[...c,...r[a]]:c}}},pV=(t,e)=>{var a;if(t.length===0)return e.classGroupId;const n=t[0],r=e.nextPart.get(n),s=r?pV(t.slice(1),r):void 0;if(s)return s;if(e.validators.length===0)return;const i=t.join(yL);return(a=e.validators.find(({validator:o})=>o(i)))==null?void 0:a.classGroupId},Y3=/^\[(.+)\]$/,Ufe=t=>{if(Y3.test(t)){const e=Y3.exec(t)[1],n=e==null?void 0:e.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}},Hfe=t=>{const{theme:e,prefix:n}=t,r={nextPart:new Map,validators:[]};return Vfe(Object.entries(t.classGroups),n).forEach(([i,a])=>{OD(a,r,i,e)}),r},OD=(t,e,n,r)=>{t.forEach(s=>{if(typeof s=="string"){const i=s===""?e:X3(e,s);i.classGroupId=n;return}if(typeof s=="function"){if(Wfe(s)){OD(s(r),e,n,r);return}e.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([i,a])=>{OD(a,X3(e,i),n,r)})})},X3=(t,e)=>{let n=t;return e.split(yL).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Wfe=t=>t.isThemeGetter,Vfe=(t,e)=>e?t.map(([n,r])=>{const s=r.map(i=>typeof i=="string"?e+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([a,o])=>[e+a,o])):i);return[n,s]}):t,qfe=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,r=new Map;const s=(i,a)=>{n.set(i,a),e++,e>t&&(e=0,r=n,n=new Map)};return{get(i){let a=n.get(i);if(a!==void 0)return a;if((a=r.get(i))!==void 0)return s(i,a),a},set(i,a){n.has(i)?n.set(i,a):s(i,a)}}},mV="!",Gfe=t=>{const{separator:e,experimentalParseClassName:n}=t,r=e.length===1,s=e[0],i=e.length,a=o=>{const c=[];let u=0,f=0,l;for(let y=0;yf?l-f:void 0;return{modifiers:c,hasImportantModifier:m,baseClassName:p,maybePostfixModifierPosition:h}};return n?o=>n({className:o,parseClassName:a}):a},Kfe=t=>{if(t.length<=1)return t;const e=[];let n=[];return t.forEach(r=>{r[0]==="["?(e.push(...n.sort(),r),n=[]):n.push(r)}),e.push(...n.sort()),e},Yfe=t=>({cache:qfe(t.cacheSize),parseClassName:Gfe(t),...Bfe(t)}),Xfe=/\s+/,Qfe=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s}=e,i=[],a=t.trim().split(Xfe);let o="";for(let c=a.length-1;c>=0;c-=1){const u=a[c],{modifiers:f,hasImportantModifier:l,baseClassName:d,maybePostfixModifierPosition:m}=n(u);let p=!!m,h=r(p?d.substring(0,m):d);if(!h){if(!p){o=u+(o.length>0?" "+o:o);continue}if(h=r(d),!h){o=u+(o.length>0?" "+o:o);continue}p=!1}const y=Kfe(f).join(":"),g=l?y+mV:y,v=g+h;if(i.includes(v))continue;i.push(v);const w=s(h,p);for(let x=0;x0?" "+o:o)}return o};function Jfe(){let t=0,e,n,r="";for(;t{if(typeof t=="string")return t;let e,n="";for(let r=0;rl(f),t());return n=Yfe(u),r=n.cache.get,s=n.cache.set,i=o,o(c)}function o(c){const u=r(c);if(u)return u;const f=Qfe(c,n);return s(c,f),f}return function(){return i(Jfe.apply(null,arguments))}}const jn=t=>{const e=n=>n[t]||[];return e.isThemeGetter=!0,e},vV=/^\[(?:([a-z-]+):)?(.+)\]$/i,ehe=/^\d+\/\d+$/,the=new Set(["px","full","screen"]),nhe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,rhe=/\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$/,she=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,ihe=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ohe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Hl=t=>Om(t)||the.has(t)||ehe.test(t),pu=t=>xv(t,"length",phe),Om=t=>!!t&&!Number.isNaN(Number(t)),ZP=t=>xv(t,"number",Om),my=t=>!!t&&Number.isInteger(Number(t)),ahe=t=>t.endsWith("%")&&Om(t.slice(0,-1)),St=t=>vV.test(t),mu=t=>nhe.test(t),lhe=new Set(["length","size","percentage"]),che=t=>xv(t,lhe,yV),uhe=t=>xv(t,"position",yV),dhe=new Set(["image","url"]),fhe=t=>xv(t,dhe,ghe),hhe=t=>xv(t,"",mhe),gy=()=>!0,xv=(t,e,n)=>{const r=vV.exec(t);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):n(r[2]):!1},phe=t=>rhe.test(t)&&!she.test(t),yV=()=>!1,mhe=t=>ihe.test(t),ghe=t=>ohe.test(t),vhe=()=>{const t=jn("colors"),e=jn("spacing"),n=jn("blur"),r=jn("brightness"),s=jn("borderColor"),i=jn("borderRadius"),a=jn("borderSpacing"),o=jn("borderWidth"),c=jn("contrast"),u=jn("grayscale"),f=jn("hueRotate"),l=jn("invert"),d=jn("gap"),m=jn("gradientColorStops"),p=jn("gradientColorStopPositions"),h=jn("inset"),y=jn("margin"),g=jn("opacity"),v=jn("padding"),w=jn("saturate"),x=jn("scale"),A=jn("sepia"),k=jn("skew"),R=jn("space"),E=jn("translate"),T=()=>["auto","contain","none"],D=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto",St,e],L=()=>[St,e],I=()=>["",Hl,pu],j=()=>["auto",Om,St],U=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Y=()=>["solid","dashed","dotted","double","none"],W=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],H=()=>["start","end","center","between","around","evenly","stretch"],ee=()=>["","0",St],re=()=>["auto","avoid","all","avoid-page","page","left","right","column"],X=()=>[Om,St];return{cacheSize:500,separator:":",theme:{colors:[gy],spacing:[Hl,pu],blur:["none","",mu,St],brightness:X(),borderColor:[t],borderRadius:["none","","full",mu,St],borderSpacing:L(),borderWidth:I(),contrast:X(),grayscale:ee(),hueRotate:X(),invert:ee(),gap:L(),gradientColorStops:[t],gradientColorStopPositions:[ahe,pu],inset:M(),margin:M(),opacity:X(),padding:L(),saturate:X(),scale:X(),sepia:ee(),skew:X(),space:L(),translate:L()},classGroups:{aspect:[{aspect:["auto","square","video",St]}],container:["container"],columns:[{columns:[mu]}],"break-after":[{"break-after":re()}],"break-before":[{"break-before":re()}],"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:[...U(),St]}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[h]}],"inset-x":[{"inset-x":[h]}],"inset-y":[{"inset-y":[h]}],start:[{start:[h]}],end:[{end:[h]}],top:[{top:[h]}],right:[{right:[h]}],bottom:[{bottom:[h]}],left:[{left:[h]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",my,St]}],basis:[{basis:M()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",St]}],grow:[{grow:ee()}],shrink:[{shrink:ee()}],order:[{order:["first","last","none",my,St]}],"grid-cols":[{"grid-cols":[gy]}],"col-start-end":[{col:["auto",{span:["full",my,St]},St]}],"col-start":[{"col-start":j()}],"col-end":[{"col-end":j()}],"grid-rows":[{"grid-rows":[gy]}],"row-start-end":[{row:["auto",{span:[my,St]},St]}],"row-start":[{"row-start":j()}],"row-end":[{"row-end":j()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",St]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",St]}],gap:[{gap:[d]}],"gap-x":[{"gap-x":[d]}],"gap-y":[{"gap-y":[d]}],"justify-content":[{justify:["normal",...H()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...H(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...H(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],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":[R]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[R]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",St,e]}],"min-w":[{"min-w":[St,e,"min","max","fit"]}],"max-w":[{"max-w":[St,e,"none","full","min","max","fit","prose",{screen:[mu]},mu]}],h:[{h:[St,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[St,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[St,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[St,e,"auto","min","max","fit"]}],"font-size":[{text:["base",mu,pu]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ZP]}],"font-family":[{font:[gy]}],"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",St]}],"line-clamp":[{"line-clamp":["none",Om,ZP]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Hl,St]}],"list-image":[{"list-image":["none",St]}],"list-style-type":[{list:["none","disc","decimal",St]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Y(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Hl,pu]}],"underline-offset":[{"underline-offset":["auto",Hl,St]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:L()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",St]}],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",St]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...U(),uhe]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",che]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},fhe]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[o]}],"border-w-x":[{"border-x":[o]}],"border-w-y":[{"border-y":[o]}],"border-w-s":[{"border-s":[o]}],"border-w-e":[{"border-e":[o]}],"border-w-t":[{"border-t":[o]}],"border-w-r":[{"border-r":[o]}],"border-w-b":[{"border-b":[o]}],"border-w-l":[{"border-l":[o]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[...Y(),"hidden"]}],"divide-x":[{"divide-x":[o]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[o]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:Y()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...Y()]}],"outline-offset":[{"outline-offset":[Hl,St]}],"outline-w":[{outline:[Hl,pu]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:I()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[Hl,pu]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",mu,hhe]}],"shadow-color":[{shadow:[gy]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...W(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":W()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",mu,St]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[l]}],saturate:[{saturate:[w]}],sepia:[{sepia:[A]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[l]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[A]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",St]}],duration:[{duration:X()}],ease:[{ease:["linear","in","out","in-out",St]}],delay:[{delay:X()}],animate:[{animate:["none","spin","ping","pulse","bounce",St]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[my,St]}],"translate-x":[{"translate-x":[E]}],"translate-y":[{"translate-y":[E]}],"skew-x":[{"skew-x":[k]}],"skew-y":[{"skew-y":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",St]}],accent:[{accent:["auto",t]}],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",St]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"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",St]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[Hl,pu,ZP]}],stroke:[{stroke:[t,"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"]}}},yhe=Zfe(vhe);function ce(...t){return yhe(hp(t))}const bhe=_.forwardRef(({className:t,...e},n)=>P.jsx(Efe,{ref:n,className:ce("border-b",t),...e}));bhe.displayName="AccordionItem";const whe=_.forwardRef(({className:t,children:e,...n},r)=>P.jsx(Cfe,{className:"flex",children:P.jsxs(uV,{ref:r,className:ce("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",t),...n,children:[e,P.jsx($1,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));whe.displayName=uV.displayName;const _he=_.forwardRef(({className:t,children:e,...n},r)=>P.jsx(dV,{ref:r,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:P.jsx("div",{className:ce("pb-4 pt-0",t),children:e})}));_he.displayName=dV.displayName;const Q3=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,J3=hp,Ho=(t,e)=>n=>{var r;if((e==null?void 0:e.variants)==null)return J3(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:i}=e,a=Object.keys(s).map(u=>{const f=n==null?void 0:n[u],l=i==null?void 0:i[u];if(f===null)return null;const d=Q3(f)||Q3(l);return s[u][d]}),o=n&&Object.entries(n).reduce((u,f)=>{let[l,d]=f;return d===void 0||(u[l]=d),u},{}),c=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((u,f)=>{let{class:l,className:d,...m}=f;return Object.entries(m).every(p=>{let[h,y]=p;return Array.isArray(y)?y.includes({...i,...o}[h]):{...i,...o}[h]===y})?[...u,l,d]:u},[]);return J3(t,a,c,n==null?void 0:n.class,n==null?void 0:n.className)},xhe=Ho("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),She=_.forwardRef(({className:t,variant:e,...n},r)=>P.jsx("div",{ref:r,role:"alert",className:ce(xhe({variant:e}),t),...n}));She.displayName="Alert";const Ehe=_.forwardRef(({className:t,...e},n)=>P.jsx("h5",{ref:n,className:ce("mb-1 font-medium leading-none tracking-tight",t),...e}));Ehe.displayName="AlertTitle";const Che=_.forwardRef(({className:t,...e},n)=>P.jsx("div",{ref:n,className:ce("text-sm [&_p]:leading-relaxed",t),...e}));Che.displayName="AlertDescription";function bV(t,e=globalThis==null?void 0:globalThis.document){const n=Ut(t);_.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return e.addEventListener("keydown",r,{capture:!0}),()=>e.removeEventListener("keydown",r,{capture:!0})},[n,e])}var Ahe="DismissableLayer",LD="dismissableLayer.update",Rhe="dismissableLayer.pointerDownOutside",Phe="dismissableLayer.focusOutside",Z3,wV=_.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Jc=_.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:a,onDismiss:o,...c}=t,u=_.useContext(wV),[f,l]=_.useState(null),d=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=_.useState({}),p=tt(e,R=>l(R)),h=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=h.indexOf(y),v=f?h.indexOf(f):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,x=v>=g,A=khe(R=>{const E=R.target,T=[...u.branches].some(D=>D.contains(E));!x||T||(s==null||s(R),a==null||a(R),R.defaultPrevented||o==null||o())},d),k=Dhe(R=>{const E=R.target;[...u.branches].some(D=>D.contains(E))||(i==null||i(R),a==null||a(R),R.defaultPrevented||o==null||o())},d);return bV(R=>{v===u.layers.size-1&&(r==null||r(R),!R.defaultPrevented&&o&&(R.preventDefault(),o()))},d),_.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Z3=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),ez(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=Z3)}},[f,d,n,u]),_.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),ez())},[f,u]),_.useEffect(()=>{const R=()=>m({});return document.addEventListener(LD,R),()=>document.removeEventListener(LD,R)},[]),P.jsx(De.div,{...c,ref:p,style:{pointerEvents:w?x?"auto":"none":void 0,...t.style},onFocusCapture:me(t.onFocusCapture,k.onFocusCapture),onBlurCapture:me(t.onBlurCapture,k.onBlurCapture),onPointerDownCapture:me(t.onPointerDownCapture,A.onPointerDownCapture)})});Jc.displayName=Ahe;var The="DismissableLayerBranch",_V=_.forwardRef((t,e)=>{const n=_.useContext(wV),r=_.useRef(null),s=tt(e,r);return _.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),P.jsx(De.div,{...t,ref:s})});_V.displayName=The;function khe(t,e=globalThis==null?void 0:globalThis.document){const n=Ut(t),r=_.useRef(!1),s=_.useRef(()=>{});return _.useEffect(()=>{const i=o=>{if(o.target&&!r.current){let c=function(){xV(Rhe,n,u,{discrete:!0})};const u={originalEvent:o};o.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=c,e.addEventListener("click",s.current,{once:!0})):c()}else e.removeEventListener("click",s.current);r.current=!1},a=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),e.removeEventListener("pointerdown",i),e.removeEventListener("click",s.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function Dhe(t,e=globalThis==null?void 0:globalThis.document){const n=Ut(t),r=_.useRef(!1);return _.useEffect(()=>{const s=i=>{i.target&&!r.current&&xV(Phe,n,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ez(){const t=new CustomEvent(LD);document.dispatchEvent(t)}function xV(t,e,n,{discrete:r}){const s=n.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&s.addEventListener(t,e,{once:!0}),r?Wb(s,i):s.dispatchEvent(i)}var Nhe=Jc,Mhe=_V,eT="focusScope.autoFocusOnMount",tT="focusScope.autoFocusOnUnmount",tz={bubbles:!1,cancelable:!0},Ohe="FocusScope",i0=_.forwardRef((t,e)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...a}=t,[o,c]=_.useState(null),u=Ut(s),f=Ut(i),l=_.useRef(null),d=tt(e,h=>c(h)),m=_.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;_.useEffect(()=>{if(r){let h=function(w){if(m.paused||!o)return;const x=w.target;o.contains(x)?l.current=x:bu(l.current,{select:!0})},y=function(w){if(m.paused||!o)return;const x=w.relatedTarget;x!==null&&(o.contains(x)||bu(l.current,{select:!0}))},g=function(w){if(document.activeElement===document.body)for(const A of w)A.removedNodes.length>0&&bu(o)};document.addEventListener("focusin",h),document.addEventListener("focusout",y);const v=new MutationObserver(g);return o&&v.observe(o,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",y),v.disconnect()}}},[r,o,m.paused]),_.useEffect(()=>{if(o){rz.add(m);const h=document.activeElement;if(!o.contains(h)){const g=new CustomEvent(eT,tz);o.addEventListener(eT,u),o.dispatchEvent(g),g.defaultPrevented||(Lhe(zhe(SV(o)),{select:!0}),document.activeElement===h&&bu(o))}return()=>{o.removeEventListener(eT,u),setTimeout(()=>{const g=new CustomEvent(tT,tz);o.addEventListener(tT,f),o.dispatchEvent(g),g.defaultPrevented||bu(h??document.body,{select:!0}),o.removeEventListener(tT,f),rz.remove(m)},0)}}},[o,u,f,m]);const p=_.useCallback(h=>{if(!n&&!r||m.paused)return;const y=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,g=document.activeElement;if(y&&g){const v=h.currentTarget,[w,x]=Ihe(v);w&&x?!h.shiftKey&&g===x?(h.preventDefault(),n&&bu(w,{select:!0})):h.shiftKey&&g===w&&(h.preventDefault(),n&&bu(x,{select:!0})):g===v&&h.preventDefault()}},[n,r,m.paused]);return P.jsx(De.div,{tabIndex:-1,...a,ref:d,onKeyDown:p})});i0.displayName=Ohe;function Lhe(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(bu(r,{select:e}),document.activeElement!==n)return}function Ihe(t){const e=SV(t),n=nz(e,t),r=nz(e.reverse(),t);return[n,r]}function SV(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function nz(t,e){for(const n of t)if(!$he(n,{upTo:e}))return n}function $he(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function jhe(t){return t instanceof HTMLInputElement&&"select"in t}function bu(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&jhe(t)&&e&&t.select()}}var rz=Fhe();function Fhe(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=sz(t,e),t.unshift(e)},remove(e){var n;t=sz(t,e),(n=t[0])==null||n.resume()}}}function sz(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}function zhe(t){return t.filter(e=>e.tagName!=="A")}var Bhe="Portal",Sv=_.forwardRef((t,e)=>{var o;const{container:n,...r}=t,[s,i]=_.useState(!1);Ln(()=>i(!0),[]);const a=n||s&&((o=globalThis==null?void 0:globalThis.document)==null?void 0:o.body);return a?t0.createPortal(P.jsx(De.div,{...r,ref:e}),a):null});Sv.displayName=Bhe;var nT=0;function F1(){_.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??iz()),document.body.insertAdjacentElement("beforeend",t[1]??iz()),nT++,()=>{nT===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),nT--}},[])}function iz(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",t}var fr=function(){return fr=Object.assign||function(e){for(var n,r=1,s=arguments.length;r"u")return epe;var e=tpe(t),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-n+e[2]-e[0])}},rpe=U1(),$m="data-scroll-locked",spe=function(t,e,n,r){var s=t.left,i=t.top,a=t.right,o=t.gap;return n===void 0&&(n="margin"),` + .`.concat(Uhe,` { overflow: hidden `).concat(r,`; padding-right: `).concat(o,"px ").concat(r,`; } @@ -183,22 +183,22 @@ Error generating stack: `+i.message+` } body[`).concat($m,`] { - `).concat(Bhe,": ").concat(o,`px; + `).concat(Hhe,": ").concat(o,`px; } -`)},az=function(){var t=parseInt(document.body.getAttribute($m)||"0",10);return isFinite(t)?t:0},rpe=function(){_.useEffect(function(){return document.body.setAttribute($m,(az()+1).toString()),function(){var t=az()-1;t<=0?document.body.removeAttribute($m):document.body.setAttribute($m,t.toString())}},[])},SL=function(t){var e=t.noRelative,n=t.noImportant,r=t.gapMode,s=r===void 0?"margin":r;rpe();var i=_.useMemo(function(){return epe(s)},[s]);return _.createElement(tpe,{styles:npe(i,!e,s,n?"":"!important")})},ID=!1;if(typeof window<"u")try{var Zx=Object.defineProperty({},"passive",{get:function(){return ID=!0,!0}});window.addEventListener("test",Zx,Zx),window.removeEventListener("test",Zx,Zx)}catch{ID=!1}var $p=ID?{passive:!1}:!1,spe=function(t){return t.tagName==="TEXTAREA"},AV=function(t,e){var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!spe(t)&&n[e]==="visible")},ipe=function(t){return AV(t,"overflowY")},ope=function(t){return AV(t,"overflowX")},lz=function(t,e){var n=e.ownerDocument,r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=RV(t,r);if(s){var i=PV(t,r),a=i[1],o=i[2];if(a>o)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},ape=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},lpe=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},RV=function(t,e){return t==="v"?ipe(e):ope(e)},PV=function(t,e){return t==="v"?ape(e):lpe(e)},cpe=function(t,e){return t==="h"&&e==="rtl"?-1:1},upe=function(t,e,n,r,s){var i=cpe(t,window.getComputedStyle(e).direction),a=i*r,o=n.target,c=e.contains(o),u=!1,f=a>0,l=0,d=0;do{var m=PV(t,o),p=m[0],h=m[1],y=m[2],g=h-y-i*p;(p||g)&&RV(t,o)&&(l+=g,d+=p),o instanceof ShadowRoot?o=o.host:o=o.parentNode}while(!c&&o!==document.body||c&&(e.contains(o)||e===o));return(f&&Math.abs(l)<1||!f&&Math.abs(d)<1)&&(u=!0),u},eS=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},cz=function(t){return[t.deltaX,t.deltaY]},uz=function(t){return t&&"current"in t?t.current:t},dpe=function(t,e){return t[0]===e[0]&&t[1]===e[1]},fpe=function(t){return` +`)},az=function(){var t=parseInt(document.body.getAttribute($m)||"0",10);return isFinite(t)?t:0},ipe=function(){_.useEffect(function(){return document.body.setAttribute($m,(az()+1).toString()),function(){var t=az()-1;t<=0?document.body.removeAttribute($m):document.body.setAttribute($m,t.toString())}},[])},SL=function(t){var e=t.noRelative,n=t.noImportant,r=t.gapMode,s=r===void 0?"margin":r;ipe();var i=_.useMemo(function(){return npe(s)},[s]);return _.createElement(rpe,{styles:spe(i,!e,s,n?"":"!important")})},ID=!1;if(typeof window<"u")try{var Zx=Object.defineProperty({},"passive",{get:function(){return ID=!0,!0}});window.addEventListener("test",Zx,Zx),window.removeEventListener("test",Zx,Zx)}catch{ID=!1}var $p=ID?{passive:!1}:!1,ope=function(t){return t.tagName==="TEXTAREA"},AV=function(t,e){var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!ope(t)&&n[e]==="visible")},ape=function(t){return AV(t,"overflowY")},lpe=function(t){return AV(t,"overflowX")},lz=function(t,e){var n=e.ownerDocument,r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=RV(t,r);if(s){var i=PV(t,r),a=i[1],o=i[2];if(a>o)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},cpe=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},upe=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},RV=function(t,e){return t==="v"?ape(e):lpe(e)},PV=function(t,e){return t==="v"?cpe(e):upe(e)},dpe=function(t,e){return t==="h"&&e==="rtl"?-1:1},fpe=function(t,e,n,r,s){var i=dpe(t,window.getComputedStyle(e).direction),a=i*r,o=n.target,c=e.contains(o),u=!1,f=a>0,l=0,d=0;do{var m=PV(t,o),p=m[0],h=m[1],y=m[2],g=h-y-i*p;(p||g)&&RV(t,o)&&(l+=g,d+=p),o instanceof ShadowRoot?o=o.host:o=o.parentNode}while(!c&&o!==document.body||c&&(e.contains(o)||e===o));return(f&&Math.abs(l)<1||!f&&Math.abs(d)<1)&&(u=!0),u},eS=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},cz=function(t){return[t.deltaX,t.deltaY]},uz=function(t){return t&&"current"in t?t.current:t},hpe=function(t,e){return t[0]===e[0]&&t[1]===e[1]},ppe=function(t){return` .block-interactivity-`.concat(t,` {pointer-events: none;} .allow-interactivity-`).concat(t,` {pointer-events: all;} -`)},hpe=0,jp=[];function ppe(t){var e=_.useRef([]),n=_.useRef([0,0]),r=_.useRef(),s=_.useState(hpe++)[0],i=_.useState(UC)[0],a=_.useRef(t);_.useEffect(function(){a.current=t},[t]),_.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var h=bL([t.lockRef.current],(t.shards||[]).map(uz),!0).filter(Boolean);return h.forEach(function(y){return y.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),h.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var o=_.useCallback(function(h,y){if("touches"in h&&h.touches.length===2)return!a.current.allowPinchZoom;var g=eS(h),v=n.current,w="deltaX"in h?h.deltaX:v[0]-g[0],x="deltaY"in h?h.deltaY:v[1]-g[1],A,k=h.target,R=Math.abs(w)>Math.abs(x)?"h":"v";if("touches"in h&&R==="h"&&k.type==="range")return!1;var E=lz(R,k);if(!E)return!0;if(E?A=R:(A=R==="v"?"h":"v",E=lz(R,k)),!E)return!1;if(!r.current&&"changedTouches"in h&&(w||x)&&(r.current=A),!A)return!0;var T=r.current||A;return upe(T,y,h,T==="h"?w:x)},[]),c=_.useCallback(function(h){var y=h;if(!(!jp.length||jp[jp.length-1]!==i)){var g="deltaY"in y?cz(y):eS(y),v=e.current.filter(function(A){return A.name===y.type&&(A.target===y.target||y.target===A.shadowParent)&&dpe(A.delta,g)})[0];if(v&&v.should){y.cancelable&&y.preventDefault();return}if(!v){var w=(a.current.shards||[]).map(uz).filter(Boolean).filter(function(A){return A.contains(y.target)}),x=w.length>0?o(y,w[0]):!a.current.noIsolation;x&&y.cancelable&&y.preventDefault()}}},[]),u=_.useCallback(function(h,y,g,v){var w={name:h,delta:y,target:g,should:v,shadowParent:mpe(g)};e.current.push(w),setTimeout(function(){e.current=e.current.filter(function(x){return x!==w})},1)},[]),f=_.useCallback(function(h){n.current=eS(h),r.current=void 0},[]),l=_.useCallback(function(h){u(h.type,cz(h),h.target,o(h,t.lockRef.current))},[]),d=_.useCallback(function(h){u(h.type,eS(h),h.target,o(h,t.lockRef.current))},[]);_.useEffect(function(){return jp.push(i),t.setCallbacks({onScrollCapture:l,onWheelCapture:l,onTouchMoveCapture:d}),document.addEventListener("wheel",c,$p),document.addEventListener("touchmove",c,$p),document.addEventListener("touchstart",f,$p),function(){jp=jp.filter(function(h){return h!==i}),document.removeEventListener("wheel",c,$p),document.removeEventListener("touchmove",c,$p),document.removeEventListener("touchstart",f,$p)}},[]);var m=t.removeScrollBar,p=t.inert;return _.createElement(_.Fragment,null,p?_.createElement(i,{styles:fpe(s)}):null,m?_.createElement(SL,{gapMode:t.gapMode}):null)}function mpe(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const gpe=xL(CV,ppe);var o_=_.forwardRef(function(t,e){return _.createElement(BC,fr({},t,{ref:e,sideCar:gpe}))});o_.classNames=BC.classNames;var vpe=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Fp=new WeakMap,tS=new WeakMap,nS={},oT=0,TV=function(t){return t&&(t.host||TV(t.parentNode))},ype=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=TV(n);return r&&t.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},bpe=function(t,e,n,r){var s=ype(e,Array.isArray(t)?t:[t]);nS[n]||(nS[n]=new WeakMap);var i=nS[n],a=[],o=new Set,c=new Set(s),u=function(l){!l||o.has(l)||(o.add(l),u(l.parentNode))};s.forEach(u);var f=function(l){!l||c.has(l)||Array.prototype.forEach.call(l.children,function(d){if(o.has(d))f(d);else try{var m=d.getAttribute(r),p=m!==null&&m!=="false",h=(Fp.get(d)||0)+1,y=(i.get(d)||0)+1;Fp.set(d,h),i.set(d,y),a.push(d),h===1&&p&&tS.set(d,!0),y===1&&d.setAttribute(n,"true"),p||d.setAttribute(r,"true")}catch(g){console.error("aria-hidden: cannot operate on ",d,g)}})};return f(e),o.clear(),oT++,function(){a.forEach(function(l){var d=Fp.get(l)-1,m=i.get(l)-1;Fp.set(l,d),i.set(l,m),d||(tS.has(l)||l.removeAttribute(r),tS.delete(l)),m||l.removeAttribute(n)}),oT--,oT||(Fp=new WeakMap,Fp=new WeakMap,tS=new WeakMap,nS={})}},Ev=function(t,e,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),s=vpe(t);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live]"))),bpe(r,s,n,"aria-hidden")):function(){return null}},EL="Dialog",[kV,DV]=Tn(EL),[wpe,Oa]=kV(EL),NV=t=>{const{__scopeDialog:e,children:n,open:r,defaultOpen:s,onOpenChange:i,modal:a=!0}=t,o=_.useRef(null),c=_.useRef(null),[u=!1,f]=sr({prop:r,defaultProp:s,onChange:i});return P.jsx(wpe,{scope:e,triggerRef:o,contentRef:c,contentId:Vr(),titleId:Vr(),descriptionId:Vr(),open:u,onOpenChange:f,onOpenToggle:_.useCallback(()=>f(l=>!l),[f]),modal:a,children:n})};NV.displayName=EL;var MV="DialogTrigger",OV=_.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Oa(MV,n),i=tt(e,s.triggerRef);return P.jsx(De.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":RL(s.open),...r,ref:i,onClick:me(t.onClick,s.onOpenToggle)})});OV.displayName=MV;var CL="DialogPortal",[_pe,LV]=kV(CL,{forceMount:void 0}),IV=t=>{const{__scopeDialog:e,forceMount:n,children:r,container:s}=t,i=Oa(CL,e);return P.jsx(_pe,{scope:e,forceMount:n,children:_.Children.map(r,a=>P.jsx(Hn,{present:n||i.open,children:P.jsx(Sv,{asChild:!0,container:s,children:a})}))})};IV.displayName=CL;var t1="DialogOverlay",$V=_.forwardRef((t,e)=>{const n=LV(t1,t.__scopeDialog),{forceMount:r=n.forceMount,...s}=t,i=Oa(t1,t.__scopeDialog);return i.modal?P.jsx(Hn,{present:r||i.open,children:P.jsx(xpe,{...s,ref:e})}):null});$V.displayName=t1;var xpe=_.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Oa(t1,n);return P.jsx(o_,{as:Ra,allowPinchZoom:!0,shards:[s.contentRef],children:P.jsx(De.div,{"data-state":RL(s.open),...r,ref:e,style:{pointerEvents:"auto",...r.style}})})}),qh="DialogContent",jV=_.forwardRef((t,e)=>{const n=LV(qh,t.__scopeDialog),{forceMount:r=n.forceMount,...s}=t,i=Oa(qh,t.__scopeDialog);return P.jsx(Hn,{present:r||i.open,children:i.modal?P.jsx(Spe,{...s,ref:e}):P.jsx(Epe,{...s,ref:e})})});jV.displayName=qh;var Spe=_.forwardRef((t,e)=>{const n=Oa(qh,t.__scopeDialog),r=_.useRef(null),s=tt(e,n.contentRef,r);return _.useEffect(()=>{const i=r.current;if(i)return Ev(i)},[]),P.jsx(FV,{...t,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:me(t.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:me(t.onPointerDownOutside,i=>{const a=i.detail.originalEvent,o=a.button===0&&a.ctrlKey===!0;(a.button===2||o)&&i.preventDefault()}),onFocusOutside:me(t.onFocusOutside,i=>i.preventDefault())})}),Epe=_.forwardRef((t,e)=>{const n=Oa(qh,t.__scopeDialog),r=_.useRef(!1),s=_.useRef(!1);return P.jsx(FV,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a,o;(a=t.onCloseAutoFocus)==null||a.call(t,i),i.defaultPrevented||(r.current||(o=n.triggerRef.current)==null||o.focus(),i.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:i=>{var c,u;(c=t.onInteractOutside)==null||c.call(t,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const a=i.target;((u=n.triggerRef.current)==null?void 0:u.contains(a))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),FV=_.forwardRef((t,e)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:i,...a}=t,o=Oa(qh,n),c=_.useRef(null),u=tt(e,c);return FC(),P.jsxs(P.Fragment,{children:[P.jsx(i_,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:i,children:P.jsx(Jc,{role:"dialog",id:o.contentId,"aria-describedby":o.descriptionId,"aria-labelledby":o.titleId,"data-state":RL(o.open),...a,ref:u,onDismiss:()=>o.onOpenChange(!1)})}),P.jsxs(P.Fragment,{children:[P.jsx(Ape,{titleId:o.titleId}),P.jsx(Ppe,{contentRef:c,descriptionId:o.descriptionId})]})]})}),AL="DialogTitle",zV=_.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Oa(AL,n);return P.jsx(De.h2,{id:s.titleId,...r,ref:e})});zV.displayName=AL;var BV="DialogDescription",UV=_.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Oa(BV,n);return P.jsx(De.p,{id:s.descriptionId,...r,ref:e})});UV.displayName=BV;var HV="DialogClose",WV=_.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Oa(HV,n);return P.jsx(De.button,{type:"button",...r,ref:e,onClick:me(t.onClick,()=>s.onOpenChange(!1))})});WV.displayName=HV;function RL(t){return t?"open":"closed"}var VV="DialogTitleWarning",[Cpe,qV]=qde(VV,{contentName:qh,titleName:AL,docsSlug:"dialog"}),Ape=({titleId:t})=>{const e=qV(VV),n=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users. +`)},mpe=0,jp=[];function gpe(t){var e=_.useRef([]),n=_.useRef([0,0]),r=_.useRef(),s=_.useState(mpe++)[0],i=_.useState(U1)[0],a=_.useRef(t);_.useEffect(function(){a.current=t},[t]),_.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var h=bL([t.lockRef.current],(t.shards||[]).map(uz),!0).filter(Boolean);return h.forEach(function(y){return y.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),h.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var o=_.useCallback(function(h,y){if("touches"in h&&h.touches.length===2)return!a.current.allowPinchZoom;var g=eS(h),v=n.current,w="deltaX"in h?h.deltaX:v[0]-g[0],x="deltaY"in h?h.deltaY:v[1]-g[1],A,k=h.target,R=Math.abs(w)>Math.abs(x)?"h":"v";if("touches"in h&&R==="h"&&k.type==="range")return!1;var E=lz(R,k);if(!E)return!0;if(E?A=R:(A=R==="v"?"h":"v",E=lz(R,k)),!E)return!1;if(!r.current&&"changedTouches"in h&&(w||x)&&(r.current=A),!A)return!0;var T=r.current||A;return fpe(T,y,h,T==="h"?w:x)},[]),c=_.useCallback(function(h){var y=h;if(!(!jp.length||jp[jp.length-1]!==i)){var g="deltaY"in y?cz(y):eS(y),v=e.current.filter(function(A){return A.name===y.type&&(A.target===y.target||y.target===A.shadowParent)&&hpe(A.delta,g)})[0];if(v&&v.should){y.cancelable&&y.preventDefault();return}if(!v){var w=(a.current.shards||[]).map(uz).filter(Boolean).filter(function(A){return A.contains(y.target)}),x=w.length>0?o(y,w[0]):!a.current.noIsolation;x&&y.cancelable&&y.preventDefault()}}},[]),u=_.useCallback(function(h,y,g,v){var w={name:h,delta:y,target:g,should:v,shadowParent:vpe(g)};e.current.push(w),setTimeout(function(){e.current=e.current.filter(function(x){return x!==w})},1)},[]),f=_.useCallback(function(h){n.current=eS(h),r.current=void 0},[]),l=_.useCallback(function(h){u(h.type,cz(h),h.target,o(h,t.lockRef.current))},[]),d=_.useCallback(function(h){u(h.type,eS(h),h.target,o(h,t.lockRef.current))},[]);_.useEffect(function(){return jp.push(i),t.setCallbacks({onScrollCapture:l,onWheelCapture:l,onTouchMoveCapture:d}),document.addEventListener("wheel",c,$p),document.addEventListener("touchmove",c,$p),document.addEventListener("touchstart",f,$p),function(){jp=jp.filter(function(h){return h!==i}),document.removeEventListener("wheel",c,$p),document.removeEventListener("touchmove",c,$p),document.removeEventListener("touchstart",f,$p)}},[]);var m=t.removeScrollBar,p=t.inert;return _.createElement(_.Fragment,null,p?_.createElement(i,{styles:ppe(s)}):null,m?_.createElement(SL,{gapMode:t.gapMode}):null)}function vpe(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const ype=xL(CV,gpe);var o0=_.forwardRef(function(t,e){return _.createElement(B1,fr({},t,{ref:e,sideCar:ype}))});o0.classNames=B1.classNames;var bpe=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},Fp=new WeakMap,tS=new WeakMap,nS={},oT=0,TV=function(t){return t&&(t.host||TV(t.parentNode))},wpe=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=TV(n);return r&&t.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},_pe=function(t,e,n,r){var s=wpe(e,Array.isArray(t)?t:[t]);nS[n]||(nS[n]=new WeakMap);var i=nS[n],a=[],o=new Set,c=new Set(s),u=function(l){!l||o.has(l)||(o.add(l),u(l.parentNode))};s.forEach(u);var f=function(l){!l||c.has(l)||Array.prototype.forEach.call(l.children,function(d){if(o.has(d))f(d);else try{var m=d.getAttribute(r),p=m!==null&&m!=="false",h=(Fp.get(d)||0)+1,y=(i.get(d)||0)+1;Fp.set(d,h),i.set(d,y),a.push(d),h===1&&p&&tS.set(d,!0),y===1&&d.setAttribute(n,"true"),p||d.setAttribute(r,"true")}catch(g){console.error("aria-hidden: cannot operate on ",d,g)}})};return f(e),o.clear(),oT++,function(){a.forEach(function(l){var d=Fp.get(l)-1,m=i.get(l)-1;Fp.set(l,d),i.set(l,m),d||(tS.has(l)||l.removeAttribute(r),tS.delete(l)),m||l.removeAttribute(n)}),oT--,oT||(Fp=new WeakMap,Fp=new WeakMap,tS=new WeakMap,nS={})}},Ev=function(t,e,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),s=bpe(t);return s?(r.push.apply(r,Array.from(s.querySelectorAll("[aria-live]"))),_pe(r,s,n,"aria-hidden")):function(){return null}},EL="Dialog",[kV,DV]=Tn(EL),[xpe,Oa]=kV(EL),NV=t=>{const{__scopeDialog:e,children:n,open:r,defaultOpen:s,onOpenChange:i,modal:a=!0}=t,o=_.useRef(null),c=_.useRef(null),[u=!1,f]=sr({prop:r,defaultProp:s,onChange:i});return P.jsx(xpe,{scope:e,triggerRef:o,contentRef:c,contentId:Vr(),titleId:Vr(),descriptionId:Vr(),open:u,onOpenChange:f,onOpenToggle:_.useCallback(()=>f(l=>!l),[f]),modal:a,children:n})};NV.displayName=EL;var MV="DialogTrigger",OV=_.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Oa(MV,n),i=tt(e,s.triggerRef);return P.jsx(De.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":RL(s.open),...r,ref:i,onClick:me(t.onClick,s.onOpenToggle)})});OV.displayName=MV;var CL="DialogPortal",[Spe,LV]=kV(CL,{forceMount:void 0}),IV=t=>{const{__scopeDialog:e,forceMount:n,children:r,container:s}=t,i=Oa(CL,e);return P.jsx(Spe,{scope:e,forceMount:n,children:_.Children.map(r,a=>P.jsx(Hn,{present:n||i.open,children:P.jsx(Sv,{asChild:!0,container:s,children:a})}))})};IV.displayName=CL;var tC="DialogOverlay",$V=_.forwardRef((t,e)=>{const n=LV(tC,t.__scopeDialog),{forceMount:r=n.forceMount,...s}=t,i=Oa(tC,t.__scopeDialog);return i.modal?P.jsx(Hn,{present:r||i.open,children:P.jsx(Epe,{...s,ref:e})}):null});$V.displayName=tC;var Epe=_.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Oa(tC,n);return P.jsx(o0,{as:Ra,allowPinchZoom:!0,shards:[s.contentRef],children:P.jsx(De.div,{"data-state":RL(s.open),...r,ref:e,style:{pointerEvents:"auto",...r.style}})})}),qh="DialogContent",jV=_.forwardRef((t,e)=>{const n=LV(qh,t.__scopeDialog),{forceMount:r=n.forceMount,...s}=t,i=Oa(qh,t.__scopeDialog);return P.jsx(Hn,{present:r||i.open,children:i.modal?P.jsx(Cpe,{...s,ref:e}):P.jsx(Ape,{...s,ref:e})})});jV.displayName=qh;var Cpe=_.forwardRef((t,e)=>{const n=Oa(qh,t.__scopeDialog),r=_.useRef(null),s=tt(e,n.contentRef,r);return _.useEffect(()=>{const i=r.current;if(i)return Ev(i)},[]),P.jsx(FV,{...t,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:me(t.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:me(t.onPointerDownOutside,i=>{const a=i.detail.originalEvent,o=a.button===0&&a.ctrlKey===!0;(a.button===2||o)&&i.preventDefault()}),onFocusOutside:me(t.onFocusOutside,i=>i.preventDefault())})}),Ape=_.forwardRef((t,e)=>{const n=Oa(qh,t.__scopeDialog),r=_.useRef(!1),s=_.useRef(!1);return P.jsx(FV,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a,o;(a=t.onCloseAutoFocus)==null||a.call(t,i),i.defaultPrevented||(r.current||(o=n.triggerRef.current)==null||o.focus(),i.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:i=>{var c,u;(c=t.onInteractOutside)==null||c.call(t,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const a=i.target;((u=n.triggerRef.current)==null?void 0:u.contains(a))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),FV=_.forwardRef((t,e)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:i,...a}=t,o=Oa(qh,n),c=_.useRef(null),u=tt(e,c);return F1(),P.jsxs(P.Fragment,{children:[P.jsx(i0,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:i,children:P.jsx(Jc,{role:"dialog",id:o.contentId,"aria-describedby":o.descriptionId,"aria-labelledby":o.titleId,"data-state":RL(o.open),...a,ref:u,onDismiss:()=>o.onOpenChange(!1)})}),P.jsxs(P.Fragment,{children:[P.jsx(Ppe,{titleId:o.titleId}),P.jsx(kpe,{contentRef:c,descriptionId:o.descriptionId})]})]})}),AL="DialogTitle",zV=_.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Oa(AL,n);return P.jsx(De.h2,{id:s.titleId,...r,ref:e})});zV.displayName=AL;var BV="DialogDescription",UV=_.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Oa(BV,n);return P.jsx(De.p,{id:s.descriptionId,...r,ref:e})});UV.displayName=BV;var HV="DialogClose",WV=_.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Oa(HV,n);return P.jsx(De.button,{type:"button",...r,ref:e,onClick:me(t.onClick,()=>s.onOpenChange(!1))})});WV.displayName=HV;function RL(t){return t?"open":"closed"}var VV="DialogTitleWarning",[Rpe,qV]=Kde(VV,{contentName:qh,titleName:AL,docsSlug:"dialog"}),Ppe=({titleId:t})=>{const e=qV(VV),n=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users. If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component. -For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return _.useEffect(()=>{t&&(document.getElementById(t)||console.error(n))},[n,t]),null},Rpe="DialogDescriptionWarning",Ppe=({contentRef:t,descriptionId:e})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${qV(Rpe).contentName}}.`;return _.useEffect(()=>{var i;const s=(i=t.current)==null?void 0:i.getAttribute("aria-describedby");e&&s&&(document.getElementById(e)||console.warn(r))},[r,t,e]),null},PL=NV,TL=OV,kL=IV,a_=$V,l_=jV,c_=zV,u_=UV,d_=WV,GV="AlertDialog",[Tpe,DHe]=Tn(GV,[DV]),Zc=DV(),KV=t=>{const{__scopeAlertDialog:e,...n}=t,r=Zc(e);return P.jsx(PL,{...r,...n,modal:!0})};KV.displayName=GV;var kpe="AlertDialogTrigger",YV=_.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,s=Zc(n);return P.jsx(TL,{...s,...r,ref:e})});YV.displayName=kpe;var Dpe="AlertDialogPortal",XV=t=>{const{__scopeAlertDialog:e,...n}=t,r=Zc(e);return P.jsx(kL,{...r,...n})};XV.displayName=Dpe;var Npe="AlertDialogOverlay",QV=_.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,s=Zc(n);return P.jsx(a_,{...s,...r,ref:e})});QV.displayName=Npe;var jm="AlertDialogContent",[Mpe,Ope]=Tpe(jm),JV=_.forwardRef((t,e)=>{const{__scopeAlertDialog:n,children:r,...s}=t,i=Zc(n),a=_.useRef(null),o=tt(e,a),c=_.useRef(null);return P.jsx(Cpe,{contentName:jm,titleName:ZV,docsSlug:"alert-dialog",children:P.jsx(Mpe,{scope:n,cancelRef:c,children:P.jsxs(l_,{role:"alertdialog",...i,...s,ref:o,onOpenAutoFocus:me(s.onOpenAutoFocus,u=>{var f;u.preventDefault(),(f=c.current)==null||f.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[P.jsx(lL,{children:r}),P.jsx(Ipe,{contentRef:a})]})})})});JV.displayName=jm;var ZV="AlertDialogTitle",e6=_.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,s=Zc(n);return P.jsx(c_,{...s,...r,ref:e})});e6.displayName=ZV;var t6="AlertDialogDescription",n6=_.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,s=Zc(n);return P.jsx(u_,{...s,...r,ref:e})});n6.displayName=t6;var Lpe="AlertDialogAction",r6=_.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,s=Zc(n);return P.jsx(d_,{...s,...r,ref:e})});r6.displayName=Lpe;var s6="AlertDialogCancel",i6=_.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,{cancelRef:s}=Ope(s6,n),i=Zc(n),a=tt(e,s);return P.jsx(d_,{...i,...r,ref:a})});i6.displayName=s6;var Ipe=({contentRef:t})=>{const e=`\`${jm}\` requires a description for the component to be accessible for screen reader users. +For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return _.useEffect(()=>{t&&(document.getElementById(t)||console.error(n))},[n,t]),null},Tpe="DialogDescriptionWarning",kpe=({contentRef:t,descriptionId:e})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${qV(Tpe).contentName}}.`;return _.useEffect(()=>{var i;const s=(i=t.current)==null?void 0:i.getAttribute("aria-describedby");e&&s&&(document.getElementById(e)||console.warn(r))},[r,t,e]),null},PL=NV,TL=OV,kL=IV,a0=$V,l0=jV,c0=zV,u0=UV,d0=WV,GV="AlertDialog",[Dpe,MHe]=Tn(GV,[DV]),Zc=DV(),KV=t=>{const{__scopeAlertDialog:e,...n}=t,r=Zc(e);return P.jsx(PL,{...r,...n,modal:!0})};KV.displayName=GV;var Npe="AlertDialogTrigger",YV=_.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,s=Zc(n);return P.jsx(TL,{...s,...r,ref:e})});YV.displayName=Npe;var Mpe="AlertDialogPortal",XV=t=>{const{__scopeAlertDialog:e,...n}=t,r=Zc(e);return P.jsx(kL,{...r,...n})};XV.displayName=Mpe;var Ope="AlertDialogOverlay",QV=_.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,s=Zc(n);return P.jsx(a0,{...s,...r,ref:e})});QV.displayName=Ope;var jm="AlertDialogContent",[Lpe,Ipe]=Dpe(jm),JV=_.forwardRef((t,e)=>{const{__scopeAlertDialog:n,children:r,...s}=t,i=Zc(n),a=_.useRef(null),o=tt(e,a),c=_.useRef(null);return P.jsx(Rpe,{contentName:jm,titleName:ZV,docsSlug:"alert-dialog",children:P.jsx(Lpe,{scope:n,cancelRef:c,children:P.jsxs(l0,{role:"alertdialog",...i,...s,ref:o,onOpenAutoFocus:me(s.onOpenAutoFocus,u=>{var f;u.preventDefault(),(f=c.current)==null||f.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[P.jsx(lL,{children:r}),P.jsx(jpe,{contentRef:a})]})})})});JV.displayName=jm;var ZV="AlertDialogTitle",e6=_.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,s=Zc(n);return P.jsx(c0,{...s,...r,ref:e})});e6.displayName=ZV;var t6="AlertDialogDescription",n6=_.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,s=Zc(n);return P.jsx(u0,{...s,...r,ref:e})});n6.displayName=t6;var $pe="AlertDialogAction",r6=_.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,s=Zc(n);return P.jsx(d0,{...s,...r,ref:e})});r6.displayName=$pe;var s6="AlertDialogCancel",i6=_.forwardRef((t,e)=>{const{__scopeAlertDialog:n,...r}=t,{cancelRef:s}=Ipe(s6,n),i=Zc(n),a=tt(e,s);return P.jsx(d0,{...i,...r,ref:a})});i6.displayName=s6;var jpe=({contentRef:t})=>{const e=`\`${jm}\` requires a description for the component to be accessible for screen reader users. You can add a description to the \`${jm}\` by passing a \`${t6}\` 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 \`${jm}\`. 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 _.useEffect(()=>{var r;document.getElementById((r=t.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(e)},[e,t]),null},$pe=KV,jpe=YV,Fpe=XV,o6=QV,a6=JV,l6=r6,c6=i6,u6=e6,d6=n6;const Vb=Ho("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Qs=_.forwardRef(({className:t,variant:e,size:n,asChild:r=!1,...s},i)=>{const a=r?Ra:"button";return P.jsx(a,{className:ce(Vb({variant:e,size:n,className:t})),ref:i,...s})});Qs.displayName="Button";const f6=$pe,NHe=jpe,zpe=Fpe,h6=_.forwardRef(({className:t,...e},n)=>P.jsx(o6,{className:ce("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",t),...e,ref:n}));h6.displayName=o6.displayName;const DL=_.forwardRef(({className:t,...e},n)=>P.jsxs(zpe,{children:[P.jsx(h6,{}),P.jsx(a6,{ref:n,className:ce("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",t),...e})]}));DL.displayName=a6.displayName;const NL=({className:t,...e})=>P.jsx("div",{className:ce("flex flex-col space-y-2 text-center sm:text-left",t),...e});NL.displayName="AlertDialogHeader";const ML=({className:t,...e})=>P.jsx("div",{className:ce("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...e});ML.displayName="AlertDialogFooter";const OL=_.forwardRef(({className:t,...e},n)=>P.jsx(u6,{ref:n,className:ce("text-lg font-semibold",t),...e}));OL.displayName=u6.displayName;const LL=_.forwardRef(({className:t,...e},n)=>P.jsx(d6,{ref:n,className:ce("text-sm text-muted-foreground",t),...e}));LL.displayName=d6.displayName;const IL=_.forwardRef(({className:t,...e},n)=>P.jsx(l6,{ref:n,className:ce(Vb(),t),...e}));IL.displayName=l6.displayName;const $L=_.forwardRef(({className:t,...e},n)=>P.jsx(c6,{ref:n,className:ce(Vb({variant:"outline"}),"mt-2 sm:mt-0",t),...e}));$L.displayName=c6.displayName;const Bpe=({textAreaRef:t,triggerAutoSize:e,maxHeight:n=Number.MAX_SAFE_INTEGER,minHeight:r=0})=>{const[s,i]=_.useState(!0);_.useEffect(()=>{if(t){s&&(t.style.minHeight=`${r+2}px`,n>r&&(t.style.maxHeight=`${n}px`),i(!1)),t.style.height=`${r+2}px`;const o=t.scrollHeight;o>n?t.style.height=`${n}px`:t.style.height=`${o+2}px`}},[t,e,s,n,r])},p6=_.forwardRef(({maxHeight:t=Number.MAX_SAFE_INTEGER,minHeight:e=52,className:n,onChange:r,value:s,...i},a)=>{const o=_.useRef(null),[c,u]=_.useState("");return Bpe({textAreaRef:o.current,triggerAutoSize:c,maxHeight:t,minHeight:e}),_.useImperativeHandle(a,()=>({textArea:o.current,focus:()=>{var f;return(f=o.current)==null?void 0:f.focus()},maxHeight:t,minHeight:e})),_.useEffect(()=>{(s||i!=null&&i.defaultValue)&&u(s)},[s||(i==null?void 0:i.defaultValue)]),P.jsx("textarea",{...i,value:s,ref:o,className:ce("flex w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background 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",n),onChange:f=>{u(f.target.value),r==null||r(f)}})});p6.displayName="AutosizeTextarea";var jL="Avatar",[Upe,MHe]=Tn(jL),[Hpe,m6]=Upe(jL),g6=_.forwardRef((t,e)=>{const{__scopeAvatar:n,...r}=t,[s,i]=_.useState("idle");return P.jsx(Hpe,{scope:n,imageLoadingStatus:s,onImageLoadingStatusChange:i,children:P.jsx(De.span,{...r,ref:e})})});g6.displayName=jL;var v6="AvatarImage",y6=_.forwardRef((t,e)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:s=()=>{},...i}=t,a=m6(v6,n),o=Wpe(r),c=Ut(u=>{s(u),a.onImageLoadingStatusChange(u)});return Ln(()=>{o!=="idle"&&c(o)},[o,c]),o==="loaded"?P.jsx(De.img,{...i,ref:e,src:r}):null});y6.displayName=v6;var b6="AvatarFallback",w6=_.forwardRef((t,e)=>{const{__scopeAvatar:n,delayMs:r,...s}=t,i=m6(b6,n),[a,o]=_.useState(r===void 0);return _.useEffect(()=>{if(r!==void 0){const c=window.setTimeout(()=>o(!0),r);return()=>window.clearTimeout(c)}},[r]),a&&i.imageLoadingStatus!=="loaded"?P.jsx(De.span,{...s,ref:e}):null});w6.displayName=b6;function Wpe(t){const[e,n]=_.useState("idle");return Ln(()=>{if(!t){n("error");return}let r=!0;const s=new window.Image,i=a=>()=>{r&&n(a)};return n("loading"),s.onload=i("loaded"),s.onerror=i("error"),s.src=t,()=>{r=!1}},[t]),e}var _6=g6,x6=y6,S6=w6;const Vpe=_.forwardRef(({className:t,...e},n)=>P.jsx(_6,{ref:n,className:ce("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",t),...e}));Vpe.displayName=_6.displayName;const qpe=_.forwardRef(({className:t,...e},n)=>P.jsx(x6,{ref:n,className:ce("aspect-square h-full w-full",t),...e}));qpe.displayName=x6.displayName;const Gpe=_.forwardRef(({className:t,...e},n)=>P.jsx(S6,{ref:n,className:ce("flex h-full w-full items-center justify-center rounded-full bg-muted",t),...e}));Gpe.displayName=S6.displayName;const Kpe=Ho("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Ype({className:t,variant:e,...n}){return P.jsx("div",{className:ce(Kpe({variant:e}),t),...n})}const mt=t=>typeof t=="string",vy=()=>{let t,e;const n=new Promise((r,s)=>{t=r,e=s});return n.resolve=t,n.reject=e,n},dz=t=>t==null?"":""+t,Xpe=(t,e,n)=>{t.forEach(r=>{e[r]&&(n[r]=e[r])})},Qpe=/###/g,fz=t=>t&&t.indexOf("###")>-1?t.replace(Qpe,"."):t,hz=t=>!t||mt(t),mb=(t,e,n)=>{const r=mt(e)?e.split("."):e;let s=0;for(;s{const{obj:r,k:s}=mb(t,e,Object);if(r!==void 0||e.length===1){r[s]=n;return}let i=e[e.length-1],a=e.slice(0,e.length-1),o=mb(t,a,Object);for(;o.obj===void 0&&a.length;)i=`${a[a.length-1]}.${i}`,a=a.slice(0,a.length-1),o=mb(t,a,Object),o&&o.obj&&typeof o.obj[`${o.k}.${i}`]<"u"&&(o.obj=void 0);o.obj[`${o.k}.${i}`]=n},Jpe=(t,e,n,r)=>{const{obj:s,k:i}=mb(t,e,Object);s[i]=s[i]||[],s[i].push(n)},n1=(t,e)=>{const{obj:n,k:r}=mb(t,e);if(n)return n[r]},Zpe=(t,e,n)=>{const r=n1(t,n);return r!==void 0?r:n1(e,n)},E6=(t,e,n)=>{for(const r in e)r!=="__proto__"&&r!=="constructor"&&(r in t?mt(t[r])||t[r]instanceof String||mt(e[r])||e[r]instanceof String?n&&(t[r]=e[r]):E6(t[r],e[r],n):t[r]=e[r]);return t},zp=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var eme={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const tme=t=>mt(t)?t.replace(/[&<>"'\/]/g,e=>eme[e]):t;class nme{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const n=this.regExpMap.get(e);if(n!==void 0)return n;const r=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}}const rme=[" ",",","?","!",";"],sme=new nme(20),ime=(t,e,n)=>{e=e||"",n=n||"";const r=rme.filter(a=>e.indexOf(a)<0&&n.indexOf(a)<0);if(r.length===0)return!0;const s=sme.getRegExp(`(${r.map(a=>a==="?"?"\\?":a).join("|")})`);let i=!s.test(t);if(!i){const a=t.indexOf(n);a>0&&!s.test(t.substring(0,a))&&(i=!0)}return i},$D=function(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!t)return;if(t[e])return t[e];const r=e.split(n);let s=t;for(let i=0;i-1&&ct&&t.replace("_","-"),ome={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console&&console[t]&&console[t].apply(console,e)}};class s1{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,n)}init(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=e||ome,this.options=n,this.debug=n.debug}log(){for(var e=arguments.length,n=new Array(e),r=0;r{this.observers[r]||(this.observers[r]=new Map);const s=this.observers[r].get(n)||0;this.observers[r].set(n,s+1)}),this}off(e,n){if(this.observers[e]){if(!n){delete this.observers[e];return}this.observers[e].delete(n)}}emit(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s{let[o,c]=a;for(let u=0;u{let[o,c]=a;for(let u=0;u1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const n=this.options.ns.indexOf(e);n>-1&&this.options.ns.splice(n,1)}getResource(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,a=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let o;e.indexOf(".")>-1?o=e.split("."):(o=[e,n],r&&(Array.isArray(r)?o.push(...r):mt(r)&&i?o.push(...r.split(i)):o.push(r)));const c=n1(this.data,o);return!c&&!n&&!r&&e.indexOf(".")>-1&&(e=o[0],n=o[1],r=o.slice(2).join(".")),c||!a||!mt(r)?c:$D(this.data&&this.data[e]&&this.data[e][n],r,i)}addResource(e,n,r,s){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let o=[e,n];r&&(o=o.concat(a?r.split(a):r)),e.indexOf(".")>-1&&(o=e.split("."),s=n,n=o[1]),this.addNamespaces(n),pz(this.data,o,s),i.silent||this.emit("added",e,n,r,s)}addResources(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const i in r)(mt(r[i])||Array.isArray(r[i]))&&this.addResource(e,n,i,r[i],{silent:!0});s.silent||this.emit("added",e,n,r)}addResourceBundle(e,n,r,s,i){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},o=[e,n];e.indexOf(".")>-1&&(o=e.split("."),s=r,r=n,n=o[1]),this.addNamespaces(n);let c=n1(this.data,o)||{};a.skipCopy||(r=JSON.parse(JSON.stringify(r))),s?E6(c,r,i):c={...c,...r},pz(this.data,o,c),a.silent||this.emit("added",e,n,r)}removeResourceBundle(e,n){this.hasResourceBundle(e,n)&&delete this.data[e][n],this.removeNamespaces(n),this.emit("removed",e,n)}hasResourceBundle(e,n){return this.getResource(e,n)!==void 0}getResourceBundle(e,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(e,n)}:this.getResource(e,n)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const n=this.getDataByLanguage(e);return!!(n&&Object.keys(n)||[]).find(s=>n[s]&&Object.keys(n[s]).length>0)}toJSON(){return this.data}}var C6={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,r,s){return t.forEach(i=>{this.processors[i]&&(e=this.processors[i].process(e,n,r,s))}),e}};const gz={};class i1 extends HC{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Xpe(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=hl.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const r=this.resolve(e,n);return r&&r.res!==void 0}extractFromKey(e,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let i=n.ns||this.options.defaultNS||[];const a=r&&e.indexOf(r)>-1,o=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!ime(e,r,s);if(a&&!o){const c=e.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:e,namespaces:mt(i)?[i]:i};const u=e.split(r);(r!==s||r===s&&this.options.ns.indexOf(u[0])>-1)&&(i=u.shift()),e=u.join(s)}return{key:e,namespaces:mt(i)?[i]:i}}translate(e,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const s=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:a,namespaces:o}=this.extractFromKey(e[e.length-1],n),c=o[o.length-1],u=n.lng||this.language,f=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(f){const x=n.nsSeparator||this.options.nsSeparator;return s?{res:`${c}${x}${a}`,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:`${c}${x}${a}`}return s?{res:a,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:a}const l=this.resolve(e,n);let d=l&&l.res;const m=l&&l.usedKey||a,p=l&&l.exactUsedKey||a,h=Object.prototype.toString.apply(d),y=["[object Number]","[object Function]","[object RegExp]"],g=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject,w=!mt(d)&&typeof d!="boolean"&&typeof d!="number";if(v&&d&&w&&y.indexOf(h)<0&&!(mt(g)&&Array.isArray(d))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const x=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,d,{...n,ns:o}):`key '${a} (${this.language})' returned an object instead of string.`;return s?(l.res=x,l.usedParams=this.getUsedParamsDetails(n),l):x}if(i){const x=Array.isArray(d),A=x?[]:{},k=x?p:m;for(const R in d)if(Object.prototype.hasOwnProperty.call(d,R)){const E=`${k}${i}${R}`;A[R]=this.translate(E,{...n,joinArrays:!1,ns:o}),A[R]===E&&(A[R]=d[R])}d=A}}else if(v&&mt(g)&&Array.isArray(d))d=d.join(g),d&&(d=this.extendTranslation(d,e,n,r));else{let x=!1,A=!1;const k=n.count!==void 0&&!mt(n.count),R=i1.hasDefaultValue(n),E=k?this.pluralResolver.getSuffix(u,n.count,n):"",T=n.ordinal&&k?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",D=k&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),M=D&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${E}`]||n[`defaultValue${T}`]||n.defaultValue;!this.isValidLookup(d)&&R&&(x=!0,d=M),this.isValidLookup(d)||(A=!0,d=a);const I=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&A?void 0:d,j=R&&M!==d&&this.options.updateMissing;if(A||x||j){if(this.logger.log(j?"updateKey":"missingKey",u,c,a,j?M:d),i){const H=this.resolve(a,{...n,keySeparator:!1});H&&H.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let U=[];const Y=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Y&&Y[0])for(let H=0;H{const X=R&&re!==d?re:I;this.options.missingKeyHandler?this.options.missingKeyHandler(H,c,ee,X,j,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(H,c,ee,X,j,n),this.emit("missingKey",H,c,ee,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&k?U.forEach(H=>{const ee=this.pluralResolver.getSuffixes(H,n);D&&n[`defaultValue${this.options.pluralSeparator}zero`]&&ee.indexOf(`${this.options.pluralSeparator}zero`)<0&&ee.push(`${this.options.pluralSeparator}zero`),ee.forEach(re=>{W([H],a+re,n[`defaultValue${re}`]||M)})}):W(U,a,M))}d=this.extendTranslation(d,e,n,l,r),A&&d===a&&this.options.appendNamespaceToMissingKey&&(d=`${c}:${a}`),(A||x)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?d=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}:${a}`:a,x?d:void 0):d=this.options.parseMissingKeyHandler(d))}return s?(l.res=d,l.usedParams=this.getUsedParamsDetails(n),l):d}extendTranslation(e,n,r,s,i){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=mt(e)&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(u){const d=e.match(this.interpolator.nestingRegexp);f=d&&d.length}let l=r.replace&&!mt(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(l={...this.options.interpolation.defaultVariables,...l}),e=this.interpolator.interpolate(e,l,r.lng||this.language||s.usedLng,r),u){const d=e.match(this.interpolator.nestingRegexp),m=d&&d.length;f1&&arguments[1]!==void 0?arguments[1]:{},r,s,i,a,o;return mt(e)&&(e=[e]),e.forEach(c=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(c,n),f=u.key;s=f;let l=u.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));const d=n.count!==void 0&&!mt(n.count),m=d&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),p=n.context!==void 0&&(mt(n.context)||typeof n.context=="number")&&n.context!=="",h=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);l.forEach(y=>{this.isValidLookup(r)||(o=y,!gz[`${h[0]}-${y}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(o)&&(gz[`${h[0]}-${y}`]=!0,this.logger.warn(`key "${s}" for languages "${h.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),h.forEach(g=>{if(this.isValidLookup(r))return;a=g;const v=[f];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(v,f,g,y,n);else{let x;d&&(x=this.pluralResolver.getSuffix(g,n.count,n));const A=`${this.options.pluralSeparator}zero`,k=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(v.push(f+x),n.ordinal&&x.indexOf(k)===0&&v.push(f+x.replace(k,this.options.pluralSeparator)),m&&v.push(f+A)),p){const R=`${f}${this.options.contextSeparator}${n.context}`;v.push(R),d&&(v.push(R+x),n.ordinal&&x.indexOf(k)===0&&v.push(R+x.replace(k,this.options.pluralSeparator)),m&&v.push(R+A))}}let w;for(;w=v.pop();)this.isValidLookup(r)||(i=w,r=this.getResource(g,y,w,n))}))})}),{res:r,usedKey:s,exactUsedKey:i,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,n,r,s):this.resourceStore.getResource(e,n,r,s)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=e.replace&&!mt(e.replace);let s=r?e.replace:e;if(r&&typeof e.count<"u"&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!r){s={...s};for(const i of n)delete s[i]}return s}static hasDefaultValue(e){const n="defaultValue";for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&n===r.substring(0,n.length)&&e[r]!==void 0)return!0;return!1}}const aT=t=>t.charAt(0).toUpperCase()+t.slice(1);class vz{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=hl.create("languageUtils")}getScriptPartFromCode(e){if(e=r1(e),!e||e.indexOf("-")<0)return null;const n=e.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(e){if(e=r1(e),!e||e.indexOf("-")<0)return e;const n=e.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(e){if(mt(e)&&e.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let s=Intl.getCanonicalLocales(e)[0];if(s&&this.options.lowerCaseLng&&(s=s.toLowerCase()),s)return s}catch{}const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=e.split("-");return this.options.lowerCaseLng?r=r.map(s=>s.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=aT(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=aT(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=aT(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let n;return e.forEach(r=>{if(n)return;const s=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(s))&&(n=s)}),!n&&this.options.supportedLngs&&e.forEach(r=>{if(n)return;const s=this.getLanguagePartFromCode(r);if(this.isSupportedCode(s))return n=s;n=this.options.supportedLngs.find(i=>{if(i===s)return i;if(!(i.indexOf("-")<0&&s.indexOf("-")<0)&&(i.indexOf("-")>0&&s.indexOf("-")<0&&i.substring(0,i.indexOf("-"))===s||i.indexOf(s)===0&&s.length>1))return i})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(e,n){if(!e)return[];if(typeof e=="function"&&(e=e(n)),mt(e)&&(e=[e]),Array.isArray(e))return e;if(!n)return e.default||[];let r=e[n];return r||(r=e[this.getScriptPartFromCode(n)]),r||(r=e[this.formatLanguageCode(n)]),r||(r=e[this.getLanguagePartFromCode(n)]),r||(r=e.default),r||[]}toResolveHierarchy(e,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],e),s=[],i=a=>{a&&(this.isSupportedCode(a)?s.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return mt(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(e))):mt(e)&&i(this.formatLanguageCode(e)),r.forEach(a=>{s.indexOf(a)<0&&i(this.formatLanguageCode(a))}),s}}let ame=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],lme={1:t=>+(t>1),2:t=>+(t!=1),3:t=>0,4:t=>t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2,5:t=>t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5,6:t=>t==1?0:t>=2&&t<=4?1:2,7:t=>t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2,8:t=>t==1?0:t==2?1:t!=8&&t!=11?2:3,9:t=>+(t>=2),10:t=>t==1?0:t==2?1:t<7?2:t<11?3:4,11:t=>t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3,12:t=>+(t%10!=1||t%100==11),13:t=>+(t!==0),14:t=>t==1?0:t==2?1:t==3?2:3,15:t=>t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2,16:t=>t%10==1&&t%100!=11?0:t!==0?1:2,17:t=>t==1||t%10==1&&t%100!=11?0:1,18:t=>t==0?0:t==1?1:2,19:t=>t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3,20:t=>t==1?0:t==0||t%100>0&&t%100<20?1:2,21:t=>t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0,22:t=>t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3};const cme=["v1","v2","v3"],ume=["v4"],yz={zero:0,one:1,two:2,few:3,many:4,other:5},dme=()=>{const t={};return ame.forEach(e=>{e.lngs.forEach(n=>{t[n]={numbers:e.nr,plurals:lme[e.fc]}})}),t};class fme{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=n,this.logger=hl.create("pluralResolver"),(!this.options.compatibilityJSON||ume.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=dme(),this.pluralRulesCache={}}addRule(e,n){this.rules[e]=n}clearCache(){this.pluralRulesCache={}}getRule(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi()){const r=r1(e==="dev"?"en":e),s=n.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:r,type:s});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(r,{type:s})}catch{if(!e.match(/-|_/))return;const c=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(c,n)}return this.pluralRulesCache[i]=a,a}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(e,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,r).map(s=>`${n}${s}`)}getSuffixes(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(e,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((s,i)=>yz[s]-yz[i]).map(s=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${s}`):r.numbers.map(s=>this.getSuffix(e,s,n)):[]}getSuffix(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const s=this.getRule(e,r);return s?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${s.select(n)}`:this.getSuffixRetroCompatible(s,n):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,n){const r=e.noAbs?e.plurals(n):e.plurals(Math.abs(n));let s=e.numbers[r];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(s===2?s="plural":s===1&&(s=""));const i=()=>this.options.prepend&&s.toString()?this.options.prepend+s.toString():s.toString();return this.options.compatibilityJSON==="v1"?s===1?"":typeof s=="number"?`_plural_${s.toString()}`:i():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?i():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!cme.includes(this.options.compatibilityJSON)}}const bz=function(t,e,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=Zpe(t,e,n);return!i&&s&&mt(n)&&(i=$D(t,n,r),i===void 0&&(i=$D(e,n,r))),i},lT=t=>t.replace(/\$/g,"$$$$");class hme{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=hl.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(n=>n),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:s,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:c,formatSeparator:u,unescapeSuffix:f,unescapePrefix:l,nestingPrefix:d,nestingPrefixEscaped:m,nestingSuffix:p,nestingSuffixEscaped:h,nestingOptionsSeparator:y,maxReplaces:g,alwaysFormat:v}=e.interpolation;this.escape=n!==void 0?n:tme,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=i?zp(i):a||"{{",this.suffix=o?zp(o):c||"}}",this.formatSeparator=u||",",this.unescapePrefix=f?"":l||"-",this.unescapeSuffix=this.unescapePrefix?"":f||"",this.nestingPrefix=d?zp(d):m||zp("$t("),this.nestingSuffix=p?zp(p):h||zp(")"),this.nestingOptionsSeparator=y||",",this.maxReplaces=g||1e3,this.alwaysFormat=v!==void 0?v:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(n,r)=>n&&n.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,n,r,s){let i,a,o;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=m=>{if(m.indexOf(this.formatSeparator)<0){const g=bz(n,c,m,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(g,void 0,r,{...s,...n,interpolationkey:m}):g}const p=m.split(this.formatSeparator),h=p.shift().trim(),y=p.join(this.formatSeparator).trim();return this.format(bz(n,c,h,this.options.keySeparator,this.options.ignoreJSONStructure),y,r,{...s,...n,interpolationkey:h})};this.resetRegExp();const f=s&&s.missingInterpolationHandler||this.options.missingInterpolationHandler,l=s&&s.interpolation&&s.interpolation.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:m=>lT(m)},{regex:this.regexp,safeValue:m=>this.escapeValue?lT(this.escape(m)):lT(m)}].forEach(m=>{for(o=0;i=m.regex.exec(e);){const p=i[1].trim();if(a=u(p),a===void 0)if(typeof f=="function"){const y=f(e,i,s);a=mt(y)?y:""}else if(s&&Object.prototype.hasOwnProperty.call(s,p))a="";else if(l){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${p} for interpolating ${e}`),a="";else!mt(a)&&!this.useRawValueToEscape&&(a=dz(a));const h=m.safeValue(a);if(e=e.replace(i[0],h),l?(m.regex.lastIndex+=a.length,m.regex.lastIndex-=i[0].length):m.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s,i,a;const o=(c,u)=>{const f=this.nestingOptionsSeparator;if(c.indexOf(f)<0)return c;const l=c.split(new RegExp(`${f}[ ]*{`));let d=`{${l[1]}`;c=l[0],d=this.interpolate(d,a);const m=d.match(/'/g),p=d.match(/"/g);(m&&m.length%2===0&&!p||p.length%2!==0)&&(d=d.replace(/'/g,'"'));try{a=JSON.parse(d),u&&(a={...u,...a})}catch(h){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,h),`${c}${f}${d}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,c};for(;s=this.nestingRegexp.exec(e);){let c=[];a={...r},a=a.replace&&!mt(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let u=!1;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){const f=s[1].split(this.formatSeparator).map(l=>l.trim());s[1]=f.shift(),c=f,u=!0}if(i=n(o.call(this,s[1].trim(),a),a),i&&s[0]===e&&!mt(i))return i;mt(i)||(i=dz(i)),i||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),i=""),u&&(i=c.reduce((f,l)=>this.format(f,l,r.lng,{...r,interpolationkey:s[1].trim()}),i.trim())),e=e.replace(s[0],i),this.regexp.lastIndex=0}return e}}const pme=t=>{let e=t.toLowerCase().trim();const n={};if(t.indexOf("(")>-1){const r=t.split("(");e=r[0].toLowerCase().trim();const s=r[1].substring(0,r[1].length-1);e==="currency"&&s.indexOf(":")<0?n.currency||(n.currency=s.trim()):e==="relativetime"&&s.indexOf(":")<0?n.range||(n.range=s.trim()):s.split(";").forEach(a=>{if(a){const[o,...c]=a.split(":"),u=c.join(":").trim().replace(/^'+|'+$/g,""),f=o.trim();n[f]||(n[f]=u),u==="false"&&(n[f]=!1),u==="true"&&(n[f]=!0),isNaN(u)||(n[f]=parseInt(u,10))}})}return{formatName:e,formatOptions:n}},Bp=t=>{const e={};return(n,r,s)=>{let i=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(i={...i,[s.interpolationkey]:void 0});const a=r+JSON.stringify(i);let o=e[a];return o||(o=t(r1(r),s),e[a]=o),o(n)}};class mme{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=hl.create("formatter"),this.options=e,this.formats={number:Bp((n,r)=>{const s=new Intl.NumberFormat(n,{...r});return i=>s.format(i)}),currency:Bp((n,r)=>{const s=new Intl.NumberFormat(n,{...r,style:"currency"});return i=>s.format(i)}),datetime:Bp((n,r)=>{const s=new Intl.DateTimeFormat(n,{...r});return i=>s.format(i)}),relativetime:Bp((n,r)=>{const s=new Intl.RelativeTimeFormat(n,{...r});return i=>s.format(i,r.range||"day")}),list:Bp((n,r)=>{const s=new Intl.ListFormat(n,{...r});return i=>s.format(i)})},this.init(e)}init(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||","}add(e,n){this.formats[e.toLowerCase().trim()]=n}addCached(e,n){this.formats[e.toLowerCase().trim()]=Bp(n)}format(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=n.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&i[0].indexOf(")")<0&&i.find(o=>o.indexOf(")")>-1)){const o=i.findIndex(c=>c.indexOf(")")>-1);i[0]=[i[0],...i.splice(1,o)].join(this.formatSeparator)}return i.reduce((o,c)=>{const{formatName:u,formatOptions:f}=pme(c);if(this.formats[u]){let l=o;try{const d=s&&s.formatParams&&s.formatParams[s.interpolationkey]||{},m=d.locale||d.lng||s.locale||s.lng||r;l=this.formats[u](o,m,{...f,...s,...d})}catch(d){this.logger.warn(d)}return l}else this.logger.warn(`there was no format function for ${u}`);return o},e)}}const gme=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class vme extends HC{constructor(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=s,this.logger=hl.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,s.backend,s)}queueLoad(e,n,r,s){const i={},a={},o={},c={};return e.forEach(u=>{let f=!0;n.forEach(l=>{const d=`${u}|${l}`;!r.reload&&this.store.hasResourceBundle(u,l)?this.state[d]=2:this.state[d]<0||(this.state[d]===1?a[d]===void 0&&(a[d]=!0):(this.state[d]=1,f=!1,a[d]===void 0&&(a[d]=!0),i[d]===void 0&&(i[d]=!0),c[l]===void 0&&(c[l]=!0)))}),f||(o[u]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(c)}}loaded(e,n,r){const s=e.split("|"),i=s[0],a=s[1];n&&this.emit("failedLoading",i,a,n),!n&&r&&this.store.addResourceBundle(i,a,r,void 0,void 0,{skipCopy:!0}),this.state[e]=n?-1:2,n&&r&&(this.state[e]=0);const o={};this.queue.forEach(c=>{Jpe(c.loaded,[i],a),gme(c,e),n&&c.errors.push(n),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(u=>{o[u]||(o[u]={});const f=c.loaded[u];f.length&&f.forEach(l=>{o[u][l]===void 0&&(o[u][l]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(c=>!c.done)}read(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:n,fcName:r,tried:s,wait:i,callback:a});return}this.readingCalls++;const o=(u,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const l=this.waitingReads.shift();this.read(l.lng,l.ns,l.fcName,l.tried,l.wait,l.callback)}if(u&&f&&s{this.read.call(this,e,n,r,s+1,i*2,a)},i);return}a(u,f)},c=this.backend[r].bind(this.backend);if(c.length===2){try{const u=c(e,n);u&&typeof u.then=="function"?u.then(f=>o(null,f)).catch(o):o(null,u)}catch(u){o(u)}return}return c(e,n,o)}prepareLoading(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();mt(e)&&(e=this.languageUtils.toResolveHierarchy(e)),mt(n)&&(n=[n]);const i=this.queueLoad(e,n,r,s);if(!i.toLoad.length)return i.pending.length||s(),null;i.toLoad.forEach(a=>{this.loadOne(a)})}load(e,n,r){this.prepareLoading(e,n,{},r)}reload(e,n,r){this.prepareLoading(e,n,{reload:!0},r)}loadOne(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=e.split("|"),s=r[0],i=r[1];this.read(s,i,"read",void 0,void 0,(a,o)=>{a&&this.logger.warn(`${n}loading namespace ${i} for language ${s} failed`,a),!a&&o&&this.logger.log(`${n}loaded namespace ${i} for language ${s}`,o),this.loaded(e,a,o)})}saveMissing(e,n,r,s,i){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},o=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const c={...a,isUpdate:i},u=this.backend.create.bind(this.backend);if(u.length<6)try{let f;u.length===5?f=u(e,n,r,s,c):f=u(e,n,r,s),f&&typeof f.then=="function"?f.then(l=>o(null,l)).catch(o):o(null,f)}catch(f){o(f)}else u(e,n,r,s,o,c)}!e||!e[0]||this.store.addResource(e[0],n,r,s)}}}const wz=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let e={};if(typeof t[1]=="object"&&(e=t[1]),mt(t[1])&&(e.defaultValue=t[1]),mt(t[2])&&(e.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const n=t[3]||t[2];Object.keys(n).forEach(r=>{e[r]=n[r]})}return e},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),_z=t=>(mt(t.ns)&&(t.ns=[t.ns]),mt(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),mt(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t),rS=()=>{},yme=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})};class qb extends HC{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=_z(e),this.services={},this.logger=hl,this.modules={external:[]},yme(this),n&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,n),this;setTimeout(()=>{this.init(e,n)},0)}}init(){var e=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(mt(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const s=wz();this.options={...s,...this.options,..._z(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...s.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const i=f=>f?typeof f=="function"?new f:f:null;if(!this.options.isClone){this.modules.logger?hl.init(i(this.modules.logger),this.options):hl.init(null,this.options);let f;this.modules.formatter?f=this.modules.formatter:typeof Intl<"u"&&(f=mme);const l=new vz(this.options);this.store=new mz(this.options.resources,this.options);const d=this.services;d.logger=hl,d.resourceStore=this.store,d.languageUtils=l,d.pluralResolver=new fme(l,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),f&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(d.formatter=i(f),d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new hme(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new vme(i(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",function(m){for(var p=arguments.length,h=new Array(p>1?p-1:0),y=1;y1?p-1:0),y=1;y{m.init&&m.init(this)})}if(this.format=this.options.interpolation.format,r||(r=rS),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.length>0&&f[0]!=="dev"&&(this.options.lng=f[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(f=>{this[f]=function(){return e.store[f](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(f=>{this[f]=function(){return e.store[f](...arguments),e}});const c=vy(),u=()=>{const f=(l,d)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),c.resolve(d),r(l,d)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return f(null,this.t.bind(this));this.changeLanguage(this.options.lng,f)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),c}loadResources(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:rS;const s=mt(e)?e:this.language;if(typeof e=="function"&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(s&&s.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const i=[],a=o=>{if(!o||o==="cimode")return;this.services.languageUtils.toResolveHierarchy(o).forEach(u=>{u!=="cimode"&&i.indexOf(u)<0&&i.push(u)})};s?a(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(c=>a(c)),this.options.preload&&this.options.preload.forEach(o=>a(o)),this.services.backendConnector.load(i,this.options.ns,o=>{!o&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(o)})}else r(null)}reloadResources(e,n,r){const s=vy();return typeof e=="function"&&(r=e,e=void 0),typeof n=="function"&&(r=n,n=void 0),e||(e=this.languages),n||(n=this.options.ns),r||(r=rS),this.services.backendConnector.reload(e,n,i=>{s.resolve(),r(i)}),s}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&C6.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let n=0;n-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(e,n){var r=this;this.isLanguageChangingTo=e;const s=vy();this.emit("languageChanging",e);const i=c=>{this.language=c,this.languages=this.services.languageUtils.toResolveHierarchy(c),this.resolvedLanguage=void 0,this.setResolvedLanguage(c)},a=(c,u)=>{u?(i(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,s.resolve(function(){return r.t(...arguments)}),n&&n(c,function(){return r.t(...arguments)})},o=c=>{!e&&!c&&this.services.languageDetector&&(c=[]);const u=mt(c)?c:this.services.languageUtils.getBestMatchFromCodes(c);u&&(this.language||i(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,f=>{a(f,u)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e),s}getFixedT(e,n,r){var s=this;const i=function(a,o){let c;if(typeof o!="object"){for(var u=arguments.length,f=new Array(u>2?u-2:0),l=2;l`${c.keyPrefix}${d}${p}`):m=c.keyPrefix?`${c.keyPrefix}${d}${a}`:a,s.t(m,c)};return mt(e)?i.lng=e:i.lngs=e,i.ns=n,i.keyPrefix=r,i}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const a=(o,c)=>{const u=this.services.backendConnector.state[`${o}|${c}`];return u===-1||u===0||u===2};if(n.precheck){const o=n.precheck(this,a);if(o!==void 0)return o}return!!(this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(r,e)&&(!s||a(i,e)))}loadNamespaces(e,n){const r=vy();return this.options.ns?(mt(e)&&(e=[e]),e.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}loadLanguages(e,n){const r=vy();mt(e)&&(e=[e]);const s=this.options.preload||[],i=e.filter(a=>s.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return i.length?(this.options.preload=s.concat(i),this.loadResources(a=>{r.resolve(),n&&n(a)}),r):(n&&n(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services&&this.services.languageUtils||new vz(wz());return n.indexOf(r.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new qb(e,n)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:rS;const r=e.forkResourceStore;r&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},i=new qb(s);return(e.debug!==void 0||e.prefix!==void 0)&&(i.logger=i.logger.clone(e)),["store","services","language"].forEach(o=>{i[o]=this[o]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},r&&(i.store=new mz(this.store.data,s),i.services.resourceStore=i.store),i.translator=new i1(i.services,s),i.translator.on("*",function(o){for(var c=arguments.length,u=new Array(c>1?c-1:0),f=1;fP.jsx("nav",{ref:e,"aria-label":ft("common.breadcrumb"),...t}));bme.displayName="Breadcrumb";const wme=_.forwardRef(({className:t,...e},n)=>P.jsx("ol",{ref:n,className:ce("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",t),...e}));wme.displayName="BreadcrumbList";const _me=_.forwardRef(({className:t,...e},n)=>P.jsx("li",{ref:n,className:ce("inline-flex items-center gap-1.5",t),...e}));_me.displayName="BreadcrumbItem";const xme=_.forwardRef(({asChild:t,className:e,...n},r)=>{const s=t?Ra:"a";return P.jsx(s,{ref:r,className:ce("transition-colors hover:text-foreground",e),...n})});xme.displayName="BreadcrumbLink";const Sme=_.forwardRef(({className:t,...e},n)=>P.jsx("span",{ref:n,role:"link","aria-disabled":"true","aria-current":"page",className:ce("font-normal text-foreground",t),...e}));Sme.displayName="BreadcrumbPage";function Yt(t){const e=Object.prototype.toString.call(t);return t instanceof Date||typeof t=="object"&&e==="[object Date]"?new t.constructor(+t):typeof t=="number"||e==="[object Number]"||typeof t=="string"||e==="[object String]"?new Date(t):new Date(NaN)}function lo(t,e){return t instanceof Date?new t.constructor(e):new Date(e)}function qs(t,e){const n=Yt(t);return isNaN(e)?lo(t,NaN):(e&&n.setDate(n.getDate()+e),n)}function Pa(t,e){const n=Yt(t);if(isNaN(e))return lo(t,NaN);if(!e)return n;const r=n.getDate(),s=lo(t,n.getTime());s.setMonth(n.getMonth()+e+1,0);const i=s.getDate();return r>=i?s:(n.setFullYear(s.getFullYear(),s.getMonth(),r),n)}const FL=6048e5,Eme=864e5;let Cme={};function f_(){return Cme}function xl(t,e){var o,c,u,f;const n=f_(),r=(e==null?void 0:e.weekStartsOn)??((c=(o=e==null?void 0:e.locale)==null?void 0:o.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((f=(u=n.locale)==null?void 0:u.options)==null?void 0:f.weekStartsOn)??0,s=Yt(t),i=s.getDay(),a=(i=s.getTime()?n+1:e.getTime()>=a.getTime()?n:n-1}function lv(t){const e=Yt(t);return e.setHours(0,0,0,0),e}function o1(t){const e=Yt(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function pl(t,e){const n=lv(t),r=lv(e),s=+n-o1(n),i=+r-o1(r);return Math.round((s-i)/Eme)}function Ame(t){const e=A6(t),n=lo(t,0);return n.setFullYear(e,0,4),n.setHours(0,0,0,0),Gh(n)}function jD(t,e){const n=e*7;return qs(t,n)}function Rme(t,e){return Pa(t,e*12)}function Pme(t){let e;return t.forEach(function(n){const r=Yt(n);(e===void 0||e{const r=Yt(n);(!e||e>r||isNaN(+r))&&(e=r)}),e||new Date(NaN)}function bi(t,e){const n=lv(t),r=lv(e);return+n==+r}function zL(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function kme(t){if(!zL(t)&&typeof t!="number")return!1;const e=Yt(t);return!isNaN(Number(e))}function Gb(t,e){const n=Yt(t),r=Yt(e),s=n.getFullYear()-r.getFullYear(),i=n.getMonth()-r.getMonth();return s*12+i}function Dme(t,e,n){const r=xl(t,n),s=xl(e,n),i=+r-o1(r),a=+s-o1(s);return Math.round((i-a)/FL)}function BL(t){const e=Yt(t),n=e.getMonth();return e.setFullYear(e.getFullYear(),n+1,0),e.setHours(23,59,59,999),e}function Ai(t){const e=Yt(t);return e.setDate(1),e.setHours(0,0,0,0),e}function R6(t){const e=Yt(t),n=lo(t,0);return n.setFullYear(e.getFullYear(),0,1),n.setHours(0,0,0,0),n}function UL(t,e){var o,c,u,f;const n=f_(),r=(e==null?void 0:e.weekStartsOn)??((c=(o=e==null?void 0:e.locale)==null?void 0:o.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((f=(u=n.locale)==null?void 0:u.options)==null?void 0:f.weekStartsOn)??0,s=Yt(t),i=s.getDay(),a=(i{let r;const s=Nme[t];return typeof s=="string"?r=s:e===1?r=s.one:r=s.other.replace("{{count}}",e.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function $o(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const Ome={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Lme={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Ime={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},$me={date:$o({formats:Ome,defaultWidth:"full"}),time:$o({formats:Lme,defaultWidth:"full"}),dateTime:$o({formats:Ime,defaultWidth:"full"})},jme={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Fme=(t,e,n,r)=>jme[t];function Ar(t){return(e,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let s;if(r==="formatting"&&t.formattingValues){const a=t.defaultFormattingWidth||t.defaultWidth,o=n!=null&&n.width?String(n.width):a;s=t.formattingValues[o]||t.formattingValues[a]}else{const a=t.defaultWidth,o=n!=null&&n.width?String(n.width):t.defaultWidth;s=t.values[o]||t.values[a]}const i=t.argumentCallback?t.argumentCallback(e):e;return s[i]}}const zme={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Bme={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Ume={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Hme={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Wme={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Vme={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},qme=(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Gme={ordinalNumber:qme,era:Ar({values:zme,defaultWidth:"wide"}),quarter:Ar({values:Bme,defaultWidth:"wide",argumentCallback:t=>t-1}),month:Ar({values:Ume,defaultWidth:"wide"}),day:Ar({values:Hme,defaultWidth:"wide"}),dayPeriod:Ar({values:Wme,defaultWidth:"wide",formattingValues:Vme,defaultFormattingWidth:"wide"})};function Rr(t){return(e,n={})=>{const r=n.width,s=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],i=e.match(s);if(!i)return null;const a=i[0],o=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],c=Array.isArray(o)?Yme(o,l=>l.test(a)):Kme(o,l=>l.test(a));let u;u=t.valueCallback?t.valueCallback(c):c,u=n.valueCallback?n.valueCallback(u):u;const f=e.slice(a.length);return{value:u,rest:f}}}function Kme(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function Yme(t,e){for(let n=0;n{const r=e.match(t.matchPattern);if(!r)return null;const s=r[0],i=e.match(t.parsePattern);if(!i)return null;let a=t.valueCallback?t.valueCallback(i[0]):i[0];a=n.valueCallback?n.valueCallback(a):a;const o=e.slice(s.length);return{value:a,rest:o}}}const Xme=/^(\d+)(th|st|nd|rd)?/i,Qme=/\d+/i,Jme={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Zme={any:[/^b/i,/^(a|c)/i]},ege={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},tge={any:[/1/i,/2/i,/3/i,/4/i]},nge={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},rge={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},sge={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},ige={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},oge={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},age={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},lge={ordinalNumber:WC({matchPattern:Xme,parsePattern:Qme,valueCallback:t=>parseInt(t,10)}),era:Rr({matchPatterns:Jme,defaultMatchWidth:"wide",parsePatterns:Zme,defaultParseWidth:"any"}),quarter:Rr({matchPatterns:ege,defaultMatchWidth:"wide",parsePatterns:tge,defaultParseWidth:"any",valueCallback:t=>t+1}),month:Rr({matchPatterns:nge,defaultMatchWidth:"wide",parsePatterns:rge,defaultParseWidth:"any"}),day:Rr({matchPatterns:sge,defaultMatchWidth:"wide",parsePatterns:ige,defaultParseWidth:"any"}),dayPeriod:Rr({matchPatterns:oge,defaultMatchWidth:"any",parsePatterns:age,defaultParseWidth:"any"})},HL={code:"en-US",formatDistance:Mme,formatLong:$me,formatRelative:Fme,localize:Gme,match:lge,options:{weekStartsOn:0,firstWeekContainsDate:1}};function cge(t){const e=Yt(t);return pl(e,R6(e))+1}function T6(t){const e=Yt(t),n=+Gh(e)-+Ame(e);return Math.round(n/FL)+1}function k6(t,e){var f,l,d,m;const n=Yt(t),r=n.getFullYear(),s=f_(),i=(e==null?void 0:e.firstWeekContainsDate)??((l=(f=e==null?void 0:e.locale)==null?void 0:f.options)==null?void 0:l.firstWeekContainsDate)??s.firstWeekContainsDate??((m=(d=s.locale)==null?void 0:d.options)==null?void 0:m.firstWeekContainsDate)??1,a=lo(t,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const o=xl(a,e),c=lo(t,0);c.setFullYear(r,0,i),c.setHours(0,0,0,0);const u=xl(c,e);return n.getTime()>=o.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1}function uge(t,e){var o,c,u,f;const n=f_(),r=(e==null?void 0:e.firstWeekContainsDate)??((c=(o=e==null?void 0:e.locale)==null?void 0:o.options)==null?void 0:c.firstWeekContainsDate)??n.firstWeekContainsDate??((f=(u=n.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??1,s=k6(t,e),i=lo(t,0);return i.setFullYear(s,0,r),i.setHours(0,0,0,0),xl(i,e)}function D6(t,e){const n=Yt(t),r=+xl(n,e)-+uge(n,e);return Math.round(r/FL)+1}function fn(t,e){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(e,"0");return n+r}const gu={y(t,e){const n=t.getFullYear(),r=n>0?n:1-n;return fn(e==="yy"?r%100:r,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):fn(n+1,2)},d(t,e){return fn(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(t,e){return fn(t.getHours()%12||12,e.length)},H(t,e){return fn(t.getHours(),e.length)},m(t,e){return fn(t.getMinutes(),e.length)},s(t,e){return fn(t.getSeconds(),e.length)},S(t,e){const n=e.length,r=t.getMilliseconds(),s=Math.trunc(r*Math.pow(10,n-3));return fn(s,e.length)}},Up={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},xz={G:function(t,e,n){const r=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const r=t.getFullYear(),s=r>0?r:1-r;return n.ordinalNumber(s,{unit:"year"})}return gu.y(t,e)},Y:function(t,e,n,r){const s=k6(t,r),i=s>0?s:1-s;if(e==="YY"){const a=i%100;return fn(a,2)}return e==="Yo"?n.ordinalNumber(i,{unit:"year"}):fn(i,e.length)},R:function(t,e){const n=A6(t);return fn(n,e.length)},u:function(t,e){const n=t.getFullYear();return fn(n,e.length)},Q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return fn(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return fn(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){const r=t.getMonth();switch(e){case"M":case"MM":return gu.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return fn(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){const s=D6(t,r);return e==="wo"?n.ordinalNumber(s,{unit:"week"}):fn(s,e.length)},I:function(t,e,n){const r=T6(t);return e==="Io"?n.ordinalNumber(r,{unit:"week"}):fn(r,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):gu.d(t,e)},D:function(t,e,n){const r=cge(t);return e==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):fn(r,e.length)},E:function(t,e,n){const r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){const s=t.getDay(),i=(s-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(i);case"ee":return fn(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(s,{width:"short",context:"formatting"});case"eeee":default:return n.day(s,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const s=t.getDay(),i=(s-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(i);case"cc":return fn(i,e.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(s,{width:"narrow",context:"standalone"});case"cccccc":return n.day(s,{width:"short",context:"standalone"});case"cccc":default:return n.day(s,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),s=r===0?7:r;switch(e){case"i":return String(s);case"ii":return fn(s,e.length);case"io":return n.ordinalNumber(s,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){const s=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(t,e,n){const r=t.getHours();let s;switch(r===12?s=Up.noon:r===0?s=Up.midnight:s=r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let s;switch(r>=17?s=Up.evening:r>=12?s=Up.afternoon:r>=4?s=Up.morning:s=Up.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let r=t.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return gu.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):gu.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return e==="Ko"?n.ordinalNumber(r,{unit:"hour"}):fn(r,e.length)},k:function(t,e,n){let r=t.getHours();return r===0&&(r=24),e==="ko"?n.ordinalNumber(r,{unit:"hour"}):fn(r,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):gu.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):gu.s(t,e)},S:function(t,e){return gu.S(t,e)},X:function(t,e,n){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return Ez(r);case"XXXX":case"XX":return hf(r);case"XXXXX":case"XXX":default:return hf(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return Ez(r);case"xxxx":case"xx":return hf(r);case"xxxxx":case"xxx":default:return hf(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Sz(r,":");case"OOOO":default:return"GMT"+hf(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Sz(r,":");case"zzzz":default:return"GMT"+hf(r,":")}},t:function(t,e,n){const r=Math.trunc(t.getTime()/1e3);return fn(r,e.length)},T:function(t,e,n){const r=t.getTime();return fn(r,e.length)}};function Sz(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),s=Math.trunc(r/60),i=r%60;return i===0?n+String(s):n+String(s)+e+fn(i,2)}function Ez(t,e){return t%60===0?(t>0?"-":"+")+fn(Math.abs(t)/60,2):hf(t,e)}function hf(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),s=fn(Math.trunc(r/60),2),i=fn(r%60,2);return n+s+e+i}const Cz=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},N6=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},dge=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],s=n[2];if(!s)return Cz(t,e);let i;switch(r){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;case"PPPP":default:i=e.dateTime({width:"full"});break}return i.replace("{{date}}",Cz(r,e)).replace("{{time}}",N6(s,e))},fge={p:N6,P:dge},hge=/^D+$/,pge=/^Y+$/,mge=["D","DD","YY","YYYY"];function gge(t){return hge.test(t)}function vge(t){return pge.test(t)}function yge(t,e,n){const r=bge(t,e,n);if(console.warn(r),mge.includes(t))throw new RangeError(r)}function bge(t,e,n){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const wge=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,_ge=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,xge=/^'([^]*?)'?$/,Sge=/''/g,Ege=/[a-zA-Z]/;function pp(t,e,n){var f,l,d,m,p,h,y,g;const r=f_(),s=(n==null?void 0:n.locale)??r.locale??HL,i=(n==null?void 0:n.firstWeekContainsDate)??((l=(f=n==null?void 0:n.locale)==null?void 0:f.options)==null?void 0:l.firstWeekContainsDate)??r.firstWeekContainsDate??((m=(d=r.locale)==null?void 0:d.options)==null?void 0:m.firstWeekContainsDate)??1,a=(n==null?void 0:n.weekStartsOn)??((h=(p=n==null?void 0:n.locale)==null?void 0:p.options)==null?void 0:h.weekStartsOn)??r.weekStartsOn??((g=(y=r.locale)==null?void 0:y.options)==null?void 0:g.weekStartsOn)??0,o=Yt(t);if(!kme(o))throw new RangeError("Invalid time value");let c=e.match(_ge).map(v=>{const w=v[0];if(w==="p"||w==="P"){const x=fge[w];return x(v,s.formatLong)}return v}).join("").match(wge).map(v=>{if(v==="''")return{isToken:!1,value:"'"};const w=v[0];if(w==="'")return{isToken:!1,value:Cge(v)};if(xz[w])return{isToken:!0,value:v};if(w.match(Ege))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");return{isToken:!1,value:v}});s.localize.preprocessor&&(c=s.localize.preprocessor(o,c));const u={firstWeekContainsDate:i,weekStartsOn:a,locale:s};return c.map(v=>{if(!v.isToken)return v.value;const w=v.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&vge(w)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&gge(w))&&yge(w,e,String(t));const x=xz[w[0]];return x(o,w,s.localize,u)}).join("")}function Cge(t){const e=t.match(xge);return e?e[1].replace(Sge,"'"):t}function Age(t){const e=Yt(t),n=e.getFullYear(),r=e.getMonth(),s=lo(t,0);return s.setFullYear(n,r+1,0),s.setHours(0,0,0,0),s.getDate()}function Rge(t){return Math.trunc(+Yt(t)/1e3)}function Pge(t){const e=Yt(t),n=e.getMonth();return e.setFullYear(e.getFullYear(),n+1,0),e.setHours(0,0,0,0),e}function Tge(t,e){return Dme(Pge(t),Ai(t),e)+1}function FD(t,e){const n=Yt(t),r=Yt(e);return n.getTime()>r.getTime()}function M6(t,e){const n=Yt(t),r=Yt(e);return+n<+r}function WL(t,e){const n=Yt(t),r=Yt(e);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function kge(t,e){const n=Yt(t),r=Yt(e);return n.getFullYear()===r.getFullYear()}function cT(t,e){return qs(t,-e)}function uT(t,e){const n=Yt(t),r=n.getFullYear(),s=n.getDate(),i=lo(t,0);i.setFullYear(r,e,15),i.setHours(0,0,0,0);const a=Age(i);return n.setMonth(e,Math.min(s,a)),n}function Az(t,e){const n=Yt(t);return isNaN(+n)?lo(t,NaN):(n.setFullYear(e),n)}const Dge={lessThanXSeconds:{one:"menys d'un segon",eleven:"menys d'onze segons",other:"menys de {{count}} segons"},xSeconds:{one:"1 segon",other:"{{count}} segons"},halfAMinute:"mig minut",lessThanXMinutes:{one:"menys d'un minut",eleven:"menys d'onze minuts",other:"menys de {{count}} minuts"},xMinutes:{one:"1 minut",other:"{{count}} minuts"},aboutXHours:{one:"aproximadament una hora",other:"aproximadament {{count}} hores"},xHours:{one:"1 hora",other:"{{count}} hores"},xDays:{one:"1 dia",other:"{{count}} dies"},aboutXWeeks:{one:"aproximadament una setmana",other:"aproximadament {{count}} setmanes"},xWeeks:{one:"1 setmana",other:"{{count}} setmanes"},aboutXMonths:{one:"aproximadament un mes",other:"aproximadament {{count}} mesos"},xMonths:{one:"1 mes",other:"{{count}} mesos"},aboutXYears:{one:"aproximadament un any",other:"aproximadament {{count}} anys"},xYears:{one:"1 any",other:"{{count}} anys"},overXYears:{one:"més d'un any",eleven:"més d'onze anys",other:"més de {{count}} anys"},almostXYears:{one:"gairebé un any",other:"gairebé {{count}} anys"}},Nge=(t,e,n)=>{let r;const s=Dge[t];return typeof s=="string"?r=s:e===1?r=s.one:e===11&&s.eleven?r=s.eleven:r=s.other.replace("{{count}}",String(e)),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"en "+r:"fa "+r:r},Mge={full:"EEEE, d 'de' MMMM y",long:"d 'de' MMMM y",medium:"d MMM y",short:"dd/MM/y"},Oge={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},Lge={full:"{{date}} 'a les' {{time}}",long:"{{date}} 'a les' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Ige={date:$o({formats:Mge,defaultWidth:"full"}),time:$o({formats:Oge,defaultWidth:"full"}),dateTime:$o({formats:Lge,defaultWidth:"full"})},$ge={lastWeek:"'el' eeee 'passat a la' LT",yesterday:"'ahir a la' p",today:"'avui a la' p",tomorrow:"'demà a la' p",nextWeek:"eeee 'a la' p",other:"P"},jge={lastWeek:"'el' eeee 'passat a les' p",yesterday:"'ahir a les' p",today:"'avui a les' p",tomorrow:"'demà a les' p",nextWeek:"eeee 'a les' p",other:"P"},Fge=(t,e,n,r)=>e.getHours()!==1?jge[t]:$ge[t],zge={narrow:["aC","dC"],abbreviated:["a. de C.","d. de C."],wide:["abans de Crist","després de Crist"]},Bge={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1r trimestre","2n trimestre","3r trimestre","4t trimestre"]},Uge={narrow:["GN","FB","MÇ","AB","MG","JN","JL","AG","ST","OC","NV","DS"],abbreviated:["gen.","febr.","març","abr.","maig","juny","jul.","ag.","set.","oct.","nov.","des."],wide:["gener","febrer","març","abril","maig","juny","juliol","agost","setembre","octubre","novembre","desembre"]},Hge={narrow:["dg.","dl.","dt.","dm.","dj.","dv.","ds."],short:["dg.","dl.","dt.","dm.","dj.","dv.","ds."],abbreviated:["dg.","dl.","dt.","dm.","dj.","dv.","ds."],wide:["diumenge","dilluns","dimarts","dimecres","dijous","divendres","dissabte"]},Wge={narrow:{am:"am",pm:"pm",midnight:"mitjanit",noon:"migdia",morning:"matí",afternoon:"tarda",evening:"vespre",night:"nit"},abbreviated:{am:"a.m.",pm:"p.m.",midnight:"mitjanit",noon:"migdia",morning:"matí",afternoon:"tarda",evening:"vespre",night:"nit"},wide:{am:"ante meridiem",pm:"post meridiem",midnight:"mitjanit",noon:"migdia",morning:"matí",afternoon:"tarda",evening:"vespre",night:"nit"}},Vge={narrow:{am:"am",pm:"pm",midnight:"de la mitjanit",noon:"del migdia",morning:"del matí",afternoon:"de la tarda",evening:"del vespre",night:"de la nit"},abbreviated:{am:"AM",pm:"PM",midnight:"de la mitjanit",noon:"del migdia",morning:"del matí",afternoon:"de la tarda",evening:"del vespre",night:"de la nit"},wide:{am:"ante meridiem",pm:"post meridiem",midnight:"de la mitjanit",noon:"del migdia",morning:"del matí",afternoon:"de la tarda",evening:"del vespre",night:"de la nit"}},qge=(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"r";case 2:return n+"n";case 3:return n+"r";case 4:return n+"t"}return n+"è"},Gge={ordinalNumber:qge,era:Ar({values:zge,defaultWidth:"wide"}),quarter:Ar({values:Bge,defaultWidth:"wide",argumentCallback:t=>t-1}),month:Ar({values:Uge,defaultWidth:"wide"}),day:Ar({values:Hge,defaultWidth:"wide"}),dayPeriod:Ar({values:Wge,defaultWidth:"wide",formattingValues:Vge,defaultFormattingWidth:"wide"})},Kge=/^(\d+)(è|r|n|r|t)?/i,Yge=/\d+/i,Xge={narrow:/^(aC|dC)/i,abbreviated:/^(a. de C.|d. de C.)/i,wide:/^(abans de Crist|despr[eé]s de Crist)/i},Qge={narrow:[/^aC/i,/^dC/i],abbreviated:[/^(a. de C.)/i,/^(d. de C.)/i],wide:[/^(abans de Crist)/i,/^(despr[eé]s de Crist)/i]},Jge={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](è|r|n|r|t)? trimestre/i},Zge={any:[/1/i,/2/i,/3/i,/4/i]},eve={narrow:/^(GN|FB|MÇ|AB|MG|JN|JL|AG|ST|OC|NV|DS)/i,abbreviated:/^(gen.|febr.|març|abr.|maig|juny|jul.|ag.|set.|oct.|nov.|des.)/i,wide:/^(gener|febrer|març|abril|maig|juny|juliol|agost|setembre|octubre|novembre|desembre)/i},tve={narrow:[/^GN/i,/^FB/i,/^MÇ/i,/^AB/i,/^MG/i,/^JN/i,/^JL/i,/^AG/i,/^ST/i,/^OC/i,/^NV/i,/^DS/i],abbreviated:[/^gen./i,/^febr./i,/^març/i,/^abr./i,/^maig/i,/^juny/i,/^jul./i,/^ag./i,/^set./i,/^oct./i,/^nov./i,/^des./i],wide:[/^gener/i,/^febrer/i,/^març/i,/^abril/i,/^maig/i,/^juny/i,/^juliol/i,/^agost/i,/^setembre/i,/^octubre/i,/^novembre/i,/^desembre/i]},nve={narrow:/^(dg\.|dl\.|dt\.|dm\.|dj\.|dv\.|ds\.)/i,short:/^(dg\.|dl\.|dt\.|dm\.|dj\.|dv\.|ds\.)/i,abbreviated:/^(dg\.|dl\.|dt\.|dm\.|dj\.|dv\.|ds\.)/i,wide:/^(diumenge|dilluns|dimarts|dimecres|dijous|divendres|dissabte)/i},rve={narrow:[/^dg./i,/^dl./i,/^dt./i,/^dm./i,/^dj./i,/^dv./i,/^ds./i],abbreviated:[/^dg./i,/^dl./i,/^dt./i,/^dm./i,/^dj./i,/^dv./i,/^ds./i],wide:[/^diumenge/i,/^dilluns/i,/^dimarts/i,/^dimecres/i,/^dijous/i,/^divendres/i,/^disssabte/i]},sve={narrow:/^(a|p|mn|md|(del|de la) (matí|tarda|vespre|nit))/i,abbreviated:/^([ap]\.?\s?m\.?|mitjanit|migdia|(del|de la) (matí|tarda|vespre|nit))/i,wide:/^(ante meridiem|post meridiem|mitjanit|migdia|(del|de la) (matí|tarda|vespre|nit))/i},ive={any:{am:/^a/i,pm:/^p/i,midnight:/^mitjanit/i,noon:/^migdia/i,morning:/matí/i,afternoon:/tarda/i,evening:/vespre/i,night:/nit/i}},ove={ordinalNumber:WC({matchPattern:Kge,parsePattern:Yge,valueCallback:t=>parseInt(t,10)}),era:Rr({matchPatterns:Xge,defaultMatchWidth:"wide",parsePatterns:Qge,defaultParseWidth:"wide"}),quarter:Rr({matchPatterns:Jge,defaultMatchWidth:"wide",parsePatterns:Zge,defaultParseWidth:"any",valueCallback:t=>t+1}),month:Rr({matchPatterns:eve,defaultMatchWidth:"wide",parsePatterns:tve,defaultParseWidth:"wide"}),day:Rr({matchPatterns:nve,defaultMatchWidth:"wide",parsePatterns:rve,defaultParseWidth:"wide"}),dayPeriod:Rr({matchPatterns:sve,defaultMatchWidth:"wide",parsePatterns:ive,defaultParseWidth:"any"})},ave={code:"ca",formatDistance:Nge,formatLong:Ige,formatRelative:Fge,localize:Gge,match:ove,options:{weekStartsOn:1,firstWeekContainsDate:4}},lve={lessThanXSeconds:{one:"menos de un segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"medio minuto",lessThanXMinutes:{one:"menos de un minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"alrededor de 1 hora",other:"alrededor de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 día",other:"{{count}} días"},aboutXWeeks:{one:"alrededor de 1 semana",other:"alrededor de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"alrededor de 1 mes",other:"alrededor de {{count}} meses"},xMonths:{one:"1 mes",other:"{{count}} meses"},aboutXYears:{one:"alrededor de 1 año",other:"alrededor de {{count}} años"},xYears:{one:"1 año",other:"{{count}} años"},overXYears:{one:"más de 1 año",other:"más de {{count}} años"},almostXYears:{one:"casi 1 año",other:"casi {{count}} años"}},cve=(t,e,n)=>{let r;const s=lve[t];return typeof s=="string"?r=s:e===1?r=s.one:r=s.other.replace("{{count}}",e.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"en "+r:"hace "+r:r},uve={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/y"},dve={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},fve={full:"{{date}} 'a las' {{time}}",long:"{{date}} 'a las' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},hve={date:$o({formats:uve,defaultWidth:"full"}),time:$o({formats:dve,defaultWidth:"full"}),dateTime:$o({formats:fve,defaultWidth:"full"})},pve={lastWeek:"'el' eeee 'pasado a la' p",yesterday:"'ayer a la' p",today:"'hoy a la' p",tomorrow:"'mañana a la' p",nextWeek:"eeee 'a la' p",other:"P"},mve={lastWeek:"'el' eeee 'pasado a las' p",yesterday:"'ayer a las' p",today:"'hoy a las' p",tomorrow:"'mañana a las' p",nextWeek:"eeee 'a las' p",other:"P"},gve=(t,e,n,r)=>e.getHours()!==1?mve[t]:pve[t],vve={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","después de cristo"]},yve={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},bve={narrow:["e","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],wide:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"]},wve={narrow:["d","l","m","m","j","v","s"],short:["do","lu","ma","mi","ju","vi","sá"],abbreviated:["dom","lun","mar","mié","jue","vie","sáb"],wide:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"]},_ve={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"}},xve={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"}},Sve=(t,e)=>Number(t)+"º",Eve={ordinalNumber:Sve,era:Ar({values:vve,defaultWidth:"wide"}),quarter:Ar({values:yve,defaultWidth:"wide",argumentCallback:t=>Number(t)-1}),month:Ar({values:bve,defaultWidth:"wide"}),day:Ar({values:wve,defaultWidth:"wide"}),dayPeriod:Ar({values:_ve,defaultWidth:"wide",formattingValues:xve,defaultFormattingWidth:"wide"})},Cve=/^(\d+)(º)?/i,Ave=/\d+/i,Rve={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,wide:/^(antes de cristo|antes de la era com[uú]n|despu[eé]s de cristo|era com[uú]n)/i},Pve={any:[/^ac/i,/^dc/i],wide:[/^(antes de cristo|antes de la era com[uú]n)/i,/^(despu[eé]s de cristo|era com[uú]n)/i]},Tve={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},kve={any:[/1/i,/2/i,/3/i,/4/i]},Dve={narrow:/^[efmajsond]/i,abbreviated:/^(ene|feb|mar|abr|may|jun|jul|ago|sep|oct|nov|dic)/i,wide:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i},Nve={narrow:[/^e/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^en/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i]},Mve={narrow:/^[dlmjvs]/i,short:/^(do|lu|ma|mi|ju|vi|s[áa])/i,abbreviated:/^(dom|lun|mar|mi[ée]|jue|vie|s[áa]b)/i,wide:/^(domingo|lunes|martes|mi[ée]rcoles|jueves|viernes|s[áa]bado)/i},Ove={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^do/i,/^lu/i,/^ma/i,/^mi/i,/^ju/i,/^vi/i,/^sa/i]},Lve={narrow:/^(a|p|mn|md|(de la|a las) (mañana|tarde|noche))/i,any:/^([ap]\.?\s?m\.?|medianoche|mediodia|(de la|a las) (mañana|tarde|noche))/i},Ive={any:{am:/^a/i,pm:/^p/i,midnight:/^mn/i,noon:/^md/i,morning:/mañana/i,afternoon:/tarde/i,evening:/tarde/i,night:/noche/i}},$ve={ordinalNumber:WC({matchPattern:Cve,parsePattern:Ave,valueCallback:function(t){return parseInt(t,10)}}),era:Rr({matchPatterns:Rve,defaultMatchWidth:"wide",parsePatterns:Pve,defaultParseWidth:"any"}),quarter:Rr({matchPatterns:Tve,defaultMatchWidth:"wide",parsePatterns:kve,defaultParseWidth:"any",valueCallback:t=>t+1}),month:Rr({matchPatterns:Dve,defaultMatchWidth:"wide",parsePatterns:Nve,defaultParseWidth:"any"}),day:Rr({matchPatterns:Mve,defaultMatchWidth:"wide",parsePatterns:Ove,defaultParseWidth:"any"}),dayPeriod:Rr({matchPatterns:Lve,defaultMatchWidth:"any",parsePatterns:Ive,defaultParseWidth:"any"})},jve={code:"es",formatDistance:cve,formatLong:hve,formatRelative:gve,localize:Eve,match:$ve,options:{weekStartsOn:1,firstWeekContainsDate:1}},Fve={lessThanXSeconds:{one:"moins d’une seconde",other:"moins de {{count}} secondes"},xSeconds:{one:"1 seconde",other:"{{count}} secondes"},halfAMinute:"30 secondes",lessThanXMinutes:{one:"moins d’une minute",other:"moins de {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"environ 1 heure",other:"environ {{count}} heures"},xHours:{one:"1 heure",other:"{{count}} heures"},xDays:{one:"1 jour",other:"{{count}} jours"},aboutXWeeks:{one:"environ 1 semaine",other:"environ {{count}} semaines"},xWeeks:{one:"1 semaine",other:"{{count}} semaines"},aboutXMonths:{one:"environ 1 mois",other:"environ {{count}} mois"},xMonths:{one:"1 mois",other:"{{count}} mois"},aboutXYears:{one:"environ 1 an",other:"environ {{count}} ans"},xYears:{one:"1 an",other:"{{count}} ans"},overXYears:{one:"plus d’un an",other:"plus de {{count}} ans"},almostXYears:{one:"presqu’un an",other:"presque {{count}} ans"}},zve=(t,e,n)=>{let r;const s=Fve[t];return typeof s=="string"?r=s:e===1?r=s.one:r=s.other.replace("{{count}}",String(e)),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"dans "+r:"il y a "+r:r},Bve={full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},Uve={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},Hve={full:"{{date}} 'à' {{time}}",long:"{{date}} 'à' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Wve={date:$o({formats:Bve,defaultWidth:"full"}),time:$o({formats:Uve,defaultWidth:"full"}),dateTime:$o({formats:Hve,defaultWidth:"full"})},Vve={lastWeek:"eeee 'dernier à' p",yesterday:"'hier à' p",today:"'aujourd’hui à' p",tomorrow:"'demain à' p'",nextWeek:"eeee 'prochain à' p",other:"P"},qve=(t,e,n,r)=>Vve[t],Gve={narrow:["av. J.-C","ap. J.-C"],abbreviated:["av. J.-C","ap. J.-C"],wide:["avant Jésus-Christ","après Jésus-Christ"]},Kve={narrow:["T1","T2","T3","T4"],abbreviated:["1er trim.","2ème trim.","3ème trim.","4ème trim."],wide:["1er trimestre","2ème trimestre","3ème trimestre","4ème trimestre"]},Yve={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],wide:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"]},Xve={narrow:["D","L","M","M","J","V","S"],short:["di","lu","ma","me","je","ve","sa"],abbreviated:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],wide:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"]},Qve={narrow:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"mat.",afternoon:"ap.m.",evening:"soir",night:"mat."},abbreviated:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"matin",afternoon:"après-midi",evening:"soir",night:"matin"},wide:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"du matin",afternoon:"de l’après-midi",evening:"du soir",night:"du matin"}},Jve=(t,e)=>{const n=Number(t),r=e==null?void 0:e.unit;if(n===0)return"0";const s=["year","week","hour","minute","second"];let i;return n===1?i=r&&s.includes(r)?"ère":"er":i="ème",n+i},Zve=["MMM","MMMM"],eye={preprocessor:(t,e)=>t.getDate()===1||!e.some(r=>r.isToken&&Zve.includes(r.value))?e:e.map(r=>r.isToken&&r.value==="do"?{isToken:!0,value:"d"}:r),ordinalNumber:Jve,era:Ar({values:Gve,defaultWidth:"wide"}),quarter:Ar({values:Kve,defaultWidth:"wide",argumentCallback:t=>t-1}),month:Ar({values:Yve,defaultWidth:"wide"}),day:Ar({values:Xve,defaultWidth:"wide"}),dayPeriod:Ar({values:Qve,defaultWidth:"wide"})},tye=/^(\d+)(ième|ère|ème|er|e)?/i,nye=/\d+/i,rye={narrow:/^(av\.J\.C|ap\.J\.C|ap\.J\.-C)/i,abbreviated:/^(av\.J\.-C|av\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,wide:/^(avant Jésus-Christ|après Jésus-Christ)/i},sye={any:[/^av/i,/^ap/i]},iye={narrow:/^T?[1234]/i,abbreviated:/^[1234](er|ème|e)? trim\.?/i,wide:/^[1234](er|ème|e)? trimestre/i},oye={any:[/1/i,/2/i,/3/i,/4/i]},aye={narrow:/^[jfmasond]/i,abbreviated:/^(janv|févr|mars|avr|mai|juin|juill|juil|août|sept|oct|nov|déc)\.?/i,wide:/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i},lye={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^av/i,/^ma/i,/^juin/i,/^juil/i,/^ao/i,/^s/i,/^o/i,/^n/i,/^d/i]},cye={narrow:/^[lmjvsd]/i,short:/^(di|lu|ma|me|je|ve|sa)/i,abbreviated:/^(dim|lun|mar|mer|jeu|ven|sam)\.?/i,wide:/^(dimanche|lundi|mardi|mercredi|jeudi|vendredi|samedi)/i},uye={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^di/i,/^lu/i,/^ma/i,/^me/i,/^je/i,/^ve/i,/^sa/i]},dye={narrow:/^(a|p|minuit|midi|mat\.?|ap\.?m\.?|soir|nuit)/i,any:/^([ap]\.?\s?m\.?|du matin|de l'après[-\s]midi|du soir|de la nuit)/i},fye={any:{am:/^a/i,pm:/^p/i,midnight:/^min/i,noon:/^mid/i,morning:/mat/i,afternoon:/ap/i,evening:/soir/i,night:/nuit/i}},hye={ordinalNumber:WC({matchPattern:tye,parsePattern:nye,valueCallback:t=>parseInt(t)}),era:Rr({matchPatterns:rye,defaultMatchWidth:"wide",parsePatterns:sye,defaultParseWidth:"any"}),quarter:Rr({matchPatterns:iye,defaultMatchWidth:"wide",parsePatterns:oye,defaultParseWidth:"any",valueCallback:t=>t+1}),month:Rr({matchPatterns:aye,defaultMatchWidth:"wide",parsePatterns:lye,defaultParseWidth:"any"}),day:Rr({matchPatterns:cye,defaultMatchWidth:"wide",parsePatterns:uye,defaultParseWidth:"any"}),dayPeriod:Rr({matchPatterns:dye,defaultMatchWidth:"any",parsePatterns:fye,defaultParseWidth:"any"})},pye={code:"fr",formatDistance:zve,formatLong:Wve,formatRelative:qve,localize:eye,match:hye,options:{weekStartsOn:1,firstWeekContainsDate:4}};var dt=function(){return dt=Object.assign||function(e){for(var n,r=1,s=arguments.length;r1&&(c||!u),l=e>1&&(u||!c),d=function(){r&&i(r)},m=function(){s&&i(s)};return P.jsx(Gye,{displayMonth:t.displayMonth,hideNext:f,hidePrevious:l,nextMonth:s,previousMonth:r,onPreviousClick:d,onNextClick:m})}function Kye(t){var e,n=In(),r=n.classNames,s=n.disableNavigation,i=n.styles,a=n.captionLayout,o=n.components,c=(e=o==null?void 0:o.CaptionLabel)!==null&&e!==void 0?e:I6,u;return s?u=P.jsx(c,{id:t.id,displayMonth:t.displayMonth}):a==="dropdown"?u=P.jsx(Rz,{displayMonth:t.displayMonth,id:t.id}):a==="dropdown-buttons"?u=P.jsxs(P.Fragment,{children:[P.jsx(Rz,{displayMonth:t.displayMonth,displayIndex:t.displayIndex,id:t.id}),P.jsx(Pz,{displayMonth:t.displayMonth,displayIndex:t.displayIndex,id:t.id})]}):u=P.jsxs(P.Fragment,{children:[P.jsx(c,{id:t.id,displayMonth:t.displayMonth,displayIndex:t.displayIndex}),P.jsx(Pz,{displayMonth:t.displayMonth,id:t.id})]}),P.jsx("div",{className:r.caption,style:i.caption,children:u})}function Yye(t){var e=In(),n=e.footer,r=e.styles,s=e.classNames.tfoot;return n?P.jsx("tfoot",{className:s,style:r.tfoot,children:P.jsx("tr",{children:P.jsx("td",{colSpan:8,children:n})})}):P.jsx(P.Fragment,{})}function Xye(t,e,n){for(var r=n?Gh(new Date):xl(new Date,{locale:t,weekStartsOn:e}),s=[],i=0;i<7;i++){var a=qs(r,i);s.push(a)}return s}function Qye(){var t=In(),e=t.classNames,n=t.styles,r=t.showWeekNumber,s=t.locale,i=t.weekStartsOn,a=t.ISOWeek,o=t.formatters.formatWeekdayName,c=t.labels.labelWeekday,u=Xye(s,i,a);return P.jsxs("tr",{style:n.head_row,className:e.head_row,children:[r&&P.jsx("td",{style:n.head_cell,className:e.head_cell}),u.map(function(f,l){return P.jsx("th",{scope:"col",className:e.head_cell,style:n.head_cell,"aria-label":c(f,{locale:s}),children:o(f,{locale:s})},l)})]})}function Jye(){var t,e=In(),n=e.classNames,r=e.styles,s=e.components,i=(t=s==null?void 0:s.HeadRow)!==null&&t!==void 0?t:Qye;return P.jsx("thead",{style:r.head,className:n.head,children:P.jsx(i,{})})}function Zye(t){var e=In(),n=e.locale,r=e.formatters.formatDay;return P.jsx(P.Fragment,{children:r(t.date,{locale:n})})}var VL=_.createContext(void 0);function ebe(t){if(!h_(t.initialProps)){var e={selected:void 0,modifiers:{disabled:[]}};return P.jsx(VL.Provider,{value:e,children:t.children})}return P.jsx(tbe,{initialProps:t.initialProps,children:t.children})}function tbe(t){var e=t.initialProps,n=t.children,r=e.selected,s=e.min,i=e.max,a=function(u,f,l){var d,m;(d=e.onDayClick)===null||d===void 0||d.call(e,u,f,l);var p=!!(f.selected&&s&&(r==null?void 0:r.length)===s);if(!p){var h=!!(!f.selected&&i&&(r==null?void 0:r.length)===i);if(!h){var y=r?O6([],r):[];if(f.selected){var g=y.findIndex(function(v){return bi(u,v)});y.splice(g,1)}else y.push(u);(m=e.onSelect)===null||m===void 0||m.call(e,y,u,f,l)}}},o={disabled:[]};r&&o.disabled.push(function(u){var f=i&&r.length>i-1,l=r.some(function(d){return bi(d,u)});return!!(f&&!l)});var c={selected:r,onDayClick:a,modifiers:o};return P.jsx(VL.Provider,{value:c,children:n})}function qL(){var t=_.useContext(VL);if(!t)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return t}function nbe(t,e){var n=e||{},r=n.from,s=n.to;return r&&s?bi(s,t)&&bi(r,t)?void 0:bi(s,t)?{from:s,to:void 0}:bi(r,t)?void 0:FD(r,t)?{from:t,to:s}:{from:r,to:t}:s?FD(t,s)?{from:s,to:t}:{from:t,to:s}:r?M6(t,r)?{from:t,to:r}:{from:r,to:t}:{from:t,to:void 0}}var GL=_.createContext(void 0);function rbe(t){if(!p_(t.initialProps)){var e={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return P.jsx(GL.Provider,{value:e,children:t.children})}return P.jsx(sbe,{initialProps:t.initialProps,children:t.children})}function sbe(t){var e=t.initialProps,n=t.children,r=e.selected,s=r||{},i=s.from,a=s.to,o=e.min,c=e.max,u=function(m,p,h){var y,g;(y=e.onDayClick)===null||y===void 0||y.call(e,m,p,h);var v=nbe(m,r);(g=e.onSelect)===null||g===void 0||g.call(e,v,m,p,h)},f={range_start:[],range_end:[],range_middle:[],disabled:[]};if(i?(f.range_start=[i],a?(f.range_end=[a],bi(i,a)||(f.range_middle=[{after:i,before:a}])):f.range_end=[i]):a&&(f.range_start=[a],f.range_end=[a]),o&&(i&&!a&&f.disabled.push({after:cT(i,o-1),before:qs(i,o-1)}),i&&a&&f.disabled.push({after:i,before:qs(i,o-1)}),!i&&a&&f.disabled.push({after:cT(a,o-1),before:qs(a,o-1)})),c){if(i&&!a&&(f.disabled.push({before:qs(i,-c+1)}),f.disabled.push({after:qs(i,c-1)})),i&&a){var l=pl(a,i)+1,d=c-l;f.disabled.push({before:cT(i,d)}),f.disabled.push({after:qs(a,d)})}!i&&a&&(f.disabled.push({before:qs(a,-c+1)}),f.disabled.push({after:qs(a,c-1)}))}return P.jsx(GL.Provider,{value:{selected:r,onDayClick:u,modifiers:f},children:n})}function KL(){var t=_.useContext(GL);if(!t)throw new Error("useSelectRange must be used within a SelectRangeProvider");return t}function HS(t){return Array.isArray(t)?O6([],t):t!==void 0?[t]:[]}function ibe(t){var e={};return Object.entries(t).forEach(function(n){var r=n[0],s=n[1];e[r]=HS(s)}),e}var Ta;(function(t){t.Outside="outside",t.Disabled="disabled",t.Selected="selected",t.Hidden="hidden",t.Today="today",t.RangeStart="range_start",t.RangeEnd="range_end",t.RangeMiddle="range_middle"})(Ta||(Ta={}));var obe=Ta.Selected,Wl=Ta.Disabled,abe=Ta.Hidden,lbe=Ta.Today,dT=Ta.RangeEnd,fT=Ta.RangeMiddle,hT=Ta.RangeStart,cbe=Ta.Outside;function ube(t,e,n){var r,s=(r={},r[obe]=HS(t.selected),r[Wl]=HS(t.disabled),r[abe]=HS(t.hidden),r[lbe]=[t.today],r[dT]=[],r[fT]=[],r[hT]=[],r[cbe]=[],r);return t.fromDate&&s[Wl].push({before:t.fromDate}),t.toDate&&s[Wl].push({after:t.toDate}),h_(t)?s[Wl]=s[Wl].concat(e.modifiers[Wl]):p_(t)&&(s[Wl]=s[Wl].concat(n.modifiers[Wl]),s[hT]=n.modifiers[hT],s[fT]=n.modifiers[fT],s[dT]=n.modifiers[dT]),s}var F6=_.createContext(void 0);function dbe(t){var e=In(),n=qL(),r=KL(),s=ube(e,n,r),i=ibe(e.modifiers),a=dt(dt({},s),i);return P.jsx(F6.Provider,{value:a,children:t.children})}function z6(){var t=_.useContext(F6);if(!t)throw new Error("useModifiers must be used within a ModifiersProvider");return t}function fbe(t){return!!(t&&typeof t=="object"&&"before"in t&&"after"in t)}function hbe(t){return!!(t&&typeof t=="object"&&"from"in t)}function pbe(t){return!!(t&&typeof t=="object"&&"after"in t)}function mbe(t){return!!(t&&typeof t=="object"&&"before"in t)}function gbe(t){return!!(t&&typeof t=="object"&&"dayOfWeek"in t)}function vbe(t,e){var n,r=e.from,s=e.to;if(r&&s){var i=pl(s,r)<0;i&&(n=[s,r],r=n[0],s=n[1]);var a=pl(t,r)>=0&&pl(s,t)>=0;return a}return s?bi(s,t):r?bi(r,t):!1}function ybe(t){return zL(t)}function bbe(t){return Array.isArray(t)&&t.every(zL)}function wbe(t,e){return e.some(function(n){if(typeof n=="boolean")return n;if(ybe(n))return bi(t,n);if(bbe(n))return n.includes(t);if(hbe(n))return vbe(t,n);if(gbe(n))return n.dayOfWeek.includes(t.getDay());if(fbe(n)){var r=pl(n.before,t),s=pl(n.after,t),i=r>0,a=s<0,o=FD(n.before,n.after);return o?a&&i:i||a}return pbe(n)?pl(t,n.after)>0:mbe(n)?pl(n.before,t)>0:typeof n=="function"?n(t):!1})}function YL(t,e,n){var r=Object.keys(e).reduce(function(i,a){var o=e[a];return wbe(t,o)&&i.push(a),i},[]),s={};return r.forEach(function(i){return s[i]=!0}),n&&!WL(t,n)&&(s.outside=!0),s}function _be(t,e){for(var n=Ai(t[0]),r=BL(t[t.length-1]),s,i,a=n;a<=r;){var o=YL(a,e),c=!o.disabled&&!o.hidden;if(!c){a=qs(a,1);continue}if(o.selected)return a;o.today&&!i&&(i=a),s||(s=a),a=qs(a,1)}return i||s}var xbe=365;function B6(t,e){var n=e.moveBy,r=e.direction,s=e.context,i=e.modifiers,a=e.retry,o=a===void 0?{count:0,lastFocused:t}:a,c=s.weekStartsOn,u=s.fromDate,f=s.toDate,l=s.locale,d={day:qs,week:jD,month:Pa,year:Rme,startOfWeek:function(y){return s.ISOWeek?Gh(y):xl(y,{locale:l,weekStartsOn:c})},endOfWeek:function(y){return s.ISOWeek?P6(y):UL(y,{locale:l,weekStartsOn:c})}},m=d[n](t,r==="after"?1:-1);r==="before"&&u?m=Pme([u,m]):r==="after"&&f&&(m=Tme([f,m]));var p=!0;if(i){var h=YL(m,i);p=!h.disabled&&!h.hidden}return p?m:o.count>xbe?o.lastFocused:B6(m,{moveBy:n,direction:r,context:s,modifiers:i,retry:dt(dt({},o),{count:o.count+1})})}var U6=_.createContext(void 0);function Sbe(t){var e=m_(),n=z6(),r=_.useState(),s=r[0],i=r[1],a=_.useState(),o=a[0],c=a[1],u=_be(e.displayMonths,n),f=s??(o&&e.isDateDisplayed(o))?o:u,l=function(){c(s),i(void 0)},d=function(y){i(y)},m=In(),p=function(y,g){if(s){var v=B6(s,{moveBy:y,direction:g,context:m,modifiers:n});bi(s,v)||(e.goToDate(v,s),d(v))}},h={focusedDay:s,focusTarget:f,blur:l,focus:d,focusDayAfter:function(){return p("day","after")},focusDayBefore:function(){return p("day","before")},focusWeekAfter:function(){return p("week","after")},focusWeekBefore:function(){return p("week","before")},focusMonthBefore:function(){return p("month","before")},focusMonthAfter:function(){return p("month","after")},focusYearBefore:function(){return p("year","before")},focusYearAfter:function(){return p("year","after")},focusStartOfWeek:function(){return p("startOfWeek","before")},focusEndOfWeek:function(){return p("endOfWeek","after")}};return P.jsx(U6.Provider,{value:h,children:t.children})}function XL(){var t=_.useContext(U6);if(!t)throw new Error("useFocusContext must be used within a FocusProvider");return t}function Ebe(t,e){var n=z6(),r=YL(t,n,e);return r}var QL=_.createContext(void 0);function Cbe(t){if(!VC(t.initialProps)){var e={selected:void 0};return P.jsx(QL.Provider,{value:e,children:t.children})}return P.jsx(Abe,{initialProps:t.initialProps,children:t.children})}function Abe(t){var e=t.initialProps,n=t.children,r=function(i,a,o){var c,u,f;if((c=e.onDayClick)===null||c===void 0||c.call(e,i,a,o),a.selected&&!e.required){(u=e.onSelect)===null||u===void 0||u.call(e,void 0,i,a,o);return}(f=e.onSelect)===null||f===void 0||f.call(e,i,i,a,o)},s={selected:e.selected,onDayClick:r};return P.jsx(QL.Provider,{value:s,children:n})}function H6(){var t=_.useContext(QL);if(!t)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return t}function Rbe(t,e){var n=In(),r=H6(),s=qL(),i=KL(),a=XL(),o=a.focusDayAfter,c=a.focusDayBefore,u=a.focusWeekAfter,f=a.focusWeekBefore,l=a.blur,d=a.focus,m=a.focusMonthBefore,p=a.focusMonthAfter,h=a.focusYearBefore,y=a.focusYearAfter,g=a.focusStartOfWeek,v=a.focusEndOfWeek,w=function(W){var H,ee,re,X;VC(n)?(H=r.onDayClick)===null||H===void 0||H.call(r,t,e,W):h_(n)?(ee=s.onDayClick)===null||ee===void 0||ee.call(s,t,e,W):p_(n)?(re=i.onDayClick)===null||re===void 0||re.call(i,t,e,W):(X=n.onDayClick)===null||X===void 0||X.call(n,t,e,W)},x=function(W){var H;d(t),(H=n.onDayFocus)===null||H===void 0||H.call(n,t,e,W)},A=function(W){var H;l(),(H=n.onDayBlur)===null||H===void 0||H.call(n,t,e,W)},k=function(W){var H;(H=n.onDayMouseEnter)===null||H===void 0||H.call(n,t,e,W)},R=function(W){var H;(H=n.onDayMouseLeave)===null||H===void 0||H.call(n,t,e,W)},E=function(W){var H;(H=n.onDayPointerEnter)===null||H===void 0||H.call(n,t,e,W)},T=function(W){var H;(H=n.onDayPointerLeave)===null||H===void 0||H.call(n,t,e,W)},D=function(W){var H;(H=n.onDayTouchCancel)===null||H===void 0||H.call(n,t,e,W)},M=function(W){var H;(H=n.onDayTouchEnd)===null||H===void 0||H.call(n,t,e,W)},L=function(W){var H;(H=n.onDayTouchMove)===null||H===void 0||H.call(n,t,e,W)},I=function(W){var H;(H=n.onDayTouchStart)===null||H===void 0||H.call(n,t,e,W)},j=function(W){var H;(H=n.onDayKeyUp)===null||H===void 0||H.call(n,t,e,W)},U=function(W){var H;switch(W.key){case"ArrowLeft":W.preventDefault(),W.stopPropagation(),n.dir==="rtl"?o():c();break;case"ArrowRight":W.preventDefault(),W.stopPropagation(),n.dir==="rtl"?c():o();break;case"ArrowDown":W.preventDefault(),W.stopPropagation(),u();break;case"ArrowUp":W.preventDefault(),W.stopPropagation(),f();break;case"PageUp":W.preventDefault(),W.stopPropagation(),W.shiftKey?h():m();break;case"PageDown":W.preventDefault(),W.stopPropagation(),W.shiftKey?y():p();break;case"Home":W.preventDefault(),W.stopPropagation(),g();break;case"End":W.preventDefault(),W.stopPropagation(),v();break}(H=n.onDayKeyDown)===null||H===void 0||H.call(n,t,e,W)},Y={onClick:w,onFocus:x,onBlur:A,onKeyDown:U,onKeyUp:j,onMouseEnter:k,onMouseLeave:R,onPointerEnter:E,onPointerLeave:T,onTouchCancel:D,onTouchEnd:M,onTouchMove:L,onTouchStart:I};return Y}function Pbe(){var t=In(),e=H6(),n=qL(),r=KL(),s=VC(t)?e.selected:h_(t)?n.selected:p_(t)?r.selected:void 0;return s}function Tbe(t){return Object.values(Ta).includes(t)}function kbe(t,e){var n=[t.classNames.day];return Object.keys(e).forEach(function(r){var s=t.modifiersClassNames[r];if(s)n.push(s);else if(Tbe(r)){var i=t.classNames["day_".concat(r)];i&&n.push(i)}}),n}function Dbe(t,e){var n=dt({},t.styles.day);return Object.keys(e).forEach(function(r){var s;n=dt(dt({},n),(s=t.modifiersStyles)===null||s===void 0?void 0:s[r])}),n}function Nbe(t,e,n){var r,s,i,a=In(),o=XL(),c=Ebe(t,e),u=Rbe(t,c),f=Pbe(),l=!!(a.onDayClick||a.mode!=="default");_.useEffect(function(){var k;c.outside||o.focusedDay&&l&&bi(o.focusedDay,t)&&((k=n.current)===null||k===void 0||k.focus())},[o.focusedDay,t,n,l,c.outside]);var d=kbe(a,c).join(" "),m=Dbe(a,c),p=!!(c.outside&&!a.showOutsideDays||c.hidden),h=(i=(s=a.components)===null||s===void 0?void 0:s.DayContent)!==null&&i!==void 0?i:Zye,y=P.jsx(h,{date:t,displayMonth:e,activeModifiers:c}),g={style:m,className:d,children:y,role:"gridcell"},v=o.focusTarget&&bi(o.focusTarget,t)&&!c.outside,w=o.focusedDay&&bi(o.focusedDay,t),x=dt(dt(dt({},g),(r={disabled:c.disabled,role:"gridcell"},r["aria-selected"]=c.selected,r.tabIndex=w||v?0:-1,r)),u),A={isButton:l,isHidden:p,activeModifiers:c,selectedDays:f,buttonProps:x,divProps:g};return A}function Mbe(t){var e=_.useRef(null),n=Nbe(t.date,t.displayMonth,e);return n.isHidden?P.jsx("div",{role:"gridcell"}):n.isButton?P.jsx(a1,dt({name:"day",ref:e},n.buttonProps)):P.jsx("div",dt({},n.divProps))}function Obe(t){var e=t.number,n=t.dates,r=In(),s=r.onWeekNumberClick,i=r.styles,a=r.classNames,o=r.locale,c=r.labels.labelWeekNumber,u=r.formatters.formatWeekNumber,f=u(Number(e),{locale:o});if(!s)return P.jsx("span",{className:a.weeknumber,style:i.weeknumber,children:f});var l=c(Number(e),{locale:o}),d=function(m){s(e,n,m)};return P.jsx(a1,{name:"week-number","aria-label":l,className:a.weeknumber,style:i.weeknumber,onClick:d,children:f})}function Lbe(t){var e,n,r=In(),s=r.styles,i=r.classNames,a=r.showWeekNumber,o=r.components,c=(e=o==null?void 0:o.Day)!==null&&e!==void 0?e:Mbe,u=(n=o==null?void 0:o.WeekNumber)!==null&&n!==void 0?n:Obe,f;return a&&(f=P.jsx("td",{className:i.cell,style:s.cell,children:P.jsx(u,{number:t.weekNumber,dates:t.dates})})),P.jsxs("tr",{className:i.row,style:s.row,children:[f,t.dates.map(function(l){return P.jsx("td",{className:i.cell,style:s.cell,role:"presentation",children:P.jsx(c,{displayMonth:t.displayMonth,date:l})},Rge(l))})]})}function Tz(t,e,n){for(var r=n!=null&&n.ISOWeek?P6(e):UL(e,n),s=n!=null&&n.ISOWeek?Gh(t):xl(t,n),i=pl(r,s),a=[],o=0;o<=i;o++)a.push(qs(s,o));var c=a.reduce(function(u,f){var l=n!=null&&n.ISOWeek?T6(f):D6(f,n),d=u.find(function(m){return m.weekNumber===l});return d?(d.dates.push(f),u):(u.push({weekNumber:l,dates:[f]}),u)},[]);return c}function Ibe(t,e){var n=Tz(Ai(t),BL(t),e);if(e!=null&&e.useFixedWeeks){var r=Tge(t,e);if(r<6){var s=n[n.length-1],i=s.dates[s.dates.length-1],a=jD(i,6-r),o=Tz(jD(i,1),a,e);n.push.apply(n,o)}}return n}function $be(t){var e,n,r,s=In(),i=s.locale,a=s.classNames,o=s.styles,c=s.hideHead,u=s.fixedWeeks,f=s.components,l=s.weekStartsOn,d=s.firstWeekContainsDate,m=s.ISOWeek,p=Ibe(t.displayMonth,{useFixedWeeks:!!u,ISOWeek:m,locale:i,weekStartsOn:l,firstWeekContainsDate:d}),h=(e=f==null?void 0:f.Head)!==null&&e!==void 0?e:Jye,y=(n=f==null?void 0:f.Row)!==null&&n!==void 0?n:Lbe,g=(r=f==null?void 0:f.Footer)!==null&&r!==void 0?r:Yye;return P.jsxs("table",{id:t.id,className:a.table,style:o.table,role:"grid","aria-labelledby":t["aria-labelledby"],children:[!c&&P.jsx(h,{}),P.jsx("tbody",{className:a.tbody,style:o.tbody,children:p.map(function(v){return P.jsx(y,{displayMonth:t.displayMonth,dates:v.dates,weekNumber:v.weekNumber},v.weekNumber)})}),P.jsx(g,{displayMonth:t.displayMonth})]})}function jbe(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var Fbe=jbe()?_.useLayoutEffect:_.useEffect,pT=!1,zbe=0;function kz(){return"react-day-picker-".concat(++zbe)}function Bbe(t){var e,n=t??(pT?kz():null),r=_.useState(n),s=r[0],i=r[1];return Fbe(function(){s===null&&i(kz())},[]),_.useEffect(function(){pT===!1&&(pT=!0)},[]),(e=t??s)!==null&&e!==void 0?e:void 0}function Ube(t){var e,n,r=In(),s=r.dir,i=r.classNames,a=r.styles,o=r.components,c=m_().displayMonths,u=Bbe(r.id?"".concat(r.id,"-").concat(t.displayIndex):void 0),f=r.id?"".concat(r.id,"-grid-").concat(t.displayIndex):void 0,l=[i.month],d=a.month,m=t.displayIndex===0,p=t.displayIndex===c.length-1,h=!m&&!p;s==="rtl"&&(e=[m,p],p=e[0],m=e[1]),m&&(l.push(i.caption_start),d=dt(dt({},d),a.caption_start)),p&&(l.push(i.caption_end),d=dt(dt({},d),a.caption_end)),h&&(l.push(i.caption_between),d=dt(dt({},d),a.caption_between));var y=(n=o==null?void 0:o.Caption)!==null&&n!==void 0?n:Kye;return P.jsxs("div",{className:l.join(" "),style:d,children:[P.jsx(y,{id:u,displayMonth:t.displayMonth,displayIndex:t.displayIndex}),P.jsx($be,{id:f,"aria-labelledby":u,displayMonth:t.displayMonth})]},t.displayIndex)}function Hbe(t){var e=In(),n=e.classNames,r=e.styles;return P.jsx("div",{className:n.months,style:r.months,children:t.children})}function Wbe(t){var e,n,r=t.initialProps,s=In(),i=XL(),a=m_(),o=_.useState(!1),c=o[0],u=o[1];_.useEffect(function(){s.initialFocus&&i.focusTarget&&(c||(i.focus(i.focusTarget),u(!0)))},[s.initialFocus,c,i.focus,i.focusTarget,i]);var f=[s.classNames.root,s.className];s.numberOfMonths>1&&f.push(s.classNames.multiple_months),s.showWeekNumber&&f.push(s.classNames.with_weeknumber);var l=dt(dt({},s.styles.root),s.style),d=Object.keys(r).filter(function(p){return p.startsWith("data-")}).reduce(function(p,h){var y;return dt(dt({},p),(y={},y[h]=r[h],y))},{}),m=(n=(e=r.components)===null||e===void 0?void 0:e.Months)!==null&&n!==void 0?n:Hbe;return P.jsx("div",dt({className:f.join(" "),style:l,dir:s.dir,id:s.id,nonce:r.nonce,title:r.title,lang:r.lang},d,{children:P.jsx(m,{children:a.displayMonths.map(function(p,h){return P.jsx(Ube,{displayIndex:h,displayMonth:p},h)})})}))}function Vbe(t){var e=t.children,n=mye(t,["children"]);return P.jsx(Oye,{initialProps:n,children:P.jsx(Wye,{children:P.jsx(Cbe,{initialProps:n,children:P.jsx(ebe,{initialProps:n,children:P.jsx(rbe,{initialProps:n,children:P.jsx(dbe,{children:P.jsx(Sbe,{children:e})})})})})})})}function qbe(t){return P.jsx(Vbe,dt({},t,{children:P.jsx(Wbe,{initialProps:t})}))}function W6({className:t,classNames:e,showOutsideDays:n=!0,...r}){return P.jsx(qbe,{showOutsideDays:n,className:ce("p-3",t),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:ce(Vb({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:"h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",day:ce(Vb({variant:"ghost"}),"h-9 w-9 p-0 font-normal aria-selected:opacity-100"),day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...e},components:{IconLeft:()=>P.jsx(gL,{className:"w-4 h-4"}),IconRight:()=>P.jsx(s_,{className:"w-4 h-4"})},...r})}W6.displayName="Calendar";const V6=_.forwardRef(({className:t,...e},n)=>P.jsx("div",{ref:n,className:ce("rounded-md border bg-card text-card-foreground shadow",t),...e}));V6.displayName="Card";const q6=_.forwardRef(({className:t,...e},n)=>P.jsx("div",{ref:n,className:ce("flex flex-col space-y-1.5 p-6",t),...e}));q6.displayName="CardHeader";const G6=_.forwardRef(({className:t,...e},n)=>P.jsx("h3",{ref:n,className:ce("font-semibold leading-none tracking-tight",t),...e}));G6.displayName="CardTitle";const K6=_.forwardRef(({className:t,...e},n)=>P.jsx("p",{ref:n,className:ce("text-sm text-muted-foreground",t),...e}));K6.displayName="CardDescription";const Y6=_.forwardRef(({className:t,...e},n)=>P.jsx("div",{ref:n,className:ce("p-6 pt-0",t),...e}));Y6.displayName="CardContent";const X6=_.forwardRef(({className:t,...e},n)=>P.jsx("div",{ref:n,className:ce("flex items-center p-6 pt-0",t),...e}));X6.displayName="CardFooter";var Gbe=Array.isArray,Kbe=Gbe,Ybe=typeof yr=="object"&&yr&&yr.Object===Object&&yr,Xbe=Ybe,Qbe=Xbe,Jbe=typeof self=="object"&&self&&self.Object===Object&&self,Zbe=Qbe||Jbe||Function("return this")(),qC=Zbe,ewe=qC,twe=ewe.Symbol,JL=twe,Dz=JL,Q6=Object.prototype,nwe=Q6.hasOwnProperty,rwe=Q6.toString,yy=Dz?Dz.toStringTag:void 0;function swe(t){var e=nwe.call(t,yy),n=t[yy];try{t[yy]=void 0;var r=!0}catch{}var s=rwe.call(t);return r&&(e?t[yy]=n:delete t[yy]),s}var iwe=swe,owe=Object.prototype,awe=owe.toString;function lwe(t){return awe.call(t)}var cwe=lwe,Nz=JL,uwe=iwe,dwe=cwe,fwe="[object Null]",hwe="[object Undefined]",Mz=Nz?Nz.toStringTag:void 0;function pwe(t){return t==null?t===void 0?hwe:fwe:Mz&&Mz in Object(t)?uwe(t):dwe(t)}var ZL=pwe;function mwe(t){return t!=null&&typeof t=="object"}var J6=mwe,gwe=ZL,vwe=J6,ywe="[object Symbol]";function bwe(t){return typeof t=="symbol"||vwe(t)&&gwe(t)==ywe}var wwe=bwe;function _we(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var g_=_we,xwe=ZL,Swe=g_,Ewe="[object AsyncFunction]",Cwe="[object Function]",Awe="[object GeneratorFunction]",Rwe="[object Proxy]";function Pwe(t){if(!Swe(t))return!1;var e=xwe(t);return e==Cwe||e==Awe||e==Ewe||e==Rwe}var Twe=Pwe,kwe=qC,Dwe=kwe["__core-js_shared__"],Nwe=Dwe,mT=Nwe,Oz=function(){var t=/[^.]+$/.exec(mT&&mT.keys&&mT.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Mwe(t){return!!Oz&&Oz in t}var Owe=Mwe,Lwe=Function.prototype,Iwe=Lwe.toString;function $we(t){if(t!=null){try{return Iwe.call(t)}catch{}try{return t+""}catch{}}return""}var jwe=$we,Fwe=Twe,zwe=Owe,Bwe=g_,Uwe=jwe,Hwe=/[\\^$.*+?()[\]{}|]/g,Wwe=/^\[object .+?Constructor\]$/,Vwe=Function.prototype,qwe=Object.prototype,Gwe=Vwe.toString,Kwe=qwe.hasOwnProperty,Ywe=RegExp("^"+Gwe.call(Kwe).replace(Hwe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Xwe(t){if(!Bwe(t)||zwe(t))return!1;var e=Fwe(t)?Ywe:Wwe;return e.test(Uwe(t))}var Qwe=Xwe;function Jwe(t,e){return t==null?void 0:t[e]}var Zwe=Jwe,e0e=Qwe,t0e=Zwe;function n0e(t,e){var n=t0e(t,e);return e0e(n)?n:void 0}var Z6=n0e,r0e=Z6,s0e=r0e(Object,"create"),GC=s0e,Lz=GC;function i0e(){this.__data__=Lz?Lz(null):{},this.size=0}var o0e=i0e;function a0e(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var l0e=a0e,c0e=GC,u0e="__lodash_hash_undefined__",d0e=Object.prototype,f0e=d0e.hasOwnProperty;function h0e(t){var e=this.__data__;if(c0e){var n=e[t];return n===u0e?void 0:n}return f0e.call(e,t)?e[t]:void 0}var p0e=h0e,m0e=GC,g0e=Object.prototype,v0e=g0e.hasOwnProperty;function y0e(t){var e=this.__data__;return m0e?e[t]!==void 0:v0e.call(e,t)}var b0e=y0e,w0e=GC,_0e="__lodash_hash_undefined__";function x0e(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=w0e&&e===void 0?_0e:e,this}var S0e=x0e,E0e=o0e,C0e=l0e,A0e=p0e,R0e=b0e,P0e=S0e;function Cv(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e-1}var q0e=V0e,G0e=KC;function K0e(t,e){var n=this.__data__,r=G0e(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}var Y0e=K0e,X0e=D0e,Q0e=z0e,J0e=H0e,Z0e=q0e,e_e=Y0e;function Av(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e{var r;document.getElementById((r=t.current)==null?void 0:r.getAttribute("aria-describedby"))||console.warn(e)},[e,t]),null},Fpe=KV,zpe=YV,Bpe=XV,o6=QV,a6=JV,l6=r6,c6=i6,u6=e6,d6=n6;const Vb=Ho("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Qs=_.forwardRef(({className:t,variant:e,size:n,asChild:r=!1,...s},i)=>{const a=r?Ra:"button";return P.jsx(a,{className:ce(Vb({variant:e,size:n,className:t})),ref:i,...s})});Qs.displayName="Button";const f6=Fpe,OHe=zpe,Upe=Bpe,h6=_.forwardRef(({className:t,...e},n)=>P.jsx(o6,{className:ce("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",t),...e,ref:n}));h6.displayName=o6.displayName;const DL=_.forwardRef(({className:t,...e},n)=>P.jsxs(Upe,{children:[P.jsx(h6,{}),P.jsx(a6,{ref:n,className:ce("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",t),...e})]}));DL.displayName=a6.displayName;const NL=({className:t,...e})=>P.jsx("div",{className:ce("flex flex-col space-y-2 text-center sm:text-left",t),...e});NL.displayName="AlertDialogHeader";const ML=({className:t,...e})=>P.jsx("div",{className:ce("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...e});ML.displayName="AlertDialogFooter";const OL=_.forwardRef(({className:t,...e},n)=>P.jsx(u6,{ref:n,className:ce("text-lg font-semibold",t),...e}));OL.displayName=u6.displayName;const LL=_.forwardRef(({className:t,...e},n)=>P.jsx(d6,{ref:n,className:ce("text-sm text-muted-foreground",t),...e}));LL.displayName=d6.displayName;const IL=_.forwardRef(({className:t,...e},n)=>P.jsx(l6,{ref:n,className:ce(Vb(),t),...e}));IL.displayName=l6.displayName;const $L=_.forwardRef(({className:t,...e},n)=>P.jsx(c6,{ref:n,className:ce(Vb({variant:"outline"}),"mt-2 sm:mt-0",t),...e}));$L.displayName=c6.displayName;const Hpe=({textAreaRef:t,triggerAutoSize:e,maxHeight:n=Number.MAX_SAFE_INTEGER,minHeight:r=0})=>{const[s,i]=_.useState(!0);_.useEffect(()=>{if(t){s&&(t.style.minHeight=`${r+2}px`,n>r&&(t.style.maxHeight=`${n}px`),i(!1)),t.style.height=`${r+2}px`;const o=t.scrollHeight;o>n?t.style.height=`${n}px`:t.style.height=`${o+2}px`}},[t,e,s,n,r])},p6=_.forwardRef(({maxHeight:t=Number.MAX_SAFE_INTEGER,minHeight:e=52,className:n,onChange:r,value:s,...i},a)=>{const o=_.useRef(null),[c,u]=_.useState("");return Hpe({textAreaRef:o.current,triggerAutoSize:c,maxHeight:t,minHeight:e}),_.useImperativeHandle(a,()=>({textArea:o.current,focus:()=>{var f;return(f=o.current)==null?void 0:f.focus()},maxHeight:t,minHeight:e})),_.useEffect(()=>{(s||i!=null&&i.defaultValue)&&u(s)},[s||(i==null?void 0:i.defaultValue)]),P.jsx("textarea",{...i,value:s,ref:o,className:ce("flex w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background 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",n),onChange:f=>{u(f.target.value),r==null||r(f)}})});p6.displayName="AutosizeTextarea";var jL="Avatar",[Wpe,LHe]=Tn(jL),[Vpe,m6]=Wpe(jL),g6=_.forwardRef((t,e)=>{const{__scopeAvatar:n,...r}=t,[s,i]=_.useState("idle");return P.jsx(Vpe,{scope:n,imageLoadingStatus:s,onImageLoadingStatusChange:i,children:P.jsx(De.span,{...r,ref:e})})});g6.displayName=jL;var v6="AvatarImage",y6=_.forwardRef((t,e)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:s=()=>{},...i}=t,a=m6(v6,n),o=qpe(r),c=Ut(u=>{s(u),a.onImageLoadingStatusChange(u)});return Ln(()=>{o!=="idle"&&c(o)},[o,c]),o==="loaded"?P.jsx(De.img,{...i,ref:e,src:r}):null});y6.displayName=v6;var b6="AvatarFallback",w6=_.forwardRef((t,e)=>{const{__scopeAvatar:n,delayMs:r,...s}=t,i=m6(b6,n),[a,o]=_.useState(r===void 0);return _.useEffect(()=>{if(r!==void 0){const c=window.setTimeout(()=>o(!0),r);return()=>window.clearTimeout(c)}},[r]),a&&i.imageLoadingStatus!=="loaded"?P.jsx(De.span,{...s,ref:e}):null});w6.displayName=b6;function qpe(t){const[e,n]=_.useState("idle");return Ln(()=>{if(!t){n("error");return}let r=!0;const s=new window.Image,i=a=>()=>{r&&n(a)};return n("loading"),s.onload=i("loaded"),s.onerror=i("error"),s.src=t,()=>{r=!1}},[t]),e}var _6=g6,x6=y6,S6=w6;const Gpe=_.forwardRef(({className:t,...e},n)=>P.jsx(_6,{ref:n,className:ce("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",t),...e}));Gpe.displayName=_6.displayName;const Kpe=_.forwardRef(({className:t,...e},n)=>P.jsx(x6,{ref:n,className:ce("aspect-square h-full w-full",t),...e}));Kpe.displayName=x6.displayName;const Ype=_.forwardRef(({className:t,...e},n)=>P.jsx(S6,{ref:n,className:ce("flex h-full w-full items-center justify-center rounded-full bg-muted",t),...e}));Ype.displayName=S6.displayName;const Xpe=Ho("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Qpe({className:t,variant:e,...n}){return P.jsx("div",{className:ce(Xpe({variant:e}),t),...n})}const mt=t=>typeof t=="string",vy=()=>{let t,e;const n=new Promise((r,s)=>{t=r,e=s});return n.resolve=t,n.reject=e,n},dz=t=>t==null?"":""+t,Jpe=(t,e,n)=>{t.forEach(r=>{e[r]&&(n[r]=e[r])})},Zpe=/###/g,fz=t=>t&&t.indexOf("###")>-1?t.replace(Zpe,"."):t,hz=t=>!t||mt(t),mb=(t,e,n)=>{const r=mt(e)?e.split("."):e;let s=0;for(;s{const{obj:r,k:s}=mb(t,e,Object);if(r!==void 0||e.length===1){r[s]=n;return}let i=e[e.length-1],a=e.slice(0,e.length-1),o=mb(t,a,Object);for(;o.obj===void 0&&a.length;)i=`${a[a.length-1]}.${i}`,a=a.slice(0,a.length-1),o=mb(t,a,Object),o&&o.obj&&typeof o.obj[`${o.k}.${i}`]<"u"&&(o.obj=void 0);o.obj[`${o.k}.${i}`]=n},eme=(t,e,n,r)=>{const{obj:s,k:i}=mb(t,e,Object);s[i]=s[i]||[],s[i].push(n)},nC=(t,e)=>{const{obj:n,k:r}=mb(t,e);if(n)return n[r]},tme=(t,e,n)=>{const r=nC(t,n);return r!==void 0?r:nC(e,n)},E6=(t,e,n)=>{for(const r in e)r!=="__proto__"&&r!=="constructor"&&(r in t?mt(t[r])||t[r]instanceof String||mt(e[r])||e[r]instanceof String?n&&(t[r]=e[r]):E6(t[r],e[r],n):t[r]=e[r]);return t},zp=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var nme={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const rme=t=>mt(t)?t.replace(/[&<>"'\/]/g,e=>nme[e]):t;class sme{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const n=this.regExpMap.get(e);if(n!==void 0)return n;const r=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}}const ime=[" ",",","?","!",";"],ome=new sme(20),ame=(t,e,n)=>{e=e||"",n=n||"";const r=ime.filter(a=>e.indexOf(a)<0&&n.indexOf(a)<0);if(r.length===0)return!0;const s=ome.getRegExp(`(${r.map(a=>a==="?"?"\\?":a).join("|")})`);let i=!s.test(t);if(!i){const a=t.indexOf(n);a>0&&!s.test(t.substring(0,a))&&(i=!0)}return i},$D=function(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!t)return;if(t[e])return t[e];const r=e.split(n);let s=t;for(let i=0;i-1&&ct&&t.replace("_","-"),lme={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console&&console[t]&&console[t].apply(console,e)}};class sC{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,n)}init(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=e||lme,this.options=n,this.debug=n.debug}log(){for(var e=arguments.length,n=new Array(e),r=0;r{this.observers[r]||(this.observers[r]=new Map);const s=this.observers[r].get(n)||0;this.observers[r].set(n,s+1)}),this}off(e,n){if(this.observers[e]){if(!n){delete this.observers[e];return}this.observers[e].delete(n)}}emit(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),s=1;s{let[o,c]=a;for(let u=0;u{let[o,c]=a;for(let u=0;u1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const n=this.options.ns.indexOf(e);n>-1&&this.options.ns.splice(n,1)}getResource(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,a=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure;let o;e.indexOf(".")>-1?o=e.split("."):(o=[e,n],r&&(Array.isArray(r)?o.push(...r):mt(r)&&i?o.push(...r.split(i)):o.push(r)));const c=nC(this.data,o);return!c&&!n&&!r&&e.indexOf(".")>-1&&(e=o[0],n=o[1],r=o.slice(2).join(".")),c||!a||!mt(r)?c:$D(this.data&&this.data[e]&&this.data[e][n],r,i)}addResource(e,n,r,s){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let o=[e,n];r&&(o=o.concat(a?r.split(a):r)),e.indexOf(".")>-1&&(o=e.split("."),s=n,n=o[1]),this.addNamespaces(n),pz(this.data,o,s),i.silent||this.emit("added",e,n,r,s)}addResources(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const i in r)(mt(r[i])||Array.isArray(r[i]))&&this.addResource(e,n,i,r[i],{silent:!0});s.silent||this.emit("added",e,n,r)}addResourceBundle(e,n,r,s,i){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},o=[e,n];e.indexOf(".")>-1&&(o=e.split("."),s=r,r=n,n=o[1]),this.addNamespaces(n);let c=nC(this.data,o)||{};a.skipCopy||(r=JSON.parse(JSON.stringify(r))),s?E6(c,r,i):c={...c,...r},pz(this.data,o,c),a.silent||this.emit("added",e,n,r)}removeResourceBundle(e,n){this.hasResourceBundle(e,n)&&delete this.data[e][n],this.removeNamespaces(n),this.emit("removed",e,n)}hasResourceBundle(e,n){return this.getResource(e,n)!==void 0}getResourceBundle(e,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(e,n)}:this.getResource(e,n)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const n=this.getDataByLanguage(e);return!!(n&&Object.keys(n)||[]).find(s=>n[s]&&Object.keys(n[s]).length>0)}toJSON(){return this.data}}var C6={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,r,s){return t.forEach(i=>{this.processors[i]&&(e=this.processors[i].process(e,n,r,s))}),e}};const gz={};class iC extends H1{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Jpe(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=hl.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const r=this.resolve(e,n);return r&&r.res!==void 0}extractFromKey(e,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let i=n.ns||this.options.defaultNS||[];const a=r&&e.indexOf(r)>-1,o=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!ame(e,r,s);if(a&&!o){const c=e.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:e,namespaces:mt(i)?[i]:i};const u=e.split(r);(r!==s||r===s&&this.options.ns.indexOf(u[0])>-1)&&(i=u.shift()),e=u.join(s)}return{key:e,namespaces:mt(i)?[i]:i}}translate(e,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const s=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:a,namespaces:o}=this.extractFromKey(e[e.length-1],n),c=o[o.length-1],u=n.lng||this.language,f=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(f){const x=n.nsSeparator||this.options.nsSeparator;return s?{res:`${c}${x}${a}`,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:`${c}${x}${a}`}return s?{res:a,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:c,usedParams:this.getUsedParamsDetails(n)}:a}const l=this.resolve(e,n);let d=l&&l.res;const m=l&&l.usedKey||a,p=l&&l.exactUsedKey||a,h=Object.prototype.toString.apply(d),y=["[object Number]","[object Function]","[object RegExp]"],g=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,v=!this.i18nFormat||this.i18nFormat.handleAsObject,w=!mt(d)&&typeof d!="boolean"&&typeof d!="number";if(v&&d&&w&&y.indexOf(h)<0&&!(mt(g)&&Array.isArray(d))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const x=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,d,{...n,ns:o}):`key '${a} (${this.language})' returned an object instead of string.`;return s?(l.res=x,l.usedParams=this.getUsedParamsDetails(n),l):x}if(i){const x=Array.isArray(d),A=x?[]:{},k=x?p:m;for(const R in d)if(Object.prototype.hasOwnProperty.call(d,R)){const E=`${k}${i}${R}`;A[R]=this.translate(E,{...n,joinArrays:!1,ns:o}),A[R]===E&&(A[R]=d[R])}d=A}}else if(v&&mt(g)&&Array.isArray(d))d=d.join(g),d&&(d=this.extendTranslation(d,e,n,r));else{let x=!1,A=!1;const k=n.count!==void 0&&!mt(n.count),R=iC.hasDefaultValue(n),E=k?this.pluralResolver.getSuffix(u,n.count,n):"",T=n.ordinal&&k?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",D=k&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),M=D&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${E}`]||n[`defaultValue${T}`]||n.defaultValue;!this.isValidLookup(d)&&R&&(x=!0,d=M),this.isValidLookup(d)||(A=!0,d=a);const I=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&A?void 0:d,j=R&&M!==d&&this.options.updateMissing;if(A||x||j){if(this.logger.log(j?"updateKey":"missingKey",u,c,a,j?M:d),i){const H=this.resolve(a,{...n,keySeparator:!1});H&&H.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let U=[];const Y=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Y&&Y[0])for(let H=0;H{const X=R&&re!==d?re:I;this.options.missingKeyHandler?this.options.missingKeyHandler(H,c,ee,X,j,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(H,c,ee,X,j,n),this.emit("missingKey",H,c,ee,d)};this.options.saveMissing&&(this.options.saveMissingPlurals&&k?U.forEach(H=>{const ee=this.pluralResolver.getSuffixes(H,n);D&&n[`defaultValue${this.options.pluralSeparator}zero`]&&ee.indexOf(`${this.options.pluralSeparator}zero`)<0&&ee.push(`${this.options.pluralSeparator}zero`),ee.forEach(re=>{W([H],a+re,n[`defaultValue${re}`]||M)})}):W(U,a,M))}d=this.extendTranslation(d,e,n,l,r),A&&d===a&&this.options.appendNamespaceToMissingKey&&(d=`${c}:${a}`),(A||x)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?d=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}:${a}`:a,x?d:void 0):d=this.options.parseMissingKeyHandler(d))}return s?(l.res=d,l.usedParams=this.getUsedParamsDetails(n),l):d}extendTranslation(e,n,r,s,i){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=mt(e)&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(u){const d=e.match(this.interpolator.nestingRegexp);f=d&&d.length}let l=r.replace&&!mt(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(l={...this.options.interpolation.defaultVariables,...l}),e=this.interpolator.interpolate(e,l,r.lng||this.language||s.usedLng,r),u){const d=e.match(this.interpolator.nestingRegexp),m=d&&d.length;f1&&arguments[1]!==void 0?arguments[1]:{},r,s,i,a,o;return mt(e)&&(e=[e]),e.forEach(c=>{if(this.isValidLookup(r))return;const u=this.extractFromKey(c,n),f=u.key;s=f;let l=u.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));const d=n.count!==void 0&&!mt(n.count),m=d&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),p=n.context!==void 0&&(mt(n.context)||typeof n.context=="number")&&n.context!=="",h=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);l.forEach(y=>{this.isValidLookup(r)||(o=y,!gz[`${h[0]}-${y}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(o)&&(gz[`${h[0]}-${y}`]=!0,this.logger.warn(`key "${s}" for languages "${h.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),h.forEach(g=>{if(this.isValidLookup(r))return;a=g;const v=[f];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(v,f,g,y,n);else{let x;d&&(x=this.pluralResolver.getSuffix(g,n.count,n));const A=`${this.options.pluralSeparator}zero`,k=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(d&&(v.push(f+x),n.ordinal&&x.indexOf(k)===0&&v.push(f+x.replace(k,this.options.pluralSeparator)),m&&v.push(f+A)),p){const R=`${f}${this.options.contextSeparator}${n.context}`;v.push(R),d&&(v.push(R+x),n.ordinal&&x.indexOf(k)===0&&v.push(R+x.replace(k,this.options.pluralSeparator)),m&&v.push(R+A))}}let w;for(;w=v.pop();)this.isValidLookup(r)||(i=w,r=this.getResource(g,y,w,n))}))})}),{res:r,usedKey:s,exactUsedKey:i,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,n,r,s):this.resourceStore.getResource(e,n,r,s)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=e.replace&&!mt(e.replace);let s=r?e.replace:e;if(r&&typeof e.count<"u"&&(s.count=e.count),this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),!r){s={...s};for(const i of n)delete s[i]}return s}static hasDefaultValue(e){const n="defaultValue";for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&n===r.substring(0,n.length)&&e[r]!==void 0)return!0;return!1}}const aT=t=>t.charAt(0).toUpperCase()+t.slice(1);class vz{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=hl.create("languageUtils")}getScriptPartFromCode(e){if(e=rC(e),!e||e.indexOf("-")<0)return null;const n=e.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(e){if(e=rC(e),!e||e.indexOf("-")<0)return e;const n=e.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(e){if(mt(e)&&e.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let s=Intl.getCanonicalLocales(e)[0];if(s&&this.options.lowerCaseLng&&(s=s.toLowerCase()),s)return s}catch{}const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=e.split("-");return this.options.lowerCaseLng?r=r.map(s=>s.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=aT(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=aT(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=aT(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let n;return e.forEach(r=>{if(n)return;const s=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(s))&&(n=s)}),!n&&this.options.supportedLngs&&e.forEach(r=>{if(n)return;const s=this.getLanguagePartFromCode(r);if(this.isSupportedCode(s))return n=s;n=this.options.supportedLngs.find(i=>{if(i===s)return i;if(!(i.indexOf("-")<0&&s.indexOf("-")<0)&&(i.indexOf("-")>0&&s.indexOf("-")<0&&i.substring(0,i.indexOf("-"))===s||i.indexOf(s)===0&&s.length>1))return i})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(e,n){if(!e)return[];if(typeof e=="function"&&(e=e(n)),mt(e)&&(e=[e]),Array.isArray(e))return e;if(!n)return e.default||[];let r=e[n];return r||(r=e[this.getScriptPartFromCode(n)]),r||(r=e[this.formatLanguageCode(n)]),r||(r=e[this.getLanguagePartFromCode(n)]),r||(r=e.default),r||[]}toResolveHierarchy(e,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],e),s=[],i=a=>{a&&(this.isSupportedCode(a)?s.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return mt(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&i(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&i(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&i(this.getLanguagePartFromCode(e))):mt(e)&&i(this.formatLanguageCode(e)),r.forEach(a=>{s.indexOf(a)<0&&i(this.formatLanguageCode(a))}),s}}let cme=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],ume={1:t=>+(t>1),2:t=>+(t!=1),3:t=>0,4:t=>t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2,5:t=>t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5,6:t=>t==1?0:t>=2&&t<=4?1:2,7:t=>t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2,8:t=>t==1?0:t==2?1:t!=8&&t!=11?2:3,9:t=>+(t>=2),10:t=>t==1?0:t==2?1:t<7?2:t<11?3:4,11:t=>t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3,12:t=>+(t%10!=1||t%100==11),13:t=>+(t!==0),14:t=>t==1?0:t==2?1:t==3?2:3,15:t=>t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2,16:t=>t%10==1&&t%100!=11?0:t!==0?1:2,17:t=>t==1||t%10==1&&t%100!=11?0:1,18:t=>t==0?0:t==1?1:2,19:t=>t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3,20:t=>t==1?0:t==0||t%100>0&&t%100<20?1:2,21:t=>t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0,22:t=>t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3};const dme=["v1","v2","v3"],fme=["v4"],yz={zero:0,one:1,two:2,few:3,many:4,other:5},hme=()=>{const t={};return cme.forEach(e=>{e.lngs.forEach(n=>{t[n]={numbers:e.nr,plurals:ume[e.fc]}})}),t};class pme{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=n,this.logger=hl.create("pluralResolver"),(!this.options.compatibilityJSON||fme.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=hme(),this.pluralRulesCache={}}addRule(e,n){this.rules[e]=n}clearCache(){this.pluralRulesCache={}}getRule(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi()){const r=rC(e==="dev"?"en":e),s=n.ordinal?"ordinal":"cardinal",i=JSON.stringify({cleanedCode:r,type:s});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(r,{type:s})}catch{if(!e.match(/-|_/))return;const c=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(c,n)}return this.pluralRulesCache[i]=a,a}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(e,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,r).map(s=>`${n}${s}`)}getSuffixes(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(e,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((s,i)=>yz[s]-yz[i]).map(s=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${s}`):r.numbers.map(s=>this.getSuffix(e,s,n)):[]}getSuffix(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const s=this.getRule(e,r);return s?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${s.select(n)}`:this.getSuffixRetroCompatible(s,n):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,n){const r=e.noAbs?e.plurals(n):e.plurals(Math.abs(n));let s=e.numbers[r];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(s===2?s="plural":s===1&&(s=""));const i=()=>this.options.prepend&&s.toString()?this.options.prepend+s.toString():s.toString();return this.options.compatibilityJSON==="v1"?s===1?"":typeof s=="number"?`_plural_${s.toString()}`:i():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?i():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!dme.includes(this.options.compatibilityJSON)}}const bz=function(t,e,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,i=tme(t,e,n);return!i&&s&&mt(n)&&(i=$D(t,n,r),i===void 0&&(i=$D(e,n,r))),i},lT=t=>t.replace(/\$/g,"$$$$");class mme{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=hl.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(n=>n),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:s,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:c,formatSeparator:u,unescapeSuffix:f,unescapePrefix:l,nestingPrefix:d,nestingPrefixEscaped:m,nestingSuffix:p,nestingSuffixEscaped:h,nestingOptionsSeparator:y,maxReplaces:g,alwaysFormat:v}=e.interpolation;this.escape=n!==void 0?n:rme,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=s!==void 0?s:!1,this.prefix=i?zp(i):a||"{{",this.suffix=o?zp(o):c||"}}",this.formatSeparator=u||",",this.unescapePrefix=f?"":l||"-",this.unescapeSuffix=this.unescapePrefix?"":f||"",this.nestingPrefix=d?zp(d):m||zp("$t("),this.nestingSuffix=p?zp(p):h||zp(")"),this.nestingOptionsSeparator=y||",",this.maxReplaces=g||1e3,this.alwaysFormat=v!==void 0?v:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(n,r)=>n&&n.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,n,r,s){let i,a,o;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=m=>{if(m.indexOf(this.formatSeparator)<0){const g=bz(n,c,m,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(g,void 0,r,{...s,...n,interpolationkey:m}):g}const p=m.split(this.formatSeparator),h=p.shift().trim(),y=p.join(this.formatSeparator).trim();return this.format(bz(n,c,h,this.options.keySeparator,this.options.ignoreJSONStructure),y,r,{...s,...n,interpolationkey:h})};this.resetRegExp();const f=s&&s.missingInterpolationHandler||this.options.missingInterpolationHandler,l=s&&s.interpolation&&s.interpolation.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:m=>lT(m)},{regex:this.regexp,safeValue:m=>this.escapeValue?lT(this.escape(m)):lT(m)}].forEach(m=>{for(o=0;i=m.regex.exec(e);){const p=i[1].trim();if(a=u(p),a===void 0)if(typeof f=="function"){const y=f(e,i,s);a=mt(y)?y:""}else if(s&&Object.prototype.hasOwnProperty.call(s,p))a="";else if(l){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${p} for interpolating ${e}`),a="";else!mt(a)&&!this.useRawValueToEscape&&(a=dz(a));const h=m.safeValue(a);if(e=e.replace(i[0],h),l?(m.regex.lastIndex+=a.length,m.regex.lastIndex-=i[0].length):m.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s,i,a;const o=(c,u)=>{const f=this.nestingOptionsSeparator;if(c.indexOf(f)<0)return c;const l=c.split(new RegExp(`${f}[ ]*{`));let d=`{${l[1]}`;c=l[0],d=this.interpolate(d,a);const m=d.match(/'/g),p=d.match(/"/g);(m&&m.length%2===0&&!p||p.length%2!==0)&&(d=d.replace(/'/g,'"'));try{a=JSON.parse(d),u&&(a={...u,...a})}catch(h){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,h),`${c}${f}${d}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,c};for(;s=this.nestingRegexp.exec(e);){let c=[];a={...r},a=a.replace&&!mt(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let u=!1;if(s[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(s[1])){const f=s[1].split(this.formatSeparator).map(l=>l.trim());s[1]=f.shift(),c=f,u=!0}if(i=n(o.call(this,s[1].trim(),a),a),i&&s[0]===e&&!mt(i))return i;mt(i)||(i=dz(i)),i||(this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`),i=""),u&&(i=c.reduce((f,l)=>this.format(f,l,r.lng,{...r,interpolationkey:s[1].trim()}),i.trim())),e=e.replace(s[0],i),this.regexp.lastIndex=0}return e}}const gme=t=>{let e=t.toLowerCase().trim();const n={};if(t.indexOf("(")>-1){const r=t.split("(");e=r[0].toLowerCase().trim();const s=r[1].substring(0,r[1].length-1);e==="currency"&&s.indexOf(":")<0?n.currency||(n.currency=s.trim()):e==="relativetime"&&s.indexOf(":")<0?n.range||(n.range=s.trim()):s.split(";").forEach(a=>{if(a){const[o,...c]=a.split(":"),u=c.join(":").trim().replace(/^'+|'+$/g,""),f=o.trim();n[f]||(n[f]=u),u==="false"&&(n[f]=!1),u==="true"&&(n[f]=!0),isNaN(u)||(n[f]=parseInt(u,10))}})}return{formatName:e,formatOptions:n}},Bp=t=>{const e={};return(n,r,s)=>{let i=s;s&&s.interpolationkey&&s.formatParams&&s.formatParams[s.interpolationkey]&&s[s.interpolationkey]&&(i={...i,[s.interpolationkey]:void 0});const a=r+JSON.stringify(i);let o=e[a];return o||(o=t(rC(r),s),e[a]=o),o(n)}};class vme{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=hl.create("formatter"),this.options=e,this.formats={number:Bp((n,r)=>{const s=new Intl.NumberFormat(n,{...r});return i=>s.format(i)}),currency:Bp((n,r)=>{const s=new Intl.NumberFormat(n,{...r,style:"currency"});return i=>s.format(i)}),datetime:Bp((n,r)=>{const s=new Intl.DateTimeFormat(n,{...r});return i=>s.format(i)}),relativetime:Bp((n,r)=>{const s=new Intl.RelativeTimeFormat(n,{...r});return i=>s.format(i,r.range||"day")}),list:Bp((n,r)=>{const s=new Intl.ListFormat(n,{...r});return i=>s.format(i)})},this.init(e)}init(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||","}add(e,n){this.formats[e.toLowerCase().trim()]=n}addCached(e,n){this.formats[e.toLowerCase().trim()]=Bp(n)}format(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=n.split(this.formatSeparator);if(i.length>1&&i[0].indexOf("(")>1&&i[0].indexOf(")")<0&&i.find(o=>o.indexOf(")")>-1)){const o=i.findIndex(c=>c.indexOf(")")>-1);i[0]=[i[0],...i.splice(1,o)].join(this.formatSeparator)}return i.reduce((o,c)=>{const{formatName:u,formatOptions:f}=gme(c);if(this.formats[u]){let l=o;try{const d=s&&s.formatParams&&s.formatParams[s.interpolationkey]||{},m=d.locale||d.lng||s.locale||s.lng||r;l=this.formats[u](o,m,{...f,...s,...d})}catch(d){this.logger.warn(d)}return l}else this.logger.warn(`there was no format function for ${u}`);return o},e)}}const yme=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class bme extends H1{constructor(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=s,this.logger=hl.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=s.maxParallelReads||10,this.readingCalls=0,this.maxRetries=s.maxRetries>=0?s.maxRetries:5,this.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,s.backend,s)}queueLoad(e,n,r,s){const i={},a={},o={},c={};return e.forEach(u=>{let f=!0;n.forEach(l=>{const d=`${u}|${l}`;!r.reload&&this.store.hasResourceBundle(u,l)?this.state[d]=2:this.state[d]<0||(this.state[d]===1?a[d]===void 0&&(a[d]=!0):(this.state[d]=1,f=!1,a[d]===void 0&&(a[d]=!0),i[d]===void 0&&(i[d]=!0),c[l]===void 0&&(c[l]=!0)))}),f||(o[u]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(c)}}loaded(e,n,r){const s=e.split("|"),i=s[0],a=s[1];n&&this.emit("failedLoading",i,a,n),!n&&r&&this.store.addResourceBundle(i,a,r,void 0,void 0,{skipCopy:!0}),this.state[e]=n?-1:2,n&&r&&(this.state[e]=0);const o={};this.queue.forEach(c=>{eme(c.loaded,[i],a),yme(c,e),n&&c.errors.push(n),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(u=>{o[u]||(o[u]={});const f=c.loaded[u];f.length&&f.forEach(l=>{o[u][l]===void 0&&(o[u][l]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(c=>!c.done)}read(e,n,r){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:n,fcName:r,tried:s,wait:i,callback:a});return}this.readingCalls++;const o=(u,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const l=this.waitingReads.shift();this.read(l.lng,l.ns,l.fcName,l.tried,l.wait,l.callback)}if(u&&f&&s{this.read.call(this,e,n,r,s+1,i*2,a)},i);return}a(u,f)},c=this.backend[r].bind(this.backend);if(c.length===2){try{const u=c(e,n);u&&typeof u.then=="function"?u.then(f=>o(null,f)).catch(o):o(null,u)}catch(u){o(u)}return}return c(e,n,o)}prepareLoading(e,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),s&&s();mt(e)&&(e=this.languageUtils.toResolveHierarchy(e)),mt(n)&&(n=[n]);const i=this.queueLoad(e,n,r,s);if(!i.toLoad.length)return i.pending.length||s(),null;i.toLoad.forEach(a=>{this.loadOne(a)})}load(e,n,r){this.prepareLoading(e,n,{},r)}reload(e,n,r){this.prepareLoading(e,n,{reload:!0},r)}loadOne(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=e.split("|"),s=r[0],i=r[1];this.read(s,i,"read",void 0,void 0,(a,o)=>{a&&this.logger.warn(`${n}loading namespace ${i} for language ${s} failed`,a),!a&&o&&this.logger.log(`${n}loaded namespace ${i} for language ${s}`,o),this.loaded(e,a,o)})}saveMissing(e,n,r,s,i){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},o=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const c={...a,isUpdate:i},u=this.backend.create.bind(this.backend);if(u.length<6)try{let f;u.length===5?f=u(e,n,r,s,c):f=u(e,n,r,s),f&&typeof f.then=="function"?f.then(l=>o(null,l)).catch(o):o(null,f)}catch(f){o(f)}else u(e,n,r,s,o,c)}!e||!e[0]||this.store.addResource(e[0],n,r,s)}}}const wz=()=>({debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let e={};if(typeof t[1]=="object"&&(e=t[1]),mt(t[1])&&(e.defaultValue=t[1]),mt(t[2])&&(e.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const n=t[3]||t[2];Object.keys(n).forEach(r=>{e[r]=n[r]})}return e},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),_z=t=>(mt(t.ns)&&(t.ns=[t.ns]),mt(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),mt(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t),rS=()=>{},wme=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})};class qb extends H1{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=_z(e),this.services={},this.logger=hl,this.modules={external:[]},wme(this),n&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,n),this;setTimeout(()=>{this.init(e,n)},0)}}init(){var e=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(mt(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const s=wz();this.options={...s,...this.options,..._z(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...s.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const i=f=>f?typeof f=="function"?new f:f:null;if(!this.options.isClone){this.modules.logger?hl.init(i(this.modules.logger),this.options):hl.init(null,this.options);let f;this.modules.formatter?f=this.modules.formatter:typeof Intl<"u"&&(f=vme);const l=new vz(this.options);this.store=new mz(this.options.resources,this.options);const d=this.services;d.logger=hl,d.resourceStore=this.store,d.languageUtils=l,d.pluralResolver=new pme(l,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),f&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(d.formatter=i(f),d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new mme(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new bme(i(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",function(m){for(var p=arguments.length,h=new Array(p>1?p-1:0),y=1;y1?p-1:0),y=1;y{m.init&&m.init(this)})}if(this.format=this.options.interpolation.format,r||(r=rS),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.length>0&&f[0]!=="dev"&&(this.options.lng=f[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(f=>{this[f]=function(){return e.store[f](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(f=>{this[f]=function(){return e.store[f](...arguments),e}});const c=vy(),u=()=>{const f=(l,d)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),c.resolve(d),r(l,d)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return f(null,this.t.bind(this));this.changeLanguage(this.options.lng,f)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),c}loadResources(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:rS;const s=mt(e)?e:this.language;if(typeof e=="function"&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(s&&s.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const i=[],a=o=>{if(!o||o==="cimode")return;this.services.languageUtils.toResolveHierarchy(o).forEach(u=>{u!=="cimode"&&i.indexOf(u)<0&&i.push(u)})};s?a(s):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(c=>a(c)),this.options.preload&&this.options.preload.forEach(o=>a(o)),this.services.backendConnector.load(i,this.options.ns,o=>{!o&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(o)})}else r(null)}reloadResources(e,n,r){const s=vy();return typeof e=="function"&&(r=e,e=void 0),typeof n=="function"&&(r=n,n=void 0),e||(e=this.languages),n||(n=this.options.ns),r||(r=rS),this.services.backendConnector.reload(e,n,i=>{s.resolve(),r(i)}),s}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&C6.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let n=0;n-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(e,n){var r=this;this.isLanguageChangingTo=e;const s=vy();this.emit("languageChanging",e);const i=c=>{this.language=c,this.languages=this.services.languageUtils.toResolveHierarchy(c),this.resolvedLanguage=void 0,this.setResolvedLanguage(c)},a=(c,u)=>{u?(i(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,s.resolve(function(){return r.t(...arguments)}),n&&n(c,function(){return r.t(...arguments)})},o=c=>{!e&&!c&&this.services.languageDetector&&(c=[]);const u=mt(c)?c:this.services.languageUtils.getBestMatchFromCodes(c);u&&(this.language||i(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,f=>{a(f,u)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e),s}getFixedT(e,n,r){var s=this;const i=function(a,o){let c;if(typeof o!="object"){for(var u=arguments.length,f=new Array(u>2?u-2:0),l=2;l`${c.keyPrefix}${d}${p}`):m=c.keyPrefix?`${c.keyPrefix}${d}${a}`:a,s.t(m,c)};return mt(e)?i.lng=e:i.lngs=e,i.ns=n,i.keyPrefix=r,i}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],s=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const a=(o,c)=>{const u=this.services.backendConnector.state[`${o}|${c}`];return u===-1||u===0||u===2};if(n.precheck){const o=n.precheck(this,a);if(o!==void 0)return o}return!!(this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(r,e)&&(!s||a(i,e)))}loadNamespaces(e,n){const r=vy();return this.options.ns?(mt(e)&&(e=[e]),e.forEach(s=>{this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}loadLanguages(e,n){const r=vy();mt(e)&&(e=[e]);const s=this.options.preload||[],i=e.filter(a=>s.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return i.length?(this.options.preload=s.concat(i),this.loadResources(a=>{r.resolve(),n&&n(a)}),r):(n&&n(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services&&this.services.languageUtils||new vz(wz());return n.indexOf(r.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new qb(e,n)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:rS;const r=e.forkResourceStore;r&&delete e.forkResourceStore;const s={...this.options,...e,isClone:!0},i=new qb(s);return(e.debug!==void 0||e.prefix!==void 0)&&(i.logger=i.logger.clone(e)),["store","services","language"].forEach(o=>{i[o]=this[o]}),i.services={...this.services},i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},r&&(i.store=new mz(this.store.data,s),i.services.resourceStore=i.store),i.translator=new iC(i.services,s),i.translator.on("*",function(o){for(var c=arguments.length,u=new Array(c>1?c-1:0),f=1;fP.jsx("nav",{ref:e,"aria-label":ft("common.breadcrumb"),...t}));_me.displayName="Breadcrumb";const xme=_.forwardRef(({className:t,...e},n)=>P.jsx("ol",{ref:n,className:ce("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",t),...e}));xme.displayName="BreadcrumbList";const Sme=_.forwardRef(({className:t,...e},n)=>P.jsx("li",{ref:n,className:ce("inline-flex items-center gap-1.5",t),...e}));Sme.displayName="BreadcrumbItem";const Eme=_.forwardRef(({asChild:t,className:e,...n},r)=>{const s=t?Ra:"a";return P.jsx(s,{ref:r,className:ce("transition-colors hover:text-foreground",e),...n})});Eme.displayName="BreadcrumbLink";const Cme=_.forwardRef(({className:t,...e},n)=>P.jsx("span",{ref:n,role:"link","aria-disabled":"true","aria-current":"page",className:ce("font-normal text-foreground",t),...e}));Cme.displayName="BreadcrumbPage";function Yt(t){const e=Object.prototype.toString.call(t);return t instanceof Date||typeof t=="object"&&e==="[object Date]"?new t.constructor(+t):typeof t=="number"||e==="[object Number]"||typeof t=="string"||e==="[object String]"?new Date(t):new Date(NaN)}function lo(t,e){return t instanceof Date?new t.constructor(e):new Date(e)}function qs(t,e){const n=Yt(t);return isNaN(e)?lo(t,NaN):(e&&n.setDate(n.getDate()+e),n)}function Pa(t,e){const n=Yt(t);if(isNaN(e))return lo(t,NaN);if(!e)return n;const r=n.getDate(),s=lo(t,n.getTime());s.setMonth(n.getMonth()+e+1,0);const i=s.getDate();return r>=i?s:(n.setFullYear(s.getFullYear(),s.getMonth(),r),n)}const FL=6048e5,Ame=864e5;let Rme={};function f0(){return Rme}function xl(t,e){var o,c,u,f;const n=f0(),r=(e==null?void 0:e.weekStartsOn)??((c=(o=e==null?void 0:e.locale)==null?void 0:o.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((f=(u=n.locale)==null?void 0:u.options)==null?void 0:f.weekStartsOn)??0,s=Yt(t),i=s.getDay(),a=(i=s.getTime()?n+1:e.getTime()>=a.getTime()?n:n-1}function lv(t){const e=Yt(t);return e.setHours(0,0,0,0),e}function oC(t){const e=Yt(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function pl(t,e){const n=lv(t),r=lv(e),s=+n-oC(n),i=+r-oC(r);return Math.round((s-i)/Ame)}function Pme(t){const e=A6(t),n=lo(t,0);return n.setFullYear(e,0,4),n.setHours(0,0,0,0),Gh(n)}function jD(t,e){const n=e*7;return qs(t,n)}function Tme(t,e){return Pa(t,e*12)}function kme(t){let e;return t.forEach(function(n){const r=Yt(n);(e===void 0||e{const r=Yt(n);(!e||e>r||isNaN(+r))&&(e=r)}),e||new Date(NaN)}function bi(t,e){const n=lv(t),r=lv(e);return+n==+r}function zL(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function Nme(t){if(!zL(t)&&typeof t!="number")return!1;const e=Yt(t);return!isNaN(Number(e))}function Gb(t,e){const n=Yt(t),r=Yt(e),s=n.getFullYear()-r.getFullYear(),i=n.getMonth()-r.getMonth();return s*12+i}function Mme(t,e,n){const r=xl(t,n),s=xl(e,n),i=+r-oC(r),a=+s-oC(s);return Math.round((i-a)/FL)}function BL(t){const e=Yt(t),n=e.getMonth();return e.setFullYear(e.getFullYear(),n+1,0),e.setHours(23,59,59,999),e}function Ai(t){const e=Yt(t);return e.setDate(1),e.setHours(0,0,0,0),e}function R6(t){const e=Yt(t),n=lo(t,0);return n.setFullYear(e.getFullYear(),0,1),n.setHours(0,0,0,0),n}function UL(t,e){var o,c,u,f;const n=f0(),r=(e==null?void 0:e.weekStartsOn)??((c=(o=e==null?void 0:e.locale)==null?void 0:o.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((f=(u=n.locale)==null?void 0:u.options)==null?void 0:f.weekStartsOn)??0,s=Yt(t),i=s.getDay(),a=(i{let r;const s=Ome[t];return typeof s=="string"?r=s:e===1?r=s.one:r=s.other.replace("{{count}}",e.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function $o(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const Ime={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},$me={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},jme={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Fme={date:$o({formats:Ime,defaultWidth:"full"}),time:$o({formats:$me,defaultWidth:"full"}),dateTime:$o({formats:jme,defaultWidth:"full"})},zme={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Bme=(t,e,n,r)=>zme[t];function Ar(t){return(e,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let s;if(r==="formatting"&&t.formattingValues){const a=t.defaultFormattingWidth||t.defaultWidth,o=n!=null&&n.width?String(n.width):a;s=t.formattingValues[o]||t.formattingValues[a]}else{const a=t.defaultWidth,o=n!=null&&n.width?String(n.width):t.defaultWidth;s=t.values[o]||t.values[a]}const i=t.argumentCallback?t.argumentCallback(e):e;return s[i]}}const Ume={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Hme={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Wme={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Vme={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},qme={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Gme={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Kme=(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Yme={ordinalNumber:Kme,era:Ar({values:Ume,defaultWidth:"wide"}),quarter:Ar({values:Hme,defaultWidth:"wide",argumentCallback:t=>t-1}),month:Ar({values:Wme,defaultWidth:"wide"}),day:Ar({values:Vme,defaultWidth:"wide"}),dayPeriod:Ar({values:qme,defaultWidth:"wide",formattingValues:Gme,defaultFormattingWidth:"wide"})};function Rr(t){return(e,n={})=>{const r=n.width,s=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],i=e.match(s);if(!i)return null;const a=i[0],o=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],c=Array.isArray(o)?Qme(o,l=>l.test(a)):Xme(o,l=>l.test(a));let u;u=t.valueCallback?t.valueCallback(c):c,u=n.valueCallback?n.valueCallback(u):u;const f=e.slice(a.length);return{value:u,rest:f}}}function Xme(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function Qme(t,e){for(let n=0;n{const r=e.match(t.matchPattern);if(!r)return null;const s=r[0],i=e.match(t.parsePattern);if(!i)return null;let a=t.valueCallback?t.valueCallback(i[0]):i[0];a=n.valueCallback?n.valueCallback(a):a;const o=e.slice(s.length);return{value:a,rest:o}}}const Jme=/^(\d+)(th|st|nd|rd)?/i,Zme=/\d+/i,ege={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},tge={any:[/^b/i,/^(a|c)/i]},nge={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},rge={any:[/1/i,/2/i,/3/i,/4/i]},sge={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},ige={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},oge={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},age={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},lge={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},cge={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},uge={ordinalNumber:W1({matchPattern:Jme,parsePattern:Zme,valueCallback:t=>parseInt(t,10)}),era:Rr({matchPatterns:ege,defaultMatchWidth:"wide",parsePatterns:tge,defaultParseWidth:"any"}),quarter:Rr({matchPatterns:nge,defaultMatchWidth:"wide",parsePatterns:rge,defaultParseWidth:"any",valueCallback:t=>t+1}),month:Rr({matchPatterns:sge,defaultMatchWidth:"wide",parsePatterns:ige,defaultParseWidth:"any"}),day:Rr({matchPatterns:oge,defaultMatchWidth:"wide",parsePatterns:age,defaultParseWidth:"any"}),dayPeriod:Rr({matchPatterns:lge,defaultMatchWidth:"any",parsePatterns:cge,defaultParseWidth:"any"})},HL={code:"en-US",formatDistance:Lme,formatLong:Fme,formatRelative:Bme,localize:Yme,match:uge,options:{weekStartsOn:0,firstWeekContainsDate:1}};function dge(t){const e=Yt(t);return pl(e,R6(e))+1}function T6(t){const e=Yt(t),n=+Gh(e)-+Pme(e);return Math.round(n/FL)+1}function k6(t,e){var f,l,d,m;const n=Yt(t),r=n.getFullYear(),s=f0(),i=(e==null?void 0:e.firstWeekContainsDate)??((l=(f=e==null?void 0:e.locale)==null?void 0:f.options)==null?void 0:l.firstWeekContainsDate)??s.firstWeekContainsDate??((m=(d=s.locale)==null?void 0:d.options)==null?void 0:m.firstWeekContainsDate)??1,a=lo(t,0);a.setFullYear(r+1,0,i),a.setHours(0,0,0,0);const o=xl(a,e),c=lo(t,0);c.setFullYear(r,0,i),c.setHours(0,0,0,0);const u=xl(c,e);return n.getTime()>=o.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1}function fge(t,e){var o,c,u,f;const n=f0(),r=(e==null?void 0:e.firstWeekContainsDate)??((c=(o=e==null?void 0:e.locale)==null?void 0:o.options)==null?void 0:c.firstWeekContainsDate)??n.firstWeekContainsDate??((f=(u=n.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??1,s=k6(t,e),i=lo(t,0);return i.setFullYear(s,0,r),i.setHours(0,0,0,0),xl(i,e)}function D6(t,e){const n=Yt(t),r=+xl(n,e)-+fge(n,e);return Math.round(r/FL)+1}function fn(t,e){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(e,"0");return n+r}const gu={y(t,e){const n=t.getFullYear(),r=n>0?n:1-n;return fn(e==="yy"?r%100:r,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):fn(n+1,2)},d(t,e){return fn(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(t,e){return fn(t.getHours()%12||12,e.length)},H(t,e){return fn(t.getHours(),e.length)},m(t,e){return fn(t.getMinutes(),e.length)},s(t,e){return fn(t.getSeconds(),e.length)},S(t,e){const n=e.length,r=t.getMilliseconds(),s=Math.trunc(r*Math.pow(10,n-3));return fn(s,e.length)}},Up={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},xz={G:function(t,e,n){const r=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const r=t.getFullYear(),s=r>0?r:1-r;return n.ordinalNumber(s,{unit:"year"})}return gu.y(t,e)},Y:function(t,e,n,r){const s=k6(t,r),i=s>0?s:1-s;if(e==="YY"){const a=i%100;return fn(a,2)}return e==="Yo"?n.ordinalNumber(i,{unit:"year"}):fn(i,e.length)},R:function(t,e){const n=A6(t);return fn(n,e.length)},u:function(t,e){const n=t.getFullYear();return fn(n,e.length)},Q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return fn(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return fn(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){const r=t.getMonth();switch(e){case"M":case"MM":return gu.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return fn(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){const s=D6(t,r);return e==="wo"?n.ordinalNumber(s,{unit:"week"}):fn(s,e.length)},I:function(t,e,n){const r=T6(t);return e==="Io"?n.ordinalNumber(r,{unit:"week"}):fn(r,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):gu.d(t,e)},D:function(t,e,n){const r=dge(t);return e==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):fn(r,e.length)},E:function(t,e,n){const r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){const s=t.getDay(),i=(s-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(i);case"ee":return fn(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(s,{width:"short",context:"formatting"});case"eeee":default:return n.day(s,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const s=t.getDay(),i=(s-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(i);case"cc":return fn(i,e.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(s,{width:"narrow",context:"standalone"});case"cccccc":return n.day(s,{width:"short",context:"standalone"});case"cccc":default:return n.day(s,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),s=r===0?7:r;switch(e){case"i":return String(s);case"ii":return fn(s,e.length);case"io":return n.ordinalNumber(s,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){const s=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(t,e,n){const r=t.getHours();let s;switch(r===12?s=Up.noon:r===0?s=Up.midnight:s=r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let s;switch(r>=17?s=Up.evening:r>=12?s=Up.afternoon:r>=4?s=Up.morning:s=Up.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let r=t.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return gu.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):gu.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return e==="Ko"?n.ordinalNumber(r,{unit:"hour"}):fn(r,e.length)},k:function(t,e,n){let r=t.getHours();return r===0&&(r=24),e==="ko"?n.ordinalNumber(r,{unit:"hour"}):fn(r,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):gu.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):gu.s(t,e)},S:function(t,e){return gu.S(t,e)},X:function(t,e,n){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return Ez(r);case"XXXX":case"XX":return hf(r);case"XXXXX":case"XXX":default:return hf(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return Ez(r);case"xxxx":case"xx":return hf(r);case"xxxxx":case"xxx":default:return hf(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Sz(r,":");case"OOOO":default:return"GMT"+hf(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Sz(r,":");case"zzzz":default:return"GMT"+hf(r,":")}},t:function(t,e,n){const r=Math.trunc(t.getTime()/1e3);return fn(r,e.length)},T:function(t,e,n){const r=t.getTime();return fn(r,e.length)}};function Sz(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),s=Math.trunc(r/60),i=r%60;return i===0?n+String(s):n+String(s)+e+fn(i,2)}function Ez(t,e){return t%60===0?(t>0?"-":"+")+fn(Math.abs(t)/60,2):hf(t,e)}function hf(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),s=fn(Math.trunc(r/60),2),i=fn(r%60,2);return n+s+e+i}const Cz=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},N6=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},hge=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],s=n[2];if(!s)return Cz(t,e);let i;switch(r){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;case"PPPP":default:i=e.dateTime({width:"full"});break}return i.replace("{{date}}",Cz(r,e)).replace("{{time}}",N6(s,e))},pge={p:N6,P:hge},mge=/^D+$/,gge=/^Y+$/,vge=["D","DD","YY","YYYY"];function yge(t){return mge.test(t)}function bge(t){return gge.test(t)}function wge(t,e,n){const r=_ge(t,e,n);if(console.warn(r),vge.includes(t))throw new RangeError(r)}function _ge(t,e,n){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const xge=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Sge=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Ege=/^'([^]*?)'?$/,Cge=/''/g,Age=/[a-zA-Z]/;function pp(t,e,n){var f,l,d,m,p,h,y,g;const r=f0(),s=(n==null?void 0:n.locale)??r.locale??HL,i=(n==null?void 0:n.firstWeekContainsDate)??((l=(f=n==null?void 0:n.locale)==null?void 0:f.options)==null?void 0:l.firstWeekContainsDate)??r.firstWeekContainsDate??((m=(d=r.locale)==null?void 0:d.options)==null?void 0:m.firstWeekContainsDate)??1,a=(n==null?void 0:n.weekStartsOn)??((h=(p=n==null?void 0:n.locale)==null?void 0:p.options)==null?void 0:h.weekStartsOn)??r.weekStartsOn??((g=(y=r.locale)==null?void 0:y.options)==null?void 0:g.weekStartsOn)??0,o=Yt(t);if(!Nme(o))throw new RangeError("Invalid time value");let c=e.match(Sge).map(v=>{const w=v[0];if(w==="p"||w==="P"){const x=pge[w];return x(v,s.formatLong)}return v}).join("").match(xge).map(v=>{if(v==="''")return{isToken:!1,value:"'"};const w=v[0];if(w==="'")return{isToken:!1,value:Rge(v)};if(xz[w])return{isToken:!0,value:v};if(w.match(Age))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");return{isToken:!1,value:v}});s.localize.preprocessor&&(c=s.localize.preprocessor(o,c));const u={firstWeekContainsDate:i,weekStartsOn:a,locale:s};return c.map(v=>{if(!v.isToken)return v.value;const w=v.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&bge(w)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&yge(w))&&wge(w,e,String(t));const x=xz[w[0]];return x(o,w,s.localize,u)}).join("")}function Rge(t){const e=t.match(Ege);return e?e[1].replace(Cge,"'"):t}function Pge(t){const e=Yt(t),n=e.getFullYear(),r=e.getMonth(),s=lo(t,0);return s.setFullYear(n,r+1,0),s.setHours(0,0,0,0),s.getDate()}function Tge(t){return Math.trunc(+Yt(t)/1e3)}function kge(t){const e=Yt(t),n=e.getMonth();return e.setFullYear(e.getFullYear(),n+1,0),e.setHours(0,0,0,0),e}function Dge(t,e){return Mme(kge(t),Ai(t),e)+1}function FD(t,e){const n=Yt(t),r=Yt(e);return n.getTime()>r.getTime()}function M6(t,e){const n=Yt(t),r=Yt(e);return+n<+r}function WL(t,e){const n=Yt(t),r=Yt(e);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function Nge(t,e){const n=Yt(t),r=Yt(e);return n.getFullYear()===r.getFullYear()}function cT(t,e){return qs(t,-e)}function uT(t,e){const n=Yt(t),r=n.getFullYear(),s=n.getDate(),i=lo(t,0);i.setFullYear(r,e,15),i.setHours(0,0,0,0);const a=Pge(i);return n.setMonth(e,Math.min(s,a)),n}function Az(t,e){const n=Yt(t);return isNaN(+n)?lo(t,NaN):(n.setFullYear(e),n)}const Mge={lessThanXSeconds:{one:"menys d'un segon",eleven:"menys d'onze segons",other:"menys de {{count}} segons"},xSeconds:{one:"1 segon",other:"{{count}} segons"},halfAMinute:"mig minut",lessThanXMinutes:{one:"menys d'un minut",eleven:"menys d'onze minuts",other:"menys de {{count}} minuts"},xMinutes:{one:"1 minut",other:"{{count}} minuts"},aboutXHours:{one:"aproximadament una hora",other:"aproximadament {{count}} hores"},xHours:{one:"1 hora",other:"{{count}} hores"},xDays:{one:"1 dia",other:"{{count}} dies"},aboutXWeeks:{one:"aproximadament una setmana",other:"aproximadament {{count}} setmanes"},xWeeks:{one:"1 setmana",other:"{{count}} setmanes"},aboutXMonths:{one:"aproximadament un mes",other:"aproximadament {{count}} mesos"},xMonths:{one:"1 mes",other:"{{count}} mesos"},aboutXYears:{one:"aproximadament un any",other:"aproximadament {{count}} anys"},xYears:{one:"1 any",other:"{{count}} anys"},overXYears:{one:"més d'un any",eleven:"més d'onze anys",other:"més de {{count}} anys"},almostXYears:{one:"gairebé un any",other:"gairebé {{count}} anys"}},Oge=(t,e,n)=>{let r;const s=Mge[t];return typeof s=="string"?r=s:e===1?r=s.one:e===11&&s.eleven?r=s.eleven:r=s.other.replace("{{count}}",String(e)),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"en "+r:"fa "+r:r},Lge={full:"EEEE, d 'de' MMMM y",long:"d 'de' MMMM y",medium:"d MMM y",short:"dd/MM/y"},Ige={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},$ge={full:"{{date}} 'a les' {{time}}",long:"{{date}} 'a les' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},jge={date:$o({formats:Lge,defaultWidth:"full"}),time:$o({formats:Ige,defaultWidth:"full"}),dateTime:$o({formats:$ge,defaultWidth:"full"})},Fge={lastWeek:"'el' eeee 'passat a la' LT",yesterday:"'ahir a la' p",today:"'avui a la' p",tomorrow:"'demà a la' p",nextWeek:"eeee 'a la' p",other:"P"},zge={lastWeek:"'el' eeee 'passat a les' p",yesterday:"'ahir a les' p",today:"'avui a les' p",tomorrow:"'demà a les' p",nextWeek:"eeee 'a les' p",other:"P"},Bge=(t,e,n,r)=>e.getHours()!==1?zge[t]:Fge[t],Uge={narrow:["aC","dC"],abbreviated:["a. de C.","d. de C."],wide:["abans de Crist","després de Crist"]},Hge={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1r trimestre","2n trimestre","3r trimestre","4t trimestre"]},Wge={narrow:["GN","FB","MÇ","AB","MG","JN","JL","AG","ST","OC","NV","DS"],abbreviated:["gen.","febr.","març","abr.","maig","juny","jul.","ag.","set.","oct.","nov.","des."],wide:["gener","febrer","març","abril","maig","juny","juliol","agost","setembre","octubre","novembre","desembre"]},Vge={narrow:["dg.","dl.","dt.","dm.","dj.","dv.","ds."],short:["dg.","dl.","dt.","dm.","dj.","dv.","ds."],abbreviated:["dg.","dl.","dt.","dm.","dj.","dv.","ds."],wide:["diumenge","dilluns","dimarts","dimecres","dijous","divendres","dissabte"]},qge={narrow:{am:"am",pm:"pm",midnight:"mitjanit",noon:"migdia",morning:"matí",afternoon:"tarda",evening:"vespre",night:"nit"},abbreviated:{am:"a.m.",pm:"p.m.",midnight:"mitjanit",noon:"migdia",morning:"matí",afternoon:"tarda",evening:"vespre",night:"nit"},wide:{am:"ante meridiem",pm:"post meridiem",midnight:"mitjanit",noon:"migdia",morning:"matí",afternoon:"tarda",evening:"vespre",night:"nit"}},Gge={narrow:{am:"am",pm:"pm",midnight:"de la mitjanit",noon:"del migdia",morning:"del matí",afternoon:"de la tarda",evening:"del vespre",night:"de la nit"},abbreviated:{am:"AM",pm:"PM",midnight:"de la mitjanit",noon:"del migdia",morning:"del matí",afternoon:"de la tarda",evening:"del vespre",night:"de la nit"},wide:{am:"ante meridiem",pm:"post meridiem",midnight:"de la mitjanit",noon:"del migdia",morning:"del matí",afternoon:"de la tarda",evening:"del vespre",night:"de la nit"}},Kge=(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"r";case 2:return n+"n";case 3:return n+"r";case 4:return n+"t"}return n+"è"},Yge={ordinalNumber:Kge,era:Ar({values:Uge,defaultWidth:"wide"}),quarter:Ar({values:Hge,defaultWidth:"wide",argumentCallback:t=>t-1}),month:Ar({values:Wge,defaultWidth:"wide"}),day:Ar({values:Vge,defaultWidth:"wide"}),dayPeriod:Ar({values:qge,defaultWidth:"wide",formattingValues:Gge,defaultFormattingWidth:"wide"})},Xge=/^(\d+)(è|r|n|r|t)?/i,Qge=/\d+/i,Jge={narrow:/^(aC|dC)/i,abbreviated:/^(a. de C.|d. de C.)/i,wide:/^(abans de Crist|despr[eé]s de Crist)/i},Zge={narrow:[/^aC/i,/^dC/i],abbreviated:[/^(a. de C.)/i,/^(d. de C.)/i],wide:[/^(abans de Crist)/i,/^(despr[eé]s de Crist)/i]},eve={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](è|r|n|r|t)? trimestre/i},tve={any:[/1/i,/2/i,/3/i,/4/i]},nve={narrow:/^(GN|FB|MÇ|AB|MG|JN|JL|AG|ST|OC|NV|DS)/i,abbreviated:/^(gen.|febr.|març|abr.|maig|juny|jul.|ag.|set.|oct.|nov.|des.)/i,wide:/^(gener|febrer|març|abril|maig|juny|juliol|agost|setembre|octubre|novembre|desembre)/i},rve={narrow:[/^GN/i,/^FB/i,/^MÇ/i,/^AB/i,/^MG/i,/^JN/i,/^JL/i,/^AG/i,/^ST/i,/^OC/i,/^NV/i,/^DS/i],abbreviated:[/^gen./i,/^febr./i,/^març/i,/^abr./i,/^maig/i,/^juny/i,/^jul./i,/^ag./i,/^set./i,/^oct./i,/^nov./i,/^des./i],wide:[/^gener/i,/^febrer/i,/^març/i,/^abril/i,/^maig/i,/^juny/i,/^juliol/i,/^agost/i,/^setembre/i,/^octubre/i,/^novembre/i,/^desembre/i]},sve={narrow:/^(dg\.|dl\.|dt\.|dm\.|dj\.|dv\.|ds\.)/i,short:/^(dg\.|dl\.|dt\.|dm\.|dj\.|dv\.|ds\.)/i,abbreviated:/^(dg\.|dl\.|dt\.|dm\.|dj\.|dv\.|ds\.)/i,wide:/^(diumenge|dilluns|dimarts|dimecres|dijous|divendres|dissabte)/i},ive={narrow:[/^dg./i,/^dl./i,/^dt./i,/^dm./i,/^dj./i,/^dv./i,/^ds./i],abbreviated:[/^dg./i,/^dl./i,/^dt./i,/^dm./i,/^dj./i,/^dv./i,/^ds./i],wide:[/^diumenge/i,/^dilluns/i,/^dimarts/i,/^dimecres/i,/^dijous/i,/^divendres/i,/^disssabte/i]},ove={narrow:/^(a|p|mn|md|(del|de la) (matí|tarda|vespre|nit))/i,abbreviated:/^([ap]\.?\s?m\.?|mitjanit|migdia|(del|de la) (matí|tarda|vespre|nit))/i,wide:/^(ante meridiem|post meridiem|mitjanit|migdia|(del|de la) (matí|tarda|vespre|nit))/i},ave={any:{am:/^a/i,pm:/^p/i,midnight:/^mitjanit/i,noon:/^migdia/i,morning:/matí/i,afternoon:/tarda/i,evening:/vespre/i,night:/nit/i}},lve={ordinalNumber:W1({matchPattern:Xge,parsePattern:Qge,valueCallback:t=>parseInt(t,10)}),era:Rr({matchPatterns:Jge,defaultMatchWidth:"wide",parsePatterns:Zge,defaultParseWidth:"wide"}),quarter:Rr({matchPatterns:eve,defaultMatchWidth:"wide",parsePatterns:tve,defaultParseWidth:"any",valueCallback:t=>t+1}),month:Rr({matchPatterns:nve,defaultMatchWidth:"wide",parsePatterns:rve,defaultParseWidth:"wide"}),day:Rr({matchPatterns:sve,defaultMatchWidth:"wide",parsePatterns:ive,defaultParseWidth:"wide"}),dayPeriod:Rr({matchPatterns:ove,defaultMatchWidth:"wide",parsePatterns:ave,defaultParseWidth:"any"})},cve={code:"ca",formatDistance:Oge,formatLong:jge,formatRelative:Bge,localize:Yge,match:lve,options:{weekStartsOn:1,firstWeekContainsDate:4}},uve={lessThanXSeconds:{one:"menos de un segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"medio minuto",lessThanXMinutes:{one:"menos de un minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"alrededor de 1 hora",other:"alrededor de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 día",other:"{{count}} días"},aboutXWeeks:{one:"alrededor de 1 semana",other:"alrededor de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"alrededor de 1 mes",other:"alrededor de {{count}} meses"},xMonths:{one:"1 mes",other:"{{count}} meses"},aboutXYears:{one:"alrededor de 1 año",other:"alrededor de {{count}} años"},xYears:{one:"1 año",other:"{{count}} años"},overXYears:{one:"más de 1 año",other:"más de {{count}} años"},almostXYears:{one:"casi 1 año",other:"casi {{count}} años"}},dve=(t,e,n)=>{let r;const s=uve[t];return typeof s=="string"?r=s:e===1?r=s.one:r=s.other.replace("{{count}}",e.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"en "+r:"hace "+r:r},fve={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/y"},hve={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},pve={full:"{{date}} 'a las' {{time}}",long:"{{date}} 'a las' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},mve={date:$o({formats:fve,defaultWidth:"full"}),time:$o({formats:hve,defaultWidth:"full"}),dateTime:$o({formats:pve,defaultWidth:"full"})},gve={lastWeek:"'el' eeee 'pasado a la' p",yesterday:"'ayer a la' p",today:"'hoy a la' p",tomorrow:"'mañana a la' p",nextWeek:"eeee 'a la' p",other:"P"},vve={lastWeek:"'el' eeee 'pasado a las' p",yesterday:"'ayer a las' p",today:"'hoy a las' p",tomorrow:"'mañana a las' p",nextWeek:"eeee 'a las' p",other:"P"},yve=(t,e,n,r)=>e.getHours()!==1?vve[t]:gve[t],bve={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","después de cristo"]},wve={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1º trimestre","2º trimestre","3º trimestre","4º trimestre"]},_ve={narrow:["e","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic"],wide:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"]},xve={narrow:["d","l","m","m","j","v","s"],short:["do","lu","ma","mi","ju","vi","sá"],abbreviated:["dom","lun","mar","mié","jue","vie","sáb"],wide:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"]},Sve={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"mañana",afternoon:"tarde",evening:"tarde",night:"noche"}},Eve={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},abbreviated:{am:"AM",pm:"PM",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"},wide:{am:"a.m.",pm:"p.m.",midnight:"medianoche",noon:"mediodia",morning:"de la mañana",afternoon:"de la tarde",evening:"de la tarde",night:"de la noche"}},Cve=(t,e)=>Number(t)+"º",Ave={ordinalNumber:Cve,era:Ar({values:bve,defaultWidth:"wide"}),quarter:Ar({values:wve,defaultWidth:"wide",argumentCallback:t=>Number(t)-1}),month:Ar({values:_ve,defaultWidth:"wide"}),day:Ar({values:xve,defaultWidth:"wide"}),dayPeriod:Ar({values:Sve,defaultWidth:"wide",formattingValues:Eve,defaultFormattingWidth:"wide"})},Rve=/^(\d+)(º)?/i,Pve=/\d+/i,Tve={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,wide:/^(antes de cristo|antes de la era com[uú]n|despu[eé]s de cristo|era com[uú]n)/i},kve={any:[/^ac/i,/^dc/i],wide:[/^(antes de cristo|antes de la era com[uú]n)/i,/^(despu[eé]s de cristo|era com[uú]n)/i]},Dve={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},Nve={any:[/1/i,/2/i,/3/i,/4/i]},Mve={narrow:/^[efmajsond]/i,abbreviated:/^(ene|feb|mar|abr|may|jun|jul|ago|sep|oct|nov|dic)/i,wide:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i},Ove={narrow:[/^e/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^en/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i]},Lve={narrow:/^[dlmjvs]/i,short:/^(do|lu|ma|mi|ju|vi|s[áa])/i,abbreviated:/^(dom|lun|mar|mi[ée]|jue|vie|s[áa]b)/i,wide:/^(domingo|lunes|martes|mi[ée]rcoles|jueves|viernes|s[áa]bado)/i},Ive={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^do/i,/^lu/i,/^ma/i,/^mi/i,/^ju/i,/^vi/i,/^sa/i]},$ve={narrow:/^(a|p|mn|md|(de la|a las) (mañana|tarde|noche))/i,any:/^([ap]\.?\s?m\.?|medianoche|mediodia|(de la|a las) (mañana|tarde|noche))/i},jve={any:{am:/^a/i,pm:/^p/i,midnight:/^mn/i,noon:/^md/i,morning:/mañana/i,afternoon:/tarde/i,evening:/tarde/i,night:/noche/i}},Fve={ordinalNumber:W1({matchPattern:Rve,parsePattern:Pve,valueCallback:function(t){return parseInt(t,10)}}),era:Rr({matchPatterns:Tve,defaultMatchWidth:"wide",parsePatterns:kve,defaultParseWidth:"any"}),quarter:Rr({matchPatterns:Dve,defaultMatchWidth:"wide",parsePatterns:Nve,defaultParseWidth:"any",valueCallback:t=>t+1}),month:Rr({matchPatterns:Mve,defaultMatchWidth:"wide",parsePatterns:Ove,defaultParseWidth:"any"}),day:Rr({matchPatterns:Lve,defaultMatchWidth:"wide",parsePatterns:Ive,defaultParseWidth:"any"}),dayPeriod:Rr({matchPatterns:$ve,defaultMatchWidth:"any",parsePatterns:jve,defaultParseWidth:"any"})},zve={code:"es",formatDistance:dve,formatLong:mve,formatRelative:yve,localize:Ave,match:Fve,options:{weekStartsOn:1,firstWeekContainsDate:1}},Bve={lessThanXSeconds:{one:"moins d’une seconde",other:"moins de {{count}} secondes"},xSeconds:{one:"1 seconde",other:"{{count}} secondes"},halfAMinute:"30 secondes",lessThanXMinutes:{one:"moins d’une minute",other:"moins de {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"environ 1 heure",other:"environ {{count}} heures"},xHours:{one:"1 heure",other:"{{count}} heures"},xDays:{one:"1 jour",other:"{{count}} jours"},aboutXWeeks:{one:"environ 1 semaine",other:"environ {{count}} semaines"},xWeeks:{one:"1 semaine",other:"{{count}} semaines"},aboutXMonths:{one:"environ 1 mois",other:"environ {{count}} mois"},xMonths:{one:"1 mois",other:"{{count}} mois"},aboutXYears:{one:"environ 1 an",other:"environ {{count}} ans"},xYears:{one:"1 an",other:"{{count}} ans"},overXYears:{one:"plus d’un an",other:"plus de {{count}} ans"},almostXYears:{one:"presqu’un an",other:"presque {{count}} ans"}},Uve=(t,e,n)=>{let r;const s=Bve[t];return typeof s=="string"?r=s:e===1?r=s.one:r=s.other.replace("{{count}}",String(e)),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"dans "+r:"il y a "+r:r},Hve={full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},Wve={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},Vve={full:"{{date}} 'à' {{time}}",long:"{{date}} 'à' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},qve={date:$o({formats:Hve,defaultWidth:"full"}),time:$o({formats:Wve,defaultWidth:"full"}),dateTime:$o({formats:Vve,defaultWidth:"full"})},Gve={lastWeek:"eeee 'dernier à' p",yesterday:"'hier à' p",today:"'aujourd’hui à' p",tomorrow:"'demain à' p'",nextWeek:"eeee 'prochain à' p",other:"P"},Kve=(t,e,n,r)=>Gve[t],Yve={narrow:["av. J.-C","ap. J.-C"],abbreviated:["av. J.-C","ap. J.-C"],wide:["avant Jésus-Christ","après Jésus-Christ"]},Xve={narrow:["T1","T2","T3","T4"],abbreviated:["1er trim.","2ème trim.","3ème trim.","4ème trim."],wide:["1er trimestre","2ème trimestre","3ème trimestre","4ème trimestre"]},Qve={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],wide:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"]},Jve={narrow:["D","L","M","M","J","V","S"],short:["di","lu","ma","me","je","ve","sa"],abbreviated:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],wide:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"]},Zve={narrow:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"mat.",afternoon:"ap.m.",evening:"soir",night:"mat."},abbreviated:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"matin",afternoon:"après-midi",evening:"soir",night:"matin"},wide:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"du matin",afternoon:"de l’après-midi",evening:"du soir",night:"du matin"}},eye=(t,e)=>{const n=Number(t),r=e==null?void 0:e.unit;if(n===0)return"0";const s=["year","week","hour","minute","second"];let i;return n===1?i=r&&s.includes(r)?"ère":"er":i="ème",n+i},tye=["MMM","MMMM"],nye={preprocessor:(t,e)=>t.getDate()===1||!e.some(r=>r.isToken&&tye.includes(r.value))?e:e.map(r=>r.isToken&&r.value==="do"?{isToken:!0,value:"d"}:r),ordinalNumber:eye,era:Ar({values:Yve,defaultWidth:"wide"}),quarter:Ar({values:Xve,defaultWidth:"wide",argumentCallback:t=>t-1}),month:Ar({values:Qve,defaultWidth:"wide"}),day:Ar({values:Jve,defaultWidth:"wide"}),dayPeriod:Ar({values:Zve,defaultWidth:"wide"})},rye=/^(\d+)(ième|ère|ème|er|e)?/i,sye=/\d+/i,iye={narrow:/^(av\.J\.C|ap\.J\.C|ap\.J\.-C)/i,abbreviated:/^(av\.J\.-C|av\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,wide:/^(avant Jésus-Christ|après Jésus-Christ)/i},oye={any:[/^av/i,/^ap/i]},aye={narrow:/^T?[1234]/i,abbreviated:/^[1234](er|ème|e)? trim\.?/i,wide:/^[1234](er|ème|e)? trimestre/i},lye={any:[/1/i,/2/i,/3/i,/4/i]},cye={narrow:/^[jfmasond]/i,abbreviated:/^(janv|févr|mars|avr|mai|juin|juill|juil|août|sept|oct|nov|déc)\.?/i,wide:/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i},uye={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^av/i,/^ma/i,/^juin/i,/^juil/i,/^ao/i,/^s/i,/^o/i,/^n/i,/^d/i]},dye={narrow:/^[lmjvsd]/i,short:/^(di|lu|ma|me|je|ve|sa)/i,abbreviated:/^(dim|lun|mar|mer|jeu|ven|sam)\.?/i,wide:/^(dimanche|lundi|mardi|mercredi|jeudi|vendredi|samedi)/i},fye={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^di/i,/^lu/i,/^ma/i,/^me/i,/^je/i,/^ve/i,/^sa/i]},hye={narrow:/^(a|p|minuit|midi|mat\.?|ap\.?m\.?|soir|nuit)/i,any:/^([ap]\.?\s?m\.?|du matin|de l'après[-\s]midi|du soir|de la nuit)/i},pye={any:{am:/^a/i,pm:/^p/i,midnight:/^min/i,noon:/^mid/i,morning:/mat/i,afternoon:/ap/i,evening:/soir/i,night:/nuit/i}},mye={ordinalNumber:W1({matchPattern:rye,parsePattern:sye,valueCallback:t=>parseInt(t)}),era:Rr({matchPatterns:iye,defaultMatchWidth:"wide",parsePatterns:oye,defaultParseWidth:"any"}),quarter:Rr({matchPatterns:aye,defaultMatchWidth:"wide",parsePatterns:lye,defaultParseWidth:"any",valueCallback:t=>t+1}),month:Rr({matchPatterns:cye,defaultMatchWidth:"wide",parsePatterns:uye,defaultParseWidth:"any"}),day:Rr({matchPatterns:dye,defaultMatchWidth:"wide",parsePatterns:fye,defaultParseWidth:"any"}),dayPeriod:Rr({matchPatterns:hye,defaultMatchWidth:"any",parsePatterns:pye,defaultParseWidth:"any"})},gye={code:"fr",formatDistance:Uve,formatLong:qve,formatRelative:Kve,localize:nye,match:mye,options:{weekStartsOn:1,firstWeekContainsDate:4}};var dt=function(){return dt=Object.assign||function(e){for(var n,r=1,s=arguments.length;r1&&(c||!u),l=e>1&&(u||!c),d=function(){r&&i(r)},m=function(){s&&i(s)};return P.jsx(Yye,{displayMonth:t.displayMonth,hideNext:f,hidePrevious:l,nextMonth:s,previousMonth:r,onPreviousClick:d,onNextClick:m})}function Xye(t){var e,n=In(),r=n.classNames,s=n.disableNavigation,i=n.styles,a=n.captionLayout,o=n.components,c=(e=o==null?void 0:o.CaptionLabel)!==null&&e!==void 0?e:I6,u;return s?u=P.jsx(c,{id:t.id,displayMonth:t.displayMonth}):a==="dropdown"?u=P.jsx(Rz,{displayMonth:t.displayMonth,id:t.id}):a==="dropdown-buttons"?u=P.jsxs(P.Fragment,{children:[P.jsx(Rz,{displayMonth:t.displayMonth,displayIndex:t.displayIndex,id:t.id}),P.jsx(Pz,{displayMonth:t.displayMonth,displayIndex:t.displayIndex,id:t.id})]}):u=P.jsxs(P.Fragment,{children:[P.jsx(c,{id:t.id,displayMonth:t.displayMonth,displayIndex:t.displayIndex}),P.jsx(Pz,{displayMonth:t.displayMonth,id:t.id})]}),P.jsx("div",{className:r.caption,style:i.caption,children:u})}function Qye(t){var e=In(),n=e.footer,r=e.styles,s=e.classNames.tfoot;return n?P.jsx("tfoot",{className:s,style:r.tfoot,children:P.jsx("tr",{children:P.jsx("td",{colSpan:8,children:n})})}):P.jsx(P.Fragment,{})}function Jye(t,e,n){for(var r=n?Gh(new Date):xl(new Date,{locale:t,weekStartsOn:e}),s=[],i=0;i<7;i++){var a=qs(r,i);s.push(a)}return s}function Zye(){var t=In(),e=t.classNames,n=t.styles,r=t.showWeekNumber,s=t.locale,i=t.weekStartsOn,a=t.ISOWeek,o=t.formatters.formatWeekdayName,c=t.labels.labelWeekday,u=Jye(s,i,a);return P.jsxs("tr",{style:n.head_row,className:e.head_row,children:[r&&P.jsx("td",{style:n.head_cell,className:e.head_cell}),u.map(function(f,l){return P.jsx("th",{scope:"col",className:e.head_cell,style:n.head_cell,"aria-label":c(f,{locale:s}),children:o(f,{locale:s})},l)})]})}function ebe(){var t,e=In(),n=e.classNames,r=e.styles,s=e.components,i=(t=s==null?void 0:s.HeadRow)!==null&&t!==void 0?t:Zye;return P.jsx("thead",{style:r.head,className:n.head,children:P.jsx(i,{})})}function tbe(t){var e=In(),n=e.locale,r=e.formatters.formatDay;return P.jsx(P.Fragment,{children:r(t.date,{locale:n})})}var VL=_.createContext(void 0);function nbe(t){if(!h0(t.initialProps)){var e={selected:void 0,modifiers:{disabled:[]}};return P.jsx(VL.Provider,{value:e,children:t.children})}return P.jsx(rbe,{initialProps:t.initialProps,children:t.children})}function rbe(t){var e=t.initialProps,n=t.children,r=e.selected,s=e.min,i=e.max,a=function(u,f,l){var d,m;(d=e.onDayClick)===null||d===void 0||d.call(e,u,f,l);var p=!!(f.selected&&s&&(r==null?void 0:r.length)===s);if(!p){var h=!!(!f.selected&&i&&(r==null?void 0:r.length)===i);if(!h){var y=r?O6([],r):[];if(f.selected){var g=y.findIndex(function(v){return bi(u,v)});y.splice(g,1)}else y.push(u);(m=e.onSelect)===null||m===void 0||m.call(e,y,u,f,l)}}},o={disabled:[]};r&&o.disabled.push(function(u){var f=i&&r.length>i-1,l=r.some(function(d){return bi(d,u)});return!!(f&&!l)});var c={selected:r,onDayClick:a,modifiers:o};return P.jsx(VL.Provider,{value:c,children:n})}function qL(){var t=_.useContext(VL);if(!t)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return t}function sbe(t,e){var n=e||{},r=n.from,s=n.to;return r&&s?bi(s,t)&&bi(r,t)?void 0:bi(s,t)?{from:s,to:void 0}:bi(r,t)?void 0:FD(r,t)?{from:t,to:s}:{from:r,to:t}:s?FD(t,s)?{from:s,to:t}:{from:t,to:s}:r?M6(t,r)?{from:t,to:r}:{from:r,to:t}:{from:t,to:void 0}}var GL=_.createContext(void 0);function ibe(t){if(!p0(t.initialProps)){var e={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return P.jsx(GL.Provider,{value:e,children:t.children})}return P.jsx(obe,{initialProps:t.initialProps,children:t.children})}function obe(t){var e=t.initialProps,n=t.children,r=e.selected,s=r||{},i=s.from,a=s.to,o=e.min,c=e.max,u=function(m,p,h){var y,g;(y=e.onDayClick)===null||y===void 0||y.call(e,m,p,h);var v=sbe(m,r);(g=e.onSelect)===null||g===void 0||g.call(e,v,m,p,h)},f={range_start:[],range_end:[],range_middle:[],disabled:[]};if(i?(f.range_start=[i],a?(f.range_end=[a],bi(i,a)||(f.range_middle=[{after:i,before:a}])):f.range_end=[i]):a&&(f.range_start=[a],f.range_end=[a]),o&&(i&&!a&&f.disabled.push({after:cT(i,o-1),before:qs(i,o-1)}),i&&a&&f.disabled.push({after:i,before:qs(i,o-1)}),!i&&a&&f.disabled.push({after:cT(a,o-1),before:qs(a,o-1)})),c){if(i&&!a&&(f.disabled.push({before:qs(i,-c+1)}),f.disabled.push({after:qs(i,c-1)})),i&&a){var l=pl(a,i)+1,d=c-l;f.disabled.push({before:cT(i,d)}),f.disabled.push({after:qs(a,d)})}!i&&a&&(f.disabled.push({before:qs(a,-c+1)}),f.disabled.push({after:qs(a,c-1)}))}return P.jsx(GL.Provider,{value:{selected:r,onDayClick:u,modifiers:f},children:n})}function KL(){var t=_.useContext(GL);if(!t)throw new Error("useSelectRange must be used within a SelectRangeProvider");return t}function HS(t){return Array.isArray(t)?O6([],t):t!==void 0?[t]:[]}function abe(t){var e={};return Object.entries(t).forEach(function(n){var r=n[0],s=n[1];e[r]=HS(s)}),e}var Ta;(function(t){t.Outside="outside",t.Disabled="disabled",t.Selected="selected",t.Hidden="hidden",t.Today="today",t.RangeStart="range_start",t.RangeEnd="range_end",t.RangeMiddle="range_middle"})(Ta||(Ta={}));var lbe=Ta.Selected,Wl=Ta.Disabled,cbe=Ta.Hidden,ube=Ta.Today,dT=Ta.RangeEnd,fT=Ta.RangeMiddle,hT=Ta.RangeStart,dbe=Ta.Outside;function fbe(t,e,n){var r,s=(r={},r[lbe]=HS(t.selected),r[Wl]=HS(t.disabled),r[cbe]=HS(t.hidden),r[ube]=[t.today],r[dT]=[],r[fT]=[],r[hT]=[],r[dbe]=[],r);return t.fromDate&&s[Wl].push({before:t.fromDate}),t.toDate&&s[Wl].push({after:t.toDate}),h0(t)?s[Wl]=s[Wl].concat(e.modifiers[Wl]):p0(t)&&(s[Wl]=s[Wl].concat(n.modifiers[Wl]),s[hT]=n.modifiers[hT],s[fT]=n.modifiers[fT],s[dT]=n.modifiers[dT]),s}var F6=_.createContext(void 0);function hbe(t){var e=In(),n=qL(),r=KL(),s=fbe(e,n,r),i=abe(e.modifiers),a=dt(dt({},s),i);return P.jsx(F6.Provider,{value:a,children:t.children})}function z6(){var t=_.useContext(F6);if(!t)throw new Error("useModifiers must be used within a ModifiersProvider");return t}function pbe(t){return!!(t&&typeof t=="object"&&"before"in t&&"after"in t)}function mbe(t){return!!(t&&typeof t=="object"&&"from"in t)}function gbe(t){return!!(t&&typeof t=="object"&&"after"in t)}function vbe(t){return!!(t&&typeof t=="object"&&"before"in t)}function ybe(t){return!!(t&&typeof t=="object"&&"dayOfWeek"in t)}function bbe(t,e){var n,r=e.from,s=e.to;if(r&&s){var i=pl(s,r)<0;i&&(n=[s,r],r=n[0],s=n[1]);var a=pl(t,r)>=0&&pl(s,t)>=0;return a}return s?bi(s,t):r?bi(r,t):!1}function wbe(t){return zL(t)}function _be(t){return Array.isArray(t)&&t.every(zL)}function xbe(t,e){return e.some(function(n){if(typeof n=="boolean")return n;if(wbe(n))return bi(t,n);if(_be(n))return n.includes(t);if(mbe(n))return bbe(t,n);if(ybe(n))return n.dayOfWeek.includes(t.getDay());if(pbe(n)){var r=pl(n.before,t),s=pl(n.after,t),i=r>0,a=s<0,o=FD(n.before,n.after);return o?a&&i:i||a}return gbe(n)?pl(t,n.after)>0:vbe(n)?pl(n.before,t)>0:typeof n=="function"?n(t):!1})}function YL(t,e,n){var r=Object.keys(e).reduce(function(i,a){var o=e[a];return xbe(t,o)&&i.push(a),i},[]),s={};return r.forEach(function(i){return s[i]=!0}),n&&!WL(t,n)&&(s.outside=!0),s}function Sbe(t,e){for(var n=Ai(t[0]),r=BL(t[t.length-1]),s,i,a=n;a<=r;){var o=YL(a,e),c=!o.disabled&&!o.hidden;if(!c){a=qs(a,1);continue}if(o.selected)return a;o.today&&!i&&(i=a),s||(s=a),a=qs(a,1)}return i||s}var Ebe=365;function B6(t,e){var n=e.moveBy,r=e.direction,s=e.context,i=e.modifiers,a=e.retry,o=a===void 0?{count:0,lastFocused:t}:a,c=s.weekStartsOn,u=s.fromDate,f=s.toDate,l=s.locale,d={day:qs,week:jD,month:Pa,year:Tme,startOfWeek:function(y){return s.ISOWeek?Gh(y):xl(y,{locale:l,weekStartsOn:c})},endOfWeek:function(y){return s.ISOWeek?P6(y):UL(y,{locale:l,weekStartsOn:c})}},m=d[n](t,r==="after"?1:-1);r==="before"&&u?m=kme([u,m]):r==="after"&&f&&(m=Dme([f,m]));var p=!0;if(i){var h=YL(m,i);p=!h.disabled&&!h.hidden}return p?m:o.count>Ebe?o.lastFocused:B6(m,{moveBy:n,direction:r,context:s,modifiers:i,retry:dt(dt({},o),{count:o.count+1})})}var U6=_.createContext(void 0);function Cbe(t){var e=m0(),n=z6(),r=_.useState(),s=r[0],i=r[1],a=_.useState(),o=a[0],c=a[1],u=Sbe(e.displayMonths,n),f=s??(o&&e.isDateDisplayed(o))?o:u,l=function(){c(s),i(void 0)},d=function(y){i(y)},m=In(),p=function(y,g){if(s){var v=B6(s,{moveBy:y,direction:g,context:m,modifiers:n});bi(s,v)||(e.goToDate(v,s),d(v))}},h={focusedDay:s,focusTarget:f,blur:l,focus:d,focusDayAfter:function(){return p("day","after")},focusDayBefore:function(){return p("day","before")},focusWeekAfter:function(){return p("week","after")},focusWeekBefore:function(){return p("week","before")},focusMonthBefore:function(){return p("month","before")},focusMonthAfter:function(){return p("month","after")},focusYearBefore:function(){return p("year","before")},focusYearAfter:function(){return p("year","after")},focusStartOfWeek:function(){return p("startOfWeek","before")},focusEndOfWeek:function(){return p("endOfWeek","after")}};return P.jsx(U6.Provider,{value:h,children:t.children})}function XL(){var t=_.useContext(U6);if(!t)throw new Error("useFocusContext must be used within a FocusProvider");return t}function Abe(t,e){var n=z6(),r=YL(t,n,e);return r}var QL=_.createContext(void 0);function Rbe(t){if(!V1(t.initialProps)){var e={selected:void 0};return P.jsx(QL.Provider,{value:e,children:t.children})}return P.jsx(Pbe,{initialProps:t.initialProps,children:t.children})}function Pbe(t){var e=t.initialProps,n=t.children,r=function(i,a,o){var c,u,f;if((c=e.onDayClick)===null||c===void 0||c.call(e,i,a,o),a.selected&&!e.required){(u=e.onSelect)===null||u===void 0||u.call(e,void 0,i,a,o);return}(f=e.onSelect)===null||f===void 0||f.call(e,i,i,a,o)},s={selected:e.selected,onDayClick:r};return P.jsx(QL.Provider,{value:s,children:n})}function H6(){var t=_.useContext(QL);if(!t)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return t}function Tbe(t,e){var n=In(),r=H6(),s=qL(),i=KL(),a=XL(),o=a.focusDayAfter,c=a.focusDayBefore,u=a.focusWeekAfter,f=a.focusWeekBefore,l=a.blur,d=a.focus,m=a.focusMonthBefore,p=a.focusMonthAfter,h=a.focusYearBefore,y=a.focusYearAfter,g=a.focusStartOfWeek,v=a.focusEndOfWeek,w=function(W){var H,ee,re,X;V1(n)?(H=r.onDayClick)===null||H===void 0||H.call(r,t,e,W):h0(n)?(ee=s.onDayClick)===null||ee===void 0||ee.call(s,t,e,W):p0(n)?(re=i.onDayClick)===null||re===void 0||re.call(i,t,e,W):(X=n.onDayClick)===null||X===void 0||X.call(n,t,e,W)},x=function(W){var H;d(t),(H=n.onDayFocus)===null||H===void 0||H.call(n,t,e,W)},A=function(W){var H;l(),(H=n.onDayBlur)===null||H===void 0||H.call(n,t,e,W)},k=function(W){var H;(H=n.onDayMouseEnter)===null||H===void 0||H.call(n,t,e,W)},R=function(W){var H;(H=n.onDayMouseLeave)===null||H===void 0||H.call(n,t,e,W)},E=function(W){var H;(H=n.onDayPointerEnter)===null||H===void 0||H.call(n,t,e,W)},T=function(W){var H;(H=n.onDayPointerLeave)===null||H===void 0||H.call(n,t,e,W)},D=function(W){var H;(H=n.onDayTouchCancel)===null||H===void 0||H.call(n,t,e,W)},M=function(W){var H;(H=n.onDayTouchEnd)===null||H===void 0||H.call(n,t,e,W)},L=function(W){var H;(H=n.onDayTouchMove)===null||H===void 0||H.call(n,t,e,W)},I=function(W){var H;(H=n.onDayTouchStart)===null||H===void 0||H.call(n,t,e,W)},j=function(W){var H;(H=n.onDayKeyUp)===null||H===void 0||H.call(n,t,e,W)},U=function(W){var H;switch(W.key){case"ArrowLeft":W.preventDefault(),W.stopPropagation(),n.dir==="rtl"?o():c();break;case"ArrowRight":W.preventDefault(),W.stopPropagation(),n.dir==="rtl"?c():o();break;case"ArrowDown":W.preventDefault(),W.stopPropagation(),u();break;case"ArrowUp":W.preventDefault(),W.stopPropagation(),f();break;case"PageUp":W.preventDefault(),W.stopPropagation(),W.shiftKey?h():m();break;case"PageDown":W.preventDefault(),W.stopPropagation(),W.shiftKey?y():p();break;case"Home":W.preventDefault(),W.stopPropagation(),g();break;case"End":W.preventDefault(),W.stopPropagation(),v();break}(H=n.onDayKeyDown)===null||H===void 0||H.call(n,t,e,W)},Y={onClick:w,onFocus:x,onBlur:A,onKeyDown:U,onKeyUp:j,onMouseEnter:k,onMouseLeave:R,onPointerEnter:E,onPointerLeave:T,onTouchCancel:D,onTouchEnd:M,onTouchMove:L,onTouchStart:I};return Y}function kbe(){var t=In(),e=H6(),n=qL(),r=KL(),s=V1(t)?e.selected:h0(t)?n.selected:p0(t)?r.selected:void 0;return s}function Dbe(t){return Object.values(Ta).includes(t)}function Nbe(t,e){var n=[t.classNames.day];return Object.keys(e).forEach(function(r){var s=t.modifiersClassNames[r];if(s)n.push(s);else if(Dbe(r)){var i=t.classNames["day_".concat(r)];i&&n.push(i)}}),n}function Mbe(t,e){var n=dt({},t.styles.day);return Object.keys(e).forEach(function(r){var s;n=dt(dt({},n),(s=t.modifiersStyles)===null||s===void 0?void 0:s[r])}),n}function Obe(t,e,n){var r,s,i,a=In(),o=XL(),c=Abe(t,e),u=Tbe(t,c),f=kbe(),l=!!(a.onDayClick||a.mode!=="default");_.useEffect(function(){var k;c.outside||o.focusedDay&&l&&bi(o.focusedDay,t)&&((k=n.current)===null||k===void 0||k.focus())},[o.focusedDay,t,n,l,c.outside]);var d=Nbe(a,c).join(" "),m=Mbe(a,c),p=!!(c.outside&&!a.showOutsideDays||c.hidden),h=(i=(s=a.components)===null||s===void 0?void 0:s.DayContent)!==null&&i!==void 0?i:tbe,y=P.jsx(h,{date:t,displayMonth:e,activeModifiers:c}),g={style:m,className:d,children:y,role:"gridcell"},v=o.focusTarget&&bi(o.focusTarget,t)&&!c.outside,w=o.focusedDay&&bi(o.focusedDay,t),x=dt(dt(dt({},g),(r={disabled:c.disabled,role:"gridcell"},r["aria-selected"]=c.selected,r.tabIndex=w||v?0:-1,r)),u),A={isButton:l,isHidden:p,activeModifiers:c,selectedDays:f,buttonProps:x,divProps:g};return A}function Lbe(t){var e=_.useRef(null),n=Obe(t.date,t.displayMonth,e);return n.isHidden?P.jsx("div",{role:"gridcell"}):n.isButton?P.jsx(aC,dt({name:"day",ref:e},n.buttonProps)):P.jsx("div",dt({},n.divProps))}function Ibe(t){var e=t.number,n=t.dates,r=In(),s=r.onWeekNumberClick,i=r.styles,a=r.classNames,o=r.locale,c=r.labels.labelWeekNumber,u=r.formatters.formatWeekNumber,f=u(Number(e),{locale:o});if(!s)return P.jsx("span",{className:a.weeknumber,style:i.weeknumber,children:f});var l=c(Number(e),{locale:o}),d=function(m){s(e,n,m)};return P.jsx(aC,{name:"week-number","aria-label":l,className:a.weeknumber,style:i.weeknumber,onClick:d,children:f})}function $be(t){var e,n,r=In(),s=r.styles,i=r.classNames,a=r.showWeekNumber,o=r.components,c=(e=o==null?void 0:o.Day)!==null&&e!==void 0?e:Lbe,u=(n=o==null?void 0:o.WeekNumber)!==null&&n!==void 0?n:Ibe,f;return a&&(f=P.jsx("td",{className:i.cell,style:s.cell,children:P.jsx(u,{number:t.weekNumber,dates:t.dates})})),P.jsxs("tr",{className:i.row,style:s.row,children:[f,t.dates.map(function(l){return P.jsx("td",{className:i.cell,style:s.cell,role:"presentation",children:P.jsx(c,{displayMonth:t.displayMonth,date:l})},Tge(l))})]})}function Tz(t,e,n){for(var r=n!=null&&n.ISOWeek?P6(e):UL(e,n),s=n!=null&&n.ISOWeek?Gh(t):xl(t,n),i=pl(r,s),a=[],o=0;o<=i;o++)a.push(qs(s,o));var c=a.reduce(function(u,f){var l=n!=null&&n.ISOWeek?T6(f):D6(f,n),d=u.find(function(m){return m.weekNumber===l});return d?(d.dates.push(f),u):(u.push({weekNumber:l,dates:[f]}),u)},[]);return c}function jbe(t,e){var n=Tz(Ai(t),BL(t),e);if(e!=null&&e.useFixedWeeks){var r=Dge(t,e);if(r<6){var s=n[n.length-1],i=s.dates[s.dates.length-1],a=jD(i,6-r),o=Tz(jD(i,1),a,e);n.push.apply(n,o)}}return n}function Fbe(t){var e,n,r,s=In(),i=s.locale,a=s.classNames,o=s.styles,c=s.hideHead,u=s.fixedWeeks,f=s.components,l=s.weekStartsOn,d=s.firstWeekContainsDate,m=s.ISOWeek,p=jbe(t.displayMonth,{useFixedWeeks:!!u,ISOWeek:m,locale:i,weekStartsOn:l,firstWeekContainsDate:d}),h=(e=f==null?void 0:f.Head)!==null&&e!==void 0?e:ebe,y=(n=f==null?void 0:f.Row)!==null&&n!==void 0?n:$be,g=(r=f==null?void 0:f.Footer)!==null&&r!==void 0?r:Qye;return P.jsxs("table",{id:t.id,className:a.table,style:o.table,role:"grid","aria-labelledby":t["aria-labelledby"],children:[!c&&P.jsx(h,{}),P.jsx("tbody",{className:a.tbody,style:o.tbody,children:p.map(function(v){return P.jsx(y,{displayMonth:t.displayMonth,dates:v.dates,weekNumber:v.weekNumber},v.weekNumber)})}),P.jsx(g,{displayMonth:t.displayMonth})]})}function zbe(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var Bbe=zbe()?_.useLayoutEffect:_.useEffect,pT=!1,Ube=0;function kz(){return"react-day-picker-".concat(++Ube)}function Hbe(t){var e,n=t??(pT?kz():null),r=_.useState(n),s=r[0],i=r[1];return Bbe(function(){s===null&&i(kz())},[]),_.useEffect(function(){pT===!1&&(pT=!0)},[]),(e=t??s)!==null&&e!==void 0?e:void 0}function Wbe(t){var e,n,r=In(),s=r.dir,i=r.classNames,a=r.styles,o=r.components,c=m0().displayMonths,u=Hbe(r.id?"".concat(r.id,"-").concat(t.displayIndex):void 0),f=r.id?"".concat(r.id,"-grid-").concat(t.displayIndex):void 0,l=[i.month],d=a.month,m=t.displayIndex===0,p=t.displayIndex===c.length-1,h=!m&&!p;s==="rtl"&&(e=[m,p],p=e[0],m=e[1]),m&&(l.push(i.caption_start),d=dt(dt({},d),a.caption_start)),p&&(l.push(i.caption_end),d=dt(dt({},d),a.caption_end)),h&&(l.push(i.caption_between),d=dt(dt({},d),a.caption_between));var y=(n=o==null?void 0:o.Caption)!==null&&n!==void 0?n:Xye;return P.jsxs("div",{className:l.join(" "),style:d,children:[P.jsx(y,{id:u,displayMonth:t.displayMonth,displayIndex:t.displayIndex}),P.jsx(Fbe,{id:f,"aria-labelledby":u,displayMonth:t.displayMonth})]},t.displayIndex)}function Vbe(t){var e=In(),n=e.classNames,r=e.styles;return P.jsx("div",{className:n.months,style:r.months,children:t.children})}function qbe(t){var e,n,r=t.initialProps,s=In(),i=XL(),a=m0(),o=_.useState(!1),c=o[0],u=o[1];_.useEffect(function(){s.initialFocus&&i.focusTarget&&(c||(i.focus(i.focusTarget),u(!0)))},[s.initialFocus,c,i.focus,i.focusTarget,i]);var f=[s.classNames.root,s.className];s.numberOfMonths>1&&f.push(s.classNames.multiple_months),s.showWeekNumber&&f.push(s.classNames.with_weeknumber);var l=dt(dt({},s.styles.root),s.style),d=Object.keys(r).filter(function(p){return p.startsWith("data-")}).reduce(function(p,h){var y;return dt(dt({},p),(y={},y[h]=r[h],y))},{}),m=(n=(e=r.components)===null||e===void 0?void 0:e.Months)!==null&&n!==void 0?n:Vbe;return P.jsx("div",dt({className:f.join(" "),style:l,dir:s.dir,id:s.id,nonce:r.nonce,title:r.title,lang:r.lang},d,{children:P.jsx(m,{children:a.displayMonths.map(function(p,h){return P.jsx(Wbe,{displayIndex:h,displayMonth:p},h)})})}))}function Gbe(t){var e=t.children,n=vye(t,["children"]);return P.jsx(Iye,{initialProps:n,children:P.jsx(qye,{children:P.jsx(Rbe,{initialProps:n,children:P.jsx(nbe,{initialProps:n,children:P.jsx(ibe,{initialProps:n,children:P.jsx(hbe,{children:P.jsx(Cbe,{children:e})})})})})})})}function Kbe(t){return P.jsx(Gbe,dt({},t,{children:P.jsx(qbe,{initialProps:t})}))}function W6({className:t,classNames:e,showOutsideDays:n=!0,...r}){return P.jsx(Kbe,{showOutsideDays:n,className:ce("p-3",t),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:ce(Vb({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:"h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",day:ce(Vb({variant:"ghost"}),"h-9 w-9 p-0 font-normal aria-selected:opacity-100"),day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...e},components:{IconLeft:()=>P.jsx(gL,{className:"w-4 h-4"}),IconRight:()=>P.jsx(s0,{className:"w-4 h-4"})},...r})}W6.displayName="Calendar";const V6=_.forwardRef(({className:t,...e},n)=>P.jsx("div",{ref:n,className:ce("rounded-md border bg-card text-card-foreground shadow",t),...e}));V6.displayName="Card";const q6=_.forwardRef(({className:t,...e},n)=>P.jsx("div",{ref:n,className:ce("flex flex-col space-y-1.5 p-6",t),...e}));q6.displayName="CardHeader";const G6=_.forwardRef(({className:t,...e},n)=>P.jsx("h3",{ref:n,className:ce("font-semibold leading-none tracking-tight",t),...e}));G6.displayName="CardTitle";const K6=_.forwardRef(({className:t,...e},n)=>P.jsx("p",{ref:n,className:ce("text-sm text-muted-foreground",t),...e}));K6.displayName="CardDescription";const Y6=_.forwardRef(({className:t,...e},n)=>P.jsx("div",{ref:n,className:ce("p-6 pt-0",t),...e}));Y6.displayName="CardContent";const X6=_.forwardRef(({className:t,...e},n)=>P.jsx("div",{ref:n,className:ce("flex items-center p-6 pt-0",t),...e}));X6.displayName="CardFooter";var Ybe=Array.isArray,Xbe=Ybe,Qbe=typeof yr=="object"&&yr&&yr.Object===Object&&yr,Jbe=Qbe,Zbe=Jbe,ewe=typeof self=="object"&&self&&self.Object===Object&&self,twe=Zbe||ewe||Function("return this")(),q1=twe,nwe=q1,rwe=nwe.Symbol,JL=rwe,Dz=JL,Q6=Object.prototype,swe=Q6.hasOwnProperty,iwe=Q6.toString,yy=Dz?Dz.toStringTag:void 0;function owe(t){var e=swe.call(t,yy),n=t[yy];try{t[yy]=void 0;var r=!0}catch{}var s=iwe.call(t);return r&&(e?t[yy]=n:delete t[yy]),s}var awe=owe,lwe=Object.prototype,cwe=lwe.toString;function uwe(t){return cwe.call(t)}var dwe=uwe,Nz=JL,fwe=awe,hwe=dwe,pwe="[object Null]",mwe="[object Undefined]",Mz=Nz?Nz.toStringTag:void 0;function gwe(t){return t==null?t===void 0?mwe:pwe:Mz&&Mz in Object(t)?fwe(t):hwe(t)}var ZL=gwe;function vwe(t){return t!=null&&typeof t=="object"}var J6=vwe,ywe=ZL,bwe=J6,wwe="[object Symbol]";function _we(t){return typeof t=="symbol"||bwe(t)&&ywe(t)==wwe}var xwe=_we;function Swe(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var g0=Swe,Ewe=ZL,Cwe=g0,Awe="[object AsyncFunction]",Rwe="[object Function]",Pwe="[object GeneratorFunction]",Twe="[object Proxy]";function kwe(t){if(!Cwe(t))return!1;var e=Ewe(t);return e==Rwe||e==Pwe||e==Awe||e==Twe}var Dwe=kwe,Nwe=q1,Mwe=Nwe["__core-js_shared__"],Owe=Mwe,mT=Owe,Oz=function(){var t=/[^.]+$/.exec(mT&&mT.keys&&mT.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Lwe(t){return!!Oz&&Oz in t}var Iwe=Lwe,$we=Function.prototype,jwe=$we.toString;function Fwe(t){if(t!=null){try{return jwe.call(t)}catch{}try{return t+""}catch{}}return""}var zwe=Fwe,Bwe=Dwe,Uwe=Iwe,Hwe=g0,Wwe=zwe,Vwe=/[\\^$.*+?()[\]{}|]/g,qwe=/^\[object .+?Constructor\]$/,Gwe=Function.prototype,Kwe=Object.prototype,Ywe=Gwe.toString,Xwe=Kwe.hasOwnProperty,Qwe=RegExp("^"+Ywe.call(Xwe).replace(Vwe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Jwe(t){if(!Hwe(t)||Uwe(t))return!1;var e=Bwe(t)?Qwe:qwe;return e.test(Wwe(t))}var Zwe=Jwe;function e_e(t,e){return t==null?void 0:t[e]}var t_e=e_e,n_e=Zwe,r_e=t_e;function s_e(t,e){var n=r_e(t,e);return n_e(n)?n:void 0}var Z6=s_e,i_e=Z6,o_e=i_e(Object,"create"),G1=o_e,Lz=G1;function a_e(){this.__data__=Lz?Lz(null):{},this.size=0}var l_e=a_e;function c_e(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var u_e=c_e,d_e=G1,f_e="__lodash_hash_undefined__",h_e=Object.prototype,p_e=h_e.hasOwnProperty;function m_e(t){var e=this.__data__;if(d_e){var n=e[t];return n===f_e?void 0:n}return p_e.call(e,t)?e[t]:void 0}var g_e=m_e,v_e=G1,y_e=Object.prototype,b_e=y_e.hasOwnProperty;function w_e(t){var e=this.__data__;return v_e?e[t]!==void 0:b_e.call(e,t)}var __e=w_e,x_e=G1,S_e="__lodash_hash_undefined__";function E_e(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=x_e&&e===void 0?S_e:e,this}var C_e=E_e,A_e=l_e,R_e=u_e,P_e=g_e,T_e=__e,k_e=C_e;function Cv(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e-1}var K_e=G_e,Y_e=K1;function X_e(t,e){var n=this.__data__,r=Y_e(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}var Q_e=X_e,J_e=M_e,Z_e=U_e,e0e=V_e,t0e=K_e,n0e=Q_e;function Av(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e2?r-2:0),i=2;i=e||R<0||l&&E>=i}function g(){var k=vT();if(y(k))return v(k);o=setTimeout(g,h(k))}function v(k){return o=void 0,d&&r?m(k):(r=s=void 0,a)}function w(){o!==void 0&&clearTimeout(o),u=0,r=c=s=o=void 0}function x(){return o===void 0?a:v(vT())}function A(){var k=vT(),R=y(k);if(r=arguments,s=this,c=k,R){if(o===void 0)return p(c);if(l)return clearTimeout(o),o=setTimeout(g,e),m(c)}return o===void 0&&(o=setTimeout(g,e)),a}return A.cancel=w,A.flush=x,A}var wxe=bxe,_xe=wxe,xxe=g_,Sxe="Expected a function";function Exe(t,e,n){var r=!0,s=!0;if(typeof t!="function")throw new TypeError(Sxe);return xxe(n)&&(r="leading"in n?!!n.leading:r,s="trailing"in n?!!n.trailing:s),_xe(t,e,{leading:r,maxWait:e,trailing:s})}var Cxe=Exe;const Axe=Od(Cxe);function Kb(t){"@babel/helpers - typeof";return Kb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Kb(t)}function Uz(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function iS(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&(I=Axe(I,h,{trailing:!0,leading:!1}));var j=new ResizeObserver(I),U=A.current.getBoundingClientRect(),Y=U.width,W=U.height;return M(Y,W),j.observe(A.current),function(){j.disconnect()}},[M,h]);var L=_.useMemo(function(){var I=T.containerWidth,j=T.containerHeight;if(I<0||j<0)return null;gT(sS(a)||sS(c),`The width(%s) and height(%s) are both fixed numbers, + */var tI=Symbol.for("react.element"),nI=Symbol.for("react.portal"),X1=Symbol.for("react.fragment"),Q1=Symbol.for("react.strict_mode"),J1=Symbol.for("react.profiler"),Z1=Symbol.for("react.provider"),eA=Symbol.for("react.context"),X0e=Symbol.for("react.server_context"),tA=Symbol.for("react.forward_ref"),nA=Symbol.for("react.suspense"),rA=Symbol.for("react.suspense_list"),sA=Symbol.for("react.memo"),iA=Symbol.for("react.lazy"),Q0e=Symbol.for("react.offscreen"),t8;t8=Symbol.for("react.module.reference");function Wo(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case tI:switch(t=t.type,t){case X1:case J1:case Q1:case nA:case rA:return t;default:switch(t=t&&t.$$typeof,t){case X0e:case eA:case tA:case iA:case sA:case Z1:return t;default:return e}}case nI:return e}}}Sn.ContextConsumer=eA;Sn.ContextProvider=Z1;Sn.Element=tI;Sn.ForwardRef=tA;Sn.Fragment=X1;Sn.Lazy=iA;Sn.Memo=sA;Sn.Portal=nI;Sn.Profiler=J1;Sn.StrictMode=Q1;Sn.Suspense=nA;Sn.SuspenseList=rA;Sn.isAsyncMode=function(){return!1};Sn.isConcurrentMode=function(){return!1};Sn.isContextConsumer=function(t){return Wo(t)===eA};Sn.isContextProvider=function(t){return Wo(t)===Z1};Sn.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===tI};Sn.isForwardRef=function(t){return Wo(t)===tA};Sn.isFragment=function(t){return Wo(t)===X1};Sn.isLazy=function(t){return Wo(t)===iA};Sn.isMemo=function(t){return Wo(t)===sA};Sn.isPortal=function(t){return Wo(t)===nI};Sn.isProfiler=function(t){return Wo(t)===J1};Sn.isStrictMode=function(t){return Wo(t)===Q1};Sn.isSuspense=function(t){return Wo(t)===nA};Sn.isSuspenseList=function(t){return Wo(t)===rA};Sn.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===X1||t===J1||t===Q1||t===nA||t===rA||t===Q0e||typeof t=="object"&&t!==null&&(t.$$typeof===iA||t.$$typeof===sA||t.$$typeof===Z1||t.$$typeof===eA||t.$$typeof===tA||t.$$typeof===t8||t.getModuleId!==void 0)};Sn.typeOf=Wo;var sS=function(e){return Y0e(e)&&e.indexOf("%")===e.length-1},J0e=function(e){return typeof e=="string"?e:e?e.displayName||e.name||"Component":""},gT=function(e,n){for(var r=arguments.length,s=new Array(r>2?r-2:0),i=2;i=e||R<0||l&&E>=i}function g(){var k=vT();if(y(k))return v(k);o=setTimeout(g,h(k))}function v(k){return o=void 0,d&&r?m(k):(r=s=void 0,a)}function w(){o!==void 0&&clearTimeout(o),u=0,r=c=s=o=void 0}function x(){return o===void 0?a:v(vT())}function A(){var k=vT(),R=y(k);if(r=arguments,s=this,c=k,R){if(o===void 0)return p(c);if(l)return clearTimeout(o),o=setTimeout(g,e),m(c)}return o===void 0&&(o=setTimeout(g,e)),a}return A.cancel=w,A.flush=x,A}var xxe=_xe,Sxe=xxe,Exe=g0,Cxe="Expected a function";function Axe(t,e,n){var r=!0,s=!0;if(typeof t!="function")throw new TypeError(Cxe);return Exe(n)&&(r="leading"in n?!!n.leading:r,s="trailing"in n?!!n.trailing:s),Sxe(t,e,{leading:r,maxWait:e,trailing:s})}var Rxe=Axe;const Pxe=Od(Rxe);function Kb(t){"@babel/helpers - typeof";return Kb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Kb(t)}function Uz(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,r)}return n}function iS(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&(I=Pxe(I,h,{trailing:!0,leading:!1}));var j=new ResizeObserver(I),U=A.current.getBoundingClientRect(),Y=U.width,W=U.height;return M(Y,W),j.observe(A.current),function(){j.disconnect()}},[M,h]);var L=_.useMemo(function(){var I=T.containerWidth,j=T.containerHeight;if(I<0||j<0)return null;gT(sS(a)||sS(c),`The width(%s) and height(%s) are both fixed numbers, maybe you don't need to use a ResponsiveContainer.`,a,c),gT(!n||n>0,"The aspect(%s) must be greater than zero.",n);var U=sS(a)?I:a,Y=sS(c)?j:c;n&&n>0&&(U?Y=U/n:Y&&(U=Y*n),d&&Y>d&&(Y=d)),gT(U>0||Y>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.`,U,Y,a,c,f,l,n);var W=!Array.isArray(m)&&X_e(m.type).endsWith("Chart");return se.Children.map(m,function(H){return se.isValidElement(H)?_.cloneElement(H,iS({width:U,height:Y},W?{style:iS({height:"100%",width:"100%",maxHeight:Y,maxWidth:U},H.props.style)}:{})):H})},[n,m,c,d,l,f,T,a]);return se.createElement("div",{id:y?"".concat(y):void 0,className:hp("recharts-responsive-container",g),style:iS(iS({},x),{},{width:a,height:c,minWidth:f,minHeight:l,maxHeight:d}),ref:A},L)}),Ixe="Invariant failed";function Rn(t,e){if(!t)throw new Error(Ixe)}const $xe={light:"",dark:".dark"},n8=_.createContext(null);function r8(){const t=_.useContext(n8);if(!t)throw new Error("useChart must be used within a ");return t}const jxe=_.forwardRef(({id:t,className:e,children:n,config:r,...s},i)=>{const a=_.useId(),o=`chart-${t||a.replace(/:/g,"")}`;return P.jsx(n8.Provider,{value:{config:r},children:P.jsxs("div",{"data-chart":o,ref:i,className:ce("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",e),...s,children:[P.jsx(Fxe,{id:o,config:r}),P.jsx(Lxe,{children:n})]})})});jxe.displayName="Chart";const Fxe=({id:t,config:e})=>{const n=Object.entries(e).filter(([r,s])=>s.theme||s.color);return n.length?P.jsx("style",{dangerouslySetInnerHTML:{__html:Object.entries($xe).map(([r,s])=>` + height and width.`,U,Y,a,c,f,l,n);var W=!Array.isArray(m)&&J0e(m.type).endsWith("Chart");return se.Children.map(m,function(H){return se.isValidElement(H)?_.cloneElement(H,iS({width:U,height:Y},W?{style:iS({height:"100%",width:"100%",maxHeight:Y,maxWidth:U},H.props.style)}:{})):H})},[n,m,c,d,l,f,T,a]);return se.createElement("div",{id:y?"".concat(y):void 0,className:hp("recharts-responsive-container",g),style:iS(iS({},x),{},{width:a,height:c,minWidth:f,minHeight:l,maxHeight:d}),ref:A},L)}),jxe="Invariant failed";function Rn(t,e){if(!t)throw new Error(jxe)}const Fxe={light:"",dark:".dark"},n8=_.createContext(null);function r8(){const t=_.useContext(n8);if(!t)throw new Error("useChart must be used within a ");return t}const zxe=_.forwardRef(({id:t,className:e,children:n,config:r,...s},i)=>{const a=_.useId(),o=`chart-${t||a.replace(/:/g,"")}`;return P.jsx(n8.Provider,{value:{config:r},children:P.jsxs("div",{"data-chart":o,ref:i,className:ce("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",e),...s,children:[P.jsx(Bxe,{id:o,config:r}),P.jsx($xe,{children:n})]})})});zxe.displayName="Chart";const Bxe=({id:t,config:e})=>{const n=Object.entries(e).filter(([r,s])=>s.theme||s.color);return n.length?P.jsx("style",{dangerouslySetInnerHTML:{__html:Object.entries(Fxe).map(([r,s])=>` ${s} [data-chart=${t}] { ${n.map(([i,a])=>{var c;const o=((c=a.theme)==null?void 0:c[r])||a.color;return o?` --color-${i}: ${o};`:null}).join(` `)} } `).join(` -`)}}):null},zxe=_.forwardRef(({active:t,payload:e,className:n,indicator:r="dot",hideLabel:s=!1,hideIndicator:i=!1,label:a,labelFormatter:o,labelClassName:c,formatter:u,color:f,nameKey:l,labelKey:d},m)=>{const{config:p}=r8(),h=_.useMemo(()=>{var A;if(s||!(e!=null&&e.length))return null;const[g]=e,v=`${d||g.dataKey||g.name||"value"}`,w=zD(p,g,v),x=!d&&typeof a=="string"?((A=p[a])==null?void 0:A.label)||a:w==null?void 0:w.label;return o?P.jsx("div",{className:ce("font-medium",c),children:o(x,e)}):x?P.jsx("div",{className:ce("font-medium",c),children:x}):null},[a,o,e,s,c,p,d]);if(!t||!(e!=null&&e.length))return null;const y=e.length===1&&r!=="dot";return P.jsxs("div",{ref:m,className:ce("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:h,P.jsx("div",{className:"grid gap-1.5",children:e.map((g,v)=>{const w=`${l||g.name||g.dataKey||"value"}`,x=zD(p,g,w),A=f||g.payload.fill||g.color;return P.jsx("div",{className:ce("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:u&&(g==null?void 0:g.value)!==void 0&&g.name?u(g.value,g.name,g,v,g.payload):P.jsxs(P.Fragment,{children:[x!=null&&x.icon?P.jsx(x.icon,{}):!i&&P.jsx("div",{className:ce("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":A,"--color-border":A}}),P.jsxs("div",{className:ce("flex flex-1 justify-between leading-none",y?"items-end":"items-center"),children:[P.jsxs("div",{className:"grid gap-1.5",children:[y?h:null,P.jsx("span",{className:"text-muted-foreground",children:(x==null?void 0:x.label)||g.name})]}),g.value&&P.jsx("span",{className:"font-mono font-medium tabular-nums text-foreground",children:g.value.toLocaleString()})]})]})},g.dataKey)})})]})});zxe.displayName="ChartTooltip";const Bxe=_.forwardRef(({className:t,hideIcon:e=!1,payload:n,verticalAlign:r="bottom",nameKey:s},i)=>{const{config:a}=r8();return n!=null&&n.length?P.jsx("div",{ref:i,className:ce("flex items-center justify-center gap-4",r==="top"?"pb-3":"pt-3",t),children:n.map(o=>{const c=`${s||o.dataKey||"value"}`,u=zD(a,o,c);return P.jsxs("div",{className:ce("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"),children:[u!=null&&u.icon&&!e?P.jsx(u.icon,{}):P.jsx("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:o.color}}),u==null?void 0:u.label]},o.value)})}):null});Bxe.displayName="ChartLegend";function zD(t,e,n){if(typeof e!="object"||e===null)return;const r="payload"in e&&typeof e.payload=="object"&&e.payload!==null?e.payload:void 0;let s=n;return n in e&&typeof e[n]=="string"?s=e[n]:r&&n in r&&typeof r[n]=="string"&&(s=r[n]),s in t?t[s]:t[n]}function Pv(t){const e=_.useRef({value:t,previous:t});return _.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}function v_(t){const[e,n]=_.useState(void 0);return Ln(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let a,o;if("borderBoxSize"in i){const c=i.borderBoxSize,u=Array.isArray(c)?c[0]:c;a=u.inlineSize,o=u.blockSize}else a=t.offsetWidth,o=t.offsetHeight;n({width:a,height:o})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else n(void 0)},[t]),e}var rI="Checkbox",[Uxe,OHe]=Tn(rI),[Hxe,Wxe]=Uxe(rI),s8=_.forwardRef((t,e)=>{const{__scopeCheckbox:n,name:r,checked:s,defaultChecked:i,required:a,disabled:o,value:c="on",onCheckedChange:u,...f}=t,[l,d]=_.useState(null),m=tt(e,w=>d(w)),p=_.useRef(!1),h=l?!!l.closest("form"):!0,[y=!1,g]=sr({prop:s,defaultProp:i,onChange:u}),v=_.useRef(y);return _.useEffect(()=>{const w=l==null?void 0:l.form;if(w){const x=()=>g(v.current);return w.addEventListener("reset",x),()=>w.removeEventListener("reset",x)}},[l,g]),P.jsxs(Hxe,{scope:n,state:y,disabled:o,children:[P.jsx(De.button,{type:"button",role:"checkbox","aria-checked":Lh(y)?"mixed":y,"aria-required":a,"data-state":a8(y),"data-disabled":o?"":void 0,disabled:o,value:c,...f,ref:m,onKeyDown:me(t.onKeyDown,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:me(t.onClick,w=>{g(x=>Lh(x)?!0:!x),h&&(p.current=w.isPropagationStopped(),p.current||w.stopPropagation())})}),h&&P.jsx(Vxe,{control:l,bubbles:!p.current,name:r,value:c,checked:y,required:a,disabled:o,style:{transform:"translateX(-100%)"}})]})});s8.displayName=rI;var i8="CheckboxIndicator",o8=_.forwardRef((t,e)=>{const{__scopeCheckbox:n,forceMount:r,...s}=t,i=Wxe(i8,n);return P.jsx(Hn,{present:r||Lh(i.state)||i.state===!0,children:P.jsx(De.span,{"data-state":a8(i.state),"data-disabled":i.disabled?"":void 0,...s,ref:e,style:{pointerEvents:"none",...t.style}})})});o8.displayName=i8;var Vxe=t=>{const{control:e,checked:n,bubbles:r=!0,...s}=t,i=_.useRef(null),a=Pv(n),o=v_(e);return _.useEffect(()=>{const c=i.current,u=window.HTMLInputElement.prototype,l=Object.getOwnPropertyDescriptor(u,"checked").set;if(a!==n&&l){const d=new Event("click",{bubbles:r});c.indeterminate=Lh(n),l.call(c,Lh(n)?!1:n),c.dispatchEvent(d)}},[a,n,r]),P.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:Lh(n)?!1:n,...s,tabIndex:-1,ref:i,style:{...t.style,...o,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Lh(t){return t==="indeterminate"}function a8(t){return Lh(t)?"indeterminate":t?"checked":"unchecked"}var l8=s8,qxe=o8;const Gxe=_.forwardRef(({className:t,...e},n)=>P.jsx(l8,{ref:n,className:ce("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",t),...e,children:P.jsx(qxe,{className:ce("flex items-center justify-center text-current"),children:P.jsx(r_,{className:"h-4 w-4"})})}));Gxe.displayName=l8.displayName;var Wz=1,Kxe=.9,Yxe=.8,Xxe=.17,yT=.1,bT=.999,Qxe=.9999,Jxe=.99,Zxe=/[\\\/_+.#"@\[\(\{&]/,eSe=/[\\\/_+.#"@\[\(\{&]/g,tSe=/[\s-]/,c8=/[\s-]/g;function BD(t,e,n,r,s,i,a){if(i===e.length)return s===t.length?Wz:Jxe;var o=`${s},${i}`;if(a[o]!==void 0)return a[o];for(var c=r.charAt(i),u=n.indexOf(c,s),f=0,l,d,m,p;u>=0;)l=BD(t,e,n,r,u+1,i+1,a),l>f&&(u===s?l*=Wz:Zxe.test(t.charAt(u-1))?(l*=Yxe,m=t.slice(s,u-1).match(eSe),m&&s>0&&(l*=Math.pow(bT,m.length))):tSe.test(t.charAt(u-1))?(l*=Kxe,p=t.slice(s,u-1).match(c8),p&&s>0&&(l*=Math.pow(bT,p.length))):(l*=Xxe,s>0&&(l*=Math.pow(bT,u-s))),t.charAt(u)!==e.charAt(i)&&(l*=Qxe)),(ll&&(l=d*yT)),l>f&&(f=l),u=n.indexOf(c,u+1);return a[o]=f,f}function Vz(t){return t.toLowerCase().replace(c8," ")}function nSe(t,e,n){return t=n&&n.length>0?`${t+" "+n.join(" ")}`:t,BD(t,e,Vz(t),Vz(e),0,0,{})}function xd(t,e,{checkForDefaultPrevented:n=!0}={}){return function(s){if(t==null||t(s),n===!1||!s.defaultPrevented)return e==null?void 0:e(s)}}function qz(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Kh(...t){return e=>{let n=!1;const r=t.map(s=>{const i=qz(s,e);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s{const{children:a,...o}=i,c=_.useMemo(()=>o,Object.values(o));return P.jsx(n.Provider,{value:c,children:a})};r.displayName=t+"Provider";function s(i){const a=_.useContext(n);if(a)return a;if(e!==void 0)return e;throw new Error(`\`${i}\` must be used within \`${t}\``)}return[r,s]}function sSe(t,e=[]){let n=[];function r(i,a){const o=_.createContext(a),c=n.length;n=[...n,a];const u=l=>{var g;const{scope:d,children:m,...p}=l,h=((g=d==null?void 0:d[t])==null?void 0:g[c])||o,y=_.useMemo(()=>p,Object.values(p));return P.jsx(h.Provider,{value:y,children:m})};u.displayName=i+"Provider";function f(l,d){var h;const m=((h=d==null?void 0:d[t])==null?void 0:h[c])||o,p=_.useContext(m);if(p)return p;if(a!==void 0)return a;throw new Error(`\`${l}\` must be used within \`${i}\``)}return[u,f]}const s=()=>{const i=n.map(a=>_.createContext(a));return function(o){const c=(o==null?void 0:o[t])||i;return _.useMemo(()=>({[`__scope${t}`]:{...o,[t]:c}}),[o,c])}};return s.scopeName=t,[r,iSe(s,...e)]}function iSe(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const a=r.reduce((o,{useScope:c,scopeName:u})=>{const l=c(i)[`__scope${u}`];return{...o,...l}},{});return _.useMemo(()=>({[`__scope${e.scopeName}`]:a}),[a])}};return n.scopeName=e.scopeName,n}const l1=globalThis!=null&&globalThis.document?_.useLayoutEffect:()=>{},oSe=X0.useId||(()=>{});let aSe=0;function Oc(t){const[e,n]=_.useState(oSe());return l1(()=>{n(r=>r??String(aSe++))},[t]),e?`radix-${e}`:""}function Yh(t){const e=_.useRef(t);return _.useEffect(()=>{e.current=t}),_.useMemo(()=>(...n)=>{var r;return(r=e.current)===null||r===void 0?void 0:r.call(e,...n)},[])}function lSe({prop:t,defaultProp:e,onChange:n=()=>{}}){const[r,s]=cSe({defaultProp:e,onChange:n}),i=t!==void 0,a=i?t:r,o=Yh(n),c=_.useCallback(u=>{if(i){const l=typeof u=="function"?u(t):u;l!==t&&o(l)}else s(u)},[i,t,s,o]);return[a,c]}function cSe({defaultProp:t,onChange:e}){const n=_.useState(t),[r]=n,s=_.useRef(r),i=Yh(e);return _.useEffect(()=>{s.current!==r&&(i(r),s.current=r)},[r,s,i]),n}var sI=_.forwardRef((t,e)=>{const{children:n,...r}=t,s=_.Children.toArray(n),i=s.find(dSe);if(i){const a=i.props.children,o=s.map(c=>c===i?_.Children.count(a)>1?_.Children.only(null):_.isValidElement(a)?a.props.children:null:c);return P.jsx(UD,{...r,ref:e,children:_.isValidElement(a)?_.cloneElement(a,void 0,o):null})}return P.jsx(UD,{...r,ref:e,children:n})});sI.displayName="Slot";var UD=_.forwardRef((t,e)=>{const{children:n,...r}=t;if(_.isValidElement(n)){const s=hSe(n),i=fSe(r,n.props);return n.type!==_.Fragment&&(i.ref=e?Kh(e,s):s),_.cloneElement(n,i)}return _.Children.count(n)>1?_.Children.only(null):null});UD.displayName="SlotClone";var uSe=({children:t})=>P.jsx(P.Fragment,{children:t});function dSe(t){return _.isValidElement(t)&&t.type===uSe}function fSe(t,e){const n={...e};for(const r in e){const s=t[r],i=e[r];/^on[A-Z]/.test(r)?s&&i?n[r]=(...o)=>{i(...o),s(...o)}:s&&(n[r]=s):r==="style"?n[r]={...s,...i}:r==="className"&&(n[r]=[s,i].filter(Boolean).join(" "))}return{...t,...n}}function hSe(t){var r,s;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var pSe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],ms=pSe.reduce((t,e)=>{const n=_.forwardRef((r,s)=>{const{asChild:i,...a}=r,o=i?sI:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),P.jsx(o,{...a,ref:s})});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{});function mSe(t,e){t&&Ns.flushSync(()=>t.dispatchEvent(e))}function gSe(t,e=globalThis==null?void 0:globalThis.document){const n=Yh(t);_.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return e.addEventListener("keydown",r),()=>e.removeEventListener("keydown",r)},[n,e])}var vSe="DismissableLayer",HD="dismissableLayer.update",ySe="dismissableLayer.pointerDownOutside",bSe="dismissableLayer.focusOutside",Gz,u8=_.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),d8=_.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:a,onDismiss:o,...c}=t,u=_.useContext(u8),[f,l]=_.useState(null),d=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=_.useState({}),p=mp(e,R=>l(R)),h=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=h.indexOf(y),v=f?h.indexOf(f):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,x=v>=g,A=xSe(R=>{const E=R.target,T=[...u.branches].some(D=>D.contains(E));!x||T||(s==null||s(R),a==null||a(R),R.defaultPrevented||o==null||o())},d),k=SSe(R=>{const E=R.target;[...u.branches].some(D=>D.contains(E))||(i==null||i(R),a==null||a(R),R.defaultPrevented||o==null||o())},d);return gSe(R=>{v===u.layers.size-1&&(r==null||r(R),!R.defaultPrevented&&o&&(R.preventDefault(),o()))},d),_.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Gz=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Kz(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=Gz)}},[f,d,n,u]),_.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Kz())},[f,u]),_.useEffect(()=>{const R=()=>m({});return document.addEventListener(HD,R),()=>document.removeEventListener(HD,R)},[]),P.jsx(ms.div,{...c,ref:p,style:{pointerEvents:w?x?"auto":"none":void 0,...t.style},onFocusCapture:xd(t.onFocusCapture,k.onFocusCapture),onBlurCapture:xd(t.onBlurCapture,k.onBlurCapture),onPointerDownCapture:xd(t.onPointerDownCapture,A.onPointerDownCapture)})});d8.displayName=vSe;var wSe="DismissableLayerBranch",_Se=_.forwardRef((t,e)=>{const n=_.useContext(u8),r=_.useRef(null),s=mp(e,r);return _.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),P.jsx(ms.div,{...t,ref:s})});_Se.displayName=wSe;function xSe(t,e=globalThis==null?void 0:globalThis.document){const n=Yh(t),r=_.useRef(!1),s=_.useRef(()=>{});return _.useEffect(()=>{const i=o=>{if(o.target&&!r.current){let c=function(){f8(ySe,n,u,{discrete:!0})};const u={originalEvent:o};o.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=c,e.addEventListener("click",s.current,{once:!0})):c()}else e.removeEventListener("click",s.current);r.current=!1},a=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),e.removeEventListener("pointerdown",i),e.removeEventListener("click",s.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function SSe(t,e=globalThis==null?void 0:globalThis.document){const n=Yh(t),r=_.useRef(!1);return _.useEffect(()=>{const s=i=>{i.target&&!r.current&&f8(bSe,n,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Kz(){const t=new CustomEvent(HD);document.dispatchEvent(t)}function f8(t,e,n,{discrete:r}){const s=n.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&s.addEventListener(t,e,{once:!0}),r?mSe(s,i):s.dispatchEvent(i)}var wT="focusScope.autoFocusOnMount",_T="focusScope.autoFocusOnUnmount",Yz={bubbles:!1,cancelable:!0},ESe="FocusScope",h8=_.forwardRef((t,e)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...a}=t,[o,c]=_.useState(null),u=Yh(s),f=Yh(i),l=_.useRef(null),d=mp(e,h=>c(h)),m=_.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;_.useEffect(()=>{if(r){let h=function(w){if(m.paused||!o)return;const x=w.target;o.contains(x)?l.current=x:wu(l.current,{select:!0})},y=function(w){if(m.paused||!o)return;const x=w.relatedTarget;x!==null&&(o.contains(x)||wu(l.current,{select:!0}))},g=function(w){if(document.activeElement===document.body)for(const A of w)A.removedNodes.length>0&&wu(o)};document.addEventListener("focusin",h),document.addEventListener("focusout",y);const v=new MutationObserver(g);return o&&v.observe(o,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",y),v.disconnect()}}},[r,o,m.paused]),_.useEffect(()=>{if(o){Qz.add(m);const h=document.activeElement;if(!o.contains(h)){const g=new CustomEvent(wT,Yz);o.addEventListener(wT,u),o.dispatchEvent(g),g.defaultPrevented||(CSe(kSe(p8(o)),{select:!0}),document.activeElement===h&&wu(o))}return()=>{o.removeEventListener(wT,u),setTimeout(()=>{const g=new CustomEvent(_T,Yz);o.addEventListener(_T,f),o.dispatchEvent(g),g.defaultPrevented||wu(h??document.body,{select:!0}),o.removeEventListener(_T,f),Qz.remove(m)},0)}}},[o,u,f,m]);const p=_.useCallback(h=>{if(!n&&!r||m.paused)return;const y=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,g=document.activeElement;if(y&&g){const v=h.currentTarget,[w,x]=ASe(v);w&&x?!h.shiftKey&&g===x?(h.preventDefault(),n&&wu(w,{select:!0})):h.shiftKey&&g===w&&(h.preventDefault(),n&&wu(x,{select:!0})):g===v&&h.preventDefault()}},[n,r,m.paused]);return P.jsx(ms.div,{tabIndex:-1,...a,ref:d,onKeyDown:p})});h8.displayName=ESe;function CSe(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(wu(r,{select:e}),document.activeElement!==n)return}function ASe(t){const e=p8(t),n=Xz(e,t),r=Xz(e.reverse(),t);return[n,r]}function p8(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function Xz(t,e){for(const n of t)if(!RSe(n,{upTo:e}))return n}function RSe(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function PSe(t){return t instanceof HTMLInputElement&&"select"in t}function wu(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&PSe(t)&&e&&t.select()}}var Qz=TSe();function TSe(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=Jz(t,e),t.unshift(e)},remove(e){var n;t=Jz(t,e),(n=t[0])==null||n.resume()}}}function Jz(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}function kSe(t){return t.filter(e=>e.tagName!=="A")}var DSe="Portal",m8=_.forwardRef((t,e)=>{var o;const{container:n,...r}=t,[s,i]=_.useState(!1);l1(()=>i(!0),[]);const a=n||s&&((o=globalThis==null?void 0:globalThis.document)==null?void 0:o.body);return a?t_.createPortal(P.jsx(ms.div,{...r,ref:e}),a):null});m8.displayName=DSe;function NSe(t,e){return _.useReducer((n,r)=>e[n][r]??n,t)}var oA=t=>{const{present:e,children:n}=t,r=MSe(e),s=typeof n=="function"?n({present:r.isPresent}):_.Children.only(n),i=mp(r.ref,OSe(s));return typeof n=="function"||r.isPresent?_.cloneElement(s,{ref:i}):null};oA.displayName="Presence";function MSe(t){const[e,n]=_.useState(),r=_.useRef({}),s=_.useRef(t),i=_.useRef("none"),a=t?"mounted":"unmounted",[o,c]=NSe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return _.useEffect(()=>{const u=oS(r.current);i.current=o==="mounted"?u:"none"},[o]),l1(()=>{const u=r.current,f=s.current;if(f!==t){const d=i.current,m=oS(u);t?c("MOUNT"):m==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(f&&d!==m?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,c]),l1(()=>{if(e){let u;const f=e.ownerDocument.defaultView??window,l=m=>{const h=oS(r.current).includes(m.animationName);if(m.target===e&&h&&(c("ANIMATION_END"),!s.current)){const y=e.style.animationFillMode;e.style.animationFillMode="forwards",u=f.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=y)})}},d=m=>{m.target===e&&(i.current=oS(r.current))};return e.addEventListener("animationstart",d),e.addEventListener("animationcancel",l),e.addEventListener("animationend",l),()=>{f.clearTimeout(u),e.removeEventListener("animationstart",d),e.removeEventListener("animationcancel",l),e.removeEventListener("animationend",l)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:_.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function oS(t){return(t==null?void 0:t.animationName)||"none"}function OSe(t){var r,s;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var xT=0;function LSe(){_.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??Zz()),document.body.insertAdjacentElement("beforeend",t[1]??Zz()),xT++,()=>{xT===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),xT--}},[])}function Zz(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var g8=_L(),ST=function(){},aA=_.forwardRef(function(t,e){var n=_.useRef(null),r=_.useState({onScrollCapture:ST,onWheelCapture:ST,onTouchMoveCapture:ST}),s=r[0],i=r[1],a=t.forwardProps,o=t.children,c=t.className,u=t.removeScrollBar,f=t.enabled,l=t.shards,d=t.sideCar,m=t.noIsolation,p=t.inert,h=t.allowPinchZoom,y=t.as,g=y===void 0?"div":y,v=t.gapMode,w=zC(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=d,A=wL([n,e]),k=fr(fr({},w),s);return _.createElement(_.Fragment,null,f&&_.createElement(x,{sideCar:g8,removeScrollBar:u,shards:l,noIsolation:m,inert:p,setCallbacks:i,allowPinchZoom:!!h,lockRef:n,gapMode:v}),a?_.cloneElement(_.Children.only(o),fr(fr({},k),{ref:A})):_.createElement(g,fr({},k,{className:c,ref:A}),o))});aA.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};aA.classNames={fullWidth:Im,zeroRight:Lm};var WD=!1;if(typeof window<"u")try{var aS=Object.defineProperty({},"passive",{get:function(){return WD=!0,!0}});window.addEventListener("test",aS,aS),window.removeEventListener("test",aS,aS)}catch{WD=!1}var Hp=WD?{passive:!1}:!1,ISe=function(t){return t.tagName==="TEXTAREA"},v8=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!ISe(t)&&n[e]==="visible")},$Se=function(t){return v8(t,"overflowY")},jSe=function(t){return v8(t,"overflowX")},eB=function(t,e){var n=e.ownerDocument,r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=y8(t,r);if(s){var i=b8(t,r),a=i[1],o=i[2];if(a>o)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},FSe=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},zSe=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},y8=function(t,e){return t==="v"?$Se(e):jSe(e)},b8=function(t,e){return t==="v"?FSe(e):zSe(e)},BSe=function(t,e){return t==="h"&&e==="rtl"?-1:1},USe=function(t,e,n,r,s){var i=BSe(t,window.getComputedStyle(e).direction),a=i*r,o=n.target,c=e.contains(o),u=!1,f=a>0,l=0,d=0;do{var m=b8(t,o),p=m[0],h=m[1],y=m[2],g=h-y-i*p;(p||g)&&y8(t,o)&&(l+=g,d+=p),o instanceof ShadowRoot?o=o.host:o=o.parentNode}while(!c&&o!==document.body||c&&(e.contains(o)||e===o));return(f&&Math.abs(l)<1||!f&&Math.abs(d)<1)&&(u=!0),u},lS=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},tB=function(t){return[t.deltaX,t.deltaY]},nB=function(t){return t&&"current"in t?t.current:t},HSe=function(t,e){return t[0]===e[0]&&t[1]===e[1]},WSe=function(t){return` +`)}}):null},Uxe=_.forwardRef(({active:t,payload:e,className:n,indicator:r="dot",hideLabel:s=!1,hideIndicator:i=!1,label:a,labelFormatter:o,labelClassName:c,formatter:u,color:f,nameKey:l,labelKey:d},m)=>{const{config:p}=r8(),h=_.useMemo(()=>{var A;if(s||!(e!=null&&e.length))return null;const[g]=e,v=`${d||g.dataKey||g.name||"value"}`,w=zD(p,g,v),x=!d&&typeof a=="string"?((A=p[a])==null?void 0:A.label)||a:w==null?void 0:w.label;return o?P.jsx("div",{className:ce("font-medium",c),children:o(x,e)}):x?P.jsx("div",{className:ce("font-medium",c),children:x}):null},[a,o,e,s,c,p,d]);if(!t||!(e!=null&&e.length))return null;const y=e.length===1&&r!=="dot";return P.jsxs("div",{ref:m,className:ce("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:h,P.jsx("div",{className:"grid gap-1.5",children:e.map((g,v)=>{const w=`${l||g.name||g.dataKey||"value"}`,x=zD(p,g,w),A=f||g.payload.fill||g.color;return P.jsx("div",{className:ce("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:u&&(g==null?void 0:g.value)!==void 0&&g.name?u(g.value,g.name,g,v,g.payload):P.jsxs(P.Fragment,{children:[x!=null&&x.icon?P.jsx(x.icon,{}):!i&&P.jsx("div",{className:ce("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":A,"--color-border":A}}),P.jsxs("div",{className:ce("flex flex-1 justify-between leading-none",y?"items-end":"items-center"),children:[P.jsxs("div",{className:"grid gap-1.5",children:[y?h:null,P.jsx("span",{className:"text-muted-foreground",children:(x==null?void 0:x.label)||g.name})]}),g.value&&P.jsx("span",{className:"font-mono font-medium tabular-nums text-foreground",children:g.value.toLocaleString()})]})]})},g.dataKey)})})]})});Uxe.displayName="ChartTooltip";const Hxe=_.forwardRef(({className:t,hideIcon:e=!1,payload:n,verticalAlign:r="bottom",nameKey:s},i)=>{const{config:a}=r8();return n!=null&&n.length?P.jsx("div",{ref:i,className:ce("flex items-center justify-center gap-4",r==="top"?"pb-3":"pt-3",t),children:n.map(o=>{const c=`${s||o.dataKey||"value"}`,u=zD(a,o,c);return P.jsxs("div",{className:ce("flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"),children:[u!=null&&u.icon&&!e?P.jsx(u.icon,{}):P.jsx("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:o.color}}),u==null?void 0:u.label]},o.value)})}):null});Hxe.displayName="ChartLegend";function zD(t,e,n){if(typeof e!="object"||e===null)return;const r="payload"in e&&typeof e.payload=="object"&&e.payload!==null?e.payload:void 0;let s=n;return n in e&&typeof e[n]=="string"?s=e[n]:r&&n in r&&typeof r[n]=="string"&&(s=r[n]),s in t?t[s]:t[n]}function Pv(t){const e=_.useRef({value:t,previous:t});return _.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}function v0(t){const[e,n]=_.useState(void 0);return Ln(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const i=s[0];let a,o;if("borderBoxSize"in i){const c=i.borderBoxSize,u=Array.isArray(c)?c[0]:c;a=u.inlineSize,o=u.blockSize}else a=t.offsetWidth,o=t.offsetHeight;n({width:a,height:o})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else n(void 0)},[t]),e}var rI="Checkbox",[Wxe,IHe]=Tn(rI),[Vxe,qxe]=Wxe(rI),s8=_.forwardRef((t,e)=>{const{__scopeCheckbox:n,name:r,checked:s,defaultChecked:i,required:a,disabled:o,value:c="on",onCheckedChange:u,...f}=t,[l,d]=_.useState(null),m=tt(e,w=>d(w)),p=_.useRef(!1),h=l?!!l.closest("form"):!0,[y=!1,g]=sr({prop:s,defaultProp:i,onChange:u}),v=_.useRef(y);return _.useEffect(()=>{const w=l==null?void 0:l.form;if(w){const x=()=>g(v.current);return w.addEventListener("reset",x),()=>w.removeEventListener("reset",x)}},[l,g]),P.jsxs(Vxe,{scope:n,state:y,disabled:o,children:[P.jsx(De.button,{type:"button",role:"checkbox","aria-checked":Lh(y)?"mixed":y,"aria-required":a,"data-state":a8(y),"data-disabled":o?"":void 0,disabled:o,value:c,...f,ref:m,onKeyDown:me(t.onKeyDown,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:me(t.onClick,w=>{g(x=>Lh(x)?!0:!x),h&&(p.current=w.isPropagationStopped(),p.current||w.stopPropagation())})}),h&&P.jsx(Gxe,{control:l,bubbles:!p.current,name:r,value:c,checked:y,required:a,disabled:o,style:{transform:"translateX(-100%)"}})]})});s8.displayName=rI;var i8="CheckboxIndicator",o8=_.forwardRef((t,e)=>{const{__scopeCheckbox:n,forceMount:r,...s}=t,i=qxe(i8,n);return P.jsx(Hn,{present:r||Lh(i.state)||i.state===!0,children:P.jsx(De.span,{"data-state":a8(i.state),"data-disabled":i.disabled?"":void 0,...s,ref:e,style:{pointerEvents:"none",...t.style}})})});o8.displayName=i8;var Gxe=t=>{const{control:e,checked:n,bubbles:r=!0,...s}=t,i=_.useRef(null),a=Pv(n),o=v0(e);return _.useEffect(()=>{const c=i.current,u=window.HTMLInputElement.prototype,l=Object.getOwnPropertyDescriptor(u,"checked").set;if(a!==n&&l){const d=new Event("click",{bubbles:r});c.indeterminate=Lh(n),l.call(c,Lh(n)?!1:n),c.dispatchEvent(d)}},[a,n,r]),P.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:Lh(n)?!1:n,...s,tabIndex:-1,ref:i,style:{...t.style,...o,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Lh(t){return t==="indeterminate"}function a8(t){return Lh(t)?"indeterminate":t?"checked":"unchecked"}var l8=s8,Kxe=o8;const Yxe=_.forwardRef(({className:t,...e},n)=>P.jsx(l8,{ref:n,className:ce("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",t),...e,children:P.jsx(Kxe,{className:ce("flex items-center justify-center text-current"),children:P.jsx(r0,{className:"h-4 w-4"})})}));Yxe.displayName=l8.displayName;var Wz=1,Xxe=.9,Qxe=.8,Jxe=.17,yT=.1,bT=.999,Zxe=.9999,eSe=.99,tSe=/[\\\/_+.#"@\[\(\{&]/,nSe=/[\\\/_+.#"@\[\(\{&]/g,rSe=/[\s-]/,c8=/[\s-]/g;function BD(t,e,n,r,s,i,a){if(i===e.length)return s===t.length?Wz:eSe;var o=`${s},${i}`;if(a[o]!==void 0)return a[o];for(var c=r.charAt(i),u=n.indexOf(c,s),f=0,l,d,m,p;u>=0;)l=BD(t,e,n,r,u+1,i+1,a),l>f&&(u===s?l*=Wz:tSe.test(t.charAt(u-1))?(l*=Qxe,m=t.slice(s,u-1).match(nSe),m&&s>0&&(l*=Math.pow(bT,m.length))):rSe.test(t.charAt(u-1))?(l*=Xxe,p=t.slice(s,u-1).match(c8),p&&s>0&&(l*=Math.pow(bT,p.length))):(l*=Jxe,s>0&&(l*=Math.pow(bT,u-s))),t.charAt(u)!==e.charAt(i)&&(l*=Zxe)),(ll&&(l=d*yT)),l>f&&(f=l),u=n.indexOf(c,u+1);return a[o]=f,f}function Vz(t){return t.toLowerCase().replace(c8," ")}function sSe(t,e,n){return t=n&&n.length>0?`${t+" "+n.join(" ")}`:t,BD(t,e,Vz(t),Vz(e),0,0,{})}function xd(t,e,{checkForDefaultPrevented:n=!0}={}){return function(s){if(t==null||t(s),n===!1||!s.defaultPrevented)return e==null?void 0:e(s)}}function qz(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Kh(...t){return e=>{let n=!1;const r=t.map(s=>{const i=qz(s,e);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s{const{children:a,...o}=i,c=_.useMemo(()=>o,Object.values(o));return P.jsx(n.Provider,{value:c,children:a})};r.displayName=t+"Provider";function s(i){const a=_.useContext(n);if(a)return a;if(e!==void 0)return e;throw new Error(`\`${i}\` must be used within \`${t}\``)}return[r,s]}function oSe(t,e=[]){let n=[];function r(i,a){const o=_.createContext(a),c=n.length;n=[...n,a];const u=l=>{var g;const{scope:d,children:m,...p}=l,h=((g=d==null?void 0:d[t])==null?void 0:g[c])||o,y=_.useMemo(()=>p,Object.values(p));return P.jsx(h.Provider,{value:y,children:m})};u.displayName=i+"Provider";function f(l,d){var h;const m=((h=d==null?void 0:d[t])==null?void 0:h[c])||o,p=_.useContext(m);if(p)return p;if(a!==void 0)return a;throw new Error(`\`${l}\` must be used within \`${i}\``)}return[u,f]}const s=()=>{const i=n.map(a=>_.createContext(a));return function(o){const c=(o==null?void 0:o[t])||i;return _.useMemo(()=>({[`__scope${t}`]:{...o,[t]:c}}),[o,c])}};return s.scopeName=t,[r,aSe(s,...e)]}function aSe(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const a=r.reduce((o,{useScope:c,scopeName:u})=>{const l=c(i)[`__scope${u}`];return{...o,...l}},{});return _.useMemo(()=>({[`__scope${e.scopeName}`]:a}),[a])}};return n.scopeName=e.scopeName,n}const lC=globalThis!=null&&globalThis.document?_.useLayoutEffect:()=>{},lSe=X_.useId||(()=>{});let cSe=0;function Oc(t){const[e,n]=_.useState(lSe());return lC(()=>{n(r=>r??String(cSe++))},[t]),e?`radix-${e}`:""}function Yh(t){const e=_.useRef(t);return _.useEffect(()=>{e.current=t}),_.useMemo(()=>(...n)=>{var r;return(r=e.current)===null||r===void 0?void 0:r.call(e,...n)},[])}function uSe({prop:t,defaultProp:e,onChange:n=()=>{}}){const[r,s]=dSe({defaultProp:e,onChange:n}),i=t!==void 0,a=i?t:r,o=Yh(n),c=_.useCallback(u=>{if(i){const l=typeof u=="function"?u(t):u;l!==t&&o(l)}else s(u)},[i,t,s,o]);return[a,c]}function dSe({defaultProp:t,onChange:e}){const n=_.useState(t),[r]=n,s=_.useRef(r),i=Yh(e);return _.useEffect(()=>{s.current!==r&&(i(r),s.current=r)},[r,s,i]),n}var sI=_.forwardRef((t,e)=>{const{children:n,...r}=t,s=_.Children.toArray(n),i=s.find(hSe);if(i){const a=i.props.children,o=s.map(c=>c===i?_.Children.count(a)>1?_.Children.only(null):_.isValidElement(a)?a.props.children:null:c);return P.jsx(UD,{...r,ref:e,children:_.isValidElement(a)?_.cloneElement(a,void 0,o):null})}return P.jsx(UD,{...r,ref:e,children:n})});sI.displayName="Slot";var UD=_.forwardRef((t,e)=>{const{children:n,...r}=t;if(_.isValidElement(n)){const s=mSe(n),i=pSe(r,n.props);return n.type!==_.Fragment&&(i.ref=e?Kh(e,s):s),_.cloneElement(n,i)}return _.Children.count(n)>1?_.Children.only(null):null});UD.displayName="SlotClone";var fSe=({children:t})=>P.jsx(P.Fragment,{children:t});function hSe(t){return _.isValidElement(t)&&t.type===fSe}function pSe(t,e){const n={...e};for(const r in e){const s=t[r],i=e[r];/^on[A-Z]/.test(r)?s&&i?n[r]=(...o)=>{i(...o),s(...o)}:s&&(n[r]=s):r==="style"?n[r]={...s,...i}:r==="className"&&(n[r]=[s,i].filter(Boolean).join(" "))}return{...t,...n}}function mSe(t){var r,s;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var gSe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],ms=gSe.reduce((t,e)=>{const n=_.forwardRef((r,s)=>{const{asChild:i,...a}=r,o=i?sI:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),P.jsx(o,{...a,ref:s})});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{});function vSe(t,e){t&&Ns.flushSync(()=>t.dispatchEvent(e))}function ySe(t,e=globalThis==null?void 0:globalThis.document){const n=Yh(t);_.useEffect(()=>{const r=s=>{s.key==="Escape"&&n(s)};return e.addEventListener("keydown",r),()=>e.removeEventListener("keydown",r)},[n,e])}var bSe="DismissableLayer",HD="dismissableLayer.update",wSe="dismissableLayer.pointerDownOutside",_Se="dismissableLayer.focusOutside",Gz,u8=_.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),d8=_.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:a,onDismiss:o,...c}=t,u=_.useContext(u8),[f,l]=_.useState(null),d=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=_.useState({}),p=mp(e,R=>l(R)),h=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=h.indexOf(y),v=f?h.indexOf(f):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,x=v>=g,A=ESe(R=>{const E=R.target,T=[...u.branches].some(D=>D.contains(E));!x||T||(s==null||s(R),a==null||a(R),R.defaultPrevented||o==null||o())},d),k=CSe(R=>{const E=R.target;[...u.branches].some(D=>D.contains(E))||(i==null||i(R),a==null||a(R),R.defaultPrevented||o==null||o())},d);return ySe(R=>{v===u.layers.size-1&&(r==null||r(R),!R.defaultPrevented&&o&&(R.preventDefault(),o()))},d),_.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Gz=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Kz(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=Gz)}},[f,d,n,u]),_.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Kz())},[f,u]),_.useEffect(()=>{const R=()=>m({});return document.addEventListener(HD,R),()=>document.removeEventListener(HD,R)},[]),P.jsx(ms.div,{...c,ref:p,style:{pointerEvents:w?x?"auto":"none":void 0,...t.style},onFocusCapture:xd(t.onFocusCapture,k.onFocusCapture),onBlurCapture:xd(t.onBlurCapture,k.onBlurCapture),onPointerDownCapture:xd(t.onPointerDownCapture,A.onPointerDownCapture)})});d8.displayName=bSe;var xSe="DismissableLayerBranch",SSe=_.forwardRef((t,e)=>{const n=_.useContext(u8),r=_.useRef(null),s=mp(e,r);return _.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),P.jsx(ms.div,{...t,ref:s})});SSe.displayName=xSe;function ESe(t,e=globalThis==null?void 0:globalThis.document){const n=Yh(t),r=_.useRef(!1),s=_.useRef(()=>{});return _.useEffect(()=>{const i=o=>{if(o.target&&!r.current){let c=function(){f8(wSe,n,u,{discrete:!0})};const u={originalEvent:o};o.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=c,e.addEventListener("click",s.current,{once:!0})):c()}else e.removeEventListener("click",s.current);r.current=!1},a=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),e.removeEventListener("pointerdown",i),e.removeEventListener("click",s.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function CSe(t,e=globalThis==null?void 0:globalThis.document){const n=Yh(t),r=_.useRef(!1);return _.useEffect(()=>{const s=i=>{i.target&&!r.current&&f8(_Se,n,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Kz(){const t=new CustomEvent(HD);document.dispatchEvent(t)}function f8(t,e,n,{discrete:r}){const s=n.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&s.addEventListener(t,e,{once:!0}),r?vSe(s,i):s.dispatchEvent(i)}var wT="focusScope.autoFocusOnMount",_T="focusScope.autoFocusOnUnmount",Yz={bubbles:!1,cancelable:!0},ASe="FocusScope",h8=_.forwardRef((t,e)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...a}=t,[o,c]=_.useState(null),u=Yh(s),f=Yh(i),l=_.useRef(null),d=mp(e,h=>c(h)),m=_.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;_.useEffect(()=>{if(r){let h=function(w){if(m.paused||!o)return;const x=w.target;o.contains(x)?l.current=x:wu(l.current,{select:!0})},y=function(w){if(m.paused||!o)return;const x=w.relatedTarget;x!==null&&(o.contains(x)||wu(l.current,{select:!0}))},g=function(w){if(document.activeElement===document.body)for(const A of w)A.removedNodes.length>0&&wu(o)};document.addEventListener("focusin",h),document.addEventListener("focusout",y);const v=new MutationObserver(g);return o&&v.observe(o,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",y),v.disconnect()}}},[r,o,m.paused]),_.useEffect(()=>{if(o){Qz.add(m);const h=document.activeElement;if(!o.contains(h)){const g=new CustomEvent(wT,Yz);o.addEventListener(wT,u),o.dispatchEvent(g),g.defaultPrevented||(RSe(NSe(p8(o)),{select:!0}),document.activeElement===h&&wu(o))}return()=>{o.removeEventListener(wT,u),setTimeout(()=>{const g=new CustomEvent(_T,Yz);o.addEventListener(_T,f),o.dispatchEvent(g),g.defaultPrevented||wu(h??document.body,{select:!0}),o.removeEventListener(_T,f),Qz.remove(m)},0)}}},[o,u,f,m]);const p=_.useCallback(h=>{if(!n&&!r||m.paused)return;const y=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,g=document.activeElement;if(y&&g){const v=h.currentTarget,[w,x]=PSe(v);w&&x?!h.shiftKey&&g===x?(h.preventDefault(),n&&wu(w,{select:!0})):h.shiftKey&&g===w&&(h.preventDefault(),n&&wu(x,{select:!0})):g===v&&h.preventDefault()}},[n,r,m.paused]);return P.jsx(ms.div,{tabIndex:-1,...a,ref:d,onKeyDown:p})});h8.displayName=ASe;function RSe(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(wu(r,{select:e}),document.activeElement!==n)return}function PSe(t){const e=p8(t),n=Xz(e,t),r=Xz(e.reverse(),t);return[n,r]}function p8(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function Xz(t,e){for(const n of t)if(!TSe(n,{upTo:e}))return n}function TSe(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function kSe(t){return t instanceof HTMLInputElement&&"select"in t}function wu(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&kSe(t)&&e&&t.select()}}var Qz=DSe();function DSe(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=Jz(t,e),t.unshift(e)},remove(e){var n;t=Jz(t,e),(n=t[0])==null||n.resume()}}}function Jz(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}function NSe(t){return t.filter(e=>e.tagName!=="A")}var MSe="Portal",m8=_.forwardRef((t,e)=>{var o;const{container:n,...r}=t,[s,i]=_.useState(!1);lC(()=>i(!0),[]);const a=n||s&&((o=globalThis==null?void 0:globalThis.document)==null?void 0:o.body);return a?t0.createPortal(P.jsx(ms.div,{...r,ref:e}),a):null});m8.displayName=MSe;function OSe(t,e){return _.useReducer((n,r)=>e[n][r]??n,t)}var oA=t=>{const{present:e,children:n}=t,r=LSe(e),s=typeof n=="function"?n({present:r.isPresent}):_.Children.only(n),i=mp(r.ref,ISe(s));return typeof n=="function"||r.isPresent?_.cloneElement(s,{ref:i}):null};oA.displayName="Presence";function LSe(t){const[e,n]=_.useState(),r=_.useRef({}),s=_.useRef(t),i=_.useRef("none"),a=t?"mounted":"unmounted",[o,c]=OSe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return _.useEffect(()=>{const u=oS(r.current);i.current=o==="mounted"?u:"none"},[o]),lC(()=>{const u=r.current,f=s.current;if(f!==t){const d=i.current,m=oS(u);t?c("MOUNT"):m==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(f&&d!==m?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,c]),lC(()=>{if(e){let u;const f=e.ownerDocument.defaultView??window,l=m=>{const h=oS(r.current).includes(m.animationName);if(m.target===e&&h&&(c("ANIMATION_END"),!s.current)){const y=e.style.animationFillMode;e.style.animationFillMode="forwards",u=f.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=y)})}},d=m=>{m.target===e&&(i.current=oS(r.current))};return e.addEventListener("animationstart",d),e.addEventListener("animationcancel",l),e.addEventListener("animationend",l),()=>{f.clearTimeout(u),e.removeEventListener("animationstart",d),e.removeEventListener("animationcancel",l),e.removeEventListener("animationend",l)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:_.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function oS(t){return(t==null?void 0:t.animationName)||"none"}function ISe(t){var r,s;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var xT=0;function $Se(){_.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??Zz()),document.body.insertAdjacentElement("beforeend",t[1]??Zz()),xT++,()=>{xT===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),xT--}},[])}function Zz(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var g8=_L(),ST=function(){},aA=_.forwardRef(function(t,e){var n=_.useRef(null),r=_.useState({onScrollCapture:ST,onWheelCapture:ST,onTouchMoveCapture:ST}),s=r[0],i=r[1],a=t.forwardProps,o=t.children,c=t.className,u=t.removeScrollBar,f=t.enabled,l=t.shards,d=t.sideCar,m=t.noIsolation,p=t.inert,h=t.allowPinchZoom,y=t.as,g=y===void 0?"div":y,v=t.gapMode,w=z1(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=d,A=wL([n,e]),k=fr(fr({},w),s);return _.createElement(_.Fragment,null,f&&_.createElement(x,{sideCar:g8,removeScrollBar:u,shards:l,noIsolation:m,inert:p,setCallbacks:i,allowPinchZoom:!!h,lockRef:n,gapMode:v}),a?_.cloneElement(_.Children.only(o),fr(fr({},k),{ref:A})):_.createElement(g,fr({},k,{className:c,ref:A}),o))});aA.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};aA.classNames={fullWidth:Im,zeroRight:Lm};var WD=!1;if(typeof window<"u")try{var aS=Object.defineProperty({},"passive",{get:function(){return WD=!0,!0}});window.addEventListener("test",aS,aS),window.removeEventListener("test",aS,aS)}catch{WD=!1}var Hp=WD?{passive:!1}:!1,jSe=function(t){return t.tagName==="TEXTAREA"},v8=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!jSe(t)&&n[e]==="visible")},FSe=function(t){return v8(t,"overflowY")},zSe=function(t){return v8(t,"overflowX")},eB=function(t,e){var n=e.ownerDocument,r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=y8(t,r);if(s){var i=b8(t,r),a=i[1],o=i[2];if(a>o)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},BSe=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},USe=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},y8=function(t,e){return t==="v"?FSe(e):zSe(e)},b8=function(t,e){return t==="v"?BSe(e):USe(e)},HSe=function(t,e){return t==="h"&&e==="rtl"?-1:1},WSe=function(t,e,n,r,s){var i=HSe(t,window.getComputedStyle(e).direction),a=i*r,o=n.target,c=e.contains(o),u=!1,f=a>0,l=0,d=0;do{var m=b8(t,o),p=m[0],h=m[1],y=m[2],g=h-y-i*p;(p||g)&&y8(t,o)&&(l+=g,d+=p),o instanceof ShadowRoot?o=o.host:o=o.parentNode}while(!c&&o!==document.body||c&&(e.contains(o)||e===o));return(f&&Math.abs(l)<1||!f&&Math.abs(d)<1)&&(u=!0),u},lS=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},tB=function(t){return[t.deltaX,t.deltaY]},nB=function(t){return t&&"current"in t?t.current:t},VSe=function(t,e){return t[0]===e[0]&&t[1]===e[1]},qSe=function(t){return` .block-interactivity-`.concat(t,` {pointer-events: none;} .allow-interactivity-`).concat(t,` {pointer-events: all;} -`)},VSe=0,Wp=[];function qSe(t){var e=_.useRef([]),n=_.useRef([0,0]),r=_.useRef(),s=_.useState(VSe++)[0],i=_.useState(UC)[0],a=_.useRef(t);_.useEffect(function(){a.current=t},[t]),_.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var h=bL([t.lockRef.current],(t.shards||[]).map(nB),!0).filter(Boolean);return h.forEach(function(y){return y.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),h.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var o=_.useCallback(function(h,y){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!a.current.allowPinchZoom;var g=lS(h),v=n.current,w="deltaX"in h?h.deltaX:v[0]-g[0],x="deltaY"in h?h.deltaY:v[1]-g[1],A,k=h.target,R=Math.abs(w)>Math.abs(x)?"h":"v";if("touches"in h&&R==="h"&&k.type==="range")return!1;var E=eB(R,k);if(!E)return!0;if(E?A=R:(A=R==="v"?"h":"v",E=eB(R,k)),!E)return!1;if(!r.current&&"changedTouches"in h&&(w||x)&&(r.current=A),!A)return!0;var T=r.current||A;return USe(T,y,h,T==="h"?w:x)},[]),c=_.useCallback(function(h){var y=h;if(!(!Wp.length||Wp[Wp.length-1]!==i)){var g="deltaY"in y?tB(y):lS(y),v=e.current.filter(function(A){return A.name===y.type&&(A.target===y.target||y.target===A.shadowParent)&&HSe(A.delta,g)})[0];if(v&&v.should){y.cancelable&&y.preventDefault();return}if(!v){var w=(a.current.shards||[]).map(nB).filter(Boolean).filter(function(A){return A.contains(y.target)}),x=w.length>0?o(y,w[0]):!a.current.noIsolation;x&&y.cancelable&&y.preventDefault()}}},[]),u=_.useCallback(function(h,y,g,v){var w={name:h,delta:y,target:g,should:v,shadowParent:GSe(g)};e.current.push(w),setTimeout(function(){e.current=e.current.filter(function(x){return x!==w})},1)},[]),f=_.useCallback(function(h){n.current=lS(h),r.current=void 0},[]),l=_.useCallback(function(h){u(h.type,tB(h),h.target,o(h,t.lockRef.current))},[]),d=_.useCallback(function(h){u(h.type,lS(h),h.target,o(h,t.lockRef.current))},[]);_.useEffect(function(){return Wp.push(i),t.setCallbacks({onScrollCapture:l,onWheelCapture:l,onTouchMoveCapture:d}),document.addEventListener("wheel",c,Hp),document.addEventListener("touchmove",c,Hp),document.addEventListener("touchstart",f,Hp),function(){Wp=Wp.filter(function(h){return h!==i}),document.removeEventListener("wheel",c,Hp),document.removeEventListener("touchmove",c,Hp),document.removeEventListener("touchstart",f,Hp)}},[]);var m=t.removeScrollBar,p=t.inert;return _.createElement(_.Fragment,null,p?_.createElement(i,{styles:WSe(s)}):null,m?_.createElement(SL,{gapMode:t.gapMode}):null)}function GSe(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const KSe=xL(g8,qSe);var w8=_.forwardRef(function(t,e){return _.createElement(aA,fr({},t,{ref:e,sideCar:KSe}))});w8.classNames=aA.classNames;var iI="Dialog",[_8,LHe]=sSe(iI),[YSe,La]=_8(iI),x8=t=>{const{__scopeDialog:e,children:n,open:r,defaultOpen:s,onOpenChange:i,modal:a=!0}=t,o=_.useRef(null),c=_.useRef(null),[u=!1,f]=lSe({prop:r,defaultProp:s,onChange:i});return P.jsx(YSe,{scope:e,triggerRef:o,contentRef:c,contentId:Oc(),titleId:Oc(),descriptionId:Oc(),open:u,onOpenChange:f,onOpenToggle:_.useCallback(()=>f(l=>!l),[f]),modal:a,children:n})};x8.displayName=iI;var S8="DialogTrigger",XSe=_.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=La(S8,n),i=mp(e,s.triggerRef);return P.jsx(ms.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":lI(s.open),...r,ref:i,onClick:xd(t.onClick,s.onOpenToggle)})});XSe.displayName=S8;var oI="DialogPortal",[QSe,E8]=_8(oI,{forceMount:void 0}),C8=t=>{const{__scopeDialog:e,forceMount:n,children:r,container:s}=t,i=La(oI,e);return P.jsx(QSe,{scope:e,forceMount:n,children:_.Children.map(r,a=>P.jsx(oA,{present:n||i.open,children:P.jsx(m8,{asChild:!0,container:s,children:a})}))})};C8.displayName=oI;var c1="DialogOverlay",A8=_.forwardRef((t,e)=>{const n=E8(c1,t.__scopeDialog),{forceMount:r=n.forceMount,...s}=t,i=La(c1,t.__scopeDialog);return i.modal?P.jsx(oA,{present:r||i.open,children:P.jsx(JSe,{...s,ref:e})}):null});A8.displayName=c1;var JSe=_.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=La(c1,n);return P.jsx(w8,{as:sI,allowPinchZoom:!0,shards:[s.contentRef],children:P.jsx(ms.div,{"data-state":lI(s.open),...r,ref:e,style:{pointerEvents:"auto",...r.style}})})}),Xh="DialogContent",R8=_.forwardRef((t,e)=>{const n=E8(Xh,t.__scopeDialog),{forceMount:r=n.forceMount,...s}=t,i=La(Xh,t.__scopeDialog);return P.jsx(oA,{present:r||i.open,children:i.modal?P.jsx(ZSe,{...s,ref:e}):P.jsx(eEe,{...s,ref:e})})});R8.displayName=Xh;var ZSe=_.forwardRef((t,e)=>{const n=La(Xh,t.__scopeDialog),r=_.useRef(null),s=mp(e,n.contentRef,r);return _.useEffect(()=>{const i=r.current;if(i)return Ev(i)},[]),P.jsx(P8,{...t,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:xd(t.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:xd(t.onPointerDownOutside,i=>{const a=i.detail.originalEvent,o=a.button===0&&a.ctrlKey===!0;(a.button===2||o)&&i.preventDefault()}),onFocusOutside:xd(t.onFocusOutside,i=>i.preventDefault())})}),eEe=_.forwardRef((t,e)=>{const n=La(Xh,t.__scopeDialog),r=_.useRef(!1),s=_.useRef(!1);return P.jsx(P8,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a,o;(a=t.onCloseAutoFocus)==null||a.call(t,i),i.defaultPrevented||(r.current||(o=n.triggerRef.current)==null||o.focus(),i.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:i=>{var c,u;(c=t.onInteractOutside)==null||c.call(t,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const a=i.target;((u=n.triggerRef.current)==null?void 0:u.contains(a))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),P8=_.forwardRef((t,e)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:i,...a}=t,o=La(Xh,n),c=_.useRef(null),u=mp(e,c);return LSe(),P.jsxs(P.Fragment,{children:[P.jsx(h8,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:i,children:P.jsx(d8,{role:"dialog",id:o.contentId,"aria-describedby":o.descriptionId,"aria-labelledby":o.titleId,"data-state":lI(o.open),...a,ref:u,onDismiss:()=>o.onOpenChange(!1)})}),P.jsxs(P.Fragment,{children:[P.jsx(sEe,{titleId:o.titleId}),P.jsx(oEe,{contentRef:c,descriptionId:o.descriptionId})]})]})}),aI="DialogTitle",tEe=_.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=La(aI,n);return P.jsx(ms.h2,{id:s.titleId,...r,ref:e})});tEe.displayName=aI;var T8="DialogDescription",nEe=_.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=La(T8,n);return P.jsx(ms.p,{id:s.descriptionId,...r,ref:e})});nEe.displayName=T8;var k8="DialogClose",rEe=_.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=La(k8,n);return P.jsx(ms.button,{type:"button",...r,ref:e,onClick:xd(t.onClick,()=>s.onOpenChange(!1))})});rEe.displayName=k8;function lI(t){return t?"open":"closed"}var D8="DialogTitleWarning",[IHe,N8]=rSe(D8,{contentName:Xh,titleName:aI,docsSlug:"dialog"}),sEe=({titleId:t})=>{const e=N8(D8),n=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users. +`)},GSe=0,Wp=[];function KSe(t){var e=_.useRef([]),n=_.useRef([0,0]),r=_.useRef(),s=_.useState(GSe++)[0],i=_.useState(U1)[0],a=_.useRef(t);_.useEffect(function(){a.current=t},[t]),_.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var h=bL([t.lockRef.current],(t.shards||[]).map(nB),!0).filter(Boolean);return h.forEach(function(y){return y.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),h.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var o=_.useCallback(function(h,y){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!a.current.allowPinchZoom;var g=lS(h),v=n.current,w="deltaX"in h?h.deltaX:v[0]-g[0],x="deltaY"in h?h.deltaY:v[1]-g[1],A,k=h.target,R=Math.abs(w)>Math.abs(x)?"h":"v";if("touches"in h&&R==="h"&&k.type==="range")return!1;var E=eB(R,k);if(!E)return!0;if(E?A=R:(A=R==="v"?"h":"v",E=eB(R,k)),!E)return!1;if(!r.current&&"changedTouches"in h&&(w||x)&&(r.current=A),!A)return!0;var T=r.current||A;return WSe(T,y,h,T==="h"?w:x)},[]),c=_.useCallback(function(h){var y=h;if(!(!Wp.length||Wp[Wp.length-1]!==i)){var g="deltaY"in y?tB(y):lS(y),v=e.current.filter(function(A){return A.name===y.type&&(A.target===y.target||y.target===A.shadowParent)&&VSe(A.delta,g)})[0];if(v&&v.should){y.cancelable&&y.preventDefault();return}if(!v){var w=(a.current.shards||[]).map(nB).filter(Boolean).filter(function(A){return A.contains(y.target)}),x=w.length>0?o(y,w[0]):!a.current.noIsolation;x&&y.cancelable&&y.preventDefault()}}},[]),u=_.useCallback(function(h,y,g,v){var w={name:h,delta:y,target:g,should:v,shadowParent:YSe(g)};e.current.push(w),setTimeout(function(){e.current=e.current.filter(function(x){return x!==w})},1)},[]),f=_.useCallback(function(h){n.current=lS(h),r.current=void 0},[]),l=_.useCallback(function(h){u(h.type,tB(h),h.target,o(h,t.lockRef.current))},[]),d=_.useCallback(function(h){u(h.type,lS(h),h.target,o(h,t.lockRef.current))},[]);_.useEffect(function(){return Wp.push(i),t.setCallbacks({onScrollCapture:l,onWheelCapture:l,onTouchMoveCapture:d}),document.addEventListener("wheel",c,Hp),document.addEventListener("touchmove",c,Hp),document.addEventListener("touchstart",f,Hp),function(){Wp=Wp.filter(function(h){return h!==i}),document.removeEventListener("wheel",c,Hp),document.removeEventListener("touchmove",c,Hp),document.removeEventListener("touchstart",f,Hp)}},[]);var m=t.removeScrollBar,p=t.inert;return _.createElement(_.Fragment,null,p?_.createElement(i,{styles:qSe(s)}):null,m?_.createElement(SL,{gapMode:t.gapMode}):null)}function YSe(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const XSe=xL(g8,KSe);var w8=_.forwardRef(function(t,e){return _.createElement(aA,fr({},t,{ref:e,sideCar:XSe}))});w8.classNames=aA.classNames;var iI="Dialog",[_8,$He]=oSe(iI),[QSe,La]=_8(iI),x8=t=>{const{__scopeDialog:e,children:n,open:r,defaultOpen:s,onOpenChange:i,modal:a=!0}=t,o=_.useRef(null),c=_.useRef(null),[u=!1,f]=uSe({prop:r,defaultProp:s,onChange:i});return P.jsx(QSe,{scope:e,triggerRef:o,contentRef:c,contentId:Oc(),titleId:Oc(),descriptionId:Oc(),open:u,onOpenChange:f,onOpenToggle:_.useCallback(()=>f(l=>!l),[f]),modal:a,children:n})};x8.displayName=iI;var S8="DialogTrigger",JSe=_.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=La(S8,n),i=mp(e,s.triggerRef);return P.jsx(ms.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":lI(s.open),...r,ref:i,onClick:xd(t.onClick,s.onOpenToggle)})});JSe.displayName=S8;var oI="DialogPortal",[ZSe,E8]=_8(oI,{forceMount:void 0}),C8=t=>{const{__scopeDialog:e,forceMount:n,children:r,container:s}=t,i=La(oI,e);return P.jsx(ZSe,{scope:e,forceMount:n,children:_.Children.map(r,a=>P.jsx(oA,{present:n||i.open,children:P.jsx(m8,{asChild:!0,container:s,children:a})}))})};C8.displayName=oI;var cC="DialogOverlay",A8=_.forwardRef((t,e)=>{const n=E8(cC,t.__scopeDialog),{forceMount:r=n.forceMount,...s}=t,i=La(cC,t.__scopeDialog);return i.modal?P.jsx(oA,{present:r||i.open,children:P.jsx(eEe,{...s,ref:e})}):null});A8.displayName=cC;var eEe=_.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=La(cC,n);return P.jsx(w8,{as:sI,allowPinchZoom:!0,shards:[s.contentRef],children:P.jsx(ms.div,{"data-state":lI(s.open),...r,ref:e,style:{pointerEvents:"auto",...r.style}})})}),Xh="DialogContent",R8=_.forwardRef((t,e)=>{const n=E8(Xh,t.__scopeDialog),{forceMount:r=n.forceMount,...s}=t,i=La(Xh,t.__scopeDialog);return P.jsx(oA,{present:r||i.open,children:i.modal?P.jsx(tEe,{...s,ref:e}):P.jsx(nEe,{...s,ref:e})})});R8.displayName=Xh;var tEe=_.forwardRef((t,e)=>{const n=La(Xh,t.__scopeDialog),r=_.useRef(null),s=mp(e,n.contentRef,r);return _.useEffect(()=>{const i=r.current;if(i)return Ev(i)},[]),P.jsx(P8,{...t,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:xd(t.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:xd(t.onPointerDownOutside,i=>{const a=i.detail.originalEvent,o=a.button===0&&a.ctrlKey===!0;(a.button===2||o)&&i.preventDefault()}),onFocusOutside:xd(t.onFocusOutside,i=>i.preventDefault())})}),nEe=_.forwardRef((t,e)=>{const n=La(Xh,t.__scopeDialog),r=_.useRef(!1),s=_.useRef(!1);return P.jsx(P8,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a,o;(a=t.onCloseAutoFocus)==null||a.call(t,i),i.defaultPrevented||(r.current||(o=n.triggerRef.current)==null||o.focus(),i.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:i=>{var c,u;(c=t.onInteractOutside)==null||c.call(t,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const a=i.target;((u=n.triggerRef.current)==null?void 0:u.contains(a))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),P8=_.forwardRef((t,e)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:i,...a}=t,o=La(Xh,n),c=_.useRef(null),u=mp(e,c);return $Se(),P.jsxs(P.Fragment,{children:[P.jsx(h8,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:i,children:P.jsx(d8,{role:"dialog",id:o.contentId,"aria-describedby":o.descriptionId,"aria-labelledby":o.titleId,"data-state":lI(o.open),...a,ref:u,onDismiss:()=>o.onOpenChange(!1)})}),P.jsxs(P.Fragment,{children:[P.jsx(oEe,{titleId:o.titleId}),P.jsx(lEe,{contentRef:c,descriptionId:o.descriptionId})]})]})}),aI="DialogTitle",rEe=_.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=La(aI,n);return P.jsx(ms.h2,{id:s.titleId,...r,ref:e})});rEe.displayName=aI;var T8="DialogDescription",sEe=_.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=La(T8,n);return P.jsx(ms.p,{id:s.descriptionId,...r,ref:e})});sEe.displayName=T8;var k8="DialogClose",iEe=_.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=La(k8,n);return P.jsx(ms.button,{type:"button",...r,ref:e,onClick:xd(t.onClick,()=>s.onOpenChange(!1))})});iEe.displayName=k8;function lI(t){return t?"open":"closed"}var D8="DialogTitleWarning",[jHe,N8]=iSe(D8,{contentName:Xh,titleName:aI,docsSlug:"dialog"}),oEe=({titleId:t})=>{const e=N8(D8),n=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users. If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component. -For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return _.useEffect(()=>{t&&(document.getElementById(t)||console.error(n))},[n,t]),null},iEe="DialogDescriptionWarning",oEe=({contentRef:t,descriptionId:e})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${N8(iEe).contentName}}.`;return _.useEffect(()=>{var i;const s=(i=t.current)==null?void 0:i.getAttribute("aria-describedby");e&&s&&(document.getElementById(e)||console.warn(r))},[r,t,e]),null},aEe=x8,lEe=C8,cEe=A8,uEe=R8,by='[cmdk-group=""]',ET='[cmdk-group-items=""]',dEe='[cmdk-group-heading=""]',M8='[cmdk-item=""]',rB=`${M8}:not([aria-disabled="true"])`,VD="cmdk-item-select",tm="data-value",fEe=(t,e,n)=>nSe(t,e,n),O8=_.createContext(void 0),y_=()=>_.useContext(O8),L8=_.createContext(void 0),cI=()=>_.useContext(L8),I8=_.createContext(void 0),$8=_.forwardRef((t,e)=>{let n=nm(()=>{var G,K;return{search:"",value:(K=(G=t.value)!=null?G:t.defaultValue)!=null?K:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=nm(()=>new Set),s=nm(()=>new Map),i=nm(()=>new Map),a=nm(()=>new Set),o=j8(t),{label:c,children:u,value:f,onValueChange:l,filter:d,shouldFilter:m,loop:p,disablePointerSelection:h=!1,vimBindings:y=!0,...g}=t,v=Oc(),w=Oc(),x=Oc(),A=_.useRef(null),k=SEe();Qh(()=>{if(f!==void 0){let G=f.trim();n.current.value=G,R.emit()}},[f]),Qh(()=>{k(6,I)},[]);let R=_.useMemo(()=>({subscribe:G=>(a.current.add(G),()=>a.current.delete(G)),snapshot:()=>n.current,setState:(G,K,J)=>{var ue,de,ie,be;if(!Object.is(n.current[G],K)){if(n.current[G]=K,G==="search")L(),D(),k(1,M);else if(G==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let Ae=document.getElementById(x);Ae?Ae.focus():(ue=document.getElementById(v))==null||ue.focus()}if(k(7,()=>{var Ae;n.current.selectedItemId=(Ae=j())==null?void 0:Ae.id,R.emit()}),J||k(5,I),((de=o.current)==null?void 0:de.value)!==void 0){let Ae=K??"";(be=(ie=o.current).onValueChange)==null||be.call(ie,Ae);return}}R.emit()}},emit:()=>{a.current.forEach(G=>G())}}),[]),E=_.useMemo(()=>({value:(G,K,J)=>{var ue;K!==((ue=i.current.get(G))==null?void 0:ue.value)&&(i.current.set(G,{value:K,keywords:J}),n.current.filtered.items.set(G,T(K,J)),k(2,()=>{D(),R.emit()}))},item:(G,K)=>(r.current.add(G),K&&(s.current.has(K)?s.current.get(K).add(G):s.current.set(K,new Set([G]))),k(3,()=>{L(),D(),n.current.value||M(),R.emit()}),()=>{i.current.delete(G),r.current.delete(G),n.current.filtered.items.delete(G);let J=j();k(4,()=>{L(),(J==null?void 0:J.getAttribute("id"))===G&&M(),R.emit()})}),group:G=>(s.current.has(G)||s.current.set(G,new Set),()=>{i.current.delete(G),s.current.delete(G)}),filter:()=>o.current.shouldFilter,label:c||t["aria-label"],getDisablePointerSelection:()=>o.current.disablePointerSelection,listId:v,inputId:x,labelId:w,listInnerRef:A}),[]);function T(G,K){var J,ue;let de=(ue=(J=o.current)==null?void 0:J.filter)!=null?ue:fEe;return G?de(G,n.current.search,K):0}function D(){if(!n.current.search||o.current.shouldFilter===!1)return;let G=n.current.filtered.items,K=[];n.current.filtered.groups.forEach(ue=>{let de=s.current.get(ue),ie=0;de.forEach(be=>{let Ae=G.get(be);ie=Math.max(Ae,ie)}),K.push([ue,ie])});let J=A.current;U().sort((ue,de)=>{var ie,be;let Ae=ue.getAttribute("id"),_e=de.getAttribute("id");return((ie=G.get(_e))!=null?ie:0)-((be=G.get(Ae))!=null?be:0)}).forEach(ue=>{let de=ue.closest(ET);de?de.appendChild(ue.parentElement===de?ue:ue.closest(`${ET} > *`)):J.appendChild(ue.parentElement===J?ue:ue.closest(`${ET} > *`))}),K.sort((ue,de)=>de[1]-ue[1]).forEach(ue=>{var de;let ie=(de=A.current)==null?void 0:de.querySelector(`${by}[${tm}="${encodeURIComponent(ue[0])}"]`);ie==null||ie.parentElement.appendChild(ie)})}function M(){let G=U().find(J=>J.getAttribute("aria-disabled")!=="true"),K=G==null?void 0:G.getAttribute(tm);R.setState("value",K||void 0)}function L(){var G,K,J,ue;if(!n.current.search||o.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let de=0;for(let ie of r.current){let be=(K=(G=i.current.get(ie))==null?void 0:G.value)!=null?K:"",Ae=(ue=(J=i.current.get(ie))==null?void 0:J.keywords)!=null?ue:[],_e=T(be,Ae);n.current.filtered.items.set(ie,_e),_e>0&&de++}for(let[ie,be]of s.current)for(let Ae of be)if(n.current.filtered.items.get(Ae)>0){n.current.filtered.groups.add(ie);break}n.current.filtered.count=de}function I(){var G,K,J;let ue=j();ue&&(((G=ue.parentElement)==null?void 0:G.firstChild)===ue&&((J=(K=ue.closest(by))==null?void 0:K.querySelector(dEe))==null||J.scrollIntoView({block:"nearest"})),ue.scrollIntoView({block:"nearest"}))}function j(){var G;return(G=A.current)==null?void 0:G.querySelector(`${M8}[aria-selected="true"]`)}function U(){var G;return Array.from(((G=A.current)==null?void 0:G.querySelectorAll(rB))||[])}function Y(G){let K=U()[G];K&&R.setState("value",K.getAttribute(tm))}function W(G){var K;let J=j(),ue=U(),de=ue.findIndex(be=>be===J),ie=ue[de+G];(K=o.current)!=null&&K.loop&&(ie=de+G<0?ue[ue.length-1]:de+G===ue.length?ue[0]:ue[de+G]),ie&&R.setState("value",ie.getAttribute(tm))}function H(G){let K=j(),J=K==null?void 0:K.closest(by),ue;for(;J&&!ue;)J=G>0?_Ee(J,by):xEe(J,by),ue=J==null?void 0:J.querySelector(rB);ue?R.setState("value",ue.getAttribute(tm)):W(G)}let ee=()=>Y(U().length-1),re=G=>{G.preventDefault(),G.metaKey?ee():G.altKey?H(1):W(1)},X=G=>{G.preventDefault(),G.metaKey?Y(0):G.altKey?H(-1):W(-1)};return _.createElement(ms.div,{ref:e,tabIndex:-1,...g,"cmdk-root":"",onKeyDown:G=>{var K;(K=g.onKeyDown)==null||K.call(g,G);let J=G.nativeEvent.isComposing||G.keyCode===229;if(!(G.defaultPrevented||J))switch(G.key){case"n":case"j":{y&&G.ctrlKey&&re(G);break}case"ArrowDown":{re(G);break}case"p":case"k":{y&&G.ctrlKey&&X(G);break}case"ArrowUp":{X(G);break}case"Home":{G.preventDefault(),Y(0);break}case"End":{G.preventDefault(),ee();break}case"Enter":{G.preventDefault();let ue=j();if(ue){let de=new Event(VD);ue.dispatchEvent(de)}}}}},_.createElement("label",{"cmdk-label":"",htmlFor:E.inputId,id:E.labelId,style:CEe},c),lA(t,G=>_.createElement(L8.Provider,{value:R},_.createElement(O8.Provider,{value:E},G))))}),hEe=_.forwardRef((t,e)=>{var n,r;let s=Oc(),i=_.useRef(null),a=_.useContext(I8),o=y_(),c=j8(t),u=(r=(n=c.current)==null?void 0:n.forceMount)!=null?r:a==null?void 0:a.forceMount;Qh(()=>{if(!u)return o.item(s,a==null?void 0:a.id)},[u]);let f=F8(s,i,[t.value,t.children,i],t.keywords),l=cI(),d=Ad(k=>k.value&&k.value===f.current),m=Ad(k=>u||o.filter()===!1?!0:k.search?k.filtered.items.get(s)>0:!0);_.useEffect(()=>{let k=i.current;if(!(!k||t.disabled))return k.addEventListener(VD,p),()=>k.removeEventListener(VD,p)},[m,t.onSelect,t.disabled]);function p(){var k,R;h(),(R=(k=c.current).onSelect)==null||R.call(k,f.current)}function h(){l.setState("value",f.current,!0)}if(!m)return null;let{disabled:y,value:g,onSelect:v,forceMount:w,keywords:x,...A}=t;return _.createElement(ms.div,{ref:Kh(i,e),...A,id:s,"cmdk-item":"",role:"option","aria-disabled":!!y,"aria-selected":!!d,"data-disabled":!!y,"data-selected":!!d,onPointerMove:y||o.getDisablePointerSelection()?void 0:h,onClick:y?void 0:p},t.children)}),pEe=_.forwardRef((t,e)=>{let{heading:n,children:r,forceMount:s,...i}=t,a=Oc(),o=_.useRef(null),c=_.useRef(null),u=Oc(),f=y_(),l=Ad(m=>s||f.filter()===!1?!0:m.search?m.filtered.groups.has(a):!0);Qh(()=>f.group(a),[]),F8(a,o,[t.value,t.heading,c]);let d=_.useMemo(()=>({id:a,forceMount:s}),[s]);return _.createElement(ms.div,{ref:Kh(o,e),...i,"cmdk-group":"",role:"presentation",hidden:l?void 0:!0},n&&_.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),lA(t,m=>_.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},_.createElement(I8.Provider,{value:d},m))))}),mEe=_.forwardRef((t,e)=>{let{alwaysRender:n,...r}=t,s=_.useRef(null),i=Ad(a=>!a.search);return!n&&!i?null:_.createElement(ms.div,{ref:Kh(s,e),...r,"cmdk-separator":"",role:"separator"})}),gEe=_.forwardRef((t,e)=>{let{onValueChange:n,...r}=t,s=t.value!=null,i=cI(),a=Ad(u=>u.search),o=Ad(u=>u.selectedItemId),c=y_();return _.useEffect(()=>{t.value!=null&&i.setState("search",t.value)},[t.value]),_.createElement(ms.input,{ref:e,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":o,id:c.inputId,type:"text",value:s?t.value:a,onChange:u=>{s||i.setState("search",u.target.value),n==null||n(u.target.value)}})}),vEe=_.forwardRef((t,e)=>{let{children:n,label:r="Suggestions",...s}=t,i=_.useRef(null),a=_.useRef(null),o=Ad(u=>u.selectedItemId),c=y_();return _.useEffect(()=>{if(a.current&&i.current){let u=a.current,f=i.current,l,d=new ResizeObserver(()=>{l=requestAnimationFrame(()=>{let m=u.offsetHeight;f.style.setProperty("--cmdk-list-height",m.toFixed(1)+"px")})});return d.observe(u),()=>{cancelAnimationFrame(l),d.unobserve(u)}}},[]),_.createElement(ms.div,{ref:Kh(i,e),...s,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":o,"aria-label":r,id:c.listId},lA(t,u=>_.createElement("div",{ref:Kh(a,c.listInnerRef),"cmdk-list-sizer":""},u)))}),yEe=_.forwardRef((t,e)=>{let{open:n,onOpenChange:r,overlayClassName:s,contentClassName:i,container:a,...o}=t;return _.createElement(aEe,{open:n,onOpenChange:r},_.createElement(lEe,{container:a},_.createElement(cEe,{"cmdk-overlay":"",className:s}),_.createElement(uEe,{"aria-label":t.label,"cmdk-dialog":"",className:i},_.createElement($8,{ref:e,...o}))))}),bEe=_.forwardRef((t,e)=>Ad(n=>n.filtered.count===0)?_.createElement(ms.div,{ref:e,...t,"cmdk-empty":"",role:"presentation"}):null),wEe=_.forwardRef((t,e)=>{let{progress:n,children:r,label:s="Loading...",...i}=t;return _.createElement(ms.div,{ref:e,...i,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":s},lA(t,a=>_.createElement("div",{"aria-hidden":!0},a)))}),Ti=Object.assign($8,{List:vEe,Item:hEe,Input:gEe,Group:pEe,Separator:mEe,Dialog:yEe,Empty:bEe,Loading:wEe});function _Ee(t,e){let n=t.nextElementSibling;for(;n;){if(n.matches(e))return n;n=n.nextElementSibling}}function xEe(t,e){let n=t.previousElementSibling;for(;n;){if(n.matches(e))return n;n=n.previousElementSibling}}function j8(t){let e=_.useRef(t);return Qh(()=>{e.current=t}),e}var Qh=typeof window>"u"?_.useEffect:_.useLayoutEffect;function nm(t){let e=_.useRef();return e.current===void 0&&(e.current=t()),e}function Ad(t){let e=cI(),n=()=>t(e.snapshot());return _.useSyncExternalStore(e.subscribe,n,n)}function F8(t,e,n,r=[]){let s=_.useRef(),i=y_();return Qh(()=>{var a;let o=(()=>{var u;for(let f of n){if(typeof f=="string")return f.trim();if(typeof f=="object"&&"current"in f)return f.current?(u=f.current.textContent)==null?void 0:u.trim():s.current}})(),c=r.map(u=>u.trim());i.value(t,o,c),(a=e.current)==null||a.setAttribute(tm,o),s.current=o}),s}var SEe=()=>{let[t,e]=_.useState(),n=nm(()=>new Map);return Qh(()=>{n.current.forEach(r=>r()),n.current=new Map},[t]),(r,s)=>{n.current.set(r,s),e({})}};function EEe(t){let e=t.type;return typeof e=="function"?e(t.props):"render"in e?e.render(t.props):t}function lA({asChild:t,children:e},n){return t&&_.isValidElement(e)?_.cloneElement(EEe(e),{ref:e.ref},n(e.props.children)):n(e)}var CEe={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const AEe=PL,REe=TL,PEe=kL,$He=d_,z8=_.forwardRef(({className:t,...e},n)=>P.jsx(a_,{ref:n,className:ce("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",t),...e}));z8.displayName=a_.displayName;const B8=_.forwardRef(({className:t,children:e,...n},r)=>P.jsxs(PEe,{children:[P.jsx(z8,{}),P.jsxs(l_,{ref:r,className:ce("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",t),...n,children:[e,P.jsxs(d_,{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:[P.jsx(vL,{className:"h-4 w-4"}),P.jsx("span",{className:"sr-only",children:ft("common.close")})]})]})]}));B8.displayName=l_.displayName;const U8=({className:t,...e})=>P.jsx("div",{className:ce("flex flex-col space-y-1.5 text-center sm:text-left",t),...e});U8.displayName="DialogHeader";const H8=({className:t,...e})=>P.jsx("div",{className:ce("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...e});H8.displayName="DialogFooter";const W8=_.forwardRef(({className:t,...e},n)=>P.jsx(c_,{ref:n,className:ce("text-lg font-semibold leading-none tracking-tight",t),...e}));W8.displayName=c_.displayName;const V8=_.forwardRef(({className:t,...e},n)=>P.jsx(u_,{ref:n,className:ce("text-sm text-muted-foreground",t),...e}));V8.displayName=u_.displayName;const TEe=_.forwardRef(({className:t,...e},n)=>P.jsx(Ti,{ref:n,className:ce("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",t),...e}));TEe.displayName=Ti.displayName;const kEe=_.forwardRef(({className:t,...e},n)=>P.jsxs("div",{className:"flex items-center px-3 border-b","cmdk-input-wrapper":"",children:[P.jsx($fe,{className:"w-4 h-4 mr-2 opacity-50 shrink-0"}),P.jsx(Ti.Input,{ref:n,className:ce("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",t),...e})]}));kEe.displayName=Ti.Input.displayName;const DEe=_.forwardRef(({className:t,...e},n)=>P.jsx(Ti.List,{ref:n,className:ce("max-h-[300px] overflow-y-auto overflow-x-hidden",t),...e}));DEe.displayName=Ti.List.displayName;const NEe=_.forwardRef((t,e)=>P.jsx(Ti.Empty,{ref:e,className:"py-6 text-sm text-center",...t}));NEe.displayName=Ti.Empty.displayName;const MEe=_.forwardRef(({className:t,...e},n)=>P.jsx(Ti.Group,{ref:n,className:ce("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",t),...e}));MEe.displayName=Ti.Group.displayName;const OEe=_.forwardRef(({className:t,...e},n)=>P.jsx(Ti.Separator,{ref:n,className:ce("-mx-1 h-px bg-border",t),...e}));OEe.displayName=Ti.Separator.displayName;const LEe=_.forwardRef(({className:t,...e},n)=>P.jsx(Ti.Item,{ref:n,className:ce("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...e}));LEe.displayName=Ti.Item.displayName;const IEe=["top","right","bottom","left"],ml=Math.min,to=Math.max,u1=Math.round,cS=Math.floor,Rd=t=>({x:t,y:t}),$Ee={left:"right",right:"left",bottom:"top",top:"bottom"},jEe={start:"end",end:"start"};function qD(t,e,n){return to(t,ml(e,n))}function Vc(t,e){return typeof t=="function"?t(e):t}function qc(t){return t.split("-")[0]}function Tv(t){return t.split("-")[1]}function uI(t){return t==="x"?"y":"x"}function dI(t){return t==="y"?"height":"width"}function Pd(t){return["top","bottom"].includes(qc(t))?"y":"x"}function fI(t){return uI(Pd(t))}function FEe(t,e,n){n===void 0&&(n=!1);const r=Tv(t),s=fI(t),i=dI(s);let a=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(a=d1(a)),[a,d1(a)]}function zEe(t){const e=d1(t);return[GD(t),e,GD(e)]}function GD(t){return t.replace(/start|end/g,e=>jEe[e])}function BEe(t,e,n){const r=["left","right"],s=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(t){case"top":case"bottom":return n?e?s:r:e?r:s;case"left":case"right":return e?i:a;default:return[]}}function UEe(t,e,n,r){const s=Tv(t);let i=BEe(qc(t),n==="start",r);return s&&(i=i.map(a=>a+"-"+s),e&&(i=i.concat(i.map(GD)))),i}function d1(t){return t.replace(/left|right|bottom|top/g,e=>$Ee[e])}function HEe(t){return{top:0,right:0,bottom:0,left:0,...t}}function q8(t){return typeof t!="number"?HEe(t):{top:t,right:t,bottom:t,left:t}}function f1(t){const{x:e,y:n,width:r,height:s}=t;return{width:r,height:s,top:n,left:e,right:e+r,bottom:n+s,x:e,y:n}}function sB(t,e,n){let{reference:r,floating:s}=t;const i=Pd(e),a=fI(e),o=dI(a),c=qc(e),u=i==="y",f=r.x+r.width/2-s.width/2,l=r.y+r.height/2-s.height/2,d=r[o]/2-s[o]/2;let m;switch(c){case"top":m={x:f,y:r.y-s.height};break;case"bottom":m={x:f,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:l};break;case"left":m={x:r.x-s.width,y:l};break;default:m={x:r.x,y:r.y}}switch(Tv(e)){case"start":m[a]-=d*(n&&u?-1:1);break;case"end":m[a]+=d*(n&&u?-1:1);break}return m}const WEe=async(t,e,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:i=[],platform:a}=n,o=i.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(e));let u=await a.getElementRects({reference:t,floating:e,strategy:s}),{x:f,y:l}=sB(u,r,c),d=r,m={},p=0;for(let h=0;h({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:s,rects:i,platform:a,elements:o,middlewareData:c}=e,{element:u,padding:f=0}=Vc(t,e)||{};if(u==null)return{};const l=q8(f),d={x:n,y:r},m=fI(s),p=dI(m),h=await a.getDimensions(u),y=m==="y",g=y?"top":"left",v=y?"bottom":"right",w=y?"clientHeight":"clientWidth",x=i.reference[p]+i.reference[m]-d[m]-i.floating[p],A=d[m]-i.reference[m],k=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let R=k?k[w]:0;(!R||!await(a.isElement==null?void 0:a.isElement(k)))&&(R=o.floating[w]||i.floating[p]);const E=x/2-A/2,T=R/2-h[p]/2-1,D=ml(l[g],T),M=ml(l[v],T),L=D,I=R-h[p]-M,j=R/2-h[p]/2+E,U=qD(L,j,I),Y=!c.arrow&&Tv(s)!=null&&j!==U&&i.reference[p]/2-(jj<=0)){var M,L;const j=(((M=i.flip)==null?void 0:M.index)||0)+1,U=R[j];if(U)return{data:{index:j,overflows:D},reset:{placement:U}};let Y=(L=D.filter(W=>W.overflows[0]<=0).sort((W,H)=>W.overflows[1]-H.overflows[1])[0])==null?void 0:L.placement;if(!Y)switch(m){case"bestFit":{var I;const W=(I=D.filter(H=>{if(k){const ee=Pd(H.placement);return ee===v||ee==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(ee=>ee>0).reduce((ee,re)=>ee+re,0)]).sort((H,ee)=>H[1]-ee[1])[0])==null?void 0:I[0];W&&(Y=W);break}case"initialPlacement":Y=o;break}if(s!==Y)return{reset:{placement:Y}}}return{}}}};function iB(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function oB(t){return IEe.some(e=>t[e]>=0)}const GEe=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:r="referenceHidden",...s}=Vc(t,e);switch(r){case"referenceHidden":{const i=await Yb(e,{...s,elementContext:"reference"}),a=iB(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:oB(a)}}}case"escaped":{const i=await Yb(e,{...s,altBoundary:!0}),a=iB(i,n.floating);return{data:{escapedOffsets:a,escaped:oB(a)}}}default:return{}}}}};async function KEe(t,e){const{placement:n,platform:r,elements:s}=t,i=await(r.isRTL==null?void 0:r.isRTL(s.floating)),a=qc(n),o=Tv(n),c=Pd(n)==="y",u=["left","top"].includes(a)?-1:1,f=i&&c?-1:1,l=Vc(e,t);let{mainAxis:d,crossAxis:m,alignmentAxis:p}=typeof l=="number"?{mainAxis:l,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...l};return o&&typeof p=="number"&&(m=o==="end"?p*-1:p),c?{x:m*f,y:d*u}:{x:d*u,y:m*f}}const YEe=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:s,y:i,placement:a,middlewareData:o}=e,c=await KEe(e,t);return a===((n=o.offset)==null?void 0:n.placement)&&(r=o.arrow)!=null&&r.alignmentOffset?{}:{x:s+c.x,y:i+c.y,data:{...c,placement:a}}}}},XEe=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:s}=e,{mainAxis:i=!0,crossAxis:a=!1,limiter:o={fn:y=>{let{x:g,y:v}=y;return{x:g,y:v}}},...c}=Vc(t,e),u={x:n,y:r},f=await Yb(e,c),l=Pd(qc(s)),d=uI(l);let m=u[d],p=u[l];if(i){const y=d==="y"?"top":"left",g=d==="y"?"bottom":"right",v=m+f[y],w=m-f[g];m=qD(v,m,w)}if(a){const y=l==="y"?"top":"left",g=l==="y"?"bottom":"right",v=p+f[y],w=p-f[g];p=qD(v,p,w)}const h=o.fn({...e,[d]:m,[l]:p});return{...h,data:{x:h.x-n,y:h.y-r}}}}},QEe=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:s,rects:i,middlewareData:a}=e,{offset:o=0,mainAxis:c=!0,crossAxis:u=!0}=Vc(t,e),f={x:n,y:r},l=Pd(s),d=uI(l);let m=f[d],p=f[l];const h=Vc(o,e),y=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){const w=d==="y"?"height":"width",x=i.reference[d]-i.floating[w]+y.mainAxis,A=i.reference[d]+i.reference[w]-y.mainAxis;mA&&(m=A)}if(u){var g,v;const w=d==="y"?"width":"height",x=["top","left"].includes(qc(s)),A=i.reference[l]-i.floating[w]+(x&&((g=a.offset)==null?void 0:g[l])||0)+(x?0:y.crossAxis),k=i.reference[l]+i.reference[w]+(x?0:((v=a.offset)==null?void 0:v[l])||0)-(x?y.crossAxis:0);pk&&(p=k)}return{[d]:m,[l]:p}}}},JEe=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:n,rects:r,platform:s,elements:i}=e,{apply:a=()=>{},...o}=Vc(t,e),c=await Yb(e,o),u=qc(n),f=Tv(n),l=Pd(n)==="y",{width:d,height:m}=r.floating;let p,h;u==="top"||u==="bottom"?(p=u,h=f===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(h=u,p=f==="end"?"top":"bottom");const y=m-c.top-c.bottom,g=d-c.left-c.right,v=ml(m-c[p],y),w=ml(d-c[h],g),x=!e.middlewareData.shift;let A=v,k=w;if(l?k=f||x?ml(w,g):g:A=f||x?ml(v,y):y,x&&!f){const E=to(c.left,0),T=to(c.right,0),D=to(c.top,0),M=to(c.bottom,0);l?k=d-2*(E!==0||T!==0?E+T:to(c.left,c.right)):A=m-2*(D!==0||M!==0?D+M:to(c.top,c.bottom))}await a({...e,availableWidth:k,availableHeight:A});const R=await s.getDimensions(i.floating);return d!==R.width||m!==R.height?{reset:{rects:!0}}:{}}}};function kv(t){return G8(t)?(t.nodeName||"").toLowerCase():"#document"}function io(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function eu(t){var e;return(e=(G8(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function G8(t){return t instanceof Node||t instanceof io(t).Node}function Sl(t){return t instanceof Element||t instanceof io(t).Element}function El(t){return t instanceof HTMLElement||t instanceof io(t).HTMLElement}function aB(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof io(t).ShadowRoot}function b_(t){const{overflow:e,overflowX:n,overflowY:r,display:s}=ka(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(s)}function ZEe(t){return["table","td","th"].includes(kv(t))}function cA(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function hI(t){const e=pI(),n=ka(t);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function e1e(t){let e=Td(t);for(;El(e)&&!cv(e);){if(cA(e))return null;if(hI(e))return e;e=Td(e)}return null}function pI(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function cv(t){return["html","body","#document"].includes(kv(t))}function ka(t){return io(t).getComputedStyle(t)}function uA(t){return Sl(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Td(t){if(kv(t)==="html")return t;const e=t.assignedSlot||t.parentNode||aB(t)&&t.host||eu(t);return aB(e)?e.host:e}function K8(t){const e=Td(t);return cv(e)?t.ownerDocument?t.ownerDocument.body:t.body:El(e)&&b_(e)?e:K8(e)}function Xb(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const s=K8(t),i=s===((r=t.ownerDocument)==null?void 0:r.body),a=io(s);return i?e.concat(a,a.visualViewport||[],b_(s)?s:[],a.frameElement&&n?Xb(a.frameElement):[]):e.concat(s,Xb(s,[],n))}function Y8(t){const e=ka(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const s=El(t),i=s?t.offsetWidth:n,a=s?t.offsetHeight:r,o=u1(n)!==i||u1(r)!==a;return o&&(n=i,r=a),{width:n,height:r,$:o}}function mI(t){return Sl(t)?t:t.contextElement}function Fm(t){const e=mI(t);if(!El(e))return Rd(1);const n=e.getBoundingClientRect(),{width:r,height:s,$:i}=Y8(e);let a=(i?u1(n.width):n.width)/r,o=(i?u1(n.height):n.height)/s;return(!a||!Number.isFinite(a))&&(a=1),(!o||!Number.isFinite(o))&&(o=1),{x:a,y:o}}const t1e=Rd(0);function X8(t){const e=io(t);return!pI()||!e.visualViewport?t1e:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function n1e(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==io(t)?!1:e}function Jh(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const s=t.getBoundingClientRect(),i=mI(t);let a=Rd(1);e&&(r?Sl(r)&&(a=Fm(r)):a=Fm(t));const o=n1e(i,n,r)?X8(i):Rd(0);let c=(s.left+o.x)/a.x,u=(s.top+o.y)/a.y,f=s.width/a.x,l=s.height/a.y;if(i){const d=io(i),m=r&&Sl(r)?io(r):r;let p=d,h=p.frameElement;for(;h&&r&&m!==p;){const y=Fm(h),g=h.getBoundingClientRect(),v=ka(h),w=g.left+(h.clientLeft+parseFloat(v.paddingLeft))*y.x,x=g.top+(h.clientTop+parseFloat(v.paddingTop))*y.y;c*=y.x,u*=y.y,f*=y.x,l*=y.y,c+=w,u+=x,p=io(h),h=p.frameElement}}return f1({width:f,height:l,x:c,y:u})}function r1e(t){let{elements:e,rect:n,offsetParent:r,strategy:s}=t;const i=s==="fixed",a=eu(r),o=e?cA(e.floating):!1;if(r===a||o&&i)return n;let c={scrollLeft:0,scrollTop:0},u=Rd(1);const f=Rd(0),l=El(r);if((l||!l&&!i)&&((kv(r)!=="body"||b_(a))&&(c=uA(r)),El(r))){const d=Jh(r);u=Fm(r),f.x=d.x+r.clientLeft,f.y=d.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+f.x,y:n.y*u.y-c.scrollTop*u.y+f.y}}function s1e(t){return Array.from(t.getClientRects())}function Q8(t){return Jh(eu(t)).left+uA(t).scrollLeft}function i1e(t){const e=eu(t),n=uA(t),r=t.ownerDocument.body,s=to(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),i=to(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Q8(t);const o=-n.scrollTop;return ka(r).direction==="rtl"&&(a+=to(e.clientWidth,r.clientWidth)-s),{width:s,height:i,x:a,y:o}}function o1e(t,e){const n=io(t),r=eu(t),s=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,o=0,c=0;if(s){i=s.width,a=s.height;const u=pI();(!u||u&&e==="fixed")&&(o=s.offsetLeft,c=s.offsetTop)}return{width:i,height:a,x:o,y:c}}function a1e(t,e){const n=Jh(t,!0,e==="fixed"),r=n.top+t.clientTop,s=n.left+t.clientLeft,i=El(t)?Fm(t):Rd(1),a=t.clientWidth*i.x,o=t.clientHeight*i.y,c=s*i.x,u=r*i.y;return{width:a,height:o,x:c,y:u}}function lB(t,e,n){let r;if(e==="viewport")r=o1e(t,n);else if(e==="document")r=i1e(eu(t));else if(Sl(e))r=a1e(e,n);else{const s=X8(t);r={...e,x:e.x-s.x,y:e.y-s.y}}return f1(r)}function J8(t,e){const n=Td(t);return n===e||!Sl(n)||cv(n)?!1:ka(n).position==="fixed"||J8(n,e)}function l1e(t,e){const n=e.get(t);if(n)return n;let r=Xb(t,[],!1).filter(o=>Sl(o)&&kv(o)!=="body"),s=null;const i=ka(t).position==="fixed";let a=i?Td(t):t;for(;Sl(a)&&!cv(a);){const o=ka(a),c=hI(a);!c&&o.position==="fixed"&&(s=null),(i?!c&&!s:!c&&o.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||b_(a)&&!c&&J8(t,a))?r=r.filter(f=>f!==a):s=o,a=Td(a)}return e.set(t,r),r}function c1e(t){let{element:e,boundary:n,rootBoundary:r,strategy:s}=t;const a=[...n==="clippingAncestors"?cA(e)?[]:l1e(e,this._c):[].concat(n),r],o=a[0],c=a.reduce((u,f)=>{const l=lB(e,f,s);return u.top=to(l.top,u.top),u.right=ml(l.right,u.right),u.bottom=ml(l.bottom,u.bottom),u.left=to(l.left,u.left),u},lB(e,o,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function u1e(t){const{width:e,height:n}=Y8(t);return{width:e,height:n}}function d1e(t,e,n){const r=El(e),s=eu(e),i=n==="fixed",a=Jh(t,!0,i,e);let o={scrollLeft:0,scrollTop:0};const c=Rd(0);if(r||!r&&!i)if((kv(e)!=="body"||b_(s))&&(o=uA(e)),r){const l=Jh(e,!0,i,e);c.x=l.x+e.clientLeft,c.y=l.y+e.clientTop}else s&&(c.x=Q8(s));const u=a.left+o.scrollLeft-c.x,f=a.top+o.scrollTop-c.y;return{x:u,y:f,width:a.width,height:a.height}}function CT(t){return ka(t).position==="static"}function cB(t,e){return!El(t)||ka(t).position==="fixed"?null:e?e(t):t.offsetParent}function Z8(t,e){const n=io(t);if(cA(t))return n;if(!El(t)){let s=Td(t);for(;s&&!cv(s);){if(Sl(s)&&!CT(s))return s;s=Td(s)}return n}let r=cB(t,e);for(;r&&ZEe(r)&&CT(r);)r=cB(r,e);return r&&cv(r)&&CT(r)&&!hI(r)?n:r||e1e(t)||n}const f1e=async function(t){const e=this.getOffsetParent||Z8,n=this.getDimensions,r=await n(t.floating);return{reference:d1e(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function h1e(t){return ka(t).direction==="rtl"}const p1e={convertOffsetParentRelativeRectToViewportRelativeRect:r1e,getDocumentElement:eu,getClippingRect:c1e,getOffsetParent:Z8,getElementRects:f1e,getClientRects:s1e,getDimensions:u1e,getScale:Fm,isElement:Sl,isRTL:h1e};function m1e(t,e){let n=null,r;const s=eu(t);function i(){var o;clearTimeout(r),(o=n)==null||o.disconnect(),n=null}function a(o,c){o===void 0&&(o=!1),c===void 0&&(c=1),i();const{left:u,top:f,width:l,height:d}=t.getBoundingClientRect();if(o||e(),!l||!d)return;const m=cS(f),p=cS(s.clientWidth-(u+l)),h=cS(s.clientHeight-(f+d)),y=cS(u),v={rootMargin:-m+"px "+-p+"px "+-h+"px "+-y+"px",threshold:to(0,ml(1,c))||1};let w=!0;function x(A){const k=A[0].intersectionRatio;if(k!==c){if(!w)return a();k?a(!1,k):r=setTimeout(()=>{a(!1,1e-7)},1e3)}w=!1}try{n=new IntersectionObserver(x,{...v,root:s.ownerDocument})}catch{n=new IntersectionObserver(x,v)}n.observe(t)}return a(!0),i}function g1e(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=mI(t),f=s||i?[...u?Xb(u):[],...Xb(e)]:[];f.forEach(g=>{s&&g.addEventListener("scroll",n,{passive:!0}),i&&g.addEventListener("resize",n)});const l=u&&o?m1e(u,n):null;let d=-1,m=null;a&&(m=new ResizeObserver(g=>{let[v]=g;v&&v.target===u&&m&&(m.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var w;(w=m)==null||w.observe(e)})),n()}),u&&!c&&m.observe(u),m.observe(e));let p,h=c?Jh(t):null;c&&y();function y(){const g=Jh(t);h&&(g.x!==h.x||g.y!==h.y||g.width!==h.width||g.height!==h.height)&&n(),h=g,p=requestAnimationFrame(y)}return n(),()=>{var g;f.forEach(v=>{s&&v.removeEventListener("scroll",n),i&&v.removeEventListener("resize",n)}),l==null||l(),(g=m)==null||g.disconnect(),m=null,c&&cancelAnimationFrame(p)}}const v1e=YEe,y1e=XEe,b1e=qEe,w1e=JEe,_1e=GEe,uB=VEe,x1e=QEe,S1e=(t,e,n)=>{const r=new Map,s={platform:p1e,...n},i={...s.platform,_c:r};return WEe(t,e,{...s,platform:i})};var WS=typeof document<"u"?_.useLayoutEffect:_.useEffect;function h1(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,s;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!h1(t[r],e[r]))return!1;return!0}if(s=Object.keys(t),n=s.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,s[r]))return!1;for(r=n;r--!==0;){const i=s[r];if(!(i==="_owner"&&t.$$typeof)&&!h1(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function eq(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function dB(t,e){const n=eq(t);return Math.round(e*n)/n}function fB(t){const e=_.useRef(t);return WS(()=>{e.current=t}),e}function E1e(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:i,floating:a}={},transform:o=!0,whileElementsMounted:c,open:u}=t,[f,l]=_.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[d,m]=_.useState(r);h1(d,r)||m(r);const[p,h]=_.useState(null),[y,g]=_.useState(null),v=_.useCallback(W=>{W!==k.current&&(k.current=W,h(W))},[]),w=_.useCallback(W=>{W!==R.current&&(R.current=W,g(W))},[]),x=i||p,A=a||y,k=_.useRef(null),R=_.useRef(null),E=_.useRef(f),T=c!=null,D=fB(c),M=fB(s),L=_.useCallback(()=>{if(!k.current||!R.current)return;const W={placement:e,strategy:n,middleware:d};M.current&&(W.platform=M.current),S1e(k.current,R.current,W).then(H=>{const ee={...H,isPositioned:!0};I.current&&!h1(E.current,ee)&&(E.current=ee,Ns.flushSync(()=>{l(ee)}))})},[d,e,n,M]);WS(()=>{u===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,l(W=>({...W,isPositioned:!1})))},[u]);const I=_.useRef(!1);WS(()=>(I.current=!0,()=>{I.current=!1}),[]),WS(()=>{if(x&&(k.current=x),A&&(R.current=A),x&&A){if(D.current)return D.current(x,A,L);L()}},[x,A,L,D,T]);const j=_.useMemo(()=>({reference:k,floating:R,setReference:v,setFloating:w}),[v,w]),U=_.useMemo(()=>({reference:x,floating:A}),[x,A]),Y=_.useMemo(()=>{const W={position:n,left:0,top:0};if(!U.floating)return W;const H=dB(U.floating,f.x),ee=dB(U.floating,f.y);return o?{...W,transform:"translate("+H+"px, "+ee+"px)",...eq(U.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:H,top:ee}},[n,o,U.floating,f.x,f.y]);return _.useMemo(()=>({...f,update:L,refs:j,elements:U,floatingStyles:Y}),[f,L,j,U,Y])}const C1e=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:s}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?uB({element:r.current,padding:s}).fn(n):{}:r?uB({element:r,padding:s}).fn(n):{}}}},A1e=(t,e)=>({...v1e(t),options:[t,e]}),R1e=(t,e)=>({...y1e(t),options:[t,e]}),P1e=(t,e)=>({...x1e(t),options:[t,e]}),T1e=(t,e)=>({...b1e(t),options:[t,e]}),k1e=(t,e)=>({...w1e(t),options:[t,e]}),D1e=(t,e)=>({..._1e(t),options:[t,e]}),N1e=(t,e)=>({...C1e(t),options:[t,e]});var M1e="Arrow",tq=_.forwardRef((t,e)=>{const{children:n,width:r=10,height:s=5,...i}=t;return P.jsx(De.svg,{...i,ref:e,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:P.jsx("polygon",{points:"0,0 30,0 15,10"})})});tq.displayName=M1e;var O1e=tq,gI="Popper",[nq,Rl]=Tn(gI),[L1e,rq]=nq(gI),sq=t=>{const{__scopePopper:e,children:n}=t,[r,s]=_.useState(null);return P.jsx(L1e,{scope:e,anchor:r,onAnchorChange:s,children:n})};sq.displayName=gI;var iq="PopperAnchor",oq=_.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:r,...s}=t,i=rq(iq,n),a=_.useRef(null),o=tt(e,a);return _.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:P.jsx(De.div,{...s,ref:o})});oq.displayName=iq;var vI="PopperContent",[I1e,$1e]=nq(vI),aq=_.forwardRef((t,e)=>{var ie,be,Ae,_e,Oe,Ne;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:i="center",alignOffset:a=0,arrowPadding:o=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:l="partial",hideWhenDetached:d=!1,updatePositionStrategy:m="optimized",onPlaced:p,...h}=t,y=rq(vI,n),[g,v]=_.useState(null),w=tt(e,ye=>v(ye)),[x,A]=_.useState(null),k=v_(x),R=(k==null?void 0:k.width)??0,E=(k==null?void 0:k.height)??0,T=r+(i!=="center"?"-"+i:""),D=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},M=Array.isArray(u)?u:[u],L=M.length>0,I={padding:D,boundary:M.filter(F1e),altBoundary:L},{refs:j,floatingStyles:U,placement:Y,isPositioned:W,middlewareData:H}=E1e({strategy:"fixed",placement:T,whileElementsMounted:(...ye)=>g1e(...ye,{animationFrame:m==="always"}),elements:{reference:y.anchor},middleware:[A1e({mainAxis:s+E,alignmentAxis:a}),c&&R1e({mainAxis:!0,crossAxis:!1,limiter:l==="partial"?P1e():void 0,...I}),c&&T1e({...I}),k1e({...I,apply:({elements:ye,rects:$e,availableWidth:ut,availableHeight:Qe})=>{const{width:yt,height:En}=$e.reference,Xt=ye.floating.style;Xt.setProperty("--radix-popper-available-width",`${ut}px`),Xt.setProperty("--radix-popper-available-height",`${Qe}px`),Xt.setProperty("--radix-popper-anchor-width",`${yt}px`),Xt.setProperty("--radix-popper-anchor-height",`${En}px`)}}),x&&N1e({element:x,padding:o}),z1e({arrowWidth:R,arrowHeight:E}),d&&D1e({strategy:"referenceHidden",...I})]}),[ee,re]=uq(Y),X=Ut(p);Ln(()=>{W&&(X==null||X())},[W,X]);const G=(ie=H.arrow)==null?void 0:ie.x,K=(be=H.arrow)==null?void 0:be.y,J=((Ae=H.arrow)==null?void 0:Ae.centerOffset)!==0,[ue,de]=_.useState();return Ln(()=>{g&&de(window.getComputedStyle(g).zIndex)},[g]),P.jsx("div",{ref:j.setFloating,"data-radix-popper-content-wrapper":"",style:{...U,transform:W?U.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ue,"--radix-popper-transform-origin":[(_e=H.transformOrigin)==null?void 0:_e.x,(Oe=H.transformOrigin)==null?void 0:Oe.y].join(" "),...((Ne=H.hide)==null?void 0:Ne.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:P.jsx(I1e,{scope:n,placedSide:ee,onArrowChange:A,arrowX:G,arrowY:K,shouldHideArrow:J,children:P.jsx(De.div,{"data-side":ee,"data-align":re,...h,ref:w,style:{...h.style,animation:W?void 0:"none"}})})})});aq.displayName=vI;var lq="PopperArrow",j1e={top:"bottom",right:"left",bottom:"top",left:"right"},cq=_.forwardRef(function(e,n){const{__scopePopper:r,...s}=e,i=$1e(lq,r),a=j1e[i.placedSide];return P.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:P.jsx(O1e,{...s,ref:n,style:{...s.style,display:"block"}})})});cq.displayName=lq;function F1e(t){return t!==null}var z1e=t=>({name:"transformOrigin",options:t,fn(e){var y,g,v;const{placement:n,rects:r,middlewareData:s}=e,a=((y=s.arrow)==null?void 0:y.centerOffset)!==0,o=a?0:t.arrowWidth,c=a?0:t.arrowHeight,[u,f]=uq(n),l={start:"0%",center:"50%",end:"100%"}[f],d=(((g=s.arrow)==null?void 0:g.x)??0)+o/2,m=(((v=s.arrow)==null?void 0:v.y)??0)+c/2;let p="",h="";return u==="bottom"?(p=a?l:`${d}px`,h=`${-c}px`):u==="top"?(p=a?l:`${d}px`,h=`${r.floating.height+c}px`):u==="right"?(p=`${-c}px`,h=a?l:`${m}px`):u==="left"&&(p=`${r.floating.width+c}px`,h=a?l:`${m}px`),{data:{x:p,y:h}}}});function uq(t){const[e,n="center"]=t.split("-");return[e,n]}var dA=sq,Dv=oq,w_=aq,__=cq,AT="rovingFocusGroup.onEntryFocus",B1e={bubbles:!1,cancelable:!0},fA="RovingFocusGroup",[KD,dq,U1e]=Xc(fA),[H1e,Pl]=Tn(fA,[U1e]),[W1e,V1e]=H1e(fA),fq=_.forwardRef((t,e)=>P.jsx(KD.Provider,{scope:t.__scopeRovingFocusGroup,children:P.jsx(KD.Slot,{scope:t.__scopeRovingFocusGroup,children:P.jsx(q1e,{...t,ref:e})})}));fq.displayName=fA;var q1e=_.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:s=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:o,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...l}=t,d=_.useRef(null),m=tt(e,d),p=Ma(i),[h=null,y]=sr({prop:a,defaultProp:o,onChange:c}),[g,v]=_.useState(!1),w=Ut(u),x=dq(n),A=_.useRef(!1),[k,R]=_.useState(0);return _.useEffect(()=>{const E=d.current;if(E)return E.addEventListener(AT,w),()=>E.removeEventListener(AT,w)},[w]),P.jsx(W1e,{scope:n,orientation:r,dir:p,loop:s,currentTabStopId:h,onItemFocus:_.useCallback(E=>y(E),[y]),onItemShiftTab:_.useCallback(()=>v(!0),[]),onFocusableItemAdd:_.useCallback(()=>R(E=>E+1),[]),onFocusableItemRemove:_.useCallback(()=>R(E=>E-1),[]),children:P.jsx(De.div,{tabIndex:g||k===0?-1:0,"data-orientation":r,...l,ref:m,style:{outline:"none",...t.style},onMouseDown:me(t.onMouseDown,()=>{A.current=!0}),onFocus:me(t.onFocus,E=>{const T=!A.current;if(E.target===E.currentTarget&&T&&!g){const D=new CustomEvent(AT,B1e);if(E.currentTarget.dispatchEvent(D),!D.defaultPrevented){const M=x().filter(Y=>Y.focusable),L=M.find(Y=>Y.active),I=M.find(Y=>Y.id===h),U=[L,I,...M].filter(Boolean).map(Y=>Y.ref.current);mq(U,f)}}A.current=!1}),onBlur:me(t.onBlur,()=>v(!1))})})}),hq="RovingFocusGroupItem",pq=_.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:s=!1,tabStopId:i,...a}=t,o=Vr(),c=i||o,u=V1e(hq,n),f=u.currentTabStopId===c,l=dq(n),{onFocusableItemAdd:d,onFocusableItemRemove:m}=u;return _.useEffect(()=>{if(r)return d(),()=>m()},[r,d,m]),P.jsx(KD.ItemSlot,{scope:n,id:c,focusable:r,active:s,children:P.jsx(De.span,{tabIndex:f?0:-1,"data-orientation":u.orientation,...a,ref:e,onMouseDown:me(t.onMouseDown,p=>{r?u.onItemFocus(c):p.preventDefault()}),onFocus:me(t.onFocus,()=>u.onItemFocus(c)),onKeyDown:me(t.onKeyDown,p=>{if(p.key==="Tab"&&p.shiftKey){u.onItemShiftTab();return}if(p.target!==p.currentTarget)return;const h=Y1e(p,u.orientation,u.dir);if(h!==void 0){if(p.metaKey||p.ctrlKey||p.altKey||p.shiftKey)return;p.preventDefault();let g=l().filter(v=>v.focusable).map(v=>v.ref.current);if(h==="last")g.reverse();else if(h==="prev"||h==="next"){h==="prev"&&g.reverse();const v=g.indexOf(p.currentTarget);g=u.loop?X1e(g,v+1):g.slice(v+1)}setTimeout(()=>mq(g))}})})})});pq.displayName=hq;var G1e={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function K1e(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function Y1e(t,e,n){const r=K1e(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return G1e[r]}function mq(t,e=!1){const n=document.activeElement;for(const r of t)if(r===n||(r.focus({preventScroll:e}),document.activeElement!==n))return}function X1e(t,e){return t.map((n,r)=>t[(e+r)%t.length])}var x_=fq,S_=pq,YD=["Enter"," "],Q1e=["ArrowDown","PageUp","Home"],gq=["ArrowUp","PageDown","End"],J1e=[...Q1e,...gq],Z1e={ltr:[...YD,"ArrowRight"],rtl:[...YD,"ArrowLeft"]},eCe={ltr:["ArrowLeft"],rtl:["ArrowRight"]},E_="Menu",[Qb,tCe,nCe]=Xc(E_),[gp,C_]=Tn(E_,[nCe,Rl,Pl]),hA=Rl(),vq=Pl(),[rCe,vp]=gp(E_),[sCe,A_]=gp(E_),yq=t=>{const{__scopeMenu:e,open:n=!1,children:r,dir:s,onOpenChange:i,modal:a=!0}=t,o=hA(e),[c,u]=_.useState(null),f=_.useRef(!1),l=Ut(i),d=Ma(s);return _.useEffect(()=>{const m=()=>{f.current=!0,document.addEventListener("pointerdown",p,{capture:!0,once:!0}),document.addEventListener("pointermove",p,{capture:!0,once:!0})},p=()=>f.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",p,{capture:!0}),document.removeEventListener("pointermove",p,{capture:!0})}},[]),P.jsx(dA,{...o,children:P.jsx(rCe,{scope:e,open:n,onOpenChange:l,content:c,onContentChange:u,children:P.jsx(sCe,{scope:e,onClose:_.useCallback(()=>l(!1),[l]),isUsingKeyboardRef:f,dir:d,modal:a,children:r})})})};yq.displayName=E_;var iCe="MenuAnchor",yI=_.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t,s=hA(n);return P.jsx(Dv,{...s,...r,ref:e})});yI.displayName=iCe;var bI="MenuPortal",[oCe,bq]=gp(bI,{forceMount:void 0}),wq=t=>{const{__scopeMenu:e,forceMount:n,children:r,container:s}=t,i=vp(bI,e);return P.jsx(oCe,{scope:e,forceMount:n,children:P.jsx(Hn,{present:n||i.open,children:P.jsx(Sv,{asChild:!0,container:s,children:r})})})};wq.displayName=bI;var jo="MenuContent",[aCe,wI]=gp(jo),_q=_.forwardRef((t,e)=>{const n=bq(jo,t.__scopeMenu),{forceMount:r=n.forceMount,...s}=t,i=vp(jo,t.__scopeMenu),a=A_(jo,t.__scopeMenu);return P.jsx(Qb.Provider,{scope:t.__scopeMenu,children:P.jsx(Hn,{present:r||i.open,children:P.jsx(Qb.Slot,{scope:t.__scopeMenu,children:a.modal?P.jsx(lCe,{...s,ref:e}):P.jsx(cCe,{...s,ref:e})})})})}),lCe=_.forwardRef((t,e)=>{const n=vp(jo,t.__scopeMenu),r=_.useRef(null),s=tt(e,r);return _.useEffect(()=>{const i=r.current;if(i)return Ev(i)},[]),P.jsx(_I,{...t,ref:s,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:me(t.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),cCe=_.forwardRef((t,e)=>{const n=vp(jo,t.__scopeMenu);return P.jsx(_I,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),_I=_.forwardRef((t,e)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:s,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:l,onInteractOutside:d,onDismiss:m,disableOutsideScroll:p,...h}=t,y=vp(jo,n),g=A_(jo,n),v=hA(n),w=vq(n),x=tCe(n),[A,k]=_.useState(null),R=_.useRef(null),E=tt(e,R,y.onContentChange),T=_.useRef(0),D=_.useRef(""),M=_.useRef(0),L=_.useRef(null),I=_.useRef("right"),j=_.useRef(0),U=p?o_:_.Fragment,Y=p?{as:Ra,allowPinchZoom:!0}:void 0,W=ee=>{var ie,be;const re=D.current+ee,X=x().filter(Ae=>!Ae.disabled),G=document.activeElement,K=(ie=X.find(Ae=>Ae.ref.current===G))==null?void 0:ie.textValue,J=X.map(Ae=>Ae.textValue),ue=_Ce(J,re,K),de=(be=X.find(Ae=>Ae.textValue===ue))==null?void 0:be.ref.current;(function Ae(_e){D.current=_e,window.clearTimeout(T.current),_e!==""&&(T.current=window.setTimeout(()=>Ae(""),1e3))})(re),de&&setTimeout(()=>de.focus())};_.useEffect(()=>()=>window.clearTimeout(T.current),[]),FC();const H=_.useCallback(ee=>{var X,G;return I.current===((X=L.current)==null?void 0:X.side)&&SCe(ee,(G=L.current)==null?void 0:G.area)},[]);return P.jsx(aCe,{scope:n,searchRef:D,onItemEnter:_.useCallback(ee=>{H(ee)&&ee.preventDefault()},[H]),onItemLeave:_.useCallback(ee=>{var re;H(ee)||((re=R.current)==null||re.focus(),k(null))},[H]),onTriggerLeave:_.useCallback(ee=>{H(ee)&&ee.preventDefault()},[H]),pointerGraceTimerRef:M,onPointerGraceIntentChange:_.useCallback(ee=>{L.current=ee},[]),children:P.jsx(U,{...Y,children:P.jsx(i_,{asChild:!0,trapped:s,onMountAutoFocus:me(i,ee=>{var re;ee.preventDefault(),(re=R.current)==null||re.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:P.jsx(Jc,{asChild:!0,disableOutsidePointerEvents:o,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:l,onInteractOutside:d,onDismiss:m,children:P.jsx(x_,{asChild:!0,...w,dir:g.dir,orientation:"vertical",loop:r,currentTabStopId:A,onCurrentTabStopIdChange:k,onEntryFocus:me(c,ee=>{g.isUsingKeyboardRef.current||ee.preventDefault()}),preventScrollOnEntryFocus:!0,children:P.jsx(w_,{role:"menu","aria-orientation":"vertical","data-state":$q(y.open),"data-radix-menu-content":"",dir:g.dir,...v,...h,ref:E,style:{outline:"none",...h.style},onKeyDown:me(h.onKeyDown,ee=>{const X=ee.target.closest("[data-radix-menu-content]")===ee.currentTarget,G=ee.ctrlKey||ee.altKey||ee.metaKey,K=ee.key.length===1;X&&(ee.key==="Tab"&&ee.preventDefault(),!G&&K&&W(ee.key));const J=R.current;if(ee.target!==J||!J1e.includes(ee.key))return;ee.preventDefault();const de=x().filter(ie=>!ie.disabled).map(ie=>ie.ref.current);gq.includes(ee.key)&&de.reverse(),bCe(de)}),onBlur:me(t.onBlur,ee=>{ee.currentTarget.contains(ee.target)||(window.clearTimeout(T.current),D.current="")}),onPointerMove:me(t.onPointerMove,Jb(ee=>{const re=ee.target,X=j.current!==ee.clientX;if(ee.currentTarget.contains(re)&&X){const G=ee.clientX>j.current?"right":"left";I.current=G,j.current=ee.clientX}}))})})})})})})});_q.displayName=jo;var uCe="MenuGroup",xI=_.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return P.jsx(De.div,{role:"group",...r,ref:e})});xI.displayName=uCe;var dCe="MenuLabel",xq=_.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return P.jsx(De.div,{...r,ref:e})});xq.displayName=dCe;var p1="MenuItem",hB="menu.itemSelect",pA=_.forwardRef((t,e)=>{const{disabled:n=!1,onSelect:r,...s}=t,i=_.useRef(null),a=A_(p1,t.__scopeMenu),o=wI(p1,t.__scopeMenu),c=tt(e,i),u=_.useRef(!1),f=()=>{const l=i.current;if(!n&&l){const d=new CustomEvent(hB,{bubbles:!0,cancelable:!0});l.addEventListener(hB,m=>r==null?void 0:r(m),{once:!0}),Wb(l,d),d.defaultPrevented?u.current=!1:a.onClose()}};return P.jsx(Sq,{...s,ref:c,disabled:n,onClick:me(t.onClick,f),onPointerDown:l=>{var d;(d=t.onPointerDown)==null||d.call(t,l),u.current=!0},onPointerUp:me(t.onPointerUp,l=>{var d;u.current||(d=l.currentTarget)==null||d.click()}),onKeyDown:me(t.onKeyDown,l=>{const d=o.searchRef.current!=="";n||d&&l.key===" "||YD.includes(l.key)&&(l.currentTarget.click(),l.preventDefault())})})});pA.displayName=p1;var Sq=_.forwardRef((t,e)=>{const{__scopeMenu:n,disabled:r=!1,textValue:s,...i}=t,a=wI(p1,n),o=vq(n),c=_.useRef(null),u=tt(e,c),[f,l]=_.useState(!1),[d,m]=_.useState("");return _.useEffect(()=>{const p=c.current;p&&m((p.textContent??"").trim())},[i.children]),P.jsx(Qb.ItemSlot,{scope:n,disabled:r,textValue:s??d,children:P.jsx(S_,{asChild:!0,...o,focusable:!r,children:P.jsx(De.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...i,ref:u,onPointerMove:me(t.onPointerMove,Jb(p=>{r?a.onItemLeave(p):(a.onItemEnter(p),p.defaultPrevented||p.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:me(t.onPointerLeave,Jb(p=>a.onItemLeave(p))),onFocus:me(t.onFocus,()=>l(!0)),onBlur:me(t.onBlur,()=>l(!1))})})})}),fCe="MenuCheckboxItem",Eq=_.forwardRef((t,e)=>{const{checked:n=!1,onCheckedChange:r,...s}=t;return P.jsx(Tq,{scope:t.__scopeMenu,checked:n,children:P.jsx(pA,{role:"menuitemcheckbox","aria-checked":m1(n)?"mixed":n,...s,ref:e,"data-state":EI(n),onSelect:me(s.onSelect,()=>r==null?void 0:r(m1(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Eq.displayName=fCe;var Cq="MenuRadioGroup",[hCe,pCe]=gp(Cq,{value:void 0,onValueChange:()=>{}}),Aq=_.forwardRef((t,e)=>{const{value:n,onValueChange:r,...s}=t,i=Ut(r);return P.jsx(hCe,{scope:t.__scopeMenu,value:n,onValueChange:i,children:P.jsx(xI,{...s,ref:e})})});Aq.displayName=Cq;var Rq="MenuRadioItem",Pq=_.forwardRef((t,e)=>{const{value:n,...r}=t,s=pCe(Rq,t.__scopeMenu),i=n===s.value;return P.jsx(Tq,{scope:t.__scopeMenu,checked:i,children:P.jsx(pA,{role:"menuitemradio","aria-checked":i,...r,ref:e,"data-state":EI(i),onSelect:me(r.onSelect,()=>{var a;return(a=s.onValueChange)==null?void 0:a.call(s,n)},{checkForDefaultPrevented:!1})})})});Pq.displayName=Rq;var SI="MenuItemIndicator",[Tq,mCe]=gp(SI,{checked:!1}),kq=_.forwardRef((t,e)=>{const{__scopeMenu:n,forceMount:r,...s}=t,i=mCe(SI,n);return P.jsx(Hn,{present:r||m1(i.checked)||i.checked===!0,children:P.jsx(De.span,{...s,ref:e,"data-state":EI(i.checked)})})});kq.displayName=SI;var gCe="MenuSeparator",Dq=_.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return P.jsx(De.div,{role:"separator","aria-orientation":"horizontal",...r,ref:e})});Dq.displayName=gCe;var vCe="MenuArrow",Nq=_.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t,s=hA(n);return P.jsx(__,{...s,...r,ref:e})});Nq.displayName=vCe;var yCe="MenuSub",[jHe,Mq]=gp(yCe),jy="MenuSubTrigger",Oq=_.forwardRef((t,e)=>{const n=vp(jy,t.__scopeMenu),r=A_(jy,t.__scopeMenu),s=Mq(jy,t.__scopeMenu),i=wI(jy,t.__scopeMenu),a=_.useRef(null),{pointerGraceTimerRef:o,onPointerGraceIntentChange:c}=i,u={__scopeMenu:t.__scopeMenu},f=_.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return _.useEffect(()=>f,[f]),_.useEffect(()=>{const l=o.current;return()=>{window.clearTimeout(l),c(null)}},[o,c]),P.jsx(yI,{asChild:!0,...u,children:P.jsx(Sq,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":s.contentId,"data-state":$q(n.open),...t,ref:n_(e,s.onTriggerChange),onClick:l=>{var d;(d=t.onClick)==null||d.call(t,l),!(t.disabled||l.defaultPrevented)&&(l.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:me(t.onPointerMove,Jb(l=>{i.onItemEnter(l),!l.defaultPrevented&&!t.disabled&&!n.open&&!a.current&&(i.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:me(t.onPointerLeave,Jb(l=>{var m,p;f();const d=(m=n.content)==null?void 0:m.getBoundingClientRect();if(d){const h=(p=n.content)==null?void 0:p.dataset.side,y=h==="right",g=y?-5:5,v=d[y?"left":"right"],w=d[y?"right":"left"];i.onPointerGraceIntentChange({area:[{x:l.clientX+g,y:l.clientY},{x:v,y:d.top},{x:w,y:d.top},{x:w,y:d.bottom},{x:v,y:d.bottom}],side:h}),window.clearTimeout(o.current),o.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(l),l.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:me(t.onKeyDown,l=>{var m;const d=i.searchRef.current!=="";t.disabled||d&&l.key===" "||Z1e[r.dir].includes(l.key)&&(n.onOpenChange(!0),(m=n.content)==null||m.focus(),l.preventDefault())})})})});Oq.displayName=jy;var Lq="MenuSubContent",Iq=_.forwardRef((t,e)=>{const n=bq(jo,t.__scopeMenu),{forceMount:r=n.forceMount,...s}=t,i=vp(jo,t.__scopeMenu),a=A_(jo,t.__scopeMenu),o=Mq(Lq,t.__scopeMenu),c=_.useRef(null),u=tt(e,c);return P.jsx(Qb.Provider,{scope:t.__scopeMenu,children:P.jsx(Hn,{present:r||i.open,children:P.jsx(Qb.Slot,{scope:t.__scopeMenu,children:P.jsx(_I,{id:o.contentId,"aria-labelledby":o.triggerId,...s,ref:u,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var l;a.isUsingKeyboardRef.current&&((l=c.current)==null||l.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:me(t.onFocusOutside,f=>{f.target!==o.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:me(t.onEscapeKeyDown,f=>{a.onClose(),f.preventDefault()}),onKeyDown:me(t.onKeyDown,f=>{var m;const l=f.currentTarget.contains(f.target),d=eCe[a.dir].includes(f.key);l&&d&&(i.onOpenChange(!1),(m=o.trigger)==null||m.focus(),f.preventDefault())})})})})})});Iq.displayName=Lq;function $q(t){return t?"open":"closed"}function m1(t){return t==="indeterminate"}function EI(t){return m1(t)?"indeterminate":t?"checked":"unchecked"}function bCe(t){const e=document.activeElement;for(const n of t)if(n===e||(n.focus(),document.activeElement!==e))return}function wCe(t,e){return t.map((n,r)=>t[(e+r)%t.length])}function _Ce(t,e,n){const s=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,i=n?t.indexOf(n):-1;let a=wCe(t,Math.max(i,0));s.length===1&&(a=a.filter(u=>u!==n));const c=a.find(u=>u.toLowerCase().startsWith(s.toLowerCase()));return c!==n?c:void 0}function xCe(t,e){const{x:n,y:r}=t;let s=!1;for(let i=0,a=e.length-1;ir!=f>r&&n<(u-o)*(r-c)/(f-c)+o&&(s=!s)}return s}function SCe(t,e){if(!e)return!1;const n={x:t.clientX,y:t.clientY};return xCe(n,e)}function Jb(t){return e=>e.pointerType==="mouse"?t(e):void 0}var ECe=yq,CI=yI,AI=wq,RI=_q,PI=xI,TI=xq,kI=pA,DI=Eq,NI=Aq,MI=Pq,OI=kq,LI=Dq,II=Nq,$I=Oq,jI=Iq,jq="ContextMenu",[CCe,FHe]=Tn(jq,[C_]),ki=C_(),[zHe,Fq]=CCe(jq),zq="ContextMenuTrigger",ACe=_.forwardRef((t,e)=>{const{__scopeContextMenu:n,disabled:r=!1,...s}=t,i=Fq(zq,n),a=ki(n),o=_.useRef({x:0,y:0}),c=_.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...o.current})}),u=_.useRef(0),f=_.useCallback(()=>window.clearTimeout(u.current),[]),l=d=>{o.current={x:d.clientX,y:d.clientY},i.onOpenChange(!0)};return _.useEffect(()=>f,[f]),_.useEffect(()=>void(r&&f()),[r,f]),P.jsxs(P.Fragment,{children:[P.jsx(CI,{...a,virtualRef:c}),P.jsx(De.span,{"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,...s,ref:e,style:{WebkitTouchCallout:"none",...t.style},onContextMenu:r?t.onContextMenu:me(t.onContextMenu,d=>{f(),l(d),d.preventDefault()}),onPointerDown:r?t.onPointerDown:me(t.onPointerDown,uS(d=>{f(),u.current=window.setTimeout(()=>l(d),700)})),onPointerMove:r?t.onPointerMove:me(t.onPointerMove,uS(f)),onPointerCancel:r?t.onPointerCancel:me(t.onPointerCancel,uS(f)),onPointerUp:r?t.onPointerUp:me(t.onPointerUp,uS(f))})]})});ACe.displayName=zq;var RCe="ContextMenuPortal",Bq=t=>{const{__scopeContextMenu:e,...n}=t,r=ki(e);return P.jsx(AI,{...r,...n})};Bq.displayName=RCe;var Uq="ContextMenuContent",Hq=_.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,s=Fq(Uq,n),i=ki(n),a=_.useRef(!1);return P.jsx(RI,{...i,...r,ref:e,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:o=>{var c;(c=t.onCloseAutoFocus)==null||c.call(t,o),!o.defaultPrevented&&a.current&&o.preventDefault(),a.current=!1},onInteractOutside:o=>{var c;(c=t.onInteractOutside)==null||c.call(t,o),!o.defaultPrevented&&!s.modal&&(a.current=!0)},style:{...t.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Hq.displayName=Uq;var PCe="ContextMenuGroup",TCe=_.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,s=ki(n);return P.jsx(PI,{...s,...r,ref:e})});TCe.displayName=PCe;var kCe="ContextMenuLabel",Wq=_.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,s=ki(n);return P.jsx(TI,{...s,...r,ref:e})});Wq.displayName=kCe;var DCe="ContextMenuItem",Vq=_.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,s=ki(n);return P.jsx(kI,{...s,...r,ref:e})});Vq.displayName=DCe;var NCe="ContextMenuCheckboxItem",qq=_.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,s=ki(n);return P.jsx(DI,{...s,...r,ref:e})});qq.displayName=NCe;var MCe="ContextMenuRadioGroup",OCe=_.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,s=ki(n);return P.jsx(NI,{...s,...r,ref:e})});OCe.displayName=MCe;var LCe="ContextMenuRadioItem",Gq=_.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,s=ki(n);return P.jsx(MI,{...s,...r,ref:e})});Gq.displayName=LCe;var ICe="ContextMenuItemIndicator",Kq=_.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,s=ki(n);return P.jsx(OI,{...s,...r,ref:e})});Kq.displayName=ICe;var $Ce="ContextMenuSeparator",Yq=_.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,s=ki(n);return P.jsx(LI,{...s,...r,ref:e})});Yq.displayName=$Ce;var jCe="ContextMenuArrow",FCe=_.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,s=ki(n);return P.jsx(II,{...s,...r,ref:e})});FCe.displayName=jCe;var zCe="ContextMenuSubTrigger",Xq=_.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,s=ki(n);return P.jsx($I,{...s,...r,ref:e})});Xq.displayName=zCe;var BCe="ContextMenuSubContent",Qq=_.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,s=ki(n);return P.jsx(jI,{...s,...r,ref:e,style:{...t.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Qq.displayName=BCe;function uS(t){return e=>e.pointerType!=="mouse"?t(e):void 0}var UCe=Bq,Jq=Hq,Zq=Wq,eG=Vq,tG=qq,nG=Gq,rG=Kq,sG=Yq,iG=Xq,oG=Qq;const HCe=_.forwardRef(({className:t,inset:e,children:n,...r},s)=>P.jsxs(iG,{ref:s,className:ce("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",e&&"pl-8",t),...r,children:[n,P.jsx(s_,{className:"ml-auto h-4 w-4"})]}));HCe.displayName=iG.displayName;const WCe=_.forwardRef(({className:t,...e},n)=>P.jsx(oG,{ref:n,className:ce("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...e}));WCe.displayName=oG.displayName;const VCe=_.forwardRef(({className:t,...e},n)=>P.jsx(UCe,{children:P.jsx(Jq,{ref:n,className:ce("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...e})}));VCe.displayName=Jq.displayName;const qCe=_.forwardRef(({className:t,inset:e,...n},r)=>P.jsx(eG,{ref:r,className:ce("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e&&"pl-8",t),...n}));qCe.displayName=eG.displayName;const GCe=_.forwardRef(({className:t,children:e,checked:n,...r},s)=>P.jsxs(tG,{ref:s,className:ce("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),checked:n,...r,children:[P.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:P.jsx(rG,{children:P.jsx(r_,{className:"h-4 w-4"})})}),e]}));GCe.displayName=tG.displayName;const KCe=_.forwardRef(({className:t,children:e,...n},r)=>P.jsxs(nG,{ref:r,className:ce("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...n,children:[P.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:P.jsx(rG,{children:P.jsx(jC,{className:"h-2 w-2 fill-current"})})}),e]}));KCe.displayName=nG.displayName;const YCe=_.forwardRef(({className:t,inset:e,...n},r)=>P.jsx(Zq,{ref:r,className:ce("px-2 py-1.5 text-sm font-semibold text-foreground",e&&"pl-8",t),...n}));YCe.displayName=Zq.displayName;const XCe=_.forwardRef(({className:t,...e},n)=>P.jsx(sG,{ref:n,className:ce("-mx-1 my-1 h-px bg-border",t),...e}));XCe.displayName=sG.displayName;function Sd(t,e,{checkForDefaultPrevented:n=!0}={}){return function(s){if(t==null||t(s),n===!1||!s.defaultPrevented)return e==null?void 0:e(s)}}function pB(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function aG(...t){return e=>{let n=!1;const r=t.map(s=>{const i=pB(s,e);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s{const{children:a,...o}=i,c=_.useMemo(()=>o,Object.values(o));return P.jsx(n.Provider,{value:c,children:a})};r.displayName=t+"Provider";function s(i){const a=_.useContext(n);if(a)return a;if(e!==void 0)return e;throw new Error(`\`${i}\` must be used within \`${t}\``)}return[r,s]}function JCe(t,e=[]){let n=[];function r(i,a){const o=_.createContext(a),c=n.length;n=[...n,a];const u=l=>{var g;const{scope:d,children:m,...p}=l,h=((g=d==null?void 0:d[t])==null?void 0:g[c])||o,y=_.useMemo(()=>p,Object.values(p));return P.jsx(h.Provider,{value:y,children:m})};u.displayName=i+"Provider";function f(l,d){var h;const m=((h=d==null?void 0:d[t])==null?void 0:h[c])||o,p=_.useContext(m);if(p)return p;if(a!==void 0)return a;throw new Error(`\`${l}\` must be used within \`${i}\``)}return[u,f]}const s=()=>{const i=n.map(a=>_.createContext(a));return function(o){const c=(o==null?void 0:o[t])||i;return _.useMemo(()=>({[`__scope${t}`]:{...o,[t]:c}}),[o,c])}};return s.scopeName=t,[r,ZCe(s,...e)]}function ZCe(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const a=r.reduce((o,{useScope:c,scopeName:u})=>{const l=c(i)[`__scope${u}`];return{...o,...l}},{});return _.useMemo(()=>({[`__scope${e.scopeName}`]:a}),[a])}};return n.scopeName=e.scopeName,n}var FI=_.forwardRef((t,e)=>{const{children:n,...r}=t,s=_.Children.toArray(n),i=s.find(tAe);if(i){const a=i.props.children,o=s.map(c=>c===i?_.Children.count(a)>1?_.Children.only(null):_.isValidElement(a)?a.props.children:null:c);return P.jsx(XD,{...r,ref:e,children:_.isValidElement(a)?_.cloneElement(a,void 0,o):null})}return P.jsx(XD,{...r,ref:e,children:n})});FI.displayName="Slot";var XD=_.forwardRef((t,e)=>{const{children:n,...r}=t;if(_.isValidElement(n)){const s=rAe(n),i=nAe(r,n.props);return n.type!==_.Fragment&&(i.ref=e?aG(e,s):s),_.cloneElement(n,i)}return _.Children.count(n)>1?_.Children.only(null):null});XD.displayName="SlotClone";var eAe=({children:t})=>P.jsx(P.Fragment,{children:t});function tAe(t){return _.isValidElement(t)&&t.type===eAe}function nAe(t,e){const n={...e};for(const r in e){const s=t[r],i=e[r];/^on[A-Z]/.test(r)?s&&i?n[r]=(...o)=>{i(...o),s(...o)}:s&&(n[r]=s):r==="style"?n[r]={...s,...i}:r==="className"&&(n[r]=[s,i].filter(Boolean).join(" "))}return{...t,...n}}function rAe(t){var r,s;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var sAe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],tu=sAe.reduce((t,e)=>{const n=_.forwardRef((r,s)=>{const{asChild:i,...a}=r,o=i?FI:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),P.jsx(o,{...a,ref:s})});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{});function iAe(t,e){t&&Ns.flushSync(()=>t.dispatchEvent(e))}var oAe="DismissableLayer",QD="dismissableLayer.update",aAe="dismissableLayer.pointerDownOutside",lAe="dismissableLayer.focusOutside",mB,lG=_.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),cG=_.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:a,onDismiss:o,...c}=t,u=_.useContext(lG),[f,l]=_.useState(null),d=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=_.useState({}),p=yp(e,R=>l(R)),h=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=h.indexOf(y),v=f?h.indexOf(f):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,x=v>=g,A=dAe(R=>{const E=R.target,T=[...u.branches].some(D=>D.contains(E));!x||T||(s==null||s(R),a==null||a(R),R.defaultPrevented||o==null||o())},d),k=fAe(R=>{const E=R.target;[...u.branches].some(D=>D.contains(E))||(i==null||i(R),a==null||a(R),R.defaultPrevented||o==null||o())},d);return bV(R=>{v===u.layers.size-1&&(r==null||r(R),!R.defaultPrevented&&o&&(R.preventDefault(),o()))},d),_.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(mB=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),gB(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=mB)}},[f,d,n,u]),_.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),gB())},[f,u]),_.useEffect(()=>{const R=()=>m({});return document.addEventListener(QD,R),()=>document.removeEventListener(QD,R)},[]),P.jsx(tu.div,{...c,ref:p,style:{pointerEvents:w?x?"auto":"none":void 0,...t.style},onFocusCapture:Sd(t.onFocusCapture,k.onFocusCapture),onBlurCapture:Sd(t.onBlurCapture,k.onBlurCapture),onPointerDownCapture:Sd(t.onPointerDownCapture,A.onPointerDownCapture)})});cG.displayName=oAe;var cAe="DismissableLayerBranch",uAe=_.forwardRef((t,e)=>{const n=_.useContext(lG),r=_.useRef(null),s=yp(e,r);return _.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),P.jsx(tu.div,{...t,ref:s})});uAe.displayName=cAe;function dAe(t,e=globalThis==null?void 0:globalThis.document){const n=Ut(t),r=_.useRef(!1),s=_.useRef(()=>{});return _.useEffect(()=>{const i=o=>{if(o.target&&!r.current){let c=function(){uG(aAe,n,u,{discrete:!0})};const u={originalEvent:o};o.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=c,e.addEventListener("click",s.current,{once:!0})):c()}else e.removeEventListener("click",s.current);r.current=!1},a=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),e.removeEventListener("pointerdown",i),e.removeEventListener("click",s.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function fAe(t,e=globalThis==null?void 0:globalThis.document){const n=Ut(t),r=_.useRef(!1);return _.useEffect(()=>{const s=i=>{i.target&&!r.current&&uG(lAe,n,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function gB(){const t=new CustomEvent(QD);document.dispatchEvent(t)}function uG(t,e,n,{discrete:r}){const s=n.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&s.addEventListener(t,e,{once:!0}),r?iAe(s,i):s.dispatchEvent(i)}var RT="focusScope.autoFocusOnMount",PT="focusScope.autoFocusOnUnmount",vB={bubbles:!1,cancelable:!0},hAe="FocusScope",dG=_.forwardRef((t,e)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...a}=t,[o,c]=_.useState(null),u=Ut(s),f=Ut(i),l=_.useRef(null),d=yp(e,h=>c(h)),m=_.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;_.useEffect(()=>{if(r){let h=function(w){if(m.paused||!o)return;const x=w.target;o.contains(x)?l.current=x:_u(l.current,{select:!0})},y=function(w){if(m.paused||!o)return;const x=w.relatedTarget;x!==null&&(o.contains(x)||_u(l.current,{select:!0}))},g=function(w){if(document.activeElement===document.body)for(const A of w)A.removedNodes.length>0&&_u(o)};document.addEventListener("focusin",h),document.addEventListener("focusout",y);const v=new MutationObserver(g);return o&&v.observe(o,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",y),v.disconnect()}}},[r,o,m.paused]),_.useEffect(()=>{if(o){bB.add(m);const h=document.activeElement;if(!o.contains(h)){const g=new CustomEvent(RT,vB);o.addEventListener(RT,u),o.dispatchEvent(g),g.defaultPrevented||(pAe(bAe(fG(o)),{select:!0}),document.activeElement===h&&_u(o))}return()=>{o.removeEventListener(RT,u),setTimeout(()=>{const g=new CustomEvent(PT,vB);o.addEventListener(PT,f),o.dispatchEvent(g),g.defaultPrevented||_u(h??document.body,{select:!0}),o.removeEventListener(PT,f),bB.remove(m)},0)}}},[o,u,f,m]);const p=_.useCallback(h=>{if(!n&&!r||m.paused)return;const y=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,g=document.activeElement;if(y&&g){const v=h.currentTarget,[w,x]=mAe(v);w&&x?!h.shiftKey&&g===x?(h.preventDefault(),n&&_u(w,{select:!0})):h.shiftKey&&g===w&&(h.preventDefault(),n&&_u(x,{select:!0})):g===v&&h.preventDefault()}},[n,r,m.paused]);return P.jsx(tu.div,{tabIndex:-1,...a,ref:d,onKeyDown:p})});dG.displayName=hAe;function pAe(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(_u(r,{select:e}),document.activeElement!==n)return}function mAe(t){const e=fG(t),n=yB(e,t),r=yB(e.reverse(),t);return[n,r]}function fG(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function yB(t,e){for(const n of t)if(!gAe(n,{upTo:e}))return n}function gAe(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function vAe(t){return t instanceof HTMLInputElement&&"select"in t}function _u(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&vAe(t)&&e&&t.select()}}var bB=yAe();function yAe(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=wB(t,e),t.unshift(e)},remove(e){var n;t=wB(t,e),(n=t[0])==null||n.resume()}}}function wB(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}function bAe(t){return t.filter(e=>e.tagName!=="A")}var wAe="Portal",hG=_.forwardRef((t,e)=>{var o;const{container:n,...r}=t,[s,i]=_.useState(!1);Ln(()=>i(!0),[]);const a=n||s&&((o=globalThis==null?void 0:globalThis.document)==null?void 0:o.body);return a?t_.createPortal(P.jsx(tu.div,{...r,ref:e}),a):null});hG.displayName=wAe;function _Ae(t,e){return _.useReducer((n,r)=>e[n][r]??n,t)}var mA=t=>{const{present:e,children:n}=t,r=xAe(e),s=typeof n=="function"?n({present:r.isPresent}):_.Children.only(n),i=yp(r.ref,SAe(s));return typeof n=="function"||r.isPresent?_.cloneElement(s,{ref:i}):null};mA.displayName="Presence";function xAe(t){const[e,n]=_.useState(),r=_.useRef({}),s=_.useRef(t),i=_.useRef("none"),a=t?"mounted":"unmounted",[o,c]=_Ae(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return _.useEffect(()=>{const u=dS(r.current);i.current=o==="mounted"?u:"none"},[o]),Ln(()=>{const u=r.current,f=s.current;if(f!==t){const d=i.current,m=dS(u);t?c("MOUNT"):m==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(f&&d!==m?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,c]),Ln(()=>{if(e){let u;const f=e.ownerDocument.defaultView??window,l=m=>{const h=dS(r.current).includes(m.animationName);if(m.target===e&&h&&(c("ANIMATION_END"),!s.current)){const y=e.style.animationFillMode;e.style.animationFillMode="forwards",u=f.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=y)})}},d=m=>{m.target===e&&(i.current=dS(r.current))};return e.addEventListener("animationstart",d),e.addEventListener("animationcancel",l),e.addEventListener("animationend",l),()=>{f.clearTimeout(u),e.removeEventListener("animationstart",d),e.removeEventListener("animationcancel",l),e.removeEventListener("animationend",l)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:_.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function dS(t){return(t==null?void 0:t.animationName)||"none"}function SAe(t){var r,s;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var TT=0;function EAe(){_.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??_B()),document.body.insertAdjacentElement("beforeend",t[1]??_B()),TT++,()=>{TT===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),TT--}},[])}function _B(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var pG=_L(),kT=function(){},gA=_.forwardRef(function(t,e){var n=_.useRef(null),r=_.useState({onScrollCapture:kT,onWheelCapture:kT,onTouchMoveCapture:kT}),s=r[0],i=r[1],a=t.forwardProps,o=t.children,c=t.className,u=t.removeScrollBar,f=t.enabled,l=t.shards,d=t.sideCar,m=t.noIsolation,p=t.inert,h=t.allowPinchZoom,y=t.as,g=y===void 0?"div":y,v=t.gapMode,w=zC(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=d,A=wL([n,e]),k=fr(fr({},w),s);return _.createElement(_.Fragment,null,f&&_.createElement(x,{sideCar:pG,removeScrollBar:u,shards:l,noIsolation:m,inert:p,setCallbacks:i,allowPinchZoom:!!h,lockRef:n,gapMode:v}),a?_.cloneElement(_.Children.only(o),fr(fr({},k),{ref:A})):_.createElement(g,fr({},k,{className:c,ref:A}),o))});gA.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};gA.classNames={fullWidth:Im,zeroRight:Lm};var JD=!1;if(typeof window<"u")try{var fS=Object.defineProperty({},"passive",{get:function(){return JD=!0,!0}});window.addEventListener("test",fS,fS),window.removeEventListener("test",fS,fS)}catch{JD=!1}var Vp=JD?{passive:!1}:!1,CAe=function(t){return t.tagName==="TEXTAREA"},mG=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!CAe(t)&&n[e]==="visible")},AAe=function(t){return mG(t,"overflowY")},RAe=function(t){return mG(t,"overflowX")},xB=function(t,e){var n=e.ownerDocument,r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=gG(t,r);if(s){var i=vG(t,r),a=i[1],o=i[2];if(a>o)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},PAe=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},TAe=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},gG=function(t,e){return t==="v"?AAe(e):RAe(e)},vG=function(t,e){return t==="v"?PAe(e):TAe(e)},kAe=function(t,e){return t==="h"&&e==="rtl"?-1:1},DAe=function(t,e,n,r,s){var i=kAe(t,window.getComputedStyle(e).direction),a=i*r,o=n.target,c=e.contains(o),u=!1,f=a>0,l=0,d=0;do{var m=vG(t,o),p=m[0],h=m[1],y=m[2],g=h-y-i*p;(p||g)&&gG(t,o)&&(l+=g,d+=p),o instanceof ShadowRoot?o=o.host:o=o.parentNode}while(!c&&o!==document.body||c&&(e.contains(o)||e===o));return(f&&Math.abs(l)<1||!f&&Math.abs(d)<1)&&(u=!0),u},hS=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},SB=function(t){return[t.deltaX,t.deltaY]},EB=function(t){return t&&"current"in t?t.current:t},NAe=function(t,e){return t[0]===e[0]&&t[1]===e[1]},MAe=function(t){return` +For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return _.useEffect(()=>{t&&(document.getElementById(t)||console.error(n))},[n,t]),null},aEe="DialogDescriptionWarning",lEe=({contentRef:t,descriptionId:e})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${N8(aEe).contentName}}.`;return _.useEffect(()=>{var i;const s=(i=t.current)==null?void 0:i.getAttribute("aria-describedby");e&&s&&(document.getElementById(e)||console.warn(r))},[r,t,e]),null},cEe=x8,uEe=C8,dEe=A8,fEe=R8,by='[cmdk-group=""]',ET='[cmdk-group-items=""]',hEe='[cmdk-group-heading=""]',M8='[cmdk-item=""]',rB=`${M8}:not([aria-disabled="true"])`,VD="cmdk-item-select",tm="data-value",pEe=(t,e,n)=>sSe(t,e,n),O8=_.createContext(void 0),y0=()=>_.useContext(O8),L8=_.createContext(void 0),cI=()=>_.useContext(L8),I8=_.createContext(void 0),$8=_.forwardRef((t,e)=>{let n=nm(()=>{var G,K;return{search:"",value:(K=(G=t.value)!=null?G:t.defaultValue)!=null?K:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=nm(()=>new Set),s=nm(()=>new Map),i=nm(()=>new Map),a=nm(()=>new Set),o=j8(t),{label:c,children:u,value:f,onValueChange:l,filter:d,shouldFilter:m,loop:p,disablePointerSelection:h=!1,vimBindings:y=!0,...g}=t,v=Oc(),w=Oc(),x=Oc(),A=_.useRef(null),k=CEe();Qh(()=>{if(f!==void 0){let G=f.trim();n.current.value=G,R.emit()}},[f]),Qh(()=>{k(6,I)},[]);let R=_.useMemo(()=>({subscribe:G=>(a.current.add(G),()=>a.current.delete(G)),snapshot:()=>n.current,setState:(G,K,J)=>{var ue,de,ie,be;if(!Object.is(n.current[G],K)){if(n.current[G]=K,G==="search")L(),D(),k(1,M);else if(G==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let Ae=document.getElementById(x);Ae?Ae.focus():(ue=document.getElementById(v))==null||ue.focus()}if(k(7,()=>{var Ae;n.current.selectedItemId=(Ae=j())==null?void 0:Ae.id,R.emit()}),J||k(5,I),((de=o.current)==null?void 0:de.value)!==void 0){let Ae=K??"";(be=(ie=o.current).onValueChange)==null||be.call(ie,Ae);return}}R.emit()}},emit:()=>{a.current.forEach(G=>G())}}),[]),E=_.useMemo(()=>({value:(G,K,J)=>{var ue;K!==((ue=i.current.get(G))==null?void 0:ue.value)&&(i.current.set(G,{value:K,keywords:J}),n.current.filtered.items.set(G,T(K,J)),k(2,()=>{D(),R.emit()}))},item:(G,K)=>(r.current.add(G),K&&(s.current.has(K)?s.current.get(K).add(G):s.current.set(K,new Set([G]))),k(3,()=>{L(),D(),n.current.value||M(),R.emit()}),()=>{i.current.delete(G),r.current.delete(G),n.current.filtered.items.delete(G);let J=j();k(4,()=>{L(),(J==null?void 0:J.getAttribute("id"))===G&&M(),R.emit()})}),group:G=>(s.current.has(G)||s.current.set(G,new Set),()=>{i.current.delete(G),s.current.delete(G)}),filter:()=>o.current.shouldFilter,label:c||t["aria-label"],getDisablePointerSelection:()=>o.current.disablePointerSelection,listId:v,inputId:x,labelId:w,listInnerRef:A}),[]);function T(G,K){var J,ue;let de=(ue=(J=o.current)==null?void 0:J.filter)!=null?ue:pEe;return G?de(G,n.current.search,K):0}function D(){if(!n.current.search||o.current.shouldFilter===!1)return;let G=n.current.filtered.items,K=[];n.current.filtered.groups.forEach(ue=>{let de=s.current.get(ue),ie=0;de.forEach(be=>{let Ae=G.get(be);ie=Math.max(Ae,ie)}),K.push([ue,ie])});let J=A.current;U().sort((ue,de)=>{var ie,be;let Ae=ue.getAttribute("id"),_e=de.getAttribute("id");return((ie=G.get(_e))!=null?ie:0)-((be=G.get(Ae))!=null?be:0)}).forEach(ue=>{let de=ue.closest(ET);de?de.appendChild(ue.parentElement===de?ue:ue.closest(`${ET} > *`)):J.appendChild(ue.parentElement===J?ue:ue.closest(`${ET} > *`))}),K.sort((ue,de)=>de[1]-ue[1]).forEach(ue=>{var de;let ie=(de=A.current)==null?void 0:de.querySelector(`${by}[${tm}="${encodeURIComponent(ue[0])}"]`);ie==null||ie.parentElement.appendChild(ie)})}function M(){let G=U().find(J=>J.getAttribute("aria-disabled")!=="true"),K=G==null?void 0:G.getAttribute(tm);R.setState("value",K||void 0)}function L(){var G,K,J,ue;if(!n.current.search||o.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let de=0;for(let ie of r.current){let be=(K=(G=i.current.get(ie))==null?void 0:G.value)!=null?K:"",Ae=(ue=(J=i.current.get(ie))==null?void 0:J.keywords)!=null?ue:[],_e=T(be,Ae);n.current.filtered.items.set(ie,_e),_e>0&&de++}for(let[ie,be]of s.current)for(let Ae of be)if(n.current.filtered.items.get(Ae)>0){n.current.filtered.groups.add(ie);break}n.current.filtered.count=de}function I(){var G,K,J;let ue=j();ue&&(((G=ue.parentElement)==null?void 0:G.firstChild)===ue&&((J=(K=ue.closest(by))==null?void 0:K.querySelector(hEe))==null||J.scrollIntoView({block:"nearest"})),ue.scrollIntoView({block:"nearest"}))}function j(){var G;return(G=A.current)==null?void 0:G.querySelector(`${M8}[aria-selected="true"]`)}function U(){var G;return Array.from(((G=A.current)==null?void 0:G.querySelectorAll(rB))||[])}function Y(G){let K=U()[G];K&&R.setState("value",K.getAttribute(tm))}function W(G){var K;let J=j(),ue=U(),de=ue.findIndex(be=>be===J),ie=ue[de+G];(K=o.current)!=null&&K.loop&&(ie=de+G<0?ue[ue.length-1]:de+G===ue.length?ue[0]:ue[de+G]),ie&&R.setState("value",ie.getAttribute(tm))}function H(G){let K=j(),J=K==null?void 0:K.closest(by),ue;for(;J&&!ue;)J=G>0?SEe(J,by):EEe(J,by),ue=J==null?void 0:J.querySelector(rB);ue?R.setState("value",ue.getAttribute(tm)):W(G)}let ee=()=>Y(U().length-1),re=G=>{G.preventDefault(),G.metaKey?ee():G.altKey?H(1):W(1)},X=G=>{G.preventDefault(),G.metaKey?Y(0):G.altKey?H(-1):W(-1)};return _.createElement(ms.div,{ref:e,tabIndex:-1,...g,"cmdk-root":"",onKeyDown:G=>{var K;(K=g.onKeyDown)==null||K.call(g,G);let J=G.nativeEvent.isComposing||G.keyCode===229;if(!(G.defaultPrevented||J))switch(G.key){case"n":case"j":{y&&G.ctrlKey&&re(G);break}case"ArrowDown":{re(G);break}case"p":case"k":{y&&G.ctrlKey&&X(G);break}case"ArrowUp":{X(G);break}case"Home":{G.preventDefault(),Y(0);break}case"End":{G.preventDefault(),ee();break}case"Enter":{G.preventDefault();let ue=j();if(ue){let de=new Event(VD);ue.dispatchEvent(de)}}}}},_.createElement("label",{"cmdk-label":"",htmlFor:E.inputId,id:E.labelId,style:REe},c),lA(t,G=>_.createElement(L8.Provider,{value:R},_.createElement(O8.Provider,{value:E},G))))}),mEe=_.forwardRef((t,e)=>{var n,r;let s=Oc(),i=_.useRef(null),a=_.useContext(I8),o=y0(),c=j8(t),u=(r=(n=c.current)==null?void 0:n.forceMount)!=null?r:a==null?void 0:a.forceMount;Qh(()=>{if(!u)return o.item(s,a==null?void 0:a.id)},[u]);let f=F8(s,i,[t.value,t.children,i],t.keywords),l=cI(),d=Ad(k=>k.value&&k.value===f.current),m=Ad(k=>u||o.filter()===!1?!0:k.search?k.filtered.items.get(s)>0:!0);_.useEffect(()=>{let k=i.current;if(!(!k||t.disabled))return k.addEventListener(VD,p),()=>k.removeEventListener(VD,p)},[m,t.onSelect,t.disabled]);function p(){var k,R;h(),(R=(k=c.current).onSelect)==null||R.call(k,f.current)}function h(){l.setState("value",f.current,!0)}if(!m)return null;let{disabled:y,value:g,onSelect:v,forceMount:w,keywords:x,...A}=t;return _.createElement(ms.div,{ref:Kh(i,e),...A,id:s,"cmdk-item":"",role:"option","aria-disabled":!!y,"aria-selected":!!d,"data-disabled":!!y,"data-selected":!!d,onPointerMove:y||o.getDisablePointerSelection()?void 0:h,onClick:y?void 0:p},t.children)}),gEe=_.forwardRef((t,e)=>{let{heading:n,children:r,forceMount:s,...i}=t,a=Oc(),o=_.useRef(null),c=_.useRef(null),u=Oc(),f=y0(),l=Ad(m=>s||f.filter()===!1?!0:m.search?m.filtered.groups.has(a):!0);Qh(()=>f.group(a),[]),F8(a,o,[t.value,t.heading,c]);let d=_.useMemo(()=>({id:a,forceMount:s}),[s]);return _.createElement(ms.div,{ref:Kh(o,e),...i,"cmdk-group":"",role:"presentation",hidden:l?void 0:!0},n&&_.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),lA(t,m=>_.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},_.createElement(I8.Provider,{value:d},m))))}),vEe=_.forwardRef((t,e)=>{let{alwaysRender:n,...r}=t,s=_.useRef(null),i=Ad(a=>!a.search);return!n&&!i?null:_.createElement(ms.div,{ref:Kh(s,e),...r,"cmdk-separator":"",role:"separator"})}),yEe=_.forwardRef((t,e)=>{let{onValueChange:n,...r}=t,s=t.value!=null,i=cI(),a=Ad(u=>u.search),o=Ad(u=>u.selectedItemId),c=y0();return _.useEffect(()=>{t.value!=null&&i.setState("search",t.value)},[t.value]),_.createElement(ms.input,{ref:e,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":o,id:c.inputId,type:"text",value:s?t.value:a,onChange:u=>{s||i.setState("search",u.target.value),n==null||n(u.target.value)}})}),bEe=_.forwardRef((t,e)=>{let{children:n,label:r="Suggestions",...s}=t,i=_.useRef(null),a=_.useRef(null),o=Ad(u=>u.selectedItemId),c=y0();return _.useEffect(()=>{if(a.current&&i.current){let u=a.current,f=i.current,l,d=new ResizeObserver(()=>{l=requestAnimationFrame(()=>{let m=u.offsetHeight;f.style.setProperty("--cmdk-list-height",m.toFixed(1)+"px")})});return d.observe(u),()=>{cancelAnimationFrame(l),d.unobserve(u)}}},[]),_.createElement(ms.div,{ref:Kh(i,e),...s,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":o,"aria-label":r,id:c.listId},lA(t,u=>_.createElement("div",{ref:Kh(a,c.listInnerRef),"cmdk-list-sizer":""},u)))}),wEe=_.forwardRef((t,e)=>{let{open:n,onOpenChange:r,overlayClassName:s,contentClassName:i,container:a,...o}=t;return _.createElement(cEe,{open:n,onOpenChange:r},_.createElement(uEe,{container:a},_.createElement(dEe,{"cmdk-overlay":"",className:s}),_.createElement(fEe,{"aria-label":t.label,"cmdk-dialog":"",className:i},_.createElement($8,{ref:e,...o}))))}),_Ee=_.forwardRef((t,e)=>Ad(n=>n.filtered.count===0)?_.createElement(ms.div,{ref:e,...t,"cmdk-empty":"",role:"presentation"}):null),xEe=_.forwardRef((t,e)=>{let{progress:n,children:r,label:s="Loading...",...i}=t;return _.createElement(ms.div,{ref:e,...i,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":s},lA(t,a=>_.createElement("div",{"aria-hidden":!0},a)))}),Ti=Object.assign($8,{List:bEe,Item:mEe,Input:yEe,Group:gEe,Separator:vEe,Dialog:wEe,Empty:_Ee,Loading:xEe});function SEe(t,e){let n=t.nextElementSibling;for(;n;){if(n.matches(e))return n;n=n.nextElementSibling}}function EEe(t,e){let n=t.previousElementSibling;for(;n;){if(n.matches(e))return n;n=n.previousElementSibling}}function j8(t){let e=_.useRef(t);return Qh(()=>{e.current=t}),e}var Qh=typeof window>"u"?_.useEffect:_.useLayoutEffect;function nm(t){let e=_.useRef();return e.current===void 0&&(e.current=t()),e}function Ad(t){let e=cI(),n=()=>t(e.snapshot());return _.useSyncExternalStore(e.subscribe,n,n)}function F8(t,e,n,r=[]){let s=_.useRef(),i=y0();return Qh(()=>{var a;let o=(()=>{var u;for(let f of n){if(typeof f=="string")return f.trim();if(typeof f=="object"&&"current"in f)return f.current?(u=f.current.textContent)==null?void 0:u.trim():s.current}})(),c=r.map(u=>u.trim());i.value(t,o,c),(a=e.current)==null||a.setAttribute(tm,o),s.current=o}),s}var CEe=()=>{let[t,e]=_.useState(),n=nm(()=>new Map);return Qh(()=>{n.current.forEach(r=>r()),n.current=new Map},[t]),(r,s)=>{n.current.set(r,s),e({})}};function AEe(t){let e=t.type;return typeof e=="function"?e(t.props):"render"in e?e.render(t.props):t}function lA({asChild:t,children:e},n){return t&&_.isValidElement(e)?_.cloneElement(AEe(e),{ref:e.ref},n(e.props.children)):n(e)}var REe={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const PEe=PL,TEe=TL,kEe=kL,FHe=d0,z8=_.forwardRef(({className:t,...e},n)=>P.jsx(a0,{ref:n,className:ce("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",t),...e}));z8.displayName=a0.displayName;const B8=_.forwardRef(({className:t,children:e,...n},r)=>P.jsxs(kEe,{children:[P.jsx(z8,{}),P.jsxs(l0,{ref:r,className:ce("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",t),...n,children:[e,P.jsxs(d0,{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:[P.jsx(vL,{className:"h-4 w-4"}),P.jsx("span",{className:"sr-only",children:ft("common.close")})]})]})]}));B8.displayName=l0.displayName;const U8=({className:t,...e})=>P.jsx("div",{className:ce("flex flex-col space-y-1.5 text-center sm:text-left",t),...e});U8.displayName="DialogHeader";const H8=({className:t,...e})=>P.jsx("div",{className:ce("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...e});H8.displayName="DialogFooter";const W8=_.forwardRef(({className:t,...e},n)=>P.jsx(c0,{ref:n,className:ce("text-lg font-semibold leading-none tracking-tight",t),...e}));W8.displayName=c0.displayName;const V8=_.forwardRef(({className:t,...e},n)=>P.jsx(u0,{ref:n,className:ce("text-sm text-muted-foreground",t),...e}));V8.displayName=u0.displayName;const DEe=_.forwardRef(({className:t,...e},n)=>P.jsx(Ti,{ref:n,className:ce("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",t),...e}));DEe.displayName=Ti.displayName;const NEe=_.forwardRef(({className:t,...e},n)=>P.jsxs("div",{className:"flex items-center px-3 border-b","cmdk-input-wrapper":"",children:[P.jsx(Ffe,{className:"w-4 h-4 mr-2 opacity-50 shrink-0"}),P.jsx(Ti.Input,{ref:n,className:ce("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",t),...e})]}));NEe.displayName=Ti.Input.displayName;const MEe=_.forwardRef(({className:t,...e},n)=>P.jsx(Ti.List,{ref:n,className:ce("max-h-[300px] overflow-y-auto overflow-x-hidden",t),...e}));MEe.displayName=Ti.List.displayName;const OEe=_.forwardRef((t,e)=>P.jsx(Ti.Empty,{ref:e,className:"py-6 text-sm text-center",...t}));OEe.displayName=Ti.Empty.displayName;const LEe=_.forwardRef(({className:t,...e},n)=>P.jsx(Ti.Group,{ref:n,className:ce("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",t),...e}));LEe.displayName=Ti.Group.displayName;const IEe=_.forwardRef(({className:t,...e},n)=>P.jsx(Ti.Separator,{ref:n,className:ce("-mx-1 h-px bg-border",t),...e}));IEe.displayName=Ti.Separator.displayName;const $Ee=_.forwardRef(({className:t,...e},n)=>P.jsx(Ti.Item,{ref:n,className:ce("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...e}));$Ee.displayName=Ti.Item.displayName;const jEe=["top","right","bottom","left"],ml=Math.min,to=Math.max,uC=Math.round,cS=Math.floor,Rd=t=>({x:t,y:t}),FEe={left:"right",right:"left",bottom:"top",top:"bottom"},zEe={start:"end",end:"start"};function qD(t,e,n){return to(t,ml(e,n))}function Vc(t,e){return typeof t=="function"?t(e):t}function qc(t){return t.split("-")[0]}function Tv(t){return t.split("-")[1]}function uI(t){return t==="x"?"y":"x"}function dI(t){return t==="y"?"height":"width"}function Pd(t){return["top","bottom"].includes(qc(t))?"y":"x"}function fI(t){return uI(Pd(t))}function BEe(t,e,n){n===void 0&&(n=!1);const r=Tv(t),s=fI(t),i=dI(s);let a=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(a=dC(a)),[a,dC(a)]}function UEe(t){const e=dC(t);return[GD(t),e,GD(e)]}function GD(t){return t.replace(/start|end/g,e=>zEe[e])}function HEe(t,e,n){const r=["left","right"],s=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(t){case"top":case"bottom":return n?e?s:r:e?r:s;case"left":case"right":return e?i:a;default:return[]}}function WEe(t,e,n,r){const s=Tv(t);let i=HEe(qc(t),n==="start",r);return s&&(i=i.map(a=>a+"-"+s),e&&(i=i.concat(i.map(GD)))),i}function dC(t){return t.replace(/left|right|bottom|top/g,e=>FEe[e])}function VEe(t){return{top:0,right:0,bottom:0,left:0,...t}}function q8(t){return typeof t!="number"?VEe(t):{top:t,right:t,bottom:t,left:t}}function fC(t){const{x:e,y:n,width:r,height:s}=t;return{width:r,height:s,top:n,left:e,right:e+r,bottom:n+s,x:e,y:n}}function sB(t,e,n){let{reference:r,floating:s}=t;const i=Pd(e),a=fI(e),o=dI(a),c=qc(e),u=i==="y",f=r.x+r.width/2-s.width/2,l=r.y+r.height/2-s.height/2,d=r[o]/2-s[o]/2;let m;switch(c){case"top":m={x:f,y:r.y-s.height};break;case"bottom":m={x:f,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:l};break;case"left":m={x:r.x-s.width,y:l};break;default:m={x:r.x,y:r.y}}switch(Tv(e)){case"start":m[a]-=d*(n&&u?-1:1);break;case"end":m[a]+=d*(n&&u?-1:1);break}return m}const qEe=async(t,e,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:i=[],platform:a}=n,o=i.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(e));let u=await a.getElementRects({reference:t,floating:e,strategy:s}),{x:f,y:l}=sB(u,r,c),d=r,m={},p=0;for(let h=0;h({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:s,rects:i,platform:a,elements:o,middlewareData:c}=e,{element:u,padding:f=0}=Vc(t,e)||{};if(u==null)return{};const l=q8(f),d={x:n,y:r},m=fI(s),p=dI(m),h=await a.getDimensions(u),y=m==="y",g=y?"top":"left",v=y?"bottom":"right",w=y?"clientHeight":"clientWidth",x=i.reference[p]+i.reference[m]-d[m]-i.floating[p],A=d[m]-i.reference[m],k=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let R=k?k[w]:0;(!R||!await(a.isElement==null?void 0:a.isElement(k)))&&(R=o.floating[w]||i.floating[p]);const E=x/2-A/2,T=R/2-h[p]/2-1,D=ml(l[g],T),M=ml(l[v],T),L=D,I=R-h[p]-M,j=R/2-h[p]/2+E,U=qD(L,j,I),Y=!c.arrow&&Tv(s)!=null&&j!==U&&i.reference[p]/2-(jj<=0)){var M,L;const j=(((M=i.flip)==null?void 0:M.index)||0)+1,U=R[j];if(U)return{data:{index:j,overflows:D},reset:{placement:U}};let Y=(L=D.filter(W=>W.overflows[0]<=0).sort((W,H)=>W.overflows[1]-H.overflows[1])[0])==null?void 0:L.placement;if(!Y)switch(m){case"bestFit":{var I;const W=(I=D.filter(H=>{if(k){const ee=Pd(H.placement);return ee===v||ee==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(ee=>ee>0).reduce((ee,re)=>ee+re,0)]).sort((H,ee)=>H[1]-ee[1])[0])==null?void 0:I[0];W&&(Y=W);break}case"initialPlacement":Y=o;break}if(s!==Y)return{reset:{placement:Y}}}return{}}}};function iB(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function oB(t){return jEe.some(e=>t[e]>=0)}const YEe=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:r="referenceHidden",...s}=Vc(t,e);switch(r){case"referenceHidden":{const i=await Yb(e,{...s,elementContext:"reference"}),a=iB(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:oB(a)}}}case"escaped":{const i=await Yb(e,{...s,altBoundary:!0}),a=iB(i,n.floating);return{data:{escapedOffsets:a,escaped:oB(a)}}}default:return{}}}}};async function XEe(t,e){const{placement:n,platform:r,elements:s}=t,i=await(r.isRTL==null?void 0:r.isRTL(s.floating)),a=qc(n),o=Tv(n),c=Pd(n)==="y",u=["left","top"].includes(a)?-1:1,f=i&&c?-1:1,l=Vc(e,t);let{mainAxis:d,crossAxis:m,alignmentAxis:p}=typeof l=="number"?{mainAxis:l,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...l};return o&&typeof p=="number"&&(m=o==="end"?p*-1:p),c?{x:m*f,y:d*u}:{x:d*u,y:m*f}}const QEe=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:s,y:i,placement:a,middlewareData:o}=e,c=await XEe(e,t);return a===((n=o.offset)==null?void 0:n.placement)&&(r=o.arrow)!=null&&r.alignmentOffset?{}:{x:s+c.x,y:i+c.y,data:{...c,placement:a}}}}},JEe=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:s}=e,{mainAxis:i=!0,crossAxis:a=!1,limiter:o={fn:y=>{let{x:g,y:v}=y;return{x:g,y:v}}},...c}=Vc(t,e),u={x:n,y:r},f=await Yb(e,c),l=Pd(qc(s)),d=uI(l);let m=u[d],p=u[l];if(i){const y=d==="y"?"top":"left",g=d==="y"?"bottom":"right",v=m+f[y],w=m-f[g];m=qD(v,m,w)}if(a){const y=l==="y"?"top":"left",g=l==="y"?"bottom":"right",v=p+f[y],w=p-f[g];p=qD(v,p,w)}const h=o.fn({...e,[d]:m,[l]:p});return{...h,data:{x:h.x-n,y:h.y-r}}}}},ZEe=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:s,rects:i,middlewareData:a}=e,{offset:o=0,mainAxis:c=!0,crossAxis:u=!0}=Vc(t,e),f={x:n,y:r},l=Pd(s),d=uI(l);let m=f[d],p=f[l];const h=Vc(o,e),y=typeof h=="number"?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){const w=d==="y"?"height":"width",x=i.reference[d]-i.floating[w]+y.mainAxis,A=i.reference[d]+i.reference[w]-y.mainAxis;mA&&(m=A)}if(u){var g,v;const w=d==="y"?"width":"height",x=["top","left"].includes(qc(s)),A=i.reference[l]-i.floating[w]+(x&&((g=a.offset)==null?void 0:g[l])||0)+(x?0:y.crossAxis),k=i.reference[l]+i.reference[w]+(x?0:((v=a.offset)==null?void 0:v[l])||0)-(x?y.crossAxis:0);pk&&(p=k)}return{[d]:m,[l]:p}}}},eCe=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:n,rects:r,platform:s,elements:i}=e,{apply:a=()=>{},...o}=Vc(t,e),c=await Yb(e,o),u=qc(n),f=Tv(n),l=Pd(n)==="y",{width:d,height:m}=r.floating;let p,h;u==="top"||u==="bottom"?(p=u,h=f===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(h=u,p=f==="end"?"top":"bottom");const y=m-c.top-c.bottom,g=d-c.left-c.right,v=ml(m-c[p],y),w=ml(d-c[h],g),x=!e.middlewareData.shift;let A=v,k=w;if(l?k=f||x?ml(w,g):g:A=f||x?ml(v,y):y,x&&!f){const E=to(c.left,0),T=to(c.right,0),D=to(c.top,0),M=to(c.bottom,0);l?k=d-2*(E!==0||T!==0?E+T:to(c.left,c.right)):A=m-2*(D!==0||M!==0?D+M:to(c.top,c.bottom))}await a({...e,availableWidth:k,availableHeight:A});const R=await s.getDimensions(i.floating);return d!==R.width||m!==R.height?{reset:{rects:!0}}:{}}}};function kv(t){return G8(t)?(t.nodeName||"").toLowerCase():"#document"}function io(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function eu(t){var e;return(e=(G8(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function G8(t){return t instanceof Node||t instanceof io(t).Node}function Sl(t){return t instanceof Element||t instanceof io(t).Element}function El(t){return t instanceof HTMLElement||t instanceof io(t).HTMLElement}function aB(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof io(t).ShadowRoot}function b0(t){const{overflow:e,overflowX:n,overflowY:r,display:s}=ka(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(s)}function tCe(t){return["table","td","th"].includes(kv(t))}function cA(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function hI(t){const e=pI(),n=ka(t);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function nCe(t){let e=Td(t);for(;El(e)&&!cv(e);){if(cA(e))return null;if(hI(e))return e;e=Td(e)}return null}function pI(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function cv(t){return["html","body","#document"].includes(kv(t))}function ka(t){return io(t).getComputedStyle(t)}function uA(t){return Sl(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Td(t){if(kv(t)==="html")return t;const e=t.assignedSlot||t.parentNode||aB(t)&&t.host||eu(t);return aB(e)?e.host:e}function K8(t){const e=Td(t);return cv(e)?t.ownerDocument?t.ownerDocument.body:t.body:El(e)&&b0(e)?e:K8(e)}function Xb(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const s=K8(t),i=s===((r=t.ownerDocument)==null?void 0:r.body),a=io(s);return i?e.concat(a,a.visualViewport||[],b0(s)?s:[],a.frameElement&&n?Xb(a.frameElement):[]):e.concat(s,Xb(s,[],n))}function Y8(t){const e=ka(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const s=El(t),i=s?t.offsetWidth:n,a=s?t.offsetHeight:r,o=uC(n)!==i||uC(r)!==a;return o&&(n=i,r=a),{width:n,height:r,$:o}}function mI(t){return Sl(t)?t:t.contextElement}function Fm(t){const e=mI(t);if(!El(e))return Rd(1);const n=e.getBoundingClientRect(),{width:r,height:s,$:i}=Y8(e);let a=(i?uC(n.width):n.width)/r,o=(i?uC(n.height):n.height)/s;return(!a||!Number.isFinite(a))&&(a=1),(!o||!Number.isFinite(o))&&(o=1),{x:a,y:o}}const rCe=Rd(0);function X8(t){const e=io(t);return!pI()||!e.visualViewport?rCe:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function sCe(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==io(t)?!1:e}function Jh(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const s=t.getBoundingClientRect(),i=mI(t);let a=Rd(1);e&&(r?Sl(r)&&(a=Fm(r)):a=Fm(t));const o=sCe(i,n,r)?X8(i):Rd(0);let c=(s.left+o.x)/a.x,u=(s.top+o.y)/a.y,f=s.width/a.x,l=s.height/a.y;if(i){const d=io(i),m=r&&Sl(r)?io(r):r;let p=d,h=p.frameElement;for(;h&&r&&m!==p;){const y=Fm(h),g=h.getBoundingClientRect(),v=ka(h),w=g.left+(h.clientLeft+parseFloat(v.paddingLeft))*y.x,x=g.top+(h.clientTop+parseFloat(v.paddingTop))*y.y;c*=y.x,u*=y.y,f*=y.x,l*=y.y,c+=w,u+=x,p=io(h),h=p.frameElement}}return fC({width:f,height:l,x:c,y:u})}function iCe(t){let{elements:e,rect:n,offsetParent:r,strategy:s}=t;const i=s==="fixed",a=eu(r),o=e?cA(e.floating):!1;if(r===a||o&&i)return n;let c={scrollLeft:0,scrollTop:0},u=Rd(1);const f=Rd(0),l=El(r);if((l||!l&&!i)&&((kv(r)!=="body"||b0(a))&&(c=uA(r)),El(r))){const d=Jh(r);u=Fm(r),f.x=d.x+r.clientLeft,f.y=d.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+f.x,y:n.y*u.y-c.scrollTop*u.y+f.y}}function oCe(t){return Array.from(t.getClientRects())}function Q8(t){return Jh(eu(t)).left+uA(t).scrollLeft}function aCe(t){const e=eu(t),n=uA(t),r=t.ownerDocument.body,s=to(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),i=to(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Q8(t);const o=-n.scrollTop;return ka(r).direction==="rtl"&&(a+=to(e.clientWidth,r.clientWidth)-s),{width:s,height:i,x:a,y:o}}function lCe(t,e){const n=io(t),r=eu(t),s=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,o=0,c=0;if(s){i=s.width,a=s.height;const u=pI();(!u||u&&e==="fixed")&&(o=s.offsetLeft,c=s.offsetTop)}return{width:i,height:a,x:o,y:c}}function cCe(t,e){const n=Jh(t,!0,e==="fixed"),r=n.top+t.clientTop,s=n.left+t.clientLeft,i=El(t)?Fm(t):Rd(1),a=t.clientWidth*i.x,o=t.clientHeight*i.y,c=s*i.x,u=r*i.y;return{width:a,height:o,x:c,y:u}}function lB(t,e,n){let r;if(e==="viewport")r=lCe(t,n);else if(e==="document")r=aCe(eu(t));else if(Sl(e))r=cCe(e,n);else{const s=X8(t);r={...e,x:e.x-s.x,y:e.y-s.y}}return fC(r)}function J8(t,e){const n=Td(t);return n===e||!Sl(n)||cv(n)?!1:ka(n).position==="fixed"||J8(n,e)}function uCe(t,e){const n=e.get(t);if(n)return n;let r=Xb(t,[],!1).filter(o=>Sl(o)&&kv(o)!=="body"),s=null;const i=ka(t).position==="fixed";let a=i?Td(t):t;for(;Sl(a)&&!cv(a);){const o=ka(a),c=hI(a);!c&&o.position==="fixed"&&(s=null),(i?!c&&!s:!c&&o.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||b0(a)&&!c&&J8(t,a))?r=r.filter(f=>f!==a):s=o,a=Td(a)}return e.set(t,r),r}function dCe(t){let{element:e,boundary:n,rootBoundary:r,strategy:s}=t;const a=[...n==="clippingAncestors"?cA(e)?[]:uCe(e,this._c):[].concat(n),r],o=a[0],c=a.reduce((u,f)=>{const l=lB(e,f,s);return u.top=to(l.top,u.top),u.right=ml(l.right,u.right),u.bottom=ml(l.bottom,u.bottom),u.left=to(l.left,u.left),u},lB(e,o,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function fCe(t){const{width:e,height:n}=Y8(t);return{width:e,height:n}}function hCe(t,e,n){const r=El(e),s=eu(e),i=n==="fixed",a=Jh(t,!0,i,e);let o={scrollLeft:0,scrollTop:0};const c=Rd(0);if(r||!r&&!i)if((kv(e)!=="body"||b0(s))&&(o=uA(e)),r){const l=Jh(e,!0,i,e);c.x=l.x+e.clientLeft,c.y=l.y+e.clientTop}else s&&(c.x=Q8(s));const u=a.left+o.scrollLeft-c.x,f=a.top+o.scrollTop-c.y;return{x:u,y:f,width:a.width,height:a.height}}function CT(t){return ka(t).position==="static"}function cB(t,e){return!El(t)||ka(t).position==="fixed"?null:e?e(t):t.offsetParent}function Z8(t,e){const n=io(t);if(cA(t))return n;if(!El(t)){let s=Td(t);for(;s&&!cv(s);){if(Sl(s)&&!CT(s))return s;s=Td(s)}return n}let r=cB(t,e);for(;r&&tCe(r)&&CT(r);)r=cB(r,e);return r&&cv(r)&&CT(r)&&!hI(r)?n:r||nCe(t)||n}const pCe=async function(t){const e=this.getOffsetParent||Z8,n=this.getDimensions,r=await n(t.floating);return{reference:hCe(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function mCe(t){return ka(t).direction==="rtl"}const gCe={convertOffsetParentRelativeRectToViewportRelativeRect:iCe,getDocumentElement:eu,getClippingRect:dCe,getOffsetParent:Z8,getElementRects:pCe,getClientRects:oCe,getDimensions:fCe,getScale:Fm,isElement:Sl,isRTL:mCe};function vCe(t,e){let n=null,r;const s=eu(t);function i(){var o;clearTimeout(r),(o=n)==null||o.disconnect(),n=null}function a(o,c){o===void 0&&(o=!1),c===void 0&&(c=1),i();const{left:u,top:f,width:l,height:d}=t.getBoundingClientRect();if(o||e(),!l||!d)return;const m=cS(f),p=cS(s.clientWidth-(u+l)),h=cS(s.clientHeight-(f+d)),y=cS(u),v={rootMargin:-m+"px "+-p+"px "+-h+"px "+-y+"px",threshold:to(0,ml(1,c))||1};let w=!0;function x(A){const k=A[0].intersectionRatio;if(k!==c){if(!w)return a();k?a(!1,k):r=setTimeout(()=>{a(!1,1e-7)},1e3)}w=!1}try{n=new IntersectionObserver(x,{...v,root:s.ownerDocument})}catch{n=new IntersectionObserver(x,v)}n.observe(t)}return a(!0),i}function yCe(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=mI(t),f=s||i?[...u?Xb(u):[],...Xb(e)]:[];f.forEach(g=>{s&&g.addEventListener("scroll",n,{passive:!0}),i&&g.addEventListener("resize",n)});const l=u&&o?vCe(u,n):null;let d=-1,m=null;a&&(m=new ResizeObserver(g=>{let[v]=g;v&&v.target===u&&m&&(m.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var w;(w=m)==null||w.observe(e)})),n()}),u&&!c&&m.observe(u),m.observe(e));let p,h=c?Jh(t):null;c&&y();function y(){const g=Jh(t);h&&(g.x!==h.x||g.y!==h.y||g.width!==h.width||g.height!==h.height)&&n(),h=g,p=requestAnimationFrame(y)}return n(),()=>{var g;f.forEach(v=>{s&&v.removeEventListener("scroll",n),i&&v.removeEventListener("resize",n)}),l==null||l(),(g=m)==null||g.disconnect(),m=null,c&&cancelAnimationFrame(p)}}const bCe=QEe,wCe=JEe,_Ce=KEe,xCe=eCe,SCe=YEe,uB=GEe,ECe=ZEe,CCe=(t,e,n)=>{const r=new Map,s={platform:gCe,...n},i={...s.platform,_c:r};return qEe(t,e,{...s,platform:i})};var WS=typeof document<"u"?_.useLayoutEffect:_.useEffect;function hC(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,s;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!hC(t[r],e[r]))return!1;return!0}if(s=Object.keys(t),n=s.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,s[r]))return!1;for(r=n;r--!==0;){const i=s[r];if(!(i==="_owner"&&t.$$typeof)&&!hC(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function eq(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function dB(t,e){const n=eq(t);return Math.round(e*n)/n}function fB(t){const e=_.useRef(t);return WS(()=>{e.current=t}),e}function ACe(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:i,floating:a}={},transform:o=!0,whileElementsMounted:c,open:u}=t,[f,l]=_.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[d,m]=_.useState(r);hC(d,r)||m(r);const[p,h]=_.useState(null),[y,g]=_.useState(null),v=_.useCallback(W=>{W!==k.current&&(k.current=W,h(W))},[]),w=_.useCallback(W=>{W!==R.current&&(R.current=W,g(W))},[]),x=i||p,A=a||y,k=_.useRef(null),R=_.useRef(null),E=_.useRef(f),T=c!=null,D=fB(c),M=fB(s),L=_.useCallback(()=>{if(!k.current||!R.current)return;const W={placement:e,strategy:n,middleware:d};M.current&&(W.platform=M.current),CCe(k.current,R.current,W).then(H=>{const ee={...H,isPositioned:!0};I.current&&!hC(E.current,ee)&&(E.current=ee,Ns.flushSync(()=>{l(ee)}))})},[d,e,n,M]);WS(()=>{u===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,l(W=>({...W,isPositioned:!1})))},[u]);const I=_.useRef(!1);WS(()=>(I.current=!0,()=>{I.current=!1}),[]),WS(()=>{if(x&&(k.current=x),A&&(R.current=A),x&&A){if(D.current)return D.current(x,A,L);L()}},[x,A,L,D,T]);const j=_.useMemo(()=>({reference:k,floating:R,setReference:v,setFloating:w}),[v,w]),U=_.useMemo(()=>({reference:x,floating:A}),[x,A]),Y=_.useMemo(()=>{const W={position:n,left:0,top:0};if(!U.floating)return W;const H=dB(U.floating,f.x),ee=dB(U.floating,f.y);return o?{...W,transform:"translate("+H+"px, "+ee+"px)",...eq(U.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:H,top:ee}},[n,o,U.floating,f.x,f.y]);return _.useMemo(()=>({...f,update:L,refs:j,elements:U,floatingStyles:Y}),[f,L,j,U,Y])}const RCe=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:s}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?uB({element:r.current,padding:s}).fn(n):{}:r?uB({element:r,padding:s}).fn(n):{}}}},PCe=(t,e)=>({...bCe(t),options:[t,e]}),TCe=(t,e)=>({...wCe(t),options:[t,e]}),kCe=(t,e)=>({...ECe(t),options:[t,e]}),DCe=(t,e)=>({..._Ce(t),options:[t,e]}),NCe=(t,e)=>({...xCe(t),options:[t,e]}),MCe=(t,e)=>({...SCe(t),options:[t,e]}),OCe=(t,e)=>({...RCe(t),options:[t,e]});var LCe="Arrow",tq=_.forwardRef((t,e)=>{const{children:n,width:r=10,height:s=5,...i}=t;return P.jsx(De.svg,{...i,ref:e,width:r,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:P.jsx("polygon",{points:"0,0 30,0 15,10"})})});tq.displayName=LCe;var ICe=tq,gI="Popper",[nq,Rl]=Tn(gI),[$Ce,rq]=nq(gI),sq=t=>{const{__scopePopper:e,children:n}=t,[r,s]=_.useState(null);return P.jsx($Ce,{scope:e,anchor:r,onAnchorChange:s,children:n})};sq.displayName=gI;var iq="PopperAnchor",oq=_.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:r,...s}=t,i=rq(iq,n),a=_.useRef(null),o=tt(e,a);return _.useEffect(()=>{i.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:P.jsx(De.div,{...s,ref:o})});oq.displayName=iq;var vI="PopperContent",[jCe,FCe]=nq(vI),aq=_.forwardRef((t,e)=>{var ie,be,Ae,_e,Oe,Ne;const{__scopePopper:n,side:r="bottom",sideOffset:s=0,align:i="center",alignOffset:a=0,arrowPadding:o=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:l="partial",hideWhenDetached:d=!1,updatePositionStrategy:m="optimized",onPlaced:p,...h}=t,y=rq(vI,n),[g,v]=_.useState(null),w=tt(e,ye=>v(ye)),[x,A]=_.useState(null),k=v0(x),R=(k==null?void 0:k.width)??0,E=(k==null?void 0:k.height)??0,T=r+(i!=="center"?"-"+i:""),D=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},M=Array.isArray(u)?u:[u],L=M.length>0,I={padding:D,boundary:M.filter(BCe),altBoundary:L},{refs:j,floatingStyles:U,placement:Y,isPositioned:W,middlewareData:H}=ACe({strategy:"fixed",placement:T,whileElementsMounted:(...ye)=>yCe(...ye,{animationFrame:m==="always"}),elements:{reference:y.anchor},middleware:[PCe({mainAxis:s+E,alignmentAxis:a}),c&&TCe({mainAxis:!0,crossAxis:!1,limiter:l==="partial"?kCe():void 0,...I}),c&&DCe({...I}),NCe({...I,apply:({elements:ye,rects:$e,availableWidth:ut,availableHeight:Qe})=>{const{width:yt,height:En}=$e.reference,Xt=ye.floating.style;Xt.setProperty("--radix-popper-available-width",`${ut}px`),Xt.setProperty("--radix-popper-available-height",`${Qe}px`),Xt.setProperty("--radix-popper-anchor-width",`${yt}px`),Xt.setProperty("--radix-popper-anchor-height",`${En}px`)}}),x&&OCe({element:x,padding:o}),UCe({arrowWidth:R,arrowHeight:E}),d&&MCe({strategy:"referenceHidden",...I})]}),[ee,re]=uq(Y),X=Ut(p);Ln(()=>{W&&(X==null||X())},[W,X]);const G=(ie=H.arrow)==null?void 0:ie.x,K=(be=H.arrow)==null?void 0:be.y,J=((Ae=H.arrow)==null?void 0:Ae.centerOffset)!==0,[ue,de]=_.useState();return Ln(()=>{g&&de(window.getComputedStyle(g).zIndex)},[g]),P.jsx("div",{ref:j.setFloating,"data-radix-popper-content-wrapper":"",style:{...U,transform:W?U.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ue,"--radix-popper-transform-origin":[(_e=H.transformOrigin)==null?void 0:_e.x,(Oe=H.transformOrigin)==null?void 0:Oe.y].join(" "),...((Ne=H.hide)==null?void 0:Ne.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:P.jsx(jCe,{scope:n,placedSide:ee,onArrowChange:A,arrowX:G,arrowY:K,shouldHideArrow:J,children:P.jsx(De.div,{"data-side":ee,"data-align":re,...h,ref:w,style:{...h.style,animation:W?void 0:"none"}})})})});aq.displayName=vI;var lq="PopperArrow",zCe={top:"bottom",right:"left",bottom:"top",left:"right"},cq=_.forwardRef(function(e,n){const{__scopePopper:r,...s}=e,i=FCe(lq,r),a=zCe[i.placedSide];return P.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:P.jsx(ICe,{...s,ref:n,style:{...s.style,display:"block"}})})});cq.displayName=lq;function BCe(t){return t!==null}var UCe=t=>({name:"transformOrigin",options:t,fn(e){var y,g,v;const{placement:n,rects:r,middlewareData:s}=e,a=((y=s.arrow)==null?void 0:y.centerOffset)!==0,o=a?0:t.arrowWidth,c=a?0:t.arrowHeight,[u,f]=uq(n),l={start:"0%",center:"50%",end:"100%"}[f],d=(((g=s.arrow)==null?void 0:g.x)??0)+o/2,m=(((v=s.arrow)==null?void 0:v.y)??0)+c/2;let p="",h="";return u==="bottom"?(p=a?l:`${d}px`,h=`${-c}px`):u==="top"?(p=a?l:`${d}px`,h=`${r.floating.height+c}px`):u==="right"?(p=`${-c}px`,h=a?l:`${m}px`):u==="left"&&(p=`${r.floating.width+c}px`,h=a?l:`${m}px`),{data:{x:p,y:h}}}});function uq(t){const[e,n="center"]=t.split("-");return[e,n]}var dA=sq,Dv=oq,w0=aq,_0=cq,AT="rovingFocusGroup.onEntryFocus",HCe={bubbles:!1,cancelable:!0},fA="RovingFocusGroup",[KD,dq,WCe]=Xc(fA),[VCe,Pl]=Tn(fA,[WCe]),[qCe,GCe]=VCe(fA),fq=_.forwardRef((t,e)=>P.jsx(KD.Provider,{scope:t.__scopeRovingFocusGroup,children:P.jsx(KD.Slot,{scope:t.__scopeRovingFocusGroup,children:P.jsx(KCe,{...t,ref:e})})}));fq.displayName=fA;var KCe=_.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:s=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:o,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...l}=t,d=_.useRef(null),m=tt(e,d),p=Ma(i),[h=null,y]=sr({prop:a,defaultProp:o,onChange:c}),[g,v]=_.useState(!1),w=Ut(u),x=dq(n),A=_.useRef(!1),[k,R]=_.useState(0);return _.useEffect(()=>{const E=d.current;if(E)return E.addEventListener(AT,w),()=>E.removeEventListener(AT,w)},[w]),P.jsx(qCe,{scope:n,orientation:r,dir:p,loop:s,currentTabStopId:h,onItemFocus:_.useCallback(E=>y(E),[y]),onItemShiftTab:_.useCallback(()=>v(!0),[]),onFocusableItemAdd:_.useCallback(()=>R(E=>E+1),[]),onFocusableItemRemove:_.useCallback(()=>R(E=>E-1),[]),children:P.jsx(De.div,{tabIndex:g||k===0?-1:0,"data-orientation":r,...l,ref:m,style:{outline:"none",...t.style},onMouseDown:me(t.onMouseDown,()=>{A.current=!0}),onFocus:me(t.onFocus,E=>{const T=!A.current;if(E.target===E.currentTarget&&T&&!g){const D=new CustomEvent(AT,HCe);if(E.currentTarget.dispatchEvent(D),!D.defaultPrevented){const M=x().filter(Y=>Y.focusable),L=M.find(Y=>Y.active),I=M.find(Y=>Y.id===h),U=[L,I,...M].filter(Boolean).map(Y=>Y.ref.current);mq(U,f)}}A.current=!1}),onBlur:me(t.onBlur,()=>v(!1))})})}),hq="RovingFocusGroupItem",pq=_.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:s=!1,tabStopId:i,...a}=t,o=Vr(),c=i||o,u=GCe(hq,n),f=u.currentTabStopId===c,l=dq(n),{onFocusableItemAdd:d,onFocusableItemRemove:m}=u;return _.useEffect(()=>{if(r)return d(),()=>m()},[r,d,m]),P.jsx(KD.ItemSlot,{scope:n,id:c,focusable:r,active:s,children:P.jsx(De.span,{tabIndex:f?0:-1,"data-orientation":u.orientation,...a,ref:e,onMouseDown:me(t.onMouseDown,p=>{r?u.onItemFocus(c):p.preventDefault()}),onFocus:me(t.onFocus,()=>u.onItemFocus(c)),onKeyDown:me(t.onKeyDown,p=>{if(p.key==="Tab"&&p.shiftKey){u.onItemShiftTab();return}if(p.target!==p.currentTarget)return;const h=QCe(p,u.orientation,u.dir);if(h!==void 0){if(p.metaKey||p.ctrlKey||p.altKey||p.shiftKey)return;p.preventDefault();let g=l().filter(v=>v.focusable).map(v=>v.ref.current);if(h==="last")g.reverse();else if(h==="prev"||h==="next"){h==="prev"&&g.reverse();const v=g.indexOf(p.currentTarget);g=u.loop?JCe(g,v+1):g.slice(v+1)}setTimeout(()=>mq(g))}})})})});pq.displayName=hq;var YCe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function XCe(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function QCe(t,e,n){const r=XCe(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return YCe[r]}function mq(t,e=!1){const n=document.activeElement;for(const r of t)if(r===n||(r.focus({preventScroll:e}),document.activeElement!==n))return}function JCe(t,e){return t.map((n,r)=>t[(e+r)%t.length])}var x0=fq,S0=pq,YD=["Enter"," "],ZCe=["ArrowDown","PageUp","Home"],gq=["ArrowUp","PageDown","End"],e1e=[...ZCe,...gq],t1e={ltr:[...YD,"ArrowRight"],rtl:[...YD,"ArrowLeft"]},n1e={ltr:["ArrowLeft"],rtl:["ArrowRight"]},E0="Menu",[Qb,r1e,s1e]=Xc(E0),[gp,C0]=Tn(E0,[s1e,Rl,Pl]),hA=Rl(),vq=Pl(),[i1e,vp]=gp(E0),[o1e,A0]=gp(E0),yq=t=>{const{__scopeMenu:e,open:n=!1,children:r,dir:s,onOpenChange:i,modal:a=!0}=t,o=hA(e),[c,u]=_.useState(null),f=_.useRef(!1),l=Ut(i),d=Ma(s);return _.useEffect(()=>{const m=()=>{f.current=!0,document.addEventListener("pointerdown",p,{capture:!0,once:!0}),document.addEventListener("pointermove",p,{capture:!0,once:!0})},p=()=>f.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",p,{capture:!0}),document.removeEventListener("pointermove",p,{capture:!0})}},[]),P.jsx(dA,{...o,children:P.jsx(i1e,{scope:e,open:n,onOpenChange:l,content:c,onContentChange:u,children:P.jsx(o1e,{scope:e,onClose:_.useCallback(()=>l(!1),[l]),isUsingKeyboardRef:f,dir:d,modal:a,children:r})})})};yq.displayName=E0;var a1e="MenuAnchor",yI=_.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t,s=hA(n);return P.jsx(Dv,{...s,...r,ref:e})});yI.displayName=a1e;var bI="MenuPortal",[l1e,bq]=gp(bI,{forceMount:void 0}),wq=t=>{const{__scopeMenu:e,forceMount:n,children:r,container:s}=t,i=vp(bI,e);return P.jsx(l1e,{scope:e,forceMount:n,children:P.jsx(Hn,{present:n||i.open,children:P.jsx(Sv,{asChild:!0,container:s,children:r})})})};wq.displayName=bI;var jo="MenuContent",[c1e,wI]=gp(jo),_q=_.forwardRef((t,e)=>{const n=bq(jo,t.__scopeMenu),{forceMount:r=n.forceMount,...s}=t,i=vp(jo,t.__scopeMenu),a=A0(jo,t.__scopeMenu);return P.jsx(Qb.Provider,{scope:t.__scopeMenu,children:P.jsx(Hn,{present:r||i.open,children:P.jsx(Qb.Slot,{scope:t.__scopeMenu,children:a.modal?P.jsx(u1e,{...s,ref:e}):P.jsx(d1e,{...s,ref:e})})})})}),u1e=_.forwardRef((t,e)=>{const n=vp(jo,t.__scopeMenu),r=_.useRef(null),s=tt(e,r);return _.useEffect(()=>{const i=r.current;if(i)return Ev(i)},[]),P.jsx(_I,{...t,ref:s,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:me(t.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),d1e=_.forwardRef((t,e)=>{const n=vp(jo,t.__scopeMenu);return P.jsx(_I,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),_I=_.forwardRef((t,e)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:s,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:l,onInteractOutside:d,onDismiss:m,disableOutsideScroll:p,...h}=t,y=vp(jo,n),g=A0(jo,n),v=hA(n),w=vq(n),x=r1e(n),[A,k]=_.useState(null),R=_.useRef(null),E=tt(e,R,y.onContentChange),T=_.useRef(0),D=_.useRef(""),M=_.useRef(0),L=_.useRef(null),I=_.useRef("right"),j=_.useRef(0),U=p?o0:_.Fragment,Y=p?{as:Ra,allowPinchZoom:!0}:void 0,W=ee=>{var ie,be;const re=D.current+ee,X=x().filter(Ae=>!Ae.disabled),G=document.activeElement,K=(ie=X.find(Ae=>Ae.ref.current===G))==null?void 0:ie.textValue,J=X.map(Ae=>Ae.textValue),ue=S1e(J,re,K),de=(be=X.find(Ae=>Ae.textValue===ue))==null?void 0:be.ref.current;(function Ae(_e){D.current=_e,window.clearTimeout(T.current),_e!==""&&(T.current=window.setTimeout(()=>Ae(""),1e3))})(re),de&&setTimeout(()=>de.focus())};_.useEffect(()=>()=>window.clearTimeout(T.current),[]),F1();const H=_.useCallback(ee=>{var X,G;return I.current===((X=L.current)==null?void 0:X.side)&&C1e(ee,(G=L.current)==null?void 0:G.area)},[]);return P.jsx(c1e,{scope:n,searchRef:D,onItemEnter:_.useCallback(ee=>{H(ee)&&ee.preventDefault()},[H]),onItemLeave:_.useCallback(ee=>{var re;H(ee)||((re=R.current)==null||re.focus(),k(null))},[H]),onTriggerLeave:_.useCallback(ee=>{H(ee)&&ee.preventDefault()},[H]),pointerGraceTimerRef:M,onPointerGraceIntentChange:_.useCallback(ee=>{L.current=ee},[]),children:P.jsx(U,{...Y,children:P.jsx(i0,{asChild:!0,trapped:s,onMountAutoFocus:me(i,ee=>{var re;ee.preventDefault(),(re=R.current)==null||re.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:P.jsx(Jc,{asChild:!0,disableOutsidePointerEvents:o,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:l,onInteractOutside:d,onDismiss:m,children:P.jsx(x0,{asChild:!0,...w,dir:g.dir,orientation:"vertical",loop:r,currentTabStopId:A,onCurrentTabStopIdChange:k,onEntryFocus:me(c,ee=>{g.isUsingKeyboardRef.current||ee.preventDefault()}),preventScrollOnEntryFocus:!0,children:P.jsx(w0,{role:"menu","aria-orientation":"vertical","data-state":$q(y.open),"data-radix-menu-content":"",dir:g.dir,...v,...h,ref:E,style:{outline:"none",...h.style},onKeyDown:me(h.onKeyDown,ee=>{const X=ee.target.closest("[data-radix-menu-content]")===ee.currentTarget,G=ee.ctrlKey||ee.altKey||ee.metaKey,K=ee.key.length===1;X&&(ee.key==="Tab"&&ee.preventDefault(),!G&&K&&W(ee.key));const J=R.current;if(ee.target!==J||!e1e.includes(ee.key))return;ee.preventDefault();const de=x().filter(ie=>!ie.disabled).map(ie=>ie.ref.current);gq.includes(ee.key)&&de.reverse(),_1e(de)}),onBlur:me(t.onBlur,ee=>{ee.currentTarget.contains(ee.target)||(window.clearTimeout(T.current),D.current="")}),onPointerMove:me(t.onPointerMove,Jb(ee=>{const re=ee.target,X=j.current!==ee.clientX;if(ee.currentTarget.contains(re)&&X){const G=ee.clientX>j.current?"right":"left";I.current=G,j.current=ee.clientX}}))})})})})})})});_q.displayName=jo;var f1e="MenuGroup",xI=_.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return P.jsx(De.div,{role:"group",...r,ref:e})});xI.displayName=f1e;var h1e="MenuLabel",xq=_.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return P.jsx(De.div,{...r,ref:e})});xq.displayName=h1e;var pC="MenuItem",hB="menu.itemSelect",pA=_.forwardRef((t,e)=>{const{disabled:n=!1,onSelect:r,...s}=t,i=_.useRef(null),a=A0(pC,t.__scopeMenu),o=wI(pC,t.__scopeMenu),c=tt(e,i),u=_.useRef(!1),f=()=>{const l=i.current;if(!n&&l){const d=new CustomEvent(hB,{bubbles:!0,cancelable:!0});l.addEventListener(hB,m=>r==null?void 0:r(m),{once:!0}),Wb(l,d),d.defaultPrevented?u.current=!1:a.onClose()}};return P.jsx(Sq,{...s,ref:c,disabled:n,onClick:me(t.onClick,f),onPointerDown:l=>{var d;(d=t.onPointerDown)==null||d.call(t,l),u.current=!0},onPointerUp:me(t.onPointerUp,l=>{var d;u.current||(d=l.currentTarget)==null||d.click()}),onKeyDown:me(t.onKeyDown,l=>{const d=o.searchRef.current!=="";n||d&&l.key===" "||YD.includes(l.key)&&(l.currentTarget.click(),l.preventDefault())})})});pA.displayName=pC;var Sq=_.forwardRef((t,e)=>{const{__scopeMenu:n,disabled:r=!1,textValue:s,...i}=t,a=wI(pC,n),o=vq(n),c=_.useRef(null),u=tt(e,c),[f,l]=_.useState(!1),[d,m]=_.useState("");return _.useEffect(()=>{const p=c.current;p&&m((p.textContent??"").trim())},[i.children]),P.jsx(Qb.ItemSlot,{scope:n,disabled:r,textValue:s??d,children:P.jsx(S0,{asChild:!0,...o,focusable:!r,children:P.jsx(De.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...i,ref:u,onPointerMove:me(t.onPointerMove,Jb(p=>{r?a.onItemLeave(p):(a.onItemEnter(p),p.defaultPrevented||p.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:me(t.onPointerLeave,Jb(p=>a.onItemLeave(p))),onFocus:me(t.onFocus,()=>l(!0)),onBlur:me(t.onBlur,()=>l(!1))})})})}),p1e="MenuCheckboxItem",Eq=_.forwardRef((t,e)=>{const{checked:n=!1,onCheckedChange:r,...s}=t;return P.jsx(Tq,{scope:t.__scopeMenu,checked:n,children:P.jsx(pA,{role:"menuitemcheckbox","aria-checked":mC(n)?"mixed":n,...s,ref:e,"data-state":EI(n),onSelect:me(s.onSelect,()=>r==null?void 0:r(mC(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Eq.displayName=p1e;var Cq="MenuRadioGroup",[m1e,g1e]=gp(Cq,{value:void 0,onValueChange:()=>{}}),Aq=_.forwardRef((t,e)=>{const{value:n,onValueChange:r,...s}=t,i=Ut(r);return P.jsx(m1e,{scope:t.__scopeMenu,value:n,onValueChange:i,children:P.jsx(xI,{...s,ref:e})})});Aq.displayName=Cq;var Rq="MenuRadioItem",Pq=_.forwardRef((t,e)=>{const{value:n,...r}=t,s=g1e(Rq,t.__scopeMenu),i=n===s.value;return P.jsx(Tq,{scope:t.__scopeMenu,checked:i,children:P.jsx(pA,{role:"menuitemradio","aria-checked":i,...r,ref:e,"data-state":EI(i),onSelect:me(r.onSelect,()=>{var a;return(a=s.onValueChange)==null?void 0:a.call(s,n)},{checkForDefaultPrevented:!1})})})});Pq.displayName=Rq;var SI="MenuItemIndicator",[Tq,v1e]=gp(SI,{checked:!1}),kq=_.forwardRef((t,e)=>{const{__scopeMenu:n,forceMount:r,...s}=t,i=v1e(SI,n);return P.jsx(Hn,{present:r||mC(i.checked)||i.checked===!0,children:P.jsx(De.span,{...s,ref:e,"data-state":EI(i.checked)})})});kq.displayName=SI;var y1e="MenuSeparator",Dq=_.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return P.jsx(De.div,{role:"separator","aria-orientation":"horizontal",...r,ref:e})});Dq.displayName=y1e;var b1e="MenuArrow",Nq=_.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t,s=hA(n);return P.jsx(_0,{...s,...r,ref:e})});Nq.displayName=b1e;var w1e="MenuSub",[zHe,Mq]=gp(w1e),jy="MenuSubTrigger",Oq=_.forwardRef((t,e)=>{const n=vp(jy,t.__scopeMenu),r=A0(jy,t.__scopeMenu),s=Mq(jy,t.__scopeMenu),i=wI(jy,t.__scopeMenu),a=_.useRef(null),{pointerGraceTimerRef:o,onPointerGraceIntentChange:c}=i,u={__scopeMenu:t.__scopeMenu},f=_.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return _.useEffect(()=>f,[f]),_.useEffect(()=>{const l=o.current;return()=>{window.clearTimeout(l),c(null)}},[o,c]),P.jsx(yI,{asChild:!0,...u,children:P.jsx(Sq,{id:s.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":s.contentId,"data-state":$q(n.open),...t,ref:n0(e,s.onTriggerChange),onClick:l=>{var d;(d=t.onClick)==null||d.call(t,l),!(t.disabled||l.defaultPrevented)&&(l.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:me(t.onPointerMove,Jb(l=>{i.onItemEnter(l),!l.defaultPrevented&&!t.disabled&&!n.open&&!a.current&&(i.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:me(t.onPointerLeave,Jb(l=>{var m,p;f();const d=(m=n.content)==null?void 0:m.getBoundingClientRect();if(d){const h=(p=n.content)==null?void 0:p.dataset.side,y=h==="right",g=y?-5:5,v=d[y?"left":"right"],w=d[y?"right":"left"];i.onPointerGraceIntentChange({area:[{x:l.clientX+g,y:l.clientY},{x:v,y:d.top},{x:w,y:d.top},{x:w,y:d.bottom},{x:v,y:d.bottom}],side:h}),window.clearTimeout(o.current),o.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(l),l.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:me(t.onKeyDown,l=>{var m;const d=i.searchRef.current!=="";t.disabled||d&&l.key===" "||t1e[r.dir].includes(l.key)&&(n.onOpenChange(!0),(m=n.content)==null||m.focus(),l.preventDefault())})})})});Oq.displayName=jy;var Lq="MenuSubContent",Iq=_.forwardRef((t,e)=>{const n=bq(jo,t.__scopeMenu),{forceMount:r=n.forceMount,...s}=t,i=vp(jo,t.__scopeMenu),a=A0(jo,t.__scopeMenu),o=Mq(Lq,t.__scopeMenu),c=_.useRef(null),u=tt(e,c);return P.jsx(Qb.Provider,{scope:t.__scopeMenu,children:P.jsx(Hn,{present:r||i.open,children:P.jsx(Qb.Slot,{scope:t.__scopeMenu,children:P.jsx(_I,{id:o.contentId,"aria-labelledby":o.triggerId,...s,ref:u,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var l;a.isUsingKeyboardRef.current&&((l=c.current)==null||l.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:me(t.onFocusOutside,f=>{f.target!==o.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:me(t.onEscapeKeyDown,f=>{a.onClose(),f.preventDefault()}),onKeyDown:me(t.onKeyDown,f=>{var m;const l=f.currentTarget.contains(f.target),d=n1e[a.dir].includes(f.key);l&&d&&(i.onOpenChange(!1),(m=o.trigger)==null||m.focus(),f.preventDefault())})})})})})});Iq.displayName=Lq;function $q(t){return t?"open":"closed"}function mC(t){return t==="indeterminate"}function EI(t){return mC(t)?"indeterminate":t?"checked":"unchecked"}function _1e(t){const e=document.activeElement;for(const n of t)if(n===e||(n.focus(),document.activeElement!==e))return}function x1e(t,e){return t.map((n,r)=>t[(e+r)%t.length])}function S1e(t,e,n){const s=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,i=n?t.indexOf(n):-1;let a=x1e(t,Math.max(i,0));s.length===1&&(a=a.filter(u=>u!==n));const c=a.find(u=>u.toLowerCase().startsWith(s.toLowerCase()));return c!==n?c:void 0}function E1e(t,e){const{x:n,y:r}=t;let s=!1;for(let i=0,a=e.length-1;ir!=f>r&&n<(u-o)*(r-c)/(f-c)+o&&(s=!s)}return s}function C1e(t,e){if(!e)return!1;const n={x:t.clientX,y:t.clientY};return E1e(n,e)}function Jb(t){return e=>e.pointerType==="mouse"?t(e):void 0}var A1e=yq,CI=yI,AI=wq,RI=_q,PI=xI,TI=xq,kI=pA,DI=Eq,NI=Aq,MI=Pq,OI=kq,LI=Dq,II=Nq,$I=Oq,jI=Iq,jq="ContextMenu",[R1e,BHe]=Tn(jq,[C0]),ki=C0(),[UHe,Fq]=R1e(jq),zq="ContextMenuTrigger",P1e=_.forwardRef((t,e)=>{const{__scopeContextMenu:n,disabled:r=!1,...s}=t,i=Fq(zq,n),a=ki(n),o=_.useRef({x:0,y:0}),c=_.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...o.current})}),u=_.useRef(0),f=_.useCallback(()=>window.clearTimeout(u.current),[]),l=d=>{o.current={x:d.clientX,y:d.clientY},i.onOpenChange(!0)};return _.useEffect(()=>f,[f]),_.useEffect(()=>void(r&&f()),[r,f]),P.jsxs(P.Fragment,{children:[P.jsx(CI,{...a,virtualRef:c}),P.jsx(De.span,{"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,...s,ref:e,style:{WebkitTouchCallout:"none",...t.style},onContextMenu:r?t.onContextMenu:me(t.onContextMenu,d=>{f(),l(d),d.preventDefault()}),onPointerDown:r?t.onPointerDown:me(t.onPointerDown,uS(d=>{f(),u.current=window.setTimeout(()=>l(d),700)})),onPointerMove:r?t.onPointerMove:me(t.onPointerMove,uS(f)),onPointerCancel:r?t.onPointerCancel:me(t.onPointerCancel,uS(f)),onPointerUp:r?t.onPointerUp:me(t.onPointerUp,uS(f))})]})});P1e.displayName=zq;var T1e="ContextMenuPortal",Bq=t=>{const{__scopeContextMenu:e,...n}=t,r=ki(e);return P.jsx(AI,{...r,...n})};Bq.displayName=T1e;var Uq="ContextMenuContent",Hq=_.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,s=Fq(Uq,n),i=ki(n),a=_.useRef(!1);return P.jsx(RI,{...i,...r,ref:e,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:o=>{var c;(c=t.onCloseAutoFocus)==null||c.call(t,o),!o.defaultPrevented&&a.current&&o.preventDefault(),a.current=!1},onInteractOutside:o=>{var c;(c=t.onInteractOutside)==null||c.call(t,o),!o.defaultPrevented&&!s.modal&&(a.current=!0)},style:{...t.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Hq.displayName=Uq;var k1e="ContextMenuGroup",D1e=_.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,s=ki(n);return P.jsx(PI,{...s,...r,ref:e})});D1e.displayName=k1e;var N1e="ContextMenuLabel",Wq=_.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,s=ki(n);return P.jsx(TI,{...s,...r,ref:e})});Wq.displayName=N1e;var M1e="ContextMenuItem",Vq=_.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,s=ki(n);return P.jsx(kI,{...s,...r,ref:e})});Vq.displayName=M1e;var O1e="ContextMenuCheckboxItem",qq=_.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,s=ki(n);return P.jsx(DI,{...s,...r,ref:e})});qq.displayName=O1e;var L1e="ContextMenuRadioGroup",I1e=_.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,s=ki(n);return P.jsx(NI,{...s,...r,ref:e})});I1e.displayName=L1e;var $1e="ContextMenuRadioItem",Gq=_.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,s=ki(n);return P.jsx(MI,{...s,...r,ref:e})});Gq.displayName=$1e;var j1e="ContextMenuItemIndicator",Kq=_.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,s=ki(n);return P.jsx(OI,{...s,...r,ref:e})});Kq.displayName=j1e;var F1e="ContextMenuSeparator",Yq=_.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,s=ki(n);return P.jsx(LI,{...s,...r,ref:e})});Yq.displayName=F1e;var z1e="ContextMenuArrow",B1e=_.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,s=ki(n);return P.jsx(II,{...s,...r,ref:e})});B1e.displayName=z1e;var U1e="ContextMenuSubTrigger",Xq=_.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,s=ki(n);return P.jsx($I,{...s,...r,ref:e})});Xq.displayName=U1e;var H1e="ContextMenuSubContent",Qq=_.forwardRef((t,e)=>{const{__scopeContextMenu:n,...r}=t,s=ki(n);return P.jsx(jI,{...s,...r,ref:e,style:{...t.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Qq.displayName=H1e;function uS(t){return e=>e.pointerType!=="mouse"?t(e):void 0}var W1e=Bq,Jq=Hq,Zq=Wq,eG=Vq,tG=qq,nG=Gq,rG=Kq,sG=Yq,iG=Xq,oG=Qq;const V1e=_.forwardRef(({className:t,inset:e,children:n,...r},s)=>P.jsxs(iG,{ref:s,className:ce("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",e&&"pl-8",t),...r,children:[n,P.jsx(s0,{className:"ml-auto h-4 w-4"})]}));V1e.displayName=iG.displayName;const q1e=_.forwardRef(({className:t,...e},n)=>P.jsx(oG,{ref:n,className:ce("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...e}));q1e.displayName=oG.displayName;const G1e=_.forwardRef(({className:t,...e},n)=>P.jsx(W1e,{children:P.jsx(Jq,{ref:n,className:ce("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...e})}));G1e.displayName=Jq.displayName;const K1e=_.forwardRef(({className:t,inset:e,...n},r)=>P.jsx(eG,{ref:r,className:ce("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e&&"pl-8",t),...n}));K1e.displayName=eG.displayName;const Y1e=_.forwardRef(({className:t,children:e,checked:n,...r},s)=>P.jsxs(tG,{ref:s,className:ce("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),checked:n,...r,children:[P.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:P.jsx(rG,{children:P.jsx(r0,{className:"h-4 w-4"})})}),e]}));Y1e.displayName=tG.displayName;const X1e=_.forwardRef(({className:t,children:e,...n},r)=>P.jsxs(nG,{ref:r,className:ce("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...n,children:[P.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:P.jsx(rG,{children:P.jsx(j1,{className:"h-2 w-2 fill-current"})})}),e]}));X1e.displayName=nG.displayName;const Q1e=_.forwardRef(({className:t,inset:e,...n},r)=>P.jsx(Zq,{ref:r,className:ce("px-2 py-1.5 text-sm font-semibold text-foreground",e&&"pl-8",t),...n}));Q1e.displayName=Zq.displayName;const J1e=_.forwardRef(({className:t,...e},n)=>P.jsx(sG,{ref:n,className:ce("-mx-1 my-1 h-px bg-border",t),...e}));J1e.displayName=sG.displayName;function Sd(t,e,{checkForDefaultPrevented:n=!0}={}){return function(s){if(t==null||t(s),n===!1||!s.defaultPrevented)return e==null?void 0:e(s)}}function pB(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function aG(...t){return e=>{let n=!1;const r=t.map(s=>{const i=pB(s,e);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let s=0;s{const{children:a,...o}=i,c=_.useMemo(()=>o,Object.values(o));return P.jsx(n.Provider,{value:c,children:a})};r.displayName=t+"Provider";function s(i){const a=_.useContext(n);if(a)return a;if(e!==void 0)return e;throw new Error(`\`${i}\` must be used within \`${t}\``)}return[r,s]}function eAe(t,e=[]){let n=[];function r(i,a){const o=_.createContext(a),c=n.length;n=[...n,a];const u=l=>{var g;const{scope:d,children:m,...p}=l,h=((g=d==null?void 0:d[t])==null?void 0:g[c])||o,y=_.useMemo(()=>p,Object.values(p));return P.jsx(h.Provider,{value:y,children:m})};u.displayName=i+"Provider";function f(l,d){var h;const m=((h=d==null?void 0:d[t])==null?void 0:h[c])||o,p=_.useContext(m);if(p)return p;if(a!==void 0)return a;throw new Error(`\`${l}\` must be used within \`${i}\``)}return[u,f]}const s=()=>{const i=n.map(a=>_.createContext(a));return function(o){const c=(o==null?void 0:o[t])||i;return _.useMemo(()=>({[`__scope${t}`]:{...o,[t]:c}}),[o,c])}};return s.scopeName=t,[r,tAe(s,...e)]}function tAe(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(i){const a=r.reduce((o,{useScope:c,scopeName:u})=>{const l=c(i)[`__scope${u}`];return{...o,...l}},{});return _.useMemo(()=>({[`__scope${e.scopeName}`]:a}),[a])}};return n.scopeName=e.scopeName,n}var FI=_.forwardRef((t,e)=>{const{children:n,...r}=t,s=_.Children.toArray(n),i=s.find(rAe);if(i){const a=i.props.children,o=s.map(c=>c===i?_.Children.count(a)>1?_.Children.only(null):_.isValidElement(a)?a.props.children:null:c);return P.jsx(XD,{...r,ref:e,children:_.isValidElement(a)?_.cloneElement(a,void 0,o):null})}return P.jsx(XD,{...r,ref:e,children:n})});FI.displayName="Slot";var XD=_.forwardRef((t,e)=>{const{children:n,...r}=t;if(_.isValidElement(n)){const s=iAe(n),i=sAe(r,n.props);return n.type!==_.Fragment&&(i.ref=e?aG(e,s):s),_.cloneElement(n,i)}return _.Children.count(n)>1?_.Children.only(null):null});XD.displayName="SlotClone";var nAe=({children:t})=>P.jsx(P.Fragment,{children:t});function rAe(t){return _.isValidElement(t)&&t.type===nAe}function sAe(t,e){const n={...e};for(const r in e){const s=t[r],i=e[r];/^on[A-Z]/.test(r)?s&&i?n[r]=(...o)=>{i(...o),s(...o)}:s&&(n[r]=s):r==="style"?n[r]={...s,...i}:r==="className"&&(n[r]=[s,i].filter(Boolean).join(" "))}return{...t,...n}}function iAe(t){var r,s;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var oAe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],tu=oAe.reduce((t,e)=>{const n=_.forwardRef((r,s)=>{const{asChild:i,...a}=r,o=i?FI:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),P.jsx(o,{...a,ref:s})});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{});function aAe(t,e){t&&Ns.flushSync(()=>t.dispatchEvent(e))}var lAe="DismissableLayer",QD="dismissableLayer.update",cAe="dismissableLayer.pointerDownOutside",uAe="dismissableLayer.focusOutside",mB,lG=_.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),cG=_.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:a,onDismiss:o,...c}=t,u=_.useContext(lG),[f,l]=_.useState(null),d=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=_.useState({}),p=yp(e,R=>l(R)),h=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),g=h.indexOf(y),v=f?h.indexOf(f):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,x=v>=g,A=hAe(R=>{const E=R.target,T=[...u.branches].some(D=>D.contains(E));!x||T||(s==null||s(R),a==null||a(R),R.defaultPrevented||o==null||o())},d),k=pAe(R=>{const E=R.target;[...u.branches].some(D=>D.contains(E))||(i==null||i(R),a==null||a(R),R.defaultPrevented||o==null||o())},d);return bV(R=>{v===u.layers.size-1&&(r==null||r(R),!R.defaultPrevented&&o&&(R.preventDefault(),o()))},d),_.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(mB=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),gB(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=mB)}},[f,d,n,u]),_.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),gB())},[f,u]),_.useEffect(()=>{const R=()=>m({});return document.addEventListener(QD,R),()=>document.removeEventListener(QD,R)},[]),P.jsx(tu.div,{...c,ref:p,style:{pointerEvents:w?x?"auto":"none":void 0,...t.style},onFocusCapture:Sd(t.onFocusCapture,k.onFocusCapture),onBlurCapture:Sd(t.onBlurCapture,k.onBlurCapture),onPointerDownCapture:Sd(t.onPointerDownCapture,A.onPointerDownCapture)})});cG.displayName=lAe;var dAe="DismissableLayerBranch",fAe=_.forwardRef((t,e)=>{const n=_.useContext(lG),r=_.useRef(null),s=yp(e,r);return _.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),P.jsx(tu.div,{...t,ref:s})});fAe.displayName=dAe;function hAe(t,e=globalThis==null?void 0:globalThis.document){const n=Ut(t),r=_.useRef(!1),s=_.useRef(()=>{});return _.useEffect(()=>{const i=o=>{if(o.target&&!r.current){let c=function(){uG(cAe,n,u,{discrete:!0})};const u={originalEvent:o};o.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=c,e.addEventListener("click",s.current,{once:!0})):c()}else e.removeEventListener("click",s.current);r.current=!1},a=window.setTimeout(()=>{e.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),e.removeEventListener("pointerdown",i),e.removeEventListener("click",s.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function pAe(t,e=globalThis==null?void 0:globalThis.document){const n=Ut(t),r=_.useRef(!1);return _.useEffect(()=>{const s=i=>{i.target&&!r.current&&uG(uAe,n,{originalEvent:i},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function gB(){const t=new CustomEvent(QD);document.dispatchEvent(t)}function uG(t,e,n,{discrete:r}){const s=n.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&s.addEventListener(t,e,{once:!0}),r?aAe(s,i):s.dispatchEvent(i)}var RT="focusScope.autoFocusOnMount",PT="focusScope.autoFocusOnUnmount",vB={bubbles:!1,cancelable:!0},mAe="FocusScope",dG=_.forwardRef((t,e)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:s,onUnmountAutoFocus:i,...a}=t,[o,c]=_.useState(null),u=Ut(s),f=Ut(i),l=_.useRef(null),d=yp(e,h=>c(h)),m=_.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;_.useEffect(()=>{if(r){let h=function(w){if(m.paused||!o)return;const x=w.target;o.contains(x)?l.current=x:_u(l.current,{select:!0})},y=function(w){if(m.paused||!o)return;const x=w.relatedTarget;x!==null&&(o.contains(x)||_u(l.current,{select:!0}))},g=function(w){if(document.activeElement===document.body)for(const A of w)A.removedNodes.length>0&&_u(o)};document.addEventListener("focusin",h),document.addEventListener("focusout",y);const v=new MutationObserver(g);return o&&v.observe(o,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",y),v.disconnect()}}},[r,o,m.paused]),_.useEffect(()=>{if(o){bB.add(m);const h=document.activeElement;if(!o.contains(h)){const g=new CustomEvent(RT,vB);o.addEventListener(RT,u),o.dispatchEvent(g),g.defaultPrevented||(gAe(_Ae(fG(o)),{select:!0}),document.activeElement===h&&_u(o))}return()=>{o.removeEventListener(RT,u),setTimeout(()=>{const g=new CustomEvent(PT,vB);o.addEventListener(PT,f),o.dispatchEvent(g),g.defaultPrevented||_u(h??document.body,{select:!0}),o.removeEventListener(PT,f),bB.remove(m)},0)}}},[o,u,f,m]);const p=_.useCallback(h=>{if(!n&&!r||m.paused)return;const y=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,g=document.activeElement;if(y&&g){const v=h.currentTarget,[w,x]=vAe(v);w&&x?!h.shiftKey&&g===x?(h.preventDefault(),n&&_u(w,{select:!0})):h.shiftKey&&g===w&&(h.preventDefault(),n&&_u(x,{select:!0})):g===v&&h.preventDefault()}},[n,r,m.paused]);return P.jsx(tu.div,{tabIndex:-1,...a,ref:d,onKeyDown:p})});dG.displayName=mAe;function gAe(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(_u(r,{select:e}),document.activeElement!==n)return}function vAe(t){const e=fG(t),n=yB(e,t),r=yB(e.reverse(),t);return[n,r]}function fG(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function yB(t,e){for(const n of t)if(!yAe(n,{upTo:e}))return n}function yAe(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function bAe(t){return t instanceof HTMLInputElement&&"select"in t}function _u(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&bAe(t)&&e&&t.select()}}var bB=wAe();function wAe(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=wB(t,e),t.unshift(e)},remove(e){var n;t=wB(t,e),(n=t[0])==null||n.resume()}}}function wB(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}function _Ae(t){return t.filter(e=>e.tagName!=="A")}var xAe="Portal",hG=_.forwardRef((t,e)=>{var o;const{container:n,...r}=t,[s,i]=_.useState(!1);Ln(()=>i(!0),[]);const a=n||s&&((o=globalThis==null?void 0:globalThis.document)==null?void 0:o.body);return a?t0.createPortal(P.jsx(tu.div,{...r,ref:e}),a):null});hG.displayName=xAe;function SAe(t,e){return _.useReducer((n,r)=>e[n][r]??n,t)}var mA=t=>{const{present:e,children:n}=t,r=EAe(e),s=typeof n=="function"?n({present:r.isPresent}):_.Children.only(n),i=yp(r.ref,CAe(s));return typeof n=="function"||r.isPresent?_.cloneElement(s,{ref:i}):null};mA.displayName="Presence";function EAe(t){const[e,n]=_.useState(),r=_.useRef({}),s=_.useRef(t),i=_.useRef("none"),a=t?"mounted":"unmounted",[o,c]=SAe(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return _.useEffect(()=>{const u=dS(r.current);i.current=o==="mounted"?u:"none"},[o]),Ln(()=>{const u=r.current,f=s.current;if(f!==t){const d=i.current,m=dS(u);t?c("MOUNT"):m==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(f&&d!==m?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,c]),Ln(()=>{if(e){let u;const f=e.ownerDocument.defaultView??window,l=m=>{const h=dS(r.current).includes(m.animationName);if(m.target===e&&h&&(c("ANIMATION_END"),!s.current)){const y=e.style.animationFillMode;e.style.animationFillMode="forwards",u=f.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=y)})}},d=m=>{m.target===e&&(i.current=dS(r.current))};return e.addEventListener("animationstart",d),e.addEventListener("animationcancel",l),e.addEventListener("animationend",l),()=>{f.clearTimeout(u),e.removeEventListener("animationstart",d),e.removeEventListener("animationcancel",l),e.removeEventListener("animationend",l)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:_.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function dS(t){return(t==null?void 0:t.animationName)||"none"}function CAe(t){var r,s;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(s=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:s.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var TT=0;function AAe(){_.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??_B()),document.body.insertAdjacentElement("beforeend",t[1]??_B()),TT++,()=>{TT===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),TT--}},[])}function _B(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var pG=_L(),kT=function(){},gA=_.forwardRef(function(t,e){var n=_.useRef(null),r=_.useState({onScrollCapture:kT,onWheelCapture:kT,onTouchMoveCapture:kT}),s=r[0],i=r[1],a=t.forwardProps,o=t.children,c=t.className,u=t.removeScrollBar,f=t.enabled,l=t.shards,d=t.sideCar,m=t.noIsolation,p=t.inert,h=t.allowPinchZoom,y=t.as,g=y===void 0?"div":y,v=t.gapMode,w=z1(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=d,A=wL([n,e]),k=fr(fr({},w),s);return _.createElement(_.Fragment,null,f&&_.createElement(x,{sideCar:pG,removeScrollBar:u,shards:l,noIsolation:m,inert:p,setCallbacks:i,allowPinchZoom:!!h,lockRef:n,gapMode:v}),a?_.cloneElement(_.Children.only(o),fr(fr({},k),{ref:A})):_.createElement(g,fr({},k,{className:c,ref:A}),o))});gA.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};gA.classNames={fullWidth:Im,zeroRight:Lm};var JD=!1;if(typeof window<"u")try{var fS=Object.defineProperty({},"passive",{get:function(){return JD=!0,!0}});window.addEventListener("test",fS,fS),window.removeEventListener("test",fS,fS)}catch{JD=!1}var Vp=JD?{passive:!1}:!1,RAe=function(t){return t.tagName==="TEXTAREA"},mG=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!RAe(t)&&n[e]==="visible")},PAe=function(t){return mG(t,"overflowY")},TAe=function(t){return mG(t,"overflowX")},xB=function(t,e){var n=e.ownerDocument,r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var s=gG(t,r);if(s){var i=vG(t,r),a=i[1],o=i[2];if(a>o)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},kAe=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},DAe=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},gG=function(t,e){return t==="v"?PAe(e):TAe(e)},vG=function(t,e){return t==="v"?kAe(e):DAe(e)},NAe=function(t,e){return t==="h"&&e==="rtl"?-1:1},MAe=function(t,e,n,r,s){var i=NAe(t,window.getComputedStyle(e).direction),a=i*r,o=n.target,c=e.contains(o),u=!1,f=a>0,l=0,d=0;do{var m=vG(t,o),p=m[0],h=m[1],y=m[2],g=h-y-i*p;(p||g)&&gG(t,o)&&(l+=g,d+=p),o instanceof ShadowRoot?o=o.host:o=o.parentNode}while(!c&&o!==document.body||c&&(e.contains(o)||e===o));return(f&&Math.abs(l)<1||!f&&Math.abs(d)<1)&&(u=!0),u},hS=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},SB=function(t){return[t.deltaX,t.deltaY]},EB=function(t){return t&&"current"in t?t.current:t},OAe=function(t,e){return t[0]===e[0]&&t[1]===e[1]},LAe=function(t){return` .block-interactivity-`.concat(t,` {pointer-events: none;} .allow-interactivity-`).concat(t,` {pointer-events: all;} -`)},OAe=0,qp=[];function LAe(t){var e=_.useRef([]),n=_.useRef([0,0]),r=_.useRef(),s=_.useState(OAe++)[0],i=_.useState(UC)[0],a=_.useRef(t);_.useEffect(function(){a.current=t},[t]),_.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var h=bL([t.lockRef.current],(t.shards||[]).map(EB),!0).filter(Boolean);return h.forEach(function(y){return y.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),h.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var o=_.useCallback(function(h,y){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!a.current.allowPinchZoom;var g=hS(h),v=n.current,w="deltaX"in h?h.deltaX:v[0]-g[0],x="deltaY"in h?h.deltaY:v[1]-g[1],A,k=h.target,R=Math.abs(w)>Math.abs(x)?"h":"v";if("touches"in h&&R==="h"&&k.type==="range")return!1;var E=xB(R,k);if(!E)return!0;if(E?A=R:(A=R==="v"?"h":"v",E=xB(R,k)),!E)return!1;if(!r.current&&"changedTouches"in h&&(w||x)&&(r.current=A),!A)return!0;var T=r.current||A;return DAe(T,y,h,T==="h"?w:x)},[]),c=_.useCallback(function(h){var y=h;if(!(!qp.length||qp[qp.length-1]!==i)){var g="deltaY"in y?SB(y):hS(y),v=e.current.filter(function(A){return A.name===y.type&&(A.target===y.target||y.target===A.shadowParent)&&NAe(A.delta,g)})[0];if(v&&v.should){y.cancelable&&y.preventDefault();return}if(!v){var w=(a.current.shards||[]).map(EB).filter(Boolean).filter(function(A){return A.contains(y.target)}),x=w.length>0?o(y,w[0]):!a.current.noIsolation;x&&y.cancelable&&y.preventDefault()}}},[]),u=_.useCallback(function(h,y,g,v){var w={name:h,delta:y,target:g,should:v,shadowParent:IAe(g)};e.current.push(w),setTimeout(function(){e.current=e.current.filter(function(x){return x!==w})},1)},[]),f=_.useCallback(function(h){n.current=hS(h),r.current=void 0},[]),l=_.useCallback(function(h){u(h.type,SB(h),h.target,o(h,t.lockRef.current))},[]),d=_.useCallback(function(h){u(h.type,hS(h),h.target,o(h,t.lockRef.current))},[]);_.useEffect(function(){return qp.push(i),t.setCallbacks({onScrollCapture:l,onWheelCapture:l,onTouchMoveCapture:d}),document.addEventListener("wheel",c,Vp),document.addEventListener("touchmove",c,Vp),document.addEventListener("touchstart",f,Vp),function(){qp=qp.filter(function(h){return h!==i}),document.removeEventListener("wheel",c,Vp),document.removeEventListener("touchmove",c,Vp),document.removeEventListener("touchstart",f,Vp)}},[]);var m=t.removeScrollBar,p=t.inert;return _.createElement(_.Fragment,null,p?_.createElement(i,{styles:MAe(s)}):null,m?_.createElement(SL,{gapMode:t.gapMode}):null)}function IAe(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const $Ae=xL(pG,LAe);var yG=_.forwardRef(function(t,e){return _.createElement(gA,fr({},t,{ref:e,sideCar:$Ae}))});yG.classNames=gA.classNames;var zI="Dialog",[bG,BHe]=JCe(zI),[jAe,Ia]=bG(zI),wG=t=>{const{__scopeDialog:e,children:n,open:r,defaultOpen:s,onOpenChange:i,modal:a=!0}=t,o=_.useRef(null),c=_.useRef(null),[u=!1,f]=sr({prop:r,defaultProp:s,onChange:i});return P.jsx(jAe,{scope:e,triggerRef:o,contentRef:c,contentId:Vr(),titleId:Vr(),descriptionId:Vr(),open:u,onOpenChange:f,onOpenToggle:_.useCallback(()=>f(l=>!l),[f]),modal:a,children:n})};wG.displayName=zI;var _G="DialogTrigger",FAe=_.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Ia(_G,n),i=yp(e,s.triggerRef);return P.jsx(tu.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":HI(s.open),...r,ref:i,onClick:Sd(t.onClick,s.onOpenToggle)})});FAe.displayName=_G;var BI="DialogPortal",[zAe,xG]=bG(BI,{forceMount:void 0}),SG=t=>{const{__scopeDialog:e,forceMount:n,children:r,container:s}=t,i=Ia(BI,e);return P.jsx(zAe,{scope:e,forceMount:n,children:_.Children.map(r,a=>P.jsx(mA,{present:n||i.open,children:P.jsx(hG,{asChild:!0,container:s,children:a})}))})};SG.displayName=BI;var g1="DialogOverlay",EG=_.forwardRef((t,e)=>{const n=xG(g1,t.__scopeDialog),{forceMount:r=n.forceMount,...s}=t,i=Ia(g1,t.__scopeDialog);return i.modal?P.jsx(mA,{present:r||i.open,children:P.jsx(BAe,{...s,ref:e})}):null});EG.displayName=g1;var BAe=_.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Ia(g1,n);return P.jsx(yG,{as:FI,allowPinchZoom:!0,shards:[s.contentRef],children:P.jsx(tu.div,{"data-state":HI(s.open),...r,ref:e,style:{pointerEvents:"auto",...r.style}})})}),Zh="DialogContent",CG=_.forwardRef((t,e)=>{const n=xG(Zh,t.__scopeDialog),{forceMount:r=n.forceMount,...s}=t,i=Ia(Zh,t.__scopeDialog);return P.jsx(mA,{present:r||i.open,children:i.modal?P.jsx(UAe,{...s,ref:e}):P.jsx(HAe,{...s,ref:e})})});CG.displayName=Zh;var UAe=_.forwardRef((t,e)=>{const n=Ia(Zh,t.__scopeDialog),r=_.useRef(null),s=yp(e,n.contentRef,r);return _.useEffect(()=>{const i=r.current;if(i)return Ev(i)},[]),P.jsx(AG,{...t,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Sd(t.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:Sd(t.onPointerDownOutside,i=>{const a=i.detail.originalEvent,o=a.button===0&&a.ctrlKey===!0;(a.button===2||o)&&i.preventDefault()}),onFocusOutside:Sd(t.onFocusOutside,i=>i.preventDefault())})}),HAe=_.forwardRef((t,e)=>{const n=Ia(Zh,t.__scopeDialog),r=_.useRef(!1),s=_.useRef(!1);return P.jsx(AG,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a,o;(a=t.onCloseAutoFocus)==null||a.call(t,i),i.defaultPrevented||(r.current||(o=n.triggerRef.current)==null||o.focus(),i.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:i=>{var c,u;(c=t.onInteractOutside)==null||c.call(t,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const a=i.target;((u=n.triggerRef.current)==null?void 0:u.contains(a))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),AG=_.forwardRef((t,e)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:i,...a}=t,o=Ia(Zh,n),c=_.useRef(null),u=yp(e,c);return EAe(),P.jsxs(P.Fragment,{children:[P.jsx(dG,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:i,children:P.jsx(cG,{role:"dialog",id:o.contentId,"aria-describedby":o.descriptionId,"aria-labelledby":o.titleId,"data-state":HI(o.open),...a,ref:u,onDismiss:()=>o.onOpenChange(!1)})}),P.jsxs(P.Fragment,{children:[P.jsx(WAe,{titleId:o.titleId}),P.jsx(qAe,{contentRef:c,descriptionId:o.descriptionId})]})]})}),UI="DialogTitle",RG=_.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Ia(UI,n);return P.jsx(tu.h2,{id:s.titleId,...r,ref:e})});RG.displayName=UI;var PG="DialogDescription",TG=_.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Ia(PG,n);return P.jsx(tu.p,{id:s.descriptionId,...r,ref:e})});TG.displayName=PG;var kG="DialogClose",DG=_.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Ia(kG,n);return P.jsx(tu.button,{type:"button",...r,ref:e,onClick:Sd(t.onClick,()=>s.onOpenChange(!1))})});DG.displayName=kG;function HI(t){return t?"open":"closed"}var NG="DialogTitleWarning",[UHe,MG]=QCe(NG,{contentName:Zh,titleName:UI,docsSlug:"dialog"}),WAe=({titleId:t})=>{const e=MG(NG),n=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users. +`)},IAe=0,qp=[];function $Ae(t){var e=_.useRef([]),n=_.useRef([0,0]),r=_.useRef(),s=_.useState(IAe++)[0],i=_.useState(U1)[0],a=_.useRef(t);_.useEffect(function(){a.current=t},[t]),_.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(s));var h=bL([t.lockRef.current],(t.shards||[]).map(EB),!0).filter(Boolean);return h.forEach(function(y){return y.classList.add("allow-interactivity-".concat(s))}),function(){document.body.classList.remove("block-interactivity-".concat(s)),h.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(s))})}}},[t.inert,t.lockRef.current,t.shards]);var o=_.useCallback(function(h,y){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!a.current.allowPinchZoom;var g=hS(h),v=n.current,w="deltaX"in h?h.deltaX:v[0]-g[0],x="deltaY"in h?h.deltaY:v[1]-g[1],A,k=h.target,R=Math.abs(w)>Math.abs(x)?"h":"v";if("touches"in h&&R==="h"&&k.type==="range")return!1;var E=xB(R,k);if(!E)return!0;if(E?A=R:(A=R==="v"?"h":"v",E=xB(R,k)),!E)return!1;if(!r.current&&"changedTouches"in h&&(w||x)&&(r.current=A),!A)return!0;var T=r.current||A;return MAe(T,y,h,T==="h"?w:x)},[]),c=_.useCallback(function(h){var y=h;if(!(!qp.length||qp[qp.length-1]!==i)){var g="deltaY"in y?SB(y):hS(y),v=e.current.filter(function(A){return A.name===y.type&&(A.target===y.target||y.target===A.shadowParent)&&OAe(A.delta,g)})[0];if(v&&v.should){y.cancelable&&y.preventDefault();return}if(!v){var w=(a.current.shards||[]).map(EB).filter(Boolean).filter(function(A){return A.contains(y.target)}),x=w.length>0?o(y,w[0]):!a.current.noIsolation;x&&y.cancelable&&y.preventDefault()}}},[]),u=_.useCallback(function(h,y,g,v){var w={name:h,delta:y,target:g,should:v,shadowParent:jAe(g)};e.current.push(w),setTimeout(function(){e.current=e.current.filter(function(x){return x!==w})},1)},[]),f=_.useCallback(function(h){n.current=hS(h),r.current=void 0},[]),l=_.useCallback(function(h){u(h.type,SB(h),h.target,o(h,t.lockRef.current))},[]),d=_.useCallback(function(h){u(h.type,hS(h),h.target,o(h,t.lockRef.current))},[]);_.useEffect(function(){return qp.push(i),t.setCallbacks({onScrollCapture:l,onWheelCapture:l,onTouchMoveCapture:d}),document.addEventListener("wheel",c,Vp),document.addEventListener("touchmove",c,Vp),document.addEventListener("touchstart",f,Vp),function(){qp=qp.filter(function(h){return h!==i}),document.removeEventListener("wheel",c,Vp),document.removeEventListener("touchmove",c,Vp),document.removeEventListener("touchstart",f,Vp)}},[]);var m=t.removeScrollBar,p=t.inert;return _.createElement(_.Fragment,null,p?_.createElement(i,{styles:LAe(s)}):null,m?_.createElement(SL,{gapMode:t.gapMode}):null)}function jAe(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const FAe=xL(pG,$Ae);var yG=_.forwardRef(function(t,e){return _.createElement(gA,fr({},t,{ref:e,sideCar:FAe}))});yG.classNames=gA.classNames;var zI="Dialog",[bG,HHe]=eAe(zI),[zAe,Ia]=bG(zI),wG=t=>{const{__scopeDialog:e,children:n,open:r,defaultOpen:s,onOpenChange:i,modal:a=!0}=t,o=_.useRef(null),c=_.useRef(null),[u=!1,f]=sr({prop:r,defaultProp:s,onChange:i});return P.jsx(zAe,{scope:e,triggerRef:o,contentRef:c,contentId:Vr(),titleId:Vr(),descriptionId:Vr(),open:u,onOpenChange:f,onOpenToggle:_.useCallback(()=>f(l=>!l),[f]),modal:a,children:n})};wG.displayName=zI;var _G="DialogTrigger",BAe=_.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Ia(_G,n),i=yp(e,s.triggerRef);return P.jsx(tu.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":HI(s.open),...r,ref:i,onClick:Sd(t.onClick,s.onOpenToggle)})});BAe.displayName=_G;var BI="DialogPortal",[UAe,xG]=bG(BI,{forceMount:void 0}),SG=t=>{const{__scopeDialog:e,forceMount:n,children:r,container:s}=t,i=Ia(BI,e);return P.jsx(UAe,{scope:e,forceMount:n,children:_.Children.map(r,a=>P.jsx(mA,{present:n||i.open,children:P.jsx(hG,{asChild:!0,container:s,children:a})}))})};SG.displayName=BI;var gC="DialogOverlay",EG=_.forwardRef((t,e)=>{const n=xG(gC,t.__scopeDialog),{forceMount:r=n.forceMount,...s}=t,i=Ia(gC,t.__scopeDialog);return i.modal?P.jsx(mA,{present:r||i.open,children:P.jsx(HAe,{...s,ref:e})}):null});EG.displayName=gC;var HAe=_.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Ia(gC,n);return P.jsx(yG,{as:FI,allowPinchZoom:!0,shards:[s.contentRef],children:P.jsx(tu.div,{"data-state":HI(s.open),...r,ref:e,style:{pointerEvents:"auto",...r.style}})})}),Zh="DialogContent",CG=_.forwardRef((t,e)=>{const n=xG(Zh,t.__scopeDialog),{forceMount:r=n.forceMount,...s}=t,i=Ia(Zh,t.__scopeDialog);return P.jsx(mA,{present:r||i.open,children:i.modal?P.jsx(WAe,{...s,ref:e}):P.jsx(VAe,{...s,ref:e})})});CG.displayName=Zh;var WAe=_.forwardRef((t,e)=>{const n=Ia(Zh,t.__scopeDialog),r=_.useRef(null),s=yp(e,n.contentRef,r);return _.useEffect(()=>{const i=r.current;if(i)return Ev(i)},[]),P.jsx(AG,{...t,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Sd(t.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:Sd(t.onPointerDownOutside,i=>{const a=i.detail.originalEvent,o=a.button===0&&a.ctrlKey===!0;(a.button===2||o)&&i.preventDefault()}),onFocusOutside:Sd(t.onFocusOutside,i=>i.preventDefault())})}),VAe=_.forwardRef((t,e)=>{const n=Ia(Zh,t.__scopeDialog),r=_.useRef(!1),s=_.useRef(!1);return P.jsx(AG,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a,o;(a=t.onCloseAutoFocus)==null||a.call(t,i),i.defaultPrevented||(r.current||(o=n.triggerRef.current)==null||o.focus(),i.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:i=>{var c,u;(c=t.onInteractOutside)==null||c.call(t,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const a=i.target;((u=n.triggerRef.current)==null?void 0:u.contains(a))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),AG=_.forwardRef((t,e)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:i,...a}=t,o=Ia(Zh,n),c=_.useRef(null),u=yp(e,c);return AAe(),P.jsxs(P.Fragment,{children:[P.jsx(dG,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:i,children:P.jsx(cG,{role:"dialog",id:o.contentId,"aria-describedby":o.descriptionId,"aria-labelledby":o.titleId,"data-state":HI(o.open),...a,ref:u,onDismiss:()=>o.onOpenChange(!1)})}),P.jsxs(P.Fragment,{children:[P.jsx(qAe,{titleId:o.titleId}),P.jsx(KAe,{contentRef:c,descriptionId:o.descriptionId})]})]})}),UI="DialogTitle",RG=_.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Ia(UI,n);return P.jsx(tu.h2,{id:s.titleId,...r,ref:e})});RG.displayName=UI;var PG="DialogDescription",TG=_.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Ia(PG,n);return P.jsx(tu.p,{id:s.descriptionId,...r,ref:e})});TG.displayName=PG;var kG="DialogClose",DG=_.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,s=Ia(kG,n);return P.jsx(tu.button,{type:"button",...r,ref:e,onClick:Sd(t.onClick,()=>s.onOpenChange(!1))})});DG.displayName=kG;function HI(t){return t?"open":"closed"}var NG="DialogTitleWarning",[WHe,MG]=Z1e(NG,{contentName:Zh,titleName:UI,docsSlug:"dialog"}),qAe=({titleId:t})=>{const e=MG(NG),n=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users. If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component. -For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return _.useEffect(()=>{t&&(document.getElementById(t)||console.error(n))},[n,t]),null},VAe="DialogDescriptionWarning",qAe=({contentRef:t,descriptionId:e})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${MG(VAe).contentName}}.`;return _.useEffect(()=>{var i;const s=(i=t.current)==null?void 0:i.getAttribute("aria-describedby");e&&s&&(document.getElementById(e)||console.warn(r))},[r,t,e]),null},GAe=wG,KAe=SG,YAe=EG,XAe=CG,QAe=RG,JAe=TG,ZAe=DG;function eRe(t){if(typeof document>"u")return;let e=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",e.appendChild(n),n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t))}const OG=se.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),R_=()=>{const t=se.useContext(OG);if(!t)throw new Error("useDrawerContext must be used within a Drawer.Root");return t};eRe(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,100%,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,-100%,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(-100%,0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(100%,0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not( +For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return _.useEffect(()=>{t&&(document.getElementById(t)||console.error(n))},[n,t]),null},GAe="DialogDescriptionWarning",KAe=({contentRef:t,descriptionId:e})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${MG(GAe).contentName}}.`;return _.useEffect(()=>{var i;const s=(i=t.current)==null?void 0:i.getAttribute("aria-describedby");e&&s&&(document.getElementById(e)||console.warn(r))},[r,t,e]),null},YAe=wG,XAe=SG,QAe=EG,JAe=CG,ZAe=RG,eRe=TG,tRe=DG;function nRe(t){if(typeof document>"u")return;let e=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",e.appendChild(n),n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t))}const OG=se.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),R0=()=>{const t=se.useContext(OG);if(!t)throw new Error("useDrawerContext must be used within a Drawer.Root");return t};nRe(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,100%,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,-100%,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(-100%,0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(100%,0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not( [data-state=closed] -){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,100%,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,100%,0)}}@keyframes slideFromTop{from{transform:translate3d(0,-100%,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,-100%,0)}}@keyframes slideFromLeft{from{transform:translate3d(-100%,0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(-100%,0,0)}}@keyframes slideFromRight{from{transform:translate3d(100%,0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(100%,0,0)}}`);const tRe=24,nRe=typeof window<"u"?_.useLayoutEffect:_.useEffect;function CB(...t){return(...e)=>{for(let n of t)typeof n=="function"&&n(...e)}}function rRe(){return WI(/^Mac/)}function sRe(){return WI(/^iPhone/)}function AB(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function iRe(){return WI(/^iPad/)||rRe()&&navigator.maxTouchPoints>1}function LG(){return sRe()||iRe()}function WI(t){return typeof window<"u"&&window.navigator!=null?t.test(window.navigator.platform):void 0}const DT=typeof document<"u"&&window.visualViewport;function RB(t){let e=window.getComputedStyle(t);return/(auto|scroll)/.test(e.overflow+e.overflowX+e.overflowY)}function IG(t){for(RB(t)&&(t=t.parentElement);t&&!RB(t);)t=t.parentElement;return t||document.scrollingElement||document.documentElement}const oRe=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let pS=0,NT;function aRe(t={}){let{isDisabled:e}=t;nRe(()=>{if(!e)return pS++,pS===1&&LG()&&(NT=lRe()),()=>{pS--,pS===0&&(NT==null||NT())}},[e])}function lRe(){let t,e=0,n=l=>{t=IG(l.target),!(t===document.documentElement&&t===document.body)&&(e=l.changedTouches[0].pageY)},r=l=>{if(!t||t===document.documentElement||t===document.body){l.preventDefault();return}let d=l.changedTouches[0].pageY,m=t.scrollTop,p=t.scrollHeight-t.clientHeight;p!==0&&((m<=0&&d>e||m>=p&&d{let d=l.target;ZD(d)&&d!==document.activeElement&&(l.preventDefault(),d.style.transform="translateY(-2000px)",d.focus(),requestAnimationFrame(()=>{d.style.transform=""}))},i=l=>{let d=l.target;ZD(d)&&(d.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{d.style.transform="",DT&&(DT.height{PB(d)}):DT.addEventListener("resize",()=>PB(d),{once:!0}))}))},a=()=>{window.scrollTo(0,0)},o=window.pageXOffset,c=window.pageYOffset,u=CB(cRe(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let f=CB(wy(document,"touchstart",n,{passive:!1,capture:!0}),wy(document,"touchmove",r,{passive:!1,capture:!0}),wy(document,"touchend",s,{passive:!1,capture:!0}),wy(document,"focus",i,!0),wy(window,"scroll",a));return()=>{u(),f(),window.scrollTo(o,c)}}function cRe(t,e,n){let r=t.style[e];return t.style[e]=n,()=>{t.style[e]=r}}function wy(t,e,n,r){return t.addEventListener(e,n,r),()=>{t.removeEventListener(e,n,r)}}function PB(t){let e=document.scrollingElement||document.documentElement;for(;t&&t!==e;){let n=IG(t);if(n!==document.documentElement&&n!==document.body&&n!==t){let r=n.getBoundingClientRect().top,s=t.getBoundingClientRect().top,i=t.getBoundingClientRect().bottom;const a=n.getBoundingClientRect().bottom+tRe;i>a&&(n.scrollTop+=s-r)}t=n.parentElement}}function ZD(t){return t instanceof HTMLInputElement&&!oRe.has(t.type)||t instanceof HTMLTextAreaElement||t instanceof HTMLElement&&t.isContentEditable}function uRe(t,e){typeof t=="function"?t(e):t!=null&&(t.current=e)}function dRe(...t){return e=>t.forEach(n=>uRe(n,e))}function $G(...t){return _.useCallback(dRe(...t),t)}const jG=new WeakMap;function $r(t,e,n=!1){if(!t||!(t instanceof HTMLElement))return;let r={};Object.entries(e).forEach(([s,i])=>{if(s.startsWith("--")){t.style.setProperty(s,i);return}r[s]=t.style[s],t.style[s]=i}),!n&&jG.set(t,r)}function fRe(t,e){if(!t||!(t instanceof HTMLElement))return;let n=jG.get(t);n&&(t.style[e]=n[e])}const jr=t=>{switch(t){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return t}};function mS(t,e){if(!t)return null;const n=window.getComputedStyle(t),r=n.transform||n.webkitTransform||n.mozTransform;let s=r.match(/^matrix3d\((.+)\)$/);return s?parseFloat(s[1].split(", ")[jr(e)?13:12]):(s=r.match(/^matrix\((.+)\)$/),s?parseFloat(s[1].split(", ")[jr(e)?5:4]):null)}function hRe(t){return 8*(Math.log(t+1)-2)}function MT(t,e){if(!t)return()=>{};const n=t.style.cssText;return Object.assign(t.style,e),()=>{t.style.cssText=n}}function pRe(...t){return(...e)=>{for(const n of t)typeof n=="function"&&n(...e)}}const er={DURATION:.5,EASE:[.32,.72,0,1]},FG=.4,mRe=.25,gRe=100,zG=8,gS=16,eN=26,OT="vaul-dragging";function BG(t){const e=se.useRef(t);return se.useEffect(()=>{e.current=t}),se.useMemo(()=>(...n)=>e.current==null?void 0:e.current.call(e,...n),[])}function vRe({defaultProp:t,onChange:e}){const n=se.useState(t),[r]=n,s=se.useRef(r),i=BG(e);return se.useEffect(()=>{s.current!==r&&(i(r),s.current=r)},[r,s,i]),n}function UG({prop:t,defaultProp:e,onChange:n=()=>{}}){const[r,s]=vRe({defaultProp:e,onChange:n}),i=t!==void 0,a=i?t:r,o=BG(n),c=se.useCallback(u=>{if(i){const l=typeof u=="function"?u(t):u;l!==t&&o(l)}else s(u)},[i,t,s,o]);return[a,c]}function yRe({activeSnapPointProp:t,setActiveSnapPointProp:e,snapPoints:n,drawerRef:r,overlayRef:s,fadeFromIndex:i,onSnapPointChange:a,direction:o="bottom",container:c,snapToSequentialPoint:u}){const[f,l]=UG({prop:t,defaultProp:n==null?void 0:n[0],onChange:e}),[d,m]=se.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);se.useEffect(()=>{function R(){m({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",R),()=>window.removeEventListener("resize",R)},[]);const p=se.useMemo(()=>f===(n==null?void 0:n[n.length-1])||null,[n,f]),h=se.useMemo(()=>n==null?void 0:n.findIndex(R=>R===f),[n,f]),y=n&&n.length>0&&(i||i===0)&&!Number.isNaN(i)&&n[i]===f||!n,g=se.useMemo(()=>{const R=c?{width:c.getBoundingClientRect().width,height:c.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var E;return(E=n==null?void 0:n.map(T=>{const D=typeof T=="string";let M=0;if(D&&(M=parseInt(T,10)),jr(o)){const I=D?M:d?T*R.height:0;return d?o==="bottom"?R.height-I:-R.height+I:I}const L=D?M:d?T*R.width:0;return d?o==="right"?R.width-L:-R.width+L:L}))!=null?E:[]},[n,d,c]),v=se.useMemo(()=>h!==null?g==null?void 0:g[h]:null,[g,h]),w=se.useCallback(R=>{var E;const T=(E=g==null?void 0:g.findIndex(D=>D===R))!=null?E:null;a(T),$r(r.current,{transition:`transform ${er.DURATION}s cubic-bezier(${er.EASE.join(",")})`,transform:jr(o)?`translate3d(0, ${R}px, 0)`:`translate3d(${R}px, 0, 0)`}),g&&T!==g.length-1&&T!==i&&T{if(f||t){var R;const E=(R=n==null?void 0:n.findIndex(T=>T===t||T===f))!=null?R:-1;g&&E!==-1&&typeof g[E]=="number"&&w(g[E])}},[f,t,n,g,w]);function x({draggedDistance:R,closeDrawer:E,velocity:T,dismissible:D}){if(i===void 0)return;const M=o==="bottom"||o==="right"?(v??0)-R:(v??0)+R,L=h===i-1,I=h===0,j=R>0;if(L&&$r(s.current,{transition:`opacity ${er.DURATION}s cubic-bezier(${er.EASE.join(",")})`}),!u&&T>2&&!j){D?E():w(g[0]);return}if(!u&&T>2&&j&&g&&n){w(g[n.length-1]);return}const U=g==null?void 0:g.reduce((W,H)=>typeof W!="number"||typeof H!="number"?W:Math.abs(H-M)FG&&Math.abs(R)0&&p){w(g[n.length-1]);return}if(I&&W<0&&D&&E(),h===null)return;w(g[h+W]);return}w(U)}function A({draggedDistance:R}){if(v===null)return;const E=o==="bottom"||o==="right"?v-R:v+R;(o==="bottom"||o==="right")&&Eg[g.length-1]||$r(r.current,{transform:jr(o)?`translate3d(0, ${E}px, 0)`:`translate3d(${E}px, 0, 0)`})}function k(R,E){if(!n||typeof h!="number"||!g||i===void 0)return null;const T=h===i-1;if(h>=i&&E)return 0;if(T&&!E)return 1;if(!y&&!T)return null;const M=T?h+1:h-1,L=T?g[M]-g[M-1]:g[M+1]-g[M],I=R/Math.abs(L);return T?1-I:I}return{isLastSnapPoint:p,activeSnapPoint:f,shouldFade:y,getPercentageDragged:k,setActiveSnapPoint:l,activeSnapPointIndex:h,onRelease:x,onDrag:A,snapPointsOffset:g}}const bRe=()=>()=>{};function wRe(){const{direction:t,isOpen:e,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:s}=R_(),i=se.useRef(null),a=_.useMemo(()=>document.body.style.backgroundColor,[]);function o(){return(window.innerWidth-eN)/window.innerWidth}se.useEffect(()=>{if(e&&n){i.current&&clearTimeout(i.current);const c=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!c)return;pRe(r&&!s?MT(document.body,{background:"black"}):bRe,MT(c,{transformOrigin:jr(t)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${er.DURATION}s`,transitionTimingFunction:`cubic-bezier(${er.EASE.join(",")})`}));const u=MT(c,{borderRadius:`${zG}px`,overflow:"hidden",...jr(t)?{transform:`scale(${o()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${o()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{u(),i.current=window.setTimeout(()=>{a?document.body.style.background=a:document.body.style.removeProperty("background")},er.DURATION*1e3)}}},[e,n,a])}let _y=null;function _Re({isOpen:t,modal:e,nested:n,hasBeenOpened:r,preventScrollRestoration:s,noBodyStyles:i}){const[a,o]=se.useState(()=>typeof window<"u"?window.location.href:""),c=se.useRef(0),u=se.useCallback(()=>{if(AB()&&_y===null&&t&&!i){_y={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:l,innerHeight:d}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-c.current}px`,left:`${-l}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const m=d-window.innerHeight;m&&c.current>=d&&(document.body.style.top=`${-(c.current+m)}px`)}),300)}},[t]),f=se.useCallback(()=>{if(AB()&&_y!==null&&!i){const l=-parseInt(document.body.style.top,10),d=-parseInt(document.body.style.left,10);Object.assign(document.body.style,_y),window.requestAnimationFrame(()=>{if(s&&a!==window.location.href){o(window.location.href);return}window.scrollTo(d,l)}),_y=null}},[a]);return se.useEffect(()=>{function l(){c.current=window.scrollY}return l(),window.addEventListener("scroll",l),()=>{window.removeEventListener("scroll",l)}},[]),se.useEffect(()=>{n||!r||(t?(!window.matchMedia("(display-mode: standalone)").matches&&u(),e||window.setTimeout(()=>{f()},500)):f())},[t,r,a,e,n,u,f]),{restorePositionSetting:f}}function xRe({open:t,onOpenChange:e,children:n,onDrag:r,onRelease:s,snapPoints:i,shouldScaleBackground:a=!1,setBackgroundColorOnScale:o=!0,closeThreshold:c=mRe,scrollLockTimeout:u=gRe,dismissible:f=!0,handleOnly:l=!1,fadeFromIndex:d=i&&i.length-1,activeSnapPoint:m,setActiveSnapPoint:p,fixed:h,modal:y=!0,onClose:g,nested:v,noBodyStyles:w,direction:x="bottom",defaultOpen:A=!1,disablePreventScroll:k=!0,snapToSequentialPoint:R=!1,preventScrollRestoration:E=!1,repositionInputs:T=!0,onAnimationEnd:D,container:M,autoFocus:L=!1}){var I,j;const[U=!1,Y]=UG({defaultProp:A,prop:t,onChange:Be=>{e==null||e(Be),!Be&&!v&&Me(),setTimeout(()=>{D==null||D(Be)},er.DURATION*1e3),Be&&!y&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),Be||(document.body.style.pointerEvents="auto")}}),[W,H]=se.useState(!1),[ee,re]=se.useState(!1),[X,G]=se.useState(!1),K=se.useRef(null),J=se.useRef(null),ue=se.useRef(null),de=se.useRef(null),ie=se.useRef(null),be=se.useRef(!1),Ae=se.useRef(null),_e=se.useRef(0),Oe=se.useRef(!1),Ne=se.useRef(0),ye=se.useRef(null),$e=se.useRef(((I=ye.current)==null?void 0:I.getBoundingClientRect().height)||0),ut=se.useRef(((j=ye.current)==null?void 0:j.getBoundingClientRect().width)||0),Qe=se.useRef(0),yt=se.useCallback(Be=>{i&&Be===Z.length-1&&(J.current=new Date)},[]),{activeSnapPoint:En,activeSnapPointIndex:Xt,setActiveSnapPoint:gn,onRelease:Qt,snapPointsOffset:Z,onDrag:fe,shouldFade:ge,getPercentageDragged:Pe}=yRe({snapPoints:i,activeSnapPointProp:m,setActiveSnapPointProp:p,drawerRef:ye,fadeFromIndex:d,overlayRef:K,onSnapPointChange:yt,direction:x,container:M,snapToSequentialPoint:R});aRe({isDisabled:!U||ee||!y||X||!W||!T||!k});const{restorePositionSetting:Me}=_Re({isOpen:U,modal:y,nested:v,hasBeenOpened:W,preventScrollRestoration:E,noBodyStyles:w});function xe(){return(window.innerWidth-eN)/window.innerWidth}function Te(Be){var it,ot;!f&&!i||ye.current&&!ye.current.contains(Be.target)||($e.current=((it=ye.current)==null?void 0:it.getBoundingClientRect().height)||0,ut.current=((ot=ye.current)==null?void 0:ot.getBoundingClientRect().width)||0,re(!0),ue.current=new Date,LG()&&window.addEventListener("touchend",()=>be.current=!1,{once:!0}),Be.target.setPointerCapture(Be.pointerId),_e.current=jr(x)?Be.pageY:Be.pageX)}function Ye(Be,it){var ot,Et;let nt=Be;const Wt=(ot=window.getSelection())==null?void 0:ot.toString(),At=ye.current?mS(ye.current,x):null,yn=new Date;if(nt.hasAttribute("data-vaul-no-drag")||nt.closest("[data-vaul-no-drag]"))return!1;if(x==="right"||x==="left")return!0;if(J.current&&yn.getTime()-J.current.getTime()<500)return!1;if(At!==null&&(x==="bottom"?At>0:At<0))return!0;if(Wt&&Wt.length>0)return!1;if(yn.getTime()-((Et=ie.current)==null?void 0:Et.getTime())nt.clientHeight){if(nt.scrollTop!==0)return ie.current=new Date,!1;if(nt.getAttribute("role")==="dialog")return!0}nt=nt.parentNode}return!0}function Pt(Be){if(ye.current&&ee){const it=x==="bottom"||x==="right"?1:-1,ot=(_e.current-(jr(x)?Be.pageY:Be.pageX))*it,Et=ot>0,nt=i&&!f&&!Et;if(nt&&Xt===0)return;const Wt=Math.abs(ot),At=document.querySelector("[data-vaul-drawer-wrapper]"),yn=x==="bottom"||x==="top"?$e.current:ut.current;let ln=Wt/yn;const cn=Pe(Wt,Et);if(cn!==null&&(ln=cn),nt&&ln>=1||!be.current&&!Ye(Be.target,Et))return;if(ye.current.classList.add(OT),be.current=!0,$r(ye.current,{transition:"none"}),$r(K.current,{transition:"none"}),i&&fe({draggedDistance:ot}),Et&&!i){const hr=hRe(ot),Dn=Math.min(hr*-1,0)*it;$r(ye.current,{transform:jr(x)?`translate3d(0, ${Dn}px, 0)`:`translate3d(${Dn}px, 0, 0)`});return}const kn=1-ln;if((ge||d&&Xt===d-1)&&(r==null||r(Be,ln),$r(K.current,{opacity:`${kn}`,transition:"none"},!0)),At&&K.current&&a){const hr=Math.min(xe()+ln*(1-xe()),1),Dn=8-ln*8,te=Math.max(0,14-ln*14);$r(At,{borderRadius:`${Dn}px`,transform:jr(x)?`scale(${hr}) translate3d(0, ${te}px, 0)`:`scale(${hr}) translate3d(${te}px, 0, 0)`,transition:"none"},!0)}if(!i){const hr=Wt*it;$r(ye.current,{transform:jr(x)?`translate3d(0, ${hr}px, 0)`:`translate3d(${hr}px, 0, 0)`})}}}se.useEffect(()=>{var Be;function it(){if(!ye.current||!T)return;const ot=document.activeElement;if(ZD(ot)||Oe.current){var Et;const nt=((Et=window.visualViewport)==null?void 0:Et.height)||0,Wt=window.innerHeight;let At=Wt-nt;const yn=ye.current.getBoundingClientRect().height||0,ln=yn>Wt*.8;Qe.current||(Qe.current=yn);const cn=ye.current.getBoundingClientRect().top;if(Math.abs(Ne.current-At)>60&&(Oe.current=!Oe.current),i&&i.length>0&&Z&&Xt){const kn=Z[Xt]||0;At+=kn}if(Ne.current=At,yn>nt||Oe.current){const kn=ye.current.getBoundingClientRect().height;let hr=kn;kn>nt&&(hr=nt-(ln?cn:eN)),h?ye.current.style.height=`${kn-Math.max(At,0)}px`:ye.current.style.height=`${Math.max(hr,nt-cn)}px`}else ye.current.style.height=`${Qe.current}px`;i&&i.length>0&&!Oe.current?ye.current.style.bottom="0px":ye.current.style.bottom=`${Math.max(At,0)}px`}}return(Be=window.visualViewport)==null||Be.addEventListener("resize",it),()=>{var ot;return(ot=window.visualViewport)==null?void 0:ot.removeEventListener("resize",it)}},[Xt,i,Z]);function wt(Be){Yn(),g==null||g(),Be||Y(!1),setTimeout(()=>{i&&gn(i[0])},er.DURATION*1e3)}function Ls(){if(!ye.current)return;const Be=document.querySelector("[data-vaul-drawer-wrapper]"),it=mS(ye.current,x);$r(ye.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${er.DURATION}s cubic-bezier(${er.EASE.join(",")})`}),$r(K.current,{transition:`opacity ${er.DURATION}s cubic-bezier(${er.EASE.join(",")})`,opacity:"1"}),a&&it&&it>0&&U&&$r(Be,{borderRadius:`${zG}px`,overflow:"hidden",...jr(x)?{transform:`scale(${xe()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${xe()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${er.DURATION}s`,transitionTimingFunction:`cubic-bezier(${er.EASE.join(",")})`},!0)}function Yn(){!ee||!ye.current||(ye.current.classList.remove(OT),be.current=!1,re(!1),de.current=new Date)}function gs(Be){if(!ee||!ye.current)return;ye.current.classList.remove(OT),be.current=!1,re(!1),de.current=new Date;const it=mS(ye.current,x);if(!Ye(Be.target,!1)||!it||Number.isNaN(it)||ue.current===null)return;const ot=de.current.getTime()-ue.current.getTime(),Et=_e.current-(jr(x)?Be.pageY:Be.pageX),nt=Math.abs(Et)/ot;if(nt>.05&&(G(!0),setTimeout(()=>{G(!1)},200)),i){Qt({draggedDistance:Et*(x==="bottom"||x==="right"?1:-1),closeDrawer:wt,velocity:nt,dismissible:f}),s==null||s(Be,!0);return}if(x==="bottom"||x==="right"?Et>0:Et<0){Ls(),s==null||s(Be,!0);return}if(nt>FG){wt(),s==null||s(Be,!1);return}var Wt;const At=Math.min((Wt=ye.current.getBoundingClientRect().height)!=null?Wt:0,window.innerHeight);var yn;const ln=Math.min((yn=ye.current.getBoundingClientRect().width)!=null?yn:0,window.innerWidth),cn=x==="left"||x==="right";if(Math.abs(it)>=(cn?ln:At)*c){wt(),s==null||s(Be,!1);return}s==null||s(Be,!0),Ls()}se.useEffect(()=>(U&&($r(document.documentElement,{scrollBehavior:"auto"}),J.current=new Date),()=>{fRe(document.documentElement,"scrollBehavior")}),[U]);function Ht(Be){const it=Be?(window.innerWidth-gS)/window.innerWidth:1,ot=Be?-16:0;Ae.current&&window.clearTimeout(Ae.current),$r(ye.current,{transition:`transform ${er.DURATION}s cubic-bezier(${er.EASE.join(",")})`,transform:`scale(${it}) translate3d(0, ${ot}px, 0)`}),!Be&&ye.current&&(Ae.current=setTimeout(()=>{const Et=mS(ye.current,x);$r(ye.current,{transition:"none",transform:jr(x)?`translate3d(0, ${Et}px, 0)`:`translate3d(${Et}px, 0, 0)`})},500))}function an(Be,it){if(it<0)return;const ot=(window.innerWidth-gS)/window.innerWidth,Et=ot+it*(1-ot),nt=-16+it*gS;$r(ye.current,{transform:jr(x)?`scale(${Et}) translate3d(0, ${nt}px, 0)`:`scale(${Et}) translate3d(${nt}px, 0, 0)`,transition:"none"})}function vn(Be,it){const ot=jr(x)?window.innerHeight:window.innerWidth,Et=it?(ot-gS)/ot:1,nt=it?-16:0;it&&$r(ye.current,{transition:`transform ${er.DURATION}s cubic-bezier(${er.EASE.join(",")})`,transform:jr(x)?`scale(${Et}) translate3d(0, ${nt}px, 0)`:`scale(${Et}) translate3d(${nt}px, 0, 0)`})}return se.createElement(GAe,{defaultOpen:A,onOpenChange:Be=>{!f&&!Be||(Be?H(!0):wt(!0),Y(Be))},open:U},se.createElement(OG.Provider,{value:{activeSnapPoint:En,snapPoints:i,setActiveSnapPoint:gn,drawerRef:ye,overlayRef:K,onOpenChange:e,onPress:Te,onRelease:gs,onDrag:Pt,dismissible:f,handleOnly:l,isOpen:U,isDragging:ee,shouldFade:ge,closeDrawer:wt,onNestedDrag:an,onNestedOpenChange:Ht,onNestedRelease:vn,keyboardIsOpen:Oe,modal:y,snapPointsOffset:Z,direction:x,shouldScaleBackground:a,setBackgroundColorOnScale:o,noBodyStyles:w,container:M,autoFocus:L}},n))}const HG=se.forwardRef(function({...t},e){const{overlayRef:n,snapPoints:r,onRelease:s,shouldFade:i,isOpen:a,modal:o}=R_(),c=$G(e,n),u=r&&r.length>0;return o?se.createElement(YAe,{onMouseUp:s,ref:c,"data-vaul-overlay":"","data-vaul-snap-points":a&&u?"true":"false","data-vaul-snap-points-overlay":a&&i?"true":"false",...t}):(typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),null)});HG.displayName="Drawer.Overlay";const WG=se.forwardRef(function({onPointerDownOutside:t,style:e,onOpenAutoFocus:n,...r},s){const{drawerRef:i,onPress:a,onRelease:o,onDrag:c,keyboardIsOpen:u,snapPointsOffset:f,modal:l,isOpen:d,direction:m,snapPoints:p,container:h,handleOnly:y,autoFocus:g}=R_(),[v,w]=se.useState(!1),x=$G(s,i),A=se.useRef(null),k=se.useRef(null),R=se.useRef(!1),E=p&&p.length>0;wRe();const T=(M,L,I=0)=>{if(R.current)return!0;const j=Math.abs(M.y),U=Math.abs(M.x),Y=U>j,W=["bottom","right"].includes(L)?1:-1;if(L==="left"||L==="right"){if(!(M.x*W<0)&&U>=0&&U<=I)return Y}else if(!(M.y*W<0)&&j>=0&&j<=I)return!Y;return R.current=!0,!0};se.useEffect(()=>{E&&window.requestAnimationFrame(()=>{w(!0)})},[]);function D(M){A.current=null,R.current=!1,o(M)}return se.createElement(XAe,{"data-vaul-drawer-direction":m,"data-vaul-drawer":"","data-vaul-delayed-snap-points":v?"true":"false","data-vaul-snap-points":d&&E?"true":"false","data-vaul-custom-container":h?"true":"false",...r,ref:x,style:f&&f.length>0?{"--snap-point-height":`${f[0]}px`,...e}:e,onPointerDown:M=>{y||(r.onPointerDown==null||r.onPointerDown.call(r,M),A.current={x:M.pageX,y:M.pageY},a(M))},onOpenAutoFocus:M=>{n==null||n(M),g||M.preventDefault()},onPointerDownOutside:M=>{if(t==null||t(M),!l||M.defaultPrevented){M.preventDefault();return}u.current&&(u.current=!1)},onFocusOutside:M=>{if(!l){M.preventDefault();return}},onPointerMove:M=>{if(k.current=M,y||(r.onPointerMove==null||r.onPointerMove.call(r,M),!A.current))return;const L=M.pageY-A.current.y,I=M.pageX-A.current.x,j=M.pointerType==="touch"?10:2;T({x:I,y:L},m,j)?c(M):(Math.abs(I)>j||Math.abs(L)>j)&&(A.current=null)},onPointerUp:M=>{r.onPointerUp==null||r.onPointerUp.call(r,M),A.current=null,R.current=!1,o(M)},onPointerOut:M=>{r.onPointerOut==null||r.onPointerOut.call(r,M),D(k.current)},onContextMenu:M=>{r.onContextMenu==null||r.onContextMenu.call(r,M),D(k.current)}})});WG.displayName="Drawer.Content";const SRe=250,ERe=120,CRe=se.forwardRef(function({preventCycle:t=!1,children:e,...n},r){const{closeDrawer:s,isDragging:i,snapPoints:a,activeSnapPoint:o,setActiveSnapPoint:c,dismissible:u,handleOnly:f,isOpen:l,onPress:d,onDrag:m}=R_(),p=se.useRef(null),h=se.useRef(!1);function y(){if(h.current){w();return}window.setTimeout(()=>{g()},ERe)}function g(){if(i||t||h.current){w();return}if(w(),(!a||a.length===0)&&u){s();return}if(o===a[a.length-1]&&u){s();return}const A=a.findIndex(R=>R===o);if(A===-1)return;const k=a[A+1];c(k)}function v(){p.current=window.setTimeout(()=>{h.current=!0},SRe)}function w(){window.clearTimeout(p.current),h.current=!1}return se.createElement("div",{onClick:y,onPointerCancel:w,onPointerDown:x=>{f&&d(x),v()},onPointerMove:x=>{f&&m(x)},ref:r,"data-vaul-drawer-visible":l?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},se.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},e))});CRe.displayName="Drawer.Handle";function ARe(t){const e=R_(),{container:n=e.container,...r}=t;return se.createElement(KAe,{container:n,...r})}const Tl={Root:xRe,Content:WG,Overlay:HG,Portal:ARe,Close:ZAe,Title:QAe,Description:JAe},RRe=({shouldScaleBackground:t=!0,...e})=>P.jsx(Tl.Root,{shouldScaleBackground:t,...e});RRe.displayName="Drawer";const PRe=Tl.Portal,HHe=Tl.Close,VG=_.forwardRef(({className:t,...e},n)=>P.jsx(Tl.Overlay,{ref:n,className:ce("fixed inset-0 z-50 bg-black/80",t),...e}));VG.displayName=Tl.Overlay.displayName;const TRe=_.forwardRef(({className:t,children:e,...n},r)=>P.jsxs(PRe,{children:[P.jsx(VG,{}),P.jsxs(Tl.Content,{ref:r,className:ce("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",t),...n,children:[P.jsx("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),e]})]}));TRe.displayName="DrawerContent";const kRe=({className:t,...e})=>P.jsx("div",{className:ce("grid gap-1.5 p-4 text-center sm:text-left",t),...e});kRe.displayName="DrawerHeader";const DRe=({className:t,...e})=>P.jsx("div",{className:ce("mt-auto flex flex-col gap-2 p-4",t),...e});DRe.displayName="DrawerFooter";const NRe=_.forwardRef(({className:t,...e},n)=>P.jsx(Tl.Title,{ref:n,className:ce("text-lg font-semibold leading-none tracking-tight",t),...e}));NRe.displayName=Tl.Title.displayName;const MRe=_.forwardRef(({className:t,...e},n)=>P.jsx(Tl.Description,{ref:n,className:ce("text-sm text-muted-foreground",t),...e}));MRe.displayName=Tl.Description.displayName;var VI="DropdownMenu",[ORe,WHe]=Tn(VI,[C_]),ni=C_(),[LRe,qG]=ORe(VI),GG=t=>{const{__scopeDropdownMenu:e,children:n,dir:r,open:s,defaultOpen:i,onOpenChange:a,modal:o=!0}=t,c=ni(e),u=_.useRef(null),[f=!1,l]=sr({prop:s,defaultProp:i,onChange:a});return P.jsx(LRe,{scope:e,triggerId:Vr(),triggerRef:u,contentId:Vr(),open:f,onOpenChange:l,onOpenToggle:_.useCallback(()=>l(d=>!d),[l]),modal:o,children:P.jsx(ECe,{...c,open:f,onOpenChange:l,dir:r,modal:o,children:n})})};GG.displayName=VI;var KG="DropdownMenuTrigger",YG=_.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...s}=t,i=qG(KG,n),a=ni(n);return P.jsx(CI,{asChild:!0,...a,children:P.jsx(De.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...s,ref:n_(e,i.triggerRef),onPointerDown:me(t.onPointerDown,o=>{!r&&o.button===0&&o.ctrlKey===!1&&(i.onOpenToggle(),i.open||o.preventDefault())}),onKeyDown:me(t.onKeyDown,o=>{r||(["Enter"," "].includes(o.key)&&i.onOpenToggle(),o.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(o.key)&&o.preventDefault())})})})});YG.displayName=KG;var IRe="DropdownMenuPortal",XG=t=>{const{__scopeDropdownMenu:e,...n}=t,r=ni(e);return P.jsx(AI,{...r,...n})};XG.displayName=IRe;var QG="DropdownMenuContent",JG=_.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=qG(QG,n),i=ni(n),a=_.useRef(!1);return P.jsx(RI,{id:s.contentId,"aria-labelledby":s.triggerId,...i,...r,ref:e,onCloseAutoFocus:me(t.onCloseAutoFocus,o=>{var c;a.current||(c=s.triggerRef.current)==null||c.focus(),a.current=!1,o.preventDefault()}),onInteractOutside:me(t.onInteractOutside,o=>{const c=o.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,f=c.button===2||u;(!s.modal||f)&&(a.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});JG.displayName=QG;var $Re="DropdownMenuGroup",ZG=_.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=ni(n);return P.jsx(PI,{...s,...r,ref:e})});ZG.displayName=$Re;var jRe="DropdownMenuLabel",eK=_.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=ni(n);return P.jsx(TI,{...s,...r,ref:e})});eK.displayName=jRe;var FRe="DropdownMenuItem",tK=_.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=ni(n);return P.jsx(kI,{...s,...r,ref:e})});tK.displayName=FRe;var zRe="DropdownMenuCheckboxItem",nK=_.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=ni(n);return P.jsx(DI,{...s,...r,ref:e})});nK.displayName=zRe;var BRe="DropdownMenuRadioGroup",URe=_.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=ni(n);return P.jsx(NI,{...s,...r,ref:e})});URe.displayName=BRe;var HRe="DropdownMenuRadioItem",rK=_.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=ni(n);return P.jsx(MI,{...s,...r,ref:e})});rK.displayName=HRe;var WRe="DropdownMenuItemIndicator",sK=_.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=ni(n);return P.jsx(OI,{...s,...r,ref:e})});sK.displayName=WRe;var VRe="DropdownMenuSeparator",iK=_.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=ni(n);return P.jsx(LI,{...s,...r,ref:e})});iK.displayName=VRe;var qRe="DropdownMenuArrow",GRe=_.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=ni(n);return P.jsx(II,{...s,...r,ref:e})});GRe.displayName=qRe;var KRe="DropdownMenuSubTrigger",oK=_.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=ni(n);return P.jsx($I,{...s,...r,ref:e})});oK.displayName=KRe;var YRe="DropdownMenuSubContent",aK=_.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=ni(n);return P.jsx(jI,{...s,...r,ref:e,style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});aK.displayName=YRe;var XRe=GG,QRe=YG,JRe=XG,lK=JG,ZRe=ZG,cK=eK,uK=tK,dK=nK,fK=rK,hK=sK,pK=iK,mK=oK,gK=aK;const ePe=XRe,tPe=QRe,nPe=ZRe,rPe=_.forwardRef(({className:t,inset:e,children:n,...r},s)=>P.jsxs(mK,{ref:s,className:ce("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",e&&"pl-8",t),...r,children:[n,P.jsx(s_,{className:"w-4 h-4 ml-auto"})]}));rPe.displayName=mK.displayName;const sPe=_.forwardRef(({className:t,...e},n)=>P.jsx(gK,{ref:n,className:ce("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...e}));sPe.displayName=gK.displayName;const vK=_.forwardRef(({className:t,sideOffset:e=4,...n},r)=>P.jsx(JRe,{children:P.jsx(lK,{ref:r,sideOffset:e,className:ce("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...n})}));vK.displayName=lK.displayName;const tN=_.forwardRef(({className:t,inset:e,...n},r)=>P.jsx(uK,{ref:r,className:ce("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e&&"pl-8",t),...n}));tN.displayName=uK.displayName;const iPe=_.forwardRef(({className:t,children:e,checked:n,...r},s)=>P.jsxs(dK,{ref:s,className:ce("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),checked:n,...r,children:[P.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:P.jsx(hK,{children:P.jsx(r_,{className:"w-4 h-4"})})}),e]}));iPe.displayName=dK.displayName;const oPe=_.forwardRef(({className:t,children:e,...n},r)=>P.jsxs(fK,{ref:r,className:ce("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...n,children:[P.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:P.jsx(hK,{children:P.jsx(jC,{className:"w-2 h-2 fill-current"})})}),e]}));oPe.displayName=fK.displayName;const yK=_.forwardRef(({className:t,inset:e,...n},r)=>P.jsx(cK,{ref:r,className:ce("px-2 py-1.5 text-sm font-semibold",e&&"pl-8",t),...n}));yK.displayName=cK.displayName;const nN=_.forwardRef(({className:t,...e},n)=>P.jsx(pK,{ref:n,className:ce("-mx-1 my-1 h-px bg-muted",t),...e}));nN.displayName=pK.displayName;const aPe=({className:t,...e})=>P.jsx("span",{className:ce("ml-auto text-xs tracking-widest opacity-60",t),...e});aPe.displayName="DropdownMenuShortcut";var P_=t=>t.type==="checkbox",Cf=t=>t instanceof Date,Gs=t=>t==null;const bK=t=>typeof t=="object";var br=t=>!Gs(t)&&!Array.isArray(t)&&bK(t)&&!Cf(t),wK=t=>br(t)&&t.target?P_(t.target)?t.target.checked:t.target.value:t,lPe=t=>t.substring(0,t.search(/\.\d+(\.|$)/))||t,_K=(t,e)=>t.has(lPe(e)),cPe=t=>{const e=t.constructor&&t.constructor.prototype;return br(e)&&e.hasOwnProperty("isPrototypeOf")},qI=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Zn(t){let e;const n=Array.isArray(t),r=typeof FileList<"u"?t instanceof FileList:!1;if(t instanceof Date)e=new Date(t);else if(t instanceof Set)e=new Set(t);else if(!(qI&&(t instanceof Blob||r))&&(n||br(t)))if(e=n?[]:{},!n&&!cPe(t))e=t;else for(const s in t)t.hasOwnProperty(s)&&(e[s]=Zn(t[s]));else return t;return e}var T_=t=>Array.isArray(t)?t.filter(Boolean):[],Bn=t=>t===void 0,Ie=(t,e,n)=>{if(!e||!br(t))return n;const r=T_(e.split(/[,[\].]+?/)).reduce((s,i)=>Gs(s)?s:s[i],t);return Bn(r)||r===t?Bn(t[e])?n:t[e]:r},Zi=t=>typeof t=="boolean",GI=t=>/^\w*$/.test(t),xK=t=>T_(t.replace(/["|']|\]/g,"").split(/\.|\[/)),Jt=(t,e,n)=>{let r=-1;const s=GI(e)?[e]:xK(e),i=s.length,a=i-1;for(;++rse.useContext(SK),uPe=t=>{const{children:e,...n}=t;return se.createElement(SK.Provider,{value:n},e)};var EK=(t,e,n,r=!0)=>{const s={defaultValues:e._defaultValues};for(const i in t)Object.defineProperty(s,i,{get:()=>{const a=i;return e._proxyFormState[a]!==No.all&&(e._proxyFormState[a]=!r||No.all),n&&(n[a]=!0),t[a]}});return s};function dPe(t){const e=Fd(),{control:n=e.control,disabled:r,name:s,exact:i}=t||{},[a,o]=se.useState(n._formState),c=se.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),u=se.useRef(s);return u.current=s,se.useEffect(()=>n._subscribe({name:u.current,formState:c.current,exact:i,callback:f=>{!r&&o({...n._formState,...f})}}),[n,r,i]),se.useEffect(()=>{c.current.isValid&&n._setValid(!0)},[n]),se.useMemo(()=>EK(a,n,c.current,!1),[a,n])}var gl=t=>typeof t=="string",CK=(t,e,n,r,s)=>gl(t)?(r&&e.watch.add(t),Ie(n,t,s)):Array.isArray(t)?t.map(i=>(r&&e.watch.add(i),Ie(n,i))):(r&&(e.watchAll=!0),n);function fPe(t){const e=Fd(),{control:n=e.control,name:r,defaultValue:s,disabled:i,exact:a}=t||{},o=se.useRef(r),c=se.useRef(s);o.current=r,se.useEffect(()=>n._subscribe({name:o.current,formState:{values:!0},exact:a,callback:l=>!i&&f(CK(o.current,n._names,l.values||n._formValues,!1,c.current))}),[n,i,a]);const[u,f]=se.useState(n._getWatch(r,s));return se.useEffect(()=>n._removeUnmounted()),u}function hPe(t){const e=Fd(),{name:n,disabled:r,control:s=e.control,shouldUnregister:i}=t,a=_K(s._names.array,n),o=fPe({control:s,name:n,defaultValue:Ie(s._formValues,n,Ie(s._defaultValues,n,t.defaultValue)),exact:!0}),c=dPe({control:s,name:n,exact:!0}),u=se.useRef(t),f=se.useRef(s.register(n,{...t.rules,value:o,...Zi(t.disabled)?{disabled:t.disabled}:{}})),l=se.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Ie(c.errors,n)},isDirty:{enumerable:!0,get:()=>!!Ie(c.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Ie(c.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Ie(c.validatingFields,n)},error:{enumerable:!0,get:()=>Ie(c.errors,n)}}),[c,n]),d=se.useCallback(y=>f.current.onChange({target:{value:wK(y),name:n},type:v1.CHANGE}),[n]),m=se.useCallback(()=>f.current.onBlur({target:{value:Ie(s._formValues,n),name:n},type:v1.BLUR}),[n,s._formValues]),p=se.useCallback(y=>{const g=Ie(s._fields,n);g&&y&&(g._f.ref={focus:()=>y.focus(),select:()=>y.select(),setCustomValidity:v=>y.setCustomValidity(v),reportValidity:()=>y.reportValidity()})},[s._fields,n]),h=se.useMemo(()=>({name:n,value:o,...Zi(r)||c.disabled?{disabled:c.disabled||r}:{},onChange:d,onBlur:m,ref:p}),[n,r,c.disabled,d,m,p,o]);return se.useEffect(()=>{const y=s._options.shouldUnregister||i;s.register(n,{...u.current.rules,...Zi(u.current.disabled)?{disabled:u.current.disabled}:{}});const g=(v,w)=>{const x=Ie(s._fields,v);x&&x._f&&(x._f.mount=w)};if(g(n,!0),y){const v=Zn(Ie(s._options.defaultValues,n));Jt(s._defaultValues,n,v),Bn(Ie(s._formValues,n))&&Jt(s._formValues,n,v)}return!a&&s.register(n),()=>{(a?y&&!s._state.action:y)?s.unregister(n):g(n,!1)}},[n,s,a,i]),se.useEffect(()=>{s._setDisabledField({disabled:r,name:n})},[r,n,s]),se.useMemo(()=>({field:h,formState:c,fieldState:l}),[h,c,l])}const pPe=t=>t.render(hPe(t));var AK=(t,e,n,r,s)=>e?{...n[t],types:{...n[t]&&n[t].types?n[t].types:{},[r]:s||!0}}:{},wi=t=>Array.isArray(t)?t:[t],TB=()=>{let t=[];return{get observers(){return t},next:s=>{for(const i of t)i.next&&i.next(s)},subscribe:s=>(t.push(s),{unsubscribe:()=>{t=t.filter(i=>i!==s)}}),unsubscribe:()=>{t=[]}}},rN=t=>Gs(t)||!bK(t);function Nu(t,e){if(rN(t)||rN(e))return t===e;if(Cf(t)&&Cf(e))return t.getTime()===e.getTime();const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(const s of n){const i=t[s];if(!r.includes(s))return!1;if(s!=="ref"){const a=e[s];if(Cf(i)&&Cf(a)||br(i)&&br(a)||Array.isArray(i)&&Array.isArray(a)?!Nu(i,a):i!==a)return!1}}return!0}var Ps=t=>br(t)&&!Object.keys(t).length,KI=t=>t.type==="file",_a=t=>typeof t=="function",y1=t=>{if(!qI)return!1;const e=t?t.ownerDocument:0;return t instanceof(e&&e.defaultView?e.defaultView.HTMLElement:HTMLElement)},RK=t=>t.type==="select-multiple",YI=t=>t.type==="radio",mPe=t=>YI(t)||P_(t),LT=t=>y1(t)&&t.isConnected;function gPe(t,e){const n=e.slice(0,-1).length;let r=0;for(;r{for(const e in t)if(_a(t[e]))return!0;return!1};function b1(t,e={}){const n=Array.isArray(t);if(br(t)||n)for(const r in t)Array.isArray(t[r])||br(t[r])&&!PK(t[r])?(e[r]=Array.isArray(t[r])?[]:{},b1(t[r],e[r])):Gs(t[r])||(e[r]=!0);return e}function TK(t,e,n){const r=Array.isArray(t);if(br(t)||r)for(const s in t)Array.isArray(t[s])||br(t[s])&&!PK(t[s])?Bn(e)||rN(n[s])?n[s]=Array.isArray(t[s])?b1(t[s],[]):{...b1(t[s])}:TK(t[s],Gs(e)?{}:e[s],n[s]):n[s]=!Nu(t[s],e[s]);return n}var xy=(t,e)=>TK(t,e,b1(e));const kB={value:!1,isValid:!1},DB={value:!0,isValid:!0};var kK=t=>{if(Array.isArray(t)){if(t.length>1){const e=t.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:e,isValid:!!e.length}}return t[0].checked&&!t[0].disabled?t[0].attributes&&!Bn(t[0].attributes.value)?Bn(t[0].value)||t[0].value===""?DB:{value:t[0].value,isValid:!0}:DB:kB}return kB},DK=(t,{valueAsNumber:e,valueAsDate:n,setValueAs:r})=>Bn(t)?t:e?t===""?NaN:t&&+t:n&&gl(t)?new Date(t):r?r(t):t;const NB={isValid:!1,value:null};var NK=t=>Array.isArray(t)?t.reduce((e,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:e,NB):NB;function MB(t){const e=t.ref;return KI(e)?e.files:YI(e)?NK(t.refs).value:RK(e)?[...e.selectedOptions].map(({value:n})=>n):P_(e)?kK(t.refs).value:DK(Bn(e.value)?t.ref.value:e.value,t)}var yPe=(t,e,n,r)=>{const s={};for(const i of t){const a=Ie(e,i);a&&Jt(s,i,a._f)}return{criteriaMode:n,names:[...t],fields:s,shouldUseNativeValidation:r}},w1=t=>t instanceof RegExp,Sy=t=>Bn(t)?t:w1(t)?t.source:br(t)?w1(t.value)?t.value.source:t.value:t,Sm=t=>({isOnSubmit:!t||t===No.onSubmit,isOnBlur:t===No.onBlur,isOnChange:t===No.onChange,isOnAll:t===No.all,isOnTouch:t===No.onTouched});const OB="AsyncFunction";var bPe=t=>!!t&&!!t.validate&&!!(_a(t.validate)&&t.validate.constructor.name===OB||br(t.validate)&&Object.values(t.validate).find(e=>e.constructor.name===OB)),wPe=t=>t.mount&&(t.required||t.min||t.max||t.maxLength||t.minLength||t.pattern||t.validate),sN=(t,e,n)=>!n&&(e.watchAll||e.watch.has(t)||[...e.watch].some(r=>t.startsWith(r)&&/^\.\w+/.test(t.slice(r.length))));const zm=(t,e,n,r)=>{for(const s of n||Object.keys(t)){const i=Ie(t,s);if(i){const{_f:a,...o}=i;if(a){if(a.refs&&a.refs[0]&&e(a.refs[0],s)&&!r)return!0;if(a.ref&&e(a.ref,a.name)&&!r)return!0;if(zm(o,e))break}else if(br(o)&&zm(o,e))break}}};function LB(t,e,n){const r=Ie(t,n);if(r||GI(n))return{error:r,name:n};const s=n.split(".");for(;s.length;){const i=s.join("."),a=Ie(e,i),o=Ie(t,i);if(a&&!Array.isArray(a)&&n!==i)return{name:n};if(o&&o.type)return{name:i,error:o};s.pop()}return{name:n}}var _Pe=(t,e,n,r)=>{n(t);const{name:s,...i}=t;return Ps(i)||Object.keys(i).length>=Object.keys(e).length||Object.keys(i).find(a=>e[a]===(!r||No.all))},xPe=(t,e,n)=>!t||!e||t===e||wi(t).some(r=>r&&(n?r===e:r.startsWith(e)||e.startsWith(r))),SPe=(t,e,n,r,s)=>s.isOnAll?!1:!n&&s.isOnTouch?!(e||t):(n?r.isOnBlur:s.isOnBlur)?!t:(n?r.isOnChange:s.isOnChange)?t:!0,EPe=(t,e)=>!T_(Ie(t,e)).length&&Sr(t,e),MK=(t,e,n)=>{const r=wi(Ie(t,n));return Jt(r,"root",e[n]),Jt(t,n,r),t},VS=t=>gl(t);function IB(t,e,n="validate"){if(VS(t)||Array.isArray(t)&&t.every(VS)||Zi(t)&&!t)return{type:n,message:VS(t)?t:"",ref:e}}var Gp=t=>br(t)&&!w1(t)?t:{value:t,message:""},iN=async(t,e,n,r,s,i)=>{const{ref:a,refs:o,required:c,maxLength:u,minLength:f,min:l,max:d,pattern:m,validate:p,name:h,valueAsNumber:y,mount:g}=t._f,v=Ie(n,h);if(!g||e.has(h))return{};const w=o?o[0]:a,x=L=>{s&&w.reportValidity&&(w.setCustomValidity(Zi(L)?"":L||""),w.reportValidity())},A={},k=YI(a),R=P_(a),E=k||R,T=(y||KI(a))&&Bn(a.value)&&Bn(v)||y1(a)&&a.value===""||v===""||Array.isArray(v)&&!v.length,D=AK.bind(null,h,r,A),M=(L,I,j,U=Vl.maxLength,Y=Vl.minLength)=>{const W=L?I:j;A[h]={type:L?U:Y,message:W,ref:a,...D(L?U:Y,W)}};if(i?!Array.isArray(v)||!v.length:c&&(!E&&(T||Gs(v))||Zi(v)&&!v||R&&!kK(o).isValid||k&&!NK(o).isValid)){const{value:L,message:I}=VS(c)?{value:!!c,message:c}:Gp(c);if(L&&(A[h]={type:Vl.required,message:I,ref:w,...D(Vl.required,I)},!r))return x(I),A}if(!T&&(!Gs(l)||!Gs(d))){let L,I;const j=Gp(d),U=Gp(l);if(!Gs(v)&&!isNaN(v)){const Y=a.valueAsNumber||v&&+v;Gs(j.value)||(L=Y>j.value),Gs(U.value)||(I=Ynew Date(new Date().toDateString()+" "+re),H=a.type=="time",ee=a.type=="week";gl(j.value)&&v&&(L=H?W(v)>W(j.value):ee?v>j.value:Y>new Date(j.value)),gl(U.value)&&v&&(I=H?W(v)+L.value,U=!Gs(I.value)&&v.length<+I.value;if((j||U)&&(M(j,L.message,I.message),!r))return x(A[h].message),A}if(m&&!T&&gl(v)){const{value:L,message:I}=Gp(m);if(w1(L)&&!v.match(L)&&(A[h]={type:Vl.pattern,message:I,ref:a,...D(Vl.pattern,I)},!r))return x(I),A}if(p){if(_a(p)){const L=await p(v,n),I=IB(L,w);if(I&&(A[h]={...I,...D(Vl.validate,I.message)},!r))return x(I.message),A}else if(br(p)){let L={};for(const I in p){if(!Ps(L)&&!r)break;const j=IB(await p[I](v,n),w,I);j&&(L={...j,...D(I,j.message)},x(j.message),r&&(A[h]=L))}if(!Ps(L)&&(A[h]={ref:w,...L},!r))return A}}return x(!0),A};const CPe={mode:No.onSubmit,reValidateMode:No.onChange,shouldFocusError:!0};function APe(t={}){let e={...CPe,...t},n={submitCount:0,isDirty:!1,isLoading:_a(e.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1};const r={};let s=br(e.defaultValues)||br(e.values)?Zn(e.values||e.defaultValues)||{}:{},i=e.shouldUnregister?{}:Zn(s),a={action:!1,mount:!1,watch:!1},o={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c,u=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let l={...f};const d={array:TB(),state:TB()},m=Sm(e.mode),p=Sm(e.reValidateMode),h=e.criteriaMode===No.all,y=Z=>fe=>{clearTimeout(u),u=setTimeout(Z,fe)},g=async Z=>{if(!e.disabled&&(f.isValid||l.isValid||Z)){const fe=e.resolver?Ps((await T()).errors):await M(r,!0);fe!==n.isValid&&d.state.next({isValid:fe})}},v=(Z,fe)=>{!e.disabled&&(f.isValidating||f.validatingFields||l.isValidating||l.validatingFields)&&((Z||Array.from(o.mount)).forEach(ge=>{ge&&(fe?Jt(n.validatingFields,ge,fe):Sr(n.validatingFields,ge))}),d.state.next({validatingFields:n.validatingFields,isValidating:!Ps(n.validatingFields)}))},w=(Z,fe=[],ge,Pe,Me=!0,xe=!0)=>{if(Pe&&ge&&!e.disabled){if(a.action=!0,xe&&Array.isArray(Ie(r,Z))){const Te=ge(Ie(r,Z),Pe.argA,Pe.argB);Me&&Jt(r,Z,Te)}if(xe&&Array.isArray(Ie(n.errors,Z))){const Te=ge(Ie(n.errors,Z),Pe.argA,Pe.argB);Me&&Jt(n.errors,Z,Te),EPe(n.errors,Z)}if((f.touchedFields||l.touchedFields)&&xe&&Array.isArray(Ie(n.touchedFields,Z))){const Te=ge(Ie(n.touchedFields,Z),Pe.argA,Pe.argB);Me&&Jt(n.touchedFields,Z,Te)}(f.dirtyFields||l.dirtyFields)&&(n.dirtyFields=xy(s,i)),d.state.next({name:Z,isDirty:I(Z,fe),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Jt(i,Z,fe)},x=(Z,fe)=>{Jt(n.errors,Z,fe),d.state.next({errors:n.errors})},A=Z=>{n.errors=Z,d.state.next({errors:n.errors,isValid:!1})},k=(Z,fe,ge,Pe)=>{const Me=Ie(r,Z);if(Me){const xe=Ie(i,Z,Bn(ge)?Ie(s,Z):ge);Bn(xe)||Pe&&Pe.defaultChecked||fe?Jt(i,Z,fe?xe:MB(Me._f)):Y(Z,xe),a.mount&&g()}},R=(Z,fe,ge,Pe,Me)=>{let xe=!1,Te=!1;const Ye={name:Z};if(!e.disabled){if(!ge||Pe){(f.isDirty||l.isDirty)&&(Te=n.isDirty,n.isDirty=Ye.isDirty=I(),xe=Te!==Ye.isDirty);const Pt=Nu(Ie(s,Z),fe);Te=!!Ie(n.dirtyFields,Z),Pt?Sr(n.dirtyFields,Z):Jt(n.dirtyFields,Z,!0),Ye.dirtyFields=n.dirtyFields,xe=xe||(f.dirtyFields||l.dirtyFields)&&Te!==!Pt}if(ge){const Pt=Ie(n.touchedFields,Z);Pt||(Jt(n.touchedFields,Z,ge),Ye.touchedFields=n.touchedFields,xe=xe||(f.touchedFields||l.touchedFields)&&Pt!==ge)}xe&&Me&&d.state.next(Ye)}return xe?Ye:{}},E=(Z,fe,ge,Pe)=>{const Me=Ie(n.errors,Z),xe=(f.isValid||l.isValid)&&Zi(fe)&&n.isValid!==fe;if(e.delayError&&ge?(c=y(()=>x(Z,ge)),c(e.delayError)):(clearTimeout(u),c=null,ge?Jt(n.errors,Z,ge):Sr(n.errors,Z)),(ge?!Nu(Me,ge):Me)||!Ps(Pe)||xe){const Te={...Pe,...xe&&Zi(fe)?{isValid:fe}:{},errors:n.errors,name:Z};n={...n,...Te},d.state.next(Te)}},T=async Z=>{v(Z,!0);const fe=await e.resolver(i,e.context,yPe(Z||o.mount,r,e.criteriaMode,e.shouldUseNativeValidation));return v(Z),fe},D=async Z=>{const{errors:fe}=await T(Z);if(Z)for(const ge of Z){const Pe=Ie(fe,ge);Pe?Jt(n.errors,ge,Pe):Sr(n.errors,ge)}else n.errors=fe;return fe},M=async(Z,fe,ge={valid:!0})=>{for(const Pe in Z){const Me=Z[Pe];if(Me){const{_f:xe,...Te}=Me;if(xe){const Ye=o.array.has(xe.name),Pt=Me._f&&bPe(Me._f);Pt&&f.validatingFields&&v([Pe],!0);const wt=await iN(Me,o.disabled,i,h,e.shouldUseNativeValidation&&!fe,Ye);if(Pt&&f.validatingFields&&v([Pe]),wt[xe.name]&&(ge.valid=!1,fe))break;!fe&&(Ie(wt,xe.name)?Ye?MK(n.errors,wt,xe.name):Jt(n.errors,xe.name,wt[xe.name]):Sr(n.errors,xe.name))}!Ps(Te)&&await M(Te,fe,ge)}}return ge.valid},L=()=>{for(const Z of o.unMount){const fe=Ie(r,Z);fe&&(fe._f.refs?fe._f.refs.every(ge=>!LT(ge)):!LT(fe._f.ref))&&Ae(Z)}o.unMount=new Set},I=(Z,fe)=>!e.disabled&&(Z&&fe&&Jt(i,Z,fe),!Nu(G(),s)),j=(Z,fe,ge)=>CK(Z,o,{...a.mount?i:Bn(fe)?s:gl(Z)?{[Z]:fe}:fe},ge,fe),U=Z=>T_(Ie(a.mount?i:s,Z,e.shouldUnregister?Ie(s,Z,[]):[])),Y=(Z,fe,ge={})=>{const Pe=Ie(r,Z);let Me=fe;if(Pe){const xe=Pe._f;xe&&(!xe.disabled&&Jt(i,Z,DK(fe,xe)),Me=y1(xe.ref)&&Gs(fe)?"":fe,RK(xe.ref)?[...xe.ref.options].forEach(Te=>Te.selected=Me.includes(Te.value)):xe.refs?P_(xe.ref)?xe.refs.length>1?xe.refs.forEach(Te=>(!Te.defaultChecked||!Te.disabled)&&(Te.checked=Array.isArray(Me)?!!Me.find(Ye=>Ye===Te.value):Me===Te.value)):xe.refs[0]&&(xe.refs[0].checked=!!Me):xe.refs.forEach(Te=>Te.checked=Te.value===Me):KI(xe.ref)?xe.ref.value="":(xe.ref.value=Me,xe.ref.type||d.state.next({name:Z,values:Zn(i)})))}(ge.shouldDirty||ge.shouldTouch)&&R(Z,Me,ge.shouldTouch,ge.shouldDirty,!0),ge.shouldValidate&&X(Z)},W=(Z,fe,ge)=>{for(const Pe in fe){const Me=fe[Pe],xe=`${Z}.${Pe}`,Te=Ie(r,xe);(o.array.has(Z)||br(Me)||Te&&!Te._f)&&!Cf(Me)?W(xe,Me,ge):Y(xe,Me,ge)}},H=(Z,fe,ge={})=>{const Pe=Ie(r,Z),Me=o.array.has(Z),xe=Zn(fe);Jt(i,Z,xe),Me?(d.array.next({name:Z,values:Zn(i)}),(f.isDirty||f.dirtyFields||l.isDirty||l.dirtyFields)&&ge.shouldDirty&&d.state.next({name:Z,dirtyFields:xy(s,i),isDirty:I(Z,xe)})):Pe&&!Pe._f&&!Gs(xe)?W(Z,xe,ge):Y(Z,xe,ge),sN(Z,o)&&d.state.next({...n}),d.state.next({name:a.mount?Z:void 0,values:Zn(i)})},ee=async Z=>{a.mount=!0;const fe=Z.target;let ge=fe.name,Pe=!0;const Me=Ie(r,ge),xe=Te=>{Pe=Number.isNaN(Te)||Cf(Te)&&isNaN(Te.getTime())||Nu(Te,Ie(i,ge,Te))};if(Me){let Te,Ye;const Pt=fe.type?MB(Me._f):wK(Z),wt=Z.type===v1.BLUR||Z.type===v1.FOCUS_OUT,Ls=!wPe(Me._f)&&!e.resolver&&!Ie(n.errors,ge)&&!Me._f.deps||SPe(wt,Ie(n.touchedFields,ge),n.isSubmitted,p,m),Yn=sN(ge,o,wt);Jt(i,ge,Pt),wt?(Me._f.onBlur&&Me._f.onBlur(Z),c&&c(0)):Me._f.onChange&&Me._f.onChange(Z);const gs=R(ge,Pt,wt),Ht=!Ps(gs)||Yn;if(!wt&&d.state.next({name:ge,type:Z.type,values:Zn(i)}),Ls)return(f.isValid||l.isValid)&&(e.mode==="onBlur"?wt&&g():wt||g()),Ht&&d.state.next({name:ge,...Yn?{}:gs});if(!wt&&Yn&&d.state.next({...n}),e.resolver){const{errors:an}=await T([ge]);if(xe(Pt),Pe){const vn=LB(n.errors,r,ge),Be=LB(an,r,vn.name||ge);Te=Be.error,ge=Be.name,Ye=Ps(an)}}else v([ge],!0),Te=(await iN(Me,o.disabled,i,h,e.shouldUseNativeValidation))[ge],v([ge]),xe(Pt),Pe&&(Te?Ye=!1:(f.isValid||l.isValid)&&(Ye=await M(r,!0)));Pe&&(Me._f.deps&&X(Me._f.deps),E(ge,Ye,Te,gs))}},re=(Z,fe)=>{if(Ie(n.errors,fe)&&Z.focus)return Z.focus(),1},X=async(Z,fe={})=>{let ge,Pe;const Me=wi(Z);if(e.resolver){const xe=await D(Bn(Z)?Z:Me);ge=Ps(xe),Pe=Z?!Me.some(Te=>Ie(xe,Te)):ge}else Z?(Pe=(await Promise.all(Me.map(async xe=>{const Te=Ie(r,xe);return await M(Te&&Te._f?{[xe]:Te}:Te)}))).every(Boolean),!(!Pe&&!n.isValid)&&g()):Pe=ge=await M(r);return d.state.next({...!gl(Z)||(f.isValid||l.isValid)&&ge!==n.isValid?{}:{name:Z},...e.resolver||!Z?{isValid:ge}:{},errors:n.errors}),fe.shouldFocus&&!Pe&&zm(r,re,Z?Me:o.mount),Pe},G=Z=>{const fe={...a.mount?i:s};return Bn(Z)?fe:gl(Z)?Ie(fe,Z):Z.map(ge=>Ie(fe,ge))},K=(Z,fe)=>({invalid:!!Ie((fe||n).errors,Z),isDirty:!!Ie((fe||n).dirtyFields,Z),error:Ie((fe||n).errors,Z),isValidating:!!Ie(n.validatingFields,Z),isTouched:!!Ie((fe||n).touchedFields,Z)}),J=Z=>{Z&&wi(Z).forEach(fe=>Sr(n.errors,fe)),d.state.next({errors:Z?n.errors:{}})},ue=(Z,fe,ge)=>{const Pe=(Ie(r,Z,{_f:{}})._f||{}).ref,Me=Ie(n.errors,Z)||{},{ref:xe,message:Te,type:Ye,...Pt}=Me;Jt(n.errors,Z,{...Pt,...fe,ref:Pe}),d.state.next({name:Z,errors:n.errors,isValid:!1}),ge&&ge.shouldFocus&&Pe&&Pe.focus&&Pe.focus()},de=(Z,fe)=>_a(Z)?d.state.subscribe({next:ge=>Z(j(void 0,fe),ge)}):j(Z,fe,!0),ie=Z=>d.state.subscribe({next:fe=>{xPe(Z.name,fe.name,Z.exact)&&_Pe(fe,Z.formState||f,Xt,Z.reRenderRoot)&&Z.callback({values:{...i},...n,...fe})}}).unsubscribe,be=Z=>(a.mount=!0,l={...l,...Z.formState},ie({...Z,formState:l})),Ae=(Z,fe={})=>{for(const ge of Z?wi(Z):o.mount)o.mount.delete(ge),o.array.delete(ge),fe.keepValue||(Sr(r,ge),Sr(i,ge)),!fe.keepError&&Sr(n.errors,ge),!fe.keepDirty&&Sr(n.dirtyFields,ge),!fe.keepTouched&&Sr(n.touchedFields,ge),!fe.keepIsValidating&&Sr(n.validatingFields,ge),!e.shouldUnregister&&!fe.keepDefaultValue&&Sr(s,ge);d.state.next({values:Zn(i)}),d.state.next({...n,...fe.keepDirty?{isDirty:I()}:{}}),!fe.keepIsValid&&g()},_e=({disabled:Z,name:fe})=>{(Zi(Z)&&a.mount||Z||o.disabled.has(fe))&&(Z?o.disabled.add(fe):o.disabled.delete(fe))},Oe=(Z,fe={})=>{let ge=Ie(r,Z);const Pe=Zi(fe.disabled)||Zi(e.disabled);return Jt(r,Z,{...ge||{},_f:{...ge&&ge._f?ge._f:{ref:{name:Z}},name:Z,mount:!0,...fe}}),o.mount.add(Z),ge?_e({disabled:Zi(fe.disabled)?fe.disabled:e.disabled,name:Z}):k(Z,!0,fe.value),{...Pe?{disabled:fe.disabled||e.disabled}:{},...e.progressive?{required:!!fe.required,min:Sy(fe.min),max:Sy(fe.max),minLength:Sy(fe.minLength),maxLength:Sy(fe.maxLength),pattern:Sy(fe.pattern)}:{},name:Z,onChange:ee,onBlur:ee,ref:Me=>{if(Me){Oe(Z,fe),ge=Ie(r,Z);const xe=Bn(Me.value)&&Me.querySelectorAll&&Me.querySelectorAll("input,select,textarea")[0]||Me,Te=mPe(xe),Ye=ge._f.refs||[];if(Te?Ye.find(Pt=>Pt===xe):xe===ge._f.ref)return;Jt(r,Z,{_f:{...ge._f,...Te?{refs:[...Ye.filter(LT),xe,...Array.isArray(Ie(s,Z))?[{}]:[]],ref:{type:xe.type,name:Z}}:{ref:xe}}}),k(Z,!1,void 0,xe)}else ge=Ie(r,Z,{}),ge._f&&(ge._f.mount=!1),(e.shouldUnregister||fe.shouldUnregister)&&!(_K(o.array,Z)&&a.action)&&o.unMount.add(Z)}}},Ne=()=>e.shouldFocusError&&zm(r,re,o.mount),ye=Z=>{Zi(Z)&&(d.state.next({disabled:Z}),zm(r,(fe,ge)=>{const Pe=Ie(r,ge);Pe&&(fe.disabled=Pe._f.disabled||Z,Array.isArray(Pe._f.refs)&&Pe._f.refs.forEach(Me=>{Me.disabled=Pe._f.disabled||Z}))},0,!1))},$e=(Z,fe)=>async ge=>{let Pe;ge&&(ge.preventDefault&&ge.preventDefault(),ge.persist&&ge.persist());let Me=Zn(i);if(d.state.next({isSubmitting:!0}),e.resolver){const{errors:xe,values:Te}=await T();n.errors=xe,Me=Te}else await M(r);if(o.disabled.size)for(const xe of o.disabled)Jt(Me,xe,void 0);if(Sr(n.errors,"root"),Ps(n.errors)){d.state.next({errors:{}});try{await Z(Me,ge)}catch(xe){Pe=xe}}else fe&&await fe({...n.errors},ge),Ne(),setTimeout(Ne);if(d.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Ps(n.errors)&&!Pe,submitCount:n.submitCount+1,errors:n.errors}),Pe)throw Pe},ut=(Z,fe={})=>{Ie(r,Z)&&(Bn(fe.defaultValue)?H(Z,Zn(Ie(s,Z))):(H(Z,fe.defaultValue),Jt(s,Z,Zn(fe.defaultValue))),fe.keepTouched||Sr(n.touchedFields,Z),fe.keepDirty||(Sr(n.dirtyFields,Z),n.isDirty=fe.defaultValue?I(Z,Zn(Ie(s,Z))):I()),fe.keepError||(Sr(n.errors,Z),f.isValid&&g()),d.state.next({...n}))},Qe=(Z,fe={})=>{const ge=Z?Zn(Z):s,Pe=Zn(ge),Me=Ps(Z),xe=Me?s:Pe;if(fe.keepDefaultValues||(s=ge),!fe.keepValues){if(fe.keepDirtyValues){const Te=new Set([...o.mount,...Object.keys(xy(s,i))]);for(const Ye of Array.from(Te))Ie(n.dirtyFields,Ye)?Jt(xe,Ye,Ie(i,Ye)):H(Ye,Ie(xe,Ye))}else{if(qI&&Bn(Z))for(const Te of o.mount){const Ye=Ie(r,Te);if(Ye&&Ye._f){const Pt=Array.isArray(Ye._f.refs)?Ye._f.refs[0]:Ye._f.ref;if(y1(Pt)){const wt=Pt.closest("form");if(wt){wt.reset();break}}}}for(const Te of o.mount)H(Te,Ie(xe,Te))}i=Zn(xe),d.array.next({values:{...xe}}),d.state.next({values:{...xe}})}o={mount:fe.keepDirtyValues?o.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!f.isValid||!!fe.keepIsValid||!!fe.keepDirtyValues,a.watch=!!e.shouldUnregister,d.state.next({submitCount:fe.keepSubmitCount?n.submitCount:0,isDirty:Me?!1:fe.keepDirty?n.isDirty:!!(fe.keepDefaultValues&&!Nu(Z,s)),isSubmitted:fe.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:Me?{}:fe.keepDirtyValues?fe.keepDefaultValues&&i?xy(s,i):n.dirtyFields:fe.keepDefaultValues&&Z?xy(s,Z):fe.keepDirty?n.dirtyFields:{},touchedFields:fe.keepTouched?n.touchedFields:{},errors:fe.keepErrors?n.errors:{},isSubmitSuccessful:fe.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},yt=(Z,fe)=>Qe(_a(Z)?Z(i):Z,fe),En=(Z,fe={})=>{const ge=Ie(r,Z),Pe=ge&&ge._f;if(Pe){const Me=Pe.refs?Pe.refs[0]:Pe.ref;Me.focus&&(Me.focus(),fe.shouldSelect&&_a(Me.select)&&Me.select())}},Xt=Z=>{n={...n,...Z}},Qt={control:{register:Oe,unregister:Ae,getFieldState:K,handleSubmit:$e,setError:ue,_subscribe:ie,_runSchema:T,_getWatch:j,_getDirty:I,_setValid:g,_setFieldArray:w,_setDisabledField:_e,_setErrors:A,_getFieldArray:U,_reset:Qe,_resetDefaultValues:()=>_a(e.defaultValues)&&e.defaultValues().then(Z=>{yt(Z,e.resetOptions),d.state.next({isLoading:!1})}),_removeUnmounted:L,_disableForm:ye,_subjects:d,_proxyFormState:f,get _fields(){return r},get _formValues(){return i},get _state(){return a},set _state(Z){a=Z},get _defaultValues(){return s},get _names(){return o},set _names(Z){o=Z},get _formState(){return n},get _options(){return e},set _options(Z){e={...e,...Z}}},subscribe:be,trigger:X,register:Oe,handleSubmit:$e,watch:de,setValue:H,getValues:G,reset:yt,resetField:ut,clearErrors:J,unregister:Ae,setError:ue,setFocus:En,getFieldState:K};return{...Qt,formControl:Qt}}var vu=()=>{const t=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const n=(Math.random()*16+t)%16|0;return(e=="x"?n:n&3|8).toString(16)})},IT=(t,e,n={})=>n.shouldFocus||Bn(n.shouldFocus)?n.focusName||`${t}.${Bn(n.focusIndex)?e:n.focusIndex}.`:"",$T=(t,e)=>[...t,...wi(e)],jT=t=>Array.isArray(t)?t.map(()=>{}):void 0;function FT(t,e,n){return[...t.slice(0,e),...wi(n),...t.slice(e)]}var zT=(t,e,n)=>Array.isArray(t)?(Bn(t[n])&&(t[n]=void 0),t.splice(n,0,t.splice(e,1)[0]),t):[],BT=(t,e)=>[...wi(e),...wi(t)];function RPe(t,e){let n=0;const r=[...t];for(const s of e)r.splice(s-n,1),n++;return T_(r).length?r:[]}var UT=(t,e)=>Bn(e)?[]:RPe(t,wi(e).sort((n,r)=>n-r)),HT=(t,e,n)=>{[t[e],t[n]]=[t[n],t[e]]},$B=(t,e,n)=>(t[e]=n,t);function VHe(t){const e=Fd(),{control:n=e.control,name:r,keyName:s="id",shouldUnregister:i,rules:a}=t,[o,c]=se.useState(n._getFieldArray(r)),u=se.useRef(n._getFieldArray(r).map(vu)),f=se.useRef(o),l=se.useRef(r),d=se.useRef(!1);l.current=r,f.current=o,n._names.array.add(r),a&&n.register(r,a),se.useEffect(()=>n._subjects.array.subscribe({next:({values:k,name:R})=>{if(R===l.current||!R){const E=Ie(k,l.current);Array.isArray(E)&&(c(E),u.current=E.map(vu))}}}).unsubscribe,[n]);const m=se.useCallback(k=>{d.current=!0,n._setFieldArray(r,k)},[n,r]),p=(k,R)=>{const E=wi(Zn(k)),T=$T(n._getFieldArray(r),E);n._names.focus=IT(r,T.length-1,R),u.current=$T(u.current,E.map(vu)),m(T),c(T),n._setFieldArray(r,T,$T,{argA:jT(k)})},h=(k,R)=>{const E=wi(Zn(k)),T=BT(n._getFieldArray(r),E);n._names.focus=IT(r,0,R),u.current=BT(u.current,E.map(vu)),m(T),c(T),n._setFieldArray(r,T,BT,{argA:jT(k)})},y=k=>{const R=UT(n._getFieldArray(r),k);u.current=UT(u.current,k),m(R),c(R),!Array.isArray(Ie(n._fields,r))&&Jt(n._fields,r,void 0),n._setFieldArray(r,R,UT,{argA:k})},g=(k,R,E)=>{const T=wi(Zn(R)),D=FT(n._getFieldArray(r),k,T);n._names.focus=IT(r,k,E),u.current=FT(u.current,k,T.map(vu)),m(D),c(D),n._setFieldArray(r,D,FT,{argA:k,argB:jT(R)})},v=(k,R)=>{const E=n._getFieldArray(r);HT(E,k,R),HT(u.current,k,R),m(E),c(E),n._setFieldArray(r,E,HT,{argA:k,argB:R},!1)},w=(k,R)=>{const E=n._getFieldArray(r);zT(E,k,R),zT(u.current,k,R),m(E),c(E),n._setFieldArray(r,E,zT,{argA:k,argB:R},!1)},x=(k,R)=>{const E=Zn(R),T=$B(n._getFieldArray(r),k,E);u.current=[...T].map((D,M)=>!D||M===k?vu():u.current[M]),m(T),c([...T]),n._setFieldArray(r,T,$B,{argA:k,argB:E},!0,!1)},A=k=>{const R=wi(Zn(k));u.current=R.map(vu),m([...R]),c([...R]),n._setFieldArray(r,[...R],E=>E,{},!0,!1)};return se.useEffect(()=>{if(n._state.action=!1,sN(r,n._names)&&n._subjects.state.next({...n._formState}),d.current&&(!Sm(n._options.mode).isOnSubmit||n._formState.isSubmitted)&&!Sm(n._options.reValidateMode).isOnSubmit)if(n._options.resolver)n._runSchema([r]).then(k=>{const R=Ie(k.errors,r),E=Ie(n._formState.errors,r);(E?!R&&E.type||R&&(E.type!==R.type||E.message!==R.message):R&&R.type)&&(R?Jt(n._formState.errors,r,R):Sr(n._formState.errors,r),n._subjects.state.next({errors:n._formState.errors}))});else{const k=Ie(n._fields,r);k&&k._f&&!(Sm(n._options.reValidateMode).isOnSubmit&&Sm(n._options.mode).isOnSubmit)&&iN(k,n._names.disabled,n._formValues,n._options.criteriaMode===No.all,n._options.shouldUseNativeValidation,!0).then(R=>!Ps(R)&&n._subjects.state.next({errors:MK(n._formState.errors,R,r)}))}n._subjects.state.next({name:r,values:Zn(n._formValues)}),n._names.focus&&zm(n._fields,(k,R)=>{if(n._names.focus&&R.startsWith(n._names.focus)&&k.focus)return k.focus(),1}),n._names.focus="",n._setValid(),d.current=!1},[o,r,n]),se.useEffect(()=>(!Ie(n._formValues,r)&&n._setFieldArray(r),()=>{const k=(R,E)=>{const T=Ie(n._fields,R);T&&T._f&&(T._f.mount=E)};n._options.shouldUnregister||i?n.unregister(r):k(r,!1)}),[r,n,s,i]),{swap:se.useCallback(v,[m,r,n]),move:se.useCallback(w,[m,r,n]),prepend:se.useCallback(h,[m,r,n]),append:se.useCallback(p,[m,r,n]),remove:se.useCallback(y,[m,r,n]),insert:se.useCallback(g,[m,r,n]),update:se.useCallback(x,[m,r,n]),replace:se.useCallback(A,[m,r,n]),fields:se.useMemo(()=>o.map((k,R)=>({...k,[s]:u.current[R]||vu()})),[o,s])}}function PPe(t={}){const e=se.useRef(void 0),n=se.useRef(void 0),[r,s]=se.useState({isDirty:!1,isValidating:!1,isLoading:_a(t.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1,defaultValues:_a(t.defaultValues)?void 0:t.defaultValues});e.current||(e.current={...t.formControl?t.formControl:APe(t),formState:r},t.formControl&&t.defaultValues&&!_a(t.defaultValues)&&t.formControl.reset(t.defaultValues,t.resetOptions));const i=e.current.control;return i._options=t,se.useLayoutEffect(()=>i._subscribe({formState:i._proxyFormState,callback:()=>s({...i._formState}),reRenderRoot:!0}),[i]),se.useEffect(()=>i._disableForm(t.disabled),[i,t.disabled]),se.useEffect(()=>{if(i._proxyFormState.isDirty){const a=i._getDirty();a!==r.isDirty&&i._subjects.state.next({isDirty:a})}},[i,r.isDirty]),se.useEffect(()=>{t.values&&!Nu(t.values,n.current)?(i._reset(t.values,i._options.resetOptions),n.current=t.values,s(a=>({...a}))):i._resetDefaultValues()},[t.values,i]),se.useEffect(()=>{t.errors&&!Ps(t.errors)&&i._setErrors(t.errors)},[t.errors,i]),se.useEffect(()=>{i._state.mount||(i._setValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),se.useEffect(()=>{t.shouldUnregister&&i._subjects.state.next({values:i._getWatch()})},[t.shouldUnregister,i]),e.current.formState=EK(r,i),e.current}var TPe="Label",OK=_.forwardRef((t,e)=>P.jsx(De.label,{...t,ref:e,onMouseDown:n=>{var s;n.target.closest("button, input, select, textarea")||((s=t.onMouseDown)==null||s.call(t,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));OK.displayName=TPe;var LK=OK;const kPe=Ho("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),IK=_.forwardRef(({className:t,...e},n)=>P.jsx(LK,{ref:n,className:ce(kPe(),t),...e}));IK.displayName=LK.displayName;const DPe=uPe,$K=_.createContext({}),XI=({...t})=>P.jsx($K.Provider,{value:{name:t.name},children:P.jsx(pPe,{...t},t.name)}),Nv=()=>{const t=_.useContext($K),e=_.useContext(jK),{getFieldState:n,formState:r}=Fd(),s=n(t.name,r);if(!t)throw new Error("useFormField should be used within ");const{id:i}=e;return{id:i,name:t.name,formItemId:`${i}-form-item`,formDescriptionId:`${i}-form-item-description`,formMessageId:`${i}-form-item-message`,...s}},jK=_.createContext({}),vA=_.forwardRef(({className:t,...e},n)=>{const r=_.useId();return P.jsx(jK.Provider,{value:{id:r},children:P.jsx("div",{ref:n,className:ce("space-y-2",t),...e})})});vA.displayName="FormItem";const FK=_.forwardRef(({className:t,...e},n)=>{const{error:r,formItemId:s}=Nv();return P.jsx(IK,{ref:n,className:ce(r&&"text-destructive",t),htmlFor:s,...e})});FK.displayName="FormLabel";const yA=_.forwardRef(({...t},e)=>{const{error:n,formItemId:r,formDescriptionId:s,formMessageId:i}=Nv();return P.jsx(Ra,{ref:e,id:r,"aria-describedby":n?`${s} ${i}`:`${s}`,"aria-invalid":!!n,...t})});yA.displayName="FormControl";const bA=_.forwardRef(({className:t,...e},n)=>{const{formDescriptionId:r}=Nv();return P.jsx("p",{ref:n,id:r,className:ce("text-[0.8rem] text-muted-foreground",t),...e})});bA.displayName="FormDescription";const zK=_.forwardRef(({className:t,children:e,...n},r)=>{const{error:s,formMessageId:i}=Nv(),a=s?String((s==null?void 0:s.message)??""):e;return a?P.jsx("p",{ref:r,id:i,className:ce("text-[0.8rem] font-medium text-destructive",t),...n,children:a}):null});zK.displayName="FormMessage";var WT,BK="HoverCard",[UK,qHe]=Tn(BK,[Rl]),QI=Rl(),[GHe,JI]=UK(BK),HK="HoverCardTrigger",NPe=_.forwardRef((t,e)=>{const{__scopeHoverCard:n,...r}=t,s=JI(HK,n),i=QI(n);return P.jsx(Dv,{asChild:!0,...i,children:P.jsx(De.a,{"data-state":s.open?"open":"closed",...r,ref:e,onPointerEnter:me(t.onPointerEnter,x1(s.onOpen)),onPointerLeave:me(t.onPointerLeave,x1(s.onClose)),onFocus:me(t.onFocus,s.onOpen),onBlur:me(t.onBlur,s.onClose),onTouchStart:me(t.onTouchStart,a=>a.preventDefault())})})});NPe.displayName=HK;var MPe="HoverCardPortal",[KHe,OPe]=UK(MPe,{forceMount:void 0}),_1="HoverCardContent",WK=_.forwardRef((t,e)=>{const n=OPe(_1,t.__scopeHoverCard),{forceMount:r=n.forceMount,...s}=t,i=JI(_1,t.__scopeHoverCard);return P.jsx(Hn,{present:r||i.open,children:P.jsx(LPe,{"data-state":i.open?"open":"closed",...s,onPointerEnter:me(t.onPointerEnter,x1(i.onOpen)),onPointerLeave:me(t.onPointerLeave,x1(i.onClose)),ref:e})})});WK.displayName=_1;var LPe=_.forwardRef((t,e)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:a,...o}=t,c=JI(_1,n),u=QI(n),f=_.useRef(null),l=tt(e,f),[d,m]=_.useState(!1);return _.useEffect(()=>{if(d){const p=document.body;return WT=p.style.userSelect||p.style.webkitUserSelect,p.style.userSelect="none",p.style.webkitUserSelect="none",()=>{p.style.userSelect=WT,p.style.webkitUserSelect=WT}}},[d]),_.useEffect(()=>{if(f.current){const p=()=>{m(!1),c.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var y;((y=document.getSelection())==null?void 0:y.toString())!==""&&(c.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",p),()=>{document.removeEventListener("pointerup",p),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!1}}},[c.isPointerDownOnContentRef,c.hasSelectionRef]),_.useEffect(()=>{f.current&&jPe(f.current).forEach(h=>h.setAttribute("tabindex","-1"))}),P.jsx(Jc,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:a,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:me(i,p=>{p.preventDefault()}),onDismiss:c.onDismiss,children:P.jsx(w_,{...u,...o,onPointerDown:me(o.onPointerDown,p=>{p.currentTarget.contains(p.target)&&m(!0),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!0}),ref:l,style:{...o.style,userSelect:d?"text":void 0,WebkitUserSelect:d?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),IPe="HoverCardArrow",$Pe=_.forwardRef((t,e)=>{const{__scopeHoverCard:n,...r}=t,s=QI(n);return P.jsx(__,{...s,...r,ref:e})});$Pe.displayName=IPe;function x1(t){return e=>e.pointerType==="touch"?void 0:t()}function jPe(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)e.push(n.currentNode);return e}var VK=WK;const FPe=_.forwardRef(({className:t,align:e="center",sideOffset:n=4,...r},s)=>P.jsx(VK,{ref:s,align:e,sideOffset:n,className:ce("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...r}));FPe.displayName=VK.displayName;const zPe=_.forwardRef(({className:t,type:e,...n},r)=>P.jsx("input",{type:e,className:ce("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium 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",t),ref:r,...n}));zPe.displayName="Input";var wA="Menubar",[oN,BPe,UPe]=Xc(wA),[qK,YHe]=Tn(wA,[UPe,Pl]),Di=C_(),GK=Pl(),[HPe,KK]=qK(wA),YK=_.forwardRef((t,e)=>{const{__scopeMenubar:n,value:r,onValueChange:s,defaultValue:i,loop:a=!0,dir:o,...c}=t,u=Ma(o),f=GK(n),[l="",d]=sr({prop:r,onChange:s,defaultProp:i}),[m,p]=_.useState(null);return P.jsx(HPe,{scope:n,value:l,onMenuOpen:_.useCallback(h=>{d(h),p(h)},[d]),onMenuClose:_.useCallback(()=>d(""),[d]),onMenuToggle:_.useCallback(h=>{d(y=>y?"":h),p(h)},[d]),dir:u,loop:a,children:P.jsx(oN.Provider,{scope:n,children:P.jsx(oN.Slot,{scope:n,children:P.jsx(x_,{asChild:!0,...f,orientation:"horizontal",loop:a,dir:u,currentTabStopId:m,onCurrentTabStopIdChange:p,children:P.jsx(De.div,{role:"menubar",...c,ref:e})})})})})});YK.displayName=wA;var WPe="MenubarMenu",[XHe,XK]=qK(WPe),aN="MenubarTrigger",QK=_.forwardRef((t,e)=>{const{__scopeMenubar:n,disabled:r=!1,...s}=t,i=GK(n),a=Di(n),o=KK(aN,n),c=XK(aN,n),u=_.useRef(null),f=tt(e,u,c.triggerRef),[l,d]=_.useState(!1),m=o.value===c.value;return P.jsx(oN.ItemSlot,{scope:n,value:c.value,disabled:r,children:P.jsx(S_,{asChild:!0,...i,focusable:!r,tabStopId:c.value,children:P.jsx(CI,{asChild:!0,...a,children:P.jsx(De.button,{type:"button",role:"menuitem",id:c.triggerId,"aria-haspopup":"menu","aria-expanded":m,"aria-controls":m?c.contentId:void 0,"data-highlighted":l?"":void 0,"data-state":m?"open":"closed","data-disabled":r?"":void 0,disabled:r,...s,ref:f,onPointerDown:me(t.onPointerDown,p=>{!r&&p.button===0&&p.ctrlKey===!1&&(o.onMenuOpen(c.value),m||p.preventDefault())}),onPointerEnter:me(t.onPointerEnter,()=>{var h;!!o.value&&!m&&(o.onMenuOpen(c.value),(h=u.current)==null||h.focus())}),onKeyDown:me(t.onKeyDown,p=>{r||(["Enter"," "].includes(p.key)&&o.onMenuToggle(c.value),p.key==="ArrowDown"&&o.onMenuOpen(c.value),["Enter"," ","ArrowDown"].includes(p.key)&&(c.wasKeyboardTriggerOpenRef.current=!0,p.preventDefault()))}),onFocus:me(t.onFocus,()=>d(!0)),onBlur:me(t.onBlur,()=>d(!1))})})})})});QK.displayName=aN;var VPe="MenubarPortal",JK=t=>{const{__scopeMenubar:e,...n}=t,r=Di(e);return P.jsx(AI,{...r,...n})};JK.displayName=VPe;var lN="MenubarContent",ZK=_.forwardRef((t,e)=>{const{__scopeMenubar:n,align:r="start",...s}=t,i=Di(n),a=KK(lN,n),o=XK(lN,n),c=BPe(n),u=_.useRef(!1);return P.jsx(RI,{id:o.contentId,"aria-labelledby":o.triggerId,"data-radix-menubar-content":"",...i,...s,ref:e,align:r,onCloseAutoFocus:me(t.onCloseAutoFocus,f=>{var d;!!!a.value&&!u.current&&((d=o.triggerRef.current)==null||d.focus()),u.current=!1,f.preventDefault()}),onFocusOutside:me(t.onFocusOutside,f=>{const l=f.target;c().some(m=>{var p;return(p=m.ref.current)==null?void 0:p.contains(l)})&&f.preventDefault()}),onInteractOutside:me(t.onInteractOutside,()=>{u.current=!0}),onEntryFocus:f=>{o.wasKeyboardTriggerOpenRef.current||f.preventDefault()},onKeyDown:me(t.onKeyDown,f=>{if(["ArrowRight","ArrowLeft"].includes(f.key)){const l=f.target,d=l.hasAttribute("data-radix-menubar-subtrigger"),m=l.closest("[data-radix-menubar-content]")!==f.currentTarget,h=(a.dir==="rtl"?"ArrowRight":"ArrowLeft")===f.key;if(!h&&d||m&&h)return;let v=c().filter(A=>!A.disabled).map(A=>A.value);h&&v.reverse();const w=v.indexOf(o.value);v=a.loop?oTe(v,w+1):v.slice(w+1);const[x]=v;x&&a.onMenuOpen(x)}},{checkForDefaultPrevented:!1}),style:{...t.style,"--radix-menubar-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-menubar-content-available-width":"var(--radix-popper-available-width)","--radix-menubar-content-available-height":"var(--radix-popper-available-height)","--radix-menubar-trigger-width":"var(--radix-popper-anchor-width)","--radix-menubar-trigger-height":"var(--radix-popper-anchor-height)"}})});ZK.displayName=lN;var qPe="MenubarGroup",GPe=_.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,s=Di(n);return P.jsx(PI,{...s,...r,ref:e})});GPe.displayName=qPe;var KPe="MenubarLabel",e7=_.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,s=Di(n);return P.jsx(TI,{...s,...r,ref:e})});e7.displayName=KPe;var YPe="MenubarItem",t7=_.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,s=Di(n);return P.jsx(kI,{...s,...r,ref:e})});t7.displayName=YPe;var XPe="MenubarCheckboxItem",n7=_.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,s=Di(n);return P.jsx(DI,{...s,...r,ref:e})});n7.displayName=XPe;var QPe="MenubarRadioGroup",JPe=_.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,s=Di(n);return P.jsx(NI,{...s,...r,ref:e})});JPe.displayName=QPe;var ZPe="MenubarRadioItem",r7=_.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,s=Di(n);return P.jsx(MI,{...s,...r,ref:e})});r7.displayName=ZPe;var eTe="MenubarItemIndicator",s7=_.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,s=Di(n);return P.jsx(OI,{...s,...r,ref:e})});s7.displayName=eTe;var tTe="MenubarSeparator",i7=_.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,s=Di(n);return P.jsx(LI,{...s,...r,ref:e})});i7.displayName=tTe;var nTe="MenubarArrow",rTe=_.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,s=Di(n);return P.jsx(II,{...s,...r,ref:e})});rTe.displayName=nTe;var sTe="MenubarSubTrigger",o7=_.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,s=Di(n);return P.jsx($I,{"data-radix-menubar-subtrigger":"",...s,...r,ref:e})});o7.displayName=sTe;var iTe="MenubarSubContent",a7=_.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,s=Di(n);return P.jsx(jI,{...s,"data-radix-menubar-content":"",...r,ref:e,style:{...t.style,"--radix-menubar-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-menubar-content-available-width":"var(--radix-popper-available-width)","--radix-menubar-content-available-height":"var(--radix-popper-available-height)","--radix-menubar-trigger-width":"var(--radix-popper-anchor-width)","--radix-menubar-trigger-height":"var(--radix-popper-anchor-height)"}})});a7.displayName=iTe;function oTe(t,e){return t.map((n,r)=>t[(e+r)%t.length])}var l7=YK,c7=QK,aTe=JK,u7=ZK,d7=e7,f7=t7,h7=n7,p7=r7,m7=s7,g7=i7,v7=o7,y7=a7;const lTe=_.forwardRef(({className:t,...e},n)=>P.jsx(l7,{ref:n,className:ce("flex h-10 items-center space-x-1 rounded-md border bg-background p-1",t),...e}));lTe.displayName=l7.displayName;const cTe=_.forwardRef(({className:t,...e},n)=>P.jsx(c7,{ref:n,className:ce("flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",t),...e}));cTe.displayName=c7.displayName;const uTe=_.forwardRef(({className:t,inset:e,children:n,...r},s)=>P.jsxs(v7,{ref:s,className:ce("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",e&&"pl-8",t),...r,children:[n,P.jsx(s_,{className:"ml-auto h-4 w-4"})]}));uTe.displayName=v7.displayName;const dTe=_.forwardRef(({className:t,...e},n)=>P.jsx(y7,{ref:n,className:ce("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...e}));dTe.displayName=y7.displayName;const fTe=_.forwardRef(({className:t,align:e="start",alignOffset:n=-4,sideOffset:r=8,...s},i)=>P.jsx(aTe,{children:P.jsx(u7,{ref:i,align:e,alignOffset:n,sideOffset:r,className:ce("z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...s})}));fTe.displayName=u7.displayName;const hTe=_.forwardRef(({className:t,inset:e,...n},r)=>P.jsx(f7,{ref:r,className:ce("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e&&"pl-8",t),...n}));hTe.displayName=f7.displayName;const pTe=_.forwardRef(({className:t,children:e,checked:n,...r},s)=>P.jsxs(h7,{ref:s,className:ce("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),checked:n,...r,children:[P.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:P.jsx(m7,{children:P.jsx(r_,{className:"h-4 w-4"})})}),e]}));pTe.displayName=h7.displayName;const mTe=_.forwardRef(({className:t,children:e,...n},r)=>P.jsxs(p7,{ref:r,className:ce("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...n,children:[P.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:P.jsx(m7,{children:P.jsx(jC,{className:"h-2 w-2 fill-current"})})}),e]}));mTe.displayName=p7.displayName;const gTe=_.forwardRef(({className:t,inset:e,...n},r)=>P.jsx(d7,{ref:r,className:ce("px-2 py-1.5 text-sm font-semibold",e&&"pl-8",t),...n}));gTe.displayName=d7.displayName;const vTe=_.forwardRef(({className:t,...e},n)=>P.jsx(g7,{ref:n,className:ce("-mx-1 my-1 h-px bg-muted",t),...e}));vTe.displayName=g7.displayName;var yTe="VisuallyHidden",k_=_.forwardRef((t,e)=>P.jsx(De.span,{...t,ref:e,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",...t.style}}));k_.displayName=yTe;var b7=k_,Mv="NavigationMenu",[ZI,w7,bTe]=Xc(Mv),[cN,wTe,_Te]=Xc(Mv),[e$,QHe]=Tn(Mv,[bTe,_Te]),[xTe,Vo]=e$(Mv),[STe,ETe]=e$(Mv),_7=_.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,value:r,onValueChange:s,defaultValue:i,delayDuration:a=200,skipDelayDuration:o=300,orientation:c="horizontal",dir:u,...f}=t,[l,d]=_.useState(null),m=tt(e,T=>d(T)),p=Ma(u),h=_.useRef(0),y=_.useRef(0),g=_.useRef(0),[v,w]=_.useState(!0),[x="",A]=sr({prop:r,onChange:T=>{const D=T!=="",M=o>0;D?(window.clearTimeout(g.current),M&&w(!1)):(window.clearTimeout(g.current),g.current=window.setTimeout(()=>w(!0),o)),s==null||s(T)},defaultProp:i}),k=_.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>A(""),150)},[A]),R=_.useCallback(T=>{window.clearTimeout(y.current),A(T)},[A]),E=_.useCallback(T=>{x===T?window.clearTimeout(y.current):h.current=window.setTimeout(()=>{window.clearTimeout(y.current),A(T)},a)},[x,A,a]);return _.useEffect(()=>()=>{window.clearTimeout(h.current),window.clearTimeout(y.current),window.clearTimeout(g.current)},[]),P.jsx(S7,{scope:n,isRootMenu:!0,value:x,dir:p,orientation:c,rootNavigationMenu:l,onTriggerEnter:T=>{window.clearTimeout(h.current),v?E(T):R(T)},onTriggerLeave:()=>{window.clearTimeout(h.current),k()},onContentEnter:()=>window.clearTimeout(y.current),onContentLeave:k,onItemSelect:T=>{A(D=>D===T?"":T)},onItemDismiss:()=>A(""),children:P.jsx(De.nav,{"aria-label":"Main","data-orientation":c,dir:p,...f,ref:m})})});_7.displayName=Mv;var x7="NavigationMenuSub",CTe=_.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,value:r,onValueChange:s,defaultValue:i,orientation:a="horizontal",...o}=t,c=Vo(x7,n),[u="",f]=sr({prop:r,onChange:s,defaultProp:i});return P.jsx(S7,{scope:n,isRootMenu:!1,value:u,dir:c.dir,orientation:a,rootNavigationMenu:c.rootNavigationMenu,onTriggerEnter:l=>f(l),onItemSelect:l=>f(l),onItemDismiss:()=>f(""),children:P.jsx(De.div,{"data-orientation":a,...o,ref:e})})});CTe.displayName=x7;var S7=t=>{const{scope:e,isRootMenu:n,rootNavigationMenu:r,dir:s,orientation:i,children:a,value:o,onItemSelect:c,onItemDismiss:u,onTriggerEnter:f,onTriggerLeave:l,onContentEnter:d,onContentLeave:m}=t,[p,h]=_.useState(null),[y,g]=_.useState(new Map),[v,w]=_.useState(null);return P.jsx(xTe,{scope:e,isRootMenu:n,rootNavigationMenu:r,value:o,previousValue:Pv(o),baseId:Vr(),dir:s,orientation:i,viewport:p,onViewportChange:h,indicatorTrack:v,onIndicatorTrackChange:w,onTriggerEnter:Ut(f),onTriggerLeave:Ut(l),onContentEnter:Ut(d),onContentLeave:Ut(m),onItemSelect:Ut(c),onItemDismiss:Ut(u),onViewportContentChange:_.useCallback((x,A)=>{g(k=>(k.set(x,A),new Map(k)))},[]),onViewportContentRemove:_.useCallback(x=>{g(A=>A.has(x)?(A.delete(x),new Map(A)):A)},[]),children:P.jsx(ZI.Provider,{scope:e,children:P.jsx(STe,{scope:e,items:y,children:a})})})},E7="NavigationMenuList",C7=_.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,...r}=t,s=Vo(E7,n),i=P.jsx(De.ul,{"data-orientation":s.orientation,...r,ref:e});return P.jsx(De.div,{style:{position:"relative"},ref:s.onIndicatorTrackChange,children:P.jsx(ZI.Slot,{scope:n,children:s.isRootMenu?P.jsx(M7,{asChild:!0,children:i}):i})})});C7.displayName=E7;var A7="NavigationMenuItem",[ATe,R7]=e$(A7),RTe=_.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,value:r,...s}=t,i=Vr(),a=r||i||"LEGACY_REACT_AUTO_VALUE",o=_.useRef(null),c=_.useRef(null),u=_.useRef(null),f=_.useRef(()=>{}),l=_.useRef(!1),d=_.useCallback((p="start")=>{if(o.current){f.current();const h=dN(o.current);h.length&&r$(p==="start"?h:h.reverse())}},[]),m=_.useCallback(()=>{if(o.current){const p=dN(o.current);p.length&&(f.current=LTe(p))}},[]);return P.jsx(ATe,{scope:n,value:a,triggerRef:c,contentRef:o,focusProxyRef:u,wasEscapeCloseRef:l,onEntryKeyDown:d,onFocusProxyEnter:d,onRootContentClose:m,onContentFocusOutside:m,children:P.jsx(De.li,{...s,ref:e})})});RTe.displayName=A7;var uN="NavigationMenuTrigger",P7=_.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,disabled:r,...s}=t,i=Vo(uN,t.__scopeNavigationMenu),a=R7(uN,t.__scopeNavigationMenu),o=_.useRef(null),c=tt(o,a.triggerRef,e),u=L7(i.baseId,a.value),f=I7(i.baseId,a.value),l=_.useRef(!1),d=_.useRef(!1),m=a.value===i.value;return P.jsxs(P.Fragment,{children:[P.jsx(ZI.ItemSlot,{scope:n,value:a.value,children:P.jsx(O7,{asChild:!0,children:P.jsx(De.button,{id:u,disabled:r,"data-disabled":r?"":void 0,"data-state":s$(m),"aria-expanded":m,"aria-controls":f,...s,ref:c,onPointerEnter:me(t.onPointerEnter,()=>{d.current=!1,a.wasEscapeCloseRef.current=!1}),onPointerMove:me(t.onPointerMove,S1(()=>{r||d.current||a.wasEscapeCloseRef.current||l.current||(i.onTriggerEnter(a.value),l.current=!0)})),onPointerLeave:me(t.onPointerLeave,S1(()=>{r||(i.onTriggerLeave(),l.current=!1)})),onClick:me(t.onClick,()=>{i.onItemSelect(a.value),d.current=m}),onKeyDown:me(t.onKeyDown,p=>{const y={horizontal:"ArrowDown",vertical:i.dir==="rtl"?"ArrowLeft":"ArrowRight"}[i.orientation];m&&p.key===y&&(a.onEntryKeyDown(),p.preventDefault())})})})}),m&&P.jsxs(P.Fragment,{children:[P.jsx(b7,{"aria-hidden":!0,tabIndex:0,ref:a.focusProxyRef,onFocus:p=>{const h=a.contentRef.current,y=p.relatedTarget,g=y===o.current,v=h==null?void 0:h.contains(y);(g||!v)&&a.onFocusProxyEnter(g?"start":"end")}}),i.viewport&&P.jsx("span",{"aria-owns":f})]})]})});P7.displayName=uN;var PTe="NavigationMenuLink",jB="navigationMenu.linkSelect",TTe=_.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,active:r,onSelect:s,...i}=t;return P.jsx(O7,{asChild:!0,children:P.jsx(De.a,{"data-active":r?"":void 0,"aria-current":r?"page":void 0,...i,ref:e,onClick:me(t.onClick,a=>{const o=a.target,c=new CustomEvent(jB,{bubbles:!0,cancelable:!0});if(o.addEventListener(jB,u=>s==null?void 0:s(u),{once:!0}),Wb(o,c),!c.defaultPrevented&&!a.metaKey){const u=new CustomEvent(qS,{bubbles:!0,cancelable:!0});Wb(o,u)}},{checkForDefaultPrevented:!1})})})});TTe.displayName=PTe;var t$="NavigationMenuIndicator",T7=_.forwardRef((t,e)=>{const{forceMount:n,...r}=t,s=Vo(t$,t.__scopeNavigationMenu),i=!!s.value;return s.indicatorTrack?t_.createPortal(P.jsx(Hn,{present:n||i,children:P.jsx(kTe,{...r,ref:e})}),s.indicatorTrack):null});T7.displayName=t$;var kTe=_.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,...r}=t,s=Vo(t$,n),i=w7(n),[a,o]=_.useState(null),[c,u]=_.useState(null),f=s.orientation==="horizontal",l=!!s.value;_.useEffect(()=>{var h;const p=(h=i().find(y=>y.value===s.value))==null?void 0:h.ref.current;p&&o(p)},[i,s.value]);const d=()=>{a&&u({size:f?a.offsetWidth:a.offsetHeight,offset:f?a.offsetLeft:a.offsetTop})};return fN(a,d),fN(s.indicatorTrack,d),c?P.jsx(De.div,{"aria-hidden":!0,"data-state":l?"visible":"hidden","data-orientation":s.orientation,...r,ref:e,style:{position:"absolute",...f?{left:0,width:c.size+"px",transform:`translateX(${c.offset}px)`}:{top:0,height:c.size+"px",transform:`translateY(${c.offset}px)`},...r.style}}):null}),uv="NavigationMenuContent",k7=_.forwardRef((t,e)=>{const{forceMount:n,...r}=t,s=Vo(uv,t.__scopeNavigationMenu),i=R7(uv,t.__scopeNavigationMenu),a=tt(i.contentRef,e),o=i.value===s.value,c={value:i.value,triggerRef:i.triggerRef,focusProxyRef:i.focusProxyRef,wasEscapeCloseRef:i.wasEscapeCloseRef,onContentFocusOutside:i.onContentFocusOutside,onRootContentClose:i.onRootContentClose,...r};return s.viewport?P.jsx(DTe,{forceMount:n,...c,ref:a}):P.jsx(Hn,{present:n||o,children:P.jsx(D7,{"data-state":s$(o),...c,ref:a,onPointerEnter:me(t.onPointerEnter,s.onContentEnter),onPointerLeave:me(t.onPointerLeave,S1(s.onContentLeave)),style:{pointerEvents:!o&&s.isRootMenu?"none":void 0,...c.style}})})});k7.displayName=uv;var DTe=_.forwardRef((t,e)=>{const n=Vo(uv,t.__scopeNavigationMenu),{onViewportContentChange:r,onViewportContentRemove:s}=n;return Ln(()=>{r(t.value,{ref:e,...t})},[t,e,r]),Ln(()=>()=>s(t.value),[t.value,s]),null}),qS="navigationMenu.rootContentDismiss",D7=_.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,value:r,triggerRef:s,focusProxyRef:i,wasEscapeCloseRef:a,onRootContentClose:o,onContentFocusOutside:c,...u}=t,f=Vo(uv,n),l=_.useRef(null),d=tt(l,e),m=L7(f.baseId,r),p=I7(f.baseId,r),h=w7(n),y=_.useRef(null),{onItemDismiss:g}=f;_.useEffect(()=>{const w=l.current;if(f.isRootMenu&&w){const x=()=>{var A;g(),o(),w.contains(document.activeElement)&&((A=s.current)==null||A.focus())};return w.addEventListener(qS,x),()=>w.removeEventListener(qS,x)}},[f.isRootMenu,t.value,s,g,o]);const v=_.useMemo(()=>{const x=h().map(D=>D.value);f.dir==="rtl"&&x.reverse();const A=x.indexOf(f.value),k=x.indexOf(f.previousValue),R=r===f.value,E=k===x.indexOf(r);if(!R&&!E)return y.current;const T=(()=>{if(A!==k){if(R&&k!==-1)return A>k?"from-end":"from-start";if(E&&A!==-1)return A>k?"to-start":"to-end"}return null})();return y.current=T,T},[f.previousValue,f.value,f.dir,h,r]);return P.jsx(M7,{asChild:!0,children:P.jsx(Jc,{id:p,"aria-labelledby":m,"data-motion":v,"data-orientation":f.orientation,...u,ref:d,disableOutsidePointerEvents:!1,onDismiss:()=>{var x;const w=new Event(qS,{bubbles:!0,cancelable:!0});(x=l.current)==null||x.dispatchEvent(w)},onFocusOutside:me(t.onFocusOutside,w=>{var A;c();const x=w.target;(A=f.rootNavigationMenu)!=null&&A.contains(x)&&w.preventDefault()}),onPointerDownOutside:me(t.onPointerDownOutside,w=>{var R;const x=w.target,A=h().some(E=>{var T;return(T=E.ref.current)==null?void 0:T.contains(x)}),k=f.isRootMenu&&((R=f.viewport)==null?void 0:R.contains(x));(A||k||!f.isRootMenu)&&w.preventDefault()}),onKeyDown:me(t.onKeyDown,w=>{var k;const x=w.altKey||w.ctrlKey||w.metaKey;if(w.key==="Tab"&&!x){const R=dN(w.currentTarget),E=document.activeElement,T=R.findIndex(L=>L===E),M=w.shiftKey?R.slice(0,T).reverse():R.slice(T+1,R.length);r$(M)?w.preventDefault():(k=i.current)==null||k.focus()}}),onEscapeKeyDown:me(t.onEscapeKeyDown,w=>{a.current=!0})})})}),n$="NavigationMenuViewport",N7=_.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=!!Vo(n$,t.__scopeNavigationMenu).value;return P.jsx(Hn,{present:n||i,children:P.jsx(NTe,{...r,ref:e})})});N7.displayName=n$;var NTe=_.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,children:r,...s}=t,i=Vo(n$,n),a=tt(e,i.onViewportChange),o=ETe(uv,t.__scopeNavigationMenu),[c,u]=_.useState(null),[f,l]=_.useState(null),d=c?(c==null?void 0:c.width)+"px":void 0,m=c?(c==null?void 0:c.height)+"px":void 0,p=!!i.value,h=p?i.value:i.previousValue;return fN(f,()=>{f&&u({width:f.offsetWidth,height:f.offsetHeight})}),P.jsx(De.div,{"data-state":s$(p),"data-orientation":i.orientation,...s,ref:a,style:{pointerEvents:!p&&i.isRootMenu?"none":void 0,"--radix-navigation-menu-viewport-width":d,"--radix-navigation-menu-viewport-height":m,...s.style},onPointerEnter:me(t.onPointerEnter,i.onContentEnter),onPointerLeave:me(t.onPointerLeave,S1(i.onContentLeave)),children:Array.from(o.items).map(([g,{ref:v,forceMount:w,...x}])=>{const A=h===g;return P.jsx(Hn,{present:w||A,children:P.jsx(D7,{...x,ref:n_(v,k=>{A&&k&&l(k)})})},g)})})}),MTe="FocusGroup",M7=_.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,...r}=t,s=Vo(MTe,n);return P.jsx(cN.Provider,{scope:n,children:P.jsx(cN.Slot,{scope:n,children:P.jsx(De.div,{dir:s.dir,...r,ref:e})})})}),FB=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],OTe="FocusGroupItem",O7=_.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,...r}=t,s=wTe(n),i=Vo(OTe,n);return P.jsx(cN.ItemSlot,{scope:n,children:P.jsx(De.button,{...r,ref:e,onKeyDown:me(t.onKeyDown,a=>{if(["Home","End",...FB].includes(a.key)){let c=s().map(l=>l.ref.current);if([i.dir==="rtl"?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(a.key)&&c.reverse(),FB.includes(a.key)){const l=c.indexOf(a.currentTarget);c=c.slice(l+1)}setTimeout(()=>r$(c)),a.preventDefault()}})})})});function dN(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function r$(t){const e=document.activeElement;return t.some(n=>n===e?!0:(n.focus(),document.activeElement!==e))}function LTe(t){return t.forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}),()=>{t.forEach(e=>{const n=e.dataset.tabindex;e.setAttribute("tabindex",n)})}}function fN(t,e){const n=Ut(e);Ln(()=>{let r=0;if(t){const s=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return s.observe(t),()=>{window.cancelAnimationFrame(r),s.unobserve(t)}}},[t,n])}function s$(t){return t?"open":"closed"}function L7(t,e){return`${t}-trigger-${e}`}function I7(t,e){return`${t}-content-${e}`}function S1(t){return e=>e.pointerType==="mouse"?t(e):void 0}var $7=_7,j7=C7,F7=P7,z7=T7,B7=k7,U7=N7;const ITe=_.forwardRef(({className:t,children:e,...n},r)=>P.jsxs($7,{ref:r,className:ce("relative z-10 flex max-w-max flex-1 items-center justify-center",t),...n,children:[e,P.jsx(H7,{})]}));ITe.displayName=$7.displayName;const $Te=_.forwardRef(({className:t,...e},n)=>P.jsx(j7,{ref:n,className:ce("group flex flex-1 list-none items-center justify-center space-x-1",t),...e}));$Te.displayName=j7.displayName;const jTe=Ho("group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50"),FTe=_.forwardRef(({className:t,children:e,...n},r)=>P.jsxs(F7,{ref:r,className:ce(jTe(),"group",t),...n,children:[e," ",P.jsx($C,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180","aria-hidden":"true"})]}));FTe.displayName=F7.displayName;const zTe=_.forwardRef(({className:t,...e},n)=>P.jsx(B7,{ref:n,className:ce("left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto ",t),...e}));zTe.displayName=B7.displayName;const H7=_.forwardRef(({className:t,...e},n)=>P.jsx("div",{className:ce("absolute left-0 top-full flex justify-center"),children:P.jsx(U7,{className:ce("origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",t),ref:n,...e})}));H7.displayName=U7.displayName;const BTe=_.forwardRef(({className:t,...e},n)=>P.jsx(z7,{ref:n,className:ce("top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",t),...e,children:P.jsx("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"})}));BTe.displayName=z7.displayName;var UTe=typeof window>"u",hN=UTe?se.useEffect:se.useLayoutEffect,HTe=0,zB=()=>++HTe,BB=!1;function WTe(){let[t,e]=se.useState(BB?zB:void 0);return hN(()=>{t===void 0&&e(zB()),BB=!0},[]),t===void 0?t:`rwb-${t.toString(32)}`}function VTe(){return se.useMemo(()=>"useId"in se?se.useId:WTe,[])()}var pN="__wrap_b",gb="__wrap_n",UB="__wrap_o",W7=(t,e,n)=>{n=n||document.querySelector(`[data-br="${t}"]`);let r=n==null?void 0:n.parentElement;if(!r)return;let s=f=>n.style.maxWidth=f+"px";n.style.maxWidth="";let i=r.clientWidth,a=r.clientHeight,o=i/2-.25,c=i+.5,u;if(i){for(s(o),o=Math.max(n.scrollWidth,o);o+1{self.__wrap_b(0,+n.dataset.brr,n)})).observe(r)},qTe=W7.toString(),GTe='(self.CSS&&CSS.supports("text-wrap","balance")?1:2)',KTe=(t,e,n="")=>(n&&(n=`self.${gb}!=1&&${n}`),se.createElement("script",{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:(t?"":`self.${gb}=self.${gb}||${GTe};self.${pN}=${qTe};`)+n},nonce:e})),YTe=se.createContext({preferNative:!0,hasProvider:!1});se.forwardRef(({ratio:t=1,preferNative:e,nonce:n,children:r,as:s,...i},a)=>{let o=VTe(),c=se.useRef(),u=se.useContext(YTe),f=e??u.preferNative,l=s||"span";return se.useImperativeHandle(a,()=>c.current,[]),hN(()=>{f&&self[gb]===1||c.current&&(self[pN]=W7)(0,t,c.current)},[r,f,t]),hN(()=>{if(!(f&&self[gb]===1))return()=>{if(!c.current)return;let d=c.current[UB];d&&(d.disconnect(),delete c.current[UB])}},[f]),se.createElement(se.Fragment,null,se.createElement(l,{...i,"data-br":o,"data-brr":t,ref:c,style:{display:"inline-block",verticalAlign:"top",textDecoration:"inherit",textWrap:f?"balance":"initial"},suppressHydrationWarning:!0},r),KTe(u.hasProvider,n,`self.${pN}("${o}",${t})`))});var XTe="Separator",HB="horizontal",QTe=["horizontal","vertical"],V7=_.forwardRef((t,e)=>{const{decorative:n,orientation:r=HB,...s}=t,i=JTe(r)?r:HB,o=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return P.jsx(De.div,{"data-orientation":i,...o,...s,ref:e})});V7.displayName=XTe;function JTe(t){return QTe.includes(t)}var q7=V7;const ZTe=_.forwardRef(({className:t,orientation:e="horizontal",decorative:n=!0,...r},s)=>P.jsx(q7,{ref:s,decorative:n,orientation:e,className:ce("shrink-0 bg-border",e==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",t),...r}));ZTe.displayName=q7.displayName;const eke=_.forwardRef(({className:t,...e},n)=>P.jsx("ul",{ref:n,className:ce("flex flex-row items-center gap-1",t),...e}));eke.displayName="PaginationContent";const tke=_.forwardRef(({className:t,...e},n)=>P.jsx("li",{ref:n,className:ce("",t),...e}));tke.displayName="PaginationItem";var i$="Popover",[G7,JHe]=Tn(i$,[Rl]),D_=Rl(),[nke,zd]=G7(i$),K7=t=>{const{__scopePopover:e,children:n,open:r,defaultOpen:s,onOpenChange:i,modal:a=!1}=t,o=D_(e),c=_.useRef(null),[u,f]=_.useState(!1),[l=!1,d]=sr({prop:r,defaultProp:s,onChange:i});return P.jsx(dA,{...o,children:P.jsx(nke,{scope:e,contentId:Vr(),triggerRef:c,open:l,onOpenChange:d,onOpenToggle:_.useCallback(()=>d(m=>!m),[d]),hasCustomAnchor:u,onCustomAnchorAdd:_.useCallback(()=>f(!0),[]),onCustomAnchorRemove:_.useCallback(()=>f(!1),[]),modal:a,children:n})})};K7.displayName=i$;var Y7="PopoverAnchor",rke=_.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,s=zd(Y7,n),i=D_(n),{onCustomAnchorAdd:a,onCustomAnchorRemove:o}=s;return _.useEffect(()=>(a(),()=>o()),[a,o]),P.jsx(Dv,{...i,...r,ref:e})});rke.displayName=Y7;var X7="PopoverTrigger",Q7=_.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,s=zd(X7,n),i=D_(n),a=tt(e,s.triggerRef),o=P.jsx(De.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":n9(s.open),...r,ref:a,onClick:me(t.onClick,s.onOpenToggle)});return s.hasCustomAnchor?o:P.jsx(Dv,{asChild:!0,...i,children:o})});Q7.displayName=X7;var o$="PopoverPortal",[ske,ike]=G7(o$,{forceMount:void 0}),J7=t=>{const{__scopePopover:e,forceMount:n,children:r,container:s}=t,i=zd(o$,e);return P.jsx(ske,{scope:e,forceMount:n,children:P.jsx(Hn,{present:n||i.open,children:P.jsx(Sv,{asChild:!0,container:s,children:r})})})};J7.displayName=o$;var dv="PopoverContent",Z7=_.forwardRef((t,e)=>{const n=ike(dv,t.__scopePopover),{forceMount:r=n.forceMount,...s}=t,i=zd(dv,t.__scopePopover);return P.jsx(Hn,{present:r||i.open,children:i.modal?P.jsx(oke,{...s,ref:e}):P.jsx(ake,{...s,ref:e})})});Z7.displayName=dv;var oke=_.forwardRef((t,e)=>{const n=zd(dv,t.__scopePopover),r=_.useRef(null),s=tt(e,r),i=_.useRef(!1);return _.useEffect(()=>{const a=r.current;if(a)return Ev(a)},[]),P.jsx(o_,{as:Ra,allowPinchZoom:!0,children:P.jsx(e9,{...t,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:me(t.onCloseAutoFocus,a=>{var o;a.preventDefault(),i.current||(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:me(t.onPointerDownOutside,a=>{const o=a.detail.originalEvent,c=o.button===0&&o.ctrlKey===!0,u=o.button===2||c;i.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:me(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),ake=_.forwardRef((t,e)=>{const n=zd(dv,t.__scopePopover),r=_.useRef(!1),s=_.useRef(!1);return P.jsx(e9,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a,o;(a=t.onCloseAutoFocus)==null||a.call(t,i),i.defaultPrevented||(r.current||(o=n.triggerRef.current)==null||o.focus(),i.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:i=>{var c,u;(c=t.onInteractOutside)==null||c.call(t,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const a=i.target;((u=n.triggerRef.current)==null?void 0:u.contains(a))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),e9=_.forwardRef((t,e)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:o,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:f,...l}=t,d=zd(dv,n),m=D_(n);return FC(),P.jsx(i_,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:i,children:P.jsx(Jc,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:f,onEscapeKeyDown:o,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>d.onOpenChange(!1),children:P.jsx(w_,{"data-state":n9(d.open),role:"dialog",id:d.contentId,...m,...l,ref:e,style:{...l.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),t9="PopoverClose",lke=_.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,s=zd(t9,n);return P.jsx(De.button,{type:"button",...r,ref:e,onClick:me(t.onClick,()=>s.onOpenChange(!1))})});lke.displayName=t9;var cke="PopoverArrow",uke=_.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,s=D_(n);return P.jsx(__,{...s,...r,ref:e})});uke.displayName=cke;function n9(t){return t?"open":"closed"}var dke=K7,fke=Q7,hke=J7,r9=Z7;const pke=dke,mke=fke,s9=_.forwardRef(({className:t,align:e="center",sideOffset:n=4,...r},s)=>P.jsx(hke,{children:P.jsx(r9,{ref:s,align:e,sideOffset:n,className:ce("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...r})}));s9.displayName=r9.displayName;var a$="Progress",l$=100,[gke,ZHe]=Tn(a$),[vke,yke]=gke(a$),i9=_.forwardRef((t,e)=>{const{__scopeProgress:n,value:r=null,max:s,getValueLabel:i=bke,...a}=t;(s||s===0)&&!WB(s)&&console.error(wke(`${s}`,"Progress"));const o=WB(s)?s:l$;r!==null&&!VB(r,o)&&console.error(_ke(`${r}`,"Progress"));const c=VB(r,o)?r:null,u=E1(c)?i(c,o):void 0;return P.jsx(vke,{scope:n,value:c,max:o,children:P.jsx(De.div,{"aria-valuemax":o,"aria-valuemin":0,"aria-valuenow":E1(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":l9(c,o),"data-value":c??void 0,"data-max":o,...a,ref:e})})});i9.displayName=a$;var o9="ProgressIndicator",a9=_.forwardRef((t,e)=>{const{__scopeProgress:n,...r}=t,s=yke(o9,n);return P.jsx(De.div,{"data-state":l9(s.value,s.max),"data-value":s.value??void 0,"data-max":s.max,...r,ref:e})});a9.displayName=o9;function bke(t,e){return`${Math.round(t/e*100)}%`}function l9(t,e){return t==null?"indeterminate":t===e?"complete":"loading"}function E1(t){return typeof t=="number"}function WB(t){return E1(t)&&!isNaN(t)&&t>0}function VB(t,e){return E1(t)&&!isNaN(t)&&t<=e&&t>=0}function wke(t,e){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${l$}\`.`}function _ke(t,e){return`Invalid prop \`value\` of value \`${t}\` supplied to \`${e}\`. The \`value\` prop must be: +){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,100%,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,100%,0)}}@keyframes slideFromTop{from{transform:translate3d(0,-100%,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,-100%,0)}}@keyframes slideFromLeft{from{transform:translate3d(-100%,0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(-100%,0,0)}}@keyframes slideFromRight{from{transform:translate3d(100%,0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(100%,0,0)}}`);const rRe=24,sRe=typeof window<"u"?_.useLayoutEffect:_.useEffect;function CB(...t){return(...e)=>{for(let n of t)typeof n=="function"&&n(...e)}}function iRe(){return WI(/^Mac/)}function oRe(){return WI(/^iPhone/)}function AB(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function aRe(){return WI(/^iPad/)||iRe()&&navigator.maxTouchPoints>1}function LG(){return oRe()||aRe()}function WI(t){return typeof window<"u"&&window.navigator!=null?t.test(window.navigator.platform):void 0}const DT=typeof document<"u"&&window.visualViewport;function RB(t){let e=window.getComputedStyle(t);return/(auto|scroll)/.test(e.overflow+e.overflowX+e.overflowY)}function IG(t){for(RB(t)&&(t=t.parentElement);t&&!RB(t);)t=t.parentElement;return t||document.scrollingElement||document.documentElement}const lRe=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let pS=0,NT;function cRe(t={}){let{isDisabled:e}=t;sRe(()=>{if(!e)return pS++,pS===1&&LG()&&(NT=uRe()),()=>{pS--,pS===0&&(NT==null||NT())}},[e])}function uRe(){let t,e=0,n=l=>{t=IG(l.target),!(t===document.documentElement&&t===document.body)&&(e=l.changedTouches[0].pageY)},r=l=>{if(!t||t===document.documentElement||t===document.body){l.preventDefault();return}let d=l.changedTouches[0].pageY,m=t.scrollTop,p=t.scrollHeight-t.clientHeight;p!==0&&((m<=0&&d>e||m>=p&&d{let d=l.target;ZD(d)&&d!==document.activeElement&&(l.preventDefault(),d.style.transform="translateY(-2000px)",d.focus(),requestAnimationFrame(()=>{d.style.transform=""}))},i=l=>{let d=l.target;ZD(d)&&(d.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{d.style.transform="",DT&&(DT.height{PB(d)}):DT.addEventListener("resize",()=>PB(d),{once:!0}))}))},a=()=>{window.scrollTo(0,0)},o=window.pageXOffset,c=window.pageYOffset,u=CB(dRe(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let f=CB(wy(document,"touchstart",n,{passive:!1,capture:!0}),wy(document,"touchmove",r,{passive:!1,capture:!0}),wy(document,"touchend",s,{passive:!1,capture:!0}),wy(document,"focus",i,!0),wy(window,"scroll",a));return()=>{u(),f(),window.scrollTo(o,c)}}function dRe(t,e,n){let r=t.style[e];return t.style[e]=n,()=>{t.style[e]=r}}function wy(t,e,n,r){return t.addEventListener(e,n,r),()=>{t.removeEventListener(e,n,r)}}function PB(t){let e=document.scrollingElement||document.documentElement;for(;t&&t!==e;){let n=IG(t);if(n!==document.documentElement&&n!==document.body&&n!==t){let r=n.getBoundingClientRect().top,s=t.getBoundingClientRect().top,i=t.getBoundingClientRect().bottom;const a=n.getBoundingClientRect().bottom+rRe;i>a&&(n.scrollTop+=s-r)}t=n.parentElement}}function ZD(t){return t instanceof HTMLInputElement&&!lRe.has(t.type)||t instanceof HTMLTextAreaElement||t instanceof HTMLElement&&t.isContentEditable}function fRe(t,e){typeof t=="function"?t(e):t!=null&&(t.current=e)}function hRe(...t){return e=>t.forEach(n=>fRe(n,e))}function $G(...t){return _.useCallback(hRe(...t),t)}const jG=new WeakMap;function $r(t,e,n=!1){if(!t||!(t instanceof HTMLElement))return;let r={};Object.entries(e).forEach(([s,i])=>{if(s.startsWith("--")){t.style.setProperty(s,i);return}r[s]=t.style[s],t.style[s]=i}),!n&&jG.set(t,r)}function pRe(t,e){if(!t||!(t instanceof HTMLElement))return;let n=jG.get(t);n&&(t.style[e]=n[e])}const jr=t=>{switch(t){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return t}};function mS(t,e){if(!t)return null;const n=window.getComputedStyle(t),r=n.transform||n.webkitTransform||n.mozTransform;let s=r.match(/^matrix3d\((.+)\)$/);return s?parseFloat(s[1].split(", ")[jr(e)?13:12]):(s=r.match(/^matrix\((.+)\)$/),s?parseFloat(s[1].split(", ")[jr(e)?5:4]):null)}function mRe(t){return 8*(Math.log(t+1)-2)}function MT(t,e){if(!t)return()=>{};const n=t.style.cssText;return Object.assign(t.style,e),()=>{t.style.cssText=n}}function gRe(...t){return(...e)=>{for(const n of t)typeof n=="function"&&n(...e)}}const er={DURATION:.5,EASE:[.32,.72,0,1]},FG=.4,vRe=.25,yRe=100,zG=8,gS=16,eN=26,OT="vaul-dragging";function BG(t){const e=se.useRef(t);return se.useEffect(()=>{e.current=t}),se.useMemo(()=>(...n)=>e.current==null?void 0:e.current.call(e,...n),[])}function bRe({defaultProp:t,onChange:e}){const n=se.useState(t),[r]=n,s=se.useRef(r),i=BG(e);return se.useEffect(()=>{s.current!==r&&(i(r),s.current=r)},[r,s,i]),n}function UG({prop:t,defaultProp:e,onChange:n=()=>{}}){const[r,s]=bRe({defaultProp:e,onChange:n}),i=t!==void 0,a=i?t:r,o=BG(n),c=se.useCallback(u=>{if(i){const l=typeof u=="function"?u(t):u;l!==t&&o(l)}else s(u)},[i,t,s,o]);return[a,c]}function wRe({activeSnapPointProp:t,setActiveSnapPointProp:e,snapPoints:n,drawerRef:r,overlayRef:s,fadeFromIndex:i,onSnapPointChange:a,direction:o="bottom",container:c,snapToSequentialPoint:u}){const[f,l]=UG({prop:t,defaultProp:n==null?void 0:n[0],onChange:e}),[d,m]=se.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);se.useEffect(()=>{function R(){m({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",R),()=>window.removeEventListener("resize",R)},[]);const p=se.useMemo(()=>f===(n==null?void 0:n[n.length-1])||null,[n,f]),h=se.useMemo(()=>n==null?void 0:n.findIndex(R=>R===f),[n,f]),y=n&&n.length>0&&(i||i===0)&&!Number.isNaN(i)&&n[i]===f||!n,g=se.useMemo(()=>{const R=c?{width:c.getBoundingClientRect().width,height:c.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var E;return(E=n==null?void 0:n.map(T=>{const D=typeof T=="string";let M=0;if(D&&(M=parseInt(T,10)),jr(o)){const I=D?M:d?T*R.height:0;return d?o==="bottom"?R.height-I:-R.height+I:I}const L=D?M:d?T*R.width:0;return d?o==="right"?R.width-L:-R.width+L:L}))!=null?E:[]},[n,d,c]),v=se.useMemo(()=>h!==null?g==null?void 0:g[h]:null,[g,h]),w=se.useCallback(R=>{var E;const T=(E=g==null?void 0:g.findIndex(D=>D===R))!=null?E:null;a(T),$r(r.current,{transition:`transform ${er.DURATION}s cubic-bezier(${er.EASE.join(",")})`,transform:jr(o)?`translate3d(0, ${R}px, 0)`:`translate3d(${R}px, 0, 0)`}),g&&T!==g.length-1&&T!==i&&T{if(f||t){var R;const E=(R=n==null?void 0:n.findIndex(T=>T===t||T===f))!=null?R:-1;g&&E!==-1&&typeof g[E]=="number"&&w(g[E])}},[f,t,n,g,w]);function x({draggedDistance:R,closeDrawer:E,velocity:T,dismissible:D}){if(i===void 0)return;const M=o==="bottom"||o==="right"?(v??0)-R:(v??0)+R,L=h===i-1,I=h===0,j=R>0;if(L&&$r(s.current,{transition:`opacity ${er.DURATION}s cubic-bezier(${er.EASE.join(",")})`}),!u&&T>2&&!j){D?E():w(g[0]);return}if(!u&&T>2&&j&&g&&n){w(g[n.length-1]);return}const U=g==null?void 0:g.reduce((W,H)=>typeof W!="number"||typeof H!="number"?W:Math.abs(H-M)FG&&Math.abs(R)0&&p){w(g[n.length-1]);return}if(I&&W<0&&D&&E(),h===null)return;w(g[h+W]);return}w(U)}function A({draggedDistance:R}){if(v===null)return;const E=o==="bottom"||o==="right"?v-R:v+R;(o==="bottom"||o==="right")&&Eg[g.length-1]||$r(r.current,{transform:jr(o)?`translate3d(0, ${E}px, 0)`:`translate3d(${E}px, 0, 0)`})}function k(R,E){if(!n||typeof h!="number"||!g||i===void 0)return null;const T=h===i-1;if(h>=i&&E)return 0;if(T&&!E)return 1;if(!y&&!T)return null;const M=T?h+1:h-1,L=T?g[M]-g[M-1]:g[M+1]-g[M],I=R/Math.abs(L);return T?1-I:I}return{isLastSnapPoint:p,activeSnapPoint:f,shouldFade:y,getPercentageDragged:k,setActiveSnapPoint:l,activeSnapPointIndex:h,onRelease:x,onDrag:A,snapPointsOffset:g}}const _Re=()=>()=>{};function xRe(){const{direction:t,isOpen:e,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:s}=R0(),i=se.useRef(null),a=_.useMemo(()=>document.body.style.backgroundColor,[]);function o(){return(window.innerWidth-eN)/window.innerWidth}se.useEffect(()=>{if(e&&n){i.current&&clearTimeout(i.current);const c=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!c)return;gRe(r&&!s?MT(document.body,{background:"black"}):_Re,MT(c,{transformOrigin:jr(t)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${er.DURATION}s`,transitionTimingFunction:`cubic-bezier(${er.EASE.join(",")})`}));const u=MT(c,{borderRadius:`${zG}px`,overflow:"hidden",...jr(t)?{transform:`scale(${o()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${o()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{u(),i.current=window.setTimeout(()=>{a?document.body.style.background=a:document.body.style.removeProperty("background")},er.DURATION*1e3)}}},[e,n,a])}let _y=null;function SRe({isOpen:t,modal:e,nested:n,hasBeenOpened:r,preventScrollRestoration:s,noBodyStyles:i}){const[a,o]=se.useState(()=>typeof window<"u"?window.location.href:""),c=se.useRef(0),u=se.useCallback(()=>{if(AB()&&_y===null&&t&&!i){_y={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:l,innerHeight:d}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-c.current}px`,left:`${-l}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const m=d-window.innerHeight;m&&c.current>=d&&(document.body.style.top=`${-(c.current+m)}px`)}),300)}},[t]),f=se.useCallback(()=>{if(AB()&&_y!==null&&!i){const l=-parseInt(document.body.style.top,10),d=-parseInt(document.body.style.left,10);Object.assign(document.body.style,_y),window.requestAnimationFrame(()=>{if(s&&a!==window.location.href){o(window.location.href);return}window.scrollTo(d,l)}),_y=null}},[a]);return se.useEffect(()=>{function l(){c.current=window.scrollY}return l(),window.addEventListener("scroll",l),()=>{window.removeEventListener("scroll",l)}},[]),se.useEffect(()=>{n||!r||(t?(!window.matchMedia("(display-mode: standalone)").matches&&u(),e||window.setTimeout(()=>{f()},500)):f())},[t,r,a,e,n,u,f]),{restorePositionSetting:f}}function ERe({open:t,onOpenChange:e,children:n,onDrag:r,onRelease:s,snapPoints:i,shouldScaleBackground:a=!1,setBackgroundColorOnScale:o=!0,closeThreshold:c=vRe,scrollLockTimeout:u=yRe,dismissible:f=!0,handleOnly:l=!1,fadeFromIndex:d=i&&i.length-1,activeSnapPoint:m,setActiveSnapPoint:p,fixed:h,modal:y=!0,onClose:g,nested:v,noBodyStyles:w,direction:x="bottom",defaultOpen:A=!1,disablePreventScroll:k=!0,snapToSequentialPoint:R=!1,preventScrollRestoration:E=!1,repositionInputs:T=!0,onAnimationEnd:D,container:M,autoFocus:L=!1}){var I,j;const[U=!1,Y]=UG({defaultProp:A,prop:t,onChange:Be=>{e==null||e(Be),!Be&&!v&&Me(),setTimeout(()=>{D==null||D(Be)},er.DURATION*1e3),Be&&!y&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),Be||(document.body.style.pointerEvents="auto")}}),[W,H]=se.useState(!1),[ee,re]=se.useState(!1),[X,G]=se.useState(!1),K=se.useRef(null),J=se.useRef(null),ue=se.useRef(null),de=se.useRef(null),ie=se.useRef(null),be=se.useRef(!1),Ae=se.useRef(null),_e=se.useRef(0),Oe=se.useRef(!1),Ne=se.useRef(0),ye=se.useRef(null),$e=se.useRef(((I=ye.current)==null?void 0:I.getBoundingClientRect().height)||0),ut=se.useRef(((j=ye.current)==null?void 0:j.getBoundingClientRect().width)||0),Qe=se.useRef(0),yt=se.useCallback(Be=>{i&&Be===Z.length-1&&(J.current=new Date)},[]),{activeSnapPoint:En,activeSnapPointIndex:Xt,setActiveSnapPoint:gn,onRelease:Qt,snapPointsOffset:Z,onDrag:fe,shouldFade:ge,getPercentageDragged:Pe}=wRe({snapPoints:i,activeSnapPointProp:m,setActiveSnapPointProp:p,drawerRef:ye,fadeFromIndex:d,overlayRef:K,onSnapPointChange:yt,direction:x,container:M,snapToSequentialPoint:R});cRe({isDisabled:!U||ee||!y||X||!W||!T||!k});const{restorePositionSetting:Me}=SRe({isOpen:U,modal:y,nested:v,hasBeenOpened:W,preventScrollRestoration:E,noBodyStyles:w});function xe(){return(window.innerWidth-eN)/window.innerWidth}function Te(Be){var it,ot;!f&&!i||ye.current&&!ye.current.contains(Be.target)||($e.current=((it=ye.current)==null?void 0:it.getBoundingClientRect().height)||0,ut.current=((ot=ye.current)==null?void 0:ot.getBoundingClientRect().width)||0,re(!0),ue.current=new Date,LG()&&window.addEventListener("touchend",()=>be.current=!1,{once:!0}),Be.target.setPointerCapture(Be.pointerId),_e.current=jr(x)?Be.pageY:Be.pageX)}function Ye(Be,it){var ot,Et;let nt=Be;const Wt=(ot=window.getSelection())==null?void 0:ot.toString(),At=ye.current?mS(ye.current,x):null,yn=new Date;if(nt.hasAttribute("data-vaul-no-drag")||nt.closest("[data-vaul-no-drag]"))return!1;if(x==="right"||x==="left")return!0;if(J.current&&yn.getTime()-J.current.getTime()<500)return!1;if(At!==null&&(x==="bottom"?At>0:At<0))return!0;if(Wt&&Wt.length>0)return!1;if(yn.getTime()-((Et=ie.current)==null?void 0:Et.getTime())nt.clientHeight){if(nt.scrollTop!==0)return ie.current=new Date,!1;if(nt.getAttribute("role")==="dialog")return!0}nt=nt.parentNode}return!0}function Pt(Be){if(ye.current&&ee){const it=x==="bottom"||x==="right"?1:-1,ot=(_e.current-(jr(x)?Be.pageY:Be.pageX))*it,Et=ot>0,nt=i&&!f&&!Et;if(nt&&Xt===0)return;const Wt=Math.abs(ot),At=document.querySelector("[data-vaul-drawer-wrapper]"),yn=x==="bottom"||x==="top"?$e.current:ut.current;let ln=Wt/yn;const cn=Pe(Wt,Et);if(cn!==null&&(ln=cn),nt&&ln>=1||!be.current&&!Ye(Be.target,Et))return;if(ye.current.classList.add(OT),be.current=!0,$r(ye.current,{transition:"none"}),$r(K.current,{transition:"none"}),i&&fe({draggedDistance:ot}),Et&&!i){const hr=mRe(ot),Dn=Math.min(hr*-1,0)*it;$r(ye.current,{transform:jr(x)?`translate3d(0, ${Dn}px, 0)`:`translate3d(${Dn}px, 0, 0)`});return}const kn=1-ln;if((ge||d&&Xt===d-1)&&(r==null||r(Be,ln),$r(K.current,{opacity:`${kn}`,transition:"none"},!0)),At&&K.current&&a){const hr=Math.min(xe()+ln*(1-xe()),1),Dn=8-ln*8,te=Math.max(0,14-ln*14);$r(At,{borderRadius:`${Dn}px`,transform:jr(x)?`scale(${hr}) translate3d(0, ${te}px, 0)`:`scale(${hr}) translate3d(${te}px, 0, 0)`,transition:"none"},!0)}if(!i){const hr=Wt*it;$r(ye.current,{transform:jr(x)?`translate3d(0, ${hr}px, 0)`:`translate3d(${hr}px, 0, 0)`})}}}se.useEffect(()=>{var Be;function it(){if(!ye.current||!T)return;const ot=document.activeElement;if(ZD(ot)||Oe.current){var Et;const nt=((Et=window.visualViewport)==null?void 0:Et.height)||0,Wt=window.innerHeight;let At=Wt-nt;const yn=ye.current.getBoundingClientRect().height||0,ln=yn>Wt*.8;Qe.current||(Qe.current=yn);const cn=ye.current.getBoundingClientRect().top;if(Math.abs(Ne.current-At)>60&&(Oe.current=!Oe.current),i&&i.length>0&&Z&&Xt){const kn=Z[Xt]||0;At+=kn}if(Ne.current=At,yn>nt||Oe.current){const kn=ye.current.getBoundingClientRect().height;let hr=kn;kn>nt&&(hr=nt-(ln?cn:eN)),h?ye.current.style.height=`${kn-Math.max(At,0)}px`:ye.current.style.height=`${Math.max(hr,nt-cn)}px`}else ye.current.style.height=`${Qe.current}px`;i&&i.length>0&&!Oe.current?ye.current.style.bottom="0px":ye.current.style.bottom=`${Math.max(At,0)}px`}}return(Be=window.visualViewport)==null||Be.addEventListener("resize",it),()=>{var ot;return(ot=window.visualViewport)==null?void 0:ot.removeEventListener("resize",it)}},[Xt,i,Z]);function wt(Be){Yn(),g==null||g(),Be||Y(!1),setTimeout(()=>{i&&gn(i[0])},er.DURATION*1e3)}function Ls(){if(!ye.current)return;const Be=document.querySelector("[data-vaul-drawer-wrapper]"),it=mS(ye.current,x);$r(ye.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${er.DURATION}s cubic-bezier(${er.EASE.join(",")})`}),$r(K.current,{transition:`opacity ${er.DURATION}s cubic-bezier(${er.EASE.join(",")})`,opacity:"1"}),a&&it&&it>0&&U&&$r(Be,{borderRadius:`${zG}px`,overflow:"hidden",...jr(x)?{transform:`scale(${xe()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${xe()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${er.DURATION}s`,transitionTimingFunction:`cubic-bezier(${er.EASE.join(",")})`},!0)}function Yn(){!ee||!ye.current||(ye.current.classList.remove(OT),be.current=!1,re(!1),de.current=new Date)}function gs(Be){if(!ee||!ye.current)return;ye.current.classList.remove(OT),be.current=!1,re(!1),de.current=new Date;const it=mS(ye.current,x);if(!Ye(Be.target,!1)||!it||Number.isNaN(it)||ue.current===null)return;const ot=de.current.getTime()-ue.current.getTime(),Et=_e.current-(jr(x)?Be.pageY:Be.pageX),nt=Math.abs(Et)/ot;if(nt>.05&&(G(!0),setTimeout(()=>{G(!1)},200)),i){Qt({draggedDistance:Et*(x==="bottom"||x==="right"?1:-1),closeDrawer:wt,velocity:nt,dismissible:f}),s==null||s(Be,!0);return}if(x==="bottom"||x==="right"?Et>0:Et<0){Ls(),s==null||s(Be,!0);return}if(nt>FG){wt(),s==null||s(Be,!1);return}var Wt;const At=Math.min((Wt=ye.current.getBoundingClientRect().height)!=null?Wt:0,window.innerHeight);var yn;const ln=Math.min((yn=ye.current.getBoundingClientRect().width)!=null?yn:0,window.innerWidth),cn=x==="left"||x==="right";if(Math.abs(it)>=(cn?ln:At)*c){wt(),s==null||s(Be,!1);return}s==null||s(Be,!0),Ls()}se.useEffect(()=>(U&&($r(document.documentElement,{scrollBehavior:"auto"}),J.current=new Date),()=>{pRe(document.documentElement,"scrollBehavior")}),[U]);function Ht(Be){const it=Be?(window.innerWidth-gS)/window.innerWidth:1,ot=Be?-16:0;Ae.current&&window.clearTimeout(Ae.current),$r(ye.current,{transition:`transform ${er.DURATION}s cubic-bezier(${er.EASE.join(",")})`,transform:`scale(${it}) translate3d(0, ${ot}px, 0)`}),!Be&&ye.current&&(Ae.current=setTimeout(()=>{const Et=mS(ye.current,x);$r(ye.current,{transition:"none",transform:jr(x)?`translate3d(0, ${Et}px, 0)`:`translate3d(${Et}px, 0, 0)`})},500))}function an(Be,it){if(it<0)return;const ot=(window.innerWidth-gS)/window.innerWidth,Et=ot+it*(1-ot),nt=-16+it*gS;$r(ye.current,{transform:jr(x)?`scale(${Et}) translate3d(0, ${nt}px, 0)`:`scale(${Et}) translate3d(${nt}px, 0, 0)`,transition:"none"})}function vn(Be,it){const ot=jr(x)?window.innerHeight:window.innerWidth,Et=it?(ot-gS)/ot:1,nt=it?-16:0;it&&$r(ye.current,{transition:`transform ${er.DURATION}s cubic-bezier(${er.EASE.join(",")})`,transform:jr(x)?`scale(${Et}) translate3d(0, ${nt}px, 0)`:`scale(${Et}) translate3d(${nt}px, 0, 0)`})}return se.createElement(YAe,{defaultOpen:A,onOpenChange:Be=>{!f&&!Be||(Be?H(!0):wt(!0),Y(Be))},open:U},se.createElement(OG.Provider,{value:{activeSnapPoint:En,snapPoints:i,setActiveSnapPoint:gn,drawerRef:ye,overlayRef:K,onOpenChange:e,onPress:Te,onRelease:gs,onDrag:Pt,dismissible:f,handleOnly:l,isOpen:U,isDragging:ee,shouldFade:ge,closeDrawer:wt,onNestedDrag:an,onNestedOpenChange:Ht,onNestedRelease:vn,keyboardIsOpen:Oe,modal:y,snapPointsOffset:Z,direction:x,shouldScaleBackground:a,setBackgroundColorOnScale:o,noBodyStyles:w,container:M,autoFocus:L}},n))}const HG=se.forwardRef(function({...t},e){const{overlayRef:n,snapPoints:r,onRelease:s,shouldFade:i,isOpen:a,modal:o}=R0(),c=$G(e,n),u=r&&r.length>0;return o?se.createElement(QAe,{onMouseUp:s,ref:c,"data-vaul-overlay":"","data-vaul-snap-points":a&&u?"true":"false","data-vaul-snap-points-overlay":a&&i?"true":"false",...t}):(typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),null)});HG.displayName="Drawer.Overlay";const WG=se.forwardRef(function({onPointerDownOutside:t,style:e,onOpenAutoFocus:n,...r},s){const{drawerRef:i,onPress:a,onRelease:o,onDrag:c,keyboardIsOpen:u,snapPointsOffset:f,modal:l,isOpen:d,direction:m,snapPoints:p,container:h,handleOnly:y,autoFocus:g}=R0(),[v,w]=se.useState(!1),x=$G(s,i),A=se.useRef(null),k=se.useRef(null),R=se.useRef(!1),E=p&&p.length>0;xRe();const T=(M,L,I=0)=>{if(R.current)return!0;const j=Math.abs(M.y),U=Math.abs(M.x),Y=U>j,W=["bottom","right"].includes(L)?1:-1;if(L==="left"||L==="right"){if(!(M.x*W<0)&&U>=0&&U<=I)return Y}else if(!(M.y*W<0)&&j>=0&&j<=I)return!Y;return R.current=!0,!0};se.useEffect(()=>{E&&window.requestAnimationFrame(()=>{w(!0)})},[]);function D(M){A.current=null,R.current=!1,o(M)}return se.createElement(JAe,{"data-vaul-drawer-direction":m,"data-vaul-drawer":"","data-vaul-delayed-snap-points":v?"true":"false","data-vaul-snap-points":d&&E?"true":"false","data-vaul-custom-container":h?"true":"false",...r,ref:x,style:f&&f.length>0?{"--snap-point-height":`${f[0]}px`,...e}:e,onPointerDown:M=>{y||(r.onPointerDown==null||r.onPointerDown.call(r,M),A.current={x:M.pageX,y:M.pageY},a(M))},onOpenAutoFocus:M=>{n==null||n(M),g||M.preventDefault()},onPointerDownOutside:M=>{if(t==null||t(M),!l||M.defaultPrevented){M.preventDefault();return}u.current&&(u.current=!1)},onFocusOutside:M=>{if(!l){M.preventDefault();return}},onPointerMove:M=>{if(k.current=M,y||(r.onPointerMove==null||r.onPointerMove.call(r,M),!A.current))return;const L=M.pageY-A.current.y,I=M.pageX-A.current.x,j=M.pointerType==="touch"?10:2;T({x:I,y:L},m,j)?c(M):(Math.abs(I)>j||Math.abs(L)>j)&&(A.current=null)},onPointerUp:M=>{r.onPointerUp==null||r.onPointerUp.call(r,M),A.current=null,R.current=!1,o(M)},onPointerOut:M=>{r.onPointerOut==null||r.onPointerOut.call(r,M),D(k.current)},onContextMenu:M=>{r.onContextMenu==null||r.onContextMenu.call(r,M),D(k.current)}})});WG.displayName="Drawer.Content";const CRe=250,ARe=120,RRe=se.forwardRef(function({preventCycle:t=!1,children:e,...n},r){const{closeDrawer:s,isDragging:i,snapPoints:a,activeSnapPoint:o,setActiveSnapPoint:c,dismissible:u,handleOnly:f,isOpen:l,onPress:d,onDrag:m}=R0(),p=se.useRef(null),h=se.useRef(!1);function y(){if(h.current){w();return}window.setTimeout(()=>{g()},ARe)}function g(){if(i||t||h.current){w();return}if(w(),(!a||a.length===0)&&u){s();return}if(o===a[a.length-1]&&u){s();return}const A=a.findIndex(R=>R===o);if(A===-1)return;const k=a[A+1];c(k)}function v(){p.current=window.setTimeout(()=>{h.current=!0},CRe)}function w(){window.clearTimeout(p.current),h.current=!1}return se.createElement("div",{onClick:y,onPointerCancel:w,onPointerDown:x=>{f&&d(x),v()},onPointerMove:x=>{f&&m(x)},ref:r,"data-vaul-drawer-visible":l?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},se.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},e))});RRe.displayName="Drawer.Handle";function PRe(t){const e=R0(),{container:n=e.container,...r}=t;return se.createElement(XAe,{container:n,...r})}const Tl={Root:ERe,Content:WG,Overlay:HG,Portal:PRe,Close:tRe,Title:ZAe,Description:eRe},TRe=({shouldScaleBackground:t=!0,...e})=>P.jsx(Tl.Root,{shouldScaleBackground:t,...e});TRe.displayName="Drawer";const kRe=Tl.Portal,VHe=Tl.Close,VG=_.forwardRef(({className:t,...e},n)=>P.jsx(Tl.Overlay,{ref:n,className:ce("fixed inset-0 z-50 bg-black/80",t),...e}));VG.displayName=Tl.Overlay.displayName;const DRe=_.forwardRef(({className:t,children:e,...n},r)=>P.jsxs(kRe,{children:[P.jsx(VG,{}),P.jsxs(Tl.Content,{ref:r,className:ce("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",t),...n,children:[P.jsx("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),e]})]}));DRe.displayName="DrawerContent";const NRe=({className:t,...e})=>P.jsx("div",{className:ce("grid gap-1.5 p-4 text-center sm:text-left",t),...e});NRe.displayName="DrawerHeader";const MRe=({className:t,...e})=>P.jsx("div",{className:ce("mt-auto flex flex-col gap-2 p-4",t),...e});MRe.displayName="DrawerFooter";const ORe=_.forwardRef(({className:t,...e},n)=>P.jsx(Tl.Title,{ref:n,className:ce("text-lg font-semibold leading-none tracking-tight",t),...e}));ORe.displayName=Tl.Title.displayName;const LRe=_.forwardRef(({className:t,...e},n)=>P.jsx(Tl.Description,{ref:n,className:ce("text-sm text-muted-foreground",t),...e}));LRe.displayName=Tl.Description.displayName;var VI="DropdownMenu",[IRe,qHe]=Tn(VI,[C0]),ni=C0(),[$Re,qG]=IRe(VI),GG=t=>{const{__scopeDropdownMenu:e,children:n,dir:r,open:s,defaultOpen:i,onOpenChange:a,modal:o=!0}=t,c=ni(e),u=_.useRef(null),[f=!1,l]=sr({prop:s,defaultProp:i,onChange:a});return P.jsx($Re,{scope:e,triggerId:Vr(),triggerRef:u,contentId:Vr(),open:f,onOpenChange:l,onOpenToggle:_.useCallback(()=>l(d=>!d),[l]),modal:o,children:P.jsx(A1e,{...c,open:f,onOpenChange:l,dir:r,modal:o,children:n})})};GG.displayName=VI;var KG="DropdownMenuTrigger",YG=_.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...s}=t,i=qG(KG,n),a=ni(n);return P.jsx(CI,{asChild:!0,...a,children:P.jsx(De.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...s,ref:n0(e,i.triggerRef),onPointerDown:me(t.onPointerDown,o=>{!r&&o.button===0&&o.ctrlKey===!1&&(i.onOpenToggle(),i.open||o.preventDefault())}),onKeyDown:me(t.onKeyDown,o=>{r||(["Enter"," "].includes(o.key)&&i.onOpenToggle(),o.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(o.key)&&o.preventDefault())})})})});YG.displayName=KG;var jRe="DropdownMenuPortal",XG=t=>{const{__scopeDropdownMenu:e,...n}=t,r=ni(e);return P.jsx(AI,{...r,...n})};XG.displayName=jRe;var QG="DropdownMenuContent",JG=_.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=qG(QG,n),i=ni(n),a=_.useRef(!1);return P.jsx(RI,{id:s.contentId,"aria-labelledby":s.triggerId,...i,...r,ref:e,onCloseAutoFocus:me(t.onCloseAutoFocus,o=>{var c;a.current||(c=s.triggerRef.current)==null||c.focus(),a.current=!1,o.preventDefault()}),onInteractOutside:me(t.onInteractOutside,o=>{const c=o.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,f=c.button===2||u;(!s.modal||f)&&(a.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});JG.displayName=QG;var FRe="DropdownMenuGroup",ZG=_.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=ni(n);return P.jsx(PI,{...s,...r,ref:e})});ZG.displayName=FRe;var zRe="DropdownMenuLabel",eK=_.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=ni(n);return P.jsx(TI,{...s,...r,ref:e})});eK.displayName=zRe;var BRe="DropdownMenuItem",tK=_.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=ni(n);return P.jsx(kI,{...s,...r,ref:e})});tK.displayName=BRe;var URe="DropdownMenuCheckboxItem",nK=_.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=ni(n);return P.jsx(DI,{...s,...r,ref:e})});nK.displayName=URe;var HRe="DropdownMenuRadioGroup",WRe=_.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=ni(n);return P.jsx(NI,{...s,...r,ref:e})});WRe.displayName=HRe;var VRe="DropdownMenuRadioItem",rK=_.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=ni(n);return P.jsx(MI,{...s,...r,ref:e})});rK.displayName=VRe;var qRe="DropdownMenuItemIndicator",sK=_.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=ni(n);return P.jsx(OI,{...s,...r,ref:e})});sK.displayName=qRe;var GRe="DropdownMenuSeparator",iK=_.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=ni(n);return P.jsx(LI,{...s,...r,ref:e})});iK.displayName=GRe;var KRe="DropdownMenuArrow",YRe=_.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=ni(n);return P.jsx(II,{...s,...r,ref:e})});YRe.displayName=KRe;var XRe="DropdownMenuSubTrigger",oK=_.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=ni(n);return P.jsx($I,{...s,...r,ref:e})});oK.displayName=XRe;var QRe="DropdownMenuSubContent",aK=_.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,s=ni(n);return P.jsx(jI,{...s,...r,ref:e,style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});aK.displayName=QRe;var JRe=GG,ZRe=YG,ePe=XG,lK=JG,tPe=ZG,cK=eK,uK=tK,dK=nK,fK=rK,hK=sK,pK=iK,mK=oK,gK=aK;const nPe=JRe,rPe=ZRe,sPe=tPe,iPe=_.forwardRef(({className:t,inset:e,children:n,...r},s)=>P.jsxs(mK,{ref:s,className:ce("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",e&&"pl-8",t),...r,children:[n,P.jsx(s0,{className:"w-4 h-4 ml-auto"})]}));iPe.displayName=mK.displayName;const oPe=_.forwardRef(({className:t,...e},n)=>P.jsx(gK,{ref:n,className:ce("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...e}));oPe.displayName=gK.displayName;const vK=_.forwardRef(({className:t,sideOffset:e=4,...n},r)=>P.jsx(ePe,{children:P.jsx(lK,{ref:r,sideOffset:e,className:ce("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...n})}));vK.displayName=lK.displayName;const tN=_.forwardRef(({className:t,inset:e,...n},r)=>P.jsx(uK,{ref:r,className:ce("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e&&"pl-8",t),...n}));tN.displayName=uK.displayName;const aPe=_.forwardRef(({className:t,children:e,checked:n,...r},s)=>P.jsxs(dK,{ref:s,className:ce("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),checked:n,...r,children:[P.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:P.jsx(hK,{children:P.jsx(r0,{className:"w-4 h-4"})})}),e]}));aPe.displayName=dK.displayName;const lPe=_.forwardRef(({className:t,children:e,...n},r)=>P.jsxs(fK,{ref:r,className:ce("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...n,children:[P.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:P.jsx(hK,{children:P.jsx(j1,{className:"w-2 h-2 fill-current"})})}),e]}));lPe.displayName=fK.displayName;const yK=_.forwardRef(({className:t,inset:e,...n},r)=>P.jsx(cK,{ref:r,className:ce("px-2 py-1.5 text-sm font-semibold",e&&"pl-8",t),...n}));yK.displayName=cK.displayName;const nN=_.forwardRef(({className:t,...e},n)=>P.jsx(pK,{ref:n,className:ce("-mx-1 my-1 h-px bg-muted",t),...e}));nN.displayName=pK.displayName;const cPe=({className:t,...e})=>P.jsx("span",{className:ce("ml-auto text-xs tracking-widest opacity-60",t),...e});cPe.displayName="DropdownMenuShortcut";var P0=t=>t.type==="checkbox",Cf=t=>t instanceof Date,Gs=t=>t==null;const bK=t=>typeof t=="object";var br=t=>!Gs(t)&&!Array.isArray(t)&&bK(t)&&!Cf(t),wK=t=>br(t)&&t.target?P0(t.target)?t.target.checked:t.target.value:t,uPe=t=>t.substring(0,t.search(/\.\d+(\.|$)/))||t,_K=(t,e)=>t.has(uPe(e)),dPe=t=>{const e=t.constructor&&t.constructor.prototype;return br(e)&&e.hasOwnProperty("isPrototypeOf")},qI=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Zn(t){let e;const n=Array.isArray(t),r=typeof FileList<"u"?t instanceof FileList:!1;if(t instanceof Date)e=new Date(t);else if(t instanceof Set)e=new Set(t);else if(!(qI&&(t instanceof Blob||r))&&(n||br(t)))if(e=n?[]:{},!n&&!dPe(t))e=t;else for(const s in t)t.hasOwnProperty(s)&&(e[s]=Zn(t[s]));else return t;return e}var T0=t=>Array.isArray(t)?t.filter(Boolean):[],Bn=t=>t===void 0,Ie=(t,e,n)=>{if(!e||!br(t))return n;const r=T0(e.split(/[,[\].]+?/)).reduce((s,i)=>Gs(s)?s:s[i],t);return Bn(r)||r===t?Bn(t[e])?n:t[e]:r},Zi=t=>typeof t=="boolean",GI=t=>/^\w*$/.test(t),xK=t=>T0(t.replace(/["|']|\]/g,"").split(/\.|\[/)),Jt=(t,e,n)=>{let r=-1;const s=GI(e)?[e]:xK(e),i=s.length,a=i-1;for(;++rse.useContext(SK),fPe=t=>{const{children:e,...n}=t;return se.createElement(SK.Provider,{value:n},e)};var EK=(t,e,n,r=!0)=>{const s={defaultValues:e._defaultValues};for(const i in t)Object.defineProperty(s,i,{get:()=>{const a=i;return e._proxyFormState[a]!==No.all&&(e._proxyFormState[a]=!r||No.all),n&&(n[a]=!0),t[a]}});return s};function hPe(t){const e=Fd(),{control:n=e.control,disabled:r,name:s,exact:i}=t||{},[a,o]=se.useState(n._formState),c=se.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),u=se.useRef(s);return u.current=s,se.useEffect(()=>n._subscribe({name:u.current,formState:c.current,exact:i,callback:f=>{!r&&o({...n._formState,...f})}}),[n,r,i]),se.useEffect(()=>{c.current.isValid&&n._setValid(!0)},[n]),se.useMemo(()=>EK(a,n,c.current,!1),[a,n])}var gl=t=>typeof t=="string",CK=(t,e,n,r,s)=>gl(t)?(r&&e.watch.add(t),Ie(n,t,s)):Array.isArray(t)?t.map(i=>(r&&e.watch.add(i),Ie(n,i))):(r&&(e.watchAll=!0),n);function pPe(t){const e=Fd(),{control:n=e.control,name:r,defaultValue:s,disabled:i,exact:a}=t||{},o=se.useRef(r),c=se.useRef(s);o.current=r,se.useEffect(()=>n._subscribe({name:o.current,formState:{values:!0},exact:a,callback:l=>!i&&f(CK(o.current,n._names,l.values||n._formValues,!1,c.current))}),[n,i,a]);const[u,f]=se.useState(n._getWatch(r,s));return se.useEffect(()=>n._removeUnmounted()),u}function mPe(t){const e=Fd(),{name:n,disabled:r,control:s=e.control,shouldUnregister:i}=t,a=_K(s._names.array,n),o=pPe({control:s,name:n,defaultValue:Ie(s._formValues,n,Ie(s._defaultValues,n,t.defaultValue)),exact:!0}),c=hPe({control:s,name:n,exact:!0}),u=se.useRef(t),f=se.useRef(s.register(n,{...t.rules,value:o,...Zi(t.disabled)?{disabled:t.disabled}:{}})),l=se.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Ie(c.errors,n)},isDirty:{enumerable:!0,get:()=>!!Ie(c.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Ie(c.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Ie(c.validatingFields,n)},error:{enumerable:!0,get:()=>Ie(c.errors,n)}}),[c,n]),d=se.useCallback(y=>f.current.onChange({target:{value:wK(y),name:n},type:vC.CHANGE}),[n]),m=se.useCallback(()=>f.current.onBlur({target:{value:Ie(s._formValues,n),name:n},type:vC.BLUR}),[n,s._formValues]),p=se.useCallback(y=>{const g=Ie(s._fields,n);g&&y&&(g._f.ref={focus:()=>y.focus(),select:()=>y.select(),setCustomValidity:v=>y.setCustomValidity(v),reportValidity:()=>y.reportValidity()})},[s._fields,n]),h=se.useMemo(()=>({name:n,value:o,...Zi(r)||c.disabled?{disabled:c.disabled||r}:{},onChange:d,onBlur:m,ref:p}),[n,r,c.disabled,d,m,p,o]);return se.useEffect(()=>{const y=s._options.shouldUnregister||i;s.register(n,{...u.current.rules,...Zi(u.current.disabled)?{disabled:u.current.disabled}:{}});const g=(v,w)=>{const x=Ie(s._fields,v);x&&x._f&&(x._f.mount=w)};if(g(n,!0),y){const v=Zn(Ie(s._options.defaultValues,n));Jt(s._defaultValues,n,v),Bn(Ie(s._formValues,n))&&Jt(s._formValues,n,v)}return!a&&s.register(n),()=>{(a?y&&!s._state.action:y)?s.unregister(n):g(n,!1)}},[n,s,a,i]),se.useEffect(()=>{s._setDisabledField({disabled:r,name:n})},[r,n,s]),se.useMemo(()=>({field:h,formState:c,fieldState:l}),[h,c,l])}const gPe=t=>t.render(mPe(t));var AK=(t,e,n,r,s)=>e?{...n[t],types:{...n[t]&&n[t].types?n[t].types:{},[r]:s||!0}}:{},wi=t=>Array.isArray(t)?t:[t],TB=()=>{let t=[];return{get observers(){return t},next:s=>{for(const i of t)i.next&&i.next(s)},subscribe:s=>(t.push(s),{unsubscribe:()=>{t=t.filter(i=>i!==s)}}),unsubscribe:()=>{t=[]}}},rN=t=>Gs(t)||!bK(t);function Nu(t,e){if(rN(t)||rN(e))return t===e;if(Cf(t)&&Cf(e))return t.getTime()===e.getTime();const n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(const s of n){const i=t[s];if(!r.includes(s))return!1;if(s!=="ref"){const a=e[s];if(Cf(i)&&Cf(a)||br(i)&&br(a)||Array.isArray(i)&&Array.isArray(a)?!Nu(i,a):i!==a)return!1}}return!0}var Ps=t=>br(t)&&!Object.keys(t).length,KI=t=>t.type==="file",_a=t=>typeof t=="function",yC=t=>{if(!qI)return!1;const e=t?t.ownerDocument:0;return t instanceof(e&&e.defaultView?e.defaultView.HTMLElement:HTMLElement)},RK=t=>t.type==="select-multiple",YI=t=>t.type==="radio",vPe=t=>YI(t)||P0(t),LT=t=>yC(t)&&t.isConnected;function yPe(t,e){const n=e.slice(0,-1).length;let r=0;for(;r{for(const e in t)if(_a(t[e]))return!0;return!1};function bC(t,e={}){const n=Array.isArray(t);if(br(t)||n)for(const r in t)Array.isArray(t[r])||br(t[r])&&!PK(t[r])?(e[r]=Array.isArray(t[r])?[]:{},bC(t[r],e[r])):Gs(t[r])||(e[r]=!0);return e}function TK(t,e,n){const r=Array.isArray(t);if(br(t)||r)for(const s in t)Array.isArray(t[s])||br(t[s])&&!PK(t[s])?Bn(e)||rN(n[s])?n[s]=Array.isArray(t[s])?bC(t[s],[]):{...bC(t[s])}:TK(t[s],Gs(e)?{}:e[s],n[s]):n[s]=!Nu(t[s],e[s]);return n}var xy=(t,e)=>TK(t,e,bC(e));const kB={value:!1,isValid:!1},DB={value:!0,isValid:!0};var kK=t=>{if(Array.isArray(t)){if(t.length>1){const e=t.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:e,isValid:!!e.length}}return t[0].checked&&!t[0].disabled?t[0].attributes&&!Bn(t[0].attributes.value)?Bn(t[0].value)||t[0].value===""?DB:{value:t[0].value,isValid:!0}:DB:kB}return kB},DK=(t,{valueAsNumber:e,valueAsDate:n,setValueAs:r})=>Bn(t)?t:e?t===""?NaN:t&&+t:n&&gl(t)?new Date(t):r?r(t):t;const NB={isValid:!1,value:null};var NK=t=>Array.isArray(t)?t.reduce((e,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:e,NB):NB;function MB(t){const e=t.ref;return KI(e)?e.files:YI(e)?NK(t.refs).value:RK(e)?[...e.selectedOptions].map(({value:n})=>n):P0(e)?kK(t.refs).value:DK(Bn(e.value)?t.ref.value:e.value,t)}var wPe=(t,e,n,r)=>{const s={};for(const i of t){const a=Ie(e,i);a&&Jt(s,i,a._f)}return{criteriaMode:n,names:[...t],fields:s,shouldUseNativeValidation:r}},wC=t=>t instanceof RegExp,Sy=t=>Bn(t)?t:wC(t)?t.source:br(t)?wC(t.value)?t.value.source:t.value:t,Sm=t=>({isOnSubmit:!t||t===No.onSubmit,isOnBlur:t===No.onBlur,isOnChange:t===No.onChange,isOnAll:t===No.all,isOnTouch:t===No.onTouched});const OB="AsyncFunction";var _Pe=t=>!!t&&!!t.validate&&!!(_a(t.validate)&&t.validate.constructor.name===OB||br(t.validate)&&Object.values(t.validate).find(e=>e.constructor.name===OB)),xPe=t=>t.mount&&(t.required||t.min||t.max||t.maxLength||t.minLength||t.pattern||t.validate),sN=(t,e,n)=>!n&&(e.watchAll||e.watch.has(t)||[...e.watch].some(r=>t.startsWith(r)&&/^\.\w+/.test(t.slice(r.length))));const zm=(t,e,n,r)=>{for(const s of n||Object.keys(t)){const i=Ie(t,s);if(i){const{_f:a,...o}=i;if(a){if(a.refs&&a.refs[0]&&e(a.refs[0],s)&&!r)return!0;if(a.ref&&e(a.ref,a.name)&&!r)return!0;if(zm(o,e))break}else if(br(o)&&zm(o,e))break}}};function LB(t,e,n){const r=Ie(t,n);if(r||GI(n))return{error:r,name:n};const s=n.split(".");for(;s.length;){const i=s.join("."),a=Ie(e,i),o=Ie(t,i);if(a&&!Array.isArray(a)&&n!==i)return{name:n};if(o&&o.type)return{name:i,error:o};s.pop()}return{name:n}}var SPe=(t,e,n,r)=>{n(t);const{name:s,...i}=t;return Ps(i)||Object.keys(i).length>=Object.keys(e).length||Object.keys(i).find(a=>e[a]===(!r||No.all))},EPe=(t,e,n)=>!t||!e||t===e||wi(t).some(r=>r&&(n?r===e:r.startsWith(e)||e.startsWith(r))),CPe=(t,e,n,r,s)=>s.isOnAll?!1:!n&&s.isOnTouch?!(e||t):(n?r.isOnBlur:s.isOnBlur)?!t:(n?r.isOnChange:s.isOnChange)?t:!0,APe=(t,e)=>!T0(Ie(t,e)).length&&Sr(t,e),MK=(t,e,n)=>{const r=wi(Ie(t,n));return Jt(r,"root",e[n]),Jt(t,n,r),t},VS=t=>gl(t);function IB(t,e,n="validate"){if(VS(t)||Array.isArray(t)&&t.every(VS)||Zi(t)&&!t)return{type:n,message:VS(t)?t:"",ref:e}}var Gp=t=>br(t)&&!wC(t)?t:{value:t,message:""},iN=async(t,e,n,r,s,i)=>{const{ref:a,refs:o,required:c,maxLength:u,minLength:f,min:l,max:d,pattern:m,validate:p,name:h,valueAsNumber:y,mount:g}=t._f,v=Ie(n,h);if(!g||e.has(h))return{};const w=o?o[0]:a,x=L=>{s&&w.reportValidity&&(w.setCustomValidity(Zi(L)?"":L||""),w.reportValidity())},A={},k=YI(a),R=P0(a),E=k||R,T=(y||KI(a))&&Bn(a.value)&&Bn(v)||yC(a)&&a.value===""||v===""||Array.isArray(v)&&!v.length,D=AK.bind(null,h,r,A),M=(L,I,j,U=Vl.maxLength,Y=Vl.minLength)=>{const W=L?I:j;A[h]={type:L?U:Y,message:W,ref:a,...D(L?U:Y,W)}};if(i?!Array.isArray(v)||!v.length:c&&(!E&&(T||Gs(v))||Zi(v)&&!v||R&&!kK(o).isValid||k&&!NK(o).isValid)){const{value:L,message:I}=VS(c)?{value:!!c,message:c}:Gp(c);if(L&&(A[h]={type:Vl.required,message:I,ref:w,...D(Vl.required,I)},!r))return x(I),A}if(!T&&(!Gs(l)||!Gs(d))){let L,I;const j=Gp(d),U=Gp(l);if(!Gs(v)&&!isNaN(v)){const Y=a.valueAsNumber||v&&+v;Gs(j.value)||(L=Y>j.value),Gs(U.value)||(I=Ynew Date(new Date().toDateString()+" "+re),H=a.type=="time",ee=a.type=="week";gl(j.value)&&v&&(L=H?W(v)>W(j.value):ee?v>j.value:Y>new Date(j.value)),gl(U.value)&&v&&(I=H?W(v)+L.value,U=!Gs(I.value)&&v.length<+I.value;if((j||U)&&(M(j,L.message,I.message),!r))return x(A[h].message),A}if(m&&!T&&gl(v)){const{value:L,message:I}=Gp(m);if(wC(L)&&!v.match(L)&&(A[h]={type:Vl.pattern,message:I,ref:a,...D(Vl.pattern,I)},!r))return x(I),A}if(p){if(_a(p)){const L=await p(v,n),I=IB(L,w);if(I&&(A[h]={...I,...D(Vl.validate,I.message)},!r))return x(I.message),A}else if(br(p)){let L={};for(const I in p){if(!Ps(L)&&!r)break;const j=IB(await p[I](v,n),w,I);j&&(L={...j,...D(I,j.message)},x(j.message),r&&(A[h]=L))}if(!Ps(L)&&(A[h]={ref:w,...L},!r))return A}}return x(!0),A};const RPe={mode:No.onSubmit,reValidateMode:No.onChange,shouldFocusError:!0};function PPe(t={}){let e={...RPe,...t},n={submitCount:0,isDirty:!1,isLoading:_a(e.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1};const r={};let s=br(e.defaultValues)||br(e.values)?Zn(e.values||e.defaultValues)||{}:{},i=e.shouldUnregister?{}:Zn(s),a={action:!1,mount:!1,watch:!1},o={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},c,u=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1};let l={...f};const d={array:TB(),state:TB()},m=Sm(e.mode),p=Sm(e.reValidateMode),h=e.criteriaMode===No.all,y=Z=>fe=>{clearTimeout(u),u=setTimeout(Z,fe)},g=async Z=>{if(!e.disabled&&(f.isValid||l.isValid||Z)){const fe=e.resolver?Ps((await T()).errors):await M(r,!0);fe!==n.isValid&&d.state.next({isValid:fe})}},v=(Z,fe)=>{!e.disabled&&(f.isValidating||f.validatingFields||l.isValidating||l.validatingFields)&&((Z||Array.from(o.mount)).forEach(ge=>{ge&&(fe?Jt(n.validatingFields,ge,fe):Sr(n.validatingFields,ge))}),d.state.next({validatingFields:n.validatingFields,isValidating:!Ps(n.validatingFields)}))},w=(Z,fe=[],ge,Pe,Me=!0,xe=!0)=>{if(Pe&&ge&&!e.disabled){if(a.action=!0,xe&&Array.isArray(Ie(r,Z))){const Te=ge(Ie(r,Z),Pe.argA,Pe.argB);Me&&Jt(r,Z,Te)}if(xe&&Array.isArray(Ie(n.errors,Z))){const Te=ge(Ie(n.errors,Z),Pe.argA,Pe.argB);Me&&Jt(n.errors,Z,Te),APe(n.errors,Z)}if((f.touchedFields||l.touchedFields)&&xe&&Array.isArray(Ie(n.touchedFields,Z))){const Te=ge(Ie(n.touchedFields,Z),Pe.argA,Pe.argB);Me&&Jt(n.touchedFields,Z,Te)}(f.dirtyFields||l.dirtyFields)&&(n.dirtyFields=xy(s,i)),d.state.next({name:Z,isDirty:I(Z,fe),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else Jt(i,Z,fe)},x=(Z,fe)=>{Jt(n.errors,Z,fe),d.state.next({errors:n.errors})},A=Z=>{n.errors=Z,d.state.next({errors:n.errors,isValid:!1})},k=(Z,fe,ge,Pe)=>{const Me=Ie(r,Z);if(Me){const xe=Ie(i,Z,Bn(ge)?Ie(s,Z):ge);Bn(xe)||Pe&&Pe.defaultChecked||fe?Jt(i,Z,fe?xe:MB(Me._f)):Y(Z,xe),a.mount&&g()}},R=(Z,fe,ge,Pe,Me)=>{let xe=!1,Te=!1;const Ye={name:Z};if(!e.disabled){if(!ge||Pe){(f.isDirty||l.isDirty)&&(Te=n.isDirty,n.isDirty=Ye.isDirty=I(),xe=Te!==Ye.isDirty);const Pt=Nu(Ie(s,Z),fe);Te=!!Ie(n.dirtyFields,Z),Pt?Sr(n.dirtyFields,Z):Jt(n.dirtyFields,Z,!0),Ye.dirtyFields=n.dirtyFields,xe=xe||(f.dirtyFields||l.dirtyFields)&&Te!==!Pt}if(ge){const Pt=Ie(n.touchedFields,Z);Pt||(Jt(n.touchedFields,Z,ge),Ye.touchedFields=n.touchedFields,xe=xe||(f.touchedFields||l.touchedFields)&&Pt!==ge)}xe&&Me&&d.state.next(Ye)}return xe?Ye:{}},E=(Z,fe,ge,Pe)=>{const Me=Ie(n.errors,Z),xe=(f.isValid||l.isValid)&&Zi(fe)&&n.isValid!==fe;if(e.delayError&&ge?(c=y(()=>x(Z,ge)),c(e.delayError)):(clearTimeout(u),c=null,ge?Jt(n.errors,Z,ge):Sr(n.errors,Z)),(ge?!Nu(Me,ge):Me)||!Ps(Pe)||xe){const Te={...Pe,...xe&&Zi(fe)?{isValid:fe}:{},errors:n.errors,name:Z};n={...n,...Te},d.state.next(Te)}},T=async Z=>{v(Z,!0);const fe=await e.resolver(i,e.context,wPe(Z||o.mount,r,e.criteriaMode,e.shouldUseNativeValidation));return v(Z),fe},D=async Z=>{const{errors:fe}=await T(Z);if(Z)for(const ge of Z){const Pe=Ie(fe,ge);Pe?Jt(n.errors,ge,Pe):Sr(n.errors,ge)}else n.errors=fe;return fe},M=async(Z,fe,ge={valid:!0})=>{for(const Pe in Z){const Me=Z[Pe];if(Me){const{_f:xe,...Te}=Me;if(xe){const Ye=o.array.has(xe.name),Pt=Me._f&&_Pe(Me._f);Pt&&f.validatingFields&&v([Pe],!0);const wt=await iN(Me,o.disabled,i,h,e.shouldUseNativeValidation&&!fe,Ye);if(Pt&&f.validatingFields&&v([Pe]),wt[xe.name]&&(ge.valid=!1,fe))break;!fe&&(Ie(wt,xe.name)?Ye?MK(n.errors,wt,xe.name):Jt(n.errors,xe.name,wt[xe.name]):Sr(n.errors,xe.name))}!Ps(Te)&&await M(Te,fe,ge)}}return ge.valid},L=()=>{for(const Z of o.unMount){const fe=Ie(r,Z);fe&&(fe._f.refs?fe._f.refs.every(ge=>!LT(ge)):!LT(fe._f.ref))&&Ae(Z)}o.unMount=new Set},I=(Z,fe)=>!e.disabled&&(Z&&fe&&Jt(i,Z,fe),!Nu(G(),s)),j=(Z,fe,ge)=>CK(Z,o,{...a.mount?i:Bn(fe)?s:gl(Z)?{[Z]:fe}:fe},ge,fe),U=Z=>T0(Ie(a.mount?i:s,Z,e.shouldUnregister?Ie(s,Z,[]):[])),Y=(Z,fe,ge={})=>{const Pe=Ie(r,Z);let Me=fe;if(Pe){const xe=Pe._f;xe&&(!xe.disabled&&Jt(i,Z,DK(fe,xe)),Me=yC(xe.ref)&&Gs(fe)?"":fe,RK(xe.ref)?[...xe.ref.options].forEach(Te=>Te.selected=Me.includes(Te.value)):xe.refs?P0(xe.ref)?xe.refs.length>1?xe.refs.forEach(Te=>(!Te.defaultChecked||!Te.disabled)&&(Te.checked=Array.isArray(Me)?!!Me.find(Ye=>Ye===Te.value):Me===Te.value)):xe.refs[0]&&(xe.refs[0].checked=!!Me):xe.refs.forEach(Te=>Te.checked=Te.value===Me):KI(xe.ref)?xe.ref.value="":(xe.ref.value=Me,xe.ref.type||d.state.next({name:Z,values:Zn(i)})))}(ge.shouldDirty||ge.shouldTouch)&&R(Z,Me,ge.shouldTouch,ge.shouldDirty,!0),ge.shouldValidate&&X(Z)},W=(Z,fe,ge)=>{for(const Pe in fe){const Me=fe[Pe],xe=`${Z}.${Pe}`,Te=Ie(r,xe);(o.array.has(Z)||br(Me)||Te&&!Te._f)&&!Cf(Me)?W(xe,Me,ge):Y(xe,Me,ge)}},H=(Z,fe,ge={})=>{const Pe=Ie(r,Z),Me=o.array.has(Z),xe=Zn(fe);Jt(i,Z,xe),Me?(d.array.next({name:Z,values:Zn(i)}),(f.isDirty||f.dirtyFields||l.isDirty||l.dirtyFields)&&ge.shouldDirty&&d.state.next({name:Z,dirtyFields:xy(s,i),isDirty:I(Z,xe)})):Pe&&!Pe._f&&!Gs(xe)?W(Z,xe,ge):Y(Z,xe,ge),sN(Z,o)&&d.state.next({...n}),d.state.next({name:a.mount?Z:void 0,values:Zn(i)})},ee=async Z=>{a.mount=!0;const fe=Z.target;let ge=fe.name,Pe=!0;const Me=Ie(r,ge),xe=Te=>{Pe=Number.isNaN(Te)||Cf(Te)&&isNaN(Te.getTime())||Nu(Te,Ie(i,ge,Te))};if(Me){let Te,Ye;const Pt=fe.type?MB(Me._f):wK(Z),wt=Z.type===vC.BLUR||Z.type===vC.FOCUS_OUT,Ls=!xPe(Me._f)&&!e.resolver&&!Ie(n.errors,ge)&&!Me._f.deps||CPe(wt,Ie(n.touchedFields,ge),n.isSubmitted,p,m),Yn=sN(ge,o,wt);Jt(i,ge,Pt),wt?(Me._f.onBlur&&Me._f.onBlur(Z),c&&c(0)):Me._f.onChange&&Me._f.onChange(Z);const gs=R(ge,Pt,wt),Ht=!Ps(gs)||Yn;if(!wt&&d.state.next({name:ge,type:Z.type,values:Zn(i)}),Ls)return(f.isValid||l.isValid)&&(e.mode==="onBlur"?wt&&g():wt||g()),Ht&&d.state.next({name:ge,...Yn?{}:gs});if(!wt&&Yn&&d.state.next({...n}),e.resolver){const{errors:an}=await T([ge]);if(xe(Pt),Pe){const vn=LB(n.errors,r,ge),Be=LB(an,r,vn.name||ge);Te=Be.error,ge=Be.name,Ye=Ps(an)}}else v([ge],!0),Te=(await iN(Me,o.disabled,i,h,e.shouldUseNativeValidation))[ge],v([ge]),xe(Pt),Pe&&(Te?Ye=!1:(f.isValid||l.isValid)&&(Ye=await M(r,!0)));Pe&&(Me._f.deps&&X(Me._f.deps),E(ge,Ye,Te,gs))}},re=(Z,fe)=>{if(Ie(n.errors,fe)&&Z.focus)return Z.focus(),1},X=async(Z,fe={})=>{let ge,Pe;const Me=wi(Z);if(e.resolver){const xe=await D(Bn(Z)?Z:Me);ge=Ps(xe),Pe=Z?!Me.some(Te=>Ie(xe,Te)):ge}else Z?(Pe=(await Promise.all(Me.map(async xe=>{const Te=Ie(r,xe);return await M(Te&&Te._f?{[xe]:Te}:Te)}))).every(Boolean),!(!Pe&&!n.isValid)&&g()):Pe=ge=await M(r);return d.state.next({...!gl(Z)||(f.isValid||l.isValid)&&ge!==n.isValid?{}:{name:Z},...e.resolver||!Z?{isValid:ge}:{},errors:n.errors}),fe.shouldFocus&&!Pe&&zm(r,re,Z?Me:o.mount),Pe},G=Z=>{const fe={...a.mount?i:s};return Bn(Z)?fe:gl(Z)?Ie(fe,Z):Z.map(ge=>Ie(fe,ge))},K=(Z,fe)=>({invalid:!!Ie((fe||n).errors,Z),isDirty:!!Ie((fe||n).dirtyFields,Z),error:Ie((fe||n).errors,Z),isValidating:!!Ie(n.validatingFields,Z),isTouched:!!Ie((fe||n).touchedFields,Z)}),J=Z=>{Z&&wi(Z).forEach(fe=>Sr(n.errors,fe)),d.state.next({errors:Z?n.errors:{}})},ue=(Z,fe,ge)=>{const Pe=(Ie(r,Z,{_f:{}})._f||{}).ref,Me=Ie(n.errors,Z)||{},{ref:xe,message:Te,type:Ye,...Pt}=Me;Jt(n.errors,Z,{...Pt,...fe,ref:Pe}),d.state.next({name:Z,errors:n.errors,isValid:!1}),ge&&ge.shouldFocus&&Pe&&Pe.focus&&Pe.focus()},de=(Z,fe)=>_a(Z)?d.state.subscribe({next:ge=>Z(j(void 0,fe),ge)}):j(Z,fe,!0),ie=Z=>d.state.subscribe({next:fe=>{EPe(Z.name,fe.name,Z.exact)&&SPe(fe,Z.formState||f,Xt,Z.reRenderRoot)&&Z.callback({values:{...i},...n,...fe})}}).unsubscribe,be=Z=>(a.mount=!0,l={...l,...Z.formState},ie({...Z,formState:l})),Ae=(Z,fe={})=>{for(const ge of Z?wi(Z):o.mount)o.mount.delete(ge),o.array.delete(ge),fe.keepValue||(Sr(r,ge),Sr(i,ge)),!fe.keepError&&Sr(n.errors,ge),!fe.keepDirty&&Sr(n.dirtyFields,ge),!fe.keepTouched&&Sr(n.touchedFields,ge),!fe.keepIsValidating&&Sr(n.validatingFields,ge),!e.shouldUnregister&&!fe.keepDefaultValue&&Sr(s,ge);d.state.next({values:Zn(i)}),d.state.next({...n,...fe.keepDirty?{isDirty:I()}:{}}),!fe.keepIsValid&&g()},_e=({disabled:Z,name:fe})=>{(Zi(Z)&&a.mount||Z||o.disabled.has(fe))&&(Z?o.disabled.add(fe):o.disabled.delete(fe))},Oe=(Z,fe={})=>{let ge=Ie(r,Z);const Pe=Zi(fe.disabled)||Zi(e.disabled);return Jt(r,Z,{...ge||{},_f:{...ge&&ge._f?ge._f:{ref:{name:Z}},name:Z,mount:!0,...fe}}),o.mount.add(Z),ge?_e({disabled:Zi(fe.disabled)?fe.disabled:e.disabled,name:Z}):k(Z,!0,fe.value),{...Pe?{disabled:fe.disabled||e.disabled}:{},...e.progressive?{required:!!fe.required,min:Sy(fe.min),max:Sy(fe.max),minLength:Sy(fe.minLength),maxLength:Sy(fe.maxLength),pattern:Sy(fe.pattern)}:{},name:Z,onChange:ee,onBlur:ee,ref:Me=>{if(Me){Oe(Z,fe),ge=Ie(r,Z);const xe=Bn(Me.value)&&Me.querySelectorAll&&Me.querySelectorAll("input,select,textarea")[0]||Me,Te=vPe(xe),Ye=ge._f.refs||[];if(Te?Ye.find(Pt=>Pt===xe):xe===ge._f.ref)return;Jt(r,Z,{_f:{...ge._f,...Te?{refs:[...Ye.filter(LT),xe,...Array.isArray(Ie(s,Z))?[{}]:[]],ref:{type:xe.type,name:Z}}:{ref:xe}}}),k(Z,!1,void 0,xe)}else ge=Ie(r,Z,{}),ge._f&&(ge._f.mount=!1),(e.shouldUnregister||fe.shouldUnregister)&&!(_K(o.array,Z)&&a.action)&&o.unMount.add(Z)}}},Ne=()=>e.shouldFocusError&&zm(r,re,o.mount),ye=Z=>{Zi(Z)&&(d.state.next({disabled:Z}),zm(r,(fe,ge)=>{const Pe=Ie(r,ge);Pe&&(fe.disabled=Pe._f.disabled||Z,Array.isArray(Pe._f.refs)&&Pe._f.refs.forEach(Me=>{Me.disabled=Pe._f.disabled||Z}))},0,!1))},$e=(Z,fe)=>async ge=>{let Pe;ge&&(ge.preventDefault&&ge.preventDefault(),ge.persist&&ge.persist());let Me=Zn(i);if(d.state.next({isSubmitting:!0}),e.resolver){const{errors:xe,values:Te}=await T();n.errors=xe,Me=Te}else await M(r);if(o.disabled.size)for(const xe of o.disabled)Jt(Me,xe,void 0);if(Sr(n.errors,"root"),Ps(n.errors)){d.state.next({errors:{}});try{await Z(Me,ge)}catch(xe){Pe=xe}}else fe&&await fe({...n.errors},ge),Ne(),setTimeout(Ne);if(d.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Ps(n.errors)&&!Pe,submitCount:n.submitCount+1,errors:n.errors}),Pe)throw Pe},ut=(Z,fe={})=>{Ie(r,Z)&&(Bn(fe.defaultValue)?H(Z,Zn(Ie(s,Z))):(H(Z,fe.defaultValue),Jt(s,Z,Zn(fe.defaultValue))),fe.keepTouched||Sr(n.touchedFields,Z),fe.keepDirty||(Sr(n.dirtyFields,Z),n.isDirty=fe.defaultValue?I(Z,Zn(Ie(s,Z))):I()),fe.keepError||(Sr(n.errors,Z),f.isValid&&g()),d.state.next({...n}))},Qe=(Z,fe={})=>{const ge=Z?Zn(Z):s,Pe=Zn(ge),Me=Ps(Z),xe=Me?s:Pe;if(fe.keepDefaultValues||(s=ge),!fe.keepValues){if(fe.keepDirtyValues){const Te=new Set([...o.mount,...Object.keys(xy(s,i))]);for(const Ye of Array.from(Te))Ie(n.dirtyFields,Ye)?Jt(xe,Ye,Ie(i,Ye)):H(Ye,Ie(xe,Ye))}else{if(qI&&Bn(Z))for(const Te of o.mount){const Ye=Ie(r,Te);if(Ye&&Ye._f){const Pt=Array.isArray(Ye._f.refs)?Ye._f.refs[0]:Ye._f.ref;if(yC(Pt)){const wt=Pt.closest("form");if(wt){wt.reset();break}}}}for(const Te of o.mount)H(Te,Ie(xe,Te))}i=Zn(xe),d.array.next({values:{...xe}}),d.state.next({values:{...xe}})}o={mount:fe.keepDirtyValues?o.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!f.isValid||!!fe.keepIsValid||!!fe.keepDirtyValues,a.watch=!!e.shouldUnregister,d.state.next({submitCount:fe.keepSubmitCount?n.submitCount:0,isDirty:Me?!1:fe.keepDirty?n.isDirty:!!(fe.keepDefaultValues&&!Nu(Z,s)),isSubmitted:fe.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:Me?{}:fe.keepDirtyValues?fe.keepDefaultValues&&i?xy(s,i):n.dirtyFields:fe.keepDefaultValues&&Z?xy(s,Z):fe.keepDirty?n.dirtyFields:{},touchedFields:fe.keepTouched?n.touchedFields:{},errors:fe.keepErrors?n.errors:{},isSubmitSuccessful:fe.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},yt=(Z,fe)=>Qe(_a(Z)?Z(i):Z,fe),En=(Z,fe={})=>{const ge=Ie(r,Z),Pe=ge&&ge._f;if(Pe){const Me=Pe.refs?Pe.refs[0]:Pe.ref;Me.focus&&(Me.focus(),fe.shouldSelect&&_a(Me.select)&&Me.select())}},Xt=Z=>{n={...n,...Z}},Qt={control:{register:Oe,unregister:Ae,getFieldState:K,handleSubmit:$e,setError:ue,_subscribe:ie,_runSchema:T,_getWatch:j,_getDirty:I,_setValid:g,_setFieldArray:w,_setDisabledField:_e,_setErrors:A,_getFieldArray:U,_reset:Qe,_resetDefaultValues:()=>_a(e.defaultValues)&&e.defaultValues().then(Z=>{yt(Z,e.resetOptions),d.state.next({isLoading:!1})}),_removeUnmounted:L,_disableForm:ye,_subjects:d,_proxyFormState:f,get _fields(){return r},get _formValues(){return i},get _state(){return a},set _state(Z){a=Z},get _defaultValues(){return s},get _names(){return o},set _names(Z){o=Z},get _formState(){return n},get _options(){return e},set _options(Z){e={...e,...Z}}},subscribe:be,trigger:X,register:Oe,handleSubmit:$e,watch:de,setValue:H,getValues:G,reset:yt,resetField:ut,clearErrors:J,unregister:Ae,setError:ue,setFocus:En,getFieldState:K};return{...Qt,formControl:Qt}}var vu=()=>{const t=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const n=(Math.random()*16+t)%16|0;return(e=="x"?n:n&3|8).toString(16)})},IT=(t,e,n={})=>n.shouldFocus||Bn(n.shouldFocus)?n.focusName||`${t}.${Bn(n.focusIndex)?e:n.focusIndex}.`:"",$T=(t,e)=>[...t,...wi(e)],jT=t=>Array.isArray(t)?t.map(()=>{}):void 0;function FT(t,e,n){return[...t.slice(0,e),...wi(n),...t.slice(e)]}var zT=(t,e,n)=>Array.isArray(t)?(Bn(t[n])&&(t[n]=void 0),t.splice(n,0,t.splice(e,1)[0]),t):[],BT=(t,e)=>[...wi(e),...wi(t)];function TPe(t,e){let n=0;const r=[...t];for(const s of e)r.splice(s-n,1),n++;return T0(r).length?r:[]}var UT=(t,e)=>Bn(e)?[]:TPe(t,wi(e).sort((n,r)=>n-r)),HT=(t,e,n)=>{[t[e],t[n]]=[t[n],t[e]]},$B=(t,e,n)=>(t[e]=n,t);function GHe(t){const e=Fd(),{control:n=e.control,name:r,keyName:s="id",shouldUnregister:i,rules:a}=t,[o,c]=se.useState(n._getFieldArray(r)),u=se.useRef(n._getFieldArray(r).map(vu)),f=se.useRef(o),l=se.useRef(r),d=se.useRef(!1);l.current=r,f.current=o,n._names.array.add(r),a&&n.register(r,a),se.useEffect(()=>n._subjects.array.subscribe({next:({values:k,name:R})=>{if(R===l.current||!R){const E=Ie(k,l.current);Array.isArray(E)&&(c(E),u.current=E.map(vu))}}}).unsubscribe,[n]);const m=se.useCallback(k=>{d.current=!0,n._setFieldArray(r,k)},[n,r]),p=(k,R)=>{const E=wi(Zn(k)),T=$T(n._getFieldArray(r),E);n._names.focus=IT(r,T.length-1,R),u.current=$T(u.current,E.map(vu)),m(T),c(T),n._setFieldArray(r,T,$T,{argA:jT(k)})},h=(k,R)=>{const E=wi(Zn(k)),T=BT(n._getFieldArray(r),E);n._names.focus=IT(r,0,R),u.current=BT(u.current,E.map(vu)),m(T),c(T),n._setFieldArray(r,T,BT,{argA:jT(k)})},y=k=>{const R=UT(n._getFieldArray(r),k);u.current=UT(u.current,k),m(R),c(R),!Array.isArray(Ie(n._fields,r))&&Jt(n._fields,r,void 0),n._setFieldArray(r,R,UT,{argA:k})},g=(k,R,E)=>{const T=wi(Zn(R)),D=FT(n._getFieldArray(r),k,T);n._names.focus=IT(r,k,E),u.current=FT(u.current,k,T.map(vu)),m(D),c(D),n._setFieldArray(r,D,FT,{argA:k,argB:jT(R)})},v=(k,R)=>{const E=n._getFieldArray(r);HT(E,k,R),HT(u.current,k,R),m(E),c(E),n._setFieldArray(r,E,HT,{argA:k,argB:R},!1)},w=(k,R)=>{const E=n._getFieldArray(r);zT(E,k,R),zT(u.current,k,R),m(E),c(E),n._setFieldArray(r,E,zT,{argA:k,argB:R},!1)},x=(k,R)=>{const E=Zn(R),T=$B(n._getFieldArray(r),k,E);u.current=[...T].map((D,M)=>!D||M===k?vu():u.current[M]),m(T),c([...T]),n._setFieldArray(r,T,$B,{argA:k,argB:E},!0,!1)},A=k=>{const R=wi(Zn(k));u.current=R.map(vu),m([...R]),c([...R]),n._setFieldArray(r,[...R],E=>E,{},!0,!1)};return se.useEffect(()=>{if(n._state.action=!1,sN(r,n._names)&&n._subjects.state.next({...n._formState}),d.current&&(!Sm(n._options.mode).isOnSubmit||n._formState.isSubmitted)&&!Sm(n._options.reValidateMode).isOnSubmit)if(n._options.resolver)n._runSchema([r]).then(k=>{const R=Ie(k.errors,r),E=Ie(n._formState.errors,r);(E?!R&&E.type||R&&(E.type!==R.type||E.message!==R.message):R&&R.type)&&(R?Jt(n._formState.errors,r,R):Sr(n._formState.errors,r),n._subjects.state.next({errors:n._formState.errors}))});else{const k=Ie(n._fields,r);k&&k._f&&!(Sm(n._options.reValidateMode).isOnSubmit&&Sm(n._options.mode).isOnSubmit)&&iN(k,n._names.disabled,n._formValues,n._options.criteriaMode===No.all,n._options.shouldUseNativeValidation,!0).then(R=>!Ps(R)&&n._subjects.state.next({errors:MK(n._formState.errors,R,r)}))}n._subjects.state.next({name:r,values:Zn(n._formValues)}),n._names.focus&&zm(n._fields,(k,R)=>{if(n._names.focus&&R.startsWith(n._names.focus)&&k.focus)return k.focus(),1}),n._names.focus="",n._setValid(),d.current=!1},[o,r,n]),se.useEffect(()=>(!Ie(n._formValues,r)&&n._setFieldArray(r),()=>{const k=(R,E)=>{const T=Ie(n._fields,R);T&&T._f&&(T._f.mount=E)};n._options.shouldUnregister||i?n.unregister(r):k(r,!1)}),[r,n,s,i]),{swap:se.useCallback(v,[m,r,n]),move:se.useCallback(w,[m,r,n]),prepend:se.useCallback(h,[m,r,n]),append:se.useCallback(p,[m,r,n]),remove:se.useCallback(y,[m,r,n]),insert:se.useCallback(g,[m,r,n]),update:se.useCallback(x,[m,r,n]),replace:se.useCallback(A,[m,r,n]),fields:se.useMemo(()=>o.map((k,R)=>({...k,[s]:u.current[R]||vu()})),[o,s])}}function kPe(t={}){const e=se.useRef(void 0),n=se.useRef(void 0),[r,s]=se.useState({isDirty:!1,isValidating:!1,isLoading:_a(t.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1,defaultValues:_a(t.defaultValues)?void 0:t.defaultValues});e.current||(e.current={...t.formControl?t.formControl:PPe(t),formState:r},t.formControl&&t.defaultValues&&!_a(t.defaultValues)&&t.formControl.reset(t.defaultValues,t.resetOptions));const i=e.current.control;return i._options=t,se.useLayoutEffect(()=>i._subscribe({formState:i._proxyFormState,callback:()=>s({...i._formState}),reRenderRoot:!0}),[i]),se.useEffect(()=>i._disableForm(t.disabled),[i,t.disabled]),se.useEffect(()=>{if(i._proxyFormState.isDirty){const a=i._getDirty();a!==r.isDirty&&i._subjects.state.next({isDirty:a})}},[i,r.isDirty]),se.useEffect(()=>{t.values&&!Nu(t.values,n.current)?(i._reset(t.values,i._options.resetOptions),n.current=t.values,s(a=>({...a}))):i._resetDefaultValues()},[t.values,i]),se.useEffect(()=>{t.errors&&!Ps(t.errors)&&i._setErrors(t.errors)},[t.errors,i]),se.useEffect(()=>{i._state.mount||(i._setValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),se.useEffect(()=>{t.shouldUnregister&&i._subjects.state.next({values:i._getWatch()})},[t.shouldUnregister,i]),e.current.formState=EK(r,i),e.current}var DPe="Label",OK=_.forwardRef((t,e)=>P.jsx(De.label,{...t,ref:e,onMouseDown:n=>{var s;n.target.closest("button, input, select, textarea")||((s=t.onMouseDown)==null||s.call(t,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));OK.displayName=DPe;var LK=OK;const NPe=Ho("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),IK=_.forwardRef(({className:t,...e},n)=>P.jsx(LK,{ref:n,className:ce(NPe(),t),...e}));IK.displayName=LK.displayName;const MPe=fPe,$K=_.createContext({}),XI=({...t})=>P.jsx($K.Provider,{value:{name:t.name},children:P.jsx(gPe,{...t},t.name)}),Nv=()=>{const t=_.useContext($K),e=_.useContext(jK),{getFieldState:n,formState:r}=Fd(),s=n(t.name,r);if(!t)throw new Error("useFormField should be used within ");const{id:i}=e;return{id:i,name:t.name,formItemId:`${i}-form-item`,formDescriptionId:`${i}-form-item-description`,formMessageId:`${i}-form-item-message`,...s}},jK=_.createContext({}),vA=_.forwardRef(({className:t,...e},n)=>{const r=_.useId();return P.jsx(jK.Provider,{value:{id:r},children:P.jsx("div",{ref:n,className:ce("space-y-2",t),...e})})});vA.displayName="FormItem";const FK=_.forwardRef(({className:t,...e},n)=>{const{error:r,formItemId:s}=Nv();return P.jsx(IK,{ref:n,className:ce(r&&"text-destructive",t),htmlFor:s,...e})});FK.displayName="FormLabel";const yA=_.forwardRef(({...t},e)=>{const{error:n,formItemId:r,formDescriptionId:s,formMessageId:i}=Nv();return P.jsx(Ra,{ref:e,id:r,"aria-describedby":n?`${s} ${i}`:`${s}`,"aria-invalid":!!n,...t})});yA.displayName="FormControl";const bA=_.forwardRef(({className:t,...e},n)=>{const{formDescriptionId:r}=Nv();return P.jsx("p",{ref:n,id:r,className:ce("text-[0.8rem] text-muted-foreground",t),...e})});bA.displayName="FormDescription";const zK=_.forwardRef(({className:t,children:e,...n},r)=>{const{error:s,formMessageId:i}=Nv(),a=s?String((s==null?void 0:s.message)??""):e;return a?P.jsx("p",{ref:r,id:i,className:ce("text-[0.8rem] font-medium text-destructive",t),...n,children:a}):null});zK.displayName="FormMessage";var WT,BK="HoverCard",[UK,KHe]=Tn(BK,[Rl]),QI=Rl(),[YHe,JI]=UK(BK),HK="HoverCardTrigger",OPe=_.forwardRef((t,e)=>{const{__scopeHoverCard:n,...r}=t,s=JI(HK,n),i=QI(n);return P.jsx(Dv,{asChild:!0,...i,children:P.jsx(De.a,{"data-state":s.open?"open":"closed",...r,ref:e,onPointerEnter:me(t.onPointerEnter,xC(s.onOpen)),onPointerLeave:me(t.onPointerLeave,xC(s.onClose)),onFocus:me(t.onFocus,s.onOpen),onBlur:me(t.onBlur,s.onClose),onTouchStart:me(t.onTouchStart,a=>a.preventDefault())})})});OPe.displayName=HK;var LPe="HoverCardPortal",[XHe,IPe]=UK(LPe,{forceMount:void 0}),_C="HoverCardContent",WK=_.forwardRef((t,e)=>{const n=IPe(_C,t.__scopeHoverCard),{forceMount:r=n.forceMount,...s}=t,i=JI(_C,t.__scopeHoverCard);return P.jsx(Hn,{present:r||i.open,children:P.jsx($Pe,{"data-state":i.open?"open":"closed",...s,onPointerEnter:me(t.onPointerEnter,xC(i.onOpen)),onPointerLeave:me(t.onPointerLeave,xC(i.onClose)),ref:e})})});WK.displayName=_C;var $Pe=_.forwardRef((t,e)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:i,onInteractOutside:a,...o}=t,c=JI(_C,n),u=QI(n),f=_.useRef(null),l=tt(e,f),[d,m]=_.useState(!1);return _.useEffect(()=>{if(d){const p=document.body;return WT=p.style.userSelect||p.style.webkitUserSelect,p.style.userSelect="none",p.style.webkitUserSelect="none",()=>{p.style.userSelect=WT,p.style.webkitUserSelect=WT}}},[d]),_.useEffect(()=>{if(f.current){const p=()=>{m(!1),c.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var y;((y=document.getSelection())==null?void 0:y.toString())!==""&&(c.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",p),()=>{document.removeEventListener("pointerup",p),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!1}}},[c.isPointerDownOnContentRef,c.hasSelectionRef]),_.useEffect(()=>{f.current&&zPe(f.current).forEach(h=>h.setAttribute("tabindex","-1"))}),P.jsx(Jc,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:a,onEscapeKeyDown:r,onPointerDownOutside:s,onFocusOutside:me(i,p=>{p.preventDefault()}),onDismiss:c.onDismiss,children:P.jsx(w0,{...u,...o,onPointerDown:me(o.onPointerDown,p=>{p.currentTarget.contains(p.target)&&m(!0),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!0}),ref:l,style:{...o.style,userSelect:d?"text":void 0,WebkitUserSelect:d?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),jPe="HoverCardArrow",FPe=_.forwardRef((t,e)=>{const{__scopeHoverCard:n,...r}=t,s=QI(n);return P.jsx(_0,{...s,...r,ref:e})});FPe.displayName=jPe;function xC(t){return e=>e.pointerType==="touch"?void 0:t()}function zPe(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)e.push(n.currentNode);return e}var VK=WK;const BPe=_.forwardRef(({className:t,align:e="center",sideOffset:n=4,...r},s)=>P.jsx(VK,{ref:s,align:e,sideOffset:n,className:ce("z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...r}));BPe.displayName=VK.displayName;const UPe=_.forwardRef(({className:t,type:e,...n},r)=>P.jsx("input",{type:e,className:ce("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium 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",t),ref:r,...n}));UPe.displayName="Input";var wA="Menubar",[oN,HPe,WPe]=Xc(wA),[qK,QHe]=Tn(wA,[WPe,Pl]),Di=C0(),GK=Pl(),[VPe,KK]=qK(wA),YK=_.forwardRef((t,e)=>{const{__scopeMenubar:n,value:r,onValueChange:s,defaultValue:i,loop:a=!0,dir:o,...c}=t,u=Ma(o),f=GK(n),[l="",d]=sr({prop:r,onChange:s,defaultProp:i}),[m,p]=_.useState(null);return P.jsx(VPe,{scope:n,value:l,onMenuOpen:_.useCallback(h=>{d(h),p(h)},[d]),onMenuClose:_.useCallback(()=>d(""),[d]),onMenuToggle:_.useCallback(h=>{d(y=>y?"":h),p(h)},[d]),dir:u,loop:a,children:P.jsx(oN.Provider,{scope:n,children:P.jsx(oN.Slot,{scope:n,children:P.jsx(x0,{asChild:!0,...f,orientation:"horizontal",loop:a,dir:u,currentTabStopId:m,onCurrentTabStopIdChange:p,children:P.jsx(De.div,{role:"menubar",...c,ref:e})})})})})});YK.displayName=wA;var qPe="MenubarMenu",[JHe,XK]=qK(qPe),aN="MenubarTrigger",QK=_.forwardRef((t,e)=>{const{__scopeMenubar:n,disabled:r=!1,...s}=t,i=GK(n),a=Di(n),o=KK(aN,n),c=XK(aN,n),u=_.useRef(null),f=tt(e,u,c.triggerRef),[l,d]=_.useState(!1),m=o.value===c.value;return P.jsx(oN.ItemSlot,{scope:n,value:c.value,disabled:r,children:P.jsx(S0,{asChild:!0,...i,focusable:!r,tabStopId:c.value,children:P.jsx(CI,{asChild:!0,...a,children:P.jsx(De.button,{type:"button",role:"menuitem",id:c.triggerId,"aria-haspopup":"menu","aria-expanded":m,"aria-controls":m?c.contentId:void 0,"data-highlighted":l?"":void 0,"data-state":m?"open":"closed","data-disabled":r?"":void 0,disabled:r,...s,ref:f,onPointerDown:me(t.onPointerDown,p=>{!r&&p.button===0&&p.ctrlKey===!1&&(o.onMenuOpen(c.value),m||p.preventDefault())}),onPointerEnter:me(t.onPointerEnter,()=>{var h;!!o.value&&!m&&(o.onMenuOpen(c.value),(h=u.current)==null||h.focus())}),onKeyDown:me(t.onKeyDown,p=>{r||(["Enter"," "].includes(p.key)&&o.onMenuToggle(c.value),p.key==="ArrowDown"&&o.onMenuOpen(c.value),["Enter"," ","ArrowDown"].includes(p.key)&&(c.wasKeyboardTriggerOpenRef.current=!0,p.preventDefault()))}),onFocus:me(t.onFocus,()=>d(!0)),onBlur:me(t.onBlur,()=>d(!1))})})})})});QK.displayName=aN;var GPe="MenubarPortal",JK=t=>{const{__scopeMenubar:e,...n}=t,r=Di(e);return P.jsx(AI,{...r,...n})};JK.displayName=GPe;var lN="MenubarContent",ZK=_.forwardRef((t,e)=>{const{__scopeMenubar:n,align:r="start",...s}=t,i=Di(n),a=KK(lN,n),o=XK(lN,n),c=HPe(n),u=_.useRef(!1);return P.jsx(RI,{id:o.contentId,"aria-labelledby":o.triggerId,"data-radix-menubar-content":"",...i,...s,ref:e,align:r,onCloseAutoFocus:me(t.onCloseAutoFocus,f=>{var d;!!!a.value&&!u.current&&((d=o.triggerRef.current)==null||d.focus()),u.current=!1,f.preventDefault()}),onFocusOutside:me(t.onFocusOutside,f=>{const l=f.target;c().some(m=>{var p;return(p=m.ref.current)==null?void 0:p.contains(l)})&&f.preventDefault()}),onInteractOutside:me(t.onInteractOutside,()=>{u.current=!0}),onEntryFocus:f=>{o.wasKeyboardTriggerOpenRef.current||f.preventDefault()},onKeyDown:me(t.onKeyDown,f=>{if(["ArrowRight","ArrowLeft"].includes(f.key)){const l=f.target,d=l.hasAttribute("data-radix-menubar-subtrigger"),m=l.closest("[data-radix-menubar-content]")!==f.currentTarget,h=(a.dir==="rtl"?"ArrowRight":"ArrowLeft")===f.key;if(!h&&d||m&&h)return;let v=c().filter(A=>!A.disabled).map(A=>A.value);h&&v.reverse();const w=v.indexOf(o.value);v=a.loop?lTe(v,w+1):v.slice(w+1);const[x]=v;x&&a.onMenuOpen(x)}},{checkForDefaultPrevented:!1}),style:{...t.style,"--radix-menubar-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-menubar-content-available-width":"var(--radix-popper-available-width)","--radix-menubar-content-available-height":"var(--radix-popper-available-height)","--radix-menubar-trigger-width":"var(--radix-popper-anchor-width)","--radix-menubar-trigger-height":"var(--radix-popper-anchor-height)"}})});ZK.displayName=lN;var KPe="MenubarGroup",YPe=_.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,s=Di(n);return P.jsx(PI,{...s,...r,ref:e})});YPe.displayName=KPe;var XPe="MenubarLabel",e7=_.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,s=Di(n);return P.jsx(TI,{...s,...r,ref:e})});e7.displayName=XPe;var QPe="MenubarItem",t7=_.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,s=Di(n);return P.jsx(kI,{...s,...r,ref:e})});t7.displayName=QPe;var JPe="MenubarCheckboxItem",n7=_.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,s=Di(n);return P.jsx(DI,{...s,...r,ref:e})});n7.displayName=JPe;var ZPe="MenubarRadioGroup",eTe=_.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,s=Di(n);return P.jsx(NI,{...s,...r,ref:e})});eTe.displayName=ZPe;var tTe="MenubarRadioItem",r7=_.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,s=Di(n);return P.jsx(MI,{...s,...r,ref:e})});r7.displayName=tTe;var nTe="MenubarItemIndicator",s7=_.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,s=Di(n);return P.jsx(OI,{...s,...r,ref:e})});s7.displayName=nTe;var rTe="MenubarSeparator",i7=_.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,s=Di(n);return P.jsx(LI,{...s,...r,ref:e})});i7.displayName=rTe;var sTe="MenubarArrow",iTe=_.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,s=Di(n);return P.jsx(II,{...s,...r,ref:e})});iTe.displayName=sTe;var oTe="MenubarSubTrigger",o7=_.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,s=Di(n);return P.jsx($I,{"data-radix-menubar-subtrigger":"",...s,...r,ref:e})});o7.displayName=oTe;var aTe="MenubarSubContent",a7=_.forwardRef((t,e)=>{const{__scopeMenubar:n,...r}=t,s=Di(n);return P.jsx(jI,{...s,"data-radix-menubar-content":"",...r,ref:e,style:{...t.style,"--radix-menubar-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-menubar-content-available-width":"var(--radix-popper-available-width)","--radix-menubar-content-available-height":"var(--radix-popper-available-height)","--radix-menubar-trigger-width":"var(--radix-popper-anchor-width)","--radix-menubar-trigger-height":"var(--radix-popper-anchor-height)"}})});a7.displayName=aTe;function lTe(t,e){return t.map((n,r)=>t[(e+r)%t.length])}var l7=YK,c7=QK,cTe=JK,u7=ZK,d7=e7,f7=t7,h7=n7,p7=r7,m7=s7,g7=i7,v7=o7,y7=a7;const uTe=_.forwardRef(({className:t,...e},n)=>P.jsx(l7,{ref:n,className:ce("flex h-10 items-center space-x-1 rounded-md border bg-background p-1",t),...e}));uTe.displayName=l7.displayName;const dTe=_.forwardRef(({className:t,...e},n)=>P.jsx(c7,{ref:n,className:ce("flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",t),...e}));dTe.displayName=c7.displayName;const fTe=_.forwardRef(({className:t,inset:e,children:n,...r},s)=>P.jsxs(v7,{ref:s,className:ce("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",e&&"pl-8",t),...r,children:[n,P.jsx(s0,{className:"ml-auto h-4 w-4"})]}));fTe.displayName=v7.displayName;const hTe=_.forwardRef(({className:t,...e},n)=>P.jsx(y7,{ref:n,className:ce("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...e}));hTe.displayName=y7.displayName;const pTe=_.forwardRef(({className:t,align:e="start",alignOffset:n=-4,sideOffset:r=8,...s},i)=>P.jsx(cTe,{children:P.jsx(u7,{ref:i,align:e,alignOffset:n,sideOffset:r,className:ce("z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...s})}));pTe.displayName=u7.displayName;const mTe=_.forwardRef(({className:t,inset:e,...n},r)=>P.jsx(f7,{ref:r,className:ce("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e&&"pl-8",t),...n}));mTe.displayName=f7.displayName;const gTe=_.forwardRef(({className:t,children:e,checked:n,...r},s)=>P.jsxs(h7,{ref:s,className:ce("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),checked:n,...r,children:[P.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:P.jsx(m7,{children:P.jsx(r0,{className:"h-4 w-4"})})}),e]}));gTe.displayName=h7.displayName;const vTe=_.forwardRef(({className:t,children:e,...n},r)=>P.jsxs(p7,{ref:r,className:ce("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...n,children:[P.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:P.jsx(m7,{children:P.jsx(j1,{className:"h-2 w-2 fill-current"})})}),e]}));vTe.displayName=p7.displayName;const yTe=_.forwardRef(({className:t,inset:e,...n},r)=>P.jsx(d7,{ref:r,className:ce("px-2 py-1.5 text-sm font-semibold",e&&"pl-8",t),...n}));yTe.displayName=d7.displayName;const bTe=_.forwardRef(({className:t,...e},n)=>P.jsx(g7,{ref:n,className:ce("-mx-1 my-1 h-px bg-muted",t),...e}));bTe.displayName=g7.displayName;var wTe="VisuallyHidden",k0=_.forwardRef((t,e)=>P.jsx(De.span,{...t,ref:e,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",...t.style}}));k0.displayName=wTe;var b7=k0,Mv="NavigationMenu",[ZI,w7,_Te]=Xc(Mv),[cN,xTe,STe]=Xc(Mv),[e$,ZHe]=Tn(Mv,[_Te,STe]),[ETe,Vo]=e$(Mv),[CTe,ATe]=e$(Mv),_7=_.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,value:r,onValueChange:s,defaultValue:i,delayDuration:a=200,skipDelayDuration:o=300,orientation:c="horizontal",dir:u,...f}=t,[l,d]=_.useState(null),m=tt(e,T=>d(T)),p=Ma(u),h=_.useRef(0),y=_.useRef(0),g=_.useRef(0),[v,w]=_.useState(!0),[x="",A]=sr({prop:r,onChange:T=>{const D=T!=="",M=o>0;D?(window.clearTimeout(g.current),M&&w(!1)):(window.clearTimeout(g.current),g.current=window.setTimeout(()=>w(!0),o)),s==null||s(T)},defaultProp:i}),k=_.useCallback(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>A(""),150)},[A]),R=_.useCallback(T=>{window.clearTimeout(y.current),A(T)},[A]),E=_.useCallback(T=>{x===T?window.clearTimeout(y.current):h.current=window.setTimeout(()=>{window.clearTimeout(y.current),A(T)},a)},[x,A,a]);return _.useEffect(()=>()=>{window.clearTimeout(h.current),window.clearTimeout(y.current),window.clearTimeout(g.current)},[]),P.jsx(S7,{scope:n,isRootMenu:!0,value:x,dir:p,orientation:c,rootNavigationMenu:l,onTriggerEnter:T=>{window.clearTimeout(h.current),v?E(T):R(T)},onTriggerLeave:()=>{window.clearTimeout(h.current),k()},onContentEnter:()=>window.clearTimeout(y.current),onContentLeave:k,onItemSelect:T=>{A(D=>D===T?"":T)},onItemDismiss:()=>A(""),children:P.jsx(De.nav,{"aria-label":"Main","data-orientation":c,dir:p,...f,ref:m})})});_7.displayName=Mv;var x7="NavigationMenuSub",RTe=_.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,value:r,onValueChange:s,defaultValue:i,orientation:a="horizontal",...o}=t,c=Vo(x7,n),[u="",f]=sr({prop:r,onChange:s,defaultProp:i});return P.jsx(S7,{scope:n,isRootMenu:!1,value:u,dir:c.dir,orientation:a,rootNavigationMenu:c.rootNavigationMenu,onTriggerEnter:l=>f(l),onItemSelect:l=>f(l),onItemDismiss:()=>f(""),children:P.jsx(De.div,{"data-orientation":a,...o,ref:e})})});RTe.displayName=x7;var S7=t=>{const{scope:e,isRootMenu:n,rootNavigationMenu:r,dir:s,orientation:i,children:a,value:o,onItemSelect:c,onItemDismiss:u,onTriggerEnter:f,onTriggerLeave:l,onContentEnter:d,onContentLeave:m}=t,[p,h]=_.useState(null),[y,g]=_.useState(new Map),[v,w]=_.useState(null);return P.jsx(ETe,{scope:e,isRootMenu:n,rootNavigationMenu:r,value:o,previousValue:Pv(o),baseId:Vr(),dir:s,orientation:i,viewport:p,onViewportChange:h,indicatorTrack:v,onIndicatorTrackChange:w,onTriggerEnter:Ut(f),onTriggerLeave:Ut(l),onContentEnter:Ut(d),onContentLeave:Ut(m),onItemSelect:Ut(c),onItemDismiss:Ut(u),onViewportContentChange:_.useCallback((x,A)=>{g(k=>(k.set(x,A),new Map(k)))},[]),onViewportContentRemove:_.useCallback(x=>{g(A=>A.has(x)?(A.delete(x),new Map(A)):A)},[]),children:P.jsx(ZI.Provider,{scope:e,children:P.jsx(CTe,{scope:e,items:y,children:a})})})},E7="NavigationMenuList",C7=_.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,...r}=t,s=Vo(E7,n),i=P.jsx(De.ul,{"data-orientation":s.orientation,...r,ref:e});return P.jsx(De.div,{style:{position:"relative"},ref:s.onIndicatorTrackChange,children:P.jsx(ZI.Slot,{scope:n,children:s.isRootMenu?P.jsx(M7,{asChild:!0,children:i}):i})})});C7.displayName=E7;var A7="NavigationMenuItem",[PTe,R7]=e$(A7),TTe=_.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,value:r,...s}=t,i=Vr(),a=r||i||"LEGACY_REACT_AUTO_VALUE",o=_.useRef(null),c=_.useRef(null),u=_.useRef(null),f=_.useRef(()=>{}),l=_.useRef(!1),d=_.useCallback((p="start")=>{if(o.current){f.current();const h=dN(o.current);h.length&&r$(p==="start"?h:h.reverse())}},[]),m=_.useCallback(()=>{if(o.current){const p=dN(o.current);p.length&&(f.current=$Te(p))}},[]);return P.jsx(PTe,{scope:n,value:a,triggerRef:c,contentRef:o,focusProxyRef:u,wasEscapeCloseRef:l,onEntryKeyDown:d,onFocusProxyEnter:d,onRootContentClose:m,onContentFocusOutside:m,children:P.jsx(De.li,{...s,ref:e})})});TTe.displayName=A7;var uN="NavigationMenuTrigger",P7=_.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,disabled:r,...s}=t,i=Vo(uN,t.__scopeNavigationMenu),a=R7(uN,t.__scopeNavigationMenu),o=_.useRef(null),c=tt(o,a.triggerRef,e),u=L7(i.baseId,a.value),f=I7(i.baseId,a.value),l=_.useRef(!1),d=_.useRef(!1),m=a.value===i.value;return P.jsxs(P.Fragment,{children:[P.jsx(ZI.ItemSlot,{scope:n,value:a.value,children:P.jsx(O7,{asChild:!0,children:P.jsx(De.button,{id:u,disabled:r,"data-disabled":r?"":void 0,"data-state":s$(m),"aria-expanded":m,"aria-controls":f,...s,ref:c,onPointerEnter:me(t.onPointerEnter,()=>{d.current=!1,a.wasEscapeCloseRef.current=!1}),onPointerMove:me(t.onPointerMove,SC(()=>{r||d.current||a.wasEscapeCloseRef.current||l.current||(i.onTriggerEnter(a.value),l.current=!0)})),onPointerLeave:me(t.onPointerLeave,SC(()=>{r||(i.onTriggerLeave(),l.current=!1)})),onClick:me(t.onClick,()=>{i.onItemSelect(a.value),d.current=m}),onKeyDown:me(t.onKeyDown,p=>{const y={horizontal:"ArrowDown",vertical:i.dir==="rtl"?"ArrowLeft":"ArrowRight"}[i.orientation];m&&p.key===y&&(a.onEntryKeyDown(),p.preventDefault())})})})}),m&&P.jsxs(P.Fragment,{children:[P.jsx(b7,{"aria-hidden":!0,tabIndex:0,ref:a.focusProxyRef,onFocus:p=>{const h=a.contentRef.current,y=p.relatedTarget,g=y===o.current,v=h==null?void 0:h.contains(y);(g||!v)&&a.onFocusProxyEnter(g?"start":"end")}}),i.viewport&&P.jsx("span",{"aria-owns":f})]})]})});P7.displayName=uN;var kTe="NavigationMenuLink",jB="navigationMenu.linkSelect",DTe=_.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,active:r,onSelect:s,...i}=t;return P.jsx(O7,{asChild:!0,children:P.jsx(De.a,{"data-active":r?"":void 0,"aria-current":r?"page":void 0,...i,ref:e,onClick:me(t.onClick,a=>{const o=a.target,c=new CustomEvent(jB,{bubbles:!0,cancelable:!0});if(o.addEventListener(jB,u=>s==null?void 0:s(u),{once:!0}),Wb(o,c),!c.defaultPrevented&&!a.metaKey){const u=new CustomEvent(qS,{bubbles:!0,cancelable:!0});Wb(o,u)}},{checkForDefaultPrevented:!1})})})});DTe.displayName=kTe;var t$="NavigationMenuIndicator",T7=_.forwardRef((t,e)=>{const{forceMount:n,...r}=t,s=Vo(t$,t.__scopeNavigationMenu),i=!!s.value;return s.indicatorTrack?t0.createPortal(P.jsx(Hn,{present:n||i,children:P.jsx(NTe,{...r,ref:e})}),s.indicatorTrack):null});T7.displayName=t$;var NTe=_.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,...r}=t,s=Vo(t$,n),i=w7(n),[a,o]=_.useState(null),[c,u]=_.useState(null),f=s.orientation==="horizontal",l=!!s.value;_.useEffect(()=>{var h;const p=(h=i().find(y=>y.value===s.value))==null?void 0:h.ref.current;p&&o(p)},[i,s.value]);const d=()=>{a&&u({size:f?a.offsetWidth:a.offsetHeight,offset:f?a.offsetLeft:a.offsetTop})};return fN(a,d),fN(s.indicatorTrack,d),c?P.jsx(De.div,{"aria-hidden":!0,"data-state":l?"visible":"hidden","data-orientation":s.orientation,...r,ref:e,style:{position:"absolute",...f?{left:0,width:c.size+"px",transform:`translateX(${c.offset}px)`}:{top:0,height:c.size+"px",transform:`translateY(${c.offset}px)`},...r.style}}):null}),uv="NavigationMenuContent",k7=_.forwardRef((t,e)=>{const{forceMount:n,...r}=t,s=Vo(uv,t.__scopeNavigationMenu),i=R7(uv,t.__scopeNavigationMenu),a=tt(i.contentRef,e),o=i.value===s.value,c={value:i.value,triggerRef:i.triggerRef,focusProxyRef:i.focusProxyRef,wasEscapeCloseRef:i.wasEscapeCloseRef,onContentFocusOutside:i.onContentFocusOutside,onRootContentClose:i.onRootContentClose,...r};return s.viewport?P.jsx(MTe,{forceMount:n,...c,ref:a}):P.jsx(Hn,{present:n||o,children:P.jsx(D7,{"data-state":s$(o),...c,ref:a,onPointerEnter:me(t.onPointerEnter,s.onContentEnter),onPointerLeave:me(t.onPointerLeave,SC(s.onContentLeave)),style:{pointerEvents:!o&&s.isRootMenu?"none":void 0,...c.style}})})});k7.displayName=uv;var MTe=_.forwardRef((t,e)=>{const n=Vo(uv,t.__scopeNavigationMenu),{onViewportContentChange:r,onViewportContentRemove:s}=n;return Ln(()=>{r(t.value,{ref:e,...t})},[t,e,r]),Ln(()=>()=>s(t.value),[t.value,s]),null}),qS="navigationMenu.rootContentDismiss",D7=_.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,value:r,triggerRef:s,focusProxyRef:i,wasEscapeCloseRef:a,onRootContentClose:o,onContentFocusOutside:c,...u}=t,f=Vo(uv,n),l=_.useRef(null),d=tt(l,e),m=L7(f.baseId,r),p=I7(f.baseId,r),h=w7(n),y=_.useRef(null),{onItemDismiss:g}=f;_.useEffect(()=>{const w=l.current;if(f.isRootMenu&&w){const x=()=>{var A;g(),o(),w.contains(document.activeElement)&&((A=s.current)==null||A.focus())};return w.addEventListener(qS,x),()=>w.removeEventListener(qS,x)}},[f.isRootMenu,t.value,s,g,o]);const v=_.useMemo(()=>{const x=h().map(D=>D.value);f.dir==="rtl"&&x.reverse();const A=x.indexOf(f.value),k=x.indexOf(f.previousValue),R=r===f.value,E=k===x.indexOf(r);if(!R&&!E)return y.current;const T=(()=>{if(A!==k){if(R&&k!==-1)return A>k?"from-end":"from-start";if(E&&A!==-1)return A>k?"to-start":"to-end"}return null})();return y.current=T,T},[f.previousValue,f.value,f.dir,h,r]);return P.jsx(M7,{asChild:!0,children:P.jsx(Jc,{id:p,"aria-labelledby":m,"data-motion":v,"data-orientation":f.orientation,...u,ref:d,disableOutsidePointerEvents:!1,onDismiss:()=>{var x;const w=new Event(qS,{bubbles:!0,cancelable:!0});(x=l.current)==null||x.dispatchEvent(w)},onFocusOutside:me(t.onFocusOutside,w=>{var A;c();const x=w.target;(A=f.rootNavigationMenu)!=null&&A.contains(x)&&w.preventDefault()}),onPointerDownOutside:me(t.onPointerDownOutside,w=>{var R;const x=w.target,A=h().some(E=>{var T;return(T=E.ref.current)==null?void 0:T.contains(x)}),k=f.isRootMenu&&((R=f.viewport)==null?void 0:R.contains(x));(A||k||!f.isRootMenu)&&w.preventDefault()}),onKeyDown:me(t.onKeyDown,w=>{var k;const x=w.altKey||w.ctrlKey||w.metaKey;if(w.key==="Tab"&&!x){const R=dN(w.currentTarget),E=document.activeElement,T=R.findIndex(L=>L===E),M=w.shiftKey?R.slice(0,T).reverse():R.slice(T+1,R.length);r$(M)?w.preventDefault():(k=i.current)==null||k.focus()}}),onEscapeKeyDown:me(t.onEscapeKeyDown,w=>{a.current=!0})})})}),n$="NavigationMenuViewport",N7=_.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=!!Vo(n$,t.__scopeNavigationMenu).value;return P.jsx(Hn,{present:n||i,children:P.jsx(OTe,{...r,ref:e})})});N7.displayName=n$;var OTe=_.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,children:r,...s}=t,i=Vo(n$,n),a=tt(e,i.onViewportChange),o=ATe(uv,t.__scopeNavigationMenu),[c,u]=_.useState(null),[f,l]=_.useState(null),d=c?(c==null?void 0:c.width)+"px":void 0,m=c?(c==null?void 0:c.height)+"px":void 0,p=!!i.value,h=p?i.value:i.previousValue;return fN(f,()=>{f&&u({width:f.offsetWidth,height:f.offsetHeight})}),P.jsx(De.div,{"data-state":s$(p),"data-orientation":i.orientation,...s,ref:a,style:{pointerEvents:!p&&i.isRootMenu?"none":void 0,"--radix-navigation-menu-viewport-width":d,"--radix-navigation-menu-viewport-height":m,...s.style},onPointerEnter:me(t.onPointerEnter,i.onContentEnter),onPointerLeave:me(t.onPointerLeave,SC(i.onContentLeave)),children:Array.from(o.items).map(([g,{ref:v,forceMount:w,...x}])=>{const A=h===g;return P.jsx(Hn,{present:w||A,children:P.jsx(D7,{...x,ref:n0(v,k=>{A&&k&&l(k)})})},g)})})}),LTe="FocusGroup",M7=_.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,...r}=t,s=Vo(LTe,n);return P.jsx(cN.Provider,{scope:n,children:P.jsx(cN.Slot,{scope:n,children:P.jsx(De.div,{dir:s.dir,...r,ref:e})})})}),FB=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],ITe="FocusGroupItem",O7=_.forwardRef((t,e)=>{const{__scopeNavigationMenu:n,...r}=t,s=xTe(n),i=Vo(ITe,n);return P.jsx(cN.ItemSlot,{scope:n,children:P.jsx(De.button,{...r,ref:e,onKeyDown:me(t.onKeyDown,a=>{if(["Home","End",...FB].includes(a.key)){let c=s().map(l=>l.ref.current);if([i.dir==="rtl"?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(a.key)&&c.reverse(),FB.includes(a.key)){const l=c.indexOf(a.currentTarget);c=c.slice(l+1)}setTimeout(()=>r$(c)),a.preventDefault()}})})})});function dN(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function r$(t){const e=document.activeElement;return t.some(n=>n===e?!0:(n.focus(),document.activeElement!==e))}function $Te(t){return t.forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}),()=>{t.forEach(e=>{const n=e.dataset.tabindex;e.setAttribute("tabindex",n)})}}function fN(t,e){const n=Ut(e);Ln(()=>{let r=0;if(t){const s=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return s.observe(t),()=>{window.cancelAnimationFrame(r),s.unobserve(t)}}},[t,n])}function s$(t){return t?"open":"closed"}function L7(t,e){return`${t}-trigger-${e}`}function I7(t,e){return`${t}-content-${e}`}function SC(t){return e=>e.pointerType==="mouse"?t(e):void 0}var $7=_7,j7=C7,F7=P7,z7=T7,B7=k7,U7=N7;const jTe=_.forwardRef(({className:t,children:e,...n},r)=>P.jsxs($7,{ref:r,className:ce("relative z-10 flex max-w-max flex-1 items-center justify-center",t),...n,children:[e,P.jsx(H7,{})]}));jTe.displayName=$7.displayName;const FTe=_.forwardRef(({className:t,...e},n)=>P.jsx(j7,{ref:n,className:ce("group flex flex-1 list-none items-center justify-center space-x-1",t),...e}));FTe.displayName=j7.displayName;const zTe=Ho("group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50"),BTe=_.forwardRef(({className:t,children:e,...n},r)=>P.jsxs(F7,{ref:r,className:ce(zTe(),"group",t),...n,children:[e," ",P.jsx($1,{className:"relative top-[1px] ml-1 h-3 w-3 transition duration-200 group-data-[state=open]:rotate-180","aria-hidden":"true"})]}));BTe.displayName=F7.displayName;const UTe=_.forwardRef(({className:t,...e},n)=>P.jsx(B7,{ref:n,className:ce("left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto ",t),...e}));UTe.displayName=B7.displayName;const H7=_.forwardRef(({className:t,...e},n)=>P.jsx("div",{className:ce("absolute left-0 top-full flex justify-center"),children:P.jsx(U7,{className:ce("origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",t),ref:n,...e})}));H7.displayName=U7.displayName;const HTe=_.forwardRef(({className:t,...e},n)=>P.jsx(z7,{ref:n,className:ce("top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",t),...e,children:P.jsx("div",{className:"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md"})}));HTe.displayName=z7.displayName;var WTe=typeof window>"u",hN=WTe?se.useEffect:se.useLayoutEffect,VTe=0,zB=()=>++VTe,BB=!1;function qTe(){let[t,e]=se.useState(BB?zB:void 0);return hN(()=>{t===void 0&&e(zB()),BB=!0},[]),t===void 0?t:`rwb-${t.toString(32)}`}function GTe(){return se.useMemo(()=>"useId"in se?se.useId:qTe,[])()}var pN="__wrap_b",gb="__wrap_n",UB="__wrap_o",W7=(t,e,n)=>{n=n||document.querySelector(`[data-br="${t}"]`);let r=n==null?void 0:n.parentElement;if(!r)return;let s=f=>n.style.maxWidth=f+"px";n.style.maxWidth="";let i=r.clientWidth,a=r.clientHeight,o=i/2-.25,c=i+.5,u;if(i){for(s(o),o=Math.max(n.scrollWidth,o);o+1{self.__wrap_b(0,+n.dataset.brr,n)})).observe(r)},KTe=W7.toString(),YTe='(self.CSS&&CSS.supports("text-wrap","balance")?1:2)',XTe=(t,e,n="")=>(n&&(n=`self.${gb}!=1&&${n}`),se.createElement("script",{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:(t?"":`self.${gb}=self.${gb}||${YTe};self.${pN}=${KTe};`)+n},nonce:e})),QTe=se.createContext({preferNative:!0,hasProvider:!1});se.forwardRef(({ratio:t=1,preferNative:e,nonce:n,children:r,as:s,...i},a)=>{let o=GTe(),c=se.useRef(),u=se.useContext(QTe),f=e??u.preferNative,l=s||"span";return se.useImperativeHandle(a,()=>c.current,[]),hN(()=>{f&&self[gb]===1||c.current&&(self[pN]=W7)(0,t,c.current)},[r,f,t]),hN(()=>{if(!(f&&self[gb]===1))return()=>{if(!c.current)return;let d=c.current[UB];d&&(d.disconnect(),delete c.current[UB])}},[f]),se.createElement(se.Fragment,null,se.createElement(l,{...i,"data-br":o,"data-brr":t,ref:c,style:{display:"inline-block",verticalAlign:"top",textDecoration:"inherit",textWrap:f?"balance":"initial"},suppressHydrationWarning:!0},r),XTe(u.hasProvider,n,`self.${pN}("${o}",${t})`))});var JTe="Separator",HB="horizontal",ZTe=["horizontal","vertical"],V7=_.forwardRef((t,e)=>{const{decorative:n,orientation:r=HB,...s}=t,i=eke(r)?r:HB,o=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return P.jsx(De.div,{"data-orientation":i,...o,...s,ref:e})});V7.displayName=JTe;function eke(t){return ZTe.includes(t)}var q7=V7;const tke=_.forwardRef(({className:t,orientation:e="horizontal",decorative:n=!0,...r},s)=>P.jsx(q7,{ref:s,decorative:n,orientation:e,className:ce("shrink-0 bg-border",e==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",t),...r}));tke.displayName=q7.displayName;const nke=_.forwardRef(({className:t,...e},n)=>P.jsx("ul",{ref:n,className:ce("flex flex-row items-center gap-1",t),...e}));nke.displayName="PaginationContent";const rke=_.forwardRef(({className:t,...e},n)=>P.jsx("li",{ref:n,className:ce("",t),...e}));rke.displayName="PaginationItem";var i$="Popover",[G7,e5e]=Tn(i$,[Rl]),D0=Rl(),[ske,zd]=G7(i$),K7=t=>{const{__scopePopover:e,children:n,open:r,defaultOpen:s,onOpenChange:i,modal:a=!1}=t,o=D0(e),c=_.useRef(null),[u,f]=_.useState(!1),[l=!1,d]=sr({prop:r,defaultProp:s,onChange:i});return P.jsx(dA,{...o,children:P.jsx(ske,{scope:e,contentId:Vr(),triggerRef:c,open:l,onOpenChange:d,onOpenToggle:_.useCallback(()=>d(m=>!m),[d]),hasCustomAnchor:u,onCustomAnchorAdd:_.useCallback(()=>f(!0),[]),onCustomAnchorRemove:_.useCallback(()=>f(!1),[]),modal:a,children:n})})};K7.displayName=i$;var Y7="PopoverAnchor",ike=_.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,s=zd(Y7,n),i=D0(n),{onCustomAnchorAdd:a,onCustomAnchorRemove:o}=s;return _.useEffect(()=>(a(),()=>o()),[a,o]),P.jsx(Dv,{...i,...r,ref:e})});ike.displayName=Y7;var X7="PopoverTrigger",Q7=_.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,s=zd(X7,n),i=D0(n),a=tt(e,s.triggerRef),o=P.jsx(De.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.contentId,"data-state":n9(s.open),...r,ref:a,onClick:me(t.onClick,s.onOpenToggle)});return s.hasCustomAnchor?o:P.jsx(Dv,{asChild:!0,...i,children:o})});Q7.displayName=X7;var o$="PopoverPortal",[oke,ake]=G7(o$,{forceMount:void 0}),J7=t=>{const{__scopePopover:e,forceMount:n,children:r,container:s}=t,i=zd(o$,e);return P.jsx(oke,{scope:e,forceMount:n,children:P.jsx(Hn,{present:n||i.open,children:P.jsx(Sv,{asChild:!0,container:s,children:r})})})};J7.displayName=o$;var dv="PopoverContent",Z7=_.forwardRef((t,e)=>{const n=ake(dv,t.__scopePopover),{forceMount:r=n.forceMount,...s}=t,i=zd(dv,t.__scopePopover);return P.jsx(Hn,{present:r||i.open,children:i.modal?P.jsx(lke,{...s,ref:e}):P.jsx(cke,{...s,ref:e})})});Z7.displayName=dv;var lke=_.forwardRef((t,e)=>{const n=zd(dv,t.__scopePopover),r=_.useRef(null),s=tt(e,r),i=_.useRef(!1);return _.useEffect(()=>{const a=r.current;if(a)return Ev(a)},[]),P.jsx(o0,{as:Ra,allowPinchZoom:!0,children:P.jsx(e9,{...t,ref:s,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:me(t.onCloseAutoFocus,a=>{var o;a.preventDefault(),i.current||(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:me(t.onPointerDownOutside,a=>{const o=a.detail.originalEvent,c=o.button===0&&o.ctrlKey===!0,u=o.button===2||c;i.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:me(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),cke=_.forwardRef((t,e)=>{const n=zd(dv,t.__scopePopover),r=_.useRef(!1),s=_.useRef(!1);return P.jsx(e9,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a,o;(a=t.onCloseAutoFocus)==null||a.call(t,i),i.defaultPrevented||(r.current||(o=n.triggerRef.current)==null||o.focus(),i.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:i=>{var c,u;(c=t.onInteractOutside)==null||c.call(t,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const a=i.target;((u=n.triggerRef.current)==null?void 0:u.contains(a))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&s.current&&i.preventDefault()}})}),e9=_.forwardRef((t,e)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:o,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:f,...l}=t,d=zd(dv,n),m=D0(n);return F1(),P.jsx(i0,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:s,onUnmountAutoFocus:i,children:P.jsx(Jc,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:f,onEscapeKeyDown:o,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>d.onOpenChange(!1),children:P.jsx(w0,{"data-state":n9(d.open),role:"dialog",id:d.contentId,...m,...l,ref:e,style:{...l.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),t9="PopoverClose",uke=_.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,s=zd(t9,n);return P.jsx(De.button,{type:"button",...r,ref:e,onClick:me(t.onClick,()=>s.onOpenChange(!1))})});uke.displayName=t9;var dke="PopoverArrow",fke=_.forwardRef((t,e)=>{const{__scopePopover:n,...r}=t,s=D0(n);return P.jsx(_0,{...s,...r,ref:e})});fke.displayName=dke;function n9(t){return t?"open":"closed"}var hke=K7,pke=Q7,mke=J7,r9=Z7;const gke=hke,vke=pke,s9=_.forwardRef(({className:t,align:e="center",sideOffset:n=4,...r},s)=>P.jsx(mke,{children:P.jsx(r9,{ref:s,align:e,sideOffset:n,className:ce("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...r})}));s9.displayName=r9.displayName;var a$="Progress",l$=100,[yke,t5e]=Tn(a$),[bke,wke]=yke(a$),i9=_.forwardRef((t,e)=>{const{__scopeProgress:n,value:r=null,max:s,getValueLabel:i=_ke,...a}=t;(s||s===0)&&!WB(s)&&console.error(xke(`${s}`,"Progress"));const o=WB(s)?s:l$;r!==null&&!VB(r,o)&&console.error(Ske(`${r}`,"Progress"));const c=VB(r,o)?r:null,u=EC(c)?i(c,o):void 0;return P.jsx(bke,{scope:n,value:c,max:o,children:P.jsx(De.div,{"aria-valuemax":o,"aria-valuemin":0,"aria-valuenow":EC(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":l9(c,o),"data-value":c??void 0,"data-max":o,...a,ref:e})})});i9.displayName=a$;var o9="ProgressIndicator",a9=_.forwardRef((t,e)=>{const{__scopeProgress:n,...r}=t,s=wke(o9,n);return P.jsx(De.div,{"data-state":l9(s.value,s.max),"data-value":s.value??void 0,"data-max":s.max,...r,ref:e})});a9.displayName=o9;function _ke(t,e){return`${Math.round(t/e*100)}%`}function l9(t,e){return t==null?"indeterminate":t===e?"complete":"loading"}function EC(t){return typeof t=="number"}function WB(t){return EC(t)&&!isNaN(t)&&t>0}function VB(t,e){return EC(t)&&!isNaN(t)&&t<=e&&t>=0}function xke(t,e){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${e}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${l$}\`.`}function Ske(t,e){return`Invalid prop \`value\` of value \`${t}\` supplied to \`${e}\`. The \`value\` prop must be: - a positive number - less than the value passed to \`max\` (or ${l$} if no \`max\` prop is set) - \`null\` or \`undefined\` if the progress is indeterminate. -Defaulting to \`null\`.`}var c9=i9,xke=a9;const Ske=_.forwardRef(({className:t,value:e,...n},r)=>P.jsx(c9,{ref:r,className:ce("relative h-4 w-full overflow-hidden rounded-full bg-secondary",t),...n,children:P.jsx(xke,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(e||0)}%)`}})}));Ske.displayName=c9.displayName;var c$="Radio",[Eke,u9]=Tn(c$),[Cke,Ake]=Eke(c$),d9=_.forwardRef((t,e)=>{const{__scopeRadio:n,name:r,checked:s=!1,required:i,disabled:a,value:o="on",onCheck:c,...u}=t,[f,l]=_.useState(null),d=tt(e,h=>l(h)),m=_.useRef(!1),p=f?!!f.closest("form"):!0;return P.jsxs(Cke,{scope:n,checked:s,disabled:a,children:[P.jsx(De.button,{type:"button",role:"radio","aria-checked":s,"data-state":p9(s),"data-disabled":a?"":void 0,disabled:a,value:o,...u,ref:d,onClick:me(t.onClick,h=>{s||c==null||c(),p&&(m.current=h.isPropagationStopped(),m.current||h.stopPropagation())})}),p&&P.jsx(Rke,{control:f,bubbles:!m.current,name:r,value:o,checked:s,required:i,disabled:a,style:{transform:"translateX(-100%)"}})]})});d9.displayName=c$;var f9="RadioIndicator",h9=_.forwardRef((t,e)=>{const{__scopeRadio:n,forceMount:r,...s}=t,i=Ake(f9,n);return P.jsx(Hn,{present:r||i.checked,children:P.jsx(De.span,{"data-state":p9(i.checked),"data-disabled":i.disabled?"":void 0,...s,ref:e})})});h9.displayName=f9;var Rke=t=>{const{control:e,checked:n,bubbles:r=!0,...s}=t,i=_.useRef(null),a=Pv(n),o=v_(e);return _.useEffect(()=>{const c=i.current,u=window.HTMLInputElement.prototype,l=Object.getOwnPropertyDescriptor(u,"checked").set;if(a!==n&&l){const d=new Event("click",{bubbles:r});l.call(c,n),c.dispatchEvent(d)}},[a,n,r]),P.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:n,...s,tabIndex:-1,ref:i,style:{...t.style,...o,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function p9(t){return t?"checked":"unchecked"}var Pke=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],u$="RadioGroup",[Tke,e5e]=Tn(u$,[Pl,u9]),m9=Pl(),g9=u9(),[kke,Dke]=Tke(u$),v9=_.forwardRef((t,e)=>{const{__scopeRadioGroup:n,name:r,defaultValue:s,value:i,required:a=!1,disabled:o=!1,orientation:c,dir:u,loop:f=!0,onValueChange:l,...d}=t,m=m9(n),p=Ma(u),[h,y]=sr({prop:i,defaultProp:s,onChange:l});return P.jsx(kke,{scope:n,name:r,required:a,disabled:o,value:h,onValueChange:y,children:P.jsx(x_,{asChild:!0,...m,orientation:c,dir:p,loop:f,children:P.jsx(De.div,{role:"radiogroup","aria-required":a,"aria-orientation":c,"data-disabled":o?"":void 0,dir:p,...d,ref:e})})})});v9.displayName=u$;var y9="RadioGroupItem",b9=_.forwardRef((t,e)=>{const{__scopeRadioGroup:n,disabled:r,...s}=t,i=Dke(y9,n),a=i.disabled||r,o=m9(n),c=g9(n),u=_.useRef(null),f=tt(e,u),l=i.value===s.value,d=_.useRef(!1);return _.useEffect(()=>{const m=h=>{Pke.includes(h.key)&&(d.current=!0)},p=()=>d.current=!1;return document.addEventListener("keydown",m),document.addEventListener("keyup",p),()=>{document.removeEventListener("keydown",m),document.removeEventListener("keyup",p)}},[]),P.jsx(S_,{asChild:!0,...o,focusable:!a,active:l,children:P.jsx(d9,{disabled:a,required:i.required,checked:l,...c,...s,name:i.name,ref:f,onCheck:()=>i.onValueChange(s.value),onKeyDown:me(m=>{m.key==="Enter"&&m.preventDefault()}),onFocus:me(s.onFocus,()=>{var m;d.current&&((m=u.current)==null||m.click())})})})});b9.displayName=y9;var Nke="RadioGroupIndicator",w9=_.forwardRef((t,e)=>{const{__scopeRadioGroup:n,...r}=t,s=g9(n);return P.jsx(h9,{...s,...r,ref:e})});w9.displayName=Nke;var _9=v9,x9=b9,Mke=w9;const Oke=_.forwardRef(({className:t,...e},n)=>P.jsx(_9,{className:ce("grid gap-2",t),...e,ref:n}));Oke.displayName=_9.displayName;const Lke=_.forwardRef(({className:t,...e},n)=>P.jsx(x9,{ref:n,className:ce("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),...e,children:P.jsx(Mke,{className:"flex items-center justify-center",children:P.jsx(jC,{className:"h-2.5 w-2.5 fill-current text-current"})})}));Lke.displayName=x9.displayName;const{createElement:fv,createContext:Ike,forwardRef:S9,useCallback:ci,useContext:E9,useEffect:Ih,useImperativeHandle:C9,useLayoutEffect:$ke,useMemo:jke,useRef:gi,useState:Bm}=X0,qB=X0[`useId${Math.random()}`.slice(0,5)],Fke=$ke,_A=Ike(null);_A.displayName="PanelGroupContext";const $h=Fke,zke=typeof qB=="function"?qB:()=>null;let Bke=0;function d$(t=null){const e=zke(),n=gi(t||e||null);return n.current===null&&(n.current=""+Bke++),t??n.current}function A9({children:t,className:e="",collapsedSize:n,collapsible:r,defaultSize:s,forwardedRef:i,id:a,maxSize:o,minSize:c,onCollapse:u,onExpand:f,onResize:l,order:d,style:m,tagName:p="div",...h}){const y=E9(_A);if(y===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:g,expandPanel:v,getPanelSize:w,getPanelStyle:x,groupId:A,isPanelCollapsed:k,reevaluatePanelConstraints:R,registerPanel:E,resizePanel:T,unregisterPanel:D}=y,M=d$(a),L=gi({callbacks:{onCollapse:u,onExpand:f,onResize:l},constraints:{collapsedSize:n,collapsible:r,defaultSize:s,maxSize:o,minSize:c},id:M,idIsFromProps:a!==void 0,order:d});gi({didLogMissingDefaultSizeWarning:!1}),$h(()=>{const{callbacks:j,constraints:U}=L.current,Y={...U};L.current.id=M,L.current.idIsFromProps=a!==void 0,L.current.order=d,j.onCollapse=u,j.onExpand=f,j.onResize=l,U.collapsedSize=n,U.collapsible=r,U.defaultSize=s,U.maxSize=o,U.minSize=c,(Y.collapsedSize!==U.collapsedSize||Y.collapsible!==U.collapsible||Y.maxSize!==U.maxSize||Y.minSize!==U.minSize)&&R(L.current,Y)}),$h(()=>{const j=L.current;return E(j),()=>{D(j)}},[d,M,E,D]),C9(i,()=>({collapse:()=>{g(L.current)},expand:j=>{v(L.current,j)},getId(){return M},getSize(){return w(L.current)},isCollapsed(){return k(L.current)},isExpanded(){return!k(L.current)},resize:j=>{T(L.current,j)}}),[g,v,w,k,M,T]);const I=x(L.current,s);return fv(p,{...h,children:t,className:e,id:a,style:{...I,...m},"data-panel":"","data-panel-collapsible":r||void 0,"data-panel-group-id":A,"data-panel-id":M,"data-panel-size":parseFloat(""+I.flexGrow).toFixed(1)})}const Uke=S9((t,e)=>fv(A9,{...t,forwardedRef:e}));A9.displayName="Panel";Uke.displayName="forwardRef(Panel)";let mN=null,Af=null;function Hke(t,e){if(e){const n=(e&D9)!==0,r=(e&N9)!==0,s=(e&M9)!==0,i=(e&O9)!==0;if(n)return s?"se-resize":i?"ne-resize":"e-resize";if(r)return s?"sw-resize":i?"nw-resize":"w-resize";if(s)return"s-resize";if(i)return"n-resize"}switch(t){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function Wke(){Af!==null&&(document.head.removeChild(Af),mN=null,Af=null)}function VT(t,e){const n=Hke(t,e);mN!==n&&(mN=n,Af===null&&(Af=document.createElement("style"),document.head.appendChild(Af)),Af.innerHTML=`*{cursor: ${n}!important;}`)}function R9(t){return t.type==="keydown"}function P9(t){return t.type.startsWith("pointer")}function T9(t){return t.type.startsWith("mouse")}function xA(t){if(P9(t)){if(t.isPrimary)return{x:t.clientX,y:t.clientY}}else if(T9(t))return{x:t.clientX,y:t.clientY};return{x:1/0,y:1/0}}function Vke(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function qke(t,e,n){return t.xe.x&&t.ye.y}function Gke(t,e){if(t===e)throw new Error("Cannot compare node with itself");const n={a:YB(t),b:YB(e)};let r;for(;n.a.at(-1)===n.b.at(-1);)t=n.a.pop(),e=n.b.pop(),r=t;Tt(r,"Stacking order can only be calculated for elements with a common ancestor");const s={a:KB(GB(n.a)),b:KB(GB(n.b))};if(s.a===s.b){const i=r.childNodes,a={a:n.a.at(-1),b:n.b.at(-1)};let o=i.length;for(;o--;){const c=i[o];if(c===a.a)return 1;if(c===a.b)return-1}}return Math.sign(s.a-s.b)}const Kke=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Yke(t){var e;const n=getComputedStyle((e=k9(t))!==null&&e!==void 0?e:t).display;return n==="flex"||n==="inline-flex"}function Xke(t){const e=getComputedStyle(t);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||Yke(t))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||Kke.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function GB(t){let e=t.length;for(;e--;){const n=t[e];if(Tt(n,"Missing node"),Xke(n))return n}return null}function KB(t){return t&&Number(getComputedStyle(t).zIndex)||0}function YB(t){const e=[];for(;t;)e.push(t),t=k9(t);return e}function k9(t){const{parentNode:e}=t;return e&&e instanceof ShadowRoot?e.host:e}const D9=1,N9=2,M9=4,O9=8,Qke=Vke()==="coarse";let Ea=[],Zb=!1,Mu=new Map,SA=new Map;const ew=new Set;function Jke(t,e,n,r,s){var i;const{ownerDocument:a}=e,o={direction:n,element:e,hitAreaMargins:r,setResizeHandlerState:s},c=(i=Mu.get(a))!==null&&i!==void 0?i:0;return Mu.set(a,c+1),ew.add(o),C1(),function(){var f;SA.delete(t),ew.delete(o);const l=(f=Mu.get(a))!==null&&f!==void 0?f:1;if(Mu.set(a,l-1),C1(),l===1&&Mu.delete(a),Ea.includes(o)){const d=Ea.indexOf(o);d>=0&&Ea.splice(d,1),h$()}}}function XB(t){const{target:e}=t,{x:n,y:r}=xA(t);Zb=!0,f$({target:e,x:n,y:r}),C1(),Ea.length>0&&(A1("down",t),t.preventDefault(),t.stopPropagation())}function Ey(t){const{x:e,y:n}=xA(t);if(t.buttons===0&&(Zb=!1,A1("up",t)),!Zb){const{target:r}=t;f$({target:r,x:e,y:n})}A1("move",t),h$(),Ea.length>0&&t.preventDefault()}function Kp(t){const{target:e}=t,{x:n,y:r}=xA(t);SA.clear(),Zb=!1,Ea.length>0&&t.preventDefault(),A1("up",t),f$({target:e,x:n,y:r}),h$(),C1()}function f$({target:t,x:e,y:n}){Ea.splice(0);let r=null;t instanceof HTMLElement&&(r=t),ew.forEach(s=>{const{element:i,hitAreaMargins:a}=s,o=i.getBoundingClientRect(),{bottom:c,left:u,right:f,top:l}=o,d=Qke?a.coarse:a.fine;if(e>=u-d&&e<=f+d&&n>=l-d&&n<=c+d){if(r!==null&&i!==r&&!i.contains(r)&&!r.contains(i)&&Gke(r,i)>0){let p=r,h=!1;for(;p&&!p.contains(i);){if(qke(p.getBoundingClientRect(),o)){h=!0;break}p=p.parentElement}if(h)return}Ea.push(s)}})}function qT(t,e){SA.set(t,e)}function h$(){let t=!1,e=!1;Ea.forEach(r=>{const{direction:s}=r;s==="horizontal"?t=!0:e=!0});let n=0;SA.forEach(r=>{n|=r}),t&&e?VT("intersection",n):t?VT("horizontal",n):e?VT("vertical",n):Wke()}function C1(){Mu.forEach((t,e)=>{const{body:n}=e;n.removeEventListener("contextmenu",Kp),n.removeEventListener("pointerdown",XB),n.removeEventListener("pointerleave",Ey),n.removeEventListener("pointermove",Ey)}),window.removeEventListener("pointerup",Kp),window.removeEventListener("pointercancel",Kp),ew.size>0&&(Zb?(Ea.length>0&&Mu.forEach((t,e)=>{const{body:n}=e;t>0&&(n.addEventListener("contextmenu",Kp),n.addEventListener("pointerleave",Ey),n.addEventListener("pointermove",Ey))}),window.addEventListener("pointerup",Kp),window.addEventListener("pointercancel",Kp)):Mu.forEach((t,e)=>{const{body:n}=e;t>0&&(n.addEventListener("pointerdown",XB,{capture:!0}),n.addEventListener("pointermove",Ey))}))}function A1(t,e){ew.forEach(n=>{const{setResizeHandlerState:r}=n,s=Ea.includes(n);r(t,s,e)})}function Zke(){const[t,e]=Bm(0);return ci(()=>e(n=>n+1),[])}function Tt(t,e){if(!t)throw console.error(e),Error(e)}const p$=10;function ep(t,e,n=p$){return t.toFixed(n)===e.toFixed(n)?0:t>e?1:-1}function kc(t,e,n=p$){return ep(t,e,n)===0}function Ji(t,e,n){return ep(t,e,n)===0}function eDe(t,e,n){if(t.length!==e.length)return!1;for(let r=0;r0&&(t=t<0?0-g:g)}}}{const l=t<0?o:c,d=n[l];Tt(d,`No panel constraints found for index ${l}`);const{collapsedSize:m=0,collapsible:p,minSize:h=0}=d;if(p){const y=e[l];if(Tt(y!=null,`Previous layout not found for panel index ${l}`),Ji(y,h)){const g=y-m;ep(g,Math.abs(t))>0&&(t=t<0?0-g:g)}}}}{const l=t<0?1:-1;let d=t<0?c:o,m=0;for(;;){const h=e[d];Tt(h!=null,`Previous layout not found for panel index ${d}`);const g=Em({panelConstraints:n,panelIndex:d,size:100})-h;if(m+=g,d+=l,d<0||d>=n.length)break}const p=Math.min(Math.abs(t),Math.abs(m));t=t<0?0-p:p}{let d=t<0?o:c;for(;d>=0&&d=0))break;t<0?d--:d++}}if(eDe(s,a))return s;{const l=t<0?c:o,d=e[l];Tt(d!=null,`Previous layout not found for panel index ${l}`);const m=d+u,p=Em({panelConstraints:n,panelIndex:l,size:m});if(a[l]=p,!Ji(p,m)){let h=m-p,g=t<0?c:o;for(;g>=0&&g0?g--:g++}}}const f=a.reduce((l,d)=>d+l,0);return Ji(f,100)?a:s}function tDe({layout:t,panelsArray:e,pivotIndices:n}){let r=0,s=100,i=0,a=0;const o=n[0];Tt(o!=null,"No pivot index found"),e.forEach((l,d)=>{const{constraints:m}=l,{maxSize:p=100,minSize:h=0}=m;d===o?(r=h,s=p):(i+=h,a+=p)});const c=Math.min(s,100-i),u=Math.max(r,100-a),f=t[o];return{valueMax:c,valueMin:u,valueNow:f}}function tw(t,e=document){return Array.from(e.querySelectorAll(`[data-panel-resize-handle-id][data-panel-group-id="${t}"]`))}function L9(t,e,n=document){const s=tw(t,n).findIndex(i=>i.getAttribute("data-panel-resize-handle-id")===e);return s??null}function I9(t,e,n){const r=L9(t,e,n);return r!=null?[r,r+1]:[-1,-1]}function $9(t,e=document){var n;if(e instanceof HTMLElement&&(e==null||(n=e.dataset)===null||n===void 0?void 0:n.panelGroupId)==t)return e;const r=e.querySelector(`[data-panel-group][data-panel-group-id="${t}"]`);return r||null}function EA(t,e=document){const n=e.querySelector(`[data-panel-resize-handle-id="${t}"]`);return n||null}function nDe(t,e,n,r=document){var s,i,a,o;const c=EA(e,r),u=tw(t,r),f=c?u.indexOf(c):-1,l=(s=(i=n[f])===null||i===void 0?void 0:i.id)!==null&&s!==void 0?s:null,d=(a=(o=n[f+1])===null||o===void 0?void 0:o.id)!==null&&a!==void 0?a:null;return[l,d]}function rDe({committedValuesRef:t,eagerValuesRef:e,groupId:n,layout:r,panelDataArray:s,panelGroupElement:i,setLayout:a}){gi({didWarnAboutMissingResizeHandle:!1}),$h(()=>{if(!i)return;const o=tw(n,i);for(let c=0;c{o.forEach((c,u)=>{c.removeAttribute("aria-controls"),c.removeAttribute("aria-valuemax"),c.removeAttribute("aria-valuemin"),c.removeAttribute("aria-valuenow")})}},[n,r,s,i]),Ih(()=>{if(!i)return;const o=e.current;Tt(o,"Eager values not found");const{panelDataArray:c}=o,u=$9(n,i);Tt(u!=null,`No group found for id "${n}"`);const f=tw(n,i);Tt(f,`No resize handles found for group id "${n}"`);const l=f.map(d=>{const m=d.getAttribute("data-panel-resize-handle-id");Tt(m,"Resize handle element has no handle id attribute");const[p,h]=nDe(n,m,c,i);if(p==null||h==null)return()=>{};const y=g=>{if(!g.defaultPrevented)switch(g.key){case"Enter":{g.preventDefault();const v=c.findIndex(w=>w.id===p);if(v>=0){const w=c[v];Tt(w,`No panel data found for index ${v}`);const x=r[v],{collapsedSize:A=0,collapsible:k,minSize:R=0}=w.constraints;if(x!=null&&k){const E=Fy({delta:Ji(x,A)?R-A:A-x,initialLayout:r,panelConstraints:c.map(T=>T.constraints),pivotIndices:I9(n,m,i),prevLayout:r,trigger:"keyboard"});r!==E&&a(E)}}break}}};return d.addEventListener("keydown",y),()=>{d.removeEventListener("keydown",y)}});return()=>{l.forEach(d=>d())}},[i,t,e,n,r,s,a])}function QB(t,e){if(t.length!==e.length)return!1;for(let n=0;ni.constraints);let r=0,s=100;for(let i=0;i{const i=t[s];Tt(i,`Panel data not found for index ${s}`);const{callbacks:a,constraints:o,id:c}=i,{collapsedSize:u=0,collapsible:f}=o,l=n[c];if(l==null||r!==l){n[c]=r;const{onCollapse:d,onExpand:m,onResize:p}=a;p&&p(r,l),f&&(d||m)&&(m&&(l==null||kc(l,u))&&!kc(r,u)&&m(),d&&(l==null||!kc(l,u))&&kc(r,u)&&d())}})}function vS(t,e){if(t.length!==e.length)return!1;for(let n=0;n{n!==null&&clearTimeout(n),n=setTimeout(()=>{t(...s)},e)}}function JB(t){try{if(typeof localStorage<"u")t.getItem=e=>localStorage.getItem(e),t.setItem=(e,n)=>{localStorage.setItem(e,n)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),t.getItem=()=>null,t.setItem=()=>{}}}function F9(t){return`react-resizable-panels:${t}`}function z9(t){return t.map(e=>{const{constraints:n,id:r,idIsFromProps:s,order:i}=e;return s?r:i?`${i}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((e,n)=>e.localeCompare(n)).join(",")}function B9(t,e){try{const n=F9(t),r=e.getItem(n);if(r){const s=JSON.parse(r);if(typeof s=="object"&&s!=null)return s}}catch{}return null}function cDe(t,e,n){var r,s;const i=(r=B9(t,n))!==null&&r!==void 0?r:{},a=z9(e);return(s=i[a])!==null&&s!==void 0?s:null}function uDe(t,e,n,r,s){var i;const a=F9(t),o=z9(e),c=(i=B9(t,s))!==null&&i!==void 0?i:{};c[o]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{s.setItem(a,JSON.stringify(c))}catch(u){console.error(u)}}function ZB({layout:t,panelConstraints:e}){const n=[...t],r=n.reduce((i,a)=>i+a,0);if(n.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${n.map(i=>`${i}%`).join(", ")}`);if(!Ji(r,100))for(let i=0;i(JB(zy),zy.getItem(t)),setItem:(t,e)=>{JB(zy),zy.setItem(t,e)}},e4={};function U9({autoSaveId:t=null,children:e,className:n="",direction:r,forwardedRef:s,id:i=null,onLayout:a=null,keyboardResizeBy:o=null,storage:c=zy,style:u,tagName:f="div",...l}){const d=d$(i),m=gi(null),[p,h]=Bm(null),[y,g]=Bm([]),v=Zke(),w=gi({}),x=gi(new Map),A=gi(0),k=gi({autoSaveId:t,direction:r,dragState:p,id:d,keyboardResizeBy:o,onLayout:a,storage:c}),R=gi({layout:y,panelDataArray:[],panelDataArrayChanged:!1});gi({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),C9(s,()=>({getId:()=>k.current.id,getLayout:()=>{const{layout:K}=R.current;return K},setLayout:K=>{const{onLayout:J}=k.current,{layout:ue,panelDataArray:de}=R.current,ie=ZB({layout:K,panelConstraints:de.map(be=>be.constraints)});QB(ue,ie)||(g(ie),R.current.layout=ie,J&&J(ie),Yp(de,ie,w.current))}}),[]),$h(()=>{k.current.autoSaveId=t,k.current.direction=r,k.current.dragState=p,k.current.id=d,k.current.onLayout=a,k.current.storage=c}),rDe({committedValuesRef:k,eagerValuesRef:R,groupId:d,layout:y,panelDataArray:R.current.panelDataArray,setLayout:g,panelGroupElement:m.current}),Ih(()=>{const{panelDataArray:K}=R.current;if(t){if(y.length===0||y.length!==K.length)return;let J=e4[t];J==null&&(J=lDe(uDe,dDe),e4[t]=J);const ue=[...K],de=new Map(x.current);J(t,ue,de,y,c)}},[t,y,c]),Ih(()=>{});const E=ci(K=>{const{onLayout:J}=k.current,{layout:ue,panelDataArray:de}=R.current;if(K.constraints.collapsible){const ie=de.map(Oe=>Oe.constraints),{collapsedSize:be=0,panelSize:Ae,pivotIndices:_e}=lf(de,K,ue);if(Tt(Ae!=null,`Panel size not found for panel "${K.id}"`),!kc(Ae,be)){x.current.set(K.id,Ae);const Ne=rm(de,K)===de.length-1?Ae-be:be-Ae,ye=Fy({delta:Ne,initialLayout:ue,panelConstraints:ie,pivotIndices:_e,prevLayout:ue,trigger:"imperative-api"});vS(ue,ye)||(g(ye),R.current.layout=ye,J&&J(ye),Yp(de,ye,w.current))}}},[]),T=ci((K,J)=>{const{onLayout:ue}=k.current,{layout:de,panelDataArray:ie}=R.current;if(K.constraints.collapsible){const be=ie.map($e=>$e.constraints),{collapsedSize:Ae=0,panelSize:_e=0,minSize:Oe=0,pivotIndices:Ne}=lf(ie,K,de),ye=J??Oe;if(kc(_e,Ae)){const $e=x.current.get(K.id),ut=$e!=null&&$e>=ye?$e:ye,yt=rm(ie,K)===ie.length-1?_e-ut:ut-_e,En=Fy({delta:yt,initialLayout:de,panelConstraints:be,pivotIndices:Ne,prevLayout:de,trigger:"imperative-api"});vS(de,En)||(g(En),R.current.layout=En,ue&&ue(En),Yp(ie,En,w.current))}}},[]),D=ci(K=>{const{layout:J,panelDataArray:ue}=R.current,{panelSize:de}=lf(ue,K,J);return Tt(de!=null,`Panel size not found for panel "${K.id}"`),de},[]),M=ci((K,J)=>{const{panelDataArray:ue}=R.current,de=rm(ue,K);return aDe({defaultSize:J,dragState:p,layout:y,panelData:ue,panelIndex:de})},[p,y]),L=ci(K=>{const{layout:J,panelDataArray:ue}=R.current,{collapsedSize:de=0,collapsible:ie,panelSize:be}=lf(ue,K,J);return Tt(be!=null,`Panel size not found for panel "${K.id}"`),ie===!0&&kc(be,de)},[]),I=ci(K=>{const{layout:J,panelDataArray:ue}=R.current,{collapsedSize:de=0,collapsible:ie,panelSize:be}=lf(ue,K,J);return Tt(be!=null,`Panel size not found for panel "${K.id}"`),!ie||ep(be,de)>0},[]),j=ci(K=>{const{panelDataArray:J}=R.current;J.push(K),J.sort((ue,de)=>{const ie=ue.order,be=de.order;return ie==null&&be==null?0:ie==null?-1:be==null?1:ie-be}),R.current.panelDataArrayChanged=!0,v()},[v]);$h(()=>{if(R.current.panelDataArrayChanged){R.current.panelDataArrayChanged=!1;const{autoSaveId:K,onLayout:J,storage:ue}=k.current,{layout:de,panelDataArray:ie}=R.current;let be=null;if(K){const _e=cDe(K,ie,ue);_e&&(x.current=new Map(Object.entries(_e.expandToSizes)),be=_e.layout)}be==null&&(be=oDe({panelDataArray:ie}));const Ae=ZB({layout:be,panelConstraints:ie.map(_e=>_e.constraints)});QB(de,Ae)||(g(Ae),R.current.layout=Ae,J&&J(Ae),Yp(ie,Ae,w.current))}}),$h(()=>{const K=R.current;return()=>{K.layout=[]}},[]);const U=ci(K=>function(ue){ue.preventDefault();const de=m.current;if(!de)return()=>null;const{direction:ie,dragState:be,id:Ae,keyboardResizeBy:_e,onLayout:Oe}=k.current,{layout:Ne,panelDataArray:ye}=R.current,{initialLayout:$e}=be??{},ut=I9(Ae,K,de);let Qe=iDe(ue,K,ie,be,_e,de);const yt=ie==="horizontal";document.dir==="rtl"&&yt&&(Qe=-Qe);const En=ye.map(Qt=>Qt.constraints),Xt=Fy({delta:Qe,initialLayout:$e??Ne,panelConstraints:En,pivotIndices:ut,prevLayout:Ne,trigger:R9(ue)?"keyboard":"mouse-or-touch"}),gn=!vS(Ne,Xt);(P9(ue)||T9(ue))&&A.current!=Qe&&(A.current=Qe,gn?qT(K,0):yt?qT(K,Qe<0?D9:N9):qT(K,Qe<0?M9:O9)),gn&&(g(Xt),R.current.layout=Xt,Oe&&Oe(Xt),Yp(ye,Xt,w.current))},[]),Y=ci((K,J)=>{const{onLayout:ue}=k.current,{layout:de,panelDataArray:ie}=R.current,be=ie.map($e=>$e.constraints),{panelSize:Ae,pivotIndices:_e}=lf(ie,K,de);Tt(Ae!=null,`Panel size not found for panel "${K.id}"`);const Ne=rm(ie,K)===ie.length-1?Ae-J:J-Ae,ye=Fy({delta:Ne,initialLayout:de,panelConstraints:be,pivotIndices:_e,prevLayout:de,trigger:"imperative-api"});vS(de,ye)||(g(ye),R.current.layout=ye,ue&&ue(ye),Yp(ie,ye,w.current))},[]),W=ci((K,J)=>{const{layout:ue,panelDataArray:de}=R.current,{collapsedSize:ie=0,collapsible:be}=J,{collapsedSize:Ae=0,collapsible:_e,maxSize:Oe=100,minSize:Ne=0}=K.constraints,{panelSize:ye}=lf(de,K,ue);ye!=null&&(be&&_e&&kc(ye,ie)?kc(ie,Ae)||Y(K,Ae):yeOe&&Y(K,Oe))},[Y]),H=ci((K,J)=>{const{direction:ue}=k.current,{layout:de}=R.current;if(!m.current)return;const ie=EA(K,m.current);Tt(ie,`Drag handle element not found for id "${K}"`);const be=j9(ue,J);h({dragHandleId:K,dragHandleRect:ie.getBoundingClientRect(),initialCursorPosition:be,initialLayout:de})},[]),ee=ci(()=>{h(null)},[]),re=ci(K=>{const{panelDataArray:J}=R.current,ue=rm(J,K);ue>=0&&(J.splice(ue,1),delete w.current[K.id],R.current.panelDataArrayChanged=!0,v())},[v]),X=jke(()=>({collapsePanel:E,direction:r,dragState:p,expandPanel:T,getPanelSize:D,getPanelStyle:M,groupId:d,isPanelCollapsed:L,isPanelExpanded:I,reevaluatePanelConstraints:W,registerPanel:j,registerResizeHandle:U,resizePanel:Y,startDragging:H,stopDragging:ee,unregisterPanel:re,panelGroupElement:m.current}),[E,p,r,T,D,M,d,L,I,W,j,U,Y,H,ee,re]),G={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return fv(_A.Provider,{value:X},fv(f,{...l,children:e,className:n,id:i,ref:m,style:{...G,...u},"data-panel-group":"","data-panel-group-direction":r,"data-panel-group-id":d}))}const fDe=S9((t,e)=>fv(U9,{...t,forwardedRef:e}));U9.displayName="PanelGroup";fDe.displayName="forwardRef(PanelGroup)";function rm(t,e){return t.findIndex(n=>n===e||n.id===e.id)}function lf(t,e,n){const r=rm(t,e),i=r===t.length-1?[r-1,r]:[r,r+1],a=n[r];return{...e.constraints,panelSize:a,pivotIndices:i}}function hDe({disabled:t,handleId:e,resizeHandler:n,panelGroupElement:r}){Ih(()=>{if(t||n==null||r==null)return;const s=EA(e,r);if(s==null)return;const i=a=>{if(!a.defaultPrevented)switch(a.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{a.preventDefault(),n(a);break}case"F6":{a.preventDefault();const o=s.getAttribute("data-panel-group-id");Tt(o,`No group element found for id "${o}"`);const c=tw(o,r),u=L9(o,e,r);Tt(u!==null,`No resize element found for id "${e}"`);const f=a.shiftKey?u>0?u-1:c.length-1:u+1{s.removeEventListener("keydown",i)}},[r,t,e,n])}function pDe({children:t=null,className:e="",disabled:n=!1,hitAreaMargins:r,id:s,onBlur:i,onDragging:a,onFocus:o,style:c={},tabIndex:u=0,tagName:f="div",...l}){var d,m;const p=gi(null),h=gi({onDragging:a});Ih(()=>{h.current.onDragging=a});const y=E9(_A);if(y===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:g,groupId:v,registerResizeHandle:w,startDragging:x,stopDragging:A,panelGroupElement:k}=y,R=d$(s),[E,T]=Bm("inactive"),[D,M]=Bm(!1),[L,I]=Bm(null),j=gi({state:E});$h(()=>{j.current.state=E}),Ih(()=>{if(n)I(null);else{const H=w(R);I(()=>H)}},[n,R,w]);const U=(d=r==null?void 0:r.coarse)!==null&&d!==void 0?d:15,Y=(m=r==null?void 0:r.fine)!==null&&m!==void 0?m:5;return Ih(()=>{if(n||L==null)return;const H=p.current;return Tt(H,"Element ref not attached"),Jke(R,H,g,{coarse:U,fine:Y},(re,X,G)=>{if(X)switch(re){case"down":{T("drag"),x(R,G);const{onDragging:K}=h.current;K&&K(!0);break}case"move":{const{state:K}=j.current;K!=="drag"&&T("hover"),L(G);break}case"up":{T("hover"),A();const{onDragging:K}=h.current;K&&K(!1);break}}else T("inactive")})},[U,g,n,Y,w,R,L,x,A]),hDe({disabled:n,handleId:R,resizeHandler:L,panelGroupElement:k}),fv(f,{...l,children:t,className:e,id:s,onBlur:()=>{M(!1),i==null||i()},onFocus:()=>{M(!0),o==null||o()},ref:p,role:"separator",style:{...{touchAction:"none",userSelect:"none"},...c},tabIndex:u,"data-panel-group-direction":g,"data-panel-group-id":v,"data-resize-handle":"","data-resize-handle-active":E==="drag"?"pointer":D?"keyboard":void 0,"data-resize-handle-state":E,"data-panel-resize-handle-enabled":!n,"data-panel-resize-handle-id":R})}pDe.displayName="PanelResizeHandle";function nw(t,[e,n]){return Math.min(n,Math.max(e,t))}function mDe(t,e){return _.useReducer((n,r)=>e[n][r]??n,t)}var m$="ScrollArea",[H9,t5e]=Tn(m$),[gDe,qo]=H9(m$),W9=_.forwardRef((t,e)=>{const{__scopeScrollArea:n,type:r="hover",dir:s,scrollHideDelay:i=600,...a}=t,[o,c]=_.useState(null),[u,f]=_.useState(null),[l,d]=_.useState(null),[m,p]=_.useState(null),[h,y]=_.useState(null),[g,v]=_.useState(0),[w,x]=_.useState(0),[A,k]=_.useState(!1),[R,E]=_.useState(!1),T=tt(e,M=>c(M)),D=Ma(s);return P.jsx(gDe,{scope:n,type:r,dir:D,scrollHideDelay:i,scrollArea:o,viewport:u,onViewportChange:f,content:l,onContentChange:d,scrollbarX:m,onScrollbarXChange:p,scrollbarXEnabled:A,onScrollbarXEnabledChange:k,scrollbarY:h,onScrollbarYChange:y,scrollbarYEnabled:R,onScrollbarYEnabledChange:E,onCornerWidthChange:v,onCornerHeightChange:x,children:P.jsx(De.div,{dir:D,...a,ref:T,style:{position:"relative","--radix-scroll-area-corner-width":g+"px","--radix-scroll-area-corner-height":w+"px",...t.style}})})});W9.displayName=m$;var V9="ScrollAreaViewport",q9=_.forwardRef((t,e)=>{const{__scopeScrollArea:n,children:r,nonce:s,...i}=t,a=qo(V9,n),o=_.useRef(null),c=tt(e,o,a.onViewportChange);return P.jsxs(P.Fragment,{children:[P.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),P.jsx(De.div,{"data-radix-scroll-area-viewport":"",...i,ref:c,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...t.style},children:P.jsx("div",{ref:a.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});q9.displayName=V9;var kl="ScrollAreaScrollbar",g$=_.forwardRef((t,e)=>{const{forceMount:n,...r}=t,s=qo(kl,t.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:a}=s,o=t.orientation==="horizontal";return _.useEffect(()=>(o?i(!0):a(!0),()=>{o?i(!1):a(!1)}),[o,i,a]),s.type==="hover"?P.jsx(vDe,{...r,ref:e,forceMount:n}):s.type==="scroll"?P.jsx(yDe,{...r,ref:e,forceMount:n}):s.type==="auto"?P.jsx(G9,{...r,ref:e,forceMount:n}):s.type==="always"?P.jsx(v$,{...r,ref:e}):null});g$.displayName=kl;var vDe=_.forwardRef((t,e)=>{const{forceMount:n,...r}=t,s=qo(kl,t.__scopeScrollArea),[i,a]=_.useState(!1);return _.useEffect(()=>{const o=s.scrollArea;let c=0;if(o){const u=()=>{window.clearTimeout(c),a(!0)},f=()=>{c=window.setTimeout(()=>a(!1),s.scrollHideDelay)};return o.addEventListener("pointerenter",u),o.addEventListener("pointerleave",f),()=>{window.clearTimeout(c),o.removeEventListener("pointerenter",u),o.removeEventListener("pointerleave",f)}}},[s.scrollArea,s.scrollHideDelay]),P.jsx(Hn,{present:n||i,children:P.jsx(G9,{"data-state":i?"visible":"hidden",...r,ref:e})})}),yDe=_.forwardRef((t,e)=>{const{forceMount:n,...r}=t,s=qo(kl,t.__scopeScrollArea),i=t.orientation==="horizontal",a=AA(()=>c("SCROLL_END"),100),[o,c]=mDe("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return _.useEffect(()=>{if(o==="idle"){const u=window.setTimeout(()=>c("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(u)}},[o,s.scrollHideDelay,c]),_.useEffect(()=>{const u=s.viewport,f=i?"scrollLeft":"scrollTop";if(u){let l=u[f];const d=()=>{const m=u[f];l!==m&&(c("SCROLL"),a()),l=m};return u.addEventListener("scroll",d),()=>u.removeEventListener("scroll",d)}},[s.viewport,i,c,a]),P.jsx(Hn,{present:n||o!=="hidden",children:P.jsx(v$,{"data-state":o==="hidden"?"hidden":"visible",...r,ref:e,onPointerEnter:me(t.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:me(t.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),G9=_.forwardRef((t,e)=>{const n=qo(kl,t.__scopeScrollArea),{forceMount:r,...s}=t,[i,a]=_.useState(!1),o=t.orientation==="horizontal",c=AA(()=>{if(n.viewport){const u=n.viewport.offsetWidth{const{orientation:n="vertical",...r}=t,s=qo(kl,t.__scopeScrollArea),i=_.useRef(null),a=_.useRef(0),[o,c]=_.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=J9(o.viewport,o.content),f={...r,sizes:o,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:d=>i.current=d,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:d=>a.current=d};function l(d,m){return EDe(d,a.current,o,m)}return n==="horizontal"?P.jsx(bDe,{...f,ref:e,onThumbPositionChange:()=>{if(s.viewport&&i.current){const d=s.viewport.scrollLeft,m=t4(d,o,s.dir);i.current.style.transform=`translate3d(${m}px, 0, 0)`}},onWheelScroll:d=>{s.viewport&&(s.viewport.scrollLeft=d)},onDragScroll:d=>{s.viewport&&(s.viewport.scrollLeft=l(d,s.dir))}}):n==="vertical"?P.jsx(wDe,{...f,ref:e,onThumbPositionChange:()=>{if(s.viewport&&i.current){const d=s.viewport.scrollTop,m=t4(d,o);i.current.style.transform=`translate3d(0, ${m}px, 0)`}},onWheelScroll:d=>{s.viewport&&(s.viewport.scrollTop=d)},onDragScroll:d=>{s.viewport&&(s.viewport.scrollTop=l(d))}}):null}),bDe=_.forwardRef((t,e)=>{const{sizes:n,onSizesChange:r,...s}=t,i=qo(kl,t.__scopeScrollArea),[a,o]=_.useState(),c=_.useRef(null),u=tt(e,c,i.onScrollbarXChange);return _.useEffect(()=>{c.current&&o(getComputedStyle(c.current))},[c]),P.jsx(Y9,{"data-orientation":"horizontal",...s,ref:u,sizes:n,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":CA(n)+"px",...t.style},onThumbPointerDown:f=>t.onThumbPointerDown(f.x),onDragScroll:f=>t.onDragScroll(f.x),onWheelScroll:(f,l)=>{if(i.viewport){const d=i.viewport.scrollLeft+f.deltaX;t.onWheelScroll(d),eY(d,l)&&f.preventDefault()}},onResize:()=>{c.current&&i.viewport&&a&&r({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:P1(a.paddingLeft),paddingEnd:P1(a.paddingRight)}})}})}),wDe=_.forwardRef((t,e)=>{const{sizes:n,onSizesChange:r,...s}=t,i=qo(kl,t.__scopeScrollArea),[a,o]=_.useState(),c=_.useRef(null),u=tt(e,c,i.onScrollbarYChange);return _.useEffect(()=>{c.current&&o(getComputedStyle(c.current))},[c]),P.jsx(Y9,{"data-orientation":"vertical",...s,ref:u,sizes:n,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":CA(n)+"px",...t.style},onThumbPointerDown:f=>t.onThumbPointerDown(f.y),onDragScroll:f=>t.onDragScroll(f.y),onWheelScroll:(f,l)=>{if(i.viewport){const d=i.viewport.scrollTop+f.deltaY;t.onWheelScroll(d),eY(d,l)&&f.preventDefault()}},onResize:()=>{c.current&&i.viewport&&a&&r({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:P1(a.paddingTop),paddingEnd:P1(a.paddingBottom)}})}})}),[_De,K9]=H9(kl),Y9=_.forwardRef((t,e)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:s,onThumbChange:i,onThumbPointerUp:a,onThumbPointerDown:o,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:f,onResize:l,...d}=t,m=qo(kl,n),[p,h]=_.useState(null),y=tt(e,T=>h(T)),g=_.useRef(null),v=_.useRef(""),w=m.viewport,x=r.content-r.viewport,A=Ut(f),k=Ut(c),R=AA(l,10);function E(T){if(g.current){const D=T.clientX-g.current.left,M=T.clientY-g.current.top;u({x:D,y:M})}}return _.useEffect(()=>{const T=D=>{const M=D.target;(p==null?void 0:p.contains(M))&&A(D,x)};return document.addEventListener("wheel",T,{passive:!1}),()=>document.removeEventListener("wheel",T,{passive:!1})},[w,p,x,A]),_.useEffect(k,[r,k]),hv(p,R),hv(m.content,R),P.jsx(_De,{scope:n,scrollbar:p,hasThumb:s,onThumbChange:Ut(i),onThumbPointerUp:Ut(a),onThumbPositionChange:k,onThumbPointerDown:Ut(o),children:P.jsx(De.div,{...d,ref:y,style:{position:"absolute",...d.style},onPointerDown:me(t.onPointerDown,T=>{T.button===0&&(T.target.setPointerCapture(T.pointerId),g.current=p.getBoundingClientRect(),v.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",m.viewport&&(m.viewport.style.scrollBehavior="auto"),E(T))}),onPointerMove:me(t.onPointerMove,E),onPointerUp:me(t.onPointerUp,T=>{const D=T.target;D.hasPointerCapture(T.pointerId)&&D.releasePointerCapture(T.pointerId),document.body.style.webkitUserSelect=v.current,m.viewport&&(m.viewport.style.scrollBehavior=""),g.current=null})})})}),R1="ScrollAreaThumb",X9=_.forwardRef((t,e)=>{const{forceMount:n,...r}=t,s=K9(R1,t.__scopeScrollArea);return P.jsx(Hn,{present:n||s.hasThumb,children:P.jsx(xDe,{ref:e,...r})})}),xDe=_.forwardRef((t,e)=>{const{__scopeScrollArea:n,style:r,...s}=t,i=qo(R1,n),a=K9(R1,n),{onThumbPositionChange:o}=a,c=tt(e,l=>a.onThumbChange(l)),u=_.useRef(),f=AA(()=>{u.current&&(u.current(),u.current=void 0)},100);return _.useEffect(()=>{const l=i.viewport;if(l){const d=()=>{if(f(),!u.current){const m=CDe(l,o);u.current=m,o()}};return o(),l.addEventListener("scroll",d),()=>l.removeEventListener("scroll",d)}},[i.viewport,f,o]),P.jsx(De.div,{"data-state":a.hasThumb?"visible":"hidden",...s,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:me(t.onPointerDownCapture,l=>{const m=l.target.getBoundingClientRect(),p=l.clientX-m.left,h=l.clientY-m.top;a.onThumbPointerDown({x:p,y:h})}),onPointerUp:me(t.onPointerUp,a.onThumbPointerUp)})});X9.displayName=R1;var y$="ScrollAreaCorner",Q9=_.forwardRef((t,e)=>{const n=qo(y$,t.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?P.jsx(SDe,{...t,ref:e}):null});Q9.displayName=y$;var SDe=_.forwardRef((t,e)=>{const{__scopeScrollArea:n,...r}=t,s=qo(y$,n),[i,a]=_.useState(0),[o,c]=_.useState(0),u=!!(i&&o);return hv(s.scrollbarX,()=>{var l;const f=((l=s.scrollbarX)==null?void 0:l.offsetHeight)||0;s.onCornerHeightChange(f),c(f)}),hv(s.scrollbarY,()=>{var l;const f=((l=s.scrollbarY)==null?void 0:l.offsetWidth)||0;s.onCornerWidthChange(f),a(f)}),u?P.jsx(De.div,{...r,ref:e,style:{width:i,height:o,position:"absolute",right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:0,...t.style}}):null});function P1(t){return t?parseInt(t,10):0}function J9(t,e){const n=t/e;return isNaN(n)?0:n}function CA(t){const e=J9(t.viewport,t.content),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,r=(t.scrollbar.size-n)*e;return Math.max(r,18)}function EDe(t,e,n,r="ltr"){const s=CA(n),i=s/2,a=e||i,o=s-a,c=n.scrollbar.paddingStart+a,u=n.scrollbar.size-n.scrollbar.paddingEnd-o,f=n.content-n.viewport,l=r==="ltr"?[0,f]:[f*-1,0];return Z9([c,u],l)(t)}function t4(t,e,n="ltr"){const r=CA(e),s=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,i=e.scrollbar.size-s,a=e.content-e.viewport,o=i-r,c=n==="ltr"?[0,a]:[a*-1,0],u=nw(t,c);return Z9([0,a],[0,o])(u)}function Z9(t,e){return n=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const r=(e[1]-e[0])/(t[1]-t[0]);return e[0]+r*(n-t[0])}}function eY(t,e){return t>0&&t{})=>{let n={left:t.scrollLeft,top:t.scrollTop},r=0;return function s(){const i={left:t.scrollLeft,top:t.scrollTop},a=n.left!==i.left,o=n.top!==i.top;(a||o)&&e(),n=i,r=window.requestAnimationFrame(s)}(),()=>window.cancelAnimationFrame(r)};function AA(t,e){const n=Ut(t),r=_.useRef(0);return _.useEffect(()=>()=>window.clearTimeout(r.current),[]),_.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,e)},[n,e])}function hv(t,e){const n=Ut(e);Ln(()=>{let r=0;if(t){const s=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return s.observe(t),()=>{window.cancelAnimationFrame(r),s.unobserve(t)}}},[t,n])}var tY=W9,ADe=q9,RDe=Q9;const PDe=_.forwardRef(({className:t,children:e,...n},r)=>P.jsxs(tY,{ref:r,className:ce("relative overflow-hidden",t),...n,children:[P.jsx(ADe,{className:"h-full w-full rounded-[inherit]",children:e}),P.jsx(nY,{}),P.jsx(RDe,{})]}));PDe.displayName=tY.displayName;const nY=_.forwardRef(({className:t,orientation:e="vertical",...n},r)=>P.jsx(g$,{ref:r,orientation:e,className:ce("flex touch-none select-none transition-colors",e==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",e==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",t),...n,children:P.jsx(X9,{className:"relative flex-1 rounded-full bg-border"})}));nY.displayName=g$.displayName;var TDe=[" ","Enter","ArrowUp","ArrowDown"],kDe=[" ","Enter"],N_="Select",[RA,PA,DDe]=Xc(N_),[Ov,n5e]=Tn(N_,[DDe,Rl]),TA=Rl(),[NDe,Bd]=Ov(N_),[MDe,ODe]=Ov(N_),rY=t=>{const{__scopeSelect:e,children:n,open:r,defaultOpen:s,onOpenChange:i,value:a,defaultValue:o,onValueChange:c,dir:u,name:f,autoComplete:l,disabled:d,required:m}=t,p=TA(e),[h,y]=_.useState(null),[g,v]=_.useState(null),[w,x]=_.useState(!1),A=Ma(u),[k=!1,R]=sr({prop:r,defaultProp:s,onChange:i}),[E,T]=sr({prop:a,defaultProp:o,onChange:c}),D=_.useRef(null),M=h?!!h.closest("form"):!0,[L,I]=_.useState(new Set),j=Array.from(L).map(U=>U.props.value).join(";");return P.jsx(dA,{...p,children:P.jsxs(NDe,{required:m,scope:e,trigger:h,onTriggerChange:y,valueNode:g,onValueNodeChange:v,valueNodeHasChildren:w,onValueNodeHasChildrenChange:x,contentId:Vr(),value:E,onValueChange:T,open:k,onOpenChange:R,dir:A,triggerPointerDownPosRef:D,disabled:d,children:[P.jsx(RA.Provider,{scope:e,children:P.jsx(MDe,{scope:t.__scopeSelect,onNativeOptionAdd:_.useCallback(U=>{I(Y=>new Set(Y).add(U))},[]),onNativeOptionRemove:_.useCallback(U=>{I(Y=>{const W=new Set(Y);return W.delete(U),W})},[]),children:n})}),M?P.jsxs(PY,{"aria-hidden":!0,required:m,tabIndex:-1,name:f,autoComplete:l,value:E,onChange:U=>T(U.target.value),disabled:d,children:[E===void 0?P.jsx("option",{value:""}):null,Array.from(L)]},j):null]})})};rY.displayName=N_;var sY="SelectTrigger",iY=_.forwardRef((t,e)=>{const{__scopeSelect:n,disabled:r=!1,...s}=t,i=TA(n),a=Bd(sY,n),o=a.disabled||r,c=tt(e,a.onTriggerChange),u=PA(n),[f,l,d]=TY(p=>{const h=u().filter(v=>!v.disabled),y=h.find(v=>v.value===a.value),g=kY(h,p,y);g!==void 0&&a.onValueChange(g.value)}),m=()=>{o||(a.onOpenChange(!0),d())};return P.jsx(Dv,{asChild:!0,...i,children:P.jsx(De.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:o,"data-disabled":o?"":void 0,"data-placeholder":RY(a.value)?"":void 0,...s,ref:c,onClick:me(s.onClick,p=>{p.currentTarget.focus()}),onPointerDown:me(s.onPointerDown,p=>{const h=p.target;h.hasPointerCapture(p.pointerId)&&h.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&(m(),a.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)},p.preventDefault())}),onKeyDown:me(s.onKeyDown,p=>{const h=f.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&l(p.key),!(h&&p.key===" ")&&TDe.includes(p.key)&&(m(),p.preventDefault())})})})});iY.displayName=sY;var oY="SelectValue",aY=_.forwardRef((t,e)=>{const{__scopeSelect:n,className:r,style:s,children:i,placeholder:a="",...o}=t,c=Bd(oY,n),{onValueNodeHasChildrenChange:u}=c,f=i!==void 0,l=tt(e,c.onValueNodeChange);return Ln(()=>{u(f)},[u,f]),P.jsx(De.span,{...o,ref:l,style:{pointerEvents:"none"},children:RY(c.value)?P.jsx(P.Fragment,{children:a}):i})});aY.displayName=oY;var LDe="SelectIcon",lY=_.forwardRef((t,e)=>{const{__scopeSelect:n,children:r,...s}=t;return P.jsx(De.span,{"aria-hidden":!0,...s,ref:e,children:r||"▼"})});lY.displayName=LDe;var IDe="SelectPortal",cY=t=>P.jsx(Sv,{asChild:!0,...t});cY.displayName=IDe;var tp="SelectContent",uY=_.forwardRef((t,e)=>{const n=Bd(tp,t.__scopeSelect),[r,s]=_.useState();if(Ln(()=>{s(new DocumentFragment)},[]),!n.open){const i=r;return i?Ns.createPortal(P.jsx(dY,{scope:t.__scopeSelect,children:P.jsx(RA.Slot,{scope:t.__scopeSelect,children:P.jsx("div",{children:t.children})})}),i):null}return P.jsx(fY,{...t,ref:e})});uY.displayName=tp;var Ql=10,[dY,Ud]=Ov(tp),$De="SelectContentImpl",fY=_.forwardRef((t,e)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:i,onPointerDownOutside:a,side:o,sideOffset:c,align:u,alignOffset:f,arrowPadding:l,collisionBoundary:d,collisionPadding:m,sticky:p,hideWhenDetached:h,avoidCollisions:y,...g}=t,v=Bd(tp,n),[w,x]=_.useState(null),[A,k]=_.useState(null),R=tt(e,ie=>x(ie)),[E,T]=_.useState(null),[D,M]=_.useState(null),L=PA(n),[I,j]=_.useState(!1),U=_.useRef(!1);_.useEffect(()=>{if(w)return Ev(w)},[w]),FC();const Y=_.useCallback(ie=>{const[be,...Ae]=L().map(Ne=>Ne.ref.current),[_e]=Ae.slice(-1),Oe=document.activeElement;for(const Ne of ie)if(Ne===Oe||(Ne==null||Ne.scrollIntoView({block:"nearest"}),Ne===be&&A&&(A.scrollTop=0),Ne===_e&&A&&(A.scrollTop=A.scrollHeight),Ne==null||Ne.focus(),document.activeElement!==Oe))return},[L,A]),W=_.useCallback(()=>Y([E,w]),[Y,E,w]);_.useEffect(()=>{I&&W()},[I,W]);const{onOpenChange:H,triggerPointerDownPosRef:ee}=v;_.useEffect(()=>{if(w){let ie={x:0,y:0};const be=_e=>{var Oe,Ne;ie={x:Math.abs(Math.round(_e.pageX)-(((Oe=ee.current)==null?void 0:Oe.x)??0)),y:Math.abs(Math.round(_e.pageY)-(((Ne=ee.current)==null?void 0:Ne.y)??0))}},Ae=_e=>{ie.x<=10&&ie.y<=10?_e.preventDefault():w.contains(_e.target)||H(!1),document.removeEventListener("pointermove",be),ee.current=null};return ee.current!==null&&(document.addEventListener("pointermove",be),document.addEventListener("pointerup",Ae,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",be),document.removeEventListener("pointerup",Ae,{capture:!0})}}},[w,H,ee]),_.useEffect(()=>{const ie=()=>H(!1);return window.addEventListener("blur",ie),window.addEventListener("resize",ie),()=>{window.removeEventListener("blur",ie),window.removeEventListener("resize",ie)}},[H]);const[re,X]=TY(ie=>{const be=L().filter(Oe=>!Oe.disabled),Ae=be.find(Oe=>Oe.ref.current===document.activeElement),_e=kY(be,ie,Ae);_e&&setTimeout(()=>_e.ref.current.focus())}),G=_.useCallback((ie,be,Ae)=>{const _e=!U.current&&!Ae;(v.value!==void 0&&v.value===be||_e)&&(T(ie),_e&&(U.current=!0))},[v.value]),K=_.useCallback(()=>w==null?void 0:w.focus(),[w]),J=_.useCallback((ie,be,Ae)=>{const _e=!U.current&&!Ae;(v.value!==void 0&&v.value===be||_e)&&M(ie)},[v.value]),ue=r==="popper"?gN:hY,de=ue===gN?{side:o,sideOffset:c,align:u,alignOffset:f,arrowPadding:l,collisionBoundary:d,collisionPadding:m,sticky:p,hideWhenDetached:h,avoidCollisions:y}:{};return P.jsx(dY,{scope:n,content:w,viewport:A,onViewportChange:k,itemRefCallback:G,selectedItem:E,onItemLeave:K,itemTextRefCallback:J,focusSelectedItem:W,selectedItemText:D,position:r,isPositioned:I,searchRef:re,children:P.jsx(o_,{as:Ra,allowPinchZoom:!0,children:P.jsx(i_,{asChild:!0,trapped:v.open,onMountAutoFocus:ie=>{ie.preventDefault()},onUnmountAutoFocus:me(s,ie=>{var be;(be=v.trigger)==null||be.focus({preventScroll:!0}),ie.preventDefault()}),children:P.jsx(Jc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:ie=>ie.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:P.jsx(ue,{role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:ie=>ie.preventDefault(),...g,...de,onPlaced:()=>j(!0),ref:R,style:{display:"flex",flexDirection:"column",outline:"none",...g.style},onKeyDown:me(g.onKeyDown,ie=>{const be=ie.ctrlKey||ie.altKey||ie.metaKey;if(ie.key==="Tab"&&ie.preventDefault(),!be&&ie.key.length===1&&X(ie.key),["ArrowUp","ArrowDown","Home","End"].includes(ie.key)){let _e=L().filter(Oe=>!Oe.disabled).map(Oe=>Oe.ref.current);if(["ArrowUp","End"].includes(ie.key)&&(_e=_e.slice().reverse()),["ArrowUp","ArrowDown"].includes(ie.key)){const Oe=ie.target,Ne=_e.indexOf(Oe);_e=_e.slice(Ne+1)}setTimeout(()=>Y(_e)),ie.preventDefault()}})})})})})})});fY.displayName=$De;var jDe="SelectItemAlignedPosition",hY=_.forwardRef((t,e)=>{const{__scopeSelect:n,onPlaced:r,...s}=t,i=Bd(tp,n),a=Ud(tp,n),[o,c]=_.useState(null),[u,f]=_.useState(null),l=tt(e,R=>f(R)),d=PA(n),m=_.useRef(!1),p=_.useRef(!0),{viewport:h,selectedItem:y,selectedItemText:g,focusSelectedItem:v}=a,w=_.useCallback(()=>{if(i.trigger&&i.valueNode&&o&&u&&h&&y&&g){const R=i.trigger.getBoundingClientRect(),E=u.getBoundingClientRect(),T=i.valueNode.getBoundingClientRect(),D=g.getBoundingClientRect();if(i.dir!=="rtl"){const Oe=D.left-E.left,Ne=T.left-Oe,ye=R.left-Ne,$e=R.width+ye,ut=Math.max($e,E.width),Qe=window.innerWidth-Ql,yt=nw(Ne,[Ql,Qe-ut]);o.style.minWidth=$e+"px",o.style.left=yt+"px"}else{const Oe=E.right-D.right,Ne=window.innerWidth-T.right-Oe,ye=window.innerWidth-R.right-Ne,$e=R.width+ye,ut=Math.max($e,E.width),Qe=window.innerWidth-Ql,yt=nw(Ne,[Ql,Qe-ut]);o.style.minWidth=$e+"px",o.style.right=yt+"px"}const M=d(),L=window.innerHeight-Ql*2,I=h.scrollHeight,j=window.getComputedStyle(u),U=parseInt(j.borderTopWidth,10),Y=parseInt(j.paddingTop,10),W=parseInt(j.borderBottomWidth,10),H=parseInt(j.paddingBottom,10),ee=U+Y+I+H+W,re=Math.min(y.offsetHeight*5,ee),X=window.getComputedStyle(h),G=parseInt(X.paddingTop,10),K=parseInt(X.paddingBottom,10),J=R.top+R.height/2-Ql,ue=L-J,de=y.offsetHeight/2,ie=y.offsetTop+de,be=U+Y+ie,Ae=ee-be;if(be<=J){const Oe=y===M[M.length-1].ref.current;o.style.bottom="0px";const Ne=u.clientHeight-h.offsetTop-h.offsetHeight,ye=Math.max(ue,de+(Oe?K:0)+Ne+W),$e=be+ye;o.style.height=$e+"px"}else{const Oe=y===M[0].ref.current;o.style.top="0px";const ye=Math.max(J,U+h.offsetTop+(Oe?G:0)+de)+Ae;o.style.height=ye+"px",h.scrollTop=be-J+h.offsetTop}o.style.margin=`${Ql}px 0`,o.style.minHeight=re+"px",o.style.maxHeight=L+"px",r==null||r(),requestAnimationFrame(()=>m.current=!0)}},[d,i.trigger,i.valueNode,o,u,h,y,g,i.dir,r]);Ln(()=>w(),[w]);const[x,A]=_.useState();Ln(()=>{u&&A(window.getComputedStyle(u).zIndex)},[u]);const k=_.useCallback(R=>{R&&p.current===!0&&(w(),v==null||v(),p.current=!1)},[w,v]);return P.jsx(zDe,{scope:n,contentWrapper:o,shouldExpandOnScrollRef:m,onScrollButtonChange:k,children:P.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:x},children:P.jsx(De.div,{...s,ref:l,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});hY.displayName=jDe;var FDe="SelectPopperPosition",gN=_.forwardRef((t,e)=>{const{__scopeSelect:n,align:r="start",collisionPadding:s=Ql,...i}=t,a=TA(n);return P.jsx(w_,{...a,...i,ref:e,align:r,collisionPadding:s,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});gN.displayName=FDe;var[zDe,b$]=Ov(tp,{}),vN="SelectViewport",pY=_.forwardRef((t,e)=>{const{__scopeSelect:n,nonce:r,...s}=t,i=Ud(vN,n),a=b$(vN,n),o=tt(e,i.onViewportChange),c=_.useRef(0);return P.jsxs(P.Fragment,{children:[P.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),P.jsx(RA.Slot,{scope:n,children:P.jsx(De.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:o,style:{position:"relative",flex:1,overflow:"auto",...s.style},onScroll:me(s.onScroll,u=>{const f=u.currentTarget,{contentWrapper:l,shouldExpandOnScrollRef:d}=a;if(d!=null&&d.current&&l){const m=Math.abs(c.current-f.scrollTop);if(m>0){const p=window.innerHeight-Ql*2,h=parseFloat(l.style.minHeight),y=parseFloat(l.style.height),g=Math.max(h,y);if(g0?x:0,l.style.justifyContent="flex-end")}}}c.current=f.scrollTop})})})]})});pY.displayName=vN;var mY="SelectGroup",[BDe,UDe]=Ov(mY),HDe=_.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,s=Vr();return P.jsx(BDe,{scope:n,id:s,children:P.jsx(De.div,{role:"group","aria-labelledby":s,...r,ref:e})})});HDe.displayName=mY;var gY="SelectLabel",vY=_.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,s=UDe(gY,n);return P.jsx(De.div,{id:s.id,...r,ref:e})});vY.displayName=gY;var T1="SelectItem",[WDe,yY]=Ov(T1),bY=_.forwardRef((t,e)=>{const{__scopeSelect:n,value:r,disabled:s=!1,textValue:i,...a}=t,o=Bd(T1,n),c=Ud(T1,n),u=o.value===r,[f,l]=_.useState(i??""),[d,m]=_.useState(!1),p=tt(e,g=>{var v;return(v=c.itemRefCallback)==null?void 0:v.call(c,g,r,s)}),h=Vr(),y=()=>{s||(o.onValueChange(r),o.onOpenChange(!1))};if(r==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return P.jsx(WDe,{scope:n,value:r,disabled:s,textId:h,isSelected:u,onItemTextChange:_.useCallback(g=>{l(v=>v||((g==null?void 0:g.textContent)??"").trim())},[]),children:P.jsx(RA.ItemSlot,{scope:n,value:r,disabled:s,textValue:f,children:P.jsx(De.div,{role:"option","aria-labelledby":h,"data-highlighted":d?"":void 0,"aria-selected":u&&d,"data-state":u?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...a,ref:p,onFocus:me(a.onFocus,()=>m(!0)),onBlur:me(a.onBlur,()=>m(!1)),onPointerUp:me(a.onPointerUp,y),onPointerMove:me(a.onPointerMove,g=>{var v;s?(v=c.onItemLeave)==null||v.call(c):g.currentTarget.focus({preventScroll:!0})}),onPointerLeave:me(a.onPointerLeave,g=>{var v;g.currentTarget===document.activeElement&&((v=c.onItemLeave)==null||v.call(c))}),onKeyDown:me(a.onKeyDown,g=>{var w;((w=c.searchRef)==null?void 0:w.current)!==""&&g.key===" "||(kDe.includes(g.key)&&y(),g.key===" "&&g.preventDefault())})})})})});bY.displayName=T1;var By="SelectItemText",wY=_.forwardRef((t,e)=>{const{__scopeSelect:n,className:r,style:s,...i}=t,a=Bd(By,n),o=Ud(By,n),c=yY(By,n),u=ODe(By,n),[f,l]=_.useState(null),d=tt(e,g=>l(g),c.onItemTextChange,g=>{var v;return(v=o.itemTextRefCallback)==null?void 0:v.call(o,g,c.value,c.disabled)}),m=f==null?void 0:f.textContent,p=_.useMemo(()=>P.jsx("option",{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:h,onNativeOptionRemove:y}=u;return Ln(()=>(h(p),()=>y(p)),[h,y,p]),P.jsxs(P.Fragment,{children:[P.jsx(De.span,{id:c.textId,...i,ref:d}),c.isSelected&&a.valueNode&&!a.valueNodeHasChildren?Ns.createPortal(i.children,a.valueNode):null]})});wY.displayName=By;var _Y="SelectItemIndicator",xY=_.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t;return yY(_Y,n).isSelected?P.jsx(De.span,{"aria-hidden":!0,...r,ref:e}):null});xY.displayName=_Y;var yN="SelectScrollUpButton",SY=_.forwardRef((t,e)=>{const n=Ud(yN,t.__scopeSelect),r=b$(yN,t.__scopeSelect),[s,i]=_.useState(!1),a=tt(e,r.onScrollButtonChange);return Ln(()=>{if(n.viewport&&n.isPositioned){let o=function(){const u=c.scrollTop>0;i(u)};const c=n.viewport;return o(),c.addEventListener("scroll",o),()=>c.removeEventListener("scroll",o)}},[n.viewport,n.isPositioned]),s?P.jsx(CY,{...t,ref:a,onAutoScroll:()=>{const{viewport:o,selectedItem:c}=n;o&&c&&(o.scrollTop=o.scrollTop-c.offsetHeight)}}):null});SY.displayName=yN;var bN="SelectScrollDownButton",EY=_.forwardRef((t,e)=>{const n=Ud(bN,t.__scopeSelect),r=b$(bN,t.__scopeSelect),[s,i]=_.useState(!1),a=tt(e,r.onScrollButtonChange);return Ln(()=>{if(n.viewport&&n.isPositioned){let o=function(){const u=c.scrollHeight-c.clientHeight,f=Math.ceil(c.scrollTop)c.removeEventListener("scroll",o)}},[n.viewport,n.isPositioned]),s?P.jsx(CY,{...t,ref:a,onAutoScroll:()=>{const{viewport:o,selectedItem:c}=n;o&&c&&(o.scrollTop=o.scrollTop+c.offsetHeight)}}):null});EY.displayName=bN;var CY=_.forwardRef((t,e)=>{const{__scopeSelect:n,onAutoScroll:r,...s}=t,i=Ud("SelectScrollButton",n),a=_.useRef(null),o=PA(n),c=_.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return _.useEffect(()=>()=>c(),[c]),Ln(()=>{var f;const u=o().find(l=>l.ref.current===document.activeElement);(f=u==null?void 0:u.ref.current)==null||f.scrollIntoView({block:"nearest"})},[o]),P.jsx(De.div,{"aria-hidden":!0,...s,ref:e,style:{flexShrink:0,...s.style},onPointerDown:me(s.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:me(s.onPointerMove,()=>{var u;(u=i.onItemLeave)==null||u.call(i),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:me(s.onPointerLeave,()=>{c()})})}),VDe="SelectSeparator",AY=_.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t;return P.jsx(De.div,{"aria-hidden":!0,...r,ref:e})});AY.displayName=VDe;var wN="SelectArrow",qDe=_.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,s=TA(n),i=Bd(wN,n),a=Ud(wN,n);return i.open&&a.position==="popper"?P.jsx(__,{...s,...r,ref:e}):null});qDe.displayName=wN;function RY(t){return t===""||t===void 0}var PY=_.forwardRef((t,e)=>{const{value:n,...r}=t,s=_.useRef(null),i=tt(e,s),a=Pv(n);return _.useEffect(()=>{const o=s.current,c=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(c,"value").set;if(a!==n&&f){const l=new Event("change",{bubbles:!0});f.call(o,n),o.dispatchEvent(l)}},[a,n]),P.jsx(k_,{asChild:!0,children:P.jsx("select",{...r,ref:i,defaultValue:n})})});PY.displayName="BubbleSelect";function TY(t){const e=Ut(t),n=_.useRef(""),r=_.useRef(0),s=_.useCallback(a=>{const o=n.current+a;e(o),function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(o)},[e]),i=_.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return _.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,s,i]}function kY(t,e,n){const s=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,i=n?t.indexOf(n):-1;let a=GDe(t,Math.max(i,0));s.length===1&&(a=a.filter(u=>u!==n));const c=a.find(u=>u.textValue.toLowerCase().startsWith(s.toLowerCase()));return c!==n?c:void 0}function GDe(t,e){return t.map((n,r)=>t[(e+r)%t.length])}var KDe=rY,DY=iY,YDe=aY,XDe=lY,QDe=cY,NY=uY,JDe=pY,MY=vY,OY=bY,ZDe=wY,eNe=xY,LY=SY,IY=EY,$Y=AY;const r5e=KDe,s5e=YDe,tNe=_.forwardRef(({className:t,children:e,...n},r)=>P.jsxs(DY,{ref:r,className:ce("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...n,children:[e,P.jsx(XDe,{asChild:!0,children:P.jsx($C,{className:"h-4 w-4 opacity-50"})})]}));tNe.displayName=DY.displayName;const jY=_.forwardRef(({className:t,...e},n)=>P.jsx(LY,{ref:n,className:ce("flex cursor-default items-center justify-center py-1",t),...e,children:P.jsx(Pfe,{className:"h-4 w-4"})}));jY.displayName=LY.displayName;const FY=_.forwardRef(({className:t,...e},n)=>P.jsx(IY,{ref:n,className:ce("flex cursor-default items-center justify-center py-1",t),...e,children:P.jsx($C,{className:"h-4 w-4"})}));FY.displayName=IY.displayName;const nNe=_.forwardRef(({className:t,children:e,position:n="popper",...r},s)=>P.jsx(QDe,{children:P.jsxs(NY,{ref:s,className:ce("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:n,...r,children:[P.jsx(jY,{}),P.jsx(JDe,{className:ce("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),P.jsx(FY,{})]})}));nNe.displayName=NY.displayName;const rNe=_.forwardRef(({className:t,...e},n)=>P.jsx(MY,{ref:n,className:ce("py-1.5 pl-8 pr-2 text-sm font-semibold",t),...e}));rNe.displayName=MY.displayName;const sNe=_.forwardRef(({className:t,children:e,...n},r)=>P.jsxs(OY,{ref:r,className:ce("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...n,children:[P.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:P.jsx(eNe,{children:P.jsx(r_,{className:"h-4 w-4"})})}),P.jsx(ZDe,{children:e})]}));sNe.displayName=OY.displayName;const iNe=_.forwardRef(({className:t,...e},n)=>P.jsx($Y,{ref:n,className:ce("-mx-1 my-1 h-px bg-muted",t),...e}));iNe.displayName=$Y.displayName;const oNe=PL,aNe=TL,lNe=kL,zY=_.forwardRef(({className:t,...e},n)=>P.jsx(a_,{className:ce("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",t),...e,ref:n}));zY.displayName=a_.displayName;const cNe=Ho("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),BY=_.forwardRef(({side:t="right",className:e,children:n,...r},s)=>P.jsxs(lNe,{children:[P.jsx(zY,{}),P.jsxs(l_,{ref:s,className:ce(cNe({side:t}),e),...r,children:[n,P.jsxs(d_,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[P.jsx(vL,{className:"h-4 w-4"}),P.jsx("span",{className:"sr-only",children:ft("common.close")})]})]})]}));BY.displayName=l_.displayName;const uNe=_.forwardRef(({className:t,...e},n)=>P.jsx(c_,{ref:n,className:ce("text-lg font-semibold text-foreground",t),...e}));uNe.displayName=c_.displayName;const dNe=_.forwardRef(({className:t,...e},n)=>P.jsx(u_,{ref:n,className:ce("text-sm text-muted-foreground",t),...e}));dNe.displayName=u_.displayName;var UY=["PageUp","PageDown"],HY=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],WY={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Lv="Slider",[_N,fNe,hNe]=Xc(Lv),[VY,i5e]=Tn(Lv,[hNe]),[pNe,kA]=VY(Lv),qY=_.forwardRef((t,e)=>{const{name:n,min:r=0,max:s=100,step:i=1,orientation:a="horizontal",disabled:o=!1,minStepsBetweenThumbs:c=0,defaultValue:u=[r],value:f,onValueChange:l=()=>{},onValueCommit:d=()=>{},inverted:m=!1,...p}=t,h=_.useRef(new Set),y=_.useRef(0),v=a==="horizontal"?mNe:gNe,[w=[],x]=sr({prop:f,defaultProp:u,onChange:D=>{var L;(L=[...h.current][y.current])==null||L.focus(),l(D)}}),A=_.useRef(w);function k(D){const M=_Ne(w,D);T(D,M)}function R(D){T(D,y.current)}function E(){const D=A.current[y.current];w[y.current]!==D&&d(w)}function T(D,M,{commit:L}={commit:!1}){const I=CNe(i),j=ANe(Math.round((D-r)/i)*i+r,I),U=nw(j,[r,s]);x((Y=[])=>{const W=bNe(Y,U,M);if(ENe(W,c*i)){y.current=W.indexOf(U);const H=String(W)!==String(Y);return H&&L&&d(W),H?W:Y}else return Y})}return P.jsx(pNe,{scope:t.__scopeSlider,name:n,disabled:o,min:r,max:s,valueIndexToChangeRef:y,thumbs:h.current,values:w,orientation:a,children:P.jsx(_N.Provider,{scope:t.__scopeSlider,children:P.jsx(_N.Slot,{scope:t.__scopeSlider,children:P.jsx(v,{"aria-disabled":o,"data-disabled":o?"":void 0,...p,ref:e,onPointerDown:me(p.onPointerDown,()=>{o||(A.current=w)}),min:r,max:s,inverted:m,onSlideStart:o?void 0:k,onSlideMove:o?void 0:R,onSlideEnd:o?void 0:E,onHomeKeyDown:()=>!o&&T(r,0,{commit:!0}),onEndKeyDown:()=>!o&&T(s,w.length-1,{commit:!0}),onStepKeyDown:({event:D,direction:M})=>{if(!o){const j=UY.includes(D.key)||D.shiftKey&&HY.includes(D.key)?10:1,U=y.current,Y=w[U],W=i*j*M;T(Y+W,U,{commit:!0})}}})})})})});qY.displayName=Lv;var[GY,KY]=VY(Lv,{startEdge:"left",endEdge:"right",size:"width",direction:1}),mNe=_.forwardRef((t,e)=>{const{min:n,max:r,dir:s,inverted:i,onSlideStart:a,onSlideMove:o,onSlideEnd:c,onStepKeyDown:u,...f}=t,[l,d]=_.useState(null),m=tt(e,w=>d(w)),p=_.useRef(),h=Ma(s),y=h==="ltr",g=y&&!i||!y&&i;function v(w){const x=p.current||l.getBoundingClientRect(),A=[0,x.width],R=w$(A,g?[n,r]:[r,n]);return p.current=x,R(w-x.left)}return P.jsx(GY,{scope:t.__scopeSlider,startEdge:g?"left":"right",endEdge:g?"right":"left",direction:g?1:-1,size:"width",children:P.jsx(YY,{dir:h,"data-orientation":"horizontal",...f,ref:m,style:{...f.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:w=>{const x=v(w.clientX);a==null||a(x)},onSlideMove:w=>{const x=v(w.clientX);o==null||o(x)},onSlideEnd:()=>{p.current=void 0,c==null||c()},onStepKeyDown:w=>{const A=WY[g?"from-left":"from-right"].includes(w.key);u==null||u({event:w,direction:A?-1:1})}})})}),gNe=_.forwardRef((t,e)=>{const{min:n,max:r,inverted:s,onSlideStart:i,onSlideMove:a,onSlideEnd:o,onStepKeyDown:c,...u}=t,f=_.useRef(null),l=tt(e,f),d=_.useRef(),m=!s;function p(h){const y=d.current||f.current.getBoundingClientRect(),g=[0,y.height],w=w$(g,m?[r,n]:[n,r]);return d.current=y,w(h-y.top)}return P.jsx(GY,{scope:t.__scopeSlider,startEdge:m?"bottom":"top",endEdge:m?"top":"bottom",size:"height",direction:m?1:-1,children:P.jsx(YY,{"data-orientation":"vertical",...u,ref:l,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:h=>{const y=p(h.clientY);i==null||i(y)},onSlideMove:h=>{const y=p(h.clientY);a==null||a(y)},onSlideEnd:()=>{d.current=void 0,o==null||o()},onStepKeyDown:h=>{const g=WY[m?"from-bottom":"from-top"].includes(h.key);c==null||c({event:h,direction:g?-1:1})}})})}),YY=_.forwardRef((t,e)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:s,onSlideEnd:i,onHomeKeyDown:a,onEndKeyDown:o,onStepKeyDown:c,...u}=t,f=kA(Lv,n);return P.jsx(De.span,{...u,ref:e,onKeyDown:me(t.onKeyDown,l=>{l.key==="Home"?(a(l),l.preventDefault()):l.key==="End"?(o(l),l.preventDefault()):UY.concat(HY).includes(l.key)&&(c(l),l.preventDefault())}),onPointerDown:me(t.onPointerDown,l=>{const d=l.target;d.setPointerCapture(l.pointerId),l.preventDefault(),f.thumbs.has(d)?d.focus():r(l)}),onPointerMove:me(t.onPointerMove,l=>{l.target.hasPointerCapture(l.pointerId)&&s(l)}),onPointerUp:me(t.onPointerUp,l=>{const d=l.target;d.hasPointerCapture(l.pointerId)&&(d.releasePointerCapture(l.pointerId),i(l))})})}),XY="SliderTrack",QY=_.forwardRef((t,e)=>{const{__scopeSlider:n,...r}=t,s=kA(XY,n);return P.jsx(De.span,{"data-disabled":s.disabled?"":void 0,"data-orientation":s.orientation,...r,ref:e})});QY.displayName=XY;var xN="SliderRange",JY=_.forwardRef((t,e)=>{const{__scopeSlider:n,...r}=t,s=kA(xN,n),i=KY(xN,n),a=_.useRef(null),o=tt(e,a),c=s.values.length,u=s.values.map(d=>eX(d,s.min,s.max)),f=c>1?Math.min(...u):0,l=100-Math.max(...u);return P.jsx(De.span,{"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,...r,ref:o,style:{...t.style,[i.startEdge]:f+"%",[i.endEdge]:l+"%"}})});JY.displayName=xN;var SN="SliderThumb",ZY=_.forwardRef((t,e)=>{const n=fNe(t.__scopeSlider),[r,s]=_.useState(null),i=tt(e,o=>s(o)),a=_.useMemo(()=>r?n().findIndex(o=>o.ref.current===r):-1,[n,r]);return P.jsx(vNe,{...t,ref:i,index:a})}),vNe=_.forwardRef((t,e)=>{const{__scopeSlider:n,index:r,name:s,...i}=t,a=kA(SN,n),o=KY(SN,n),[c,u]=_.useState(null),f=tt(e,v=>u(v)),l=c?!!c.closest("form"):!0,d=v_(c),m=a.values[r],p=m===void 0?0:eX(m,a.min,a.max),h=wNe(r,a.values.length),y=d==null?void 0:d[o.size],g=y?xNe(y,p,o.direction):0;return _.useEffect(()=>{if(c)return a.thumbs.add(c),()=>{a.thumbs.delete(c)}},[c,a.thumbs]),P.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[o.startEdge]:`calc(${p}% + ${g}px)`},children:[P.jsx(_N.ItemSlot,{scope:t.__scopeSlider,children:P.jsx(De.span,{role:"slider","aria-label":t["aria-label"]||h,"aria-valuemin":a.min,"aria-valuenow":m,"aria-valuemax":a.max,"aria-orientation":a.orientation,"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,tabIndex:a.disabled?void 0:0,...i,ref:f,style:m===void 0?{display:"none"}:t.style,onFocus:me(t.onFocus,()=>{a.valueIndexToChangeRef.current=r})})}),l&&P.jsx(yNe,{name:s??(a.name?a.name+(a.values.length>1?"[]":""):void 0),value:m},r)]})});ZY.displayName=SN;var yNe=t=>{const{value:e,...n}=t,r=_.useRef(null),s=Pv(e);return _.useEffect(()=>{const i=r.current,a=window.HTMLInputElement.prototype,c=Object.getOwnPropertyDescriptor(a,"value").set;if(s!==e&&c){const u=new Event("input",{bubbles:!0});c.call(i,e),i.dispatchEvent(u)}},[s,e]),P.jsx("input",{style:{display:"none"},...n,ref:r,defaultValue:e})};function bNe(t=[],e,n){const r=[...t];return r[n]=e,r.sort((s,i)=>s-i)}function eX(t,e,n){const i=100/(n-e)*(t-e);return nw(i,[0,100])}function wNe(t,e){return e>2?`Value ${t+1} of ${e}`:e===2?["Minimum","Maximum"][t]:void 0}function _Ne(t,e){if(t.length===1)return 0;const n=t.map(s=>Math.abs(s-e)),r=Math.min(...n);return n.indexOf(r)}function xNe(t,e,n){const r=t/2,i=w$([0,50],[0,r]);return(r-i(e)*n)*n}function SNe(t){return t.slice(0,-1).map((e,n)=>t[n+1]-e)}function ENe(t,e){if(e>0){const n=SNe(t);return Math.min(...n)>=e}return!0}function w$(t,e){return n=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const r=(e[1]-e[0])/(t[1]-t[0]);return e[0]+r*(n-t[0])}}function CNe(t){return(String(t).split(".")[1]||"").length}function ANe(t,e){const n=Math.pow(10,e);return Math.round(t*n)/n}var tX=qY,RNe=QY,PNe=JY,TNe=ZY;const kNe=_.forwardRef(({className:t,...e},n)=>P.jsxs(tX,{ref:n,className:ce("relative flex w-full touch-none select-none items-center",t),...e,children:[P.jsx(RNe,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:P.jsx(PNe,{className:"absolute h-full bg-primary"})}),P.jsx(TNe,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})]}));kNe.displayName=tX.displayName;var _$="Switch",[DNe,o5e]=Tn(_$),[NNe,MNe]=DNe(_$),nX=_.forwardRef((t,e)=>{const{__scopeSwitch:n,name:r,checked:s,defaultChecked:i,required:a,disabled:o,value:c="on",onCheckedChange:u,...f}=t,[l,d]=_.useState(null),m=tt(e,v=>d(v)),p=_.useRef(!1),h=l?!!l.closest("form"):!0,[y=!1,g]=sr({prop:s,defaultProp:i,onChange:u});return P.jsxs(NNe,{scope:n,checked:y,disabled:o,children:[P.jsx(De.button,{type:"button",role:"switch","aria-checked":y,"aria-required":a,"data-state":iX(y),"data-disabled":o?"":void 0,disabled:o,value:c,...f,ref:m,onClick:me(t.onClick,v=>{g(w=>!w),h&&(p.current=v.isPropagationStopped(),p.current||v.stopPropagation())})}),h&&P.jsx(ONe,{control:l,bubbles:!p.current,name:r,value:c,checked:y,required:a,disabled:o,style:{transform:"translateX(-100%)"}})]})});nX.displayName=_$;var rX="SwitchThumb",sX=_.forwardRef((t,e)=>{const{__scopeSwitch:n,...r}=t,s=MNe(rX,n);return P.jsx(De.span,{"data-state":iX(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:e})});sX.displayName=rX;var ONe=t=>{const{control:e,checked:n,bubbles:r=!0,...s}=t,i=_.useRef(null),a=Pv(n),o=v_(e);return _.useEffect(()=>{const c=i.current,u=window.HTMLInputElement.prototype,l=Object.getOwnPropertyDescriptor(u,"checked").set;if(a!==n&&l){const d=new Event("click",{bubbles:r});l.call(c,n),c.dispatchEvent(d)}},[a,n,r]),P.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...s,tabIndex:-1,ref:i,style:{...t.style,...o,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function iX(t){return t?"checked":"unchecked"}var oX=nX,LNe=sX;const INe=_.forwardRef(({className:t,...e},n)=>P.jsx(oX,{className:ce("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",t),...e,ref:n,children:P.jsx(LNe,{className:ce("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));INe.displayName=oX.displayName;const $Ne=_.forwardRef(({className:t,...e},n)=>P.jsx("div",{className:"relative w-full overflow-auto",children:P.jsx("table",{ref:n,className:ce("w-full caption-bottom text-sm",t),...e})}));$Ne.displayName="Table";const jNe=_.forwardRef(({className:t,...e},n)=>P.jsx("thead",{ref:n,className:ce("[&_tr]:border-b",t),...e}));jNe.displayName="TableHeader";const FNe=_.forwardRef(({className:t,...e},n)=>P.jsx("tbody",{ref:n,className:ce("[&_tr:last-child]:border-0",t),...e}));FNe.displayName="TableBody";const zNe=_.forwardRef(({className:t,...e},n)=>P.jsx("tfoot",{ref:n,className:ce("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",t),...e}));zNe.displayName="TableFooter";const BNe=_.forwardRef(({className:t,...e},n)=>P.jsx("tr",{ref:n,className:ce("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",t),...e}));BNe.displayName="TableRow";const UNe=_.forwardRef(({className:t,...e},n)=>P.jsx("th",{ref:n,className:ce("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",t),...e}));UNe.displayName="TableHead";const HNe=_.forwardRef(({className:t,...e},n)=>P.jsx("td",{ref:n,className:ce("py-2 px-4 align-middle [&:has([role=checkbox])]:pr-0",t),...e}));HNe.displayName="TableCell";const WNe=_.forwardRef(({className:t,...e},n)=>P.jsx("caption",{ref:n,className:ce("mt-4 text-sm text-muted-foreground",t),...e}));WNe.displayName="TableCaption";var x$="Tabs",[VNe,a5e]=Tn(x$,[Pl]),aX=Pl(),[qNe,S$]=VNe(x$),lX=_.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,onValueChange:s,defaultValue:i,orientation:a="horizontal",dir:o,activationMode:c="automatic",...u}=t,f=Ma(o),[l,d]=sr({prop:r,onChange:s,defaultProp:i});return P.jsx(qNe,{scope:n,baseId:Vr(),value:l,onValueChange:d,orientation:a,dir:f,activationMode:c,children:P.jsx(De.div,{dir:f,"data-orientation":a,...u,ref:e})})});lX.displayName=x$;var cX="TabsList",uX=_.forwardRef((t,e)=>{const{__scopeTabs:n,loop:r=!0,...s}=t,i=S$(cX,n),a=aX(n);return P.jsx(x_,{asChild:!0,...a,orientation:i.orientation,dir:i.dir,loop:r,children:P.jsx(De.div,{role:"tablist","aria-orientation":i.orientation,...s,ref:e})})});uX.displayName=cX;var dX="TabsTrigger",fX=_.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,disabled:s=!1,...i}=t,a=S$(dX,n),o=aX(n),c=mX(a.baseId,r),u=gX(a.baseId,r),f=r===a.value;return P.jsx(S_,{asChild:!0,...o,focusable:!s,active:f,children:P.jsx(De.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":u,"data-state":f?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:c,...i,ref:e,onMouseDown:me(t.onMouseDown,l=>{!s&&l.button===0&&l.ctrlKey===!1?a.onValueChange(r):l.preventDefault()}),onKeyDown:me(t.onKeyDown,l=>{[" ","Enter"].includes(l.key)&&a.onValueChange(r)}),onFocus:me(t.onFocus,()=>{const l=a.activationMode!=="manual";!f&&!s&&l&&a.onValueChange(r)})})})});fX.displayName=dX;var hX="TabsContent",pX=_.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,forceMount:s,children:i,...a}=t,o=S$(hX,n),c=mX(o.baseId,r),u=gX(o.baseId,r),f=r===o.value,l=_.useRef(f);return _.useEffect(()=>{const d=requestAnimationFrame(()=>l.current=!1);return()=>cancelAnimationFrame(d)},[]),P.jsx(Hn,{present:s||f,children:({present:d})=>P.jsx(De.div,{"data-state":f?"active":"inactive","data-orientation":o.orientation,role:"tabpanel","aria-labelledby":c,hidden:!d,id:u,tabIndex:0,...a,ref:e,style:{...t.style,animationDuration:l.current?"0s":void 0},children:d&&i})})});pX.displayName=hX;function mX(t,e){return`${t}-trigger-${e}`}function gX(t,e){return`${t}-content-${e}`}var GNe=lX,vX=uX,yX=fX,bX=pX;const l5e=GNe,KNe=_.forwardRef(({className:t,...e},n)=>P.jsx(vX,{ref:n,className:ce("inline-flex h-9 items-center justify-center rounded-lg bg-accent p-1 text-muted-foreground",t),...e}));KNe.displayName=vX.displayName;const YNe=_.forwardRef(({className:t,...e},n)=>P.jsx(yX,{ref:n,className:ce("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",t),...e}));YNe.displayName=yX.displayName;const XNe=_.forwardRef(({className:t,...e},n)=>P.jsx(bX,{ref:n,className:ce("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t),...e}));XNe.displayName=bX.displayName;const wX=_.forwardRef(({className:t,...e},n)=>P.jsx("textarea",{className:ce("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground/75 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),ref:n,...e}));wX.displayName="Textarea";var E$="ToastProvider",[C$,QNe,JNe]=Xc("Toast"),[_X,c5e]=Tn("Toast",[JNe]),[ZNe,DA]=_X(E$),xX=t=>{const{__scopeToast:e,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:a}=t,[o,c]=_.useState(null),[u,f]=_.useState(0),l=_.useRef(!1),d=_.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${E$}\`. Expected non-empty \`string\`.`),P.jsx(C$.Provider,{scope:e,children:P.jsx(ZNe,{scope:e,label:n,duration:r,swipeDirection:s,swipeThreshold:i,toastCount:u,viewport:o,onViewportChange:c,onToastAdd:_.useCallback(()=>f(m=>m+1),[]),onToastRemove:_.useCallback(()=>f(m=>m-1),[]),isFocusedToastEscapeKeyDownRef:l,isClosePausedRef:d,children:a})})};xX.displayName=E$;var SX="ToastViewport",eMe=["F8"],EN="toast.viewportPause",CN="toast.viewportResume",EX=_.forwardRef((t,e)=>{const{__scopeToast:n,hotkey:r=eMe,label:s="Notifications ({hotkey})",...i}=t,a=DA(SX,n),o=QNe(n),c=_.useRef(null),u=_.useRef(null),f=_.useRef(null),l=_.useRef(null),d=tt(e,l,a.onViewportChange),m=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),p=a.toastCount>0;_.useEffect(()=>{const y=g=>{var w;r.every(x=>g[x]||g.code===x)&&((w=l.current)==null||w.focus())};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[r]),_.useEffect(()=>{const y=c.current,g=l.current;if(p&&y&&g){const v=()=>{if(!a.isClosePausedRef.current){const k=new CustomEvent(EN);g.dispatchEvent(k),a.isClosePausedRef.current=!0}},w=()=>{if(a.isClosePausedRef.current){const k=new CustomEvent(CN);g.dispatchEvent(k),a.isClosePausedRef.current=!1}},x=k=>{!y.contains(k.relatedTarget)&&w()},A=()=>{y.contains(document.activeElement)||w()};return y.addEventListener("focusin",v),y.addEventListener("focusout",x),y.addEventListener("pointermove",v),y.addEventListener("pointerleave",A),window.addEventListener("blur",v),window.addEventListener("focus",w),()=>{y.removeEventListener("focusin",v),y.removeEventListener("focusout",x),y.removeEventListener("pointermove",v),y.removeEventListener("pointerleave",A),window.removeEventListener("blur",v),window.removeEventListener("focus",w)}}},[p,a.isClosePausedRef]);const h=_.useCallback(({tabbingDirection:y})=>{const v=o().map(w=>{const x=w.ref.current,A=[x,...hMe(x)];return y==="forwards"?A:A.reverse()});return(y==="forwards"?v.reverse():v).flat()},[o]);return _.useEffect(()=>{const y=l.current;if(y){const g=v=>{var A,k,R;const w=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!w){const E=document.activeElement,T=v.shiftKey;if(v.target===y&&T){(A=u.current)==null||A.focus();return}const L=h({tabbingDirection:T?"backwards":"forwards"}),I=L.findIndex(j=>j===E);GT(L.slice(I+1))?v.preventDefault():T?(k=u.current)==null||k.focus():(R=f.current)==null||R.focus()}};return y.addEventListener("keydown",g),()=>y.removeEventListener("keydown",g)}},[o,h]),P.jsxs(Dhe,{ref:c,role:"region","aria-label":s.replace("{hotkey}",m),tabIndex:-1,style:{pointerEvents:p?void 0:"none"},children:[p&&P.jsx(AN,{ref:u,onFocusFromOutsideViewport:()=>{const y=h({tabbingDirection:"forwards"});GT(y)}}),P.jsx(C$.Slot,{scope:n,children:P.jsx(De.ol,{tabIndex:-1,...i,ref:d})}),p&&P.jsx(AN,{ref:f,onFocusFromOutsideViewport:()=>{const y=h({tabbingDirection:"backwards"});GT(y)}})]})});EX.displayName=SX;var CX="ToastFocusProxy",AN=_.forwardRef((t,e)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=t,i=DA(CX,n);return P.jsx(k_,{"aria-hidden":!0,tabIndex:0,...s,ref:e,style:{position:"fixed"},onFocus:a=>{var u;const o=a.relatedTarget;!((u=i.viewport)!=null&&u.contains(o))&&r()}})});AN.displayName=CX;var NA="Toast",tMe="toast.swipeStart",nMe="toast.swipeMove",rMe="toast.swipeCancel",sMe="toast.swipeEnd",AX=_.forwardRef((t,e)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:i,...a}=t,[o=!0,c]=sr({prop:r,defaultProp:s,onChange:i});return P.jsx(Hn,{present:n||o,children:P.jsx(aMe,{open:o,...a,ref:e,onClose:()=>c(!1),onPause:Ut(t.onPause),onResume:Ut(t.onResume),onSwipeStart:me(t.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:me(t.onSwipeMove,u=>{const{x:f,y:l}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${f}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${l}px`)}),onSwipeCancel:me(t.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:me(t.onSwipeEnd,u=>{const{x:f,y:l}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${f}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${l}px`),c(!1)})})})});AX.displayName=NA;var[iMe,oMe]=_X(NA,{onClose(){}}),aMe=_.forwardRef((t,e)=>{const{__scopeToast:n,type:r="foreground",duration:s,open:i,onClose:a,onEscapeKeyDown:o,onPause:c,onResume:u,onSwipeStart:f,onSwipeMove:l,onSwipeCancel:d,onSwipeEnd:m,...p}=t,h=DA(NA,n),[y,g]=_.useState(null),v=tt(e,j=>g(j)),w=_.useRef(null),x=_.useRef(null),A=s||h.duration,k=_.useRef(0),R=_.useRef(A),E=_.useRef(0),{onToastAdd:T,onToastRemove:D}=h,M=Ut(()=>{var U;(y==null?void 0:y.contains(document.activeElement))&&((U=h.viewport)==null||U.focus()),a()}),L=_.useCallback(j=>{!j||j===1/0||(window.clearTimeout(E.current),k.current=new Date().getTime(),E.current=window.setTimeout(M,j))},[M]);_.useEffect(()=>{const j=h.viewport;if(j){const U=()=>{L(R.current),u==null||u()},Y=()=>{const W=new Date().getTime()-k.current;R.current=R.current-W,window.clearTimeout(E.current),c==null||c()};return j.addEventListener(EN,Y),j.addEventListener(CN,U),()=>{j.removeEventListener(EN,Y),j.removeEventListener(CN,U)}}},[h.viewport,A,c,u,L]),_.useEffect(()=>{i&&!h.isClosePausedRef.current&&L(A)},[i,A,h.isClosePausedRef,L]),_.useEffect(()=>(T(),()=>D()),[T,D]);const I=_.useMemo(()=>y?MX(y):null,[y]);return h.viewport?P.jsxs(P.Fragment,{children:[I&&P.jsx(lMe,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:I}),P.jsx(iMe,{scope:n,onClose:M,children:Ns.createPortal(P.jsx(C$.ItemSlot,{scope:n,children:P.jsx(khe,{asChild:!0,onEscapeKeyDown:me(o,()=>{h.isFocusedToastEscapeKeyDownRef.current||M(),h.isFocusedToastEscapeKeyDownRef.current=!1}),children:P.jsx(De.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":h.swipeDirection,...p,ref:v,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:me(t.onKeyDown,j=>{j.key==="Escape"&&(o==null||o(j.nativeEvent),j.nativeEvent.defaultPrevented||(h.isFocusedToastEscapeKeyDownRef.current=!0,M()))}),onPointerDown:me(t.onPointerDown,j=>{j.button===0&&(w.current={x:j.clientX,y:j.clientY})}),onPointerMove:me(t.onPointerMove,j=>{if(!w.current)return;const U=j.clientX-w.current.x,Y=j.clientY-w.current.y,W=!!x.current,H=["left","right"].includes(h.swipeDirection),ee=["left","up"].includes(h.swipeDirection)?Math.min:Math.max,re=H?ee(0,U):0,X=H?0:ee(0,Y),G=j.pointerType==="touch"?10:2,K={x:re,y:X},J={originalEvent:j,delta:K};W?(x.current=K,yS(nMe,l,J,{discrete:!1})):n4(K,h.swipeDirection,G)?(x.current=K,yS(tMe,f,J,{discrete:!1}),j.target.setPointerCapture(j.pointerId)):(Math.abs(U)>G||Math.abs(Y)>G)&&(w.current=null)}),onPointerUp:me(t.onPointerUp,j=>{const U=x.current,Y=j.target;if(Y.hasPointerCapture(j.pointerId)&&Y.releasePointerCapture(j.pointerId),x.current=null,w.current=null,U){const W=j.currentTarget,H={originalEvent:j,delta:U};n4(U,h.swipeDirection,h.swipeThreshold)?yS(sMe,m,H,{discrete:!0}):yS(rMe,d,H,{discrete:!0}),W.addEventListener("click",ee=>ee.preventDefault(),{once:!0})}})})})}),h.viewport)})]}):null}),lMe=t=>{const{__scopeToast:e,children:n,...r}=t,s=DA(NA,e),[i,a]=_.useState(!1),[o,c]=_.useState(!1);return dMe(()=>a(!0)),_.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),o?null:P.jsx(Sv,{asChild:!0,children:P.jsx(k_,{...r,children:i&&P.jsxs(P.Fragment,{children:[s.label," ",n]})})})},cMe="ToastTitle",RX=_.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return P.jsx(De.div,{...r,ref:e})});RX.displayName=cMe;var uMe="ToastDescription",PX=_.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return P.jsx(De.div,{...r,ref:e})});PX.displayName=uMe;var TX="ToastAction",kX=_.forwardRef((t,e)=>{const{altText:n,...r}=t;return n.trim()?P.jsx(NX,{altText:n,asChild:!0,children:P.jsx(A$,{...r,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${TX}\`. Expected non-empty \`string\`.`),null)});kX.displayName=TX;var DX="ToastClose",A$=_.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t,s=oMe(DX,n);return P.jsx(NX,{asChild:!0,children:P.jsx(De.button,{type:"button",...r,ref:e,onClick:me(t.onClick,s.onClose)})})});A$.displayName=DX;var NX=_.forwardRef((t,e)=>{const{__scopeToast:n,altText:r,...s}=t;return P.jsx(De.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:e})});function MX(t){const e=[];return Array.from(t.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&e.push(r.textContent),fMe(r)){const s=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const a=r.dataset.radixToastAnnounceAlt;a&&e.push(a)}else e.push(...MX(r))}}),e}function yS(t,e,n,{discrete:r}){const s=n.originalEvent.currentTarget,i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});e&&s.addEventListener(t,e,{once:!0}),r?Wb(s,i):s.dispatchEvent(i)}var n4=(t,e,n=0)=>{const r=Math.abs(t.x),s=Math.abs(t.y),i=r>s;return e==="left"||e==="right"?i&&r>n:!i&&s>n};function dMe(t=()=>{}){const e=Ut(t);Ln(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[e])}function fMe(t){return t.nodeType===t.ELEMENT_NODE}function hMe(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function GT(t){const e=document.activeElement;return t.some(n=>n===e?!0:(n.focus(),document.activeElement!==e))}var pMe=xX,OX=EX,LX=AX,IX=RX,$X=PX,jX=kX,FX=A$;const mMe=pMe,zX=_.forwardRef(({className:t,...e},n)=>P.jsx(OX,{ref:n,className:ce("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]",t),...e}));zX.displayName=OX.displayName;const gMe=Ho("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-bottom-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",success:"success bg-green-300 text-success-foreground border-green-400 group"},position:{center:"bottom-0 mx-auto w-auto sm:bottom-0"}},defaultVariants:{variant:"default"}}),BX=_.forwardRef(({className:t,variant:e,...n},r)=>P.jsx(LX,{ref:r,className:ce(gMe({variant:e}),t),...n}));BX.displayName=LX.displayName;const vMe=_.forwardRef(({className:t,...e},n)=>P.jsx(jX,{ref:n,className:ce("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",t),...e}));vMe.displayName=jX.displayName;const UX=_.forwardRef(({className:t,...e},n)=>P.jsx(FX,{ref:n,className:ce("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",t),"toast-close":"",...e,children:P.jsx(vL,{className:"w-4 h-4"})}));UX.displayName=FX.displayName;const HX=_.forwardRef(({className:t,...e},n)=>P.jsx(IX,{ref:n,className:ce("text-sm font-semibold",t),...e}));HX.displayName=IX.displayName;const WX=_.forwardRef(({className:t,...e},n)=>P.jsx($X,{ref:n,className:ce("text-sm opacity-90",t),...e}));WX.displayName=$X.displayName;const yMe=3,bMe=1e6;let KT=0;function wMe(){return KT=(KT+1)%Number.MAX_SAFE_INTEGER,KT.toString()}const YT=new Map,r4=t=>{if(YT.has(t))return;const e=setTimeout(()=>{YT.delete(t),vb({type:"REMOVE_TOAST",toastId:t})},bMe);YT.set(t,e)},_Me=(t,e)=>{switch(e.type){case"ADD_TOAST":return{...t,toasts:[e.toast,...t.toasts].slice(0,yMe)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(n=>n.id===e.toast.id?{...n,...e.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=e;return n?r4(n):t.toasts.forEach(r=>{r4(r.id)}),{...t,toasts:t.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(n=>n.id!==e.toastId)}}},GS=[];let KS={toasts:[]};function vb(t){KS=_Me(KS,t),GS.forEach(e=>{e(KS)})}function xMe({...t}){const e=wMe(),n=s=>vb({type:"UPDATE_TOAST",toast:{...s,id:e}}),r=()=>vb({type:"DISMISS_TOAST",toastId:e});return vb({type:"ADD_TOAST",toast:{...t,id:e,open:!0,onOpenChange:s=>{s||r()}}}),{id:e,dismiss:r,update:n}}function VX(){const[t,e]=_.useState(KS);return _.useEffect(()=>(GS.push(e),()=>{const n=GS.indexOf(e);n>-1&&GS.splice(n,1)}),[t]),{...t,toast:xMe,dismiss:n=>vb({type:"DISMISS_TOAST",toastId:n})}}function qX(){const{toasts:t}=VX();return P.jsxs(mMe,{swipeDirection:"down",children:[t.map(function({id:e,title:n,description:r,action:s,...i}){return P.jsxs(BX,{...i,children:[P.jsxs("div",{className:"grid gap-1",children:[n&&P.jsx(HX,{children:n}),r&&P.jsx(WX,{children:r})]}),s,P.jsx(UX,{})]},e)}),P.jsx(zX,{className:"bottom-0 w-auto mx-auto sm:bottom-0 sm:left-0 sm:right-0"})]})}var SMe="Toggle",R$=_.forwardRef((t,e)=>{const{pressed:n,defaultPressed:r=!1,onPressedChange:s,...i}=t,[a=!1,o]=sr({prop:n,onChange:s,defaultProp:r});return P.jsx(De.button,{type:"button","aria-pressed":a,"data-state":a?"on":"off","data-disabled":t.disabled?"":void 0,...i,ref:e,onClick:me(t.onClick,()=>{t.disabled||o(!a)})})});R$.displayName=SMe;var GX=R$;const KX=Ho("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-3",sm:"h-9 px-2.5",lg:"h-11 px-5"}},defaultVariants:{variant:"default",size:"default"}}),EMe=_.forwardRef(({className:t,variant:e,size:n,...r},s)=>P.jsx(GX,{ref:s,className:ce(KX({variant:e,size:n,className:t})),...r}));EMe.displayName=GX.displayName;var Iv="ToggleGroup",[YX,u5e]=Tn(Iv,[Pl]),XX=Pl(),P$=se.forwardRef((t,e)=>{const{type:n,...r}=t;if(n==="single"){const s=r;return P.jsx(CMe,{...s,ref:e})}if(n==="multiple"){const s=r;return P.jsx(AMe,{...s,ref:e})}throw new Error(`Missing prop \`type\` expected on \`${Iv}\``)});P$.displayName=Iv;var[QX,JX]=YX(Iv),CMe=se.forwardRef((t,e)=>{const{value:n,defaultValue:r,onValueChange:s=()=>{},...i}=t,[a,o]=sr({prop:n,defaultProp:r,onChange:s});return P.jsx(QX,{scope:t.__scopeToggleGroup,type:"single",value:a?[a]:[],onItemActivate:o,onItemDeactivate:se.useCallback(()=>o(""),[o]),children:P.jsx(ZX,{...i,ref:e})})}),AMe=se.forwardRef((t,e)=>{const{value:n,defaultValue:r,onValueChange:s=()=>{},...i}=t,[a=[],o]=sr({prop:n,defaultProp:r,onChange:s}),c=se.useCallback(f=>o((l=[])=>[...l,f]),[o]),u=se.useCallback(f=>o((l=[])=>l.filter(d=>d!==f)),[o]);return P.jsx(QX,{scope:t.__scopeToggleGroup,type:"multiple",value:a,onItemActivate:c,onItemDeactivate:u,children:P.jsx(ZX,{...i,ref:e})})});P$.displayName=Iv;var[RMe,PMe]=YX(Iv),ZX=se.forwardRef((t,e)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:s=!0,orientation:i,dir:a,loop:o=!0,...c}=t,u=XX(n),f=Ma(a),l={role:"group",dir:f,...c};return P.jsx(RMe,{scope:n,rovingFocus:s,disabled:r,children:s?P.jsx(x_,{asChild:!0,...u,orientation:i,dir:f,loop:o,children:P.jsx(De.div,{...l,ref:e})}):P.jsx(De.div,{...l,ref:e})})}),k1="ToggleGroupItem",eQ=se.forwardRef((t,e)=>{const n=JX(k1,t.__scopeToggleGroup),r=PMe(k1,t.__scopeToggleGroup),s=XX(t.__scopeToggleGroup),i=n.value.includes(t.value),a=r.disabled||t.disabled,o={...t,pressed:i,disabled:a},c=se.useRef(null);return r.rovingFocus?P.jsx(S_,{asChild:!0,...s,focusable:!a,active:i,ref:c,children:P.jsx(s4,{...o,ref:e})}):P.jsx(s4,{...o,ref:e})});eQ.displayName=k1;var s4=se.forwardRef((t,e)=>{const{__scopeToggleGroup:n,value:r,...s}=t,i=JX(k1,n),a={role:"radio","aria-checked":t.pressed,"aria-pressed":void 0},o=i.type==="single"?a:void 0;return P.jsx(R$,{...o,...s,ref:e,onPressedChange:c=>{c?i.onItemActivate(r):i.onItemDeactivate(r)}})}),tQ=P$,nQ=eQ;const rQ=_.createContext({size:"default",variant:"default"}),TMe=_.forwardRef(({className:t,variant:e,size:n,children:r,...s},i)=>P.jsx(tQ,{ref:i,className:ce("flex items-center justify-center gap-1",t),...s,children:P.jsx(rQ.Provider,{value:{variant:e,size:n},children:r})}));TMe.displayName=tQ.displayName;const kMe=_.forwardRef(({className:t,children:e,variant:n,size:r,...s},i)=>{const a=_.useContext(rQ);return P.jsx(nQ,{ref:i,className:ce(KX({variant:a.variant||n,size:a.size||r}),t),...s,children:e})});kMe.displayName=nQ.displayName;var[MA,d5e]=Tn("Tooltip",[Rl]),OA=Rl(),sQ="TooltipProvider",DMe=700,RN="tooltip.open",[NMe,T$]=MA(sQ),iQ=t=>{const{__scopeTooltip:e,delayDuration:n=DMe,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:i}=t,[a,o]=_.useState(!0),c=_.useRef(!1),u=_.useRef(0);return _.useEffect(()=>{const f=u.current;return()=>window.clearTimeout(f)},[]),P.jsx(NMe,{scope:e,isOpenDelayed:a,delayDuration:n,onOpen:_.useCallback(()=>{window.clearTimeout(u.current),o(!1)},[]),onClose:_.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>o(!0),r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:_.useCallback(f=>{c.current=f},[]),disableHoverableContent:s,children:i})};iQ.displayName=sQ;var LA="Tooltip",[MMe,IA]=MA(LA),oQ=t=>{const{__scopeTooltip:e,children:n,open:r,defaultOpen:s=!1,onOpenChange:i,disableHoverableContent:a,delayDuration:o}=t,c=T$(LA,t.__scopeTooltip),u=OA(e),[f,l]=_.useState(null),d=Vr(),m=_.useRef(0),p=a??c.disableHoverableContent,h=o??c.delayDuration,y=_.useRef(!1),[g=!1,v]=sr({prop:r,defaultProp:s,onChange:R=>{R?(c.onOpen(),document.dispatchEvent(new CustomEvent(RN))):c.onClose(),i==null||i(R)}}),w=_.useMemo(()=>g?y.current?"delayed-open":"instant-open":"closed",[g]),x=_.useCallback(()=>{window.clearTimeout(m.current),y.current=!1,v(!0)},[v]),A=_.useCallback(()=>{window.clearTimeout(m.current),v(!1)},[v]),k=_.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{y.current=!0,v(!0)},h)},[h,v]);return _.useEffect(()=>()=>window.clearTimeout(m.current),[]),P.jsx(dA,{...u,children:P.jsx(MMe,{scope:e,contentId:d,open:g,stateAttribute:w,trigger:f,onTriggerChange:l,onTriggerEnter:_.useCallback(()=>{c.isOpenDelayed?k():x()},[c.isOpenDelayed,k,x]),onTriggerLeave:_.useCallback(()=>{p?A():window.clearTimeout(m.current)},[A,p]),onOpen:x,onClose:A,disableHoverableContent:p,children:n})})};oQ.displayName=LA;var PN="TooltipTrigger",aQ=_.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,s=IA(PN,n),i=T$(PN,n),a=OA(n),o=_.useRef(null),c=tt(e,o,s.onTriggerChange),u=_.useRef(!1),f=_.useRef(!1),l=_.useCallback(()=>u.current=!1,[]);return _.useEffect(()=>()=>document.removeEventListener("pointerup",l),[l]),P.jsx(Dv,{asChild:!0,...a,children:P.jsx(De.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:c,onPointerMove:me(t.onPointerMove,d=>{d.pointerType!=="touch"&&!f.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),f.current=!0)}),onPointerLeave:me(t.onPointerLeave,()=>{s.onTriggerLeave(),f.current=!1}),onPointerDown:me(t.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",l,{once:!0})}),onFocus:me(t.onFocus,()=>{u.current||s.onOpen()}),onBlur:me(t.onBlur,s.onClose),onClick:me(t.onClick,s.onClose)})})});aQ.displayName=PN;var OMe="TooltipPortal",[f5e,LMe]=MA(OMe,{forceMount:void 0}),pv="TooltipContent",lQ=_.forwardRef((t,e)=>{const n=LMe(pv,t.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...i}=t,a=IA(pv,t.__scopeTooltip);return P.jsx(Hn,{present:r||a.open,children:a.disableHoverableContent?P.jsx(cQ,{side:s,...i,ref:e}):P.jsx(IMe,{side:s,...i,ref:e})})}),IMe=_.forwardRef((t,e)=>{const n=IA(pv,t.__scopeTooltip),r=T$(pv,t.__scopeTooltip),s=_.useRef(null),i=tt(e,s),[a,o]=_.useState(null),{trigger:c,onClose:u}=n,f=s.current,{onPointerInTransitChange:l}=r,d=_.useCallback(()=>{o(null),l(!1)},[l]),m=_.useCallback((p,h)=>{const y=p.currentTarget,g={x:p.clientX,y:p.clientY},v=zMe(g,y.getBoundingClientRect()),w=BMe(g,v),x=UMe(h.getBoundingClientRect()),A=WMe([...w,...x]);o(A),l(!0)},[l]);return _.useEffect(()=>()=>d(),[d]),_.useEffect(()=>{if(c&&f){const p=y=>m(y,f),h=y=>m(y,c);return c.addEventListener("pointerleave",p),f.addEventListener("pointerleave",h),()=>{c.removeEventListener("pointerleave",p),f.removeEventListener("pointerleave",h)}}},[c,f,m,d]),_.useEffect(()=>{if(a){const p=h=>{const y=h.target,g={x:h.clientX,y:h.clientY},v=(c==null?void 0:c.contains(y))||(f==null?void 0:f.contains(y)),w=!HMe(g,a);v?d():w&&(d(),u())};return document.addEventListener("pointermove",p),()=>document.removeEventListener("pointermove",p)}},[c,f,a,u,d]),P.jsx(cQ,{...t,ref:i})}),[$Me,jMe]=MA(LA,{isInside:!1}),cQ=_.forwardRef((t,e)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:a,...o}=t,c=IA(pv,n),u=OA(n),{onClose:f}=c;return _.useEffect(()=>(document.addEventListener(RN,f),()=>document.removeEventListener(RN,f)),[f]),_.useEffect(()=>{if(c.trigger){const l=d=>{const m=d.target;m!=null&&m.contains(c.trigger)&&f()};return window.addEventListener("scroll",l,{capture:!0}),()=>window.removeEventListener("scroll",l,{capture:!0})}},[c.trigger,f]),P.jsx(Jc,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:l=>l.preventDefault(),onDismiss:f,children:P.jsxs(w_,{"data-state":c.stateAttribute,...u,...o,ref:e,style:{...o.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:[P.jsx(lL,{children:r}),P.jsx($Me,{scope:n,isInside:!0,children:P.jsx(b7,{id:c.contentId,role:"tooltip",children:s||r})})]})})});lQ.displayName=pv;var uQ="TooltipArrow",FMe=_.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,s=OA(n);return jMe(uQ,n).isInside?null:P.jsx(__,{...s,...r,ref:e})});FMe.displayName=uQ;function zMe(t,e){const n=Math.abs(e.top-t.y),r=Math.abs(e.bottom-t.y),s=Math.abs(e.right-t.x),i=Math.abs(e.left-t.x);switch(Math.min(n,r,s,i)){case i:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function BMe(t,e,n=5){const r=[];switch(e){case"top":r.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":r.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":r.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":r.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return r}function UMe(t){const{top:e,right:n,bottom:r,left:s}=t;return[{x:s,y:e},{x:n,y:e},{x:n,y:r},{x:s,y:r}]}function HMe(t,e){const{x:n,y:r}=t;let s=!1;for(let i=0,a=e.length-1;ir!=f>r&&n<(u-o)*(r-c)/(f-c)+o&&(s=!s)}return s}function WMe(t){const e=t.slice();return e.sort((n,r)=>n.xr.x?1:n.yr.y?1:0),VMe(e)}function VMe(t){if(t.length<=1)return t.slice();const e=[];for(let r=0;r=2;){const i=e[e.length-1],a=e[e.length-2];if((i.x-a.x)*(s.y-a.y)>=(i.y-a.y)*(s.x-a.x))e.pop();else break}e.push(s)}e.pop();const n=[];for(let r=t.length-1;r>=0;r--){const s=t[r];for(;n.length>=2;){const i=n[n.length-1],a=n[n.length-2];if((i.x-a.x)*(s.y-a.y)>=(i.y-a.y)*(s.x-a.x))n.pop();else break}n.push(s)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}var qMe=iQ,GMe=oQ,KMe=aQ,dQ=lQ;const YMe=qMe,h5e=GMe,p5e=KMe,XMe=_.forwardRef(({className:t,sideOffset:e=4,...n},r)=>P.jsx(dQ,{ref:r,sideOffset:e,className:ce("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",t),...n}));XMe.displayName=dQ.displayName;/** +Defaulting to \`null\`.`}var c9=i9,Eke=a9;const Cke=_.forwardRef(({className:t,value:e,...n},r)=>P.jsx(c9,{ref:r,className:ce("relative h-4 w-full overflow-hidden rounded-full bg-secondary",t),...n,children:P.jsx(Eke,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(e||0)}%)`}})}));Cke.displayName=c9.displayName;var c$="Radio",[Ake,u9]=Tn(c$),[Rke,Pke]=Ake(c$),d9=_.forwardRef((t,e)=>{const{__scopeRadio:n,name:r,checked:s=!1,required:i,disabled:a,value:o="on",onCheck:c,...u}=t,[f,l]=_.useState(null),d=tt(e,h=>l(h)),m=_.useRef(!1),p=f?!!f.closest("form"):!0;return P.jsxs(Rke,{scope:n,checked:s,disabled:a,children:[P.jsx(De.button,{type:"button",role:"radio","aria-checked":s,"data-state":p9(s),"data-disabled":a?"":void 0,disabled:a,value:o,...u,ref:d,onClick:me(t.onClick,h=>{s||c==null||c(),p&&(m.current=h.isPropagationStopped(),m.current||h.stopPropagation())})}),p&&P.jsx(Tke,{control:f,bubbles:!m.current,name:r,value:o,checked:s,required:i,disabled:a,style:{transform:"translateX(-100%)"}})]})});d9.displayName=c$;var f9="RadioIndicator",h9=_.forwardRef((t,e)=>{const{__scopeRadio:n,forceMount:r,...s}=t,i=Pke(f9,n);return P.jsx(Hn,{present:r||i.checked,children:P.jsx(De.span,{"data-state":p9(i.checked),"data-disabled":i.disabled?"":void 0,...s,ref:e})})});h9.displayName=f9;var Tke=t=>{const{control:e,checked:n,bubbles:r=!0,...s}=t,i=_.useRef(null),a=Pv(n),o=v0(e);return _.useEffect(()=>{const c=i.current,u=window.HTMLInputElement.prototype,l=Object.getOwnPropertyDescriptor(u,"checked").set;if(a!==n&&l){const d=new Event("click",{bubbles:r});l.call(c,n),c.dispatchEvent(d)}},[a,n,r]),P.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:n,...s,tabIndex:-1,ref:i,style:{...t.style,...o,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function p9(t){return t?"checked":"unchecked"}var kke=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],u$="RadioGroup",[Dke,n5e]=Tn(u$,[Pl,u9]),m9=Pl(),g9=u9(),[Nke,Mke]=Dke(u$),v9=_.forwardRef((t,e)=>{const{__scopeRadioGroup:n,name:r,defaultValue:s,value:i,required:a=!1,disabled:o=!1,orientation:c,dir:u,loop:f=!0,onValueChange:l,...d}=t,m=m9(n),p=Ma(u),[h,y]=sr({prop:i,defaultProp:s,onChange:l});return P.jsx(Nke,{scope:n,name:r,required:a,disabled:o,value:h,onValueChange:y,children:P.jsx(x0,{asChild:!0,...m,orientation:c,dir:p,loop:f,children:P.jsx(De.div,{role:"radiogroup","aria-required":a,"aria-orientation":c,"data-disabled":o?"":void 0,dir:p,...d,ref:e})})})});v9.displayName=u$;var y9="RadioGroupItem",b9=_.forwardRef((t,e)=>{const{__scopeRadioGroup:n,disabled:r,...s}=t,i=Mke(y9,n),a=i.disabled||r,o=m9(n),c=g9(n),u=_.useRef(null),f=tt(e,u),l=i.value===s.value,d=_.useRef(!1);return _.useEffect(()=>{const m=h=>{kke.includes(h.key)&&(d.current=!0)},p=()=>d.current=!1;return document.addEventListener("keydown",m),document.addEventListener("keyup",p),()=>{document.removeEventListener("keydown",m),document.removeEventListener("keyup",p)}},[]),P.jsx(S0,{asChild:!0,...o,focusable:!a,active:l,children:P.jsx(d9,{disabled:a,required:i.required,checked:l,...c,...s,name:i.name,ref:f,onCheck:()=>i.onValueChange(s.value),onKeyDown:me(m=>{m.key==="Enter"&&m.preventDefault()}),onFocus:me(s.onFocus,()=>{var m;d.current&&((m=u.current)==null||m.click())})})})});b9.displayName=y9;var Oke="RadioGroupIndicator",w9=_.forwardRef((t,e)=>{const{__scopeRadioGroup:n,...r}=t,s=g9(n);return P.jsx(h9,{...s,...r,ref:e})});w9.displayName=Oke;var _9=v9,x9=b9,Lke=w9;const Ike=_.forwardRef(({className:t,...e},n)=>P.jsx(_9,{className:ce("grid gap-2",t),...e,ref:n}));Ike.displayName=_9.displayName;const $ke=_.forwardRef(({className:t,...e},n)=>P.jsx(x9,{ref:n,className:ce("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),...e,children:P.jsx(Lke,{className:"flex items-center justify-center",children:P.jsx(j1,{className:"h-2.5 w-2.5 fill-current text-current"})})}));$ke.displayName=x9.displayName;const{createElement:fv,createContext:jke,forwardRef:S9,useCallback:ci,useContext:E9,useEffect:Ih,useImperativeHandle:C9,useLayoutEffect:Fke,useMemo:zke,useRef:gi,useState:Bm}=X_,qB=X_[`useId${Math.random()}`.slice(0,5)],Bke=Fke,_A=jke(null);_A.displayName="PanelGroupContext";const $h=Bke,Uke=typeof qB=="function"?qB:()=>null;let Hke=0;function d$(t=null){const e=Uke(),n=gi(t||e||null);return n.current===null&&(n.current=""+Hke++),t??n.current}function A9({children:t,className:e="",collapsedSize:n,collapsible:r,defaultSize:s,forwardedRef:i,id:a,maxSize:o,minSize:c,onCollapse:u,onExpand:f,onResize:l,order:d,style:m,tagName:p="div",...h}){const y=E9(_A);if(y===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:g,expandPanel:v,getPanelSize:w,getPanelStyle:x,groupId:A,isPanelCollapsed:k,reevaluatePanelConstraints:R,registerPanel:E,resizePanel:T,unregisterPanel:D}=y,M=d$(a),L=gi({callbacks:{onCollapse:u,onExpand:f,onResize:l},constraints:{collapsedSize:n,collapsible:r,defaultSize:s,maxSize:o,minSize:c},id:M,idIsFromProps:a!==void 0,order:d});gi({didLogMissingDefaultSizeWarning:!1}),$h(()=>{const{callbacks:j,constraints:U}=L.current,Y={...U};L.current.id=M,L.current.idIsFromProps=a!==void 0,L.current.order=d,j.onCollapse=u,j.onExpand=f,j.onResize=l,U.collapsedSize=n,U.collapsible=r,U.defaultSize=s,U.maxSize=o,U.minSize=c,(Y.collapsedSize!==U.collapsedSize||Y.collapsible!==U.collapsible||Y.maxSize!==U.maxSize||Y.minSize!==U.minSize)&&R(L.current,Y)}),$h(()=>{const j=L.current;return E(j),()=>{D(j)}},[d,M,E,D]),C9(i,()=>({collapse:()=>{g(L.current)},expand:j=>{v(L.current,j)},getId(){return M},getSize(){return w(L.current)},isCollapsed(){return k(L.current)},isExpanded(){return!k(L.current)},resize:j=>{T(L.current,j)}}),[g,v,w,k,M,T]);const I=x(L.current,s);return fv(p,{...h,children:t,className:e,id:a,style:{...I,...m},"data-panel":"","data-panel-collapsible":r||void 0,"data-panel-group-id":A,"data-panel-id":M,"data-panel-size":parseFloat(""+I.flexGrow).toFixed(1)})}const Wke=S9((t,e)=>fv(A9,{...t,forwardedRef:e}));A9.displayName="Panel";Wke.displayName="forwardRef(Panel)";let mN=null,Af=null;function Vke(t,e){if(e){const n=(e&D9)!==0,r=(e&N9)!==0,s=(e&M9)!==0,i=(e&O9)!==0;if(n)return s?"se-resize":i?"ne-resize":"e-resize";if(r)return s?"sw-resize":i?"nw-resize":"w-resize";if(s)return"s-resize";if(i)return"n-resize"}switch(t){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function qke(){Af!==null&&(document.head.removeChild(Af),mN=null,Af=null)}function VT(t,e){const n=Vke(t,e);mN!==n&&(mN=n,Af===null&&(Af=document.createElement("style"),document.head.appendChild(Af)),Af.innerHTML=`*{cursor: ${n}!important;}`)}function R9(t){return t.type==="keydown"}function P9(t){return t.type.startsWith("pointer")}function T9(t){return t.type.startsWith("mouse")}function xA(t){if(P9(t)){if(t.isPrimary)return{x:t.clientX,y:t.clientY}}else if(T9(t))return{x:t.clientX,y:t.clientY};return{x:1/0,y:1/0}}function Gke(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function Kke(t,e,n){return t.xe.x&&t.ye.y}function Yke(t,e){if(t===e)throw new Error("Cannot compare node with itself");const n={a:YB(t),b:YB(e)};let r;for(;n.a.at(-1)===n.b.at(-1);)t=n.a.pop(),e=n.b.pop(),r=t;Tt(r,"Stacking order can only be calculated for elements with a common ancestor");const s={a:KB(GB(n.a)),b:KB(GB(n.b))};if(s.a===s.b){const i=r.childNodes,a={a:n.a.at(-1),b:n.b.at(-1)};let o=i.length;for(;o--;){const c=i[o];if(c===a.a)return 1;if(c===a.b)return-1}}return Math.sign(s.a-s.b)}const Xke=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Qke(t){var e;const n=getComputedStyle((e=k9(t))!==null&&e!==void 0?e:t).display;return n==="flex"||n==="inline-flex"}function Jke(t){const e=getComputedStyle(t);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||Qke(t))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||Xke.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function GB(t){let e=t.length;for(;e--;){const n=t[e];if(Tt(n,"Missing node"),Jke(n))return n}return null}function KB(t){return t&&Number(getComputedStyle(t).zIndex)||0}function YB(t){const e=[];for(;t;)e.push(t),t=k9(t);return e}function k9(t){const{parentNode:e}=t;return e&&e instanceof ShadowRoot?e.host:e}const D9=1,N9=2,M9=4,O9=8,Zke=Gke()==="coarse";let Ea=[],Zb=!1,Mu=new Map,SA=new Map;const ew=new Set;function eDe(t,e,n,r,s){var i;const{ownerDocument:a}=e,o={direction:n,element:e,hitAreaMargins:r,setResizeHandlerState:s},c=(i=Mu.get(a))!==null&&i!==void 0?i:0;return Mu.set(a,c+1),ew.add(o),CC(),function(){var f;SA.delete(t),ew.delete(o);const l=(f=Mu.get(a))!==null&&f!==void 0?f:1;if(Mu.set(a,l-1),CC(),l===1&&Mu.delete(a),Ea.includes(o)){const d=Ea.indexOf(o);d>=0&&Ea.splice(d,1),h$()}}}function XB(t){const{target:e}=t,{x:n,y:r}=xA(t);Zb=!0,f$({target:e,x:n,y:r}),CC(),Ea.length>0&&(AC("down",t),t.preventDefault(),t.stopPropagation())}function Ey(t){const{x:e,y:n}=xA(t);if(t.buttons===0&&(Zb=!1,AC("up",t)),!Zb){const{target:r}=t;f$({target:r,x:e,y:n})}AC("move",t),h$(),Ea.length>0&&t.preventDefault()}function Kp(t){const{target:e}=t,{x:n,y:r}=xA(t);SA.clear(),Zb=!1,Ea.length>0&&t.preventDefault(),AC("up",t),f$({target:e,x:n,y:r}),h$(),CC()}function f$({target:t,x:e,y:n}){Ea.splice(0);let r=null;t instanceof HTMLElement&&(r=t),ew.forEach(s=>{const{element:i,hitAreaMargins:a}=s,o=i.getBoundingClientRect(),{bottom:c,left:u,right:f,top:l}=o,d=Zke?a.coarse:a.fine;if(e>=u-d&&e<=f+d&&n>=l-d&&n<=c+d){if(r!==null&&i!==r&&!i.contains(r)&&!r.contains(i)&&Yke(r,i)>0){let p=r,h=!1;for(;p&&!p.contains(i);){if(Kke(p.getBoundingClientRect(),o)){h=!0;break}p=p.parentElement}if(h)return}Ea.push(s)}})}function qT(t,e){SA.set(t,e)}function h$(){let t=!1,e=!1;Ea.forEach(r=>{const{direction:s}=r;s==="horizontal"?t=!0:e=!0});let n=0;SA.forEach(r=>{n|=r}),t&&e?VT("intersection",n):t?VT("horizontal",n):e?VT("vertical",n):qke()}function CC(){Mu.forEach((t,e)=>{const{body:n}=e;n.removeEventListener("contextmenu",Kp),n.removeEventListener("pointerdown",XB),n.removeEventListener("pointerleave",Ey),n.removeEventListener("pointermove",Ey)}),window.removeEventListener("pointerup",Kp),window.removeEventListener("pointercancel",Kp),ew.size>0&&(Zb?(Ea.length>0&&Mu.forEach((t,e)=>{const{body:n}=e;t>0&&(n.addEventListener("contextmenu",Kp),n.addEventListener("pointerleave",Ey),n.addEventListener("pointermove",Ey))}),window.addEventListener("pointerup",Kp),window.addEventListener("pointercancel",Kp)):Mu.forEach((t,e)=>{const{body:n}=e;t>0&&(n.addEventListener("pointerdown",XB,{capture:!0}),n.addEventListener("pointermove",Ey))}))}function AC(t,e){ew.forEach(n=>{const{setResizeHandlerState:r}=n,s=Ea.includes(n);r(t,s,e)})}function tDe(){const[t,e]=Bm(0);return ci(()=>e(n=>n+1),[])}function Tt(t,e){if(!t)throw console.error(e),Error(e)}const p$=10;function ep(t,e,n=p$){return t.toFixed(n)===e.toFixed(n)?0:t>e?1:-1}function kc(t,e,n=p$){return ep(t,e,n)===0}function Ji(t,e,n){return ep(t,e,n)===0}function nDe(t,e,n){if(t.length!==e.length)return!1;for(let r=0;r0&&(t=t<0?0-g:g)}}}{const l=t<0?o:c,d=n[l];Tt(d,`No panel constraints found for index ${l}`);const{collapsedSize:m=0,collapsible:p,minSize:h=0}=d;if(p){const y=e[l];if(Tt(y!=null,`Previous layout not found for panel index ${l}`),Ji(y,h)){const g=y-m;ep(g,Math.abs(t))>0&&(t=t<0?0-g:g)}}}}{const l=t<0?1:-1;let d=t<0?c:o,m=0;for(;;){const h=e[d];Tt(h!=null,`Previous layout not found for panel index ${d}`);const g=Em({panelConstraints:n,panelIndex:d,size:100})-h;if(m+=g,d+=l,d<0||d>=n.length)break}const p=Math.min(Math.abs(t),Math.abs(m));t=t<0?0-p:p}{let d=t<0?o:c;for(;d>=0&&d=0))break;t<0?d--:d++}}if(nDe(s,a))return s;{const l=t<0?c:o,d=e[l];Tt(d!=null,`Previous layout not found for panel index ${l}`);const m=d+u,p=Em({panelConstraints:n,panelIndex:l,size:m});if(a[l]=p,!Ji(p,m)){let h=m-p,g=t<0?c:o;for(;g>=0&&g0?g--:g++}}}const f=a.reduce((l,d)=>d+l,0);return Ji(f,100)?a:s}function rDe({layout:t,panelsArray:e,pivotIndices:n}){let r=0,s=100,i=0,a=0;const o=n[0];Tt(o!=null,"No pivot index found"),e.forEach((l,d)=>{const{constraints:m}=l,{maxSize:p=100,minSize:h=0}=m;d===o?(r=h,s=p):(i+=h,a+=p)});const c=Math.min(s,100-i),u=Math.max(r,100-a),f=t[o];return{valueMax:c,valueMin:u,valueNow:f}}function tw(t,e=document){return Array.from(e.querySelectorAll(`[data-panel-resize-handle-id][data-panel-group-id="${t}"]`))}function L9(t,e,n=document){const s=tw(t,n).findIndex(i=>i.getAttribute("data-panel-resize-handle-id")===e);return s??null}function I9(t,e,n){const r=L9(t,e,n);return r!=null?[r,r+1]:[-1,-1]}function $9(t,e=document){var n;if(e instanceof HTMLElement&&(e==null||(n=e.dataset)===null||n===void 0?void 0:n.panelGroupId)==t)return e;const r=e.querySelector(`[data-panel-group][data-panel-group-id="${t}"]`);return r||null}function EA(t,e=document){const n=e.querySelector(`[data-panel-resize-handle-id="${t}"]`);return n||null}function sDe(t,e,n,r=document){var s,i,a,o;const c=EA(e,r),u=tw(t,r),f=c?u.indexOf(c):-1,l=(s=(i=n[f])===null||i===void 0?void 0:i.id)!==null&&s!==void 0?s:null,d=(a=(o=n[f+1])===null||o===void 0?void 0:o.id)!==null&&a!==void 0?a:null;return[l,d]}function iDe({committedValuesRef:t,eagerValuesRef:e,groupId:n,layout:r,panelDataArray:s,panelGroupElement:i,setLayout:a}){gi({didWarnAboutMissingResizeHandle:!1}),$h(()=>{if(!i)return;const o=tw(n,i);for(let c=0;c{o.forEach((c,u)=>{c.removeAttribute("aria-controls"),c.removeAttribute("aria-valuemax"),c.removeAttribute("aria-valuemin"),c.removeAttribute("aria-valuenow")})}},[n,r,s,i]),Ih(()=>{if(!i)return;const o=e.current;Tt(o,"Eager values not found");const{panelDataArray:c}=o,u=$9(n,i);Tt(u!=null,`No group found for id "${n}"`);const f=tw(n,i);Tt(f,`No resize handles found for group id "${n}"`);const l=f.map(d=>{const m=d.getAttribute("data-panel-resize-handle-id");Tt(m,"Resize handle element has no handle id attribute");const[p,h]=sDe(n,m,c,i);if(p==null||h==null)return()=>{};const y=g=>{if(!g.defaultPrevented)switch(g.key){case"Enter":{g.preventDefault();const v=c.findIndex(w=>w.id===p);if(v>=0){const w=c[v];Tt(w,`No panel data found for index ${v}`);const x=r[v],{collapsedSize:A=0,collapsible:k,minSize:R=0}=w.constraints;if(x!=null&&k){const E=Fy({delta:Ji(x,A)?R-A:A-x,initialLayout:r,panelConstraints:c.map(T=>T.constraints),pivotIndices:I9(n,m,i),prevLayout:r,trigger:"keyboard"});r!==E&&a(E)}}break}}};return d.addEventListener("keydown",y),()=>{d.removeEventListener("keydown",y)}});return()=>{l.forEach(d=>d())}},[i,t,e,n,r,s,a])}function QB(t,e){if(t.length!==e.length)return!1;for(let n=0;ni.constraints);let r=0,s=100;for(let i=0;i{const i=t[s];Tt(i,`Panel data not found for index ${s}`);const{callbacks:a,constraints:o,id:c}=i,{collapsedSize:u=0,collapsible:f}=o,l=n[c];if(l==null||r!==l){n[c]=r;const{onCollapse:d,onExpand:m,onResize:p}=a;p&&p(r,l),f&&(d||m)&&(m&&(l==null||kc(l,u))&&!kc(r,u)&&m(),d&&(l==null||!kc(l,u))&&kc(r,u)&&d())}})}function vS(t,e){if(t.length!==e.length)return!1;for(let n=0;n{n!==null&&clearTimeout(n),n=setTimeout(()=>{t(...s)},e)}}function JB(t){try{if(typeof localStorage<"u")t.getItem=e=>localStorage.getItem(e),t.setItem=(e,n)=>{localStorage.setItem(e,n)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),t.getItem=()=>null,t.setItem=()=>{}}}function F9(t){return`react-resizable-panels:${t}`}function z9(t){return t.map(e=>{const{constraints:n,id:r,idIsFromProps:s,order:i}=e;return s?r:i?`${i}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((e,n)=>e.localeCompare(n)).join(",")}function B9(t,e){try{const n=F9(t),r=e.getItem(n);if(r){const s=JSON.parse(r);if(typeof s=="object"&&s!=null)return s}}catch{}return null}function dDe(t,e,n){var r,s;const i=(r=B9(t,n))!==null&&r!==void 0?r:{},a=z9(e);return(s=i[a])!==null&&s!==void 0?s:null}function fDe(t,e,n,r,s){var i;const a=F9(t),o=z9(e),c=(i=B9(t,s))!==null&&i!==void 0?i:{};c[o]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{s.setItem(a,JSON.stringify(c))}catch(u){console.error(u)}}function ZB({layout:t,panelConstraints:e}){const n=[...t],r=n.reduce((i,a)=>i+a,0);if(n.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${n.map(i=>`${i}%`).join(", ")}`);if(!Ji(r,100))for(let i=0;i(JB(zy),zy.getItem(t)),setItem:(t,e)=>{JB(zy),zy.setItem(t,e)}},e4={};function U9({autoSaveId:t=null,children:e,className:n="",direction:r,forwardedRef:s,id:i=null,onLayout:a=null,keyboardResizeBy:o=null,storage:c=zy,style:u,tagName:f="div",...l}){const d=d$(i),m=gi(null),[p,h]=Bm(null),[y,g]=Bm([]),v=tDe(),w=gi({}),x=gi(new Map),A=gi(0),k=gi({autoSaveId:t,direction:r,dragState:p,id:d,keyboardResizeBy:o,onLayout:a,storage:c}),R=gi({layout:y,panelDataArray:[],panelDataArrayChanged:!1});gi({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),C9(s,()=>({getId:()=>k.current.id,getLayout:()=>{const{layout:K}=R.current;return K},setLayout:K=>{const{onLayout:J}=k.current,{layout:ue,panelDataArray:de}=R.current,ie=ZB({layout:K,panelConstraints:de.map(be=>be.constraints)});QB(ue,ie)||(g(ie),R.current.layout=ie,J&&J(ie),Yp(de,ie,w.current))}}),[]),$h(()=>{k.current.autoSaveId=t,k.current.direction=r,k.current.dragState=p,k.current.id=d,k.current.onLayout=a,k.current.storage=c}),iDe({committedValuesRef:k,eagerValuesRef:R,groupId:d,layout:y,panelDataArray:R.current.panelDataArray,setLayout:g,panelGroupElement:m.current}),Ih(()=>{const{panelDataArray:K}=R.current;if(t){if(y.length===0||y.length!==K.length)return;let J=e4[t];J==null&&(J=uDe(fDe,hDe),e4[t]=J);const ue=[...K],de=new Map(x.current);J(t,ue,de,y,c)}},[t,y,c]),Ih(()=>{});const E=ci(K=>{const{onLayout:J}=k.current,{layout:ue,panelDataArray:de}=R.current;if(K.constraints.collapsible){const ie=de.map(Oe=>Oe.constraints),{collapsedSize:be=0,panelSize:Ae,pivotIndices:_e}=lf(de,K,ue);if(Tt(Ae!=null,`Panel size not found for panel "${K.id}"`),!kc(Ae,be)){x.current.set(K.id,Ae);const Ne=rm(de,K)===de.length-1?Ae-be:be-Ae,ye=Fy({delta:Ne,initialLayout:ue,panelConstraints:ie,pivotIndices:_e,prevLayout:ue,trigger:"imperative-api"});vS(ue,ye)||(g(ye),R.current.layout=ye,J&&J(ye),Yp(de,ye,w.current))}}},[]),T=ci((K,J)=>{const{onLayout:ue}=k.current,{layout:de,panelDataArray:ie}=R.current;if(K.constraints.collapsible){const be=ie.map($e=>$e.constraints),{collapsedSize:Ae=0,panelSize:_e=0,minSize:Oe=0,pivotIndices:Ne}=lf(ie,K,de),ye=J??Oe;if(kc(_e,Ae)){const $e=x.current.get(K.id),ut=$e!=null&&$e>=ye?$e:ye,yt=rm(ie,K)===ie.length-1?_e-ut:ut-_e,En=Fy({delta:yt,initialLayout:de,panelConstraints:be,pivotIndices:Ne,prevLayout:de,trigger:"imperative-api"});vS(de,En)||(g(En),R.current.layout=En,ue&&ue(En),Yp(ie,En,w.current))}}},[]),D=ci(K=>{const{layout:J,panelDataArray:ue}=R.current,{panelSize:de}=lf(ue,K,J);return Tt(de!=null,`Panel size not found for panel "${K.id}"`),de},[]),M=ci((K,J)=>{const{panelDataArray:ue}=R.current,de=rm(ue,K);return cDe({defaultSize:J,dragState:p,layout:y,panelData:ue,panelIndex:de})},[p,y]),L=ci(K=>{const{layout:J,panelDataArray:ue}=R.current,{collapsedSize:de=0,collapsible:ie,panelSize:be}=lf(ue,K,J);return Tt(be!=null,`Panel size not found for panel "${K.id}"`),ie===!0&&kc(be,de)},[]),I=ci(K=>{const{layout:J,panelDataArray:ue}=R.current,{collapsedSize:de=0,collapsible:ie,panelSize:be}=lf(ue,K,J);return Tt(be!=null,`Panel size not found for panel "${K.id}"`),!ie||ep(be,de)>0},[]),j=ci(K=>{const{panelDataArray:J}=R.current;J.push(K),J.sort((ue,de)=>{const ie=ue.order,be=de.order;return ie==null&&be==null?0:ie==null?-1:be==null?1:ie-be}),R.current.panelDataArrayChanged=!0,v()},[v]);$h(()=>{if(R.current.panelDataArrayChanged){R.current.panelDataArrayChanged=!1;const{autoSaveId:K,onLayout:J,storage:ue}=k.current,{layout:de,panelDataArray:ie}=R.current;let be=null;if(K){const _e=dDe(K,ie,ue);_e&&(x.current=new Map(Object.entries(_e.expandToSizes)),be=_e.layout)}be==null&&(be=lDe({panelDataArray:ie}));const Ae=ZB({layout:be,panelConstraints:ie.map(_e=>_e.constraints)});QB(de,Ae)||(g(Ae),R.current.layout=Ae,J&&J(Ae),Yp(ie,Ae,w.current))}}),$h(()=>{const K=R.current;return()=>{K.layout=[]}},[]);const U=ci(K=>function(ue){ue.preventDefault();const de=m.current;if(!de)return()=>null;const{direction:ie,dragState:be,id:Ae,keyboardResizeBy:_e,onLayout:Oe}=k.current,{layout:Ne,panelDataArray:ye}=R.current,{initialLayout:$e}=be??{},ut=I9(Ae,K,de);let Qe=aDe(ue,K,ie,be,_e,de);const yt=ie==="horizontal";document.dir==="rtl"&&yt&&(Qe=-Qe);const En=ye.map(Qt=>Qt.constraints),Xt=Fy({delta:Qe,initialLayout:$e??Ne,panelConstraints:En,pivotIndices:ut,prevLayout:Ne,trigger:R9(ue)?"keyboard":"mouse-or-touch"}),gn=!vS(Ne,Xt);(P9(ue)||T9(ue))&&A.current!=Qe&&(A.current=Qe,gn?qT(K,0):yt?qT(K,Qe<0?D9:N9):qT(K,Qe<0?M9:O9)),gn&&(g(Xt),R.current.layout=Xt,Oe&&Oe(Xt),Yp(ye,Xt,w.current))},[]),Y=ci((K,J)=>{const{onLayout:ue}=k.current,{layout:de,panelDataArray:ie}=R.current,be=ie.map($e=>$e.constraints),{panelSize:Ae,pivotIndices:_e}=lf(ie,K,de);Tt(Ae!=null,`Panel size not found for panel "${K.id}"`);const Ne=rm(ie,K)===ie.length-1?Ae-J:J-Ae,ye=Fy({delta:Ne,initialLayout:de,panelConstraints:be,pivotIndices:_e,prevLayout:de,trigger:"imperative-api"});vS(de,ye)||(g(ye),R.current.layout=ye,ue&&ue(ye),Yp(ie,ye,w.current))},[]),W=ci((K,J)=>{const{layout:ue,panelDataArray:de}=R.current,{collapsedSize:ie=0,collapsible:be}=J,{collapsedSize:Ae=0,collapsible:_e,maxSize:Oe=100,minSize:Ne=0}=K.constraints,{panelSize:ye}=lf(de,K,ue);ye!=null&&(be&&_e&&kc(ye,ie)?kc(ie,Ae)||Y(K,Ae):yeOe&&Y(K,Oe))},[Y]),H=ci((K,J)=>{const{direction:ue}=k.current,{layout:de}=R.current;if(!m.current)return;const ie=EA(K,m.current);Tt(ie,`Drag handle element not found for id "${K}"`);const be=j9(ue,J);h({dragHandleId:K,dragHandleRect:ie.getBoundingClientRect(),initialCursorPosition:be,initialLayout:de})},[]),ee=ci(()=>{h(null)},[]),re=ci(K=>{const{panelDataArray:J}=R.current,ue=rm(J,K);ue>=0&&(J.splice(ue,1),delete w.current[K.id],R.current.panelDataArrayChanged=!0,v())},[v]),X=zke(()=>({collapsePanel:E,direction:r,dragState:p,expandPanel:T,getPanelSize:D,getPanelStyle:M,groupId:d,isPanelCollapsed:L,isPanelExpanded:I,reevaluatePanelConstraints:W,registerPanel:j,registerResizeHandle:U,resizePanel:Y,startDragging:H,stopDragging:ee,unregisterPanel:re,panelGroupElement:m.current}),[E,p,r,T,D,M,d,L,I,W,j,U,Y,H,ee,re]),G={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return fv(_A.Provider,{value:X},fv(f,{...l,children:e,className:n,id:i,ref:m,style:{...G,...u},"data-panel-group":"","data-panel-group-direction":r,"data-panel-group-id":d}))}const pDe=S9((t,e)=>fv(U9,{...t,forwardedRef:e}));U9.displayName="PanelGroup";pDe.displayName="forwardRef(PanelGroup)";function rm(t,e){return t.findIndex(n=>n===e||n.id===e.id)}function lf(t,e,n){const r=rm(t,e),i=r===t.length-1?[r-1,r]:[r,r+1],a=n[r];return{...e.constraints,panelSize:a,pivotIndices:i}}function mDe({disabled:t,handleId:e,resizeHandler:n,panelGroupElement:r}){Ih(()=>{if(t||n==null||r==null)return;const s=EA(e,r);if(s==null)return;const i=a=>{if(!a.defaultPrevented)switch(a.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{a.preventDefault(),n(a);break}case"F6":{a.preventDefault();const o=s.getAttribute("data-panel-group-id");Tt(o,`No group element found for id "${o}"`);const c=tw(o,r),u=L9(o,e,r);Tt(u!==null,`No resize element found for id "${e}"`);const f=a.shiftKey?u>0?u-1:c.length-1:u+1{s.removeEventListener("keydown",i)}},[r,t,e,n])}function gDe({children:t=null,className:e="",disabled:n=!1,hitAreaMargins:r,id:s,onBlur:i,onDragging:a,onFocus:o,style:c={},tabIndex:u=0,tagName:f="div",...l}){var d,m;const p=gi(null),h=gi({onDragging:a});Ih(()=>{h.current.onDragging=a});const y=E9(_A);if(y===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:g,groupId:v,registerResizeHandle:w,startDragging:x,stopDragging:A,panelGroupElement:k}=y,R=d$(s),[E,T]=Bm("inactive"),[D,M]=Bm(!1),[L,I]=Bm(null),j=gi({state:E});$h(()=>{j.current.state=E}),Ih(()=>{if(n)I(null);else{const H=w(R);I(()=>H)}},[n,R,w]);const U=(d=r==null?void 0:r.coarse)!==null&&d!==void 0?d:15,Y=(m=r==null?void 0:r.fine)!==null&&m!==void 0?m:5;return Ih(()=>{if(n||L==null)return;const H=p.current;return Tt(H,"Element ref not attached"),eDe(R,H,g,{coarse:U,fine:Y},(re,X,G)=>{if(X)switch(re){case"down":{T("drag"),x(R,G);const{onDragging:K}=h.current;K&&K(!0);break}case"move":{const{state:K}=j.current;K!=="drag"&&T("hover"),L(G);break}case"up":{T("hover"),A();const{onDragging:K}=h.current;K&&K(!1);break}}else T("inactive")})},[U,g,n,Y,w,R,L,x,A]),mDe({disabled:n,handleId:R,resizeHandler:L,panelGroupElement:k}),fv(f,{...l,children:t,className:e,id:s,onBlur:()=>{M(!1),i==null||i()},onFocus:()=>{M(!0),o==null||o()},ref:p,role:"separator",style:{...{touchAction:"none",userSelect:"none"},...c},tabIndex:u,"data-panel-group-direction":g,"data-panel-group-id":v,"data-resize-handle":"","data-resize-handle-active":E==="drag"?"pointer":D?"keyboard":void 0,"data-resize-handle-state":E,"data-panel-resize-handle-enabled":!n,"data-panel-resize-handle-id":R})}gDe.displayName="PanelResizeHandle";function nw(t,[e,n]){return Math.min(n,Math.max(e,t))}function vDe(t,e){return _.useReducer((n,r)=>e[n][r]??n,t)}var m$="ScrollArea",[H9,r5e]=Tn(m$),[yDe,qo]=H9(m$),W9=_.forwardRef((t,e)=>{const{__scopeScrollArea:n,type:r="hover",dir:s,scrollHideDelay:i=600,...a}=t,[o,c]=_.useState(null),[u,f]=_.useState(null),[l,d]=_.useState(null),[m,p]=_.useState(null),[h,y]=_.useState(null),[g,v]=_.useState(0),[w,x]=_.useState(0),[A,k]=_.useState(!1),[R,E]=_.useState(!1),T=tt(e,M=>c(M)),D=Ma(s);return P.jsx(yDe,{scope:n,type:r,dir:D,scrollHideDelay:i,scrollArea:o,viewport:u,onViewportChange:f,content:l,onContentChange:d,scrollbarX:m,onScrollbarXChange:p,scrollbarXEnabled:A,onScrollbarXEnabledChange:k,scrollbarY:h,onScrollbarYChange:y,scrollbarYEnabled:R,onScrollbarYEnabledChange:E,onCornerWidthChange:v,onCornerHeightChange:x,children:P.jsx(De.div,{dir:D,...a,ref:T,style:{position:"relative","--radix-scroll-area-corner-width":g+"px","--radix-scroll-area-corner-height":w+"px",...t.style}})})});W9.displayName=m$;var V9="ScrollAreaViewport",q9=_.forwardRef((t,e)=>{const{__scopeScrollArea:n,children:r,nonce:s,...i}=t,a=qo(V9,n),o=_.useRef(null),c=tt(e,o,a.onViewportChange);return P.jsxs(P.Fragment,{children:[P.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),P.jsx(De.div,{"data-radix-scroll-area-viewport":"",...i,ref:c,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...t.style},children:P.jsx("div",{ref:a.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});q9.displayName=V9;var kl="ScrollAreaScrollbar",g$=_.forwardRef((t,e)=>{const{forceMount:n,...r}=t,s=qo(kl,t.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:a}=s,o=t.orientation==="horizontal";return _.useEffect(()=>(o?i(!0):a(!0),()=>{o?i(!1):a(!1)}),[o,i,a]),s.type==="hover"?P.jsx(bDe,{...r,ref:e,forceMount:n}):s.type==="scroll"?P.jsx(wDe,{...r,ref:e,forceMount:n}):s.type==="auto"?P.jsx(G9,{...r,ref:e,forceMount:n}):s.type==="always"?P.jsx(v$,{...r,ref:e}):null});g$.displayName=kl;var bDe=_.forwardRef((t,e)=>{const{forceMount:n,...r}=t,s=qo(kl,t.__scopeScrollArea),[i,a]=_.useState(!1);return _.useEffect(()=>{const o=s.scrollArea;let c=0;if(o){const u=()=>{window.clearTimeout(c),a(!0)},f=()=>{c=window.setTimeout(()=>a(!1),s.scrollHideDelay)};return o.addEventListener("pointerenter",u),o.addEventListener("pointerleave",f),()=>{window.clearTimeout(c),o.removeEventListener("pointerenter",u),o.removeEventListener("pointerleave",f)}}},[s.scrollArea,s.scrollHideDelay]),P.jsx(Hn,{present:n||i,children:P.jsx(G9,{"data-state":i?"visible":"hidden",...r,ref:e})})}),wDe=_.forwardRef((t,e)=>{const{forceMount:n,...r}=t,s=qo(kl,t.__scopeScrollArea),i=t.orientation==="horizontal",a=AA(()=>c("SCROLL_END"),100),[o,c]=vDe("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return _.useEffect(()=>{if(o==="idle"){const u=window.setTimeout(()=>c("HIDE"),s.scrollHideDelay);return()=>window.clearTimeout(u)}},[o,s.scrollHideDelay,c]),_.useEffect(()=>{const u=s.viewport,f=i?"scrollLeft":"scrollTop";if(u){let l=u[f];const d=()=>{const m=u[f];l!==m&&(c("SCROLL"),a()),l=m};return u.addEventListener("scroll",d),()=>u.removeEventListener("scroll",d)}},[s.viewport,i,c,a]),P.jsx(Hn,{present:n||o!=="hidden",children:P.jsx(v$,{"data-state":o==="hidden"?"hidden":"visible",...r,ref:e,onPointerEnter:me(t.onPointerEnter,()=>c("POINTER_ENTER")),onPointerLeave:me(t.onPointerLeave,()=>c("POINTER_LEAVE"))})})}),G9=_.forwardRef((t,e)=>{const n=qo(kl,t.__scopeScrollArea),{forceMount:r,...s}=t,[i,a]=_.useState(!1),o=t.orientation==="horizontal",c=AA(()=>{if(n.viewport){const u=n.viewport.offsetWidth{const{orientation:n="vertical",...r}=t,s=qo(kl,t.__scopeScrollArea),i=_.useRef(null),a=_.useRef(0),[o,c]=_.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=J9(o.viewport,o.content),f={...r,sizes:o,onSizesChange:c,hasThumb:u>0&&u<1,onThumbChange:d=>i.current=d,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:d=>a.current=d};function l(d,m){return ADe(d,a.current,o,m)}return n==="horizontal"?P.jsx(_De,{...f,ref:e,onThumbPositionChange:()=>{if(s.viewport&&i.current){const d=s.viewport.scrollLeft,m=t4(d,o,s.dir);i.current.style.transform=`translate3d(${m}px, 0, 0)`}},onWheelScroll:d=>{s.viewport&&(s.viewport.scrollLeft=d)},onDragScroll:d=>{s.viewport&&(s.viewport.scrollLeft=l(d,s.dir))}}):n==="vertical"?P.jsx(xDe,{...f,ref:e,onThumbPositionChange:()=>{if(s.viewport&&i.current){const d=s.viewport.scrollTop,m=t4(d,o);i.current.style.transform=`translate3d(0, ${m}px, 0)`}},onWheelScroll:d=>{s.viewport&&(s.viewport.scrollTop=d)},onDragScroll:d=>{s.viewport&&(s.viewport.scrollTop=l(d))}}):null}),_De=_.forwardRef((t,e)=>{const{sizes:n,onSizesChange:r,...s}=t,i=qo(kl,t.__scopeScrollArea),[a,o]=_.useState(),c=_.useRef(null),u=tt(e,c,i.onScrollbarXChange);return _.useEffect(()=>{c.current&&o(getComputedStyle(c.current))},[c]),P.jsx(Y9,{"data-orientation":"horizontal",...s,ref:u,sizes:n,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":CA(n)+"px",...t.style},onThumbPointerDown:f=>t.onThumbPointerDown(f.x),onDragScroll:f=>t.onDragScroll(f.x),onWheelScroll:(f,l)=>{if(i.viewport){const d=i.viewport.scrollLeft+f.deltaX;t.onWheelScroll(d),eY(d,l)&&f.preventDefault()}},onResize:()=>{c.current&&i.viewport&&a&&r({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:PC(a.paddingLeft),paddingEnd:PC(a.paddingRight)}})}})}),xDe=_.forwardRef((t,e)=>{const{sizes:n,onSizesChange:r,...s}=t,i=qo(kl,t.__scopeScrollArea),[a,o]=_.useState(),c=_.useRef(null),u=tt(e,c,i.onScrollbarYChange);return _.useEffect(()=>{c.current&&o(getComputedStyle(c.current))},[c]),P.jsx(Y9,{"data-orientation":"vertical",...s,ref:u,sizes:n,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":CA(n)+"px",...t.style},onThumbPointerDown:f=>t.onThumbPointerDown(f.y),onDragScroll:f=>t.onDragScroll(f.y),onWheelScroll:(f,l)=>{if(i.viewport){const d=i.viewport.scrollTop+f.deltaY;t.onWheelScroll(d),eY(d,l)&&f.preventDefault()}},onResize:()=>{c.current&&i.viewport&&a&&r({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:PC(a.paddingTop),paddingEnd:PC(a.paddingBottom)}})}})}),[SDe,K9]=H9(kl),Y9=_.forwardRef((t,e)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:s,onThumbChange:i,onThumbPointerUp:a,onThumbPointerDown:o,onThumbPositionChange:c,onDragScroll:u,onWheelScroll:f,onResize:l,...d}=t,m=qo(kl,n),[p,h]=_.useState(null),y=tt(e,T=>h(T)),g=_.useRef(null),v=_.useRef(""),w=m.viewport,x=r.content-r.viewport,A=Ut(f),k=Ut(c),R=AA(l,10);function E(T){if(g.current){const D=T.clientX-g.current.left,M=T.clientY-g.current.top;u({x:D,y:M})}}return _.useEffect(()=>{const T=D=>{const M=D.target;(p==null?void 0:p.contains(M))&&A(D,x)};return document.addEventListener("wheel",T,{passive:!1}),()=>document.removeEventListener("wheel",T,{passive:!1})},[w,p,x,A]),_.useEffect(k,[r,k]),hv(p,R),hv(m.content,R),P.jsx(SDe,{scope:n,scrollbar:p,hasThumb:s,onThumbChange:Ut(i),onThumbPointerUp:Ut(a),onThumbPositionChange:k,onThumbPointerDown:Ut(o),children:P.jsx(De.div,{...d,ref:y,style:{position:"absolute",...d.style},onPointerDown:me(t.onPointerDown,T=>{T.button===0&&(T.target.setPointerCapture(T.pointerId),g.current=p.getBoundingClientRect(),v.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",m.viewport&&(m.viewport.style.scrollBehavior="auto"),E(T))}),onPointerMove:me(t.onPointerMove,E),onPointerUp:me(t.onPointerUp,T=>{const D=T.target;D.hasPointerCapture(T.pointerId)&&D.releasePointerCapture(T.pointerId),document.body.style.webkitUserSelect=v.current,m.viewport&&(m.viewport.style.scrollBehavior=""),g.current=null})})})}),RC="ScrollAreaThumb",X9=_.forwardRef((t,e)=>{const{forceMount:n,...r}=t,s=K9(RC,t.__scopeScrollArea);return P.jsx(Hn,{present:n||s.hasThumb,children:P.jsx(EDe,{ref:e,...r})})}),EDe=_.forwardRef((t,e)=>{const{__scopeScrollArea:n,style:r,...s}=t,i=qo(RC,n),a=K9(RC,n),{onThumbPositionChange:o}=a,c=tt(e,l=>a.onThumbChange(l)),u=_.useRef(),f=AA(()=>{u.current&&(u.current(),u.current=void 0)},100);return _.useEffect(()=>{const l=i.viewport;if(l){const d=()=>{if(f(),!u.current){const m=RDe(l,o);u.current=m,o()}};return o(),l.addEventListener("scroll",d),()=>l.removeEventListener("scroll",d)}},[i.viewport,f,o]),P.jsx(De.div,{"data-state":a.hasThumb?"visible":"hidden",...s,ref:c,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:me(t.onPointerDownCapture,l=>{const m=l.target.getBoundingClientRect(),p=l.clientX-m.left,h=l.clientY-m.top;a.onThumbPointerDown({x:p,y:h})}),onPointerUp:me(t.onPointerUp,a.onThumbPointerUp)})});X9.displayName=RC;var y$="ScrollAreaCorner",Q9=_.forwardRef((t,e)=>{const n=qo(y$,t.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?P.jsx(CDe,{...t,ref:e}):null});Q9.displayName=y$;var CDe=_.forwardRef((t,e)=>{const{__scopeScrollArea:n,...r}=t,s=qo(y$,n),[i,a]=_.useState(0),[o,c]=_.useState(0),u=!!(i&&o);return hv(s.scrollbarX,()=>{var l;const f=((l=s.scrollbarX)==null?void 0:l.offsetHeight)||0;s.onCornerHeightChange(f),c(f)}),hv(s.scrollbarY,()=>{var l;const f=((l=s.scrollbarY)==null?void 0:l.offsetWidth)||0;s.onCornerWidthChange(f),a(f)}),u?P.jsx(De.div,{...r,ref:e,style:{width:i,height:o,position:"absolute",right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:0,...t.style}}):null});function PC(t){return t?parseInt(t,10):0}function J9(t,e){const n=t/e;return isNaN(n)?0:n}function CA(t){const e=J9(t.viewport,t.content),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,r=(t.scrollbar.size-n)*e;return Math.max(r,18)}function ADe(t,e,n,r="ltr"){const s=CA(n),i=s/2,a=e||i,o=s-a,c=n.scrollbar.paddingStart+a,u=n.scrollbar.size-n.scrollbar.paddingEnd-o,f=n.content-n.viewport,l=r==="ltr"?[0,f]:[f*-1,0];return Z9([c,u],l)(t)}function t4(t,e,n="ltr"){const r=CA(e),s=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,i=e.scrollbar.size-s,a=e.content-e.viewport,o=i-r,c=n==="ltr"?[0,a]:[a*-1,0],u=nw(t,c);return Z9([0,a],[0,o])(u)}function Z9(t,e){return n=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const r=(e[1]-e[0])/(t[1]-t[0]);return e[0]+r*(n-t[0])}}function eY(t,e){return t>0&&t{})=>{let n={left:t.scrollLeft,top:t.scrollTop},r=0;return function s(){const i={left:t.scrollLeft,top:t.scrollTop},a=n.left!==i.left,o=n.top!==i.top;(a||o)&&e(),n=i,r=window.requestAnimationFrame(s)}(),()=>window.cancelAnimationFrame(r)};function AA(t,e){const n=Ut(t),r=_.useRef(0);return _.useEffect(()=>()=>window.clearTimeout(r.current),[]),_.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,e)},[n,e])}function hv(t,e){const n=Ut(e);Ln(()=>{let r=0;if(t){const s=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return s.observe(t),()=>{window.cancelAnimationFrame(r),s.unobserve(t)}}},[t,n])}var tY=W9,PDe=q9,TDe=Q9;const kDe=_.forwardRef(({className:t,children:e,...n},r)=>P.jsxs(tY,{ref:r,className:ce("relative overflow-hidden",t),...n,children:[P.jsx(PDe,{className:"h-full w-full rounded-[inherit]",children:e}),P.jsx(nY,{}),P.jsx(TDe,{})]}));kDe.displayName=tY.displayName;const nY=_.forwardRef(({className:t,orientation:e="vertical",...n},r)=>P.jsx(g$,{ref:r,orientation:e,className:ce("flex touch-none select-none transition-colors",e==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",e==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",t),...n,children:P.jsx(X9,{className:"relative flex-1 rounded-full bg-border"})}));nY.displayName=g$.displayName;var DDe=[" ","Enter","ArrowUp","ArrowDown"],NDe=[" ","Enter"],N0="Select",[RA,PA,MDe]=Xc(N0),[Ov,s5e]=Tn(N0,[MDe,Rl]),TA=Rl(),[ODe,Bd]=Ov(N0),[LDe,IDe]=Ov(N0),rY=t=>{const{__scopeSelect:e,children:n,open:r,defaultOpen:s,onOpenChange:i,value:a,defaultValue:o,onValueChange:c,dir:u,name:f,autoComplete:l,disabled:d,required:m}=t,p=TA(e),[h,y]=_.useState(null),[g,v]=_.useState(null),[w,x]=_.useState(!1),A=Ma(u),[k=!1,R]=sr({prop:r,defaultProp:s,onChange:i}),[E,T]=sr({prop:a,defaultProp:o,onChange:c}),D=_.useRef(null),M=h?!!h.closest("form"):!0,[L,I]=_.useState(new Set),j=Array.from(L).map(U=>U.props.value).join(";");return P.jsx(dA,{...p,children:P.jsxs(ODe,{required:m,scope:e,trigger:h,onTriggerChange:y,valueNode:g,onValueNodeChange:v,valueNodeHasChildren:w,onValueNodeHasChildrenChange:x,contentId:Vr(),value:E,onValueChange:T,open:k,onOpenChange:R,dir:A,triggerPointerDownPosRef:D,disabled:d,children:[P.jsx(RA.Provider,{scope:e,children:P.jsx(LDe,{scope:t.__scopeSelect,onNativeOptionAdd:_.useCallback(U=>{I(Y=>new Set(Y).add(U))},[]),onNativeOptionRemove:_.useCallback(U=>{I(Y=>{const W=new Set(Y);return W.delete(U),W})},[]),children:n})}),M?P.jsxs(PY,{"aria-hidden":!0,required:m,tabIndex:-1,name:f,autoComplete:l,value:E,onChange:U=>T(U.target.value),disabled:d,children:[E===void 0?P.jsx("option",{value:""}):null,Array.from(L)]},j):null]})})};rY.displayName=N0;var sY="SelectTrigger",iY=_.forwardRef((t,e)=>{const{__scopeSelect:n,disabled:r=!1,...s}=t,i=TA(n),a=Bd(sY,n),o=a.disabled||r,c=tt(e,a.onTriggerChange),u=PA(n),[f,l,d]=TY(p=>{const h=u().filter(v=>!v.disabled),y=h.find(v=>v.value===a.value),g=kY(h,p,y);g!==void 0&&a.onValueChange(g.value)}),m=()=>{o||(a.onOpenChange(!0),d())};return P.jsx(Dv,{asChild:!0,...i,children:P.jsx(De.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:o,"data-disabled":o?"":void 0,"data-placeholder":RY(a.value)?"":void 0,...s,ref:c,onClick:me(s.onClick,p=>{p.currentTarget.focus()}),onPointerDown:me(s.onPointerDown,p=>{const h=p.target;h.hasPointerCapture(p.pointerId)&&h.releasePointerCapture(p.pointerId),p.button===0&&p.ctrlKey===!1&&(m(),a.triggerPointerDownPosRef.current={x:Math.round(p.pageX),y:Math.round(p.pageY)},p.preventDefault())}),onKeyDown:me(s.onKeyDown,p=>{const h=f.current!=="";!(p.ctrlKey||p.altKey||p.metaKey)&&p.key.length===1&&l(p.key),!(h&&p.key===" ")&&DDe.includes(p.key)&&(m(),p.preventDefault())})})})});iY.displayName=sY;var oY="SelectValue",aY=_.forwardRef((t,e)=>{const{__scopeSelect:n,className:r,style:s,children:i,placeholder:a="",...o}=t,c=Bd(oY,n),{onValueNodeHasChildrenChange:u}=c,f=i!==void 0,l=tt(e,c.onValueNodeChange);return Ln(()=>{u(f)},[u,f]),P.jsx(De.span,{...o,ref:l,style:{pointerEvents:"none"},children:RY(c.value)?P.jsx(P.Fragment,{children:a}):i})});aY.displayName=oY;var $De="SelectIcon",lY=_.forwardRef((t,e)=>{const{__scopeSelect:n,children:r,...s}=t;return P.jsx(De.span,{"aria-hidden":!0,...s,ref:e,children:r||"▼"})});lY.displayName=$De;var jDe="SelectPortal",cY=t=>P.jsx(Sv,{asChild:!0,...t});cY.displayName=jDe;var tp="SelectContent",uY=_.forwardRef((t,e)=>{const n=Bd(tp,t.__scopeSelect),[r,s]=_.useState();if(Ln(()=>{s(new DocumentFragment)},[]),!n.open){const i=r;return i?Ns.createPortal(P.jsx(dY,{scope:t.__scopeSelect,children:P.jsx(RA.Slot,{scope:t.__scopeSelect,children:P.jsx("div",{children:t.children})})}),i):null}return P.jsx(fY,{...t,ref:e})});uY.displayName=tp;var Ql=10,[dY,Ud]=Ov(tp),FDe="SelectContentImpl",fY=_.forwardRef((t,e)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:s,onEscapeKeyDown:i,onPointerDownOutside:a,side:o,sideOffset:c,align:u,alignOffset:f,arrowPadding:l,collisionBoundary:d,collisionPadding:m,sticky:p,hideWhenDetached:h,avoidCollisions:y,...g}=t,v=Bd(tp,n),[w,x]=_.useState(null),[A,k]=_.useState(null),R=tt(e,ie=>x(ie)),[E,T]=_.useState(null),[D,M]=_.useState(null),L=PA(n),[I,j]=_.useState(!1),U=_.useRef(!1);_.useEffect(()=>{if(w)return Ev(w)},[w]),F1();const Y=_.useCallback(ie=>{const[be,...Ae]=L().map(Ne=>Ne.ref.current),[_e]=Ae.slice(-1),Oe=document.activeElement;for(const Ne of ie)if(Ne===Oe||(Ne==null||Ne.scrollIntoView({block:"nearest"}),Ne===be&&A&&(A.scrollTop=0),Ne===_e&&A&&(A.scrollTop=A.scrollHeight),Ne==null||Ne.focus(),document.activeElement!==Oe))return},[L,A]),W=_.useCallback(()=>Y([E,w]),[Y,E,w]);_.useEffect(()=>{I&&W()},[I,W]);const{onOpenChange:H,triggerPointerDownPosRef:ee}=v;_.useEffect(()=>{if(w){let ie={x:0,y:0};const be=_e=>{var Oe,Ne;ie={x:Math.abs(Math.round(_e.pageX)-(((Oe=ee.current)==null?void 0:Oe.x)??0)),y:Math.abs(Math.round(_e.pageY)-(((Ne=ee.current)==null?void 0:Ne.y)??0))}},Ae=_e=>{ie.x<=10&&ie.y<=10?_e.preventDefault():w.contains(_e.target)||H(!1),document.removeEventListener("pointermove",be),ee.current=null};return ee.current!==null&&(document.addEventListener("pointermove",be),document.addEventListener("pointerup",Ae,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",be),document.removeEventListener("pointerup",Ae,{capture:!0})}}},[w,H,ee]),_.useEffect(()=>{const ie=()=>H(!1);return window.addEventListener("blur",ie),window.addEventListener("resize",ie),()=>{window.removeEventListener("blur",ie),window.removeEventListener("resize",ie)}},[H]);const[re,X]=TY(ie=>{const be=L().filter(Oe=>!Oe.disabled),Ae=be.find(Oe=>Oe.ref.current===document.activeElement),_e=kY(be,ie,Ae);_e&&setTimeout(()=>_e.ref.current.focus())}),G=_.useCallback((ie,be,Ae)=>{const _e=!U.current&&!Ae;(v.value!==void 0&&v.value===be||_e)&&(T(ie),_e&&(U.current=!0))},[v.value]),K=_.useCallback(()=>w==null?void 0:w.focus(),[w]),J=_.useCallback((ie,be,Ae)=>{const _e=!U.current&&!Ae;(v.value!==void 0&&v.value===be||_e)&&M(ie)},[v.value]),ue=r==="popper"?gN:hY,de=ue===gN?{side:o,sideOffset:c,align:u,alignOffset:f,arrowPadding:l,collisionBoundary:d,collisionPadding:m,sticky:p,hideWhenDetached:h,avoidCollisions:y}:{};return P.jsx(dY,{scope:n,content:w,viewport:A,onViewportChange:k,itemRefCallback:G,selectedItem:E,onItemLeave:K,itemTextRefCallback:J,focusSelectedItem:W,selectedItemText:D,position:r,isPositioned:I,searchRef:re,children:P.jsx(o0,{as:Ra,allowPinchZoom:!0,children:P.jsx(i0,{asChild:!0,trapped:v.open,onMountAutoFocus:ie=>{ie.preventDefault()},onUnmountAutoFocus:me(s,ie=>{var be;(be=v.trigger)==null||be.focus({preventScroll:!0}),ie.preventDefault()}),children:P.jsx(Jc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:ie=>ie.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:P.jsx(ue,{role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:ie=>ie.preventDefault(),...g,...de,onPlaced:()=>j(!0),ref:R,style:{display:"flex",flexDirection:"column",outline:"none",...g.style},onKeyDown:me(g.onKeyDown,ie=>{const be=ie.ctrlKey||ie.altKey||ie.metaKey;if(ie.key==="Tab"&&ie.preventDefault(),!be&&ie.key.length===1&&X(ie.key),["ArrowUp","ArrowDown","Home","End"].includes(ie.key)){let _e=L().filter(Oe=>!Oe.disabled).map(Oe=>Oe.ref.current);if(["ArrowUp","End"].includes(ie.key)&&(_e=_e.slice().reverse()),["ArrowUp","ArrowDown"].includes(ie.key)){const Oe=ie.target,Ne=_e.indexOf(Oe);_e=_e.slice(Ne+1)}setTimeout(()=>Y(_e)),ie.preventDefault()}})})})})})})});fY.displayName=FDe;var zDe="SelectItemAlignedPosition",hY=_.forwardRef((t,e)=>{const{__scopeSelect:n,onPlaced:r,...s}=t,i=Bd(tp,n),a=Ud(tp,n),[o,c]=_.useState(null),[u,f]=_.useState(null),l=tt(e,R=>f(R)),d=PA(n),m=_.useRef(!1),p=_.useRef(!0),{viewport:h,selectedItem:y,selectedItemText:g,focusSelectedItem:v}=a,w=_.useCallback(()=>{if(i.trigger&&i.valueNode&&o&&u&&h&&y&&g){const R=i.trigger.getBoundingClientRect(),E=u.getBoundingClientRect(),T=i.valueNode.getBoundingClientRect(),D=g.getBoundingClientRect();if(i.dir!=="rtl"){const Oe=D.left-E.left,Ne=T.left-Oe,ye=R.left-Ne,$e=R.width+ye,ut=Math.max($e,E.width),Qe=window.innerWidth-Ql,yt=nw(Ne,[Ql,Qe-ut]);o.style.minWidth=$e+"px",o.style.left=yt+"px"}else{const Oe=E.right-D.right,Ne=window.innerWidth-T.right-Oe,ye=window.innerWidth-R.right-Ne,$e=R.width+ye,ut=Math.max($e,E.width),Qe=window.innerWidth-Ql,yt=nw(Ne,[Ql,Qe-ut]);o.style.minWidth=$e+"px",o.style.right=yt+"px"}const M=d(),L=window.innerHeight-Ql*2,I=h.scrollHeight,j=window.getComputedStyle(u),U=parseInt(j.borderTopWidth,10),Y=parseInt(j.paddingTop,10),W=parseInt(j.borderBottomWidth,10),H=parseInt(j.paddingBottom,10),ee=U+Y+I+H+W,re=Math.min(y.offsetHeight*5,ee),X=window.getComputedStyle(h),G=parseInt(X.paddingTop,10),K=parseInt(X.paddingBottom,10),J=R.top+R.height/2-Ql,ue=L-J,de=y.offsetHeight/2,ie=y.offsetTop+de,be=U+Y+ie,Ae=ee-be;if(be<=J){const Oe=y===M[M.length-1].ref.current;o.style.bottom="0px";const Ne=u.clientHeight-h.offsetTop-h.offsetHeight,ye=Math.max(ue,de+(Oe?K:0)+Ne+W),$e=be+ye;o.style.height=$e+"px"}else{const Oe=y===M[0].ref.current;o.style.top="0px";const ye=Math.max(J,U+h.offsetTop+(Oe?G:0)+de)+Ae;o.style.height=ye+"px",h.scrollTop=be-J+h.offsetTop}o.style.margin=`${Ql}px 0`,o.style.minHeight=re+"px",o.style.maxHeight=L+"px",r==null||r(),requestAnimationFrame(()=>m.current=!0)}},[d,i.trigger,i.valueNode,o,u,h,y,g,i.dir,r]);Ln(()=>w(),[w]);const[x,A]=_.useState();Ln(()=>{u&&A(window.getComputedStyle(u).zIndex)},[u]);const k=_.useCallback(R=>{R&&p.current===!0&&(w(),v==null||v(),p.current=!1)},[w,v]);return P.jsx(UDe,{scope:n,contentWrapper:o,shouldExpandOnScrollRef:m,onScrollButtonChange:k,children:P.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:x},children:P.jsx(De.div,{...s,ref:l,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})});hY.displayName=zDe;var BDe="SelectPopperPosition",gN=_.forwardRef((t,e)=>{const{__scopeSelect:n,align:r="start",collisionPadding:s=Ql,...i}=t,a=TA(n);return P.jsx(w0,{...a,...i,ref:e,align:r,collisionPadding:s,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});gN.displayName=BDe;var[UDe,b$]=Ov(tp,{}),vN="SelectViewport",pY=_.forwardRef((t,e)=>{const{__scopeSelect:n,nonce:r,...s}=t,i=Ud(vN,n),a=b$(vN,n),o=tt(e,i.onViewportChange),c=_.useRef(0);return P.jsxs(P.Fragment,{children:[P.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),P.jsx(RA.Slot,{scope:n,children:P.jsx(De.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:o,style:{position:"relative",flex:1,overflow:"auto",...s.style},onScroll:me(s.onScroll,u=>{const f=u.currentTarget,{contentWrapper:l,shouldExpandOnScrollRef:d}=a;if(d!=null&&d.current&&l){const m=Math.abs(c.current-f.scrollTop);if(m>0){const p=window.innerHeight-Ql*2,h=parseFloat(l.style.minHeight),y=parseFloat(l.style.height),g=Math.max(h,y);if(g0?x:0,l.style.justifyContent="flex-end")}}}c.current=f.scrollTop})})})]})});pY.displayName=vN;var mY="SelectGroup",[HDe,WDe]=Ov(mY),VDe=_.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,s=Vr();return P.jsx(HDe,{scope:n,id:s,children:P.jsx(De.div,{role:"group","aria-labelledby":s,...r,ref:e})})});VDe.displayName=mY;var gY="SelectLabel",vY=_.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,s=WDe(gY,n);return P.jsx(De.div,{id:s.id,...r,ref:e})});vY.displayName=gY;var TC="SelectItem",[qDe,yY]=Ov(TC),bY=_.forwardRef((t,e)=>{const{__scopeSelect:n,value:r,disabled:s=!1,textValue:i,...a}=t,o=Bd(TC,n),c=Ud(TC,n),u=o.value===r,[f,l]=_.useState(i??""),[d,m]=_.useState(!1),p=tt(e,g=>{var v;return(v=c.itemRefCallback)==null?void 0:v.call(c,g,r,s)}),h=Vr(),y=()=>{s||(o.onValueChange(r),o.onOpenChange(!1))};if(r==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return P.jsx(qDe,{scope:n,value:r,disabled:s,textId:h,isSelected:u,onItemTextChange:_.useCallback(g=>{l(v=>v||((g==null?void 0:g.textContent)??"").trim())},[]),children:P.jsx(RA.ItemSlot,{scope:n,value:r,disabled:s,textValue:f,children:P.jsx(De.div,{role:"option","aria-labelledby":h,"data-highlighted":d?"":void 0,"aria-selected":u&&d,"data-state":u?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...a,ref:p,onFocus:me(a.onFocus,()=>m(!0)),onBlur:me(a.onBlur,()=>m(!1)),onPointerUp:me(a.onPointerUp,y),onPointerMove:me(a.onPointerMove,g=>{var v;s?(v=c.onItemLeave)==null||v.call(c):g.currentTarget.focus({preventScroll:!0})}),onPointerLeave:me(a.onPointerLeave,g=>{var v;g.currentTarget===document.activeElement&&((v=c.onItemLeave)==null||v.call(c))}),onKeyDown:me(a.onKeyDown,g=>{var w;((w=c.searchRef)==null?void 0:w.current)!==""&&g.key===" "||(NDe.includes(g.key)&&y(),g.key===" "&&g.preventDefault())})})})})});bY.displayName=TC;var By="SelectItemText",wY=_.forwardRef((t,e)=>{const{__scopeSelect:n,className:r,style:s,...i}=t,a=Bd(By,n),o=Ud(By,n),c=yY(By,n),u=IDe(By,n),[f,l]=_.useState(null),d=tt(e,g=>l(g),c.onItemTextChange,g=>{var v;return(v=o.itemTextRefCallback)==null?void 0:v.call(o,g,c.value,c.disabled)}),m=f==null?void 0:f.textContent,p=_.useMemo(()=>P.jsx("option",{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:h,onNativeOptionRemove:y}=u;return Ln(()=>(h(p),()=>y(p)),[h,y,p]),P.jsxs(P.Fragment,{children:[P.jsx(De.span,{id:c.textId,...i,ref:d}),c.isSelected&&a.valueNode&&!a.valueNodeHasChildren?Ns.createPortal(i.children,a.valueNode):null]})});wY.displayName=By;var _Y="SelectItemIndicator",xY=_.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t;return yY(_Y,n).isSelected?P.jsx(De.span,{"aria-hidden":!0,...r,ref:e}):null});xY.displayName=_Y;var yN="SelectScrollUpButton",SY=_.forwardRef((t,e)=>{const n=Ud(yN,t.__scopeSelect),r=b$(yN,t.__scopeSelect),[s,i]=_.useState(!1),a=tt(e,r.onScrollButtonChange);return Ln(()=>{if(n.viewport&&n.isPositioned){let o=function(){const u=c.scrollTop>0;i(u)};const c=n.viewport;return o(),c.addEventListener("scroll",o),()=>c.removeEventListener("scroll",o)}},[n.viewport,n.isPositioned]),s?P.jsx(CY,{...t,ref:a,onAutoScroll:()=>{const{viewport:o,selectedItem:c}=n;o&&c&&(o.scrollTop=o.scrollTop-c.offsetHeight)}}):null});SY.displayName=yN;var bN="SelectScrollDownButton",EY=_.forwardRef((t,e)=>{const n=Ud(bN,t.__scopeSelect),r=b$(bN,t.__scopeSelect),[s,i]=_.useState(!1),a=tt(e,r.onScrollButtonChange);return Ln(()=>{if(n.viewport&&n.isPositioned){let o=function(){const u=c.scrollHeight-c.clientHeight,f=Math.ceil(c.scrollTop)c.removeEventListener("scroll",o)}},[n.viewport,n.isPositioned]),s?P.jsx(CY,{...t,ref:a,onAutoScroll:()=>{const{viewport:o,selectedItem:c}=n;o&&c&&(o.scrollTop=o.scrollTop+c.offsetHeight)}}):null});EY.displayName=bN;var CY=_.forwardRef((t,e)=>{const{__scopeSelect:n,onAutoScroll:r,...s}=t,i=Ud("SelectScrollButton",n),a=_.useRef(null),o=PA(n),c=_.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return _.useEffect(()=>()=>c(),[c]),Ln(()=>{var f;const u=o().find(l=>l.ref.current===document.activeElement);(f=u==null?void 0:u.ref.current)==null||f.scrollIntoView({block:"nearest"})},[o]),P.jsx(De.div,{"aria-hidden":!0,...s,ref:e,style:{flexShrink:0,...s.style},onPointerDown:me(s.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:me(s.onPointerMove,()=>{var u;(u=i.onItemLeave)==null||u.call(i),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:me(s.onPointerLeave,()=>{c()})})}),GDe="SelectSeparator",AY=_.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t;return P.jsx(De.div,{"aria-hidden":!0,...r,ref:e})});AY.displayName=GDe;var wN="SelectArrow",KDe=_.forwardRef((t,e)=>{const{__scopeSelect:n,...r}=t,s=TA(n),i=Bd(wN,n),a=Ud(wN,n);return i.open&&a.position==="popper"?P.jsx(_0,{...s,...r,ref:e}):null});KDe.displayName=wN;function RY(t){return t===""||t===void 0}var PY=_.forwardRef((t,e)=>{const{value:n,...r}=t,s=_.useRef(null),i=tt(e,s),a=Pv(n);return _.useEffect(()=>{const o=s.current,c=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(c,"value").set;if(a!==n&&f){const l=new Event("change",{bubbles:!0});f.call(o,n),o.dispatchEvent(l)}},[a,n]),P.jsx(k0,{asChild:!0,children:P.jsx("select",{...r,ref:i,defaultValue:n})})});PY.displayName="BubbleSelect";function TY(t){const e=Ut(t),n=_.useRef(""),r=_.useRef(0),s=_.useCallback(a=>{const o=n.current+a;e(o),function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(o)},[e]),i=_.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return _.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,s,i]}function kY(t,e,n){const s=e.length>1&&Array.from(e).every(u=>u===e[0])?e[0]:e,i=n?t.indexOf(n):-1;let a=YDe(t,Math.max(i,0));s.length===1&&(a=a.filter(u=>u!==n));const c=a.find(u=>u.textValue.toLowerCase().startsWith(s.toLowerCase()));return c!==n?c:void 0}function YDe(t,e){return t.map((n,r)=>t[(e+r)%t.length])}var XDe=rY,DY=iY,QDe=aY,JDe=lY,ZDe=cY,NY=uY,eNe=pY,MY=vY,OY=bY,tNe=wY,nNe=xY,LY=SY,IY=EY,$Y=AY;const i5e=XDe,o5e=QDe,rNe=_.forwardRef(({className:t,children:e,...n},r)=>P.jsxs(DY,{ref:r,className:ce("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...n,children:[e,P.jsx(JDe,{asChild:!0,children:P.jsx($1,{className:"h-4 w-4 opacity-50"})})]}));rNe.displayName=DY.displayName;const jY=_.forwardRef(({className:t,...e},n)=>P.jsx(LY,{ref:n,className:ce("flex cursor-default items-center justify-center py-1",t),...e,children:P.jsx(kfe,{className:"h-4 w-4"})}));jY.displayName=LY.displayName;const FY=_.forwardRef(({className:t,...e},n)=>P.jsx(IY,{ref:n,className:ce("flex cursor-default items-center justify-center py-1",t),...e,children:P.jsx($1,{className:"h-4 w-4"})}));FY.displayName=IY.displayName;const sNe=_.forwardRef(({className:t,children:e,position:n="popper",...r},s)=>P.jsx(ZDe,{children:P.jsxs(NY,{ref:s,className:ce("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:n,...r,children:[P.jsx(jY,{}),P.jsx(eNe,{className:ce("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),P.jsx(FY,{})]})}));sNe.displayName=NY.displayName;const iNe=_.forwardRef(({className:t,...e},n)=>P.jsx(MY,{ref:n,className:ce("py-1.5 pl-8 pr-2 text-sm font-semibold",t),...e}));iNe.displayName=MY.displayName;const oNe=_.forwardRef(({className:t,children:e,...n},r)=>P.jsxs(OY,{ref:r,className:ce("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...n,children:[P.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:P.jsx(nNe,{children:P.jsx(r0,{className:"h-4 w-4"})})}),P.jsx(tNe,{children:e})]}));oNe.displayName=OY.displayName;const aNe=_.forwardRef(({className:t,...e},n)=>P.jsx($Y,{ref:n,className:ce("-mx-1 my-1 h-px bg-muted",t),...e}));aNe.displayName=$Y.displayName;const lNe=PL,cNe=TL,uNe=kL,zY=_.forwardRef(({className:t,...e},n)=>P.jsx(a0,{className:ce("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",t),...e,ref:n}));zY.displayName=a0.displayName;const dNe=Ho("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),BY=_.forwardRef(({side:t="right",className:e,children:n,...r},s)=>P.jsxs(uNe,{children:[P.jsx(zY,{}),P.jsxs(l0,{ref:s,className:ce(dNe({side:t}),e),...r,children:[n,P.jsxs(d0,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[P.jsx(vL,{className:"h-4 w-4"}),P.jsx("span",{className:"sr-only",children:ft("common.close")})]})]})]}));BY.displayName=l0.displayName;const fNe=_.forwardRef(({className:t,...e},n)=>P.jsx(c0,{ref:n,className:ce("text-lg font-semibold text-foreground",t),...e}));fNe.displayName=c0.displayName;const hNe=_.forwardRef(({className:t,...e},n)=>P.jsx(u0,{ref:n,className:ce("text-sm text-muted-foreground",t),...e}));hNe.displayName=u0.displayName;var UY=["PageUp","PageDown"],HY=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],WY={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Lv="Slider",[_N,pNe,mNe]=Xc(Lv),[VY,a5e]=Tn(Lv,[mNe]),[gNe,kA]=VY(Lv),qY=_.forwardRef((t,e)=>{const{name:n,min:r=0,max:s=100,step:i=1,orientation:a="horizontal",disabled:o=!1,minStepsBetweenThumbs:c=0,defaultValue:u=[r],value:f,onValueChange:l=()=>{},onValueCommit:d=()=>{},inverted:m=!1,...p}=t,h=_.useRef(new Set),y=_.useRef(0),v=a==="horizontal"?vNe:yNe,[w=[],x]=sr({prop:f,defaultProp:u,onChange:D=>{var L;(L=[...h.current][y.current])==null||L.focus(),l(D)}}),A=_.useRef(w);function k(D){const M=SNe(w,D);T(D,M)}function R(D){T(D,y.current)}function E(){const D=A.current[y.current];w[y.current]!==D&&d(w)}function T(D,M,{commit:L}={commit:!1}){const I=RNe(i),j=PNe(Math.round((D-r)/i)*i+r,I),U=nw(j,[r,s]);x((Y=[])=>{const W=_Ne(Y,U,M);if(ANe(W,c*i)){y.current=W.indexOf(U);const H=String(W)!==String(Y);return H&&L&&d(W),H?W:Y}else return Y})}return P.jsx(gNe,{scope:t.__scopeSlider,name:n,disabled:o,min:r,max:s,valueIndexToChangeRef:y,thumbs:h.current,values:w,orientation:a,children:P.jsx(_N.Provider,{scope:t.__scopeSlider,children:P.jsx(_N.Slot,{scope:t.__scopeSlider,children:P.jsx(v,{"aria-disabled":o,"data-disabled":o?"":void 0,...p,ref:e,onPointerDown:me(p.onPointerDown,()=>{o||(A.current=w)}),min:r,max:s,inverted:m,onSlideStart:o?void 0:k,onSlideMove:o?void 0:R,onSlideEnd:o?void 0:E,onHomeKeyDown:()=>!o&&T(r,0,{commit:!0}),onEndKeyDown:()=>!o&&T(s,w.length-1,{commit:!0}),onStepKeyDown:({event:D,direction:M})=>{if(!o){const j=UY.includes(D.key)||D.shiftKey&&HY.includes(D.key)?10:1,U=y.current,Y=w[U],W=i*j*M;T(Y+W,U,{commit:!0})}}})})})})});qY.displayName=Lv;var[GY,KY]=VY(Lv,{startEdge:"left",endEdge:"right",size:"width",direction:1}),vNe=_.forwardRef((t,e)=>{const{min:n,max:r,dir:s,inverted:i,onSlideStart:a,onSlideMove:o,onSlideEnd:c,onStepKeyDown:u,...f}=t,[l,d]=_.useState(null),m=tt(e,w=>d(w)),p=_.useRef(),h=Ma(s),y=h==="ltr",g=y&&!i||!y&&i;function v(w){const x=p.current||l.getBoundingClientRect(),A=[0,x.width],R=w$(A,g?[n,r]:[r,n]);return p.current=x,R(w-x.left)}return P.jsx(GY,{scope:t.__scopeSlider,startEdge:g?"left":"right",endEdge:g?"right":"left",direction:g?1:-1,size:"width",children:P.jsx(YY,{dir:h,"data-orientation":"horizontal",...f,ref:m,style:{...f.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:w=>{const x=v(w.clientX);a==null||a(x)},onSlideMove:w=>{const x=v(w.clientX);o==null||o(x)},onSlideEnd:()=>{p.current=void 0,c==null||c()},onStepKeyDown:w=>{const A=WY[g?"from-left":"from-right"].includes(w.key);u==null||u({event:w,direction:A?-1:1})}})})}),yNe=_.forwardRef((t,e)=>{const{min:n,max:r,inverted:s,onSlideStart:i,onSlideMove:a,onSlideEnd:o,onStepKeyDown:c,...u}=t,f=_.useRef(null),l=tt(e,f),d=_.useRef(),m=!s;function p(h){const y=d.current||f.current.getBoundingClientRect(),g=[0,y.height],w=w$(g,m?[r,n]:[n,r]);return d.current=y,w(h-y.top)}return P.jsx(GY,{scope:t.__scopeSlider,startEdge:m?"bottom":"top",endEdge:m?"top":"bottom",size:"height",direction:m?1:-1,children:P.jsx(YY,{"data-orientation":"vertical",...u,ref:l,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:h=>{const y=p(h.clientY);i==null||i(y)},onSlideMove:h=>{const y=p(h.clientY);a==null||a(y)},onSlideEnd:()=>{d.current=void 0,o==null||o()},onStepKeyDown:h=>{const g=WY[m?"from-bottom":"from-top"].includes(h.key);c==null||c({event:h,direction:g?-1:1})}})})}),YY=_.forwardRef((t,e)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:s,onSlideEnd:i,onHomeKeyDown:a,onEndKeyDown:o,onStepKeyDown:c,...u}=t,f=kA(Lv,n);return P.jsx(De.span,{...u,ref:e,onKeyDown:me(t.onKeyDown,l=>{l.key==="Home"?(a(l),l.preventDefault()):l.key==="End"?(o(l),l.preventDefault()):UY.concat(HY).includes(l.key)&&(c(l),l.preventDefault())}),onPointerDown:me(t.onPointerDown,l=>{const d=l.target;d.setPointerCapture(l.pointerId),l.preventDefault(),f.thumbs.has(d)?d.focus():r(l)}),onPointerMove:me(t.onPointerMove,l=>{l.target.hasPointerCapture(l.pointerId)&&s(l)}),onPointerUp:me(t.onPointerUp,l=>{const d=l.target;d.hasPointerCapture(l.pointerId)&&(d.releasePointerCapture(l.pointerId),i(l))})})}),XY="SliderTrack",QY=_.forwardRef((t,e)=>{const{__scopeSlider:n,...r}=t,s=kA(XY,n);return P.jsx(De.span,{"data-disabled":s.disabled?"":void 0,"data-orientation":s.orientation,...r,ref:e})});QY.displayName=XY;var xN="SliderRange",JY=_.forwardRef((t,e)=>{const{__scopeSlider:n,...r}=t,s=kA(xN,n),i=KY(xN,n),a=_.useRef(null),o=tt(e,a),c=s.values.length,u=s.values.map(d=>eX(d,s.min,s.max)),f=c>1?Math.min(...u):0,l=100-Math.max(...u);return P.jsx(De.span,{"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,...r,ref:o,style:{...t.style,[i.startEdge]:f+"%",[i.endEdge]:l+"%"}})});JY.displayName=xN;var SN="SliderThumb",ZY=_.forwardRef((t,e)=>{const n=pNe(t.__scopeSlider),[r,s]=_.useState(null),i=tt(e,o=>s(o)),a=_.useMemo(()=>r?n().findIndex(o=>o.ref.current===r):-1,[n,r]);return P.jsx(bNe,{...t,ref:i,index:a})}),bNe=_.forwardRef((t,e)=>{const{__scopeSlider:n,index:r,name:s,...i}=t,a=kA(SN,n),o=KY(SN,n),[c,u]=_.useState(null),f=tt(e,v=>u(v)),l=c?!!c.closest("form"):!0,d=v0(c),m=a.values[r],p=m===void 0?0:eX(m,a.min,a.max),h=xNe(r,a.values.length),y=d==null?void 0:d[o.size],g=y?ENe(y,p,o.direction):0;return _.useEffect(()=>{if(c)return a.thumbs.add(c),()=>{a.thumbs.delete(c)}},[c,a.thumbs]),P.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[o.startEdge]:`calc(${p}% + ${g}px)`},children:[P.jsx(_N.ItemSlot,{scope:t.__scopeSlider,children:P.jsx(De.span,{role:"slider","aria-label":t["aria-label"]||h,"aria-valuemin":a.min,"aria-valuenow":m,"aria-valuemax":a.max,"aria-orientation":a.orientation,"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,tabIndex:a.disabled?void 0:0,...i,ref:f,style:m===void 0?{display:"none"}:t.style,onFocus:me(t.onFocus,()=>{a.valueIndexToChangeRef.current=r})})}),l&&P.jsx(wNe,{name:s??(a.name?a.name+(a.values.length>1?"[]":""):void 0),value:m},r)]})});ZY.displayName=SN;var wNe=t=>{const{value:e,...n}=t,r=_.useRef(null),s=Pv(e);return _.useEffect(()=>{const i=r.current,a=window.HTMLInputElement.prototype,c=Object.getOwnPropertyDescriptor(a,"value").set;if(s!==e&&c){const u=new Event("input",{bubbles:!0});c.call(i,e),i.dispatchEvent(u)}},[s,e]),P.jsx("input",{style:{display:"none"},...n,ref:r,defaultValue:e})};function _Ne(t=[],e,n){const r=[...t];return r[n]=e,r.sort((s,i)=>s-i)}function eX(t,e,n){const i=100/(n-e)*(t-e);return nw(i,[0,100])}function xNe(t,e){return e>2?`Value ${t+1} of ${e}`:e===2?["Minimum","Maximum"][t]:void 0}function SNe(t,e){if(t.length===1)return 0;const n=t.map(s=>Math.abs(s-e)),r=Math.min(...n);return n.indexOf(r)}function ENe(t,e,n){const r=t/2,i=w$([0,50],[0,r]);return(r-i(e)*n)*n}function CNe(t){return t.slice(0,-1).map((e,n)=>t[n+1]-e)}function ANe(t,e){if(e>0){const n=CNe(t);return Math.min(...n)>=e}return!0}function w$(t,e){return n=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const r=(e[1]-e[0])/(t[1]-t[0]);return e[0]+r*(n-t[0])}}function RNe(t){return(String(t).split(".")[1]||"").length}function PNe(t,e){const n=Math.pow(10,e);return Math.round(t*n)/n}var tX=qY,TNe=QY,kNe=JY,DNe=ZY;const NNe=_.forwardRef(({className:t,...e},n)=>P.jsxs(tX,{ref:n,className:ce("relative flex w-full touch-none select-none items-center",t),...e,children:[P.jsx(TNe,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:P.jsx(kNe,{className:"absolute h-full bg-primary"})}),P.jsx(DNe,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})]}));NNe.displayName=tX.displayName;var _$="Switch",[MNe,l5e]=Tn(_$),[ONe,LNe]=MNe(_$),nX=_.forwardRef((t,e)=>{const{__scopeSwitch:n,name:r,checked:s,defaultChecked:i,required:a,disabled:o,value:c="on",onCheckedChange:u,...f}=t,[l,d]=_.useState(null),m=tt(e,v=>d(v)),p=_.useRef(!1),h=l?!!l.closest("form"):!0,[y=!1,g]=sr({prop:s,defaultProp:i,onChange:u});return P.jsxs(ONe,{scope:n,checked:y,disabled:o,children:[P.jsx(De.button,{type:"button",role:"switch","aria-checked":y,"aria-required":a,"data-state":iX(y),"data-disabled":o?"":void 0,disabled:o,value:c,...f,ref:m,onClick:me(t.onClick,v=>{g(w=>!w),h&&(p.current=v.isPropagationStopped(),p.current||v.stopPropagation())})}),h&&P.jsx(INe,{control:l,bubbles:!p.current,name:r,value:c,checked:y,required:a,disabled:o,style:{transform:"translateX(-100%)"}})]})});nX.displayName=_$;var rX="SwitchThumb",sX=_.forwardRef((t,e)=>{const{__scopeSwitch:n,...r}=t,s=LNe(rX,n);return P.jsx(De.span,{"data-state":iX(s.checked),"data-disabled":s.disabled?"":void 0,...r,ref:e})});sX.displayName=rX;var INe=t=>{const{control:e,checked:n,bubbles:r=!0,...s}=t,i=_.useRef(null),a=Pv(n),o=v0(e);return _.useEffect(()=>{const c=i.current,u=window.HTMLInputElement.prototype,l=Object.getOwnPropertyDescriptor(u,"checked").set;if(a!==n&&l){const d=new Event("click",{bubbles:r});l.call(c,n),c.dispatchEvent(d)}},[a,n,r]),P.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...s,tabIndex:-1,ref:i,style:{...t.style,...o,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function iX(t){return t?"checked":"unchecked"}var oX=nX,$Ne=sX;const jNe=_.forwardRef(({className:t,...e},n)=>P.jsx(oX,{className:ce("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",t),...e,ref:n,children:P.jsx($Ne,{className:ce("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));jNe.displayName=oX.displayName;const FNe=_.forwardRef(({className:t,...e},n)=>P.jsx("div",{className:"relative w-full overflow-auto",children:P.jsx("table",{ref:n,className:ce("w-full caption-bottom text-sm",t),...e})}));FNe.displayName="Table";const zNe=_.forwardRef(({className:t,...e},n)=>P.jsx("thead",{ref:n,className:ce("[&_tr]:border-b",t),...e}));zNe.displayName="TableHeader";const BNe=_.forwardRef(({className:t,...e},n)=>P.jsx("tbody",{ref:n,className:ce("[&_tr:last-child]:border-0",t),...e}));BNe.displayName="TableBody";const UNe=_.forwardRef(({className:t,...e},n)=>P.jsx("tfoot",{ref:n,className:ce("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",t),...e}));UNe.displayName="TableFooter";const HNe=_.forwardRef(({className:t,...e},n)=>P.jsx("tr",{ref:n,className:ce("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",t),...e}));HNe.displayName="TableRow";const WNe=_.forwardRef(({className:t,...e},n)=>P.jsx("th",{ref:n,className:ce("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",t),...e}));WNe.displayName="TableHead";const VNe=_.forwardRef(({className:t,...e},n)=>P.jsx("td",{ref:n,className:ce("py-2 px-4 align-middle [&:has([role=checkbox])]:pr-0",t),...e}));VNe.displayName="TableCell";const qNe=_.forwardRef(({className:t,...e},n)=>P.jsx("caption",{ref:n,className:ce("mt-4 text-sm text-muted-foreground",t),...e}));qNe.displayName="TableCaption";var x$="Tabs",[GNe,c5e]=Tn(x$,[Pl]),aX=Pl(),[KNe,S$]=GNe(x$),lX=_.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,onValueChange:s,defaultValue:i,orientation:a="horizontal",dir:o,activationMode:c="automatic",...u}=t,f=Ma(o),[l,d]=sr({prop:r,onChange:s,defaultProp:i});return P.jsx(KNe,{scope:n,baseId:Vr(),value:l,onValueChange:d,orientation:a,dir:f,activationMode:c,children:P.jsx(De.div,{dir:f,"data-orientation":a,...u,ref:e})})});lX.displayName=x$;var cX="TabsList",uX=_.forwardRef((t,e)=>{const{__scopeTabs:n,loop:r=!0,...s}=t,i=S$(cX,n),a=aX(n);return P.jsx(x0,{asChild:!0,...a,orientation:i.orientation,dir:i.dir,loop:r,children:P.jsx(De.div,{role:"tablist","aria-orientation":i.orientation,...s,ref:e})})});uX.displayName=cX;var dX="TabsTrigger",fX=_.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,disabled:s=!1,...i}=t,a=S$(dX,n),o=aX(n),c=mX(a.baseId,r),u=gX(a.baseId,r),f=r===a.value;return P.jsx(S0,{asChild:!0,...o,focusable:!s,active:f,children:P.jsx(De.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":u,"data-state":f?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:c,...i,ref:e,onMouseDown:me(t.onMouseDown,l=>{!s&&l.button===0&&l.ctrlKey===!1?a.onValueChange(r):l.preventDefault()}),onKeyDown:me(t.onKeyDown,l=>{[" ","Enter"].includes(l.key)&&a.onValueChange(r)}),onFocus:me(t.onFocus,()=>{const l=a.activationMode!=="manual";!f&&!s&&l&&a.onValueChange(r)})})})});fX.displayName=dX;var hX="TabsContent",pX=_.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,forceMount:s,children:i,...a}=t,o=S$(hX,n),c=mX(o.baseId,r),u=gX(o.baseId,r),f=r===o.value,l=_.useRef(f);return _.useEffect(()=>{const d=requestAnimationFrame(()=>l.current=!1);return()=>cancelAnimationFrame(d)},[]),P.jsx(Hn,{present:s||f,children:({present:d})=>P.jsx(De.div,{"data-state":f?"active":"inactive","data-orientation":o.orientation,role:"tabpanel","aria-labelledby":c,hidden:!d,id:u,tabIndex:0,...a,ref:e,style:{...t.style,animationDuration:l.current?"0s":void 0},children:d&&i})})});pX.displayName=hX;function mX(t,e){return`${t}-trigger-${e}`}function gX(t,e){return`${t}-content-${e}`}var YNe=lX,vX=uX,yX=fX,bX=pX;const u5e=YNe,XNe=_.forwardRef(({className:t,...e},n)=>P.jsx(vX,{ref:n,className:ce("inline-flex h-9 items-center justify-center rounded-lg bg-accent p-1 text-muted-foreground",t),...e}));XNe.displayName=vX.displayName;const QNe=_.forwardRef(({className:t,...e},n)=>P.jsx(yX,{ref:n,className:ce("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",t),...e}));QNe.displayName=yX.displayName;const JNe=_.forwardRef(({className:t,...e},n)=>P.jsx(bX,{ref:n,className:ce("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t),...e}));JNe.displayName=bX.displayName;const wX=_.forwardRef(({className:t,...e},n)=>P.jsx("textarea",{className:ce("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground/75 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),ref:n,...e}));wX.displayName="Textarea";var E$="ToastProvider",[C$,ZNe,eMe]=Xc("Toast"),[_X,d5e]=Tn("Toast",[eMe]),[tMe,DA]=_X(E$),xX=t=>{const{__scopeToast:e,label:n="Notification",duration:r=5e3,swipeDirection:s="right",swipeThreshold:i=50,children:a}=t,[o,c]=_.useState(null),[u,f]=_.useState(0),l=_.useRef(!1),d=_.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${E$}\`. Expected non-empty \`string\`.`),P.jsx(C$.Provider,{scope:e,children:P.jsx(tMe,{scope:e,label:n,duration:r,swipeDirection:s,swipeThreshold:i,toastCount:u,viewport:o,onViewportChange:c,onToastAdd:_.useCallback(()=>f(m=>m+1),[]),onToastRemove:_.useCallback(()=>f(m=>m-1),[]),isFocusedToastEscapeKeyDownRef:l,isClosePausedRef:d,children:a})})};xX.displayName=E$;var SX="ToastViewport",nMe=["F8"],EN="toast.viewportPause",CN="toast.viewportResume",EX=_.forwardRef((t,e)=>{const{__scopeToast:n,hotkey:r=nMe,label:s="Notifications ({hotkey})",...i}=t,a=DA(SX,n),o=ZNe(n),c=_.useRef(null),u=_.useRef(null),f=_.useRef(null),l=_.useRef(null),d=tt(e,l,a.onViewportChange),m=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),p=a.toastCount>0;_.useEffect(()=>{const y=g=>{var w;r.every(x=>g[x]||g.code===x)&&((w=l.current)==null||w.focus())};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[r]),_.useEffect(()=>{const y=c.current,g=l.current;if(p&&y&&g){const v=()=>{if(!a.isClosePausedRef.current){const k=new CustomEvent(EN);g.dispatchEvent(k),a.isClosePausedRef.current=!0}},w=()=>{if(a.isClosePausedRef.current){const k=new CustomEvent(CN);g.dispatchEvent(k),a.isClosePausedRef.current=!1}},x=k=>{!y.contains(k.relatedTarget)&&w()},A=()=>{y.contains(document.activeElement)||w()};return y.addEventListener("focusin",v),y.addEventListener("focusout",x),y.addEventListener("pointermove",v),y.addEventListener("pointerleave",A),window.addEventListener("blur",v),window.addEventListener("focus",w),()=>{y.removeEventListener("focusin",v),y.removeEventListener("focusout",x),y.removeEventListener("pointermove",v),y.removeEventListener("pointerleave",A),window.removeEventListener("blur",v),window.removeEventListener("focus",w)}}},[p,a.isClosePausedRef]);const h=_.useCallback(({tabbingDirection:y})=>{const v=o().map(w=>{const x=w.ref.current,A=[x,...mMe(x)];return y==="forwards"?A:A.reverse()});return(y==="forwards"?v.reverse():v).flat()},[o]);return _.useEffect(()=>{const y=l.current;if(y){const g=v=>{var A,k,R;const w=v.altKey||v.ctrlKey||v.metaKey;if(v.key==="Tab"&&!w){const E=document.activeElement,T=v.shiftKey;if(v.target===y&&T){(A=u.current)==null||A.focus();return}const L=h({tabbingDirection:T?"backwards":"forwards"}),I=L.findIndex(j=>j===E);GT(L.slice(I+1))?v.preventDefault():T?(k=u.current)==null||k.focus():(R=f.current)==null||R.focus()}};return y.addEventListener("keydown",g),()=>y.removeEventListener("keydown",g)}},[o,h]),P.jsxs(Mhe,{ref:c,role:"region","aria-label":s.replace("{hotkey}",m),tabIndex:-1,style:{pointerEvents:p?void 0:"none"},children:[p&&P.jsx(AN,{ref:u,onFocusFromOutsideViewport:()=>{const y=h({tabbingDirection:"forwards"});GT(y)}}),P.jsx(C$.Slot,{scope:n,children:P.jsx(De.ol,{tabIndex:-1,...i,ref:d})}),p&&P.jsx(AN,{ref:f,onFocusFromOutsideViewport:()=>{const y=h({tabbingDirection:"backwards"});GT(y)}})]})});EX.displayName=SX;var CX="ToastFocusProxy",AN=_.forwardRef((t,e)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...s}=t,i=DA(CX,n);return P.jsx(k0,{"aria-hidden":!0,tabIndex:0,...s,ref:e,style:{position:"fixed"},onFocus:a=>{var u;const o=a.relatedTarget;!((u=i.viewport)!=null&&u.contains(o))&&r()}})});AN.displayName=CX;var NA="Toast",rMe="toast.swipeStart",sMe="toast.swipeMove",iMe="toast.swipeCancel",oMe="toast.swipeEnd",AX=_.forwardRef((t,e)=>{const{forceMount:n,open:r,defaultOpen:s,onOpenChange:i,...a}=t,[o=!0,c]=sr({prop:r,defaultProp:s,onChange:i});return P.jsx(Hn,{present:n||o,children:P.jsx(cMe,{open:o,...a,ref:e,onClose:()=>c(!1),onPause:Ut(t.onPause),onResume:Ut(t.onResume),onSwipeStart:me(t.onSwipeStart,u=>{u.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:me(t.onSwipeMove,u=>{const{x:f,y:l}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","move"),u.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${f}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${l}px`)}),onSwipeCancel:me(t.onSwipeCancel,u=>{u.currentTarget.setAttribute("data-swipe","cancel"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:me(t.onSwipeEnd,u=>{const{x:f,y:l}=u.detail.delta;u.currentTarget.setAttribute("data-swipe","end"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),u.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),u.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${f}px`),u.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${l}px`),c(!1)})})})});AX.displayName=NA;var[aMe,lMe]=_X(NA,{onClose(){}}),cMe=_.forwardRef((t,e)=>{const{__scopeToast:n,type:r="foreground",duration:s,open:i,onClose:a,onEscapeKeyDown:o,onPause:c,onResume:u,onSwipeStart:f,onSwipeMove:l,onSwipeCancel:d,onSwipeEnd:m,...p}=t,h=DA(NA,n),[y,g]=_.useState(null),v=tt(e,j=>g(j)),w=_.useRef(null),x=_.useRef(null),A=s||h.duration,k=_.useRef(0),R=_.useRef(A),E=_.useRef(0),{onToastAdd:T,onToastRemove:D}=h,M=Ut(()=>{var U;(y==null?void 0:y.contains(document.activeElement))&&((U=h.viewport)==null||U.focus()),a()}),L=_.useCallback(j=>{!j||j===1/0||(window.clearTimeout(E.current),k.current=new Date().getTime(),E.current=window.setTimeout(M,j))},[M]);_.useEffect(()=>{const j=h.viewport;if(j){const U=()=>{L(R.current),u==null||u()},Y=()=>{const W=new Date().getTime()-k.current;R.current=R.current-W,window.clearTimeout(E.current),c==null||c()};return j.addEventListener(EN,Y),j.addEventListener(CN,U),()=>{j.removeEventListener(EN,Y),j.removeEventListener(CN,U)}}},[h.viewport,A,c,u,L]),_.useEffect(()=>{i&&!h.isClosePausedRef.current&&L(A)},[i,A,h.isClosePausedRef,L]),_.useEffect(()=>(T(),()=>D()),[T,D]);const I=_.useMemo(()=>y?MX(y):null,[y]);return h.viewport?P.jsxs(P.Fragment,{children:[I&&P.jsx(uMe,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:I}),P.jsx(aMe,{scope:n,onClose:M,children:Ns.createPortal(P.jsx(C$.ItemSlot,{scope:n,children:P.jsx(Nhe,{asChild:!0,onEscapeKeyDown:me(o,()=>{h.isFocusedToastEscapeKeyDownRef.current||M(),h.isFocusedToastEscapeKeyDownRef.current=!1}),children:P.jsx(De.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":i?"open":"closed","data-swipe-direction":h.swipeDirection,...p,ref:v,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:me(t.onKeyDown,j=>{j.key==="Escape"&&(o==null||o(j.nativeEvent),j.nativeEvent.defaultPrevented||(h.isFocusedToastEscapeKeyDownRef.current=!0,M()))}),onPointerDown:me(t.onPointerDown,j=>{j.button===0&&(w.current={x:j.clientX,y:j.clientY})}),onPointerMove:me(t.onPointerMove,j=>{if(!w.current)return;const U=j.clientX-w.current.x,Y=j.clientY-w.current.y,W=!!x.current,H=["left","right"].includes(h.swipeDirection),ee=["left","up"].includes(h.swipeDirection)?Math.min:Math.max,re=H?ee(0,U):0,X=H?0:ee(0,Y),G=j.pointerType==="touch"?10:2,K={x:re,y:X},J={originalEvent:j,delta:K};W?(x.current=K,yS(sMe,l,J,{discrete:!1})):n4(K,h.swipeDirection,G)?(x.current=K,yS(rMe,f,J,{discrete:!1}),j.target.setPointerCapture(j.pointerId)):(Math.abs(U)>G||Math.abs(Y)>G)&&(w.current=null)}),onPointerUp:me(t.onPointerUp,j=>{const U=x.current,Y=j.target;if(Y.hasPointerCapture(j.pointerId)&&Y.releasePointerCapture(j.pointerId),x.current=null,w.current=null,U){const W=j.currentTarget,H={originalEvent:j,delta:U};n4(U,h.swipeDirection,h.swipeThreshold)?yS(oMe,m,H,{discrete:!0}):yS(iMe,d,H,{discrete:!0}),W.addEventListener("click",ee=>ee.preventDefault(),{once:!0})}})})})}),h.viewport)})]}):null}),uMe=t=>{const{__scopeToast:e,children:n,...r}=t,s=DA(NA,e),[i,a]=_.useState(!1),[o,c]=_.useState(!1);return hMe(()=>a(!0)),_.useEffect(()=>{const u=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(u)},[]),o?null:P.jsx(Sv,{asChild:!0,children:P.jsx(k0,{...r,children:i&&P.jsxs(P.Fragment,{children:[s.label," ",n]})})})},dMe="ToastTitle",RX=_.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return P.jsx(De.div,{...r,ref:e})});RX.displayName=dMe;var fMe="ToastDescription",PX=_.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return P.jsx(De.div,{...r,ref:e})});PX.displayName=fMe;var TX="ToastAction",kX=_.forwardRef((t,e)=>{const{altText:n,...r}=t;return n.trim()?P.jsx(NX,{altText:n,asChild:!0,children:P.jsx(A$,{...r,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${TX}\`. Expected non-empty \`string\`.`),null)});kX.displayName=TX;var DX="ToastClose",A$=_.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t,s=lMe(DX,n);return P.jsx(NX,{asChild:!0,children:P.jsx(De.button,{type:"button",...r,ref:e,onClick:me(t.onClick,s.onClose)})})});A$.displayName=DX;var NX=_.forwardRef((t,e)=>{const{__scopeToast:n,altText:r,...s}=t;return P.jsx(De.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...s,ref:e})});function MX(t){const e=[];return Array.from(t.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&e.push(r.textContent),pMe(r)){const s=r.ariaHidden||r.hidden||r.style.display==="none",i=r.dataset.radixToastAnnounceExclude==="";if(!s)if(i){const a=r.dataset.radixToastAnnounceAlt;a&&e.push(a)}else e.push(...MX(r))}}),e}function yS(t,e,n,{discrete:r}){const s=n.originalEvent.currentTarget,i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});e&&s.addEventListener(t,e,{once:!0}),r?Wb(s,i):s.dispatchEvent(i)}var n4=(t,e,n=0)=>{const r=Math.abs(t.x),s=Math.abs(t.y),i=r>s;return e==="left"||e==="right"?i&&r>n:!i&&s>n};function hMe(t=()=>{}){const e=Ut(t);Ln(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[e])}function pMe(t){return t.nodeType===t.ELEMENT_NODE}function mMe(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function GT(t){const e=document.activeElement;return t.some(n=>n===e?!0:(n.focus(),document.activeElement!==e))}var gMe=xX,OX=EX,LX=AX,IX=RX,$X=PX,jX=kX,FX=A$;const vMe=gMe,zX=_.forwardRef(({className:t,...e},n)=>P.jsx(OX,{ref:n,className:ce("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]",t),...e}));zX.displayName=OX.displayName;const yMe=Ho("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-bottom-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",success:"success bg-green-300 text-success-foreground border-green-400 group"},position:{center:"bottom-0 mx-auto w-auto sm:bottom-0"}},defaultVariants:{variant:"default"}}),BX=_.forwardRef(({className:t,variant:e,...n},r)=>P.jsx(LX,{ref:r,className:ce(yMe({variant:e}),t),...n}));BX.displayName=LX.displayName;const bMe=_.forwardRef(({className:t,...e},n)=>P.jsx(jX,{ref:n,className:ce("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",t),...e}));bMe.displayName=jX.displayName;const UX=_.forwardRef(({className:t,...e},n)=>P.jsx(FX,{ref:n,className:ce("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",t),"toast-close":"",...e,children:P.jsx(vL,{className:"w-4 h-4"})}));UX.displayName=FX.displayName;const HX=_.forwardRef(({className:t,...e},n)=>P.jsx(IX,{ref:n,className:ce("text-sm font-semibold",t),...e}));HX.displayName=IX.displayName;const WX=_.forwardRef(({className:t,...e},n)=>P.jsx($X,{ref:n,className:ce("text-sm opacity-90",t),...e}));WX.displayName=$X.displayName;const wMe=3,_Me=1e6;let KT=0;function xMe(){return KT=(KT+1)%Number.MAX_SAFE_INTEGER,KT.toString()}const YT=new Map,r4=t=>{if(YT.has(t))return;const e=setTimeout(()=>{YT.delete(t),vb({type:"REMOVE_TOAST",toastId:t})},_Me);YT.set(t,e)},SMe=(t,e)=>{switch(e.type){case"ADD_TOAST":return{...t,toasts:[e.toast,...t.toasts].slice(0,wMe)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(n=>n.id===e.toast.id?{...n,...e.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=e;return n?r4(n):t.toasts.forEach(r=>{r4(r.id)}),{...t,toasts:t.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(n=>n.id!==e.toastId)}}},GS=[];let KS={toasts:[]};function vb(t){KS=SMe(KS,t),GS.forEach(e=>{e(KS)})}function EMe({...t}){const e=xMe(),n=s=>vb({type:"UPDATE_TOAST",toast:{...s,id:e}}),r=()=>vb({type:"DISMISS_TOAST",toastId:e});return vb({type:"ADD_TOAST",toast:{...t,id:e,open:!0,onOpenChange:s=>{s||r()}}}),{id:e,dismiss:r,update:n}}function VX(){const[t,e]=_.useState(KS);return _.useEffect(()=>(GS.push(e),()=>{const n=GS.indexOf(e);n>-1&&GS.splice(n,1)}),[t]),{...t,toast:EMe,dismiss:n=>vb({type:"DISMISS_TOAST",toastId:n})}}function qX(){const{toasts:t}=VX();return P.jsxs(vMe,{swipeDirection:"down",children:[t.map(function({id:e,title:n,description:r,action:s,...i}){return P.jsxs(BX,{...i,children:[P.jsxs("div",{className:"grid gap-1",children:[n&&P.jsx(HX,{children:n}),r&&P.jsx(WX,{children:r})]}),s,P.jsx(UX,{})]},e)}),P.jsx(zX,{className:"bottom-0 w-auto mx-auto sm:bottom-0 sm:left-0 sm:right-0"})]})}var CMe="Toggle",R$=_.forwardRef((t,e)=>{const{pressed:n,defaultPressed:r=!1,onPressedChange:s,...i}=t,[a=!1,o]=sr({prop:n,onChange:s,defaultProp:r});return P.jsx(De.button,{type:"button","aria-pressed":a,"data-state":a?"on":"off","data-disabled":t.disabled?"":void 0,...i,ref:e,onClick:me(t.onClick,()=>{t.disabled||o(!a)})})});R$.displayName=CMe;var GX=R$;const KX=Ho("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-3",sm:"h-9 px-2.5",lg:"h-11 px-5"}},defaultVariants:{variant:"default",size:"default"}}),AMe=_.forwardRef(({className:t,variant:e,size:n,...r},s)=>P.jsx(GX,{ref:s,className:ce(KX({variant:e,size:n,className:t})),...r}));AMe.displayName=GX.displayName;var Iv="ToggleGroup",[YX,f5e]=Tn(Iv,[Pl]),XX=Pl(),P$=se.forwardRef((t,e)=>{const{type:n,...r}=t;if(n==="single"){const s=r;return P.jsx(RMe,{...s,ref:e})}if(n==="multiple"){const s=r;return P.jsx(PMe,{...s,ref:e})}throw new Error(`Missing prop \`type\` expected on \`${Iv}\``)});P$.displayName=Iv;var[QX,JX]=YX(Iv),RMe=se.forwardRef((t,e)=>{const{value:n,defaultValue:r,onValueChange:s=()=>{},...i}=t,[a,o]=sr({prop:n,defaultProp:r,onChange:s});return P.jsx(QX,{scope:t.__scopeToggleGroup,type:"single",value:a?[a]:[],onItemActivate:o,onItemDeactivate:se.useCallback(()=>o(""),[o]),children:P.jsx(ZX,{...i,ref:e})})}),PMe=se.forwardRef((t,e)=>{const{value:n,defaultValue:r,onValueChange:s=()=>{},...i}=t,[a=[],o]=sr({prop:n,defaultProp:r,onChange:s}),c=se.useCallback(f=>o((l=[])=>[...l,f]),[o]),u=se.useCallback(f=>o((l=[])=>l.filter(d=>d!==f)),[o]);return P.jsx(QX,{scope:t.__scopeToggleGroup,type:"multiple",value:a,onItemActivate:c,onItemDeactivate:u,children:P.jsx(ZX,{...i,ref:e})})});P$.displayName=Iv;var[TMe,kMe]=YX(Iv),ZX=se.forwardRef((t,e)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:s=!0,orientation:i,dir:a,loop:o=!0,...c}=t,u=XX(n),f=Ma(a),l={role:"group",dir:f,...c};return P.jsx(TMe,{scope:n,rovingFocus:s,disabled:r,children:s?P.jsx(x0,{asChild:!0,...u,orientation:i,dir:f,loop:o,children:P.jsx(De.div,{...l,ref:e})}):P.jsx(De.div,{...l,ref:e})})}),kC="ToggleGroupItem",eQ=se.forwardRef((t,e)=>{const n=JX(kC,t.__scopeToggleGroup),r=kMe(kC,t.__scopeToggleGroup),s=XX(t.__scopeToggleGroup),i=n.value.includes(t.value),a=r.disabled||t.disabled,o={...t,pressed:i,disabled:a},c=se.useRef(null);return r.rovingFocus?P.jsx(S0,{asChild:!0,...s,focusable:!a,active:i,ref:c,children:P.jsx(s4,{...o,ref:e})}):P.jsx(s4,{...o,ref:e})});eQ.displayName=kC;var s4=se.forwardRef((t,e)=>{const{__scopeToggleGroup:n,value:r,...s}=t,i=JX(kC,n),a={role:"radio","aria-checked":t.pressed,"aria-pressed":void 0},o=i.type==="single"?a:void 0;return P.jsx(R$,{...o,...s,ref:e,onPressedChange:c=>{c?i.onItemActivate(r):i.onItemDeactivate(r)}})}),tQ=P$,nQ=eQ;const rQ=_.createContext({size:"default",variant:"default"}),DMe=_.forwardRef(({className:t,variant:e,size:n,children:r,...s},i)=>P.jsx(tQ,{ref:i,className:ce("flex items-center justify-center gap-1",t),...s,children:P.jsx(rQ.Provider,{value:{variant:e,size:n},children:r})}));DMe.displayName=tQ.displayName;const NMe=_.forwardRef(({className:t,children:e,variant:n,size:r,...s},i)=>{const a=_.useContext(rQ);return P.jsx(nQ,{ref:i,className:ce(KX({variant:a.variant||n,size:a.size||r}),t),...s,children:e})});NMe.displayName=nQ.displayName;var[MA,h5e]=Tn("Tooltip",[Rl]),OA=Rl(),sQ="TooltipProvider",MMe=700,RN="tooltip.open",[OMe,T$]=MA(sQ),iQ=t=>{const{__scopeTooltip:e,delayDuration:n=MMe,skipDelayDuration:r=300,disableHoverableContent:s=!1,children:i}=t,[a,o]=_.useState(!0),c=_.useRef(!1),u=_.useRef(0);return _.useEffect(()=>{const f=u.current;return()=>window.clearTimeout(f)},[]),P.jsx(OMe,{scope:e,isOpenDelayed:a,delayDuration:n,onOpen:_.useCallback(()=>{window.clearTimeout(u.current),o(!1)},[]),onClose:_.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>o(!0),r)},[r]),isPointerInTransitRef:c,onPointerInTransitChange:_.useCallback(f=>{c.current=f},[]),disableHoverableContent:s,children:i})};iQ.displayName=sQ;var LA="Tooltip",[LMe,IA]=MA(LA),oQ=t=>{const{__scopeTooltip:e,children:n,open:r,defaultOpen:s=!1,onOpenChange:i,disableHoverableContent:a,delayDuration:o}=t,c=T$(LA,t.__scopeTooltip),u=OA(e),[f,l]=_.useState(null),d=Vr(),m=_.useRef(0),p=a??c.disableHoverableContent,h=o??c.delayDuration,y=_.useRef(!1),[g=!1,v]=sr({prop:r,defaultProp:s,onChange:R=>{R?(c.onOpen(),document.dispatchEvent(new CustomEvent(RN))):c.onClose(),i==null||i(R)}}),w=_.useMemo(()=>g?y.current?"delayed-open":"instant-open":"closed",[g]),x=_.useCallback(()=>{window.clearTimeout(m.current),y.current=!1,v(!0)},[v]),A=_.useCallback(()=>{window.clearTimeout(m.current),v(!1)},[v]),k=_.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{y.current=!0,v(!0)},h)},[h,v]);return _.useEffect(()=>()=>window.clearTimeout(m.current),[]),P.jsx(dA,{...u,children:P.jsx(LMe,{scope:e,contentId:d,open:g,stateAttribute:w,trigger:f,onTriggerChange:l,onTriggerEnter:_.useCallback(()=>{c.isOpenDelayed?k():x()},[c.isOpenDelayed,k,x]),onTriggerLeave:_.useCallback(()=>{p?A():window.clearTimeout(m.current)},[A,p]),onOpen:x,onClose:A,disableHoverableContent:p,children:n})})};oQ.displayName=LA;var PN="TooltipTrigger",aQ=_.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,s=IA(PN,n),i=T$(PN,n),a=OA(n),o=_.useRef(null),c=tt(e,o,s.onTriggerChange),u=_.useRef(!1),f=_.useRef(!1),l=_.useCallback(()=>u.current=!1,[]);return _.useEffect(()=>()=>document.removeEventListener("pointerup",l),[l]),P.jsx(Dv,{asChild:!0,...a,children:P.jsx(De.button,{"aria-describedby":s.open?s.contentId:void 0,"data-state":s.stateAttribute,...r,ref:c,onPointerMove:me(t.onPointerMove,d=>{d.pointerType!=="touch"&&!f.current&&!i.isPointerInTransitRef.current&&(s.onTriggerEnter(),f.current=!0)}),onPointerLeave:me(t.onPointerLeave,()=>{s.onTriggerLeave(),f.current=!1}),onPointerDown:me(t.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",l,{once:!0})}),onFocus:me(t.onFocus,()=>{u.current||s.onOpen()}),onBlur:me(t.onBlur,s.onClose),onClick:me(t.onClick,s.onClose)})})});aQ.displayName=PN;var IMe="TooltipPortal",[p5e,$Me]=MA(IMe,{forceMount:void 0}),pv="TooltipContent",lQ=_.forwardRef((t,e)=>{const n=$Me(pv,t.__scopeTooltip),{forceMount:r=n.forceMount,side:s="top",...i}=t,a=IA(pv,t.__scopeTooltip);return P.jsx(Hn,{present:r||a.open,children:a.disableHoverableContent?P.jsx(cQ,{side:s,...i,ref:e}):P.jsx(jMe,{side:s,...i,ref:e})})}),jMe=_.forwardRef((t,e)=>{const n=IA(pv,t.__scopeTooltip),r=T$(pv,t.__scopeTooltip),s=_.useRef(null),i=tt(e,s),[a,o]=_.useState(null),{trigger:c,onClose:u}=n,f=s.current,{onPointerInTransitChange:l}=r,d=_.useCallback(()=>{o(null),l(!1)},[l]),m=_.useCallback((p,h)=>{const y=p.currentTarget,g={x:p.clientX,y:p.clientY},v=UMe(g,y.getBoundingClientRect()),w=HMe(g,v),x=WMe(h.getBoundingClientRect()),A=qMe([...w,...x]);o(A),l(!0)},[l]);return _.useEffect(()=>()=>d(),[d]),_.useEffect(()=>{if(c&&f){const p=y=>m(y,f),h=y=>m(y,c);return c.addEventListener("pointerleave",p),f.addEventListener("pointerleave",h),()=>{c.removeEventListener("pointerleave",p),f.removeEventListener("pointerleave",h)}}},[c,f,m,d]),_.useEffect(()=>{if(a){const p=h=>{const y=h.target,g={x:h.clientX,y:h.clientY},v=(c==null?void 0:c.contains(y))||(f==null?void 0:f.contains(y)),w=!VMe(g,a);v?d():w&&(d(),u())};return document.addEventListener("pointermove",p),()=>document.removeEventListener("pointermove",p)}},[c,f,a,u,d]),P.jsx(cQ,{...t,ref:i})}),[FMe,zMe]=MA(LA,{isInside:!1}),cQ=_.forwardRef((t,e)=>{const{__scopeTooltip:n,children:r,"aria-label":s,onEscapeKeyDown:i,onPointerDownOutside:a,...o}=t,c=IA(pv,n),u=OA(n),{onClose:f}=c;return _.useEffect(()=>(document.addEventListener(RN,f),()=>document.removeEventListener(RN,f)),[f]),_.useEffect(()=>{if(c.trigger){const l=d=>{const m=d.target;m!=null&&m.contains(c.trigger)&&f()};return window.addEventListener("scroll",l,{capture:!0}),()=>window.removeEventListener("scroll",l,{capture:!0})}},[c.trigger,f]),P.jsx(Jc,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:l=>l.preventDefault(),onDismiss:f,children:P.jsxs(w0,{"data-state":c.stateAttribute,...u,...o,ref:e,style:{...o.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:[P.jsx(lL,{children:r}),P.jsx(FMe,{scope:n,isInside:!0,children:P.jsx(b7,{id:c.contentId,role:"tooltip",children:s||r})})]})})});lQ.displayName=pv;var uQ="TooltipArrow",BMe=_.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,s=OA(n);return zMe(uQ,n).isInside?null:P.jsx(_0,{...s,...r,ref:e})});BMe.displayName=uQ;function UMe(t,e){const n=Math.abs(e.top-t.y),r=Math.abs(e.bottom-t.y),s=Math.abs(e.right-t.x),i=Math.abs(e.left-t.x);switch(Math.min(n,r,s,i)){case i:return"left";case s:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function HMe(t,e,n=5){const r=[];switch(e){case"top":r.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":r.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":r.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":r.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return r}function WMe(t){const{top:e,right:n,bottom:r,left:s}=t;return[{x:s,y:e},{x:n,y:e},{x:n,y:r},{x:s,y:r}]}function VMe(t,e){const{x:n,y:r}=t;let s=!1;for(let i=0,a=e.length-1;ir!=f>r&&n<(u-o)*(r-c)/(f-c)+o&&(s=!s)}return s}function qMe(t){const e=t.slice();return e.sort((n,r)=>n.xr.x?1:n.yr.y?1:0),GMe(e)}function GMe(t){if(t.length<=1)return t.slice();const e=[];for(let r=0;r=2;){const i=e[e.length-1],a=e[e.length-2];if((i.x-a.x)*(s.y-a.y)>=(i.y-a.y)*(s.x-a.x))e.pop();else break}e.push(s)}e.pop();const n=[];for(let r=t.length-1;r>=0;r--){const s=t[r];for(;n.length>=2;){const i=n[n.length-1],a=n[n.length-2];if((i.x-a.x)*(s.y-a.y)>=(i.y-a.y)*(s.x-a.x))n.pop();else break}n.push(s)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}var KMe=iQ,YMe=oQ,XMe=aQ,dQ=lQ;const QMe=KMe,m5e=YMe,g5e=XMe,JMe=_.forwardRef(({className:t,sideOffset:e=4,...n},r)=>P.jsx(dQ,{ref:r,sideOffset:e,className:ce("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",t),...n}));JMe.displayName=dQ.displayName;/** * @remix-run/router v1.23.0 * * Copyright (c) Remix Software Inc. @@ -247,8 +247,8 @@ Defaulting to \`null\`.`}var c9=i9,xke=a9;const Ske=_.forwardRef(({className:t,v * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Gn(){return Gn=Object.assign?Object.assign.bind():function(t){for(var e=1;e"u")throw new Error(e)}function mv(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function JMe(){return Math.random().toString(36).substr(2,8)}function o4(t,e){return{usr:t.state,key:t.key,idx:e}}function rw(t,e,n,r){return n===void 0&&(n=null),Gn({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Hd(e):e,{state:n,key:e&&e.key||r||JMe()})}function np(t){let{pathname:e="/",search:n="",hash:r=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Hd(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substr(r),t=t.substr(0,r)),t&&(e.pathname=t)}return e}function ZMe(t,e,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,a=s.history,o=Er.Pop,c=null,u=f();u==null&&(u=0,a.replaceState(Gn({},a.state,{idx:u}),""));function f(){return(a.state||{idx:null}).idx}function l(){o=Er.Pop;let y=f(),g=y==null?null:y-u;u=y,c&&c({action:o,location:h.location,delta:g})}function d(y,g){o=Er.Push;let v=rw(h.location,y,g);u=f()+1;let w=o4(v,u),x=h.createHref(v);try{a.pushState(w,"",x)}catch(A){if(A instanceof DOMException&&A.name==="DataCloneError")throw A;s.location.assign(x)}i&&c&&c({action:o,location:h.location,delta:1})}function m(y,g){o=Er.Replace;let v=rw(h.location,y,g);u=f();let w=o4(v,u),x=h.createHref(v);a.replaceState(w,"",x),i&&c&&c({action:o,location:h.location,delta:0})}function p(y){let g=s.location.origin!=="null"?s.location.origin:s.location.href,v=typeof y=="string"?y:np(y);return v=v.replace(/ $/,"%20"),Nt(g,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,g)}let h={get action(){return o},get location(){return t(s,a)},listen(y){if(c)throw new Error("A history only accepts one active listener");return s.addEventListener(i4,l),c=y,()=>{s.removeEventListener(i4,l),c=null}},createHref(y){return e(s,y)},createURL:p,encodeLocation(y){let g=p(y);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:d,replace:m,go(y){return a.go(y)}};return h}var hn;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(hn||(hn={}));const eOe=new Set(["lazy","caseSensitive","path","id","index","children"]);function tOe(t){return t.index===!0}function D1(t,e,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),t.map((s,i)=>{let a=[...n,String(i)],o=typeof s.id=="string"?s.id:a.join("-");if(Nt(s.index!==!0||!s.children,"Cannot specify children on an index route"),Nt(!r[o],'Found a route id collision on id "'+o+`". Route id's must be globally unique within Data Router usages`),tOe(s)){let c=Gn({},s,e(s),{id:o});return r[o]=c,c}else{let c=Gn({},s,e(s),{id:o,children:void 0});return r[o]=c,s.children&&(c.children=D1(s.children,e,a,r)),c}})}function vf(t,e,n){return n===void 0&&(n="/"),YS(t,e,n,!1)}function YS(t,e,n,r){let s=typeof e=="string"?Hd(e):e,i=kd(s.pathname||"/",n);if(i==null)return null;let a=fQ(t);rOe(a);let o=null;for(let c=0;o==null&&c{let c={relativePath:o===void 0?i.path||"":o,caseSensitive:i.caseSensitive===!0,childrenIndex:a,route:i};c.relativePath.startsWith("/")&&(Nt(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let u=Lc([r,c.relativePath]),f=n.concat(c);i.children&&i.children.length>0&&(Nt(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),fQ(i.children,e,f,u)),!(i.path==null&&!i.index)&&e.push({path:u,score:uOe(u,i.index),routesMeta:f})};return t.forEach((i,a)=>{var o;if(i.path===""||!((o=i.path)!=null&&o.includes("?")))s(i,a);else for(let c of hQ(i.path))s(i,a,c)}),e}function hQ(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let a=hQ(r.join("/")),o=[];return o.push(...a.map(c=>c===""?i:[i,c].join("/"))),s&&o.push(...a),o.map(c=>t.startsWith("/")&&c===""?"/":c)}function rOe(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:dOe(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const sOe=/^:[\w-]+$/,iOe=3,oOe=2,aOe=1,lOe=10,cOe=-2,a4=t=>t==="*";function uOe(t,e){let n=t.split("/"),r=n.length;return n.some(a4)&&(r+=cOe),e&&(r+=oOe),n.filter(s=>!a4(s)).reduce((s,i)=>s+(sOe.test(i)?iOe:i===""?aOe:lOe),r)}function dOe(t,e){return t.length===e.length&&t.slice(0,-1).every((r,s)=>r===e[s])?t[t.length-1]-e[e.length-1]:0}function fOe(t,e,n){n===void 0&&(n=!1);let{routesMeta:r}=t,s={},i="/",a=[];for(let o=0;o{let{paramName:d,isOptional:m}=f;if(d==="*"){let h=o[l]||"";a=i.slice(0,i.length-h.length).replace(/(.)\/+$/,"$1")}const p=o[l];return m&&!p?u[d]=void 0:u[d]=(p||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:a,pattern:t}}function hOe(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),mv(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let r=[],s="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,o,c)=>(r.push({paramName:o,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(r.push({paramName:"*"}),s+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":t!==""&&t!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,e?void 0:"i"),r]}function pOe(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return mv(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function kd(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}function mOe(t,e){e===void 0&&(e="/");let{pathname:n,search:r="",hash:s=""}=typeof t=="string"?Hd(t):t;return{pathname:n?n.startsWith("/")?n:gOe(n,e):e,search:yOe(r),hash:bOe(s)}}function gOe(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function XT(t,e,n,r){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function pQ(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function $A(t,e){let n=pQ(t);return e?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function jA(t,e,n,r){r===void 0&&(r=!1);let s;typeof t=="string"?s=Hd(t):(s=Gn({},t),Nt(!s.pathname||!s.pathname.includes("?"),XT("?","pathname","search",s)),Nt(!s.pathname||!s.pathname.includes("#"),XT("#","pathname","hash",s)),Nt(!s.search||!s.search.includes("#"),XT("#","search","hash",s)));let i=t===""||s.pathname==="",a=i?"/":s.pathname,o;if(a==null)o=n;else{let l=e.length-1;if(!r&&a.startsWith("..")){let d=a.split("/");for(;d[0]==="..";)d.shift(),l-=1;s.pathname=d.join("/")}o=l>=0?e[l]:"/"}let c=mOe(s,o),u=a&&a!=="/"&&a.endsWith("/"),f=(i||a===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||f)&&(c.pathname+="/"),c}const Lc=t=>t.join("/").replace(/\/\/+/g,"/"),vOe=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),yOe=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,bOe=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;class N1{constructor(e,n,r,s){s===void 0&&(s=!1),this.status=e,this.statusText=n||"",this.internal=s,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function sw(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const mQ=["post","put","patch","delete"],wOe=new Set(mQ),_Oe=["get",...mQ],xOe=new Set(_Oe),SOe=new Set([301,302,303,307,308]),EOe=new Set([307,308]),QT={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},COe={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},sm={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},k$=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,AOe=t=>({hasErrorBoundary:!!t.hasErrorBoundary}),gQ="remix-router-transitions";function ROe(t){const e=t.window?t.window:typeof window<"u"?window:void 0,n=typeof e<"u"&&typeof e.document<"u"&&typeof e.document.createElement<"u",r=!n;Nt(t.routes.length>0,"You must provide a non-empty routes array to createRouter");let s;if(t.mapRouteProperties)s=t.mapRouteProperties;else if(t.detectErrorBoundary){let te=t.detectErrorBoundary;s=oe=>({hasErrorBoundary:te(oe)})}else s=AOe;let i={},a=D1(t.routes,s,void 0,i),o,c=t.basename||"/",u=t.dataStrategy||DOe,f=t.patchRoutesOnNavigation,l=Gn({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},t.future),d=null,m=new Set,p=null,h=null,y=null,g=t.hydrationData!=null,v=vf(a,t.history.location,c),w=!1,x=null;if(v==null&&!f){let te=pi(404,{pathname:t.history.location.pathname}),{matches:oe,route:he}=b4(a);v=oe,x={[he.id]:te}}v&&!t.hydrationData&&cn(v,a,t.history.location.pathname).active&&(v=null);let A;if(v)if(v.some(te=>te.route.lazy))A=!1;else if(!v.some(te=>te.route.loader))A=!0;else if(l.v7_partialHydration){let te=t.hydrationData?t.hydrationData.loaderData:null,oe=t.hydrationData?t.hydrationData.errors:null;if(oe){let he=v.findIndex(Ce=>oe[Ce.route.id]!==void 0);A=v.slice(0,he+1).every(Ce=>!kN(Ce.route,te,oe))}else A=v.every(he=>!kN(he.route,te,oe))}else A=t.hydrationData!=null;else if(A=!1,v=[],l.v7_partialHydration){let te=cn(null,a,t.history.location.pathname);te.active&&te.matches&&(w=!0,v=te.matches)}let k,R={historyAction:t.history.action,location:t.history.location,matches:v,initialized:A,navigation:QT,restoreScrollPosition:t.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:t.hydrationData&&t.hydrationData.loaderData||{},actionData:t.hydrationData&&t.hydrationData.actionData||null,errors:t.hydrationData&&t.hydrationData.errors||x,fetchers:new Map,blockers:new Map},E=Er.Pop,T=!1,D,M=!1,L=new Map,I=null,j=!1,U=!1,Y=[],W=new Set,H=new Map,ee=0,re=-1,X=new Map,G=new Set,K=new Map,J=new Map,ue=new Set,de=new Map,ie=new Map,be;function Ae(){if(d=t.history.listen(te=>{let{action:oe,location:he,delta:Ce}=te;if(be){be(),be=void 0;return}mv(ie.size===0||Ce!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let Le=ot({currentLocation:R.location,nextLocation:he,historyAction:oe});if(Le&&Ce!=null){let Ge=new Promise(st=>{be=st});t.history.go(Ce*-1),it(Le,{state:"blocked",location:he,proceed(){it(Le,{state:"proceeding",proceed:void 0,reset:void 0,location:he}),Ge.then(()=>t.history.go(Ce))},reset(){let st=new Map(R.blockers);st.set(Le,sm),Ne({blockers:st})}});return}return Qe(oe,he)}),n){VOe(e,L);let te=()=>qOe(e,L);e.addEventListener("pagehide",te),I=()=>e.removeEventListener("pagehide",te)}return R.initialized||Qe(Er.Pop,R.location,{initialHydration:!0}),k}function _e(){d&&d(),I&&I(),m.clear(),D&&D.abort(),R.fetchers.forEach((te,oe)=>wt(oe)),R.blockers.forEach((te,oe)=>Be(oe))}function Oe(te){return m.add(te),()=>m.delete(te)}function Ne(te,oe){oe===void 0&&(oe={}),R=Gn({},R,te);let he=[],Ce=[];l.v7_fetcherPersist&&R.fetchers.forEach((Le,Ge)=>{Le.state==="idle"&&(ue.has(Ge)?Ce.push(Ge):he.push(Ge))}),ue.forEach(Le=>{!R.fetchers.has(Le)&&!H.has(Le)&&Ce.push(Le)}),[...m].forEach(Le=>Le(R,{deletedFetchers:Ce,viewTransitionOpts:oe.viewTransitionOpts,flushSync:oe.flushSync===!0})),l.v7_fetcherPersist?(he.forEach(Le=>R.fetchers.delete(Le)),Ce.forEach(Le=>wt(Le))):Ce.forEach(Le=>ue.delete(Le))}function ye(te,oe,he){var Ce,Le;let{flushSync:Ge}=he===void 0?{}:he,st=R.actionData!=null&&R.navigation.formMethod!=null&&ya(R.navigation.formMethod)&&R.navigation.state==="loading"&&((Ce=te.state)==null?void 0:Ce._isRedirect)!==!0,Ue;oe.actionData?Object.keys(oe.actionData).length>0?Ue=oe.actionData:Ue=null:st?Ue=R.actionData:Ue=null;let Xe=oe.loaderData?v4(R.loaderData,oe.loaderData,oe.matches||[],oe.errors):R.loaderData,Ve=R.blockers;Ve.size>0&&(Ve=new Map(Ve),Ve.forEach((It,Tr)=>Ve.set(Tr,sm)));let Ze=T===!0||R.navigation.formMethod!=null&&ya(R.navigation.formMethod)&&((Le=te.state)==null?void 0:Le._isRedirect)!==!0;o&&(a=o,o=void 0),j||E===Er.Pop||(E===Er.Push?t.history.push(te,te.state):E===Er.Replace&&t.history.replace(te,te.state));let gt;if(E===Er.Pop){let It=L.get(R.location.pathname);It&&It.has(te.pathname)?gt={currentLocation:R.location,nextLocation:te}:L.has(te.pathname)&&(gt={currentLocation:te,nextLocation:R.location})}else if(M){let It=L.get(R.location.pathname);It?It.add(te.pathname):(It=new Set([te.pathname]),L.set(R.location.pathname,It)),gt={currentLocation:R.location,nextLocation:te}}Ne(Gn({},oe,{actionData:Ue,loaderData:Xe,historyAction:E,location:te,initialized:!0,navigation:QT,revalidation:"idle",restoreScrollPosition:ln(te,oe.matches||R.matches),preventScrollReset:Ze,blockers:Ve}),{viewTransitionOpts:gt,flushSync:Ge===!0}),E=Er.Pop,T=!1,M=!1,j=!1,U=!1,Y=[]}async function $e(te,oe){if(typeof te=="number"){t.history.go(te);return}let he=TN(R.location,R.matches,c,l.v7_prependBasename,te,l.v7_relativeSplatPath,oe==null?void 0:oe.fromRouteId,oe==null?void 0:oe.relative),{path:Ce,submission:Le,error:Ge}=c4(l.v7_normalizeFormMethod,!1,he,oe),st=R.location,Ue=rw(R.location,Ce,oe&&oe.state);Ue=Gn({},Ue,t.history.encodeLocation(Ue));let Xe=oe&&oe.replace!=null?oe.replace:void 0,Ve=Er.Push;Xe===!0?Ve=Er.Replace:Xe===!1||Le!=null&&ya(Le.formMethod)&&Le.formAction===R.location.pathname+R.location.search&&(Ve=Er.Replace);let Ze=oe&&"preventScrollReset"in oe?oe.preventScrollReset===!0:void 0,gt=(oe&&oe.flushSync)===!0,It=ot({currentLocation:st,nextLocation:Ue,historyAction:Ve});if(It){it(It,{state:"blocked",location:Ue,proceed(){it(It,{state:"proceeding",proceed:void 0,reset:void 0,location:Ue}),$e(te,oe)},reset(){let Tr=new Map(R.blockers);Tr.set(It,sm),Ne({blockers:Tr})}});return}return await Qe(Ve,Ue,{submission:Le,pendingError:Ge,preventScrollReset:Ze,replace:oe&&oe.replace,enableViewTransition:oe&&oe.viewTransition,flushSync:gt})}function ut(){if(xe(),Ne({revalidation:"loading"}),R.navigation.state!=="submitting"){if(R.navigation.state==="idle"){Qe(R.historyAction,R.location,{startUninterruptedRevalidation:!0});return}Qe(E||R.historyAction,R.navigation.location,{overrideNavigation:R.navigation,enableViewTransition:M===!0})}}async function Qe(te,oe,he){D&&D.abort(),D=null,E=te,j=(he&&he.startUninterruptedRevalidation)===!0,yn(R.location,R.matches),T=(he&&he.preventScrollReset)===!0,M=(he&&he.enableViewTransition)===!0;let Ce=o||a,Le=he&&he.overrideNavigation,Ge=he!=null&&he.initialHydration&&R.matches&&R.matches.length>0&&!w?R.matches:vf(Ce,oe,c),st=(he&&he.flushSync)===!0;if(Ge&&R.initialized&&!U&&$Oe(R.location,oe)&&!(he&&he.submission&&ya(he.submission.formMethod))){ye(oe,{matches:Ge},{flushSync:st});return}let Ue=cn(Ge,Ce,oe.pathname);if(Ue.active&&Ue.matches&&(Ge=Ue.matches),!Ge){let{error:bn,notFoundMatches:qt,route:Wn}=Et(oe.pathname);ye(oe,{matches:qt,loaderData:{},errors:{[Wn.id]:bn}},{flushSync:st});return}D=new AbortController;let Xe=Xp(t.history,oe,D.signal,he&&he.submission),Ve;if(he&&he.pendingError)Ve=[yf(Ge).route.id,{type:hn.error,error:he.pendingError}];else if(he&&he.submission&&ya(he.submission.formMethod)){let bn=await yt(Xe,oe,he.submission,Ge,Ue.active,{replace:he.replace,flushSync:st});if(bn.shortCircuited)return;if(bn.pendingActionResult){let[qt,Wn]=bn.pendingActionResult;if(eo(Wn)&&sw(Wn.error)&&Wn.error.status===404){D=null,ye(oe,{matches:bn.matches,loaderData:{},errors:{[qt]:Wn.error}});return}}Ge=bn.matches||Ge,Ve=bn.pendingActionResult,Le=JT(oe,he.submission),st=!1,Ue.active=!1,Xe=Xp(t.history,Xe.url,Xe.signal)}let{shortCircuited:Ze,matches:gt,loaderData:It,errors:Tr}=await En(Xe,oe,Ge,Ue.active,Le,he&&he.submission,he&&he.fetcherSubmission,he&&he.replace,he&&he.initialHydration===!0,st,Ve);Ze||(D=null,ye(oe,Gn({matches:gt||Ge},y4(Ve),{loaderData:It,errors:Tr})))}async function yt(te,oe,he,Ce,Le,Ge){Ge===void 0&&(Ge={}),xe();let st=HOe(oe,he);if(Ne({navigation:st},{flushSync:Ge.flushSync===!0}),Le){let Ve=await kn(Ce,oe.pathname,te.signal);if(Ve.type==="aborted")return{shortCircuited:!0};if(Ve.type==="error"){let Ze=yf(Ve.partialMatches).route.id;return{matches:Ve.partialMatches,pendingActionResult:[Ze,{type:hn.error,error:Ve.error}]}}else if(Ve.matches)Ce=Ve.matches;else{let{notFoundMatches:Ze,error:gt,route:It}=Et(oe.pathname);return{matches:Ze,pendingActionResult:[It.id,{type:hn.error,error:gt}]}}}let Ue,Xe=Uy(Ce,oe);if(!Xe.route.action&&!Xe.route.lazy)Ue={type:hn.error,error:pi(405,{method:te.method,pathname:oe.pathname,routeId:Xe.route.id})};else if(Ue=(await Pe("action",R,te,[Xe],Ce,null))[Xe.route.id],te.signal.aborted)return{shortCircuited:!0};if(Rf(Ue)){let Ve;return Ge&&Ge.replace!=null?Ve=Ge.replace:Ve=p4(Ue.response.headers.get("Location"),new URL(te.url),c)===R.location.pathname+R.location.search,await ge(te,Ue,!0,{submission:he,replace:Ve}),{shortCircuited:!0}}if(hd(Ue))throw pi(400,{type:"defer-action"});if(eo(Ue)){let Ve=yf(Ce,Xe.route.id);return(Ge&&Ge.replace)!==!0&&(E=Er.Push),{matches:Ce,pendingActionResult:[Ve.route.id,Ue]}}return{matches:Ce,pendingActionResult:[Xe.route.id,Ue]}}async function En(te,oe,he,Ce,Le,Ge,st,Ue,Xe,Ve,Ze){let gt=Le||JT(oe,Ge),It=Ge||st||_4(gt),Tr=!j&&(!l.v7_partialHydration||!Xe);if(Ce){if(Tr){let Vn=Xt(Ze);Ne(Gn({navigation:gt},Vn!==void 0?{actionData:Vn}:{}),{flushSync:Ve})}let jt=await kn(he,oe.pathname,te.signal);if(jt.type==="aborted")return{shortCircuited:!0};if(jt.type==="error"){let Vn=yf(jt.partialMatches).route.id;return{matches:jt.partialMatches,loaderData:{},errors:{[Vn]:jt.error}}}else if(jt.matches)he=jt.matches;else{let{error:Vn,notFoundMatches:ru,route:Qd}=Et(oe.pathname);return{matches:ru,loaderData:{},errors:{[Qd.id]:Vn}}}}let bn=o||a,[qt,Wn]=d4(t.history,R,he,It,oe,l.v7_partialHydration&&Xe===!0,l.v7_skipActionErrorRevalidation,U,Y,W,ue,K,G,bn,c,Ze);if(nt(jt=>!(he&&he.some(Vn=>Vn.route.id===jt))||qt&&qt.some(Vn=>Vn.route.id===jt)),re=++ee,qt.length===0&&Wn.length===0){let jt=Ht();return ye(oe,Gn({matches:he,loaderData:{},errors:Ze&&eo(Ze[1])?{[Ze[0]]:Ze[1].error}:null},y4(Ze),jt?{fetchers:new Map(R.fetchers)}:{}),{flushSync:Ve}),{shortCircuited:!0}}if(Tr){let jt={};if(!Ce){jt.navigation=gt;let Vn=Xt(Ze);Vn!==void 0&&(jt.actionData=Vn)}Wn.length>0&&(jt.fetchers=gn(Wn)),Ne(jt,{flushSync:Ve})}Wn.forEach(jt=>{Yn(jt.key),jt.controller&&H.set(jt.key,jt.controller)});let nu=()=>Wn.forEach(jt=>Yn(jt.key));D&&D.signal.addEventListener("abort",nu);let{loaderResults:ja,fetcherResults:Go}=await Me(R,he,qt,Wn,te);if(te.signal.aborted)return{shortCircuited:!0};D&&D.signal.removeEventListener("abort",nu),Wn.forEach(jt=>H.delete(jt.key));let Is=bS(ja);if(Is)return await ge(te,Is.result,!0,{replace:Ue}),{shortCircuited:!0};if(Is=bS(Go),Is)return G.add(Is.key),await ge(te,Is.result,!0,{replace:Ue}),{shortCircuited:!0};let{loaderData:Wv,errors:Kd}=g4(R,he,ja,Ze,Wn,Go,de);de.forEach((jt,Vn)=>{jt.subscribe(ru=>{(ru||jt.done)&&de.delete(Vn)})}),l.v7_partialHydration&&Xe&&R.errors&&(Kd=Gn({},R.errors,Kd));let Nl=Ht(),Yd=an(re),Xd=Nl||Yd||Wn.length>0;return Gn({matches:he,loaderData:Wv,errors:Kd},Xd?{fetchers:new Map(R.fetchers)}:{})}function Xt(te){if(te&&!eo(te[1]))return{[te[0]]:te[1].data};if(R.actionData)return Object.keys(R.actionData).length===0?null:R.actionData}function gn(te){return te.forEach(oe=>{let he=R.fetchers.get(oe.key),Ce=Cy(void 0,he?he.data:void 0);R.fetchers.set(oe.key,Ce)}),new Map(R.fetchers)}function Qt(te,oe,he,Ce){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");Yn(te);let Le=(Ce&&Ce.flushSync)===!0,Ge=o||a,st=TN(R.location,R.matches,c,l.v7_prependBasename,he,l.v7_relativeSplatPath,oe,Ce==null?void 0:Ce.relative),Ue=vf(Ge,st,c),Xe=cn(Ue,Ge,st);if(Xe.active&&Xe.matches&&(Ue=Xe.matches),!Ue){Ye(te,oe,pi(404,{pathname:st}),{flushSync:Le});return}let{path:Ve,submission:Ze,error:gt}=c4(l.v7_normalizeFormMethod,!0,st,Ce);if(gt){Ye(te,oe,gt,{flushSync:Le});return}let It=Uy(Ue,Ve),Tr=(Ce&&Ce.preventScrollReset)===!0;if(Ze&&ya(Ze.formMethod)){Z(te,oe,Ve,It,Ue,Xe.active,Le,Tr,Ze);return}K.set(te,{routeId:oe,path:Ve}),fe(te,oe,Ve,It,Ue,Xe.active,Le,Tr,Ze)}async function Z(te,oe,he,Ce,Le,Ge,st,Ue,Xe){xe(),K.delete(te);function Ve(ir){if(!ir.route.action&&!ir.route.lazy){let Ml=pi(405,{method:Xe.formMethod,pathname:he,routeId:oe});return Ye(te,oe,Ml,{flushSync:st}),!0}return!1}if(!Ge&&Ve(Ce))return;let Ze=R.fetchers.get(te);Te(te,WOe(Xe,Ze),{flushSync:st});let gt=new AbortController,It=Xp(t.history,he,gt.signal,Xe);if(Ge){let ir=await kn(Le,new URL(It.url).pathname,It.signal,te);if(ir.type==="aborted")return;if(ir.type==="error"){Ye(te,oe,ir.error,{flushSync:st});return}else if(ir.matches){if(Le=ir.matches,Ce=Uy(Le,he),Ve(Ce))return}else{Ye(te,oe,pi(404,{pathname:he}),{flushSync:st});return}}H.set(te,gt);let Tr=ee,qt=(await Pe("action",R,It,[Ce],Le,te))[Ce.route.id];if(It.signal.aborted){H.get(te)===gt&&H.delete(te);return}if(l.v7_fetcherPersist&&ue.has(te)){if(Rf(qt)||eo(qt)){Te(te,xu(void 0));return}}else{if(Rf(qt))if(H.delete(te),re>Tr){Te(te,xu(void 0));return}else return G.add(te),Te(te,Cy(Xe)),ge(It,qt,!1,{fetcherSubmission:Xe,preventScrollReset:Ue});if(eo(qt)){Ye(te,oe,qt.error);return}}if(hd(qt))throw pi(400,{type:"defer-action"});let Wn=R.navigation.location||R.location,nu=Xp(t.history,Wn,gt.signal),ja=o||a,Go=R.navigation.state!=="idle"?vf(ja,R.navigation.location,c):R.matches;Nt(Go,"Didn't find any matches after fetcher action");let Is=++ee;X.set(te,Is);let Wv=Cy(Xe,qt.data);R.fetchers.set(te,Wv);let[Kd,Nl]=d4(t.history,R,Go,Xe,Wn,!1,l.v7_skipActionErrorRevalidation,U,Y,W,ue,K,G,ja,c,[Ce.route.id,qt]);Nl.filter(ir=>ir.key!==te).forEach(ir=>{let Ml=ir.key,Vv=R.fetchers.get(Ml),G_=Cy(void 0,Vv?Vv.data:void 0);R.fetchers.set(Ml,G_),Yn(Ml),ir.controller&&H.set(Ml,ir.controller)}),Ne({fetchers:new Map(R.fetchers)});let Yd=()=>Nl.forEach(ir=>Yn(ir.key));gt.signal.addEventListener("abort",Yd);let{loaderResults:Xd,fetcherResults:jt}=await Me(R,Go,Kd,Nl,nu);if(gt.signal.aborted)return;gt.signal.removeEventListener("abort",Yd),X.delete(te),H.delete(te),Nl.forEach(ir=>H.delete(ir.key));let Vn=bS(Xd);if(Vn)return ge(nu,Vn.result,!1,{preventScrollReset:Ue});if(Vn=bS(jt),Vn)return G.add(Vn.key),ge(nu,Vn.result,!1,{preventScrollReset:Ue});let{loaderData:ru,errors:Qd}=g4(R,Go,Xd,void 0,Nl,jt,de);if(R.fetchers.has(te)){let ir=xu(qt.data);R.fetchers.set(te,ir)}an(Is),R.navigation.state==="loading"&&Is>re?(Nt(E,"Expected pending action"),D&&D.abort(),ye(R.navigation.location,{matches:Go,loaderData:ru,errors:Qd,fetchers:new Map(R.fetchers)})):(Ne({errors:Qd,loaderData:v4(R.loaderData,ru,Go,Qd),fetchers:new Map(R.fetchers)}),U=!1)}async function fe(te,oe,he,Ce,Le,Ge,st,Ue,Xe){let Ve=R.fetchers.get(te);Te(te,Cy(Xe,Ve?Ve.data:void 0),{flushSync:st});let Ze=new AbortController,gt=Xp(t.history,he,Ze.signal);if(Ge){let qt=await kn(Le,new URL(gt.url).pathname,gt.signal,te);if(qt.type==="aborted")return;if(qt.type==="error"){Ye(te,oe,qt.error,{flushSync:st});return}else if(qt.matches)Le=qt.matches,Ce=Uy(Le,he);else{Ye(te,oe,pi(404,{pathname:he}),{flushSync:st});return}}H.set(te,Ze);let It=ee,bn=(await Pe("loader",R,gt,[Ce],Le,te))[Ce.route.id];if(hd(bn)&&(bn=await D$(bn,gt.signal,!0)||bn),H.get(te)===Ze&&H.delete(te),!gt.signal.aborted){if(ue.has(te)){Te(te,xu(void 0));return}if(Rf(bn))if(re>It){Te(te,xu(void 0));return}else{G.add(te),await ge(gt,bn,!1,{preventScrollReset:Ue});return}if(eo(bn)){Ye(te,oe,bn.error);return}Nt(!hd(bn),"Unhandled fetcher deferred data"),Te(te,xu(bn.data))}}async function ge(te,oe,he,Ce){let{submission:Le,fetcherSubmission:Ge,preventScrollReset:st,replace:Ue}=Ce===void 0?{}:Ce;oe.response.headers.has("X-Remix-Revalidate")&&(U=!0);let Xe=oe.response.headers.get("Location");Nt(Xe,"Expected a Location header on the redirect Response"),Xe=p4(Xe,new URL(te.url),c);let Ve=rw(R.location,Xe,{_isRedirect:!0});if(n){let qt=!1;if(oe.response.headers.has("X-Remix-Reload-Document"))qt=!0;else if(k$.test(Xe)){const Wn=t.history.createURL(Xe);qt=Wn.origin!==e.location.origin||kd(Wn.pathname,c)==null}if(qt){Ue?e.location.replace(Xe):e.location.assign(Xe);return}}D=null;let Ze=Ue===!0||oe.response.headers.has("X-Remix-Replace")?Er.Replace:Er.Push,{formMethod:gt,formAction:It,formEncType:Tr}=R.navigation;!Le&&!Ge&>&&It&&Tr&&(Le=_4(R.navigation));let bn=Le||Ge;if(EOe.has(oe.response.status)&&bn&&ya(bn.formMethod))await Qe(Ze,Ve,{submission:Gn({},bn,{formAction:Xe}),preventScrollReset:st||T,enableViewTransition:he?M:void 0});else{let qt=JT(Ve,Le);await Qe(Ze,Ve,{overrideNavigation:qt,fetcherSubmission:Ge,preventScrollReset:st||T,enableViewTransition:he?M:void 0})}}async function Pe(te,oe,he,Ce,Le,Ge){let st,Ue={};try{st=await NOe(u,te,oe,he,Ce,Le,Ge,i,s)}catch(Xe){return Ce.forEach(Ve=>{Ue[Ve.route.id]={type:hn.error,error:Xe}}),Ue}for(let[Xe,Ve]of Object.entries(st))if(jOe(Ve)){let Ze=Ve.result;Ue[Xe]={type:hn.redirect,response:LOe(Ze,he,Xe,Le,c,l.v7_relativeSplatPath)}}else Ue[Xe]=await OOe(Ve);return Ue}async function Me(te,oe,he,Ce,Le){let Ge=te.matches,st=Pe("loader",te,Le,he,oe,null),Ue=Promise.all(Ce.map(async Ze=>{if(Ze.matches&&Ze.match&&Ze.controller){let It=(await Pe("loader",te,Xp(t.history,Ze.path,Ze.controller.signal),[Ze.match],Ze.matches,Ze.key))[Ze.match.route.id];return{[Ze.key]:It}}else return Promise.resolve({[Ze.key]:{type:hn.error,error:pi(404,{pathname:Ze.path})}})})),Xe=await st,Ve=(await Ue).reduce((Ze,gt)=>Object.assign(Ze,gt),{});return await Promise.all([BOe(oe,Xe,Le.signal,Ge,te.loaderData),UOe(oe,Ve,Ce)]),{loaderResults:Xe,fetcherResults:Ve}}function xe(){U=!0,Y.push(...nt()),K.forEach((te,oe)=>{H.has(oe)&&W.add(oe),Yn(oe)})}function Te(te,oe,he){he===void 0&&(he={}),R.fetchers.set(te,oe),Ne({fetchers:new Map(R.fetchers)},{flushSync:(he&&he.flushSync)===!0})}function Ye(te,oe,he,Ce){Ce===void 0&&(Ce={});let Le=yf(R.matches,oe);wt(te),Ne({errors:{[Le.route.id]:he},fetchers:new Map(R.fetchers)},{flushSync:(Ce&&Ce.flushSync)===!0})}function Pt(te){return J.set(te,(J.get(te)||0)+1),ue.has(te)&&ue.delete(te),R.fetchers.get(te)||COe}function wt(te){let oe=R.fetchers.get(te);H.has(te)&&!(oe&&oe.state==="loading"&&X.has(te))&&Yn(te),K.delete(te),X.delete(te),G.delete(te),l.v7_fetcherPersist&&ue.delete(te),W.delete(te),R.fetchers.delete(te)}function Ls(te){let oe=(J.get(te)||0)-1;oe<=0?(J.delete(te),ue.add(te),l.v7_fetcherPersist||wt(te)):J.set(te,oe),Ne({fetchers:new Map(R.fetchers)})}function Yn(te){let oe=H.get(te);oe&&(oe.abort(),H.delete(te))}function gs(te){for(let oe of te){let he=Pt(oe),Ce=xu(he.data);R.fetchers.set(oe,Ce)}}function Ht(){let te=[],oe=!1;for(let he of G){let Ce=R.fetchers.get(he);Nt(Ce,"Expected fetcher: "+he),Ce.state==="loading"&&(G.delete(he),te.push(he),oe=!0)}return gs(te),oe}function an(te){let oe=[];for(let[he,Ce]of X)if(Ce0}function vn(te,oe){let he=R.blockers.get(te)||sm;return ie.get(te)!==oe&&ie.set(te,oe),he}function Be(te){R.blockers.delete(te),ie.delete(te)}function it(te,oe){let he=R.blockers.get(te)||sm;Nt(he.state==="unblocked"&&oe.state==="blocked"||he.state==="blocked"&&oe.state==="blocked"||he.state==="blocked"&&oe.state==="proceeding"||he.state==="blocked"&&oe.state==="unblocked"||he.state==="proceeding"&&oe.state==="unblocked","Invalid blocker state transition: "+he.state+" -> "+oe.state);let Ce=new Map(R.blockers);Ce.set(te,oe),Ne({blockers:Ce})}function ot(te){let{currentLocation:oe,nextLocation:he,historyAction:Ce}=te;if(ie.size===0)return;ie.size>1&&mv(!1,"A router only supports one blocker at a time");let Le=Array.from(ie.entries()),[Ge,st]=Le[Le.length-1],Ue=R.blockers.get(Ge);if(!(Ue&&Ue.state==="proceeding")&&st({currentLocation:oe,nextLocation:he,historyAction:Ce}))return Ge}function Et(te){let oe=pi(404,{pathname:te}),he=o||a,{matches:Ce,route:Le}=b4(he);return nt(),{notFoundMatches:Ce,route:Le,error:oe}}function nt(te){let oe=[];return de.forEach((he,Ce)=>{(!te||te(Ce))&&(he.cancel(),oe.push(Ce),de.delete(Ce))}),oe}function Wt(te,oe,he){if(p=te,y=oe,h=he||null,!g&&R.navigation===QT){g=!0;let Ce=ln(R.location,R.matches);Ce!=null&&Ne({restoreScrollPosition:Ce})}return()=>{p=null,y=null,h=null}}function At(te,oe){return h&&h(te,oe.map(Ce=>nOe(Ce,R.loaderData)))||te.key}function yn(te,oe){if(p&&y){let he=At(te,oe);p[he]=y()}}function ln(te,oe){if(p){let he=At(te,oe),Ce=p[he];if(typeof Ce=="number")return Ce}return null}function cn(te,oe,he){if(f)if(te){if(Object.keys(te[0].params).length>0)return{active:!0,matches:YS(oe,he,c,!0)}}else return{active:!0,matches:YS(oe,he,c,!0)||[]};return{active:!1,matches:null}}async function kn(te,oe,he,Ce){if(!f)return{type:"success",matches:te};let Le=te;for(;;){let Ge=o==null,st=o||a,Ue=i;try{await f({signal:he,path:oe,matches:Le,fetcherKey:Ce,patch:(Ze,gt)=>{he.aborted||h4(Ze,gt,st,Ue,s)}})}catch(Ze){return{type:"error",error:Ze,partialMatches:Le}}finally{Ge&&!he.aborted&&(a=[...a])}if(he.aborted)return{type:"aborted"};let Xe=vf(st,oe,c);if(Xe)return{type:"success",matches:Xe};let Ve=YS(st,oe,c,!0);if(!Ve||Le.length===Ve.length&&Le.every((Ze,gt)=>Ze.route.id===Ve[gt].route.id))return{type:"success",matches:null};Le=Ve}}function hr(te){i={},o=D1(te,s,void 0,i)}function Dn(te,oe){let he=o==null;h4(te,oe,o||a,i,s),he&&(a=[...a],Ne({}))}return k={get basename(){return c},get future(){return l},get state(){return R},get routes(){return a},get window(){return e},initialize:Ae,subscribe:Oe,enableScrollRestoration:Wt,navigate:$e,fetch:Qt,revalidate:ut,createHref:te=>t.history.createHref(te),encodeLocation:te=>t.history.encodeLocation(te),getFetcher:Pt,deleteFetcher:Ls,dispose:_e,getBlocker:vn,deleteBlocker:Be,patchRoutes:Dn,_internalFetchControllers:H,_internalActiveDeferreds:de,_internalSetRoutes:hr},k}function POe(t){return t!=null&&("formData"in t&&t.formData!=null||"body"in t&&t.body!==void 0)}function TN(t,e,n,r,s,i,a,o){let c,u;if(a){c=[];for(let l of e)if(c.push(l),l.route.id===a){u=l;break}}else c=e,u=e[e.length-1];let f=jA(s||".",$A(c,i),kd(t.pathname,n)||t.pathname,o==="path");if(s==null&&(f.search=t.search,f.hash=t.hash),(s==null||s===""||s===".")&&u){let l=N$(f.search);if(u.route.index&&!l)f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index";else if(!u.route.index&&l){let d=new URLSearchParams(f.search),m=d.getAll("index");d.delete("index"),m.filter(h=>h).forEach(h=>d.append("index",h));let p=d.toString();f.search=p?"?"+p:""}}return r&&n!=="/"&&(f.pathname=f.pathname==="/"?n:Lc([n,f.pathname])),np(f)}function c4(t,e,n,r){if(!r||!POe(r))return{path:n};if(r.formMethod&&!zOe(r.formMethod))return{path:n,error:pi(405,{method:r.formMethod})};let s=()=>({path:n,error:pi(400,{type:"invalid-body"})}),i=r.formMethod||"get",a=t?i.toUpperCase():i.toLowerCase(),o=bQ(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!ya(a))return s();let d=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((m,p)=>{let[h,y]=p;return""+m+h+"="+y+` -`},""):String(r.body);return{path:n,submission:{formMethod:a,formAction:o,formEncType:r.formEncType,formData:void 0,json:void 0,text:d}}}else if(r.formEncType==="application/json"){if(!ya(a))return s();try{let d=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:a,formAction:o,formEncType:r.formEncType,formData:void 0,json:d,text:void 0}}}catch{return s()}}}Nt(typeof FormData=="function","FormData is not available in this environment");let c,u;if(r.formData)c=DN(r.formData),u=r.formData;else if(r.body instanceof FormData)c=DN(r.body),u=r.body;else if(r.body instanceof URLSearchParams)c=r.body,u=m4(c);else if(r.body==null)c=new URLSearchParams,u=new FormData;else try{c=new URLSearchParams(r.body),u=m4(c)}catch{return s()}let f={formMethod:a,formAction:o,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(ya(f.formMethod))return{path:n,submission:f};let l=Hd(n);return e&&l.search&&N$(l.search)&&c.append("index",""),l.search="?"+c,{path:np(l),submission:f}}function u4(t,e,n){n===void 0&&(n=!1);let r=t.findIndex(s=>s.route.id===e);return r>=0?t.slice(0,n?r+1:r):t}function d4(t,e,n,r,s,i,a,o,c,u,f,l,d,m,p,h){let y=h?eo(h[1])?h[1].error:h[1].data:void 0,g=t.createURL(e.location),v=t.createURL(s),w=n;i&&e.errors?w=u4(n,Object.keys(e.errors)[0],!0):h&&eo(h[1])&&(w=u4(n,h[0]));let x=h?h[1].statusCode:void 0,A=a&&x&&x>=400,k=w.filter((E,T)=>{let{route:D}=E;if(D.lazy)return!0;if(D.loader==null)return!1;if(i)return kN(D,e.loaderData,e.errors);if(TOe(e.loaderData,e.matches[T],E)||c.some(I=>I===E.route.id))return!0;let M=e.matches[T],L=E;return f4(E,Gn({currentUrl:g,currentParams:M.params,nextUrl:v,nextParams:L.params},r,{actionResult:y,actionStatus:x,defaultShouldRevalidate:A?!1:o||g.pathname+g.search===v.pathname+v.search||g.search!==v.search||vQ(M,L)}))}),R=[];return l.forEach((E,T)=>{if(i||!n.some(j=>j.route.id===E.routeId)||f.has(T))return;let D=vf(m,E.path,p);if(!D){R.push({key:T,routeId:E.routeId,path:E.path,matches:null,match:null,controller:null});return}let M=e.fetchers.get(T),L=Uy(D,E.path),I=!1;d.has(T)?I=!1:u.has(T)?(u.delete(T),I=!0):M&&M.state!=="idle"&&M.data===void 0?I=o:I=f4(L,Gn({currentUrl:g,currentParams:e.matches[e.matches.length-1].params,nextUrl:v,nextParams:n[n.length-1].params},r,{actionResult:y,actionStatus:x,defaultShouldRevalidate:A?!1:o})),I&&R.push({key:T,routeId:E.routeId,path:E.path,matches:D,match:L,controller:new AbortController})}),[k,R]}function kN(t,e,n){if(t.lazy)return!0;if(!t.loader)return!1;let r=e!=null&&e[t.id]!==void 0,s=n!=null&&n[t.id]!==void 0;return!r&&s?!1:typeof t.loader=="function"&&t.loader.hydrate===!0?!0:!r&&!s}function TOe(t,e,n){let r=!e||n.route.id!==e.route.id,s=t[n.route.id]===void 0;return r||s}function vQ(t,e){let n=t.route.path;return t.pathname!==e.pathname||n!=null&&n.endsWith("*")&&t.params["*"]!==e.params["*"]}function f4(t,e){if(t.route.shouldRevalidate){let n=t.route.shouldRevalidate(e);if(typeof n=="boolean")return n}return e.defaultShouldRevalidate}function h4(t,e,n,r,s){var i;let a;if(t){let u=r[t];Nt(u,"No route found to patch children into: routeId = "+t),u.children||(u.children=[]),a=u.children}else a=n;let o=e.filter(u=>!a.some(f=>yQ(u,f))),c=D1(o,s,[t||"_","patch",String(((i=a)==null?void 0:i.length)||"0")],r);a.push(...c)}function yQ(t,e){return"id"in t&&"id"in e&&t.id===e.id?!0:t.index===e.index&&t.path===e.path&&t.caseSensitive===e.caseSensitive?(!t.children||t.children.length===0)&&(!e.children||e.children.length===0)?!0:t.children.every((n,r)=>{var s;return(s=e.children)==null?void 0:s.some(i=>yQ(n,i))}):!1}async function kOe(t,e,n){if(!t.lazy)return;let r=await t.lazy();if(!t.lazy)return;let s=n[t.id];Nt(s,"No route found in manifest");let i={};for(let a in r){let c=s[a]!==void 0&&a!=="hasErrorBoundary";mv(!c,'Route "'+s.id+'" has a static property "'+a+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+a+'" will be ignored.')),!c&&!eOe.has(a)&&(i[a]=r[a])}Object.assign(s,i),Object.assign(s,Gn({},e(s),{lazy:void 0}))}async function DOe(t){let{matches:e}=t,n=e.filter(s=>s.shouldLoad);return(await Promise.all(n.map(s=>s.resolve()))).reduce((s,i,a)=>Object.assign(s,{[n[a].route.id]:i}),{})}async function NOe(t,e,n,r,s,i,a,o,c,u){let f=i.map(m=>m.route.lazy?kOe(m.route,c,o):void 0),l=i.map((m,p)=>{let h=f[p],y=s.some(v=>v.route.id===m.route.id);return Gn({},m,{shouldLoad:y,resolve:async v=>(v&&r.method==="GET"&&(m.route.lazy||m.route.loader)&&(y=!0),y?MOe(e,r,m,h,v,u):Promise.resolve({type:hn.data,result:void 0}))})}),d=await t({matches:l,request:r,params:i[0].params,fetcherKey:a,context:u});try{await Promise.all(f)}catch{}return d}async function MOe(t,e,n,r,s,i){let a,o,c=u=>{let f,l=new Promise((p,h)=>f=h);o=()=>f(),e.signal.addEventListener("abort",o);let d=p=>typeof u!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+t+'" [routeId: '+n.route.id+"]"))):u({request:e,params:n.params,context:i},...p!==void 0?[p]:[]),m=(async()=>{try{return{type:"data",result:await(s?s(h=>d(h)):d())}}catch(p){return{type:"error",result:p}}})();return Promise.race([m,l])};try{let u=n.route[t];if(r)if(u){let f,[l]=await Promise.all([c(u).catch(d=>{f=d}),r]);if(f!==void 0)throw f;a=l}else if(await r,u=n.route[t],u)a=await c(u);else if(t==="action"){let f=new URL(e.url),l=f.pathname+f.search;throw pi(405,{method:e.method,pathname:l,routeId:n.route.id})}else return{type:hn.data,result:void 0};else if(u)a=await c(u);else{let f=new URL(e.url),l=f.pathname+f.search;throw pi(404,{pathname:l})}Nt(a.result!==void 0,"You defined "+(t==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+t+"` ")+"function. Please return a value or `null`.")}catch(u){return{type:hn.error,result:u}}finally{o&&e.signal.removeEventListener("abort",o)}return a}async function OOe(t){let{result:e,type:n}=t;if(wQ(e)){let l;try{let d=e.headers.get("Content-Type");d&&/\bapplication\/json\b/.test(d)?e.body==null?l=null:l=await e.json():l=await e.text()}catch(d){return{type:hn.error,error:d}}return n===hn.error?{type:hn.error,error:new N1(e.status,e.statusText,l),statusCode:e.status,headers:e.headers}:{type:hn.data,data:l,statusCode:e.status,headers:e.headers}}if(n===hn.error){if(w4(e)){var r,s;if(e.data instanceof Error){var i,a;return{type:hn.error,error:e.data,statusCode:(i=e.init)==null?void 0:i.status,headers:(a=e.init)!=null&&a.headers?new Headers(e.init.headers):void 0}}return{type:hn.error,error:new N1(((r=e.init)==null?void 0:r.status)||500,void 0,e.data),statusCode:sw(e)?e.status:void 0,headers:(s=e.init)!=null&&s.headers?new Headers(e.init.headers):void 0}}return{type:hn.error,error:e,statusCode:sw(e)?e.status:void 0}}if(FOe(e)){var o,c;return{type:hn.deferred,deferredData:e,statusCode:(o=e.init)==null?void 0:o.status,headers:((c=e.init)==null?void 0:c.headers)&&new Headers(e.init.headers)}}if(w4(e)){var u,f;return{type:hn.data,data:e.data,statusCode:(u=e.init)==null?void 0:u.status,headers:(f=e.init)!=null&&f.headers?new Headers(e.init.headers):void 0}}return{type:hn.data,data:e}}function LOe(t,e,n,r,s,i){let a=t.headers.get("Location");if(Nt(a,"Redirects returned/thrown from loaders/actions must have a Location header"),!k$.test(a)){let o=r.slice(0,r.findIndex(c=>c.route.id===n)+1);a=TN(new URL(e.url),o,s,!0,a,i),t.headers.set("Location",a)}return t}function p4(t,e,n){if(k$.test(t)){let r=t,s=r.startsWith("//")?new URL(e.protocol+r):new URL(r),i=kd(s.pathname,n)!=null;if(s.origin===e.origin&&i)return s.pathname+s.search+s.hash}return t}function Xp(t,e,n,r){let s=t.createURL(bQ(e)).toString(),i={signal:n};if(r&&ya(r.formMethod)){let{formMethod:a,formEncType:o}=r;i.method=a.toUpperCase(),o==="application/json"?(i.headers=new Headers({"Content-Type":o}),i.body=JSON.stringify(r.json)):o==="text/plain"?i.body=r.text:o==="application/x-www-form-urlencoded"&&r.formData?i.body=DN(r.formData):i.body=r.formData}return new Request(s,i)}function DN(t){let e=new URLSearchParams;for(let[n,r]of t.entries())e.append(n,typeof r=="string"?r:r.name);return e}function m4(t){let e=new FormData;for(let[n,r]of t.entries())e.append(n,r);return e}function IOe(t,e,n,r,s){let i={},a=null,o,c=!1,u={},f=n&&eo(n[1])?n[1].error:void 0;return t.forEach(l=>{if(!(l.route.id in e))return;let d=l.route.id,m=e[d];if(Nt(!Rf(m),"Cannot handle redirect results in processLoaderData"),eo(m)){let p=m.error;f!==void 0&&(p=f,f=void 0),a=a||{};{let h=yf(t,d);a[h.route.id]==null&&(a[h.route.id]=p)}i[d]=void 0,c||(c=!0,o=sw(m.error)?m.error.status:500),m.headers&&(u[d]=m.headers)}else hd(m)?(r.set(d,m.deferredData),i[d]=m.deferredData.data,m.statusCode!=null&&m.statusCode!==200&&!c&&(o=m.statusCode),m.headers&&(u[d]=m.headers)):(i[d]=m.data,m.statusCode&&m.statusCode!==200&&!c&&(o=m.statusCode),m.headers&&(u[d]=m.headers))}),f!==void 0&&n&&(a={[n[0]]:f},i[n[0]]=void 0),{loaderData:i,errors:a,statusCode:o||200,loaderHeaders:u}}function g4(t,e,n,r,s,i,a){let{loaderData:o,errors:c}=IOe(e,n,r,a);return s.forEach(u=>{let{key:f,match:l,controller:d}=u,m=i[f];if(Nt(m,"Did not find corresponding fetcher result"),!(d&&d.signal.aborted))if(eo(m)){let p=yf(t.matches,l==null?void 0:l.route.id);c&&c[p.route.id]||(c=Gn({},c,{[p.route.id]:m.error})),t.fetchers.delete(f)}else if(Rf(m))Nt(!1,"Unhandled fetcher revalidation redirect");else if(hd(m))Nt(!1,"Unhandled fetcher deferred data");else{let p=xu(m.data);t.fetchers.set(f,p)}}),{loaderData:o,errors:c}}function v4(t,e,n,r){let s=Gn({},e);for(let i of n){let a=i.route.id;if(e.hasOwnProperty(a)?e[a]!==void 0&&(s[a]=e[a]):t[a]!==void 0&&i.route.loader&&(s[a]=t[a]),r&&r.hasOwnProperty(a))break}return s}function y4(t){return t?eo(t[1])?{actionData:{}}:{actionData:{[t[0]]:t[1].data}}:{}}function yf(t,e){return(e?t.slice(0,t.findIndex(r=>r.route.id===e)+1):[...t]).reverse().find(r=>r.route.hasErrorBoundary===!0)||t[0]}function b4(t){let e=t.length===1?t[0]:t.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:e}],route:e}}function pi(t,e){let{pathname:n,routeId:r,method:s,type:i,message:a}=e===void 0?{}:e,o="Unknown Server Error",c="Unknown @remix-run/router error";return t===400?(o="Bad Request",s&&n&&r?c="You made a "+s+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":i==="defer-action"?c="defer() is not supported in actions":i==="invalid-body"&&(c="Unable to encode submission body")):t===403?(o="Forbidden",c='Route "'+r+'" does not match URL "'+n+'"'):t===404?(o="Not Found",c='No route matches URL "'+n+'"'):t===405&&(o="Method Not Allowed",s&&n&&r?c="You made a "+s.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":s&&(c='Invalid request method "'+s.toUpperCase()+'"')),new N1(t||500,o,new Error(c),!0)}function bS(t){let e=Object.entries(t);for(let n=e.length-1;n>=0;n--){let[r,s]=e[n];if(Rf(s))return{key:r,result:s}}}function bQ(t){let e=typeof t=="string"?Hd(t):t;return np(Gn({},e,{hash:""}))}function $Oe(t,e){return t.pathname!==e.pathname||t.search!==e.search?!1:t.hash===""?e.hash!=="":t.hash===e.hash?!0:e.hash!==""}function jOe(t){return wQ(t.result)&&SOe.has(t.result.status)}function hd(t){return t.type===hn.deferred}function eo(t){return t.type===hn.error}function Rf(t){return(t&&t.type)===hn.redirect}function w4(t){return typeof t=="object"&&t!=null&&"type"in t&&"data"in t&&"init"in t&&t.type==="DataWithResponseInit"}function FOe(t){let e=t;return e&&typeof e=="object"&&typeof e.data=="object"&&typeof e.subscribe=="function"&&typeof e.cancel=="function"&&typeof e.resolveData=="function"}function wQ(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function zOe(t){return xOe.has(t.toLowerCase())}function ya(t){return wOe.has(t.toLowerCase())}async function BOe(t,e,n,r,s){let i=Object.entries(e);for(let a=0;a(d==null?void 0:d.route.id)===o);if(!u)continue;let f=r.find(d=>d.route.id===u.route.id),l=f!=null&&!vQ(f,u)&&(s&&s[u.route.id])!==void 0;hd(c)&&l&&await D$(c,n,!1).then(d=>{d&&(e[o]=d)})}}async function UOe(t,e,n){for(let r=0;r(u==null?void 0:u.route.id)===i)&&hd(o)&&(Nt(a,"Expected an AbortController for revalidating fetcher deferred result"),await D$(o,a.signal,!0).then(u=>{u&&(e[s]=u)}))}}async function D$(t,e,n){if(n===void 0&&(n=!1),!await t.deferredData.resolveData(e)){if(n)try{return{type:hn.data,data:t.deferredData.unwrappedData}}catch(s){return{type:hn.error,error:s}}return{type:hn.data,data:t.deferredData.data}}}function N$(t){return new URLSearchParams(t).getAll("index").some(e=>e==="")}function Uy(t,e){let n=typeof e=="string"?Hd(e).search:e.search;if(t[t.length-1].route.index&&N$(n||""))return t[t.length-1];let r=pQ(t);return r[r.length-1]}function _4(t){let{formMethod:e,formAction:n,formEncType:r,text:s,formData:i,json:a}=t;if(!(!e||!n||!r)){if(s!=null)return{formMethod:e,formAction:n,formEncType:r,formData:void 0,json:void 0,text:s};if(i!=null)return{formMethod:e,formAction:n,formEncType:r,formData:i,json:void 0,text:void 0};if(a!==void 0)return{formMethod:e,formAction:n,formEncType:r,formData:void 0,json:a,text:void 0}}}function JT(t,e){return e?{state:"loading",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}:{state:"loading",location:t,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function HOe(t,e){return{state:"submitting",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}}function Cy(t,e){return t?{state:"loading",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function WOe(t,e){return{state:"submitting",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e?e.data:void 0}}function xu(t){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function VOe(t,e){try{let n=t.sessionStorage.getItem(gQ);if(n){let r=JSON.parse(n);for(let[s,i]of Object.entries(r||{}))i&&Array.isArray(i)&&e.set(s,new Set(i||[]))}}catch{}}function qOe(t,e){if(e.size>0){let n={};for(let[r,s]of e)n[r]=[...s];try{t.sessionStorage.setItem(gQ,JSON.stringify(n))}catch(r){mv(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/** + */function Gn(){return Gn=Object.assign?Object.assign.bind():function(t){for(var e=1;e"u")throw new Error(e)}function mv(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function eOe(){return Math.random().toString(36).substr(2,8)}function o4(t,e){return{usr:t.state,key:t.key,idx:e}}function rw(t,e,n,r){return n===void 0&&(n=null),Gn({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Hd(e):e,{state:n,key:e&&e.key||r||eOe()})}function np(t){let{pathname:e="/",search:n="",hash:r=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Hd(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substr(r),t=t.substr(0,r)),t&&(e.pathname=t)}return e}function tOe(t,e,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,a=s.history,o=Er.Pop,c=null,u=f();u==null&&(u=0,a.replaceState(Gn({},a.state,{idx:u}),""));function f(){return(a.state||{idx:null}).idx}function l(){o=Er.Pop;let y=f(),g=y==null?null:y-u;u=y,c&&c({action:o,location:h.location,delta:g})}function d(y,g){o=Er.Push;let v=rw(h.location,y,g);u=f()+1;let w=o4(v,u),x=h.createHref(v);try{a.pushState(w,"",x)}catch(A){if(A instanceof DOMException&&A.name==="DataCloneError")throw A;s.location.assign(x)}i&&c&&c({action:o,location:h.location,delta:1})}function m(y,g){o=Er.Replace;let v=rw(h.location,y,g);u=f();let w=o4(v,u),x=h.createHref(v);a.replaceState(w,"",x),i&&c&&c({action:o,location:h.location,delta:0})}function p(y){let g=s.location.origin!=="null"?s.location.origin:s.location.href,v=typeof y=="string"?y:np(y);return v=v.replace(/ $/,"%20"),Nt(g,"No window.location.(origin|href) available to create URL for href: "+v),new URL(v,g)}let h={get action(){return o},get location(){return t(s,a)},listen(y){if(c)throw new Error("A history only accepts one active listener");return s.addEventListener(i4,l),c=y,()=>{s.removeEventListener(i4,l),c=null}},createHref(y){return e(s,y)},createURL:p,encodeLocation(y){let g=p(y);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:d,replace:m,go(y){return a.go(y)}};return h}var hn;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(hn||(hn={}));const nOe=new Set(["lazy","caseSensitive","path","id","index","children"]);function rOe(t){return t.index===!0}function DC(t,e,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),t.map((s,i)=>{let a=[...n,String(i)],o=typeof s.id=="string"?s.id:a.join("-");if(Nt(s.index!==!0||!s.children,"Cannot specify children on an index route"),Nt(!r[o],'Found a route id collision on id "'+o+`". Route id's must be globally unique within Data Router usages`),rOe(s)){let c=Gn({},s,e(s),{id:o});return r[o]=c,c}else{let c=Gn({},s,e(s),{id:o,children:void 0});return r[o]=c,s.children&&(c.children=DC(s.children,e,a,r)),c}})}function vf(t,e,n){return n===void 0&&(n="/"),YS(t,e,n,!1)}function YS(t,e,n,r){let s=typeof e=="string"?Hd(e):e,i=kd(s.pathname||"/",n);if(i==null)return null;let a=fQ(t);iOe(a);let o=null;for(let c=0;o==null&&c{let c={relativePath:o===void 0?i.path||"":o,caseSensitive:i.caseSensitive===!0,childrenIndex:a,route:i};c.relativePath.startsWith("/")&&(Nt(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let u=Lc([r,c.relativePath]),f=n.concat(c);i.children&&i.children.length>0&&(Nt(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),fQ(i.children,e,f,u)),!(i.path==null&&!i.index)&&e.push({path:u,score:fOe(u,i.index),routesMeta:f})};return t.forEach((i,a)=>{var o;if(i.path===""||!((o=i.path)!=null&&o.includes("?")))s(i,a);else for(let c of hQ(i.path))s(i,a,c)}),e}function hQ(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let a=hQ(r.join("/")),o=[];return o.push(...a.map(c=>c===""?i:[i,c].join("/"))),s&&o.push(...a),o.map(c=>t.startsWith("/")&&c===""?"/":c)}function iOe(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:hOe(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const oOe=/^:[\w-]+$/,aOe=3,lOe=2,cOe=1,uOe=10,dOe=-2,a4=t=>t==="*";function fOe(t,e){let n=t.split("/"),r=n.length;return n.some(a4)&&(r+=dOe),e&&(r+=lOe),n.filter(s=>!a4(s)).reduce((s,i)=>s+(oOe.test(i)?aOe:i===""?cOe:uOe),r)}function hOe(t,e){return t.length===e.length&&t.slice(0,-1).every((r,s)=>r===e[s])?t[t.length-1]-e[e.length-1]:0}function pOe(t,e,n){n===void 0&&(n=!1);let{routesMeta:r}=t,s={},i="/",a=[];for(let o=0;o{let{paramName:d,isOptional:m}=f;if(d==="*"){let h=o[l]||"";a=i.slice(0,i.length-h.length).replace(/(.)\/+$/,"$1")}const p=o[l];return m&&!p?u[d]=void 0:u[d]=(p||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:a,pattern:t}}function mOe(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),mv(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let r=[],s="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,o,c)=>(r.push({paramName:o,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(r.push({paramName:"*"}),s+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":t!==""&&t!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,e?void 0:"i"),r]}function gOe(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return mv(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function kd(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}function vOe(t,e){e===void 0&&(e="/");let{pathname:n,search:r="",hash:s=""}=typeof t=="string"?Hd(t):t;return{pathname:n?n.startsWith("/")?n:yOe(n,e):e,search:wOe(r),hash:_Oe(s)}}function yOe(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function XT(t,e,n,r){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function pQ(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function $A(t,e){let n=pQ(t);return e?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function jA(t,e,n,r){r===void 0&&(r=!1);let s;typeof t=="string"?s=Hd(t):(s=Gn({},t),Nt(!s.pathname||!s.pathname.includes("?"),XT("?","pathname","search",s)),Nt(!s.pathname||!s.pathname.includes("#"),XT("#","pathname","hash",s)),Nt(!s.search||!s.search.includes("#"),XT("#","search","hash",s)));let i=t===""||s.pathname==="",a=i?"/":s.pathname,o;if(a==null)o=n;else{let l=e.length-1;if(!r&&a.startsWith("..")){let d=a.split("/");for(;d[0]==="..";)d.shift(),l-=1;s.pathname=d.join("/")}o=l>=0?e[l]:"/"}let c=vOe(s,o),u=a&&a!=="/"&&a.endsWith("/"),f=(i||a===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||f)&&(c.pathname+="/"),c}const Lc=t=>t.join("/").replace(/\/\/+/g,"/"),bOe=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),wOe=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,_Oe=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;class NC{constructor(e,n,r,s){s===void 0&&(s=!1),this.status=e,this.statusText=n||"",this.internal=s,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function sw(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const mQ=["post","put","patch","delete"],xOe=new Set(mQ),SOe=["get",...mQ],EOe=new Set(SOe),COe=new Set([301,302,303,307,308]),AOe=new Set([307,308]),QT={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ROe={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},sm={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},k$=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,POe=t=>({hasErrorBoundary:!!t.hasErrorBoundary}),gQ="remix-router-transitions";function TOe(t){const e=t.window?t.window:typeof window<"u"?window:void 0,n=typeof e<"u"&&typeof e.document<"u"&&typeof e.document.createElement<"u",r=!n;Nt(t.routes.length>0,"You must provide a non-empty routes array to createRouter");let s;if(t.mapRouteProperties)s=t.mapRouteProperties;else if(t.detectErrorBoundary){let te=t.detectErrorBoundary;s=oe=>({hasErrorBoundary:te(oe)})}else s=POe;let i={},a=DC(t.routes,s,void 0,i),o,c=t.basename||"/",u=t.dataStrategy||MOe,f=t.patchRoutesOnNavigation,l=Gn({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},t.future),d=null,m=new Set,p=null,h=null,y=null,g=t.hydrationData!=null,v=vf(a,t.history.location,c),w=!1,x=null;if(v==null&&!f){let te=pi(404,{pathname:t.history.location.pathname}),{matches:oe,route:he}=b4(a);v=oe,x={[he.id]:te}}v&&!t.hydrationData&&cn(v,a,t.history.location.pathname).active&&(v=null);let A;if(v)if(v.some(te=>te.route.lazy))A=!1;else if(!v.some(te=>te.route.loader))A=!0;else if(l.v7_partialHydration){let te=t.hydrationData?t.hydrationData.loaderData:null,oe=t.hydrationData?t.hydrationData.errors:null;if(oe){let he=v.findIndex(Ce=>oe[Ce.route.id]!==void 0);A=v.slice(0,he+1).every(Ce=>!kN(Ce.route,te,oe))}else A=v.every(he=>!kN(he.route,te,oe))}else A=t.hydrationData!=null;else if(A=!1,v=[],l.v7_partialHydration){let te=cn(null,a,t.history.location.pathname);te.active&&te.matches&&(w=!0,v=te.matches)}let k,R={historyAction:t.history.action,location:t.history.location,matches:v,initialized:A,navigation:QT,restoreScrollPosition:t.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:t.hydrationData&&t.hydrationData.loaderData||{},actionData:t.hydrationData&&t.hydrationData.actionData||null,errors:t.hydrationData&&t.hydrationData.errors||x,fetchers:new Map,blockers:new Map},E=Er.Pop,T=!1,D,M=!1,L=new Map,I=null,j=!1,U=!1,Y=[],W=new Set,H=new Map,ee=0,re=-1,X=new Map,G=new Set,K=new Map,J=new Map,ue=new Set,de=new Map,ie=new Map,be;function Ae(){if(d=t.history.listen(te=>{let{action:oe,location:he,delta:Ce}=te;if(be){be(),be=void 0;return}mv(ie.size===0||Ce!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let Le=ot({currentLocation:R.location,nextLocation:he,historyAction:oe});if(Le&&Ce!=null){let Ge=new Promise(st=>{be=st});t.history.go(Ce*-1),it(Le,{state:"blocked",location:he,proceed(){it(Le,{state:"proceeding",proceed:void 0,reset:void 0,location:he}),Ge.then(()=>t.history.go(Ce))},reset(){let st=new Map(R.blockers);st.set(Le,sm),Ne({blockers:st})}});return}return Qe(oe,he)}),n){GOe(e,L);let te=()=>KOe(e,L);e.addEventListener("pagehide",te),I=()=>e.removeEventListener("pagehide",te)}return R.initialized||Qe(Er.Pop,R.location,{initialHydration:!0}),k}function _e(){d&&d(),I&&I(),m.clear(),D&&D.abort(),R.fetchers.forEach((te,oe)=>wt(oe)),R.blockers.forEach((te,oe)=>Be(oe))}function Oe(te){return m.add(te),()=>m.delete(te)}function Ne(te,oe){oe===void 0&&(oe={}),R=Gn({},R,te);let he=[],Ce=[];l.v7_fetcherPersist&&R.fetchers.forEach((Le,Ge)=>{Le.state==="idle"&&(ue.has(Ge)?Ce.push(Ge):he.push(Ge))}),ue.forEach(Le=>{!R.fetchers.has(Le)&&!H.has(Le)&&Ce.push(Le)}),[...m].forEach(Le=>Le(R,{deletedFetchers:Ce,viewTransitionOpts:oe.viewTransitionOpts,flushSync:oe.flushSync===!0})),l.v7_fetcherPersist?(he.forEach(Le=>R.fetchers.delete(Le)),Ce.forEach(Le=>wt(Le))):Ce.forEach(Le=>ue.delete(Le))}function ye(te,oe,he){var Ce,Le;let{flushSync:Ge}=he===void 0?{}:he,st=R.actionData!=null&&R.navigation.formMethod!=null&&ya(R.navigation.formMethod)&&R.navigation.state==="loading"&&((Ce=te.state)==null?void 0:Ce._isRedirect)!==!0,Ue;oe.actionData?Object.keys(oe.actionData).length>0?Ue=oe.actionData:Ue=null:st?Ue=R.actionData:Ue=null;let Xe=oe.loaderData?v4(R.loaderData,oe.loaderData,oe.matches||[],oe.errors):R.loaderData,Ve=R.blockers;Ve.size>0&&(Ve=new Map(Ve),Ve.forEach((It,Tr)=>Ve.set(Tr,sm)));let Ze=T===!0||R.navigation.formMethod!=null&&ya(R.navigation.formMethod)&&((Le=te.state)==null?void 0:Le._isRedirect)!==!0;o&&(a=o,o=void 0),j||E===Er.Pop||(E===Er.Push?t.history.push(te,te.state):E===Er.Replace&&t.history.replace(te,te.state));let gt;if(E===Er.Pop){let It=L.get(R.location.pathname);It&&It.has(te.pathname)?gt={currentLocation:R.location,nextLocation:te}:L.has(te.pathname)&&(gt={currentLocation:te,nextLocation:R.location})}else if(M){let It=L.get(R.location.pathname);It?It.add(te.pathname):(It=new Set([te.pathname]),L.set(R.location.pathname,It)),gt={currentLocation:R.location,nextLocation:te}}Ne(Gn({},oe,{actionData:Ue,loaderData:Xe,historyAction:E,location:te,initialized:!0,navigation:QT,revalidation:"idle",restoreScrollPosition:ln(te,oe.matches||R.matches),preventScrollReset:Ze,blockers:Ve}),{viewTransitionOpts:gt,flushSync:Ge===!0}),E=Er.Pop,T=!1,M=!1,j=!1,U=!1,Y=[]}async function $e(te,oe){if(typeof te=="number"){t.history.go(te);return}let he=TN(R.location,R.matches,c,l.v7_prependBasename,te,l.v7_relativeSplatPath,oe==null?void 0:oe.fromRouteId,oe==null?void 0:oe.relative),{path:Ce,submission:Le,error:Ge}=c4(l.v7_normalizeFormMethod,!1,he,oe),st=R.location,Ue=rw(R.location,Ce,oe&&oe.state);Ue=Gn({},Ue,t.history.encodeLocation(Ue));let Xe=oe&&oe.replace!=null?oe.replace:void 0,Ve=Er.Push;Xe===!0?Ve=Er.Replace:Xe===!1||Le!=null&&ya(Le.formMethod)&&Le.formAction===R.location.pathname+R.location.search&&(Ve=Er.Replace);let Ze=oe&&"preventScrollReset"in oe?oe.preventScrollReset===!0:void 0,gt=(oe&&oe.flushSync)===!0,It=ot({currentLocation:st,nextLocation:Ue,historyAction:Ve});if(It){it(It,{state:"blocked",location:Ue,proceed(){it(It,{state:"proceeding",proceed:void 0,reset:void 0,location:Ue}),$e(te,oe)},reset(){let Tr=new Map(R.blockers);Tr.set(It,sm),Ne({blockers:Tr})}});return}return await Qe(Ve,Ue,{submission:Le,pendingError:Ge,preventScrollReset:Ze,replace:oe&&oe.replace,enableViewTransition:oe&&oe.viewTransition,flushSync:gt})}function ut(){if(xe(),Ne({revalidation:"loading"}),R.navigation.state!=="submitting"){if(R.navigation.state==="idle"){Qe(R.historyAction,R.location,{startUninterruptedRevalidation:!0});return}Qe(E||R.historyAction,R.navigation.location,{overrideNavigation:R.navigation,enableViewTransition:M===!0})}}async function Qe(te,oe,he){D&&D.abort(),D=null,E=te,j=(he&&he.startUninterruptedRevalidation)===!0,yn(R.location,R.matches),T=(he&&he.preventScrollReset)===!0,M=(he&&he.enableViewTransition)===!0;let Ce=o||a,Le=he&&he.overrideNavigation,Ge=he!=null&&he.initialHydration&&R.matches&&R.matches.length>0&&!w?R.matches:vf(Ce,oe,c),st=(he&&he.flushSync)===!0;if(Ge&&R.initialized&&!U&&FOe(R.location,oe)&&!(he&&he.submission&&ya(he.submission.formMethod))){ye(oe,{matches:Ge},{flushSync:st});return}let Ue=cn(Ge,Ce,oe.pathname);if(Ue.active&&Ue.matches&&(Ge=Ue.matches),!Ge){let{error:bn,notFoundMatches:qt,route:Wn}=Et(oe.pathname);ye(oe,{matches:qt,loaderData:{},errors:{[Wn.id]:bn}},{flushSync:st});return}D=new AbortController;let Xe=Xp(t.history,oe,D.signal,he&&he.submission),Ve;if(he&&he.pendingError)Ve=[yf(Ge).route.id,{type:hn.error,error:he.pendingError}];else if(he&&he.submission&&ya(he.submission.formMethod)){let bn=await yt(Xe,oe,he.submission,Ge,Ue.active,{replace:he.replace,flushSync:st});if(bn.shortCircuited)return;if(bn.pendingActionResult){let[qt,Wn]=bn.pendingActionResult;if(eo(Wn)&&sw(Wn.error)&&Wn.error.status===404){D=null,ye(oe,{matches:bn.matches,loaderData:{},errors:{[qt]:Wn.error}});return}}Ge=bn.matches||Ge,Ve=bn.pendingActionResult,Le=JT(oe,he.submission),st=!1,Ue.active=!1,Xe=Xp(t.history,Xe.url,Xe.signal)}let{shortCircuited:Ze,matches:gt,loaderData:It,errors:Tr}=await En(Xe,oe,Ge,Ue.active,Le,he&&he.submission,he&&he.fetcherSubmission,he&&he.replace,he&&he.initialHydration===!0,st,Ve);Ze||(D=null,ye(oe,Gn({matches:gt||Ge},y4(Ve),{loaderData:It,errors:Tr})))}async function yt(te,oe,he,Ce,Le,Ge){Ge===void 0&&(Ge={}),xe();let st=VOe(oe,he);if(Ne({navigation:st},{flushSync:Ge.flushSync===!0}),Le){let Ve=await kn(Ce,oe.pathname,te.signal);if(Ve.type==="aborted")return{shortCircuited:!0};if(Ve.type==="error"){let Ze=yf(Ve.partialMatches).route.id;return{matches:Ve.partialMatches,pendingActionResult:[Ze,{type:hn.error,error:Ve.error}]}}else if(Ve.matches)Ce=Ve.matches;else{let{notFoundMatches:Ze,error:gt,route:It}=Et(oe.pathname);return{matches:Ze,pendingActionResult:[It.id,{type:hn.error,error:gt}]}}}let Ue,Xe=Uy(Ce,oe);if(!Xe.route.action&&!Xe.route.lazy)Ue={type:hn.error,error:pi(405,{method:te.method,pathname:oe.pathname,routeId:Xe.route.id})};else if(Ue=(await Pe("action",R,te,[Xe],Ce,null))[Xe.route.id],te.signal.aborted)return{shortCircuited:!0};if(Rf(Ue)){let Ve;return Ge&&Ge.replace!=null?Ve=Ge.replace:Ve=p4(Ue.response.headers.get("Location"),new URL(te.url),c)===R.location.pathname+R.location.search,await ge(te,Ue,!0,{submission:he,replace:Ve}),{shortCircuited:!0}}if(hd(Ue))throw pi(400,{type:"defer-action"});if(eo(Ue)){let Ve=yf(Ce,Xe.route.id);return(Ge&&Ge.replace)!==!0&&(E=Er.Push),{matches:Ce,pendingActionResult:[Ve.route.id,Ue]}}return{matches:Ce,pendingActionResult:[Xe.route.id,Ue]}}async function En(te,oe,he,Ce,Le,Ge,st,Ue,Xe,Ve,Ze){let gt=Le||JT(oe,Ge),It=Ge||st||_4(gt),Tr=!j&&(!l.v7_partialHydration||!Xe);if(Ce){if(Tr){let Vn=Xt(Ze);Ne(Gn({navigation:gt},Vn!==void 0?{actionData:Vn}:{}),{flushSync:Ve})}let jt=await kn(he,oe.pathname,te.signal);if(jt.type==="aborted")return{shortCircuited:!0};if(jt.type==="error"){let Vn=yf(jt.partialMatches).route.id;return{matches:jt.partialMatches,loaderData:{},errors:{[Vn]:jt.error}}}else if(jt.matches)he=jt.matches;else{let{error:Vn,notFoundMatches:ru,route:Qd}=Et(oe.pathname);return{matches:ru,loaderData:{},errors:{[Qd.id]:Vn}}}}let bn=o||a,[qt,Wn]=d4(t.history,R,he,It,oe,l.v7_partialHydration&&Xe===!0,l.v7_skipActionErrorRevalidation,U,Y,W,ue,K,G,bn,c,Ze);if(nt(jt=>!(he&&he.some(Vn=>Vn.route.id===jt))||qt&&qt.some(Vn=>Vn.route.id===jt)),re=++ee,qt.length===0&&Wn.length===0){let jt=Ht();return ye(oe,Gn({matches:he,loaderData:{},errors:Ze&&eo(Ze[1])?{[Ze[0]]:Ze[1].error}:null},y4(Ze),jt?{fetchers:new Map(R.fetchers)}:{}),{flushSync:Ve}),{shortCircuited:!0}}if(Tr){let jt={};if(!Ce){jt.navigation=gt;let Vn=Xt(Ze);Vn!==void 0&&(jt.actionData=Vn)}Wn.length>0&&(jt.fetchers=gn(Wn)),Ne(jt,{flushSync:Ve})}Wn.forEach(jt=>{Yn(jt.key),jt.controller&&H.set(jt.key,jt.controller)});let nu=()=>Wn.forEach(jt=>Yn(jt.key));D&&D.signal.addEventListener("abort",nu);let{loaderResults:ja,fetcherResults:Go}=await Me(R,he,qt,Wn,te);if(te.signal.aborted)return{shortCircuited:!0};D&&D.signal.removeEventListener("abort",nu),Wn.forEach(jt=>H.delete(jt.key));let Is=bS(ja);if(Is)return await ge(te,Is.result,!0,{replace:Ue}),{shortCircuited:!0};if(Is=bS(Go),Is)return G.add(Is.key),await ge(te,Is.result,!0,{replace:Ue}),{shortCircuited:!0};let{loaderData:Wv,errors:Kd}=g4(R,he,ja,Ze,Wn,Go,de);de.forEach((jt,Vn)=>{jt.subscribe(ru=>{(ru||jt.done)&&de.delete(Vn)})}),l.v7_partialHydration&&Xe&&R.errors&&(Kd=Gn({},R.errors,Kd));let Nl=Ht(),Yd=an(re),Xd=Nl||Yd||Wn.length>0;return Gn({matches:he,loaderData:Wv,errors:Kd},Xd?{fetchers:new Map(R.fetchers)}:{})}function Xt(te){if(te&&!eo(te[1]))return{[te[0]]:te[1].data};if(R.actionData)return Object.keys(R.actionData).length===0?null:R.actionData}function gn(te){return te.forEach(oe=>{let he=R.fetchers.get(oe.key),Ce=Cy(void 0,he?he.data:void 0);R.fetchers.set(oe.key,Ce)}),new Map(R.fetchers)}function Qt(te,oe,he,Ce){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");Yn(te);let Le=(Ce&&Ce.flushSync)===!0,Ge=o||a,st=TN(R.location,R.matches,c,l.v7_prependBasename,he,l.v7_relativeSplatPath,oe,Ce==null?void 0:Ce.relative),Ue=vf(Ge,st,c),Xe=cn(Ue,Ge,st);if(Xe.active&&Xe.matches&&(Ue=Xe.matches),!Ue){Ye(te,oe,pi(404,{pathname:st}),{flushSync:Le});return}let{path:Ve,submission:Ze,error:gt}=c4(l.v7_normalizeFormMethod,!0,st,Ce);if(gt){Ye(te,oe,gt,{flushSync:Le});return}let It=Uy(Ue,Ve),Tr=(Ce&&Ce.preventScrollReset)===!0;if(Ze&&ya(Ze.formMethod)){Z(te,oe,Ve,It,Ue,Xe.active,Le,Tr,Ze);return}K.set(te,{routeId:oe,path:Ve}),fe(te,oe,Ve,It,Ue,Xe.active,Le,Tr,Ze)}async function Z(te,oe,he,Ce,Le,Ge,st,Ue,Xe){xe(),K.delete(te);function Ve(ir){if(!ir.route.action&&!ir.route.lazy){let Ml=pi(405,{method:Xe.formMethod,pathname:he,routeId:oe});return Ye(te,oe,Ml,{flushSync:st}),!0}return!1}if(!Ge&&Ve(Ce))return;let Ze=R.fetchers.get(te);Te(te,qOe(Xe,Ze),{flushSync:st});let gt=new AbortController,It=Xp(t.history,he,gt.signal,Xe);if(Ge){let ir=await kn(Le,new URL(It.url).pathname,It.signal,te);if(ir.type==="aborted")return;if(ir.type==="error"){Ye(te,oe,ir.error,{flushSync:st});return}else if(ir.matches){if(Le=ir.matches,Ce=Uy(Le,he),Ve(Ce))return}else{Ye(te,oe,pi(404,{pathname:he}),{flushSync:st});return}}H.set(te,gt);let Tr=ee,qt=(await Pe("action",R,It,[Ce],Le,te))[Ce.route.id];if(It.signal.aborted){H.get(te)===gt&&H.delete(te);return}if(l.v7_fetcherPersist&&ue.has(te)){if(Rf(qt)||eo(qt)){Te(te,xu(void 0));return}}else{if(Rf(qt))if(H.delete(te),re>Tr){Te(te,xu(void 0));return}else return G.add(te),Te(te,Cy(Xe)),ge(It,qt,!1,{fetcherSubmission:Xe,preventScrollReset:Ue});if(eo(qt)){Ye(te,oe,qt.error);return}}if(hd(qt))throw pi(400,{type:"defer-action"});let Wn=R.navigation.location||R.location,nu=Xp(t.history,Wn,gt.signal),ja=o||a,Go=R.navigation.state!=="idle"?vf(ja,R.navigation.location,c):R.matches;Nt(Go,"Didn't find any matches after fetcher action");let Is=++ee;X.set(te,Is);let Wv=Cy(Xe,qt.data);R.fetchers.set(te,Wv);let[Kd,Nl]=d4(t.history,R,Go,Xe,Wn,!1,l.v7_skipActionErrorRevalidation,U,Y,W,ue,K,G,ja,c,[Ce.route.id,qt]);Nl.filter(ir=>ir.key!==te).forEach(ir=>{let Ml=ir.key,Vv=R.fetchers.get(Ml),G0=Cy(void 0,Vv?Vv.data:void 0);R.fetchers.set(Ml,G0),Yn(Ml),ir.controller&&H.set(Ml,ir.controller)}),Ne({fetchers:new Map(R.fetchers)});let Yd=()=>Nl.forEach(ir=>Yn(ir.key));gt.signal.addEventListener("abort",Yd);let{loaderResults:Xd,fetcherResults:jt}=await Me(R,Go,Kd,Nl,nu);if(gt.signal.aborted)return;gt.signal.removeEventListener("abort",Yd),X.delete(te),H.delete(te),Nl.forEach(ir=>H.delete(ir.key));let Vn=bS(Xd);if(Vn)return ge(nu,Vn.result,!1,{preventScrollReset:Ue});if(Vn=bS(jt),Vn)return G.add(Vn.key),ge(nu,Vn.result,!1,{preventScrollReset:Ue});let{loaderData:ru,errors:Qd}=g4(R,Go,Xd,void 0,Nl,jt,de);if(R.fetchers.has(te)){let ir=xu(qt.data);R.fetchers.set(te,ir)}an(Is),R.navigation.state==="loading"&&Is>re?(Nt(E,"Expected pending action"),D&&D.abort(),ye(R.navigation.location,{matches:Go,loaderData:ru,errors:Qd,fetchers:new Map(R.fetchers)})):(Ne({errors:Qd,loaderData:v4(R.loaderData,ru,Go,Qd),fetchers:new Map(R.fetchers)}),U=!1)}async function fe(te,oe,he,Ce,Le,Ge,st,Ue,Xe){let Ve=R.fetchers.get(te);Te(te,Cy(Xe,Ve?Ve.data:void 0),{flushSync:st});let Ze=new AbortController,gt=Xp(t.history,he,Ze.signal);if(Ge){let qt=await kn(Le,new URL(gt.url).pathname,gt.signal,te);if(qt.type==="aborted")return;if(qt.type==="error"){Ye(te,oe,qt.error,{flushSync:st});return}else if(qt.matches)Le=qt.matches,Ce=Uy(Le,he);else{Ye(te,oe,pi(404,{pathname:he}),{flushSync:st});return}}H.set(te,Ze);let It=ee,bn=(await Pe("loader",R,gt,[Ce],Le,te))[Ce.route.id];if(hd(bn)&&(bn=await D$(bn,gt.signal,!0)||bn),H.get(te)===Ze&&H.delete(te),!gt.signal.aborted){if(ue.has(te)){Te(te,xu(void 0));return}if(Rf(bn))if(re>It){Te(te,xu(void 0));return}else{G.add(te),await ge(gt,bn,!1,{preventScrollReset:Ue});return}if(eo(bn)){Ye(te,oe,bn.error);return}Nt(!hd(bn),"Unhandled fetcher deferred data"),Te(te,xu(bn.data))}}async function ge(te,oe,he,Ce){let{submission:Le,fetcherSubmission:Ge,preventScrollReset:st,replace:Ue}=Ce===void 0?{}:Ce;oe.response.headers.has("X-Remix-Revalidate")&&(U=!0);let Xe=oe.response.headers.get("Location");Nt(Xe,"Expected a Location header on the redirect Response"),Xe=p4(Xe,new URL(te.url),c);let Ve=rw(R.location,Xe,{_isRedirect:!0});if(n){let qt=!1;if(oe.response.headers.has("X-Remix-Reload-Document"))qt=!0;else if(k$.test(Xe)){const Wn=t.history.createURL(Xe);qt=Wn.origin!==e.location.origin||kd(Wn.pathname,c)==null}if(qt){Ue?e.location.replace(Xe):e.location.assign(Xe);return}}D=null;let Ze=Ue===!0||oe.response.headers.has("X-Remix-Replace")?Er.Replace:Er.Push,{formMethod:gt,formAction:It,formEncType:Tr}=R.navigation;!Le&&!Ge&>&&It&&Tr&&(Le=_4(R.navigation));let bn=Le||Ge;if(AOe.has(oe.response.status)&&bn&&ya(bn.formMethod))await Qe(Ze,Ve,{submission:Gn({},bn,{formAction:Xe}),preventScrollReset:st||T,enableViewTransition:he?M:void 0});else{let qt=JT(Ve,Le);await Qe(Ze,Ve,{overrideNavigation:qt,fetcherSubmission:Ge,preventScrollReset:st||T,enableViewTransition:he?M:void 0})}}async function Pe(te,oe,he,Ce,Le,Ge){let st,Ue={};try{st=await OOe(u,te,oe,he,Ce,Le,Ge,i,s)}catch(Xe){return Ce.forEach(Ve=>{Ue[Ve.route.id]={type:hn.error,error:Xe}}),Ue}for(let[Xe,Ve]of Object.entries(st))if(zOe(Ve)){let Ze=Ve.result;Ue[Xe]={type:hn.redirect,response:$Oe(Ze,he,Xe,Le,c,l.v7_relativeSplatPath)}}else Ue[Xe]=await IOe(Ve);return Ue}async function Me(te,oe,he,Ce,Le){let Ge=te.matches,st=Pe("loader",te,Le,he,oe,null),Ue=Promise.all(Ce.map(async Ze=>{if(Ze.matches&&Ze.match&&Ze.controller){let It=(await Pe("loader",te,Xp(t.history,Ze.path,Ze.controller.signal),[Ze.match],Ze.matches,Ze.key))[Ze.match.route.id];return{[Ze.key]:It}}else return Promise.resolve({[Ze.key]:{type:hn.error,error:pi(404,{pathname:Ze.path})}})})),Xe=await st,Ve=(await Ue).reduce((Ze,gt)=>Object.assign(Ze,gt),{});return await Promise.all([HOe(oe,Xe,Le.signal,Ge,te.loaderData),WOe(oe,Ve,Ce)]),{loaderResults:Xe,fetcherResults:Ve}}function xe(){U=!0,Y.push(...nt()),K.forEach((te,oe)=>{H.has(oe)&&W.add(oe),Yn(oe)})}function Te(te,oe,he){he===void 0&&(he={}),R.fetchers.set(te,oe),Ne({fetchers:new Map(R.fetchers)},{flushSync:(he&&he.flushSync)===!0})}function Ye(te,oe,he,Ce){Ce===void 0&&(Ce={});let Le=yf(R.matches,oe);wt(te),Ne({errors:{[Le.route.id]:he},fetchers:new Map(R.fetchers)},{flushSync:(Ce&&Ce.flushSync)===!0})}function Pt(te){return J.set(te,(J.get(te)||0)+1),ue.has(te)&&ue.delete(te),R.fetchers.get(te)||ROe}function wt(te){let oe=R.fetchers.get(te);H.has(te)&&!(oe&&oe.state==="loading"&&X.has(te))&&Yn(te),K.delete(te),X.delete(te),G.delete(te),l.v7_fetcherPersist&&ue.delete(te),W.delete(te),R.fetchers.delete(te)}function Ls(te){let oe=(J.get(te)||0)-1;oe<=0?(J.delete(te),ue.add(te),l.v7_fetcherPersist||wt(te)):J.set(te,oe),Ne({fetchers:new Map(R.fetchers)})}function Yn(te){let oe=H.get(te);oe&&(oe.abort(),H.delete(te))}function gs(te){for(let oe of te){let he=Pt(oe),Ce=xu(he.data);R.fetchers.set(oe,Ce)}}function Ht(){let te=[],oe=!1;for(let he of G){let Ce=R.fetchers.get(he);Nt(Ce,"Expected fetcher: "+he),Ce.state==="loading"&&(G.delete(he),te.push(he),oe=!0)}return gs(te),oe}function an(te){let oe=[];for(let[he,Ce]of X)if(Ce0}function vn(te,oe){let he=R.blockers.get(te)||sm;return ie.get(te)!==oe&&ie.set(te,oe),he}function Be(te){R.blockers.delete(te),ie.delete(te)}function it(te,oe){let he=R.blockers.get(te)||sm;Nt(he.state==="unblocked"&&oe.state==="blocked"||he.state==="blocked"&&oe.state==="blocked"||he.state==="blocked"&&oe.state==="proceeding"||he.state==="blocked"&&oe.state==="unblocked"||he.state==="proceeding"&&oe.state==="unblocked","Invalid blocker state transition: "+he.state+" -> "+oe.state);let Ce=new Map(R.blockers);Ce.set(te,oe),Ne({blockers:Ce})}function ot(te){let{currentLocation:oe,nextLocation:he,historyAction:Ce}=te;if(ie.size===0)return;ie.size>1&&mv(!1,"A router only supports one blocker at a time");let Le=Array.from(ie.entries()),[Ge,st]=Le[Le.length-1],Ue=R.blockers.get(Ge);if(!(Ue&&Ue.state==="proceeding")&&st({currentLocation:oe,nextLocation:he,historyAction:Ce}))return Ge}function Et(te){let oe=pi(404,{pathname:te}),he=o||a,{matches:Ce,route:Le}=b4(he);return nt(),{notFoundMatches:Ce,route:Le,error:oe}}function nt(te){let oe=[];return de.forEach((he,Ce)=>{(!te||te(Ce))&&(he.cancel(),oe.push(Ce),de.delete(Ce))}),oe}function Wt(te,oe,he){if(p=te,y=oe,h=he||null,!g&&R.navigation===QT){g=!0;let Ce=ln(R.location,R.matches);Ce!=null&&Ne({restoreScrollPosition:Ce})}return()=>{p=null,y=null,h=null}}function At(te,oe){return h&&h(te,oe.map(Ce=>sOe(Ce,R.loaderData)))||te.key}function yn(te,oe){if(p&&y){let he=At(te,oe);p[he]=y()}}function ln(te,oe){if(p){let he=At(te,oe),Ce=p[he];if(typeof Ce=="number")return Ce}return null}function cn(te,oe,he){if(f)if(te){if(Object.keys(te[0].params).length>0)return{active:!0,matches:YS(oe,he,c,!0)}}else return{active:!0,matches:YS(oe,he,c,!0)||[]};return{active:!1,matches:null}}async function kn(te,oe,he,Ce){if(!f)return{type:"success",matches:te};let Le=te;for(;;){let Ge=o==null,st=o||a,Ue=i;try{await f({signal:he,path:oe,matches:Le,fetcherKey:Ce,patch:(Ze,gt)=>{he.aborted||h4(Ze,gt,st,Ue,s)}})}catch(Ze){return{type:"error",error:Ze,partialMatches:Le}}finally{Ge&&!he.aborted&&(a=[...a])}if(he.aborted)return{type:"aborted"};let Xe=vf(st,oe,c);if(Xe)return{type:"success",matches:Xe};let Ve=YS(st,oe,c,!0);if(!Ve||Le.length===Ve.length&&Le.every((Ze,gt)=>Ze.route.id===Ve[gt].route.id))return{type:"success",matches:null};Le=Ve}}function hr(te){i={},o=DC(te,s,void 0,i)}function Dn(te,oe){let he=o==null;h4(te,oe,o||a,i,s),he&&(a=[...a],Ne({}))}return k={get basename(){return c},get future(){return l},get state(){return R},get routes(){return a},get window(){return e},initialize:Ae,subscribe:Oe,enableScrollRestoration:Wt,navigate:$e,fetch:Qt,revalidate:ut,createHref:te=>t.history.createHref(te),encodeLocation:te=>t.history.encodeLocation(te),getFetcher:Pt,deleteFetcher:Ls,dispose:_e,getBlocker:vn,deleteBlocker:Be,patchRoutes:Dn,_internalFetchControllers:H,_internalActiveDeferreds:de,_internalSetRoutes:hr},k}function kOe(t){return t!=null&&("formData"in t&&t.formData!=null||"body"in t&&t.body!==void 0)}function TN(t,e,n,r,s,i,a,o){let c,u;if(a){c=[];for(let l of e)if(c.push(l),l.route.id===a){u=l;break}}else c=e,u=e[e.length-1];let f=jA(s||".",$A(c,i),kd(t.pathname,n)||t.pathname,o==="path");if(s==null&&(f.search=t.search,f.hash=t.hash),(s==null||s===""||s===".")&&u){let l=N$(f.search);if(u.route.index&&!l)f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index";else if(!u.route.index&&l){let d=new URLSearchParams(f.search),m=d.getAll("index");d.delete("index"),m.filter(h=>h).forEach(h=>d.append("index",h));let p=d.toString();f.search=p?"?"+p:""}}return r&&n!=="/"&&(f.pathname=f.pathname==="/"?n:Lc([n,f.pathname])),np(f)}function c4(t,e,n,r){if(!r||!kOe(r))return{path:n};if(r.formMethod&&!UOe(r.formMethod))return{path:n,error:pi(405,{method:r.formMethod})};let s=()=>({path:n,error:pi(400,{type:"invalid-body"})}),i=r.formMethod||"get",a=t?i.toUpperCase():i.toLowerCase(),o=bQ(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!ya(a))return s();let d=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((m,p)=>{let[h,y]=p;return""+m+h+"="+y+` +`},""):String(r.body);return{path:n,submission:{formMethod:a,formAction:o,formEncType:r.formEncType,formData:void 0,json:void 0,text:d}}}else if(r.formEncType==="application/json"){if(!ya(a))return s();try{let d=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:a,formAction:o,formEncType:r.formEncType,formData:void 0,json:d,text:void 0}}}catch{return s()}}}Nt(typeof FormData=="function","FormData is not available in this environment");let c,u;if(r.formData)c=DN(r.formData),u=r.formData;else if(r.body instanceof FormData)c=DN(r.body),u=r.body;else if(r.body instanceof URLSearchParams)c=r.body,u=m4(c);else if(r.body==null)c=new URLSearchParams,u=new FormData;else try{c=new URLSearchParams(r.body),u=m4(c)}catch{return s()}let f={formMethod:a,formAction:o,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(ya(f.formMethod))return{path:n,submission:f};let l=Hd(n);return e&&l.search&&N$(l.search)&&c.append("index",""),l.search="?"+c,{path:np(l),submission:f}}function u4(t,e,n){n===void 0&&(n=!1);let r=t.findIndex(s=>s.route.id===e);return r>=0?t.slice(0,n?r+1:r):t}function d4(t,e,n,r,s,i,a,o,c,u,f,l,d,m,p,h){let y=h?eo(h[1])?h[1].error:h[1].data:void 0,g=t.createURL(e.location),v=t.createURL(s),w=n;i&&e.errors?w=u4(n,Object.keys(e.errors)[0],!0):h&&eo(h[1])&&(w=u4(n,h[0]));let x=h?h[1].statusCode:void 0,A=a&&x&&x>=400,k=w.filter((E,T)=>{let{route:D}=E;if(D.lazy)return!0;if(D.loader==null)return!1;if(i)return kN(D,e.loaderData,e.errors);if(DOe(e.loaderData,e.matches[T],E)||c.some(I=>I===E.route.id))return!0;let M=e.matches[T],L=E;return f4(E,Gn({currentUrl:g,currentParams:M.params,nextUrl:v,nextParams:L.params},r,{actionResult:y,actionStatus:x,defaultShouldRevalidate:A?!1:o||g.pathname+g.search===v.pathname+v.search||g.search!==v.search||vQ(M,L)}))}),R=[];return l.forEach((E,T)=>{if(i||!n.some(j=>j.route.id===E.routeId)||f.has(T))return;let D=vf(m,E.path,p);if(!D){R.push({key:T,routeId:E.routeId,path:E.path,matches:null,match:null,controller:null});return}let M=e.fetchers.get(T),L=Uy(D,E.path),I=!1;d.has(T)?I=!1:u.has(T)?(u.delete(T),I=!0):M&&M.state!=="idle"&&M.data===void 0?I=o:I=f4(L,Gn({currentUrl:g,currentParams:e.matches[e.matches.length-1].params,nextUrl:v,nextParams:n[n.length-1].params},r,{actionResult:y,actionStatus:x,defaultShouldRevalidate:A?!1:o})),I&&R.push({key:T,routeId:E.routeId,path:E.path,matches:D,match:L,controller:new AbortController})}),[k,R]}function kN(t,e,n){if(t.lazy)return!0;if(!t.loader)return!1;let r=e!=null&&e[t.id]!==void 0,s=n!=null&&n[t.id]!==void 0;return!r&&s?!1:typeof t.loader=="function"&&t.loader.hydrate===!0?!0:!r&&!s}function DOe(t,e,n){let r=!e||n.route.id!==e.route.id,s=t[n.route.id]===void 0;return r||s}function vQ(t,e){let n=t.route.path;return t.pathname!==e.pathname||n!=null&&n.endsWith("*")&&t.params["*"]!==e.params["*"]}function f4(t,e){if(t.route.shouldRevalidate){let n=t.route.shouldRevalidate(e);if(typeof n=="boolean")return n}return e.defaultShouldRevalidate}function h4(t,e,n,r,s){var i;let a;if(t){let u=r[t];Nt(u,"No route found to patch children into: routeId = "+t),u.children||(u.children=[]),a=u.children}else a=n;let o=e.filter(u=>!a.some(f=>yQ(u,f))),c=DC(o,s,[t||"_","patch",String(((i=a)==null?void 0:i.length)||"0")],r);a.push(...c)}function yQ(t,e){return"id"in t&&"id"in e&&t.id===e.id?!0:t.index===e.index&&t.path===e.path&&t.caseSensitive===e.caseSensitive?(!t.children||t.children.length===0)&&(!e.children||e.children.length===0)?!0:t.children.every((n,r)=>{var s;return(s=e.children)==null?void 0:s.some(i=>yQ(n,i))}):!1}async function NOe(t,e,n){if(!t.lazy)return;let r=await t.lazy();if(!t.lazy)return;let s=n[t.id];Nt(s,"No route found in manifest");let i={};for(let a in r){let c=s[a]!==void 0&&a!=="hasErrorBoundary";mv(!c,'Route "'+s.id+'" has a static property "'+a+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+a+'" will be ignored.')),!c&&!nOe.has(a)&&(i[a]=r[a])}Object.assign(s,i),Object.assign(s,Gn({},e(s),{lazy:void 0}))}async function MOe(t){let{matches:e}=t,n=e.filter(s=>s.shouldLoad);return(await Promise.all(n.map(s=>s.resolve()))).reduce((s,i,a)=>Object.assign(s,{[n[a].route.id]:i}),{})}async function OOe(t,e,n,r,s,i,a,o,c,u){let f=i.map(m=>m.route.lazy?NOe(m.route,c,o):void 0),l=i.map((m,p)=>{let h=f[p],y=s.some(v=>v.route.id===m.route.id);return Gn({},m,{shouldLoad:y,resolve:async v=>(v&&r.method==="GET"&&(m.route.lazy||m.route.loader)&&(y=!0),y?LOe(e,r,m,h,v,u):Promise.resolve({type:hn.data,result:void 0}))})}),d=await t({matches:l,request:r,params:i[0].params,fetcherKey:a,context:u});try{await Promise.all(f)}catch{}return d}async function LOe(t,e,n,r,s,i){let a,o,c=u=>{let f,l=new Promise((p,h)=>f=h);o=()=>f(),e.signal.addEventListener("abort",o);let d=p=>typeof u!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+t+'" [routeId: '+n.route.id+"]"))):u({request:e,params:n.params,context:i},...p!==void 0?[p]:[]),m=(async()=>{try{return{type:"data",result:await(s?s(h=>d(h)):d())}}catch(p){return{type:"error",result:p}}})();return Promise.race([m,l])};try{let u=n.route[t];if(r)if(u){let f,[l]=await Promise.all([c(u).catch(d=>{f=d}),r]);if(f!==void 0)throw f;a=l}else if(await r,u=n.route[t],u)a=await c(u);else if(t==="action"){let f=new URL(e.url),l=f.pathname+f.search;throw pi(405,{method:e.method,pathname:l,routeId:n.route.id})}else return{type:hn.data,result:void 0};else if(u)a=await c(u);else{let f=new URL(e.url),l=f.pathname+f.search;throw pi(404,{pathname:l})}Nt(a.result!==void 0,"You defined "+(t==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+t+"` ")+"function. Please return a value or `null`.")}catch(u){return{type:hn.error,result:u}}finally{o&&e.signal.removeEventListener("abort",o)}return a}async function IOe(t){let{result:e,type:n}=t;if(wQ(e)){let l;try{let d=e.headers.get("Content-Type");d&&/\bapplication\/json\b/.test(d)?e.body==null?l=null:l=await e.json():l=await e.text()}catch(d){return{type:hn.error,error:d}}return n===hn.error?{type:hn.error,error:new NC(e.status,e.statusText,l),statusCode:e.status,headers:e.headers}:{type:hn.data,data:l,statusCode:e.status,headers:e.headers}}if(n===hn.error){if(w4(e)){var r,s;if(e.data instanceof Error){var i,a;return{type:hn.error,error:e.data,statusCode:(i=e.init)==null?void 0:i.status,headers:(a=e.init)!=null&&a.headers?new Headers(e.init.headers):void 0}}return{type:hn.error,error:new NC(((r=e.init)==null?void 0:r.status)||500,void 0,e.data),statusCode:sw(e)?e.status:void 0,headers:(s=e.init)!=null&&s.headers?new Headers(e.init.headers):void 0}}return{type:hn.error,error:e,statusCode:sw(e)?e.status:void 0}}if(BOe(e)){var o,c;return{type:hn.deferred,deferredData:e,statusCode:(o=e.init)==null?void 0:o.status,headers:((c=e.init)==null?void 0:c.headers)&&new Headers(e.init.headers)}}if(w4(e)){var u,f;return{type:hn.data,data:e.data,statusCode:(u=e.init)==null?void 0:u.status,headers:(f=e.init)!=null&&f.headers?new Headers(e.init.headers):void 0}}return{type:hn.data,data:e}}function $Oe(t,e,n,r,s,i){let a=t.headers.get("Location");if(Nt(a,"Redirects returned/thrown from loaders/actions must have a Location header"),!k$.test(a)){let o=r.slice(0,r.findIndex(c=>c.route.id===n)+1);a=TN(new URL(e.url),o,s,!0,a,i),t.headers.set("Location",a)}return t}function p4(t,e,n){if(k$.test(t)){let r=t,s=r.startsWith("//")?new URL(e.protocol+r):new URL(r),i=kd(s.pathname,n)!=null;if(s.origin===e.origin&&i)return s.pathname+s.search+s.hash}return t}function Xp(t,e,n,r){let s=t.createURL(bQ(e)).toString(),i={signal:n};if(r&&ya(r.formMethod)){let{formMethod:a,formEncType:o}=r;i.method=a.toUpperCase(),o==="application/json"?(i.headers=new Headers({"Content-Type":o}),i.body=JSON.stringify(r.json)):o==="text/plain"?i.body=r.text:o==="application/x-www-form-urlencoded"&&r.formData?i.body=DN(r.formData):i.body=r.formData}return new Request(s,i)}function DN(t){let e=new URLSearchParams;for(let[n,r]of t.entries())e.append(n,typeof r=="string"?r:r.name);return e}function m4(t){let e=new FormData;for(let[n,r]of t.entries())e.append(n,r);return e}function jOe(t,e,n,r,s){let i={},a=null,o,c=!1,u={},f=n&&eo(n[1])?n[1].error:void 0;return t.forEach(l=>{if(!(l.route.id in e))return;let d=l.route.id,m=e[d];if(Nt(!Rf(m),"Cannot handle redirect results in processLoaderData"),eo(m)){let p=m.error;f!==void 0&&(p=f,f=void 0),a=a||{};{let h=yf(t,d);a[h.route.id]==null&&(a[h.route.id]=p)}i[d]=void 0,c||(c=!0,o=sw(m.error)?m.error.status:500),m.headers&&(u[d]=m.headers)}else hd(m)?(r.set(d,m.deferredData),i[d]=m.deferredData.data,m.statusCode!=null&&m.statusCode!==200&&!c&&(o=m.statusCode),m.headers&&(u[d]=m.headers)):(i[d]=m.data,m.statusCode&&m.statusCode!==200&&!c&&(o=m.statusCode),m.headers&&(u[d]=m.headers))}),f!==void 0&&n&&(a={[n[0]]:f},i[n[0]]=void 0),{loaderData:i,errors:a,statusCode:o||200,loaderHeaders:u}}function g4(t,e,n,r,s,i,a){let{loaderData:o,errors:c}=jOe(e,n,r,a);return s.forEach(u=>{let{key:f,match:l,controller:d}=u,m=i[f];if(Nt(m,"Did not find corresponding fetcher result"),!(d&&d.signal.aborted))if(eo(m)){let p=yf(t.matches,l==null?void 0:l.route.id);c&&c[p.route.id]||(c=Gn({},c,{[p.route.id]:m.error})),t.fetchers.delete(f)}else if(Rf(m))Nt(!1,"Unhandled fetcher revalidation redirect");else if(hd(m))Nt(!1,"Unhandled fetcher deferred data");else{let p=xu(m.data);t.fetchers.set(f,p)}}),{loaderData:o,errors:c}}function v4(t,e,n,r){let s=Gn({},e);for(let i of n){let a=i.route.id;if(e.hasOwnProperty(a)?e[a]!==void 0&&(s[a]=e[a]):t[a]!==void 0&&i.route.loader&&(s[a]=t[a]),r&&r.hasOwnProperty(a))break}return s}function y4(t){return t?eo(t[1])?{actionData:{}}:{actionData:{[t[0]]:t[1].data}}:{}}function yf(t,e){return(e?t.slice(0,t.findIndex(r=>r.route.id===e)+1):[...t]).reverse().find(r=>r.route.hasErrorBoundary===!0)||t[0]}function b4(t){let e=t.length===1?t[0]:t.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:e}],route:e}}function pi(t,e){let{pathname:n,routeId:r,method:s,type:i,message:a}=e===void 0?{}:e,o="Unknown Server Error",c="Unknown @remix-run/router error";return t===400?(o="Bad Request",s&&n&&r?c="You made a "+s+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":i==="defer-action"?c="defer() is not supported in actions":i==="invalid-body"&&(c="Unable to encode submission body")):t===403?(o="Forbidden",c='Route "'+r+'" does not match URL "'+n+'"'):t===404?(o="Not Found",c='No route matches URL "'+n+'"'):t===405&&(o="Method Not Allowed",s&&n&&r?c="You made a "+s.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":s&&(c='Invalid request method "'+s.toUpperCase()+'"')),new NC(t||500,o,new Error(c),!0)}function bS(t){let e=Object.entries(t);for(let n=e.length-1;n>=0;n--){let[r,s]=e[n];if(Rf(s))return{key:r,result:s}}}function bQ(t){let e=typeof t=="string"?Hd(t):t;return np(Gn({},e,{hash:""}))}function FOe(t,e){return t.pathname!==e.pathname||t.search!==e.search?!1:t.hash===""?e.hash!=="":t.hash===e.hash?!0:e.hash!==""}function zOe(t){return wQ(t.result)&&COe.has(t.result.status)}function hd(t){return t.type===hn.deferred}function eo(t){return t.type===hn.error}function Rf(t){return(t&&t.type)===hn.redirect}function w4(t){return typeof t=="object"&&t!=null&&"type"in t&&"data"in t&&"init"in t&&t.type==="DataWithResponseInit"}function BOe(t){let e=t;return e&&typeof e=="object"&&typeof e.data=="object"&&typeof e.subscribe=="function"&&typeof e.cancel=="function"&&typeof e.resolveData=="function"}function wQ(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function UOe(t){return EOe.has(t.toLowerCase())}function ya(t){return xOe.has(t.toLowerCase())}async function HOe(t,e,n,r,s){let i=Object.entries(e);for(let a=0;a(d==null?void 0:d.route.id)===o);if(!u)continue;let f=r.find(d=>d.route.id===u.route.id),l=f!=null&&!vQ(f,u)&&(s&&s[u.route.id])!==void 0;hd(c)&&l&&await D$(c,n,!1).then(d=>{d&&(e[o]=d)})}}async function WOe(t,e,n){for(let r=0;r(u==null?void 0:u.route.id)===i)&&hd(o)&&(Nt(a,"Expected an AbortController for revalidating fetcher deferred result"),await D$(o,a.signal,!0).then(u=>{u&&(e[s]=u)}))}}async function D$(t,e,n){if(n===void 0&&(n=!1),!await t.deferredData.resolveData(e)){if(n)try{return{type:hn.data,data:t.deferredData.unwrappedData}}catch(s){return{type:hn.error,error:s}}return{type:hn.data,data:t.deferredData.data}}}function N$(t){return new URLSearchParams(t).getAll("index").some(e=>e==="")}function Uy(t,e){let n=typeof e=="string"?Hd(e).search:e.search;if(t[t.length-1].route.index&&N$(n||""))return t[t.length-1];let r=pQ(t);return r[r.length-1]}function _4(t){let{formMethod:e,formAction:n,formEncType:r,text:s,formData:i,json:a}=t;if(!(!e||!n||!r)){if(s!=null)return{formMethod:e,formAction:n,formEncType:r,formData:void 0,json:void 0,text:s};if(i!=null)return{formMethod:e,formAction:n,formEncType:r,formData:i,json:void 0,text:void 0};if(a!==void 0)return{formMethod:e,formAction:n,formEncType:r,formData:void 0,json:a,text:void 0}}}function JT(t,e){return e?{state:"loading",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}:{state:"loading",location:t,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function VOe(t,e){return{state:"submitting",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}}function Cy(t,e){return t?{state:"loading",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function qOe(t,e){return{state:"submitting",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e?e.data:void 0}}function xu(t){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function GOe(t,e){try{let n=t.sessionStorage.getItem(gQ);if(n){let r=JSON.parse(n);for(let[s,i]of Object.entries(r||{}))i&&Array.isArray(i)&&e.set(s,new Set(i||[]))}}catch{}}function KOe(t,e){if(e.size>0){let n={};for(let[r,s]of e)n[r]=[...s];try{t.sessionStorage.setItem(gQ,JSON.stringify(n))}catch(r){mv(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/** * React Router v6.30.0 * * Copyright (c) Remix Software Inc. @@ -257,7 +257,7 @@ Defaulting to \`null\`.`}var c9=i9,xke=a9;const Ske=_.forwardRef(({className:t,v * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function gv(){return gv=Object.assign?Object.assign.bind():function(t){for(var e=1;e{o.current=!0}),_.useCallback(function(u,f){if(f===void 0&&(f={}),!o.current)return;if(typeof u=="number"){r.go(u);return}let l=jA(u,JSON.parse(a),i,f.relative==="path");t==null&&e!=="/"&&(l.pathname=l.pathname==="/"?e:Lc([e,l.pathname])),(f.replace?r.replace:r.push)(l,f.state,f)},[e,r,a,i,t])}const YOe=_.createContext(null);function XOe(t){let e=_.useContext(Dl).outlet;return e&&_.createElement(YOe.Provider,{value:t},e)}function m5e(){let{matches:t}=_.useContext(Dl),e=t[t.length-1];return e?e.params:{}}function EQ(t,e){let{relative:n}=e===void 0?{}:e,{future:r}=_.useContext(Wd),{matches:s}=_.useContext(Dl),{pathname:i}=Vd(),a=JSON.stringify($A(s,r.v7_relativeSplatPath));return _.useMemo(()=>jA(t,JSON.parse(a),i,n==="path"),[t,a,i,n])}function QOe(t,e,n,r){$v()||Nt(!1);let{navigator:s,static:i}=_.useContext(Wd),{matches:a}=_.useContext(Dl),o=a[a.length-1],c=o?o.params:{};o&&o.pathname;let u=o?o.pathnameBase:"/";o&&o.route;let f=Vd(),l;l=f;let d=l.pathname||"/",m=d;if(u!=="/"){let y=u.replace(/^\//,"").split("/");m="/"+d.replace(/^\//,"").split("/").slice(y.length).join("/")}let p=!i&&n&&n.matches&&n.matches.length>0?n.matches:vf(t,{pathname:m});return nLe(p&&p.map(y=>Object.assign({},y,{params:Object.assign({},c,y.params),pathname:Lc([u,s.encodeLocation?s.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?u:Lc([u,s.encodeLocation?s.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),a,n,r)}function JOe(){let t=sLe(),e=sw(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return _.createElement(_.Fragment,null,_.createElement("h2",null,"Unexpected Application Error!"),_.createElement("h3",{style:{fontStyle:"italic"}},e),n?_.createElement("pre",{style:s},n):null,null)}const ZOe=_.createElement(JOe,null);class eLe extends _.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error!==void 0?_.createElement(Dl.Provider,{value:this.props.routeContext},_.createElement(xQ.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function tLe(t){let{routeContext:e,match:n,children:r}=t,s=_.useContext(FA);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),_.createElement(Dl.Provider,{value:e},r)}function nLe(t,e,n,r){var s;if(e===void 0&&(e=[]),n===void 0&&(n=null),r===void 0&&(r=null),t==null){var i;if(!n)return null;if(n.errors)t=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let a=t,o=(s=n)==null?void 0:s.errors;if(o!=null){let f=a.findIndex(l=>l.route.id&&(o==null?void 0:o[l.route.id])!==void 0);f>=0||Nt(!1),a=a.slice(0,Math.min(a.length,f+1))}let c=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let f=0;f=0?a=a.slice(0,u+1):a=[a[0]];break}}}return a.reduceRight((f,l,d)=>{let m,p=!1,h=null,y=null;n&&(m=o&&l.route.id?o[l.route.id]:void 0,h=l.route.errorElement||ZOe,c&&(u<0&&d===0?(aLe("route-fallback"),p=!0,y=null):u===d&&(p=!0,y=l.route.hydrateFallbackElement||null)));let g=e.concat(a.slice(0,d+1)),v=()=>{let w;return m?w=h:p?w=y:l.route.Component?w=_.createElement(l.route.Component,null):l.route.element?w=l.route.element:w=f,_.createElement(tLe,{match:l,routeContext:{outlet:f,matches:g,isDataRoute:n!=null},children:w})};return n&&(l.route.ErrorBoundary||l.route.errorElement||d===0)?_.createElement(eLe,{location:n.location,revalidation:n.revalidation,component:h,error:m,children:v(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):v()},null)}var CQ=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(CQ||{}),AQ=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(AQ||{});function RQ(t){let e=_.useContext(FA);return e||Nt(!1),e}function PQ(t){let e=_.useContext(_Q);return e||Nt(!1),e}function rLe(t){let e=_.useContext(Dl);return e||Nt(!1),e}function TQ(t){let e=rLe(),n=e.matches[e.matches.length-1];return n.route.id||Nt(!1),n.route.id}function sLe(){var t;let e=_.useContext(xQ),n=PQ(),r=TQ();return e!==void 0?e:(t=n.errors)==null?void 0:t[r]}let iLe=0;function g5e(t){let{router:e,basename:n}=RQ(),r=PQ(),[s,i]=_.useState(""),a=_.useCallback(o=>{if(typeof t!="function")return!!t;if(n==="/")return t(o);let{currentLocation:c,nextLocation:u,historyAction:f}=o;return t({currentLocation:gv({},c,{pathname:kd(c.pathname,n)||c.pathname}),nextLocation:gv({},u,{pathname:kd(u.pathname,n)||u.pathname}),historyAction:f})},[n,t]);return _.useEffect(()=>{let o=String(++iLe);return i(o),()=>e.deleteBlocker(o)},[e]),_.useEffect(()=>{s!==""&&e.getBlocker(s,a)},[e,s,a]),s&&r.blockers.has(s)?r.blockers.get(s):sm}function oLe(){let{router:t}=RQ(CQ.UseNavigateStable),e=TQ(AQ.UseNavigateStable),n=_.useRef(!1);return SQ(()=>{n.current=!0}),_.useCallback(function(s,i){i===void 0&&(i={}),n.current&&(typeof s=="number"?t.navigate(s):t.navigate(s,gv({fromRouteId:e},i)))},[t,e])}const x4={};function aLe(t,e,n){x4[t]||(x4[t]=!0)}function lLe(t,e){t==null||t.v7_startTransition,(t==null?void 0:t.v7_relativeSplatPath)===void 0&&(!e||e.v7_relativeSplatPath),e&&(e.v7_fetcherPersist,e.v7_normalizeFormMethod,e.v7_partialHydration,e.v7_skipActionErrorRevalidation)}function kQ(t){let{to:e,replace:n,state:r,relative:s}=t;$v()||Nt(!1);let{future:i,static:a}=_.useContext(Wd),{matches:o}=_.useContext(Dl),{pathname:c}=Vd(),u=jv(),f=jA(e,$A(o,i.v7_relativeSplatPath),c,s==="path"),l=JSON.stringify(f);return _.useEffect(()=>u(JSON.parse(l),{replace:n,state:r,relative:s}),[u,l,s,n,r]),null}function wS(t){return XOe(t.context)}function cLe(t){let{basename:e="/",children:n=null,location:r,navigationType:s=Er.Pop,navigator:i,static:a=!1,future:o}=t;$v()&&Nt(!1);let c=e.replace(/^\/*/,"/"),u=_.useMemo(()=>({basename:c,navigator:i,static:a,future:gv({v7_relativeSplatPath:!1},o)}),[c,o,i,a]);typeof r=="string"&&(r=Hd(r));let{pathname:f="/",search:l="",hash:d="",state:m=null,key:p="default"}=r,h=_.useMemo(()=>{let y=kd(f,c);return y==null?null:{location:{pathname:y,search:l,hash:d,state:m,key:p},navigationType:s}},[c,f,l,d,m,p,s]);return h==null?null:_.createElement(Wd.Provider,{value:u},_.createElement(M$.Provider,{children:n,value:h}))}new Promise(()=>{});function uLe(t){let e={hasErrorBoundary:t.ErrorBoundary!=null||t.errorElement!=null};return t.Component&&Object.assign(e,{element:_.createElement(t.Component),Component:void 0}),t.HydrateFallback&&Object.assign(e,{hydrateFallbackElement:_.createElement(t.HydrateFallback),HydrateFallback:void 0}),t.ErrorBoundary&&Object.assign(e,{errorElement:_.createElement(t.ErrorBoundary),ErrorBoundary:void 0}),e}/** + */function gv(){return gv=Object.assign?Object.assign.bind():function(t){for(var e=1;e{o.current=!0}),_.useCallback(function(u,f){if(f===void 0&&(f={}),!o.current)return;if(typeof u=="number"){r.go(u);return}let l=jA(u,JSON.parse(a),i,f.relative==="path");t==null&&e!=="/"&&(l.pathname=l.pathname==="/"?e:Lc([e,l.pathname])),(f.replace?r.replace:r.push)(l,f.state,f)},[e,r,a,i,t])}const QOe=_.createContext(null);function JOe(t){let e=_.useContext(Dl).outlet;return e&&_.createElement(QOe.Provider,{value:t},e)}function v5e(){let{matches:t}=_.useContext(Dl),e=t[t.length-1];return e?e.params:{}}function EQ(t,e){let{relative:n}=e===void 0?{}:e,{future:r}=_.useContext(Wd),{matches:s}=_.useContext(Dl),{pathname:i}=Vd(),a=JSON.stringify($A(s,r.v7_relativeSplatPath));return _.useMemo(()=>jA(t,JSON.parse(a),i,n==="path"),[t,a,i,n])}function ZOe(t,e,n,r){$v()||Nt(!1);let{navigator:s,static:i}=_.useContext(Wd),{matches:a}=_.useContext(Dl),o=a[a.length-1],c=o?o.params:{};o&&o.pathname;let u=o?o.pathnameBase:"/";o&&o.route;let f=Vd(),l;l=f;let d=l.pathname||"/",m=d;if(u!=="/"){let y=u.replace(/^\//,"").split("/");m="/"+d.replace(/^\//,"").split("/").slice(y.length).join("/")}let p=!i&&n&&n.matches&&n.matches.length>0?n.matches:vf(t,{pathname:m});return sLe(p&&p.map(y=>Object.assign({},y,{params:Object.assign({},c,y.params),pathname:Lc([u,s.encodeLocation?s.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?u:Lc([u,s.encodeLocation?s.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),a,n,r)}function eLe(){let t=oLe(),e=sw(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return _.createElement(_.Fragment,null,_.createElement("h2",null,"Unexpected Application Error!"),_.createElement("h3",{style:{fontStyle:"italic"}},e),n?_.createElement("pre",{style:s},n):null,null)}const tLe=_.createElement(eLe,null);class nLe extends _.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error!==void 0?_.createElement(Dl.Provider,{value:this.props.routeContext},_.createElement(xQ.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function rLe(t){let{routeContext:e,match:n,children:r}=t,s=_.useContext(FA);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),_.createElement(Dl.Provider,{value:e},r)}function sLe(t,e,n,r){var s;if(e===void 0&&(e=[]),n===void 0&&(n=null),r===void 0&&(r=null),t==null){var i;if(!n)return null;if(n.errors)t=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let a=t,o=(s=n)==null?void 0:s.errors;if(o!=null){let f=a.findIndex(l=>l.route.id&&(o==null?void 0:o[l.route.id])!==void 0);f>=0||Nt(!1),a=a.slice(0,Math.min(a.length,f+1))}let c=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let f=0;f=0?a=a.slice(0,u+1):a=[a[0]];break}}}return a.reduceRight((f,l,d)=>{let m,p=!1,h=null,y=null;n&&(m=o&&l.route.id?o[l.route.id]:void 0,h=l.route.errorElement||tLe,c&&(u<0&&d===0?(cLe("route-fallback"),p=!0,y=null):u===d&&(p=!0,y=l.route.hydrateFallbackElement||null)));let g=e.concat(a.slice(0,d+1)),v=()=>{let w;return m?w=h:p?w=y:l.route.Component?w=_.createElement(l.route.Component,null):l.route.element?w=l.route.element:w=f,_.createElement(rLe,{match:l,routeContext:{outlet:f,matches:g,isDataRoute:n!=null},children:w})};return n&&(l.route.ErrorBoundary||l.route.errorElement||d===0)?_.createElement(nLe,{location:n.location,revalidation:n.revalidation,component:h,error:m,children:v(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):v()},null)}var CQ=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(CQ||{}),AQ=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(AQ||{});function RQ(t){let e=_.useContext(FA);return e||Nt(!1),e}function PQ(t){let e=_.useContext(_Q);return e||Nt(!1),e}function iLe(t){let e=_.useContext(Dl);return e||Nt(!1),e}function TQ(t){let e=iLe(),n=e.matches[e.matches.length-1];return n.route.id||Nt(!1),n.route.id}function oLe(){var t;let e=_.useContext(xQ),n=PQ(),r=TQ();return e!==void 0?e:(t=n.errors)==null?void 0:t[r]}let aLe=0;function y5e(t){let{router:e,basename:n}=RQ(),r=PQ(),[s,i]=_.useState(""),a=_.useCallback(o=>{if(typeof t!="function")return!!t;if(n==="/")return t(o);let{currentLocation:c,nextLocation:u,historyAction:f}=o;return t({currentLocation:gv({},c,{pathname:kd(c.pathname,n)||c.pathname}),nextLocation:gv({},u,{pathname:kd(u.pathname,n)||u.pathname}),historyAction:f})},[n,t]);return _.useEffect(()=>{let o=String(++aLe);return i(o),()=>e.deleteBlocker(o)},[e]),_.useEffect(()=>{s!==""&&e.getBlocker(s,a)},[e,s,a]),s&&r.blockers.has(s)?r.blockers.get(s):sm}function lLe(){let{router:t}=RQ(CQ.UseNavigateStable),e=TQ(AQ.UseNavigateStable),n=_.useRef(!1);return SQ(()=>{n.current=!0}),_.useCallback(function(s,i){i===void 0&&(i={}),n.current&&(typeof s=="number"?t.navigate(s):t.navigate(s,gv({fromRouteId:e},i)))},[t,e])}const x4={};function cLe(t,e,n){x4[t]||(x4[t]=!0)}function uLe(t,e){t==null||t.v7_startTransition,(t==null?void 0:t.v7_relativeSplatPath)===void 0&&(!e||e.v7_relativeSplatPath),e&&(e.v7_fetcherPersist,e.v7_normalizeFormMethod,e.v7_partialHydration,e.v7_skipActionErrorRevalidation)}function kQ(t){let{to:e,replace:n,state:r,relative:s}=t;$v()||Nt(!1);let{future:i,static:a}=_.useContext(Wd),{matches:o}=_.useContext(Dl),{pathname:c}=Vd(),u=jv(),f=jA(e,$A(o,i.v7_relativeSplatPath),c,s==="path"),l=JSON.stringify(f);return _.useEffect(()=>u(JSON.parse(l),{replace:n,state:r,relative:s}),[u,l,s,n,r]),null}function wS(t){return JOe(t.context)}function dLe(t){let{basename:e="/",children:n=null,location:r,navigationType:s=Er.Pop,navigator:i,static:a=!1,future:o}=t;$v()&&Nt(!1);let c=e.replace(/^\/*/,"/"),u=_.useMemo(()=>({basename:c,navigator:i,static:a,future:gv({v7_relativeSplatPath:!1},o)}),[c,o,i,a]);typeof r=="string"&&(r=Hd(r));let{pathname:f="/",search:l="",hash:d="",state:m=null,key:p="default"}=r,h=_.useMemo(()=>{let y=kd(f,c);return y==null?null:{location:{pathname:y,search:l,hash:d,state:m,key:p},navigationType:s}},[c,f,l,d,m,p,s]);return h==null?null:_.createElement(Wd.Provider,{value:u},_.createElement(M$.Provider,{children:n,value:h}))}new Promise(()=>{});function fLe(t){let e={hasErrorBoundary:t.ErrorBoundary!=null||t.errorElement!=null};return t.Component&&Object.assign(e,{element:_.createElement(t.Component),Component:void 0}),t.HydrateFallback&&Object.assign(e,{hydrateFallbackElement:_.createElement(t.HydrateFallback),HydrateFallback:void 0}),t.ErrorBoundary&&Object.assign(e,{errorElement:_.createElement(t.ErrorBoundary),ErrorBoundary:void 0}),e}/** * React Router DOM v6.30.0 * * Copyright (c) Remix Software Inc. @@ -266,18 +266,18 @@ Defaulting to \`null\`.`}var c9=i9,xke=a9;const Ske=_.forwardRef(({className:t,v * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function iw(){return iw=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0)&&(n[s]=t[s]);return n}function fLe(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function hLe(t,e){return t.button===0&&(!e||e==="_self")&&!fLe(t)}function NN(t){return t===void 0&&(t=""),new URLSearchParams(typeof t=="string"||Array.isArray(t)||t instanceof URLSearchParams?t:Object.keys(t).reduce((e,n)=>{let r=t[n];return e.concat(Array.isArray(r)?r.map(s=>[n,s]):[[n,r]])},[]))}function pLe(t,e){let n=NN(t);return e&&e.forEach((r,s)=>{n.has(s)||e.getAll(s).forEach(i=>{n.append(s,i)})}),n}const mLe=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],gLe="6";try{window.__reactRouterVersion=gLe}catch{}function vLe(t,e){return ROe({basename:e==null?void 0:e.basename,future:iw({},e==null?void 0:e.future,{v7_prependBasename:!0}),history:QMe({window:e==null?void 0:e.window}),hydrationData:(e==null?void 0:e.hydrationData)||yLe(),routes:t,mapRouteProperties:uLe,dataStrategy:e==null?void 0:e.dataStrategy,patchRoutesOnNavigation:e==null?void 0:e.patchRoutesOnNavigation,window:e==null?void 0:e.window}).initialize()}function yLe(){var t;let e=(t=window)==null?void 0:t.__staticRouterHydrationData;return e&&e.errors&&(e=iw({},e,{errors:bLe(e.errors)})),e}function bLe(t){if(!t)return null;let e=Object.entries(t),n={};for(let[r,s]of e)if(s&&s.__type==="RouteErrorResponse")n[r]=new N1(s.status,s.statusText,s.data,s.internal===!0);else if(s&&s.__type==="Error"){if(s.__subType){let i=window[s.__subType];if(typeof i=="function")try{let a=new i(s.message);a.stack="",n[r]=a}catch{}}if(n[r]==null){let i=new Error(s.message);i.stack="",n[r]=i}}else n[r]=s;return n}const wLe=_.createContext({isTransitioning:!1}),_Le=_.createContext(new Map),xLe="startTransition",S4=X0[xLe],SLe="flushSync",E4=Zue[SLe];function ELe(t){S4?S4(t):t()}function Ay(t){E4?E4(t):t()}class CLe{constructor(){this.status="pending",this.promise=new Promise((e,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",e(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function ALe(t){let{fallbackElement:e,router:n,future:r}=t,[s,i]=_.useState(n.state),[a,o]=_.useState(),[c,u]=_.useState({isTransitioning:!1}),[f,l]=_.useState(),[d,m]=_.useState(),[p,h]=_.useState(),y=_.useRef(new Map),{v7_startTransition:g}=r||{},v=_.useCallback(E=>{g?ELe(E):E()},[g]),w=_.useCallback((E,T)=>{let{deletedFetchers:D,flushSync:M,viewTransitionOpts:L}=T;E.fetchers.forEach((j,U)=>{j.data!==void 0&&y.current.set(U,j.data)}),D.forEach(j=>y.current.delete(j));let I=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!L||I){M?Ay(()=>i(E)):v(()=>i(E));return}if(M){Ay(()=>{d&&(f&&f.resolve(),d.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:L.currentLocation,nextLocation:L.nextLocation})});let j=n.window.document.startViewTransition(()=>{Ay(()=>i(E))});j.finished.finally(()=>{Ay(()=>{l(void 0),m(void 0),o(void 0),u({isTransitioning:!1})})}),Ay(()=>m(j));return}d?(f&&f.resolve(),d.skipTransition(),h({state:E,currentLocation:L.currentLocation,nextLocation:L.nextLocation})):(o(E),u({isTransitioning:!0,flushSync:!1,currentLocation:L.currentLocation,nextLocation:L.nextLocation}))},[n.window,d,f,y,v]);_.useLayoutEffect(()=>n.subscribe(w),[n,w]),_.useEffect(()=>{c.isTransitioning&&!c.flushSync&&l(new CLe)},[c]),_.useEffect(()=>{if(f&&a&&n.window){let E=a,T=f.promise,D=n.window.document.startViewTransition(async()=>{v(()=>i(E)),await T});D.finished.finally(()=>{l(void 0),m(void 0),o(void 0),u({isTransitioning:!1})}),m(D)}},[v,a,f,n.window]),_.useEffect(()=>{f&&a&&s.location.key===a.location.key&&f.resolve()},[f,d,s.location,a]),_.useEffect(()=>{!c.isTransitioning&&p&&(o(p.state),u({isTransitioning:!0,flushSync:!1,currentLocation:p.currentLocation,nextLocation:p.nextLocation}),h(void 0))},[c.isTransitioning,p]),_.useEffect(()=>{},[]);let x=_.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:E=>n.navigate(E),push:(E,T,D)=>n.navigate(E,{state:T,preventScrollReset:D==null?void 0:D.preventScrollReset}),replace:(E,T,D)=>n.navigate(E,{replace:!0,state:T,preventScrollReset:D==null?void 0:D.preventScrollReset})}),[n]),A=n.basename||"/",k=_.useMemo(()=>({router:n,navigator:x,static:!1,basename:A}),[n,x,A]),R=_.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return _.useEffect(()=>lLe(r,n.future),[r,n.future]),_.createElement(_.Fragment,null,_.createElement(FA.Provider,{value:k},_.createElement(_Q.Provider,{value:s},_.createElement(_Le.Provider,{value:y.current},_.createElement(wLe.Provider,{value:c},_.createElement(cLe,{basename:A,location:s.location,navigationType:s.historyAction,navigator:x,future:R},s.initialized||n.future.v7_partialHydration?_.createElement(RLe,{routes:n.routes,future:n.future,state:s}):e))))),null)}const RLe=_.memo(PLe);function PLe(t){let{routes:e,future:n,state:r}=t;return QOe(e,void 0,r,n)}const TLe=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",kLe=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,bf=_.forwardRef(function(e,n){let{onClick:r,relative:s,reloadDocument:i,replace:a,state:o,target:c,to:u,preventScrollReset:f,viewTransition:l}=e,d=dLe(e,mLe),{basename:m}=_.useContext(Wd),p,h=!1;if(typeof u=="string"&&kLe.test(u)&&(p=u,TLe))try{let w=new URL(window.location.href),x=u.startsWith("//")?new URL(w.protocol+u):new URL(u),A=kd(x.pathname,m);x.origin===w.origin&&A!=null?u=A+x.search+x.hash:h=!0}catch{}let y=GOe(u,{relative:s}),g=DLe(u,{replace:a,state:o,target:c,preventScrollReset:f,relative:s,viewTransition:l});function v(w){r&&r(w),w.defaultPrevented||g(w)}return _.createElement("a",iw({},d,{href:p||y,onClick:h||i?r:v,ref:n,target:c}))});var C4;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(C4||(C4={}));var A4;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(A4||(A4={}));function DLe(t,e){let{target:n,replace:r,state:s,preventScrollReset:i,relative:a,viewTransition:o}=e===void 0?{}:e,c=jv(),u=Vd(),f=EQ(t,{relative:a});return _.useCallback(l=>{if(hLe(l,n)){l.preventDefault();let d=r!==void 0?r:np(u)===np(f);c(t,{replace:d,state:s,preventScrollReset:i,relative:a,viewTransition:o})}},[u,c,f,r,s,n,t,i,a,o])}function NLe(t){let e=_.useRef(NN(t)),n=_.useRef(!1),r=Vd(),s=_.useMemo(()=>pLe(r.search,n.current?null:e.current),[r.search]),i=jv(),a=_.useCallback((o,c)=>{const u=NN(typeof o=="function"?o(s):o);n.current=!0,i("?"+u,c)},[i,s]);return[s,a]}const DQ=({isOpen:t,onCancel:e,onConfirm:n,title:r,description:s,cancelLabel:i,confirmLabel:a})=>P.jsx(f6,{open:t,children:P.jsxs(DL,{children:[P.jsxs(NL,{children:[P.jsx(OL,{children:r}),P.jsx(LL,{children:s})]}),P.jsxs(ML,{children:[P.jsx($L,{children:P.jsx(bf,{to:"#",onClick:e,children:i})}),P.jsx(IL,{children:P.jsx(bf,{to:"#",onClick:n,children:a})})]})]})});var MLe={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0};const OLe=Od(MLe);var LLe=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function R4(t){var e={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},n=t.match(/<\/?([^\s]+?)[/\s>]/);if(n&&(e.name=n[1],(OLe[n[1]]||t.charAt(t.length-2)==="/")&&(e.voidElement=!0),e.name.startsWith("!--"))){var r=t.indexOf("-->");return{type:"comment",comment:r!==-1?t.slice(4,r):""}}for(var s=new RegExp(LLe),i=null;(i=s.exec(t))!==null;)if(i[0].trim())if(i[1]){var a=i[1].trim(),o=[a,""];a.indexOf("=")>-1&&(o=a.split("=")),e.attrs[o[0]]=o[1],s.lastIndex--}else i[2]&&(e.attrs[i[2]]=i[3].trim().substring(1,i[3].length-1));return e}var ILe=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,$Le=/^\s*$/,jLe=Object.create(null);function NQ(t,e){switch(e.type){case"text":return t+e.content;case"tag":return t+="<"+e.name+(e.attrs?function(n){var r=[];for(var s in n)r.push(s+'="'+n[s]+'"');return r.length?" "+r.join(" "):""}(e.attrs):"")+(e.voidElement?"/>":">"),e.voidElement?t:t+e.children.reduce(NQ,"")+"";case"comment":return t+""}}var FLe={parse:function(t,e){e||(e={}),e.components||(e.components=jLe);var n,r=[],s=[],i=-1,a=!1;if(t.indexOf("<")!==0){var o=t.indexOf("<");r.push({type:"text",content:o===-1?t:t.substring(0,o)})}return t.replace(ILe,function(c,u){if(a){if(c!=="")return;a=!1}var f,l=c.charAt(1)!=="/",d=c.startsWith("");return{type:"comment",comment:r!==-1?t.slice(4,r):""}}for(var s=new RegExp($Le),i=null;(i=s.exec(t))!==null;)if(i[0].trim())if(i[1]){var a=i[1].trim(),o=[a,""];a.indexOf("=")>-1&&(o=a.split("=")),e.attrs[o[0]]=o[1],s.lastIndex--}else i[2]&&(e.attrs[i[2]]=i[3].trim().substring(1,i[3].length-1));return e}var jLe=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,FLe=/^\s*$/,zLe=Object.create(null);function NQ(t,e){switch(e.type){case"text":return t+e.content;case"tag":return t+="<"+e.name+(e.attrs?function(n){var r=[];for(var s in n)r.push(s+'="'+n[s]+'"');return r.length?" "+r.join(" "):""}(e.attrs):"")+(e.voidElement?"/>":">"),e.voidElement?t:t+e.children.reduce(NQ,"")+"";case"comment":return t+""}}var BLe={parse:function(t,e){e||(e={}),e.components||(e.components=zLe);var n,r=[],s=[],i=-1,a=!1;if(t.indexOf("<")!==0){var o=t.indexOf("<");r.push({type:"text",content:o===-1?t:t.substring(0,o)})}return t.replace(jLe,function(c,u){if(a){if(c!=="")return;a=!1}var f,l=c.charAt(1)!=="/",d=c.startsWith("