diff --git a/build/assets/index-BvWiaLmW.css b/build/assets/index-BvWiaLmW.css deleted file mode 100644 index d0364ae..0000000 --- a/build/assets/index-BvWiaLmW.css +++ /dev/null @@ -1,6 +0,0 @@ -@import"https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Public+Sans:ital,wght@0,100..900;1,100..900&display=swap";/*! -* Quill Editor v1.3.7 -* https://quilljs.com/ -* Copyright (c) 2014, Jason Chen -* Copyright (c) 2013, salesforce.com -*/.ql-container{box-sizing:border-box;font-family:Helvetica,Arial,sans-serif;font-size:13px;height:100%;margin:0;position:relative}.ql-container.ql-disabled .ql-tooltip{visibility:hidden}.ql-container.ql-disabled .ql-editor ul[data-checked]>li:before{pointer-events:none}.ql-clipboard{left:-100000px;height:1px;overflow-y:hidden;position:absolute;top:50%}.ql-clipboard p{margin:0;padding:0}.ql-editor{box-sizing:border-box;line-height:1.42;height:100%;outline:none;overflow-y:auto;padding:12px 15px;-o-tab-size:4;tab-size:4;-moz-tab-size:4;text-align:left;white-space:pre-wrap;word-wrap:break-word}.ql-editor>*{cursor:text}.ql-editor p,.ql-editor ol,.ql-editor ul,.ql-editor pre,.ql-editor blockquote,.ql-editor h1,.ql-editor h2,.ql-editor h3,.ql-editor h4,.ql-editor h5,.ql-editor h6{margin:0;padding:0;counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol,.ql-editor ul{padding-left:1.5em}.ql-editor ol>li,.ql-editor ul>li{list-style-type:none}.ql-editor ul>li:before{content:"•"}.ql-editor ul[data-checked=true],.ql-editor ul[data-checked=false]{pointer-events:none}.ql-editor ul[data-checked=true]>li *,.ql-editor ul[data-checked=false]>li *{pointer-events:all}.ql-editor ul[data-checked=true]>li:before,.ql-editor ul[data-checked=false]>li:before{color:#777;cursor:pointer;pointer-events:all}.ql-editor ul[data-checked=true]>li:before{content:"☑"}.ql-editor ul[data-checked=false]>li:before{content:"☐"}.ql-editor li:before{display:inline-block;white-space:nowrap;width:1.2em}.ql-editor li:not(.ql-direction-rtl):before{margin-left:-1.5em;margin-right:.3em;text-align:right}.ql-editor li.ql-direction-rtl:before{margin-left:.3em;margin-right:-1.5em}.ql-editor ol li:not(.ql-direction-rtl),.ql-editor ul li:not(.ql-direction-rtl){padding-left:1.5em}.ql-editor ol li.ql-direction-rtl,.ql-editor ul li.ql-direction-rtl{padding-right:1.5em}.ql-editor ol li{counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;counter-increment:list-0}.ql-editor ol li:before{content:counter(list-0,decimal) ". "}.ql-editor ol li.ql-indent-1{counter-increment:list-1}.ql-editor ol li.ql-indent-1:before{content:counter(list-1,lower-alpha) ". "}.ql-editor ol li.ql-indent-1{counter-reset:list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-2{counter-increment:list-2}.ql-editor ol li.ql-indent-2:before{content:counter(list-2,lower-roman) ". "}.ql-editor ol li.ql-indent-2{counter-reset:list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-3{counter-increment:list-3}.ql-editor ol li.ql-indent-3:before{content:counter(list-3,decimal) ". "}.ql-editor ol li.ql-indent-3{counter-reset:list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-4{counter-increment:list-4}.ql-editor ol li.ql-indent-4:before{content:counter(list-4,lower-alpha) ". "}.ql-editor ol li.ql-indent-4{counter-reset:list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-5{counter-increment:list-5}.ql-editor ol li.ql-indent-5:before{content:counter(list-5,lower-roman) ". "}.ql-editor ol li.ql-indent-5{counter-reset:list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-6{counter-increment:list-6}.ql-editor ol li.ql-indent-6:before{content:counter(list-6,decimal) ". "}.ql-editor ol li.ql-indent-6{counter-reset:list-7 list-8 list-9}.ql-editor ol li.ql-indent-7{counter-increment:list-7}.ql-editor ol li.ql-indent-7:before{content:counter(list-7,lower-alpha) ". "}.ql-editor ol li.ql-indent-7{counter-reset:list-8 list-9}.ql-editor ol li.ql-indent-8{counter-increment:list-8}.ql-editor ol li.ql-indent-8:before{content:counter(list-8,lower-roman) ". "}.ql-editor ol li.ql-indent-8{counter-reset:list-9}.ql-editor ol li.ql-indent-9{counter-increment:list-9}.ql-editor ol li.ql-indent-9:before{content:counter(list-9,decimal) ". "}.ql-editor .ql-indent-1:not(.ql-direction-rtl){padding-left:3em}.ql-editor li.ql-indent-1:not(.ql-direction-rtl){padding-left:4.5em}.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:3em}.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:4.5em}.ql-editor .ql-indent-2:not(.ql-direction-rtl){padding-left:6em}.ql-editor li.ql-indent-2:not(.ql-direction-rtl){padding-left:7.5em}.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:6em}.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:7.5em}.ql-editor .ql-indent-3:not(.ql-direction-rtl){padding-left:9em}.ql-editor li.ql-indent-3:not(.ql-direction-rtl){padding-left:10.5em}.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:9em}.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:10.5em}.ql-editor .ql-indent-4:not(.ql-direction-rtl){padding-left:12em}.ql-editor li.ql-indent-4:not(.ql-direction-rtl){padding-left:13.5em}.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:12em}.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:13.5em}.ql-editor .ql-indent-5:not(.ql-direction-rtl){padding-left:15em}.ql-editor li.ql-indent-5:not(.ql-direction-rtl){padding-left:16.5em}.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:15em}.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:16.5em}.ql-editor .ql-indent-6:not(.ql-direction-rtl){padding-left:18em}.ql-editor li.ql-indent-6:not(.ql-direction-rtl){padding-left:19.5em}.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:18em}.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:19.5em}.ql-editor .ql-indent-7:not(.ql-direction-rtl){padding-left:21em}.ql-editor li.ql-indent-7:not(.ql-direction-rtl){padding-left:22.5em}.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:21em}.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:22.5em}.ql-editor .ql-indent-8:not(.ql-direction-rtl){padding-left:24em}.ql-editor li.ql-indent-8:not(.ql-direction-rtl){padding-left:25.5em}.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:24em}.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:25.5em}.ql-editor .ql-indent-9:not(.ql-direction-rtl){padding-left:27em}.ql-editor li.ql-indent-9:not(.ql-direction-rtl){padding-left:28.5em}.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:27em}.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:28.5em}.ql-editor .ql-video{display:block;max-width:100%}.ql-editor .ql-video.ql-align-center{margin:0 auto}.ql-editor .ql-video.ql-align-right{margin:0 0 0 auto}.ql-editor .ql-bg-black{background-color:#000}.ql-editor .ql-bg-red{background-color:#e60000}.ql-editor .ql-bg-orange{background-color:#f90}.ql-editor .ql-bg-yellow{background-color:#ff0}.ql-editor .ql-bg-green{background-color:#008a00}.ql-editor .ql-bg-blue{background-color:#06c}.ql-editor .ql-bg-purple{background-color:#93f}.ql-editor .ql-color-white{color:#fff}.ql-editor .ql-color-red{color:#e60000}.ql-editor .ql-color-orange{color:#f90}.ql-editor .ql-color-yellow{color:#ff0}.ql-editor .ql-color-green{color:#008a00}.ql-editor .ql-color-blue{color:#06c}.ql-editor .ql-color-purple{color:#93f}.ql-editor .ql-font-serif{font-family:Georgia,Times New Roman,serif}.ql-editor .ql-font-monospace{font-family:Monaco,Courier New,monospace}.ql-editor .ql-size-small{font-size:.75em}.ql-editor .ql-size-large{font-size:1.5em}.ql-editor .ql-size-huge{font-size:2.5em}.ql-editor .ql-direction-rtl{direction:rtl;text-align:inherit}.ql-editor .ql-align-center{text-align:center}.ql-editor .ql-align-justify{text-align:justify}.ql-editor .ql-align-right{text-align:right}.ql-editor.ql-blank:before{color:#0009;content:attr(data-placeholder);font-style:italic;left:15px;pointer-events:none;position:absolute;right:15px}.ql-snow.ql-toolbar:after,.ql-snow .ql-toolbar:after{clear:both;content:"";display:table}.ql-snow.ql-toolbar button,.ql-snow .ql-toolbar button{background:none;border:none;cursor:pointer;display:inline-block;float:left;height:24px;padding:3px 5px;width:28px}.ql-snow.ql-toolbar button svg,.ql-snow .ql-toolbar button svg{float:left;height:100%}.ql-snow.ql-toolbar button:active:hover,.ql-snow .ql-toolbar button:active:hover{outline:none}.ql-snow.ql-toolbar input.ql-image[type=file],.ql-snow .ql-toolbar input.ql-image[type=file]{display:none}.ql-snow.ql-toolbar button:hover,.ql-snow .ql-toolbar button:hover,.ql-snow.ql-toolbar button:focus,.ql-snow .ql-toolbar button:focus,.ql-snow.ql-toolbar button.ql-active,.ql-snow .ql-toolbar button.ql-active,.ql-snow.ql-toolbar .ql-picker-label:hover,.ql-snow .ql-toolbar .ql-picker-label:hover,.ql-snow.ql-toolbar .ql-picker-label.ql-active,.ql-snow .ql-toolbar .ql-picker-label.ql-active,.ql-snow.ql-toolbar .ql-picker-item:hover,.ql-snow .ql-toolbar .ql-picker-item:hover,.ql-snow.ql-toolbar .ql-picker-item.ql-selected,.ql-snow .ql-toolbar .ql-picker-item.ql-selected{color:#06c}.ql-snow.ql-toolbar button:hover .ql-fill,.ql-snow .ql-toolbar button:hover .ql-fill,.ql-snow.ql-toolbar button:focus .ql-fill,.ql-snow .ql-toolbar button:focus .ql-fill,.ql-snow.ql-toolbar button.ql-active .ql-fill,.ql-snow .ql-toolbar button.ql-active .ql-fill,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-fill,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-fill,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-fill,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-fill,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-fill,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-fill,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-fill,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-fill,.ql-snow.ql-toolbar button:hover .ql-stroke.ql-fill,.ql-snow .ql-toolbar button:hover .ql-stroke.ql-fill,.ql-snow.ql-toolbar button:focus .ql-stroke.ql-fill,.ql-snow .ql-toolbar button:focus .ql-stroke.ql-fill,.ql-snow.ql-toolbar button.ql-active .ql-stroke.ql-fill,.ql-snow .ql-toolbar button.ql-active .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill{fill:#06c}.ql-snow.ql-toolbar button:hover .ql-stroke,.ql-snow .ql-toolbar button:hover .ql-stroke,.ql-snow.ql-toolbar button:focus .ql-stroke,.ql-snow .ql-toolbar button:focus .ql-stroke,.ql-snow.ql-toolbar button.ql-active .ql-stroke,.ql-snow .ql-toolbar button.ql-active .ql-stroke,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke,.ql-snow.ql-toolbar button:hover .ql-stroke-miter,.ql-snow .ql-toolbar button:hover .ql-stroke-miter,.ql-snow.ql-toolbar button:focus .ql-stroke-miter,.ql-snow .ql-toolbar button:focus .ql-stroke-miter,.ql-snow.ql-toolbar button.ql-active .ql-stroke-miter,.ql-snow .ql-toolbar button.ql-active .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter{stroke:#06c}@media(pointer:coarse){.ql-snow.ql-toolbar button:hover:not(.ql-active),.ql-snow .ql-toolbar button:hover:not(.ql-active){color:#444}.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-fill,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-fill,.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill{fill:#444}.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke,.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter{stroke:#444}}.ql-snow,.ql-snow *{box-sizing:border-box}.ql-snow .ql-hidden{display:none}.ql-snow .ql-out-bottom,.ql-snow .ql-out-top{visibility:hidden}.ql-snow .ql-tooltip{position:absolute;transform:translateY(10px)}.ql-snow .ql-tooltip a{cursor:pointer;text-decoration:none}.ql-snow .ql-tooltip.ql-flip{transform:translateY(-10px)}.ql-snow .ql-formats{display:inline-block;vertical-align:middle}.ql-snow .ql-formats:after{clear:both;content:"";display:table}.ql-snow .ql-stroke{fill:none;stroke:#444;stroke-linecap:round;stroke-linejoin:round;stroke-width:2}.ql-snow .ql-stroke-miter{fill:none;stroke:#444;stroke-miterlimit:10;stroke-width:2}.ql-snow .ql-fill,.ql-snow .ql-stroke.ql-fill{fill:#444}.ql-snow .ql-empty{fill:none}.ql-snow .ql-even{fill-rule:evenodd}.ql-snow .ql-thin,.ql-snow .ql-stroke.ql-thin{stroke-width:1}.ql-snow .ql-transparent{opacity:.4}.ql-snow .ql-direction svg:last-child{display:none}.ql-snow .ql-direction.ql-active svg:last-child{display:inline}.ql-snow .ql-direction.ql-active svg:first-child{display:none}.ql-snow .ql-editor h1{font-size:2em}.ql-snow .ql-editor h2{font-size:1.5em}.ql-snow .ql-editor h3{font-size:1.17em}.ql-snow .ql-editor h4{font-size:1em}.ql-snow .ql-editor h5{font-size:.83em}.ql-snow .ql-editor h6{font-size:.67em}.ql-snow .ql-editor a{text-decoration:underline}.ql-snow .ql-editor blockquote{border-left:4px solid #ccc;margin-bottom:5px;margin-top:5px;padding-left:16px}.ql-snow .ql-editor code,.ql-snow .ql-editor pre{background-color:#f0f0f0;border-radius:3px}.ql-snow .ql-editor pre{white-space:pre-wrap;margin-bottom:5px;margin-top:5px;padding:5px 10px}.ql-snow .ql-editor code{font-size:85%;padding:2px 4px}.ql-snow .ql-editor pre.ql-syntax{background-color:#23241f;color:#f8f8f2;overflow:visible}.ql-snow .ql-editor img{max-width:100%}.ql-snow .ql-picker{color:#444;display:inline-block;float:left;font-size:14px;font-weight:500;height:24px;position:relative;vertical-align:middle}.ql-snow .ql-picker-label{cursor:pointer;display:inline-block;height:100%;padding-left:8px;padding-right:2px;position:relative;width:100%}.ql-snow .ql-picker-label:before{display:inline-block;line-height:22px}.ql-snow .ql-picker-options{background-color:#fff;display:none;min-width:100%;padding:4px 8px;position:absolute;white-space:nowrap}.ql-snow .ql-picker-options .ql-picker-item{cursor:pointer;display:block;padding-bottom:5px;padding-top:5px}.ql-snow .ql-picker.ql-expanded .ql-picker-label{color:#ccc;z-index:2}.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-fill{fill:#ccc}.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-stroke{stroke:#ccc}.ql-snow .ql-picker.ql-expanded .ql-picker-options{display:block;margin-top:-1px;top:100%;z-index:1}.ql-snow .ql-color-picker,.ql-snow .ql-icon-picker{width:28px}.ql-snow .ql-color-picker .ql-picker-label,.ql-snow .ql-icon-picker .ql-picker-label{padding:2px 4px}.ql-snow .ql-color-picker .ql-picker-label svg,.ql-snow .ql-icon-picker .ql-picker-label svg{right:4px}.ql-snow .ql-icon-picker .ql-picker-options{padding:4px 0}.ql-snow .ql-icon-picker .ql-picker-item{height:24px;width:24px;padding:2px 4px}.ql-snow .ql-color-picker .ql-picker-options{padding:3px 5px;width:152px}.ql-snow .ql-color-picker .ql-picker-item{border:1px solid transparent;float:left;height:16px;margin:2px;padding:0;width:16px}.ql-snow .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) svg{position:absolute;margin-top:-9px;right:0;top:50%;width:18px}.ql-snow .ql-picker.ql-header .ql-picker-label[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-font .ql-picker-label[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-size .ql-picker-label[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-font .ql-picker-item[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-label]:not([data-label=""]):before{content:attr(data-label)}.ql-snow .ql-picker.ql-header{width:98px}.ql-snow .ql-picker.ql-header .ql-picker-label:before,.ql-snow .ql-picker.ql-header .ql-picker-item:before{content:"Normal"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]:before{content:"Heading 1"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]:before{content:"Heading 2"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]:before{content:"Heading 3"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]:before{content:"Heading 4"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]:before{content:"Heading 5"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]:before{content:"Heading 6"}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]:before{font-size:2em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]:before{font-size:1.5em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]:before{font-size:1.17em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]:before{font-size:1em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]:before{font-size:.83em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]:before{font-size:.67em}.ql-snow .ql-picker.ql-font{width:108px}.ql-snow .ql-picker.ql-font .ql-picker-label:before,.ql-snow .ql-picker.ql-font .ql-picker-item:before{content:"Sans Serif"}.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=serif]:before,.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]:before{content:"Serif"}.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=monospace]:before,.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]:before{content:"Monospace"}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]:before{font-family:Georgia,Times New Roman,serif}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]:before{font-family:Monaco,Courier New,monospace}.ql-snow .ql-picker.ql-size{width:98px}.ql-snow .ql-picker.ql-size .ql-picker-label:before,.ql-snow .ql-picker.ql-size .ql-picker-item:before{content:"Normal"}.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=small]:before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]:before{content:"Small"}.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=large]:before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]:before{content:"Large"}.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=huge]:before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]:before{content:"Huge"}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]:before{font-size:10px}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]:before{font-size:18px}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]:before{font-size:32px}.ql-snow .ql-color-picker.ql-background .ql-picker-item{background-color:#fff}.ql-snow .ql-color-picker.ql-color .ql-picker-item{background-color:#000}.ql-toolbar.ql-snow{border:1px solid #ccc;box-sizing:border-box;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;padding:8px}.ql-toolbar.ql-snow .ql-formats{margin-right:15px}.ql-toolbar.ql-snow .ql-picker-label{border:1px solid transparent}.ql-toolbar.ql-snow .ql-picker-options{border:1px solid transparent;box-shadow:#0003 0 2px 8px}.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-label,.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-options{border-color:#ccc}.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item.ql-selected,.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item:hover{border-color:#000}.ql-toolbar.ql-snow+.ql-container.ql-snow{border-top:0px}.ql-snow .ql-tooltip{background-color:#fff;border:1px solid #ccc;box-shadow:0 0 5px #ddd;color:#444;padding:5px 12px;white-space:nowrap}.ql-snow .ql-tooltip:before{content:"Visit URL:";line-height:26px;margin-right:8px}.ql-snow .ql-tooltip input[type=text]{display:none;border:1px solid #ccc;font-size:13px;height:26px;margin:0;padding:3px 5px;width:170px}.ql-snow .ql-tooltip a.ql-preview{display:inline-block;max-width:200px;overflow-x:hidden;text-overflow:ellipsis;vertical-align:top}.ql-snow .ql-tooltip a.ql-action:after{border-right:1px solid #ccc;content:"Edit";margin-left:16px;padding-right:8px}.ql-snow .ql-tooltip a.ql-remove:before{content:"Remove";margin-left:8px}.ql-snow .ql-tooltip a{line-height:26px}.ql-snow .ql-tooltip.ql-editing a.ql-preview,.ql-snow .ql-tooltip.ql-editing a.ql-remove{display:none}.ql-snow .ql-tooltip.ql-editing input[type=text]{display:inline-block}.ql-snow .ql-tooltip.ql-editing a.ql-action:after{border-right:0px;content:"Save";padding-right:0}.ql-snow .ql-tooltip[data-mode=link]:before{content:"Enter link:"}.ql-snow .ql-tooltip[data-mode=formula]:before{content:"Enter formula:"}.ql-snow .ql-tooltip[data-mode=video]:before{content:"Enter video:"}.ql-snow a{color:#06c}.ql-container.ql-snow{border:1px solid #ccc}/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-content:""}}}@layer theme{:root,:host{--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-red-900:oklch(39.6% .141 25.723);--color-orange-50:oklch(98% .016 73.684);--color-orange-100:oklch(95.4% .038 75.164);--color-orange-200:oklch(90.1% .076 70.697);--color-orange-300:oklch(83.7% .128 66.29);--color-orange-500:oklch(70.5% .213 47.604);--color-orange-600:oklch(64.6% .222 41.116);--color-orange-700:oklch(55.3% .195 38.402);--color-orange-800:oklch(47% .157 37.304);--color-orange-900:oklch(40.8% .123 38.172);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-800:oklch(47.3% .137 46.201);--color-amber-900:oklch(41.4% .112 45.904);--color-yellow-50:oklch(98.7% .026 102.212);--color-yellow-100:oklch(97.3% .071 103.193);--color-yellow-200:oklch(94.5% .129 101.54);--color-yellow-300:oklch(90.5% .182 98.111);--color-yellow-500:oklch(79.5% .184 86.047);--color-yellow-600:oklch(68.1% .162 75.834);--color-yellow-700:oklch(55.4% .135 66.442);--color-yellow-800:oklch(47.6% .114 61.907);--color-lime-500:oklch(76.8% .233 130.85);--color-green-50:oklch(98.2% .018 155.826);--color-green-100:oklch(96.2% .044 156.743);--color-green-200:oklch(92.5% .084 155.995);--color-green-300:oklch(87.1% .15 154.449);--color-green-400:oklch(79.2% .209 151.711);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-green-700:oklch(52.7% .154 150.069);--color-green-800:oklch(44.8% .119 151.328);--color-green-900:oklch(39.3% .095 152.535);--color-emerald-50:oklch(97.9% .021 166.113);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-200:oklch(90.5% .093 164.15);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-700:oklch(50.8% .118 165.612);--color-emerald-800:oklch(43.2% .095 166.913);--color-emerald-900:oklch(37.8% .077 168.94);--color-teal-100:oklch(95.3% .051 180.801);--color-teal-500:oklch(70.4% .14 182.503);--color-teal-600:oklch(60% .118 184.704);--color-teal-700:oklch(51.1% .096 186.391);--color-teal-800:oklch(43.7% .078 188.216);--color-cyan-50:oklch(98.4% .019 200.873);--color-cyan-100:oklch(95.6% .045 203.388);--color-cyan-300:oklch(86.5% .127 207.078);--color-cyan-500:oklch(71.5% .143 215.221);--color-cyan-700:oklch(52% .105 223.128);--color-cyan-800:oklch(45% .085 224.283);--color-sky-50:oklch(97.7% .013 236.62);--color-sky-100:oklch(95.1% .026 236.824);--color-sky-200:oklch(90.1% .058 230.902);--color-sky-500:oklch(68.5% .169 237.323);--color-sky-700:oklch(50% .134 242.749);--color-sky-800:oklch(44.3% .11 240.79);--color-sky-900:oklch(39.1% .09 240.876);--color-sky-950:oklch(29.3% .066 243.157);--color-blue-50:oklch(97% .014 254.604);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-800:oklch(42.4% .199 265.638);--color-blue-900:oklch(37.9% .146 265.522);--color-indigo-50:oklch(96.2% .018 272.314);--color-indigo-100:oklch(93% .034 272.788);--color-indigo-200:oklch(87% .065 274.039);--color-indigo-300:oklch(78.5% .115 274.713);--color-indigo-500:oklch(58.5% .233 277.117);--color-indigo-600:oklch(51.1% .262 276.966);--color-indigo-700:oklch(45.7% .24 277.023);--color-indigo-800:oklch(39.8% .195 277.366);--color-violet-50:oklch(96.9% .016 293.756);--color-violet-100:oklch(94.3% .029 294.588);--color-violet-200:oklch(89.4% .057 293.283);--color-violet-500:oklch(60.6% .25 292.717);--color-violet-700:oklch(49.1% .27 292.581);--color-violet-800:oklch(43.2% .232 292.759);--color-violet-900:oklch(38% .189 293.745);--color-violet-950:oklch(28.3% .141 291.089);--color-purple-50:oklch(97.7% .014 308.299);--color-purple-100:oklch(94.6% .033 307.174);--color-purple-200:oklch(90.2% .063 306.703);--color-purple-300:oklch(82.7% .119 306.383);--color-purple-500:oklch(62.7% .265 303.9);--color-purple-600:oklch(55.8% .288 302.321);--color-purple-700:oklch(49.6% .265 301.924);--color-purple-800:oklch(43.8% .218 303.724);--color-fuchsia-500:oklch(66.7% .295 322.15);--color-pink-100:oklch(94.8% .028 342.258);--color-pink-600:oklch(59.2% .249 .584);--color-pink-800:oklch(45.9% .187 3.815);--color-rose-50:oklch(96.9% .015 12.422);--color-rose-100:oklch(94.1% .03 12.58);--color-rose-200:oklch(89.2% .058 10.001);--color-rose-400:oklch(71.2% .194 13.428);--color-rose-500:oklch(64.5% .246 16.439);--color-rose-700:oklch(51.4% .222 16.935);--color-slate-50:oklch(98.4% .003 247.858);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-slate-950:oklch(12.9% .042 264.695);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-gray-900:oklch(21% .034 264.665);--color-zinc-800:oklch(27.4% .006 286.033);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--container-3xl:48rem;--container-4xl:56rem;--container-5xl:64rem;--container-6xl:72rem;--container-7xl:80rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5 / 2.25);--font-weight-light:300;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--font-weight-black:900;--tracking-tighter:-.05em;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-tight:1.25;--leading-snug:1.375;--leading-normal:1.5;--leading-relaxed:1.625;--radius-xs:.125rem;--radius-2xl:1rem;--radius-3xl:1.5rem;--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--animate-bounce:bounce 1s infinite;--blur-sm:8px;--blur-md:12px;--blur-3xl:64px;--aspect-video:16 / 9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-montserrat);--default-mono-font-family:var(--font-montserrat);--font-montserrat:"Montserrat", sans-serif;--color-border:var(--border);--color-re-red:var(--re-red);--color-re-red-hover:var(--re-red-hover)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}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;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::-moz-placeholder{color:currentColor}::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::-moz-placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border);font-family:var(--font-montserrat);outline-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){*{outline-color:color-mix(in oklab,var(--ring) 50%,transparent)}}body{background-color:var(--background);font-family:var(--font-montserrat);color:var(--foreground)}:where(:not(:has([class*=" text-"]),:not(:has([class^=text-])))) h1{font-size:var(--text-2xl);font-weight:var(--font-weight-medium);line-height:1.5}:where(:not(:has([class*=" text-"]),:not(:has([class^=text-])))) h2{font-size:var(--text-xl);font-weight:var(--font-weight-medium);line-height:1.5}:where(:not(:has([class*=" text-"]),:not(:has([class^=text-])))) h3{font-size:var(--text-lg);font-weight:var(--font-weight-medium);line-height:1.5}:where(:not(:has([class*=" text-"]),:not(:has([class^=text-])))) h4{font-size:var(--text-base);font-weight:var(--font-weight-medium);line-height:1.5}:where(:not(:has([class*=" text-"]),:not(:has([class^=text-])))) p{font-size:var(--text-base);font-weight:var(--font-weight-normal);line-height:1.5}:where(:not(:has([class*=" text-"]),:not(:has([class^=text-])))) label,:where(:not(:has([class*=" text-"]),:not(:has([class^=text-])))) button{font-size:var(--text-base);font-weight:var(--font-weight-medium);line-height:1.5}:where(:not(:has([class*=" text-"]),:not(:has([class^=text-])))) input{font-size:var(--text-base);font-weight:var(--font-weight-normal);line-height:1.5}}@layer components;@layer utilities{.\@container\/card-header{container:card-header/inline-size}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing) * 0)}.inset-x-0{inset-inline:calc(var(--spacing) * 0)}.inset-y-0{inset-block:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.end{inset-inline-end:var(--spacing)}.-top-0\.5{top:calc(var(--spacing) * -.5)}.-top-1{top:calc(var(--spacing) * -1)}.-top-3{top:calc(var(--spacing) * -3)}.-top-12{top:calc(var(--spacing) * -12)}.-top-40{top:calc(var(--spacing) * -40)}.top-0{top:calc(var(--spacing) * 0)}.top-0\.5{top:calc(var(--spacing) * .5)}.top-1\.5{top:calc(var(--spacing) * 1.5)}.top-1\/2{top:50%}.top-2\.5{top:calc(var(--spacing) * 2.5)}.top-3\.5{top:calc(var(--spacing) * 3.5)}.top-4{top:calc(var(--spacing) * 4)}.top-6{top:calc(var(--spacing) * 6)}.top-10{top:calc(var(--spacing) * 10)}.top-\[1px\]{top:1px}.top-\[50\%\]{top:50%}.top-\[60\%\]{top:60%}.top-full{top:100%}.-right-0\.5{right:calc(var(--spacing) * -.5)}.-right-1{right:calc(var(--spacing) * -1)}.-right-3{right:calc(var(--spacing) * -3)}.-right-12{right:calc(var(--spacing) * -12)}.-right-40{right:calc(var(--spacing) * -40)}.right-0{right:calc(var(--spacing) * 0)}.right-0\.5{right:calc(var(--spacing) * .5)}.right-1{right:calc(var(--spacing) * 1)}.right-2{right:calc(var(--spacing) * 2)}.right-2\.5{right:calc(var(--spacing) * 2.5)}.right-3{right:calc(var(--spacing) * 3)}.right-4{right:calc(var(--spacing) * 4)}.-bottom-12{bottom:calc(var(--spacing) * -12)}.-bottom-40{bottom:calc(var(--spacing) * -40)}.bottom-0{bottom:calc(var(--spacing) * 0)}.bottom-0\.5{bottom:calc(var(--spacing) * .5)}.bottom-12{bottom:calc(var(--spacing) * 12)}.bottom-\[-1px\]{bottom:-1px}.bottom-\[-24px\]{bottom:-24px}.bottom-full{bottom:100%}.-left-12{left:calc(var(--spacing) * -12)}.-left-40{left:calc(var(--spacing) * -40)}.left-0{left:calc(var(--spacing) * 0)}.left-1{left:calc(var(--spacing) * 1)}.left-1\/2{left:50%}.left-2{left:calc(var(--spacing) * 2)}.left-2\.5{left:calc(var(--spacing) * 2.5)}.left-3{left:calc(var(--spacing) * 3)}.left-4{left:calc(var(--spacing) * 4)}.left-\[50\%\]{left:50%}.isolate{isolation:isolate}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\[1\]{z-index:1}.z-\[100\]{z-index:100}.z-\[9999\]{z-index:9999}.order-1{order:1}.order-2{order:2}.col-span-1{grid-column:span 1/span 1}.col-span-2{grid-column:span 2/span 2}.col-span-3{grid-column:span 3/span 3}.col-span-4{grid-column:span 4/span 4}.col-span-5{grid-column:span 5/span 5}.col-span-6{grid-column:span 6/span 6}.col-span-full{grid-column:1/-1}.col-start-2{grid-column-start:2}.row-span-2{grid-row:span 2/span 2}.row-start-1{grid-row-start:1}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.-mx-1{margin-inline:calc(var(--spacing) * -1)}.-mx-4{margin-inline:calc(var(--spacing) * -4)}.-mx-6{margin-inline:calc(var(--spacing) * -6)}.mx-1{margin-inline:calc(var(--spacing) * 1)}.mx-2{margin-inline:calc(var(--spacing) * 2)}.mx-3\.5{margin-inline:calc(var(--spacing) * 3.5)}.mx-auto{margin-inline:auto}.my-0\.5{margin-block:calc(var(--spacing) * .5)}.my-1{margin-block:calc(var(--spacing) * 1)}.my-4{margin-block:calc(var(--spacing) * 4)}.my-8{margin-block:calc(var(--spacing) * 8)}.-mt-4{margin-top:calc(var(--spacing) * -4)}.mt-0{margin-top:calc(var(--spacing) * 0)}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mt-8{margin-top:calc(var(--spacing) * 8)}.mt-10{margin-top:calc(var(--spacing) * 10)}.mt-auto{margin-top:auto}.mr-1{margin-right:calc(var(--spacing) * 1)}.mr-1\.5{margin-right:calc(var(--spacing) * 1.5)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mr-3{margin-right:calc(var(--spacing) * 3)}.-mb-6{margin-bottom:calc(var(--spacing) * -6)}.mb-0\.5{margin-bottom:calc(var(--spacing) * .5)}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.mb-7{margin-bottom:calc(var(--spacing) * 7)}.mb-8{margin-bottom:calc(var(--spacing) * 8)}.mb-10{margin-bottom:calc(var(--spacing) * 10)}.mb-12{margin-bottom:calc(var(--spacing) * 12)}.-ml-4{margin-left:calc(var(--spacing) * -4)}.ml-1{margin-left:calc(var(--spacing) * 1)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-3{margin-left:calc(var(--spacing) * 3)}.ml-4{margin-left:calc(var(--spacing) * 4)}.ml-5{margin-left:calc(var(--spacing) * 5)}.ml-6{margin-left:calc(var(--spacing) * 6)}.ml-8{margin-left:calc(var(--spacing) * 8)}.ml-9{margin-left:calc(var(--spacing) * 9)}.ml-11{margin-left:calc(var(--spacing) * 11)}.ml-auto{margin-left:auto}.line-clamp-1{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-row{display:table-row}.field-sizing-content{field-sizing:content}.aspect-square{aspect-ratio:1}.aspect-video{aspect-ratio:var(--aspect-video)}.size-2{width:calc(var(--spacing) * 2);height:calc(var(--spacing) * 2)}.size-2\.5{width:calc(var(--spacing) * 2.5);height:calc(var(--spacing) * 2.5)}.size-3{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.size-3\.5{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-7{width:calc(var(--spacing) * 7);height:calc(var(--spacing) * 7)}.size-8{width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8)}.size-9{width:calc(var(--spacing) * 9);height:calc(var(--spacing) * 9)}.size-10{width:calc(var(--spacing) * 10);height:calc(var(--spacing) * 10)}.size-12{width:calc(var(--spacing) * 12);height:calc(var(--spacing) * 12)}.size-full{width:100%;height:100%}.h-0\.5{height:calc(var(--spacing) * .5)}.h-1{height:calc(var(--spacing) * 1)}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-4\.5{height:calc(var(--spacing) * 4.5)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-11{height:calc(var(--spacing) * 11)}.h-12{height:calc(var(--spacing) * 12)}.h-14{height:calc(var(--spacing) * 14)}.h-16{height:calc(var(--spacing) * 16)}.h-20{height:calc(var(--spacing) * 20)}.h-32{height:calc(var(--spacing) * 32)}.h-40{height:calc(var(--spacing) * 40)}.h-48{height:calc(var(--spacing) * 48)}.h-64{height:calc(var(--spacing) * 64)}.h-80{height:calc(var(--spacing) * 80)}.h-96{height:calc(var(--spacing) * 96)}.h-\[1\.15rem\]{height:1.15rem}.h-\[30rem\]{height:30rem}.h-\[44px\]{height:44px}.h-\[70vh\]{height:70vh}.h-\[85vh\]{height:85vh}.h-\[90vh\]{height:90vh}.h-\[400px\]{height:400px}.h-\[calc\(100\%-1px\)\]{height:calc(100% - 1px)}.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}.h-svh{height:100svh}.max-h-\(--radix-context-menu-content-available-height\){max-height:var(--radix-context-menu-content-available-height)}.max-h-\(--radix-dropdown-menu-content-available-height\){max-height:var(--radix-dropdown-menu-content-available-height)}.max-h-\(--radix-select-content-available-height\){max-height:var(--radix-select-content-available-height)}.max-h-10{max-height:calc(var(--spacing) * 10)}.max-h-14{max-height:calc(var(--spacing) * 14)}.max-h-40{max-height:calc(var(--spacing) * 40)}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-56{max-height:calc(var(--spacing) * 56)}.max-h-60{max-height:calc(var(--spacing) * 60)}.max-h-64{max-height:calc(var(--spacing) * 64)}.max-h-72{max-height:calc(var(--spacing) * 72)}.max-h-96{max-height:calc(var(--spacing) * 96)}.max-h-\[70vh\]{max-height:70vh}.max-h-\[85vh\]{max-height:85vh}.max-h-\[90vh\]{max-height:90vh}.max-h-\[95vh\]{max-height:95vh}.max-h-\[250px\]{max-height:250px}.max-h-\[300px\]{max-height:300px}.max-h-\[600px\]{max-height:600px}.max-h-\[800px\]{max-height:800px}.max-h-full{max-height:100%}.min-h-0{min-height:calc(var(--spacing) * 0)}.min-h-4{min-height:calc(var(--spacing) * 4)}.min-h-16{min-height:calc(var(--spacing) * 16)}.min-h-\[32px\]{min-height:32px}.min-h-\[44px\]{min-height:44px}.min-h-\[60px\]{min-height:60px}.min-h-\[60vh\]{min-height:60vh}.min-h-\[80px\]{min-height:80px}.min-h-\[96px\]{min-height:96px}.min-h-\[100px\]{min-height:100px}.min-h-\[120px\]{min-height:120px}.min-h-\[150px\]{min-height:150px}.min-h-\[320px\]{min-height:320px}.min-h-\[400px\]{min-height:400px}.min-h-\[420px\]{min-height:420px}.min-h-\[480px\]{min-height:480px}.min-h-\[600px\]{min-height:600px}.min-h-screen{min-height:100vh}.min-h-svh{min-height:100svh}.\!w-\[80vw\]{width:80vw!important}.w-\(--sidebar-width\){width:var(--sidebar-width)}.w-0{width:calc(var(--spacing) * 0)}.w-0\.5{width:calc(var(--spacing) * .5)}.w-1{width:calc(var(--spacing) * 1)}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-2{width:calc(var(--spacing) * 2)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-3\/4{width:75%}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-10{width:calc(var(--spacing) * 10)}.w-12{width:calc(var(--spacing) * 12)}.w-14{width:calc(var(--spacing) * 14)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-24{width:calc(var(--spacing) * 24)}.w-32{width:calc(var(--spacing) * 32)}.w-40{width:calc(var(--spacing) * 40)}.w-44{width:calc(var(--spacing) * 44)}.w-48{width:calc(var(--spacing) * 48)}.w-56{width:calc(var(--spacing) * 56)}.w-64{width:calc(var(--spacing) * 64)}.w-72{width:calc(var(--spacing) * 72)}.w-80{width:calc(var(--spacing) * 80)}.w-\[10\%\]{width:10%}.w-\[15\%\]{width:15%}.w-\[20\%\]{width:20%}.w-\[35\%\]{width:35%}.w-\[45\%\]{width:45%}.w-\[50px\]{width:50px}.w-\[100px\]{width:100px}.w-\[180px\]{width:180px}.w-\[200px\]{width:200px}.w-\[280px\]{width:280px}.w-\[360px\]{width:360px}.w-\[calc\(100\%-2rem\)\]{width:calc(100% - 2rem)}.w-\[var\(--radix-select-trigger-width\)\]{width:var(--radix-select-trigger-width)}.w-auto{width:auto}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.w-px{width:1px}.\!max-w-\[80vw\]{max-width:80vw!important}.max-w-\(--skeleton-width\){max-width:var(--skeleton-width)}.max-w-2xl{max-width:var(--container-2xl)}.max-w-3xl{max-width:var(--container-3xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-5xl{max-width:var(--container-5xl)}.max-w-6xl{max-width:var(--container-6xl)}.max-w-7xl{max-width:var(--container-7xl)}.max-w-\[8rem\]{max-width:8rem}.max-w-\[90vw\]{max-width:90vw}.max-w-\[95vw\]{max-width:95vw}.max-w-\[140px\]{max-width:140px}.max-w-\[150px\]{max-width:150px}.max-w-\[200px\]{max-width:200px}.max-w-\[220px\]{max-width:220px}.max-w-\[250px\]{max-width:250px}.max-w-\[260px\]{max-width:260px}.max-w-\[360px\]{max-width:360px}.max-w-\[1240px\]{max-width:1240px}.max-w-\[1600px\]{max-width:1600px}.max-w-\[calc\(100\%-2rem\)\]{max-width:calc(100% - 2rem)}.max-w-\[min\(85\%\,36rem\)\]{max-width:min(85%,36rem)}.max-w-\[min\(100\%\,42rem\)\]{max-width:min(100%,42rem)}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.max-w-max{max-width:-moz-max-content;max-width:max-content}.max-w-md{max-width:var(--container-md)}.max-w-none{max-width:none}.max-w-sm{max-width:var(--container-sm)}.max-w-xl{max-width:var(--container-xl)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-5{min-width:calc(var(--spacing) * 5)}.min-w-8{min-width:calc(var(--spacing) * 8)}.min-w-9{min-width:calc(var(--spacing) * 9)}.min-w-10{min-width:calc(var(--spacing) * 10)}.min-w-\[8rem\]{min-width:8rem}.min-w-\[12rem\]{min-width:12rem}.min-w-\[60px\]{min-width:60px}.min-w-\[80px\]{min-width:80px}.min-w-\[100px\]{min-width:100px}.min-w-\[120px\]{min-width:120px}.min-w-\[140px\]{min-width:140px}.min-w-\[150px\]{min-width:150px}.min-w-\[180px\]{min-width:180px}.min-w-\[200px\]{min-width:200px}.min-w-\[300px\]{min-width:300px}.min-w-\[900px\]{min-width:900px}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.min-w-full{min-width:100%}.flex-1{flex:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow,.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}.origin-\(--radix-context-menu-content-transform-origin\){transform-origin:var(--radix-context-menu-content-transform-origin)}.origin-\(--radix-dropdown-menu-content-transform-origin\){transform-origin:var(--radix-dropdown-menu-content-transform-origin)}.origin-\(--radix-hover-card-content-transform-origin\){transform-origin:var(--radix-hover-card-content-transform-origin)}.origin-\(--radix-menubar-content-transform-origin\){transform-origin:var(--radix-menubar-content-transform-origin)}.origin-\(--radix-popover-content-transform-origin\){transform-origin:var(--radix-popover-content-transform-origin)}.origin-\(--radix-select-content-transform-origin\){transform-origin:var(--radix-select-content-transform-origin)}.origin-\(--radix-tooltip-content-transform-origin\){transform-origin:var(--radix-tooltip-content-transform-origin)}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-x-px{--tw-translate-x:-1px;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-\[-50\%\]{--tw-translate-x:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-px{--tw-translate-x:1px;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-0\.5{--tw-translate-y:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\[-50\%\]{--tw-translate-y:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\[calc\(-50\%_-_2px\)\]{--tw-translate-y: calc(-50% - 2px) ;translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-45{rotate:45deg}.rotate-90{rotate:90deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-\[loading_1\.5s_infinite_linear\]{animation:1.5s linear infinite loading}.animate-bounce{animation:var(--animate-bounce)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-help{cursor:help}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.resize-none{resize:none}.resize-y{resize:vertical}.scroll-my-1{scroll-margin-block:calc(var(--spacing) * 1)}.scroll-py-1{scroll-padding-block:calc(var(--spacing) * 1)}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.\[appearance\:textfield\]{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.auto-rows-min{grid-auto-rows:min-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-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.grid-cols-\[0_1fr\]{grid-template-columns:0 1fr}.grid-rows-\[auto_auto\]{grid-template-rows:auto auto}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.justify-items-start{justify-items:start}.gap-0{gap:calc(var(--spacing) * 0)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-8{gap:calc(var(--spacing) * 8)}.gap-10{gap:calc(var(--spacing) * 10)}.gap-12{gap:calc(var(--spacing) * 12)}:where(.space-y-0>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 0) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 0) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 8) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 8) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-10>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 10) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 10) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-2{-moz-column-gap:calc(var(--spacing) * 2);column-gap:calc(var(--spacing) * 2)}.gap-x-3{-moz-column-gap:calc(var(--spacing) * 3);column-gap:calc(var(--spacing) * 3)}.gap-x-6{-moz-column-gap:calc(var(--spacing) * 6);column-gap:calc(var(--spacing) * 6)}.gap-x-8{-moz-column-gap:calc(var(--spacing) * 8);column-gap:calc(var(--spacing) * 8)}.gap-x-10{-moz-column-gap:calc(var(--spacing) * 10);column-gap:calc(var(--spacing) * 10)}:where(.-space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * -2) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * -2) * calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-1>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * 1) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * 2) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-3>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * 3) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-4>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * 4) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-x-reverse)))}.gap-y-0\.5{row-gap:calc(var(--spacing) * .5)}.gap-y-1\.5{row-gap:calc(var(--spacing) * 1.5)}.gap-y-3{row-gap:calc(var(--spacing) * 3)}.gap-y-4{row-gap:calc(var(--spacing) * 4)}.gap-y-6{row-gap:calc(var(--spacing) * 6)}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-gray-100>:not(:last-child)){border-color:var(--color-gray-100)}:where(.divide-slate-50>:not(:last-child)){border-color:var(--color-slate-50)}:where(.divide-slate-100>:not(:last-child)){border-color:var(--color-slate-100)}.self-center{align-self:center}.self-start{align-self:flex-start}.self-stretch{align-self:stretch}.justify-self-end{justify-self:flex-end}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-3xl{border-radius:var(--radius-3xl)}.rounded-\[2px\]{border-radius:2px}.rounded-\[4px\]{border-radius:4px}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-none{border-radius:0}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:calc(var(--radius) + 4px)}.rounded-xs{border-radius:var(--radius-xs)}.rounded-t-lg{border-top-left-radius:var(--radius);border-top-right-radius:var(--radius)}.rounded-tl-none{border-top-left-radius:0}.rounded-tl-sm{border-top-left-radius:calc(var(--radius) - 4px)}.rounded-r-md{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.rounded-tr-none{border-top-right-radius:0}.rounded-b-lg{border-bottom-right-radius:var(--radius);border-bottom-left-radius:var(--radius)}.rounded-bl{border-bottom-left-radius:.25rem}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-4{border-style:var(--tw-border-style);border-width:4px}.border-8{border-style:var(--tw-border-style);border-width:8px}.border-\[1\.5px\]{border-style:var(--tw-border-style);border-width:1.5px}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-0{border-top-style:var(--tw-border-style);border-top-width:0}.border-t-2{border-top-style:var(--tw-border-style);border-top-width:2px}.border-t-4{border-top-style:var(--tw-border-style);border-top-width:4px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-b-4{border-bottom-style:var(--tw-border-style);border-bottom-width:4px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-none{--tw-border-style:none;border-style:none}.border-\(--color-border\){border-color:var(--color-border)}.border-\[\#cccccc\]{border-color:#ccc}.border-amber-300{border-color:var(--color-amber-300)}.border-blue-100{border-color:var(--color-blue-100)}.border-blue-200{border-color:var(--color-blue-200)}.border-blue-300{border-color:var(--color-blue-300)}.border-blue-400{border-color:var(--color-blue-400)}.border-blue-500{border-color:var(--color-blue-500)}.border-blue-600{border-color:var(--color-blue-600)}.border-blue-700{border-color:var(--color-blue-700)}.border-border,.border-border\/50{border-color:var(--border)}@supports (color:color-mix(in lab,red,red)){.border-border\/50{border-color:color-mix(in oklab,var(--border) 50%,transparent)}}.border-cyan-300{border-color:var(--color-cyan-300)}.border-emerald-100{border-color:var(--color-emerald-100)}.border-emerald-200{border-color:var(--color-emerald-200)}.border-emerald-400{border-color:var(--color-emerald-400)}.border-gray-100{border-color:var(--color-gray-100)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-green-100{border-color:var(--color-green-100)}.border-green-200{border-color:var(--color-green-200)}.border-green-300{border-color:var(--color-green-300)}.border-green-400{border-color:var(--color-green-400)}.border-green-500{border-color:var(--color-green-500)}.border-green-600{border-color:var(--color-green-600)}.border-indigo-200{border-color:var(--color-indigo-200)}.border-indigo-300{border-color:var(--color-indigo-300)}.border-input{border-color:var(--input)}.border-orange-200{border-color:var(--color-orange-200)}.border-orange-300{border-color:var(--color-orange-300)}.border-primary{border-color:var(--primary)}.border-purple-100{border-color:var(--color-purple-100)}.border-purple-200{border-color:var(--color-purple-200)}.border-purple-300{border-color:var(--color-purple-300)}.border-re-red{border-color:var(--re-red)}.border-red-50{border-color:var(--color-red-50)}.border-red-100{border-color:var(--color-red-100)}.border-red-100\/50{border-color:#ffe2e280}@supports (color:color-mix(in lab,red,red)){.border-red-100\/50{border-color:color-mix(in oklab,var(--color-red-100) 50%,transparent)}}.border-red-200{border-color:var(--color-red-200)}.border-red-300{border-color:var(--color-red-300)}.border-red-400{border-color:var(--color-red-400)}.border-red-500{border-color:var(--color-red-500)}.border-red-600{border-color:var(--color-red-600)}.border-rose-100{border-color:var(--color-rose-100)}.border-rose-200{border-color:var(--color-rose-200)}.border-sidebar-border{border-color:var(--sidebar-border)}.border-sky-200{border-color:var(--color-sky-200)}.border-slate-50{border-color:var(--color-slate-50)}.border-slate-100{border-color:var(--color-slate-100)}.border-slate-200{border-color:var(--color-slate-200)}.border-slate-200\/50{border-color:#e2e8f080}@supports (color:color-mix(in lab,red,red)){.border-slate-200\/50{border-color:color-mix(in oklab,var(--color-slate-200) 50%,transparent)}}.border-slate-200\/90{border-color:#e2e8f0e6}@supports (color:color-mix(in lab,red,red)){.border-slate-200\/90{border-color:color-mix(in oklab,var(--color-slate-200) 90%,transparent)}}.border-slate-300{border-color:var(--color-slate-300)}.border-slate-400{border-color:var(--color-slate-400)}.border-slate-700{border-color:var(--color-slate-700)}.border-slate-700\/50{border-color:#31415880}@supports (color:color-mix(in lab,red,red)){.border-slate-700\/50{border-color:color-mix(in oklab,var(--color-slate-700) 50%,transparent)}}.border-slate-800{border-color:var(--color-slate-800)}.border-teal-500{border-color:var(--color-teal-500)}.border-transparent{border-color:#0000}.border-violet-200{border-color:var(--color-violet-200)}.border-white{border-color:var(--color-white)}.border-white\/10{border-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.border-white\/10{border-color:color-mix(in oklab,var(--color-white) 10%,transparent)}}.border-white\/30{border-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.border-white\/30{border-color:color-mix(in oklab,var(--color-white) 30%,transparent)}}.border-yellow-200{border-color:var(--color-yellow-200)}.border-yellow-300{border-color:var(--color-yellow-300)}.border-t-slate-900{border-top-color:var(--color-slate-900)}.border-t-transparent{border-top-color:#0000}.border-t-white{border-top-color:var(--color-white)}.border-l-green-500{border-left-color:var(--color-green-500)}.border-l-re-red{border-left-color:var(--re-red)}.border-l-red-500{border-left-color:var(--color-red-500)}.border-l-transparent{border-left-color:#0000}.bg-\(--color-bg\){background-color:var(--color-bg)}.bg-accent{background-color:var(--accent)}.bg-amber-50{background-color:var(--color-amber-50)}.bg-amber-100{background-color:var(--color-amber-100)}.bg-amber-200{background-color:var(--color-amber-200)}.bg-amber-600{background-color:var(--color-amber-600)}.bg-background{background-color:var(--background)}.bg-black{background-color:var(--color-black)}.bg-black\/20{background-color:#0003}@supports (color:color-mix(in lab,red,red)){.bg-black\/20{background-color:color-mix(in oklab,var(--color-black) 20%,transparent)}}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\/50{background-color:color-mix(in oklab,var(--color-black) 50%,transparent)}}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-50\/30{background-color:#eff6ff4d}@supports (color:color-mix(in lab,red,red)){.bg-blue-50\/30{background-color:color-mix(in oklab,var(--color-blue-50) 30%,transparent)}}.bg-blue-50\/50{background-color:#eff6ff80}@supports (color:color-mix(in lab,red,red)){.bg-blue-50\/50{background-color:color-mix(in oklab,var(--color-blue-50) 50%,transparent)}}.bg-blue-100{background-color:var(--color-blue-100)}.bg-blue-200{background-color:var(--color-blue-200)}.bg-blue-300{background-color:var(--color-blue-300)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-blue-600{background-color:var(--color-blue-600)}.bg-border{background-color:var(--border)}.bg-card{background-color:var(--card)}.bg-current{background-color:currentColor}.bg-cyan-100{background-color:var(--color-cyan-100)}.bg-cyan-500{background-color:var(--color-cyan-500)}.bg-destructive{background-color:var(--destructive)}.bg-emerald-50{background-color:var(--color-emerald-50)}.bg-emerald-50\/40{background-color:#ecfdf566}@supports (color:color-mix(in lab,red,red)){.bg-emerald-50\/40{background-color:color-mix(in oklab,var(--color-emerald-50) 40%,transparent)}}.bg-emerald-50\/90{background-color:#ecfdf5e6}@supports (color:color-mix(in lab,red,red)){.bg-emerald-50\/90{background-color:color-mix(in oklab,var(--color-emerald-50) 90%,transparent)}}.bg-emerald-100{background-color:var(--color-emerald-100)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-emerald-500\/20{background-color:#00bb7f33}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/20{background-color:color-mix(in oklab,var(--color-emerald-500) 20%,transparent)}}.bg-emerald-600{background-color:var(--color-emerald-600)}.bg-foreground{background-color:var(--foreground)}.bg-fuchsia-500{background-color:var(--color-fuchsia-500)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-900{background-color:var(--color-gray-900)}.bg-green-50{background-color:var(--color-green-50)}.bg-green-50\/30{background-color:#f0fdf44d}@supports (color:color-mix(in lab,red,red)){.bg-green-50\/30{background-color:color-mix(in oklab,var(--color-green-50) 30%,transparent)}}.bg-green-50\/50{background-color:#f0fdf480}@supports (color:color-mix(in lab,red,red)){.bg-green-50\/50{background-color:color-mix(in oklab,var(--color-green-50) 50%,transparent)}}.bg-green-100{background-color:var(--color-green-100)}.bg-green-200{background-color:var(--color-green-200)}.bg-green-300{background-color:var(--color-green-300)}.bg-green-500{background-color:var(--color-green-500)}.bg-green-500\/30{background-color:#00c7584d}@supports (color:color-mix(in lab,red,red)){.bg-green-500\/30{background-color:color-mix(in oklab,var(--color-green-500) 30%,transparent)}}.bg-green-600{background-color:var(--color-green-600)}.bg-green-700{background-color:var(--color-green-700)}.bg-indigo-50{background-color:var(--color-indigo-50)}.bg-indigo-100{background-color:var(--color-indigo-100)}.bg-indigo-500{background-color:var(--color-indigo-500)}.bg-indigo-600{background-color:var(--color-indigo-600)}.bg-input-background{background-color:var(--input-background)}.bg-lime-500{background-color:var(--color-lime-500)}.bg-muted,.bg-muted\/50{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.bg-muted\/50{background-color:color-mix(in oklab,var(--muted) 50%,transparent)}}.bg-orange-50{background-color:var(--color-orange-50)}.bg-orange-50\/30{background-color:#fff7ed4d}@supports (color:color-mix(in lab,red,red)){.bg-orange-50\/30{background-color:color-mix(in oklab,var(--color-orange-50) 30%,transparent)}}.bg-orange-100{background-color:var(--color-orange-100)}.bg-orange-500{background-color:var(--color-orange-500)}.bg-orange-600{background-color:var(--color-orange-600)}.bg-pink-100{background-color:var(--color-pink-100)}.bg-pink-600{background-color:var(--color-pink-600)}.bg-popover{background-color:var(--popover)}.bg-primary{background-color:var(--primary)}.bg-primary-600{background-color:var(--primary-600)}.bg-primary\/20{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.bg-primary\/20{background-color:color-mix(in oklab,var(--primary) 20%,transparent)}}.bg-purple-50{background-color:var(--color-purple-50)}.bg-purple-100{background-color:var(--color-purple-100)}.bg-purple-500{background-color:var(--color-purple-500)}.bg-purple-600{background-color:var(--color-purple-600)}.bg-re-black{background-color:var(--re-black)}.bg-re-red,.bg-re-red\/10{background-color:var(--re-red)}@supports (color:color-mix(in lab,red,red)){.bg-re-red\/10{background-color:color-mix(in oklab,var(--re-red) 10%,transparent)}}.bg-re-red\/20{background-color:var(--re-red)}@supports (color:color-mix(in lab,red,red)){.bg-re-red\/20{background-color:color-mix(in oklab,var(--re-red) 20%,transparent)}}.bg-red-50{background-color:var(--color-red-50)}.bg-red-50\/20{background-color:#fef2f233}@supports (color:color-mix(in lab,red,red)){.bg-red-50\/20{background-color:color-mix(in oklab,var(--color-red-50) 20%,transparent)}}.bg-red-50\/30{background-color:#fef2f24d}@supports (color:color-mix(in lab,red,red)){.bg-red-50\/30{background-color:color-mix(in oklab,var(--color-red-50) 30%,transparent)}}.bg-red-50\/40{background-color:#fef2f266}@supports (color:color-mix(in lab,red,red)){.bg-red-50\/40{background-color:color-mix(in oklab,var(--color-red-50) 40%,transparent)}}.bg-red-50\/50{background-color:#fef2f280}@supports (color:color-mix(in lab,red,red)){.bg-red-50\/50{background-color:color-mix(in oklab,var(--color-red-50) 50%,transparent)}}.bg-red-50\/80{background-color:#fef2f2cc}@supports (color:color-mix(in lab,red,red)){.bg-red-50\/80{background-color:color-mix(in oklab,var(--color-red-50) 80%,transparent)}}.bg-red-50\/90{background-color:#fef2f2e6}@supports (color:color-mix(in lab,red,red)){.bg-red-50\/90{background-color:color-mix(in oklab,var(--color-red-50) 90%,transparent)}}.bg-red-100{background-color:var(--color-red-100)}.bg-red-400{background-color:var(--color-red-400)}.bg-red-500{background-color:var(--color-red-500)}.bg-red-500\/20{background-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/20{background-color:color-mix(in oklab,var(--color-red-500) 20%,transparent)}}.bg-red-600{background-color:var(--color-red-600)}.bg-red-600\/20{background-color:#e4001433}@supports (color:color-mix(in lab,red,red)){.bg-red-600\/20{background-color:color-mix(in oklab,var(--color-red-600) 20%,transparent)}}.bg-red-700{background-color:var(--color-red-700)}.bg-red-700\/15{background-color:#bf000f26}@supports (color:color-mix(in lab,red,red)){.bg-red-700\/15{background-color:color-mix(in oklab,var(--color-red-700) 15%,transparent)}}.bg-rose-50{background-color:var(--color-rose-50)}.bg-rose-100{background-color:var(--color-rose-100)}.bg-rose-500\/20{background-color:#ff235733}@supports (color:color-mix(in lab,red,red)){.bg-rose-500\/20{background-color:color-mix(in oklab,var(--color-rose-500) 20%,transparent)}}.bg-secondary{background-color:var(--secondary)}.bg-sidebar{background-color:var(--sidebar)}.bg-sidebar-border{background-color:var(--sidebar-border)}.bg-sky-50{background-color:var(--color-sky-50)}.bg-sky-50\/80{background-color:#f0f9ffcc}@supports (color:color-mix(in lab,red,red)){.bg-sky-50\/80{background-color:color-mix(in oklab,var(--color-sky-50) 80%,transparent)}}.bg-sky-50\/90{background-color:#f0f9ffe6}@supports (color:color-mix(in lab,red,red)){.bg-sky-50\/90{background-color:color-mix(in oklab,var(--color-sky-50) 90%,transparent)}}.bg-sky-100{background-color:var(--color-sky-100)}.bg-sky-500{background-color:var(--color-sky-500)}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-50\/30{background-color:#f8fafc4d}@supports (color:color-mix(in lab,red,red)){.bg-slate-50\/30{background-color:color-mix(in oklab,var(--color-slate-50) 30%,transparent)}}.bg-slate-50\/40{background-color:#f8fafc66}@supports (color:color-mix(in lab,red,red)){.bg-slate-50\/40{background-color:color-mix(in oklab,var(--color-slate-50) 40%,transparent)}}.bg-slate-50\/50{background-color:#f8fafc80}@supports (color:color-mix(in lab,red,red)){.bg-slate-50\/50{background-color:color-mix(in oklab,var(--color-slate-50) 50%,transparent)}}.bg-slate-50\/80{background-color:#f8fafccc}@supports (color:color-mix(in lab,red,red)){.bg-slate-50\/80{background-color:color-mix(in oklab,var(--color-slate-50) 80%,transparent)}}.bg-slate-50\/95{background-color:#f8fafcf2}@supports (color:color-mix(in lab,red,red)){.bg-slate-50\/95{background-color:color-mix(in oklab,var(--color-slate-50) 95%,transparent)}}.bg-slate-100{background-color:var(--color-slate-100)}.bg-slate-100\/80{background-color:#f1f5f9cc}@supports (color:color-mix(in lab,red,red)){.bg-slate-100\/80{background-color:color-mix(in oklab,var(--color-slate-100) 80%,transparent)}}.bg-slate-200{background-color:var(--color-slate-200)}.bg-slate-200\/70{background-color:#e2e8f0b3}@supports (color:color-mix(in lab,red,red)){.bg-slate-200\/70{background-color:color-mix(in oklab,var(--color-slate-200) 70%,transparent)}}.bg-slate-300{background-color:var(--color-slate-300)}.bg-slate-400{background-color:var(--color-slate-400)}.bg-slate-500{background-color:var(--color-slate-500)}.bg-slate-600{background-color:var(--color-slate-600)}.bg-slate-700{background-color:var(--color-slate-700)}.bg-slate-700\/50{background-color:#31415880}@supports (color:color-mix(in lab,red,red)){.bg-slate-700\/50{background-color:color-mix(in oklab,var(--color-slate-700) 50%,transparent)}}.bg-slate-800{background-color:var(--color-slate-800)}.bg-slate-800\/50{background-color:#1d293d80}@supports (color:color-mix(in lab,red,red)){.bg-slate-800\/50{background-color:color-mix(in oklab,var(--color-slate-800) 50%,transparent)}}.bg-slate-900{background-color:var(--color-slate-900)}.bg-slate-900\/5{background-color:#0f172b0d}@supports (color:color-mix(in lab,red,red)){.bg-slate-900\/5{background-color:color-mix(in oklab,var(--color-slate-900) 5%,transparent)}}.bg-slate-900\/20{background-color:#0f172b33}@supports (color:color-mix(in lab,red,red)){.bg-slate-900\/20{background-color:color-mix(in oklab,var(--color-slate-900) 20%,transparent)}}.bg-slate-950{background-color:var(--color-slate-950)}.bg-teal-100{background-color:var(--color-teal-100)}.bg-teal-500{background-color:var(--color-teal-500)}.bg-teal-600{background-color:var(--color-teal-600)}.bg-transparent{background-color:#0000}.bg-violet-50\/80{background-color:#f5f3ffcc}@supports (color:color-mix(in lab,red,red)){.bg-violet-50\/80{background-color:color-mix(in oklab,var(--color-violet-50) 80%,transparent)}}.bg-violet-50\/90{background-color:#f5f3ffe6}@supports (color:color-mix(in lab,red,red)){.bg-violet-50\/90{background-color:color-mix(in oklab,var(--color-violet-50) 90%,transparent)}}.bg-violet-100{background-color:var(--color-violet-100)}.bg-violet-500{background-color:var(--color-violet-500)}.bg-white{background-color:var(--color-white)}.bg-white\/5{background-color:#ffffff0d}@supports (color:color-mix(in lab,red,red)){.bg-white\/5{background-color:color-mix(in oklab,var(--color-white) 5%,transparent)}}.bg-white\/10{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.bg-white\/10{background-color:color-mix(in oklab,var(--color-white) 10%,transparent)}}.bg-white\/20{background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.bg-white\/20{background-color:color-mix(in oklab,var(--color-white) 20%,transparent)}}.bg-white\/40{background-color:#fff6}@supports (color:color-mix(in lab,red,red)){.bg-white\/40{background-color:color-mix(in oklab,var(--color-white) 40%,transparent)}}.bg-white\/50{background-color:#ffffff80}@supports (color:color-mix(in lab,red,red)){.bg-white\/50{background-color:color-mix(in oklab,var(--color-white) 50%,transparent)}}.bg-white\/60{background-color:#fff9}@supports (color:color-mix(in lab,red,red)){.bg-white\/60{background-color:color-mix(in oklab,var(--color-white) 60%,transparent)}}.bg-white\/80{background-color:#fffc}@supports (color:color-mix(in lab,red,red)){.bg-white\/80{background-color:color-mix(in oklab,var(--color-white) 80%,transparent)}}.bg-yellow-50\/30{background-color:#fefce84d}@supports (color:color-mix(in lab,red,red)){.bg-yellow-50\/30{background-color:color-mix(in oklab,var(--color-yellow-50) 30%,transparent)}}.bg-yellow-100{background-color:var(--color-yellow-100)}.bg-yellow-500{background-color:var(--color-yellow-500)}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-blue-50{--tw-gradient-from:var(--color-blue-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-green-50{--tw-gradient-from:var(--color-green-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-green-600{--tw-gradient-from:var(--color-green-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-purple-50{--tw-gradient-from:var(--color-purple-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-re-red{--tw-gradient-from:var(--re-red);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-re-red\/20{--tw-gradient-from:var(--re-red)}@supports (color:color-mix(in lab,red,red)){.from-re-red\/20{--tw-gradient-from:color-mix(in oklab, var(--re-red) 20%, transparent)}}.from-re-red\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-red-50{--tw-gradient-from:var(--color-red-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-red-500{--tw-gradient-from:var(--color-red-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-red-600{--tw-gradient-from:var(--color-red-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-red-600\/20{--tw-gradient-from:#e4001433}@supports (color:color-mix(in lab,red,red)){.from-red-600\/20{--tw-gradient-from:color-mix(in oklab, var(--color-red-600) 20%, transparent)}}.from-red-600\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-slate-900{--tw-gradient-from:var(--color-slate-900);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-white{--tw-gradient-from:var(--color-white);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.via-slate-800{--tw-gradient-via:var(--color-slate-800);--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-blue-50{--tw-gradient-to:var(--color-blue-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-cyan-50{--tw-gradient-to:var(--color-cyan-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-emerald-50{--tw-gradient-to:var(--color-emerald-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-green-500{--tw-gradient-to:var(--color-green-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-indigo-50{--tw-gradient-to:var(--color-indigo-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-orange-50{--tw-gradient-to:var(--color-orange-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-re-red{--tw-gradient-to:var(--re-red);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-re-red-hover{--tw-gradient-to:var(--re-red-hover);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-red-500{--tw-gradient-to:var(--color-red-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-red-700{--tw-gradient-to:var(--color-red-700);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-slate-50{--tw-gradient-to:var(--color-slate-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-slate-50\/50{--tw-gradient-to:#f8fafc80}@supports (color:color-mix(in lab,red,red)){.to-slate-50\/50{--tw-gradient-to:color-mix(in oklab, var(--color-slate-50) 50%, transparent)}}.to-slate-50\/50{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-slate-800{--tw-gradient-to:var(--color-slate-800);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-slate-900{--tw-gradient-to:var(--color-slate-900);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.fill-current{fill:currentColor}.fill-primary{fill:var(--primary)}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:calc(var(--spacing) * 0)}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:calc(var(--spacing) * 1)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-7{padding:calc(var(--spacing) * 7)}.p-8{padding:calc(var(--spacing) * 8)}.p-10{padding:calc(var(--spacing) * 10)}.p-12{padding:calc(var(--spacing) * 12)}.p-20{padding:calc(var(--spacing) * 20)}.p-\[3px\]{padding:3px}.p-px{padding:1px}.px-0{padding-inline:calc(var(--spacing) * 0)}.px-1{padding-inline:calc(var(--spacing) * 1)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-8{padding-inline:calc(var(--spacing) * 8)}.px-10{padding-inline:calc(var(--spacing) * 10)}.py-0{padding-block:calc(var(--spacing) * 0)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-5{padding-block:calc(var(--spacing) * 5)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-10{padding-block:calc(var(--spacing) * 10)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-16{padding-block:calc(var(--spacing) * 16)}.py-20{padding-block:calc(var(--spacing) * 20)}.pt-0{padding-top:calc(var(--spacing) * 0)}.pt-0\.5{padding-top:calc(var(--spacing) * .5)}.pt-1{padding-top:calc(var(--spacing) * 1)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-2\.5{padding-top:calc(var(--spacing) * 2.5)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-5{padding-top:calc(var(--spacing) * 5)}.pt-6{padding-top:calc(var(--spacing) * 6)}.pt-8{padding-top:calc(var(--spacing) * 8)}.pt-10{padding-top:calc(var(--spacing) * 10)}.pt-24{padding-top:calc(var(--spacing) * 24)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-2\.5{padding-right:calc(var(--spacing) * 2.5)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-4{padding-right:calc(var(--spacing) * 4)}.pr-6{padding-right:calc(var(--spacing) * 6)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pr-10{padding-right:calc(var(--spacing) * 10)}.pb-1{padding-bottom:calc(var(--spacing) * 1)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-2\.5{padding-bottom:calc(var(--spacing) * 2.5)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.pb-8{padding-bottom:calc(var(--spacing) * 8)}.pb-24{padding-bottom:calc(var(--spacing) * 24)}.pl-1{padding-left:calc(var(--spacing) * 1)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-5{padding-left:calc(var(--spacing) * 5)}.pl-6{padding-left:calc(var(--spacing) * 6)}.pl-7{padding-left:calc(var(--spacing) * 7)}.pl-8{padding-left:calc(var(--spacing) * 8)}.pl-9{padding-left:calc(var(--spacing) * 9)}.pl-10{padding-left:calc(var(--spacing) * 10)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.align-middle{vertical-align:middle}.align-top{vertical-align:top}.font-mono{font-family:var(--font-montserrat)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[0\.8rem\]{font-size:.8rem}.text-\[8px\]{font-size:8px}.text-\[9px\]{font-size:9px}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[12px\]{font-size:12px}.text-\[13px\]{font-size:13px}.text-\[14px\]{font-size:14px}.text-\[15px\]{font-size:15px}.text-\[28px\]{font-size:28px}.leading-none{--tw-leading:1;line-height:1}.leading-normal{--tw-leading:var(--leading-normal);line-height:var(--leading-normal)}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-black{--tw-font-weight:var(--font-weight-black);font-weight:var(--font-weight-black)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-extrabold{--tw-font-weight:var(--font-weight-extrabold);font-weight:var(--font-weight-extrabold)}.font-light{--tw-font-weight:var(--font-weight-light);font-weight:var(--font-weight-light)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\[0\.1em\]{--tw-tracking:.1em;letter-spacing:.1em}.tracking-\[0\.2em\]{--tw-tracking:.2em;letter-spacing:.2em}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-tighter{--tw-tracking:var(--tracking-tighter);letter-spacing:var(--tracking-tighter)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.text-balance{text-wrap:balance}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-\[\#333333\]{color:#333}.text-\[\#666666\]{color:#666}.text-accent-foreground{color:var(--accent-foreground)}.text-amber-600{color:var(--color-amber-600)}.text-amber-700{color:var(--color-amber-700)}.text-amber-800{color:var(--color-amber-800)}.text-amber-900{color:var(--color-amber-900)}.text-black{color:var(--color-black)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-blue-700{color:var(--color-blue-700)}.text-blue-800{color:var(--color-blue-800)}.text-blue-900{color:var(--color-blue-900)}.text-card-foreground{color:var(--card-foreground)}.text-current{color:currentColor}.text-cyan-700{color:var(--color-cyan-700)}.text-cyan-800{color:var(--color-cyan-800)}.text-destructive{color:var(--destructive)}.text-emerald-400{color:var(--color-emerald-400)}.text-emerald-500{color:var(--color-emerald-500)}.text-emerald-600{color:var(--color-emerald-600)}.text-emerald-700{color:var(--color-emerald-700)}.text-emerald-800{color:var(--color-emerald-800)}.text-emerald-900{color:var(--color-emerald-900)}.text-foreground{color:var(--foreground)}.text-gray-300{color:var(--color-gray-300)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-gray-900{color:var(--color-gray-900)}.text-green-400{color:var(--color-green-400)}.text-green-500{color:var(--color-green-500)}.text-green-600{color:var(--color-green-600)}.text-green-700{color:var(--color-green-700)}.text-green-800{color:var(--color-green-800)}.text-green-900{color:var(--color-green-900)}.text-indigo-600{color:var(--color-indigo-600)}.text-indigo-700{color:var(--color-indigo-700)}.text-indigo-800{color:var(--color-indigo-800)}.text-muted-foreground{color:var(--muted-foreground)}.text-orange-600{color:var(--color-orange-600)}.text-orange-700{color:var(--color-orange-700)}.text-orange-800{color:var(--color-orange-800)}.text-orange-900{color:var(--color-orange-900)}.text-pink-800{color:var(--color-pink-800)}.text-popover-foreground{color:var(--popover-foreground)}.text-primary{color:var(--primary)}.text-primary-600{color:var(--primary-600)}.text-primary-foreground{color:var(--primary-foreground)}.text-purple-600{color:var(--color-purple-600)}.text-purple-700{color:var(--color-purple-700)}.text-purple-800{color:var(--color-purple-800)}.text-re-red{color:var(--re-red)}.text-re-red-hover{color:var(--re-red-hover)}.text-red-100{color:var(--color-red-100)}.text-red-100\/80{color:#ffe2e2cc}@supports (color:color-mix(in lab,red,red)){.text-red-100\/80{color:color-mix(in oklab,var(--color-red-100) 80%,transparent)}}.text-red-400{color:var(--color-red-400)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-red-800{color:var(--color-red-800)}.text-red-800\/80{color:#9f0712cc}@supports (color:color-mix(in lab,red,red)){.text-red-800\/80{color:color-mix(in oklab,var(--color-red-800) 80%,transparent)}}.text-red-900{color:var(--color-red-900)}.text-rose-400{color:var(--color-rose-400)}.text-rose-700{color:var(--color-rose-700)}.text-secondary-foreground{color:var(--secondary-foreground)}.text-sidebar-foreground,.text-sidebar-foreground\/70{color:var(--sidebar-foreground)}@supports (color:color-mix(in lab,red,red)){.text-sidebar-foreground\/70{color:color-mix(in oklab,var(--sidebar-foreground) 70%,transparent)}}.text-sky-700{color:var(--color-sky-700)}.text-sky-800{color:var(--color-sky-800)}.text-sky-900{color:var(--color-sky-900)}.text-sky-900\/90{color:#024a70e6}@supports (color:color-mix(in lab,red,red)){.text-sky-900\/90{color:color-mix(in oklab,var(--color-sky-900) 90%,transparent)}}.text-sky-950{color:var(--color-sky-950)}.text-slate-100{color:var(--color-slate-100)}.text-slate-200{color:var(--color-slate-200)}.text-slate-300{color:var(--color-slate-300)}.text-slate-400{color:var(--color-slate-400)}.text-slate-500{color:var(--color-slate-500)}.text-slate-600{color:var(--color-slate-600)}.text-slate-700{color:var(--color-slate-700)}.text-slate-800{color:var(--color-slate-800)}.text-slate-900{color:var(--color-slate-900)}.text-teal-700{color:var(--color-teal-700)}.text-teal-800{color:var(--color-teal-800)}.text-violet-700{color:var(--color-violet-700)}.text-violet-800{color:var(--color-violet-800)}.text-violet-900{color:var(--color-violet-900)}.text-violet-900\/90{color:#4d179ae6}@supports (color:color-mix(in lab,red,red)){.text-violet-900\/90{color:color-mix(in oklab,var(--color-violet-900) 90%,transparent)}}.text-violet-950{color:var(--color-violet-950)}.text-white{color:var(--color-white)}.text-white\/70{color:#ffffffb3}@supports (color:color-mix(in lab,red,red)){.text-white\/70{color:color-mix(in oklab,var(--color-white) 70%,transparent)}}.text-white\/80{color:#fffc}@supports (color:color-mix(in lab,red,red)){.text-white\/80{color:color-mix(in oklab,var(--color-white) 80%,transparent)}}.text-white\/90{color:#ffffffe6}@supports (color:color-mix(in lab,red,red)){.text-white\/90{color:color-mix(in oklab,var(--color-white) 90%,transparent)}}.text-yellow-600{color:var(--color-yellow-600)}.text-yellow-700{color:var(--color-yellow-700)}.text-yellow-800{color:var(--color-yellow-800)}.capitalize{text-transform:capitalize}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.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,)}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.underline{text-decoration-line:underline}.decoration-re-red{text-decoration-color:var(--re-red)}.decoration-2{text-decoration-thickness:2px}.underline-offset-4{text-underline-offset:4px}.accent-slate-900{accent-color:var(--color-slate-900)}.opacity-0{opacity:0}.opacity-20{opacity:.2}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.opacity-90{opacity:.9}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_-4px_10px_-5px_rgba\(0\,0\,0\,0\.05\)\]{--tw-shadow:0 -4px 10px -5px var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_0_1px_hsl\(var\(--sidebar-border\)\)\]{--tw-shadow:0 0 0 1px var(--tw-shadow-color,hsl(var(--sidebar-border)));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_8px_rgba\(34\,197\,94\,0\.4\)\]{--tw-shadow:0 0 8px var(--tw-shadow-color,#22c55e66);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_40px_rgba\(218\,41\,28\,0\.2\)\]{--tw-shadow:0 0 40px var(--tw-shadow-color,#da291c33);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_40px_rgba\(220\,38\,38\,0\.2\)\]{--tw-shadow:0 0 40px var(--tw-shadow-color,#dc262633);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-0{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-green-100{--tw-shadow-color:oklch(96.2% .044 156.743)}@supports (color:color-mix(in lab,red,red)){.shadow-green-100{--tw-shadow-color:color-mix(in oklab, var(--color-green-100) var(--tw-shadow-alpha), transparent)}}.shadow-green-600\/20{--tw-shadow-color:#00a54433}@supports (color:color-mix(in lab,red,red)){.shadow-green-600\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-green-600) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-purple-200{--tw-shadow-color:oklch(90.2% .063 306.703)}@supports (color:color-mix(in lab,red,red)){.shadow-purple-200{--tw-shadow-color:color-mix(in oklab, var(--color-purple-200) var(--tw-shadow-alpha), transparent)}}.shadow-re-red\/10{--tw-shadow-color:var(--re-red)}@supports (color:color-mix(in lab,red,red)){.shadow-re-red\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--re-red) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-re-red\/15{--tw-shadow-color:var(--re-red)}@supports (color:color-mix(in lab,red,red)){.shadow-re-red\/15{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--re-red) 15%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-re-red\/20{--tw-shadow-color:var(--re-red)}@supports (color:color-mix(in lab,red,red)){.shadow-re-red\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--re-red) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-red-200{--tw-shadow-color:oklch(88.5% .062 18.334)}@supports (color:color-mix(in lab,red,red)){.shadow-red-200{--tw-shadow-color:color-mix(in oklab, var(--color-red-200) var(--tw-shadow-alpha), transparent)}}.shadow-red-200\/50{--tw-shadow-color:#ffcaca80}@supports (color:color-mix(in lab,red,red)){.shadow-red-200\/50{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-red-200) 50%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-slate-200{--tw-shadow-color:oklch(92.9% .013 255.508)}@supports (color:color-mix(in lab,red,red)){.shadow-slate-200{--tw-shadow-color:color-mix(in oklab, var(--color-slate-200) var(--tw-shadow-alpha), transparent)}}.ring-black\/5{--tw-ring-color:#0000000d}@supports (color:color-mix(in lab,red,red)){.ring-black\/5{--tw-ring-color:color-mix(in oklab, var(--color-black) 5%, transparent)}}.ring-emerald-300{--tw-ring-color:var(--color-emerald-300)}.ring-emerald-300\/70{--tw-ring-color:#5ee9b5b3}@supports (color:color-mix(in lab,red,red)){.ring-emerald-300\/70{--tw-ring-color:color-mix(in oklab, var(--color-emerald-300) 70%, transparent)}}.ring-re-red\/20{--tw-ring-color:var(--re-red)}@supports (color:color-mix(in lab,red,red)){.ring-re-red\/20{--tw-ring-color:color-mix(in oklab, var(--re-red) 20%, transparent)}}.ring-red-300\/70{--tw-ring-color:#ffa3a3b3}@supports (color:color-mix(in lab,red,red)){.ring-red-300\/70{--tw-ring-color:color-mix(in oklab, var(--color-red-300) 70%, transparent)}}.ring-ring\/50{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){.ring-ring\/50{--tw-ring-color:color-mix(in oklab, var(--ring) 50%, transparent)}}.ring-sidebar-ring{--tw-ring-color:var(--sidebar-ring)}.ring-slate-100{--tw-ring-color:var(--color-slate-100)}.ring-slate-200{--tw-ring-color:var(--color-slate-200)}.ring-transparent{--tw-ring-color:transparent}.ring-white\/20{--tw-ring-color:#fff3}@supports (color:color-mix(in lab,red,red)){.ring-white\/20{--tw-ring-color:color-mix(in oklab, var(--color-white) 20%, transparent)}}.ring-offset-background{--tw-ring-offset-color:var(--background)}.ring-offset-white{--tw-ring-offset-color:var(--color-white)}.outline-hidden{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.outline-hidden{outline-offset:2px;outline:2px solid #0000}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur-3xl{--tw-blur:blur(var(--blur-3xl));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,)}.grayscale-\[0\.5\]{--tw-grayscale:grayscale(.5);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur-\[1px\]{--tw-backdrop-blur:blur(1px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[color\,box-shadow\]{transition-property:color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[left\,right\,width\]{transition-property:left,right,width;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[margin\,opacity\]{transition-property:margin,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[width\,height\,padding\]{transition-property:width,height,padding;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[width\]{transition-property:width;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-none{transition-property:none}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.duration-1000{--tw-duration:1s;transition-duration:1s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-linear{--tw-ease:linear;transition-timing-function:linear}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.group-focus-within\/menu-item\:opacity-100:is(:where(.group\/menu-item):focus-within *){opacity:1}@media(hover:hover){.group-hover\:scale-105:is(:where(.group):hover *){--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.group-hover\:scale-110:is(:where(.group):hover *){--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x) var(--tw-scale-y)}.group-hover\:bg-blue-50:is(:where(.group):hover *){background-color:var(--color-blue-50)}.group-hover\:bg-re-red:is(:where(.group):hover *){background-color:var(--re-red)}.group-hover\:bg-red-50:is(:where(.group):hover *){background-color:var(--color-red-50)}.group-hover\:bg-slate-100:is(:where(.group):hover *){background-color:var(--color-slate-100)}.group-hover\:bg-white:is(:where(.group):hover *){background-color:var(--color-white)}.group-hover\:text-blue-600:is(:where(.group):hover *){color:var(--color-blue-600)}.group-hover\:text-emerald-900:is(:where(.group):hover *){color:var(--color-emerald-900)}.group-hover\:text-re-red:is(:where(.group):hover *){color:var(--re-red)}.group-hover\:text-re-red-hover:is(:where(.group):hover *){color:var(--re-red-hover)}.group-hover\:text-red-900:is(:where(.group):hover *){color:var(--color-red-900)}.group-hover\:text-slate-400:is(:where(.group):hover *){color:var(--color-slate-400)}.group-hover\:text-slate-900:is(:where(.group):hover *){color:var(--color-slate-900)}.group-hover\:text-white:is(:where(.group):hover *){color:var(--color-white)}.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}.group-hover\:ring-blue-100:is(:where(.group):hover *){--tw-ring-color:var(--color-blue-100)}.group-hover\/menu-item\:opacity-100:is(:where(.group\/menu-item):hover *),.group-hover\/num\:opacity-100:is(:where(.group\/num):hover *){opacity:1}.group-hover\/opt\:text-slate-900:is(:where(.group\/opt):hover *){color:var(--color-slate-900)}.group-hover\/opt\:opacity-100:is(:where(.group\/opt):hover *),.group-hover\/optnum\:opacity-100:is(:where(.group\/optnum):hover *){opacity:1}}.group-has-data-\[sidebar\=menu-action\]\/menu-item\:pr-8:is(:where(.group\/menu-item):has([data-sidebar=menu-action]) *){padding-right:calc(var(--spacing) * 8)}.group-data-\[collapsible\=icon\]\:-mt-8:is(:where(.group)[data-collapsible=icon] *){margin-top:calc(var(--spacing) * -8)}.group-data-\[collapsible\=icon\]\:hidden:is(:where(.group)[data-collapsible=icon] *){display:none}.group-data-\[collapsible\=icon\]\:size-8\!:is(:where(.group)[data-collapsible=icon] *){width:calc(var(--spacing) * 8)!important;height:calc(var(--spacing) * 8)!important}.group-data-\[collapsible\=icon\]\:w-\(--sidebar-width-icon\):is(:where(.group)[data-collapsible=icon] *){width:var(--sidebar-width-icon)}.group-data-\[collapsible\=icon\]\:w-\[calc\(var\(--sidebar-width-icon\)\+\(--spacing\(4\)\)\)\]:is(:where(.group)[data-collapsible=icon] *){width:calc(var(--sidebar-width-icon) + (calc(var(--spacing) * 4)))}.group-data-\[collapsible\=icon\]\:w-\[calc\(var\(--sidebar-width-icon\)\+\(--spacing\(4\)\)\+2px\)\]:is(:where(.group)[data-collapsible=icon] *){width:calc(var(--sidebar-width-icon) + (calc(var(--spacing) * 4)) + 2px)}.group-data-\[collapsible\=icon\]\:overflow-hidden:is(:where(.group)[data-collapsible=icon] *){overflow:hidden}.group-data-\[collapsible\=icon\]\:p-0\!:is(:where(.group)[data-collapsible=icon] *){padding:calc(var(--spacing) * 0)!important}.group-data-\[collapsible\=icon\]\:p-2\!:is(:where(.group)[data-collapsible=icon] *){padding:calc(var(--spacing) * 2)!important}.group-data-\[collapsible\=icon\]\:opacity-0:is(:where(.group)[data-collapsible=icon] *){opacity:0}.group-data-\[collapsible\=offcanvas\]\:right-\[calc\(var\(--sidebar-width\)\*-1\)\]:is(:where(.group)[data-collapsible=offcanvas] *){right:calc(var(--sidebar-width) * -1)}.group-data-\[collapsible\=offcanvas\]\:left-\[calc\(var\(--sidebar-width\)\*-1\)\]:is(:where(.group)[data-collapsible=offcanvas] *){left:calc(var(--sidebar-width) * -1)}.group-data-\[collapsible\=offcanvas\]\:w-0:is(:where(.group)[data-collapsible=offcanvas] *){width:calc(var(--spacing) * 0)}.group-data-\[collapsible\=offcanvas\]\:translate-x-0:is(:where(.group)[data-collapsible=offcanvas] *){--tw-translate-x:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.group-data-\[disabled\=true\]\:pointer-events-none:is(:where(.group)[data-disabled=true] *){pointer-events:none}.group-data-\[disabled\=true\]\:opacity-50:is(:where(.group)[data-disabled=true] *){opacity:.5}.group-data-\[side\=left\]\:-right-4:is(:where(.group)[data-side=left] *){right:calc(var(--spacing) * -4)}.group-data-\[side\=left\]\:border-r:is(:where(.group)[data-side=left] *){border-right-style:var(--tw-border-style);border-right-width:1px}.group-data-\[side\=right\]\:left-0:is(:where(.group)[data-side=right] *){left:calc(var(--spacing) * 0)}.group-data-\[side\=right\]\:rotate-180:is(:where(.group)[data-side=right] *){rotate:180deg}.group-data-\[side\=right\]\:border-l:is(:where(.group)[data-side=right] *){border-left-style:var(--tw-border-style);border-left-width:1px}.group-data-\[state\=open\]\:rotate-180:is(:where(.group)[data-state=open] *){rotate:180deg}.group-data-\[variant\=floating\]\:rounded-lg:is(:where(.group)[data-variant=floating] *){border-radius:var(--radius)}.group-data-\[variant\=floating\]\:border:is(:where(.group)[data-variant=floating] *){border-style:var(--tw-border-style);border-width:1px}.group-data-\[variant\=floating\]\:border-sidebar-border:is(:where(.group)[data-variant=floating] *){border-color:var(--sidebar-border)}.group-data-\[variant\=floating\]\:shadow-sm:is(:where(.group)[data-variant=floating] *){--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.group-data-\[vaul-drawer-direction\=bottom\]\/drawer-content\:block:is(:where(.group\/drawer-content)[data-vaul-drawer-direction=bottom] *){display:block}.group-data-\[viewport\=false\]\/navigation-menu\:top-full:is(:where(.group\/navigation-menu)[data-viewport=false] *){top:100%}.group-data-\[viewport\=false\]\/navigation-menu\:mt-1\.5:is(:where(.group\/navigation-menu)[data-viewport=false] *){margin-top:calc(var(--spacing) * 1.5)}.group-data-\[viewport\=false\]\/navigation-menu\:overflow-hidden:is(:where(.group\/navigation-menu)[data-viewport=false] *){overflow:hidden}.group-data-\[viewport\=false\]\/navigation-menu\:rounded-md:is(:where(.group\/navigation-menu)[data-viewport=false] *){border-radius:calc(var(--radius) - 2px)}.group-data-\[viewport\=false\]\/navigation-menu\:border:is(:where(.group\/navigation-menu)[data-viewport=false] *){border-style:var(--tw-border-style);border-width:1px}.group-data-\[viewport\=false\]\/navigation-menu\:bg-popover:is(:where(.group\/navigation-menu)[data-viewport=false] *){background-color:var(--popover)}.group-data-\[viewport\=false\]\/navigation-menu\:text-popover-foreground:is(:where(.group\/navigation-menu)[data-viewport=false] *){color:var(--popover-foreground)}.group-data-\[viewport\=false\]\/navigation-menu\:shadow:is(:where(.group\/navigation-menu)[data-viewport=false] *){--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.group-data-\[viewport\=false\]\/navigation-menu\:duration-200:is(:where(.group\/navigation-menu)[data-viewport=false] *){--tw-duration:.2s;transition-duration:.2s}@media(hover:hover){.peer-hover\/menu-button\:text-sidebar-accent-foreground:is(:where(.peer\/menu-button):hover~*){color:var(--sidebar-accent-foreground)}}.peer-disabled\:cursor-not-allowed:is(:where(.peer):disabled~*){cursor:not-allowed}.peer-disabled\:opacity-50:is(:where(.peer):disabled~*){opacity:.5}.peer-disabled\:opacity-70:is(:where(.peer):disabled~*){opacity:.7}.peer-data-\[active\=true\]\/menu-button\:text-sidebar-accent-foreground:is(:where(.peer\/menu-button)[data-active=true]~*){color:var(--sidebar-accent-foreground)}.peer-data-\[size\=default\]\/menu-button\:top-1\.5:is(:where(.peer\/menu-button)[data-size=default]~*){top:calc(var(--spacing) * 1.5)}.peer-data-\[size\=lg\]\/menu-button\:top-2\.5:is(:where(.peer\/menu-button)[data-size=lg]~*){top:calc(var(--spacing) * 2.5)}.peer-data-\[size\=sm\]\/menu-button\:top-1:is(:where(.peer\/menu-button)[data-size=sm]~*){top:calc(var(--spacing) * 1)}.selection\:bg-primary ::-moz-selection{background-color:var(--primary)}.selection\:bg-primary ::selection{background-color:var(--primary)}.selection\:bg-primary::-moz-selection{background-color:var(--primary)}.selection\:bg-primary::selection{background-color:var(--primary)}.selection\:text-primary-foreground ::-moz-selection{color:var(--primary-foreground)}.selection\:text-primary-foreground ::selection{color:var(--primary-foreground)}.selection\:text-primary-foreground::-moz-selection{color:var(--primary-foreground)}.selection\:text-primary-foreground::selection{color:var(--primary-foreground)}.file\:mr-4::file-selector-button{margin-right:calc(var(--spacing) * 4)}.file\:inline-flex::file-selector-button{display:inline-flex}.file\:h-7::file-selector-button{height:calc(var(--spacing) * 7)}.file\:rounded-full::file-selector-button{border-radius:3.40282e38px}.file\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\:bg-red-50::file-selector-button{background-color:var(--color-red-50)}.file\:bg-transparent::file-selector-button{background-color:#0000}.file\:px-4::file-selector-button{padding-inline:calc(var(--spacing) * 4)}.file\:py-1::file-selector-button{padding-block:calc(var(--spacing) * 1)}.file\:py-2::file-selector-button{padding-block:calc(var(--spacing) * 2)}.file\:text-sm::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.file\:text-xs::file-selector-button{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.file\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.file\:font-semibold::file-selector-button{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.file\:text-foreground::file-selector-button{color:var(--foreground)}.file\:text-re-red::file-selector-button{color:var(--re-red)}.file\:text-re-red-hover::file-selector-button{color:var(--re-red-hover)}.placeholder\:font-bold::-moz-placeholder{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.placeholder\:font-bold::placeholder{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.placeholder\:text-\[\#999999\]::-moz-placeholder{color:#999}.placeholder\:text-\[\#999999\]::placeholder{color:#999}.placeholder\:text-muted-foreground::-moz-placeholder{color:var(--muted-foreground)}.placeholder\:text-muted-foreground::placeholder{color:var(--muted-foreground)}.placeholder\:text-slate-300::-moz-placeholder{color:var(--color-slate-300)}.placeholder\:text-slate-300::placeholder{color:var(--color-slate-300)}.placeholder\:text-slate-400::-moz-placeholder{color:var(--color-slate-400)}.placeholder\:text-slate-400::placeholder{color:var(--color-slate-400)}.placeholder\:text-slate-500::-moz-placeholder{color:var(--color-slate-500)}.placeholder\:text-slate-500::placeholder{color:var(--color-slate-500)}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:-inset-2:after{content:var(--tw-content);inset:calc(var(--spacing) * -2)}.after\:inset-y-0:after{content:var(--tw-content);inset-block:calc(var(--spacing) * 0)}.after\:left-1\/2:after{content:var(--tw-content);left:50%}.after\:w-1:after{content:var(--tw-content);width:calc(var(--spacing) * 1)}.after\:w-\[2px\]:after{content:var(--tw-content);width:2px}.after\:-translate-x-1\/2:after{content:var(--tw-content);--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.group-data-\[collapsible\=offcanvas\]\:after\:left-full:is(:where(.group)[data-collapsible=offcanvas] *):after{content:var(--tw-content);left:100%}.first\:rounded-l-md:first-child{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.first\:border-l:first-child{border-left-style:var(--tw-border-style);border-left-width:1px}.last\:mb-0:last-child{margin-bottom:calc(var(--spacing) * 0)}.last\:rounded-r-md:last-child{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.last\:border-0:last-child{border-style:var(--tw-border-style);border-width:0}.last\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.last\:pb-0:last-child{padding-bottom:calc(var(--spacing) * 0)}.focus-within\:relative:focus-within{position:relative}.focus-within\:z-20:focus-within{z-index:20}.focus-within\:border-blue-400:focus-within{border-color:var(--color-blue-400)}.focus-within\:ring-1:focus-within{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-within\:ring-blue-100:focus-within{--tw-ring-color:var(--color-blue-100)}@media(hover:hover){.hover\:scale-110:hover{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\:scale-\[1\.01\]:hover{scale:1.01}.hover\:scale-\[1\.02\]:hover{scale:1.02}.hover\:border-blue-300:hover{border-color:var(--color-blue-300)}.hover\:border-re-red:hover{border-color:var(--re-red)}.hover\:border-red-200:hover{border-color:var(--color-red-200)}.hover\:border-red-300:hover{border-color:var(--color-red-300)}.hover\:border-red-400:hover{border-color:var(--color-red-400)}.hover\:border-red-500:hover{border-color:var(--color-red-500)}.hover\:border-slate-100:hover{border-color:var(--color-slate-100)}.hover\:border-slate-200:hover{border-color:var(--color-slate-200)}.hover\:border-slate-300:hover{border-color:var(--color-slate-300)}.hover\:bg-accent:hover{background-color:var(--accent)}.hover\:bg-amber-100:hover{background-color:var(--color-amber-100)}.hover\:bg-amber-700:hover{background-color:var(--color-amber-700)}.hover\:bg-black:hover{background-color:var(--color-black)}.hover\:bg-blue-50:hover{background-color:var(--color-blue-50)}.hover\:bg-blue-50\/20:hover{background-color:#eff6ff33}@supports (color:color-mix(in lab,red,red)){.hover\:bg-blue-50\/20:hover{background-color:color-mix(in oklab,var(--color-blue-50) 20%,transparent)}}.hover\:bg-blue-100:hover{background-color:var(--color-blue-100)}.hover\:bg-blue-500:hover{background-color:var(--color-blue-500)}.hover\:bg-blue-700:hover{background-color:var(--color-blue-700)}.hover\:bg-destructive\/90:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-destructive\/90:hover{background-color:color-mix(in oklab,var(--destructive) 90%,transparent)}}.hover\:bg-emerald-50\/30:hover{background-color:#ecfdf54d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-emerald-50\/30:hover{background-color:color-mix(in oklab,var(--color-emerald-50) 30%,transparent)}}.hover\:bg-emerald-100:hover{background-color:var(--color-emerald-100)}.hover\:bg-emerald-200:hover{background-color:var(--color-emerald-200)}.hover\:bg-emerald-700:hover{background-color:var(--color-emerald-700)}.hover\:bg-gray-50:hover{background-color:var(--color-gray-50)}.hover\:bg-green-100:hover{background-color:var(--color-green-100)}.hover\:bg-green-600:hover{background-color:var(--color-green-600)}.hover\:bg-green-700:hover{background-color:var(--color-green-700)}.hover\:bg-indigo-50:hover{background-color:var(--color-indigo-50)}.hover\:bg-indigo-700:hover{background-color:var(--color-indigo-700)}.hover\:bg-muted:hover,.hover\:bg-muted\/50:hover{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-muted\/50:hover{background-color:color-mix(in oklab,var(--muted) 50%,transparent)}}.hover\:bg-orange-50:hover{background-color:var(--color-orange-50)}.hover\:bg-orange-700:hover{background-color:var(--color-orange-700)}.hover\:bg-primary:hover{background-color:var(--primary)}.hover\:bg-primary-50:hover{background-color:var(--primary-50)}.hover\:bg-primary-700:hover{background-color:var(--primary-700)}.hover\:bg-primary\/90:hover{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab,var(--primary) 90%,transparent)}}.hover\:bg-purple-50:hover{background-color:var(--color-purple-50)}.hover\:bg-purple-700:hover{background-color:var(--color-purple-700)}.hover\:bg-re-red:hover{background-color:var(--re-red)}.hover\:bg-re-red-hover:hover{background-color:var(--re-red-hover)}.hover\:bg-red-50:hover{background-color:var(--color-red-50)}.hover\:bg-red-50\/30:hover{background-color:#fef2f24d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-50\/30:hover{background-color:color-mix(in oklab,var(--color-red-50) 30%,transparent)}}.hover\:bg-red-100:hover{background-color:var(--color-red-100)}.hover\:bg-red-700:hover{background-color:var(--color-red-700)}.hover\:bg-secondary\/80:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-secondary\/80:hover{background-color:color-mix(in oklab,var(--secondary) 80%,transparent)}}.hover\:bg-sidebar-accent:hover{background-color:var(--sidebar-accent)}.hover\:bg-slate-50:hover{background-color:var(--color-slate-50)}.hover\:bg-slate-50\/10:hover{background-color:#f8fafc1a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-slate-50\/10:hover{background-color:color-mix(in oklab,var(--color-slate-50) 10%,transparent)}}.hover\:bg-slate-50\/50:hover{background-color:#f8fafc80}@supports (color:color-mix(in lab,red,red)){.hover\:bg-slate-50\/50:hover{background-color:color-mix(in oklab,var(--color-slate-50) 50%,transparent)}}.hover\:bg-slate-50\/70:hover{background-color:#f8fafcb3}@supports (color:color-mix(in lab,red,red)){.hover\:bg-slate-50\/70:hover{background-color:color-mix(in oklab,var(--color-slate-50) 70%,transparent)}}.hover\:bg-slate-50\/80:hover{background-color:#f8fafccc}@supports (color:color-mix(in lab,red,red)){.hover\:bg-slate-50\/80:hover{background-color:color-mix(in oklab,var(--color-slate-50) 80%,transparent)}}.hover\:bg-slate-100:hover{background-color:var(--color-slate-100)}.hover\:bg-slate-200:hover{background-color:var(--color-slate-200)}.hover\:bg-slate-200\/50:hover{background-color:#e2e8f080}@supports (color:color-mix(in lab,red,red)){.hover\:bg-slate-200\/50:hover{background-color:color-mix(in oklab,var(--color-slate-200) 50%,transparent)}}.hover\:bg-slate-700:hover{background-color:var(--color-slate-700)}.hover\:bg-slate-800:hover{background-color:var(--color-slate-800)}.hover\:bg-slate-900:hover{background-color:var(--color-slate-900)}.hover\:bg-slate-950:hover{background-color:var(--color-slate-950)}.hover\:bg-transparent:hover{background-color:#0000}.hover\:bg-white:hover{background-color:var(--color-white)}.hover\:bg-white\/5:hover{background-color:#ffffff0d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/5:hover{background-color:color-mix(in oklab,var(--color-white) 5%,transparent)}}.hover\:bg-white\/10:hover{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/10:hover{background-color:color-mix(in oklab,var(--color-white) 10%,transparent)}}.hover\:bg-white\/30:hover{background-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/30:hover{background-color:color-mix(in oklab,var(--color-white) 30%,transparent)}}.hover\:bg-white\/40:hover{background-color:#fff6}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/40:hover{background-color:color-mix(in oklab,var(--color-white) 40%,transparent)}}.hover\:bg-zinc-800:hover{background-color:var(--color-zinc-800)}.hover\:text-accent-foreground:hover{color:var(--accent-foreground)}.hover\:text-black:hover{color:var(--color-black)}.hover\:text-blue-600:hover{color:var(--color-blue-600)}.hover\:text-blue-700:hover{color:var(--color-blue-700)}.hover\:text-blue-800:hover{color:var(--color-blue-800)}.hover\:text-destructive:hover{color:var(--destructive)}.hover\:text-foreground:hover{color:var(--foreground)}.hover\:text-green-800:hover{color:var(--color-green-800)}.hover\:text-indigo-600:hover{color:var(--color-indigo-600)}.hover\:text-muted-foreground:hover{color:var(--muted-foreground)}.hover\:text-primary-700:hover{color:var(--primary-700)}.hover\:text-primary-foreground:hover{color:var(--primary-foreground)}.hover\:text-re-red:hover{color:var(--re-red)}.hover\:text-re-red-hover:hover{color:var(--re-red-hover)}.hover\:text-red-500:hover{color:var(--color-red-500)}.hover\:text-red-600:hover{color:var(--color-red-600)}.hover\:text-red-700:hover{color:var(--color-red-700)}.hover\:text-red-800:hover{color:var(--color-red-800)}.hover\:text-sidebar-accent-foreground:hover{color:var(--sidebar-accent-foreground)}.hover\:text-slate-600:hover{color:var(--color-slate-600)}.hover\:text-slate-700:hover{color:var(--color-slate-700)}.hover\:text-slate-900:hover{color:var(--color-slate-900)}.hover\:text-white:hover{color:var(--color-white)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-90:hover{opacity:.9}.hover\:opacity-100:hover{opacity:1}.hover\:shadow-\[0_0_0_1px_hsl\(var\(--sidebar-accent\)\)\]:hover{--tw-shadow:0 0 0 1px var(--tw-shadow-color,hsl(var(--sidebar-accent)));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-lg:hover{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-md:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-sm:hover{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:ring-4:hover{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:group-data-\[collapsible\=offcanvas\]\:bg-sidebar:hover:is(:where(.group)[data-collapsible=offcanvas] *){background-color:var(--sidebar)}.hover\:file\:bg-red-50:hover::file-selector-button{background-color:var(--color-red-50)}.hover\:file\:bg-red-100:hover::file-selector-button{background-color:var(--color-red-100)}.hover\:after\:bg-sidebar-border:hover:after{content:var(--tw-content);background-color:var(--sidebar-border)}}.focus\:z-10:focus{z-index:10}.focus\:border-re-red:focus,.focus\:border-re-red\/40:focus{border-color:var(--re-red)}@supports (color:color-mix(in lab,red,red)){.focus\:border-re-red\/40:focus{border-color:color-mix(in oklab,var(--re-red) 40%,transparent)}}.focus\:border-red-500:focus{border-color:var(--color-red-500)}.focus\:bg-accent:focus{background-color:var(--accent)}.focus\:bg-primary:focus{background-color:var(--primary)}.focus\:bg-red-50:focus{background-color:var(--color-red-50)}.focus\:bg-slate-50:focus{background-color:var(--color-slate-50)}.focus\:bg-white:focus{background-color:var(--color-white)}.focus\:text-accent-foreground:focus{color:var(--accent-foreground)}.focus\:text-primary-foreground:focus{color:var(--primary-foreground)}.focus\:text-slate-900:focus{color:var(--color-slate-900)}.focus\:ring-0:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-blue-500:focus{--tw-ring-color:var(--color-blue-500)}.focus\:ring-re-red:focus{--tw-ring-color:var(--re-red)}.focus\:ring-red-200:focus{--tw-ring-color:var(--color-red-200)}.focus\:ring-red-500:focus{--tw-ring-color:var(--color-red-500)}.focus\:ring-red-500\/30:focus{--tw-ring-color:#fb2c364d}@supports (color:color-mix(in lab,red,red)){.focus\:ring-red-500\/30:focus{--tw-ring-color:color-mix(in oklab, var(--color-red-500) 30%, transparent)}}.focus\:ring-ring:focus{--tw-ring-color:var(--ring)}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus\:outline-hidden:focus{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.focus\:outline-hidden:focus{outline-offset:2px;outline:2px solid #0000}}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\:z-10:focus-visible{z-index:10}.focus-visible\:border-blue-500:focus-visible{border-color:var(--color-blue-500)}.focus-visible\:border-red-500:focus-visible{border-color:var(--color-red-500)}.focus-visible\:border-ring:focus-visible{border-color:var(--ring)}.focus-visible\:bg-white:focus-visible{background-color:var(--color-white)}.focus-visible\:ring-0:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-1:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-4:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-\[3px\]:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-black:focus-visible{--tw-ring-color:var(--color-black)}.focus-visible\:ring-blue-500\/30:focus-visible{--tw-ring-color:#3080ff4d}@supports (color:color-mix(in lab,red,red)){.focus-visible\:ring-blue-500\/30:focus-visible{--tw-ring-color:color-mix(in oklab, var(--color-blue-500) 30%, transparent)}}.focus-visible\:ring-destructive\/20:focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.focus-visible\:ring-destructive\/20:focus-visible{--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.focus-visible\:ring-re-red:focus-visible{--tw-ring-color:var(--re-red)}.focus-visible\:ring-red-500\/30:focus-visible{--tw-ring-color:#fb2c364d}@supports (color:color-mix(in lab,red,red)){.focus-visible\:ring-red-500\/30:focus-visible{--tw-ring-color:color-mix(in oklab, var(--color-red-500) 30%, transparent)}}.focus-visible\:ring-ring:focus-visible,.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:color-mix(in oklab, var(--ring) 50%, transparent)}}.focus-visible\:ring-offset-1:focus-visible{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\:outline-hidden:focus-visible{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.focus-visible\:outline-hidden:focus-visible{outline-offset:2px;outline:2px solid #0000}}.focus-visible\:outline-1:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}.focus-visible\:outline-ring:focus-visible{outline-color:var(--ring)}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.active\:scale-90:active{--tw-scale-x:90%;--tw-scale-y:90%;--tw-scale-z:90%;scale:var(--tw-scale-x) var(--tw-scale-y)}.active\:scale-95:active{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.active\:scale-\[0\.98\]:active{scale:.98}.active\:scale-\[0\.99\]:active{scale:.99}.active\:bg-sidebar-accent:active{background-color:var(--sidebar-accent)}.active\:text-sidebar-accent-foreground:active{color:var(--sidebar-accent-foreground)}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:bg-gray-100:disabled{background-color:var(--color-gray-100)}.disabled\:bg-slate-300:disabled{background-color:var(--color-slate-300)}.disabled\:bg-slate-400:disabled{background-color:var(--color-slate-400)}.disabled\:opacity-30:disabled{opacity:.3}.disabled\:opacity-50:disabled{opacity:.5}:where([data-side=left]) .in-data-\[side\=left\]\:cursor-w-resize{cursor:w-resize}:where([data-side=right]) .in-data-\[side\=right\]\:cursor-e-resize{cursor:e-resize}.has-disabled\:opacity-50:has(:disabled){opacity:.5}.has-data-\[slot\=card-action\]\:grid-cols-\[1fr_auto\]:has([data-slot=card-action]){grid-template-columns:1fr auto}.has-data-\[variant\=inset\]\:bg-sidebar:has([data-variant=inset]){background-color:var(--sidebar)}.has-\[\>svg\]\:grid-cols-\[calc\(var\(--spacing\)\*4\)_1fr\]:has(>svg){grid-template-columns:calc(var(--spacing) * 4) 1fr}.has-\[\>svg\]\:gap-x-3:has(>svg){-moz-column-gap:calc(var(--spacing) * 3);column-gap:calc(var(--spacing) * 3)}.has-\[\>svg\]\:px-2\.5:has(>svg){padding-inline:calc(var(--spacing) * 2.5)}.has-\[\>svg\]\:px-3:has(>svg){padding-inline:calc(var(--spacing) * 3)}.has-\[\>svg\]\:px-4:has(>svg){padding-inline:calc(var(--spacing) * 4)}.aria-disabled\:pointer-events-none[aria-disabled=true]{pointer-events:none}.aria-disabled\:opacity-50[aria-disabled=true]{opacity:.5}.aria-invalid\:border-destructive[aria-invalid=true]{border-color:var(--destructive)}.aria-invalid\:ring-destructive\/20[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.aria-invalid\:ring-destructive\/20[aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.aria-selected\:bg-accent[aria-selected=true]{background-color:var(--accent)}.aria-selected\:bg-primary[aria-selected=true]{background-color:var(--primary)}.aria-selected\:text-accent-foreground[aria-selected=true]{color:var(--accent-foreground)}.aria-selected\:text-muted-foreground[aria-selected=true]{color:var(--muted-foreground)}.aria-selected\:text-primary-foreground[aria-selected=true]{color:var(--primary-foreground)}.aria-selected\:opacity-100[aria-selected=true]{opacity:1}.data-\[active\=true\]\:z-10[data-active=true]{z-index:10}.data-\[active\=true\]\:border-ring[data-active=true]{border-color:var(--ring)}.data-\[active\=true\]\:bg-accent\/50[data-active=true]{background-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.data-\[active\=true\]\:bg-accent\/50[data-active=true]{background-color:color-mix(in oklab,var(--accent) 50%,transparent)}}.data-\[active\=true\]\:bg-sidebar-accent[data-active=true]{background-color:var(--sidebar-accent)}.data-\[active\=true\]\:font-medium[data-active=true]{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.data-\[active\=true\]\:text-accent-foreground[data-active=true]{color:var(--accent-foreground)}.data-\[active\=true\]\:text-sidebar-accent-foreground[data-active=true]{color:var(--sidebar-accent-foreground)}.data-\[active\=true\]\:ring-\[3px\][data-active=true]{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.data-\[active\=true\]\:ring-ring\/50[data-active=true]{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){.data-\[active\=true\]\:ring-ring\/50[data-active=true]{--tw-ring-color:color-mix(in oklab, var(--ring) 50%, transparent)}}@media(hover:hover){.data-\[active\=true\]\:hover\:bg-accent[data-active=true]:hover{background-color:var(--accent)}}.data-\[active\=true\]\:focus\:bg-accent[data-active=true]:focus{background-color:var(--accent)}.data-\[active\=true\]\:aria-invalid\:border-destructive[data-active=true][aria-invalid=true]{border-color:var(--destructive)}.data-\[active\=true\]\:aria-invalid\:ring-destructive\/20[data-active=true][aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.data-\[active\=true\]\:aria-invalid\:ring-destructive\/20[data-active=true][aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[disabled\=true\]\:pointer-events-none[data-disabled=true]{pointer-events:none}.data-\[disabled\=true\]\:opacity-50[data-disabled=true]{opacity:.5}.data-\[error\=true\]\:text-destructive[data-error=true]{color:var(--destructive)}.data-\[inset\]\:pl-8[data-inset]{padding-left:calc(var(--spacing) * 8)}.data-\[orientation\=horizontal\]\:h-4[data-orientation=horizontal]{height:calc(var(--spacing) * 4)}.data-\[orientation\=horizontal\]\:h-full[data-orientation=horizontal]{height:100%}.data-\[orientation\=horizontal\]\:h-px[data-orientation=horizontal]{height:1px}.data-\[orientation\=horizontal\]\:w-full[data-orientation=horizontal]{width:100%}.data-\[orientation\=vertical\]\:h-full[data-orientation=vertical]{height:100%}.data-\[orientation\=vertical\]\:min-h-44[data-orientation=vertical]{min-height:calc(var(--spacing) * 44)}.data-\[orientation\=vertical\]\:w-1\.5[data-orientation=vertical]{width:calc(var(--spacing) * 1.5)}.data-\[orientation\=vertical\]\:w-auto[data-orientation=vertical]{width:auto}.data-\[orientation\=vertical\]\:w-full[data-orientation=vertical]{width:100%}.data-\[orientation\=vertical\]\:w-px[data-orientation=vertical]{width:1px}.data-\[orientation\=vertical\]\:flex-col[data-orientation=vertical]{flex-direction:column}.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-\[panel-group-direction\=vertical\]\:flex-col[data-panel-group-direction=vertical]{flex-direction:column}.data-\[panel-group-direction\=vertical\]\:after\:left-0[data-panel-group-direction=vertical]:after{content:var(--tw-content);left:calc(var(--spacing) * 0)}.data-\[panel-group-direction\=vertical\]\:after\:h-1[data-panel-group-direction=vertical]:after{content:var(--tw-content);height:calc(var(--spacing) * 1)}.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-x-0[data-panel-group-direction=vertical]:after{content:var(--tw-content);--tw-translate-x:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[panel-group-direction\=vertical\]\:after\:-translate-y-1\/2[data-panel-group-direction=vertical]:after{content:var(--tw-content);--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[placeholder\]\:text-muted-foreground[data-placeholder]{color:var(--muted-foreground)}.data-\[selected\=true\]\:bg-accent[data-selected=true]{background-color:var(--accent)}.data-\[selected\=true\]\:text-accent-foreground[data-selected=true]{color:var(--accent-foreground)}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y:calc(var(--spacing) * 1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x:calc(var(--spacing) * 1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[size\=default\]\:h-9[data-size=default]{height:calc(var(--spacing) * 9)}.data-\[size\=sm\]\:h-8[data-size=sm]{height:calc(var(--spacing) * 8)}:is(.\*\:data-\[slot\=alert-description\]\:text-destructive\/90>*)[data-slot=alert-description]{color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){:is(.\*\:data-\[slot\=alert-description\]\:text-destructive\/90>*)[data-slot=alert-description]{color:color-mix(in oklab,var(--destructive) 90%,transparent)}}:is(.\*\*\:data-\[slot\=command-input-wrapper\]\:h-12 *)[data-slot=command-input-wrapper]{height:calc(var(--spacing) * 12)}:is(.\*\*\:data-\[slot\=navigation-menu-link\]\:focus\:ring-0 *)[data-slot=navigation-menu-link]:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}:is(.\*\*\:data-\[slot\=navigation-menu-link\]\:focus\:outline-none *)[data-slot=navigation-menu-link]:focus{--tw-outline-style:none;outline-style:none}:is(.\*\:data-\[slot\=select-value\]\:line-clamp-1>*)[data-slot=select-value]{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}:is(.\*\:data-\[slot\=select-value\]\:flex>*)[data-slot=select-value]{display:flex}:is(.\*\:data-\[slot\=select-value\]\:items-center>*)[data-slot=select-value]{align-items:center}:is(.\*\:data-\[slot\=select-value\]\:gap-2>*)[data-slot=select-value]{gap:calc(var(--spacing) * 2)}.data-\[state\=active\]\:bg-card[data-state=active]{background-color:var(--card)}.data-\[state\=active\]\:bg-re-red[data-state=active]{background-color:var(--re-red)}.data-\[state\=active\]\:bg-white[data-state=active]{background-color:var(--color-white)}.data-\[state\=active\]\:text-white[data-state=active]{color:var(--color-white)}.data-\[state\=active\]\:shadow-sm[data-state=active]{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.data-\[state\=checked\]\:translate-x-\[calc\(100\%-2px\)\][data-state=checked]{--tw-translate-x: calc(100% - 2px) ;translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[state\=checked\]\:border-black[data-state=checked]{border-color:var(--color-black)}.data-\[state\=checked\]\:border-emerald-600[data-state=checked]{border-color:var(--color-emerald-600)}.data-\[state\=checked\]\:border-primary[data-state=checked]{border-color:var(--primary)}.data-\[state\=checked\]\:border-purple-600[data-state=checked]{border-color:var(--color-purple-600)}.data-\[state\=checked\]\:border-re-red[data-state=checked]{border-color:var(--re-red)}.data-\[state\=checked\]\:bg-black[data-state=checked]{background-color:var(--color-black)}.data-\[state\=checked\]\:bg-emerald-600[data-state=checked]{background-color:var(--color-emerald-600)}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:var(--primary)}.data-\[state\=checked\]\:bg-purple-600[data-state=checked]{background-color:var(--color-purple-600)}.data-\[state\=checked\]\:bg-re-red[data-state=checked]{background-color:var(--re-red)}.data-\[state\=checked\]\:text-primary-foreground[data-state=checked]{color:var(--primary-foreground)}.data-\[state\=closed\]\:duration-300[data-state=closed]{--tw-duration:.3s;transition-duration:.3s}.data-\[state\=inactive\]\:hidden[data-state=inactive]{display:none}.data-\[state\=on\]\:bg-accent[data-state=on]{background-color:var(--accent)}.data-\[state\=on\]\:text-accent-foreground[data-state=on]{color:var(--accent-foreground)}.data-\[state\=open\]\:bg-accent[data-state=open],.data-\[state\=open\]\:bg-accent\/50[data-state=open]{background-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.data-\[state\=open\]\:bg-accent\/50[data-state=open]{background-color:color-mix(in oklab,var(--accent) 50%,transparent)}}.data-\[state\=open\]\:bg-secondary[data-state=open]{background-color:var(--secondary)}.data-\[state\=open\]\:text-accent-foreground[data-state=open]{color:var(--accent-foreground)}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:var(--muted-foreground)}.data-\[state\=open\]\:opacity-100[data-state=open]{opacity:1}.data-\[state\=open\]\:duration-500[data-state=open]{--tw-duration:.5s;transition-duration:.5s}@media(hover:hover){.data-\[state\=open\]\:hover\:bg-accent[data-state=open]:hover{background-color:var(--accent)}.data-\[state\=open\]\:hover\:bg-sidebar-accent[data-state=open]:hover{background-color:var(--sidebar-accent)}.data-\[state\=open\]\:hover\:text-sidebar-accent-foreground[data-state=open]:hover{color:var(--sidebar-accent-foreground)}}.data-\[state\=open\]\:focus\:bg-accent[data-state=open]:focus{background-color:var(--accent)}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:var(--muted)}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked]{--tw-translate-x:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[state\=unchecked\]\:bg-switch-background[data-state=unchecked]{background-color:var(--switch-background)}.data-\[variant\=destructive\]\:text-destructive[data-variant=destructive]{color:var(--destructive)}.data-\[variant\=destructive\]\:focus\:bg-destructive\/10[data-variant=destructive]:focus{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.data-\[variant\=destructive\]\:focus\:bg-destructive\/10[data-variant=destructive]:focus{background-color:color-mix(in oklab,var(--destructive) 10%,transparent)}}.data-\[variant\=destructive\]\:focus\:text-destructive[data-variant=destructive]:focus{color:var(--destructive)}.data-\[variant\=outline\]\:border-l-0[data-variant=outline]{border-left-style:var(--tw-border-style);border-left-width:0}.data-\[variant\=outline\]\:shadow-xs[data-variant=outline]{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.data-\[variant\=outline\]\:first\:border-l[data-variant=outline]:first-child{border-left-style:var(--tw-border-style);border-left-width:1px}.data-\[vaul-drawer-direction\=bottom\]\:inset-x-0[data-vaul-drawer-direction=bottom]{inset-inline:calc(var(--spacing) * 0)}.data-\[vaul-drawer-direction\=bottom\]\:bottom-0[data-vaul-drawer-direction=bottom]{bottom:calc(var(--spacing) * 0)}.data-\[vaul-drawer-direction\=bottom\]\:mt-24[data-vaul-drawer-direction=bottom]{margin-top:calc(var(--spacing) * 24)}.data-\[vaul-drawer-direction\=bottom\]\:max-h-\[80vh\][data-vaul-drawer-direction=bottom]{max-height:80vh}.data-\[vaul-drawer-direction\=bottom\]\:rounded-t-lg[data-vaul-drawer-direction=bottom]{border-top-left-radius:var(--radius);border-top-right-radius:var(--radius)}.data-\[vaul-drawer-direction\=bottom\]\:border-t[data-vaul-drawer-direction=bottom]{border-top-style:var(--tw-border-style);border-top-width:1px}.data-\[vaul-drawer-direction\=left\]\:inset-y-0[data-vaul-drawer-direction=left]{inset-block:calc(var(--spacing) * 0)}.data-\[vaul-drawer-direction\=left\]\:left-0[data-vaul-drawer-direction=left]{left:calc(var(--spacing) * 0)}.data-\[vaul-drawer-direction\=left\]\:w-3\/4[data-vaul-drawer-direction=left]{width:75%}.data-\[vaul-drawer-direction\=left\]\:border-r[data-vaul-drawer-direction=left]{border-right-style:var(--tw-border-style);border-right-width:1px}.data-\[vaul-drawer-direction\=right\]\:inset-y-0[data-vaul-drawer-direction=right]{inset-block:calc(var(--spacing) * 0)}.data-\[vaul-drawer-direction\=right\]\:right-0[data-vaul-drawer-direction=right]{right:calc(var(--spacing) * 0)}.data-\[vaul-drawer-direction\=right\]\:w-3\/4[data-vaul-drawer-direction=right]{width:75%}.data-\[vaul-drawer-direction\=right\]\:border-l[data-vaul-drawer-direction=right]{border-left-style:var(--tw-border-style);border-left-width:1px}.data-\[vaul-drawer-direction\=top\]\:inset-x-0[data-vaul-drawer-direction=top]{inset-inline:calc(var(--spacing) * 0)}.data-\[vaul-drawer-direction\=top\]\:top-0[data-vaul-drawer-direction=top]{top:calc(var(--spacing) * 0)}.data-\[vaul-drawer-direction\=top\]\:mb-24[data-vaul-drawer-direction=top]{margin-bottom:calc(var(--spacing) * 24)}.data-\[vaul-drawer-direction\=top\]\:max-h-\[80vh\][data-vaul-drawer-direction=top]{max-height:80vh}.data-\[vaul-drawer-direction\=top\]\:rounded-b-lg[data-vaul-drawer-direction=top]{border-bottom-right-radius:var(--radius);border-bottom-left-radius:var(--radius)}.data-\[vaul-drawer-direction\=top\]\:border-b[data-vaul-drawer-direction=top]{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}@media(min-width:40rem){.sm\:order-1{order:1}.sm\:order-2{order:2}.sm\:-mx-6{margin-inline:calc(var(--spacing) * -6)}.sm\:block{display:block}.sm\:flex{display:flex}.sm\:inline{display:inline}.sm\:w-auto{width:auto}.sm\:\!max-w-\[80vw\]{max-width:80vw!important}.sm\:max-w-2xl{max-width:var(--container-2xl)}.sm\:max-w-7xl{max-width:var(--container-7xl)}.sm\:max-w-\[460px\]{max-width:460px}.sm\:max-w-\[480px\]{max-width:480px}.sm\:max-w-\[500px\]{max-width:500px}.sm\:max-w-lg{max-width:var(--container-lg)}.sm\:max-w-md{max-width:var(--container-md)}.sm\:max-w-sm{max-width:var(--container-sm)}.sm\:flex-1{flex:1}.sm\:flex-none{flex:none}.sm\:shrink-0{flex-shrink:0}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:justify-between{justify-content:space-between}.sm\:justify-end{justify-content:flex-end}.sm\:gap-0{gap:calc(var(--spacing) * 0)}.sm\:gap-2\.5{gap:calc(var(--spacing) * 2.5)}.sm\:p-6{padding:calc(var(--spacing) * 6)}.sm\:px-2{padding-inline:calc(var(--spacing) * 2)}.sm\:px-6{padding-inline:calc(var(--spacing) * 6)}.sm\:py-5{padding-block:calc(var(--spacing) * 5)}.sm\:pt-6{padding-top:calc(var(--spacing) * 6)}.sm\:pr-2\.5{padding-right:calc(var(--spacing) * 2.5)}.sm\:pl-2\.5{padding-left:calc(var(--spacing) * 2.5)}.sm\:text-left{text-align:left}.sm\:text-\[11px\]{font-size:11px}.data-\[vaul-drawer-direction\=left\]\:sm\:max-w-sm[data-vaul-drawer-direction=left],.data-\[vaul-drawer-direction\=right\]\:sm\:max-w-sm[data-vaul-drawer-direction=right]{max-width:var(--container-sm)}}@media(min-width:48rem){.md\:absolute{position:absolute}.md\:static{position:static}.md\:col-span-2{grid-column:span 2/span 2}.md\:col-span-4{grid-column:span 4/span 4}.md\:col-span-6{grid-column:span 6/span 6}.md\:mt-8{margin-top:calc(var(--spacing) * 8)}.md\:mr-2{margin-right:calc(var(--spacing) * 2)}.md\:block{display:block}.md\:flex{display:flex}.md\:inline{display:inline}.md\:h-12{height:calc(var(--spacing) * 12)}.md\:w-36{width:calc(var(--spacing) * 36)}.md\:w-40{width:calc(var(--spacing) * 40)}.md\:w-48{width:calc(var(--spacing) * 48)}.md\:w-\[var\(--radix-navigation-menu-viewport-width\)\]{width:var(--radix-navigation-menu-viewport-width)}.md\:w-auto{width:auto}.md\:max-w-3xl{max-width:var(--container-3xl)}.md\:max-w-\[300px\]{max-width:300px}.md\:flex-initial{flex:0 auto}.md\:flex-none{flex:none}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.md\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}.md\:border-transparent{border-color:#0000}.md\:bg-transparent{background-color:#0000}.md\:p-16{padding:calc(var(--spacing) * 16)}.md\:px-12{padding-inline:calc(var(--spacing) * 12)}.md\:pl-16{padding-left:calc(var(--spacing) * 16)}.md\:text-right{text-align:right}.md\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.md\:opacity-0{opacity:0}.md\:shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.md\:peer-data-\[variant\=inset\]\:m-2:is(:where(.peer)[data-variant=inset]~*){margin:calc(var(--spacing) * 2)}.md\:peer-data-\[variant\=inset\]\:ml-0:is(:where(.peer)[data-variant=inset]~*){margin-left:calc(var(--spacing) * 0)}.md\:peer-data-\[variant\=inset\]\:rounded-xl:is(:where(.peer)[data-variant=inset]~*){border-radius:calc(var(--radius) + 4px)}.md\:peer-data-\[variant\=inset\]\:shadow-sm:is(:where(.peer)[data-variant=inset]~*){--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.md\:peer-data-\[variant\=inset\]\:peer-data-\[state\=collapsed\]\:ml-2:is(:where(.peer)[data-variant=inset]~*):is(:where(.peer)[data-state=collapsed]~*){margin-left:calc(var(--spacing) * 2)}.md\:after\:hidden:after{content:var(--tw-content);display:none}}@media(min-width:64rem){.lg\:col-span-2{grid-column:span 2/span 2}.lg\:col-span-3{grid-column:span 3/span 3}.lg\:col-span-4{grid-column:span 4/span 4}.lg\:col-span-5{grid-column:span 5/span 5}.lg\:flex{display:flex}.lg\:w-48{width:calc(var(--spacing) * 48)}.lg\:w-\[320px\]{width:320px}.lg\:max-w-4xl{max-width:var(--container-4xl)}.lg\:max-w-7xl{max-width:var(--container-7xl)}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.lg\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.lg\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.lg\:flex-row{flex-direction:row}.lg\:border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.lg\:pl-8{padding-left:calc(var(--spacing) * 8)}}@media(min-width:80rem){.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}.dark\:border-input:is(.dark *){border-color:var(--input)}.dark\:bg-destructive\/60:is(.dark *){background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\:bg-destructive\/60:is(.dark *){background-color:color-mix(in oklab,var(--destructive) 60%,transparent)}}.dark\:bg-input\/30:is(.dark *){background-color:var(--input)}@supports (color:color-mix(in lab,red,red)){.dark\:bg-input\/30:is(.dark *){background-color:color-mix(in oklab,var(--input) 30%,transparent)}}.dark\:text-muted-foreground:is(.dark *){color:var(--muted-foreground)}@media(hover:hover){.dark\:hover\:bg-accent\/50:is(.dark *):hover{background-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-accent\/50:is(.dark *):hover{background-color:color-mix(in oklab,var(--accent) 50%,transparent)}}.dark\:hover\:bg-input\/50:is(.dark *):hover{background-color:var(--input)}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-input\/50:is(.dark *):hover{background-color:color-mix(in oklab,var(--input) 50%,transparent)}}}.dark\:focus-visible\:ring-destructive\/40:is(.dark *):focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\:focus-visible\:ring-destructive\/40:is(.dark *):focus-visible{--tw-ring-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.dark\:aria-invalid\:ring-destructive\/40:is(.dark *)[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\:aria-invalid\:ring-destructive\/40:is(.dark *)[aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.dark\:data-\[active\=true\]\:aria-invalid\:ring-destructive\/40:is(.dark *)[data-active=true][aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\:data-\[active\=true\]\:aria-invalid\:ring-destructive\/40:is(.dark *)[data-active=true][aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.dark\:data-\[state\=active\]\:border-input:is(.dark *)[data-state=active]{border-color:var(--input)}.dark\:data-\[state\=active\]\:bg-input\/30:is(.dark *)[data-state=active]{background-color:var(--input)}@supports (color:color-mix(in lab,red,red)){.dark\:data-\[state\=active\]\:bg-input\/30:is(.dark *)[data-state=active]{background-color:color-mix(in oklab,var(--input) 30%,transparent)}}.dark\:data-\[state\=active\]\:text-foreground:is(.dark *)[data-state=active]{color:var(--foreground)}.dark\:data-\[state\=checked\]\:bg-primary:is(.dark *)[data-state=checked]{background-color:var(--primary)}.dark\:data-\[state\=checked\]\:bg-primary-foreground:is(.dark *)[data-state=checked]{background-color:var(--primary-foreground)}.dark\:data-\[state\=unchecked\]\:bg-card-foreground:is(.dark *)[data-state=unchecked]{background-color:var(--card-foreground)}.dark\:data-\[state\=unchecked\]\:bg-input\/80:is(.dark *)[data-state=unchecked]{background-color:var(--input)}@supports (color:color-mix(in lab,red,red)){.dark\:data-\[state\=unchecked\]\:bg-input\/80:is(.dark *)[data-state=unchecked]{background-color:color-mix(in oklab,var(--input) 80%,transparent)}}.dark\:data-\[variant\=destructive\]\:focus\:bg-destructive\/20:is(.dark *)[data-variant=destructive]:focus{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\:data-\[variant\=destructive\]\:focus\:bg-destructive\/20:is(.dark *)[data-variant=destructive]:focus{background-color:color-mix(in oklab,var(--destructive) 20%,transparent)}}.\[\&_\.ql-container\]\:border-0 .ql-container{border-style:var(--tw-border-style);border-width:0}.\[\&_\.ql-editor\]\:min-h-\[380px\] .ql-editor{min-height:380px}.\[\&_\.ql-editor\]\:text-sm .ql-editor{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.ql-editor\]\:text-slate-900 .ql-editor{color:var(--color-slate-900)}.\[\&_\.ql-toolbar\]\:border-slate-200 .ql-toolbar{border-color:var(--color-slate-200)}.\[\&_\.ql-toolbar\]\:bg-slate-50 .ql-toolbar{background-color:var(--color-slate-50)}.\[\&_\.recharts-cartesian-axis-tick_text\]\:fill-muted-foreground .recharts-cartesian-axis-tick text{fill:var(--muted-foreground)}.\[\&_\.recharts-cartesian-grid_line\[stroke\=\'\#ccc\'\]\]\:stroke-border\/50 .recharts-cartesian-grid line[stroke="#ccc"]{stroke:var(--border)}@supports (color:color-mix(in lab,red,red)){.\[\&_\.recharts-cartesian-grid_line\[stroke\=\'\#ccc\'\]\]\:stroke-border\/50 .recharts-cartesian-grid line[stroke="#ccc"]{stroke:color-mix(in oklab,var(--border) 50%,transparent)}}.\[\&_\.recharts-curve\.recharts-tooltip-cursor\]\:stroke-border .recharts-curve.recharts-tooltip-cursor{stroke:var(--border)}.\[\&_\.recharts-dot\[stroke\=\'\#fff\'\]\]\:stroke-transparent .recharts-dot[stroke="#fff"]{stroke:#0000}.\[\&_\.recharts-layer\]\:outline-hidden .recharts-layer{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.\[\&_\.recharts-layer\]\:outline-hidden .recharts-layer{outline-offset:2px;outline:2px solid #0000}}.\[\&_\.recharts-polar-grid_\[stroke\=\'\#ccc\'\]\]\:stroke-border .recharts-polar-grid [stroke="#ccc"]{stroke:var(--border)}.\[\&_\.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:var(--muted)}.\[\&_\.recharts-reference-line_\[stroke\=\'\#ccc\'\]\]\:stroke-border .recharts-reference-line [stroke="#ccc"]{stroke:var(--border)}.\[\&_\.recharts-sector\]\:outline-hidden .recharts-sector{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.\[\&_\.recharts-sector\]\:outline-hidden .recharts-sector{outline-offset:2px;outline:2px solid #0000}}.\[\&_\.recharts-sector\[stroke\=\'\#fff\'\]\]\:stroke-transparent .recharts-sector[stroke="#fff"]{stroke:#0000}.\[\&_\.recharts-surface\]\:outline-hidden .recharts-surface{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.\[\&_\.recharts-surface\]\:outline-hidden .recharts-surface{outline-offset:2px;outline:2px solid #0000}}.\[\&_\[cmdk-group-heading\]\]\:px-2 [cmdk-group-heading]{padding-inline:calc(var(--spacing) * 2)}.\[\&_\[cmdk-group-heading\]\]\:py-1\.5 [cmdk-group-heading]{padding-block:calc(var(--spacing) * 1.5)}.\[\&_\[cmdk-group-heading\]\]\:text-xs [cmdk-group-heading]{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\[cmdk-group-heading\]\]\:font-medium [cmdk-group-heading]{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\[cmdk-group-heading\]\]\:text-muted-foreground [cmdk-group-heading]{color:var(--muted-foreground)}.\[\&_\[cmdk-group\]\]\:px-2 [cmdk-group]{padding-inline:calc(var(--spacing) * 2)}.\[\&_\[cmdk-group\]\:not\(\[hidden\]\)_\~\[cmdk-group\]\]\:pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:calc(var(--spacing) * 0)}.\[\&_\[cmdk-input-wrapper\]_svg\]\:h-5 [cmdk-input-wrapper] svg{height:calc(var(--spacing) * 5)}.\[\&_\[cmdk-input-wrapper\]_svg\]\:w-5 [cmdk-input-wrapper] svg{width:calc(var(--spacing) * 5)}.\[\&_\[cmdk-input\]\]\:h-12 [cmdk-input]{height:calc(var(--spacing) * 12)}.\[\&_\[cmdk-item\]\]\:px-2 [cmdk-item]{padding-inline:calc(var(--spacing) * 2)}.\[\&_\[cmdk-item\]\]\:py-3 [cmdk-item]{padding-block:calc(var(--spacing) * 3)}.\[\&_\[cmdk-item\]_svg\]\:h-5 [cmdk-item] svg{height:calc(var(--spacing) * 5)}.\[\&_\[cmdk-item\]_svg\]\:w-5 [cmdk-item] svg{width:calc(var(--spacing) * 5)}.\[\&_p\]\:leading-relaxed p{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-4 svg:not([class*=size-]){width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&_svg\:not\(\[class\*\=\'text-\'\]\)\]\:text-muted-foreground svg:not([class*=text-]){color:var(--muted-foreground)}.\[\&_tr\]\:border-b tr{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-style:var(--tw-border-style);border-width:0}.\[\&\:\:-webkit-inner-spin-button\]\:appearance-none::-webkit-inner-spin-button{-webkit-appearance:none;-moz-appearance:none;appearance:none}.\[\&\:\:-webkit-outer-spin-button\]\:appearance-none::-webkit-outer-spin-button{-webkit-appearance:none;-moz-appearance:none;appearance:none}.\[\&\:has\(\>\.day-range-end\)\]\:rounded-r-md:has(>.day-range-end){border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\>\.day-range-start\)\]\:rounded-l-md:has(>.day-range-start){border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[aria-selected\]\)\]\:rounded-md:has([aria-selected]){border-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[aria-selected\]\)\]\:bg-accent:has([aria-selected]){background-color:var(--accent)}.first\:\[\&\:has\(\[aria-selected\]\)\]\:rounded-l-md:first-child:has([aria-selected]){border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.last\:\[\&\:has\(\[aria-selected\]\)\]\:rounded-r-md:last-child:has([aria-selected]),.\[\&\:has\(\[aria-selected\]\.day-range-end\)\]\:rounded-r-md:has([aria-selected].day-range-end){border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:calc(var(--spacing) * 0)}.\[\.border-b\]\:pb-6.border-b{padding-bottom:calc(var(--spacing) * 6)}.\[\.border-t\]\:pt-6.border-t{padding-top:calc(var(--spacing) * 6)}:is(.\*\:\[span\]\:last\:flex>*):is(span):last-child{display:flex}:is(.\*\:\[span\]\:last\:items-center>*):is(span):last-child{align-items:center}:is(.\*\:\[span\]\:last\:gap-2>*):is(span):last-child{gap:calc(var(--spacing) * 2)}:is(.data-\[variant\=destructive\]\:\*\:\[svg\]\:\!text-destructive[data-variant=destructive]>*):is(svg){color:var(--destructive)!important}.\[\&\:last-child\]\:pb-6:last-child{padding-bottom:calc(var(--spacing) * 6)}.\[\&\>\[role\=checkbox\]\]\:translate-y-\[2px\]>[role=checkbox]{--tw-translate-y:2px;translate:var(--tw-translate-x) var(--tw-translate-y)}.\[\&\>button\]\:hidden>button{display:none}.\[\&\>button\]\:text-white>button{color:var(--color-white)}.\[\&\>button\]\:opacity-100>button{opacity:1}.\[\&\>span\:last-child\]\:truncate>span:last-child{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.\[\&\>svg\]\:pointer-events-none>svg{pointer-events:none}.\[\&\>svg\]\:size-3>svg{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.\[\&\>svg\]\:size-3\.5>svg{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.\[\&\>svg\]\:size-4>svg{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&\>svg\]\:h-2\.5>svg{height:calc(var(--spacing) * 2.5)}.\[\&\>svg\]\:h-3>svg{height:calc(var(--spacing) * 3)}.\[\&\>svg\]\:w-2\.5>svg{width:calc(var(--spacing) * 2.5)}.\[\&\>svg\]\:w-3>svg{width:calc(var(--spacing) * 3)}.\[\&\>svg\]\:shrink-0>svg{flex-shrink:0}.\[\&\>svg\]\:translate-y-0\.5>svg{--tw-translate-y:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.\[\&\>svg\]\:text-current>svg{color:currentColor}.\[\&\>svg\]\:text-muted-foreground>svg{color:var(--muted-foreground)}.\[\&\>svg\]\:text-sidebar-accent-foreground>svg{color:var(--sidebar-accent-foreground)}.\[\&\>tr\]\:last\:border-b-0>tr:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.\[\&\[data-panel-group-direction\=vertical\]\>div\]\:rotate-90[data-panel-group-direction=vertical]>div{rotate:90deg}.\[\&\[data-state\=open\]\>svg\]\:rotate-180[data-state=open]>svg{rotate:180deg}[data-side=left][data-collapsible=offcanvas] .\[\[data-side\=left\]\[data-collapsible\=offcanvas\]_\&\]\:-right-2{right:calc(var(--spacing) * -2)}[data-side=left][data-state=collapsed] .\[\[data-side\=left\]\[data-state\=collapsed\]_\&\]\:cursor-e-resize{cursor:e-resize}[data-side=right][data-collapsible=offcanvas] .\[\[data-side\=right\]\[data-collapsible\=offcanvas\]_\&\]\:-left-2{left:calc(var(--spacing) * -2)}[data-side=right][data-state=collapsed] .\[\[data-side\=right\]\[data-state\=collapsed\]_\&\]\:cursor-w-resize{cursor:w-resize}@media(hover:hover){a.\[a\&\]\:hover\:bg-accent:hover{background-color:var(--accent)}a.\[a\&\]\:hover\:bg-destructive\/90:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){a.\[a\&\]\:hover\:bg-destructive\/90:hover{background-color:color-mix(in oklab,var(--destructive) 90%,transparent)}}a.\[a\&\]\:hover\:bg-primary\/90:hover{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){a.\[a\&\]\:hover\:bg-primary\/90:hover{background-color:color-mix(in oklab,var(--primary) 90%,transparent)}}a.\[a\&\]\:hover\:bg-secondary\/90:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab,red,red)){a.\[a\&\]\:hover\:bg-secondary\/90:hover{background-color:color-mix(in oklab,var(--secondary) 90%,transparent)}}a.\[a\&\]\:hover\:text-accent-foreground:hover{color:var(--accent-foreground)}}.bg-status-progress{background-color:var(--status-in-progress)}.hover\:bg-status-progress-hover:hover{background-color:var(--status-in-progress-hover)}.text-status-progress{color:var(--status-in-progress)}.text-status-progress-muted{color:var(--status-in-progress-hover)}.text-status-progress-strong{color:#92400e}.bg-status-progress-soft{background-color:#fffbeb}.border-status-progress{border-color:#fde68a}.bg-status-workflow-icon{color:var(--status-in-progress);background-color:#fef3c7}.bg-status-workflow-panel{background-color:#fffbeb;border-color:#fde68a}.border-status-workflow-panel{border-color:#fde68a}.bg-status-workflow-badge{color:#b45309;background-color:#fef3c7;border-color:#fcd34d}.bg-status-workflow-active{background-color:var(--status-in-progress);border-color:var(--status-in-progress)}.ring-status-workflow-active{--tw-ring-color:var(--status-in-progress)}.btn-re-primary,button.bg-amber-600,a.bg-amber-600,[data-slot=button].bg-amber-600{color:#fff;background-color:var(--color-re-red)!important}.btn-re-primary:hover,button.bg-amber-600:hover,button.hover\:bg-amber-700:hover,a.bg-amber-600:hover,a.hover\:bg-amber-700:hover{background-color:var(--color-re-red-hover)!important}.bg-amber-600:not(.bg-status-progress):not(.bg-status-workflow-active):not(.bg-status-workflow-badge):not(.bg-status-workflow-icon){background-color:var(--color-re-red)!important}.hover\:bg-amber-700:hover:not(.hover\:bg-status-progress-hover){background-color:var(--color-re-red-hover)!important}}:root{--font-size:16px;--background:#fff;--foreground:oklch(14.5% 0 0);--card:#fff;--card-foreground:oklch(14.5% 0 0);--popover:oklch(100% 0 0);--popover-foreground:oklch(14.5% 0 0);--primary:#da291c;--primary-600:#da291c;--primary-700:#b82216;--primary-50:#fef2f2;--primary-foreground:oklch(100% 0 0);--secondary:oklch(95% .0058 264.53);--secondary-foreground:#030213;--muted:#ececf0;--muted-foreground:#717182;--accent:#e9ebef;--accent-foreground:#030213;--destructive:#d4183d;--destructive-foreground:#fff;--border:#0000001a;--input:transparent;--input-background:#f3f3f5;--switch-background:#cbced4;--font-weight-medium:500;--font-weight-normal:400;--ring:oklch(70.8% 0 0);--chart-1:oklch(64.6% .222 41.116);--chart-2:oklch(60% .118 184.704);--chart-3:oklch(39.8% .07 227.392);--chart-4:oklch(82.8% .189 84.429);--chart-5:oklch(76.9% .188 70.08);--radius:.625rem;--sidebar:oklch(98.5% 0 0);--sidebar-foreground:oklch(14.5% 0 0);--sidebar-primary:#030213;--sidebar-primary-foreground:oklch(98.5% 0 0);--sidebar-accent:oklch(97% 0 0);--sidebar-accent-foreground:oklch(20.5% 0 0);--sidebar-border:oklch(92.2% 0 0);--sidebar-ring:oklch(70.8% 0 0);--re-red:#da291c;--re-red-hover:#b82216;--re-black:#000;--re-white:#fff;--re-gray:#717171;--status-in-progress:#d97706;--status-in-progress-hover:#b45309;--status-success:#16a34a;--status-success-hover:#15803d;--status-negative:var(--re-red);--status-negative-hover:var(--re-red-hover)}.dark{--background:oklch(14.5% 0 0);--foreground:oklch(98.5% 0 0);--card:oklch(14.5% 0 0);--card-foreground:oklch(98.5% 0 0);--popover:oklch(14.5% 0 0);--popover-foreground:oklch(98.5% 0 0);--primary:oklch(98.5% 0 0);--primary-foreground:oklch(20.5% 0 0);--secondary:oklch(26.9% 0 0);--secondary-foreground:oklch(98.5% 0 0);--muted:oklch(26.9% 0 0);--muted-foreground:oklch(70.8% 0 0);--accent:oklch(26.9% 0 0);--accent-foreground:oklch(98.5% 0 0);--destructive:oklch(39.6% .141 25.723);--destructive-foreground:oklch(63.7% .237 25.331);--border:oklch(26.9% 0 0);--input:oklch(26.9% 0 0);--ring:oklch(43.9% 0 0);--font-weight-medium:500;--font-weight-normal:400;--chart-1:oklch(48.8% .243 264.376);--chart-2:oklch(69.6% .17 162.48);--chart-3:oklch(76.9% .188 70.08);--chart-4:oklch(62.7% .265 303.9);--chart-5:oklch(64.5% .246 16.439);--sidebar:oklch(20.5% 0 0);--sidebar-foreground:oklch(98.5% 0 0);--sidebar-primary:oklch(48.8% .243 264.376);--sidebar-primary-foreground:oklch(98.5% 0 0);--sidebar-accent:oklch(26.9% 0 0);--sidebar-accent-foreground:oklch(98.5% 0 0);--sidebar-border:oklch(26.9% 0 0);--sidebar-ring:oklch(43.9% 0 0)}.re-heading{text-transform:uppercase;letter-spacing:.1em;font-family:Montserrat,sans-serif;font-weight:700}.re-card{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-slate-200);background-color:var(--color-white);--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-radius:0}.re-input{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-slate-300);width:100%;padding-inline:calc(var(--spacing) * 4);padding-block:calc(var(--spacing) * 3);font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration));--tw-duration:.2s;--tw-outline-style:none;border-radius:0;outline-style:none;transition-duration:.2s}.re-input:focus{border-color:var(--color-red-600);--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-ring-color:#e4001433}@supports (color:color-mix(in lab,red,red)){.re-input:focus{--tw-ring-color:color-mix(in oklab, var(--color-red-600) 20%, transparent)}}.re-label{margin-bottom:calc(var(--spacing) * 1.5);font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold);--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide);color:var(--color-slate-800);text-transform:uppercase;display:block}.re-btn-primary{background-color:var(--color-black);padding-inline:calc(var(--spacing) * 8);padding-block:calc(var(--spacing) * 3);--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold);--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest);color:var(--color-white);text-transform:uppercase;transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}@media(hover:hover){.re-btn-primary:hover{background-color:var(--color-slate-900)}}.re-btn-primary:active{scale:.98}.re-btn-outline{border-style:var(--tw-border-style);border-width:2px;border-color:var(--color-black);padding-inline:calc(var(--spacing) * 8);padding-block:calc(var(--spacing) * 3);--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold);--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest);color:var(--color-black);text-transform:uppercase;transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}@media(hover:hover){.re-btn-outline:hover{background-color:var(--color-black);color:var(--color-white)}}.re-btn-outline:active{scale:.98}.re-intro-text{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed);color:var(--color-slate-700)}.re-disclaimer{border-left-style:var(--tw-border-style);border-left-width:4px;border-color:var(--color-red-600);background-color:var(--color-slate-50);padding:calc(var(--spacing) * 4);font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));color:var(--color-slate-600);font-style:italic}html{font-size:var(--font-size)}.custom-scrollbar::-webkit-scrollbar{width:3px}.custom-scrollbar::-webkit-scrollbar-track{background:0 0}.custom-scrollbar::-webkit-scrollbar-thumb{background:#e2e8f0;border-radius:10px}.custom-scrollbar::-webkit-scrollbar-thumb:hover{background:#cbd5e1}.custom-scrollbar{scrollbar-width:thin;scrollbar-color:#e2e8f0 transparent}.custom-scrollbar-x::-webkit-scrollbar{height:2px}.custom-scrollbar-x::-webkit-scrollbar-track{background:0 0}.custom-scrollbar-x::-webkit-scrollbar-thumb{background:#f1f5f9;border-radius:9999px}.custom-scrollbar-x::-webkit-scrollbar-thumb:hover{background:#e2e8f0}.custom-scrollbar-x{scrollbar-width:thin;scrollbar-color:#f1f5f9 transparent}.custom-scrollbar-x-slim::-webkit-scrollbar{height:2px}.custom-scrollbar-x-slim::-webkit-scrollbar-track{background:0 0}.custom-scrollbar-x-slim::-webkit-scrollbar-thumb{background:#f8fafc;border-radius:9999px}.custom-scrollbar-x-slim::-webkit-scrollbar-thumb:hover{background:#f1f5f9}.custom-scrollbar-x-slim{scrollbar-width:thin;scrollbar-color:#f8fafc transparent}.custom-scrollbar-slim::-webkit-scrollbar{width:2px}.custom-scrollbar-slim::-webkit-scrollbar-track{background:0 0}.custom-scrollbar-slim::-webkit-scrollbar-thumb{background:#f1f5f9;border-radius:9999px}.custom-scrollbar-slim::-webkit-scrollbar-thumb:hover{background:#e2e8f0}.custom-scrollbar-slim{scrollbar-width:thin;scrollbar-color:#f1f5f9 transparent}.no-native-password-reveal::-ms-reveal{display:none}.no-native-password-reveal::-ms-clear{display:none}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}@keyframes bounce{0%,to{animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}} diff --git a/build/assets/index-DqVo88us.css b/build/assets/index-DqVo88us.css new file mode 100644 index 0000000..7f4685d --- /dev/null +++ b/build/assets/index-DqVo88us.css @@ -0,0 +1,6 @@ +@import"https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Public+Sans:ital,wght@0,100..900;1,100..900&display=swap";/*! +* Quill Editor v1.3.7 +* https://quilljs.com/ +* Copyright (c) 2014, Jason Chen +* Copyright (c) 2013, salesforce.com +*/.ql-container{box-sizing:border-box;font-family:Helvetica,Arial,sans-serif;font-size:13px;height:100%;margin:0;position:relative}.ql-container.ql-disabled .ql-tooltip{visibility:hidden}.ql-container.ql-disabled .ql-editor ul[data-checked]>li:before{pointer-events:none}.ql-clipboard{left:-100000px;height:1px;overflow-y:hidden;position:absolute;top:50%}.ql-clipboard p{margin:0;padding:0}.ql-editor{box-sizing:border-box;line-height:1.42;height:100%;outline:none;overflow-y:auto;padding:12px 15px;-o-tab-size:4;tab-size:4;-moz-tab-size:4;text-align:left;white-space:pre-wrap;word-wrap:break-word}.ql-editor>*{cursor:text}.ql-editor p,.ql-editor ol,.ql-editor ul,.ql-editor pre,.ql-editor blockquote,.ql-editor h1,.ql-editor h2,.ql-editor h3,.ql-editor h4,.ql-editor h5,.ql-editor h6{margin:0;padding:0;counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol,.ql-editor ul{padding-left:1.5em}.ql-editor ol>li,.ql-editor ul>li{list-style-type:none}.ql-editor ul>li:before{content:"•"}.ql-editor ul[data-checked=true],.ql-editor ul[data-checked=false]{pointer-events:none}.ql-editor ul[data-checked=true]>li *,.ql-editor ul[data-checked=false]>li *{pointer-events:all}.ql-editor ul[data-checked=true]>li:before,.ql-editor ul[data-checked=false]>li:before{color:#777;cursor:pointer;pointer-events:all}.ql-editor ul[data-checked=true]>li:before{content:"☑"}.ql-editor ul[data-checked=false]>li:before{content:"☐"}.ql-editor li:before{display:inline-block;white-space:nowrap;width:1.2em}.ql-editor li:not(.ql-direction-rtl):before{margin-left:-1.5em;margin-right:.3em;text-align:right}.ql-editor li.ql-direction-rtl:before{margin-left:.3em;margin-right:-1.5em}.ql-editor ol li:not(.ql-direction-rtl),.ql-editor ul li:not(.ql-direction-rtl){padding-left:1.5em}.ql-editor ol li.ql-direction-rtl,.ql-editor ul li.ql-direction-rtl{padding-right:1.5em}.ql-editor ol li{counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;counter-increment:list-0}.ql-editor ol li:before{content:counter(list-0,decimal) ". "}.ql-editor ol li.ql-indent-1{counter-increment:list-1}.ql-editor ol li.ql-indent-1:before{content:counter(list-1,lower-alpha) ". "}.ql-editor ol li.ql-indent-1{counter-reset:list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-2{counter-increment:list-2}.ql-editor ol li.ql-indent-2:before{content:counter(list-2,lower-roman) ". "}.ql-editor ol li.ql-indent-2{counter-reset:list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-3{counter-increment:list-3}.ql-editor ol li.ql-indent-3:before{content:counter(list-3,decimal) ". "}.ql-editor ol li.ql-indent-3{counter-reset:list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-4{counter-increment:list-4}.ql-editor ol li.ql-indent-4:before{content:counter(list-4,lower-alpha) ". "}.ql-editor ol li.ql-indent-4{counter-reset:list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-5{counter-increment:list-5}.ql-editor ol li.ql-indent-5:before{content:counter(list-5,lower-roman) ". "}.ql-editor ol li.ql-indent-5{counter-reset:list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-6{counter-increment:list-6}.ql-editor ol li.ql-indent-6:before{content:counter(list-6,decimal) ". "}.ql-editor ol li.ql-indent-6{counter-reset:list-7 list-8 list-9}.ql-editor ol li.ql-indent-7{counter-increment:list-7}.ql-editor ol li.ql-indent-7:before{content:counter(list-7,lower-alpha) ". "}.ql-editor ol li.ql-indent-7{counter-reset:list-8 list-9}.ql-editor ol li.ql-indent-8{counter-increment:list-8}.ql-editor ol li.ql-indent-8:before{content:counter(list-8,lower-roman) ". "}.ql-editor ol li.ql-indent-8{counter-reset:list-9}.ql-editor ol li.ql-indent-9{counter-increment:list-9}.ql-editor ol li.ql-indent-9:before{content:counter(list-9,decimal) ". "}.ql-editor .ql-indent-1:not(.ql-direction-rtl){padding-left:3em}.ql-editor li.ql-indent-1:not(.ql-direction-rtl){padding-left:4.5em}.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:3em}.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:4.5em}.ql-editor .ql-indent-2:not(.ql-direction-rtl){padding-left:6em}.ql-editor li.ql-indent-2:not(.ql-direction-rtl){padding-left:7.5em}.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:6em}.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:7.5em}.ql-editor .ql-indent-3:not(.ql-direction-rtl){padding-left:9em}.ql-editor li.ql-indent-3:not(.ql-direction-rtl){padding-left:10.5em}.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:9em}.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:10.5em}.ql-editor .ql-indent-4:not(.ql-direction-rtl){padding-left:12em}.ql-editor li.ql-indent-4:not(.ql-direction-rtl){padding-left:13.5em}.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:12em}.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:13.5em}.ql-editor .ql-indent-5:not(.ql-direction-rtl){padding-left:15em}.ql-editor li.ql-indent-5:not(.ql-direction-rtl){padding-left:16.5em}.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:15em}.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:16.5em}.ql-editor .ql-indent-6:not(.ql-direction-rtl){padding-left:18em}.ql-editor li.ql-indent-6:not(.ql-direction-rtl){padding-left:19.5em}.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:18em}.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:19.5em}.ql-editor .ql-indent-7:not(.ql-direction-rtl){padding-left:21em}.ql-editor li.ql-indent-7:not(.ql-direction-rtl){padding-left:22.5em}.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:21em}.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:22.5em}.ql-editor .ql-indent-8:not(.ql-direction-rtl){padding-left:24em}.ql-editor li.ql-indent-8:not(.ql-direction-rtl){padding-left:25.5em}.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:24em}.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:25.5em}.ql-editor .ql-indent-9:not(.ql-direction-rtl){padding-left:27em}.ql-editor li.ql-indent-9:not(.ql-direction-rtl){padding-left:28.5em}.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:27em}.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:28.5em}.ql-editor .ql-video{display:block;max-width:100%}.ql-editor .ql-video.ql-align-center{margin:0 auto}.ql-editor .ql-video.ql-align-right{margin:0 0 0 auto}.ql-editor .ql-bg-black{background-color:#000}.ql-editor .ql-bg-red{background-color:#e60000}.ql-editor .ql-bg-orange{background-color:#f90}.ql-editor .ql-bg-yellow{background-color:#ff0}.ql-editor .ql-bg-green{background-color:#008a00}.ql-editor .ql-bg-blue{background-color:#06c}.ql-editor .ql-bg-purple{background-color:#93f}.ql-editor .ql-color-white{color:#fff}.ql-editor .ql-color-red{color:#e60000}.ql-editor .ql-color-orange{color:#f90}.ql-editor .ql-color-yellow{color:#ff0}.ql-editor .ql-color-green{color:#008a00}.ql-editor .ql-color-blue{color:#06c}.ql-editor .ql-color-purple{color:#93f}.ql-editor .ql-font-serif{font-family:Georgia,Times New Roman,serif}.ql-editor .ql-font-monospace{font-family:Monaco,Courier New,monospace}.ql-editor .ql-size-small{font-size:.75em}.ql-editor .ql-size-large{font-size:1.5em}.ql-editor .ql-size-huge{font-size:2.5em}.ql-editor .ql-direction-rtl{direction:rtl;text-align:inherit}.ql-editor .ql-align-center{text-align:center}.ql-editor .ql-align-justify{text-align:justify}.ql-editor .ql-align-right{text-align:right}.ql-editor.ql-blank:before{color:#0009;content:attr(data-placeholder);font-style:italic;left:15px;pointer-events:none;position:absolute;right:15px}.ql-snow.ql-toolbar:after,.ql-snow .ql-toolbar:after{clear:both;content:"";display:table}.ql-snow.ql-toolbar button,.ql-snow .ql-toolbar button{background:none;border:none;cursor:pointer;display:inline-block;float:left;height:24px;padding:3px 5px;width:28px}.ql-snow.ql-toolbar button svg,.ql-snow .ql-toolbar button svg{float:left;height:100%}.ql-snow.ql-toolbar button:active:hover,.ql-snow .ql-toolbar button:active:hover{outline:none}.ql-snow.ql-toolbar input.ql-image[type=file],.ql-snow .ql-toolbar input.ql-image[type=file]{display:none}.ql-snow.ql-toolbar button:hover,.ql-snow .ql-toolbar button:hover,.ql-snow.ql-toolbar button:focus,.ql-snow .ql-toolbar button:focus,.ql-snow.ql-toolbar button.ql-active,.ql-snow .ql-toolbar button.ql-active,.ql-snow.ql-toolbar .ql-picker-label:hover,.ql-snow .ql-toolbar .ql-picker-label:hover,.ql-snow.ql-toolbar .ql-picker-label.ql-active,.ql-snow .ql-toolbar .ql-picker-label.ql-active,.ql-snow.ql-toolbar .ql-picker-item:hover,.ql-snow .ql-toolbar .ql-picker-item:hover,.ql-snow.ql-toolbar .ql-picker-item.ql-selected,.ql-snow .ql-toolbar .ql-picker-item.ql-selected{color:#06c}.ql-snow.ql-toolbar button:hover .ql-fill,.ql-snow .ql-toolbar button:hover .ql-fill,.ql-snow.ql-toolbar button:focus .ql-fill,.ql-snow .ql-toolbar button:focus .ql-fill,.ql-snow.ql-toolbar button.ql-active .ql-fill,.ql-snow .ql-toolbar button.ql-active .ql-fill,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-fill,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-fill,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-fill,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-fill,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-fill,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-fill,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-fill,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-fill,.ql-snow.ql-toolbar button:hover .ql-stroke.ql-fill,.ql-snow .ql-toolbar button:hover .ql-stroke.ql-fill,.ql-snow.ql-toolbar button:focus .ql-stroke.ql-fill,.ql-snow .ql-toolbar button:focus .ql-stroke.ql-fill,.ql-snow.ql-toolbar button.ql-active .ql-stroke.ql-fill,.ql-snow .ql-toolbar button.ql-active .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill{fill:#06c}.ql-snow.ql-toolbar button:hover .ql-stroke,.ql-snow .ql-toolbar button:hover .ql-stroke,.ql-snow.ql-toolbar button:focus .ql-stroke,.ql-snow .ql-toolbar button:focus .ql-stroke,.ql-snow.ql-toolbar button.ql-active .ql-stroke,.ql-snow .ql-toolbar button.ql-active .ql-stroke,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke,.ql-snow.ql-toolbar button:hover .ql-stroke-miter,.ql-snow .ql-toolbar button:hover .ql-stroke-miter,.ql-snow.ql-toolbar button:focus .ql-stroke-miter,.ql-snow .ql-toolbar button:focus .ql-stroke-miter,.ql-snow.ql-toolbar button.ql-active .ql-stroke-miter,.ql-snow .ql-toolbar button.ql-active .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter{stroke:#06c}@media(pointer:coarse){.ql-snow.ql-toolbar button:hover:not(.ql-active),.ql-snow .ql-toolbar button:hover:not(.ql-active){color:#444}.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-fill,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-fill,.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill{fill:#444}.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke,.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter{stroke:#444}}.ql-snow,.ql-snow *{box-sizing:border-box}.ql-snow .ql-hidden{display:none}.ql-snow .ql-out-bottom,.ql-snow .ql-out-top{visibility:hidden}.ql-snow .ql-tooltip{position:absolute;transform:translateY(10px)}.ql-snow .ql-tooltip a{cursor:pointer;text-decoration:none}.ql-snow .ql-tooltip.ql-flip{transform:translateY(-10px)}.ql-snow .ql-formats{display:inline-block;vertical-align:middle}.ql-snow .ql-formats:after{clear:both;content:"";display:table}.ql-snow .ql-stroke{fill:none;stroke:#444;stroke-linecap:round;stroke-linejoin:round;stroke-width:2}.ql-snow .ql-stroke-miter{fill:none;stroke:#444;stroke-miterlimit:10;stroke-width:2}.ql-snow .ql-fill,.ql-snow .ql-stroke.ql-fill{fill:#444}.ql-snow .ql-empty{fill:none}.ql-snow .ql-even{fill-rule:evenodd}.ql-snow .ql-thin,.ql-snow .ql-stroke.ql-thin{stroke-width:1}.ql-snow .ql-transparent{opacity:.4}.ql-snow .ql-direction svg:last-child{display:none}.ql-snow .ql-direction.ql-active svg:last-child{display:inline}.ql-snow .ql-direction.ql-active svg:first-child{display:none}.ql-snow .ql-editor h1{font-size:2em}.ql-snow .ql-editor h2{font-size:1.5em}.ql-snow .ql-editor h3{font-size:1.17em}.ql-snow .ql-editor h4{font-size:1em}.ql-snow .ql-editor h5{font-size:.83em}.ql-snow .ql-editor h6{font-size:.67em}.ql-snow .ql-editor a{text-decoration:underline}.ql-snow .ql-editor blockquote{border-left:4px solid #ccc;margin-bottom:5px;margin-top:5px;padding-left:16px}.ql-snow .ql-editor code,.ql-snow .ql-editor pre{background-color:#f0f0f0;border-radius:3px}.ql-snow .ql-editor pre{white-space:pre-wrap;margin-bottom:5px;margin-top:5px;padding:5px 10px}.ql-snow .ql-editor code{font-size:85%;padding:2px 4px}.ql-snow .ql-editor pre.ql-syntax{background-color:#23241f;color:#f8f8f2;overflow:visible}.ql-snow .ql-editor img{max-width:100%}.ql-snow .ql-picker{color:#444;display:inline-block;float:left;font-size:14px;font-weight:500;height:24px;position:relative;vertical-align:middle}.ql-snow .ql-picker-label{cursor:pointer;display:inline-block;height:100%;padding-left:8px;padding-right:2px;position:relative;width:100%}.ql-snow .ql-picker-label:before{display:inline-block;line-height:22px}.ql-snow .ql-picker-options{background-color:#fff;display:none;min-width:100%;padding:4px 8px;position:absolute;white-space:nowrap}.ql-snow .ql-picker-options .ql-picker-item{cursor:pointer;display:block;padding-bottom:5px;padding-top:5px}.ql-snow .ql-picker.ql-expanded .ql-picker-label{color:#ccc;z-index:2}.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-fill{fill:#ccc}.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-stroke{stroke:#ccc}.ql-snow .ql-picker.ql-expanded .ql-picker-options{display:block;margin-top:-1px;top:100%;z-index:1}.ql-snow .ql-color-picker,.ql-snow .ql-icon-picker{width:28px}.ql-snow .ql-color-picker .ql-picker-label,.ql-snow .ql-icon-picker .ql-picker-label{padding:2px 4px}.ql-snow .ql-color-picker .ql-picker-label svg,.ql-snow .ql-icon-picker .ql-picker-label svg{right:4px}.ql-snow .ql-icon-picker .ql-picker-options{padding:4px 0}.ql-snow .ql-icon-picker .ql-picker-item{height:24px;width:24px;padding:2px 4px}.ql-snow .ql-color-picker .ql-picker-options{padding:3px 5px;width:152px}.ql-snow .ql-color-picker .ql-picker-item{border:1px solid transparent;float:left;height:16px;margin:2px;padding:0;width:16px}.ql-snow .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) svg{position:absolute;margin-top:-9px;right:0;top:50%;width:18px}.ql-snow .ql-picker.ql-header .ql-picker-label[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-font .ql-picker-label[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-size .ql-picker-label[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-font .ql-picker-item[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-label]:not([data-label=""]):before{content:attr(data-label)}.ql-snow .ql-picker.ql-header{width:98px}.ql-snow .ql-picker.ql-header .ql-picker-label:before,.ql-snow .ql-picker.ql-header .ql-picker-item:before{content:"Normal"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]:before{content:"Heading 1"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]:before{content:"Heading 2"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]:before{content:"Heading 3"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]:before{content:"Heading 4"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]:before{content:"Heading 5"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]:before{content:"Heading 6"}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]:before{font-size:2em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]:before{font-size:1.5em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]:before{font-size:1.17em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]:before{font-size:1em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]:before{font-size:.83em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]:before{font-size:.67em}.ql-snow .ql-picker.ql-font{width:108px}.ql-snow .ql-picker.ql-font .ql-picker-label:before,.ql-snow .ql-picker.ql-font .ql-picker-item:before{content:"Sans Serif"}.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=serif]:before,.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]:before{content:"Serif"}.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=monospace]:before,.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]:before{content:"Monospace"}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]:before{font-family:Georgia,Times New Roman,serif}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]:before{font-family:Monaco,Courier New,monospace}.ql-snow .ql-picker.ql-size{width:98px}.ql-snow .ql-picker.ql-size .ql-picker-label:before,.ql-snow .ql-picker.ql-size .ql-picker-item:before{content:"Normal"}.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=small]:before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]:before{content:"Small"}.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=large]:before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]:before{content:"Large"}.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=huge]:before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]:before{content:"Huge"}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]:before{font-size:10px}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]:before{font-size:18px}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]:before{font-size:32px}.ql-snow .ql-color-picker.ql-background .ql-picker-item{background-color:#fff}.ql-snow .ql-color-picker.ql-color .ql-picker-item{background-color:#000}.ql-toolbar.ql-snow{border:1px solid #ccc;box-sizing:border-box;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;padding:8px}.ql-toolbar.ql-snow .ql-formats{margin-right:15px}.ql-toolbar.ql-snow .ql-picker-label{border:1px solid transparent}.ql-toolbar.ql-snow .ql-picker-options{border:1px solid transparent;box-shadow:#0003 0 2px 8px}.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-label,.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-options{border-color:#ccc}.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item.ql-selected,.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item:hover{border-color:#000}.ql-toolbar.ql-snow+.ql-container.ql-snow{border-top:0px}.ql-snow .ql-tooltip{background-color:#fff;border:1px solid #ccc;box-shadow:0 0 5px #ddd;color:#444;padding:5px 12px;white-space:nowrap}.ql-snow .ql-tooltip:before{content:"Visit URL:";line-height:26px;margin-right:8px}.ql-snow .ql-tooltip input[type=text]{display:none;border:1px solid #ccc;font-size:13px;height:26px;margin:0;padding:3px 5px;width:170px}.ql-snow .ql-tooltip a.ql-preview{display:inline-block;max-width:200px;overflow-x:hidden;text-overflow:ellipsis;vertical-align:top}.ql-snow .ql-tooltip a.ql-action:after{border-right:1px solid #ccc;content:"Edit";margin-left:16px;padding-right:8px}.ql-snow .ql-tooltip a.ql-remove:before{content:"Remove";margin-left:8px}.ql-snow .ql-tooltip a{line-height:26px}.ql-snow .ql-tooltip.ql-editing a.ql-preview,.ql-snow .ql-tooltip.ql-editing a.ql-remove{display:none}.ql-snow .ql-tooltip.ql-editing input[type=text]{display:inline-block}.ql-snow .ql-tooltip.ql-editing a.ql-action:after{border-right:0px;content:"Save";padding-right:0}.ql-snow .ql-tooltip[data-mode=link]:before{content:"Enter link:"}.ql-snow .ql-tooltip[data-mode=formula]:before{content:"Enter formula:"}.ql-snow .ql-tooltip[data-mode=video]:before{content:"Enter video:"}.ql-snow a{color:#06c}.ql-container.ql-snow{border:1px solid #ccc}/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-content:""}}}@layer theme{:root,:host{--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-red-900:oklch(39.6% .141 25.723);--color-orange-50:oklch(98% .016 73.684);--color-orange-100:oklch(95.4% .038 75.164);--color-orange-200:oklch(90.1% .076 70.697);--color-orange-300:oklch(83.7% .128 66.29);--color-orange-500:oklch(70.5% .213 47.604);--color-orange-600:oklch(64.6% .222 41.116);--color-orange-700:oklch(55.3% .195 38.402);--color-orange-800:oklch(47% .157 37.304);--color-orange-900:oklch(40.8% .123 38.172);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-800:oklch(47.3% .137 46.201);--color-amber-900:oklch(41.4% .112 45.904);--color-yellow-50:oklch(98.7% .026 102.212);--color-yellow-100:oklch(97.3% .071 103.193);--color-yellow-200:oklch(94.5% .129 101.54);--color-yellow-300:oklch(90.5% .182 98.111);--color-yellow-500:oklch(79.5% .184 86.047);--color-yellow-600:oklch(68.1% .162 75.834);--color-yellow-700:oklch(55.4% .135 66.442);--color-yellow-800:oklch(47.6% .114 61.907);--color-green-50:oklch(98.2% .018 155.826);--color-green-100:oklch(96.2% .044 156.743);--color-green-200:oklch(92.5% .084 155.995);--color-green-300:oklch(87.1% .15 154.449);--color-green-400:oklch(79.2% .209 151.711);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-green-700:oklch(52.7% .154 150.069);--color-green-800:oklch(44.8% .119 151.328);--color-green-900:oklch(39.3% .095 152.535);--color-emerald-50:oklch(97.9% .021 166.113);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-200:oklch(90.5% .093 164.15);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-700:oklch(50.8% .118 165.612);--color-emerald-800:oklch(43.2% .095 166.913);--color-emerald-900:oklch(37.8% .077 168.94);--color-teal-100:oklch(95.3% .051 180.801);--color-teal-500:oklch(70.4% .14 182.503);--color-teal-600:oklch(60% .118 184.704);--color-teal-700:oklch(51.1% .096 186.391);--color-teal-800:oklch(43.7% .078 188.216);--color-cyan-50:oklch(98.4% .019 200.873);--color-cyan-100:oklch(95.6% .045 203.388);--color-cyan-300:oklch(86.5% .127 207.078);--color-cyan-500:oklch(71.5% .143 215.221);--color-cyan-700:oklch(52% .105 223.128);--color-cyan-800:oklch(45% .085 224.283);--color-sky-50:oklch(97.7% .013 236.62);--color-sky-100:oklch(95.1% .026 236.824);--color-sky-200:oklch(90.1% .058 230.902);--color-sky-700:oklch(50% .134 242.749);--color-sky-800:oklch(44.3% .11 240.79);--color-sky-900:oklch(39.1% .09 240.876);--color-sky-950:oklch(29.3% .066 243.157);--color-blue-50:oklch(97% .014 254.604);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-800:oklch(42.4% .199 265.638);--color-blue-900:oklch(37.9% .146 265.522);--color-indigo-50:oklch(96.2% .018 272.314);--color-indigo-100:oklch(93% .034 272.788);--color-indigo-200:oklch(87% .065 274.039);--color-indigo-300:oklch(78.5% .115 274.713);--color-indigo-500:oklch(58.5% .233 277.117);--color-indigo-600:oklch(51.1% .262 276.966);--color-indigo-700:oklch(45.7% .24 277.023);--color-indigo-800:oklch(39.8% .195 277.366);--color-violet-50:oklch(96.9% .016 293.756);--color-violet-100:oklch(94.3% .029 294.588);--color-violet-200:oklch(89.4% .057 293.283);--color-violet-700:oklch(49.1% .27 292.581);--color-violet-800:oklch(43.2% .232 292.759);--color-violet-900:oklch(38% .189 293.745);--color-violet-950:oklch(28.3% .141 291.089);--color-purple-50:oklch(97.7% .014 308.299);--color-purple-100:oklch(94.6% .033 307.174);--color-purple-200:oklch(90.2% .063 306.703);--color-purple-300:oklch(82.7% .119 306.383);--color-purple-500:oklch(62.7% .265 303.9);--color-purple-600:oklch(55.8% .288 302.321);--color-purple-700:oklch(49.6% .265 301.924);--color-purple-800:oklch(43.8% .218 303.724);--color-pink-100:oklch(94.8% .028 342.258);--color-pink-600:oklch(59.2% .249 .584);--color-pink-800:oklch(45.9% .187 3.815);--color-rose-50:oklch(96.9% .015 12.422);--color-rose-100:oklch(94.1% .03 12.58);--color-rose-200:oklch(89.2% .058 10.001);--color-rose-400:oklch(71.2% .194 13.428);--color-rose-500:oklch(64.5% .246 16.439);--color-rose-700:oklch(51.4% .222 16.935);--color-slate-50:oklch(98.4% .003 247.858);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-slate-950:oklch(12.9% .042 264.695);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-gray-900:oklch(21% .034 264.665);--color-zinc-800:oklch(27.4% .006 286.033);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--container-3xl:48rem;--container-4xl:56rem;--container-5xl:64rem;--container-6xl:72rem;--container-7xl:80rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5 / 2.25);--font-weight-light:300;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--font-weight-black:900;--tracking-tighter:-.05em;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-tight:1.25;--leading-snug:1.375;--leading-normal:1.5;--leading-relaxed:1.625;--radius-xs:.125rem;--radius-2xl:1rem;--radius-3xl:1.5rem;--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--animate-bounce:bounce 1s infinite;--blur-sm:8px;--blur-md:12px;--blur-3xl:64px;--aspect-video:16 / 9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-montserrat);--default-mono-font-family:var(--font-montserrat);--font-montserrat:"Montserrat", sans-serif;--color-border:var(--border);--color-re-red:var(--re-red);--color-re-red-hover:var(--re-red-hover)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}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;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::-moz-placeholder{color:currentColor}::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::-moz-placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border);font-family:var(--font-montserrat);outline-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){*{outline-color:color-mix(in oklab,var(--ring) 50%,transparent)}}body{background-color:var(--background);font-family:var(--font-montserrat);color:var(--foreground)}:where(:not(:has([class*=" text-"]),:not(:has([class^=text-])))) h1{font-size:var(--text-2xl);font-weight:var(--font-weight-medium);line-height:1.5}:where(:not(:has([class*=" text-"]),:not(:has([class^=text-])))) h2{font-size:var(--text-xl);font-weight:var(--font-weight-medium);line-height:1.5}:where(:not(:has([class*=" text-"]),:not(:has([class^=text-])))) h3{font-size:var(--text-lg);font-weight:var(--font-weight-medium);line-height:1.5}:where(:not(:has([class*=" text-"]),:not(:has([class^=text-])))) h4{font-size:var(--text-base);font-weight:var(--font-weight-medium);line-height:1.5}:where(:not(:has([class*=" text-"]),:not(:has([class^=text-])))) p{font-size:var(--text-base);font-weight:var(--font-weight-normal);line-height:1.5}:where(:not(:has([class*=" text-"]),:not(:has([class^=text-])))) label,:where(:not(:has([class*=" text-"]),:not(:has([class^=text-])))) button{font-size:var(--text-base);font-weight:var(--font-weight-medium);line-height:1.5}:where(:not(:has([class*=" text-"]),:not(:has([class^=text-])))) input{font-size:var(--text-base);font-weight:var(--font-weight-normal);line-height:1.5}}@layer components;@layer utilities{.\@container\/card-header{container:card-header/inline-size}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing) * 0)}.inset-x-0{inset-inline:calc(var(--spacing) * 0)}.inset-y-0{inset-block:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.end{inset-inline-end:var(--spacing)}.-top-0\.5{top:calc(var(--spacing) * -.5)}.-top-1{top:calc(var(--spacing) * -1)}.-top-3{top:calc(var(--spacing) * -3)}.-top-12{top:calc(var(--spacing) * -12)}.-top-40{top:calc(var(--spacing) * -40)}.top-0{top:calc(var(--spacing) * 0)}.top-0\.5{top:calc(var(--spacing) * .5)}.top-1\.5{top:calc(var(--spacing) * 1.5)}.top-1\/2{top:50%}.top-2\.5{top:calc(var(--spacing) * 2.5)}.top-3\.5{top:calc(var(--spacing) * 3.5)}.top-4{top:calc(var(--spacing) * 4)}.top-6{top:calc(var(--spacing) * 6)}.top-10{top:calc(var(--spacing) * 10)}.top-\[1px\]{top:1px}.top-\[50\%\]{top:50%}.top-\[60\%\]{top:60%}.top-full{top:100%}.-right-0\.5{right:calc(var(--spacing) * -.5)}.-right-1{right:calc(var(--spacing) * -1)}.-right-3{right:calc(var(--spacing) * -3)}.-right-12{right:calc(var(--spacing) * -12)}.-right-40{right:calc(var(--spacing) * -40)}.right-0{right:calc(var(--spacing) * 0)}.right-0\.5{right:calc(var(--spacing) * .5)}.right-1{right:calc(var(--spacing) * 1)}.right-2{right:calc(var(--spacing) * 2)}.right-2\.5{right:calc(var(--spacing) * 2.5)}.right-3{right:calc(var(--spacing) * 3)}.right-4{right:calc(var(--spacing) * 4)}.-bottom-12{bottom:calc(var(--spacing) * -12)}.-bottom-40{bottom:calc(var(--spacing) * -40)}.bottom-0{bottom:calc(var(--spacing) * 0)}.bottom-0\.5{bottom:calc(var(--spacing) * .5)}.bottom-12{bottom:calc(var(--spacing) * 12)}.bottom-\[-1px\]{bottom:-1px}.bottom-\[-24px\]{bottom:-24px}.bottom-full{bottom:100%}.-left-12{left:calc(var(--spacing) * -12)}.-left-40{left:calc(var(--spacing) * -40)}.left-0{left:calc(var(--spacing) * 0)}.left-1{left:calc(var(--spacing) * 1)}.left-1\/2{left:50%}.left-2{left:calc(var(--spacing) * 2)}.left-2\.5{left:calc(var(--spacing) * 2.5)}.left-3{left:calc(var(--spacing) * 3)}.left-4{left:calc(var(--spacing) * 4)}.left-\[50\%\]{left:50%}.isolate{isolation:isolate}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.z-\[1\]{z-index:1}.z-\[100\]{z-index:100}.z-\[9999\]{z-index:9999}.order-1{order:1}.order-2{order:2}.col-span-1{grid-column:span 1/span 1}.col-span-2{grid-column:span 2/span 2}.col-span-3{grid-column:span 3/span 3}.col-span-4{grid-column:span 4/span 4}.col-span-5{grid-column:span 5/span 5}.col-span-6{grid-column:span 6/span 6}.col-span-full{grid-column:1/-1}.col-start-2{grid-column-start:2}.row-span-2{grid-row:span 2/span 2}.row-start-1{grid-row-start:1}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.-mx-1{margin-inline:calc(var(--spacing) * -1)}.-mx-4{margin-inline:calc(var(--spacing) * -4)}.-mx-6{margin-inline:calc(var(--spacing) * -6)}.mx-1{margin-inline:calc(var(--spacing) * 1)}.mx-2{margin-inline:calc(var(--spacing) * 2)}.mx-3\.5{margin-inline:calc(var(--spacing) * 3.5)}.mx-auto{margin-inline:auto}.my-0\.5{margin-block:calc(var(--spacing) * .5)}.my-1{margin-block:calc(var(--spacing) * 1)}.my-4{margin-block:calc(var(--spacing) * 4)}.my-8{margin-block:calc(var(--spacing) * 8)}.-mt-4{margin-top:calc(var(--spacing) * -4)}.mt-0{margin-top:calc(var(--spacing) * 0)}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mt-8{margin-top:calc(var(--spacing) * 8)}.mt-10{margin-top:calc(var(--spacing) * 10)}.mt-auto{margin-top:auto}.mr-1{margin-right:calc(var(--spacing) * 1)}.mr-1\.5{margin-right:calc(var(--spacing) * 1.5)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mr-3{margin-right:calc(var(--spacing) * 3)}.-mb-6{margin-bottom:calc(var(--spacing) * -6)}.mb-0\.5{margin-bottom:calc(var(--spacing) * .5)}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.mb-7{margin-bottom:calc(var(--spacing) * 7)}.mb-8{margin-bottom:calc(var(--spacing) * 8)}.mb-10{margin-bottom:calc(var(--spacing) * 10)}.mb-12{margin-bottom:calc(var(--spacing) * 12)}.-ml-4{margin-left:calc(var(--spacing) * -4)}.ml-1{margin-left:calc(var(--spacing) * 1)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-3{margin-left:calc(var(--spacing) * 3)}.ml-4{margin-left:calc(var(--spacing) * 4)}.ml-5{margin-left:calc(var(--spacing) * 5)}.ml-6{margin-left:calc(var(--spacing) * 6)}.ml-8{margin-left:calc(var(--spacing) * 8)}.ml-9{margin-left:calc(var(--spacing) * 9)}.ml-11{margin-left:calc(var(--spacing) * 11)}.ml-auto{margin-left:auto}.line-clamp-1{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-row{display:table-row}.field-sizing-content{field-sizing:content}.aspect-square{aspect-ratio:1}.aspect-video{aspect-ratio:var(--aspect-video)}.size-2{width:calc(var(--spacing) * 2);height:calc(var(--spacing) * 2)}.size-2\.5{width:calc(var(--spacing) * 2.5);height:calc(var(--spacing) * 2.5)}.size-3{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.size-3\.5{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-7{width:calc(var(--spacing) * 7);height:calc(var(--spacing) * 7)}.size-8{width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8)}.size-9{width:calc(var(--spacing) * 9);height:calc(var(--spacing) * 9)}.size-10{width:calc(var(--spacing) * 10);height:calc(var(--spacing) * 10)}.size-12{width:calc(var(--spacing) * 12);height:calc(var(--spacing) * 12)}.size-full{width:100%;height:100%}.h-0\.5{height:calc(var(--spacing) * .5)}.h-1{height:calc(var(--spacing) * 1)}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-4\.5{height:calc(var(--spacing) * 4.5)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-11{height:calc(var(--spacing) * 11)}.h-12{height:calc(var(--spacing) * 12)}.h-14{height:calc(var(--spacing) * 14)}.h-16{height:calc(var(--spacing) * 16)}.h-20{height:calc(var(--spacing) * 20)}.h-32{height:calc(var(--spacing) * 32)}.h-40{height:calc(var(--spacing) * 40)}.h-48{height:calc(var(--spacing) * 48)}.h-64{height:calc(var(--spacing) * 64)}.h-80{height:calc(var(--spacing) * 80)}.h-96{height:calc(var(--spacing) * 96)}.h-\[1\.15rem\]{height:1.15rem}.h-\[30rem\]{height:30rem}.h-\[44px\]{height:44px}.h-\[70vh\]{height:70vh}.h-\[85vh\]{height:85vh}.h-\[90vh\]{height:90vh}.h-\[400px\]{height:400px}.h-\[calc\(100\%-1px\)\]{height:calc(100% - 1px)}.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}.h-svh{height:100svh}.max-h-\(--radix-context-menu-content-available-height\){max-height:var(--radix-context-menu-content-available-height)}.max-h-\(--radix-dropdown-menu-content-available-height\){max-height:var(--radix-dropdown-menu-content-available-height)}.max-h-\(--radix-select-content-available-height\){max-height:var(--radix-select-content-available-height)}.max-h-10{max-height:calc(var(--spacing) * 10)}.max-h-14{max-height:calc(var(--spacing) * 14)}.max-h-40{max-height:calc(var(--spacing) * 40)}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-56{max-height:calc(var(--spacing) * 56)}.max-h-60{max-height:calc(var(--spacing) * 60)}.max-h-64{max-height:calc(var(--spacing) * 64)}.max-h-72{max-height:calc(var(--spacing) * 72)}.max-h-96{max-height:calc(var(--spacing) * 96)}.max-h-\[55vh\]{max-height:55vh}.max-h-\[70vh\]{max-height:70vh}.max-h-\[85vh\]{max-height:85vh}.max-h-\[90vh\]{max-height:90vh}.max-h-\[95vh\]{max-height:95vh}.max-h-\[250px\]{max-height:250px}.max-h-\[300px\]{max-height:300px}.max-h-\[600px\]{max-height:600px}.max-h-\[800px\]{max-height:800px}.max-h-full{max-height:100%}.min-h-0{min-height:calc(var(--spacing) * 0)}.min-h-4{min-height:calc(var(--spacing) * 4)}.min-h-16{min-height:calc(var(--spacing) * 16)}.min-h-\[32px\]{min-height:32px}.min-h-\[44px\]{min-height:44px}.min-h-\[60px\]{min-height:60px}.min-h-\[60vh\]{min-height:60vh}.min-h-\[80px\]{min-height:80px}.min-h-\[96px\]{min-height:96px}.min-h-\[100px\]{min-height:100px}.min-h-\[120px\]{min-height:120px}.min-h-\[150px\]{min-height:150px}.min-h-\[320px\]{min-height:320px}.min-h-\[400px\]{min-height:400px}.min-h-\[420px\]{min-height:420px}.min-h-\[480px\]{min-height:480px}.min-h-\[600px\]{min-height:600px}.min-h-screen{min-height:100vh}.min-h-svh{min-height:100svh}.\!w-\[80vw\]{width:80vw!important}.w-\(--sidebar-width\){width:var(--sidebar-width)}.w-0{width:calc(var(--spacing) * 0)}.w-0\.5{width:calc(var(--spacing) * .5)}.w-1{width:calc(var(--spacing) * 1)}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-2{width:calc(var(--spacing) * 2)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-3\/4{width:75%}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-10{width:calc(var(--spacing) * 10)}.w-12{width:calc(var(--spacing) * 12)}.w-14{width:calc(var(--spacing) * 14)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-24{width:calc(var(--spacing) * 24)}.w-32{width:calc(var(--spacing) * 32)}.w-40{width:calc(var(--spacing) * 40)}.w-44{width:calc(var(--spacing) * 44)}.w-48{width:calc(var(--spacing) * 48)}.w-56{width:calc(var(--spacing) * 56)}.w-64{width:calc(var(--spacing) * 64)}.w-72{width:calc(var(--spacing) * 72)}.w-80{width:calc(var(--spacing) * 80)}.w-\[10\%\]{width:10%}.w-\[15\%\]{width:15%}.w-\[20\%\]{width:20%}.w-\[35\%\]{width:35%}.w-\[45\%\]{width:45%}.w-\[50px\]{width:50px}.w-\[100px\]{width:100px}.w-\[180px\]{width:180px}.w-\[200px\]{width:200px}.w-\[280px\]{width:280px}.w-\[360px\]{width:360px}.w-\[calc\(100\%-2rem\)\]{width:calc(100% - 2rem)}.w-\[var\(--radix-select-trigger-width\)\]{width:var(--radix-select-trigger-width)}.w-auto{width:auto}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.w-px{width:1px}.\!max-w-\[80vw\]{max-width:80vw!important}.max-w-\(--skeleton-width\){max-width:var(--skeleton-width)}.max-w-2xl{max-width:var(--container-2xl)}.max-w-3xl{max-width:var(--container-3xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-5xl{max-width:var(--container-5xl)}.max-w-6xl{max-width:var(--container-6xl)}.max-w-7xl{max-width:var(--container-7xl)}.max-w-\[8rem\]{max-width:8rem}.max-w-\[90vw\]{max-width:90vw}.max-w-\[95vw\]{max-width:95vw}.max-w-\[140px\]{max-width:140px}.max-w-\[150px\]{max-width:150px}.max-w-\[200px\]{max-width:200px}.max-w-\[220px\]{max-width:220px}.max-w-\[250px\]{max-width:250px}.max-w-\[260px\]{max-width:260px}.max-w-\[360px\]{max-width:360px}.max-w-\[1240px\]{max-width:1240px}.max-w-\[1600px\]{max-width:1600px}.max-w-\[calc\(100\%-2rem\)\]{max-width:calc(100% - 2rem)}.max-w-\[min\(85\%\,36rem\)\]{max-width:min(85%,36rem)}.max-w-\[min\(100\%\,42rem\)\]{max-width:min(100%,42rem)}.max-w-full{max-width:100%}.max-w-lg{max-width:var(--container-lg)}.max-w-max{max-width:-moz-max-content;max-width:max-content}.max-w-md{max-width:var(--container-md)}.max-w-none{max-width:none}.max-w-sm{max-width:var(--container-sm)}.max-w-xl{max-width:var(--container-xl)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-5{min-width:calc(var(--spacing) * 5)}.min-w-8{min-width:calc(var(--spacing) * 8)}.min-w-9{min-width:calc(var(--spacing) * 9)}.min-w-10{min-width:calc(var(--spacing) * 10)}.min-w-\[8rem\]{min-width:8rem}.min-w-\[12rem\]{min-width:12rem}.min-w-\[60px\]{min-width:60px}.min-w-\[80px\]{min-width:80px}.min-w-\[100px\]{min-width:100px}.min-w-\[120px\]{min-width:120px}.min-w-\[140px\]{min-width:140px}.min-w-\[150px\]{min-width:150px}.min-w-\[180px\]{min-width:180px}.min-w-\[200px\]{min-width:200px}.min-w-\[300px\]{min-width:300px}.min-w-\[900px\]{min-width:900px}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.min-w-full{min-width:100%}.flex-1{flex:1}.flex-shrink-0{flex-shrink:0}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow,.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}.origin-\(--radix-context-menu-content-transform-origin\){transform-origin:var(--radix-context-menu-content-transform-origin)}.origin-\(--radix-dropdown-menu-content-transform-origin\){transform-origin:var(--radix-dropdown-menu-content-transform-origin)}.origin-\(--radix-hover-card-content-transform-origin\){transform-origin:var(--radix-hover-card-content-transform-origin)}.origin-\(--radix-menubar-content-transform-origin\){transform-origin:var(--radix-menubar-content-transform-origin)}.origin-\(--radix-popover-content-transform-origin\){transform-origin:var(--radix-popover-content-transform-origin)}.origin-\(--radix-select-content-transform-origin\){transform-origin:var(--radix-select-content-transform-origin)}.origin-\(--radix-tooltip-content-transform-origin\){transform-origin:var(--radix-tooltip-content-transform-origin)}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-x-px{--tw-translate-x:-1px;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-\[-50\%\]{--tw-translate-x:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-px{--tw-translate-x:1px;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-0\.5{--tw-translate-y:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\[-50\%\]{--tw-translate-y:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\[calc\(-50\%_-_2px\)\]{--tw-translate-y: calc(-50% - 2px) ;translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-45{rotate:45deg}.rotate-90{rotate:90deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-\[loading_1\.5s_infinite_linear\]{animation:1.5s linear infinite loading}.animate-bounce{animation:var(--animate-bounce)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-help{cursor:help}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.resize-none{resize:none}.resize-y{resize:vertical}.scroll-my-1{scroll-margin-block:calc(var(--spacing) * 1)}.scroll-py-1{scroll-padding-block:calc(var(--spacing) * 1)}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.\[appearance\:textfield\]{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.auto-rows-min{grid-auto-rows:min-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-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.grid-cols-\[0_1fr\]{grid-template-columns:0 1fr}.grid-rows-\[auto_auto\]{grid-template-rows:auto auto}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.justify-items-start{justify-items:start}.gap-0{gap:calc(var(--spacing) * 0)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-8{gap:calc(var(--spacing) * 8)}.gap-10{gap:calc(var(--spacing) * 10)}.gap-12{gap:calc(var(--spacing) * 12)}:where(.space-y-0>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 0) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 0) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-8>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 8) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 8) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-10>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 10) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 10) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-2{-moz-column-gap:calc(var(--spacing) * 2);column-gap:calc(var(--spacing) * 2)}.gap-x-3{-moz-column-gap:calc(var(--spacing) * 3);column-gap:calc(var(--spacing) * 3)}.gap-x-6{-moz-column-gap:calc(var(--spacing) * 6);column-gap:calc(var(--spacing) * 6)}.gap-x-8{-moz-column-gap:calc(var(--spacing) * 8);column-gap:calc(var(--spacing) * 8)}.gap-x-10{-moz-column-gap:calc(var(--spacing) * 10);column-gap:calc(var(--spacing) * 10)}:where(.-space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * -2) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * -2) * calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-1>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * 1) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * 2) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-3>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * 3) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-x-reverse)))}:where(.space-x-4>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * 4) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-x-reverse)))}.gap-y-0\.5{row-gap:calc(var(--spacing) * .5)}.gap-y-1\.5{row-gap:calc(var(--spacing) * 1.5)}.gap-y-3{row-gap:calc(var(--spacing) * 3)}.gap-y-4{row-gap:calc(var(--spacing) * 4)}.gap-y-6{row-gap:calc(var(--spacing) * 6)}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-gray-100>:not(:last-child)){border-color:var(--color-gray-100)}:where(.divide-slate-50>:not(:last-child)){border-color:var(--color-slate-50)}:where(.divide-slate-100>:not(:last-child)){border-color:var(--color-slate-100)}.self-center{align-self:center}.self-start{align-self:flex-start}.self-stretch{align-self:stretch}.justify-self-end{justify-self:flex-end}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-3xl{border-radius:var(--radius-3xl)}.rounded-\[2px\]{border-radius:2px}.rounded-\[4px\]{border-radius:4px}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-none{border-radius:0}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:calc(var(--radius) + 4px)}.rounded-xs{border-radius:var(--radius-xs)}.rounded-t-lg{border-top-left-radius:var(--radius);border-top-right-radius:var(--radius)}.rounded-tl-none{border-top-left-radius:0}.rounded-tl-sm{border-top-left-radius:calc(var(--radius) - 4px)}.rounded-r-md{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.rounded-tr-none{border-top-right-radius:0}.rounded-b-lg{border-bottom-right-radius:var(--radius);border-bottom-left-radius:var(--radius)}.rounded-bl{border-bottom-left-radius:.25rem}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-4{border-style:var(--tw-border-style);border-width:4px}.border-8{border-style:var(--tw-border-style);border-width:8px}.border-\[1\.5px\]{border-style:var(--tw-border-style);border-width:1.5px}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-0{border-top-style:var(--tw-border-style);border-top-width:0}.border-t-2{border-top-style:var(--tw-border-style);border-top-width:2px}.border-t-4{border-top-style:var(--tw-border-style);border-top-width:4px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-b-4{border-bottom-style:var(--tw-border-style);border-bottom-width:4px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-none{--tw-border-style:none;border-style:none}.border-\(--color-border\){border-color:var(--color-border)}.border-\[\#cccccc\]{border-color:#ccc}.border-amber-300{border-color:var(--color-amber-300)}.border-blue-100{border-color:var(--color-blue-100)}.border-blue-200{border-color:var(--color-blue-200)}.border-blue-300{border-color:var(--color-blue-300)}.border-blue-400{border-color:var(--color-blue-400)}.border-blue-500{border-color:var(--color-blue-500)}.border-blue-600{border-color:var(--color-blue-600)}.border-border,.border-border\/50{border-color:var(--border)}@supports (color:color-mix(in lab,red,red)){.border-border\/50{border-color:color-mix(in oklab,var(--border) 50%,transparent)}}.border-cyan-300{border-color:var(--color-cyan-300)}.border-emerald-100{border-color:var(--color-emerald-100)}.border-emerald-200{border-color:var(--color-emerald-200)}.border-emerald-400{border-color:var(--color-emerald-400)}.border-gray-100{border-color:var(--color-gray-100)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-green-100{border-color:var(--color-green-100)}.border-green-200{border-color:var(--color-green-200)}.border-green-300{border-color:var(--color-green-300)}.border-green-400{border-color:var(--color-green-400)}.border-green-500{border-color:var(--color-green-500)}.border-green-600{border-color:var(--color-green-600)}.border-indigo-200{border-color:var(--color-indigo-200)}.border-indigo-300{border-color:var(--color-indigo-300)}.border-input{border-color:var(--input)}.border-orange-200{border-color:var(--color-orange-200)}.border-orange-300{border-color:var(--color-orange-300)}.border-primary{border-color:var(--primary)}.border-purple-100{border-color:var(--color-purple-100)}.border-purple-200{border-color:var(--color-purple-200)}.border-purple-300{border-color:var(--color-purple-300)}.border-re-red{border-color:var(--re-red)}.border-red-50{border-color:var(--color-red-50)}.border-red-100{border-color:var(--color-red-100)}.border-red-100\/50{border-color:#ffe2e280}@supports (color:color-mix(in lab,red,red)){.border-red-100\/50{border-color:color-mix(in oklab,var(--color-red-100) 50%,transparent)}}.border-red-200{border-color:var(--color-red-200)}.border-red-300{border-color:var(--color-red-300)}.border-red-400{border-color:var(--color-red-400)}.border-red-500{border-color:var(--color-red-500)}.border-red-600{border-color:var(--color-red-600)}.border-rose-100{border-color:var(--color-rose-100)}.border-rose-200{border-color:var(--color-rose-200)}.border-sidebar-border{border-color:var(--sidebar-border)}.border-sky-200{border-color:var(--color-sky-200)}.border-slate-50{border-color:var(--color-slate-50)}.border-slate-100{border-color:var(--color-slate-100)}.border-slate-200{border-color:var(--color-slate-200)}.border-slate-200\/50{border-color:#e2e8f080}@supports (color:color-mix(in lab,red,red)){.border-slate-200\/50{border-color:color-mix(in oklab,var(--color-slate-200) 50%,transparent)}}.border-slate-200\/90{border-color:#e2e8f0e6}@supports (color:color-mix(in lab,red,red)){.border-slate-200\/90{border-color:color-mix(in oklab,var(--color-slate-200) 90%,transparent)}}.border-slate-300{border-color:var(--color-slate-300)}.border-slate-400{border-color:var(--color-slate-400)}.border-slate-700{border-color:var(--color-slate-700)}.border-slate-700\/50{border-color:#31415880}@supports (color:color-mix(in lab,red,red)){.border-slate-700\/50{border-color:color-mix(in oklab,var(--color-slate-700) 50%,transparent)}}.border-slate-800{border-color:var(--color-slate-800)}.border-teal-500{border-color:var(--color-teal-500)}.border-transparent{border-color:#0000}.border-violet-200{border-color:var(--color-violet-200)}.border-white{border-color:var(--color-white)}.border-white\/10{border-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.border-white\/10{border-color:color-mix(in oklab,var(--color-white) 10%,transparent)}}.border-white\/30{border-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.border-white\/30{border-color:color-mix(in oklab,var(--color-white) 30%,transparent)}}.border-yellow-200{border-color:var(--color-yellow-200)}.border-yellow-300{border-color:var(--color-yellow-300)}.border-t-slate-900{border-top-color:var(--color-slate-900)}.border-t-transparent{border-top-color:#0000}.border-t-white{border-top-color:var(--color-white)}.border-l-green-500{border-left-color:var(--color-green-500)}.border-l-re-red{border-left-color:var(--re-red)}.border-l-red-500{border-left-color:var(--color-red-500)}.border-l-transparent{border-left-color:#0000}.bg-\(--color-bg\){background-color:var(--color-bg)}.bg-accent{background-color:var(--accent)}.bg-amber-50{background-color:var(--color-amber-50)}.bg-amber-100{background-color:var(--color-amber-100)}.bg-amber-200{background-color:var(--color-amber-200)}.bg-amber-600{background-color:var(--color-amber-600)}.bg-background{background-color:var(--background)}.bg-black{background-color:var(--color-black)}.bg-black\/20{background-color:#0003}@supports (color:color-mix(in lab,red,red)){.bg-black\/20{background-color:color-mix(in oklab,var(--color-black) 20%,transparent)}}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\/50{background-color:color-mix(in oklab,var(--color-black) 50%,transparent)}}.bg-blue-50{background-color:var(--color-blue-50)}.bg-blue-50\/50{background-color:#eff6ff80}@supports (color:color-mix(in lab,red,red)){.bg-blue-50\/50{background-color:color-mix(in oklab,var(--color-blue-50) 50%,transparent)}}.bg-blue-100{background-color:var(--color-blue-100)}.bg-blue-200{background-color:var(--color-blue-200)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-blue-600{background-color:var(--color-blue-600)}.bg-border{background-color:var(--border)}.bg-card{background-color:var(--card)}.bg-current{background-color:currentColor}.bg-cyan-100{background-color:var(--color-cyan-100)}.bg-cyan-500{background-color:var(--color-cyan-500)}.bg-destructive{background-color:var(--destructive)}.bg-emerald-50{background-color:var(--color-emerald-50)}.bg-emerald-50\/40{background-color:#ecfdf566}@supports (color:color-mix(in lab,red,red)){.bg-emerald-50\/40{background-color:color-mix(in oklab,var(--color-emerald-50) 40%,transparent)}}.bg-emerald-50\/90{background-color:#ecfdf5e6}@supports (color:color-mix(in lab,red,red)){.bg-emerald-50\/90{background-color:color-mix(in oklab,var(--color-emerald-50) 90%,transparent)}}.bg-emerald-100{background-color:var(--color-emerald-100)}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-emerald-500\/20{background-color:#00bb7f33}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/20{background-color:color-mix(in oklab,var(--color-emerald-500) 20%,transparent)}}.bg-emerald-600{background-color:var(--color-emerald-600)}.bg-foreground{background-color:var(--foreground)}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-900{background-color:var(--color-gray-900)}.bg-green-50{background-color:var(--color-green-50)}.bg-green-50\/30{background-color:#f0fdf44d}@supports (color:color-mix(in lab,red,red)){.bg-green-50\/30{background-color:color-mix(in oklab,var(--color-green-50) 30%,transparent)}}.bg-green-50\/50{background-color:#f0fdf480}@supports (color:color-mix(in lab,red,red)){.bg-green-50\/50{background-color:color-mix(in oklab,var(--color-green-50) 50%,transparent)}}.bg-green-100{background-color:var(--color-green-100)}.bg-green-200{background-color:var(--color-green-200)}.bg-green-300{background-color:var(--color-green-300)}.bg-green-500{background-color:var(--color-green-500)}.bg-green-500\/30{background-color:#00c7584d}@supports (color:color-mix(in lab,red,red)){.bg-green-500\/30{background-color:color-mix(in oklab,var(--color-green-500) 30%,transparent)}}.bg-green-600{background-color:var(--color-green-600)}.bg-indigo-50{background-color:var(--color-indigo-50)}.bg-indigo-100{background-color:var(--color-indigo-100)}.bg-indigo-500{background-color:var(--color-indigo-500)}.bg-indigo-600{background-color:var(--color-indigo-600)}.bg-input-background{background-color:var(--input-background)}.bg-muted,.bg-muted\/50{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.bg-muted\/50{background-color:color-mix(in oklab,var(--muted) 50%,transparent)}}.bg-orange-50{background-color:var(--color-orange-50)}.bg-orange-50\/30{background-color:#fff7ed4d}@supports (color:color-mix(in lab,red,red)){.bg-orange-50\/30{background-color:color-mix(in oklab,var(--color-orange-50) 30%,transparent)}}.bg-orange-100{background-color:var(--color-orange-100)}.bg-orange-500{background-color:var(--color-orange-500)}.bg-orange-600{background-color:var(--color-orange-600)}.bg-pink-100{background-color:var(--color-pink-100)}.bg-pink-600{background-color:var(--color-pink-600)}.bg-popover{background-color:var(--popover)}.bg-primary{background-color:var(--primary)}.bg-primary-600{background-color:var(--primary-600)}.bg-primary\/20{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.bg-primary\/20{background-color:color-mix(in oklab,var(--primary) 20%,transparent)}}.bg-purple-50{background-color:var(--color-purple-50)}.bg-purple-100{background-color:var(--color-purple-100)}.bg-purple-500{background-color:var(--color-purple-500)}.bg-purple-600{background-color:var(--color-purple-600)}.bg-re-black{background-color:var(--re-black)}.bg-re-red,.bg-re-red\/10{background-color:var(--re-red)}@supports (color:color-mix(in lab,red,red)){.bg-re-red\/10{background-color:color-mix(in oklab,var(--re-red) 10%,transparent)}}.bg-re-red\/20{background-color:var(--re-red)}@supports (color:color-mix(in lab,red,red)){.bg-re-red\/20{background-color:color-mix(in oklab,var(--re-red) 20%,transparent)}}.bg-red-50{background-color:var(--color-red-50)}.bg-red-50\/20{background-color:#fef2f233}@supports (color:color-mix(in lab,red,red)){.bg-red-50\/20{background-color:color-mix(in oklab,var(--color-red-50) 20%,transparent)}}.bg-red-50\/30{background-color:#fef2f24d}@supports (color:color-mix(in lab,red,red)){.bg-red-50\/30{background-color:color-mix(in oklab,var(--color-red-50) 30%,transparent)}}.bg-red-50\/40{background-color:#fef2f266}@supports (color:color-mix(in lab,red,red)){.bg-red-50\/40{background-color:color-mix(in oklab,var(--color-red-50) 40%,transparent)}}.bg-red-50\/50{background-color:#fef2f280}@supports (color:color-mix(in lab,red,red)){.bg-red-50\/50{background-color:color-mix(in oklab,var(--color-red-50) 50%,transparent)}}.bg-red-50\/80{background-color:#fef2f2cc}@supports (color:color-mix(in lab,red,red)){.bg-red-50\/80{background-color:color-mix(in oklab,var(--color-red-50) 80%,transparent)}}.bg-red-50\/90{background-color:#fef2f2e6}@supports (color:color-mix(in lab,red,red)){.bg-red-50\/90{background-color:color-mix(in oklab,var(--color-red-50) 90%,transparent)}}.bg-red-100{background-color:var(--color-red-100)}.bg-red-300{background-color:var(--color-red-300)}.bg-red-400{background-color:var(--color-red-400)}.bg-red-500{background-color:var(--color-red-500)}.bg-red-500\/20{background-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/20{background-color:color-mix(in oklab,var(--color-red-500) 20%,transparent)}}.bg-red-600{background-color:var(--color-red-600)}.bg-red-600\/20{background-color:#e4001433}@supports (color:color-mix(in lab,red,red)){.bg-red-600\/20{background-color:color-mix(in oklab,var(--color-red-600) 20%,transparent)}}.bg-red-700\/15{background-color:#bf000f26}@supports (color:color-mix(in lab,red,red)){.bg-red-700\/15{background-color:color-mix(in oklab,var(--color-red-700) 15%,transparent)}}.bg-rose-50{background-color:var(--color-rose-50)}.bg-rose-100{background-color:var(--color-rose-100)}.bg-rose-500\/20{background-color:#ff235733}@supports (color:color-mix(in lab,red,red)){.bg-rose-500\/20{background-color:color-mix(in oklab,var(--color-rose-500) 20%,transparent)}}.bg-secondary{background-color:var(--secondary)}.bg-sidebar{background-color:var(--sidebar)}.bg-sidebar-border{background-color:var(--sidebar-border)}.bg-sky-50{background-color:var(--color-sky-50)}.bg-sky-50\/80{background-color:#f0f9ffcc}@supports (color:color-mix(in lab,red,red)){.bg-sky-50\/80{background-color:color-mix(in oklab,var(--color-sky-50) 80%,transparent)}}.bg-sky-50\/90{background-color:#f0f9ffe6}@supports (color:color-mix(in lab,red,red)){.bg-sky-50\/90{background-color:color-mix(in oklab,var(--color-sky-50) 90%,transparent)}}.bg-sky-100{background-color:var(--color-sky-100)}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-50\/30{background-color:#f8fafc4d}@supports (color:color-mix(in lab,red,red)){.bg-slate-50\/30{background-color:color-mix(in oklab,var(--color-slate-50) 30%,transparent)}}.bg-slate-50\/40{background-color:#f8fafc66}@supports (color:color-mix(in lab,red,red)){.bg-slate-50\/40{background-color:color-mix(in oklab,var(--color-slate-50) 40%,transparent)}}.bg-slate-50\/50{background-color:#f8fafc80}@supports (color:color-mix(in lab,red,red)){.bg-slate-50\/50{background-color:color-mix(in oklab,var(--color-slate-50) 50%,transparent)}}.bg-slate-50\/80{background-color:#f8fafccc}@supports (color:color-mix(in lab,red,red)){.bg-slate-50\/80{background-color:color-mix(in oklab,var(--color-slate-50) 80%,transparent)}}.bg-slate-50\/95{background-color:#f8fafcf2}@supports (color:color-mix(in lab,red,red)){.bg-slate-50\/95{background-color:color-mix(in oklab,var(--color-slate-50) 95%,transparent)}}.bg-slate-100{background-color:var(--color-slate-100)}.bg-slate-100\/80{background-color:#f1f5f9cc}@supports (color:color-mix(in lab,red,red)){.bg-slate-100\/80{background-color:color-mix(in oklab,var(--color-slate-100) 80%,transparent)}}.bg-slate-200{background-color:var(--color-slate-200)}.bg-slate-200\/70{background-color:#e2e8f0b3}@supports (color:color-mix(in lab,red,red)){.bg-slate-200\/70{background-color:color-mix(in oklab,var(--color-slate-200) 70%,transparent)}}.bg-slate-300{background-color:var(--color-slate-300)}.bg-slate-400{background-color:var(--color-slate-400)}.bg-slate-500{background-color:var(--color-slate-500)}.bg-slate-600{background-color:var(--color-slate-600)}.bg-slate-700{background-color:var(--color-slate-700)}.bg-slate-700\/50{background-color:#31415880}@supports (color:color-mix(in lab,red,red)){.bg-slate-700\/50{background-color:color-mix(in oklab,var(--color-slate-700) 50%,transparent)}}.bg-slate-800{background-color:var(--color-slate-800)}.bg-slate-800\/50{background-color:#1d293d80}@supports (color:color-mix(in lab,red,red)){.bg-slate-800\/50{background-color:color-mix(in oklab,var(--color-slate-800) 50%,transparent)}}.bg-slate-900{background-color:var(--color-slate-900)}.bg-slate-900\/5{background-color:#0f172b0d}@supports (color:color-mix(in lab,red,red)){.bg-slate-900\/5{background-color:color-mix(in oklab,var(--color-slate-900) 5%,transparent)}}.bg-slate-900\/20{background-color:#0f172b33}@supports (color:color-mix(in lab,red,red)){.bg-slate-900\/20{background-color:color-mix(in oklab,var(--color-slate-900) 20%,transparent)}}.bg-slate-950{background-color:var(--color-slate-950)}.bg-teal-100{background-color:var(--color-teal-100)}.bg-teal-500{background-color:var(--color-teal-500)}.bg-teal-600{background-color:var(--color-teal-600)}.bg-transparent{background-color:#0000}.bg-violet-50\/80{background-color:#f5f3ffcc}@supports (color:color-mix(in lab,red,red)){.bg-violet-50\/80{background-color:color-mix(in oklab,var(--color-violet-50) 80%,transparent)}}.bg-violet-50\/90{background-color:#f5f3ffe6}@supports (color:color-mix(in lab,red,red)){.bg-violet-50\/90{background-color:color-mix(in oklab,var(--color-violet-50) 90%,transparent)}}.bg-violet-100{background-color:var(--color-violet-100)}.bg-white{background-color:var(--color-white)}.bg-white\/5{background-color:#ffffff0d}@supports (color:color-mix(in lab,red,red)){.bg-white\/5{background-color:color-mix(in oklab,var(--color-white) 5%,transparent)}}.bg-white\/10{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.bg-white\/10{background-color:color-mix(in oklab,var(--color-white) 10%,transparent)}}.bg-white\/20{background-color:#fff3}@supports (color:color-mix(in lab,red,red)){.bg-white\/20{background-color:color-mix(in oklab,var(--color-white) 20%,transparent)}}.bg-white\/40{background-color:#fff6}@supports (color:color-mix(in lab,red,red)){.bg-white\/40{background-color:color-mix(in oklab,var(--color-white) 40%,transparent)}}.bg-white\/50{background-color:#ffffff80}@supports (color:color-mix(in lab,red,red)){.bg-white\/50{background-color:color-mix(in oklab,var(--color-white) 50%,transparent)}}.bg-white\/60{background-color:#fff9}@supports (color:color-mix(in lab,red,red)){.bg-white\/60{background-color:color-mix(in oklab,var(--color-white) 60%,transparent)}}.bg-white\/80{background-color:#fffc}@supports (color:color-mix(in lab,red,red)){.bg-white\/80{background-color:color-mix(in oklab,var(--color-white) 80%,transparent)}}.bg-yellow-50\/30{background-color:#fefce84d}@supports (color:color-mix(in lab,red,red)){.bg-yellow-50\/30{background-color:color-mix(in oklab,var(--color-yellow-50) 30%,transparent)}}.bg-yellow-100{background-color:var(--color-yellow-100)}.bg-yellow-500{background-color:var(--color-yellow-500)}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-blue-50{--tw-gradient-from:var(--color-blue-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-green-50{--tw-gradient-from:var(--color-green-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-green-600{--tw-gradient-from:var(--color-green-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-purple-50{--tw-gradient-from:var(--color-purple-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-re-red{--tw-gradient-from:var(--re-red);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-re-red\/20{--tw-gradient-from:var(--re-red)}@supports (color:color-mix(in lab,red,red)){.from-re-red\/20{--tw-gradient-from:color-mix(in oklab, var(--re-red) 20%, transparent)}}.from-re-red\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-red-50{--tw-gradient-from:var(--color-red-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-red-500{--tw-gradient-from:var(--color-red-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-red-600{--tw-gradient-from:var(--color-red-600);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-red-600\/20{--tw-gradient-from:#e4001433}@supports (color:color-mix(in lab,red,red)){.from-red-600\/20{--tw-gradient-from:color-mix(in oklab, var(--color-red-600) 20%, transparent)}}.from-red-600\/20{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-slate-900{--tw-gradient-from:var(--color-slate-900);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-white{--tw-gradient-from:var(--color-white);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.via-slate-800{--tw-gradient-via:var(--color-slate-800);--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-cyan-50{--tw-gradient-to:var(--color-cyan-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-emerald-50{--tw-gradient-to:var(--color-emerald-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-green-500{--tw-gradient-to:var(--color-green-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-indigo-50{--tw-gradient-to:var(--color-indigo-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-orange-50{--tw-gradient-to:var(--color-orange-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-re-red{--tw-gradient-to:var(--re-red);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-re-red-hover{--tw-gradient-to:var(--re-red-hover);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-red-50{--tw-gradient-to:var(--color-red-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-red-500{--tw-gradient-to:var(--color-red-500);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-red-700{--tw-gradient-to:var(--color-red-700);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-slate-50{--tw-gradient-to:var(--color-slate-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-slate-50\/50{--tw-gradient-to:#f8fafc80}@supports (color:color-mix(in lab,red,red)){.to-slate-50\/50{--tw-gradient-to:color-mix(in oklab, var(--color-slate-50) 50%, transparent)}}.to-slate-50\/50{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-slate-800{--tw-gradient-to:var(--color-slate-800);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-slate-900{--tw-gradient-to:var(--color-slate-900);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.fill-current{fill:currentColor}.fill-primary{fill:var(--primary)}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:calc(var(--spacing) * 0)}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:calc(var(--spacing) * 1)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-2\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-7{padding:calc(var(--spacing) * 7)}.p-8{padding:calc(var(--spacing) * 8)}.p-10{padding:calc(var(--spacing) * 10)}.p-12{padding:calc(var(--spacing) * 12)}.p-20{padding:calc(var(--spacing) * 20)}.p-\[3px\]{padding:3px}.p-px{padding:1px}.px-0{padding-inline:calc(var(--spacing) * 0)}.px-1{padding-inline:calc(var(--spacing) * 1)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-8{padding-inline:calc(var(--spacing) * 8)}.px-10{padding-inline:calc(var(--spacing) * 10)}.py-0{padding-block:calc(var(--spacing) * 0)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-5{padding-block:calc(var(--spacing) * 5)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-10{padding-block:calc(var(--spacing) * 10)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-16{padding-block:calc(var(--spacing) * 16)}.py-20{padding-block:calc(var(--spacing) * 20)}.pt-0{padding-top:calc(var(--spacing) * 0)}.pt-0\.5{padding-top:calc(var(--spacing) * .5)}.pt-1{padding-top:calc(var(--spacing) * 1)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-2\.5{padding-top:calc(var(--spacing) * 2.5)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-5{padding-top:calc(var(--spacing) * 5)}.pt-6{padding-top:calc(var(--spacing) * 6)}.pt-8{padding-top:calc(var(--spacing) * 8)}.pt-10{padding-top:calc(var(--spacing) * 10)}.pt-24{padding-top:calc(var(--spacing) * 24)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-2\.5{padding-right:calc(var(--spacing) * 2.5)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-4{padding-right:calc(var(--spacing) * 4)}.pr-6{padding-right:calc(var(--spacing) * 6)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pr-10{padding-right:calc(var(--spacing) * 10)}.pb-1{padding-bottom:calc(var(--spacing) * 1)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-2\.5{padding-bottom:calc(var(--spacing) * 2.5)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.pb-8{padding-bottom:calc(var(--spacing) * 8)}.pb-24{padding-bottom:calc(var(--spacing) * 24)}.pl-1{padding-left:calc(var(--spacing) * 1)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-5{padding-left:calc(var(--spacing) * 5)}.pl-6{padding-left:calc(var(--spacing) * 6)}.pl-7{padding-left:calc(var(--spacing) * 7)}.pl-8{padding-left:calc(var(--spacing) * 8)}.pl-9{padding-left:calc(var(--spacing) * 9)}.pl-10{padding-left:calc(var(--spacing) * 10)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.align-middle{vertical-align:middle}.align-top{vertical-align:top}.font-mono{font-family:var(--font-montserrat)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[0\.8rem\]{font-size:.8rem}.text-\[8px\]{font-size:8px}.text-\[9px\]{font-size:9px}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[12px\]{font-size:12px}.text-\[13px\]{font-size:13px}.text-\[14px\]{font-size:14px}.text-\[15px\]{font-size:15px}.text-\[28px\]{font-size:28px}.leading-none{--tw-leading:1;line-height:1}.leading-normal{--tw-leading:var(--leading-normal);line-height:var(--leading-normal)}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-black{--tw-font-weight:var(--font-weight-black);font-weight:var(--font-weight-black)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-extrabold{--tw-font-weight:var(--font-weight-extrabold);font-weight:var(--font-weight-extrabold)}.font-light{--tw-font-weight:var(--font-weight-light);font-weight:var(--font-weight-light)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\[0\.1em\]{--tw-tracking:.1em;letter-spacing:.1em}.tracking-\[0\.2em\]{--tw-tracking:.2em;letter-spacing:.2em}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-tighter{--tw-tracking:var(--tracking-tighter);letter-spacing:var(--tracking-tighter)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.text-balance{text-wrap:balance}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-\[\#333333\]{color:#333}.text-\[\#666666\]{color:#666}.text-accent-foreground{color:var(--accent-foreground)}.text-amber-600{color:var(--color-amber-600)}.text-amber-700{color:var(--color-amber-700)}.text-amber-800{color:var(--color-amber-800)}.text-amber-900{color:var(--color-amber-900)}.text-black{color:var(--color-black)}.text-blue-500{color:var(--color-blue-500)}.text-blue-600{color:var(--color-blue-600)}.text-blue-700{color:var(--color-blue-700)}.text-blue-800{color:var(--color-blue-800)}.text-blue-900{color:var(--color-blue-900)}.text-card-foreground{color:var(--card-foreground)}.text-current{color:currentColor}.text-cyan-700{color:var(--color-cyan-700)}.text-cyan-800{color:var(--color-cyan-800)}.text-destructive{color:var(--destructive)}.text-emerald-400{color:var(--color-emerald-400)}.text-emerald-500{color:var(--color-emerald-500)}.text-emerald-600{color:var(--color-emerald-600)}.text-emerald-700{color:var(--color-emerald-700)}.text-emerald-800{color:var(--color-emerald-800)}.text-emerald-900{color:var(--color-emerald-900)}.text-foreground{color:var(--foreground)}.text-gray-300{color:var(--color-gray-300)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-gray-900{color:var(--color-gray-900)}.text-green-400{color:var(--color-green-400)}.text-green-500{color:var(--color-green-500)}.text-green-600{color:var(--color-green-600)}.text-green-700{color:var(--color-green-700)}.text-green-800{color:var(--color-green-800)}.text-green-900{color:var(--color-green-900)}.text-indigo-600{color:var(--color-indigo-600)}.text-indigo-700{color:var(--color-indigo-700)}.text-indigo-800{color:var(--color-indigo-800)}.text-muted-foreground{color:var(--muted-foreground)}.text-orange-600{color:var(--color-orange-600)}.text-orange-700{color:var(--color-orange-700)}.text-orange-800{color:var(--color-orange-800)}.text-orange-900{color:var(--color-orange-900)}.text-pink-800{color:var(--color-pink-800)}.text-popover-foreground{color:var(--popover-foreground)}.text-primary{color:var(--primary)}.text-primary-600{color:var(--primary-600)}.text-primary-foreground{color:var(--primary-foreground)}.text-purple-600{color:var(--color-purple-600)}.text-purple-700{color:var(--color-purple-700)}.text-purple-800{color:var(--color-purple-800)}.text-re-red{color:var(--re-red)}.text-re-red-hover{color:var(--re-red-hover)}.text-red-100{color:var(--color-red-100)}.text-red-100\/80{color:#ffe2e2cc}@supports (color:color-mix(in lab,red,red)){.text-red-100\/80{color:color-mix(in oklab,var(--color-red-100) 80%,transparent)}}.text-red-400{color:var(--color-red-400)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-red-800{color:var(--color-red-800)}.text-red-800\/80{color:#9f0712cc}@supports (color:color-mix(in lab,red,red)){.text-red-800\/80{color:color-mix(in oklab,var(--color-red-800) 80%,transparent)}}.text-red-900{color:var(--color-red-900)}.text-rose-400{color:var(--color-rose-400)}.text-rose-700{color:var(--color-rose-700)}.text-secondary-foreground{color:var(--secondary-foreground)}.text-sidebar-foreground,.text-sidebar-foreground\/70{color:var(--sidebar-foreground)}@supports (color:color-mix(in lab,red,red)){.text-sidebar-foreground\/70{color:color-mix(in oklab,var(--sidebar-foreground) 70%,transparent)}}.text-sky-700{color:var(--color-sky-700)}.text-sky-800{color:var(--color-sky-800)}.text-sky-900{color:var(--color-sky-900)}.text-sky-900\/90{color:#024a70e6}@supports (color:color-mix(in lab,red,red)){.text-sky-900\/90{color:color-mix(in oklab,var(--color-sky-900) 90%,transparent)}}.text-sky-950{color:var(--color-sky-950)}.text-slate-100{color:var(--color-slate-100)}.text-slate-200{color:var(--color-slate-200)}.text-slate-300{color:var(--color-slate-300)}.text-slate-400{color:var(--color-slate-400)}.text-slate-500{color:var(--color-slate-500)}.text-slate-600{color:var(--color-slate-600)}.text-slate-700{color:var(--color-slate-700)}.text-slate-800{color:var(--color-slate-800)}.text-slate-900{color:var(--color-slate-900)}.text-teal-700{color:var(--color-teal-700)}.text-teal-800{color:var(--color-teal-800)}.text-violet-700{color:var(--color-violet-700)}.text-violet-800{color:var(--color-violet-800)}.text-violet-900{color:var(--color-violet-900)}.text-violet-900\/90{color:#4d179ae6}@supports (color:color-mix(in lab,red,red)){.text-violet-900\/90{color:color-mix(in oklab,var(--color-violet-900) 90%,transparent)}}.text-violet-950{color:var(--color-violet-950)}.text-white{color:var(--color-white)}.text-white\/70{color:#ffffffb3}@supports (color:color-mix(in lab,red,red)){.text-white\/70{color:color-mix(in oklab,var(--color-white) 70%,transparent)}}.text-white\/80{color:#fffc}@supports (color:color-mix(in lab,red,red)){.text-white\/80{color:color-mix(in oklab,var(--color-white) 80%,transparent)}}.text-white\/90{color:#ffffffe6}@supports (color:color-mix(in lab,red,red)){.text-white\/90{color:color-mix(in oklab,var(--color-white) 90%,transparent)}}.text-yellow-600{color:var(--color-yellow-600)}.text-yellow-700{color:var(--color-yellow-700)}.text-yellow-800{color:var(--color-yellow-800)}.capitalize{text-transform:capitalize}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.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,)}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.underline{text-decoration-line:underline}.decoration-re-red{text-decoration-color:var(--re-red)}.decoration-2{text-decoration-thickness:2px}.underline-offset-4{text-underline-offset:4px}.accent-slate-900{accent-color:var(--color-slate-900)}.opacity-0{opacity:0}.opacity-20{opacity:.2}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.opacity-90{opacity:.9}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_-4px_10px_-5px_rgba\(0\,0\,0\,0\.05\)\]{--tw-shadow:0 -4px 10px -5px var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_0_1px_hsl\(var\(--sidebar-border\)\)\]{--tw-shadow:0 0 0 1px var(--tw-shadow-color,hsl(var(--sidebar-border)));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_8px_rgba\(34\,197\,94\,0\.4\)\]{--tw-shadow:0 0 8px var(--tw-shadow-color,#22c55e66);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_40px_rgba\(218\,41\,28\,0\.2\)\]{--tw-shadow:0 0 40px var(--tw-shadow-color,#da291c33);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_40px_rgba\(220\,38\,38\,0\.2\)\]{--tw-shadow:0 0 40px var(--tw-shadow-color,#dc262633);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xs{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-0{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-green-100{--tw-shadow-color:oklch(96.2% .044 156.743)}@supports (color:color-mix(in lab,red,red)){.shadow-green-100{--tw-shadow-color:color-mix(in oklab, var(--color-green-100) var(--tw-shadow-alpha), transparent)}}.shadow-green-600\/20{--tw-shadow-color:#00a54433}@supports (color:color-mix(in lab,red,red)){.shadow-green-600\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-green-600) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-purple-200{--tw-shadow-color:oklch(90.2% .063 306.703)}@supports (color:color-mix(in lab,red,red)){.shadow-purple-200{--tw-shadow-color:color-mix(in oklab, var(--color-purple-200) var(--tw-shadow-alpha), transparent)}}.shadow-re-red\/10{--tw-shadow-color:var(--re-red)}@supports (color:color-mix(in lab,red,red)){.shadow-re-red\/10{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--re-red) 10%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-re-red\/15{--tw-shadow-color:var(--re-red)}@supports (color:color-mix(in lab,red,red)){.shadow-re-red\/15{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--re-red) 15%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-re-red\/20{--tw-shadow-color:var(--re-red)}@supports (color:color-mix(in lab,red,red)){.shadow-re-red\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--re-red) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-red-200{--tw-shadow-color:oklch(88.5% .062 18.334)}@supports (color:color-mix(in lab,red,red)){.shadow-red-200{--tw-shadow-color:color-mix(in oklab, var(--color-red-200) var(--tw-shadow-alpha), transparent)}}.shadow-red-200\/50{--tw-shadow-color:#ffcaca80}@supports (color:color-mix(in lab,red,red)){.shadow-red-200\/50{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-red-200) 50%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-slate-200{--tw-shadow-color:oklch(92.9% .013 255.508)}@supports (color:color-mix(in lab,red,red)){.shadow-slate-200{--tw-shadow-color:color-mix(in oklab, var(--color-slate-200) var(--tw-shadow-alpha), transparent)}}.ring-black\/5{--tw-ring-color:#0000000d}@supports (color:color-mix(in lab,red,red)){.ring-black\/5{--tw-ring-color:color-mix(in oklab, var(--color-black) 5%, transparent)}}.ring-emerald-300{--tw-ring-color:var(--color-emerald-300)}.ring-emerald-300\/70{--tw-ring-color:#5ee9b5b3}@supports (color:color-mix(in lab,red,red)){.ring-emerald-300\/70{--tw-ring-color:color-mix(in oklab, var(--color-emerald-300) 70%, transparent)}}.ring-re-red\/20{--tw-ring-color:var(--re-red)}@supports (color:color-mix(in lab,red,red)){.ring-re-red\/20{--tw-ring-color:color-mix(in oklab, var(--re-red) 20%, transparent)}}.ring-red-300\/70{--tw-ring-color:#ffa3a3b3}@supports (color:color-mix(in lab,red,red)){.ring-red-300\/70{--tw-ring-color:color-mix(in oklab, var(--color-red-300) 70%, transparent)}}.ring-ring\/50{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){.ring-ring\/50{--tw-ring-color:color-mix(in oklab, var(--ring) 50%, transparent)}}.ring-sidebar-ring{--tw-ring-color:var(--sidebar-ring)}.ring-slate-100{--tw-ring-color:var(--color-slate-100)}.ring-slate-200{--tw-ring-color:var(--color-slate-200)}.ring-transparent{--tw-ring-color:transparent}.ring-white\/20{--tw-ring-color:#fff3}@supports (color:color-mix(in lab,red,red)){.ring-white\/20{--tw-ring-color:color-mix(in oklab, var(--color-white) 20%, transparent)}}.ring-offset-background{--tw-ring-offset-color:var(--background)}.ring-offset-white{--tw-ring-offset-color:var(--color-white)}.outline-hidden{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.outline-hidden{outline-offset:2px;outline:2px solid #0000}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur-3xl{--tw-blur:blur(var(--blur-3xl));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,)}.grayscale-\[0\.5\]{--tw-grayscale:grayscale(.5);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur-\[1px\]{--tw-backdrop-blur:blur(1px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[color\,box-shadow\]{transition-property:color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[left\,right\,width\]{transition-property:left,right,width;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[margin\,opacity\]{transition-property:margin,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[width\,height\,padding\]{transition-property:width,height,padding;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[width\]{transition-property:width;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-none{transition-property:none}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.duration-1000{--tw-duration:1s;transition-duration:1s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-linear{--tw-ease:linear;transition-timing-function:linear}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.group-focus-within\/menu-item\:opacity-100:is(:where(.group\/menu-item):focus-within *){opacity:1}@media(hover:hover){.group-hover\:scale-105:is(:where(.group):hover *){--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x) var(--tw-scale-y)}.group-hover\:scale-110:is(:where(.group):hover *){--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x) var(--tw-scale-y)}.group-hover\:bg-blue-50:is(:where(.group):hover *){background-color:var(--color-blue-50)}.group-hover\:bg-re-red:is(:where(.group):hover *){background-color:var(--re-red)}.group-hover\:bg-red-50:is(:where(.group):hover *){background-color:var(--color-red-50)}.group-hover\:bg-slate-100:is(:where(.group):hover *){background-color:var(--color-slate-100)}.group-hover\:bg-white:is(:where(.group):hover *){background-color:var(--color-white)}.group-hover\:text-blue-600:is(:where(.group):hover *){color:var(--color-blue-600)}.group-hover\:text-emerald-900:is(:where(.group):hover *){color:var(--color-emerald-900)}.group-hover\:text-re-red:is(:where(.group):hover *){color:var(--re-red)}.group-hover\:text-re-red-hover:is(:where(.group):hover *){color:var(--re-red-hover)}.group-hover\:text-red-900:is(:where(.group):hover *){color:var(--color-red-900)}.group-hover\:text-slate-400:is(:where(.group):hover *){color:var(--color-slate-400)}.group-hover\:text-slate-900:is(:where(.group):hover *){color:var(--color-slate-900)}.group-hover\:text-white:is(:where(.group):hover *){color:var(--color-white)}.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}.group-hover\:ring-blue-100:is(:where(.group):hover *){--tw-ring-color:var(--color-blue-100)}.group-hover\/menu-item\:opacity-100:is(:where(.group\/menu-item):hover *),.group-hover\/num\:opacity-100:is(:where(.group\/num):hover *){opacity:1}.group-hover\/opt\:text-slate-900:is(:where(.group\/opt):hover *){color:var(--color-slate-900)}.group-hover\/opt\:opacity-100:is(:where(.group\/opt):hover *),.group-hover\/optnum\:opacity-100:is(:where(.group\/optnum):hover *){opacity:1}}.group-has-data-\[sidebar\=menu-action\]\/menu-item\:pr-8:is(:where(.group\/menu-item):has([data-sidebar=menu-action]) *){padding-right:calc(var(--spacing) * 8)}.group-data-\[collapsible\=icon\]\:-mt-8:is(:where(.group)[data-collapsible=icon] *){margin-top:calc(var(--spacing) * -8)}.group-data-\[collapsible\=icon\]\:hidden:is(:where(.group)[data-collapsible=icon] *){display:none}.group-data-\[collapsible\=icon\]\:size-8\!:is(:where(.group)[data-collapsible=icon] *){width:calc(var(--spacing) * 8)!important;height:calc(var(--spacing) * 8)!important}.group-data-\[collapsible\=icon\]\:w-\(--sidebar-width-icon\):is(:where(.group)[data-collapsible=icon] *){width:var(--sidebar-width-icon)}.group-data-\[collapsible\=icon\]\:w-\[calc\(var\(--sidebar-width-icon\)\+\(--spacing\(4\)\)\)\]:is(:where(.group)[data-collapsible=icon] *){width:calc(var(--sidebar-width-icon) + (calc(var(--spacing) * 4)))}.group-data-\[collapsible\=icon\]\:w-\[calc\(var\(--sidebar-width-icon\)\+\(--spacing\(4\)\)\+2px\)\]:is(:where(.group)[data-collapsible=icon] *){width:calc(var(--sidebar-width-icon) + (calc(var(--spacing) * 4)) + 2px)}.group-data-\[collapsible\=icon\]\:overflow-hidden:is(:where(.group)[data-collapsible=icon] *){overflow:hidden}.group-data-\[collapsible\=icon\]\:p-0\!:is(:where(.group)[data-collapsible=icon] *){padding:calc(var(--spacing) * 0)!important}.group-data-\[collapsible\=icon\]\:p-2\!:is(:where(.group)[data-collapsible=icon] *){padding:calc(var(--spacing) * 2)!important}.group-data-\[collapsible\=icon\]\:opacity-0:is(:where(.group)[data-collapsible=icon] *){opacity:0}.group-data-\[collapsible\=offcanvas\]\:right-\[calc\(var\(--sidebar-width\)\*-1\)\]:is(:where(.group)[data-collapsible=offcanvas] *){right:calc(var(--sidebar-width) * -1)}.group-data-\[collapsible\=offcanvas\]\:left-\[calc\(var\(--sidebar-width\)\*-1\)\]:is(:where(.group)[data-collapsible=offcanvas] *){left:calc(var(--sidebar-width) * -1)}.group-data-\[collapsible\=offcanvas\]\:w-0:is(:where(.group)[data-collapsible=offcanvas] *){width:calc(var(--spacing) * 0)}.group-data-\[collapsible\=offcanvas\]\:translate-x-0:is(:where(.group)[data-collapsible=offcanvas] *){--tw-translate-x:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.group-data-\[disabled\=true\]\:pointer-events-none:is(:where(.group)[data-disabled=true] *){pointer-events:none}.group-data-\[disabled\=true\]\:opacity-50:is(:where(.group)[data-disabled=true] *){opacity:.5}.group-data-\[side\=left\]\:-right-4:is(:where(.group)[data-side=left] *){right:calc(var(--spacing) * -4)}.group-data-\[side\=left\]\:border-r:is(:where(.group)[data-side=left] *){border-right-style:var(--tw-border-style);border-right-width:1px}.group-data-\[side\=right\]\:left-0:is(:where(.group)[data-side=right] *){left:calc(var(--spacing) * 0)}.group-data-\[side\=right\]\:rotate-180:is(:where(.group)[data-side=right] *){rotate:180deg}.group-data-\[side\=right\]\:border-l:is(:where(.group)[data-side=right] *){border-left-style:var(--tw-border-style);border-left-width:1px}.group-data-\[state\=open\]\:rotate-180:is(:where(.group)[data-state=open] *){rotate:180deg}.group-data-\[variant\=floating\]\:rounded-lg:is(:where(.group)[data-variant=floating] *){border-radius:var(--radius)}.group-data-\[variant\=floating\]\:border:is(:where(.group)[data-variant=floating] *){border-style:var(--tw-border-style);border-width:1px}.group-data-\[variant\=floating\]\:border-sidebar-border:is(:where(.group)[data-variant=floating] *){border-color:var(--sidebar-border)}.group-data-\[variant\=floating\]\:shadow-sm:is(:where(.group)[data-variant=floating] *){--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.group-data-\[vaul-drawer-direction\=bottom\]\/drawer-content\:block:is(:where(.group\/drawer-content)[data-vaul-drawer-direction=bottom] *){display:block}.group-data-\[viewport\=false\]\/navigation-menu\:top-full:is(:where(.group\/navigation-menu)[data-viewport=false] *){top:100%}.group-data-\[viewport\=false\]\/navigation-menu\:mt-1\.5:is(:where(.group\/navigation-menu)[data-viewport=false] *){margin-top:calc(var(--spacing) * 1.5)}.group-data-\[viewport\=false\]\/navigation-menu\:overflow-hidden:is(:where(.group\/navigation-menu)[data-viewport=false] *){overflow:hidden}.group-data-\[viewport\=false\]\/navigation-menu\:rounded-md:is(:where(.group\/navigation-menu)[data-viewport=false] *){border-radius:calc(var(--radius) - 2px)}.group-data-\[viewport\=false\]\/navigation-menu\:border:is(:where(.group\/navigation-menu)[data-viewport=false] *){border-style:var(--tw-border-style);border-width:1px}.group-data-\[viewport\=false\]\/navigation-menu\:bg-popover:is(:where(.group\/navigation-menu)[data-viewport=false] *){background-color:var(--popover)}.group-data-\[viewport\=false\]\/navigation-menu\:text-popover-foreground:is(:where(.group\/navigation-menu)[data-viewport=false] *){color:var(--popover-foreground)}.group-data-\[viewport\=false\]\/navigation-menu\:shadow:is(:where(.group\/navigation-menu)[data-viewport=false] *){--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.group-data-\[viewport\=false\]\/navigation-menu\:duration-200:is(:where(.group\/navigation-menu)[data-viewport=false] *){--tw-duration:.2s;transition-duration:.2s}@media(hover:hover){.peer-hover\/menu-button\:text-sidebar-accent-foreground:is(:where(.peer\/menu-button):hover~*){color:var(--sidebar-accent-foreground)}}.peer-disabled\:cursor-not-allowed:is(:where(.peer):disabled~*){cursor:not-allowed}.peer-disabled\:opacity-50:is(:where(.peer):disabled~*){opacity:.5}.peer-disabled\:opacity-70:is(:where(.peer):disabled~*){opacity:.7}.peer-data-\[active\=true\]\/menu-button\:text-sidebar-accent-foreground:is(:where(.peer\/menu-button)[data-active=true]~*){color:var(--sidebar-accent-foreground)}.peer-data-\[size\=default\]\/menu-button\:top-1\.5:is(:where(.peer\/menu-button)[data-size=default]~*){top:calc(var(--spacing) * 1.5)}.peer-data-\[size\=lg\]\/menu-button\:top-2\.5:is(:where(.peer\/menu-button)[data-size=lg]~*){top:calc(var(--spacing) * 2.5)}.peer-data-\[size\=sm\]\/menu-button\:top-1:is(:where(.peer\/menu-button)[data-size=sm]~*){top:calc(var(--spacing) * 1)}.selection\:bg-primary ::-moz-selection{background-color:var(--primary)}.selection\:bg-primary ::selection{background-color:var(--primary)}.selection\:bg-primary::-moz-selection{background-color:var(--primary)}.selection\:bg-primary::selection{background-color:var(--primary)}.selection\:text-primary-foreground ::-moz-selection{color:var(--primary-foreground)}.selection\:text-primary-foreground ::selection{color:var(--primary-foreground)}.selection\:text-primary-foreground::-moz-selection{color:var(--primary-foreground)}.selection\:text-primary-foreground::selection{color:var(--primary-foreground)}.file\:mr-4::file-selector-button{margin-right:calc(var(--spacing) * 4)}.file\:inline-flex::file-selector-button{display:inline-flex}.file\:h-7::file-selector-button{height:calc(var(--spacing) * 7)}.file\:rounded-full::file-selector-button{border-radius:3.40282e38px}.file\:border-0::file-selector-button{border-style:var(--tw-border-style);border-width:0}.file\:bg-red-50::file-selector-button{background-color:var(--color-red-50)}.file\:bg-transparent::file-selector-button{background-color:#0000}.file\:px-4::file-selector-button{padding-inline:calc(var(--spacing) * 4)}.file\:py-1::file-selector-button{padding-block:calc(var(--spacing) * 1)}.file\:py-2::file-selector-button{padding-block:calc(var(--spacing) * 2)}.file\:text-sm::file-selector-button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.file\:text-xs::file-selector-button{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.file\:font-medium::file-selector-button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.file\:font-semibold::file-selector-button{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.file\:text-foreground::file-selector-button{color:var(--foreground)}.file\:text-re-red::file-selector-button{color:var(--re-red)}.file\:text-re-red-hover::file-selector-button{color:var(--re-red-hover)}.placeholder\:font-bold::-moz-placeholder{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.placeholder\:font-bold::placeholder{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.placeholder\:text-\[\#999999\]::-moz-placeholder{color:#999}.placeholder\:text-\[\#999999\]::placeholder{color:#999}.placeholder\:text-muted-foreground::-moz-placeholder{color:var(--muted-foreground)}.placeholder\:text-muted-foreground::placeholder{color:var(--muted-foreground)}.placeholder\:text-slate-300::-moz-placeholder{color:var(--color-slate-300)}.placeholder\:text-slate-300::placeholder{color:var(--color-slate-300)}.placeholder\:text-slate-400::-moz-placeholder{color:var(--color-slate-400)}.placeholder\:text-slate-400::placeholder{color:var(--color-slate-400)}.placeholder\:text-slate-500::-moz-placeholder{color:var(--color-slate-500)}.placeholder\:text-slate-500::placeholder{color:var(--color-slate-500)}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:-inset-2:after{content:var(--tw-content);inset:calc(var(--spacing) * -2)}.after\:inset-y-0:after{content:var(--tw-content);inset-block:calc(var(--spacing) * 0)}.after\:left-1\/2:after{content:var(--tw-content);left:50%}.after\:w-1:after{content:var(--tw-content);width:calc(var(--spacing) * 1)}.after\:w-\[2px\]:after{content:var(--tw-content);width:2px}.after\:-translate-x-1\/2:after{content:var(--tw-content);--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.group-data-\[collapsible\=offcanvas\]\:after\:left-full:is(:where(.group)[data-collapsible=offcanvas] *):after{content:var(--tw-content);left:100%}.first\:rounded-l-md:first-child{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.first\:border-l:first-child{border-left-style:var(--tw-border-style);border-left-width:1px}.last\:mb-0:last-child{margin-bottom:calc(var(--spacing) * 0)}.last\:rounded-r-md:last-child{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.last\:border-0:last-child{border-style:var(--tw-border-style);border-width:0}.last\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.last\:pb-0:last-child{padding-bottom:calc(var(--spacing) * 0)}.focus-within\:relative:focus-within{position:relative}.focus-within\:z-20:focus-within{z-index:20}.focus-within\:border-blue-400:focus-within{border-color:var(--color-blue-400)}.focus-within\:ring-1:focus-within{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-within\:ring-blue-100:focus-within{--tw-ring-color:var(--color-blue-100)}@media(hover:hover){.hover\:scale-110:hover{--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x) var(--tw-scale-y)}.hover\:scale-\[1\.01\]:hover{scale:1.01}.hover\:scale-\[1\.02\]:hover{scale:1.02}.hover\:border-blue-300:hover{border-color:var(--color-blue-300)}.hover\:border-re-red:hover{border-color:var(--re-red)}.hover\:border-red-200:hover{border-color:var(--color-red-200)}.hover\:border-red-300:hover{border-color:var(--color-red-300)}.hover\:border-red-400:hover{border-color:var(--color-red-400)}.hover\:border-red-500:hover{border-color:var(--color-red-500)}.hover\:border-slate-100:hover{border-color:var(--color-slate-100)}.hover\:border-slate-200:hover{border-color:var(--color-slate-200)}.hover\:border-slate-300:hover{border-color:var(--color-slate-300)}.hover\:bg-accent:hover{background-color:var(--accent)}.hover\:bg-amber-50:hover{background-color:var(--color-amber-50)}.hover\:bg-amber-100:hover{background-color:var(--color-amber-100)}.hover\:bg-amber-700:hover{background-color:var(--color-amber-700)}.hover\:bg-black:hover{background-color:var(--color-black)}.hover\:bg-blue-50:hover{background-color:var(--color-blue-50)}.hover\:bg-blue-100:hover{background-color:var(--color-blue-100)}.hover\:bg-blue-700:hover{background-color:var(--color-blue-700)}.hover\:bg-destructive\/90:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-destructive\/90:hover{background-color:color-mix(in oklab,var(--destructive) 90%,transparent)}}.hover\:bg-emerald-50\/30:hover{background-color:#ecfdf54d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-emerald-50\/30:hover{background-color:color-mix(in oklab,var(--color-emerald-50) 30%,transparent)}}.hover\:bg-emerald-100:hover{background-color:var(--color-emerald-100)}.hover\:bg-emerald-200:hover{background-color:var(--color-emerald-200)}.hover\:bg-emerald-700:hover{background-color:var(--color-emerald-700)}.hover\:bg-gray-50:hover{background-color:var(--color-gray-50)}.hover\:bg-green-100:hover{background-color:var(--color-green-100)}.hover\:bg-green-600:hover{background-color:var(--color-green-600)}.hover\:bg-green-700:hover{background-color:var(--color-green-700)}.hover\:bg-indigo-50:hover{background-color:var(--color-indigo-50)}.hover\:bg-indigo-700:hover{background-color:var(--color-indigo-700)}.hover\:bg-muted:hover,.hover\:bg-muted\/50:hover{background-color:var(--muted)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-muted\/50:hover{background-color:color-mix(in oklab,var(--muted) 50%,transparent)}}.hover\:bg-orange-50:hover{background-color:var(--color-orange-50)}.hover\:bg-orange-700:hover{background-color:var(--color-orange-700)}.hover\:bg-primary:hover{background-color:var(--primary)}.hover\:bg-primary-50:hover{background-color:var(--primary-50)}.hover\:bg-primary-700:hover{background-color:var(--primary-700)}.hover\:bg-primary\/90:hover{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab,var(--primary) 90%,transparent)}}.hover\:bg-purple-50:hover{background-color:var(--color-purple-50)}.hover\:bg-purple-700:hover{background-color:var(--color-purple-700)}.hover\:bg-re-red:hover{background-color:var(--re-red)}.hover\:bg-re-red-hover:hover{background-color:var(--re-red-hover)}.hover\:bg-re-red\/90:hover{background-color:var(--re-red)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-re-red\/90:hover{background-color:color-mix(in oklab,var(--re-red) 90%,transparent)}}.hover\:bg-red-50:hover{background-color:var(--color-red-50)}.hover\:bg-red-50\/20:hover{background-color:#fef2f233}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-50\/20:hover{background-color:color-mix(in oklab,var(--color-red-50) 20%,transparent)}}.hover\:bg-red-50\/30:hover{background-color:#fef2f24d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-50\/30:hover{background-color:color-mix(in oklab,var(--color-red-50) 30%,transparent)}}.hover\:bg-red-100:hover{background-color:var(--color-red-100)}.hover\:bg-red-700:hover{background-color:var(--color-red-700)}.hover\:bg-secondary\/80:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab,red,red)){.hover\:bg-secondary\/80:hover{background-color:color-mix(in oklab,var(--secondary) 80%,transparent)}}.hover\:bg-sidebar-accent:hover{background-color:var(--sidebar-accent)}.hover\:bg-slate-50:hover{background-color:var(--color-slate-50)}.hover\:bg-slate-50\/10:hover{background-color:#f8fafc1a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-slate-50\/10:hover{background-color:color-mix(in oklab,var(--color-slate-50) 10%,transparent)}}.hover\:bg-slate-50\/50:hover{background-color:#f8fafc80}@supports (color:color-mix(in lab,red,red)){.hover\:bg-slate-50\/50:hover{background-color:color-mix(in oklab,var(--color-slate-50) 50%,transparent)}}.hover\:bg-slate-50\/70:hover{background-color:#f8fafcb3}@supports (color:color-mix(in lab,red,red)){.hover\:bg-slate-50\/70:hover{background-color:color-mix(in oklab,var(--color-slate-50) 70%,transparent)}}.hover\:bg-slate-50\/80:hover{background-color:#f8fafccc}@supports (color:color-mix(in lab,red,red)){.hover\:bg-slate-50\/80:hover{background-color:color-mix(in oklab,var(--color-slate-50) 80%,transparent)}}.hover\:bg-slate-100:hover{background-color:var(--color-slate-100)}.hover\:bg-slate-200:hover{background-color:var(--color-slate-200)}.hover\:bg-slate-200\/50:hover{background-color:#e2e8f080}@supports (color:color-mix(in lab,red,red)){.hover\:bg-slate-200\/50:hover{background-color:color-mix(in oklab,var(--color-slate-200) 50%,transparent)}}.hover\:bg-slate-700:hover{background-color:var(--color-slate-700)}.hover\:bg-slate-800:hover{background-color:var(--color-slate-800)}.hover\:bg-slate-900:hover{background-color:var(--color-slate-900)}.hover\:bg-slate-950:hover{background-color:var(--color-slate-950)}.hover\:bg-transparent:hover{background-color:#0000}.hover\:bg-white:hover{background-color:var(--color-white)}.hover\:bg-white\/5:hover{background-color:#ffffff0d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/5:hover{background-color:color-mix(in oklab,var(--color-white) 5%,transparent)}}.hover\:bg-white\/10:hover{background-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/10:hover{background-color:color-mix(in oklab,var(--color-white) 10%,transparent)}}.hover\:bg-white\/30:hover{background-color:#ffffff4d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/30:hover{background-color:color-mix(in oklab,var(--color-white) 30%,transparent)}}.hover\:bg-white\/40:hover{background-color:#fff6}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/40:hover{background-color:color-mix(in oklab,var(--color-white) 40%,transparent)}}.hover\:bg-zinc-800:hover{background-color:var(--color-zinc-800)}.hover\:text-accent-foreground:hover{color:var(--accent-foreground)}.hover\:text-black:hover{color:var(--color-black)}.hover\:text-blue-600:hover{color:var(--color-blue-600)}.hover\:text-blue-700:hover{color:var(--color-blue-700)}.hover\:text-blue-800:hover{color:var(--color-blue-800)}.hover\:text-destructive:hover{color:var(--destructive)}.hover\:text-foreground:hover{color:var(--foreground)}.hover\:text-green-800:hover{color:var(--color-green-800)}.hover\:text-indigo-600:hover{color:var(--color-indigo-600)}.hover\:text-muted-foreground:hover{color:var(--muted-foreground)}.hover\:text-primary-700:hover{color:var(--primary-700)}.hover\:text-primary-foreground:hover{color:var(--primary-foreground)}.hover\:text-re-red:hover{color:var(--re-red)}.hover\:text-re-red-hover:hover{color:var(--re-red-hover)}.hover\:text-red-500:hover{color:var(--color-red-500)}.hover\:text-red-600:hover{color:var(--color-red-600)}.hover\:text-red-700:hover{color:var(--color-red-700)}.hover\:text-red-800:hover{color:var(--color-red-800)}.hover\:text-sidebar-accent-foreground:hover{color:var(--sidebar-accent-foreground)}.hover\:text-slate-600:hover{color:var(--color-slate-600)}.hover\:text-slate-700:hover{color:var(--color-slate-700)}.hover\:text-slate-900:hover{color:var(--color-slate-900)}.hover\:text-white:hover{color:var(--color-white)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-90:hover{opacity:.9}.hover\:opacity-100:hover{opacity:1}.hover\:shadow-\[0_0_0_1px_hsl\(var\(--sidebar-accent\)\)\]:hover{--tw-shadow:0 0 0 1px var(--tw-shadow-color,hsl(var(--sidebar-accent)));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-lg:hover{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-md:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-sm:hover{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:ring-4:hover{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:group-data-\[collapsible\=offcanvas\]\:bg-sidebar:hover:is(:where(.group)[data-collapsible=offcanvas] *){background-color:var(--sidebar)}.hover\:file\:bg-red-50:hover::file-selector-button{background-color:var(--color-red-50)}.hover\:file\:bg-red-100:hover::file-selector-button{background-color:var(--color-red-100)}.hover\:after\:bg-sidebar-border:hover:after{content:var(--tw-content);background-color:var(--sidebar-border)}}.focus\:z-10:focus{z-index:10}.focus\:border-re-red:focus,.focus\:border-re-red\/40:focus{border-color:var(--re-red)}@supports (color:color-mix(in lab,red,red)){.focus\:border-re-red\/40:focus{border-color:color-mix(in oklab,var(--re-red) 40%,transparent)}}.focus\:border-red-500:focus{border-color:var(--color-red-500)}.focus\:bg-accent:focus{background-color:var(--accent)}.focus\:bg-primary:focus{background-color:var(--primary)}.focus\:bg-red-50:focus{background-color:var(--color-red-50)}.focus\:bg-slate-50:focus{background-color:var(--color-slate-50)}.focus\:bg-white:focus{background-color:var(--color-white)}.focus\:text-accent-foreground:focus{color:var(--accent-foreground)}.focus\:text-primary-foreground:focus{color:var(--primary-foreground)}.focus\:text-slate-900:focus{color:var(--color-slate-900)}.focus\:ring-0:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-blue-500:focus{--tw-ring-color:var(--color-blue-500)}.focus\:ring-re-red:focus{--tw-ring-color:var(--re-red)}.focus\:ring-red-200:focus{--tw-ring-color:var(--color-red-200)}.focus\:ring-red-500:focus{--tw-ring-color:var(--color-red-500)}.focus\:ring-red-500\/30:focus{--tw-ring-color:#fb2c364d}@supports (color:color-mix(in lab,red,red)){.focus\:ring-red-500\/30:focus{--tw-ring-color:color-mix(in oklab, var(--color-red-500) 30%, transparent)}}.focus\:ring-ring:focus{--tw-ring-color:var(--ring)}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus\:outline-hidden:focus{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.focus\:outline-hidden:focus{outline-offset:2px;outline:2px solid #0000}}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\:z-10:focus-visible{z-index:10}.focus-visible\:border-blue-500:focus-visible{border-color:var(--color-blue-500)}.focus-visible\:border-red-500:focus-visible{border-color:var(--color-red-500)}.focus-visible\:border-ring:focus-visible{border-color:var(--ring)}.focus-visible\:bg-white:focus-visible{background-color:var(--color-white)}.focus-visible\:ring-0:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-1:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-4:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-\[3px\]:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-black:focus-visible{--tw-ring-color:var(--color-black)}.focus-visible\:ring-blue-500\/30:focus-visible{--tw-ring-color:#3080ff4d}@supports (color:color-mix(in lab,red,red)){.focus-visible\:ring-blue-500\/30:focus-visible{--tw-ring-color:color-mix(in oklab, var(--color-blue-500) 30%, transparent)}}.focus-visible\:ring-destructive\/20:focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.focus-visible\:ring-destructive\/20:focus-visible{--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.focus-visible\:ring-re-red:focus-visible{--tw-ring-color:var(--re-red)}.focus-visible\:ring-red-500\/30:focus-visible{--tw-ring-color:#fb2c364d}@supports (color:color-mix(in lab,red,red)){.focus-visible\:ring-red-500\/30:focus-visible{--tw-ring-color:color-mix(in oklab, var(--color-red-500) 30%, transparent)}}.focus-visible\:ring-ring:focus-visible,.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){.focus-visible\:ring-ring\/50:focus-visible{--tw-ring-color:color-mix(in oklab, var(--ring) 50%, transparent)}}.focus-visible\:ring-offset-1:focus-visible{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\:outline-hidden:focus-visible{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.focus-visible\:outline-hidden:focus-visible{outline-offset:2px;outline:2px solid #0000}}.focus-visible\:outline-1:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}.focus-visible\:outline-ring:focus-visible{outline-color:var(--ring)}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.active\:scale-90:active{--tw-scale-x:90%;--tw-scale-y:90%;--tw-scale-z:90%;scale:var(--tw-scale-x) var(--tw-scale-y)}.active\:scale-95:active{--tw-scale-x:95%;--tw-scale-y:95%;--tw-scale-z:95%;scale:var(--tw-scale-x) var(--tw-scale-y)}.active\:scale-\[0\.98\]:active{scale:.98}.active\:scale-\[0\.99\]:active{scale:.99}.active\:bg-sidebar-accent:active{background-color:var(--sidebar-accent)}.active\:text-sidebar-accent-foreground:active{color:var(--sidebar-accent-foreground)}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:bg-gray-100:disabled{background-color:var(--color-gray-100)}.disabled\:bg-slate-300:disabled{background-color:var(--color-slate-300)}.disabled\:bg-slate-400:disabled{background-color:var(--color-slate-400)}.disabled\:opacity-30:disabled{opacity:.3}.disabled\:opacity-50:disabled{opacity:.5}:where([data-side=left]) .in-data-\[side\=left\]\:cursor-w-resize{cursor:w-resize}:where([data-side=right]) .in-data-\[side\=right\]\:cursor-e-resize{cursor:e-resize}.has-disabled\:opacity-50:has(:disabled){opacity:.5}.has-data-\[slot\=card-action\]\:grid-cols-\[1fr_auto\]:has([data-slot=card-action]){grid-template-columns:1fr auto}.has-data-\[variant\=inset\]\:bg-sidebar:has([data-variant=inset]){background-color:var(--sidebar)}.has-\[\>svg\]\:grid-cols-\[calc\(var\(--spacing\)\*4\)_1fr\]:has(>svg){grid-template-columns:calc(var(--spacing) * 4) 1fr}.has-\[\>svg\]\:gap-x-3:has(>svg){-moz-column-gap:calc(var(--spacing) * 3);column-gap:calc(var(--spacing) * 3)}.has-\[\>svg\]\:px-2\.5:has(>svg){padding-inline:calc(var(--spacing) * 2.5)}.has-\[\>svg\]\:px-3:has(>svg){padding-inline:calc(var(--spacing) * 3)}.has-\[\>svg\]\:px-4:has(>svg){padding-inline:calc(var(--spacing) * 4)}.aria-disabled\:pointer-events-none[aria-disabled=true]{pointer-events:none}.aria-disabled\:opacity-50[aria-disabled=true]{opacity:.5}.aria-invalid\:border-destructive[aria-invalid=true]{border-color:var(--destructive)}.aria-invalid\:ring-destructive\/20[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.aria-invalid\:ring-destructive\/20[aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.aria-selected\:bg-accent[aria-selected=true]{background-color:var(--accent)}.aria-selected\:bg-primary[aria-selected=true]{background-color:var(--primary)}.aria-selected\:text-accent-foreground[aria-selected=true]{color:var(--accent-foreground)}.aria-selected\:text-muted-foreground[aria-selected=true]{color:var(--muted-foreground)}.aria-selected\:text-primary-foreground[aria-selected=true]{color:var(--primary-foreground)}.aria-selected\:opacity-100[aria-selected=true]{opacity:1}.data-\[active\=true\]\:z-10[data-active=true]{z-index:10}.data-\[active\=true\]\:border-ring[data-active=true]{border-color:var(--ring)}.data-\[active\=true\]\:bg-accent\/50[data-active=true]{background-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.data-\[active\=true\]\:bg-accent\/50[data-active=true]{background-color:color-mix(in oklab,var(--accent) 50%,transparent)}}.data-\[active\=true\]\:bg-sidebar-accent[data-active=true]{background-color:var(--sidebar-accent)}.data-\[active\=true\]\:font-medium[data-active=true]{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.data-\[active\=true\]\:text-accent-foreground[data-active=true]{color:var(--accent-foreground)}.data-\[active\=true\]\:text-sidebar-accent-foreground[data-active=true]{color:var(--sidebar-accent-foreground)}.data-\[active\=true\]\:ring-\[3px\][data-active=true]{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.data-\[active\=true\]\:ring-ring\/50[data-active=true]{--tw-ring-color:var(--ring)}@supports (color:color-mix(in lab,red,red)){.data-\[active\=true\]\:ring-ring\/50[data-active=true]{--tw-ring-color:color-mix(in oklab, var(--ring) 50%, transparent)}}@media(hover:hover){.data-\[active\=true\]\:hover\:bg-accent[data-active=true]:hover{background-color:var(--accent)}}.data-\[active\=true\]\:focus\:bg-accent[data-active=true]:focus{background-color:var(--accent)}.data-\[active\=true\]\:aria-invalid\:border-destructive[data-active=true][aria-invalid=true]{border-color:var(--destructive)}.data-\[active\=true\]\:aria-invalid\:ring-destructive\/20[data-active=true][aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.data-\[active\=true\]\:aria-invalid\:ring-destructive\/20[data-active=true][aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--destructive) 20%, transparent)}}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[disabled\=true\]\:pointer-events-none[data-disabled=true]{pointer-events:none}.data-\[disabled\=true\]\:opacity-50[data-disabled=true]{opacity:.5}.data-\[error\=true\]\:text-destructive[data-error=true]{color:var(--destructive)}.data-\[inset\]\:pl-8[data-inset]{padding-left:calc(var(--spacing) * 8)}.data-\[orientation\=horizontal\]\:h-4[data-orientation=horizontal]{height:calc(var(--spacing) * 4)}.data-\[orientation\=horizontal\]\:h-full[data-orientation=horizontal]{height:100%}.data-\[orientation\=horizontal\]\:h-px[data-orientation=horizontal]{height:1px}.data-\[orientation\=horizontal\]\:w-full[data-orientation=horizontal]{width:100%}.data-\[orientation\=vertical\]\:h-full[data-orientation=vertical]{height:100%}.data-\[orientation\=vertical\]\:min-h-44[data-orientation=vertical]{min-height:calc(var(--spacing) * 44)}.data-\[orientation\=vertical\]\:w-1\.5[data-orientation=vertical]{width:calc(var(--spacing) * 1.5)}.data-\[orientation\=vertical\]\:w-auto[data-orientation=vertical]{width:auto}.data-\[orientation\=vertical\]\:w-full[data-orientation=vertical]{width:100%}.data-\[orientation\=vertical\]\:w-px[data-orientation=vertical]{width:1px}.data-\[orientation\=vertical\]\:flex-col[data-orientation=vertical]{flex-direction:column}.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-\[panel-group-direction\=vertical\]\:flex-col[data-panel-group-direction=vertical]{flex-direction:column}.data-\[panel-group-direction\=vertical\]\:after\:left-0[data-panel-group-direction=vertical]:after{content:var(--tw-content);left:calc(var(--spacing) * 0)}.data-\[panel-group-direction\=vertical\]\:after\:h-1[data-panel-group-direction=vertical]:after{content:var(--tw-content);height:calc(var(--spacing) * 1)}.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-x-0[data-panel-group-direction=vertical]:after{content:var(--tw-content);--tw-translate-x:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[panel-group-direction\=vertical\]\:after\:-translate-y-1\/2[data-panel-group-direction=vertical]:after{content:var(--tw-content);--tw-translate-y: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[placeholder\]\:text-muted-foreground[data-placeholder]{color:var(--muted-foreground)}.data-\[selected\=true\]\:bg-accent[data-selected=true]{background-color:var(--accent)}.data-\[selected\=true\]\:text-accent-foreground[data-selected=true]{color:var(--accent-foreground)}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y:calc(var(--spacing) * 1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x:calc(var(--spacing) * 1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y:calc(var(--spacing) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[size\=default\]\:h-9[data-size=default]{height:calc(var(--spacing) * 9)}.data-\[size\=sm\]\:h-8[data-size=sm]{height:calc(var(--spacing) * 8)}:is(.\*\:data-\[slot\=alert-description\]\:text-destructive\/90>*)[data-slot=alert-description]{color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){:is(.\*\:data-\[slot\=alert-description\]\:text-destructive\/90>*)[data-slot=alert-description]{color:color-mix(in oklab,var(--destructive) 90%,transparent)}}:is(.\*\*\:data-\[slot\=command-input-wrapper\]\:h-12 *)[data-slot=command-input-wrapper]{height:calc(var(--spacing) * 12)}:is(.\*\*\:data-\[slot\=navigation-menu-link\]\:focus\:ring-0 *)[data-slot=navigation-menu-link]:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}:is(.\*\*\:data-\[slot\=navigation-menu-link\]\:focus\:outline-none *)[data-slot=navigation-menu-link]:focus{--tw-outline-style:none;outline-style:none}:is(.\*\:data-\[slot\=select-value\]\:line-clamp-1>*)[data-slot=select-value]{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}:is(.\*\:data-\[slot\=select-value\]\:flex>*)[data-slot=select-value]{display:flex}:is(.\*\:data-\[slot\=select-value\]\:items-center>*)[data-slot=select-value]{align-items:center}:is(.\*\:data-\[slot\=select-value\]\:gap-2>*)[data-slot=select-value]{gap:calc(var(--spacing) * 2)}.data-\[state\=active\]\:bg-card[data-state=active]{background-color:var(--card)}.data-\[state\=active\]\:bg-re-red[data-state=active]{background-color:var(--re-red)}.data-\[state\=active\]\:bg-white[data-state=active]{background-color:var(--color-white)}.data-\[state\=active\]\:text-white[data-state=active]{color:var(--color-white)}.data-\[state\=active\]\:shadow-sm[data-state=active]{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.data-\[state\=checked\]\:translate-x-\[calc\(100\%-2px\)\][data-state=checked]{--tw-translate-x: calc(100% - 2px) ;translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[state\=checked\]\:border-black[data-state=checked]{border-color:var(--color-black)}.data-\[state\=checked\]\:border-emerald-600[data-state=checked]{border-color:var(--color-emerald-600)}.data-\[state\=checked\]\:border-primary[data-state=checked]{border-color:var(--primary)}.data-\[state\=checked\]\:border-purple-600[data-state=checked]{border-color:var(--color-purple-600)}.data-\[state\=checked\]\:border-re-red[data-state=checked]{border-color:var(--re-red)}.data-\[state\=checked\]\:bg-black[data-state=checked]{background-color:var(--color-black)}.data-\[state\=checked\]\:bg-emerald-600[data-state=checked]{background-color:var(--color-emerald-600)}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:var(--primary)}.data-\[state\=checked\]\:bg-purple-600[data-state=checked]{background-color:var(--color-purple-600)}.data-\[state\=checked\]\:bg-re-red[data-state=checked]{background-color:var(--re-red)}.data-\[state\=checked\]\:text-primary-foreground[data-state=checked]{color:var(--primary-foreground)}.data-\[state\=closed\]\:duration-300[data-state=closed]{--tw-duration:.3s;transition-duration:.3s}.data-\[state\=inactive\]\:hidden[data-state=inactive]{display:none}.data-\[state\=on\]\:bg-accent[data-state=on]{background-color:var(--accent)}.data-\[state\=on\]\:text-accent-foreground[data-state=on]{color:var(--accent-foreground)}.data-\[state\=open\]\:bg-accent[data-state=open],.data-\[state\=open\]\:bg-accent\/50[data-state=open]{background-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.data-\[state\=open\]\:bg-accent\/50[data-state=open]{background-color:color-mix(in oklab,var(--accent) 50%,transparent)}}.data-\[state\=open\]\:bg-secondary[data-state=open]{background-color:var(--secondary)}.data-\[state\=open\]\:text-accent-foreground[data-state=open]{color:var(--accent-foreground)}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:var(--muted-foreground)}.data-\[state\=open\]\:opacity-100[data-state=open]{opacity:1}.data-\[state\=open\]\:duration-500[data-state=open]{--tw-duration:.5s;transition-duration:.5s}@media(hover:hover){.data-\[state\=open\]\:hover\:bg-accent[data-state=open]:hover{background-color:var(--accent)}.data-\[state\=open\]\:hover\:bg-sidebar-accent[data-state=open]:hover{background-color:var(--sidebar-accent)}.data-\[state\=open\]\:hover\:text-sidebar-accent-foreground[data-state=open]:hover{color:var(--sidebar-accent-foreground)}}.data-\[state\=open\]\:focus\:bg-accent[data-state=open]:focus{background-color:var(--accent)}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:var(--muted)}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked]{--tw-translate-x:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[state\=unchecked\]\:bg-switch-background[data-state=unchecked]{background-color:var(--switch-background)}.data-\[variant\=destructive\]\:text-destructive[data-variant=destructive]{color:var(--destructive)}.data-\[variant\=destructive\]\:focus\:bg-destructive\/10[data-variant=destructive]:focus{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.data-\[variant\=destructive\]\:focus\:bg-destructive\/10[data-variant=destructive]:focus{background-color:color-mix(in oklab,var(--destructive) 10%,transparent)}}.data-\[variant\=destructive\]\:focus\:text-destructive[data-variant=destructive]:focus{color:var(--destructive)}.data-\[variant\=outline\]\:border-l-0[data-variant=outline]{border-left-style:var(--tw-border-style);border-left-width:0}.data-\[variant\=outline\]\:shadow-xs[data-variant=outline]{--tw-shadow:0 1px 2px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.data-\[variant\=outline\]\:first\:border-l[data-variant=outline]:first-child{border-left-style:var(--tw-border-style);border-left-width:1px}.data-\[vaul-drawer-direction\=bottom\]\:inset-x-0[data-vaul-drawer-direction=bottom]{inset-inline:calc(var(--spacing) * 0)}.data-\[vaul-drawer-direction\=bottom\]\:bottom-0[data-vaul-drawer-direction=bottom]{bottom:calc(var(--spacing) * 0)}.data-\[vaul-drawer-direction\=bottom\]\:mt-24[data-vaul-drawer-direction=bottom]{margin-top:calc(var(--spacing) * 24)}.data-\[vaul-drawer-direction\=bottom\]\:max-h-\[80vh\][data-vaul-drawer-direction=bottom]{max-height:80vh}.data-\[vaul-drawer-direction\=bottom\]\:rounded-t-lg[data-vaul-drawer-direction=bottom]{border-top-left-radius:var(--radius);border-top-right-radius:var(--radius)}.data-\[vaul-drawer-direction\=bottom\]\:border-t[data-vaul-drawer-direction=bottom]{border-top-style:var(--tw-border-style);border-top-width:1px}.data-\[vaul-drawer-direction\=left\]\:inset-y-0[data-vaul-drawer-direction=left]{inset-block:calc(var(--spacing) * 0)}.data-\[vaul-drawer-direction\=left\]\:left-0[data-vaul-drawer-direction=left]{left:calc(var(--spacing) * 0)}.data-\[vaul-drawer-direction\=left\]\:w-3\/4[data-vaul-drawer-direction=left]{width:75%}.data-\[vaul-drawer-direction\=left\]\:border-r[data-vaul-drawer-direction=left]{border-right-style:var(--tw-border-style);border-right-width:1px}.data-\[vaul-drawer-direction\=right\]\:inset-y-0[data-vaul-drawer-direction=right]{inset-block:calc(var(--spacing) * 0)}.data-\[vaul-drawer-direction\=right\]\:right-0[data-vaul-drawer-direction=right]{right:calc(var(--spacing) * 0)}.data-\[vaul-drawer-direction\=right\]\:w-3\/4[data-vaul-drawer-direction=right]{width:75%}.data-\[vaul-drawer-direction\=right\]\:border-l[data-vaul-drawer-direction=right]{border-left-style:var(--tw-border-style);border-left-width:1px}.data-\[vaul-drawer-direction\=top\]\:inset-x-0[data-vaul-drawer-direction=top]{inset-inline:calc(var(--spacing) * 0)}.data-\[vaul-drawer-direction\=top\]\:top-0[data-vaul-drawer-direction=top]{top:calc(var(--spacing) * 0)}.data-\[vaul-drawer-direction\=top\]\:mb-24[data-vaul-drawer-direction=top]{margin-bottom:calc(var(--spacing) * 24)}.data-\[vaul-drawer-direction\=top\]\:max-h-\[80vh\][data-vaul-drawer-direction=top]{max-height:80vh}.data-\[vaul-drawer-direction\=top\]\:rounded-b-lg[data-vaul-drawer-direction=top]{border-bottom-right-radius:var(--radius);border-bottom-left-radius:var(--radius)}.data-\[vaul-drawer-direction\=top\]\:border-b[data-vaul-drawer-direction=top]{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}@media(min-width:40rem){.sm\:order-1{order:1}.sm\:order-2{order:2}.sm\:col-span-1{grid-column:span 1/span 1}.sm\:col-span-2{grid-column:span 2/span 2}.sm\:-mx-6{margin-inline:calc(var(--spacing) * -6)}.sm\:block{display:block}.sm\:flex{display:flex}.sm\:inline{display:inline}.sm\:w-auto{width:auto}.sm\:\!max-w-\[80vw\]{max-width:80vw!important}.sm\:max-w-2xl{max-width:var(--container-2xl)}.sm\:max-w-7xl{max-width:var(--container-7xl)}.sm\:max-w-\[460px\]{max-width:460px}.sm\:max-w-\[480px\]{max-width:480px}.sm\:max-w-\[500px\]{max-width:500px}.sm\:max-w-lg{max-width:var(--container-lg)}.sm\:max-w-md{max-width:var(--container-md)}.sm\:max-w-sm{max-width:var(--container-sm)}.sm\:flex-1{flex:1}.sm\:flex-none{flex:none}.sm\:shrink-0{flex-shrink:0}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:justify-between{justify-content:space-between}.sm\:justify-end{justify-content:flex-end}.sm\:gap-0{gap:calc(var(--spacing) * 0)}.sm\:gap-2\.5{gap:calc(var(--spacing) * 2.5)}.sm\:p-6{padding:calc(var(--spacing) * 6)}.sm\:px-2{padding-inline:calc(var(--spacing) * 2)}.sm\:px-6{padding-inline:calc(var(--spacing) * 6)}.sm\:py-5{padding-block:calc(var(--spacing) * 5)}.sm\:pt-6{padding-top:calc(var(--spacing) * 6)}.sm\:pr-2\.5{padding-right:calc(var(--spacing) * 2.5)}.sm\:pl-2\.5{padding-left:calc(var(--spacing) * 2.5)}.sm\:text-left{text-align:left}.sm\:text-\[11px\]{font-size:11px}.data-\[vaul-drawer-direction\=left\]\:sm\:max-w-sm[data-vaul-drawer-direction=left],.data-\[vaul-drawer-direction\=right\]\:sm\:max-w-sm[data-vaul-drawer-direction=right]{max-width:var(--container-sm)}}@media(min-width:48rem){.md\:absolute{position:absolute}.md\:static{position:static}.md\:col-span-2{grid-column:span 2/span 2}.md\:col-span-4{grid-column:span 4/span 4}.md\:col-span-6{grid-column:span 6/span 6}.md\:mt-8{margin-top:calc(var(--spacing) * 8)}.md\:mr-2{margin-right:calc(var(--spacing) * 2)}.md\:block{display:block}.md\:flex{display:flex}.md\:inline{display:inline}.md\:h-12{height:calc(var(--spacing) * 12)}.md\:w-36{width:calc(var(--spacing) * 36)}.md\:w-40{width:calc(var(--spacing) * 40)}.md\:w-48{width:calc(var(--spacing) * 48)}.md\:w-\[var\(--radix-navigation-menu-viewport-width\)\]{width:var(--radix-navigation-menu-viewport-width)}.md\:w-auto{width:auto}.md\:max-w-3xl{max-width:var(--container-3xl)}.md\:max-w-\[300px\]{max-width:300px}.md\:flex-initial{flex:0 auto}.md\:flex-none{flex:none}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.md\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}.md\:border-transparent{border-color:#0000}.md\:bg-transparent{background-color:#0000}.md\:p-16{padding:calc(var(--spacing) * 16)}.md\:px-12{padding-inline:calc(var(--spacing) * 12)}.md\:pl-16{padding-left:calc(var(--spacing) * 16)}.md\:text-right{text-align:right}.md\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.md\:opacity-0{opacity:0}.md\:shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.md\:peer-data-\[variant\=inset\]\:m-2:is(:where(.peer)[data-variant=inset]~*){margin:calc(var(--spacing) * 2)}.md\:peer-data-\[variant\=inset\]\:ml-0:is(:where(.peer)[data-variant=inset]~*){margin-left:calc(var(--spacing) * 0)}.md\:peer-data-\[variant\=inset\]\:rounded-xl:is(:where(.peer)[data-variant=inset]~*){border-radius:calc(var(--radius) + 4px)}.md\:peer-data-\[variant\=inset\]\:shadow-sm:is(:where(.peer)[data-variant=inset]~*){--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.md\:peer-data-\[variant\=inset\]\:peer-data-\[state\=collapsed\]\:ml-2:is(:where(.peer)[data-variant=inset]~*):is(:where(.peer)[data-state=collapsed]~*){margin-left:calc(var(--spacing) * 2)}.md\:after\:hidden:after{content:var(--tw-content);display:none}}@media(min-width:64rem){.lg\:col-span-2{grid-column:span 2/span 2}.lg\:col-span-3{grid-column:span 3/span 3}.lg\:col-span-4{grid-column:span 4/span 4}.lg\:col-span-5{grid-column:span 5/span 5}.lg\:flex{display:flex}.lg\:w-48{width:calc(var(--spacing) * 48)}.lg\:w-\[320px\]{width:320px}.lg\:max-w-4xl{max-width:var(--container-4xl)}.lg\:max-w-7xl{max-width:var(--container-7xl)}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.lg\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.lg\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.lg\:flex-row{flex-direction:row}.lg\:border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.lg\:pl-8{padding-left:calc(var(--spacing) * 8)}}@media(min-width:80rem){.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}.dark\:border-input:is(.dark *){border-color:var(--input)}.dark\:bg-destructive\/60:is(.dark *){background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\:bg-destructive\/60:is(.dark *){background-color:color-mix(in oklab,var(--destructive) 60%,transparent)}}.dark\:bg-input\/30:is(.dark *){background-color:var(--input)}@supports (color:color-mix(in lab,red,red)){.dark\:bg-input\/30:is(.dark *){background-color:color-mix(in oklab,var(--input) 30%,transparent)}}.dark\:text-muted-foreground:is(.dark *){color:var(--muted-foreground)}@media(hover:hover){.dark\:hover\:bg-accent\/50:is(.dark *):hover{background-color:var(--accent)}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-accent\/50:is(.dark *):hover{background-color:color-mix(in oklab,var(--accent) 50%,transparent)}}.dark\:hover\:bg-input\/50:is(.dark *):hover{background-color:var(--input)}@supports (color:color-mix(in lab,red,red)){.dark\:hover\:bg-input\/50:is(.dark *):hover{background-color:color-mix(in oklab,var(--input) 50%,transparent)}}}.dark\:focus-visible\:ring-destructive\/40:is(.dark *):focus-visible{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\:focus-visible\:ring-destructive\/40:is(.dark *):focus-visible{--tw-ring-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.dark\:aria-invalid\:ring-destructive\/40:is(.dark *)[aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\:aria-invalid\:ring-destructive\/40:is(.dark *)[aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.dark\:data-\[active\=true\]\:aria-invalid\:ring-destructive\/40:is(.dark *)[data-active=true][aria-invalid=true]{--tw-ring-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\:data-\[active\=true\]\:aria-invalid\:ring-destructive\/40:is(.dark *)[data-active=true][aria-invalid=true]{--tw-ring-color:color-mix(in oklab, var(--destructive) 40%, transparent)}}.dark\:data-\[state\=active\]\:border-input:is(.dark *)[data-state=active]{border-color:var(--input)}.dark\:data-\[state\=active\]\:bg-input\/30:is(.dark *)[data-state=active]{background-color:var(--input)}@supports (color:color-mix(in lab,red,red)){.dark\:data-\[state\=active\]\:bg-input\/30:is(.dark *)[data-state=active]{background-color:color-mix(in oklab,var(--input) 30%,transparent)}}.dark\:data-\[state\=active\]\:text-foreground:is(.dark *)[data-state=active]{color:var(--foreground)}.dark\:data-\[state\=checked\]\:bg-primary:is(.dark *)[data-state=checked]{background-color:var(--primary)}.dark\:data-\[state\=checked\]\:bg-primary-foreground:is(.dark *)[data-state=checked]{background-color:var(--primary-foreground)}.dark\:data-\[state\=unchecked\]\:bg-card-foreground:is(.dark *)[data-state=unchecked]{background-color:var(--card-foreground)}.dark\:data-\[state\=unchecked\]\:bg-input\/80:is(.dark *)[data-state=unchecked]{background-color:var(--input)}@supports (color:color-mix(in lab,red,red)){.dark\:data-\[state\=unchecked\]\:bg-input\/80:is(.dark *)[data-state=unchecked]{background-color:color-mix(in oklab,var(--input) 80%,transparent)}}.dark\:data-\[variant\=destructive\]\:focus\:bg-destructive\/20:is(.dark *)[data-variant=destructive]:focus{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){.dark\:data-\[variant\=destructive\]\:focus\:bg-destructive\/20:is(.dark *)[data-variant=destructive]:focus{background-color:color-mix(in oklab,var(--destructive) 20%,transparent)}}.\[\&_\.ql-container\]\:border-0 .ql-container{border-style:var(--tw-border-style);border-width:0}.\[\&_\.ql-editor\]\:min-h-\[380px\] .ql-editor{min-height:380px}.\[\&_\.ql-editor\]\:text-sm .ql-editor{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.ql-editor\]\:text-slate-900 .ql-editor{color:var(--color-slate-900)}.\[\&_\.ql-toolbar\]\:border-slate-200 .ql-toolbar{border-color:var(--color-slate-200)}.\[\&_\.ql-toolbar\]\:bg-slate-50 .ql-toolbar{background-color:var(--color-slate-50)}.\[\&_\.recharts-cartesian-axis-tick_text\]\:fill-muted-foreground .recharts-cartesian-axis-tick text{fill:var(--muted-foreground)}.\[\&_\.recharts-cartesian-grid_line\[stroke\=\'\#ccc\'\]\]\:stroke-border\/50 .recharts-cartesian-grid line[stroke="#ccc"]{stroke:var(--border)}@supports (color:color-mix(in lab,red,red)){.\[\&_\.recharts-cartesian-grid_line\[stroke\=\'\#ccc\'\]\]\:stroke-border\/50 .recharts-cartesian-grid line[stroke="#ccc"]{stroke:color-mix(in oklab,var(--border) 50%,transparent)}}.\[\&_\.recharts-curve\.recharts-tooltip-cursor\]\:stroke-border .recharts-curve.recharts-tooltip-cursor{stroke:var(--border)}.\[\&_\.recharts-dot\[stroke\=\'\#fff\'\]\]\:stroke-transparent .recharts-dot[stroke="#fff"]{stroke:#0000}.\[\&_\.recharts-layer\]\:outline-hidden .recharts-layer{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.\[\&_\.recharts-layer\]\:outline-hidden .recharts-layer{outline-offset:2px;outline:2px solid #0000}}.\[\&_\.recharts-polar-grid_\[stroke\=\'\#ccc\'\]\]\:stroke-border .recharts-polar-grid [stroke="#ccc"]{stroke:var(--border)}.\[\&_\.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:var(--muted)}.\[\&_\.recharts-reference-line_\[stroke\=\'\#ccc\'\]\]\:stroke-border .recharts-reference-line [stroke="#ccc"]{stroke:var(--border)}.\[\&_\.recharts-sector\]\:outline-hidden .recharts-sector{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.\[\&_\.recharts-sector\]\:outline-hidden .recharts-sector{outline-offset:2px;outline:2px solid #0000}}.\[\&_\.recharts-sector\[stroke\=\'\#fff\'\]\]\:stroke-transparent .recharts-sector[stroke="#fff"]{stroke:#0000}.\[\&_\.recharts-surface\]\:outline-hidden .recharts-surface{--tw-outline-style:none;outline-style:none}@media(forced-colors:active){.\[\&_\.recharts-surface\]\:outline-hidden .recharts-surface{outline-offset:2px;outline:2px solid #0000}}.\[\&_\[cmdk-group-heading\]\]\:px-2 [cmdk-group-heading]{padding-inline:calc(var(--spacing) * 2)}.\[\&_\[cmdk-group-heading\]\]\:py-1\.5 [cmdk-group-heading]{padding-block:calc(var(--spacing) * 1.5)}.\[\&_\[cmdk-group-heading\]\]\:text-xs [cmdk-group-heading]{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\[cmdk-group-heading\]\]\:font-medium [cmdk-group-heading]{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\[cmdk-group-heading\]\]\:text-muted-foreground [cmdk-group-heading]{color:var(--muted-foreground)}.\[\&_\[cmdk-group\]\]\:px-2 [cmdk-group]{padding-inline:calc(var(--spacing) * 2)}.\[\&_\[cmdk-group\]\:not\(\[hidden\]\)_\~\[cmdk-group\]\]\:pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:calc(var(--spacing) * 0)}.\[\&_\[cmdk-input-wrapper\]_svg\]\:h-5 [cmdk-input-wrapper] svg{height:calc(var(--spacing) * 5)}.\[\&_\[cmdk-input-wrapper\]_svg\]\:w-5 [cmdk-input-wrapper] svg{width:calc(var(--spacing) * 5)}.\[\&_\[cmdk-input\]\]\:h-12 [cmdk-input]{height:calc(var(--spacing) * 12)}.\[\&_\[cmdk-item\]\]\:px-2 [cmdk-item]{padding-inline:calc(var(--spacing) * 2)}.\[\&_\[cmdk-item\]\]\:py-3 [cmdk-item]{padding-block:calc(var(--spacing) * 3)}.\[\&_\[cmdk-item\]_svg\]\:h-5 [cmdk-item] svg{height:calc(var(--spacing) * 5)}.\[\&_\[cmdk-item\]_svg\]\:w-5 [cmdk-item] svg{width:calc(var(--spacing) * 5)}.\[\&_p\]\:leading-relaxed p{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_svg\:not\(\[class\*\=\'size-\'\]\)\]\:size-4 svg:not([class*=size-]){width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&_svg\:not\(\[class\*\=\'text-\'\]\)\]\:text-muted-foreground svg:not([class*=text-]){color:var(--muted-foreground)}.\[\&_tr\]\:border-b tr{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-style:var(--tw-border-style);border-width:0}.\[\&\:\:-webkit-inner-spin-button\]\:appearance-none::-webkit-inner-spin-button{-webkit-appearance:none;-moz-appearance:none;appearance:none}.\[\&\:\:-webkit-outer-spin-button\]\:appearance-none::-webkit-outer-spin-button{-webkit-appearance:none;-moz-appearance:none;appearance:none}.\[\&\:has\(\>\.day-range-end\)\]\:rounded-r-md:has(>.day-range-end){border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\>\.day-range-start\)\]\:rounded-l-md:has(>.day-range-start){border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[aria-selected\]\)\]\:rounded-md:has([aria-selected]){border-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[aria-selected\]\)\]\:bg-accent:has([aria-selected]){background-color:var(--accent)}.first\:\[\&\:has\(\[aria-selected\]\)\]\:rounded-l-md:first-child:has([aria-selected]){border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.last\:\[\&\:has\(\[aria-selected\]\)\]\:rounded-r-md:last-child:has([aria-selected]),.\[\&\:has\(\[aria-selected\]\.day-range-end\)\]\:rounded-r-md:has([aria-selected].day-range-end){border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:calc(var(--spacing) * 0)}.\[\.border-b\]\:pb-6.border-b{padding-bottom:calc(var(--spacing) * 6)}.\[\.border-t\]\:pt-6.border-t{padding-top:calc(var(--spacing) * 6)}:is(.\*\:\[span\]\:last\:flex>*):is(span):last-child{display:flex}:is(.\*\:\[span\]\:last\:items-center>*):is(span):last-child{align-items:center}:is(.\*\:\[span\]\:last\:gap-2>*):is(span):last-child{gap:calc(var(--spacing) * 2)}:is(.data-\[variant\=destructive\]\:\*\:\[svg\]\:\!text-destructive[data-variant=destructive]>*):is(svg){color:var(--destructive)!important}.\[\&\:last-child\]\:pb-6:last-child{padding-bottom:calc(var(--spacing) * 6)}.\[\&\>\[role\=checkbox\]\]\:translate-y-\[2px\]>[role=checkbox]{--tw-translate-y:2px;translate:var(--tw-translate-x) var(--tw-translate-y)}.\[\&\>button\]\:hidden>button{display:none}.\[\&\>button\]\:text-white>button{color:var(--color-white)}.\[\&\>button\]\:opacity-100>button{opacity:1}.\[\&\>span\:last-child\]\:truncate>span:last-child{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.\[\&\>svg\]\:pointer-events-none>svg{pointer-events:none}.\[\&\>svg\]\:size-3>svg{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.\[\&\>svg\]\:size-3\.5>svg{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.\[\&\>svg\]\:size-4>svg{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&\>svg\]\:h-2\.5>svg{height:calc(var(--spacing) * 2.5)}.\[\&\>svg\]\:h-3>svg{height:calc(var(--spacing) * 3)}.\[\&\>svg\]\:w-2\.5>svg{width:calc(var(--spacing) * 2.5)}.\[\&\>svg\]\:w-3>svg{width:calc(var(--spacing) * 3)}.\[\&\>svg\]\:shrink-0>svg{flex-shrink:0}.\[\&\>svg\]\:translate-y-0\.5>svg{--tw-translate-y:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.\[\&\>svg\]\:text-current>svg{color:currentColor}.\[\&\>svg\]\:text-muted-foreground>svg{color:var(--muted-foreground)}.\[\&\>svg\]\:text-sidebar-accent-foreground>svg{color:var(--sidebar-accent-foreground)}.\[\&\>tr\]\:last\:border-b-0>tr:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.\[\&\[data-panel-group-direction\=vertical\]\>div\]\:rotate-90[data-panel-group-direction=vertical]>div{rotate:90deg}.\[\&\[data-state\=open\]\>svg\]\:rotate-180[data-state=open]>svg{rotate:180deg}[data-side=left][data-collapsible=offcanvas] .\[\[data-side\=left\]\[data-collapsible\=offcanvas\]_\&\]\:-right-2{right:calc(var(--spacing) * -2)}[data-side=left][data-state=collapsed] .\[\[data-side\=left\]\[data-state\=collapsed\]_\&\]\:cursor-e-resize{cursor:e-resize}[data-side=right][data-collapsible=offcanvas] .\[\[data-side\=right\]\[data-collapsible\=offcanvas\]_\&\]\:-left-2{left:calc(var(--spacing) * -2)}[data-side=right][data-state=collapsed] .\[\[data-side\=right\]\[data-state\=collapsed\]_\&\]\:cursor-w-resize{cursor:w-resize}@media(hover:hover){a.\[a\&\]\:hover\:bg-accent:hover{background-color:var(--accent)}a.\[a\&\]\:hover\:bg-destructive\/90:hover{background-color:var(--destructive)}@supports (color:color-mix(in lab,red,red)){a.\[a\&\]\:hover\:bg-destructive\/90:hover{background-color:color-mix(in oklab,var(--destructive) 90%,transparent)}}a.\[a\&\]\:hover\:bg-primary\/90:hover{background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){a.\[a\&\]\:hover\:bg-primary\/90:hover{background-color:color-mix(in oklab,var(--primary) 90%,transparent)}}a.\[a\&\]\:hover\:bg-secondary\/90:hover{background-color:var(--secondary)}@supports (color:color-mix(in lab,red,red)){a.\[a\&\]\:hover\:bg-secondary\/90:hover{background-color:color-mix(in oklab,var(--secondary) 90%,transparent)}}a.\[a\&\]\:hover\:text-accent-foreground:hover{color:var(--accent-foreground)}}.bg-status-progress{background-color:var(--status-in-progress)}.hover\:bg-status-progress-hover:hover{background-color:var(--status-in-progress-hover)}.text-status-progress{color:var(--status-in-progress)}.text-status-progress-muted{color:var(--status-in-progress-hover)}.text-status-progress-strong{color:#92400e}.bg-status-progress-soft{background-color:#fffbeb}.border-status-progress{border-color:#fde68a}.bg-status-workflow-icon{color:var(--status-in-progress);background-color:#fef3c7}.bg-status-workflow-panel{background-color:#fffbeb;border-color:#fde68a}.border-status-workflow-panel{border-color:#fde68a}.bg-status-workflow-badge{color:#b45309;background-color:#fef3c7;border-color:#fcd34d}.bg-status-workflow-active{background-color:var(--status-in-progress);border-color:var(--status-in-progress)}.ring-status-workflow-active{--tw-ring-color:var(--status-in-progress)}.btn-re-primary,button.bg-amber-600,a.bg-amber-600,[data-slot=button].bg-amber-600{color:#fff;background-color:var(--color-re-red)!important}.btn-re-primary:hover,button.bg-amber-600:hover,button.hover\:bg-amber-700:hover,a.bg-amber-600:hover,a.hover\:bg-amber-700:hover{background-color:var(--color-re-red-hover)!important}.bg-amber-600:not(.bg-status-progress):not(.bg-status-workflow-active):not(.bg-status-workflow-badge):not(.bg-status-workflow-icon){background-color:var(--color-re-red)!important}.hover\:bg-amber-700:hover:not(.hover\:bg-status-progress-hover){background-color:var(--color-re-red-hover)!important}}:root{--font-size:16px;--background:#fff;--foreground:oklch(14.5% 0 0);--card:#fff;--card-foreground:oklch(14.5% 0 0);--popover:oklch(100% 0 0);--popover-foreground:oklch(14.5% 0 0);--primary:#da291c;--primary-600:#da291c;--primary-700:#b82216;--primary-50:#fef2f2;--primary-foreground:oklch(100% 0 0);--secondary:oklch(95% .0058 264.53);--secondary-foreground:#030213;--muted:#ececf0;--muted-foreground:#717182;--accent:#e9ebef;--accent-foreground:#030213;--destructive:#d4183d;--destructive-foreground:#fff;--border:#0000001a;--input:transparent;--input-background:#f3f3f5;--switch-background:#cbced4;--font-weight-medium:500;--font-weight-normal:400;--ring:oklch(70.8% 0 0);--chart-1:oklch(64.6% .222 41.116);--chart-2:oklch(60% .118 184.704);--chart-3:oklch(39.8% .07 227.392);--chart-4:oklch(82.8% .189 84.429);--chart-5:oklch(76.9% .188 70.08);--radius:.625rem;--sidebar:oklch(98.5% 0 0);--sidebar-foreground:oklch(14.5% 0 0);--sidebar-primary:#030213;--sidebar-primary-foreground:oklch(98.5% 0 0);--sidebar-accent:oklch(97% 0 0);--sidebar-accent-foreground:oklch(20.5% 0 0);--sidebar-border:oklch(92.2% 0 0);--sidebar-ring:oklch(70.8% 0 0);--re-red:#da291c;--re-red-hover:#b82216;--re-black:#000;--re-white:#fff;--re-gray:#717171;--status-in-progress:#d97706;--status-in-progress-hover:#b45309;--status-success:#16a34a;--status-success-hover:#15803d;--status-negative:var(--re-red);--status-negative-hover:var(--re-red-hover)}.dark{--background:oklch(14.5% 0 0);--foreground:oklch(98.5% 0 0);--card:oklch(14.5% 0 0);--card-foreground:oklch(98.5% 0 0);--popover:oklch(14.5% 0 0);--popover-foreground:oklch(98.5% 0 0);--primary:oklch(98.5% 0 0);--primary-foreground:oklch(20.5% 0 0);--secondary:oklch(26.9% 0 0);--secondary-foreground:oklch(98.5% 0 0);--muted:oklch(26.9% 0 0);--muted-foreground:oklch(70.8% 0 0);--accent:oklch(26.9% 0 0);--accent-foreground:oklch(98.5% 0 0);--destructive:oklch(39.6% .141 25.723);--destructive-foreground:oklch(63.7% .237 25.331);--border:oklch(26.9% 0 0);--input:oklch(26.9% 0 0);--ring:oklch(43.9% 0 0);--font-weight-medium:500;--font-weight-normal:400;--chart-1:oklch(48.8% .243 264.376);--chart-2:oklch(69.6% .17 162.48);--chart-3:oklch(76.9% .188 70.08);--chart-4:oklch(62.7% .265 303.9);--chart-5:oklch(64.5% .246 16.439);--sidebar:oklch(20.5% 0 0);--sidebar-foreground:oklch(98.5% 0 0);--sidebar-primary:oklch(48.8% .243 264.376);--sidebar-primary-foreground:oklch(98.5% 0 0);--sidebar-accent:oklch(26.9% 0 0);--sidebar-accent-foreground:oklch(98.5% 0 0);--sidebar-border:oklch(26.9% 0 0);--sidebar-ring:oklch(43.9% 0 0)}.re-heading{text-transform:uppercase;letter-spacing:.1em;font-family:Montserrat,sans-serif;font-weight:700}.re-card{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-slate-200);background-color:var(--color-white);--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-radius:0}.re-input{border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-slate-300);width:100%;padding-inline:calc(var(--spacing) * 4);padding-block:calc(var(--spacing) * 3);font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration));--tw-duration:.2s;--tw-outline-style:none;border-radius:0;outline-style:none;transition-duration:.2s}.re-input:focus{border-color:var(--color-red-600);--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-ring-color:#e4001433}@supports (color:color-mix(in lab,red,red)){.re-input:focus{--tw-ring-color:color-mix(in oklab, var(--color-red-600) 20%, transparent)}}.re-label{margin-bottom:calc(var(--spacing) * 1.5);font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold);--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide);color:var(--color-slate-800);text-transform:uppercase;display:block}.re-btn-primary{background-color:var(--color-black);padding-inline:calc(var(--spacing) * 8);padding-block:calc(var(--spacing) * 3);--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold);--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest);color:var(--color-white);text-transform:uppercase;transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}@media(hover:hover){.re-btn-primary:hover{background-color:var(--color-slate-900)}}.re-btn-primary:active{scale:.98}.re-btn-outline{border-style:var(--tw-border-style);border-width:2px;border-color:var(--color-black);padding-inline:calc(var(--spacing) * 8);padding-block:calc(var(--spacing) * 3);--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold);--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest);color:var(--color-black);text-transform:uppercase;transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}@media(hover:hover){.re-btn-outline:hover{background-color:var(--color-black);color:var(--color-white)}}.re-btn-outline:active{scale:.98}.re-intro-text{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed);color:var(--color-slate-700)}.re-disclaimer{border-left-style:var(--tw-border-style);border-left-width:4px;border-color:var(--color-red-600);background-color:var(--color-slate-50);padding:calc(var(--spacing) * 4);font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height));color:var(--color-slate-600);font-style:italic}html{font-size:var(--font-size)}.custom-scrollbar::-webkit-scrollbar{width:3px}.custom-scrollbar::-webkit-scrollbar-track{background:0 0}.custom-scrollbar::-webkit-scrollbar-thumb{background:#e2e8f0;border-radius:10px}.custom-scrollbar::-webkit-scrollbar-thumb:hover{background:#cbd5e1}.custom-scrollbar{scrollbar-width:thin;scrollbar-color:#e2e8f0 transparent}.custom-scrollbar-x::-webkit-scrollbar{height:2px}.custom-scrollbar-x::-webkit-scrollbar-track{background:0 0}.custom-scrollbar-x::-webkit-scrollbar-thumb{background:#f1f5f9;border-radius:9999px}.custom-scrollbar-x::-webkit-scrollbar-thumb:hover{background:#e2e8f0}.custom-scrollbar-x{scrollbar-width:thin;scrollbar-color:#f1f5f9 transparent}.custom-scrollbar-x-slim::-webkit-scrollbar{height:2px}.custom-scrollbar-x-slim::-webkit-scrollbar-track{background:0 0}.custom-scrollbar-x-slim::-webkit-scrollbar-thumb{background:#f8fafc;border-radius:9999px}.custom-scrollbar-x-slim::-webkit-scrollbar-thumb:hover{background:#f1f5f9}.custom-scrollbar-x-slim{scrollbar-width:thin;scrollbar-color:#f8fafc transparent}.custom-scrollbar-slim::-webkit-scrollbar{width:2px}.custom-scrollbar-slim::-webkit-scrollbar-track{background:0 0}.custom-scrollbar-slim::-webkit-scrollbar-thumb{background:#f1f5f9;border-radius:9999px}.custom-scrollbar-slim::-webkit-scrollbar-thumb:hover{background:#e2e8f0}.custom-scrollbar-slim{scrollbar-width:thin;scrollbar-color:#f1f5f9 transparent}.no-native-password-reveal::-ms-reveal{display:none}.no-native-password-reveal::-ms-clear{display:none}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}@keyframes bounce{0%,to{animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}} diff --git a/build/assets/index-KxZzWQFD.js b/build/assets/index-KxZzWQFD.js deleted file mode 100644 index 364575b..0000000 --- a/build/assets/index-KxZzWQFD.js +++ /dev/null @@ -1,788 +0,0 @@ -var m4=Object.defineProperty;var f4=(t,s,n)=>s in t?m4(t,s,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[s]=n;var Yx=(t,s,n)=>f4(t,typeof s!="symbol"?s+"":s,n);function p4(t,s){for(var n=0;nr[a]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(a){if(a.ep)return;a.ep=!0;const i=n(a);fetch(a.href,i)}})();var Wo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function wf(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Zx={exports:{}},Xd={},Qx={exports:{}},tn={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var pw;function x4(){if(pw)return tn;pw=1;var t=Symbol.for("react.element"),s=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),o=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.iterator;function x(T){return T===null||typeof T!="object"?null:(T=h&&T[h]||T["@@iterator"],typeof T=="function"?T:null)}var u={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,v={};function w(T,I,B){this.props=T,this.context=I,this.refs=v,this.updater=B||u}w.prototype.isReactComponent={},w.prototype.setState=function(T,I){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,I,"setState")},w.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function j(){}j.prototype=w.prototype;function b(T,I,B){this.props=T,this.context=I,this.refs=v,this.updater=B||u}var C=b.prototype=new j;C.constructor=b,N(C,w.prototype),C.isPureReactComponent=!0;var S=Array.isArray,R=Object.prototype.hasOwnProperty,_={current:null},A={key:!0,ref:!0,__self:!0,__source:!0};function E(T,I,B){var G,K={},H=null,X=null;if(I!=null)for(G in I.ref!==void 0&&(X=I.ref),I.key!==void 0&&(H=""+I.key),I)R.call(I,G)&&!A.hasOwnProperty(G)&&(K[G]=I[G]);var J=arguments.length-2;if(J===1)K.children=B;else if(1>>1,I=U[T];if(0>>1;Ta(K,z))Ha(X,K)?(U[T]=X,U[H]=z,T=H):(U[T]=K,U[G]=z,T=G);else if(Ha(X,z))U[T]=X,U[H]=z,T=H;else break e}}return M}function a(U,M){var z=U.sortIndex-M.sortIndex;return z!==0?z:U.id-M.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;t.unstable_now=function(){return i.now()}}else{var o=Date,d=o.now();t.unstable_now=function(){return o.now()-d}}var m=[],f=[],p=1,h=null,x=3,u=!1,N=!1,v=!1,w=typeof setTimeout=="function"?setTimeout:null,j=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function C(U){for(var M=n(f);M!==null;){if(M.callback===null)r(f);else if(M.startTime<=U)r(f),M.sortIndex=M.expirationTime,s(m,M);else break;M=n(f)}}function S(U){if(v=!1,C(U),!N)if(n(m)!==null)N=!0,Z(R);else{var M=n(f);M!==null&&W(S,M.startTime-U)}}function R(U,M){N=!1,v&&(v=!1,j(E),E=-1),u=!0;var z=x;try{for(C(M),h=n(m);h!==null&&(!(h.expirationTime>M)||U&&!D());){var T=h.callback;if(typeof T=="function"){h.callback=null,x=h.priorityLevel;var I=T(h.expirationTime<=M);M=t.unstable_now(),typeof I=="function"?h.callback=I:h===n(m)&&r(m),C(M)}else r(m);h=n(m)}if(h!==null)var B=!0;else{var G=n(f);G!==null&&W(S,G.startTime-M),B=!1}return B}finally{h=null,x=z,u=!1}}var _=!1,A=null,E=-1,q=5,O=-1;function D(){return!(t.unstable_now()-OU||125T?(U.sortIndex=z,s(f,U),n(m)===null&&U===n(f)&&(v?(j(E),E=-1):v=!0,W(S,z-T))):(U.sortIndex=I,s(m,U),N||u||(N=!0,Z(R))),U},t.unstable_shouldYield=D,t.unstable_wrapCallback=function(U){var M=x;return function(){var z=x;x=M;try{return U.apply(this,arguments)}finally{x=z}}}})(eg)),eg}var bw;function b4(){return bw||(bw=1,Jx.exports=y4()),Jx.exports}/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var jw;function j4(){if(jw)return ca;jw=1;var t=pd(),s=b4();function n(l){for(var c="https://reactjs.org/docs/error-decoder.html?invariant="+l,y=1;y"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),m=Object.prototype.hasOwnProperty,f=/^[: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]*$/,p={},h={};function x(l){return m.call(h,l)?!0:m.call(p,l)?!1:f.test(l)?h[l]=!0:(p[l]=!0,!1)}function u(l,c,y,k){if(y!==null&&y.type===0)return!1;switch(typeof c){case"function":case"symbol":return!0;case"boolean":return k?!1:y!==null?!y.acceptsBooleans:(l=l.toLowerCase().slice(0,5),l!=="data-"&&l!=="aria-");default:return!1}}function N(l,c,y,k){if(c===null||typeof c>"u"||u(l,c,y,k))return!0;if(k)return!1;if(y!==null)switch(y.type){case 3:return!c;case 4:return c===!1;case 5:return isNaN(c);case 6:return isNaN(c)||1>c}return!1}function v(l,c,y,k,F,V,ie){this.acceptsBooleans=c===2||c===3||c===4,this.attributeName=k,this.attributeNamespace=F,this.mustUseProperty=y,this.propertyName=l,this.type=c,this.sanitizeURL=V,this.removeEmptyString=ie}var w={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(l){w[l]=new v(l,0,!1,l,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(l){var c=l[0];w[c]=new v(c,1,!1,l[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(l){w[l]=new v(l,2,!1,l.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(l){w[l]=new v(l,2,!1,l,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(l){w[l]=new v(l,3,!1,l.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(l){w[l]=new v(l,3,!0,l,null,!1,!1)}),["capture","download"].forEach(function(l){w[l]=new v(l,4,!1,l,null,!1,!1)}),["cols","rows","size","span"].forEach(function(l){w[l]=new v(l,6,!1,l,null,!1,!1)}),["rowSpan","start"].forEach(function(l){w[l]=new v(l,5,!1,l.toLowerCase(),null,!1,!1)});var j=/[\-:]([a-z])/g;function b(l){return l[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(l){var c=l.replace(j,b);w[c]=new v(c,1,!1,l,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(l){var c=l.replace(j,b);w[c]=new v(c,1,!1,l,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(l){var c=l.replace(j,b);w[c]=new v(c,1,!1,l,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(l){w[l]=new v(l,1,!1,l.toLowerCase(),null,!1,!1)}),w.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(l){w[l]=new v(l,1,!1,l.toLowerCase(),null,!0,!0)});function C(l,c,y,k){var F=w.hasOwnProperty(c)?w[c]:null;(F!==null?F.type!==0:k||!(2Ne||F[ie]!==V[Ne]){var Re=` -`+F[ie].replace(" at new "," at ");return l.displayName&&Re.includes("")&&(Re=Re.replace("",l.displayName)),Re}while(1<=ie&&0<=Ne);break}}}finally{B=!1,Error.prepareStackTrace=y}return(l=l?l.displayName||l.name:"")?I(l):""}function K(l){switch(l.tag){case 5:return I(l.type);case 16:return I("Lazy");case 13:return I("Suspense");case 19:return I("SuspenseList");case 0:case 2:case 15:return l=G(l.type,!1),l;case 11:return l=G(l.type.render,!1),l;case 1:return l=G(l.type,!0),l;default:return""}}function H(l){if(l==null)return null;if(typeof l=="function")return l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case A:return"Fragment";case _:return"Portal";case q:return"Profiler";case E:return"StrictMode";case L:return"Suspense";case $:return"SuspenseList"}if(typeof l=="object")switch(l.$$typeof){case D:return(l.displayName||"Context")+".Consumer";case O:return(l._context.displayName||"Context")+".Provider";case P:var c=l.render;return l=l.displayName,l||(l=c.displayName||c.name||"",l=l!==""?"ForwardRef("+l+")":"ForwardRef"),l;case Y:return c=l.displayName||null,c!==null?c:H(l.type)||"Memo";case Z:c=l._payload,l=l._init;try{return H(l(c))}catch{}}return null}function X(l){var c=l.type;switch(l.tag){case 24:return"Cache";case 9:return(c.displayName||"Context")+".Consumer";case 10:return(c._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return l=c.render,l=l.displayName||l.name||"",c.displayName||(l!==""?"ForwardRef("+l+")":"ForwardRef");case 7:return"Fragment";case 5:return c;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return H(c);case 8:return c===E?"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 c=="function")return c.displayName||c.name||null;if(typeof c=="string")return c}return null}function J(l){switch(typeof l){case"boolean":case"number":case"string":case"undefined":return l;case"object":return l;default:return""}}function ae(l){var c=l.type;return(l=l.nodeName)&&l.toLowerCase()==="input"&&(c==="checkbox"||c==="radio")}function le(l){var c=ae(l)?"checked":"value",y=Object.getOwnPropertyDescriptor(l.constructor.prototype,c),k=""+l[c];if(!l.hasOwnProperty(c)&&typeof y<"u"&&typeof y.get=="function"&&typeof y.set=="function"){var F=y.get,V=y.set;return Object.defineProperty(l,c,{configurable:!0,get:function(){return F.call(this)},set:function(ie){k=""+ie,V.call(this,ie)}}),Object.defineProperty(l,c,{enumerable:y.enumerable}),{getValue:function(){return k},setValue:function(ie){k=""+ie},stopTracking:function(){l._valueTracker=null,delete l[c]}}}}function xe(l){l._valueTracker||(l._valueTracker=le(l))}function ce(l){if(!l)return!1;var c=l._valueTracker;if(!c)return!0;var y=c.getValue(),k="";return l&&(k=ae(l)?l.checked?"true":"false":l.value),l=k,l!==y?(c.setValue(l),!0):!1}function ve(l){if(l=l||(typeof document<"u"?document:void 0),typeof l>"u")return null;try{return l.activeElement||l.body}catch{return l.body}}function Pe(l,c){var y=c.checked;return z({},c,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:y??l._wrapperState.initialChecked})}function et(l,c){var y=c.defaultValue==null?"":c.defaultValue,k=c.checked!=null?c.checked:c.defaultChecked;y=J(c.value!=null?c.value:y),l._wrapperState={initialChecked:k,initialValue:y,controlled:c.type==="checkbox"||c.type==="radio"?c.checked!=null:c.value!=null}}function kt(l,c){c=c.checked,c!=null&&C(l,"checked",c,!1)}function vt(l,c){kt(l,c);var y=J(c.value),k=c.type;if(y!=null)k==="number"?(y===0&&l.value===""||l.value!=y)&&(l.value=""+y):l.value!==""+y&&(l.value=""+y);else if(k==="submit"||k==="reset"){l.removeAttribute("value");return}c.hasOwnProperty("value")?ge(l,c.type,y):c.hasOwnProperty("defaultValue")&&ge(l,c.type,J(c.defaultValue)),c.checked==null&&c.defaultChecked!=null&&(l.defaultChecked=!!c.defaultChecked)}function ee(l,c,y){if(c.hasOwnProperty("value")||c.hasOwnProperty("defaultValue")){var k=c.type;if(!(k!=="submit"&&k!=="reset"||c.value!==void 0&&c.value!==null))return;c=""+l._wrapperState.initialValue,y||c===l.value||(l.value=c),l.defaultValue=c}y=l.name,y!==""&&(l.name=""),l.defaultChecked=!!l._wrapperState.initialChecked,y!==""&&(l.name=y)}function ge(l,c,y){(c!=="number"||ve(l.ownerDocument)!==l)&&(y==null?l.defaultValue=""+l._wrapperState.initialValue:l.defaultValue!==""+y&&(l.defaultValue=""+y))}var ye=Array.isArray;function Be(l,c,y,k){if(l=l.options,c){c={};for(var F=0;F"+c.valueOf().toString()+"",c=he.firstChild;l.firstChild;)l.removeChild(l.firstChild);for(;c.firstChild;)l.appendChild(c.firstChild)}});function ht(l,c){if(c){var y=l.firstChild;if(y&&y===l.lastChild&&y.nodeType===3){y.nodeValue=c;return}}l.textContent=c}var _e={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},Vt=["Webkit","ms","Moz","O"];Object.keys(_e).forEach(function(l){Vt.forEach(function(c){c=c+l.charAt(0).toUpperCase()+l.substring(1),_e[c]=_e[l]})});function Pt(l,c,y){return c==null||typeof c=="boolean"||c===""?"":y||typeof c!="number"||c===0||_e.hasOwnProperty(l)&&_e[l]?(""+c).trim():c+"px"}function _s(l,c){l=l.style;for(var y in c)if(c.hasOwnProperty(y)){var k=y.indexOf("--")===0,F=Pt(y,c[y],k);y==="float"&&(y="cssFloat"),k?l.setProperty(y,F):l[y]=F}}var Ys=z({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 Bs(l,c){if(c){if(Ys[l]&&(c.children!=null||c.dangerouslySetInnerHTML!=null))throw Error(n(137,l));if(c.dangerouslySetInnerHTML!=null){if(c.children!=null)throw Error(n(60));if(typeof c.dangerouslySetInnerHTML!="object"||!("__html"in c.dangerouslySetInnerHTML))throw Error(n(61))}if(c.style!=null&&typeof c.style!="object")throw Error(n(62))}}function Ks(l,c){if(l.indexOf("-")===-1)return typeof c.is=="string";switch(l){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 Qs=null;function Xs(l){return l=l.target||l.srcElement||window,l.correspondingUseElement&&(l=l.correspondingUseElement),l.nodeType===3?l.parentNode:l}var $s=null,Q=null,oe=null;function we(l){if(l=Md(l)){if(typeof $s!="function")throw Error(n(280));var c=l.stateNode;c&&(c=yh(c),$s(l.stateNode,l.type,c))}}function Oe(l){Q?oe?oe.push(l):oe=[l]:Q=l}function ke(){if(Q){var l=Q,c=oe;if(oe=Q=null,we(l),c)for(l=0;l>>=0,l===0?32:31-(cs(l)/mn|0)|0}var ln=64,fn=4194304;function on(l){switch(l&-l){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 l&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return l&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return l}}function Ye(l,c){var y=l.pendingLanes;if(y===0)return 0;var k=0,F=l.suspendedLanes,V=l.pingedLanes,ie=y&268435455;if(ie!==0){var Ne=ie&~F;Ne!==0?k=on(Ne):(V&=ie,V!==0&&(k=on(V)))}else ie=y&~F,ie!==0?k=on(ie):V!==0&&(k=on(V));if(k===0)return 0;if(c!==0&&c!==k&&(c&F)===0&&(F=k&-k,V=c&-c,F>=V||F===16&&(V&4194240)!==0))return c;if((k&4)!==0&&(k|=y&16),c=l.entangledLanes,c!==0)for(l=l.entanglements,c&=k;0y;y++)c.push(l);return c}function xn(l,c,y){l.pendingLanes|=c,c!==536870912&&(l.suspendedLanes=0,l.pingedLanes=0),l=l.eventTimes,c=31-vs(c),l[c]=y}function qn(l,c){var y=l.pendingLanes&~c;l.pendingLanes=c,l.suspendedLanes=0,l.pingedLanes=0,l.expiredLanes&=c,l.mutableReadLanes&=c,l.entangledLanes&=c,c=l.entanglements;var k=l.eventTimes;for(l=l.expirationTimes;0=Yi),Dl=" ",Zi=!1;function Co(l,c){switch(l){case"keyup":return La.indexOf(c.keyCode)!==-1;case"keydown":return c.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function oh(l){return l=l.detail,typeof l=="object"&&"data"in l?l.data:null}var Rl=!1;function kp(l,c){switch(l){case"compositionend":return oh(c);case"keypress":return c.which!==32?null:(Zi=!0,Dl);case"textInput":return l=c.data,l===Dl&&Zi?null:l;default:return null}}function Dp(l,c){if(Rl)return l==="compositionend"||!kl&&Co(l,c)?(l=No(),Gi=jo=Wr=null,Rl=!1,l):null;switch(l){case"paste":return null;case"keypress":if(!(c.ctrlKey||c.altKey||c.metaKey)||c.ctrlKey&&c.altKey){if(c.char&&1=c)return{node:y,offset:c-l};l=k}e:{for(;y;){if(y.nextSibling){y=y.nextSibling;break e}y=y.parentNode}y=void 0}y=vj(y)}}function bj(l,c){return l&&c?l===c?!0:l&&l.nodeType===3?!1:c&&c.nodeType===3?bj(l,c.parentNode):"contains"in l?l.contains(c):l.compareDocumentPosition?!!(l.compareDocumentPosition(c)&16):!1:!1}function jj(){for(var l=window,c=ve();c instanceof l.HTMLIFrameElement;){try{var y=typeof c.contentWindow.location.href=="string"}catch{y=!1}if(y)l=c.contentWindow;else break;c=ve(l.document)}return c}function Tp(l){var c=l&&l.nodeName&&l.nodeName.toLowerCase();return c&&(c==="input"&&(l.type==="text"||l.type==="search"||l.type==="tel"||l.type==="url"||l.type==="password")||c==="textarea"||l.contentEditable==="true")}function bT(l){var c=jj(),y=l.focusedElem,k=l.selectionRange;if(c!==y&&y&&y.ownerDocument&&bj(y.ownerDocument.documentElement,y)){if(k!==null&&Tp(y)){if(c=k.start,l=k.end,l===void 0&&(l=c),"selectionStart"in y)y.selectionStart=c,y.selectionEnd=Math.min(l,y.value.length);else if(l=(c=y.ownerDocument||document)&&c.defaultView||window,l.getSelection){l=l.getSelection();var F=y.textContent.length,V=Math.min(k.start,F);k=k.end===void 0?V:Math.min(k.end,F),!l.extend&&V>k&&(F=k,k=V,V=F),F=yj(y,V);var ie=yj(y,k);F&&ie&&(l.rangeCount!==1||l.anchorNode!==F.node||l.anchorOffset!==F.offset||l.focusNode!==ie.node||l.focusOffset!==ie.offset)&&(c=c.createRange(),c.setStart(F.node,F.offset),l.removeAllRanges(),V>k?(l.addRange(c),l.extend(ie.node,ie.offset)):(c.setEnd(ie.node,ie.offset),l.addRange(c)))}}for(c=[],l=y;l=l.parentNode;)l.nodeType===1&&c.push({element:l,left:l.scrollLeft,top:l.scrollTop});for(typeof y.focus=="function"&&y.focus(),y=0;y=document.documentMode,jc=null,Pp=null,Td=null,Op=!1;function Nj(l,c,y){var k=y.window===y?y.document:y.nodeType===9?y:y.ownerDocument;Op||jc==null||jc!==ve(k)||(k=jc,"selectionStart"in k&&Tp(k)?k={start:k.selectionStart,end:k.selectionEnd}:(k=(k.ownerDocument&&k.ownerDocument.defaultView||window).getSelection(),k={anchorNode:k.anchorNode,anchorOffset:k.anchorOffset,focusNode:k.focusNode,focusOffset:k.focusOffset}),Td&&_d(Td,k)||(Td=k,k=xh(Pp,"onSelect"),0Ac||(l.current=Wp[Ac],Wp[Ac]=null,Ac--)}function Dn(l,c){Ac++,Wp[Ac]=l.current,l.current=c}var Ol={},Fr=Pl(Ol),ra=Pl(!1),Ro=Ol;function kc(l,c){var y=l.type.contextTypes;if(!y)return Ol;var k=l.stateNode;if(k&&k.__reactInternalMemoizedUnmaskedChildContext===c)return k.__reactInternalMemoizedMaskedChildContext;var F={},V;for(V in y)F[V]=c[V];return k&&(l=l.stateNode,l.__reactInternalMemoizedUnmaskedChildContext=c,l.__reactInternalMemoizedMaskedChildContext=F),F}function aa(l){return l=l.childContextTypes,l!=null}function bh(){Pn(ra),Pn(Fr)}function Mj(l,c,y){if(Fr.current!==Ol)throw Error(n(168));Dn(Fr,c),Dn(ra,y)}function Fj(l,c,y){var k=l.stateNode;if(c=c.childContextTypes,typeof k.getChildContext!="function")return y;k=k.getChildContext();for(var F in k)if(!(F in c))throw Error(n(108,X(l)||"Unknown",F));return z({},y,k)}function jh(l){return l=(l=l.stateNode)&&l.__reactInternalMemoizedMergedChildContext||Ol,Ro=Fr.current,Dn(Fr,l),Dn(ra,ra.current),!0}function Bj(l,c,y){var k=l.stateNode;if(!k)throw Error(n(169));y?(l=Fj(l,c,Ro),k.__reactInternalMemoizedMergedChildContext=l,Pn(ra),Pn(Fr),Dn(Fr,l)):Pn(ra),Dn(ra,y)}var Xi=null,Nh=!1,Gp=!1;function $j(l){Xi===null?Xi=[l]:Xi.push(l)}function TT(l){Nh=!0,$j(l)}function Ll(){if(!Gp&&Xi!==null){Gp=!0;var l=0,c=Hs;try{var y=Xi;for(Hs=1;l>=ie,F-=ie,Ji=1<<32-vs(c)+F|y<zs?(Nr=Es,Es=null):Nr=Es.sibling;var wn=Ct(We,Es,Ke[zs],$t);if(wn===null){Es===null&&(Es=Nr);break}l&&Es&&wn.alternate===null&&c(We,Es),Ie=V(wn,Ie,zs),Rs===null?ys=wn:Rs.sibling=wn,Rs=wn,Es=Nr}if(zs===Ke.length)return y(We,Es),Fn&&_o(We,zs),ys;if(Es===null){for(;zszs?(Nr=Es,Es=null):Nr=Es.sibling;var Vl=Ct(We,Es,wn.value,$t);if(Vl===null){Es===null&&(Es=Nr);break}l&&Es&&Vl.alternate===null&&c(We,Es),Ie=V(Vl,Ie,zs),Rs===null?ys=Vl:Rs.sibling=Vl,Rs=Vl,Es=Nr}if(wn.done)return y(We,Es),Fn&&_o(We,zs),ys;if(Es===null){for(;!wn.done;zs++,wn=Ke.next())wn=Tt(We,wn.value,$t),wn!==null&&(Ie=V(wn,Ie,zs),Rs===null?ys=wn:Rs.sibling=wn,Rs=wn);return Fn&&_o(We,zs),ys}for(Es=k(We,Es);!wn.done;zs++,wn=Ke.next())wn=as(Es,We,zs,wn.value,$t),wn!==null&&(l&&wn.alternate!==null&&Es.delete(wn.key===null?zs:wn.key),Ie=V(wn,Ie,zs),Rs===null?ys=wn:Rs.sibling=wn,Rs=wn);return l&&Es.forEach(function(h4){return c(We,h4)}),Fn&&_o(We,zs),ys}function er(We,Ie,Ke,$t){if(typeof Ke=="object"&&Ke!==null&&Ke.type===A&&Ke.key===null&&(Ke=Ke.props.children),typeof Ke=="object"&&Ke!==null){switch(Ke.$$typeof){case R:e:{for(var ys=Ke.key,Rs=Ie;Rs!==null;){if(Rs.key===ys){if(ys=Ke.type,ys===A){if(Rs.tag===7){y(We,Rs.sibling),Ie=F(Rs,Ke.props.children),Ie.return=We,We=Ie;break e}}else if(Rs.elementType===ys||typeof ys=="object"&&ys!==null&&ys.$$typeof===Z&&Wj(ys)===Rs.type){y(We,Rs.sibling),Ie=F(Rs,Ke.props),Ie.ref=Fd(We,Rs,Ke),Ie.return=We,We=Ie;break e}y(We,Rs);break}else c(We,Rs);Rs=Rs.sibling}Ke.type===A?(Ie=Bo(Ke.props.children,We.mode,$t,Ke.key),Ie.return=We,We=Ie):($t=Zh(Ke.type,Ke.key,Ke.props,null,We.mode,$t),$t.ref=Fd(We,Ie,Ke),$t.return=We,We=$t)}return ie(We);case _:e:{for(Rs=Ke.key;Ie!==null;){if(Ie.key===Rs)if(Ie.tag===4&&Ie.stateNode.containerInfo===Ke.containerInfo&&Ie.stateNode.implementation===Ke.implementation){y(We,Ie.sibling),Ie=F(Ie,Ke.children||[]),Ie.return=We,We=Ie;break e}else{y(We,Ie);break}else c(We,Ie);Ie=Ie.sibling}Ie=Vx(Ke,We.mode,$t),Ie.return=We,We=Ie}return ie(We);case Z:return Rs=Ke._init,er(We,Ie,Rs(Ke._payload),$t)}if(ye(Ke))return ps(We,Ie,Ke,$t);if(M(Ke))return gs(We,Ie,Ke,$t);Ah(We,Ke)}return typeof Ke=="string"&&Ke!==""||typeof Ke=="number"?(Ke=""+Ke,Ie!==null&&Ie.tag===6?(y(We,Ie.sibling),Ie=F(Ie,Ke),Ie.return=We,We=Ie):(y(We,Ie),Ie=Ux(Ke,We.mode,$t),Ie.return=We,We=Ie),ie(We)):y(We,Ie)}return er}var _c=Gj(!0),Kj=Gj(!1),kh=Pl(null),Dh=null,Tc=null,Jp=null;function ex(){Jp=Tc=Dh=null}function tx(l){var c=kh.current;Pn(kh),l._currentValue=c}function sx(l,c,y){for(;l!==null;){var k=l.alternate;if((l.childLanes&c)!==c?(l.childLanes|=c,k!==null&&(k.childLanes|=c)):k!==null&&(k.childLanes&c)!==c&&(k.childLanes|=c),l===y)break;l=l.return}}function Pc(l,c){Dh=l,Jp=Tc=null,l=l.dependencies,l!==null&&l.firstContext!==null&&((l.lanes&c)!==0&&(ia=!0),l.firstContext=null)}function Ba(l){var c=l._currentValue;if(Jp!==l)if(l={context:l,memoizedValue:c,next:null},Tc===null){if(Dh===null)throw Error(n(308));Tc=l,Dh.dependencies={lanes:0,firstContext:l}}else Tc=Tc.next=l;return c}var To=null;function nx(l){To===null?To=[l]:To.push(l)}function Yj(l,c,y,k){var F=c.interleaved;return F===null?(y.next=y,nx(c)):(y.next=F.next,F.next=y),c.interleaved=y,tl(l,k)}function tl(l,c){l.lanes|=c;var y=l.alternate;for(y!==null&&(y.lanes|=c),y=l,l=l.return;l!==null;)l.childLanes|=c,y=l.alternate,y!==null&&(y.childLanes|=c),y=l,l=l.return;return y.tag===3?y.stateNode:null}var Il=!1;function rx(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Zj(l,c){l=l.updateQueue,c.updateQueue===l&&(c.updateQueue={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,effects:l.effects})}function sl(l,c){return{eventTime:l,lane:c,tag:0,payload:null,callback:null,next:null}}function Ml(l,c,y){var k=l.updateQueue;if(k===null)return null;if(k=k.shared,(Nn&2)!==0){var F=k.pending;return F===null?c.next=c:(c.next=F.next,F.next=c),k.pending=c,tl(l,y)}return F=k.interleaved,F===null?(c.next=c,nx(k)):(c.next=F.next,F.next=c),k.interleaved=c,tl(l,y)}function Rh(l,c,y){if(c=c.updateQueue,c!==null&&(c=c.shared,(y&4194240)!==0)){var k=c.lanes;k&=l.pendingLanes,y|=k,c.lanes=y,En(l,y)}}function Qj(l,c){var y=l.updateQueue,k=l.alternate;if(k!==null&&(k=k.updateQueue,y===k)){var F=null,V=null;if(y=y.firstBaseUpdate,y!==null){do{var ie={eventTime:y.eventTime,lane:y.lane,tag:y.tag,payload:y.payload,callback:y.callback,next:null};V===null?F=V=ie:V=V.next=ie,y=y.next}while(y!==null);V===null?F=V=c:V=V.next=c}else F=V=c;y={baseState:k.baseState,firstBaseUpdate:F,lastBaseUpdate:V,shared:k.shared,effects:k.effects},l.updateQueue=y;return}l=y.lastBaseUpdate,l===null?y.firstBaseUpdate=c:l.next=c,y.lastBaseUpdate=c}function Eh(l,c,y,k){var F=l.updateQueue;Il=!1;var V=F.firstBaseUpdate,ie=F.lastBaseUpdate,Ne=F.shared.pending;if(Ne!==null){F.shared.pending=null;var Re=Ne,Ze=Re.next;Re.next=null,ie===null?V=Ze:ie.next=Ze,ie=Re;var At=l.alternate;At!==null&&(At=At.updateQueue,Ne=At.lastBaseUpdate,Ne!==ie&&(Ne===null?At.firstBaseUpdate=Ze:Ne.next=Ze,At.lastBaseUpdate=Re))}if(V!==null){var Tt=F.baseState;ie=0,At=Ze=Re=null,Ne=V;do{var Ct=Ne.lane,as=Ne.eventTime;if((k&Ct)===Ct){At!==null&&(At=At.next={eventTime:as,lane:0,tag:Ne.tag,payload:Ne.payload,callback:Ne.callback,next:null});e:{var ps=l,gs=Ne;switch(Ct=c,as=y,gs.tag){case 1:if(ps=gs.payload,typeof ps=="function"){Tt=ps.call(as,Tt,Ct);break e}Tt=ps;break e;case 3:ps.flags=ps.flags&-65537|128;case 0:if(ps=gs.payload,Ct=typeof ps=="function"?ps.call(as,Tt,Ct):ps,Ct==null)break e;Tt=z({},Tt,Ct);break e;case 2:Il=!0}}Ne.callback!==null&&Ne.lane!==0&&(l.flags|=64,Ct=F.effects,Ct===null?F.effects=[Ne]:Ct.push(Ne))}else as={eventTime:as,lane:Ct,tag:Ne.tag,payload:Ne.payload,callback:Ne.callback,next:null},At===null?(Ze=At=as,Re=Tt):At=At.next=as,ie|=Ct;if(Ne=Ne.next,Ne===null){if(Ne=F.shared.pending,Ne===null)break;Ct=Ne,Ne=Ct.next,Ct.next=null,F.lastBaseUpdate=Ct,F.shared.pending=null}}while(!0);if(At===null&&(Re=Tt),F.baseState=Re,F.firstBaseUpdate=Ze,F.lastBaseUpdate=At,c=F.shared.interleaved,c!==null){F=c;do ie|=F.lane,F=F.next;while(F!==c)}else V===null&&(F.shared.lanes=0);Lo|=ie,l.lanes=ie,l.memoizedState=Tt}}function Xj(l,c,y){if(l=c.effects,c.effects=null,l!==null)for(c=0;cy?y:4,l(!0);var k=cx.transition;cx.transition={};try{l(!1),c()}finally{Hs=y,cx.transition=k}}function gN(){return $a().memoizedState}function IT(l,c,y){var k=ql(l);if(y={lane:k,action:y,hasEagerState:!1,eagerState:null,next:null},vN(l))yN(c,y);else if(y=Yj(l,c,y,k),y!==null){var F=Yr();ai(y,l,k,F),bN(y,c,k)}}function MT(l,c,y){var k=ql(l),F={lane:k,action:y,hasEagerState:!1,eagerState:null,next:null};if(vN(l))yN(c,F);else{var V=l.alternate;if(l.lanes===0&&(V===null||V.lanes===0)&&(V=c.lastRenderedReducer,V!==null))try{var ie=c.lastRenderedState,Ne=V(ie,y);if(F.hasEagerState=!0,F.eagerState=Ne,ei(Ne,ie)){var Re=c.interleaved;Re===null?(F.next=F,nx(c)):(F.next=Re.next,Re.next=F),c.interleaved=F;return}}catch{}finally{}y=Yj(l,c,F,k),y!==null&&(F=Yr(),ai(y,l,k,F),bN(y,c,k))}}function vN(l){var c=l.alternate;return l===Vn||c!==null&&c===Vn}function yN(l,c){zd=Ph=!0;var y=l.pending;y===null?c.next=c:(c.next=y.next,y.next=c),l.pending=c}function bN(l,c,y){if((y&4194240)!==0){var k=c.lanes;k&=l.pendingLanes,y|=k,c.lanes=y,En(l,y)}}var Ih={readContext:Ba,useCallback:Br,useContext:Br,useEffect:Br,useImperativeHandle:Br,useInsertionEffect:Br,useLayoutEffect:Br,useMemo:Br,useReducer:Br,useRef:Br,useState:Br,useDebugValue:Br,useDeferredValue:Br,useTransition:Br,useMutableSource:Br,useSyncExternalStore:Br,useId:Br,unstable_isNewReconciler:!1},FT={readContext:Ba,useCallback:function(l,c){return Di().memoizedState=[l,c===void 0?null:c],l},useContext:Ba,useEffect:cN,useImperativeHandle:function(l,c,y){return y=y!=null?y.concat([l]):null,Oh(4194308,4,hN.bind(null,c,l),y)},useLayoutEffect:function(l,c){return Oh(4194308,4,l,c)},useInsertionEffect:function(l,c){return Oh(4,2,l,c)},useMemo:function(l,c){var y=Di();return c=c===void 0?null:c,l=l(),y.memoizedState=[l,c],l},useReducer:function(l,c,y){var k=Di();return c=y!==void 0?y(c):c,k.memoizedState=k.baseState=c,l={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:c},k.queue=l,l=l.dispatch=IT.bind(null,Vn,l),[k.memoizedState,l]},useRef:function(l){var c=Di();return l={current:l},c.memoizedState=l},useState:lN,useDebugValue:xx,useDeferredValue:function(l){return Di().memoizedState=l},useTransition:function(){var l=lN(!1),c=l[0];return l=LT.bind(null,l[1]),Di().memoizedState=l,[c,l]},useMutableSource:function(){},useSyncExternalStore:function(l,c,y){var k=Vn,F=Di();if(Fn){if(y===void 0)throw Error(n(407));y=y()}else{if(y=c(),jr===null)throw Error(n(349));(Oo&30)!==0||sN(k,c,y)}F.memoizedState=y;var V={value:y,getSnapshot:c};return F.queue=V,cN(rN.bind(null,k,V,l),[l]),k.flags|=2048,Hd(9,nN.bind(null,k,V,y,c),void 0,null),y},useId:function(){var l=Di(),c=jr.identifierPrefix;if(Fn){var y=el,k=Ji;y=(k&~(1<<32-vs(k)-1)).toString(32)+y,c=":"+c+"R"+y,y=Ud++,0<\/script>",l=l.removeChild(l.firstChild)):typeof k.is=="string"?l=ie.createElement(y,{is:k.is}):(l=ie.createElement(y),y==="select"&&(ie=l,k.multiple?ie.multiple=!0:k.size&&(ie.size=k.size))):l=ie.createElementNS(l,y),l[Ai]=c,l[Id]=k,$N(l,c,!1,!1),c.stateNode=l;e:{switch(ie=Ks(y,k),y){case"dialog":Tn("cancel",l),Tn("close",l),F=k;break;case"iframe":case"object":case"embed":Tn("load",l),F=k;break;case"video":case"audio":for(F=0;FFc&&(c.flags|=128,k=!0,Wd(V,!1),c.lanes=4194304)}else{if(!k)if(l=_h(ie),l!==null){if(c.flags|=128,k=!0,y=l.updateQueue,y!==null&&(c.updateQueue=y,c.flags|=4),Wd(V,!0),V.tail===null&&V.tailMode==="hidden"&&!ie.alternate&&!Fn)return $r(c),null}else 2*bt()-V.renderingStartTime>Fc&&y!==1073741824&&(c.flags|=128,k=!0,Wd(V,!1),c.lanes=4194304);V.isBackwards?(ie.sibling=c.child,c.child=ie):(y=V.last,y!==null?y.sibling=ie:c.child=ie,V.last=ie)}return V.tail!==null?(c=V.tail,V.rendering=c,V.tail=c.sibling,V.renderingStartTime=bt(),c.sibling=null,y=Un.current,Dn(Un,k?y&1|2:y&1),c):($r(c),null);case 22:case 23:return $x(),k=c.memoizedState!==null,l!==null&&l.memoizedState!==null!==k&&(c.flags|=8192),k&&(c.mode&1)!==0?(wa&1073741824)!==0&&($r(c),c.subtreeFlags&6&&(c.flags|=8192)):$r(c),null;case 24:return null;case 25:return null}throw Error(n(156,c.tag))}function WT(l,c){switch(Yp(c),c.tag){case 1:return aa(c.type)&&bh(),l=c.flags,l&65536?(c.flags=l&-65537|128,c):null;case 3:return Oc(),Pn(ra),Pn(Fr),ox(),l=c.flags,(l&65536)!==0&&(l&128)===0?(c.flags=l&-65537|128,c):null;case 5:return ix(c),null;case 13:if(Pn(Un),l=c.memoizedState,l!==null&&l.dehydrated!==null){if(c.alternate===null)throw Error(n(340));Ec()}return l=c.flags,l&65536?(c.flags=l&-65537|128,c):null;case 19:return Pn(Un),null;case 4:return Oc(),null;case 10:return tx(c.type._context),null;case 22:case 23:return $x(),null;case 24:return null;default:return null}}var $h=!1,qr=!1,GT=typeof WeakSet=="function"?WeakSet:Set,us=null;function Ic(l,c){var y=l.ref;if(y!==null)if(typeof y=="function")try{y(null)}catch(k){Kn(l,c,k)}else y.current=null}function Dx(l,c,y){try{y()}catch(k){Kn(l,c,k)}}var UN=!1;function KT(l,c){if($p=ya,l=jj(),Tp(l)){if("selectionStart"in l)var y={start:l.selectionStart,end:l.selectionEnd};else e:{y=(y=l.ownerDocument)&&y.defaultView||window;var k=y.getSelection&&y.getSelection();if(k&&k.rangeCount!==0){y=k.anchorNode;var F=k.anchorOffset,V=k.focusNode;k=k.focusOffset;try{y.nodeType,V.nodeType}catch{y=null;break e}var ie=0,Ne=-1,Re=-1,Ze=0,At=0,Tt=l,Ct=null;t:for(;;){for(var as;Tt!==y||F!==0&&Tt.nodeType!==3||(Ne=ie+F),Tt!==V||k!==0&&Tt.nodeType!==3||(Re=ie+k),Tt.nodeType===3&&(ie+=Tt.nodeValue.length),(as=Tt.firstChild)!==null;)Ct=Tt,Tt=as;for(;;){if(Tt===l)break t;if(Ct===y&&++Ze===F&&(Ne=ie),Ct===V&&++At===k&&(Re=ie),(as=Tt.nextSibling)!==null)break;Tt=Ct,Ct=Tt.parentNode}Tt=as}y=Ne===-1||Re===-1?null:{start:Ne,end:Re}}else y=null}y=y||{start:0,end:0}}else y=null;for(qp={focusedElem:l,selectionRange:y},ya=!1,us=c;us!==null;)if(c=us,l=c.child,(c.subtreeFlags&1028)!==0&&l!==null)l.return=c,us=l;else for(;us!==null;){c=us;try{var ps=c.alternate;if((c.flags&1024)!==0)switch(c.tag){case 0:case 11:case 15:break;case 1:if(ps!==null){var gs=ps.memoizedProps,er=ps.memoizedState,We=c.stateNode,Ie=We.getSnapshotBeforeUpdate(c.elementType===c.type?gs:si(c.type,gs),er);We.__reactInternalSnapshotBeforeUpdate=Ie}break;case 3:var Ke=c.stateNode.containerInfo;Ke.nodeType===1?Ke.textContent="":Ke.nodeType===9&&Ke.documentElement&&Ke.removeChild(Ke.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch($t){Kn(c,c.return,$t)}if(l=c.sibling,l!==null){l.return=c.return,us=l;break}us=c.return}return ps=UN,UN=!1,ps}function Gd(l,c,y){var k=c.updateQueue;if(k=k!==null?k.lastEffect:null,k!==null){var F=k=k.next;do{if((F.tag&l)===l){var V=F.destroy;F.destroy=void 0,V!==void 0&&Dx(c,y,V)}F=F.next}while(F!==k)}}function qh(l,c){if(c=c.updateQueue,c=c!==null?c.lastEffect:null,c!==null){var y=c=c.next;do{if((y.tag&l)===l){var k=y.create;y.destroy=k()}y=y.next}while(y!==c)}}function Rx(l){var c=l.ref;if(c!==null){var y=l.stateNode;switch(l.tag){case 5:l=y;break;default:l=y}typeof c=="function"?c(l):c.current=l}}function VN(l){var c=l.alternate;c!==null&&(l.alternate=null,VN(c)),l.child=null,l.deletions=null,l.sibling=null,l.tag===5&&(c=l.stateNode,c!==null&&(delete c[Ai],delete c[Id],delete c[Hp],delete c[ET],delete c[_T])),l.stateNode=null,l.return=null,l.dependencies=null,l.memoizedProps=null,l.memoizedState=null,l.pendingProps=null,l.stateNode=null,l.updateQueue=null}function HN(l){return l.tag===5||l.tag===3||l.tag===4}function WN(l){e:for(;;){for(;l.sibling===null;){if(l.return===null||HN(l.return))return null;l=l.return}for(l.sibling.return=l.return,l=l.sibling;l.tag!==5&&l.tag!==6&&l.tag!==18;){if(l.flags&2||l.child===null||l.tag===4)continue e;l.child.return=l,l=l.child}if(!(l.flags&2))return l.stateNode}}function Ex(l,c,y){var k=l.tag;if(k===5||k===6)l=l.stateNode,c?y.nodeType===8?y.parentNode.insertBefore(l,c):y.insertBefore(l,c):(y.nodeType===8?(c=y.parentNode,c.insertBefore(l,y)):(c=y,c.appendChild(l)),y=y._reactRootContainer,y!=null||c.onclick!==null||(c.onclick=vh));else if(k!==4&&(l=l.child,l!==null))for(Ex(l,c,y),l=l.sibling;l!==null;)Ex(l,c,y),l=l.sibling}function _x(l,c,y){var k=l.tag;if(k===5||k===6)l=l.stateNode,c?y.insertBefore(l,c):y.appendChild(l);else if(k!==4&&(l=l.child,l!==null))for(_x(l,c,y),l=l.sibling;l!==null;)_x(l,c,y),l=l.sibling}var Tr=null,ni=!1;function Fl(l,c,y){for(y=y.child;y!==null;)GN(l,c,y),y=y.sibling}function GN(l,c,y){if(qt&&typeof qt.onCommitFiberUnmount=="function")try{qt.onCommitFiberUnmount(fs,y)}catch{}switch(y.tag){case 5:qr||Ic(y,c);case 6:var k=Tr,F=ni;Tr=null,Fl(l,c,y),Tr=k,ni=F,Tr!==null&&(ni?(l=Tr,y=y.stateNode,l.nodeType===8?l.parentNode.removeChild(y):l.removeChild(y)):Tr.removeChild(y.stateNode));break;case 18:Tr!==null&&(ni?(l=Tr,y=y.stateNode,l.nodeType===8?Vp(l.parentNode,y):l.nodeType===1&&Vp(l,y),Hr(l)):Vp(Tr,y.stateNode));break;case 4:k=Tr,F=ni,Tr=y.stateNode.containerInfo,ni=!0,Fl(l,c,y),Tr=k,ni=F;break;case 0:case 11:case 14:case 15:if(!qr&&(k=y.updateQueue,k!==null&&(k=k.lastEffect,k!==null))){F=k=k.next;do{var V=F,ie=V.destroy;V=V.tag,ie!==void 0&&((V&2)!==0||(V&4)!==0)&&Dx(y,c,ie),F=F.next}while(F!==k)}Fl(l,c,y);break;case 1:if(!qr&&(Ic(y,c),k=y.stateNode,typeof k.componentWillUnmount=="function"))try{k.props=y.memoizedProps,k.state=y.memoizedState,k.componentWillUnmount()}catch(Ne){Kn(y,c,Ne)}Fl(l,c,y);break;case 21:Fl(l,c,y);break;case 22:y.mode&1?(qr=(k=qr)||y.memoizedState!==null,Fl(l,c,y),qr=k):Fl(l,c,y);break;default:Fl(l,c,y)}}function KN(l){var c=l.updateQueue;if(c!==null){l.updateQueue=null;var y=l.stateNode;y===null&&(y=l.stateNode=new GT),c.forEach(function(k){var F=n4.bind(null,l,k);y.has(k)||(y.add(k),k.then(F,F))})}}function ri(l,c){var y=c.deletions;if(y!==null)for(var k=0;kF&&(F=ie),k&=~V}if(k=F,k=bt()-k,k=(120>k?120:480>k?480:1080>k?1080:1920>k?1920:3e3>k?3e3:4320>k?4320:1960*ZT(k/1960))-k,10l?16:l,$l===null)var k=!1;else{if(l=$l,$l=null,Wh=0,(Nn&6)!==0)throw Error(n(331));var F=Nn;for(Nn|=4,us=l.current;us!==null;){var V=us,ie=V.child;if((us.flags&16)!==0){var Ne=V.deletions;if(Ne!==null){for(var Re=0;Rebt()-Ox?Mo(l,0):Px|=y),oa(l,c)}function lw(l,c){c===0&&((l.mode&1)===0?c=1:(c=fn,fn<<=1,(fn&130023424)===0&&(fn=4194304)));var y=Yr();l=tl(l,c),l!==null&&(xn(l,c,y),oa(l,y))}function s4(l){var c=l.memoizedState,y=0;c!==null&&(y=c.retryLane),lw(l,y)}function n4(l,c){var y=0;switch(l.tag){case 13:var k=l.stateNode,F=l.memoizedState;F!==null&&(y=F.retryLane);break;case 19:k=l.stateNode;break;default:throw Error(n(314))}k!==null&&k.delete(c),lw(l,y)}var ow;ow=function(l,c,y){if(l!==null)if(l.memoizedProps!==c.pendingProps||ra.current)ia=!0;else{if((l.lanes&y)===0&&(c.flags&128)===0)return ia=!1,VT(l,c,y);ia=(l.flags&131072)!==0}else ia=!1,Fn&&(c.flags&1048576)!==0&&qj(c,Sh,c.index);switch(c.lanes=0,c.tag){case 2:var k=c.type;Bh(l,c),l=c.pendingProps;var F=kc(c,Fr.current);Pc(c,y),F=ux(null,c,k,l,F,y);var V=hx();return c.flags|=1,typeof F=="object"&&F!==null&&typeof F.render=="function"&&F.$$typeof===void 0?(c.tag=1,c.memoizedState=null,c.updateQueue=null,aa(k)?(V=!0,jh(c)):V=!1,c.memoizedState=F.state!==null&&F.state!==void 0?F.state:null,rx(c),F.updater=Mh,c.stateNode=F,F._reactInternals=c,vx(c,k,l,y),c=Nx(null,c,k,!0,V,y)):(c.tag=0,Fn&&V&&Kp(c),Kr(null,c,F,y),c=c.child),c;case 16:k=c.elementType;e:{switch(Bh(l,c),l=c.pendingProps,F=k._init,k=F(k._payload),c.type=k,F=c.tag=a4(k),l=si(k,l),F){case 0:c=jx(null,c,k,l,y);break e;case 1:c=ON(null,c,k,l,y);break e;case 11:c=RN(null,c,k,l,y);break e;case 14:c=EN(null,c,k,si(k.type,l),y);break e}throw Error(n(306,k,""))}return c;case 0:return k=c.type,F=c.pendingProps,F=c.elementType===k?F:si(k,F),jx(l,c,k,F,y);case 1:return k=c.type,F=c.pendingProps,F=c.elementType===k?F:si(k,F),ON(l,c,k,F,y);case 3:e:{if(LN(c),l===null)throw Error(n(387));k=c.pendingProps,V=c.memoizedState,F=V.element,Zj(l,c),Eh(c,k,null,y);var ie=c.memoizedState;if(k=ie.element,V.isDehydrated)if(V={element:k,isDehydrated:!1,cache:ie.cache,pendingSuspenseBoundaries:ie.pendingSuspenseBoundaries,transitions:ie.transitions},c.updateQueue.baseState=V,c.memoizedState=V,c.flags&256){F=Lc(Error(n(423)),c),c=IN(l,c,k,y,F);break e}else if(k!==F){F=Lc(Error(n(424)),c),c=IN(l,c,k,y,F);break e}else for(Na=Tl(c.stateNode.containerInfo.firstChild),ja=c,Fn=!0,ti=null,y=Kj(c,null,k,y),c.child=y;y;)y.flags=y.flags&-3|4096,y=y.sibling;else{if(Ec(),k===F){c=nl(l,c,y);break e}Kr(l,c,k,y)}c=c.child}return c;case 5:return Jj(c),l===null&&Qp(c),k=c.type,F=c.pendingProps,V=l!==null?l.memoizedProps:null,ie=F.children,zp(k,F)?ie=null:V!==null&&zp(k,V)&&(c.flags|=32),PN(l,c),Kr(l,c,ie,y),c.child;case 6:return l===null&&Qp(c),null;case 13:return MN(l,c,y);case 4:return ax(c,c.stateNode.containerInfo),k=c.pendingProps,l===null?c.child=_c(c,null,k,y):Kr(l,c,k,y),c.child;case 11:return k=c.type,F=c.pendingProps,F=c.elementType===k?F:si(k,F),RN(l,c,k,F,y);case 7:return Kr(l,c,c.pendingProps,y),c.child;case 8:return Kr(l,c,c.pendingProps.children,y),c.child;case 12:return Kr(l,c,c.pendingProps.children,y),c.child;case 10:e:{if(k=c.type._context,F=c.pendingProps,V=c.memoizedProps,ie=F.value,Dn(kh,k._currentValue),k._currentValue=ie,V!==null)if(ei(V.value,ie)){if(V.children===F.children&&!ra.current){c=nl(l,c,y);break e}}else for(V=c.child,V!==null&&(V.return=c);V!==null;){var Ne=V.dependencies;if(Ne!==null){ie=V.child;for(var Re=Ne.firstContext;Re!==null;){if(Re.context===k){if(V.tag===1){Re=sl(-1,y&-y),Re.tag=2;var Ze=V.updateQueue;if(Ze!==null){Ze=Ze.shared;var At=Ze.pending;At===null?Re.next=Re:(Re.next=At.next,At.next=Re),Ze.pending=Re}}V.lanes|=y,Re=V.alternate,Re!==null&&(Re.lanes|=y),sx(V.return,y,c),Ne.lanes|=y;break}Re=Re.next}}else if(V.tag===10)ie=V.type===c.type?null:V.child;else if(V.tag===18){if(ie=V.return,ie===null)throw Error(n(341));ie.lanes|=y,Ne=ie.alternate,Ne!==null&&(Ne.lanes|=y),sx(ie,y,c),ie=V.sibling}else ie=V.child;if(ie!==null)ie.return=V;else for(ie=V;ie!==null;){if(ie===c){ie=null;break}if(V=ie.sibling,V!==null){V.return=ie.return,ie=V;break}ie=ie.return}V=ie}Kr(l,c,F.children,y),c=c.child}return c;case 9:return F=c.type,k=c.pendingProps.children,Pc(c,y),F=Ba(F),k=k(F),c.flags|=1,Kr(l,c,k,y),c.child;case 14:return k=c.type,F=si(k,c.pendingProps),F=si(k.type,F),EN(l,c,k,F,y);case 15:return _N(l,c,c.type,c.pendingProps,y);case 17:return k=c.type,F=c.pendingProps,F=c.elementType===k?F:si(k,F),Bh(l,c),c.tag=1,aa(k)?(l=!0,jh(c)):l=!1,Pc(c,y),NN(c,k,F),vx(c,k,F,y),Nx(null,c,k,!0,l,y);case 19:return BN(l,c,y);case 22:return TN(l,c,y)}throw Error(n(156,c.tag))};function cw(l,c){return Js(l,c)}function r4(l,c,y,k){this.tag=l,this.key=y,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=c,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=k,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function za(l,c,y,k){return new r4(l,c,y,k)}function zx(l){return l=l.prototype,!(!l||!l.isReactComponent)}function a4(l){if(typeof l=="function")return zx(l)?1:0;if(l!=null){if(l=l.$$typeof,l===P)return 11;if(l===Y)return 14}return 2}function Ul(l,c){var y=l.alternate;return y===null?(y=za(l.tag,c,l.key,l.mode),y.elementType=l.elementType,y.type=l.type,y.stateNode=l.stateNode,y.alternate=l,l.alternate=y):(y.pendingProps=c,y.type=l.type,y.flags=0,y.subtreeFlags=0,y.deletions=null),y.flags=l.flags&14680064,y.childLanes=l.childLanes,y.lanes=l.lanes,y.child=l.child,y.memoizedProps=l.memoizedProps,y.memoizedState=l.memoizedState,y.updateQueue=l.updateQueue,c=l.dependencies,y.dependencies=c===null?null:{lanes:c.lanes,firstContext:c.firstContext},y.sibling=l.sibling,y.index=l.index,y.ref=l.ref,y}function Zh(l,c,y,k,F,V){var ie=2;if(k=l,typeof l=="function")zx(l)&&(ie=1);else if(typeof l=="string")ie=5;else e:switch(l){case A:return Bo(y.children,F,V,c);case E:ie=8,F|=8;break;case q:return l=za(12,y,c,F|2),l.elementType=q,l.lanes=V,l;case L:return l=za(13,y,c,F),l.elementType=L,l.lanes=V,l;case $:return l=za(19,y,c,F),l.elementType=$,l.lanes=V,l;case W:return Qh(y,F,V,c);default:if(typeof l=="object"&&l!==null)switch(l.$$typeof){case O:ie=10;break e;case D:ie=9;break e;case P:ie=11;break e;case Y:ie=14;break e;case Z:ie=16,k=null;break e}throw Error(n(130,l==null?l:typeof l,""))}return c=za(ie,y,c,F),c.elementType=l,c.type=k,c.lanes=V,c}function Bo(l,c,y,k){return l=za(7,l,k,c),l.lanes=y,l}function Qh(l,c,y,k){return l=za(22,l,k,c),l.elementType=W,l.lanes=y,l.stateNode={isHidden:!1},l}function Ux(l,c,y){return l=za(6,l,null,c),l.lanes=y,l}function Vx(l,c,y){return c=za(4,l.children!==null?l.children:[],l.key,c),c.lanes=y,c.stateNode={containerInfo:l.containerInfo,pendingChildren:null,implementation:l.implementation},c}function i4(l,c,y,k,F){this.tag=c,this.containerInfo=l,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=jn(0),this.expirationTimes=jn(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=jn(0),this.identifierPrefix=k,this.onRecoverableError=F,this.mutableSourceEagerHydrationData=null}function Hx(l,c,y,k,F,V,ie,Ne,Re){return l=new i4(l,c,y,Ne,Re),c===1?(c=1,V===!0&&(c|=8)):c=0,V=za(3,null,null,c),l.current=V,V.stateNode=l,V.memoizedState={element:k,isDehydrated:y,cache:null,transitions:null,pendingSuspenseBoundaries:null},rx(V),l}function l4(l,c,y){var k=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(s){console.error(s)}}return t(),Xx.exports=j4(),Xx.exports}var ww;function N4(){if(ww)return rm;ww=1;var t=Oy();return rm.createRoot=t.createRoot,rm.hydrateRoot=t.hydrateRoot,rm}var w4=N4();const S4=wf(w4);var tg={exports:{}},sg={};/** - * @license React - * use-sync-external-store-with-selector.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Sw;function C4(){if(Sw)return sg;Sw=1;var t=pd();function s(m,f){return m===f&&(m!==0||1/m===1/f)||m!==m&&f!==f}var n=typeof Object.is=="function"?Object.is:s,r=t.useSyncExternalStore,a=t.useRef,i=t.useEffect,o=t.useMemo,d=t.useDebugValue;return sg.useSyncExternalStoreWithSelector=function(m,f,p,h,x){var u=a(null);if(u.current===null){var N={hasValue:!1,value:null};u.current=N}else N=u.current;u=o(function(){function w(R){if(!j){if(j=!0,b=R,R=h(R),x!==void 0&&N.hasValue){var _=N.value;if(x(_,R))return C=_}return C=R}if(_=C,n(b,R))return _;var A=h(R);return x!==void 0&&x(_,A)?(b=R,_):(b=R,C=A)}var j=!1,b,C,S=p===void 0?null:p;return[function(){return w(f())},S===null?void 0:function(){return w(S())}]},[f,p,h,x]);var v=r(m,u[0],u[1]);return i(function(){N.hasValue=!0,N.value=v},[v]),d(v),v},sg}var Cw;function A4(){return Cw||(Cw=1,tg.exports=C4()),tg.exports}var k4=A4();function D4(t){t()}function R4(){let t=null,s=null;return{clear(){t=null,s=null},notify(){D4(()=>{let n=t;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=t;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const a=s={callback:n,next:null,prev:s};return a.prev?a.prev.next=a:t=a,function(){!r||t===null||(r=!1,a.next?a.next.prev=a.prev:s=a.prev,a.prev?a.prev.next=a.next:t=a.next)}}}}var Aw={notify(){},get:()=>[]};function E4(t,s){let n,r=Aw,a=0,i=!1;function o(v){p();const w=r.subscribe(v);let j=!1;return()=>{j||(j=!0,w(),h())}}function d(){r.notify()}function m(){N.onStateChange&&N.onStateChange()}function f(){return i}function p(){a++,n||(n=t.subscribe(m),r=R4())}function h(){a--,n&&a===0&&(n(),n=void 0,r.clear(),r=Aw)}function x(){i||(i=!0,p())}function u(){i&&(i=!1,h())}const N={addNestedSub:o,notifyNestedSubs:d,handleChangeWrapper:m,isSubscribed:f,trySubscribe:x,tryUnsubscribe:u,getListeners:()=>r};return N}var _4=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",T4=_4(),P4=()=>typeof navigator<"u"&&navigator.product==="ReactNative",O4=P4(),L4=()=>T4||O4?g.useLayoutEffect:g.useEffect,I4=L4(),ng=Symbol.for("react-redux-context"),rg=typeof globalThis<"u"?globalThis:{};function M4(){if(!g.createContext)return{};const t=rg[ng]??(rg[ng]=new Map);let s=t.get(g.createContext);return s||(s=g.createContext(null),t.set(g.createContext,s)),s}var to=M4();function F4(t){const{children:s,context:n,serverState:r,store:a}=t,i=g.useMemo(()=>{const m=E4(a);return{store:a,subscription:m,getServerState:r?()=>r:void 0}},[a,r]),o=g.useMemo(()=>a.getState(),[a]);I4(()=>{const{subscription:m}=i;return m.onStateChange=m.notifyNestedSubs,m.trySubscribe(),o!==a.getState()&&m.notifyNestedSubs(),()=>{m.tryUnsubscribe(),m.onStateChange=void 0}},[i,o]);const d=n||to;return g.createElement(d.Provider,{value:i},s)}var B4=F4;function Ly(t=to){return function(){return g.useContext(t)}}var F2=Ly();function B2(t=to){const s=t===to?F2:Ly(t),n=()=>{const{store:r}=s();return r};return Object.assign(n,{withTypes:()=>n}),n}var $4=B2();function q4(t=to){const s=t===to?$4:B2(t),n=()=>s().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var Lu=q4(),z4=(t,s)=>t===s;function U4(t=to){const s=t===to?F2:Ly(t),n=(r,a={})=>{const{equalityFn:i=z4}=typeof a=="function"?{equalityFn:a}:a,o=s(),{store:d,subscription:m,getServerState:f}=o;g.useRef(!0);const p=g.useCallback({[r.name](x){return r(x)}}[r.name],[r]),h=k4.useSyncExternalStoreWithSelector(m.addNestedSub,d.getState,f||d.getState,p,i);return g.useDebugValue(h),h};return Object.assign(n,{withTypes:()=>n}),n}var In=U4();function Or(t){return`Minified Redux error #${t}; visit https://redux.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var V4=typeof Symbol=="function"&&Symbol.observable||"@@observable",kw=V4,ag=()=>Math.random().toString(36).substring(7).split("").join("."),H4={INIT:`@@redux/INIT${ag()}`,REPLACE:`@@redux/REPLACE${ag()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${ag()}`},Ym=H4;function Iy(t){if(typeof t!="object"||t===null)return!1;let s=t;for(;Object.getPrototypeOf(s)!==null;)s=Object.getPrototypeOf(s);return Object.getPrototypeOf(t)===s||Object.getPrototypeOf(t)===null}function $2(t,s,n){if(typeof t!="function")throw new Error(Or(2));if(typeof s=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Or(0));if(typeof s=="function"&&typeof n>"u"&&(n=s,s=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Or(1));return n($2)(t,s)}let r=t,a=s,i=new Map,o=i,d=0,m=!1;function f(){o===i&&(o=new Map,i.forEach((w,j)=>{o.set(j,w)}))}function p(){if(m)throw new Error(Or(3));return a}function h(w){if(typeof w!="function")throw new Error(Or(4));if(m)throw new Error(Or(5));let j=!0;f();const b=d++;return o.set(b,w),function(){if(j){if(m)throw new Error(Or(6));j=!1,f(),o.delete(b),i=null}}}function x(w){if(!Iy(w))throw new Error(Or(7));if(typeof w.type>"u")throw new Error(Or(8));if(typeof w.type!="string")throw new Error(Or(17));if(m)throw new Error(Or(9));try{m=!0,a=r(a,w)}finally{m=!1}return(i=o).forEach(b=>{b()}),w}function u(w){if(typeof w!="function")throw new Error(Or(10));r=w,x({type:Ym.REPLACE})}function N(){const w=h;return{subscribe(j){if(typeof j!="object"||j===null)throw new Error(Or(11));function b(){const S=j;S.next&&S.next(p())}return b(),{unsubscribe:w(b)}},[kw](){return this}}}return x({type:Ym.INIT}),{dispatch:x,subscribe:h,getState:p,replaceReducer:u,[kw]:N}}function W4(t){Object.keys(t).forEach(s=>{const n=t[s];if(typeof n(void 0,{type:Ym.INIT})>"u")throw new Error(Or(12));if(typeof n(void 0,{type:Ym.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Or(13))})}function G4(t){const s=Object.keys(t),n={};for(let i=0;i"u")throw d&&d.type,new Error(Or(14));f[h]=N,m=m||N!==u}return m=m||r.length!==Object.keys(o).length,m?f:o}}function Zm(...t){return t.length===0?s=>s:t.length===1?t[0]:t.reduce((s,n)=>(...r)=>s(n(...r)))}function K4(...t){return s=>(n,r)=>{const a=s(n,r);let i=()=>{throw new Error(Or(15))};const o={getState:a.getState,dispatch:(m,...f)=>i(m,...f)},d=t.map(m=>m(o));return i=Zm(...d)(a.dispatch),{...a,dispatch:i}}}function Y4(t){return Iy(t)&&"type"in t&&typeof t.type=="string"}var q2=Symbol.for("immer-nothing"),Dw=Symbol.for("immer-draftable"),Qr=Symbol.for("immer-state");function hi(t,...s){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var Da=Object,sd=Da.getPrototypeOf,Qm="constructor",Cf="prototype",Bv="configurable",Xm="enumerable",Tm="writable",ju="value",fl=t=>!!t&&!!t[Qr];function fi(t){var s;return t?z2(t)||kf(t)||!!t[Dw]||!!((s=t[Qm])!=null&&s[Dw])||Df(t)||Rf(t):!1}var Z4=Da[Cf][Qm].toString(),Rw=new WeakMap;function z2(t){if(!t||!My(t))return!1;const s=sd(t);if(s===null||s===Da[Cf])return!0;const n=Da.hasOwnProperty.call(s,Qm)&&s[Qm];if(n===Object)return!0;if(!Kc(n))return!1;let r=Rw.get(n);return r===void 0&&(r=Function.toString.call(n),Rw.set(n,r)),r===Z4}function Af(t,s,n=!0){Iu(t)===0?(n?Reflect.ownKeys(t):Da.keys(t)).forEach(a=>{s(a,t[a],t)}):t.forEach((r,a)=>s(a,r,t))}function Iu(t){const s=t[Qr];return s?s.type_:kf(t)?1:Df(t)?2:Rf(t)?3:0}var Ew=(t,s,n=Iu(t))=>n===2?t.has(s):Da[Cf].hasOwnProperty.call(t,s),$v=(t,s,n=Iu(t))=>n===2?t.get(s):t[s],Jm=(t,s,n,r=Iu(t))=>{r===2?t.set(s,n):r===3?t.add(n):t[s]=n};function Q4(t,s){return t===s?t!==0||1/t===1/s:t!==t&&s!==s}var kf=Array.isArray,Df=t=>t instanceof Map,Rf=t=>t instanceof Set,My=t=>typeof t=="object",Kc=t=>typeof t=="function",ig=t=>typeof t=="boolean";function X4(t){const s=+t;return Number.isInteger(s)&&String(s)===t}var cl=t=>t.copy_||t.base_,Fy=t=>t.modified_?t.copy_:t.base_;function qv(t,s){if(Df(t))return new Map(t);if(Rf(t))return new Set(t);if(kf(t))return Array[Cf].slice.call(t);const n=z2(t);if(s===!0||s==="class_only"&&!n){const r=Da.getOwnPropertyDescriptors(t);delete r[Qr];let a=Reflect.ownKeys(r);for(let i=0;i1&&Da.defineProperties(t,{set:am,add:am,clear:am,delete:am}),Da.freeze(t),s&&Af(t,(n,r)=>{By(r,!0)},!1)),t}function J4(){hi(2)}var am={[ju]:J4};function Ef(t){return t===null||!My(t)?!0:Da.isFrozen(t)}var ef="MapSet",zv="Patches",_w="ArrayMethods",U2={};function sc(t){const s=U2[t];return s||hi(0,t),s}var Tw=t=>!!U2[t],Nu,V2=()=>Nu,eP=(t,s)=>({drafts_:[],parent_:t,immer_:s,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Tw(ef)?sc(ef):void 0,arrayMethodsPlugin_:Tw(_w)?sc(_w):void 0});function Pw(t,s){s&&(t.patchPlugin_=sc(zv),t.patches_=[],t.inversePatches_=[],t.patchListener_=s)}function Uv(t){Vv(t),t.drafts_.forEach(tP),t.drafts_=null}function Vv(t){t===Nu&&(Nu=t.parent_)}var Ow=t=>Nu=eP(Nu,t);function tP(t){const s=t[Qr];s.type_===0||s.type_===1?s.revoke_():s.revoked_=!0}function Lw(t,s){s.unfinalizedDrafts_=s.drafts_.length;const n=s.drafts_[0];if(t!==void 0&&t!==n){n[Qr].modified_&&(Uv(s),hi(4)),fi(t)&&(t=Iw(s,t));const{patchPlugin_:a}=s;a&&a.generateReplacementPatches_(n[Qr].base_,t,s)}else t=Iw(s,n);return sP(s,t,!0),Uv(s),s.patches_&&s.patchListener_(s.patches_,s.inversePatches_),t!==q2?t:void 0}function Iw(t,s){if(Ef(s))return s;const n=s[Qr];if(!n)return tf(s,t.handledSet_,t);if(!_f(n,t))return s;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:r}=n;if(r)for(;r.length>0;)r.pop()(t);G2(n,t)}return n.copy_}function sP(t,s,n=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&By(s,n)}function H2(t){t.finalized_=!0,t.scope_.unfinalizedDrafts_--}var _f=(t,s)=>t.scope_===s,nP=[];function W2(t,s,n,r){const a=cl(t),i=t.type_;if(r!==void 0&&$v(a,r,i)===s){Jm(a,r,n,i);return}if(!t.draftLocations_){const d=t.draftLocations_=new Map;Af(a,(m,f)=>{if(fl(f)){const p=d.get(f)||[];p.push(m),d.set(f,p)}})}const o=t.draftLocations_.get(s)??nP;for(const d of o)Jm(a,d,n,i)}function rP(t,s,n){t.callbacks_.push(function(a){var d;const i=s;if(!i||!_f(i,a))return;(d=a.mapSetPlugin_)==null||d.fixSetContents(i);const o=Fy(i);W2(t,i.draft_??i,o,n),G2(i,a)})}function G2(t,s){var r;if(t.modified_&&!t.finalized_&&(t.type_===3||t.type_===1&&t.allIndicesReassigned_||(((r=t.assigned_)==null?void 0:r.size)??0)>0)){const{patchPlugin_:a}=s;if(a){const i=a.getPath(t);i&&a.generatePatches_(t,i,s)}H2(t)}}function aP(t,s,n){const{scope_:r}=t;if(fl(n)){const a=n[Qr];_f(a,r)&&a.callbacks_.push(function(){Pm(t);const o=Fy(a);W2(t,n,o,s)})}else fi(n)&&t.callbacks_.push(function(){const i=cl(t);t.type_===3?i.has(n)&&tf(n,r.handledSet_,r):$v(i,s,t.type_)===n&&r.drafts_.length>1&&(t.assigned_.get(s)??!1)===!0&&t.copy_&&tf($v(t.copy_,s,t.type_),r.handledSet_,r)})}function tf(t,s,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||fl(t)||s.has(t)||!fi(t)||Ef(t)||(s.add(t),Af(t,(r,a)=>{if(fl(a)){const i=a[Qr];if(_f(i,n)){const o=Fy(i);Jm(t,r,o,t.type_),H2(i)}}else fi(a)&&tf(a,s,n)})),t}function iP(t,s){const n=kf(t),r={type_:n?1:0,scope_:s?s.scope_:V2(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:s,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let a=r,i=sf;n&&(a=[r],i=wu);const{revoke:o,proxy:d}=Proxy.revocable(a,i);return r.draft_=d,r.revoke_=o,[d,r]}var sf={get(t,s){if(s===Qr)return t;let n=t.scope_.arrayMethodsPlugin_;const r=t.type_===1&&typeof s=="string";if(r&&n!=null&&n.isArrayOperationMethod(s))return n.createMethodInterceptor(t,s);const a=cl(t);if(!Ew(a,s,t.type_))return lP(t,a,s);const i=a[s];if(t.finalized_||!fi(i)||r&&t.operationMethod&&(n!=null&&n.isMutatingArrayMethod(t.operationMethod))&&X4(s))return i;if(i===lg(t.base_,s)){Pm(t);const o=t.type_===1?+s:s,d=Wv(t.scope_,i,t,o);return t.copy_[o]=d}return i},has(t,s){return s in cl(t)},ownKeys(t){return Reflect.ownKeys(cl(t))},set(t,s,n){const r=K2(cl(t),s);if(r!=null&&r.set)return r.set.call(t.draft_,n),!0;if(!t.modified_){const a=lg(cl(t),s),i=a==null?void 0:a[Qr];if(i&&i.base_===n)return t.copy_[s]=n,t.assigned_.set(s,!1),!0;if(Q4(n,a)&&(n!==void 0||Ew(t.base_,s,t.type_)))return!0;Pm(t),Hv(t)}return t.copy_[s]===n&&(n!==void 0||s in t.copy_)||Number.isNaN(n)&&Number.isNaN(t.copy_[s])||(t.copy_[s]=n,t.assigned_.set(s,!0),aP(t,s,n)),!0},deleteProperty(t,s){return Pm(t),lg(t.base_,s)!==void 0||s in t.base_?(t.assigned_.set(s,!1),Hv(t)):t.assigned_.delete(s),t.copy_&&delete t.copy_[s],!0},getOwnPropertyDescriptor(t,s){const n=cl(t),r=Reflect.getOwnPropertyDescriptor(n,s);return r&&{[Tm]:!0,[Bv]:t.type_!==1||s!=="length",[Xm]:r[Xm],[ju]:n[s]}},defineProperty(){hi(11)},getPrototypeOf(t){return sd(t.base_)},setPrototypeOf(){hi(12)}},wu={};for(let t in sf){let s=sf[t];wu[t]=function(){const n=arguments;return n[0]=n[0][0],s.apply(this,n)}}wu.deleteProperty=function(t,s){return wu.set.call(this,t,s,void 0)};wu.set=function(t,s,n){return sf.set.call(this,t[0],s,n,t[0])};function lg(t,s){const n=t[Qr];return(n?cl(n):t)[s]}function lP(t,s,n){var a;const r=K2(s,n);return r?ju in r?r[ju]:(a=r.get)==null?void 0:a.call(t.draft_):void 0}function K2(t,s){if(!(s in t))return;let n=sd(t);for(;n;){const r=Object.getOwnPropertyDescriptor(n,s);if(r)return r;n=sd(n)}}function Hv(t){t.modified_||(t.modified_=!0,t.parent_&&Hv(t.parent_))}function Pm(t){t.copy_||(t.assigned_=new Map,t.copy_=qv(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var oP=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(s,n,r)=>{if(Kc(s)&&!Kc(n)){const i=n;n=s;const o=this;return function(m=i,...f){return o.produce(m,p=>n.call(this,p,...f))}}Kc(n)||hi(6),r!==void 0&&!Kc(r)&&hi(7);let a;if(fi(s)){const i=Ow(this),o=Wv(i,s,void 0);let d=!0;try{a=n(o),d=!1}finally{d?Uv(i):Vv(i)}return Pw(i,r),Lw(a,i)}else if(!s||!My(s)){if(a=n(s),a===void 0&&(a=s),a===q2&&(a=void 0),this.autoFreeze_&&By(a,!0),r){const i=[],o=[];sc(zv).generateReplacementPatches_(s,a,{patches_:i,inversePatches_:o}),r(i,o)}return a}else hi(1,s)},this.produceWithPatches=(s,n)=>{if(Kc(s))return(o,...d)=>this.produceWithPatches(o,m=>s(m,...d));let r,a;return[this.produce(s,n,(o,d)=>{r=o,a=d}),r,a]},ig(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),ig(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),ig(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){fi(t)||hi(8),fl(t)&&(t=cP(t));const s=Ow(this),n=Wv(s,t,void 0);return n[Qr].isManual_=!0,Vv(s),n}finishDraft(t,s){const n=t&&t[Qr];(!n||!n.isManual_)&&hi(9);const{scope_:r}=n;return Pw(r,s),Lw(void 0,r)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,s){let n;for(n=s.length-1;n>=0;n--){const a=s[n];if(a.path.length===0&&a.op==="replace"){t=a.value;break}}n>-1&&(s=s.slice(n+1));const r=sc(zv).applyPatches_;return fl(t)?r(t,s):this.produce(t,a=>r(a,s))}};function Wv(t,s,n,r){const[a,i]=Df(s)?sc(ef).proxyMap_(s,n):Rf(s)?sc(ef).proxySet_(s,n):iP(s,n);return((n==null?void 0:n.scope_)??V2()).drafts_.push(a),i.callbacks_=(n==null?void 0:n.callbacks_)??[],i.key_=r,n&&r!==void 0?rP(n,i,r):i.callbacks_.push(function(m){var p;(p=m.mapSetPlugin_)==null||p.fixSetContents(i);const{patchPlugin_:f}=m;i.modified_&&f&&f.generatePatches_(i,[],m)}),a}function cP(t){return fl(t)||hi(10,t),Y2(t)}function Y2(t){if(!fi(t)||Ef(t))return t;const s=t[Qr];let n,r=!0;if(s){if(!s.modified_)return s.base_;s.finalized_=!0,n=qv(t,s.scope_.immer_.useStrictShallowCopy_),r=s.scope_.immer_.shouldUseStrictIteration()}else n=qv(t,!0);return Af(n,(a,i)=>{Jm(n,a,Y2(i))},r),s&&(s.finalized_=!1),n}var dP=new oP,Z2=dP.produce;function Q2(t){return({dispatch:n,getState:r})=>a=>i=>typeof i=="function"?i(n,r,t):a(i)}var uP=Q2(),hP=Q2,mP=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Zm:Zm.apply(null,arguments)},fP=t=>t&&typeof t.match=="function";function vu(t,s){function n(...r){if(s){let a=s(...r);if(!a)throw new Error(ul(0));return{type:t,payload:a.payload,..."meta"in a&&{meta:a.meta},..."error"in a&&{error:a.error}}}return{type:t,payload:r[0]}}return n.toString=()=>`${t}`,n.type=t,n.match=r=>Y4(r)&&r.type===t,n}var X2=class uu extends Array{constructor(...s){super(...s),Object.setPrototypeOf(this,uu.prototype)}static get[Symbol.species](){return uu}concat(...s){return super.concat.apply(this,s)}prepend(...s){return s.length===1&&Array.isArray(s[0])?new uu(...s[0].concat(this)):new uu(...s.concat(this))}};function Mw(t){return fi(t)?Z2(t,()=>{}):t}function im(t,s,n){return t.has(s)?t.get(s):t.set(s,n(s)).get(s)}function pP(t){return typeof t=="boolean"}var xP=()=>function(s){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:a=!0,actionCreatorCheck:i=!0}=s??{};let o=new X2;return n&&(pP(n)?o.push(uP):o.push(hP(n.extraArgument))),o},gP="RTK_autoBatch",Fw=t=>s=>{setTimeout(s,t)},vP=(t={type:"raf"})=>s=>(...n)=>{const r=s(...n);let a=!0,i=!1,o=!1;const d=new Set,m=t.type==="tick"?queueMicrotask:t.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Fw(10):t.type==="callback"?t.queueNotification:Fw(t.timeout),f=()=>{o=!1,i&&(i=!1,d.forEach(p=>p()))};return Object.assign({},r,{subscribe(p){const h=()=>a&&p(),x=r.subscribe(h);return d.add(p),()=>{x(),d.delete(p)}},dispatch(p){var h;try{return a=!((h=p==null?void 0:p.meta)!=null&&h[gP]),i=!a,i&&(o||(o=!0,m(f))),r.dispatch(p)}finally{a=!0}}})},yP=t=>function(n){const{autoBatch:r=!0}=n??{};let a=new X2(t);return r&&a.push(vP(typeof r=="object"?r:void 0)),a};function bP(t){const s=xP(),{reducer:n=void 0,middleware:r,devTools:a=!0,preloadedState:i=void 0,enhancers:o=void 0}=t||{};let d;if(typeof n=="function")d=n;else if(Iy(n))d=G4(n);else throw new Error(ul(1));let m;typeof r=="function"?m=r(s):m=s();let f=Zm;a&&(f=mP({trace:!1,...typeof a=="object"&&a}));const p=K4(...m),h=yP(p);let x=typeof o=="function"?o(h):h();const u=f(...x);return $2(d,i,u)}function J2(t){const s={},n=[];let r;const a={addCase(i,o){const d=typeof i=="string"?i:i.type;if(!d)throw new Error(ul(28));if(d in s)throw new Error(ul(29));return s[d]=o,a},addAsyncThunk(i,o){return o.pending&&(s[i.pending.type]=o.pending),o.rejected&&(s[i.rejected.type]=o.rejected),o.fulfilled&&(s[i.fulfilled.type]=o.fulfilled),o.settled&&n.push({matcher:i.settled,reducer:o.settled}),a},addMatcher(i,o){return n.push({matcher:i,reducer:o}),a},addDefaultCase(i){return r=i,a}};return t(a),[s,n,r]}function jP(t){return typeof t=="function"}function NP(t,s){let[n,r,a]=J2(s),i;if(jP(t))i=()=>Mw(t());else{const d=Mw(t);i=()=>d}function o(d=i(),m){let f=[n[m.type],...r.filter(({matcher:p})=>p(m)).map(({reducer:p})=>p)];return f.filter(p=>!!p).length===0&&(f=[a]),f.reduce((p,h)=>{if(h)if(fl(p)){const u=h(p,m);return u===void 0?p:u}else{if(fi(p))return Z2(p,x=>h(x,m));{const x=h(p,m);if(x===void 0){if(p===null)return p;throw Error("A case reducer on a non-draftable value must not return undefined")}return x}}return p},d)}return o.getInitialState=i,o}var wP=(t,s)=>fP(t)?t.match(s):t(s);function SP(...t){return s=>t.some(n=>wP(n,s))}var CP="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",AP=(t=21)=>{let s="",n=t;for(;n--;)s+=CP[Math.random()*64|0];return s},kP=["name","message","stack","code"],og=class{constructor(t,s){Yx(this,"_type");this.payload=t,this.meta=s}},Bw=class{constructor(t,s){Yx(this,"_type");this.payload=t,this.meta=s}},DP=t=>{if(typeof t=="object"&&t!==null){const s={};for(const n of kP)typeof t[n]=="string"&&(s[n]=t[n]);return s}return{message:String(t)}},$w="External signal was aborted",RP=(()=>{function t(s,n,r){const a=vu(s+"/fulfilled",(m,f,p,h)=>({payload:m,meta:{...h||{},arg:p,requestId:f,requestStatus:"fulfilled"}})),i=vu(s+"/pending",(m,f,p)=>({payload:void 0,meta:{...p||{},arg:f,requestId:m,requestStatus:"pending"}})),o=vu(s+"/rejected",(m,f,p,h,x)=>({payload:h,error:(r&&r.serializeError||DP)(m||"Rejected"),meta:{...x||{},arg:p,requestId:f,rejectedWithValue:!!h,requestStatus:"rejected",aborted:(m==null?void 0:m.name)==="AbortError",condition:(m==null?void 0:m.name)==="ConditionError"}}));function d(m,{signal:f}={}){return(p,h,x)=>{const u=r!=null&&r.idGenerator?r.idGenerator(m):AP(),N=new AbortController;let v,w;function j(C){w=C,N.abort()}f&&(f.aborted?j($w):f.addEventListener("abort",()=>j($w),{once:!0}));const b=(async function(){var R,_;let C;try{let A=(R=r==null?void 0:r.condition)==null?void 0:R.call(r,m,{getState:h,extra:x});if(_P(A)&&(A=await A),A===!1||N.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const E=new Promise((q,O)=>{v=()=>{O({name:"AbortError",message:w||"Aborted"})},N.signal.addEventListener("abort",v,{once:!0})});p(i(u,m,(_=r==null?void 0:r.getPendingMeta)==null?void 0:_.call(r,{requestId:u,arg:m},{getState:h,extra:x}))),C=await Promise.race([E,Promise.resolve(n(m,{dispatch:p,getState:h,extra:x,requestId:u,signal:N.signal,abort:j,rejectWithValue:(q,O)=>new og(q,O),fulfillWithValue:(q,O)=>new Bw(q,O)})).then(q=>{if(q instanceof og)throw q;return q instanceof Bw?a(q.payload,u,m,q.meta):a(q,u,m)})])}catch(A){C=A instanceof og?o(null,u,m,A.payload,A.meta):o(A,u,m)}finally{v&&N.signal.removeEventListener("abort",v)}return r&&!r.dispatchConditionRejection&&o.match(C)&&C.meta.condition||p(C),C})();return Object.assign(b,{abort:j,requestId:u,arg:m,unwrap(){return b.then(EP)}})}}return Object.assign(d,{pending:i,rejected:o,fulfilled:a,settled:SP(o,a),typePrefix:s})}return t.withTypes=()=>t,t})();function EP(t){if(t.meta&&t.meta.rejectedWithValue)throw t.payload;if(t.error)throw t.error;return t.payload}function _P(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}var TP=Symbol.for("rtk-slice-createasyncthunk");function PP(t,s){return`${t}/${s}`}function OP({creators:t}={}){var n;const s=(n=t==null?void 0:t.asyncThunk)==null?void 0:n[TP];return function(a){const{name:i,reducerPath:o=i}=a;if(!i)throw new Error(ul(11));const d=(typeof a.reducers=="function"?a.reducers(IP()):a.reducers)||{},m=Object.keys(d),f={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},p={addCase(S,R){const _=typeof S=="string"?S:S.type;if(!_)throw new Error(ul(12));if(_ in f.sliceCaseReducersByType)throw new Error(ul(13));return f.sliceCaseReducersByType[_]=R,p},addMatcher(S,R){return f.sliceMatchers.push({matcher:S,reducer:R}),p},exposeAction(S,R){return f.actionCreators[S]=R,p},exposeCaseReducer(S,R){return f.sliceCaseReducersByName[S]=R,p}};m.forEach(S=>{const R=d[S],_={reducerName:S,type:PP(i,S),createNotation:typeof a.reducers=="function"};FP(R)?$P(_,R,p,s):MP(_,R,p)});function h(){const[S={},R=[],_=void 0]=typeof a.extraReducers=="function"?J2(a.extraReducers):[a.extraReducers],A={...S,...f.sliceCaseReducersByType};return NP(a.initialState,E=>{for(let q in A)E.addCase(q,A[q]);for(let q of f.sliceMatchers)E.addMatcher(q.matcher,q.reducer);for(let q of R)E.addMatcher(q.matcher,q.reducer);_&&E.addDefaultCase(_)})}const x=S=>S,u=new Map,N=new WeakMap;let v;function w(S,R){return v||(v=h()),v(S,R)}function j(){return v||(v=h()),v.getInitialState()}function b(S,R=!1){function _(E){let q=E[S];return typeof q>"u"&&R&&(q=im(N,_,j)),q}function A(E=x){const q=im(u,R,()=>new WeakMap);return im(q,E,()=>{const O={};for(const[D,P]of Object.entries(a.selectors??{}))O[D]=LP(P,E,()=>im(N,E,j),R);return O})}return{reducerPath:S,getSelectors:A,get selectors(){return A(_)},selectSlice:_}}const C={name:i,reducer:w,actions:f.actionCreators,caseReducers:f.sliceCaseReducersByName,getInitialState:j,...b(o),injectInto(S,{reducerPath:R,..._}={}){const A=R??o;return S.inject({reducerPath:A,reducer:w},_),{...C,...b(A,!0)}}};return C}}function LP(t,s,n,r){function a(i,...o){let d=s(i);return typeof d>"u"&&r&&(d=n()),t(d,...o)}return a.unwrapped=t,a}var eA=OP();function IP(){function t(s,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:s,...n}}return t.withTypes=()=>t,{reducer(s){return Object.assign({[s.name](...n){return s(...n)}}[s.name],{_reducerDefinitionType:"reducer"})},preparedReducer(s,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:s,reducer:n}},asyncThunk:t}}function MP({type:t,reducerName:s,createNotation:n},r,a){let i,o;if("reducer"in r){if(n&&!BP(r))throw new Error(ul(17));i=r.reducer,o=r.prepare}else i=r;a.addCase(t,i).exposeCaseReducer(s,i).exposeAction(s,o?vu(t,o):vu(t))}function FP(t){return t._reducerDefinitionType==="asyncThunk"}function BP(t){return t._reducerDefinitionType==="reducerWithPrepare"}function $P({type:t,reducerName:s},n,r,a){if(!a)throw new Error(ul(18));const{payloadCreator:i,fulfilled:o,pending:d,rejected:m,settled:f,options:p}=n,h=a(t,i,p);r.exposeAction(s,h),o&&r.addCase(h.fulfilled,o),d&&r.addCase(h.pending,d),m&&r.addCase(h.rejected,m),f&&r.addMatcher(h.settled,f),r.exposeCaseReducer(s,{fulfilled:o||lm,pending:d||lm,rejected:m||lm,settled:f||lm})}function lm(){}function ul(t){return`Minified Redux Toolkit error #${t}; visit https://redux-toolkit.js.org/Errors?code=${t} for the full message or use the non-minified dev environment for full errors. `}var wr={};/*! Axios v1.13.6 Copyright (c) 2026 Matt Zabriskie and contributors */var cg,qw;function qP(){if(qw)return cg;qw=1;function t(ne,re){return function(){return ne.apply(re,arguments)}}const{toString:s}=Object.prototype,{getPrototypeOf:n}=Object,{iterator:r,toStringTag:a}=Symbol,i=(ne=>re=>{const me=s.call(re);return ne[me]||(ne[me]=me.slice(8,-1).toLowerCase())})(Object.create(null)),o=ne=>(ne=ne.toLowerCase(),re=>i(re)===ne),d=ne=>re=>typeof re===ne,{isArray:m}=Array,f=d("undefined");function p(ne){return ne!==null&&!f(ne)&&ne.constructor!==null&&!f(ne.constructor)&&N(ne.constructor.isBuffer)&&ne.constructor.isBuffer(ne)}const h=o("ArrayBuffer");function x(ne){let re;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?re=ArrayBuffer.isView(ne):re=ne&&ne.buffer&&h(ne.buffer),re}const u=d("string"),N=d("function"),v=d("number"),w=ne=>ne!==null&&typeof ne=="object",j=ne=>ne===!0||ne===!1,b=ne=>{if(i(ne)!=="object")return!1;const re=n(ne);return(re===null||re===Object.prototype||Object.getPrototypeOf(re)===null)&&!(a in ne)&&!(r in ne)},C=ne=>{if(!w(ne)||p(ne))return!1;try{return Object.keys(ne).length===0&&Object.getPrototypeOf(ne)===Object.prototype}catch{return!1}},S=o("Date"),R=o("File"),_=ne=>!!(ne&&typeof ne.uri<"u"),A=ne=>ne&&typeof ne.getParts<"u",E=o("Blob"),q=o("FileList"),O=ne=>w(ne)&&N(ne.pipe);function D(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof Wo<"u"?Wo:{}}const P=D(),L=typeof P.FormData<"u"?P.FormData:void 0,$=ne=>{let re;return ne&&(L&&ne instanceof L||N(ne.append)&&((re=i(ne))==="formdata"||re==="object"&&N(ne.toString)&&ne.toString()==="[object FormData]"))},Y=o("URLSearchParams"),[Z,W,U,M]=["ReadableStream","Request","Response","Headers"].map(o),z=ne=>ne.trim?ne.trim():ne.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function T(ne,re,{allOwnKeys:me=!1}={}){if(ne===null||typeof ne>"u")return;let pe,Se;if(typeof ne!="object"&&(ne=[ne]),m(ne))for(pe=0,Se=ne.length;pe0;)if(Se=me[pe],re===Se.toLowerCase())return Se;return null}const B=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:Wo,G=ne=>!f(ne)&&ne!==B;function K(){const{caseless:ne,skipUndefined:re}=G(this)&&this||{},me={},pe=(Se,ze)=>{if(ze==="__proto__"||ze==="constructor"||ze==="prototype")return;const Ue=ne&&I(me,ze)||ze;b(me[Ue])&&b(Se)?me[Ue]=K(me[Ue],Se):b(Se)?me[Ue]=K({},Se):m(Se)?me[Ue]=Se.slice():(!re||!f(Se))&&(me[Ue]=Se)};for(let Se=0,ze=arguments.length;Se(T(re,(Se,ze)=>{me&&N(Se)?Object.defineProperty(ne,ze,{value:t(Se,me),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(ne,ze,{value:Se,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:pe}),ne),X=ne=>(ne.charCodeAt(0)===65279&&(ne=ne.slice(1)),ne),J=(ne,re,me,pe)=>{ne.prototype=Object.create(re.prototype,pe),Object.defineProperty(ne.prototype,"constructor",{value:ne,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(ne,"super",{value:re.prototype}),me&&Object.assign(ne.prototype,me)},ae=(ne,re,me,pe)=>{let Se,ze,Ue;const ot={};if(re=re||{},ne==null)return re;do{for(Se=Object.getOwnPropertyNames(ne),ze=Se.length;ze-- >0;)Ue=Se[ze],(!pe||pe(Ue,ne,re))&&!ot[Ue]&&(re[Ue]=ne[Ue],ot[Ue]=!0);ne=me!==!1&&n(ne)}while(ne&&(!me||me(ne,re))&&ne!==Object.prototype);return re},le=(ne,re,me)=>{ne=String(ne),(me===void 0||me>ne.length)&&(me=ne.length),me-=re.length;const pe=ne.indexOf(re,me);return pe!==-1&&pe===me},xe=ne=>{if(!ne)return null;if(m(ne))return ne;let re=ne.length;if(!v(re))return null;const me=new Array(re);for(;re-- >0;)me[re]=ne[re];return me},ce=(ne=>re=>ne&&re instanceof ne)(typeof Uint8Array<"u"&&n(Uint8Array)),ve=(ne,re)=>{const pe=(ne&&ne[r]).call(ne);let Se;for(;(Se=pe.next())&&!Se.done;){const ze=Se.value;re.call(ne,ze[0],ze[1])}},Pe=(ne,re)=>{let me;const pe=[];for(;(me=ne.exec(re))!==null;)pe.push(me);return pe},et=o("HTMLFormElement"),kt=ne=>ne.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(me,pe,Se){return pe.toUpperCase()+Se}),vt=(({hasOwnProperty:ne})=>(re,me)=>ne.call(re,me))(Object.prototype),ee=o("RegExp"),ge=(ne,re)=>{const me=Object.getOwnPropertyDescriptors(ne),pe={};T(me,(Se,ze)=>{let Ue;(Ue=re(Se,ze,ne))!==!1&&(pe[ze]=Ue||Se)}),Object.defineProperties(ne,pe)},ye=ne=>{ge(ne,(re,me)=>{if(N(ne)&&["arguments","caller","callee"].indexOf(me)!==-1)return!1;const pe=ne[me];if(N(pe)){if(re.enumerable=!1,"writable"in re){re.writable=!1;return}re.set||(re.set=()=>{throw Error("Can not rewrite read-only method '"+me+"'")})}})},Be=(ne,re)=>{const me={},pe=Se=>{Se.forEach(ze=>{me[ze]=!0})};return m(ne)?pe(ne):pe(String(ne).split(re)),me},$e=()=>{},dt=(ne,re)=>ne!=null&&Number.isFinite(ne=+ne)?ne:re;function st(ne){return!!(ne&&N(ne.append)&&ne[a]==="FormData"&&ne[r])}const xt=ne=>{const re=new Array(10),me=(pe,Se)=>{if(w(pe)){if(re.indexOf(pe)>=0)return;if(p(pe))return pe;if(!("toJSON"in pe)){re[Se]=pe;const ze=m(pe)?[]:{};return T(pe,(Ue,ot)=>{const ls=me(Ue,Se+1);!f(ls)&&(ze[ot]=ls)}),re[Se]=void 0,ze}}return pe};return me(ne,0)},Mt=o("AsyncFunction"),It=ne=>ne&&(w(ne)||N(ne))&&N(ne.then)&&N(ne.catch),he=((ne,re)=>ne?setImmediate:re?((me,pe)=>(B.addEventListener("message",({source:Se,data:ze})=>{Se===B&&ze===me&&pe.length&&pe.shift()()},!1),Se=>{pe.push(Se),B.postMessage(me,"*")}))(`axios@${Math.random()}`,[]):me=>setTimeout(me))(typeof setImmediate=="function",N(B.postMessage)),pt=typeof queueMicrotask<"u"?queueMicrotask.bind(B):typeof process<"u"&&process.nextTick||he;var _e={isArray:m,isArrayBuffer:h,isBuffer:p,isFormData:$,isArrayBufferView:x,isString:u,isNumber:v,isBoolean:j,isObject:w,isPlainObject:b,isEmptyObject:C,isReadableStream:Z,isRequest:W,isResponse:U,isHeaders:M,isUndefined:f,isDate:S,isFile:R,isReactNativeBlob:_,isReactNative:A,isBlob:E,isRegExp:ee,isFunction:N,isStream:O,isURLSearchParams:Y,isTypedArray:ce,isFileList:q,forEach:T,merge:K,extend:H,trim:z,stripBOM:X,inherits:J,toFlatObject:ae,kindOf:i,kindOfTest:o,endsWith:le,toArray:xe,forEachEntry:ve,matchAll:Pe,isHTMLForm:et,hasOwnProperty:vt,hasOwnProp:vt,reduceDescriptors:ge,freezeMethods:ye,toObjectSet:Be,toCamelCase:kt,noop:$e,toFiniteNumber:dt,findKey:I,global:B,isContextDefined:G,isSpecCompliantForm:st,toJSONObject:xt,isAsyncFn:Mt,isThenable:It,setImmediate:he,asap:pt,isIterable:ne=>ne!=null&&N(ne[r])};class Vt extends Error{static from(re,me,pe,Se,ze,Ue){const ot=new Vt(re.message,me||re.code,pe,Se,ze);return ot.cause=re,ot.name=re.name,re.status!=null&&ot.status==null&&(ot.status=re.status),Ue&&Object.assign(ot,Ue),ot}constructor(re,me,pe,Se,ze){super(re),Object.defineProperty(this,"message",{value:re,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,me&&(this.code=me),pe&&(this.config=pe),Se&&(this.request=Se),ze&&(this.response=ze,this.status=ze.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:_e.toJSONObject(this.config),code:this.code,status:this.status}}}Vt.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Vt.ERR_BAD_OPTION="ERR_BAD_OPTION",Vt.ECONNABORTED="ECONNABORTED",Vt.ETIMEDOUT="ETIMEDOUT",Vt.ERR_NETWORK="ERR_NETWORK",Vt.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Vt.ERR_DEPRECATED="ERR_DEPRECATED",Vt.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Vt.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Vt.ERR_CANCELED="ERR_CANCELED",Vt.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Vt.ERR_INVALID_URL="ERR_INVALID_URL";var Pt=Vt,_s=null;function Ys(ne){return _e.isPlainObject(ne)||_e.isArray(ne)}function Bs(ne){return _e.endsWith(ne,"[]")?ne.slice(0,-2):ne}function Ks(ne,re,me){return ne?ne.concat(re).map(function(Se,ze){return Se=Bs(Se),!me&&ze?"["+Se+"]":Se}).join(me?".":""):re}function Qs(ne){return _e.isArray(ne)&&!ne.some(Ys)}const Xs=_e.toFlatObject(_e,{},null,function(re){return/^is[A-Z]/.test(re)});function $s(ne,re,me){if(!_e.isObject(ne))throw new TypeError("target must be an object");re=re||new FormData,me=_e.toFlatObject(me,{metaTokens:!0,dots:!1,indexes:!1},!1,function(Ss,is){return!_e.isUndefined(is[Ss])});const pe=me.metaTokens,Se=me.visitor||Lt,ze=me.dots,Ue=me.indexes,ls=(me.Blob||typeof Blob<"u"&&Blob)&&_e.isSpecCompliantForm(re);if(!_e.isFunction(Se))throw new TypeError("visitor must be a function");function Gt(Bt){if(Bt===null)return"";if(_e.isDate(Bt))return Bt.toISOString();if(_e.isBoolean(Bt))return Bt.toString();if(!ls&&_e.isBlob(Bt))throw new Pt("Blob is not supported. Use a Buffer instead.");return _e.isArrayBuffer(Bt)||_e.isTypedArray(Bt)?ls&&typeof Blob=="function"?new Blob([Bt]):Buffer.from(Bt):Bt}function Lt(Bt,Ss,is){let Mn=Bt;if(_e.isReactNative(re)&&_e.isReactNativeBlob(Bt))return re.append(Ks(is,Ss,ze),Gt(Bt)),!1;if(Bt&&!is&&typeof Bt=="object"){if(_e.endsWith(Ss,"{}"))Ss=pe?Ss:Ss.slice(0,-2),Bt=JSON.stringify(Bt);else if(_e.isArray(Bt)&&Qs(Bt)||(_e.isFileList(Bt)||_e.endsWith(Ss,"[]"))&&(Mn=_e.toArray(Bt)))return Ss=Bs(Ss),Mn.forEach(function(Gn,gr){!(_e.isUndefined(Gn)||Gn===null)&&re.append(Ue===!0?Ks([Ss],gr,ze):Ue===null?Ss:Ss+"[]",Gt(Gn))}),!1}return Ys(Bt)?!0:(re.append(Ks(is,Ss,ze),Gt(Bt)),!1)}const ws=[],gn=Object.assign(Xs,{defaultVisitor:Lt,convertValue:Gt,isVisitable:Ys});function nr(Bt,Ss){if(!_e.isUndefined(Bt)){if(ws.indexOf(Bt)!==-1)throw Error("Circular reference detected in "+Ss.join("."));ws.push(Bt),_e.forEach(Bt,function(Mn,_r){(!(_e.isUndefined(Mn)||Mn===null)&&Se.call(re,Mn,_e.isString(_r)?_r.trim():_r,Ss,gn))===!0&&nr(Mn,Ss?Ss.concat(_r):[_r])}),ws.pop()}}if(!_e.isObject(ne))throw new TypeError("data must be an object");return nr(ne),re}function Q(ne){const re={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(ne).replace(/[!'()~]|%20|%00/g,function(pe){return re[pe]})}function oe(ne,re){this._pairs=[],ne&&$s(ne,this,re)}const we=oe.prototype;we.append=function(re,me){this._pairs.push([re,me])},we.toString=function(re){const me=re?function(pe){return re.call(this,pe,Q)}:Q;return this._pairs.map(function(Se){return me(Se[0])+"="+me(Se[1])},"").join("&")};function Oe(ne){return encodeURIComponent(ne).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ke(ne,re,me){if(!re)return ne;const pe=me&&me.encode||Oe,Se=_e.isFunction(me)?{serialize:me}:me,ze=Se&&Se.serialize;let Ue;if(ze?Ue=ze(re,Se):Ue=_e.isURLSearchParams(re)?re.toString():new oe(re,Se).toString(pe),Ue){const ot=ne.indexOf("#");ot!==-1&&(ne=ne.slice(0,ot)),ne+=(ne.indexOf("?")===-1?"?":"&")+Ue}return ne}class je{constructor(){this.handlers=[]}use(re,me,pe){return this.handlers.push({fulfilled:re,rejected:me,synchronous:pe?pe.synchronous:!1,runWhen:pe?pe.runWhen:null}),this.handlers.length-1}eject(re){this.handlers[re]&&(this.handlers[re]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(re){_e.forEach(this.handlers,function(pe){pe!==null&&re(pe)})}}var Ve=je,Ge={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},nt=typeof URLSearchParams<"u"?URLSearchParams:oe,Zt=typeof FormData<"u"?FormData:null,Jt=typeof Blob<"u"?Blob:null,lt={isBrowser:!0,classes:{URLSearchParams:nt,FormData:Zt,Blob:Jt},protocols:["http","https","file","blob","url","data"]};const mt=typeof window<"u"&&typeof document<"u",Ds=typeof navigator=="object"&&navigator||void 0,ss=mt&&(!Ds||["ReactNative","NativeScript","NS"].indexOf(Ds.product)<0),Ae=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",be=mt&&window.location.href||"http://localhost";var ut=Object.freeze({__proto__:null,hasBrowserEnv:mt,hasStandardBrowserWebWorkerEnv:Ae,hasStandardBrowserEnv:ss,navigator:Ds,origin:be}),He={...ut,...lt};function yt(ne,re){return $s(ne,new He.classes.URLSearchParams,{visitor:function(me,pe,Se,ze){return He.isNode&&_e.isBuffer(me)?(this.append(pe,me.toString("base64")),!1):ze.defaultVisitor.apply(this,arguments)},...re})}function ft(ne){return _e.matchAll(/\w+|\[(\w*)]/g,ne).map(re=>re[0]==="[]"?"":re[1]||re[0])}function es(ne){const re={},me=Object.keys(ne);let pe;const Se=me.length;let ze;for(pe=0;pe=me.length;return Ue=!Ue&&_e.isArray(Se)?Se.length:Ue,ls?(_e.hasOwnProp(Se,Ue)?Se[Ue]=[Se[Ue],pe]:Se[Ue]=pe,!ot):((!Se[Ue]||!_e.isObject(Se[Ue]))&&(Se[Ue]=[]),re(me,pe,Se[Ue],ze)&&_e.isArray(Se[Ue])&&(Se[Ue]=es(Se[Ue])),!ot)}if(_e.isFormData(ne)&&_e.isFunction(ne.entries)){const me={};return _e.forEachEntry(ne,(pe,Se)=>{re(ft(pe),Se,me,0)}),me}return null}function Cs(ne,re,me){if(_e.isString(ne))try{return(re||JSON.parse)(ne),_e.trim(ne)}catch(pe){if(pe.name!=="SyntaxError")throw pe}return(me||JSON.stringify)(ne)}const Us={transitional:Ge,adapter:["xhr","http","fetch"],transformRequest:[function(re,me){const pe=me.getContentType()||"",Se=pe.indexOf("application/json")>-1,ze=_e.isObject(re);if(ze&&_e.isHTMLForm(re)&&(re=new FormData(re)),_e.isFormData(re))return Se?JSON.stringify(ts(re)):re;if(_e.isArrayBuffer(re)||_e.isBuffer(re)||_e.isStream(re)||_e.isFile(re)||_e.isBlob(re)||_e.isReadableStream(re))return re;if(_e.isArrayBufferView(re))return re.buffer;if(_e.isURLSearchParams(re))return me.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),re.toString();let ot;if(ze){if(pe.indexOf("application/x-www-form-urlencoded")>-1)return yt(re,this.formSerializer).toString();if((ot=_e.isFileList(re))||pe.indexOf("multipart/form-data")>-1){const ls=this.env&&this.env.FormData;return $s(ot?{"files[]":re}:re,ls&&new ls,this.formSerializer)}}return ze||Se?(me.setContentType("application/json",!1),Cs(re)):re}],transformResponse:[function(re){const me=this.transitional||Us.transitional,pe=me&&me.forcedJSONParsing,Se=this.responseType==="json";if(_e.isResponse(re)||_e.isReadableStream(re))return re;if(re&&_e.isString(re)&&(pe&&!this.responseType||Se)){const Ue=!(me&&me.silentJSONParsing)&&Se;try{return JSON.parse(re,this.parseReviver)}catch(ot){if(Ue)throw ot.name==="SyntaxError"?Pt.from(ot,Pt.ERR_BAD_RESPONSE,this,null,this.response):ot}}return re}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:He.classes.FormData,Blob:He.classes.Blob},validateStatus:function(re){return re>=200&&re<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};_e.forEach(["delete","get","head","post","put","patch"],ne=>{Us.headers[ne]={}});var rn=Us;const Js=_e.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var an=ne=>{const re={};let me,pe,Se;return ne&&ne.split(` -`).forEach(function(Ue){Se=Ue.indexOf(":"),me=Ue.substring(0,Se).trim().toLowerCase(),pe=Ue.substring(Se+1).trim(),!(!me||re[me]&&Js[me])&&(me==="set-cookie"?re[me]?re[me].push(pe):re[me]=[pe]:re[me]=re[me]?re[me]+", "+pe:pe)}),re};const hn=Symbol("internals");function De(ne){return ne&&String(ne).trim().toLowerCase()}function bt(ne){return ne===!1||ne==null?ne:_e.isArray(ne)?ne.map(bt):String(ne)}function Te(ne){const re=Object.create(null),me=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let pe;for(;pe=me.exec(ne);)re[pe[1]]=pe[2];return re}const ct=ne=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(ne.trim());function tt(ne,re,me,pe,Se){if(_e.isFunction(pe))return pe.call(this,re,me);if(Se&&(re=me),!!_e.isString(re)){if(_e.isString(pe))return re.indexOf(pe)!==-1;if(_e.isRegExp(pe))return pe.test(re)}}function jt(ne){return ne.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(re,me,pe)=>me.toUpperCase()+pe)}function Ht(ne,re){const me=_e.toCamelCase(" "+re);["get","set","has"].forEach(pe=>{Object.defineProperty(ne,pe+me,{value:function(Se,ze,Ue){return this[pe].call(this,re,Se,ze,Ue)},configurable:!0})})}class zt{constructor(re){re&&this.set(re)}set(re,me,pe){const Se=this;function ze(ot,ls,Gt){const Lt=De(ls);if(!Lt)throw new Error("header name must be a non-empty string");const ws=_e.findKey(Se,Lt);(!ws||Se[ws]===void 0||Gt===!0||Gt===void 0&&Se[ws]!==!1)&&(Se[ws||ls]=bt(ot))}const Ue=(ot,ls)=>_e.forEach(ot,(Gt,Lt)=>ze(Gt,Lt,ls));if(_e.isPlainObject(re)||re instanceof this.constructor)Ue(re,me);else if(_e.isString(re)&&(re=re.trim())&&!ct(re))Ue(an(re),me);else if(_e.isObject(re)&&_e.isIterable(re)){let ot={},ls,Gt;for(const Lt of re){if(!_e.isArray(Lt))throw TypeError("Object iterator must return a key-value pair");ot[Gt=Lt[0]]=(ls=ot[Gt])?_e.isArray(ls)?[...ls,Lt[1]]:[ls,Lt[1]]:Lt[1]}Ue(ot,me)}else re!=null&&ze(me,re,pe);return this}get(re,me){if(re=De(re),re){const pe=_e.findKey(this,re);if(pe){const Se=this[pe];if(!me)return Se;if(me===!0)return Te(Se);if(_e.isFunction(me))return me.call(this,Se,pe);if(_e.isRegExp(me))return me.exec(Se);throw new TypeError("parser must be boolean|regexp|function")}}}has(re,me){if(re=De(re),re){const pe=_e.findKey(this,re);return!!(pe&&this[pe]!==void 0&&(!me||tt(this,this[pe],pe,me)))}return!1}delete(re,me){const pe=this;let Se=!1;function ze(Ue){if(Ue=De(Ue),Ue){const ot=_e.findKey(pe,Ue);ot&&(!me||tt(pe,pe[ot],ot,me))&&(delete pe[ot],Se=!0)}}return _e.isArray(re)?re.forEach(ze):ze(re),Se}clear(re){const me=Object.keys(this);let pe=me.length,Se=!1;for(;pe--;){const ze=me[pe];(!re||tt(this,this[ze],ze,re,!0))&&(delete this[ze],Se=!0)}return Se}normalize(re){const me=this,pe={};return _e.forEach(this,(Se,ze)=>{const Ue=_e.findKey(pe,ze);if(Ue){me[Ue]=bt(Se),delete me[ze];return}const ot=re?jt(ze):String(ze).trim();ot!==ze&&delete me[ze],me[ot]=bt(Se),pe[ot]=!0}),this}concat(...re){return this.constructor.concat(this,...re)}toJSON(re){const me=Object.create(null);return _e.forEach(this,(pe,Se)=>{pe!=null&&pe!==!1&&(me[Se]=re&&_e.isArray(pe)?pe.join(", "):pe)}),me}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([re,me])=>re+": "+me).join(` -`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(re){return re instanceof this?re:new this(re)}static concat(re,...me){const pe=new this(re);return me.forEach(Se=>pe.set(Se)),pe}static accessor(re){const pe=(this[hn]=this[hn]={accessors:{}}).accessors,Se=this.prototype;function ze(Ue){const ot=De(Ue);pe[ot]||(Ht(Se,Ue),pe[ot]=!0)}return _e.isArray(re)?re.forEach(ze):ze(re),this}}zt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),_e.reduceDescriptors(zt.prototype,({value:ne},re)=>{let me=re[0].toUpperCase()+re.slice(1);return{get:()=>ne,set(pe){this[me]=pe}}}),_e.freezeMethods(zt);var fs=zt;function qt(ne,re){const me=this||rn,pe=re||me,Se=fs.from(pe.headers);let ze=pe.data;return _e.forEach(ne,function(ot){ze=ot.call(me,ze,Se.normalize(),re?re.status:void 0)}),Se.normalize(),ze}function As(ne){return!!(ne&&ne.__CANCEL__)}class vs extends Pt{constructor(re,me,pe){super(re??"canceled",Pt.ERR_CANCELED,me,pe),this.name="CanceledError",this.__CANCEL__=!0}}var cs=vs;function mn(ne,re,me){const pe=me.config.validateStatus;!me.status||!pe||pe(me.status)?ne(me):re(new Pt("Request failed with status code "+me.status,[Pt.ERR_BAD_REQUEST,Pt.ERR_BAD_RESPONSE][Math.floor(me.status/100)-4],me.config,me.request,me))}function qs(ne){const re=/^([-+\w]{1,25})(:?\/\/|:)/.exec(ne);return re&&re[1]||""}function ln(ne,re){ne=ne||10;const me=new Array(ne),pe=new Array(ne);let Se=0,ze=0,Ue;return re=re!==void 0?re:1e3,function(ls){const Gt=Date.now(),Lt=pe[ze];Ue||(Ue=Gt),me[Se]=ls,pe[Se]=Gt;let ws=ze,gn=0;for(;ws!==Se;)gn+=me[ws++],ws=ws%ne;if(Se=(Se+1)%ne,Se===ze&&(ze=(ze+1)%ne),Gt-Ue{me=Lt,Se=null,ze&&(clearTimeout(ze),ze=null),ne(...Gt)};return[(...Gt)=>{const Lt=Date.now(),ws=Lt-me;ws>=pe?Ue(Gt,Lt):(Se=Gt,ze||(ze=setTimeout(()=>{ze=null,Ue(Se)},pe-ws)))},()=>Se&&Ue(Se)]}const on=(ne,re,me=3)=>{let pe=0;const Se=ln(50,250);return fn(ze=>{const Ue=ze.loaded,ot=ze.lengthComputable?ze.total:void 0,ls=Ue-pe,Gt=Se(ls),Lt=Ue<=ot;pe=Ue;const ws={loaded:Ue,total:ot,progress:ot?Ue/ot:void 0,bytes:ls,rate:Gt||void 0,estimated:Gt&&ot&&Lt?(ot-Ue)/Gt:void 0,event:ze,lengthComputable:ot!=null,[re?"download":"upload"]:!0};ne(ws)},me)},Ye=(ne,re)=>{const me=ne!=null;return[pe=>re[0]({lengthComputable:me,total:ne,loaded:pe}),re[1]]},Ot=ne=>(...re)=>_e.asap(()=>ne(...re));var St=He.hasStandardBrowserEnv?((ne,re)=>me=>(me=new URL(me,He.origin),ne.protocol===me.protocol&&ne.host===me.host&&(re||ne.port===me.port)))(new URL(He.origin),He.navigator&&/(msie|trident)/i.test(He.navigator.userAgent)):()=>!0,rt=He.hasStandardBrowserEnv?{write(ne,re,me,pe,Se,ze,Ue){if(typeof document>"u")return;const ot=[`${ne}=${encodeURIComponent(re)}`];_e.isNumber(me)&&ot.push(`expires=${new Date(me).toUTCString()}`),_e.isString(pe)&&ot.push(`path=${pe}`),_e.isString(Se)&&ot.push(`domain=${Se}`),ze===!0&&ot.push("secure"),_e.isString(Ue)&&ot.push(`SameSite=${Ue}`),document.cookie=ot.join("; ")},read(ne){if(typeof document>"u")return null;const re=document.cookie.match(new RegExp("(?:^|; )"+ne+"=([^;]*)"));return re?decodeURIComponent(re[1]):null},remove(ne){this.write(ne,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Ft(ne){return typeof ne!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(ne)}function jn(ne,re){return re?ne.replace(/\/?\/$/,"")+"/"+re.replace(/^\/+/,""):ne}function xn(ne,re,me){let pe=!Ft(re);return ne&&(pe||me==!1)?jn(ne,re):re}const qn=ne=>ne instanceof fs?{...ne}:ne;function En(ne,re){re=re||{};const me={};function pe(Gt,Lt,ws,gn){return _e.isPlainObject(Gt)&&_e.isPlainObject(Lt)?_e.merge.call({caseless:gn},Gt,Lt):_e.isPlainObject(Lt)?_e.merge({},Lt):_e.isArray(Lt)?Lt.slice():Lt}function Se(Gt,Lt,ws,gn){if(_e.isUndefined(Lt)){if(!_e.isUndefined(Gt))return pe(void 0,Gt,ws,gn)}else return pe(Gt,Lt,ws,gn)}function ze(Gt,Lt){if(!_e.isUndefined(Lt))return pe(void 0,Lt)}function Ue(Gt,Lt){if(_e.isUndefined(Lt)){if(!_e.isUndefined(Gt))return pe(void 0,Gt)}else return pe(void 0,Lt)}function ot(Gt,Lt,ws){if(ws in re)return pe(Gt,Lt);if(ws in ne)return pe(void 0,Gt)}const ls={url:ze,method:ze,data:ze,baseURL:Ue,transformRequest:Ue,transformResponse:Ue,paramsSerializer:Ue,timeout:Ue,timeoutMessage:Ue,withCredentials:Ue,withXSRFToken:Ue,adapter:Ue,responseType:Ue,xsrfCookieName:Ue,xsrfHeaderName:Ue,onUploadProgress:Ue,onDownloadProgress:Ue,decompress:Ue,maxContentLength:Ue,maxBodyLength:Ue,beforeRedirect:Ue,transport:Ue,httpAgent:Ue,httpsAgent:Ue,cancelToken:Ue,socketPath:Ue,responseEncoding:Ue,validateStatus:ot,headers:(Gt,Lt,ws)=>Se(qn(Gt),qn(Lt),ws,!0)};return _e.forEach(Object.keys({...ne,...re}),function(Lt){if(Lt==="__proto__"||Lt==="constructor"||Lt==="prototype")return;const ws=_e.hasOwnProp(ls,Lt)?ls[Lt]:Se,gn=ws(ne[Lt],re[Lt],Lt);_e.isUndefined(gn)&&ws!==ot||(me[Lt]=gn)}),me}var Hs=ne=>{const re=En({},ne);let{data:me,withXSRFToken:pe,xsrfHeaderName:Se,xsrfCookieName:ze,headers:Ue,auth:ot}=re;if(re.headers=Ue=fs.from(Ue),re.url=ke(xn(re.baseURL,re.url,re.allowAbsoluteUrls),ne.params,ne.paramsSerializer),ot&&Ue.set("Authorization","Basic "+btoa((ot.username||"")+":"+(ot.password?unescape(encodeURIComponent(ot.password)):""))),_e.isFormData(me)){if(He.hasStandardBrowserEnv||He.hasStandardBrowserWebWorkerEnv)Ue.setContentType(void 0);else if(_e.isFunction(me.getHeaders)){const ls=me.getHeaders(),Gt=["content-type","content-length"];Object.entries(ls).forEach(([Lt,ws])=>{Gt.includes(Lt.toLowerCase())&&Ue.set(Lt,ws)})}}if(He.hasStandardBrowserEnv&&(pe&&_e.isFunction(pe)&&(pe=pe(re)),pe||pe!==!1&&St(re.url))){const ls=Se&&ze&&rt.read(ze);ls&&Ue.set(Se,ls)}return re},Pa=typeof XMLHttpRequest<"u"&&function(ne){return new Promise(function(me,pe){const Se=Hs(ne);let ze=Se.data;const Ue=fs.from(Se.headers).normalize();let{responseType:ot,onUploadProgress:ls,onDownloadProgress:Gt}=Se,Lt,ws,gn,nr,Bt;function Ss(){nr&&nr(),Bt&&Bt(),Se.cancelToken&&Se.cancelToken.unsubscribe(Lt),Se.signal&&Se.signal.removeEventListener("abort",Lt)}let is=new XMLHttpRequest;is.open(Se.method.toUpperCase(),Se.url,!0),is.timeout=Se.timeout;function Mn(){if(!is)return;const Gn=fs.from("getAllResponseHeaders"in is&&is.getAllResponseHeaders()),Gr={data:!ot||ot==="text"||ot==="json"?is.responseText:is.response,status:is.status,statusText:is.statusText,headers:Gn,config:ne,request:is};mn(function(vr){me(vr),Ss()},function(vr){pe(vr),Ss()},Gr),is=null}"onloadend"in is?is.onloadend=Mn:is.onreadystatechange=function(){!is||is.readyState!==4||is.status===0&&!(is.responseURL&&is.responseURL.indexOf("file:")===0)||setTimeout(Mn)},is.onabort=function(){is&&(pe(new Pt("Request aborted",Pt.ECONNABORTED,ne,is)),is=null)},is.onerror=function(gr){const Gr=gr&&gr.message?gr.message:"Network Error",Qa=new Pt(Gr,Pt.ERR_NETWORK,ne,is);Qa.event=gr||null,pe(Qa),is=null},is.ontimeout=function(){let gr=Se.timeout?"timeout of "+Se.timeout+"ms exceeded":"timeout exceeded";const Gr=Se.transitional||Ge;Se.timeoutErrorMessage&&(gr=Se.timeoutErrorMessage),pe(new Pt(gr,Gr.clarifyTimeoutError?Pt.ETIMEDOUT:Pt.ECONNABORTED,ne,is)),is=null},ze===void 0&&Ue.setContentType(null),"setRequestHeader"in is&&_e.forEach(Ue.toJSON(),function(gr,Gr){is.setRequestHeader(Gr,gr)}),_e.isUndefined(Se.withCredentials)||(is.withCredentials=!!Se.withCredentials),ot&&ot!=="json"&&(is.responseType=Se.responseType),Gt&&([gn,Bt]=on(Gt,!0),is.addEventListener("progress",gn)),ls&&is.upload&&([ws,nr]=on(ls),is.upload.addEventListener("progress",ws),is.upload.addEventListener("loadend",nr)),(Se.cancelToken||Se.signal)&&(Lt=Gn=>{is&&(pe(!Gn||Gn.type?new cs(null,ne,is):Gn),is.abort(),is=null)},Se.cancelToken&&Se.cancelToken.subscribe(Lt),Se.signal&&(Se.signal.aborted?Lt():Se.signal.addEventListener("abort",Lt)));const _r=qs(Se.url);if(_r&&He.protocols.indexOf(_r)===-1){pe(new Pt("Unsupported protocol "+_r+":",Pt.ERR_BAD_REQUEST,ne));return}is.send(ze||null)})},nn=(ne,re)=>{const{length:me}=ne=ne?ne.filter(Boolean):[];if(re||me){let pe=new AbortController,Se;const ze=function(Gt){if(!Se){Se=!0,ot();const Lt=Gt instanceof Error?Gt:this.reason;pe.abort(Lt instanceof Pt?Lt:new cs(Lt instanceof Error?Lt.message:Lt))}};let Ue=re&&setTimeout(()=>{Ue=null,ze(new Pt(`timeout of ${re}ms exceeded`,Pt.ETIMEDOUT))},re);const ot=()=>{ne&&(Ue&&clearTimeout(Ue),Ue=null,ne.forEach(Gt=>{Gt.unsubscribe?Gt.unsubscribe(ze):Gt.removeEventListener("abort",ze)}),ne=null)};ne.forEach(Gt=>Gt.addEventListener("abort",ze));const{signal:ls}=pe;return ls.unsubscribe=()=>_e.asap(ot),ls}};const ta=function*(ne,re){let me=ne.byteLength;if(me{const Se=sa(ne,re);let ze=0,Ue,ot=ls=>{Ue||(Ue=!0,pe&&pe(ls))};return new ReadableStream({async pull(ls){try{const{done:Gt,value:Lt}=await Se.next();if(Gt){ot(),ls.close();return}let ws=Lt.byteLength;if(me){let gn=ze+=ws;me(gn)}ls.enqueue(new Uint8Array(Lt))}catch(Gt){throw ot(Gt),Gt}},cancel(ls){return ot(ls),Se.return()}},{highWaterMark:2})},Xn=64*1024,{isFunction:zn}=_e,Qt=(({Request:ne,Response:re})=>({Request:ne,Response:re}))(_e.global),{ReadableStream:Jn,TextEncoder:Rr}=_e.global,Wn=(ne,...re)=>{try{return!!ne(...re)}catch{return!1}},Er=ne=>{ne=_e.merge.call({skipUndefined:!0},Qt,ne);const{fetch:re,Request:me,Response:pe}=ne,Se=re?zn(re):typeof fetch=="function",ze=zn(me),Ue=zn(pe);if(!Se)return!1;const ot=Se&&zn(Jn),ls=Se&&(typeof Rr=="function"?(Bt=>Ss=>Bt.encode(Ss))(new Rr):async Bt=>new Uint8Array(await new me(Bt).arrayBuffer())),Gt=ze&&ot&&Wn(()=>{let Bt=!1;const Ss=new me(He.origin,{body:new Jn,method:"POST",get duplex(){return Bt=!0,"half"}}).headers.has("Content-Type");return Bt&&!Ss}),Lt=Ue&&ot&&Wn(()=>_e.isReadableStream(new pe("").body)),ws={stream:Lt&&(Bt=>Bt.body)};Se&&["text","arrayBuffer","blob","formData","stream"].forEach(Bt=>{!ws[Bt]&&(ws[Bt]=(Ss,is)=>{let Mn=Ss&&Ss[Bt];if(Mn)return Mn.call(Ss);throw new Pt(`Response type '${Bt}' is not supported`,Pt.ERR_NOT_SUPPORT,is)})});const gn=async Bt=>{if(Bt==null)return 0;if(_e.isBlob(Bt))return Bt.size;if(_e.isSpecCompliantForm(Bt))return(await new me(He.origin,{method:"POST",body:Bt}).arrayBuffer()).byteLength;if(_e.isArrayBufferView(Bt)||_e.isArrayBuffer(Bt))return Bt.byteLength;if(_e.isURLSearchParams(Bt)&&(Bt=Bt+""),_e.isString(Bt))return(await ls(Bt)).byteLength},nr=async(Bt,Ss)=>{const is=_e.toFiniteNumber(Bt.getContentLength());return is??gn(Ss)};return async Bt=>{let{url:Ss,method:is,data:Mn,signal:_r,cancelToken:Gn,timeout:gr,onDownloadProgress:Gr,onUploadProgress:Qa,responseType:vr,headers:wo,withCredentials:Cl="same-origin",fetchOptions:xc}=Hs(Bt),So=re||fetch;vr=vr?(vr+"").toLowerCase():"text";let Al=nn([_r,Gn&&Gn.toAbortSignal()],gr),Ki=null;const Xa=Al&&Al.unsubscribe&&(()=>{Al.unsubscribe()});let gc;try{if(Qa&&Gt&&is!=="get"&&is!=="head"&&(gc=await nr(wo,Mn))!==0){let Ia=new me(Ss,{method:"POST",body:Mn,duplex:"half"}),Ja;if(_e.isFormData(Mn)&&(Ja=Ia.headers.get("content-type"))&&wo.setContentType(Ja),Ia.body){const[Dl,Zi]=Ye(gc,on(Ot(Qa)));Mn=Ir(Ia.body,Xn,Dl,Zi)}}_e.isString(Cl)||(Cl=Cl?"include":"omit");const hr=ze&&"credentials"in me.prototype,vc={...xc,signal:Al,method:is.toUpperCase(),headers:wo.normalize().toJSON(),body:Mn,duplex:"half",credentials:hr?Cl:void 0};Ki=ze&&new me(Ss,vc);let La=await(ze?So(Ki,xc):So(Ss,vc));const kl=Lt&&(vr==="stream"||vr==="response");if(Lt&&(Gr||kl&&Xa)){const Ia={};["status","statusText","headers"].forEach(Co=>{Ia[Co]=La[Co]});const Ja=_e.toFiniteNumber(La.headers.get("content-length")),[Dl,Zi]=Gr&&Ye(Ja,on(Ot(Gr),!0))||[];La=new pe(Ir(La.body,Xn,Dl,()=>{Zi&&Zi(),Xa&&Xa()}),Ia)}vr=vr||"text";let Yi=await ws[_e.findKey(ws,vr)||"text"](La,Bt);return!kl&&Xa&&Xa(),await new Promise((Ia,Ja)=>{mn(Ia,Ja,{data:Yi,headers:fs.from(La.headers),status:La.status,statusText:La.statusText,config:Bt,request:Ki})})}catch(hr){throw Xa&&Xa(),hr&&hr.name==="TypeError"&&/Load failed|fetch/i.test(hr.message)?Object.assign(new Pt("Network Error",Pt.ERR_NETWORK,Bt,Ki,hr&&hr.response),{cause:hr.cause||hr}):Pt.from(hr,hr&&hr.code,Bt,Ki,hr&&hr.response)}}},_n=new Map,ur=ne=>{let re=ne&&ne.env||{};const{fetch:me,Request:pe,Response:Se}=re,ze=[pe,Se,me];let Ue=ze.length,ot=Ue,ls,Gt,Lt=_n;for(;ot--;)ls=ze[ot],Gt=Lt.get(ls),Gt===void 0&&Lt.set(ls,Gt=ot?new Map:Er(re)),Lt=Gt;return Gt};ur();const rs={http:_s,xhr:Pa,fetch:{get:ur}};_e.forEach(rs,(ne,re)=>{if(ne){try{Object.defineProperty(ne,"name",{value:re})}catch{}Object.defineProperty(ne,"adapterName",{value:re})}});const en=ne=>`- ${ne}`,va=ne=>_e.isFunction(ne)||ne===null||ne===!1;function wi(ne,re){ne=_e.isArray(ne)?ne:[ne];const{length:me}=ne;let pe,Se;const ze={};for(let Ue=0;Ue`adapter ${ls} `+(Gt===!1?"is not supported by the environment":"is not available in the build"));let ot=me?Ue.length>1?`since : -`+Ue.map(en).join(` -`):" "+en(Ue[0]):"as no adapter specified";throw new Pt("There is no suitable adapter to dispatch the request "+ot,"ERR_NOT_SUPPORT")}return Se}var Si={getAdapter:wi,adapters:rs};function Mr(ne){if(ne.cancelToken&&ne.cancelToken.throwIfRequested(),ne.signal&&ne.signal.aborted)throw new cs(null,ne)}function Hr(ne){return Mr(ne),ne.headers=fs.from(ne.headers),ne.data=qt.call(ne,ne.transformRequest),["post","put","patch"].indexOf(ne.method)!==-1&&ne.headers.setContentType("application/x-www-form-urlencoded",!1),Si.getAdapter(ne.adapter||rn.adapter,ne)(ne).then(function(pe){return Mr(ne),pe.data=qt.call(ne,ne.transformResponse,pe),pe.headers=fs.from(pe.headers),pe},function(pe){return As(pe)||(Mr(ne),pe&&pe.response&&(pe.response.data=qt.call(ne,ne.transformResponse,pe.response),pe.response.headers=fs.from(pe.response.headers))),Promise.reject(pe)})}const sr="1.13.6",ya={};["object","boolean","number","function","string","symbol"].forEach((ne,re)=>{ya[ne]=function(pe){return typeof pe===ne||"a"+(re<1?"n ":" ")+ne}});const Hi={};ya.transitional=function(re,me,pe){function Se(ze,Ue){return"[Axios v"+sr+"] Transitional option '"+ze+"'"+Ue+(pe?". "+pe:"")}return(ze,Ue,ot)=>{if(re===!1)throw new Pt(Se(Ue," has been removed"+(me?" in "+me:"")),Pt.ERR_DEPRECATED);return me&&!Hi[Ue]&&(Hi[Ue]=!0,console.warn(Se(Ue," has been deprecated since v"+me+" and will be removed in the near future"))),re?re(ze,Ue,ot):!0}},ya.spelling=function(re){return(me,pe)=>(console.warn(`${pe} is likely a misspelling of ${re}`),!0)};function bo(ne,re,me){if(typeof ne!="object")throw new Pt("options must be an object",Pt.ERR_BAD_OPTION_VALUE);const pe=Object.keys(ne);let Se=pe.length;for(;Se-- >0;){const ze=pe[Se],Ue=re[ze];if(Ue){const ot=ne[ze],ls=ot===void 0||Ue(ot,ze,ne);if(ls!==!0)throw new Pt("option "+ze+" must be "+ls,Pt.ERR_BAD_OPTION_VALUE);continue}if(me!==!0)throw new Pt("Unknown option "+ze,Pt.ERR_BAD_OPTION)}}var Oa={assertOptions:bo,validators:ya};const Cn=Oa.validators;class ba{constructor(re){this.defaults=re||{},this.interceptors={request:new Ve,response:new Ve}}async request(re,me){try{return await this._request(re,me)}catch(pe){if(pe instanceof Error){let Se={};Error.captureStackTrace?Error.captureStackTrace(Se):Se=new Error;const ze=Se.stack?Se.stack.replace(/^.+\n/,""):"";try{pe.stack?ze&&!String(pe.stack).endsWith(ze.replace(/^.+\n.+\n/,""))&&(pe.stack+=` -`+ze):pe.stack=ze}catch{}}throw pe}}_request(re,me){typeof re=="string"?(me=me||{},me.url=re):me=re||{},me=En(this.defaults,me);const{transitional:pe,paramsSerializer:Se,headers:ze}=me;pe!==void 0&&Oa.assertOptions(pe,{silentJSONParsing:Cn.transitional(Cn.boolean),forcedJSONParsing:Cn.transitional(Cn.boolean),clarifyTimeoutError:Cn.transitional(Cn.boolean),legacyInterceptorReqResOrdering:Cn.transitional(Cn.boolean)},!1),Se!=null&&(_e.isFunction(Se)?me.paramsSerializer={serialize:Se}:Oa.assertOptions(Se,{encode:Cn.function,serialize:Cn.function},!0)),me.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?me.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:me.allowAbsoluteUrls=!0),Oa.assertOptions(me,{baseUrl:Cn.spelling("baseURL"),withXsrfToken:Cn.spelling("withXSRFToken")},!0),me.method=(me.method||this.defaults.method||"get").toLowerCase();let Ue=ze&&_e.merge(ze.common,ze[me.method]);ze&&_e.forEach(["delete","get","head","post","put","patch","common"],Bt=>{delete ze[Bt]}),me.headers=fs.concat(Ue,ze);const ot=[];let ls=!0;this.interceptors.request.forEach(function(Ss){if(typeof Ss.runWhen=="function"&&Ss.runWhen(me)===!1)return;ls=ls&&Ss.synchronous;const is=me.transitional||Ge;is&&is.legacyInterceptorReqResOrdering?ot.unshift(Ss.fulfilled,Ss.rejected):ot.push(Ss.fulfilled,Ss.rejected)});const Gt=[];this.interceptors.response.forEach(function(Ss){Gt.push(Ss.fulfilled,Ss.rejected)});let Lt,ws=0,gn;if(!ls){const Bt=[Hr.bind(this),void 0];for(Bt.unshift(...ot),Bt.push(...Gt),gn=Bt.length,Lt=Promise.resolve(me);ws{if(!pe._listeners)return;let ze=pe._listeners.length;for(;ze-- >0;)pe._listeners[ze](Se);pe._listeners=null}),this.promise.then=Se=>{let ze;const Ue=new Promise(ot=>{pe.subscribe(ot),ze=ot}).then(Se);return Ue.cancel=function(){pe.unsubscribe(ze)},Ue},re(function(ze,Ue,ot){pe.reason||(pe.reason=new cs(ze,Ue,ot),me(pe.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(re){if(this.reason){re(this.reason);return}this._listeners?this._listeners.push(re):this._listeners=[re]}unsubscribe(re){if(!this._listeners)return;const me=this._listeners.indexOf(re);me!==-1&&this._listeners.splice(me,1)}toAbortSignal(){const re=new AbortController,me=pe=>{re.abort(pe)};return this.subscribe(me),re.signal.unsubscribe=()=>this.unsubscribe(me),re.signal}static source(){let re;return{token:new Wr(function(Se){re=Se}),cancel:re}}}var jo=Wr;function Gi(ne){return function(me){return ne.apply(null,me)}}function No(ne){return _e.isObject(ne)&&ne.isAxiosError===!0}const Ci={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ci).forEach(([ne,re])=>{Ci[re]=ne});var wl=Ci;function Sl(ne){const re=new Wi(ne),me=t(Wi.prototype.request,re);return _e.extend(me,Wi.prototype,re,{allOwnKeys:!0}),_e.extend(me,re,null,{allOwnKeys:!0}),me.create=function(Se){return Sl(En(ne,Se))},me}const cn=Sl(rn);return cn.Axios=Wi,cn.CanceledError=cs,cn.CancelToken=jo,cn.isCancel=As,cn.VERSION=sr,cn.toFormData=$s,cn.AxiosError=Pt,cn.Cancel=cn.CanceledError,cn.all=function(re){return Promise.all(re)},cn.spread=Gi,cn.isAxiosError=No,cn.mergeConfig=En,cn.AxiosHeaders=fs,cn.formToJSON=ne=>ts(_e.isHTMLForm(ne)?new FormData(ne):ne),cn.getAdapter=Si.getAdapter,cn.HttpStatusCode=wl,cn.default=cn,cg=cn,cg}var zw;function zP(){if(zw)return wr;zw=1;function t($){return $&&typeof $=="object"&&"default"in $?$.default:$}Object.defineProperty(wr,"__esModule",{value:!0});var s=t(qP()),n=function(){return(n=Object.assign||function($){for(var Y,Z=1,W=arguments.length;Z0&&U[U.length-1])&&(G[0]===6||G[0]===2)){z=0;continue}if(G[0]===3&&(!U||G[1]>U[0]&&G[1]=$&&Z<=Y},d=function($){return!!$&&(typeof $=="object"||typeof $=="function")&&typeof $.then=="function"},m={Accept:"application/json","Content-Type":"application/json"},f={timeout:0},p=null,h="CLIENT_ERROR",x="SERVER_ERROR",u="TIMEOUT_ERROR",N="CONNECTION_ERROR",v="NETWORK_ERROR",w="UNKNOWN_ERROR",j="CANCEL_ERROR",b=["ECONNABORTED"],C=["ENOTFOUND","ECONNREFUSED","ECONNRESET"],S=["ERR_BAD_REQUEST","ERR_BAD_RESPONSE"],R=function($){return o(200,299,$)},_=function($){return o(400,499,$)},A=function($){return o(500,599,$)},E=function($){return $.message==="Network Error"?v:s.isCancel($)?j:$.code?S.includes($.code)?q($.response.status):b.includes($.code)?u:C.includes($.code)?N:w:q($.response?$.response.status:null)},q=function($){return $?R($)?p:_($)?h:A($)?x:w:w},O=function($){var Y,Z=n(n({},m),$.headers||{});if($.axiosInstance)Y=$.axiosInstance;else{var W=n(n({},$),{headers:void 0}),U=n(n({},f),W);Y=s.create(U)}var M=[],z=[],T=[],I=[],B=[],G=function(le,xe){return Z[le]=xe,Y},K=function(le){return function(xe,ce,ve){return ce===void 0&&(ce={}),ve===void 0&&(ve={}),X(n(n({},ve),{url:xe,params:ce,method:le}))}},H=function(le){return function(xe,ce,ve){return ve===void 0&&(ve={}),X(n(n({},ve),{url:xe,method:le,data:ce}))}},X=function(le){return r(void 0,void 0,void 0,function(){var xe,ce,ve,Pe;return a(this,function(et){switch(et.label){case 0:if(le.headers=n(n({},Z),le.headers),z.length>0&&z.forEach(function(kt){return kt(le)}),!(T.length>0))return[3,6];xe=0,et.label=1;case 1:return xe0&&I.forEach(function(ht){return ht(xt)}),!(B.length>0))return[3,6];Mt=0,pt.label=1;case 1:return Mt{const s=localStorage.getItem("token");s&&t.headers&&(t.headers.Authorization=`Bearer ${s}`)});qe.addResponseTransform(t=>{var s,n;if(!t.ok&&t.status===401){const r=localStorage.getItem("token");console.error("Unauthorized access - potential token expiration. Token exists in localStorage:",!!r),console.error("Full 401 Response Details:",{url:(s=t.config)==null?void 0:s.url,method:(n=t.config)==null?void 0:n.method,data:t.data}),window.dispatchEvent(new Event("auth:logout"))}});function tA(t,s){return function(){return t.apply(s,arguments)}}const{toString:HP}=Object.prototype,{getPrototypeOf:$y}=Object,{iterator:Tf,toStringTag:sA}=Symbol,Pf=(t=>s=>{const n=HP.call(s);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),yi=t=>(t=t.toLowerCase(),s=>Pf(s)===t),Of=t=>s=>typeof s===t,{isArray:xd}=Array,nd=Of("undefined");function Mu(t){return t!==null&&!nd(t)&&t.constructor!==null&&!nd(t.constructor)&&ma(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const nA=yi("ArrayBuffer");function WP(t){let s;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?s=ArrayBuffer.isView(t):s=t&&t.buffer&&nA(t.buffer),s}const GP=Of("string"),ma=Of("function"),rA=Of("number"),Fu=t=>t!==null&&typeof t=="object",KP=t=>t===!0||t===!1,Om=t=>{if(Pf(t)!=="object")return!1;const s=$y(t);return(s===null||s===Object.prototype||Object.getPrototypeOf(s)===null)&&!(sA in t)&&!(Tf in t)},YP=t=>{if(!Fu(t)||Mu(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},ZP=yi("Date"),QP=yi("File"),XP=t=>!!(t&&typeof t.uri<"u"),JP=t=>t&&typeof t.getParts<"u",eO=yi("Blob"),tO=yi("FileList"),sO=t=>Fu(t)&&ma(t.pipe);function nO(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Uw=nO(),Vw=typeof Uw.FormData<"u"?Uw.FormData:void 0,rO=t=>{let s;return t&&(Vw&&t instanceof Vw||ma(t.append)&&((s=Pf(t))==="formdata"||s==="object"&&ma(t.toString)&&t.toString()==="[object FormData]"))},aO=yi("URLSearchParams"),[iO,lO,oO,cO]=["ReadableStream","Request","Response","Headers"].map(yi),dO=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Bu(t,s,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,a;if(typeof t!="object"&&(t=[t]),xd(t))for(r=0,a=t.length;r0;)if(a=n[r],s===a.toLowerCase())return a;return null}const Go=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,iA=t=>!nd(t)&&t!==Go;function Gv(){const{caseless:t,skipUndefined:s}=iA(this)&&this||{},n={},r=(a,i)=>{if(i==="__proto__"||i==="constructor"||i==="prototype")return;const o=t&&aA(n,i)||i;Om(n[o])&&Om(a)?n[o]=Gv(n[o],a):Om(a)?n[o]=Gv({},a):xd(a)?n[o]=a.slice():(!s||!nd(a))&&(n[o]=a)};for(let a=0,i=arguments.length;a(Bu(s,(a,i)=>{n&&ma(a)?Object.defineProperty(t,i,{value:tA(a,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,i,{value:a,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),t),hO=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),mO=(t,s,n,r)=>{t.prototype=Object.create(s.prototype,r),Object.defineProperty(t.prototype,"constructor",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{value:s.prototype}),n&&Object.assign(t.prototype,n)},fO=(t,s,n,r)=>{let a,i,o;const d={};if(s=s||{},t==null)return s;do{for(a=Object.getOwnPropertyNames(t),i=a.length;i-- >0;)o=a[i],(!r||r(o,t,s))&&!d[o]&&(s[o]=t[o],d[o]=!0);t=n!==!1&&$y(t)}while(t&&(!n||n(t,s))&&t!==Object.prototype);return s},pO=(t,s,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=s.length;const r=t.indexOf(s,n);return r!==-1&&r===n},xO=t=>{if(!t)return null;if(xd(t))return t;let s=t.length;if(!rA(s))return null;const n=new Array(s);for(;s-- >0;)n[s]=t[s];return n},gO=(t=>s=>t&&s instanceof t)(typeof Uint8Array<"u"&&$y(Uint8Array)),vO=(t,s)=>{const r=(t&&t[Tf]).call(t);let a;for(;(a=r.next())&&!a.done;){const i=a.value;s.call(t,i[0],i[1])}},yO=(t,s)=>{let n;const r=[];for(;(n=t.exec(s))!==null;)r.push(n);return r},bO=yi("HTMLFormElement"),jO=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,a){return r.toUpperCase()+a}),Hw=(({hasOwnProperty:t})=>(s,n)=>t.call(s,n))(Object.prototype),NO=yi("RegExp"),lA=(t,s)=>{const n=Object.getOwnPropertyDescriptors(t),r={};Bu(n,(a,i)=>{let o;(o=s(a,i,t))!==!1&&(r[i]=o||a)}),Object.defineProperties(t,r)},wO=t=>{lA(t,(s,n)=>{if(ma(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(ma(r)){if(s.enumerable=!1,"writable"in s){s.writable=!1;return}s.set||(s.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},SO=(t,s)=>{const n={},r=a=>{a.forEach(i=>{n[i]=!0})};return xd(t)?r(t):r(String(t).split(s)),n},CO=()=>{},AO=(t,s)=>t!=null&&Number.isFinite(t=+t)?t:s;function kO(t){return!!(t&&ma(t.append)&&t[sA]==="FormData"&&t[Tf])}const DO=t=>{const s=new Array(10),n=(r,a)=>{if(Fu(r)){if(s.indexOf(r)>=0)return;if(Mu(r))return r;if(!("toJSON"in r)){s[a]=r;const i=xd(r)?[]:{};return Bu(r,(o,d)=>{const m=n(o,a+1);!nd(m)&&(i[d]=m)}),s[a]=void 0,i}}return r};return n(t,0)},RO=yi("AsyncFunction"),EO=t=>t&&(Fu(t)||ma(t))&&ma(t.then)&&ma(t.catch),oA=((t,s)=>t?setImmediate:s?((n,r)=>(Go.addEventListener("message",({source:a,data:i})=>{a===Go&&i===n&&r.length&&r.shift()()},!1),a=>{r.push(a),Go.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",ma(Go.postMessage)),_O=typeof queueMicrotask<"u"?queueMicrotask.bind(Go):typeof process<"u"&&process.nextTick||oA,TO=t=>t!=null&&ma(t[Tf]),Xe={isArray:xd,isArrayBuffer:nA,isBuffer:Mu,isFormData:rO,isArrayBufferView:WP,isString:GP,isNumber:rA,isBoolean:KP,isObject:Fu,isPlainObject:Om,isEmptyObject:YP,isReadableStream:iO,isRequest:lO,isResponse:oO,isHeaders:cO,isUndefined:nd,isDate:ZP,isFile:QP,isReactNativeBlob:XP,isReactNative:JP,isBlob:eO,isRegExp:NO,isFunction:ma,isStream:sO,isURLSearchParams:aO,isTypedArray:gO,isFileList:tO,forEach:Bu,merge:Gv,extend:uO,trim:dO,stripBOM:hO,inherits:mO,toFlatObject:fO,kindOf:Pf,kindOfTest:yi,endsWith:pO,toArray:xO,forEachEntry:vO,matchAll:yO,isHTMLForm:bO,hasOwnProperty:Hw,hasOwnProp:Hw,reduceDescriptors:lA,freezeMethods:wO,toObjectSet:SO,toCamelCase:jO,noop:CO,toFiniteNumber:AO,findKey:aA,global:Go,isContextDefined:iA,isSpecCompliantForm:kO,toJSONObject:DO,isAsyncFn:RO,isThenable:EO,setImmediate:oA,asap:_O,isIterable:TO};let Fs=class cA extends Error{static from(s,n,r,a,i,o){const d=new cA(s.message,n||s.code,r,a,i);return d.cause=s,d.name=s.name,s.status!=null&&d.status==null&&(d.status=s.status),o&&Object.assign(d,o),d}constructor(s,n,r,a,i){super(s),Object.defineProperty(this,"message",{value:s,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),a&&(this.request=a),i&&(this.response=i,this.status=i.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Xe.toJSONObject(this.config),code:this.code,status:this.status}}};Fs.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";Fs.ERR_BAD_OPTION="ERR_BAD_OPTION";Fs.ECONNABORTED="ECONNABORTED";Fs.ETIMEDOUT="ETIMEDOUT";Fs.ERR_NETWORK="ERR_NETWORK";Fs.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";Fs.ERR_DEPRECATED="ERR_DEPRECATED";Fs.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";Fs.ERR_BAD_REQUEST="ERR_BAD_REQUEST";Fs.ERR_CANCELED="ERR_CANCELED";Fs.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";Fs.ERR_INVALID_URL="ERR_INVALID_URL";const PO=null;function Kv(t){return Xe.isPlainObject(t)||Xe.isArray(t)}function dA(t){return Xe.endsWith(t,"[]")?t.slice(0,-2):t}function dg(t,s,n){return t?t.concat(s).map(function(a,i){return a=dA(a),!n&&i?"["+a+"]":a}).join(n?".":""):s}function OO(t){return Xe.isArray(t)&&!t.some(Kv)}const LO=Xe.toFlatObject(Xe,{},null,function(s){return/^is[A-Z]/.test(s)});function Lf(t,s,n){if(!Xe.isObject(t))throw new TypeError("target must be an object");s=s||new FormData,n=Xe.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,w){return!Xe.isUndefined(w[v])});const r=n.metaTokens,a=n.visitor||p,i=n.dots,o=n.indexes,m=(n.Blob||typeof Blob<"u"&&Blob)&&Xe.isSpecCompliantForm(s);if(!Xe.isFunction(a))throw new TypeError("visitor must be a function");function f(N){if(N===null)return"";if(Xe.isDate(N))return N.toISOString();if(Xe.isBoolean(N))return N.toString();if(!m&&Xe.isBlob(N))throw new Fs("Blob is not supported. Use a Buffer instead.");return Xe.isArrayBuffer(N)||Xe.isTypedArray(N)?m&&typeof Blob=="function"?new Blob([N]):Buffer.from(N):N}function p(N,v,w){let j=N;if(Xe.isReactNative(s)&&Xe.isReactNativeBlob(N))return s.append(dg(w,v,i),f(N)),!1;if(N&&!w&&typeof N=="object"){if(Xe.endsWith(v,"{}"))v=r?v:v.slice(0,-2),N=JSON.stringify(N);else if(Xe.isArray(N)&&OO(N)||(Xe.isFileList(N)||Xe.endsWith(v,"[]"))&&(j=Xe.toArray(N)))return v=dA(v),j.forEach(function(C,S){!(Xe.isUndefined(C)||C===null)&&s.append(o===!0?dg([v],S,i):o===null?v:v+"[]",f(C))}),!1}return Kv(N)?!0:(s.append(dg(w,v,i),f(N)),!1)}const h=[],x=Object.assign(LO,{defaultVisitor:p,convertValue:f,isVisitable:Kv});function u(N,v){if(!Xe.isUndefined(N)){if(h.indexOf(N)!==-1)throw Error("Circular reference detected in "+v.join("."));h.push(N),Xe.forEach(N,function(j,b){(!(Xe.isUndefined(j)||j===null)&&a.call(s,j,Xe.isString(b)?b.trim():b,v,x))===!0&&u(j,v?v.concat(b):[b])}),h.pop()}}if(!Xe.isObject(t))throw new TypeError("data must be an object");return u(t),s}function Ww(t){const s={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return s[r]})}function qy(t,s){this._pairs=[],t&&Lf(t,this,s)}const uA=qy.prototype;uA.append=function(s,n){this._pairs.push([s,n])};uA.toString=function(s){const n=s?function(r){return s.call(this,r,Ww)}:Ww;return this._pairs.map(function(a){return n(a[0])+"="+n(a[1])},"").join("&")};function IO(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function hA(t,s,n){if(!s)return t;const r=n&&n.encode||IO,a=Xe.isFunction(n)?{serialize:n}:n,i=a&&a.serialize;let o;if(i?o=i(s,a):o=Xe.isURLSearchParams(s)?s.toString():new qy(s,a).toString(r),o){const d=t.indexOf("#");d!==-1&&(t=t.slice(0,d)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class Gw{constructor(){this.handlers=[]}use(s,n,r){return this.handlers.push({fulfilled:s,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(s){this.handlers[s]&&(this.handlers[s]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(s){Xe.forEach(this.handlers,function(r){r!==null&&s(r)})}}const zy={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},MO=typeof URLSearchParams<"u"?URLSearchParams:qy,FO=typeof FormData<"u"?FormData:null,BO=typeof Blob<"u"?Blob:null,$O={isBrowser:!0,classes:{URLSearchParams:MO,FormData:FO,Blob:BO},protocols:["http","https","file","blob","url","data"]},Uy=typeof window<"u"&&typeof document<"u",Yv=typeof navigator=="object"&&navigator||void 0,qO=Uy&&(!Yv||["ReactNative","NativeScript","NS"].indexOf(Yv.product)<0),zO=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",UO=Uy&&window.location.href||"http://localhost",VO=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Uy,hasStandardBrowserEnv:qO,hasStandardBrowserWebWorkerEnv:zO,navigator:Yv,origin:UO},Symbol.toStringTag,{value:"Module"})),zr={...VO,...$O};function HO(t,s){return Lf(t,new zr.classes.URLSearchParams,{visitor:function(n,r,a,i){return zr.isNode&&Xe.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...s})}function WO(t){return Xe.matchAll(/\w+|\[(\w*)]/g,t).map(s=>s[0]==="[]"?"":s[1]||s[0])}function GO(t){const s={},n=Object.keys(t);let r;const a=n.length;let i;for(r=0;r=n.length;return o=!o&&Xe.isArray(a)?a.length:o,m?(Xe.hasOwnProp(a,o)?a[o]=[a[o],r]:a[o]=r,!d):((!a[o]||!Xe.isObject(a[o]))&&(a[o]=[]),s(n,r,a[o],i)&&Xe.isArray(a[o])&&(a[o]=GO(a[o])),!d)}if(Xe.isFormData(t)&&Xe.isFunction(t.entries)){const n={};return Xe.forEachEntry(t,(r,a)=>{s(WO(r),a,n,0)}),n}return null}function KO(t,s,n){if(Xe.isString(t))try{return(s||JSON.parse)(t),Xe.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const $u={transitional:zy,adapter:["xhr","http","fetch"],transformRequest:[function(s,n){const r=n.getContentType()||"",a=r.indexOf("application/json")>-1,i=Xe.isObject(s);if(i&&Xe.isHTMLForm(s)&&(s=new FormData(s)),Xe.isFormData(s))return a?JSON.stringify(mA(s)):s;if(Xe.isArrayBuffer(s)||Xe.isBuffer(s)||Xe.isStream(s)||Xe.isFile(s)||Xe.isBlob(s)||Xe.isReadableStream(s))return s;if(Xe.isArrayBufferView(s))return s.buffer;if(Xe.isURLSearchParams(s))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),s.toString();let d;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return HO(s,this.formSerializer).toString();if((d=Xe.isFileList(s))||r.indexOf("multipart/form-data")>-1){const m=this.env&&this.env.FormData;return Lf(d?{"files[]":s}:s,m&&new m,this.formSerializer)}}return i||a?(n.setContentType("application/json",!1),KO(s)):s}],transformResponse:[function(s){const n=this.transitional||$u.transitional,r=n&&n.forcedJSONParsing,a=this.responseType==="json";if(Xe.isResponse(s)||Xe.isReadableStream(s))return s;if(s&&Xe.isString(s)&&(r&&!this.responseType||a)){const o=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(s,this.parseReviver)}catch(d){if(o)throw d.name==="SyntaxError"?Fs.from(d,Fs.ERR_BAD_RESPONSE,this,null,this.response):d}}return s}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:zr.classes.FormData,Blob:zr.classes.Blob},validateStatus:function(s){return s>=200&&s<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Xe.forEach(["delete","get","head","post","put","patch"],t=>{$u.headers[t]={}});const YO=Xe.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ZO=t=>{const s={};let n,r,a;return t&&t.split(` -`).forEach(function(o){a=o.indexOf(":"),n=o.substring(0,a).trim().toLowerCase(),r=o.substring(a+1).trim(),!(!n||s[n]&&YO[n])&&(n==="set-cookie"?s[n]?s[n].push(r):s[n]=[r]:s[n]=s[n]?s[n]+", "+r:r)}),s},Kw=Symbol("internals");function Jd(t){return t&&String(t).trim().toLowerCase()}function Lm(t){return t===!1||t==null?t:Xe.isArray(t)?t.map(Lm):String(t)}function QO(t){const s=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)s[r[1]]=r[2];return s}const XO=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function ug(t,s,n,r,a){if(Xe.isFunction(r))return r.call(this,s,n);if(a&&(s=n),!!Xe.isString(s)){if(Xe.isString(r))return s.indexOf(r)!==-1;if(Xe.isRegExp(r))return r.test(s)}}function JO(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(s,n,r)=>n.toUpperCase()+r)}function e5(t,s){const n=Xe.toCamelCase(" "+s);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(a,i,o){return this[r].call(this,s,a,i,o)},configurable:!0})})}let fa=class{constructor(s){s&&this.set(s)}set(s,n,r){const a=this;function i(d,m,f){const p=Jd(m);if(!p)throw new Error("header name must be a non-empty string");const h=Xe.findKey(a,p);(!h||a[h]===void 0||f===!0||f===void 0&&a[h]!==!1)&&(a[h||m]=Lm(d))}const o=(d,m)=>Xe.forEach(d,(f,p)=>i(f,p,m));if(Xe.isPlainObject(s)||s instanceof this.constructor)o(s,n);else if(Xe.isString(s)&&(s=s.trim())&&!XO(s))o(ZO(s),n);else if(Xe.isObject(s)&&Xe.isIterable(s)){let d={},m,f;for(const p of s){if(!Xe.isArray(p))throw TypeError("Object iterator must return a key-value pair");d[f=p[0]]=(m=d[f])?Xe.isArray(m)?[...m,p[1]]:[m,p[1]]:p[1]}o(d,n)}else s!=null&&i(n,s,r);return this}get(s,n){if(s=Jd(s),s){const r=Xe.findKey(this,s);if(r){const a=this[r];if(!n)return a;if(n===!0)return QO(a);if(Xe.isFunction(n))return n.call(this,a,r);if(Xe.isRegExp(n))return n.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(s,n){if(s=Jd(s),s){const r=Xe.findKey(this,s);return!!(r&&this[r]!==void 0&&(!n||ug(this,this[r],r,n)))}return!1}delete(s,n){const r=this;let a=!1;function i(o){if(o=Jd(o),o){const d=Xe.findKey(r,o);d&&(!n||ug(r,r[d],d,n))&&(delete r[d],a=!0)}}return Xe.isArray(s)?s.forEach(i):i(s),a}clear(s){const n=Object.keys(this);let r=n.length,a=!1;for(;r--;){const i=n[r];(!s||ug(this,this[i],i,s,!0))&&(delete this[i],a=!0)}return a}normalize(s){const n=this,r={};return Xe.forEach(this,(a,i)=>{const o=Xe.findKey(r,i);if(o){n[o]=Lm(a),delete n[i];return}const d=s?JO(i):String(i).trim();d!==i&&delete n[i],n[d]=Lm(a),r[d]=!0}),this}concat(...s){return this.constructor.concat(this,...s)}toJSON(s){const n=Object.create(null);return Xe.forEach(this,(r,a)=>{r!=null&&r!==!1&&(n[a]=s&&Xe.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([s,n])=>s+": "+n).join(` -`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(s){return s instanceof this?s:new this(s)}static concat(s,...n){const r=new this(s);return n.forEach(a=>r.set(a)),r}static accessor(s){const r=(this[Kw]=this[Kw]={accessors:{}}).accessors,a=this.prototype;function i(o){const d=Jd(o);r[d]||(e5(a,o),r[d]=!0)}return Xe.isArray(s)?s.forEach(i):i(s),this}};fa.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Xe.reduceDescriptors(fa.prototype,({value:t},s)=>{let n=s[0].toUpperCase()+s.slice(1);return{get:()=>t,set(r){this[n]=r}}});Xe.freezeMethods(fa);function hg(t,s){const n=this||$u,r=s||n,a=fa.from(r.headers);let i=r.data;return Xe.forEach(t,function(d){i=d.call(n,i,a.normalize(),s?s.status:void 0)}),a.normalize(),i}function fA(t){return!!(t&&t.__CANCEL__)}let qu=class extends Fs{constructor(s,n,r){super(s??"canceled",Fs.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function pA(t,s,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):s(new Fs("Request failed with status code "+n.status,[Fs.ERR_BAD_REQUEST,Fs.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function t5(t){const s=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return s&&s[1]||""}function s5(t,s){t=t||10;const n=new Array(t),r=new Array(t);let a=0,i=0,o;return s=s!==void 0?s:1e3,function(m){const f=Date.now(),p=r[i];o||(o=f),n[a]=m,r[a]=f;let h=i,x=0;for(;h!==a;)x+=n[h++],h=h%t;if(a=(a+1)%t,a===i&&(i=(i+1)%t),f-o{n=p,a=null,i&&(clearTimeout(i),i=null),t(...f)};return[(...f)=>{const p=Date.now(),h=p-n;h>=r?o(f,p):(a=f,i||(i=setTimeout(()=>{i=null,o(a)},r-h)))},()=>a&&o(a)]}const nf=(t,s,n=3)=>{let r=0;const a=s5(50,250);return n5(i=>{const o=i.loaded,d=i.lengthComputable?i.total:void 0,m=o-r,f=a(m),p=o<=d;r=o;const h={loaded:o,total:d,progress:d?o/d:void 0,bytes:m,rate:f||void 0,estimated:f&&d&&p?(d-o)/f:void 0,event:i,lengthComputable:d!=null,[s?"download":"upload"]:!0};t(h)},n)},Yw=(t,s)=>{const n=t!=null;return[r=>s[0]({lengthComputable:n,total:t,loaded:r}),s[1]]},Zw=t=>(...s)=>Xe.asap(()=>t(...s)),r5=zr.hasStandardBrowserEnv?((t,s)=>n=>(n=new URL(n,zr.origin),t.protocol===n.protocol&&t.host===n.host&&(s||t.port===n.port)))(new URL(zr.origin),zr.navigator&&/(msie|trident)/i.test(zr.navigator.userAgent)):()=>!0,a5=zr.hasStandardBrowserEnv?{write(t,s,n,r,a,i,o){if(typeof document>"u")return;const d=[`${t}=${encodeURIComponent(s)}`];Xe.isNumber(n)&&d.push(`expires=${new Date(n).toUTCString()}`),Xe.isString(r)&&d.push(`path=${r}`),Xe.isString(a)&&d.push(`domain=${a}`),i===!0&&d.push("secure"),Xe.isString(o)&&d.push(`SameSite=${o}`),document.cookie=d.join("; ")},read(t){if(typeof document>"u")return null;const s=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return s?decodeURIComponent(s[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function i5(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function l5(t,s){return s?t.replace(/\/?\/$/,"")+"/"+s.replace(/^\/+/,""):t}function xA(t,s,n){let r=!i5(s);return t&&(r||n==!1)?l5(t,s):s}const Qw=t=>t instanceof fa?{...t}:t;function nc(t,s){s=s||{};const n={};function r(f,p,h,x){return Xe.isPlainObject(f)&&Xe.isPlainObject(p)?Xe.merge.call({caseless:x},f,p):Xe.isPlainObject(p)?Xe.merge({},p):Xe.isArray(p)?p.slice():p}function a(f,p,h,x){if(Xe.isUndefined(p)){if(!Xe.isUndefined(f))return r(void 0,f,h,x)}else return r(f,p,h,x)}function i(f,p){if(!Xe.isUndefined(p))return r(void 0,p)}function o(f,p){if(Xe.isUndefined(p)){if(!Xe.isUndefined(f))return r(void 0,f)}else return r(void 0,p)}function d(f,p,h){if(h in s)return r(f,p);if(h in t)return r(void 0,f)}const m={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:d,headers:(f,p,h)=>a(Qw(f),Qw(p),h,!0)};return Xe.forEach(Object.keys({...t,...s}),function(p){if(p==="__proto__"||p==="constructor"||p==="prototype")return;const h=Xe.hasOwnProp(m,p)?m[p]:a,x=h(t[p],s[p],p);Xe.isUndefined(x)&&h!==d||(n[p]=x)}),n}const gA=t=>{const s=nc({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:a,xsrfCookieName:i,headers:o,auth:d}=s;if(s.headers=o=fa.from(o),s.url=hA(xA(s.baseURL,s.url,s.allowAbsoluteUrls),t.params,t.paramsSerializer),d&&o.set("Authorization","Basic "+btoa((d.username||"")+":"+(d.password?unescape(encodeURIComponent(d.password)):""))),Xe.isFormData(n)){if(zr.hasStandardBrowserEnv||zr.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(Xe.isFunction(n.getHeaders)){const m=n.getHeaders(),f=["content-type","content-length"];Object.entries(m).forEach(([p,h])=>{f.includes(p.toLowerCase())&&o.set(p,h)})}}if(zr.hasStandardBrowserEnv&&(r&&Xe.isFunction(r)&&(r=r(s)),r||r!==!1&&r5(s.url))){const m=a&&i&&a5.read(i);m&&o.set(a,m)}return s},o5=typeof XMLHttpRequest<"u",c5=o5&&function(t){return new Promise(function(n,r){const a=gA(t);let i=a.data;const o=fa.from(a.headers).normalize();let{responseType:d,onUploadProgress:m,onDownloadProgress:f}=a,p,h,x,u,N;function v(){u&&u(),N&&N(),a.cancelToken&&a.cancelToken.unsubscribe(p),a.signal&&a.signal.removeEventListener("abort",p)}let w=new XMLHttpRequest;w.open(a.method.toUpperCase(),a.url,!0),w.timeout=a.timeout;function j(){if(!w)return;const C=fa.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders()),R={data:!d||d==="text"||d==="json"?w.responseText:w.response,status:w.status,statusText:w.statusText,headers:C,config:t,request:w};pA(function(A){n(A),v()},function(A){r(A),v()},R),w=null}"onloadend"in w?w.onloadend=j:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)||setTimeout(j)},w.onabort=function(){w&&(r(new Fs("Request aborted",Fs.ECONNABORTED,t,w)),w=null)},w.onerror=function(S){const R=S&&S.message?S.message:"Network Error",_=new Fs(R,Fs.ERR_NETWORK,t,w);_.event=S||null,r(_),w=null},w.ontimeout=function(){let S=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const R=a.transitional||zy;a.timeoutErrorMessage&&(S=a.timeoutErrorMessage),r(new Fs(S,R.clarifyTimeoutError?Fs.ETIMEDOUT:Fs.ECONNABORTED,t,w)),w=null},i===void 0&&o.setContentType(null),"setRequestHeader"in w&&Xe.forEach(o.toJSON(),function(S,R){w.setRequestHeader(R,S)}),Xe.isUndefined(a.withCredentials)||(w.withCredentials=!!a.withCredentials),d&&d!=="json"&&(w.responseType=a.responseType),f&&([x,N]=nf(f,!0),w.addEventListener("progress",x)),m&&w.upload&&([h,u]=nf(m),w.upload.addEventListener("progress",h),w.upload.addEventListener("loadend",u)),(a.cancelToken||a.signal)&&(p=C=>{w&&(r(!C||C.type?new qu(null,t,w):C),w.abort(),w=null)},a.cancelToken&&a.cancelToken.subscribe(p),a.signal&&(a.signal.aborted?p():a.signal.addEventListener("abort",p)));const b=t5(a.url);if(b&&zr.protocols.indexOf(b)===-1){r(new Fs("Unsupported protocol "+b+":",Fs.ERR_BAD_REQUEST,t));return}w.send(i||null)})},d5=(t,s)=>{const{length:n}=t=t?t.filter(Boolean):[];if(s||n){let r=new AbortController,a;const i=function(f){if(!a){a=!0,d();const p=f instanceof Error?f:this.reason;r.abort(p instanceof Fs?p:new qu(p instanceof Error?p.message:p))}};let o=s&&setTimeout(()=>{o=null,i(new Fs(`timeout of ${s}ms exceeded`,Fs.ETIMEDOUT))},s);const d=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(f=>{f.unsubscribe?f.unsubscribe(i):f.removeEventListener("abort",i)}),t=null)};t.forEach(f=>f.addEventListener("abort",i));const{signal:m}=r;return m.unsubscribe=()=>Xe.asap(d),m}},u5=function*(t,s){let n=t.byteLength;if(n{const a=h5(t,s);let i=0,o,d=m=>{o||(o=!0,r&&r(m))};return new ReadableStream({async pull(m){try{const{done:f,value:p}=await a.next();if(f){d(),m.close();return}let h=p.byteLength;if(n){let x=i+=h;n(x)}m.enqueue(new Uint8Array(p))}catch(f){throw d(f),f}},cancel(m){return d(m),a.return()}},{highWaterMark:2})},Jw=64*1024,{isFunction:om}=Xe,f5=(({Request:t,Response:s})=>({Request:t,Response:s}))(Xe.global),{ReadableStream:e1,TextEncoder:t1}=Xe.global,s1=(t,...s)=>{try{return!!t(...s)}catch{return!1}},p5=t=>{t=Xe.merge.call({skipUndefined:!0},f5,t);const{fetch:s,Request:n,Response:r}=t,a=s?om(s):typeof fetch=="function",i=om(n),o=om(r);if(!a)return!1;const d=a&&om(e1),m=a&&(typeof t1=="function"?(N=>v=>N.encode(v))(new t1):async N=>new Uint8Array(await new n(N).arrayBuffer())),f=i&&d&&s1(()=>{let N=!1;const v=new n(zr.origin,{body:new e1,method:"POST",get duplex(){return N=!0,"half"}}).headers.has("Content-Type");return N&&!v}),p=o&&d&&s1(()=>Xe.isReadableStream(new r("").body)),h={stream:p&&(N=>N.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(N=>{!h[N]&&(h[N]=(v,w)=>{let j=v&&v[N];if(j)return j.call(v);throw new Fs(`Response type '${N}' is not supported`,Fs.ERR_NOT_SUPPORT,w)})});const x=async N=>{if(N==null)return 0;if(Xe.isBlob(N))return N.size;if(Xe.isSpecCompliantForm(N))return(await new n(zr.origin,{method:"POST",body:N}).arrayBuffer()).byteLength;if(Xe.isArrayBufferView(N)||Xe.isArrayBuffer(N))return N.byteLength;if(Xe.isURLSearchParams(N)&&(N=N+""),Xe.isString(N))return(await m(N)).byteLength},u=async(N,v)=>{const w=Xe.toFiniteNumber(N.getContentLength());return w??x(v)};return async N=>{let{url:v,method:w,data:j,signal:b,cancelToken:C,timeout:S,onDownloadProgress:R,onUploadProgress:_,responseType:A,headers:E,withCredentials:q="same-origin",fetchOptions:O}=gA(N),D=s||fetch;A=A?(A+"").toLowerCase():"text";let P=d5([b,C&&C.toAbortSignal()],S),L=null;const $=P&&P.unsubscribe&&(()=>{P.unsubscribe()});let Y;try{if(_&&f&&w!=="get"&&w!=="head"&&(Y=await u(E,j))!==0){let T=new n(v,{method:"POST",body:j,duplex:"half"}),I;if(Xe.isFormData(j)&&(I=T.headers.get("content-type"))&&E.setContentType(I),T.body){const[B,G]=Yw(Y,nf(Zw(_)));j=Xw(T.body,Jw,B,G)}}Xe.isString(q)||(q=q?"include":"omit");const Z=i&&"credentials"in n.prototype,W={...O,signal:P,method:w.toUpperCase(),headers:E.normalize().toJSON(),body:j,duplex:"half",credentials:Z?q:void 0};L=i&&new n(v,W);let U=await(i?D(L,O):D(v,W));const M=p&&(A==="stream"||A==="response");if(p&&(R||M&&$)){const T={};["status","statusText","headers"].forEach(K=>{T[K]=U[K]});const I=Xe.toFiniteNumber(U.headers.get("content-length")),[B,G]=R&&Yw(I,nf(Zw(R),!0))||[];U=new r(Xw(U.body,Jw,B,()=>{G&&G(),$&&$()}),T)}A=A||"text";let z=await h[Xe.findKey(h,A)||"text"](U,N);return!M&&$&&$(),await new Promise((T,I)=>{pA(T,I,{data:z,headers:fa.from(U.headers),status:U.status,statusText:U.statusText,config:N,request:L})})}catch(Z){throw $&&$(),Z&&Z.name==="TypeError"&&/Load failed|fetch/i.test(Z.message)?Object.assign(new Fs("Network Error",Fs.ERR_NETWORK,N,L,Z&&Z.response),{cause:Z.cause||Z}):Fs.from(Z,Z&&Z.code,N,L,Z&&Z.response)}}},x5=new Map,vA=t=>{let s=t&&t.env||{};const{fetch:n,Request:r,Response:a}=s,i=[r,a,n];let o=i.length,d=o,m,f,p=x5;for(;d--;)m=i[d],f=p.get(m),f===void 0&&p.set(m,f=d?new Map:p5(s)),p=f;return f};vA();const Vy={http:PO,xhr:c5,fetch:{get:vA}};Xe.forEach(Vy,(t,s)=>{if(t){try{Object.defineProperty(t,"name",{value:s})}catch{}Object.defineProperty(t,"adapterName",{value:s})}});const n1=t=>`- ${t}`,g5=t=>Xe.isFunction(t)||t===null||t===!1;function v5(t,s){t=Xe.isArray(t)?t:[t];const{length:n}=t;let r,a;const i={};for(let o=0;o`adapter ${m} `+(f===!1?"is not supported by the environment":"is not available in the build"));let d=n?o.length>1?`since : -`+o.map(n1).join(` -`):" "+n1(o[0]):"as no adapter specified";throw new Fs("There is no suitable adapter to dispatch the request "+d,"ERR_NOT_SUPPORT")}return a}const yA={getAdapter:v5,adapters:Vy};function mg(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new qu(null,t)}function r1(t){return mg(t),t.headers=fa.from(t.headers),t.data=hg.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),yA.getAdapter(t.adapter||$u.adapter,t)(t).then(function(r){return mg(t),r.data=hg.call(t,t.transformResponse,r),r.headers=fa.from(r.headers),r},function(r){return fA(r)||(mg(t),r&&r.response&&(r.response.data=hg.call(t,t.transformResponse,r.response),r.response.headers=fa.from(r.response.headers))),Promise.reject(r)})}const bA="1.13.6",If={};["object","boolean","number","function","string","symbol"].forEach((t,s)=>{If[t]=function(r){return typeof r===t||"a"+(s<1?"n ":" ")+t}});const a1={};If.transitional=function(s,n,r){function a(i,o){return"[Axios v"+bA+"] Transitional option '"+i+"'"+o+(r?". "+r:"")}return(i,o,d)=>{if(s===!1)throw new Fs(a(o," has been removed"+(n?" in "+n:"")),Fs.ERR_DEPRECATED);return n&&!a1[o]&&(a1[o]=!0,console.warn(a(o," has been deprecated since v"+n+" and will be removed in the near future"))),s?s(i,o,d):!0}};If.spelling=function(s){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${s}`),!0)};function y5(t,s,n){if(typeof t!="object")throw new Fs("options must be an object",Fs.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let a=r.length;for(;a-- >0;){const i=r[a],o=s[i];if(o){const d=t[i],m=d===void 0||o(d,i,t);if(m!==!0)throw new Fs("option "+i+" must be "+m,Fs.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Fs("Unknown option "+i,Fs.ERR_BAD_OPTION)}}const Im={assertOptions:y5,validators:If},Ua=Im.validators;let Xo=class{constructor(s){this.defaults=s||{},this.interceptors={request:new Gw,response:new Gw}}async request(s,n){try{return await this._request(s,n)}catch(r){if(r instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const i=a.stack?a.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=` -`+i):r.stack=i}catch{}}throw r}}_request(s,n){typeof s=="string"?(n=n||{},n.url=s):n=s||{},n=nc(this.defaults,n);const{transitional:r,paramsSerializer:a,headers:i}=n;r!==void 0&&Im.assertOptions(r,{silentJSONParsing:Ua.transitional(Ua.boolean),forcedJSONParsing:Ua.transitional(Ua.boolean),clarifyTimeoutError:Ua.transitional(Ua.boolean),legacyInterceptorReqResOrdering:Ua.transitional(Ua.boolean)},!1),a!=null&&(Xe.isFunction(a)?n.paramsSerializer={serialize:a}:Im.assertOptions(a,{encode:Ua.function,serialize:Ua.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Im.assertOptions(n,{baseUrl:Ua.spelling("baseURL"),withXsrfToken:Ua.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&Xe.merge(i.common,i[n.method]);i&&Xe.forEach(["delete","get","head","post","put","patch","common"],N=>{delete i[N]}),n.headers=fa.concat(o,i);const d=[];let m=!0;this.interceptors.request.forEach(function(v){if(typeof v.runWhen=="function"&&v.runWhen(n)===!1)return;m=m&&v.synchronous;const w=n.transitional||zy;w&&w.legacyInterceptorReqResOrdering?d.unshift(v.fulfilled,v.rejected):d.push(v.fulfilled,v.rejected)});const f=[];this.interceptors.response.forEach(function(v){f.push(v.fulfilled,v.rejected)});let p,h=0,x;if(!m){const N=[r1.bind(this),void 0];for(N.unshift(...d),N.push(...f),x=N.length,p=Promise.resolve(n);h{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](a);r._listeners=null}),this.promise.then=a=>{let i;const o=new Promise(d=>{r.subscribe(d),i=d}).then(a);return o.cancel=function(){r.unsubscribe(i)},o},s(function(i,o,d){r.reason||(r.reason=new qu(i,o,d),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(s){if(this.reason){s(this.reason);return}this._listeners?this._listeners.push(s):this._listeners=[s]}unsubscribe(s){if(!this._listeners)return;const n=this._listeners.indexOf(s);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const s=new AbortController,n=r=>{s.abort(r)};return this.subscribe(n),s.signal.unsubscribe=()=>this.unsubscribe(n),s.signal}static source(){let s;return{token:new jA(function(a){s=a}),cancel:s}}};function j5(t){return function(n){return t.apply(null,n)}}function N5(t){return Xe.isObject(t)&&t.isAxiosError===!0}const Zv={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Zv).forEach(([t,s])=>{Zv[s]=t});function NA(t){const s=new Xo(t),n=tA(Xo.prototype.request,s);return Xe.extend(n,Xo.prototype,s,{allOwnKeys:!0}),Xe.extend(n,s,null,{allOwnKeys:!0}),n.create=function(a){return NA(nc(t,a))},n}const Qn=NA($u);Qn.Axios=Xo;Qn.CanceledError=qu;Qn.CancelToken=b5;Qn.isCancel=fA;Qn.VERSION=bA;Qn.toFormData=Lf;Qn.AxiosError=Fs;Qn.Cancel=Qn.CanceledError;Qn.all=function(s){return Promise.all(s)};Qn.spread=j5;Qn.isAxiosError=N5;Qn.mergeConfig=nc;Qn.AxiosHeaders=fa;Qn.formToJSON=t=>mA(Xe.isHTMLForm(t)?new FormData(t):t);Qn.getAdapter=yA.getAdapter;Qn.HttpStatusCode=Zv;Qn.default=Qn;const{Axios:sY,AxiosError:nY,CanceledError:rY,isCancel:aY,CancelToken:iY,VERSION:lY,all:oY,Cancel:cY,isAxiosError:dY,spread:uY,toFormData:hY,AxiosHeaders:mY,HttpStatusCode:fY,formToJSON:pY,getAdapter:xY,mergeConfig:gY}=Qn,i1="https://dealeronboarding-uat.royalenfield.com/api",Ee={login:t=>qe.post("/auth/login",t),logout:()=>qe.post("/auth/logout"),getCurrentUser:()=>qe.get("/auth/me"),getRoles:()=>qe.get("/admin/roles"),createRole:t=>qe.post("/admin/roles",t),getPermissions:()=>qe.get("/admin/permissions"),updateRole:(t,s)=>qe.put(`/admin/roles/${t}`,s),getZones:()=>qe.get("/master/zones"),createZone:t=>qe.post("/master/zones",t),updateZone:(t,s)=>qe.put(`/master/zones/${t}`,s),createRegion:t=>qe.post("/master/regions",t),updateRegion:(t,s)=>qe.put(`/master/regions/${t}`,s),getRegions:()=>qe.get("/master/regions"),getOutlets:()=>qe.get("/outlets"),getOutletByCode:t=>qe.get(`/master/outlets/code/${t}`),getStates:t=>qe.get("/master/states",typeof t=="string"?{zoneId:t}:t),getDistricts:t=>qe.get("/master/districts",typeof t=="string"?{stateId:t}:t),getAreas:t=>qe.get("/master/areas",t),updateArea:(t,s)=>qe.put(`/master/areas/${t}`,s),createArea:t=>qe.post("/master/areas",t),getAreaManagers:()=>qe.get("/master/area-managers"),getASMs:()=>qe.get("/master/asms"),getZonalManagers:()=>qe.get("/master/zonal-managers"),saveZonalManager:t=>qe.post("/master/zonal-managers",t),getDDLeads:()=>qe.get("/master/dd-leads"),saveDDLead:t=>qe.post("/master/dd-leads",t),getManagersByRole:t=>qe.get("/master/managers",t),submitApplication:t=>qe.post("/onboarding/apply",t),exportApplicationResponses:t=>qe.get("/onboarding/applications/export-responses",t),getApplications:t=>qe.get("/onboarding/applications",t),shortlistApplications:t=>qe.post("/onboarding/applications/shortlist",t),sendBulkReminders:t=>qe.post("/onboarding/applications/reminders",t),getApplicationById:t=>qe.get(`/onboarding/applications/${t}`),updateApplication:(t,s)=>qe.put(`/onboarding/applications/${t}`,s),getLatestQuestionnaire:()=>qe.get("/questionnaire/latest"),createQuestionnaireVersion:t=>qe.post("/questionnaire/version",t),submitQuestionnaireResponse:t=>qe.post("/questionnaire/response",t),getAllQuestionnaires:()=>qe.get("/onboarding/questionnaires"),getQuestionnaireById:t=>qe.get(`/onboarding/questionnaires/${t}`),assignArchitectureTeam:(t,s)=>qe.post(`/onboarding/applications/${t}/assign-architecture`,{assignedTo:s}),updateArchitectureStatus:(t,s,n)=>qe.post(`/onboarding/applications/${t}/architecture-status`,{status:s,remarks:n}),generateDealerCodes:t=>qe.post(`/onboarding/applications/${t}/generate-codes`),updateApplicationStatus:(t,s)=>qe.put(`/onboarding/applications/${t}/status`,s),convertToOpportunity:(t,s)=>qe.post(`/onboarding/applications/${t}/convert-to-opportunity`,s),bulkConvertToOpportunity:t=>qe.post("/onboarding/applications/bulk-convert-to-opportunity",t),retriggerEvaluators:t=>qe.post(`/onboarding/applications/${t}/retrigger-evaluators`),getSecurityDeposit:t=>qe.get(`/loa/security-deposit/${t}`),updateSecurityDeposit:t=>qe.post("/loa/security-deposit",t),uploadDocument:(t,s)=>qe.post(`/onboarding/applications/${t}/documents`,s,{headers:{"Content-Type":"multipart/form-data"}}),getDocuments:t=>qe.get(`/onboarding/applications/${t}/documents`),getDocumentConfigMetadata:()=>qe.get("/onboarding/document-configs/metadata"),getDocumentConfigs:t=>qe.get("/onboarding/document-configs",t),createDocumentConfig:t=>qe.post("/onboarding/document-configs",t),updateDocumentConfig:(t,s)=>qe.put(`/onboarding/document-configs/${t}`,s),deleteDocumentConfig:t=>qe.delete(`/onboarding/document-configs/${t}`),getPublicQuestionnaire:t=>Qn.get(`${i1}/questionnaire/public/${t}`),submitPublicResponse:t=>Qn.post(`${i1}/questionnaire/public/submit`,t),getAiSummary:t=>qe.get(`/assessment/ai-summary/${t}`),scheduleInterview:t=>qe.post("/assessment/interviews",t),updateInterview:(t,s)=>qe.put(`/assessment/interviews/${t}`,s),submitEvaluation:(t,s)=>qe.post(`/assessment/interviews/${t}/evaluation`,s),submitKTMatrix:t=>qe.post("/assessment/kt-matrix",t),submitLevel2Feedback:t=>qe.post("/assessment/level2-feedback",t),getInterviews:t=>qe.get(`/assessment/interviews/${t}`),updateRecommendation:t=>qe.post("/assessment/recommendation",t),updateInterviewDecision:t=>qe.post("/assessment/decision",t),submitStageDecision:t=>qe.post("/assessment/stage-decision",t),getInterviewApprovalStatus:t=>qe.get(`/assessment/interviews/${t}/approval-status`),getApprovalPolicies:()=>qe.get("/assessment/approval-policies"),upsertApprovalPolicy:(t,s)=>qe.put(`/assessment/approval-policies/${t}`,s),getWorknotes:(t,s)=>qe.get("/collaboration/worknotes",{requestId:t,requestType:s}),addWorknote:t=>qe.post("/collaboration/worknotes",t),addParticipant:t=>qe.post("/collaboration/participants",t),removeParticipant:t=>qe.delete(`/collaboration/participants/${t}`),getUsers:t=>qe.get("/admin/users",t),createUser:t=>qe.post("/admin/users",t),updateUser:(t,s)=>qe.put(`/admin/users/${t}`,s),updateUserStatus:(t,s)=>qe.patch(`/admin/users/${t}/status`,s),deleteUser:t=>qe.delete(`/admin/users/${t}`),getDealers:t=>qe.get("/dealer",t),createDealer:t=>qe.post("/dealer",t),getDealerById:t=>qe.get(`/dealer/${t}`),updateDealer:(t,s)=>qe.put(`/dealer/${t}`,s),getDealerDashboard:()=>qe.get("/dealer/dashboard"),getDealerBankDetails:t=>qe.get(`/dealer/${t}/bank-details`),saveBankDetail:(t,s)=>qe.post(`/dealer/${t}/bank-details`,s),deleteBankDetail:t=>qe.delete(`/dealer/bank-details/${t}`),getEmailTemplates:()=>qe.get("/admin/email-templates"),getEmailTemplate:t=>qe.get(`/admin/email-templates/${t}`),createEmailTemplate:t=>qe.post("/admin/email-templates",t),updateEmailTemplate:(t,s)=>qe.put(`/admin/email-templates/${t}`,s),deleteEmailTemplate:t=>qe.delete(`/admin/email-templates/${t}`),previewEmailTemplate:t=>qe.post("/admin/email-templates/preview",t),getAuditLogs:(t,s,n=1,r=50)=>qe.get("/audit/logs",{entityType:t,entityId:s,page:n,limit:r}),getAuditSummary:(t,s)=>qe.get("/audit/summary",{entityType:t,entityId:s}),sendOtp:t=>qe.post("/prospective-login/send-otp",{phone:t}),verifyOtp:(t,s)=>qe.post("/prospective-login/verify-otp",{phone:t,otp:s}),getResignationById:t=>qe.get(`/resignation/${t}`),uploadResignationDocument:(t,s)=>qe.post(`/resignation/${t}/documents`,s,{headers:{"Content-Type":"multipart/form-data"}}),updateClearance:(t,s)=>qe.put(`/resignation/${t}/clearance`,s,{headers:s instanceof FormData?{"Content-Type":"multipart/form-data"}:{}}),updateResignationStatus:(t,s)=>qe.post(`/resignation/${t}/status`,s),getTerminationById:t=>qe.get(`/termination/${t}`),uploadTerminationDocument:(t,s)=>qe.post(`/termination/${t}/documents`,s,{headers:{"Content-Type":"multipart/form-data"}}),updateTerminationStatus:(t,s)=>qe.post(`/termination/${t}/status`,s),issueSCN:(t,s)=>qe.post(`/termination/${t}/scn`,s),uploadSCNResponse:(t,s)=>qe.post(`/termination/${t}/scn-response`,s,{headers:{"Content-Type":"multipart/form-data"}}),finalizeTermination:(t,s)=>qe.post(`/termination/${t}/finalize`,s),getResignations:t=>qe.get("/resignation",t),createResignation:t=>qe.post("/resignation",t),approveResignation:(t,s)=>qe.post(`/resignation/${t}/approve`,s),dispatchResignation:(t,s)=>qe.post(`/resignation/${t}/dispatch`,s),rejectResignation:(t,s)=>qe.post(`/resignation/${t}/reject`,s),withdrawResignation:(t,s)=>qe.post(`/resignation/${t}/withdraw`,{reason:s}),getTerminations:t=>qe.get("/termination",t),createTermination:t=>{const s=typeof FormData<"u"&&t instanceof FormData;return qe.post("/termination",t,s?{headers:{"Content-Type":"multipart/form-data"}}:void 0)},updateTermination:(t,s)=>qe.post(`/termination/${t}/status`,s),getOnboardingPayments:()=>qe.get("/settlement/onboarding"),updatePayment:(t,s)=>qe.put(`/settlement/payments/${t}`,s),getFnFSettlements:()=>qe.get("/settlement/fnf"),getFnFSettlementById:t=>qe.get(`/settlement/fnf/${t}`),calculateFnF:t=>qe.post(`/settlement/fnf/${t}/calculate`),updateFnF:(t,s)=>qe.put(`/settlement/fnf/${t}`,s),uploadFnFDocument:(t,s)=>qe.post(`/settlement/fnf/${t}/documents`,s,{headers:{"Content-Type":"multipart/form-data"}}),getSettlementDepartments:()=>qe.get("/settlement/departments"),addLineItem:(t,s)=>qe.post(`/settlement/fnf/${t}/line-items`,s),updateFnFClearance:(t,s,n)=>qe.put(`/settlement/fnf/${t}/clearances/${s}`,n,{headers:{"Content-Type":"multipart/form-data"}}),updateLineItem:(t,s)=>qe.put(`/settlement/fnf/line-items/${t}`,s),deleteLineItem:t=>qe.delete(`/settlement/fnf/line-items/${t}`),getRelocationRequests:t=>qe.get("/relocation",t),getRelocationRequestById:t=>qe.get(`/relocation/${t}`),createRelocationRequest:t=>qe.post("/relocation",t),updateRelocationRequest:(t,s,n)=>qe.post(`/relocation/${t}/action`,{action:s,...n}),uploadRelocationDocument:(t,s)=>qe.post(`/relocation/${t}/documents`,s,{headers:{"Content-Type":"multipart/form-data"}}),verifyRelocationDocument:(t,s)=>qe.post(`/relocation/${t}/documents/${s}/verify`),rejectRelocationDocument:(t,s,n)=>qe.post(`/relocation/${t}/documents/${s}/reject`,n||{}),getConstitutionalChanges:t=>qe.get("/constitutional-change",t),getConstitutionalChangeMeta:()=>qe.get("/constitutional-change/meta"),getConstitutionalChangeById:t=>qe.get(`/constitutional-change/${t}`),createConstitutionalChange:t=>qe.post("/constitutional-change",t),updateConstitutionalChange:(t,s,n)=>qe.post(`/constitutional-change/${t}/action`,{action:s,...n}),uploadConstitutionalDocuments:(t,s)=>qe.post(`/constitutional-change/${t}/documents`,{documents:s}),verifyConstitutionalDocument:(t,s)=>qe.post(`/constitutional-change/${t}/documents/${s}/verify`),rejectConstitutionalDocument:(t,s,n)=>qe.post(`/constitutional-change/${t}/documents/${s}/reject`,n||{}),getSlaConfigs:()=>qe.get("/master/sla-configs"),saveSlaConfig:t=>qe.post("/master/sla-configs",t),initializeDefaultSlas:()=>qe.post("/master/sla-configs/initialize"),getSlaOperationsDashboard:t=>qe.get("/sla/operations/dashboard",t),postSlaBatchStatus:t=>qe.post("/sla/status/batch",t),getQuestionnaireReminderSettings:()=>qe.get("/sla/settings/questionnaire-reminder"),updateQuestionnaireReminderSettings:t=>qe.put("/sla/settings/questionnaire-reminder",t),getInterviewConfigs:t=>qe.get("/master/interview-configs",t),getInterviewConfigById:t=>qe.get(`/master/interview-configs/${t}`),getInterviewConfigByType:t=>qe.get(`/master/interview-configs/active/${t}`),createInterviewConfig:t=>qe.post("/master/interview-configs",t),updateInterviewConfig:(t,s)=>qe.put(`/master/interview-configs/${t}`,s),deleteInterviewConfig:t=>qe.delete(`/master/interview-configs/${t}`),initializeDefaultInterviewConfigs:()=>qe.post("/master/interview-configs/initialize"),getSystemConfigs:t=>qe.get("/master/system-configs",t),saveSystemConfig:t=>qe.post("/master/system-configs",t),getDealerAsmMappings:()=>qe.get("/master/dealer-asm-mappings"),saveDealerAsmMapping:t=>qe.post("/master/dealer-asm-mappings",t),getEorChecklistForApplication:t=>qe.get(`/eor/application/${t}`),getEorChecklistForRelocation:t=>qe.get(`/eor/relocation/${t}`),updateEorChecklistItem:(t,s)=>qe.post(`/eor/item/${t}`,s),submitEorAudit:(t,s)=>qe.post(`/eor/audit/${t}`,s),submitFddReport:t=>qe.post("/fdd/report",t),getFddAssignment:t=>qe.get(`/fdd/${t}`),assignFddAgency:t=>qe.post("/fdd/assign",t),flagNonResponsive:t=>qe.post("/flag",t),getSystemAuditLogs:t=>qe.get("/audit/system-logs",t),getSystemAuditSummary:()=>qe.get("/audit/system-summary")},cm=Object.freeze(Object.defineProperty({__proto__:null,API:Ee,default:Ee},Symbol.toStringTag,{value:"Module"})),w5={user:null,token:localStorage.getItem("token"),isAuthenticated:!1,loading:!0,error:null},Mm=RP("auth/initializeAuth",async(t,{rejectWithValue:s})=>{const n=localStorage.getItem("token");if(!n)return s("No token found");try{const r=await Ee.getCurrentUser();if(r.ok&&r.data){const{user:a}=r.data;return{user:{id:a.id,name:a.fullName||a.email.split("@")[0],email:a.email,password:"",role:typeof a.role=="string"?a.role:a.roleCode||"User",roleCode:a.roleCode||(typeof a.role=="string"?a.role:"User")},token:n}}return s("Failed to fetch user")}catch(r){return s(r.message||"Session restoration failed")}}),wA=eA({name:"auth",initialState:w5,reducers:{setCredentials:(t,s)=>{t.user=s.payload.user,t.token=s.payload.token,t.isAuthenticated=!0,t.loading=!1,localStorage.setItem("token",s.payload.token)},logout:t=>{t.user=null,t.token=null,t.isAuthenticated=!1,t.loading=!1,localStorage.removeItem("token")},setLoading:(t,s)=>{t.loading=s.payload}},extraReducers:t=>{t.addCase(Mm.pending,s=>{s.loading=!0}).addCase(Mm.fulfilled,(s,n)=>{s.user=n.payload.user,s.token=n.payload.token,s.isAuthenticated=!0,s.loading=!1}).addCase(Mm.rejected,s=>{s.user=null,s.token=null,s.isAuthenticated=!1,s.loading=!1,localStorage.removeItem("token")})}}),{setCredentials:SA,logout:CA,setLoading:vY}=wA.actions,S5=wA.reducer,C5={zones:[],regionalOffices:[],asms:[],zonalManagerMappings:[],zonalManagers:[],roles:[],allStates:[],allDistricts:[],allAreas:[],availablePermissions:[],emailTemplates:[],slaConfigs:[],users:[],ddLeads:[],areasPagination:{total:0,page:1,limit:10,totalPages:0},loading:!1,isAreasLoading:!1,error:null},AA=eA({name:"master",initialState:C5,reducers:{setMasterData:(t,s)=>({...t,...s.payload}),setAreasData:(t,s)=>{t.allAreas=s.payload.data,t.areasPagination=s.payload.pagination},setAreasLoading:(t,s)=>{t.isAreasLoading=s.payload},setZones:(t,s)=>{t.zones=s.payload},setRegionalOffices:(t,s)=>{t.regionalOffices=s.payload},setAsms:(t,s)=>{t.asms=s.payload},setZonalManagerMappings:(t,s)=>{t.zonalManagerMappings=s.payload},setUsers:(t,s)=>{t.users=s.payload},setLoading:(t,s)=>{t.loading=s.payload},setError:(t,s)=>{t.error=s.payload},setDdLeads:(t,s)=>{t.ddLeads=s.payload}}}),{setMasterData:kA,setZones:yY,setRegionalOffices:bY,setAsms:jY,setZonalManagerMappings:NY,setUsers:wY,setLoading:l1,setError:A5,setAreasData:k5,setAreasLoading:o1,setDdLeads:SY}=AA.actions,D5=AA.reducer,R5=bP({reducer:{auth:S5,master:D5}});var zu=Oy();const Hy=wf(zu);/** - * @remix-run/router v1.23.2 - * - * Copyright (c) Remix Software Inc. - * - * 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 Su(){return Su=Object.assign?Object.assign.bind():function(t){for(var s=1;s"u")throw new Error(s)}function Wy(t,s){if(!t){typeof console<"u"&&console.warn(s);try{throw new Error(s)}catch{}}}function _5(){return Math.random().toString(36).substr(2,8)}function d1(t,s){return{usr:t.state,key:t.key,idx:s}}function Qv(t,s,n,r){return n===void 0&&(n=null),Su({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof s=="string"?gd(s):s,{state:n,key:s&&s.key||r||_5()})}function DA(t){let{pathname:s="/",search:n="",hash:r=""}=t;return n&&n!=="?"&&(s+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(s+=r.charAt(0)==="#"?r:"#"+r),s}function gd(t){let s={};if(t){let n=t.indexOf("#");n>=0&&(s.hash=t.substr(n),t=t.substr(0,n));let r=t.indexOf("?");r>=0&&(s.search=t.substr(r),t=t.substr(0,r)),t&&(s.pathname=t)}return s}function T5(t,s,n,r){r===void 0&&(r={});let{window:a=document.defaultView,v5Compat:i=!1}=r,o=a.history,d=Yl.Pop,m=null,f=p();f==null&&(f=0,o.replaceState(Su({},o.state,{idx:f}),""));function p(){return(o.state||{idx:null}).idx}function h(){d=Yl.Pop;let w=p(),j=w==null?null:w-f;f=w,m&&m({action:d,location:v.location,delta:j})}function x(w,j){d=Yl.Push;let b=Qv(v.location,w,j);f=p()+1;let C=d1(b,f),S=v.createHref(b);try{o.pushState(C,"",S)}catch(R){if(R instanceof DOMException&&R.name==="DataCloneError")throw R;a.location.assign(S)}i&&m&&m({action:d,location:v.location,delta:1})}function u(w,j){d=Yl.Replace;let b=Qv(v.location,w,j);f=p();let C=d1(b,f),S=v.createHref(b);o.replaceState(C,"",S),i&&m&&m({action:d,location:v.location,delta:0})}function N(w){let j=a.location.origin!=="null"?a.location.origin:a.location.href,b=typeof w=="string"?w:DA(w);return b=b.replace(/ $/,"%20"),lr(j,"No window.location.(origin|href) available to create URL for href: "+b),new URL(b,j)}let v={get action(){return d},get location(){return t(a,o)},listen(w){if(m)throw new Error("A history only accepts one active listener");return a.addEventListener(c1,h),m=w,()=>{a.removeEventListener(c1,h),m=null}},createHref(w){return s(a,w)},createURL:N,encodeLocation(w){let j=N(w);return{pathname:j.pathname,search:j.search,hash:j.hash}},push:x,replace:u,go(w){return o.go(w)}};return v}var u1;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(u1||(u1={}));function P5(t,s,n){return n===void 0&&(n="/"),O5(t,s,n)}function O5(t,s,n,r){let a=typeof s=="string"?gd(s):s,i=_A(a.pathname||"/",n);if(i==null)return null;let o=RA(t);L5(o);let d=null;for(let m=0;d==null&&m{let m={relativePath:d===void 0?i.path||"":d,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};m.relativePath.startsWith("/")&&(lr(m.relativePath.startsWith(r),'Absolute route path "'+m.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),m.relativePath=m.relativePath.slice(r.length));let f=Jo([r,m.relativePath]),p=n.concat(m);i.children&&i.children.length>0&&(lr(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+f+'".')),RA(i.children,s,p,f)),!(i.path==null&&!i.index)&&s.push({path:f,score:z5(f,i.index),routesMeta:p})};return t.forEach((i,o)=>{var d;if(i.path===""||!((d=i.path)!=null&&d.includes("?")))a(i,o);else for(let m of EA(i.path))a(i,o,m)}),s}function EA(t){let s=t.split("/");if(s.length===0)return[];let[n,...r]=s,a=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return a?[i,""]:[i];let o=EA(r.join("/")),d=[];return d.push(...o.map(m=>m===""?i:[i,m].join("/"))),a&&d.push(...o),d.map(m=>t.startsWith("/")&&m===""?"/":m)}function L5(t){t.sort((s,n)=>s.score!==n.score?n.score-s.score:U5(s.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const I5=/^:[\w-]+$/,M5=3,F5=2,B5=1,$5=10,q5=-2,h1=t=>t==="*";function z5(t,s){let n=t.split("/"),r=n.length;return n.some(h1)&&(r+=q5),s&&(r+=F5),n.filter(a=>!h1(a)).reduce((a,i)=>a+(I5.test(i)?M5:i===""?B5:$5),r)}function U5(t,s){return t.length===s.length&&t.slice(0,-1).every((r,a)=>r===s[a])?t[t.length-1]-s[s.length-1]:0}function V5(t,s,n){let{routesMeta:r}=t,a={},i="/",o=[];for(let d=0;d{let{paramName:x,isOptional:u}=p;if(x==="*"){let v=d[h]||"";o=i.slice(0,i.length-v.length).replace(/(.)\/+$/,"$1")}const N=d[h];return u&&!N?f[x]=void 0:f[x]=(N||"").replace(/%2F/g,"/"),f},{}),pathname:i,pathnameBase:o,pattern:t}}function W5(t,s,n){s===void 0&&(s=!1),n===void 0&&(n=!0),Wy(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=[],a="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,d,m)=>(r.push({paramName:d,isOptional:m!=null}),m?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(r.push({paramName:"*"}),a+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":t!==""&&t!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,s?void 0:"i"),r]}function G5(t){try{return t.split("/").map(s=>decodeURIComponent(s).replace(/\//g,"%2F")).join("/")}catch(s){return Wy(!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 ("+s+").")),t}}function _A(t,s){if(s==="/")return t;if(!t.toLowerCase().startsWith(s.toLowerCase()))return null;let n=s.endsWith("/")?s.length-1:s.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}const K5=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Y5=t=>K5.test(t);function Z5(t,s){s===void 0&&(s="/");let{pathname:n,search:r="",hash:a=""}=typeof t=="string"?gd(t):t,i;if(n)if(Y5(n))i=n;else{if(n.includes("//")){let o=n;n=n.replace(/\/\/+/g,"/"),Wy(!1,"Pathnames cannot have embedded double slashes - normalizing "+(o+" -> "+n))}n.startsWith("/")?i=m1(n.substring(1),"/"):i=m1(n,s)}else i=s;return{pathname:i,search:J5(r),hash:eL(a)}}function m1(t,s){let n=s.replace(/\/+$/,"").split("/");return t.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function fg(t,s,n,r){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+s+"` 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 Q5(t){return t.filter((s,n)=>n===0||s.route.path&&s.route.path.length>0)}function TA(t,s){let n=Q5(t);return s?n.map((r,a)=>a===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function PA(t,s,n,r){r===void 0&&(r=!1);let a;typeof t=="string"?a=gd(t):(a=Su({},t),lr(!a.pathname||!a.pathname.includes("?"),fg("?","pathname","search",a)),lr(!a.pathname||!a.pathname.includes("#"),fg("#","pathname","hash",a)),lr(!a.search||!a.search.includes("#"),fg("#","search","hash",a)));let i=t===""||a.pathname==="",o=i?"/":a.pathname,d;if(o==null)d=n;else{let h=s.length-1;if(!r&&o.startsWith("..")){let x=o.split("/");for(;x[0]==="..";)x.shift(),h-=1;a.pathname=x.join("/")}d=h>=0?s[h]:"/"}let m=Z5(a,d),f=o&&o!=="/"&&o.endsWith("/"),p=(i||o===".")&&n.endsWith("/");return!m.pathname.endsWith("/")&&(f||p)&&(m.pathname+="/"),m}const Jo=t=>t.join("/").replace(/\/\/+/g,"/"),X5=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),J5=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,eL=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function tL(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const OA=["post","put","patch","delete"];new Set(OA);const sL=["get",...OA];new Set(sL);/** - * React Router v6.30.3 - * - * Copyright (c) Remix Software Inc. - * - * 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 Cu(){return Cu=Object.assign?Object.assign.bind():function(t){for(var s=1;s{d.current=!0}),g.useCallback(function(f,p){if(p===void 0&&(p={}),!d.current)return;if(typeof f=="number"){r.go(f);return}let h=PA(f,JSON.parse(o),i,p.relative==="path");t==null&&s!=="/"&&(h.pathname=h.pathname==="/"?s:Jo([s,h.pathname])),(p.replace?r.replace:r.push)(h,p.state,p)},[s,r,o,i,t])}const aL=g.createContext(null);function iL(t){let s=g.useContext(vl).outlet;return s&&g.createElement(aL.Provider,{value:t},s)}function vd(){let{matches:t}=g.useContext(vl),s=t[t.length-1];return s?s.params:{}}function lL(t,s){return oL(t,s)}function oL(t,s,n,r){Vu()||lr(!1);let{navigator:a}=g.useContext(Uu),{matches:i}=g.useContext(vl),o=i[i.length-1],d=o?o.params:{};o&&o.pathname;let m=o?o.pathnameBase:"/";o&&o.route;let f=yl(),p;if(s){var h;let w=typeof s=="string"?gd(s):s;m==="/"||(h=w.pathname)!=null&&h.startsWith(m)||lr(!1),p=w}else p=f;let x=p.pathname||"/",u=x;if(m!=="/"){let w=m.replace(/^\//,"").split("/");u="/"+x.replace(/^\//,"").split("/").slice(w.length).join("/")}let N=P5(t,{pathname:u}),v=mL(N&&N.map(w=>Object.assign({},w,{params:Object.assign({},d,w.params),pathname:Jo([m,a.encodeLocation?a.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?m:Jo([m,a.encodeLocation?a.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),i,n,r);return s&&v?g.createElement(Mf.Provider,{value:{location:Cu({pathname:"/",search:"",hash:"",state:null,key:"default"},p),navigationType:Yl.Pop}},v):v}function cL(){let t=gL(),s=tL(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},s),n?g.createElement("pre",{style:a},n):null,null)}const dL=g.createElement(cL,null);class uL extends g.Component{constructor(s){super(s),this.state={location:s.location,revalidation:s.revalidation,error:s.error}}static getDerivedStateFromError(s){return{error:s}}static getDerivedStateFromProps(s,n){return n.location!==s.location||n.revalidation!=="idle"&&s.revalidation==="idle"?{error:s.error,location:s.location,revalidation:s.revalidation}:{error:s.error!==void 0?s.error:n.error,location:n.location,revalidation:s.revalidation||n.revalidation}}componentDidCatch(s,n){console.error("React Router caught the following error during render",s,n)}render(){return this.state.error!==void 0?g.createElement(vl.Provider,{value:this.props.routeContext},g.createElement(LA.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function hL(t){let{routeContext:s,match:n,children:r}=t,a=g.useContext(Gy);return a&&a.static&&a.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=n.route.id),g.createElement(vl.Provider,{value:s},r)}function mL(t,s,n,r){var a;if(s===void 0&&(s=[]),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&&s.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let o=t,d=(a=n)==null?void 0:a.errors;if(d!=null){let p=o.findIndex(h=>h.route.id&&(d==null?void 0:d[h.route.id])!==void 0);p>=0||lr(!1),o=o.slice(0,Math.min(o.length,p+1))}let m=!1,f=-1;if(n&&r&&r.v7_partialHydration)for(let p=0;p=0?o=o.slice(0,f+1):o=[o[0]];break}}}return o.reduceRight((p,h,x)=>{let u,N=!1,v=null,w=null;n&&(u=d&&h.route.id?d[h.route.id]:void 0,v=h.route.errorElement||dL,m&&(f<0&&x===0?(yL("route-fallback"),N=!0,w=null):f===x&&(N=!0,w=h.route.hydrateFallbackElement||null)));let j=s.concat(o.slice(0,x+1)),b=()=>{let C;return u?C=v:N?C=w:h.route.Component?C=g.createElement(h.route.Component,null):h.route.element?C=h.route.element:C=p,g.createElement(hL,{match:h,routeContext:{outlet:p,matches:j,isDataRoute:n!=null},children:C})};return n&&(h.route.ErrorBoundary||h.route.errorElement||x===0)?g.createElement(uL,{location:n.location,revalidation:n.revalidation,component:v,error:u,children:b(),routeContext:{outlet:null,matches:j,isDataRoute:!0}}):b()},null)}var MA=(function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t})(MA||{}),FA=(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})(FA||{});function fL(t){let s=g.useContext(Gy);return s||lr(!1),s}function pL(t){let s=g.useContext(nL);return s||lr(!1),s}function xL(t){let s=g.useContext(vl);return s||lr(!1),s}function BA(t){let s=xL(),n=s.matches[s.matches.length-1];return n.route.id||lr(!1),n.route.id}function gL(){var t;let s=g.useContext(LA),n=pL(),r=BA();return s!==void 0?s:(t=n.errors)==null?void 0:t[r]}function vL(){let{router:t}=fL(MA.UseNavigateStable),s=BA(FA.UseNavigateStable),n=g.useRef(!1);return IA(()=>{n.current=!0}),g.useCallback(function(a,i){i===void 0&&(i={}),n.current&&(typeof a=="number"?t.navigate(a):t.navigate(a,Cu({fromRouteId:s},i)))},[t,s])}const f1={};function yL(t,s,n){f1[t]||(f1[t]=!0)}function bL(t,s){t==null||t.v7_startTransition,t==null||t.v7_relativeSplatPath}function Yn(t){let{to:s,replace:n,state:r,relative:a}=t;Vu()||lr(!1);let{future:i,static:o}=g.useContext(Uu),{matches:d}=g.useContext(vl),{pathname:m}=yl(),f=tr(),p=PA(s,TA(d,i.v7_relativeSplatPath),m,a==="path"),h=JSON.stringify(p);return g.useEffect(()=>f(JSON.parse(h),{replace:n,state:r,relative:a}),[f,h,a,n,r]),null}function jL(t){return iL(t.context)}function ks(t){lr(!1)}function NL(t){let{basename:s="/",children:n=null,location:r,navigationType:a=Yl.Pop,navigator:i,static:o=!1,future:d}=t;Vu()&&lr(!1);let m=s.replace(/^\/*/,"/"),f=g.useMemo(()=>({basename:m,navigator:i,static:o,future:Cu({v7_relativeSplatPath:!1},d)}),[m,d,i,o]);typeof r=="string"&&(r=gd(r));let{pathname:p="/",search:h="",hash:x="",state:u=null,key:N="default"}=r,v=g.useMemo(()=>{let w=_A(p,m);return w==null?null:{location:{pathname:w,search:h,hash:x,state:u,key:N},navigationType:a}},[m,p,h,x,u,N,a]);return v==null?null:g.createElement(Uu.Provider,{value:f},g.createElement(Mf.Provider,{children:n,value:v}))}function Xv(t){let{children:s,location:n}=t;return lL(Jv(s),n)}new Promise(()=>{});function Jv(t,s){s===void 0&&(s=[]);let n=[];return g.Children.forEach(t,(r,a)=>{if(!g.isValidElement(r))return;let i=[...s,a];if(r.type===g.Fragment){n.push.apply(n,Jv(r.props.children,i));return}r.type!==ks&&lr(!1),!r.props.index||!r.props.children||lr(!1);let o={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=Jv(r.props.children,i)),n.push(o)}),n}/** - * React Router DOM v6.30.3 - * - * Copyright (c) Remix Software Inc. - * - * 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 - */const wL="6";try{window.__reactRouterVersion=wL}catch{}const SL="startTransition",p1=Sf[SL];function CL(t){let{basename:s,children:n,future:r,window:a}=t,i=g.useRef();i.current==null&&(i.current=E5({window:a,v5Compat:!0}));let o=i.current,[d,m]=g.useState({action:o.action,location:o.location}),{v7_startTransition:f}=r||{},p=g.useCallback(h=>{f&&p1?p1(()=>m(h)):m(h)},[m,f]);return g.useLayoutEffect(()=>o.listen(p),[o,p]),g.useEffect(()=>bL(r),[r]),g.createElement(NL,{basename:s,children:n,location:d.location,navigationType:d.action,navigator:o,future:r})}var x1;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(x1||(x1={}));var g1;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(g1||(g1={}));const v1=({children:t,allowedRoles:s,excludeRoles:n,redirectTo:r})=>{const{user:a,isAuthenticated:i,loading:o}=In(h=>h.auth),d=yl(),m=String((a==null?void 0:a.role)||(a==null?void 0:a.roleCode)||"").trim().toLowerCase(),f=(s||[]).map(h=>String(h).trim().toLowerCase()),p=(n||[]).map(h=>String(h).trim().toLowerCase());return o?e.jsx("div",{className:"flex h-screen items-center justify-center",children:"Loading..."}):i?n&&a&&p.includes(m)?m==="prospective dealer"?e.jsx(Yn,{to:"/prospective-dashboard",replace:!0}):e.jsx(Yn,{to:r||"/dashboard",replace:!0}):s&&a&&!f.includes(m)?e.jsx(Yn,{to:r||"/dashboard",replace:!0}):e.jsx(e.Fragment,{children:t}):e.jsx(Yn,{to:"/admin-login",state:{from:d},replace:!0})};function y1(t,s){if(typeof t=="function")return t(s);t!=null&&(t.current=s)}function Xr(...t){return s=>{let n=!1;const r=t.map(a=>{const i=y1(a,s);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let a=0;a{let{children:i,...o}=r;$A(i)&&typeof rf=="function"&&(i=rf(i._payload));const d=g.Children.toArray(i),m=d.find(EL);if(m){const f=m.props.children,p=d.map(h=>h===m?g.Children.count(f)>1?g.Children.only(null):g.isValidElement(f)?f.props.children:null:h);return e.jsx(s,{...o,ref:a,children:g.isValidElement(f)?g.cloneElement(f,void 0,p):null})}return e.jsx(s,{...o,ref:a,children:i})});return n.displayName=`${t}.Slot`,n}var qA=Hu("Slot");function DL(t){const s=g.forwardRef((n,r)=>{let{children:a,...i}=n;if($A(a)&&typeof rf=="function"&&(a=rf(a._payload)),g.isValidElement(a)){const o=TL(a),d=_L(i,a.props);return a.type!==g.Fragment&&(d.ref=r?Xr(r,o):o),g.cloneElement(a,d)}return g.Children.count(a)>1?g.Children.only(null):null});return s.displayName=`${t}.SlotClone`,s}var RL=Symbol("radix.slottable");function EL(t){return g.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===RL}function _L(t,s){const n={...s};for(const r in s){const a=t[r],i=s[r];/^on[A-Z]/.test(r)?a&&i?n[r]=(...d)=>{const m=i(...d);return a(...d),m}:a&&(n[r]=a):r==="style"?n[r]={...a,...i}:r==="className"&&(n[r]=[a,i].filter(Boolean).join(" "))}return{...t,...n}}function TL(t){var r,a;let s=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=s&&"isReactWarning"in s&&s.isReactWarning;return n?t.ref:(s=(a=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:a.get,n=s&&"isReactWarning"in s&&s.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function zA(t){var s,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var a=t.length;for(s=0;stypeof t=="boolean"?`${t}`:t===0?"0":t,j1=UA,Ky=(t,s)=>n=>{var r;if((s==null?void 0:s.variants)==null)return j1(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:a,defaultVariants:i}=s,o=Object.keys(a).map(f=>{const p=n==null?void 0:n[f],h=i==null?void 0:i[f];if(p===null)return null;const x=b1(p)||b1(h);return a[f][x]}),d=n&&Object.entries(n).reduce((f,p)=>{let[h,x]=p;return x===void 0||(f[h]=x),f},{}),m=s==null||(r=s.compoundVariants)===null||r===void 0?void 0:r.reduce((f,p)=>{let{class:h,className:x,...u}=p;return Object.entries(u).every(N=>{let[v,w]=N;return Array.isArray(w)?w.includes({...i,...d}[v]):{...i,...d}[v]===w})?[...f,h,x]:f},[]);return j1(t,o,m,n==null?void 0:n.class,n==null?void 0:n.className)},Yy="-",PL=t=>{const s=LL(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:o=>{const d=o.split(Yy);return d[0]===""&&d.length!==1&&d.shift(),VA(d,s)||OL(o)},getConflictingClassGroupIds:(o,d)=>{const m=n[o]||[];return d&&r[o]?[...m,...r[o]]:m}}},VA=(t,s)=>{var o;if(t.length===0)return s.classGroupId;const n=t[0],r=s.nextPart.get(n),a=r?VA(t.slice(1),r):void 0;if(a)return a;if(s.validators.length===0)return;const i=t.join(Yy);return(o=s.validators.find(({validator:d})=>d(i)))==null?void 0:o.classGroupId},N1=/^\[(.+)\]$/,OL=t=>{if(N1.test(t)){const s=N1.exec(t)[1],n=s==null?void 0:s.substring(0,s.indexOf(":"));if(n)return"arbitrary.."+n}},LL=t=>{const{theme:s,prefix:n}=t,r={nextPart:new Map,validators:[]};return ML(Object.entries(t.classGroups),n).forEach(([i,o])=>{ey(o,r,i,s)}),r},ey=(t,s,n,r)=>{t.forEach(a=>{if(typeof a=="string"){const i=a===""?s:w1(s,a);i.classGroupId=n;return}if(typeof a=="function"){if(IL(a)){ey(a(r),s,n,r);return}s.validators.push({validator:a,classGroupId:n});return}Object.entries(a).forEach(([i,o])=>{ey(o,w1(s,i),n,r)})})},w1=(t,s)=>{let n=t;return s.split(Yy).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},IL=t=>t.isThemeGetter,ML=(t,s)=>s?t.map(([n,r])=>{const a=r.map(i=>typeof i=="string"?s+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([o,d])=>[s+o,d])):i);return[n,a]}):t,FL=t=>{if(t<1)return{get:()=>{},set:()=>{}};let s=0,n=new Map,r=new Map;const a=(i,o)=>{n.set(i,o),s++,s>t&&(s=0,r=n,n=new Map)};return{get(i){let o=n.get(i);if(o!==void 0)return o;if((o=r.get(i))!==void 0)return a(i,o),o},set(i,o){n.has(i)?n.set(i,o):a(i,o)}}},HA="!",BL=t=>{const{separator:s,experimentalParseClassName:n}=t,r=s.length===1,a=s[0],i=s.length,o=d=>{const m=[];let f=0,p=0,h;for(let w=0;wp?h-p:void 0;return{modifiers:m,hasImportantModifier:u,baseClassName:N,maybePostfixModifierPosition:v}};return n?d=>n({className:d,parseClassName:o}):o},$L=t=>{if(t.length<=1)return t;const s=[];let n=[];return t.forEach(r=>{r[0]==="["?(s.push(...n.sort(),r),n=[]):n.push(r)}),s.push(...n.sort()),s},qL=t=>({cache:FL(t.cacheSize),parseClassName:BL(t),...PL(t)}),zL=/\s+/,UL=(t,s)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a}=s,i=[],o=t.trim().split(zL);let d="";for(let m=o.length-1;m>=0;m-=1){const f=o[m],{modifiers:p,hasImportantModifier:h,baseClassName:x,maybePostfixModifierPosition:u}=n(f);let N=!!u,v=r(N?x.substring(0,u):x);if(!v){if(!N){d=f+(d.length>0?" "+d:d);continue}if(v=r(x),!v){d=f+(d.length>0?" "+d:d);continue}N=!1}const w=$L(p).join(":"),j=h?w+HA:w,b=j+v;if(i.includes(b))continue;i.push(b);const C=a(v,N);for(let S=0;S0?" "+d:d)}return d};function VL(){let t=0,s,n,r="";for(;t{if(typeof t=="string")return t;let s,n="";for(let r=0;rh(p),t());return n=qL(f),r=n.cache.get,a=n.cache.set,i=d,d(m)}function d(m){const f=r(m);if(f)return f;const p=UL(m,n);return a(m,p),p}return function(){return i(VL.apply(null,arguments))}}const On=t=>{const s=n=>n[t]||[];return s.isThemeGetter=!0,s},GA=/^\[(?:([a-z-]+):)?(.+)\]$/i,WL=/^\d+\/\d+$/,GL=new Set(["px","full","screen"]),KL=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,YL=/\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$/,ZL=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,QL=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,XL=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,al=t=>Qc(t)||GL.has(t)||WL.test(t),Hl=t=>yd(t,"length",iI),Qc=t=>!!t&&!Number.isNaN(Number(t)),pg=t=>yd(t,"number",Qc),eu=t=>!!t&&Number.isInteger(Number(t)),JL=t=>t.endsWith("%")&&Qc(t.slice(0,-1)),Zs=t=>GA.test(t),Wl=t=>KL.test(t),eI=new Set(["length","size","percentage"]),tI=t=>yd(t,eI,KA),sI=t=>yd(t,"position",KA),nI=new Set(["image","url"]),rI=t=>yd(t,nI,oI),aI=t=>yd(t,"",lI),tu=()=>!0,yd=(t,s,n)=>{const r=GA.exec(t);return r?r[1]?typeof s=="string"?r[1]===s:s.has(r[1]):n(r[2]):!1},iI=t=>YL.test(t)&&!ZL.test(t),KA=()=>!1,lI=t=>QL.test(t),oI=t=>XL.test(t),cI=()=>{const t=On("colors"),s=On("spacing"),n=On("blur"),r=On("brightness"),a=On("borderColor"),i=On("borderRadius"),o=On("borderSpacing"),d=On("borderWidth"),m=On("contrast"),f=On("grayscale"),p=On("hueRotate"),h=On("invert"),x=On("gap"),u=On("gradientColorStops"),N=On("gradientColorStopPositions"),v=On("inset"),w=On("margin"),j=On("opacity"),b=On("padding"),C=On("saturate"),S=On("scale"),R=On("sepia"),_=On("skew"),A=On("space"),E=On("translate"),q=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto",Zs,s],P=()=>[Zs,s],L=()=>["",al,Hl],$=()=>["auto",Qc,Zs],Y=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Z=()=>["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"],U=()=>["start","end","center","between","around","evenly","stretch"],M=()=>["","0",Zs],z=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>[Qc,Zs];return{cacheSize:500,separator:":",theme:{colors:[tu],spacing:[al,Hl],blur:["none","",Wl,Zs],brightness:T(),borderColor:[t],borderRadius:["none","","full",Wl,Zs],borderSpacing:P(),borderWidth:L(),contrast:T(),grayscale:M(),hueRotate:T(),invert:M(),gap:P(),gradientColorStops:[t],gradientColorStopPositions:[JL,Hl],inset:D(),margin:D(),opacity:T(),padding:P(),saturate:T(),scale:T(),sepia:M(),skew:T(),space:P(),translate:P()},classGroups:{aspect:[{aspect:["auto","square","video",Zs]}],container:["container"],columns:[{columns:[Wl]}],"break-after":[{"break-after":z()}],"break-before":[{"break-before":z()}],"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:[...Y(),Zs]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:q()}],"overscroll-x":[{"overscroll-x":q()}],"overscroll-y":[{"overscroll-y":q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",eu,Zs]}],basis:[{basis:D()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Zs]}],grow:[{grow:M()}],shrink:[{shrink:M()}],order:[{order:["first","last","none",eu,Zs]}],"grid-cols":[{"grid-cols":[tu]}],"col-start-end":[{col:["auto",{span:["full",eu,Zs]},Zs]}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":[tu]}],"row-start-end":[{row:["auto",{span:[eu,Zs]},Zs]}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Zs]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Zs]}],gap:[{gap:[x]}],"gap-x":[{"gap-x":[x]}],"gap-y":[{"gap-y":[x]}],"justify-content":[{justify:["normal",...U()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...U(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...U(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[A]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[A]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Zs,s]}],"min-w":[{"min-w":[Zs,s,"min","max","fit"]}],"max-w":[{"max-w":[Zs,s,"none","full","min","max","fit","prose",{screen:[Wl]},Wl]}],h:[{h:[Zs,s,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Zs,s,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Zs,s,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Zs,s,"auto","min","max","fit"]}],"font-size":[{text:["base",Wl,Hl]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",pg]}],"font-family":[{font:[tu]}],"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",Zs]}],"line-clamp":[{"line-clamp":["none",Qc,pg]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",al,Zs]}],"list-image":[{"list-image":["none",Zs]}],"list-style-type":[{list:["none","disc","decimal",Zs]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[j]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[j]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Z(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",al,Hl]}],"underline-offset":[{"underline-offset":["auto",al,Zs]}],"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:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Zs]}],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",Zs]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[j]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Y(),sI]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",tI]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},rI]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[N]}],"gradient-via-pos":[{via:[N]}],"gradient-to-pos":[{to:[N]}],"gradient-from":[{from:[u]}],"gradient-via":[{via:[u]}],"gradient-to":[{to:[u]}],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:[d]}],"border-w-x":[{"border-x":[d]}],"border-w-y":[{"border-y":[d]}],"border-w-s":[{"border-s":[d]}],"border-w-e":[{"border-e":[d]}],"border-w-t":[{"border-t":[d]}],"border-w-r":[{"border-r":[d]}],"border-w-b":[{"border-b":[d]}],"border-w-l":[{"border-l":[d]}],"border-opacity":[{"border-opacity":[j]}],"border-style":[{border:[...Z(),"hidden"]}],"divide-x":[{"divide-x":[d]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[d]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[j]}],"divide-style":[{divide:Z()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...Z()]}],"outline-offset":[{"outline-offset":[al,Zs]}],"outline-w":[{outline:[al,Hl]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:L()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[j]}],"ring-offset-w":[{"ring-offset":[al,Hl]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",Wl,aI]}],"shadow-color":[{shadow:[tu]}],opacity:[{opacity:[j]}],"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:[m]}],"drop-shadow":[{"drop-shadow":["","none",Wl,Zs]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[p]}],invert:[{invert:[h]}],saturate:[{saturate:[C]}],sepia:[{sepia:[R]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[m]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[p]}],"backdrop-invert":[{"backdrop-invert":[h]}],"backdrop-opacity":[{"backdrop-opacity":[j]}],"backdrop-saturate":[{"backdrop-saturate":[C]}],"backdrop-sepia":[{"backdrop-sepia":[R]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Zs]}],duration:[{duration:T()}],ease:[{ease:["linear","in","out","in-out",Zs]}],delay:[{delay:T()}],animate:[{animate:["none","spin","ping","pulse","bounce",Zs]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[eu,Zs]}],"translate-x":[{"translate-x":[E]}],"translate-y":[{"translate-y":[E]}],"skew-x":[{"skew-x":[_]}],"skew-y":[{"skew-y":[_]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Zs]}],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",Zs]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"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",Zs]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[al,Hl,pg]}],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"]}}},dI=HL(cI);function Nt(...t){return dI(UA(t))}function Yt(t,s="full"){const n=new Date(t),r={day:"2-digit",month:"short",year:"numeric"};return(s==="full"||s==="time")&&(r.hour="2-digit",r.minute="2-digit",r.hour12=!0),s==="time"?n.toLocaleTimeString("en-IN",{hour:"2-digit",minute:"2-digit",hour12:!0}):s==="full"?n.toLocaleString("en-IN",r):n.toLocaleDateString("en-IN",r)}const rd=Ky("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background text-foreground hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9 rounded-md"}},defaultVariants:{variant:"default",size:"default"}}),se=g.forwardRef(({className:t,variant:s,size:n,asChild:r=!1,...a},i)=>{const o=r?qA:"button";return e.jsx(o,{"data-slot":"button",className:Nt(rd({variant:s,size:n,className:t})),ref:i,...a})});se.displayName="Button";const at=g.forwardRef(({className:t,type:s,...n},r)=>e.jsx("input",{type:s,ref:r,"data-slot":"input",className:Nt("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border px-3 py-1 text-base bg-input-background transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",t),...n}));at.displayName="Input";function Ws({className:t,...s}){return e.jsx("textarea",{"data-slot":"textarea",className:Nt("resize-none border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-input-background px-3 py-2 text-base transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),...s})}function uI(t,s){const n=g.createContext(s),r=i=>{const{children:o,...d}=i,m=g.useMemo(()=>d,Object.values(d));return e.jsx(n.Provider,{value:m,children:o})};r.displayName=t+"Provider";function a(i){const o=g.useContext(n);if(o)return o;if(s!==void 0)return s;throw new Error(`\`${i}\` must be used within \`${t}\``)}return[r,a]}function ga(t,s=[]){let n=[];function r(i,o){const d=g.createContext(o),m=n.length;n=[...n,o];const f=h=>{var j;const{scope:x,children:u,...N}=h,v=((j=x==null?void 0:x[t])==null?void 0:j[m])||d,w=g.useMemo(()=>N,Object.values(N));return e.jsx(v.Provider,{value:w,children:u})};f.displayName=i+"Provider";function p(h,x){var v;const u=((v=x==null?void 0:x[t])==null?void 0:v[m])||d,N=g.useContext(u);if(N)return N;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${i}\``)}return[f,p]}const a=()=>{const i=n.map(o=>g.createContext(o));return function(d){const m=(d==null?void 0:d[t])||i;return g.useMemo(()=>({[`__scope${t}`]:{...d,[t]:m}}),[d,m])}};return a.scopeName=t,[r,hI(a,...s)]}function hI(...t){const s=t[0];if(t.length===1)return s;const n=()=>{const r=t.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(i){const o=r.reduce((d,{useScope:m,scopeName:f})=>{const h=m(i)[`__scope${f}`];return{...d,...h}},{});return g.useMemo(()=>({[`__scope${s.scopeName}`]:o}),[o])}};return n.scopeName=s.scopeName,n}function Kt(t,s,{checkForDefaultPrevented:n=!0}={}){return function(a){if(t==null||t(a),n===!1||!a.defaultPrevented)return s==null?void 0:s(a)}}var cr=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},mI=Sf[" useInsertionEffect ".trim().toString()]||cr;function Bi({prop:t,defaultProp:s,onChange:n=()=>{},caller:r}){const[a,i,o]=fI({defaultProp:s,onChange:n}),d=t!==void 0,m=d?t:a;{const p=g.useRef(t!==void 0);g.useEffect(()=>{const h=p.current;h!==d&&console.warn(`${r} is changing from ${h?"controlled":"uncontrolled"} to ${d?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),p.current=d},[d,r])}const f=g.useCallback(p=>{var h;if(d){const x=pI(p)?p(t):p;x!==t&&((h=o.current)==null||h.call(o,x))}else i(p)},[d,t,i,o]);return[m,f]}function fI({defaultProp:t,onChange:s}){const[n,r]=g.useState(t),a=g.useRef(n),i=g.useRef(s);return mI(()=>{i.current=s},[s]),g.useEffect(()=>{var o;a.current!==n&&((o=i.current)==null||o.call(i,n),a.current=n)},[n,a]),[n,r,i]}function pI(t){return typeof t=="function"}function Zy(t){const s=g.useRef({value:t,previous:t});return g.useMemo(()=>(s.current.value!==t&&(s.current.previous=s.current.value,s.current.value=t),s.current.previous),[t])}function Qy(t){const[s,n]=g.useState(void 0);return cr(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const r=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const i=a[0];let o,d;if("borderBoxSize"in i){const m=i.borderBoxSize,f=Array.isArray(m)?m[0]:m;o=f.inlineSize,d=f.blockSize}else o=t.offsetWidth,d=t.offsetHeight;n({width:o,height:d})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else n(void 0)},[t]),s}function xI(t,s){return g.useReducer((n,r)=>s[n][r]??n,t)}var Dr=t=>{const{present:s,children:n}=t,r=gI(s),a=typeof n=="function"?n({present:r.isPresent}):g.Children.only(n),i=Gs(r.ref,vI(a));return typeof n=="function"||r.isPresent?g.cloneElement(a,{ref:i}):null};Dr.displayName="Presence";function gI(t){const[s,n]=g.useState(),r=g.useRef(null),a=g.useRef(t),i=g.useRef("none"),o=t?"mounted":"unmounted",[d,m]=xI(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const f=dm(r.current);i.current=d==="mounted"?f:"none"},[d]),cr(()=>{const f=r.current,p=a.current;if(p!==t){const x=i.current,u=dm(f);t?m("MOUNT"):u==="none"||(f==null?void 0:f.display)==="none"?m("UNMOUNT"):m(p&&x!==u?"ANIMATION_OUT":"UNMOUNT"),a.current=t}},[t,m]),cr(()=>{if(s){let f;const p=s.ownerDocument.defaultView??window,h=u=>{const v=dm(r.current).includes(CSS.escape(u.animationName));if(u.target===s&&v&&(m("ANIMATION_END"),!a.current)){const w=s.style.animationFillMode;s.style.animationFillMode="forwards",f=p.setTimeout(()=>{s.style.animationFillMode==="forwards"&&(s.style.animationFillMode=w)})}},x=u=>{u.target===s&&(i.current=dm(r.current))};return s.addEventListener("animationstart",x),s.addEventListener("animationcancel",h),s.addEventListener("animationend",h),()=>{p.clearTimeout(f),s.removeEventListener("animationstart",x),s.removeEventListener("animationcancel",h),s.removeEventListener("animationend",h)}}else m("ANIMATION_END")},[s,m]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:g.useCallback(f=>{r.current=f?getComputedStyle(f):null,n(f)},[])}}function dm(t){return(t==null?void 0:t.animationName)||"none"}function vI(t){var r,a;let s=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=s&&"isReactWarning"in s&&s.isReactWarning;return n?t.ref:(s=(a=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:a.get,n=s&&"isReactWarning"in s&&s.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function yI(t){const s=bI(t),n=g.forwardRef((r,a)=>{const{children:i,...o}=r,d=g.Children.toArray(i),m=d.find(NI);if(m){const f=m.props.children,p=d.map(h=>h===m?g.Children.count(f)>1?g.Children.only(null):g.isValidElement(f)?f.props.children:null:h);return e.jsx(s,{...o,ref:a,children:g.isValidElement(f)?g.cloneElement(f,void 0,p):null})}return e.jsx(s,{...o,ref:a,children:i})});return n.displayName=`${t}.Slot`,n}function bI(t){const s=g.forwardRef((n,r)=>{const{children:a,...i}=n;if(g.isValidElement(a)){const o=SI(a),d=wI(i,a.props);return a.type!==g.Fragment&&(d.ref=r?Xr(r,o):o),g.cloneElement(a,d)}return g.Children.count(a)>1?g.Children.only(null):null});return s.displayName=`${t}.SlotClone`,s}var jI=Symbol("radix.slottable");function NI(t){return g.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===jI}function wI(t,s){const n={...s};for(const r in s){const a=t[r],i=s[r];/^on[A-Z]/.test(r)?a&&i?n[r]=(...d)=>{const m=i(...d);return a(...d),m}:a&&(n[r]=a):r==="style"?n[r]={...a,...i}:r==="className"&&(n[r]=[a,i].filter(Boolean).join(" "))}return{...t,...n}}function SI(t){var r,a;let s=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=s&&"isReactWarning"in s&&s.isReactWarning;return n?t.ref:(s=(a=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:a.get,n=s&&"isReactWarning"in s&&s.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var CI=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],js=CI.reduce((t,s)=>{const n=yI(`Primitive.${s}`),r=g.forwardRef((a,i)=>{const{asChild:o,...d}=a,m=o?n:s;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),e.jsx(m,{...d,ref:i})});return r.displayName=`Primitive.${s}`,{...t,[s]:r}},{});function YA(t,s){t&&zu.flushSync(()=>t.dispatchEvent(s))}var Ff="Checkbox",[AI]=ga(Ff),[kI,Xy]=AI(Ff);function DI(t){const{__scopeCheckbox:s,checked:n,children:r,defaultChecked:a,disabled:i,form:o,name:d,onCheckedChange:m,required:f,value:p="on",internal_do_not_use_render:h}=t,[x,u]=Bi({prop:n,defaultProp:a??!1,onChange:m,caller:Ff}),[N,v]=g.useState(null),[w,j]=g.useState(null),b=g.useRef(!1),C=N?!!o||!!N.closest("form"):!0,S={checked:x,disabled:i,setChecked:u,control:N,setControl:v,name:d,form:o,value:p,hasConsumerStoppedPropagationRef:b,required:f,defaultChecked:Ql(a)?!1:a,isFormControl:C,bubbleInput:w,setBubbleInput:j};return e.jsx(kI,{scope:s,...S,children:RI(h)?h(S):r})}var ZA="CheckboxTrigger",QA=g.forwardRef(({__scopeCheckbox:t,onKeyDown:s,onClick:n,...r},a)=>{const{control:i,value:o,disabled:d,checked:m,required:f,setControl:p,setChecked:h,hasConsumerStoppedPropagationRef:x,isFormControl:u,bubbleInput:N}=Xy(ZA,t),v=Gs(a,p),w=g.useRef(m);return g.useEffect(()=>{const j=i==null?void 0:i.form;if(j){const b=()=>h(w.current);return j.addEventListener("reset",b),()=>j.removeEventListener("reset",b)}},[i,h]),e.jsx(js.button,{type:"button",role:"checkbox","aria-checked":Ql(m)?"mixed":m,"aria-required":f,"data-state":nk(m),"data-disabled":d?"":void 0,disabled:d,value:o,...r,ref:v,onKeyDown:Kt(s,j=>{j.key==="Enter"&&j.preventDefault()}),onClick:Kt(n,j=>{h(b=>Ql(b)?!0:!b),N&&u&&(x.current=j.isPropagationStopped(),x.current||j.stopPropagation())})})});QA.displayName=ZA;var XA=g.forwardRef((t,s)=>{const{__scopeCheckbox:n,name:r,checked:a,defaultChecked:i,required:o,disabled:d,value:m,onCheckedChange:f,form:p,...h}=t;return e.jsx(DI,{__scopeCheckbox:n,checked:a,defaultChecked:i,disabled:d,required:o,onCheckedChange:f,name:r,form:p,value:m,internal_do_not_use_render:({isFormControl:x})=>e.jsxs(e.Fragment,{children:[e.jsx(QA,{...h,ref:s,__scopeCheckbox:n}),x&&e.jsx(sk,{__scopeCheckbox:n})]})})});XA.displayName=Ff;var JA="CheckboxIndicator",ek=g.forwardRef((t,s)=>{const{__scopeCheckbox:n,forceMount:r,...a}=t,i=Xy(JA,n);return e.jsx(Dr,{present:r||Ql(i.checked)||i.checked===!0,children:e.jsx(js.span,{"data-state":nk(i.checked),"data-disabled":i.disabled?"":void 0,...a,ref:s,style:{pointerEvents:"none",...t.style}})})});ek.displayName=JA;var tk="CheckboxBubbleInput",sk=g.forwardRef(({__scopeCheckbox:t,...s},n)=>{const{control:r,hasConsumerStoppedPropagationRef:a,checked:i,defaultChecked:o,required:d,disabled:m,name:f,value:p,form:h,bubbleInput:x,setBubbleInput:u}=Xy(tk,t),N=Gs(n,u),v=Zy(i),w=Qy(r);g.useEffect(()=>{const b=x;if(!b)return;const C=window.HTMLInputElement.prototype,R=Object.getOwnPropertyDescriptor(C,"checked").set,_=!a.current;if(v!==i&&R){const A=new Event("click",{bubbles:_});b.indeterminate=Ql(i),R.call(b,Ql(i)?!1:i),b.dispatchEvent(A)}},[x,v,i,a]);const j=g.useRef(Ql(i)?!1:i);return e.jsx(js.input,{type:"checkbox","aria-hidden":!0,defaultChecked:o??j.current,required:d,disabled:m,name:f,value:p,form:h,...s,tabIndex:-1,ref:N,style:{...s.style,...w,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});sk.displayName=tk;function RI(t){return typeof t=="function"}function Ql(t){return t==="indeterminate"}function nk(t){return Ql(t)?"indeterminate":t?"checked":"unchecked"}/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */var EI={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.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const _I=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),gt=(t,s)=>{const n=g.forwardRef(({color:r="currentColor",size:a=24,strokeWidth:i=2,absoluteStrokeWidth:o,className:d="",children:m,...f},p)=>g.createElement("svg",{ref:p,...EI,width:a,height:a,stroke:r,strokeWidth:o?Number(i)*24/Number(a):i,className:["lucide",`lucide-${_I(t)}`,d].join(" "),...f},[...s.map(([h,x])=>g.createElement(h,x)),...Array.isArray(m)?m:[m]]));return n.displayName=`${t}`,n};/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ad=gt("Activity",[["path",{d:"M22 12h-4l-3 9L9 3l-3 9H2",key:"d5dnw9"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const sn=gt("AlertCircle",[["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.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ha=gt("AlertTriangle",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z",key:"c3ski4"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Jr=gt("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ko=gt("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const TI=gt("ArrowUpDown",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const rk=gt("Award",[["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}],["path",{d:"M15.477 12.89 17 22l-5-3-5 3 1.523-9.11",key:"em7aur"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Jy=gt("Ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const PI=gt("Banknote",[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"2",key:"9lu3g6"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"M6 12h.01M18 12h.01",key:"113zkx"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const OI=gt("BarChart3",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Au=gt("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const S1=gt("Bike",[["circle",{cx:"18.5",cy:"17.5",r:"3.5",key:"15x4ox"}],["circle",{cx:"5.5",cy:"17.5",r:"3.5",key:"1noe27"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["path",{d:"M12 17.5V14l-3-3 4-3 2 3h2",key:"1npguv"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const so=gt("Building2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const id=gt("Building",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["path",{d:"M9 22v-4h6v4",key:"r93iot"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ak=gt("Calculator",[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",key:"1nb95v"}],["line",{x1:"8",x2:"16",y1:"6",y2:"6",key:"x4nwl0"}],["line",{x1:"16",x2:"16",y1:"14",y2:"18",key:"wjye3r"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M8 18h.01",key:"lrp35t"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const dr=gt("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.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Zn=gt("CheckCircle2",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const un=gt("CheckCircle",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const LI=gt("CheckSquare",[["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}],["path",{d:"M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11",key:"1jnkn4"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Hn=gt("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Aa=gt("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const lo=gt("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const bi=gt("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const yu=gt("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const II=gt("ChevronsUpDown",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ik=gt("ClipboardCheck",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"m9 14 2 2 4-4",key:"df797q"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const rc=gt("ClipboardList",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const vn=gt("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const C1=gt("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.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Wu=gt("CreditCard",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ty=gt("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ji=gt("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.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const lk=gt("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const MI=gt("EyeOff",[["path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24",key:"1jxqfv"}],["path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",key:"9wicm4"}],["path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61",key:"1jreej"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const yn=gt("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const A1=gt("FastForward",[["polygon",{points:"13 19 22 12 13 5 13 19",key:"587y9g"}],["polygon",{points:"2 19 11 12 2 5 2 19",key:"3pweh0"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const hu=gt("FileCheck",[["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:"m9 15 2 2 4-4",key:"1grp1n"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const FI=gt("FileDown",[["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:"M12 18v-6",key:"17g6i2"}],["path",{d:"m9 15 3 3 3-3",key:"1npd3o"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ns=gt("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.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const BI=gt("FileX",[["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:"m14.5 12.5-5 5",key:"b62r18"}],["path",{d:"m9.5 12.5 5 5",key:"1rk7el"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const af=gt("File",[["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"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const eb=gt("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const $I=gt("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const qI=gt("Gavel",[["path",{d:"m14.5 12.5-8 8a2.119 2.119 0 1 1-3-3l8-8",key:"15492f"}],["path",{d:"m16 16 6-6",key:"vzrcl6"}],["path",{d:"m8 8 6-6",key:"18bi4p"}],["path",{d:"m9 7 8 8",key:"5jnvq1"}],["path",{d:"m21 11-8-8",key:"z4y7zo"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const sy=gt("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ku=gt("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const zI=gt("GraduationCap",[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ok=gt("Grid3x3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ck=gt("HelpCircle",[["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.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const k1=gt("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const UI=gt("Inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ka=gt("IndianRupee",[["path",{d:"M6 3h12",key:"ggurg9"}],["path",{d:"M6 8h12",key:"6g4wlu"}],["path",{d:"m6 13 8.5 8",key:"u1kupk"}],["path",{d:"M6 13h3",key:"wdp6ag"}],["path",{d:"M9 13c6.667 0 6.667-10 0-10",key:"1nkvk2"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const _a=gt("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const dk=gt("Landmark",[["line",{x1:"3",x2:"21",y1:"22",y2:"22",key:"j8o0r"}],["line",{x1:"6",x2:"6",y1:"18",y2:"11",key:"10tf0k"}],["line",{x1:"10",x2:"10",y1:"18",y2:"11",key:"54lgf6"}],["line",{x1:"14",x2:"14",y1:"18",y2:"11",key:"380y"}],["line",{x1:"18",x2:"18",y1:"18",y2:"11",key:"1kevvc"}],["polygon",{points:"12 2 20 7 4 7",key:"jkujk7"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const VI=gt("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const um=gt("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const HI=gt("ListChecks",[["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const uk=gt("List",[["line",{x1:"8",x2:"21",y1:"6",y2:"6",key:"7ey8pc"}],["line",{x1:"8",x2:"21",y1:"12",y2:"12",key:"rjfblc"}],["line",{x1:"8",x2:"21",y1:"18",y2:"18",key:"c3b1m8"}],["line",{x1:"3",x2:"3.01",y1:"6",y2:"6",key:"1g7gq3"}],["line",{x1:"3",x2:"3.01",y1:"12",y2:"12",key:"1pjlvk"}],["line",{x1:"3",x2:"3.01",y1:"18",y2:"18",key:"28t2mc"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ns=gt("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ny=gt("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const WI=gt("LogIn",[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const hk=gt("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.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ur=gt("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Vr=gt("MapPin",[["path",{d:"M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z",key:"2oe9fu"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ga=gt("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const GI=gt("MoreHorizontal",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const mk=gt("Navigation",[["polygon",{points:"3 11 22 2 13 21 11 13 3 11",key:"1ltx0t"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const bu=gt("Paperclip",[["path",{d:"m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48",key:"1u3ebp"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const KI=gt("PauseCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"10",x2:"10",y1:"15",y2:"9",key:"c1nkhi"}],["line",{x1:"14",x2:"14",y1:"15",y2:"9",key:"h65svq"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const D1=gt("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z",key:"ymcmye"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Cr=gt("Pen",[["path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z",key:"5qss01"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ry=gt("Pencil",[["path",{d:"M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z",key:"5qss01"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const tb=gt("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const xg=gt("Play",[["polygon",{points:"5 3 19 12 5 21 5 3",key:"191637"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const An=gt("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ay=gt("Receipt",[["path",{d:"M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z",key:"q3az6g"}],["path",{d:"M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8",key:"1h4pet"}],["path",{d:"M12 17.5v-11",key:"1jc1ny"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const hl=gt("RefreshCcw",[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const xr=gt("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.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const YI=gt("Reply",[["polyline",{points:"9 17 4 12 9 7",key:"hvgpf2"}],["path",{d:"M20 18v-2a4 4 0 0 0-4-4H4",key:"5vmcpk"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const sb=gt("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ml=gt("Save",[["path",{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z",key:"1owoqh"}],["polyline",{points:"17 21 17 13 7 13 7 21",key:"1md35c"}],["polyline",{points:"7 3 7 8 15 8",key:"8nz8an"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ta=gt("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Gu=gt("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.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ZI=gt("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Bf=gt("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.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Xc=gt("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.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const fk=gt("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const no=gt("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const hc=gt("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const QI=gt("ShoppingBag",[["path",{d:"M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z",key:"hou9p0"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const XI=gt("SlidersHorizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const JI=gt("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const eM=gt("Smile",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const tM=gt("Star",[["polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2",key:"8f66p6"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const sM=gt("Store",[["path",{d:"m2 7 4.41-4.41A2 2 0 0 1 7.83 2h8.34a2 2 0 0 1 1.42.59L22 7",key:"ztvudi"}],["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["path",{d:"M15 22v-4a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v4",key:"2ebpfo"}],["path",{d:"M2 7h20",key:"1fcdvo"}],["path",{d:"M22 7v3a2 2 0 0 1-2 2v0a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 16 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 12 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 8 12a2.7 2.7 0 0 1-1.59-.63.7.7 0 0 0-.82 0A2.7 2.7 0 0 1 4 12v0a2 2 0 0 1-2-2V7",key:"jon5kx"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const nM=gt("Timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ar=gt("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Yo=gt("TrendingDown",[["polyline",{points:"22 17 13.5 8.5 8.5 13.5 2 7",key:"1r2t7k"}],["polyline",{points:"16 17 22 17 22 11",key:"11uiuu"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const dl=gt("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const rM=gt("Truck",[["path",{d:"M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2",key:"wrbu53"}],["path",{d:"M15 18H9",key:"1lyqi6"}],["path",{d:"M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14",key:"lysw3i"}],["circle",{cx:"17",cy:"18",r:"2",key:"332jqn"}],["circle",{cx:"7",cy:"18",r:"2",key:"19iecd"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const aM=gt("Undo2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5v0a5.5 5.5 0 0 1-5.5 5.5H11",key:"llx8ln"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const or=gt("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const iM=gt("UserCheck",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["polyline",{points:"16 11 18 13 22 9",key:"1pwet4"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const lM=gt("UserCog",[["circle",{cx:"18",cy:"15",r:"3",key:"gjjjvw"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M10 15H6a4 4 0 0 0-4 4v2",key:"1nfge6"}],["path",{d:"m21.7 16.4-.9-.3",key:"12j9ji"}],["path",{d:"m15.2 13.9-.9-.3",key:"1fdjdi"}],["path",{d:"m16.6 18.7.3-.9",key:"heedtr"}],["path",{d:"m19.1 12.2.3-.9",key:"1af3ki"}],["path",{d:"m19.6 18.7-.4-1",key:"1x9vze"}],["path",{d:"m16.8 12.3-.4-1",key:"vqeiwj"}],["path",{d:"m14.3 16.6 1-.4",key:"1qlj63"}],["path",{d:"m20.7 13.8 1-.4",key:"1v5t8k"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const gg=gt("UserMinus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const nb=gt("UserPlus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const vg=gt("UserX",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"17",x2:"22",y1:"8",y2:"13",key:"3nzzx3"}],["line",{x1:"22",x2:"17",y1:"8",y2:"13",key:"1swrse"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Lr=gt("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ra=gt("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const lf=gt("Wallet",[["path",{d:"M21 12V7H5a2 2 0 0 1 0-4h14v4",key:"195gfw"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h16v-5",key:"195n9w"}],["path",{d:"M18 12a2 2 0 0 0 0 4h4v-4Z",key:"vllfpd"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const mi=gt("XCircle",[["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.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ld=gt("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** - * @license lucide-react v0.344.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const R1=gt("Zap",[["polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2",key:"45s27k"}]]);function Ln({className:t,...s}){return e.jsx(XA,{"data-slot":"checkbox",className:Nt("peer border bg-input-background dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),...s,children:e.jsx(ek,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:e.jsx(Hn,{className:"size-3.5"})})})}var oM=t=>{switch(t){case"success":return uM;case"info":return mM;case"warning":return hM;case"error":return fM;default:return null}},cM=Array(12).fill(0),dM=({visible:t,className:s})=>wt.createElement("div",{className:["sonner-loading-wrapper",s].filter(Boolean).join(" "),"data-visible":t},wt.createElement("div",{className:"sonner-spinner"},cM.map((n,r)=>wt.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),uM=wt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},wt.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),hM=wt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},wt.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),mM=wt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},wt.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),fM=wt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},wt.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),pM=wt.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},wt.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),wt.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),xM=()=>{let[t,s]=wt.useState(document.hidden);return wt.useEffect(()=>{let n=()=>{s(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),t},iy=1,gM=class{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let s=this.subscribers.indexOf(t);this.subscribers.splice(s,1)}),this.publish=t=>{this.subscribers.forEach(s=>s(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var s;let{message:n,...r}=t,a=typeof(t==null?void 0:t.id)=="number"||((s=t.id)==null?void 0:s.length)>0?t.id:iy++,i=this.toasts.find(d=>d.id===a),o=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),i?this.toasts=this.toasts.map(d=>d.id===a?(this.publish({...d,...t,id:a,title:n}),{...d,...t,id:a,dismissible:o,title:n}):d):this.addToast({title:n,...r,dismissible:o,id:a}),a},this.dismiss=t=>(this.dismissedToasts.add(t),t||this.toasts.forEach(s=>{this.subscribers.forEach(n=>n({id:s.id,dismiss:!0}))}),this.subscribers.forEach(s=>s({id:t,dismiss:!0})),t),this.message=(t,s)=>this.create({...s,message:t}),this.error=(t,s)=>this.create({...s,message:t,type:"error"}),this.success=(t,s)=>this.create({...s,type:"success",message:t}),this.info=(t,s)=>this.create({...s,type:"info",message:t}),this.warning=(t,s)=>this.create({...s,type:"warning",message:t}),this.loading=(t,s)=>this.create({...s,type:"loading",message:t}),this.promise=(t,s)=>{if(!s)return;let n;s.loading!==void 0&&(n=this.create({...s,promise:t,type:"loading",message:s.loading,description:typeof s.description!="function"?s.description:void 0}));let r=t instanceof Promise?t:t(),a=n!==void 0,i,o=r.then(async m=>{if(i=["resolve",m],wt.isValidElement(m))a=!1,this.create({id:n,type:"default",message:m});else if(yM(m)&&!m.ok){a=!1;let f=typeof s.error=="function"?await s.error(`HTTP error! status: ${m.status}`):s.error,p=typeof s.description=="function"?await s.description(`HTTP error! status: ${m.status}`):s.description;this.create({id:n,type:"error",message:f,description:p})}else if(s.success!==void 0){a=!1;let f=typeof s.success=="function"?await s.success(m):s.success,p=typeof s.description=="function"?await s.description(m):s.description;this.create({id:n,type:"success",message:f,description:p})}}).catch(async m=>{if(i=["reject",m],s.error!==void 0){a=!1;let f=typeof s.error=="function"?await s.error(m):s.error,p=typeof s.description=="function"?await s.description(m):s.description;this.create({id:n,type:"error",message:f,description:p})}}).finally(()=>{var m;a&&(this.dismiss(n),n=void 0),(m=s.finally)==null||m.call(s)}),d=()=>new Promise((m,f)=>o.then(()=>i[0]==="reject"?f(i[1]):m(i[1])).catch(f));return typeof n!="string"&&typeof n!="number"?{unwrap:d}:Object.assign(n,{unwrap:d})},this.custom=(t,s)=>{let n=(s==null?void 0:s.id)||iy++;return this.create({jsx:t(n),id:n,...s}),n},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},da=new gM,vM=(t,s)=>{let n=(s==null?void 0:s.id)||iy++;return da.addToast({title:t,...s,id:n}),n},yM=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",bM=vM,jM=()=>da.toasts,NM=()=>da.getActiveToasts(),te=Object.assign(bM,{success:da.success,info:da.info,warning:da.warning,error:da.error,custom:da.custom,message:da.message,promise:da.promise,dismiss:da.dismiss,loading:da.loading},{getHistory:jM,getToasts:NM});function wM(t,{insertAt:s}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",s==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}wM(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} -`);function hm(t){return t.label!==void 0}var SM=3,CM="32px",AM="16px",E1=4e3,kM=356,DM=14,RM=20,EM=200;function ii(...t){return t.filter(Boolean).join(" ")}function _M(t){let[s,n]=t.split("-"),r=[];return s&&r.push(s),n&&r.push(n),r}var TM=t=>{var s,n,r,a,i,o,d,m,f,p,h;let{invert:x,toast:u,unstyled:N,interacting:v,setHeights:w,visibleToasts:j,heights:b,index:C,toasts:S,expanded:R,removeToast:_,defaultRichColors:A,closeButton:E,style:q,cancelButtonStyle:O,actionButtonStyle:D,className:P="",descriptionClassName:L="",duration:$,position:Y,gap:Z,loadingIcon:W,expandByDefault:U,classNames:M,icons:z,closeButtonAriaLabel:T="Close toast",pauseWhenPageIsHidden:I}=t,[B,G]=wt.useState(null),[K,H]=wt.useState(null),[X,J]=wt.useState(!1),[ae,le]=wt.useState(!1),[xe,ce]=wt.useState(!1),[ve,Pe]=wt.useState(!1),[et,kt]=wt.useState(!1),[vt,ee]=wt.useState(0),[ge,ye]=wt.useState(0),Be=wt.useRef(u.duration||$||E1),$e=wt.useRef(null),dt=wt.useRef(null),st=C===0,xt=C+1<=j,Mt=u.type,It=u.dismissible!==!1,he=u.className||"",pt=u.descriptionClassName||"",ht=wt.useMemo(()=>b.findIndex(ke=>ke.toastId===u.id)||0,[b,u.id]),_e=wt.useMemo(()=>{var ke;return(ke=u.closeButton)!=null?ke:E},[u.closeButton,E]),Vt=wt.useMemo(()=>u.duration||$||E1,[u.duration,$]),Pt=wt.useRef(0),_s=wt.useRef(0),Ys=wt.useRef(0),Bs=wt.useRef(null),[Ks,Qs]=Y.split("-"),Xs=wt.useMemo(()=>b.reduce((ke,je,Ve)=>Ve>=ht?ke:ke+je.height,0),[b,ht]),$s=xM(),Q=u.invert||x,oe=Mt==="loading";_s.current=wt.useMemo(()=>ht*Z+Xs,[ht,Xs]),wt.useEffect(()=>{Be.current=Vt},[Vt]),wt.useEffect(()=>{J(!0)},[]),wt.useEffect(()=>{let ke=dt.current;if(ke){let je=ke.getBoundingClientRect().height;return ye(je),w(Ve=>[{toastId:u.id,height:je,position:u.position},...Ve]),()=>w(Ve=>Ve.filter(Ge=>Ge.toastId!==u.id))}},[w,u.id]),wt.useLayoutEffect(()=>{if(!X)return;let ke=dt.current,je=ke.style.height;ke.style.height="auto";let Ve=ke.getBoundingClientRect().height;ke.style.height=je,ye(Ve),w(Ge=>Ge.find(nt=>nt.toastId===u.id)?Ge.map(nt=>nt.toastId===u.id?{...nt,height:Ve}:nt):[{toastId:u.id,height:Ve,position:u.position},...Ge])},[X,u.title,u.description,w,u.id]);let we=wt.useCallback(()=>{le(!0),ee(_s.current),w(ke=>ke.filter(je=>je.toastId!==u.id)),setTimeout(()=>{_(u)},EM)},[u,_,w,_s]);wt.useEffect(()=>{if(u.promise&&Mt==="loading"||u.duration===1/0||u.type==="loading")return;let ke;return R||v||I&&$s?(()=>{if(Ys.current{var je;(je=u.onAutoClose)==null||je.call(u,u),we()},Be.current)),()=>clearTimeout(ke)},[R,v,u,Mt,I,$s,we]),wt.useEffect(()=>{u.delete&&we()},[we,u.delete]);function Oe(){var ke,je,Ve;return z!=null&&z.loading?wt.createElement("div",{className:ii(M==null?void 0:M.loader,(ke=u==null?void 0:u.classNames)==null?void 0:ke.loader,"sonner-loader"),"data-visible":Mt==="loading"},z.loading):W?wt.createElement("div",{className:ii(M==null?void 0:M.loader,(je=u==null?void 0:u.classNames)==null?void 0:je.loader,"sonner-loader"),"data-visible":Mt==="loading"},W):wt.createElement(dM,{className:ii(M==null?void 0:M.loader,(Ve=u==null?void 0:u.classNames)==null?void 0:Ve.loader),visible:Mt==="loading"})}return wt.createElement("li",{tabIndex:0,ref:dt,className:ii(P,he,M==null?void 0:M.toast,(s=u==null?void 0:u.classNames)==null?void 0:s.toast,M==null?void 0:M.default,M==null?void 0:M[Mt],(n=u==null?void 0:u.classNames)==null?void 0:n[Mt]),"data-sonner-toast":"","data-rich-colors":(r=u.richColors)!=null?r:A,"data-styled":!(u.jsx||u.unstyled||N),"data-mounted":X,"data-promise":!!u.promise,"data-swiped":et,"data-removed":ae,"data-visible":xt,"data-y-position":Ks,"data-x-position":Qs,"data-index":C,"data-front":st,"data-swiping":xe,"data-dismissible":It,"data-type":Mt,"data-invert":Q,"data-swipe-out":ve,"data-swipe-direction":K,"data-expanded":!!(R||U&&X),style:{"--index":C,"--toasts-before":C,"--z-index":S.length-C,"--offset":`${ae?vt:_s.current}px`,"--initial-height":U?"auto":`${ge}px`,...q,...u.style},onDragEnd:()=>{ce(!1),G(null),Bs.current=null},onPointerDown:ke=>{oe||!It||($e.current=new Date,ee(_s.current),ke.target.setPointerCapture(ke.pointerId),ke.target.tagName!=="BUTTON"&&(ce(!0),Bs.current={x:ke.clientX,y:ke.clientY}))},onPointerUp:()=>{var ke,je,Ve,Ge;if(ve||!It)return;Bs.current=null;let nt=Number(((ke=dt.current)==null?void 0:ke.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Zt=Number(((je=dt.current)==null?void 0:je.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Jt=new Date().getTime()-((Ve=$e.current)==null?void 0:Ve.getTime()),lt=B==="x"?nt:Zt,mt=Math.abs(lt)/Jt;if(Math.abs(lt)>=RM||mt>.11){ee(_s.current),(Ge=u.onDismiss)==null||Ge.call(u,u),H(B==="x"?nt>0?"right":"left":Zt>0?"down":"up"),we(),Pe(!0),kt(!1);return}ce(!1),G(null)},onPointerMove:ke=>{var je,Ve,Ge,nt;if(!Bs.current||!It||((je=window.getSelection())==null?void 0:je.toString().length)>0)return;let Zt=ke.clientY-Bs.current.y,Jt=ke.clientX-Bs.current.x,lt=(Ve=t.swipeDirections)!=null?Ve:_M(Y);!B&&(Math.abs(Jt)>1||Math.abs(Zt)>1)&&G(Math.abs(Jt)>Math.abs(Zt)?"x":"y");let mt={x:0,y:0};B==="y"?(lt.includes("top")||lt.includes("bottom"))&&(lt.includes("top")&&Zt<0||lt.includes("bottom")&&Zt>0)&&(mt.y=Zt):B==="x"&&(lt.includes("left")||lt.includes("right"))&&(lt.includes("left")&&Jt<0||lt.includes("right")&&Jt>0)&&(mt.x=Jt),(Math.abs(mt.x)>0||Math.abs(mt.y)>0)&&kt(!0),(Ge=dt.current)==null||Ge.style.setProperty("--swipe-amount-x",`${mt.x}px`),(nt=dt.current)==null||nt.style.setProperty("--swipe-amount-y",`${mt.y}px`)}},_e&&!u.jsx?wt.createElement("button",{"aria-label":T,"data-disabled":oe,"data-close-button":!0,onClick:oe||!It?()=>{}:()=>{var ke;we(),(ke=u.onDismiss)==null||ke.call(u,u)},className:ii(M==null?void 0:M.closeButton,(a=u==null?void 0:u.classNames)==null?void 0:a.closeButton)},(i=z==null?void 0:z.close)!=null?i:pM):null,u.jsx||g.isValidElement(u.title)?u.jsx?u.jsx:typeof u.title=="function"?u.title():u.title:wt.createElement(wt.Fragment,null,Mt||u.icon||u.promise?wt.createElement("div",{"data-icon":"",className:ii(M==null?void 0:M.icon,(o=u==null?void 0:u.classNames)==null?void 0:o.icon)},u.promise||u.type==="loading"&&!u.icon?u.icon||Oe():null,u.type!=="loading"?u.icon||(z==null?void 0:z[Mt])||oM(Mt):null):null,wt.createElement("div",{"data-content":"",className:ii(M==null?void 0:M.content,(d=u==null?void 0:u.classNames)==null?void 0:d.content)},wt.createElement("div",{"data-title":"",className:ii(M==null?void 0:M.title,(m=u==null?void 0:u.classNames)==null?void 0:m.title)},typeof u.title=="function"?u.title():u.title),u.description?wt.createElement("div",{"data-description":"",className:ii(L,pt,M==null?void 0:M.description,(f=u==null?void 0:u.classNames)==null?void 0:f.description)},typeof u.description=="function"?u.description():u.description):null),g.isValidElement(u.cancel)?u.cancel:u.cancel&&hm(u.cancel)?wt.createElement("button",{"data-button":!0,"data-cancel":!0,style:u.cancelButtonStyle||O,onClick:ke=>{var je,Ve;hm(u.cancel)&&It&&((Ve=(je=u.cancel).onClick)==null||Ve.call(je,ke),we())},className:ii(M==null?void 0:M.cancelButton,(p=u==null?void 0:u.classNames)==null?void 0:p.cancelButton)},u.cancel.label):null,g.isValidElement(u.action)?u.action:u.action&&hm(u.action)?wt.createElement("button",{"data-button":!0,"data-action":!0,style:u.actionButtonStyle||D,onClick:ke=>{var je,Ve;hm(u.action)&&((Ve=(je=u.action).onClick)==null||Ve.call(je,ke),!ke.defaultPrevented&&we())},className:ii(M==null?void 0:M.actionButton,(h=u==null?void 0:u.classNames)==null?void 0:h.actionButton)},u.action.label):null))};function _1(){if(typeof window>"u"||typeof document>"u")return"ltr";let t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function PM(t,s){let n={};return[t,s].forEach((r,a)=>{let i=a===1,o=i?"--mobile-offset":"--offset",d=i?AM:CM;function m(f){["top","right","bottom","left"].forEach(p=>{n[`${o}-${p}`]=typeof f=="number"?`${f}px`:f})}typeof r=="number"||typeof r=="string"?m(r):typeof r=="object"?["top","right","bottom","left"].forEach(f=>{r[f]===void 0?n[`${o}-${f}`]=d:n[`${o}-${f}`]=typeof r[f]=="number"?`${r[f]}px`:r[f]}):m(d)}),n}var OM=g.forwardRef(function(t,s){let{invert:n,position:r="bottom-right",hotkey:a=["altKey","KeyT"],expand:i,closeButton:o,className:d,offset:m,mobileOffset:f,theme:p="light",richColors:h,duration:x,style:u,visibleToasts:N=SM,toastOptions:v,dir:w=_1(),gap:j=DM,loadingIcon:b,icons:C,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:R}=t,[_,A]=wt.useState([]),E=wt.useMemo(()=>Array.from(new Set([r].concat(_.filter(I=>I.position).map(I=>I.position)))),[_,r]),[q,O]=wt.useState([]),[D,P]=wt.useState(!1),[L,$]=wt.useState(!1),[Y,Z]=wt.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),W=wt.useRef(null),U=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),M=wt.useRef(null),z=wt.useRef(!1),T=wt.useCallback(I=>{A(B=>{var G;return(G=B.find(K=>K.id===I.id))!=null&&G.delete||da.dismiss(I.id),B.filter(({id:K})=>K!==I.id)})},[]);return wt.useEffect(()=>da.subscribe(I=>{if(I.dismiss){A(B=>B.map(G=>G.id===I.id?{...G,delete:!0}:G));return}setTimeout(()=>{Hy.flushSync(()=>{A(B=>{let G=B.findIndex(K=>K.id===I.id);return G!==-1?[...B.slice(0,G),{...B[G],...I},...B.slice(G+1)]:[I,...B]})})})}),[]),wt.useEffect(()=>{if(p!=="system"){Z(p);return}if(p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Z("dark"):Z("light")),typeof window>"u")return;let I=window.matchMedia("(prefers-color-scheme: dark)");try{I.addEventListener("change",({matches:B})=>{Z(B?"dark":"light")})}catch{I.addListener(({matches:G})=>{try{Z(G?"dark":"light")}catch(K){console.error(K)}})}},[p]),wt.useEffect(()=>{_.length<=1&&P(!1)},[_]),wt.useEffect(()=>{let I=B=>{var G,K;a.every(H=>B[H]||B.code===H)&&(P(!0),(G=W.current)==null||G.focus()),B.code==="Escape"&&(document.activeElement===W.current||(K=W.current)!=null&&K.contains(document.activeElement))&&P(!1)};return document.addEventListener("keydown",I),()=>document.removeEventListener("keydown",I)},[a]),wt.useEffect(()=>{if(W.current)return()=>{M.current&&(M.current.focus({preventScroll:!0}),M.current=null,z.current=!1)}},[W.current]),wt.createElement("section",{ref:s,"aria-label":`${S} ${U}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},E.map((I,B)=>{var G;let[K,H]=I.split("-");return _.length?wt.createElement("ol",{key:I,dir:w==="auto"?_1():w,tabIndex:-1,ref:W,className:d,"data-sonner-toaster":!0,"data-theme":Y,"data-y-position":K,"data-lifted":D&&_.length>1&&!i,"data-x-position":H,style:{"--front-toast-height":`${((G=q[0])==null?void 0:G.height)||0}px`,"--width":`${kM}px`,"--gap":`${j}px`,...u,...PM(m,f)},onBlur:X=>{z.current&&!X.currentTarget.contains(X.relatedTarget)&&(z.current=!1,M.current&&(M.current.focus({preventScroll:!0}),M.current=null))},onFocus:X=>{X.target instanceof HTMLElement&&X.target.dataset.dismissible==="false"||z.current||(z.current=!0,M.current=X.relatedTarget)},onMouseEnter:()=>P(!0),onMouseMove:()=>P(!0),onMouseLeave:()=>{L||P(!1)},onDragEnd:()=>P(!1),onPointerDown:X=>{X.target instanceof HTMLElement&&X.target.dataset.dismissible==="false"||$(!0)},onPointerUp:()=>$(!1)},_.filter(X=>!X.position&&B===0||X.position===I).map((X,J)=>{var ae,le;return wt.createElement(TM,{key:X.id,icons:C,index:J,toast:X,defaultRichColors:h,duration:(ae=v==null?void 0:v.duration)!=null?ae:x,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:n,visibleToasts:N,closeButton:(le=v==null?void 0:v.closeButton)!=null?le:o,interacting:L,position:I,style:v==null?void 0:v.style,unstyled:v==null?void 0:v.unstyled,classNames:v==null?void 0:v.classNames,cancelButtonStyle:v==null?void 0:v.cancelButtonStyle,actionButtonStyle:v==null?void 0:v.actionButtonStyle,removeToast:T,toasts:_.filter(xe=>xe.position==X.position),heights:q.filter(xe=>xe.position==X.position),setHeights:O,expandByDefault:i,gap:j,loadingIcon:b,expanded:D,pauseWhenPageIsHidden:R,swipeDirections:t.swipeDirections})})):null}))});const hs={submitApplication:async t=>{var n;const s=await Ee.submitApplication(t);if(!s.ok)throw new Error(((n=s.data)==null?void 0:n.message)||"Failed to submit application");return s.data},getApplications:async t=>{var n;const s=await Ee.getApplications(t);if(!s.ok)throw new Error(((n=s.data)==null?void 0:n.message)||"Failed to fetch applications");return s.data},shortlistApplications:async(t,s,n)=>{var a;const r=await Ee.shortlistApplications({applicationIds:t,assignedTo:s,remarks:n});if(!r.ok)throw new Error(((a=r.data)==null?void 0:a.message)||"Failed to shortlist applications");return r.data},getApplicationById:async t=>{var n,r;const s=await Ee.getApplicationById(t);if(!s.ok)throw console.error("API Error Response:",s.status,s.data),new Error(((n=s.data)==null?void 0:n.message)||"Failed to fetch application details");return((r=s.data)==null?void 0:r.data)||s.data},getUsers:async t=>{var n,r;const s=await Ee.getUsers(t);if(!s.ok)throw new Error(((n=s.data)==null?void 0:n.message)||"Failed to fetch users");return((r=s.data)==null?void 0:r.data)||s.data},addParticipant:async t=>{var n;const s=await Ee.addParticipant(t);if(!s.ok)throw new Error(((n=s.data)==null?void 0:n.message)||"Failed to add participant");return s.data},scheduleInterview:async t=>{var n;const s=await Ee.scheduleInterview(t);if(!s.ok)throw new Error(((n=s.data)==null?void 0:n.message)||"Failed to schedule interview");return s.data},updateInterview:async(t,s)=>{var r;const n=await Ee.updateInterview(t,s);if(!n.ok)throw new Error(((r=n.data)==null?void 0:r.message)||"Failed to update interview");return n.data},getInterviews:async t=>{var r,a;const s=await Ee.getInterviews(t);if(!s.ok)throw new Error(((r=s.data)==null?void 0:r.message)||"Failed to fetch interviews");const n=((a=s.data)==null?void 0:a.data)||s.data;return Array.isArray(n)?n:[]},getDocuments:async t=>{var n,r;const s=await Ee.getDocuments(t);if(!s.ok)throw new Error(((n=s.data)==null?void 0:n.message)||"Failed to fetch documents");return((r=s.data)==null?void 0:r.data)||s.data},uploadDocument:async(t,s)=>{var r;const n=await Ee.uploadDocument(t,s);if(!n.ok)throw new Error(((r=n.data)==null?void 0:r.message)||"Failed to upload document");return n.data},submitKTMatrix:async t=>{var n;const s=await Ee.submitKTMatrix(t);if(!s.ok)throw new Error(((n=s.data)==null?void 0:n.message)||"Failed to submit KT Matrix");return s.data},submitLevel2Feedback:async t=>{var n;const s=await Ee.submitLevel2Feedback(t);if(!s.ok)throw new Error(((n=s.data)==null?void 0:n.message)||"Failed to submit feedback");return s.data},updateRecommendation:async t=>{var n;const s=await Ee.updateRecommendation(t);if(!s.ok)throw new Error(((n=s.data)==null?void 0:n.message)||"Failed to update recommendation");return s.data},submitStageDecision:async t=>{var n;const s=await Ee.submitStageDecision(t);if(!s.ok)throw new Error(((n=s.data)==null?void 0:n.message)||"Failed to process stage decision");return s.data},updateInterviewDecision:async t=>{var n;const s=await Ee.updateInterviewDecision(t);if(!s.ok)throw new Error(((n=s.data)==null?void 0:n.message)||"Failed to update interview decision");return s.data},assignArchitectureTeam:async(t,s)=>{var r;const n=await Ee.assignArchitectureTeam(t,s);if(!n.ok)throw new Error(((r=n.data)==null?void 0:r.message)||"Failed to assign architecture team");return n.data},updateArchitectureStatus:async(t,s,n)=>{var a;const r=await Ee.updateArchitectureStatus(t,s,n);if(!r.ok)throw new Error(((a=r.data)==null?void 0:a.message)||"Failed to update architecture status");return r.data},generateDealerCodes:async t=>{var n;const s=await Ee.generateDealerCodes(t);if(!s.ok)throw new Error(((n=s.data)==null?void 0:n.message)||"Failed to generate dealer codes");return s.data},updateApplicationStatus:async(t,s)=>{var r;const n=await Ee.updateApplicationStatus(t,s);if(!n.ok)throw new Error(((r=n.data)==null?void 0:r.message)||"Failed to update application status");return n.data},convertToOpportunity:async(t,s)=>{var r;const n=await Ee.convertToOpportunity(t,s);if(!n.ok)throw new Error(((r=n.data)==null?void 0:r.message)||"Failed to convert application to opportunity");return n.data},bulkConvertToOpportunity:async t=>{var n;const s=await Ee.bulkConvertToOpportunity(t);if(!s.ok)throw new Error(((n=s.data)==null?void 0:n.message)||"Failed to perform bulk conversion");return s.data},sendBulkReminders:async t=>{var n;const s=await Ee.sendBulkReminders({applicationIds:t});if(!s.ok)throw new Error(((n=s.data)==null?void 0:n.message)||"Failed to send reminders");return s.data},createDealer:async t=>{var n;const s=await Ee.createDealer(t);if(!s.ok)throw new Error(((n=s.data)==null?void 0:n.message)||"Failed to create dealer profile");return s.data},retriggerEvaluators:async t=>{var n;const s=await Ee.retriggerEvaluators(t);if(!s.ok)throw new Error(((n=s.data)==null?void 0:n.message)||"Failed to retrigger evaluators");return s.data},getSecurityDeposit:async t=>{var n,r;const s=await Ee.getSecurityDeposit(t);if(!s.ok)throw new Error(((n=s.data)==null?void 0:n.message)||"Failed to fetch Security Deposit");return((r=s.data)==null?void 0:r.data)||s.data},updateSecurityDeposit:async t=>{var n;const s=await Ee.updateSecurityDeposit(t);if(!s.ok)throw new Error(((n=s.data)==null?void 0:n.message)||"Failed to update Security Deposit");return s.data},getSystemConfigs:async t=>{var n,r;const s=await Ee.getSystemConfigs(t);if(!s.ok)throw new Error(((n=s.data)==null?void 0:n.message)||"Failed to fetch system configurations");return((r=s.data)==null?void 0:r.data)||s.data},getDocumentConfigMetadata:async()=>{var s,n;const t=await Ee.getDocumentConfigMetadata();if(!t.ok)throw new Error(((s=t.data)==null?void 0:s.message)||"Failed to fetch metadata");return((n=t.data)==null?void 0:n.data)||t.data},getDocumentConfigs:async t=>{var n;const s=await Ee.getDocumentConfigs(t);if(!s.ok)throw new Error(((n=s.data)==null?void 0:n.message)||"Failed to fetch document configurations");return s.data},createDocumentConfig:async t=>{var n,r;const s=await Ee.createDocumentConfig(t);if(!s.ok)throw new Error(((n=s.data)==null?void 0:n.message)||"Failed to create document configuration");return((r=s.data)==null?void 0:r.data)||s.data},updateDocumentConfig:async(t,s)=>{var r,a;const n=await Ee.updateDocumentConfig(t,s);if(!n.ok)throw new Error(((r=n.data)==null?void 0:r.message)||"Failed to update document configuration");return((a=n.data)==null?void 0:a.data)||n.data},deleteDocumentConfig:async t=>{var n;const s=await Ee.deleteDocumentConfig(t);if(!s.ok)throw new Error(((n=s.data)==null?void 0:n.message)||"Failed to delete document configuration");return s.data},updateApplication:async(t,s)=>{var r;const n=await Ee.updateApplication(t,s);if(!n.ok)throw new Error(((r=n.data)==null?void 0:r.message)||"Failed to update application");return n.data},submitFddReport:async t=>{var n;const s=await Ee.submitFddReport(t);if(!s.ok)throw new Error(((n=s.data)==null?void 0:n.message)||"Failed to submit FDD report");return s.data},getFddAssignment:async t=>{var n;const s=await Ee.getFddAssignment(t);if(!s.ok)throw new Error(((n=s.data)==null?void 0:n.message)||"Failed to fetch FDD assignment");return s.data},assignFddAgency:async t=>{var n;const s=await Ee.assignFddAgency(t);if(!s.ok)throw new Error(((n=s.data)==null?void 0:n.message)||"Failed to assign FDD agency");return s.data},exportResponses:async t=>{var n,r;const s=await Ee.exportApplicationResponses({applicationIds:t.join(",")});if(!s.ok)throw new Error(((n=s.data)==null?void 0:n.message)||"Failed to export responses");return((r=s.data)==null?void 0:r.data)||[]}},Is={getRoles:async()=>(await Ee.getRoles()).data,getPermissions:async()=>(await Ee.getPermissions()).data,updateRole:async(t,s)=>(await Ee.updateRole(t,s)).data,createRole:async t=>(await Ee.createRole(t)).data,getZones:async()=>(await Ee.getZones()).data,updateZone:async(t,s)=>(await Ee.updateZone(t,s)).data,createZone:async t=>(await Ee.createZone(t)).data,createRegion:async t=>(await Ee.createRegion(t)).data,updateRegion:async(t,s)=>(await Ee.updateRegion(t,s)).data,getRegions:async()=>(await Ee.getRegions()).data,getStates:async t=>(await Ee.getStates(t)).data,getDistricts:async t=>{const s=typeof t=="string"?{stateId:t,limit:"all"}:{limit:"all",...t};return(await Ee.getDistricts(s)).data},getAreas:async t=>(await Ee.getAreas(t)).data,updateArea:async(t,s)=>(await Ee.updateArea(t,s)).data,createArea:async t=>(await Ee.createArea(t)).data,deleteArea:async t=>(await Ee.deleteArea(t)).data,getAreaManagers:async()=>(await Ee.getAreaManagers()).data,getASMs:async()=>(await Ee.getASMs()).data,getZonalManagers:async()=>(await Ee.getZonalManagers()).data,saveZonalManager:async t=>Ee.saveZonalManager(t).then(s=>s.data),getDDLeads:async()=>(await Ee.getDDLeads()).data,saveDDLead:async t=>Ee.saveDDLead(t).then(s=>s.data),getUsers:async()=>(await Ee.getUsers()).data,updateUser:async(t,s)=>(await Ee.updateUser(t,s)).data,getEmailTemplates:async()=>(await Ee.getEmailTemplates()).data,getEmailTemplate:async t=>(await Ee.getEmailTemplate(t)).data,createEmailTemplate:async t=>(await Ee.createEmailTemplate(t)).data,updateEmailTemplate:async(t,s)=>(await Ee.updateEmailTemplate(t,s)).data,deleteEmailTemplate:async t=>(await Ee.deleteEmailTemplate(t)).data,previewEmailTemplate:async t=>(await Ee.previewEmailTemplate(t)).data,getSlaConfigs:async()=>(await Ee.getSlaConfigs()).data,saveSlaConfig:async t=>(await Ee.saveSlaConfig(t)).data,initializeDefaultSlas:async()=>(await Ee.initializeDefaultSlas()).data,saveZone:async t=>t.id?Is.updateZone(t.id,t):Is.createZone(t),saveRegion:async t=>t.id?Is.updateRegion(t.id,t):Is.createRegion(t),saveASM:async t=>Ee.updateUser(t.userId,t).then(s=>s.data),getSystemConfigs:async t=>(await Ee.getSystemConfigs(t)).data,saveSystemConfig:async t=>(await Ee.saveSystemConfig(t)).data,getDealerAsmMappings:async()=>(await Ee.getDealerAsmMappings()).data,saveDealerAsmMapping:async t=>(await Ee.saveDealerAsmMapping(t)).data};function LM({onAdminLogin:t}){const[s,n]=g.useState({country:"India",stateId:"",districtId:"",name:"",interestedCity:"",email:"",pincode:"",mobile:"",ownRoyalEnfield:"",royalEnfieldModel:"",age:"",education:"",companyName:"",source:"",existingDealer:"",description:"",address:"",acceptTerms:!1}),[r,a]=g.useState(!1),[i,o]=g.useState([]),[d,m]=g.useState([]);g.useEffect(()=>{f()},[]);const f=async()=>{try{const C=await Is.getStates(),S=Array.isArray(C)?C:(C==null?void 0:C.data)||(C==null?void 0:C.states)||[];o(S)}catch(C){console.error("Error fetching states:",C)}},p=async C=>{if(C){n(S=>({...S,stateId:C,districtId:""})),m([]);try{const S=await Is.getDistricts(C),R=Array.isArray(S)?S:(S==null?void 0:S.data)||(S==null?void 0:S.districts)||[];m(R)}catch(S){console.error("Error fetching districts:",S)}}},h=C=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(C),x=C=>/^[0-9]{10}$/.test(C),u=C=>/^[0-9]{6}$/.test(C),N=!!(s.country&&s.stateId&&s.districtId&&s.name&&s.interestedCity&&s.email&&s.pincode&&s.mobile&&s.ownRoyalEnfield&&s.age&&s.education&&s.companyName&&s.source&&s.existingDealer&&s.description&&s.address&&s.acceptTerms&&r&&h(s.email)&&x(s.mobile)&&u(s.pincode)&&(s.ownRoyalEnfield==="no"||s.ownRoyalEnfield==="yes"&&s.royalEnfieldModel)),v=()=>{if(!s.mobile||s.mobile.length<10){te.error("Please enter a valid mobile number");return}te.success("OTP sent to "+s.mobile),setTimeout(()=>{a(!0),te.success("Mobile number verified")},1500)},w=async C=>{var S,R;if(C.preventDefault(),!s.country||!s.stateId||!s.districtId||!s.name||!s.interestedCity||!s.email||!s.pincode||!s.mobile||!s.ownRoyalEnfield||!s.age||!s.education||!s.companyName||!s.source||!s.existingDealer||!s.description||!s.address){te.error("Please fill in all required fields");return}if(!r){te.error("Please verify your mobile number");return}if(s.ownRoyalEnfield==="yes"&&!s.royalEnfieldModel){te.error("Please select your motorcycle model");return}if(!s.acceptTerms){te.error("Please accept the terms and conditions");return}try{const _=i.find(D=>D.id===s.stateId),A=d.find(D=>D.id===s.districtId),E=(_==null?void 0:_.name)||(_==null?void 0:_.stateName)||"",q=(A==null?void 0:A.name)||(A==null?void 0:A.districtName)||"",O={applicantName:s.name,email:s.email,phone:s.mobile,state:E,city:s.interestedCity,district:q,preferredLocation:`${s.interestedCity}, ${E}`,businessType:"Dealership",locationType:"district",locationId:s.districtId,address:s.address,pincode:s.pincode,age:s.age,education:s.education,companyName:s.companyName,source:s.source,existingDealer:s.existingDealer==="yes",ownRoyalEnfield:s.ownRoyalEnfield==="yes",royalEnfieldModel:s.royalEnfieldModel,description:s.description,experienceYears:0,investmentCapacity:"Unknown"};await hs.submitApplication(O),te.success("Application submitted successfully"),n({country:"India",stateId:"",districtId:"",name:"",interestedCity:"",email:"",pincode:"",mobile:"",ownRoyalEnfield:"",royalEnfieldModel:"",age:"",education:"",companyName:"",source:"",existingDealer:"",description:"",address:"",acceptTerms:!1}),a(!1)}catch(_){te.error(((R=(S=_.response)==null?void 0:S.data)==null?void 0:R.message)||"Failed to submit application.")}},j=["Continental GT","Interceptor 650","Himalayan","Classic 350","Classic 500","Thunderbird 350","Thunderbird 500","Thunderbird X 350","Thunderbird X 500","Bullet 350","Bullet 500","Bullet ES","Bullet Trials 350","Bullet Trials 500","Other Royal Enfield motorcycle"],b=["Existing RE dealer","Customer","RE Employee","News Paper","Website","Friends","Others"];return e.jsxs("div",{className:"min-h-screen relative flex flex-col",children:[e.jsxs("div",{className:"fixed inset-0 z-0",children:[e.jsx("img",{src:"/assets/images/become_a_dealer.webp",alt:"Royal Enfield Background",className:"w-full h-full object-cover"}),e.jsx("div",{className:"absolute inset-0 bg-black/20"})]}),e.jsxs("nav",{className:"relative z-10 bg-black px-6 md:px-12 py-4 flex items-center justify-between border-b border-white/10",children:[e.jsx("img",{src:"/assets/images/Re_Logo.png",alt:"Royal Enfield",className:"h-10 md:h-12 w-auto"}),e.jsxs(se,{variant:"ghost",onClick:t,className:"text-[10px] uppercase tracking-widest font-bold text-slate-400 hover:text-white transition-colors",children:[e.jsx(WI,{className:"w-3.5 h-3.5 mr-2"}),"Login"]})]}),e.jsx("main",{className:"relative z-10 flex-grow flex flex-col items-center pt-24 pb-24 px-6",children:e.jsxs("div",{className:"w-full max-w-[1240px] bg-white shadow-2xl p-8 md:p-16",children:[e.jsxs("section",{className:"text-[#333333] mb-12",children:[e.jsx("h1",{className:"text-[28px] font-bold mb-8 uppercase tracking-wide text-black",children:"Become a Dealer"}),e.jsxs("div",{className:"space-y-6 text-[15px] leading-relaxed",children:[e.jsx("p",{children:"At Royal Enfield, we endeavour to partner our patrons and customers in their journeys of exploration. Our main objective is to provide an immersive brand and retail experience in addition to ensuring a superior product experience. Our dealers, distributors and network teams are our extended partners in this task."}),e.jsx("p",{children:"Royal Enfield employs a comprehensive and professional process for Dealership allotment. Dealer selection is done based on a variety of criteria including a personal meeting with the applicant. It is only post completion of the evaluation and selection process, that other formalities are considered."}),e.jsx("p",{children:"Royal Enfield does not accept or demand money / deposits from prospective partners prior to processing the application or candidature of the Dealership."}),e.jsxs("p",{children:["If you receive any communication offering allotment of Royal Enfield Dealership against payment / transfer of money and / or otherwise, we advise you to seek information / clarifications by writing to us at ",e.jsx("b",{children:e.jsx("a",{href:"mailto:support@royalenfield.com",className:"text-red-600",children:"support@royalenfield.com"})})," or by contacting us on our customer care toll-free number ",e.jsx("b",{children:e.jsx("a",{href:"tel:18002100008",className:"text-red-600",children:"1800 210 0008"})}),"."]}),e.jsx("p",{className:"font-bold py-1 mt-8 text-black text-[15px]",children:"*This is the ONLY official website and central number for dealership enquiries for Royal Enfield and we do not have any other partner website(s)."})]})]}),e.jsxs("form",{onSubmit:w,className:"space-y-6",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[e.jsxs("div",{className:"relative",children:[e.jsxs("select",{className:"w-full h-[44px] px-4 border border-[#cccccc] appearance-none bg-white text-[14px] outline-none",value:s.country,onChange:C=>n({...s,country:C.target.value}),children:[e.jsx("option",{value:"India",children:"India"}),e.jsx("option",{value:"Other",children:"Others"})]}),e.jsx(Aa,{className:"absolute right-4 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-500 pointer-events-none"})]}),e.jsxs("div",{className:"relative",children:[e.jsxs("select",{className:"w-full h-[44px] px-4 border border-[#cccccc] appearance-none bg-white text-[14px] outline-none",value:s.stateId,onChange:C=>p(C.target.value),children:[e.jsx("option",{value:"",children:"Select State*"}),i.map(C=>e.jsx("option",{value:C.id,children:C.name||C.stateName},C.id))]}),e.jsx(Aa,{className:"absolute right-4 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-500 pointer-events-none"})]}),e.jsxs("div",{className:"relative",children:[e.jsxs("select",{className:"w-full h-[44px] px-4 border border-[#cccccc] appearance-none bg-white text-[14px] outline-none",value:s.districtId,onChange:C=>n({...s,districtId:C.target.value}),children:[e.jsx("option",{value:"",children:"Select District*"}),d.map(C=>e.jsx("option",{value:C.id,children:C.name||C.districtName},C.id))]}),e.jsx(Aa,{className:"absolute right-4 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-500 pointer-events-none"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-x-10 gap-y-6",children:[e.jsx(at,{placeholder:"Name*",className:"h-[44px] border-[#cccccc] rounded-none px-4 text-[14px] focus-visible:ring-1 focus-visible:ring-black placeholder:text-[#999999]",value:s.name,onChange:C=>n({...s,name:C.target.value})}),e.jsx(at,{placeholder:"Interested city for Dealership*",className:"h-[44px] border-[#cccccc] rounded-none px-4 text-[14px] focus-visible:ring-1 focus-visible:ring-black placeholder:text-[#999999]",value:s.interestedCity,onChange:C=>n({...s,interestedCity:C.target.value})}),e.jsx(at,{type:"email",placeholder:"Email Id*",className:"h-[44px] border-[#cccccc] rounded-none px-4 text-[14px] focus-visible:ring-1 focus-visible:ring-black placeholder:text-[#999999]",value:s.email,onChange:C=>n({...s,email:C.target.value})}),e.jsx(at,{type:"text",maxLength:6,placeholder:"Pincode*",className:"h-[44px] border-[#cccccc] rounded-none px-4 text-[14px] focus-visible:ring-1 focus-visible:ring-black placeholder:text-[#999999]",value:s.pincode,onChange:C=>{const S=C.target.value.replace(/\D/g,"");n({...s,pincode:S})}}),e.jsxs("div",{className:"relative",children:[e.jsx(at,{type:"text",maxLength:10,placeholder:"Mobile No.*",className:"h-[44px] border-[#cccccc] rounded-none px-4 text-[14px] focus-visible:ring-1 focus-visible:ring-black placeholder:text-[#999999]",value:s.mobile,onChange:C=>{const S=C.target.value.replace(/\D/g,"");n({...s,mobile:S})}}),r?e.jsx("span",{className:"absolute right-4 top-1/2 -translate-y-1/2 text-[12px] font-bold text-green-600",children:"Verified"}):e.jsx("button",{type:"button",onClick:v,className:"absolute right-4 top-1/2 -translate-y-1/2 text-[12px] font-bold text-red-600 hover:text-black transition-colors",children:"Verify"})]}),e.jsxs("div",{className:"flex items-center gap-10 h-[44px]",children:[e.jsxs("span",{className:"text-[14px] font-medium text-[#333333]",children:["Own a Royal Enfield? ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("div",{className:"flex gap-8",children:["yes","no"].map(C=>e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("div",{className:`w-5 h-5 rounded-full border flex items-center justify-center ${s.ownRoyalEnfield===C?"border-red-600":"border-[#cccccc]"}`,children:s.ownRoyalEnfield===C&&e.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-red-600"})}),e.jsx("input",{type:"radio",className:"hidden",checked:s.ownRoyalEnfield===C,onChange:()=>{n({...s,ownRoyalEnfield:C,royalEnfieldModel:C==="no"?"":s.royalEnfieldModel})}}),e.jsx("span",{className:"text-[14px] capitalize",children:C})]},C))})]}),e.jsx(at,{placeholder:"Age*",className:"h-[44px] border-[#cccccc] rounded-none px-4 text-[14px] focus-visible:ring-1 focus-visible:ring-black placeholder:text-[#999999]",value:s.age,onChange:C=>n({...s,age:C.target.value})}),s.ownRoyalEnfield==="yes"&&e.jsxs("div",{className:"relative",children:[e.jsxs("select",{className:"w-full h-[44px] px-4 border border-[#cccccc] appearance-none bg-white text-[14px] outline-none",value:s.royalEnfieldModel,onChange:C=>n({...s,royalEnfieldModel:C.target.value}),children:[e.jsx("option",{value:"",children:"Select Motorcycle*"}),j.map(C=>e.jsx("option",{value:C,children:C},C))]}),e.jsx(Aa,{className:"absolute right-4 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-500 pointer-events-none"})]}),e.jsx(at,{placeholder:"Education Qualification*",className:"h-[44px] border-[#cccccc] rounded-none px-4 text-[14px] focus-visible:ring-1 focus-visible:ring-black placeholder:text-[#999999]",value:s.education,onChange:C=>n({...s,education:C.target.value})}),e.jsx(at,{placeholder:"Company Name*",className:"h-[44px] border-[#cccccc] rounded-none px-4 text-[14px] focus-visible:ring-1 focus-visible:ring-black placeholder:text-[#999999]",value:s.companyName,onChange:C=>n({...s,companyName:C.target.value})}),e.jsxs("div",{className:"relative",children:[e.jsxs("select",{className:"w-full h-[44px] px-4 border border-[#cccccc] appearance-none bg-white text-[14px] outline-none",value:s.source,onChange:C=>n({...s,source:C.target.value}),children:[e.jsx("option",{value:"",children:"Select Source*"}),b.map(C=>e.jsx("option",{value:C,children:C},C))]}),e.jsx(Aa,{className:"absolute right-4 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-500 pointer-events-none"})]}),e.jsxs("div",{className:"flex flex-col justify-center h-auto min-h-[44px] space-y-1",children:[e.jsxs("span",{className:"text-[13px] font-medium text-[#333333]",children:["Are you an existing Dealer / Vendor of Royal Enfield? ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("div",{className:"flex gap-8",children:["yes","no"].map(C=>e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("div",{className:`w-5 h-5 rounded-full border flex items-center justify-center ${s.existingDealer===C?"border-red-600":"border-[#cccccc]"}`,children:s.existingDealer===C&&e.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-red-600"})}),e.jsx("input",{type:"radio",className:"hidden",checked:s.existingDealer===C,onChange:()=>n({...s,existingDealer:C})}),e.jsx("span",{className:"text-[14px] capitalize",children:C})]},C))})]})]}),e.jsxs("div",{className:"space-y-6 pt-4",children:[e.jsx(Ws,{placeholder:"Description*",className:"min-h-[120px] border-[#cccccc] rounded-none px-4 py-3 text-[14px] focus-visible:ring-1 focus-visible:ring-black placeholder:text-[#999999] resize-none",value:s.description,onChange:C=>n({...s,description:C.target.value})}),e.jsx(Ws,{placeholder:"Address*",className:"min-h-[120px] border-[#cccccc] rounded-none px-4 py-3 text-[14px] focus-visible:ring-1 focus-visible:ring-black placeholder:text-[#999999] resize-none",value:s.address,onChange:C=>n({...s,address:C.target.value})})]}),e.jsxs("div",{className:"pt-6 space-y-8",children:[e.jsxs("div",{className:"space-y-6",children:[e.jsxs("p",{className:"text-[14px] text-[#666666] leading-relaxed",children:["Disclaimer: By signing this form/checking this box, you acknowledge and agree that we may use the information you share with us, to communicate with you through e-mails, text messages, WhatsApp and calls, in order to provide our product or service related information and/or for promotional and marketing purposes. All information provided will be secured and processed as per our ",e.jsx("b",{children:"privacy policy"}),"."]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(Ln,{id:"terms",className:"w-5 h-5 border-[#cccccc] rounded-none data-[state=checked]:bg-black data-[state=checked]:border-black",checked:s.acceptTerms,onCheckedChange:C=>n({...s,acceptTerms:C})}),e.jsxs("label",{htmlFor:"terms",className:"text-[14px] font-medium cursor-pointer",children:["I accept the ",e.jsx("b",{children:"terms and conditions"})," as well as ",e.jsx("b",{children:"privacy policy"}),".",e.jsx("span",{className:"text-red-500",children:"*"})]})]})]}),e.jsxs("button",{type:"submit",disabled:!N,className:"h-12 px-10 bg-black text-white flex items-center gap-3 hover:bg-slate-900 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[e.jsx("span",{className:"font-bold uppercase tracking-wider text-[14px]",children:"Submit"}),e.jsx(bi,{className:"w-4 h-4"})]})]})]})]})}),e.jsx("footer",{className:"relative z-10 bg-black py-16",children:e.jsxs("div",{className:"max-w-[1240px] mx-auto px-6 grid grid-cols-1 md:grid-cols-3 items-center gap-8",children:[e.jsx("img",{src:"/assets/images/Re_Logo.png",alt:"Royal Enfield",className:"h-10 w-auto opacity-100"}),e.jsxs("div",{className:"flex justify-center gap-12 text-[10px] font-bold uppercase tracking-widest text-slate-500",children:[e.jsx("a",{href:"#",className:"hover:text-white transition-all",children:"Legal"}),e.jsx("a",{href:"#",className:"hover:text-white transition-all",children:"Privacy"}),e.jsx("a",{href:"#",className:"hover:text-white transition-all",children:"Terms"})]}),e.jsx("p",{className:"text-[10px] text-center md:text-right uppercase tracking-widest text-slate-500 font-bold",children:"© 2026 Royal Enfield. All Rights Reserved."})]})})]})}const IM=()=>{const{applicationId:t}=vd(),s=tr(),{user:n}=In(A=>A.auth),[r,a]=g.useState(!0),[i,o]=g.useState([]),[d,m]=g.useState([]),[f,p]=g.useState(""),[h,x]=g.useState({}),[u,N]=g.useState(!1),[v,w]=g.useState("none");g.useEffect(()=>{(async()=>{var E,q;if(t)try{const O=await Ee.getPublicQuestionnaire(t);if(O.data.success){const D=O.data.data.questions||[];o(D);const P=Array.from(new Set(D.map(L=>L.sectionName)));m(P),P.length>0&&p(P[0])}}catch(O){console.error("Error fetching questionnaire:",O),((q=(E=O.response)==null?void 0:E.data)==null?void 0:q.code)==="ALREADY_SUBMITTED"?w("already"):te.error("Failed to load questionnaire")}finally{a(!1)}})()},[t]);const j=(A,E)=>{x(q=>({...q,[A]:E}))},b=()=>{const A=d.indexOf(f);A{const A=d.indexOf(f);A>0&&(p(d[A-1]),window.scrollTo({top:0,behavior:"smooth"}))},S=async()=>{const A=i.filter(E=>E.isMandatory&&!h[E.id]);if(A.length>0){te.error(`Please answer all mandatory questions. Missing: ${A.length}`);return}try{N(!0);const E=Object.entries(h).map(([q,O])=>({questionId:q,value:O}));await Ee.submitPublicResponse({applicationId:t,responses:E}),te.success("Responses submitted successfully"),w("success")}catch(E){console.error(E),te.error("Failed to submit responses")}finally{N(!1)}};if(r)return e.jsx("div",{className:"flex items-center justify-center h-screen bg-slate-50",children:e.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-re-red"})});if(v!=="none"){const A=v==="already";return e.jsx("div",{className:"min-h-screen bg-slate-50 flex flex-col items-center justify-center p-6",children:e.jsxs("div",{className:"bg-white p-8 rounded-lg shadow-lg max-w-md w-full text-center border-t-4 border-re-red",children:[e.jsx("div",{className:`w-16 h-16 rounded-full flex items-center justify-center mx-auto mb-4 ${A?"bg-slate-100 text-slate-600":"bg-green-100 text-green-600"}`,children:A?e.jsx(_a,{className:"w-8 h-8"}):e.jsx(un,{className:"w-8 h-8"})}),e.jsx("h2",{className:"text-2xl font-bold mb-2 text-slate-900",children:A?"Already submitted":"Thank you"}),e.jsx("p",{className:"text-slate-600 leading-relaxed",children:A?e.jsx(e.Fragment,{children:"This questionnaire has already been submitted for your application. You do not need to complete it again. If you think this is a mistake, contact support using the same email you used to apply. You may close this page when you are done."}):e.jsx(e.Fragment,{children:"Your assessment has been submitted successfully. We have received your responses and will review them as part of your application. You may close this page when you are done."})})]})})}const R=i.filter(A=>A.sectionName===f),_=d.indexOf(f);return e.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden h-screen bg-slate-50",children:[e.jsx("header",{className:"bg-white border-b border-slate-200 px-6 py-4 flex-shrink-0",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-slate-900 font-bold text-xl",children:"Dealer Questionnaire Form"}),e.jsx("p",{className:"text-slate-600 text-sm max-w-2xl leading-snug",children:"Answer each section accurately. Your responses are part of the dealership application assessment and may be verified."})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[n&&e.jsxs("div",{className:"flex items-center gap-3 px-3 py-2 bg-slate-100 rounded-lg",children:[e.jsx("div",{className:"w-8 h-8 bg-re-red rounded-full flex items-center justify-center",children:e.jsx(Lr,{className:"w-4 h-4 text-white"})}),e.jsxs("div",{className:"text-left",children:[e.jsx("p",{className:"text-slate-900 text-sm font-medium",children:n.name||"Applicant"}),e.jsx("p",{className:"text-slate-600 text-xs",children:n.role||"Prospective Dealer"})]})]}),e.jsx("button",{className:"p-2 text-slate-500 hover:bg-slate-100 rounded-lg",title:"Refresh",onClick:()=>window.location.reload(),children:e.jsx(xr,{className:"w-4 h-4"})}),e.jsx("button",{className:"p-2 text-slate-500 hover:bg-slate-100 rounded-lg",title:"Help",children:e.jsx(ck,{className:"w-4 h-4"})})]})]})}),e.jsxs("main",{className:"flex-1 overflow-y-auto",children:[e.jsx("div",{className:"bg-white border-b border-slate-200 sticky top-0 z-20 shadow-sm",children:e.jsx("div",{className:"max-w-5xl mx-auto px-8 py-3",children:e.jsxs("button",{onClick:()=>s("/prospective-dashboard"),className:"inline-flex items-center gap-2 text-sm font-medium text-slate-600 hover:text-slate-900 transition-colors px-3 py-2 rounded-lg hover:bg-slate-100",children:[e.jsx(Jr,{className:"w-4 h-4"}),"Back to Applicant Portal"]})})}),e.jsxs("div",{className:"max-w-5xl mx-auto py-8 px-6",children:[e.jsxs("div",{className:"bg-re-black rounded-t-lg overflow-hidden shadow-xl",children:[e.jsx("div",{className:"relative px-8 py-12",children:e.jsxs("div",{className:"relative z-10 text-center",children:[e.jsx("div",{className:"flex items-center justify-center mb-7",children:e.jsx("img",{src:"/assets/images/Re_Logo.png",alt:"Royal Enfield",className:"h-12 w-auto"})}),e.jsx("div",{className:"h-1 w-24 bg-re-red mx-auto mb-4"}),e.jsx("h2",{className:"text-re-red text-xl mb-4 font-light",children:"Dealership Partner Application"}),e.jsx("p",{className:"text-slate-300 max-w-2xl mx-auto leading-relaxed text-sm",children:"Thank you for your interest in becoming a Royal Enfield business partner. Please complete this questionnaire to help us understand your profile and aspirations."}),e.jsxs("div",{className:"flex items-center justify-center gap-8 mt-8 border-t border-slate-700/50 pt-6 inline-flex mx-auto",children:[e.jsxs("div",{className:"text-center px-4",children:[e.jsx("div",{className:"text-re-red text-2xl font-bold",children:i.length}),e.jsx("div",{className:"text-slate-400 text-xs uppercase tracking-wider",children:"Questions"})]}),e.jsx("div",{className:"h-10 w-px bg-slate-700"}),e.jsxs("div",{className:"text-center px-4",children:[e.jsx("div",{className:"text-re-red text-2xl font-bold",children:d.length}),e.jsx("div",{className:"text-slate-400 text-xs uppercase tracking-wider",children:"Sections"})]})]})]})}),e.jsx("div",{className:"bg-slate-800/50 backdrop-blur-sm border-t border-slate-700",children:e.jsx("div",{className:"flex items-center gap-2 overflow-x-auto scrollbar-hide px-8 py-4 no-scrollbar",children:d.map(A=>e.jsxs("button",{onClick:()=>p(A),className:`flex items-center gap-2 px-4 py-2 rounded-lg whitespace-nowrap transition-all text-sm font-medium - ${f===A?"bg-re-red text-white shadow-lg":"bg-slate-700/50 text-slate-300 hover:bg-slate-700 hover:text-white"}`,children:[e.jsx(Ns,{className:"w-4 h-4"}),e.jsx("span",{children:A}),f===A&&e.jsx("span",{className:"ml-2 bg-white/20 px-2 py-0.5 rounded text-xs",children:i.filter(E=>E.sectionName===A).length})]},A))})})]}),e.jsx("div",{className:"bg-white rounded-b-lg shadow-xl border border-slate-200 border-t-0 min-h-[400px]",children:e.jsxs("div",{className:"p-8",children:[e.jsxs("div",{className:"flex items-start gap-4 pb-6 border-b-2 border-red-100 mb-8",children:[e.jsx("div",{className:"w-12 h-12 bg-red-50 rounded-lg flex items-center justify-center flex-shrink-0 text-re-red",children:e.jsx(Ra,{className:"w-6 h-6"})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h3",{className:"text-slate-900 text-xl font-bold mb-1",children:f}),e.jsxs("p",{className:"text-slate-500 text-sm",children:["Section ",_+1," of ",d.length," • ",R.length," questions"]})]})]}),e.jsxs("div",{className:"space-y-10",children:[R.map((A,E)=>e.jsx("div",{className:"group animate-in fade-in duration-500",style:{animationDelay:`${E*100}ms`},children:e.jsxs("div",{className:"flex items-start gap-5",children:[e.jsx("div",{className:"w-8 h-8 bg-slate-100 rounded-full flex items-center justify-center flex-shrink-0 group-hover:bg-red-50 transition-colors text-slate-600 group-hover:text-re-red-hover font-semibold text-sm",children:E+1}),e.jsxs("div",{className:"flex-1 space-y-3",children:[e.jsx("div",{className:"flex items-start justify-between gap-4",children:e.jsxs("label",{className:"text-sm font-medium text-slate-900 leading-relaxed block",children:[A.questionText,A.isMandatory&&e.jsx("span",{className:"text-red-500 ml-1",children:"*"})]})}),e.jsxs("div",{className:"max-w-xl",children:[(A.inputType==="text"||A.inputType==="email"||A.inputType==="number")&&e.jsx("input",{type:A.inputType,className:"w-full h-10 px-3 rounded-lg border border-slate-300 focus:border-re-red focus:ring-2 focus:ring-red-200 outline-none transition-all placeholder:text-slate-400",placeholder:"Type your answer here...",value:h[A.id]||"",onChange:q=>j(A.id,q.target.value)}),A.inputType==="textarea"&&e.jsx("textarea",{className:"w-full h-32 p-3 rounded-lg border border-slate-300 focus:border-re-red focus:ring-2 focus:ring-red-200 outline-none transition-all placeholder:text-slate-400",placeholder:"Type your answer here...",value:h[A.id]||"",onChange:q=>j(A.id,q.target.value)}),(A.inputType==="select"||A.inputType==="yesno"||A.inputType==="radio"||A.inputType==="mcq")&&e.jsx("div",{className:"space-y-2",children:(A.questionOptions||(A.inputType==="yesno"?[{optionText:"Yes"},{optionText:"No"}]:[])).map((q,O)=>{const D=q.optionText||q.text;return e.jsxs("label",{className:"flex items-center gap-3 cursor-pointer group/opt",children:[e.jsx("input",{type:"radio",name:`q-${A.id}`,className:"w-4 h-4 text-re-red focus:ring-re-red border-slate-300",checked:h[A.id]===D,onChange:()=>j(A.id,D)}),e.jsx("span",{className:"text-slate-700 group-hover/opt:text-slate-900 transition-colors",children:D})]},O)})})]})]})]})},A.id)),R.length===0&&e.jsx("div",{className:"text-center py-10 text-slate-500 italic",children:"No questions in this section."})]}),e.jsxs("div",{className:"flex items-center justify-between pt-10 mt-10 border-t border-slate-100",children:[e.jsx("button",{onClick:C,disabled:_===0,className:"px-6 py-2.5 rounded-lg text-sm font-medium border border-slate-300 text-slate-700 hover:bg-slate-50 disabled:opacity-50 disabled:cursor-not-allowed transition-colors",children:"Previous Section"}),_{const n=Hu(`Primitive.${s}`),r=g.forwardRef((a,i)=>{const{asChild:o,...d}=a,m=o?n:s;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),e.jsx(m,{...d,ref:i})});return r.displayName=`Primitive.${s}`,{...t,[s]:r}},{}),BM="Label",pk=g.forwardRef((t,s)=>e.jsx(FM.label,{...t,ref:s,onMouseDown:n=>{var a;n.target.closest("button, input, select, textarea")||((a=t.onMouseDown)==null||a.call(t,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));pk.displayName=BM;var $M=pk;function de({className:t,...s}){return e.jsx($M,{"data-slot":"label",className:Nt("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",t),...s})}const qM=[{id:"15",name:"Super Admin",email:"admin@royalenfield.com",password:"Admin@123",role:"Super Admin"},{id:"13",name:"piyush",email:"piyush@royalenfield.com",password:"Admin@123",role:"DD-ZM"},{id:"14",name:"manish",email:"manish@royalenfield.com",password:"Admin@123",role:"RBM"},{id:"14",name:"manav",email:"manav@royalenfield.com",password:"Admin@123",role:"ZBH"},{id:"5",name:"Jaya",email:"jaya@royalenfield.com",password:"Admin@123",role:"DD Lead"},{id:"14",name:"ganesh",email:"ganesh@royalenfield.com",password:"Admin@123",role:"DD Head"},{id:"16",name:"Yashwin",email:"yashwin@royalenfield.com",password:"Admin@123",role:"NBH"},{id:"15",name:"FDD Team",email:"fdd@royalenfield.com",password:"Admin@123",role:"FDD"},{id:"13",name:"Finance Admin",email:"finance@royalenfield.com",password:"Admin@123",role:"Finance"},{id:"13",name:"abhishek",email:"abhishek@royalenfield.com",password:"Admin@123",role:"ASM"},{id:"18",name:"Lince",email:"lince@royalenfield.com",password:"Admin@123",role:"DD Admin"},{id:"18",name:"Legal Admin",email:"legal@royalenfield.com",password:"Admin@123",role:"Legal Admin"},{id:"18",name:"CEO",email:"ceo@royalenfield.com",password:"Admin@123",role:"CEO"},{id:"18",name:"CCO",email:"cco@royalenfield.com",password:"Admin@123",role:"CCO"}],Ei={totalApplications:0,loaIssued:0,level1Pending:0,level2Pending:0,level3Pending:0,eorInProgress:0,disqualified:0,pendingReminders:0,shortlistedToday:0,pendingShortlisting:0},zM=[];function T1({onLogin:t}){const[s,n]=g.useState(""),[r,a]=g.useState(""),[i,o]=g.useState(!1),[d,m]=g.useState(""),[f,p]=g.useState(!1),[h,x]=g.useState(!1),[u,N]=g.useState(!1),[v,w]=g.useState(null),j=async(R,_)=>{try{if(navigator.clipboard&&navigator.clipboard.writeText){await navigator.clipboard.writeText(R),w(_),setTimeout(()=>w(null),2e3);return}}catch{}try{const A=document.createElement("textarea");A.value=R,A.style.position="fixed",A.style.left="-999999px",A.style.top="-999999px",document.body.appendChild(A),A.focus(),A.select();const E=document.execCommand("copy");document.body.removeChild(A),E&&(w(_),setTimeout(()=>w(null),2e3))}catch{}},b=async(R,_)=>{var A,E;n(R),a(_),m(""),x(!0);try{await t(R,_)}catch(q){const O=((E=(A=q.response)==null?void 0:A.data)==null?void 0:E.message)||q.message||"Auto-login failed";m(O),te.error(O)}finally{x(!1)}},C=async R=>{var _,A;if(R.preventDefault(),!h){if(m(""),!s||!r){m("Please enter both email and password");return}x(!0);try{await t(s,r)}catch(E){const q=((A=(_=E.response)==null?void 0:_.data)==null?void 0:A.message)||E.message||"Login failed";m(q),te.error(q)}finally{x(!1)}}},S=R=>{R.preventDefault(),alert("Password reset link sent to "+s),p(!1)};return e.jsxs("div",{className:"min-h-screen flex items-center justify-center bg-black p-4 overflow-y-auto",children:[e.jsxs("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[e.jsx("div",{className:"absolute -top-40 -right-40 w-80 h-80 bg-red-700/15 rounded-full blur-3xl"}),e.jsx("div",{className:"absolute -bottom-40 -left-40 w-80 h-80 bg-red-700/15 rounded-full blur-3xl"})]}),e.jsxs("div",{className:"relative w-full max-w-6xl grid md:grid-cols-2 gap-8 my-8",children:[e.jsxs("div",{className:"flex flex-col",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsx("div",{className:"flex justify-center mb-4",children:e.jsx("img",{src:"/assets/images/Re_Logo.png",alt:"Royal Enfield",className:"h-16 w-auto object-contain"})}),e.jsx("p",{className:"text-slate-400",children:"Dealership Onboarding System"})]}),e.jsx("div",{className:"bg-white rounded-lg shadow-2xl p-8",children:f?e.jsxs("form",{onSubmit:S,className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"mb-2",children:"Reset Password"}),e.jsx("p",{className:"text-slate-600",children:"Enter your email to receive a password reset link"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{htmlFor:"reset-email",children:"Email Address"}),e.jsx(at,{id:"reset-email",type:"email",placeholder:"you@royalenfield.com",value:s,onChange:R=>n(R.target.value),required:!0,className:"w-full"})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx(se,{type:"button",variant:"outline",onClick:()=>p(!1),className:"flex-1",children:"Back to Login"}),e.jsx(se,{type:"submit",className:"flex-1 bg-re-red hover:bg-re-red-hover text-white",children:"Send Reset Link"})]})]}):e.jsxs("form",{onSubmit:C,className:"space-y-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{htmlFor:"email",children:"Email Address"}),e.jsx(at,{id:"email",type:"email",placeholder:"you@royalenfield.com",value:s,onChange:R=>n(R.target.value),className:"w-full",disabled:h})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{htmlFor:"password",children:"Password"}),e.jsxs("div",{className:"relative",children:[e.jsx(at,{id:"password",type:u?"text":"password",placeholder:"Enter your password",value:r,onChange:R=>a(R.target.value),className:"no-native-password-reveal w-full pr-10",autoComplete:"current-password",disabled:h}),e.jsx("button",{type:"button",onClick:()=>N(!u),className:"absolute right-3 top-1/2 -translate-y-1/2 text-slate-400 hover:text-slate-600 focus:outline-none",disabled:h,children:u?e.jsx(MI,{className:"w-5 h-5"}):e.jsx(yn,{className:"w-5 h-5"})})]})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Ln,{id:"remember",checked:i,onCheckedChange:R=>o(R),disabled:h}),e.jsx(de,{htmlFor:"remember",className:"cursor-pointer",children:"Remember Me"})]}),e.jsx("button",{type:"button",onClick:()=>p(!0),className:"text-re-red hover:text-re-red-hover disabled:opacity-50",disabled:h,children:"Forgot Password?"})]}),d&&e.jsxs("div",{className:"flex items-center gap-2 p-3 bg-red-50 border border-red-200 rounded-md",children:[e.jsx(sn,{className:"w-4 h-4 text-red-600"}),e.jsx("span",{className:"text-red-600 font-medium text-sm",children:d})]}),e.jsx(se,{type:"submit",className:"w-full bg-re-red hover:bg-re-red-hover h-11 text-white",disabled:h,children:h?e.jsxs("div",{className:"flex items-center justify-center gap-2",children:[e.jsx("div",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}),e.jsx("span",{children:"Logging in..."})]}):"Login"}),e.jsxs("div",{className:"text-center",children:[e.jsxs("div",{className:"relative my-4",children:[e.jsx("div",{className:"absolute inset-0 flex items-center",children:e.jsx("span",{className:"w-full border-t border-slate-200"})}),e.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:e.jsx("span",{className:"bg-white px-2 text-slate-500",children:"Or"})})]}),e.jsx(se,{type:"button",variant:"outline",className:"w-full border-re-red text-re-red hover:bg-red-50 h-11",onClick:()=>window.location.href="/prospective-login",children:"Prospective User Login"})]})]})}),e.jsx("div",{className:"text-center mt-6 text-slate-400",children:e.jsx("p",{children:"© 2026 Royal Enfield. All rights reserved."})})]}),e.jsxs("div",{className:"bg-white rounded-lg shadow-2xl p-8 overflow-y-auto max-h-[800px]",children:[e.jsxs("div",{className:"mb-6",children:[e.jsx("h2",{className:"mb-2",children:"Test User Credentials"}),e.jsx("p",{className:"text-slate-600",children:"Click on any user to auto-login"})]}),e.jsx("div",{className:"space-y-3",children:qM.map((R,_)=>e.jsxs("div",{className:"border border-slate-200 rounded-lg p-4 hover:border-re-red hover:bg-red-50 transition-all cursor-pointer",onClick:()=>b(R.email,R.password),children:[e.jsx("div",{className:"flex items-start justify-between mb-2",children:e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"flex items-center gap-2 mb-1",children:e.jsx("span",{className:"px-2 py-1 bg-red-100 text-re-red rounded text-xs",children:R.role})}),e.jsx("p",{className:"text-slate-900",children:R.name})]})}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-slate-500",children:"Email:"}),e.jsx("p",{className:"text-slate-900 font-mono break-all",children:R.email})]}),e.jsx("button",{type:"button",onClick:A=>{A.stopPropagation(),j(R.email,_*2)},className:"p-2 hover:bg-slate-100 rounded",children:v===_*2?e.jsx(Hn,{className:"w-4 h-4 text-green-600"}):e.jsx(C1,{className:"w-4 h-4 text-slate-400"})})]}),e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"text-slate-500",children:"Password:"}),e.jsx("p",{className:"text-slate-900 font-mono",children:R.password})]}),e.jsx("button",{type:"button",onClick:A=>{A.stopPropagation(),j(R.password,_*2+1)},className:"p-2 hover:bg-slate-100 rounded",children:v===_*2+1?e.jsx(Hn,{className:"w-4 h-4 text-green-600"}):e.jsx(C1,{className:"w-4 h-4 text-slate-400"})})]})]}),e.jsx("div",{className:"mt-3 pt-3 border-t border-slate-200",children:e.jsxs("p",{className:"text-re-red text-center",children:["Click to login as ",R.role]})})]},R.email))})]})]})]})}function UM(){const t=tr(),s=Lu(),[n,r]=g.useState("PHONE"),[a,i]=g.useState(""),[o,d]=g.useState(""),[m,f]=g.useState(!1),[p,h]=g.useState(""),x=async N=>{var v;if(N.preventDefault(),!a||a.length<10){h("Please enter a valid 10-digit phone number");return}f(!0),h("");try{const w=await Ee.sendOtp(a);if(w.ok)r("OTP"),te.success("OTP sent successfully!");else{console.error("Send OTP error response:",w);const j=((v=w.data)==null?void 0:v.message)||"Failed to send OTP";h(j),te.error(j)}}catch(w){console.error("Send OTP network error:",w),h("Network error. Please try again."),te.error("Network error. Please try again.")}finally{f(!1)}},u=async N=>{var v;if(N.preventDefault(),!o||o.length<6){h("Please enter a valid 6-digit OTP");return}f(!0),h("");try{const w=await Ee.verifyOtp(a,o);if(w.ok&&w.data){const{token:j,user:b}=w.data.data||w.data;if(!j||!b)throw new Error("Invalid response format");s(SA({user:b,token:j})),localStorage.setItem("token",j),te.success("Logged in successfully!"),t("/prospective-dashboard")}else{const j=((v=w.data)==null?void 0:v.message)||"Invalid OTP";h(j),te.error(j)}}catch(w){console.error("Verify OTP error:",w),h("An unexpected error occurred"),te.error("An unexpected error occurred")}finally{f(!1)}};return e.jsxs("div",{className:"min-h-screen flex items-center justify-center bg-gradient-to-br from-slate-900 via-slate-800 to-slate-900 p-4 overflow-y-auto",children:[e.jsxs("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:[e.jsx("div",{className:"absolute -top-40 -right-40 w-80 h-80 bg-re-red/10 rounded-full blur-3xl"}),e.jsx("div",{className:"absolute -bottom-40 -left-40 w-80 h-80 bg-re-red/10 rounded-full blur-3xl"})]}),e.jsxs("div",{className:"relative w-full max-w-md",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsx("div",{className:"inline-flex items-center justify-center w-20 h-20 bg-re-red rounded-full mb-4",children:e.jsxs("svg",{viewBox:"0 0 24 24",className:"w-12 h-12 text-white",fill:"currentColor",children:[e.jsx("path",{d:"M12 2L4 6v6c0 5.5 3.8 10.7 8 12 4.2-1.3 8-6.5 8-12V6l-8-4zm0 2.2l6 3v4.8c0 4.5-3.1 8.7-6 10-2.9-1.3-6-5.5-6-10V7.2l6-3z"}),e.jsx("circle",{cx:"12",cy:"12",r:"3"})]})}),e.jsx("h1",{className:"text-white mb-2",children:"Royal Enfield"}),e.jsx("p",{className:"text-slate-400",children:"Dealer Login"})]}),e.jsxs("div",{className:"bg-white rounded-lg shadow-2xl p-8",children:[e.jsxs("div",{className:"mb-6",children:[e.jsxs(se,{variant:"ghost",className:"px-0 flex items-center gap-2 text-slate-600 hover:text-slate-900 mb-4 hover:bg-transparent",onClick:()=>n==="OTP"?r("PHONE"):t("/admin-login"),children:[e.jsx(Jr,{className:"w-4 h-4"}),n==="OTP"?"Change Phone Number":"Back to Login"]}),e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx("div",{className:"p-2 bg-red-50 rounded-lg",children:e.jsx(JI,{className:"w-6 h-6 text-re-red"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-slate-900 text-lg font-semibold",children:"Dealer Login"}),e.jsx("p",{className:"text-slate-600 text-sm",children:"Login with your registered phone number"})]})]})]}),n==="PHONE"?e.jsxs("form",{onSubmit:x,className:"space-y-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{htmlFor:"phone",children:"Registered Phone Number"}),e.jsx(at,{id:"phone",type:"tel",placeholder:"Enter 10-digit phone number",maxLength:10,value:a,onChange:N=>i(N.target.value.replace(/\D/g,"")),className:"w-full",disabled:m}),e.jsx("p",{className:"text-slate-500 text-xs",children:"Enter the phone number you used during application"})]}),p&&e.jsxs("div",{className:"flex items-center gap-2 p-3 bg-red-50 border border-red-200 rounded-md",children:[e.jsx(sn,{className:"w-4 h-4 text-red-600"}),e.jsx("span",{className:"text-red-600 font-medium text-sm",children:p})]}),e.jsx(se,{type:"submit",className:"w-full bg-re-red hover:bg-re-red-hover h-9",disabled:m||a.length<10,children:m?"Sending...":"Send OTP"}),e.jsx("div",{className:"text-center text-slate-500 text-xs",children:e.jsx("p",{children:"You will receive a 6-digit OTP on your registered mobile number"})})]}):e.jsxs("form",{onSubmit:u,className:"space-y-6",children:[e.jsx("div",{className:"p-4 bg-green-50 border border-green-200 rounded-lg",children:e.jsxs("p",{className:"text-green-800 text-center text-sm",children:["OTP sent to +91 ",a]})}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{htmlFor:"otp",children:"Enter OTP"}),e.jsx(at,{id:"otp",type:"text",placeholder:"Enter 6-digit OTP",maxLength:6,value:o,onChange:N=>d(N.target.value.replace(/\D/g,"")),className:"w-full text-center text-2xl tracking-widest",disabled:m}),e.jsx("p",{className:"text-slate-500 text-xs text-center",children:"Check your SMS for the OTP"})]}),p&&e.jsxs("div",{className:"flex items-center gap-2 p-3 bg-red-50 border border-red-200 rounded-md",children:[e.jsx(sn,{className:"w-4 h-4 text-red-600"}),e.jsx("span",{className:"text-red-600 font-medium text-sm",children:p})]}),e.jsx(se,{type:"submit",className:"w-full bg-re-red hover:bg-re-red-hover h-9",disabled:m||o.length<6,children:m?"Verifying...":"Verify OTP"}),e.jsxs("div",{className:"text-center text-sm",children:[e.jsx("button",{type:"button",className:"text-re-red hover:text-re-red-hover font-medium",onClick:()=>r("PHONE"),children:"Change Phone Number"}),e.jsx("span",{className:"mx-2 text-slate-400",children:"|"}),e.jsx("button",{type:"button",className:"text-re-red hover:text-re-red-hover font-medium",onClick:x,disabled:m,children:"Resend OTP"})]})]})]}),e.jsx("div",{className:"text-center mt-6 text-slate-400",children:e.jsx("p",{children:"© 2025 Royal Enfield. All rights reserved."})})]})]})}function VM({onLogout:t}){const s=tr(),r=yl().pathname.substring(1)||"dashboard",{user:a}=In(L=>L.auth),[i,o]=g.useState(!1),[d,m]=g.useState(""),[f,p]=g.useState(!1),[h,x]=g.useState(!1),[u,N]=g.useState(null),v=g.useRef(null),w=L=>{const $=L.map(W=>W.toLowerCase()),Y=String((a==null?void 0:a.role)||"").toLowerCase(),Z=String((a==null?void 0:a.roleCode)||"").toLowerCase();return $.includes(Y)||$.includes(Z)},j=["DD Admin","DD_ADMIN","ASM","RBM","DD-ZM","DD_ZM","DD Lead","DD_LEAD","DD Head","DD_HEAD","ZBH","NBH","Legal","Legal Admin","LEGAL_ADMIN","Super Admin","SUPER_ADMIN"],b=["ASM","RBM","DD-ZM","DD_ZM","ZBH","DD Lead","DD_LEAD","DD Head","DD_HEAD","NBH","Legal Admin","LEGAL_ADMIN","Legal","DD Admin","DD_ADMIN","CCO","CEO","Super Admin","SUPER_ADMIN"],C=["DD Admin","DD_ADMIN","DD-ZM","DD_ZM","DD Lead","DD_LEAD","DD Head","DD_HEAD","NBH","Finance","Finance Admin","FINANCE_ADMIN","Super Admin","SUPER_ADMIN"],S=w(j),R=w(b),_=w(C),A=[S?{id:"resignation",label:"Resignation"}:null,R?{id:"termination",label:"Termination"}:null,_?{id:"fnf",label:"F&F"}:null].filter(Boolean),E=w(["Finance","Finance Admin"])?[{id:"dashboard",label:"Dashboard",icon:um},{id:"finance-onboarding",label:"Onboarding",icon:Ns},{id:"finance-fnf",label:"F&F",icon:gg}]:w(["Dealer"])?[{id:"dashboard",label:"Dashboard",icon:um},{id:"dealer-resignation",label:"My Resignations",icon:gg},{id:"dealer-constitutional",label:"Constitutional Change",icon:hl},{id:"dealer-relocation",label:"Relocation Requests",icon:Vr}]:w(["FDD"])?[{id:"fdd-dashboard",label:"FDD Dashboard",icon:um}]:[{id:"dashboard",label:"Dashboard",icon:um},{id:"applications",label:"Dealership Requests",icon:Ns},...A.length>0?[{id:"offboarding",label:"Offboarding",icon:gg,hasSubmenu:!0,submenuKey:"offboarding",submenu:A}]:[],{id:"constitutional-change",label:"Constitutional Change",icon:hl},{id:"relocation-requests",label:"Relocation Requests",icon:Vr}];w(["DD Lead","DD Admin","Super Admin"])&&E.splice(1,0,{id:"all-requests",label:"All Requests",icon:$I,hasSubmenu:!0,submenuKey:"allRequests",submenu:[{id:"opportunity-requests",label:"Opportunity Requests"},{id:"non-opportunities",label:"Non-opportunities"}]}),w(["Super Admin","DD Admin","DD Lead"])&&(E.push({id:"master",label:"Master",icon:Xc}),E.push({id:"sla-configurations",label:"SLA Matrix",icon:hl})),w(["Super Admin"])&&(E.push({id:"users",label:"User Management",icon:Ra}),E.push({id:"questionnaires",label:"Questionnaire Templates",icon:rc}),E.push({id:"interview-configs",label:"Interview Configs",icon:HI}),E.push({id:"system-logs",label:"System Logs",icon:ad}));const q=L=>{L.preventDefault(),d.trim()&&s("/applications")},O=g.useCallback((L,$)=>{v.current&&clearTimeout(v.current);const Y=$.getBoundingClientRect();N({submenuKey:L,top:Y.top,left:Y.right+8})},[]),D=g.useCallback((L=!1)=>{L?(v.current&&clearTimeout(v.current),N(null)):v.current=setTimeout(()=>N(null),150)},[]),P=g.useCallback(()=>{v.current&&clearTimeout(v.current)},[]);return g.useEffect(()=>{i||N(null)},[i]),e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:`bg-black text-white h-screen flex flex-col transition-all duration-300 overflow-hidden relative flex-shrink-0 ${i?"w-20":"w-64"}`,children:[e.jsx("div",{className:"border-b border-white/10",children:i?e.jsxs("div",{className:"flex flex-col items-center py-3 gap-3",children:[e.jsx("div",{className:"w-8 h-8 rounded-lg bg-white flex items-center justify-center p-1 shadow-md",children:e.jsx("img",{src:"/assets/images/Re_Logo.png",alt:"RE",className:"w-full h-full object-contain"})}),e.jsx("button",{onClick:()=>o(!1),className:"p-1.5 hover:bg-white/10 rounded-lg transition-colors text-slate-400 hover:text-white",title:"Expand sidebar",children:e.jsx(bi,{className:"w-4 h-4"})})]}):e.jsxs("div",{className:"flex items-center justify-between px-4 py-4",children:[e.jsxs("div",{className:"flex flex-col min-w-0",children:[e.jsx("img",{src:"/assets/images/Re_Logo.png",alt:"Royal Enfield",className:"h-6 w-auto"}),e.jsx("span",{className:"text-[10px] uppercase tracking-[0.2em] font-bold text-slate-400 mt-1 whitespace-nowrap",children:"Dealer Network"})]}),e.jsx("button",{onClick:()=>o(!0),className:"p-1.5 hover:bg-white/10 rounded-lg transition-colors text-slate-400 hover:text-white flex-shrink-0 ml-2",title:"Collapse sidebar",children:e.jsx(lo,{className:"w-4 h-4"})})]})}),!i&&e.jsx("div",{className:"p-4 border-b border-white/10",children:e.jsxs("form",{onSubmit:q,className:"relative",children:[e.jsx(Ta,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"}),e.jsx(at,{type:"text",placeholder:"Search applications...",value:d,onChange:L=>m(L.target.value),className:"w-full pl-10 bg-white/5 border-white/10 text-white placeholder:text-slate-500"})]})}),e.jsx("nav",{className:"flex-1 p-3 space-y-1 overflow-y-auto custom-scrollbar",children:E.map(L=>{var z,T;const $=L.icon,Y=r===L.id,Z=!!L.hasSubmenu,W=Z&&((z=L.submenu)==null?void 0:z.some(I=>r===I.id)),U=L.submenuKey,M=U==="offboarding"?f:U==="allRequests"?h:!1;return e.jsxs("div",{children:[e.jsxs("button",{onMouseEnter:I=>{i&&Z&&U&&O(U,I.currentTarget)},onMouseLeave:()=>{i&&Z&&D()},onClick:()=>{Z?i?(o(!1),U==="offboarding"?p(!0):U==="allRequests"&&x(!0)):U==="offboarding"?p(!f):U==="allRequests"&&x(!h):s(`/${L.id}`)},className:`w-full flex items-center gap-3 px-3 py-3 rounded-lg transition-colors ${i?"justify-center":""} ${Y||W?"bg-re-red text-white shadow-lg shadow-re-red/20":"text-slate-400 hover:bg-white/5 hover:text-white"}`,title:i?L.label:void 0,children:[e.jsx($,{className:"w-5 h-5 flex-shrink-0"}),!i&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"flex-1 text-left text-sm",children:L.label}),Z&&(M?e.jsx(yu,{className:"w-4 h-4 flex-shrink-0"}):e.jsx(Aa,{className:"w-4 h-4 flex-shrink-0"}))]})]}),Z&&M&&!i&&e.jsx("div",{className:"ml-3 mt-1 space-y-1 border-l border-white/10 pl-3",children:(T=L.submenu)==null?void 0:T.map(I=>{const B=r===I.id;return e.jsxs("button",{onClick:()=>s(`/${I.id}`),className:`w-full flex items-center gap-2 px-3 py-2 rounded-lg transition-colors text-sm ${B?"bg-re-red/20 text-re-red font-semibold":"text-slate-500 hover:bg-white/5 hover:text-white"}`,children:[e.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-current flex-shrink-0"}),e.jsx("span",{children:I.label})]},I.id)})})]},L.id)})}),e.jsxs("div",{className:"p-4 border-t border-white/10 space-y-2",children:[!i&&a&&e.jsx("div",{className:"px-4 py-2 bg-white/5 rounded-lg mb-2",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-re-red rounded-full flex items-center justify-center font-bold flex-shrink-0",children:e.jsx("span",{children:a.name.charAt(0)})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"truncate text-sm font-semibold",children:a.name}),e.jsx("p",{className:"text-slate-500 truncate text-[11px] uppercase tracking-wider",children:a.role})]})]})}),i&&a&&e.jsx("div",{className:"flex justify-center mb-2",children:e.jsx("div",{className:"w-9 h-9 bg-re-red rounded-full flex items-center justify-center font-bold text-sm",title:a.name,children:e.jsx("span",{children:a.name.charAt(0)})})}),e.jsxs(se,{onClick:t,variant:"ghost",className:`w-full ${i?"px-2 justify-center":"justify-start"} text-slate-400 hover:bg-white/5 hover:text-white`,title:i?"Logout":void 0,children:[e.jsx(hk,{className:"w-5 h-5 flex-shrink-0"}),!i&&e.jsx("span",{className:"ml-3",children:"Logout"})]})]})]}),u&&i&&(()=>{const L=E.find($=>$.submenuKey===u.submenuKey);return!L||!L.submenu?null:Hy.createPortal(e.jsxs("div",{style:{top:u.top,left:u.left},className:"fixed z-[9999] min-w-[200px] bg-gray-900 border border-white/10 rounded-xl shadow-2xl py-2",onMouseEnter:P,onMouseLeave:()=>D(),children:[e.jsx("div",{className:"px-4 py-1.5 text-xs font-bold uppercase tracking-widest text-slate-400 border-b border-white/10 mb-1",children:L.label}),L.submenu.map($=>{const Y=r===$.id;return e.jsxs("button",{onClick:()=>{s(`/${$.id}`),D(!0)},className:`w-full flex items-center gap-2.5 px-4 py-2.5 text-sm transition-colors ${Y?"bg-re-red/20 text-re-red font-semibold":"text-slate-300 hover:bg-white/10 hover:text-white"}`,children:[e.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-current flex-shrink-0"}),e.jsx("span",{children:$.label})]},$.id)})]}),document.body)})()]})}function P1(t){const s=HM(t),n=g.forwardRef((r,a)=>{const{children:i,...o}=r,d=g.Children.toArray(i),m=d.find(GM);if(m){const f=m.props.children,p=d.map(h=>h===m?g.Children.count(f)>1?g.Children.only(null):g.isValidElement(f)?f.props.children:null:h);return e.jsx(s,{...o,ref:a,children:g.isValidElement(f)?g.cloneElement(f,void 0,p):null})}return e.jsx(s,{...o,ref:a,children:i})});return n.displayName=`${t}.Slot`,n}function HM(t){const s=g.forwardRef((n,r)=>{const{children:a,...i}=n;if(g.isValidElement(a)){const o=YM(a),d=KM(i,a.props);return a.type!==g.Fragment&&(d.ref=r?Xr(r,o):o),g.cloneElement(a,d)}return g.Children.count(a)>1?g.Children.only(null):null});return s.displayName=`${t}.SlotClone`,s}var WM=Symbol("radix.slottable");function GM(t){return g.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===WM}function KM(t,s){const n={...s};for(const r in s){const a=t[r],i=s[r];/^on[A-Z]/.test(r)?a&&i?n[r]=(...d)=>{const m=i(...d);return a(...d),m}:a&&(n[r]=a):r==="style"?n[r]={...a,...i}:r==="className"&&(n[r]=[a,i].filter(Boolean).join(" "))}return{...t,...n}}function YM(t){var r,a;let s=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=s&&"isReactWarning"in s&&s.isReactWarning;return n?t.ref:(s=(a=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:a.get,n=s&&"isReactWarning"in s&&s.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function rb(t){const s=t+"CollectionProvider",[n,r]=ga(s),[a,i]=n(s,{collectionRef:{current:null},itemMap:new Map}),o=v=>{const{scope:w,children:j}=v,b=wt.useRef(null),C=wt.useRef(new Map).current;return e.jsx(a,{scope:w,itemMap:C,collectionRef:b,children:j})};o.displayName=s;const d=t+"CollectionSlot",m=P1(d),f=wt.forwardRef((v,w)=>{const{scope:j,children:b}=v,C=i(d,j),S=Gs(w,C.collectionRef);return e.jsx(m,{ref:S,children:b})});f.displayName=d;const p=t+"CollectionItemSlot",h="data-radix-collection-item",x=P1(p),u=wt.forwardRef((v,w)=>{const{scope:j,children:b,...C}=v,S=wt.useRef(null),R=Gs(w,S),_=i(p,j);return wt.useEffect(()=>(_.itemMap.set(S,{ref:S,...C}),()=>void _.itemMap.delete(S))),e.jsx(x,{[h]:"",ref:R,children:b})});u.displayName=p;function N(v){const w=i(t+"CollectionConsumer",v);return wt.useCallback(()=>{const b=w.collectionRef.current;if(!b)return[];const C=Array.from(b.querySelectorAll(`[${h}]`));return Array.from(w.itemMap.values()).sort((_,A)=>C.indexOf(_.ref.current)-C.indexOf(A.ref.current))},[w.collectionRef,w.itemMap])}return[{Provider:o,Slot:f,ItemSlot:u},N,r]}var ZM=g.createContext(void 0);function Ku(t){const s=g.useContext(ZM);return t||s||"ltr"}function Sr(t){const s=g.useRef(t);return g.useEffect(()=>{s.current=t}),g.useMemo(()=>(...n)=>{var r;return(r=s.current)==null?void 0:r.call(s,...n)},[])}function QM(t,s=globalThis==null?void 0:globalThis.document){const n=Sr(t);g.useEffect(()=>{const r=a=>{a.key==="Escape"&&n(a)};return s.addEventListener("keydown",r,{capture:!0}),()=>s.removeEventListener("keydown",r,{capture:!0})},[n,s])}var XM="DismissableLayer",ly="dismissableLayer.update",JM="dismissableLayer.pointerDownOutside",e3="dismissableLayer.focusOutside",O1,xk=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),bd=g.forwardRef((t,s)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:o,onDismiss:d,...m}=t,f=g.useContext(xk),[p,h]=g.useState(null),x=(p==null?void 0:p.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,u]=g.useState({}),N=Gs(s,A=>h(A)),v=Array.from(f.layers),[w]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),j=v.indexOf(w),b=p?v.indexOf(p):-1,C=f.layersWithOutsidePointerEventsDisabled.size>0,S=b>=j,R=n3(A=>{const E=A.target,q=[...f.branches].some(O=>O.contains(E));!S||q||(a==null||a(A),o==null||o(A),A.defaultPrevented||d==null||d())},x),_=r3(A=>{const E=A.target;[...f.branches].some(O=>O.contains(E))||(i==null||i(A),o==null||o(A),A.defaultPrevented||d==null||d())},x);return QM(A=>{b===f.layers.size-1&&(r==null||r(A),!A.defaultPrevented&&d&&(A.preventDefault(),d()))},x),g.useEffect(()=>{if(p)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(O1=x.body.style.pointerEvents,x.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(p)),f.layers.add(p),L1(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(x.body.style.pointerEvents=O1)}},[p,x,n,f]),g.useEffect(()=>()=>{p&&(f.layers.delete(p),f.layersWithOutsidePointerEventsDisabled.delete(p),L1())},[p,f]),g.useEffect(()=>{const A=()=>u({});return document.addEventListener(ly,A),()=>document.removeEventListener(ly,A)},[]),e.jsx(js.div,{...m,ref:N,style:{pointerEvents:C?S?"auto":"none":void 0,...t.style},onFocusCapture:Kt(t.onFocusCapture,_.onFocusCapture),onBlurCapture:Kt(t.onBlurCapture,_.onBlurCapture),onPointerDownCapture:Kt(t.onPointerDownCapture,R.onPointerDownCapture)})});bd.displayName=XM;var t3="DismissableLayerBranch",s3=g.forwardRef((t,s)=>{const n=g.useContext(xk),r=g.useRef(null),a=Gs(s,r);return g.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),e.jsx(js.div,{...t,ref:a})});s3.displayName=t3;function n3(t,s=globalThis==null?void 0:globalThis.document){const n=Sr(t),r=g.useRef(!1),a=g.useRef(()=>{});return g.useEffect(()=>{const i=d=>{if(d.target&&!r.current){let m=function(){gk(JM,n,f,{discrete:!0})};const f={originalEvent:d};d.pointerType==="touch"?(s.removeEventListener("click",a.current),a.current=m,s.addEventListener("click",a.current,{once:!0})):m()}else s.removeEventListener("click",a.current);r.current=!1},o=window.setTimeout(()=>{s.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),s.removeEventListener("pointerdown",i),s.removeEventListener("click",a.current)}},[s,n]),{onPointerDownCapture:()=>r.current=!0}}function r3(t,s=globalThis==null?void 0:globalThis.document){const n=Sr(t),r=g.useRef(!1);return g.useEffect(()=>{const a=i=>{i.target&&!r.current&&gk(e3,n,{originalEvent:i},{discrete:!1})};return s.addEventListener("focusin",a),()=>s.removeEventListener("focusin",a)},[s,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function L1(){const t=new CustomEvent(ly);document.dispatchEvent(t)}function gk(t,s,n,{discrete:r}){const a=n.originalEvent.target,i=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});s&&a.addEventListener(t,s,{once:!0}),r?YA(a,i):a.dispatchEvent(i)}var yg=0;function $f(){g.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??I1()),document.body.insertAdjacentElement("beforeend",t[1]??I1()),yg++,()=>{yg===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(s=>s.remove()),yg--}},[])}function I1(){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 bg="focusScope.autoFocusOnMount",jg="focusScope.autoFocusOnUnmount",M1={bubbles:!1,cancelable:!0},a3="FocusScope",Yu=g.forwardRef((t,s)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:i,...o}=t,[d,m]=g.useState(null),f=Sr(a),p=Sr(i),h=g.useRef(null),x=Gs(s,v=>m(v)),u=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(r){let v=function(C){if(u.paused||!d)return;const S=C.target;d.contains(S)?h.current=S:Kl(h.current,{select:!0})},w=function(C){if(u.paused||!d)return;const S=C.relatedTarget;S!==null&&(d.contains(S)||Kl(h.current,{select:!0}))},j=function(C){if(document.activeElement===document.body)for(const R of C)R.removedNodes.length>0&&Kl(d)};document.addEventListener("focusin",v),document.addEventListener("focusout",w);const b=new MutationObserver(j);return d&&b.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",w),b.disconnect()}}},[r,d,u.paused]),g.useEffect(()=>{if(d){B1.add(u);const v=document.activeElement;if(!d.contains(v)){const j=new CustomEvent(bg,M1);d.addEventListener(bg,f),d.dispatchEvent(j),j.defaultPrevented||(i3(u3(vk(d)),{select:!0}),document.activeElement===v&&Kl(d))}return()=>{d.removeEventListener(bg,f),setTimeout(()=>{const j=new CustomEvent(jg,M1);d.addEventListener(jg,p),d.dispatchEvent(j),j.defaultPrevented||Kl(v??document.body,{select:!0}),d.removeEventListener(jg,p),B1.remove(u)},0)}}},[d,f,p,u]);const N=g.useCallback(v=>{if(!n&&!r||u.paused)return;const w=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,j=document.activeElement;if(w&&j){const b=v.currentTarget,[C,S]=l3(b);C&&S?!v.shiftKey&&j===S?(v.preventDefault(),n&&Kl(C,{select:!0})):v.shiftKey&&j===C&&(v.preventDefault(),n&&Kl(S,{select:!0})):j===b&&v.preventDefault()}},[n,r,u.paused]);return e.jsx(js.div,{tabIndex:-1,...o,ref:x,onKeyDown:N})});Yu.displayName=a3;function i3(t,{select:s=!1}={}){const n=document.activeElement;for(const r of t)if(Kl(r,{select:s}),document.activeElement!==n)return}function l3(t){const s=vk(t),n=F1(s,t),r=F1(s.reverse(),t);return[n,r]}function vk(t){const s=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)s.push(n.currentNode);return s}function F1(t,s){for(const n of t)if(!o3(n,{upTo:s}))return n}function o3(t,{upTo:s}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(s!==void 0&&t===s)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function c3(t){return t instanceof HTMLInputElement&&"select"in t}function Kl(t,{select:s=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&c3(t)&&s&&t.select()}}var B1=d3();function d3(){let t=[];return{add(s){const n=t[0];s!==n&&(n==null||n.pause()),t=$1(t,s),t.unshift(s)},remove(s){var n;t=$1(t,s),(n=t[0])==null||n.resume()}}}function $1(t,s){const n=[...t],r=n.indexOf(s);return r!==-1&&n.splice(r,1),n}function u3(t){return t.filter(s=>s.tagName!=="A")}var h3=Sf[" useId ".trim().toString()]||(()=>{}),m3=0;function Ar(t){const[s,n]=g.useState(h3());return cr(()=>{n(r=>r??String(m3++))},[t]),t||(s?`radix-${s}`:"")}const f3=["top","right","bottom","left"],ro=Math.min,Ca=Math.max,of=Math.round,mm=Math.floor,Mi=t=>({x:t,y:t}),p3={left:"right",right:"left",bottom:"top",top:"bottom"};function oy(t,s,n){return Ca(t,ro(s,n))}function pl(t,s){return typeof t=="function"?t(s):t}function xl(t){return t.split("-")[0]}function jd(t){return t.split("-")[1]}function ab(t){return t==="x"?"y":"x"}function ib(t){return t==="y"?"height":"width"}function Li(t){const s=t[0];return s==="t"||s==="b"?"y":"x"}function lb(t){return ab(Li(t))}function x3(t,s,n){n===void 0&&(n=!1);const r=jd(t),a=lb(t),i=ib(a);let o=a==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return s.reference[i]>s.floating[i]&&(o=cf(o)),[o,cf(o)]}function g3(t){const s=cf(t);return[cy(t),s,cy(s)]}function cy(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const q1=["left","right"],z1=["right","left"],v3=["top","bottom"],y3=["bottom","top"];function b3(t,s,n){switch(t){case"top":case"bottom":return n?s?z1:q1:s?q1:z1;case"left":case"right":return s?v3:y3;default:return[]}}function j3(t,s,n,r){const a=jd(t);let i=b3(xl(t),n==="start",r);return a&&(i=i.map(o=>o+"-"+a),s&&(i=i.concat(i.map(cy)))),i}function cf(t){const s=xl(t);return p3[s]+t.slice(s.length)}function N3(t){return{top:0,right:0,bottom:0,left:0,...t}}function yk(t){return typeof t!="number"?N3(t):{top:t,right:t,bottom:t,left:t}}function df(t){const{x:s,y:n,width:r,height:a}=t;return{width:r,height:a,top:n,left:s,right:s+r,bottom:n+a,x:s,y:n}}function U1(t,s,n){let{reference:r,floating:a}=t;const i=Li(s),o=lb(s),d=ib(o),m=xl(s),f=i==="y",p=r.x+r.width/2-a.width/2,h=r.y+r.height/2-a.height/2,x=r[d]/2-a[d]/2;let u;switch(m){case"top":u={x:p,y:r.y-a.height};break;case"bottom":u={x:p,y:r.y+r.height};break;case"right":u={x:r.x+r.width,y:h};break;case"left":u={x:r.x-a.width,y:h};break;default:u={x:r.x,y:r.y}}switch(jd(s)){case"start":u[o]-=x*(n&&f?-1:1);break;case"end":u[o]+=x*(n&&f?-1:1);break}return u}async function w3(t,s){var n;s===void 0&&(s={});const{x:r,y:a,platform:i,rects:o,elements:d,strategy:m}=t,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:h="floating",altBoundary:x=!1,padding:u=0}=pl(s,t),N=yk(u),w=d[x?h==="floating"?"reference":"floating":h],j=df(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(w)))==null||n?w:w.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(d.floating)),boundary:f,rootBoundary:p,strategy:m})),b=h==="floating"?{x:r,y:a,width:o.floating.width,height:o.floating.height}:o.reference,C=await(i.getOffsetParent==null?void 0:i.getOffsetParent(d.floating)),S=await(i.isElement==null?void 0:i.isElement(C))?await(i.getScale==null?void 0:i.getScale(C))||{x:1,y:1}:{x:1,y:1},R=df(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:b,offsetParent:C,strategy:m}):b);return{top:(j.top-R.top+N.top)/S.y,bottom:(R.bottom-j.bottom+N.bottom)/S.y,left:(j.left-R.left+N.left)/S.x,right:(R.right-j.right+N.right)/S.x}}const S3=50,C3=async(t,s,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:i=[],platform:o}=n,d=o.detectOverflow?o:{...o,detectOverflow:w3},m=await(o.isRTL==null?void 0:o.isRTL(s));let f=await o.getElementRects({reference:t,floating:s,strategy:a}),{x:p,y:h}=U1(f,r,m),x=r,u=0;const N={};for(let v=0;v({name:"arrow",options:t,async fn(s){const{x:n,y:r,placement:a,rects:i,platform:o,elements:d,middlewareData:m}=s,{element:f,padding:p=0}=pl(t,s)||{};if(f==null)return{};const h=yk(p),x={x:n,y:r},u=lb(a),N=ib(u),v=await o.getDimensions(f),w=u==="y",j=w?"top":"left",b=w?"bottom":"right",C=w?"clientHeight":"clientWidth",S=i.reference[N]+i.reference[u]-x[u]-i.floating[N],R=x[u]-i.reference[u],_=await(o.getOffsetParent==null?void 0:o.getOffsetParent(f));let A=_?_[C]:0;(!A||!await(o.isElement==null?void 0:o.isElement(_)))&&(A=d.floating[C]||i.floating[N]);const E=S/2-R/2,q=A/2-v[N]/2-1,O=ro(h[j],q),D=ro(h[b],q),P=O,L=A-v[N]-D,$=A/2-v[N]/2+E,Y=oy(P,$,L),Z=!m.arrow&&jd(a)!=null&&$!==Y&&i.reference[N]/2-($$<=0)){var D,P;const $=(((D=i.flip)==null?void 0:D.index)||0)+1,Y=A[$];if(Y&&(!(h==="alignment"?b!==Li(Y):!1)||O.every(U=>Li(U.placement)===b?U.overflows[0]>0:!0)))return{data:{index:$,overflows:O},reset:{placement:Y}};let Z=(P=O.filter(W=>W.overflows[0]<=0).sort((W,U)=>W.overflows[1]-U.overflows[1])[0])==null?void 0:P.placement;if(!Z)switch(u){case"bestFit":{var L;const W=(L=O.filter(U=>{if(_){const M=Li(U.placement);return M===b||M==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(M=>M>0).reduce((M,z)=>M+z,0)]).sort((U,M)=>U[1]-M[1])[0])==null?void 0:L[0];W&&(Z=W);break}case"initialPlacement":Z=d;break}if(a!==Z)return{reset:{placement:Z}}}return{}}}};function V1(t,s){return{top:t.top-s.height,right:t.right-s.width,bottom:t.bottom-s.height,left:t.left-s.width}}function H1(t){return f3.some(s=>t[s]>=0)}const D3=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(s){const{rects:n,platform:r}=s,{strategy:a="referenceHidden",...i}=pl(t,s);switch(a){case"referenceHidden":{const o=await r.detectOverflow(s,{...i,elementContext:"reference"}),d=V1(o,n.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:H1(d)}}}case"escaped":{const o=await r.detectOverflow(s,{...i,altBoundary:!0}),d=V1(o,n.floating);return{data:{escapedOffsets:d,escaped:H1(d)}}}default:return{}}}}},bk=new Set(["left","top"]);async function R3(t,s){const{placement:n,platform:r,elements:a}=t,i=await(r.isRTL==null?void 0:r.isRTL(a.floating)),o=xl(n),d=jd(n),m=Li(n)==="y",f=bk.has(o)?-1:1,p=i&&m?-1:1,h=pl(s,t);let{mainAxis:x,crossAxis:u,alignmentAxis:N}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return d&&typeof N=="number"&&(u=d==="end"?N*-1:N),m?{x:u*p,y:x*f}:{x:x*f,y:u*p}}const E3=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(s){var n,r;const{x:a,y:i,placement:o,middlewareData:d}=s,m=await R3(s,t);return o===((n=d.offset)==null?void 0:n.placement)&&(r=d.arrow)!=null&&r.alignmentOffset?{}:{x:a+m.x,y:i+m.y,data:{...m,placement:o}}}}},_3=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(s){const{x:n,y:r,placement:a,platform:i}=s,{mainAxis:o=!0,crossAxis:d=!1,limiter:m={fn:j=>{let{x:b,y:C}=j;return{x:b,y:C}}},...f}=pl(t,s),p={x:n,y:r},h=await i.detectOverflow(s,f),x=Li(xl(a)),u=ab(x);let N=p[u],v=p[x];if(o){const j=u==="y"?"top":"left",b=u==="y"?"bottom":"right",C=N+h[j],S=N-h[b];N=oy(C,N,S)}if(d){const j=x==="y"?"top":"left",b=x==="y"?"bottom":"right",C=v+h[j],S=v-h[b];v=oy(C,v,S)}const w=m.fn({...s,[u]:N,[x]:v});return{...w,data:{x:w.x-n,y:w.y-r,enabled:{[u]:o,[x]:d}}}}}},T3=function(t){return t===void 0&&(t={}),{options:t,fn(s){const{x:n,y:r,placement:a,rects:i,middlewareData:o}=s,{offset:d=0,mainAxis:m=!0,crossAxis:f=!0}=pl(t,s),p={x:n,y:r},h=Li(a),x=ab(h);let u=p[x],N=p[h];const v=pl(d,s),w=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(m){const C=x==="y"?"height":"width",S=i.reference[x]-i.floating[C]+w.mainAxis,R=i.reference[x]+i.reference[C]-w.mainAxis;uR&&(u=R)}if(f){var j,b;const C=x==="y"?"width":"height",S=bk.has(xl(a)),R=i.reference[h]-i.floating[C]+(S&&((j=o.offset)==null?void 0:j[h])||0)+(S?0:w.crossAxis),_=i.reference[h]+i.reference[C]+(S?0:((b=o.offset)==null?void 0:b[h])||0)-(S?w.crossAxis:0);N_&&(N=_)}return{[x]:u,[h]:N}}}},P3=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(s){var n,r;const{placement:a,rects:i,platform:o,elements:d}=s,{apply:m=()=>{},...f}=pl(t,s),p=await o.detectOverflow(s,f),h=xl(a),x=jd(a),u=Li(a)==="y",{width:N,height:v}=i.floating;let w,j;h==="top"||h==="bottom"?(w=h,j=x===(await(o.isRTL==null?void 0:o.isRTL(d.floating))?"start":"end")?"left":"right"):(j=h,w=x==="end"?"top":"bottom");const b=v-p.top-p.bottom,C=N-p.left-p.right,S=ro(v-p[w],b),R=ro(N-p[j],C),_=!s.middlewareData.shift;let A=S,E=R;if((n=s.middlewareData.shift)!=null&&n.enabled.x&&(E=C),(r=s.middlewareData.shift)!=null&&r.enabled.y&&(A=b),_&&!x){const O=Ca(p.left,0),D=Ca(p.right,0),P=Ca(p.top,0),L=Ca(p.bottom,0);u?E=N-2*(O!==0||D!==0?O+D:Ca(p.left,p.right)):A=v-2*(P!==0||L!==0?P+L:Ca(p.top,p.bottom))}await m({...s,availableWidth:E,availableHeight:A});const q=await o.getDimensions(d.floating);return N!==q.width||v!==q.height?{reset:{rects:!0}}:{}}}};function qf(){return typeof window<"u"}function Nd(t){return jk(t)?(t.nodeName||"").toLowerCase():"#document"}function Ea(t){var s;return(t==null||(s=t.ownerDocument)==null?void 0:s.defaultView)||window}function zi(t){var s;return(s=(jk(t)?t.ownerDocument:t.document)||window.document)==null?void 0:s.documentElement}function jk(t){return qf()?t instanceof Node||t instanceof Ea(t).Node:!1}function pi(t){return qf()?t instanceof Element||t instanceof Ea(t).Element:!1}function bl(t){return qf()?t instanceof HTMLElement||t instanceof Ea(t).HTMLElement:!1}function W1(t){return!qf()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Ea(t).ShadowRoot}function Zu(t){const{overflow:s,overflowX:n,overflowY:r,display:a}=xi(t);return/auto|scroll|overlay|hidden|clip/.test(s+r+n)&&a!=="inline"&&a!=="contents"}function O3(t){return/^(table|td|th)$/.test(Nd(t))}function zf(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const L3=/transform|translate|scale|rotate|perspective|filter/,I3=/paint|layout|strict|content/,$o=t=>!!t&&t!=="none";let Ng;function ob(t){const s=pi(t)?xi(t):t;return $o(s.transform)||$o(s.translate)||$o(s.scale)||$o(s.rotate)||$o(s.perspective)||!cb()&&($o(s.backdropFilter)||$o(s.filter))||L3.test(s.willChange||"")||I3.test(s.contain||"")}function M3(t){let s=ao(t);for(;bl(s)&&!od(s);){if(ob(s))return s;if(zf(s))return null;s=ao(s)}return null}function cb(){return Ng==null&&(Ng=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ng}function od(t){return/^(html|body|#document)$/.test(Nd(t))}function xi(t){return Ea(t).getComputedStyle(t)}function Uf(t){return pi(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function ao(t){if(Nd(t)==="html")return t;const s=t.assignedSlot||t.parentNode||W1(t)&&t.host||zi(t);return W1(s)?s.host:s}function Nk(t){const s=ao(t);return od(s)?t.ownerDocument?t.ownerDocument.body:t.body:bl(s)&&Zu(s)?s:Nk(s)}function Du(t,s,n){var r;s===void 0&&(s=[]),n===void 0&&(n=!0);const a=Nk(t),i=a===((r=t.ownerDocument)==null?void 0:r.body),o=Ea(a);if(i){const d=dy(o);return s.concat(o,o.visualViewport||[],Zu(a)?a:[],d&&n?Du(d):[])}else return s.concat(a,Du(a,[],n))}function dy(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function wk(t){const s=xi(t);let n=parseFloat(s.width)||0,r=parseFloat(s.height)||0;const a=bl(t),i=a?t.offsetWidth:n,o=a?t.offsetHeight:r,d=of(n)!==i||of(r)!==o;return d&&(n=i,r=o),{width:n,height:r,$:d}}function db(t){return pi(t)?t:t.contextElement}function Jc(t){const s=db(t);if(!bl(s))return Mi(1);const n=s.getBoundingClientRect(),{width:r,height:a,$:i}=wk(s);let o=(i?of(n.width):n.width)/r,d=(i?of(n.height):n.height)/a;return(!o||!Number.isFinite(o))&&(o=1),(!d||!Number.isFinite(d))&&(d=1),{x:o,y:d}}const F3=Mi(0);function Sk(t){const s=Ea(t);return!cb()||!s.visualViewport?F3:{x:s.visualViewport.offsetLeft,y:s.visualViewport.offsetTop}}function B3(t,s,n){return s===void 0&&(s=!1),!n||s&&n!==Ea(t)?!1:s}function ac(t,s,n,r){s===void 0&&(s=!1),n===void 0&&(n=!1);const a=t.getBoundingClientRect(),i=db(t);let o=Mi(1);s&&(r?pi(r)&&(o=Jc(r)):o=Jc(t));const d=B3(i,n,r)?Sk(i):Mi(0);let m=(a.left+d.x)/o.x,f=(a.top+d.y)/o.y,p=a.width/o.x,h=a.height/o.y;if(i){const x=Ea(i),u=r&&pi(r)?Ea(r):r;let N=x,v=dy(N);for(;v&&r&&u!==N;){const w=Jc(v),j=v.getBoundingClientRect(),b=xi(v),C=j.left+(v.clientLeft+parseFloat(b.paddingLeft))*w.x,S=j.top+(v.clientTop+parseFloat(b.paddingTop))*w.y;m*=w.x,f*=w.y,p*=w.x,h*=w.y,m+=C,f+=S,N=Ea(v),v=dy(N)}}return df({width:p,height:h,x:m,y:f})}function Vf(t,s){const n=Uf(t).scrollLeft;return s?s.left+n:ac(zi(t)).left+n}function Ck(t,s){const n=t.getBoundingClientRect(),r=n.left+s.scrollLeft-Vf(t,n),a=n.top+s.scrollTop;return{x:r,y:a}}function $3(t){let{elements:s,rect:n,offsetParent:r,strategy:a}=t;const i=a==="fixed",o=zi(r),d=s?zf(s.floating):!1;if(r===o||d&&i)return n;let m={scrollLeft:0,scrollTop:0},f=Mi(1);const p=Mi(0),h=bl(r);if((h||!h&&!i)&&((Nd(r)!=="body"||Zu(o))&&(m=Uf(r)),h)){const u=ac(r);f=Jc(r),p.x=u.x+r.clientLeft,p.y=u.y+r.clientTop}const x=o&&!h&&!i?Ck(o,m):Mi(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-m.scrollLeft*f.x+p.x+x.x,y:n.y*f.y-m.scrollTop*f.y+p.y+x.y}}function q3(t){return Array.from(t.getClientRects())}function z3(t){const s=zi(t),n=Uf(t),r=t.ownerDocument.body,a=Ca(s.scrollWidth,s.clientWidth,r.scrollWidth,r.clientWidth),i=Ca(s.scrollHeight,s.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+Vf(t);const d=-n.scrollTop;return xi(r).direction==="rtl"&&(o+=Ca(s.clientWidth,r.clientWidth)-a),{width:a,height:i,x:o,y:d}}const G1=25;function U3(t,s){const n=Ea(t),r=zi(t),a=n.visualViewport;let i=r.clientWidth,o=r.clientHeight,d=0,m=0;if(a){i=a.width,o=a.height;const p=cb();(!p||p&&s==="fixed")&&(d=a.offsetLeft,m=a.offsetTop)}const f=Vf(r);if(f<=0){const p=r.ownerDocument,h=p.body,x=getComputedStyle(h),u=p.compatMode==="CSS1Compat"&&parseFloat(x.marginLeft)+parseFloat(x.marginRight)||0,N=Math.abs(r.clientWidth-h.clientWidth-u);N<=G1&&(i-=N)}else f<=G1&&(i+=f);return{width:i,height:o,x:d,y:m}}function V3(t,s){const n=ac(t,!0,s==="fixed"),r=n.top+t.clientTop,a=n.left+t.clientLeft,i=bl(t)?Jc(t):Mi(1),o=t.clientWidth*i.x,d=t.clientHeight*i.y,m=a*i.x,f=r*i.y;return{width:o,height:d,x:m,y:f}}function K1(t,s,n){let r;if(s==="viewport")r=U3(t,n);else if(s==="document")r=z3(zi(t));else if(pi(s))r=V3(s,n);else{const a=Sk(t);r={x:s.x-a.x,y:s.y-a.y,width:s.width,height:s.height}}return df(r)}function Ak(t,s){const n=ao(t);return n===s||!pi(n)||od(n)?!1:xi(n).position==="fixed"||Ak(n,s)}function H3(t,s){const n=s.get(t);if(n)return n;let r=Du(t,[],!1).filter(d=>pi(d)&&Nd(d)!=="body"),a=null;const i=xi(t).position==="fixed";let o=i?ao(t):t;for(;pi(o)&&!od(o);){const d=xi(o),m=ob(o);!m&&d.position==="fixed"&&(a=null),(i?!m&&!a:!m&&d.position==="static"&&!!a&&(a.position==="absolute"||a.position==="fixed")||Zu(o)&&!m&&Ak(t,o))?r=r.filter(p=>p!==o):a=d,o=ao(o)}return s.set(t,r),r}function W3(t){let{element:s,boundary:n,rootBoundary:r,strategy:a}=t;const o=[...n==="clippingAncestors"?zf(s)?[]:H3(s,this._c):[].concat(n),r],d=K1(s,o[0],a);let m=d.top,f=d.right,p=d.bottom,h=d.left;for(let x=1;x{o(!1,1e-7)},1e3)}A===1&&!Dk(f,t.getBoundingClientRect())&&o(),S=!1}try{n=new IntersectionObserver(R,{...C,root:a.ownerDocument})}catch{n=new IntersectionObserver(R,C)}n.observe(t)}return o(!0),i}function J3(t,s,n,r){r===void 0&&(r={});const{ancestorScroll:a=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:m=!1}=r,f=db(t),p=a||i?[...f?Du(f):[],...s?Du(s):[]]:[];p.forEach(j=>{a&&j.addEventListener("scroll",n,{passive:!0}),i&&j.addEventListener("resize",n)});const h=f&&d?X3(f,n):null;let x=-1,u=null;o&&(u=new ResizeObserver(j=>{let[b]=j;b&&b.target===f&&u&&s&&(u.unobserve(s),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var C;(C=u)==null||C.observe(s)})),n()}),f&&!m&&u.observe(f),s&&u.observe(s));let N,v=m?ac(t):null;m&&w();function w(){const j=ac(t);v&&!Dk(v,j)&&n(),v=j,N=requestAnimationFrame(w)}return n(),()=>{var j;p.forEach(b=>{a&&b.removeEventListener("scroll",n),i&&b.removeEventListener("resize",n)}),h==null||h(),(j=u)==null||j.disconnect(),u=null,m&&cancelAnimationFrame(N)}}const eF=E3,tF=_3,sF=k3,nF=P3,rF=D3,Z1=A3,aF=T3,iF=(t,s,n)=>{const r=new Map,a={platform:Q3,...n},i={...a.platform,_c:r};return C3(t,s,{...a,platform:i})};var lF=typeof document<"u",oF=function(){},Fm=lF?g.useLayoutEffect:oF;function uf(t,s){if(t===s)return!0;if(typeof t!=typeof s)return!1;if(typeof t=="function"&&t.toString()===s.toString())return!0;let n,r,a;if(t&&s&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==s.length)return!1;for(r=n;r--!==0;)if(!uf(t[r],s[r]))return!1;return!0}if(a=Object.keys(t),n=a.length,n!==Object.keys(s).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(s,a[r]))return!1;for(r=n;r--!==0;){const i=a[r];if(!(i==="_owner"&&t.$$typeof)&&!uf(t[i],s[i]))return!1}return!0}return t!==t&&s!==s}function Rk(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Q1(t,s){const n=Rk(t);return Math.round(s*n)/n}function Sg(t){const s=g.useRef(t);return Fm(()=>{s.current=t}),s}function cF(t){t===void 0&&(t={});const{placement:s="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:i,floating:o}={},transform:d=!0,whileElementsMounted:m,open:f}=t,[p,h]=g.useState({x:0,y:0,strategy:n,placement:s,middlewareData:{},isPositioned:!1}),[x,u]=g.useState(r);uf(x,r)||u(r);const[N,v]=g.useState(null),[w,j]=g.useState(null),b=g.useCallback(U=>{U!==_.current&&(_.current=U,v(U))},[]),C=g.useCallback(U=>{U!==A.current&&(A.current=U,j(U))},[]),S=i||N,R=o||w,_=g.useRef(null),A=g.useRef(null),E=g.useRef(p),q=m!=null,O=Sg(m),D=Sg(a),P=Sg(f),L=g.useCallback(()=>{if(!_.current||!A.current)return;const U={placement:s,strategy:n,middleware:x};D.current&&(U.platform=D.current),iF(_.current,A.current,U).then(M=>{const z={...M,isPositioned:P.current!==!1};$.current&&!uf(E.current,z)&&(E.current=z,zu.flushSync(()=>{h(z)}))})},[x,s,n,D,P]);Fm(()=>{f===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,h(U=>({...U,isPositioned:!1})))},[f]);const $=g.useRef(!1);Fm(()=>($.current=!0,()=>{$.current=!1}),[]),Fm(()=>{if(S&&(_.current=S),R&&(A.current=R),S&&R){if(O.current)return O.current(S,R,L);L()}},[S,R,L,O,q]);const Y=g.useMemo(()=>({reference:_,floating:A,setReference:b,setFloating:C}),[b,C]),Z=g.useMemo(()=>({reference:S,floating:R}),[S,R]),W=g.useMemo(()=>{const U={position:n,left:0,top:0};if(!Z.floating)return U;const M=Q1(Z.floating,p.x),z=Q1(Z.floating,p.y);return d?{...U,transform:"translate("+M+"px, "+z+"px)",...Rk(Z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:M,top:z}},[n,d,Z.floating,p.x,p.y]);return g.useMemo(()=>({...p,update:L,refs:Y,elements:Z,floatingStyles:W}),[p,L,Y,Z,W])}const dF=t=>{function s(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:a}=typeof t=="function"?t(n):t;return r&&s(r)?r.current!=null?Z1({element:r.current,padding:a}).fn(n):{}:r?Z1({element:r,padding:a}).fn(n):{}}}},uF=(t,s)=>{const n=eF(t);return{name:n.name,fn:n.fn,options:[t,s]}},hF=(t,s)=>{const n=tF(t);return{name:n.name,fn:n.fn,options:[t,s]}},mF=(t,s)=>({fn:aF(t).fn,options:[t,s]}),fF=(t,s)=>{const n=sF(t);return{name:n.name,fn:n.fn,options:[t,s]}},pF=(t,s)=>{const n=nF(t);return{name:n.name,fn:n.fn,options:[t,s]}},xF=(t,s)=>{const n=rF(t);return{name:n.name,fn:n.fn,options:[t,s]}},gF=(t,s)=>{const n=dF(t);return{name:n.name,fn:n.fn,options:[t,s]}};var vF="Arrow",Ek=g.forwardRef((t,s)=>{const{children:n,width:r=10,height:a=5,...i}=t;return e.jsx(js.svg,{...i,ref:s,width:r,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:e.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ek.displayName=vF;var yF=Ek,ub="Popper",[_k,oo]=ga(ub),[bF,Tk]=_k(ub),Pk=t=>{const{__scopePopper:s,children:n}=t,[r,a]=g.useState(null);return e.jsx(bF,{scope:s,anchor:r,onAnchorChange:a,children:n})};Pk.displayName=ub;var Ok="PopperAnchor",Lk=g.forwardRef((t,s)=>{const{__scopePopper:n,virtualRef:r,...a}=t,i=Tk(Ok,n),o=g.useRef(null),d=Gs(s,o),m=g.useRef(null);return g.useEffect(()=>{const f=m.current;m.current=(r==null?void 0:r.current)||o.current,f!==m.current&&i.onAnchorChange(m.current)}),r?null:e.jsx(js.div,{...a,ref:d})});Lk.displayName=Ok;var hb="PopperContent",[jF,NF]=_k(hb),Ik=g.forwardRef((t,s)=>{var X,J,ae,le,xe,ce;const{__scopePopper:n,side:r="bottom",sideOffset:a=0,align:i="center",alignOffset:o=0,arrowPadding:d=0,avoidCollisions:m=!0,collisionBoundary:f=[],collisionPadding:p=0,sticky:h="partial",hideWhenDetached:x=!1,updatePositionStrategy:u="optimized",onPlaced:N,...v}=t,w=Tk(hb,n),[j,b]=g.useState(null),C=Gs(s,ve=>b(ve)),[S,R]=g.useState(null),_=Qy(S),A=(_==null?void 0:_.width)??0,E=(_==null?void 0:_.height)??0,q=r+(i!=="center"?"-"+i:""),O=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},D=Array.isArray(f)?f:[f],P=D.length>0,L={padding:O,boundary:D.filter(SF),altBoundary:P},{refs:$,floatingStyles:Y,placement:Z,isPositioned:W,middlewareData:U}=cF({strategy:"fixed",placement:q,whileElementsMounted:(...ve)=>J3(...ve,{animationFrame:u==="always"}),elements:{reference:w.anchor},middleware:[uF({mainAxis:a+E,alignmentAxis:o}),m&&hF({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?mF():void 0,...L}),m&&fF({...L}),pF({...L,apply:({elements:ve,rects:Pe,availableWidth:et,availableHeight:kt})=>{const{width:vt,height:ee}=Pe.reference,ge=ve.floating.style;ge.setProperty("--radix-popper-available-width",`${et}px`),ge.setProperty("--radix-popper-available-height",`${kt}px`),ge.setProperty("--radix-popper-anchor-width",`${vt}px`),ge.setProperty("--radix-popper-anchor-height",`${ee}px`)}}),S&&gF({element:S,padding:d}),CF({arrowWidth:A,arrowHeight:E}),x&&xF({strategy:"referenceHidden",...L})]}),[M,z]=Bk(Z),T=Sr(N);cr(()=>{W&&(T==null||T())},[W,T]);const I=(X=U.arrow)==null?void 0:X.x,B=(J=U.arrow)==null?void 0:J.y,G=((ae=U.arrow)==null?void 0:ae.centerOffset)!==0,[K,H]=g.useState();return cr(()=>{j&&H(window.getComputedStyle(j).zIndex)},[j]),e.jsx("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...Y,transform:W?Y.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:K,"--radix-popper-transform-origin":[(le=U.transformOrigin)==null?void 0:le.x,(xe=U.transformOrigin)==null?void 0:xe.y].join(" "),...((ce=U.hide)==null?void 0:ce.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:e.jsx(jF,{scope:n,placedSide:M,onArrowChange:R,arrowX:I,arrowY:B,shouldHideArrow:G,children:e.jsx(js.div,{"data-side":M,"data-align":z,...v,ref:C,style:{...v.style,animation:W?void 0:"none"}})})})});Ik.displayName=hb;var Mk="PopperArrow",wF={top:"bottom",right:"left",bottom:"top",left:"right"},Fk=g.forwardRef(function(s,n){const{__scopePopper:r,...a}=s,i=NF(Mk,r),o=wF[i.placedSide];return e.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]: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:e.jsx(yF,{...a,ref:n,style:{...a.style,display:"block"}})})});Fk.displayName=Mk;function SF(t){return t!==null}var CF=t=>({name:"transformOrigin",options:t,fn(s){var w,j,b;const{placement:n,rects:r,middlewareData:a}=s,o=((w=a.arrow)==null?void 0:w.centerOffset)!==0,d=o?0:t.arrowWidth,m=o?0:t.arrowHeight,[f,p]=Bk(n),h={start:"0%",center:"50%",end:"100%"}[p],x=(((j=a.arrow)==null?void 0:j.x)??0)+d/2,u=(((b=a.arrow)==null?void 0:b.y)??0)+m/2;let N="",v="";return f==="bottom"?(N=o?h:`${x}px`,v=`${-m}px`):f==="top"?(N=o?h:`${x}px`,v=`${r.floating.height+m}px`):f==="right"?(N=`${-m}px`,v=o?h:`${u}px`):f==="left"&&(N=`${r.floating.width+m}px`,v=o?h:`${u}px`),{data:{x:N,y:v}}}});function Bk(t){const[s,n="center"]=t.split("-");return[s,n]}var Hf=Pk,Qu=Lk,Wf=Ik,Gf=Fk,AF="Portal",wd=g.forwardRef((t,s)=>{var d;const{container:n,...r}=t,[a,i]=g.useState(!1);cr(()=>i(!0),[]);const o=n||a&&((d=globalThis==null?void 0:globalThis.document)==null?void 0:d.body);return o?Hy.createPortal(e.jsx(js.div,{...r,ref:s}),o):null});wd.displayName=AF;var Cg="rovingFocusGroup.onEntryFocus",kF={bubbles:!1,cancelable:!0},Xu="RovingFocusGroup",[uy,$k,DF]=rb(Xu),[RF,Kf]=ga(Xu,[DF]),[EF,_F]=RF(Xu),qk=g.forwardRef((t,s)=>e.jsx(uy.Provider,{scope:t.__scopeRovingFocusGroup,children:e.jsx(uy.Slot,{scope:t.__scopeRovingFocusGroup,children:e.jsx(TF,{...t,ref:s})})}));qk.displayName=Xu;var TF=g.forwardRef((t,s)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:a=!1,dir:i,currentTabStopId:o,defaultCurrentTabStopId:d,onCurrentTabStopIdChange:m,onEntryFocus:f,preventScrollOnEntryFocus:p=!1,...h}=t,x=g.useRef(null),u=Gs(s,x),N=Ku(i),[v,w]=Bi({prop:o,defaultProp:d??null,onChange:m,caller:Xu}),[j,b]=g.useState(!1),C=Sr(f),S=$k(n),R=g.useRef(!1),[_,A]=g.useState(0);return g.useEffect(()=>{const E=x.current;if(E)return E.addEventListener(Cg,C),()=>E.removeEventListener(Cg,C)},[C]),e.jsx(EF,{scope:n,orientation:r,dir:N,loop:a,currentTabStopId:v,onItemFocus:g.useCallback(E=>w(E),[w]),onItemShiftTab:g.useCallback(()=>b(!0),[]),onFocusableItemAdd:g.useCallback(()=>A(E=>E+1),[]),onFocusableItemRemove:g.useCallback(()=>A(E=>E-1),[]),children:e.jsx(js.div,{tabIndex:j||_===0?-1:0,"data-orientation":r,...h,ref:u,style:{outline:"none",...t.style},onMouseDown:Kt(t.onMouseDown,()=>{R.current=!0}),onFocus:Kt(t.onFocus,E=>{const q=!R.current;if(E.target===E.currentTarget&&q&&!j){const O=new CustomEvent(Cg,kF);if(E.currentTarget.dispatchEvent(O),!O.defaultPrevented){const D=S().filter(Z=>Z.focusable),P=D.find(Z=>Z.active),L=D.find(Z=>Z.id===v),Y=[P,L,...D].filter(Boolean).map(Z=>Z.ref.current);Vk(Y,p)}}R.current=!1}),onBlur:Kt(t.onBlur,()=>b(!1))})})}),zk="RovingFocusGroupItem",Uk=g.forwardRef((t,s)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:a=!1,tabStopId:i,children:o,...d}=t,m=Ar(),f=i||m,p=_F(zk,n),h=p.currentTabStopId===f,x=$k(n),{onFocusableItemAdd:u,onFocusableItemRemove:N,currentTabStopId:v}=p;return g.useEffect(()=>{if(r)return u(),()=>N()},[r,u,N]),e.jsx(uy.ItemSlot,{scope:n,id:f,focusable:r,active:a,children:e.jsx(js.span,{tabIndex:h?0:-1,"data-orientation":p.orientation,...d,ref:s,onMouseDown:Kt(t.onMouseDown,w=>{r?p.onItemFocus(f):w.preventDefault()}),onFocus:Kt(t.onFocus,()=>p.onItemFocus(f)),onKeyDown:Kt(t.onKeyDown,w=>{if(w.key==="Tab"&&w.shiftKey){p.onItemShiftTab();return}if(w.target!==w.currentTarget)return;const j=LF(w,p.orientation,p.dir);if(j!==void 0){if(w.metaKey||w.ctrlKey||w.altKey||w.shiftKey)return;w.preventDefault();let C=x().filter(S=>S.focusable).map(S=>S.ref.current);if(j==="last")C.reverse();else if(j==="prev"||j==="next"){j==="prev"&&C.reverse();const S=C.indexOf(w.currentTarget);C=p.loop?IF(C,S+1):C.slice(S+1)}setTimeout(()=>Vk(C))}}),children:typeof o=="function"?o({isCurrentTabStop:h,hasTabStop:v!=null}):o})})});Uk.displayName=zk;var PF={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function OF(t,s){return s!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function LF(t,s,n){const r=OF(t.key,n);if(!(s==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(s==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return PF[r]}function Vk(t,s=!1){const n=document.activeElement;for(const r of t)if(r===n||(r.focus({preventScroll:s}),document.activeElement!==n))return}function IF(t,s){return t.map((n,r)=>t[(s+r)%t.length])}var Hk=qk,Wk=Uk;function MF(t){const s=FF(t),n=g.forwardRef((r,a)=>{const{children:i,...o}=r,d=g.Children.toArray(i),m=d.find($F);if(m){const f=m.props.children,p=d.map(h=>h===m?g.Children.count(f)>1?g.Children.only(null):g.isValidElement(f)?f.props.children:null:h);return e.jsx(s,{...o,ref:a,children:g.isValidElement(f)?g.cloneElement(f,void 0,p):null})}return e.jsx(s,{...o,ref:a,children:i})});return n.displayName=`${t}.Slot`,n}function FF(t){const s=g.forwardRef((n,r)=>{const{children:a,...i}=n;if(g.isValidElement(a)){const o=zF(a),d=qF(i,a.props);return a.type!==g.Fragment&&(d.ref=r?Xr(r,o):o),g.cloneElement(a,d)}return g.Children.count(a)>1?g.Children.only(null):null});return s.displayName=`${t}.SlotClone`,s}var BF=Symbol("radix.slottable");function $F(t){return g.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===BF}function qF(t,s){const n={...s};for(const r in s){const a=t[r],i=s[r];/^on[A-Z]/.test(r)?a&&i?n[r]=(...d)=>{const m=i(...d);return a(...d),m}:a&&(n[r]=a):r==="style"?n[r]={...a,...i}:r==="className"&&(n[r]=[a,i].filter(Boolean).join(" "))}return{...t,...n}}function zF(t){var r,a;let s=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=s&&"isReactWarning"in s&&s.isReactWarning;return n?t.ref:(s=(a=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:a.get,n=s&&"isReactWarning"in s&&s.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var UF=function(t){if(typeof document>"u")return null;var s=Array.isArray(t)?t[0]:t;return s.ownerDocument.body},$c=new WeakMap,fm=new WeakMap,pm={},Ag=0,Gk=function(t){return t&&(t.host||Gk(t.parentNode))},VF=function(t,s){return s.map(function(n){if(t.contains(n))return n;var r=Gk(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})},HF=function(t,s,n,r){var a=VF(s,Array.isArray(t)?t:[t]);pm[n]||(pm[n]=new WeakMap);var i=pm[n],o=[],d=new Set,m=new Set(a),f=function(h){!h||d.has(h)||(d.add(h),f(h.parentNode))};a.forEach(f);var p=function(h){!h||m.has(h)||Array.prototype.forEach.call(h.children,function(x){if(d.has(x))p(x);else try{var u=x.getAttribute(r),N=u!==null&&u!=="false",v=($c.get(x)||0)+1,w=(i.get(x)||0)+1;$c.set(x,v),i.set(x,w),o.push(x),v===1&&N&&fm.set(x,!0),w===1&&x.setAttribute(n,"true"),N||x.setAttribute(r,"true")}catch(j){console.error("aria-hidden: cannot operate on ",x,j)}})};return p(s),d.clear(),Ag++,function(){o.forEach(function(h){var x=$c.get(h)-1,u=i.get(h)-1;$c.set(h,x),i.set(h,u),x||(fm.has(h)||h.removeAttribute(r),fm.delete(h)),u||h.removeAttribute(n)}),Ag--,Ag||($c=new WeakMap,$c=new WeakMap,fm=new WeakMap,pm={})}},Yf=function(t,s,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),a=UF(t);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live], script"))),HF(r,a,n,"aria-hidden")):function(){return null}},Ti=function(){return Ti=Object.assign||function(s){for(var n,r=1,a=arguments.length;r"u")return o6;var s=c6(t),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:s[0],top:s[1],right:s[2],gap:Math.max(0,r-n+s[2]-s[0])}},u6=Qk(),ed="data-scroll-locked",h6=function(t,s,n,r){var a=t.left,i=t.top,o=t.right,d=t.gap;return n===void 0&&(n="margin"),` - .`.concat(GF,` { - overflow: hidden `).concat(r,`; - padding-right: `).concat(d,"px ").concat(r,`; - } - body[`).concat(ed,`] { - overflow: hidden `).concat(r,`; - overscroll-behavior: contain; - `).concat([s&&"position: relative ".concat(r,";"),n==="margin"&&` - padding-left: `.concat(a,`px; - padding-top: `).concat(i,`px; - padding-right: `).concat(o,`px; - margin-left:0; - margin-top:0; - margin-right: `).concat(d,"px ").concat(r,`; - `),n==="padding"&&"padding-right: ".concat(d,"px ").concat(r,";")].filter(Boolean).join(""),` - } - - .`).concat(Bm,` { - right: `).concat(d,"px ").concat(r,`; - } - - .`).concat($m,` { - margin-right: `).concat(d,"px ").concat(r,`; - } - - .`).concat(Bm," .").concat(Bm,` { - right: 0 `).concat(r,`; - } - - .`).concat($m," .").concat($m,` { - margin-right: 0 `).concat(r,`; - } - - body[`).concat(ed,`] { - `).concat(KF,": ").concat(d,`px; - } -`)},J1=function(){var t=parseInt(document.body.getAttribute(ed)||"0",10);return isFinite(t)?t:0},m6=function(){g.useEffect(function(){return document.body.setAttribute(ed,(J1()+1).toString()),function(){var t=J1()-1;t<=0?document.body.removeAttribute(ed):document.body.setAttribute(ed,t.toString())}},[])},f6=function(t){var s=t.noRelative,n=t.noImportant,r=t.gapMode,a=r===void 0?"margin":r;m6();var i=g.useMemo(function(){return d6(a)},[a]);return g.createElement(u6,{styles:h6(i,!s,a,n?"":"!important")})},hy=!1;if(typeof window<"u")try{var xm=Object.defineProperty({},"passive",{get:function(){return hy=!0,!0}});window.addEventListener("test",xm,xm),window.removeEventListener("test",xm,xm)}catch{hy=!1}var qc=hy?{passive:!1}:!1,p6=function(t){return t.tagName==="TEXTAREA"},Xk=function(t,s){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[s]!=="hidden"&&!(n.overflowY===n.overflowX&&!p6(t)&&n[s]==="visible")},x6=function(t){return Xk(t,"overflowY")},g6=function(t){return Xk(t,"overflowX")},eS=function(t,s){var n=s.ownerDocument,r=s;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var a=Jk(t,r);if(a){var i=eD(t,r),o=i[1],d=i[2];if(o>d)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},v6=function(t){var s=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[s,n,r]},y6=function(t){var s=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[s,n,r]},Jk=function(t,s){return t==="v"?x6(s):g6(s)},eD=function(t,s){return t==="v"?v6(s):y6(s)},b6=function(t,s){return t==="h"&&s==="rtl"?-1:1},j6=function(t,s,n,r,a){var i=b6(t,window.getComputedStyle(s).direction),o=i*r,d=n.target,m=s.contains(d),f=!1,p=o>0,h=0,x=0;do{if(!d)break;var u=eD(t,d),N=u[0],v=u[1],w=u[2],j=v-w-i*N;(N||j)&&Jk(t,d)&&(h+=j,x+=N);var b=d.parentNode;d=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!m&&d!==document.body||m&&(s.contains(d)||s===d));return(p&&Math.abs(h)<1||!p&&Math.abs(x)<1)&&(f=!0),f},gm=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},tS=function(t){return[t.deltaX,t.deltaY]},sS=function(t){return t&&"current"in t?t.current:t},N6=function(t,s){return t[0]===s[0]&&t[1]===s[1]},w6=function(t){return` - .block-interactivity-`.concat(t,` {pointer-events: none;} - .allow-interactivity-`).concat(t,` {pointer-events: all;} -`)},S6=0,zc=[];function C6(t){var s=g.useRef([]),n=g.useRef([0,0]),r=g.useRef(),a=g.useState(S6++)[0],i=g.useState(Qk)[0],o=g.useRef(t);g.useEffect(function(){o.current=t},[t]),g.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(a));var v=WF([t.lockRef.current],(t.shards||[]).map(sS),!0).filter(Boolean);return v.forEach(function(w){return w.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),v.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(a))})}}},[t.inert,t.lockRef.current,t.shards]);var d=g.useCallback(function(v,w){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!o.current.allowPinchZoom;var j=gm(v),b=n.current,C="deltaX"in v?v.deltaX:b[0]-j[0],S="deltaY"in v?v.deltaY:b[1]-j[1],R,_=v.target,A=Math.abs(C)>Math.abs(S)?"h":"v";if("touches"in v&&A==="h"&&_.type==="range")return!1;var E=window.getSelection(),q=E&&E.anchorNode,O=q?q===_||q.contains(_):!1;if(O)return!1;var D=eS(A,_);if(!D)return!0;if(D?R=A:(R=A==="v"?"h":"v",D=eS(A,_)),!D)return!1;if(!r.current&&"changedTouches"in v&&(C||S)&&(r.current=R),!R)return!0;var P=r.current||R;return j6(P,w,v,P==="h"?C:S)},[]),m=g.useCallback(function(v){var w=v;if(!(!zc.length||zc[zc.length-1]!==i)){var j="deltaY"in w?tS(w):gm(w),b=s.current.filter(function(R){return R.name===w.type&&(R.target===w.target||w.target===R.shadowParent)&&N6(R.delta,j)})[0];if(b&&b.should){w.cancelable&&w.preventDefault();return}if(!b){var C=(o.current.shards||[]).map(sS).filter(Boolean).filter(function(R){return R.contains(w.target)}),S=C.length>0?d(w,C[0]):!o.current.noIsolation;S&&w.cancelable&&w.preventDefault()}}},[]),f=g.useCallback(function(v,w,j,b){var C={name:v,delta:w,target:j,should:b,shadowParent:A6(j)};s.current.push(C),setTimeout(function(){s.current=s.current.filter(function(S){return S!==C})},1)},[]),p=g.useCallback(function(v){n.current=gm(v),r.current=void 0},[]),h=g.useCallback(function(v){f(v.type,tS(v),v.target,d(v,t.lockRef.current))},[]),x=g.useCallback(function(v){f(v.type,gm(v),v.target,d(v,t.lockRef.current))},[]);g.useEffect(function(){return zc.push(i),t.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:x}),document.addEventListener("wheel",m,qc),document.addEventListener("touchmove",m,qc),document.addEventListener("touchstart",p,qc),function(){zc=zc.filter(function(v){return v!==i}),document.removeEventListener("wheel",m,qc),document.removeEventListener("touchmove",m,qc),document.removeEventListener("touchstart",p,qc)}},[]);var u=t.removeScrollBar,N=t.inert;return g.createElement(g.Fragment,null,N?g.createElement(i,{styles:w6(a)}):null,u?g.createElement(f6,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function A6(t){for(var s=null;t!==null;)t instanceof ShadowRoot&&(s=t.host,t=t.host),t=t.parentNode;return s}const k6=t6(Zk,C6);var Ju=g.forwardRef(function(t,s){return g.createElement(Zf,Ti({},t,{ref:s,sideCar:k6}))});Ju.classNames=Zf.classNames;var my=["Enter"," "],D6=["ArrowDown","PageUp","Home"],tD=["ArrowUp","PageDown","End"],R6=[...D6,...tD],E6={ltr:[...my,"ArrowRight"],rtl:[...my,"ArrowLeft"]},_6={ltr:["ArrowLeft"],rtl:["ArrowRight"]},eh="Menu",[Ru,T6,P6]=rb(eh),[mc,sD]=ga(eh,[P6,oo,Kf]),Qf=oo(),nD=Kf(),[O6,fc]=mc(eh),[L6,th]=mc(eh),rD=t=>{const{__scopeMenu:s,open:n=!1,children:r,dir:a,onOpenChange:i,modal:o=!0}=t,d=Qf(s),[m,f]=g.useState(null),p=g.useRef(!1),h=Sr(i),x=Ku(a);return g.useEffect(()=>{const u=()=>{p.current=!0,document.addEventListener("pointerdown",N,{capture:!0,once:!0}),document.addEventListener("pointermove",N,{capture:!0,once:!0})},N=()=>p.current=!1;return document.addEventListener("keydown",u,{capture:!0}),()=>{document.removeEventListener("keydown",u,{capture:!0}),document.removeEventListener("pointerdown",N,{capture:!0}),document.removeEventListener("pointermove",N,{capture:!0})}},[]),e.jsx(Hf,{...d,children:e.jsx(O6,{scope:s,open:n,onOpenChange:h,content:m,onContentChange:f,children:e.jsx(L6,{scope:s,onClose:g.useCallback(()=>h(!1),[h]),isUsingKeyboardRef:p,dir:x,modal:o,children:r})})})};rD.displayName=eh;var I6="MenuAnchor",mb=g.forwardRef((t,s)=>{const{__scopeMenu:n,...r}=t,a=Qf(n);return e.jsx(Qu,{...a,...r,ref:s})});mb.displayName=I6;var fb="MenuPortal",[M6,aD]=mc(fb,{forceMount:void 0}),iD=t=>{const{__scopeMenu:s,forceMount:n,children:r,container:a}=t,i=fc(fb,s);return e.jsx(M6,{scope:s,forceMount:n,children:e.jsx(Dr,{present:n||i.open,children:e.jsx(wd,{asChild:!0,container:a,children:r})})})};iD.displayName=fb;var Wa="MenuContent",[F6,pb]=mc(Wa),lD=g.forwardRef((t,s)=>{const n=aD(Wa,t.__scopeMenu),{forceMount:r=n.forceMount,...a}=t,i=fc(Wa,t.__scopeMenu),o=th(Wa,t.__scopeMenu);return e.jsx(Ru.Provider,{scope:t.__scopeMenu,children:e.jsx(Dr,{present:r||i.open,children:e.jsx(Ru.Slot,{scope:t.__scopeMenu,children:o.modal?e.jsx(B6,{...a,ref:s}):e.jsx($6,{...a,ref:s})})})})}),B6=g.forwardRef((t,s)=>{const n=fc(Wa,t.__scopeMenu),r=g.useRef(null),a=Gs(s,r);return g.useEffect(()=>{const i=r.current;if(i)return Yf(i)},[]),e.jsx(xb,{...t,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Kt(t.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),$6=g.forwardRef((t,s)=>{const n=fc(Wa,t.__scopeMenu);return e.jsx(xb,{...t,ref:s,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),q6=MF("MenuContent.ScrollLock"),xb=g.forwardRef((t,s)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:a,onOpenAutoFocus:i,onCloseAutoFocus:o,disableOutsidePointerEvents:d,onEntryFocus:m,onEscapeKeyDown:f,onPointerDownOutside:p,onFocusOutside:h,onInteractOutside:x,onDismiss:u,disableOutsideScroll:N,...v}=t,w=fc(Wa,n),j=th(Wa,n),b=Qf(n),C=nD(n),S=T6(n),[R,_]=g.useState(null),A=g.useRef(null),E=Gs(s,A,w.onContentChange),q=g.useRef(0),O=g.useRef(""),D=g.useRef(0),P=g.useRef(null),L=g.useRef("right"),$=g.useRef(0),Y=N?Ju:g.Fragment,Z=N?{as:q6,allowPinchZoom:!0}:void 0,W=M=>{var X,J;const z=O.current+M,T=S().filter(ae=>!ae.disabled),I=document.activeElement,B=(X=T.find(ae=>ae.ref.current===I))==null?void 0:X.textValue,G=T.map(ae=>ae.textValue),K=J6(G,z,B),H=(J=T.find(ae=>ae.textValue===K))==null?void 0:J.ref.current;(function ae(le){O.current=le,window.clearTimeout(q.current),le!==""&&(q.current=window.setTimeout(()=>ae(""),1e3))})(z),H&&setTimeout(()=>H.focus())};g.useEffect(()=>()=>window.clearTimeout(q.current),[]),$f();const U=g.useCallback(M=>{var T,I;return L.current===((T=P.current)==null?void 0:T.side)&&t8(M,(I=P.current)==null?void 0:I.area)},[]);return e.jsx(F6,{scope:n,searchRef:O,onItemEnter:g.useCallback(M=>{U(M)&&M.preventDefault()},[U]),onItemLeave:g.useCallback(M=>{var z;U(M)||((z=A.current)==null||z.focus(),_(null))},[U]),onTriggerLeave:g.useCallback(M=>{U(M)&&M.preventDefault()},[U]),pointerGraceTimerRef:D,onPointerGraceIntentChange:g.useCallback(M=>{P.current=M},[]),children:e.jsx(Y,{...Z,children:e.jsx(Yu,{asChild:!0,trapped:a,onMountAutoFocus:Kt(i,M=>{var z;M.preventDefault(),(z=A.current)==null||z.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:e.jsx(bd,{asChild:!0,disableOutsidePointerEvents:d,onEscapeKeyDown:f,onPointerDownOutside:p,onFocusOutside:h,onInteractOutside:x,onDismiss:u,children:e.jsx(Hk,{asChild:!0,...C,dir:j.dir,orientation:"vertical",loop:r,currentTabStopId:R,onCurrentTabStopIdChange:_,onEntryFocus:Kt(m,M=>{j.isUsingKeyboardRef.current||M.preventDefault()}),preventScrollOnEntryFocus:!0,children:e.jsx(Wf,{role:"menu","aria-orientation":"vertical","data-state":wD(w.open),"data-radix-menu-content":"",dir:j.dir,...b,...v,ref:E,style:{outline:"none",...v.style},onKeyDown:Kt(v.onKeyDown,M=>{const T=M.target.closest("[data-radix-menu-content]")===M.currentTarget,I=M.ctrlKey||M.altKey||M.metaKey,B=M.key.length===1;T&&(M.key==="Tab"&&M.preventDefault(),!I&&B&&W(M.key));const G=A.current;if(M.target!==G||!R6.includes(M.key))return;M.preventDefault();const H=S().filter(X=>!X.disabled).map(X=>X.ref.current);tD.includes(M.key)&&H.reverse(),Q6(H)}),onBlur:Kt(t.onBlur,M=>{M.currentTarget.contains(M.target)||(window.clearTimeout(q.current),O.current="")}),onPointerMove:Kt(t.onPointerMove,Eu(M=>{const z=M.target,T=$.current!==M.clientX;if(M.currentTarget.contains(z)&&T){const I=M.clientX>$.current?"right":"left";L.current=I,$.current=M.clientX}}))})})})})})})});lD.displayName=Wa;var z6="MenuGroup",gb=g.forwardRef((t,s)=>{const{__scopeMenu:n,...r}=t;return e.jsx(js.div,{role:"group",...r,ref:s})});gb.displayName=z6;var U6="MenuLabel",oD=g.forwardRef((t,s)=>{const{__scopeMenu:n,...r}=t;return e.jsx(js.div,{...r,ref:s})});oD.displayName=U6;var hf="MenuItem",nS="menu.itemSelect",Xf=g.forwardRef((t,s)=>{const{disabled:n=!1,onSelect:r,...a}=t,i=g.useRef(null),o=th(hf,t.__scopeMenu),d=pb(hf,t.__scopeMenu),m=Gs(s,i),f=g.useRef(!1),p=()=>{const h=i.current;if(!n&&h){const x=new CustomEvent(nS,{bubbles:!0,cancelable:!0});h.addEventListener(nS,u=>r==null?void 0:r(u),{once:!0}),YA(h,x),x.defaultPrevented?f.current=!1:o.onClose()}};return e.jsx(cD,{...a,ref:m,disabled:n,onClick:Kt(t.onClick,p),onPointerDown:h=>{var x;(x=t.onPointerDown)==null||x.call(t,h),f.current=!0},onPointerUp:Kt(t.onPointerUp,h=>{var x;f.current||(x=h.currentTarget)==null||x.click()}),onKeyDown:Kt(t.onKeyDown,h=>{const x=d.searchRef.current!=="";n||x&&h.key===" "||my.includes(h.key)&&(h.currentTarget.click(),h.preventDefault())})})});Xf.displayName=hf;var cD=g.forwardRef((t,s)=>{const{__scopeMenu:n,disabled:r=!1,textValue:a,...i}=t,o=pb(hf,n),d=nD(n),m=g.useRef(null),f=Gs(s,m),[p,h]=g.useState(!1),[x,u]=g.useState("");return g.useEffect(()=>{const N=m.current;N&&u((N.textContent??"").trim())},[i.children]),e.jsx(Ru.ItemSlot,{scope:n,disabled:r,textValue:a??x,children:e.jsx(Wk,{asChild:!0,...d,focusable:!r,children:e.jsx(js.div,{role:"menuitem","data-highlighted":p?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...i,ref:f,onPointerMove:Kt(t.onPointerMove,Eu(N=>{r?o.onItemLeave(N):(o.onItemEnter(N),N.defaultPrevented||N.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Kt(t.onPointerLeave,Eu(N=>o.onItemLeave(N))),onFocus:Kt(t.onFocus,()=>h(!0)),onBlur:Kt(t.onBlur,()=>h(!1))})})})}),V6="MenuCheckboxItem",dD=g.forwardRef((t,s)=>{const{checked:n=!1,onCheckedChange:r,...a}=t;return e.jsx(pD,{scope:t.__scopeMenu,checked:n,children:e.jsx(Xf,{role:"menuitemcheckbox","aria-checked":mf(n)?"mixed":n,...a,ref:s,"data-state":yb(n),onSelect:Kt(a.onSelect,()=>r==null?void 0:r(mf(n)?!0:!n),{checkForDefaultPrevented:!1})})})});dD.displayName=V6;var uD="MenuRadioGroup",[H6,W6]=mc(uD,{value:void 0,onValueChange:()=>{}}),hD=g.forwardRef((t,s)=>{const{value:n,onValueChange:r,...a}=t,i=Sr(r);return e.jsx(H6,{scope:t.__scopeMenu,value:n,onValueChange:i,children:e.jsx(gb,{...a,ref:s})})});hD.displayName=uD;var mD="MenuRadioItem",fD=g.forwardRef((t,s)=>{const{value:n,...r}=t,a=W6(mD,t.__scopeMenu),i=n===a.value;return e.jsx(pD,{scope:t.__scopeMenu,checked:i,children:e.jsx(Xf,{role:"menuitemradio","aria-checked":i,...r,ref:s,"data-state":yb(i),onSelect:Kt(r.onSelect,()=>{var o;return(o=a.onValueChange)==null?void 0:o.call(a,n)},{checkForDefaultPrevented:!1})})})});fD.displayName=mD;var vb="MenuItemIndicator",[pD,G6]=mc(vb,{checked:!1}),xD=g.forwardRef((t,s)=>{const{__scopeMenu:n,forceMount:r,...a}=t,i=G6(vb,n);return e.jsx(Dr,{present:r||mf(i.checked)||i.checked===!0,children:e.jsx(js.span,{...a,ref:s,"data-state":yb(i.checked)})})});xD.displayName=vb;var K6="MenuSeparator",gD=g.forwardRef((t,s)=>{const{__scopeMenu:n,...r}=t;return e.jsx(js.div,{role:"separator","aria-orientation":"horizontal",...r,ref:s})});gD.displayName=K6;var Y6="MenuArrow",vD=g.forwardRef((t,s)=>{const{__scopeMenu:n,...r}=t,a=Qf(n);return e.jsx(Gf,{...a,...r,ref:s})});vD.displayName=Y6;var Z6="MenuSub",[CY,yD]=mc(Z6),mu="MenuSubTrigger",bD=g.forwardRef((t,s)=>{const n=fc(mu,t.__scopeMenu),r=th(mu,t.__scopeMenu),a=yD(mu,t.__scopeMenu),i=pb(mu,t.__scopeMenu),o=g.useRef(null),{pointerGraceTimerRef:d,onPointerGraceIntentChange:m}=i,f={__scopeMenu:t.__scopeMenu},p=g.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return g.useEffect(()=>p,[p]),g.useEffect(()=>{const h=d.current;return()=>{window.clearTimeout(h),m(null)}},[d,m]),e.jsx(mb,{asChild:!0,...f,children:e.jsx(cD,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":a.contentId,"data-state":wD(n.open),...t,ref:Xr(s,a.onTriggerChange),onClick:h=>{var x;(x=t.onClick)==null||x.call(t,h),!(t.disabled||h.defaultPrevented)&&(h.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Kt(t.onPointerMove,Eu(h=>{i.onItemEnter(h),!h.defaultPrevented&&!t.disabled&&!n.open&&!o.current&&(i.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),p()},100))})),onPointerLeave:Kt(t.onPointerLeave,Eu(h=>{var u,N;p();const x=(u=n.content)==null?void 0:u.getBoundingClientRect();if(x){const v=(N=n.content)==null?void 0:N.dataset.side,w=v==="right",j=w?-5:5,b=x[w?"left":"right"],C=x[w?"right":"left"];i.onPointerGraceIntentChange({area:[{x:h.clientX+j,y:h.clientY},{x:b,y:x.top},{x:C,y:x.top},{x:C,y:x.bottom},{x:b,y:x.bottom}],side:v}),window.clearTimeout(d.current),d.current=window.setTimeout(()=>i.onPointerGraceIntentChange(null),300)}else{if(i.onTriggerLeave(h),h.defaultPrevented)return;i.onPointerGraceIntentChange(null)}})),onKeyDown:Kt(t.onKeyDown,h=>{var u;const x=i.searchRef.current!=="";t.disabled||x&&h.key===" "||E6[r.dir].includes(h.key)&&(n.onOpenChange(!0),(u=n.content)==null||u.focus(),h.preventDefault())})})})});bD.displayName=mu;var jD="MenuSubContent",ND=g.forwardRef((t,s)=>{const n=aD(Wa,t.__scopeMenu),{forceMount:r=n.forceMount,...a}=t,i=fc(Wa,t.__scopeMenu),o=th(Wa,t.__scopeMenu),d=yD(jD,t.__scopeMenu),m=g.useRef(null),f=Gs(s,m);return e.jsx(Ru.Provider,{scope:t.__scopeMenu,children:e.jsx(Dr,{present:r||i.open,children:e.jsx(Ru.Slot,{scope:t.__scopeMenu,children:e.jsx(xb,{id:d.contentId,"aria-labelledby":d.triggerId,...a,ref:f,align:"start",side:o.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:p=>{var h;o.isUsingKeyboardRef.current&&((h=m.current)==null||h.focus()),p.preventDefault()},onCloseAutoFocus:p=>p.preventDefault(),onFocusOutside:Kt(t.onFocusOutside,p=>{p.target!==d.trigger&&i.onOpenChange(!1)}),onEscapeKeyDown:Kt(t.onEscapeKeyDown,p=>{o.onClose(),p.preventDefault()}),onKeyDown:Kt(t.onKeyDown,p=>{var u;const h=p.currentTarget.contains(p.target),x=_6[o.dir].includes(p.key);h&&x&&(i.onOpenChange(!1),(u=d.trigger)==null||u.focus(),p.preventDefault())})})})})})});ND.displayName=jD;function wD(t){return t?"open":"closed"}function mf(t){return t==="indeterminate"}function yb(t){return mf(t)?"indeterminate":t?"checked":"unchecked"}function Q6(t){const s=document.activeElement;for(const n of t)if(n===s||(n.focus(),document.activeElement!==s))return}function X6(t,s){return t.map((n,r)=>t[(s+r)%t.length])}function J6(t,s,n){const a=s.length>1&&Array.from(s).every(f=>f===s[0])?s[0]:s,i=n?t.indexOf(n):-1;let o=X6(t,Math.max(i,0));a.length===1&&(o=o.filter(f=>f!==n));const m=o.find(f=>f.toLowerCase().startsWith(a.toLowerCase()));return m!==n?m:void 0}function e8(t,s){const{x:n,y:r}=t;let a=!1;for(let i=0,o=s.length-1;ir!=x>r&&n<(h-f)*(r-p)/(x-p)+f&&(a=!a)}return a}function t8(t,s){if(!s)return!1;const n={x:t.clientX,y:t.clientY};return e8(n,s)}function Eu(t){return s=>s.pointerType==="mouse"?t(s):void 0}var s8=rD,n8=mb,r8=iD,a8=lD,i8=gb,l8=oD,o8=Xf,c8=dD,d8=hD,u8=fD,h8=xD,m8=gD,f8=vD,p8=bD,x8=ND,Jf="DropdownMenu",[g8]=ga(Jf,[sD]),ea=sD(),[v8,SD]=g8(Jf),CD=t=>{const{__scopeDropdownMenu:s,children:n,dir:r,open:a,defaultOpen:i,onOpenChange:o,modal:d=!0}=t,m=ea(s),f=g.useRef(null),[p,h]=Bi({prop:a,defaultProp:i??!1,onChange:o,caller:Jf});return e.jsx(v8,{scope:s,triggerId:Ar(),triggerRef:f,contentId:Ar(),open:p,onOpenChange:h,onOpenToggle:g.useCallback(()=>h(x=>!x),[h]),modal:d,children:e.jsx(s8,{...m,open:p,onOpenChange:h,dir:r,modal:d,children:n})})};CD.displayName=Jf;var AD="DropdownMenuTrigger",kD=g.forwardRef((t,s)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...a}=t,i=SD(AD,n),o=ea(n);return e.jsx(n8,{asChild:!0,...o,children:e.jsx(js.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,...a,ref:Xr(s,i.triggerRef),onPointerDown:Kt(t.onPointerDown,d=>{!r&&d.button===0&&d.ctrlKey===!1&&(i.onOpenToggle(),i.open||d.preventDefault())}),onKeyDown:Kt(t.onKeyDown,d=>{r||(["Enter"," "].includes(d.key)&&i.onOpenToggle(),d.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(d.key)&&d.preventDefault())})})})});kD.displayName=AD;var y8="DropdownMenuPortal",DD=t=>{const{__scopeDropdownMenu:s,...n}=t,r=ea(s);return e.jsx(r8,{...r,...n})};DD.displayName=y8;var RD="DropdownMenuContent",ED=g.forwardRef((t,s)=>{const{__scopeDropdownMenu:n,...r}=t,a=SD(RD,n),i=ea(n),o=g.useRef(!1);return e.jsx(a8,{id:a.contentId,"aria-labelledby":a.triggerId,...i,...r,ref:s,onCloseAutoFocus:Kt(t.onCloseAutoFocus,d=>{var m;o.current||(m=a.triggerRef.current)==null||m.focus(),o.current=!1,d.preventDefault()}),onInteractOutside:Kt(t.onInteractOutside,d=>{const m=d.detail.originalEvent,f=m.button===0&&m.ctrlKey===!0,p=m.button===2||f;(!a.modal||p)&&(o.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)"}})});ED.displayName=RD;var b8="DropdownMenuGroup",j8=g.forwardRef((t,s)=>{const{__scopeDropdownMenu:n,...r}=t,a=ea(n);return e.jsx(i8,{...a,...r,ref:s})});j8.displayName=b8;var N8="DropdownMenuLabel",_D=g.forwardRef((t,s)=>{const{__scopeDropdownMenu:n,...r}=t,a=ea(n);return e.jsx(l8,{...a,...r,ref:s})});_D.displayName=N8;var w8="DropdownMenuItem",TD=g.forwardRef((t,s)=>{const{__scopeDropdownMenu:n,...r}=t,a=ea(n);return e.jsx(o8,{...a,...r,ref:s})});TD.displayName=w8;var S8="DropdownMenuCheckboxItem",PD=g.forwardRef((t,s)=>{const{__scopeDropdownMenu:n,...r}=t,a=ea(n);return e.jsx(c8,{...a,...r,ref:s})});PD.displayName=S8;var C8="DropdownMenuRadioGroup",A8=g.forwardRef((t,s)=>{const{__scopeDropdownMenu:n,...r}=t,a=ea(n);return e.jsx(d8,{...a,...r,ref:s})});A8.displayName=C8;var k8="DropdownMenuRadioItem",D8=g.forwardRef((t,s)=>{const{__scopeDropdownMenu:n,...r}=t,a=ea(n);return e.jsx(u8,{...a,...r,ref:s})});D8.displayName=k8;var R8="DropdownMenuItemIndicator",OD=g.forwardRef((t,s)=>{const{__scopeDropdownMenu:n,...r}=t,a=ea(n);return e.jsx(h8,{...a,...r,ref:s})});OD.displayName=R8;var E8="DropdownMenuSeparator",LD=g.forwardRef((t,s)=>{const{__scopeDropdownMenu:n,...r}=t,a=ea(n);return e.jsx(m8,{...a,...r,ref:s})});LD.displayName=E8;var _8="DropdownMenuArrow",T8=g.forwardRef((t,s)=>{const{__scopeDropdownMenu:n,...r}=t,a=ea(n);return e.jsx(f8,{...a,...r,ref:s})});T8.displayName=_8;var P8="DropdownMenuSubTrigger",O8=g.forwardRef((t,s)=>{const{__scopeDropdownMenu:n,...r}=t,a=ea(n);return e.jsx(p8,{...a,...r,ref:s})});O8.displayName=P8;var L8="DropdownMenuSubContent",I8=g.forwardRef((t,s)=>{const{__scopeDropdownMenu:n,...r}=t,a=ea(n);return e.jsx(x8,{...a,...r,ref:s,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)"}})});I8.displayName=L8;var M8=CD,F8=kD,B8=DD,$8=ED,q8=_D,z8=TD,U8=PD,V8=OD,H8=LD;function bb({...t}){return e.jsx(M8,{"data-slot":"dropdown-menu",...t})}function jb({...t}){return e.jsx(F8,{"data-slot":"dropdown-menu-trigger",...t})}function Nb({className:t,sideOffset:s=4,...n}){return e.jsx(B8,{children:e.jsx($8,{"data-slot":"dropdown-menu-content",sideOffset:s,className:Nt("bg-popover 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 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",t),...n})})}function ID({className:t,inset:s,variant:n="default",...r}){return e.jsx(z8,{"data-slot":"dropdown-menu-item","data-inset":s,"data-variant":n,className:Nt("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...r})}function W8({className:t,children:s,checked:n,...r}){return e.jsxs(U8,{"data-slot":"dropdown-menu-checkbox-item",className:Nt("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),checked:n,...r,children:[e.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:e.jsx(V8,{children:e.jsx(Hn,{className:"size-4"})})}),s]})}function G8({className:t,inset:s,...n}){return e.jsx(q8,{"data-slot":"dropdown-menu-label","data-inset":s,className:Nt("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t),...n})}function K8({className:t,...s}){return e.jsx(H8,{"data-slot":"dropdown-menu-separator",className:Nt("bg-border -mx-1 my-1 h-px",t),...s})}const Y8=Ky("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function Ce({className:t,variant:s,asChild:n=!1,...r}){const a=n?qA:"span";return e.jsx(a,{"data-slot":"badge",className:Nt(Y8({variant:s}),t),...r})}const vm="/communication",Zo={getNotifications:async(t,s)=>{let n=`${vm}/notifications`;return t&&s&&(n+=`?page=${t}&limit=${s}`),(await qe.get(n)).data},markAsRead:async t=>(await qe.patch(`${vm}/notifications/${t}/read`)).data,markAllAsRead:async()=>(await qe.patch(`${vm}/notifications/read-all`)).data,updatePushSubscription:async t=>(await qe.post(`${vm}/notifications/subscribe`,{subscription:t})).data},$i=Object.create(null);$i.open="0";$i.close="1";$i.ping="2";$i.pong="3";$i.message="4";$i.upgrade="5";$i.noop="6";const qm=Object.create(null);Object.keys($i).forEach(t=>{qm[$i[t]]=t});const fy={type:"error",data:"parser error"},MD=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",FD=typeof ArrayBuffer=="function",BD=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,wb=({type:t,data:s},n,r)=>MD&&s instanceof Blob?n?r(s):rS(s,r):FD&&(s instanceof ArrayBuffer||BD(s))?n?r(s):rS(new Blob([s]),r):r($i[t]+(s||"")),rS=(t,s)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];s("b"+(r||""))},n.readAsDataURL(t)};function aS(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let Eg;function Z8(t,s){if(MD&&t.data instanceof Blob)return t.data.arrayBuffer().then(aS).then(s);if(FD&&(t.data instanceof ArrayBuffer||BD(t.data)))return s(aS(t.data));wb(t,!1,n=>{Eg||(Eg=new TextEncoder),s(Eg.encode(n))})}const iS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fu=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t{let s=t.length*.75,n=t.length,r,a=0,i,o,d,m;t[t.length-1]==="="&&(s--,t[t.length-2]==="="&&s--);const f=new ArrayBuffer(s),p=new Uint8Array(f);for(r=0;r>4,p[a++]=(o&15)<<4|d>>2,p[a++]=(d&3)<<6|m&63;return f},X8=typeof ArrayBuffer=="function",Sb=(t,s)=>{if(typeof t!="string")return{type:"message",data:$D(t,s)};const n=t.charAt(0);return n==="b"?{type:"message",data:J8(t.substring(1),s)}:qm[n]?t.length>1?{type:qm[n],data:t.substring(1)}:{type:qm[n]}:fy},J8=(t,s)=>{if(X8){const n=Q8(t);return $D(n,s)}else return{base64:!0,data:t}},$D=(t,s)=>{switch(s){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}},qD="",e9=(t,s)=>{const n=t.length,r=new Array(n);let a=0;t.forEach((i,o)=>{wb(i,!1,d=>{r[o]=d,++a===n&&s(r.join(qD))})})},t9=(t,s)=>{const n=t.split(qD),r=[];for(let a=0;a{const r=n.length;let a;if(r<126)a=new Uint8Array(1),new DataView(a.buffer).setUint8(0,r);else if(r<65536){a=new Uint8Array(3);const i=new DataView(a.buffer);i.setUint8(0,126),i.setUint16(1,r)}else{a=new Uint8Array(9);const i=new DataView(a.buffer);i.setUint8(0,127),i.setBigUint64(1,BigInt(r))}t.data&&typeof t.data!="string"&&(a[0]|=128),s.enqueue(a),s.enqueue(n)})}})}let _g;function ym(t){return t.reduce((s,n)=>s+n.length,0)}function bm(t,s){if(t[0].length===s)return t.shift();const n=new Uint8Array(s);let r=0;for(let a=0;aMath.pow(2,21)-1){d.enqueue(fy);break}a=p*Math.pow(2,32)+f.getUint32(4),r=3}else{if(ym(n)t){d.enqueue(fy);break}}}})}const zD=4;function ir(t){if(t)return r9(t)}function r9(t){for(var s in ir.prototype)t[s]=ir.prototype[s];return t}ir.prototype.on=ir.prototype.addEventListener=function(t,s){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(s),this};ir.prototype.once=function(t,s){function n(){this.off(t,n),s.apply(this,arguments)}return n.fn=s,this.on(t,n),this};ir.prototype.off=ir.prototype.removeListener=ir.prototype.removeAllListeners=ir.prototype.removeEventListener=function(t,s){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+t];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var r,a=0;aPromise.resolve().then(s):(s,n)=>n(s,0),Va=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),a9="arraybuffer";function UD(t,...s){return s.reduce((n,r)=>(t.hasOwnProperty(r)&&(n[r]=t[r]),n),{})}const i9=Va.setTimeout,l9=Va.clearTimeout;function tp(t,s){s.useNativeTimers?(t.setTimeoutFn=i9.bind(Va),t.clearTimeoutFn=l9.bind(Va)):(t.setTimeoutFn=Va.setTimeout.bind(Va),t.clearTimeoutFn=Va.clearTimeout.bind(Va))}const o9=1.33;function c9(t){return typeof t=="string"?d9(t):Math.ceil((t.byteLength||t.size)*o9)}function d9(t){let s=0,n=0;for(let r=0,a=t.length;r=57344?n+=3:(r++,n+=4);return n}function VD(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function u9(t){let s="";for(let n in t)t.hasOwnProperty(n)&&(s.length&&(s+="&"),s+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return s}function h9(t){let s={},n=t.split("&");for(let r=0,a=n.length;r{this.readyState="paused",s()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(s){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};t9(s,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const s=()=>{this.write([{type:"close"}])};this.readyState==="open"?s():this.once("open",s)}write(s){this.writable=!1,e9(s,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const s=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=VD()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(s,n)}}let HD=!1;try{HD=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const p9=HD;function x9(){}class g9 extends f9{constructor(s){if(super(s),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&s.hostname!==location.hostname||r!==s.port}}doWrite(s,n){const r=this.request({method:"POST",data:s});r.on("success",n),r.on("error",(a,i)=>{this.onError("xhr post error",a,i)})}doPoll(){const s=this.request();s.on("data",this.onData.bind(this)),s.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=s}}class Fi extends ir{constructor(s,n,r){super(),this.createRequest=s,tp(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var s;const n=UD(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let a in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(a)&&r.setRequestHeader(a,this._opts.extraHeaders[a])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(s=this._opts.cookieJar)===null||s===void 0||s.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var a;r.readyState===3&&((a=this._opts.cookieJar)===null||a===void 0||a.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(a){this.setTimeoutFn(()=>{this._onError(a)},0);return}typeof document<"u"&&(this._index=Fi.requestsCount++,Fi.requests[this._index]=this)}_onError(s){this.emitReserved("error",s,this._xhr),this._cleanup(!0)}_cleanup(s){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=x9,s)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Fi.requests[this._index],this._xhr=null}}_onLoad(){const s=this._xhr.responseText;s!==null&&(this.emitReserved("data",s),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Fi.requestsCount=0;Fi.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",lS);else if(typeof addEventListener=="function"){const t="onpagehide"in Va?"pagehide":"unload";addEventListener(t,lS,!1)}}function lS(){for(let t in Fi.requests)Fi.requests.hasOwnProperty(t)&&Fi.requests[t].abort()}const v9=(function(){const t=WD({xdomain:!1});return t&&t.responseType!==null})();class y9 extends g9{constructor(s){super(s);const n=s&&s.forceBase64;this.supportsBinary=v9&&!n}request(s={}){return Object.assign(s,{xd:this.xd},this.opts),new Fi(WD,this.uri(),s)}}function WD(t){const s=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!s||p9))return new XMLHttpRequest}catch{}if(!s)try{return new Va[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const GD=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class b9 extends Cb{get name(){return"websocket"}doOpen(){const s=this.uri(),n=this.opts.protocols,r=GD?{}:UD(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(s,n,r)}catch(a){return this.emitReserved("error",a)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=s=>this.onClose({description:"websocket connection closed",context:s}),this.ws.onmessage=s=>this.onData(s.data),this.ws.onerror=s=>this.onError("websocket error",s)}write(s){this.writable=!1;for(let n=0;n{try{this.doWrite(r,i)}catch{}a&&ep(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const s=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=VD()),this.supportsBinary||(n.b64=1),this.createUri(s,n)}}const Tg=Va.WebSocket||Va.MozWebSocket;class j9 extends b9{createSocket(s,n,r){return GD?new Tg(s,n,r):n?new Tg(s,n):new Tg(s)}doWrite(s,n){this.ws.send(n)}}class N9 extends Cb{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(s){return this.emitReserved("error",s)}this._transport.closed.then(()=>{this.onClose()}).catch(s=>{this.onError("webtransport error",s)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(s=>{const n=n9(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=s.readable.pipeThrough(n).getReader(),a=s9();a.readable.pipeTo(s.writable),this._writer=a.writable.getWriter();const i=()=>{r.read().then(({done:d,value:m})=>{d||(this.onPacket(m),i())}).catch(d=>{})};i();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(s){this.writable=!1;for(let n=0;n{a&&ep(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var s;(s=this._transport)===null||s===void 0||s.close()}}const w9={websocket:j9,webtransport:N9,polling:y9},S9=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,C9=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function py(t){if(t.length>8e3)throw"URI too long";const s=t,n=t.indexOf("["),r=t.indexOf("]");n!=-1&&r!=-1&&(t=t.substring(0,n)+t.substring(n,r).replace(/:/g,";")+t.substring(r,t.length));let a=S9.exec(t||""),i={},o=14;for(;o--;)i[C9[o]]=a[o]||"";return n!=-1&&r!=-1&&(i.source=s,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=A9(i,i.path),i.queryKey=k9(i,i.query),i}function A9(t,s){const n=/\/{2,9}/g,r=s.replace(n,"/").split("/");return(s.slice(0,1)=="/"||s.length===0)&&r.splice(0,1),s.slice(-1)=="/"&&r.splice(r.length-1,1),r}function k9(t,s){const n={};return s.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,a,i){a&&(n[a]=i)}),n}const xy=typeof addEventListener=="function"&&typeof removeEventListener=="function",zm=[];xy&&addEventListener("offline",()=>{zm.forEach(t=>t())},!1);class Xl extends ir{constructor(s,n){if(super(),this.binaryType=a9,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,s&&typeof s=="object"&&(n=s,s=null),s){const r=py(s);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=py(n.host).host);tp(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const a=r.prototype.name;this.transports.push(a),this._transportsByName[a]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=h9(this.opts.query)),xy&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},zm.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(s){const n=Object.assign({},this.opts.query);n.EIO=zD,n.transport=s,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[s]);return new this._transportsByName[s](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const s=this.opts.rememberUpgrade&&Xl.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(s);n.open(),this.setTransport(n)}setTransport(s){this.transport&&this.transport.removeAllListeners(),this.transport=s,s.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",Xl.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(s){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",s),this.emitReserved("heartbeat"),s.type){case"open":this.onHandshake(JSON.parse(s.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=s.data,this._onError(n);break;case"message":this.emitReserved("data",s.data),this.emitReserved("message",s.data);break}}onHandshake(s){this.emitReserved("handshake",s),this.id=s.sid,this.transport.query.sid=s.sid,this._pingInterval=s.pingInterval,this._pingTimeout=s.pingTimeout,this._maxPayload=s.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const s=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+s,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},s),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const s=this._getWritablePackets();this.transport.send(s),this._prevBufferLen=s.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const s=Date.now()>this._pingTimeoutTime;return s&&(this._pingTimeoutTime=0,ep(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),s}write(s,n,r){return this._sendPacket("message",s,n,r),this}send(s,n,r){return this._sendPacket("message",s,n,r),this}_sendPacket(s,n,r,a){if(typeof n=="function"&&(a=n,n=void 0),typeof r=="function"&&(a=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const i={type:s,data:n,options:r};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),a&&this.once("flush",a),this.flush()}close(){const s=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),s()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():s()}):this.upgrading?r():s()),this}_onError(s){if(Xl.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",s),this._onClose("transport error",s)}_onClose(s,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),xy&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=zm.indexOf(this._offlineEventListener);r!==-1&&zm.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",s,n),this.writeBuffer=[],this._prevBufferLen=0}}}Xl.protocol=zD;class D9 extends Xl{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let s=0;s{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",h=>{if(!r)if(h.type==="pong"&&h.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Xl.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(p(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const x=new Error("probe error");x.transport=n.name,this.emitReserved("upgradeError",x)}}))};function i(){r||(r=!0,p(),n.close(),n=null)}const o=h=>{const x=new Error("probe error: "+h);x.transport=n.name,i(),this.emitReserved("upgradeError",x)};function d(){o("transport closed")}function m(){o("socket closed")}function f(h){n&&h.name!==n.name&&i()}const p=()=>{n.removeListener("open",a),n.removeListener("error",o),n.removeListener("close",d),this.off("close",m),this.off("upgrading",f)};n.once("open",a),n.once("error",o),n.once("close",d),this.once("close",m),this.once("upgrading",f),this._upgrades.indexOf("webtransport")!==-1&&s!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(s){this._upgrades=this._filterUpgrades(s.upgrades),super.onHandshake(s)}_filterUpgrades(s){const n=[];for(let r=0;rw9[a]).filter(a=>!!a)),super(s,r)}};function E9(t,s="",n){let r=t;n=n||typeof location<"u"&&location,t==null&&(t=n.protocol+"//"+n.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=n.protocol+t:t=n.host+t),/^(https?|wss?):\/\//.test(t)||(typeof n<"u"?t=n.protocol+"//"+t:t="https://"+t),r=py(t)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const i=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+i+":"+r.port+s,r.href=r.protocol+"://"+i+(n&&n.port===r.port?"":":"+r.port),r}const _9=typeof ArrayBuffer=="function",T9=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,KD=Object.prototype.toString,P9=typeof Blob=="function"||typeof Blob<"u"&&KD.call(Blob)==="[object BlobConstructor]",O9=typeof File=="function"||typeof File<"u"&&KD.call(File)==="[object FileConstructor]";function Ab(t){return _9&&(t instanceof ArrayBuffer||T9(t))||P9&&t instanceof Blob||O9&&t instanceof File}function Um(t,s){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let n=0,r=t.length;n=0&&t.numthis.opts.maxAttachments)throw new Error("too many attachments");r.attachments=d}if(s.charAt(n+1)==="/"){const i=n+1;for(;++n&&!(s.charAt(n)===","||n===s.length););r.nsp=s.substring(i,n)}else r.nsp="/";const a=s.charAt(n+1);if(a!==""&&Number(a)==a){const i=n+1;for(;++n;){const o=s.charAt(n);if(o==null||Number(o)!=o){--n;break}if(n===s.length)break}r.id=Number(s.substring(i,n+1))}if(s.charAt(++n)){const i=this.tryParse(s.substr(n));if(kb.isPayloadValid(r.type,i))r.data=i;else throw new Error("invalid payload")}return r}tryParse(s){try{return JSON.parse(s,this.opts.reviver)}catch{return!1}}static isPayloadValid(s,n){switch(s){case pn.CONNECT:return oS(n);case pn.DISCONNECT:return n===void 0;case pn.CONNECT_ERROR:return typeof n=="string"||oS(n);case pn.EVENT:case pn.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&M9.indexOf(n[0])===-1);case pn.ACK:case pn.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class B9{constructor(s){this.packet=s,this.buffers=[],this.reconPack=s}takeBinaryData(s){if(this.buffers.push(s),this.buffers.length===this.reconPack.attachments){const n=I9(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const $9=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t};function oS(t){return Object.prototype.toString.call(t)==="[object Object]"}const q9=Object.freeze(Object.defineProperty({__proto__:null,Decoder:kb,Encoder:F9,get PacketType(){return pn}},Symbol.toStringTag,{value:"Module"}));function ci(t,s,n){return t.on(s,n),function(){t.off(s,n)}}const z9=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class YD extends ir{constructor(s,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=s,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const s=this.io;this.subs=[ci(s,"open",this.onopen.bind(this)),ci(s,"packet",this.onpacket.bind(this)),ci(s,"error",this.onerror.bind(this)),ci(s,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...s){return s.unshift("message"),this.emit.apply(this,s),this}emit(s,...n){var r,a,i;if(z9.hasOwnProperty(s))throw new Error('"'+s.toString()+'" is a reserved event name');if(n.unshift(s),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const o={type:pn.EVENT,data:n};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const p=this.ids++,h=n.pop();this._registerAckCallback(p,h),o.id=p}const d=(a=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||a===void 0?void 0:a.writable,m=this.connected&&!(!((i=this.io.engine)===null||i===void 0)&&i._hasPingExpired());return this.flags.volatile&&!d||(m?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(s,n){var r;const a=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(a===void 0){this.acks[s]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[s];for(let d=0;d{this.io.clearTimeoutFn(i),n.apply(this,d)};o.withError=!0,this.acks[s]=o}emitWithAck(s,...n){return new Promise((r,a)=>{const i=(o,d)=>o?a(o):r(d);i.withError=!0,n.push(i),this.emit(s,...n)})}_addToQueue(s){let n;typeof s[s.length-1]=="function"&&(n=s.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:s,flags:Object.assign({fromQueue:!0},this.flags)};s.push((a,...i)=>(this._queue[0],a!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(a)):(this._queue.shift(),n&&n(null,...i)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(s=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!s||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(s){s.nsp=this.nsp,this.io._packet(s)}onopen(){typeof this.auth=="function"?this.auth(s=>{this._sendConnectPacket(s)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(s){this.packet({type:pn.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},s):s})}onerror(s){this.connected||this.emitReserved("connect_error",s)}onclose(s,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",s,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(s=>{if(!this.sendBuffer.some(r=>String(r.id)===s)){const r=this.acks[s];delete this.acks[s],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(s){if(s.nsp===this.nsp)switch(s.type){case pn.CONNECT:s.data&&s.data.sid?this.onconnect(s.data.sid,s.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case pn.EVENT:case pn.BINARY_EVENT:this.onevent(s);break;case pn.ACK:case pn.BINARY_ACK:this.onack(s);break;case pn.DISCONNECT:this.ondisconnect();break;case pn.CONNECT_ERROR:this.destroy();const r=new Error(s.data.message);r.data=s.data.data,this.emitReserved("connect_error",r);break}}onevent(s){const n=s.data||[];s.id!=null&&n.push(this.ack(s.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(s){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,s)}super.emit.apply(this,s),this._pid&&s.length&&typeof s[s.length-1]=="string"&&(this._lastOffset=s[s.length-1])}ack(s){const n=this;let r=!1;return function(...a){r||(r=!0,n.packet({type:pn.ACK,id:s,data:a}))}}onack(s){const n=this.acks[s.id];typeof n=="function"&&(delete this.acks[s.id],n.withError&&s.data.unshift(null),n.apply(this,s.data))}onconnect(s,n){this.id=s,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(s=>this.emitEvent(s)),this.receiveBuffer=[],this.sendBuffer.forEach(s=>{this.notifyOutgoingListeners(s),this.packet(s)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(s=>s()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:pn.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(s){return this.flags.compress=s,this}get volatile(){return this.flags.volatile=!0,this}timeout(s){return this.flags.timeout=s,this}onAny(s){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(s),this}prependAny(s){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(s),this}offAny(s){if(!this._anyListeners)return this;if(s){const n=this._anyListeners;for(let r=0;r0&&t.jitter<=1?t.jitter:0,this.attempts=0}Sd.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var s=Math.random(),n=Math.floor(s*this.jitter*t);t=(Math.floor(s*10)&1)==0?t-n:t+n}return Math.min(t,this.max)|0};Sd.prototype.reset=function(){this.attempts=0};Sd.prototype.setMin=function(t){this.ms=t};Sd.prototype.setMax=function(t){this.max=t};Sd.prototype.setJitter=function(t){this.jitter=t};class yy extends ir{constructor(s,n){var r;super(),this.nsps={},this.subs=[],s&&typeof s=="object"&&(n=s,s=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,tp(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Sd({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=s;const a=n.parser||q9;this.encoder=new a.Encoder,this.decoder=new a.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(s){return arguments.length?(this._reconnection=!!s,s||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(s){return s===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=s,this)}reconnectionDelay(s){var n;return s===void 0?this._reconnectionDelay:(this._reconnectionDelay=s,(n=this.backoff)===null||n===void 0||n.setMin(s),this)}randomizationFactor(s){var n;return s===void 0?this._randomizationFactor:(this._randomizationFactor=s,(n=this.backoff)===null||n===void 0||n.setJitter(s),this)}reconnectionDelayMax(s){var n;return s===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=s,(n=this.backoff)===null||n===void 0||n.setMax(s),this)}timeout(s){return arguments.length?(this._timeout=s,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(s){if(~this._readyState.indexOf("open"))return this;this.engine=new R9(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const a=ci(n,"open",function(){r.onopen(),s&&s()}),i=d=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",d),s?s(d):this.maybeReconnectOnOpen()},o=ci(n,"error",i);if(this._timeout!==!1){const d=this._timeout,m=this.setTimeoutFn(()=>{a(),i(new Error("timeout")),n.close()},d);this.opts.autoUnref&&m.unref(),this.subs.push(()=>{this.clearTimeoutFn(m)})}return this.subs.push(a),this.subs.push(o),this}connect(s){return this.open(s)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const s=this.engine;this.subs.push(ci(s,"ping",this.onping.bind(this)),ci(s,"data",this.ondata.bind(this)),ci(s,"error",this.onerror.bind(this)),ci(s,"close",this.onclose.bind(this)),ci(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(s){try{this.decoder.add(s)}catch(n){this.onclose("parse error",n)}}ondecoded(s){ep(()=>{this.emitReserved("packet",s)},this.setTimeoutFn)}onerror(s){this.emitReserved("error",s)}socket(s,n){let r=this.nsps[s];return r?this._autoConnect&&!r.active&&r.connect():(r=new YD(this,s,n),this.nsps[s]=r),r}_destroy(s){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(s){const n=this.encoder.encode(s);for(let r=0;rs()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(s,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",s,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const s=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{s.skipReconnect||(this.emitReserved("reconnect_attempt",s.backoff.attempts),!s.skipReconnect&&s.open(a=>{a?(s._reconnecting=!1,s.reconnect(),this.emitReserved("reconnect_error",a)):s.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const s=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",s)}}const su={};function Vm(t,s){typeof t=="object"&&(s=t,t=void 0),s=s||{};const n=E9(t,s.path||"/socket.io"),r=n.source,a=n.id,i=n.path,o=su[a]&&i in su[a].nsps,d=s.forceNew||s["force new connection"]||s.multiplex===!1||o;let m;return d?m=new yy(r,s):(su[a]||(su[a]=new yy(r,s)),m=su[a]),n.query&&!s.query&&(s.query=n.queryKey),m.socket(n.path,s)}Object.assign(Vm,{Manager:yy,Socket:YD,io:Vm,connect:Vm});const ZD=g.createContext({socket:null,isConnected:!1}),QD=()=>g.useContext(ZD),U9=({children:t})=>{const[s,n]=g.useState(null),[r,a]=g.useState(!1),{user:i}=In(o=>o.auth);return g.useEffect(()=>{let o="https://dealeronboarding-uat.royalenfield.com/api";o.endsWith("/api")&&(o=o.replace(/\/api$/,""));const d=Vm(o,{withCredentials:!0});return d.on("connect",()=>{console.log("Socket connected:",d.id),a(!0)}),d.on("disconnect",()=>{console.log("Socket disconnected"),a(!1)}),n(d),()=>{d.close()}},[]),g.useEffect(()=>{if(s&&r&&(i!=null&&i.id))return s.emit("join_room",`user_${i.id}`),console.log(`Joined private notification room: user_${i.id}`),()=>{s.emit("leave_room",`user_${i.id}`)}},[s,r,i==null?void 0:i.id]),e.jsx(ZD.Provider,{value:{socket:s,isConnected:r},children:t})};function Vs(t){const s=Object.prototype.toString.call(t);return t instanceof Date||typeof t=="object"&&s==="[object Date]"?new t.constructor(+t):typeof t=="number"||s==="[object Number]"||typeof t=="string"||s==="[object String]"?new Date(t):new Date(NaN)}function xa(t,s){return t instanceof Date?new t.constructor(s):new Date(s)}function Zr(t,s){const n=Vs(t);return isNaN(s)?xa(t,NaN):(s&&n.setDate(n.getDate()+s),n)}function gi(t,s){const n=Vs(t);if(isNaN(s))return xa(t,NaN);if(!s)return n;const r=n.getDate(),a=xa(t,n.getTime());a.setMonth(n.getMonth()+s+1,0);const i=a.getDate();return r>=i?a:(n.setFullYear(a.getFullYear(),a.getMonth(),r),n)}const Db=6048e5,V9=864e5,jm=43200,cS=1440;let H9={};function Cd(){return H9}function qi(t,s){var d,m,f,p;const n=Cd(),r=(s==null?void 0:s.weekStartsOn)??((m=(d=s==null?void 0:s.locale)==null?void 0:d.options)==null?void 0:m.weekStartsOn)??n.weekStartsOn??((p=(f=n.locale)==null?void 0:f.options)==null?void 0:p.weekStartsOn)??0,a=Vs(t),i=a.getDay(),o=(i=a.getTime()?n+1:s.getTime()>=o.getTime()?n:n-1}function cd(t){const s=Vs(t);return s.setHours(0,0,0,0),s}function dd(t){const s=Vs(t),n=new Date(Date.UTC(s.getFullYear(),s.getMonth(),s.getDate(),s.getHours(),s.getMinutes(),s.getSeconds(),s.getMilliseconds()));return n.setUTCFullYear(s.getFullYear()),+t-+n}function Ii(t,s){const n=cd(t),r=cd(s),a=+n-dd(n),i=+r-dd(r);return Math.round((a-i)/V9)}function W9(t){const s=XD(t),n=xa(t,0);return n.setFullYear(s,0,4),n.setHours(0,0,0,0),ic(n)}function by(t,s){const n=s*7;return Zr(t,n)}function G9(t,s){return gi(t,s*12)}function K9(t){let s;return t.forEach(function(n){const r=Vs(n);(s===void 0||s{const r=Vs(n);(!s||s>r||isNaN(+r))&&(s=r)}),s||new Date(NaN)}function Hm(t,s){const n=Vs(t),r=Vs(s),a=n.getTime()-r.getTime();return a<0?-1:a>0?1:a}function Z9(t){return xa(t,Date.now())}function ha(t,s){const n=cd(t),r=cd(s);return+n==+r}function Rb(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function Q9(t){if(!Rb(t)&&typeof t!="number")return!1;const s=Vs(t);return!isNaN(Number(s))}function ud(t,s){const n=Vs(t),r=Vs(s),a=n.getFullYear()-r.getFullYear(),i=n.getMonth()-r.getMonth();return a*12+i}function X9(t,s,n){const r=qi(t,n),a=qi(s,n),i=+r-dd(r),o=+a-dd(a);return Math.round((i-o)/Db)}function J9(t){return s=>{const r=(t?Math[t]:Math.trunc)(s);return r===0?0:r}}function eB(t,s){return+Vs(t)-+Vs(s)}function tB(t){const s=Vs(t);return s.setHours(23,59,59,999),s}function sp(t){const s=Vs(t),n=s.getMonth();return s.setFullYear(s.getFullYear(),n+1,0),s.setHours(23,59,59,999),s}function sB(t){const s=Vs(t);return+tB(s)==+sp(s)}function nB(t,s){const n=Vs(t),r=Vs(s),a=Hm(n,r),i=Math.abs(ud(n,r));let o;if(i<1)o=0;else{n.getMonth()===1&&n.getDate()>27&&n.setDate(30),n.setMonth(n.getMonth()-a*i);let d=Hm(n,r)===-a;sB(Vs(t))&&i===1&&Hm(t,r)===1&&(d=!1),o=a*(i-Number(d))}return o===0?0:o}function rB(t,s,n){const r=eB(t,s)/1e3;return J9(n==null?void 0:n.roundingMethod)(r)}function pa(t){const s=Vs(t);return s.setDate(1),s.setHours(0,0,0,0),s}function JD(t){const s=Vs(t),n=xa(t,0);return n.setFullYear(s.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Eb(t,s){var d,m,f,p;const n=Cd(),r=(s==null?void 0:s.weekStartsOn)??((m=(d=s==null?void 0:s.locale)==null?void 0:d.options)==null?void 0:m.weekStartsOn)??n.weekStartsOn??((p=(f=n.locale)==null?void 0:f.options)==null?void 0:p.weekStartsOn)??0,a=Vs(t),i=a.getDay(),o=(i{let r;const a=aB[t];return typeof a=="string"?r=a:s===1?r=a.one:r=a.other.replace("{{count}}",s.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Pg(t){return(s={})=>{const n=s.width?String(s.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const lB={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},oB={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},cB={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},dB={date:Pg({formats:lB,defaultWidth:"full"}),time:Pg({formats:oB,defaultWidth:"full"}),dateTime:Pg({formats:cB,defaultWidth:"full"})},uB={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},hB=(t,s,n,r)=>uB[t];function nu(t){return(s,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let a;if(r==="formatting"&&t.formattingValues){const o=t.defaultFormattingWidth||t.defaultWidth,d=n!=null&&n.width?String(n.width):o;a=t.formattingValues[d]||t.formattingValues[o]}else{const o=t.defaultWidth,d=n!=null&&n.width?String(n.width):t.defaultWidth;a=t.values[d]||t.values[o]}const i=t.argumentCallback?t.argumentCallback(s):s;return a[i]}}const mB={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},fB={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},pB={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"]},xB={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"]},gB={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"}},vB={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"}},yB=(t,s)=>{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"},bB={ordinalNumber:yB,era:nu({values:mB,defaultWidth:"wide"}),quarter:nu({values:fB,defaultWidth:"wide",argumentCallback:t=>t-1}),month:nu({values:pB,defaultWidth:"wide"}),day:nu({values:xB,defaultWidth:"wide"}),dayPeriod:nu({values:gB,defaultWidth:"wide",formattingValues:vB,defaultFormattingWidth:"wide"})};function ru(t){return(s,n={})=>{const r=n.width,a=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],i=s.match(a);if(!i)return null;const o=i[0],d=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],m=Array.isArray(d)?NB(d,h=>h.test(o)):jB(d,h=>h.test(o));let f;f=t.valueCallback?t.valueCallback(m):m,f=n.valueCallback?n.valueCallback(f):f;const p=s.slice(o.length);return{value:f,rest:p}}}function jB(t,s){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&s(t[n]))return n}function NB(t,s){for(let n=0;n{const r=s.match(t.matchPattern);if(!r)return null;const a=r[0],i=s.match(t.parsePattern);if(!i)return null;let o=t.valueCallback?t.valueCallback(i[0]):i[0];o=n.valueCallback?n.valueCallback(o):o;const d=s.slice(a.length);return{value:o,rest:d}}}const SB=/^(\d+)(th|st|nd|rd)?/i,CB=/\d+/i,AB={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},kB={any:[/^b/i,/^(a|c)/i]},DB={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},RB={any:[/1/i,/2/i,/3/i,/4/i]},EB={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},_B={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]},TB={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},PB={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]},OB={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},LB={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}},IB={ordinalNumber:wB({matchPattern:SB,parsePattern:CB,valueCallback:t=>parseInt(t,10)}),era:ru({matchPatterns:AB,defaultMatchWidth:"wide",parsePatterns:kB,defaultParseWidth:"any"}),quarter:ru({matchPatterns:DB,defaultMatchWidth:"wide",parsePatterns:RB,defaultParseWidth:"any",valueCallback:t=>t+1}),month:ru({matchPatterns:EB,defaultMatchWidth:"wide",parsePatterns:_B,defaultParseWidth:"any"}),day:ru({matchPatterns:TB,defaultMatchWidth:"wide",parsePatterns:PB,defaultParseWidth:"any"}),dayPeriod:ru({matchPatterns:OB,defaultMatchWidth:"any",parsePatterns:LB,defaultParseWidth:"any"})},_b={code:"en-US",formatDistance:iB,formatLong:dB,formatRelative:hB,localize:bB,match:IB,options:{weekStartsOn:0,firstWeekContainsDate:1}};function MB(t){const s=Vs(t);return Ii(s,JD(s))+1}function tR(t){const s=Vs(t),n=+ic(s)-+W9(s);return Math.round(n/Db)+1}function sR(t,s){var p,h,x,u;const n=Vs(t),r=n.getFullYear(),a=Cd(),i=(s==null?void 0:s.firstWeekContainsDate)??((h=(p=s==null?void 0:s.locale)==null?void 0:p.options)==null?void 0:h.firstWeekContainsDate)??a.firstWeekContainsDate??((u=(x=a.locale)==null?void 0:x.options)==null?void 0:u.firstWeekContainsDate)??1,o=xa(t,0);o.setFullYear(r+1,0,i),o.setHours(0,0,0,0);const d=qi(o,s),m=xa(t,0);m.setFullYear(r,0,i),m.setHours(0,0,0,0);const f=qi(m,s);return n.getTime()>=d.getTime()?r+1:n.getTime()>=f.getTime()?r:r-1}function FB(t,s){var d,m,f,p;const n=Cd(),r=(s==null?void 0:s.firstWeekContainsDate)??((m=(d=s==null?void 0:s.locale)==null?void 0:d.options)==null?void 0:m.firstWeekContainsDate)??n.firstWeekContainsDate??((p=(f=n.locale)==null?void 0:f.options)==null?void 0:p.firstWeekContainsDate)??1,a=sR(t,s),i=xa(t,0);return i.setFullYear(a,0,r),i.setHours(0,0,0,0),qi(i,s)}function nR(t,s){const n=Vs(t),r=+qi(n,s)-+FB(n,s);return Math.round(r/Db)+1}function kn(t,s){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(s,"0");return n+r}const Gl={y(t,s){const n=t.getFullYear(),r=n>0?n:1-n;return kn(s==="yy"?r%100:r,s.length)},M(t,s){const n=t.getMonth();return s==="M"?String(n+1):kn(n+1,2)},d(t,s){return kn(t.getDate(),s.length)},a(t,s){const n=t.getHours()/12>=1?"pm":"am";switch(s){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,s){return kn(t.getHours()%12||12,s.length)},H(t,s){return kn(t.getHours(),s.length)},m(t,s){return kn(t.getMinutes(),s.length)},s(t,s){return kn(t.getSeconds(),s.length)},S(t,s){const n=s.length,r=t.getMilliseconds(),a=Math.trunc(r*Math.pow(10,n-3));return kn(a,s.length)}},Uc={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},dS={G:function(t,s,n){const r=t.getFullYear()>0?1:0;switch(s){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,s,n){if(s==="yo"){const r=t.getFullYear(),a=r>0?r:1-r;return n.ordinalNumber(a,{unit:"year"})}return Gl.y(t,s)},Y:function(t,s,n,r){const a=sR(t,r),i=a>0?a:1-a;if(s==="YY"){const o=i%100;return kn(o,2)}return s==="Yo"?n.ordinalNumber(i,{unit:"year"}):kn(i,s.length)},R:function(t,s){const n=XD(t);return kn(n,s.length)},u:function(t,s){const n=t.getFullYear();return kn(n,s.length)},Q:function(t,s,n){const r=Math.ceil((t.getMonth()+1)/3);switch(s){case"Q":return String(r);case"QQ":return kn(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,s,n){const r=Math.ceil((t.getMonth()+1)/3);switch(s){case"q":return String(r);case"qq":return kn(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,s,n){const r=t.getMonth();switch(s){case"M":case"MM":return Gl.M(t,s);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,s,n){const r=t.getMonth();switch(s){case"L":return String(r+1);case"LL":return kn(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,s,n,r){const a=nR(t,r);return s==="wo"?n.ordinalNumber(a,{unit:"week"}):kn(a,s.length)},I:function(t,s,n){const r=tR(t);return s==="Io"?n.ordinalNumber(r,{unit:"week"}):kn(r,s.length)},d:function(t,s,n){return s==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):Gl.d(t,s)},D:function(t,s,n){const r=MB(t);return s==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):kn(r,s.length)},E:function(t,s,n){const r=t.getDay();switch(s){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,s,n,r){const a=t.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(s){case"e":return String(i);case"ee":return kn(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(t,s,n,r){const a=t.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(s){case"c":return String(i);case"cc":return kn(i,s.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(t,s,n){const r=t.getDay(),a=r===0?7:r;switch(s){case"i":return String(a);case"ii":return kn(a,s.length);case"io":return n.ordinalNumber(a,{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,s,n){const a=t.getHours()/12>=1?"pm":"am";switch(s){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(t,s,n){const r=t.getHours();let a;switch(r===12?a=Uc.noon:r===0?a=Uc.midnight:a=r/12>=1?"pm":"am",s){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(t,s,n){const r=t.getHours();let a;switch(r>=17?a=Uc.evening:r>=12?a=Uc.afternoon:r>=4?a=Uc.morning:a=Uc.night,s){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(t,s,n){if(s==="ho"){let r=t.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Gl.h(t,s)},H:function(t,s,n){return s==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):Gl.H(t,s)},K:function(t,s,n){const r=t.getHours()%12;return s==="Ko"?n.ordinalNumber(r,{unit:"hour"}):kn(r,s.length)},k:function(t,s,n){let r=t.getHours();return r===0&&(r=24),s==="ko"?n.ordinalNumber(r,{unit:"hour"}):kn(r,s.length)},m:function(t,s,n){return s==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):Gl.m(t,s)},s:function(t,s,n){return s==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):Gl.s(t,s)},S:function(t,s){return Gl.S(t,s)},X:function(t,s,n){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(s){case"X":return hS(r);case"XXXX":case"XX":return Vo(r);case"XXXXX":case"XXX":default:return Vo(r,":")}},x:function(t,s,n){const r=t.getTimezoneOffset();switch(s){case"x":return hS(r);case"xxxx":case"xx":return Vo(r);case"xxxxx":case"xxx":default:return Vo(r,":")}},O:function(t,s,n){const r=t.getTimezoneOffset();switch(s){case"O":case"OO":case"OOO":return"GMT"+uS(r,":");case"OOOO":default:return"GMT"+Vo(r,":")}},z:function(t,s,n){const r=t.getTimezoneOffset();switch(s){case"z":case"zz":case"zzz":return"GMT"+uS(r,":");case"zzzz":default:return"GMT"+Vo(r,":")}},t:function(t,s,n){const r=Math.trunc(t.getTime()/1e3);return kn(r,s.length)},T:function(t,s,n){const r=t.getTime();return kn(r,s.length)}};function uS(t,s=""){const n=t>0?"-":"+",r=Math.abs(t),a=Math.trunc(r/60),i=r%60;return i===0?n+String(a):n+String(a)+s+kn(i,2)}function hS(t,s){return t%60===0?(t>0?"-":"+")+kn(Math.abs(t)/60,2):Vo(t,s)}function Vo(t,s=""){const n=t>0?"-":"+",r=Math.abs(t),a=kn(Math.trunc(r/60),2),i=kn(r%60,2);return n+a+s+i}const mS=(t,s)=>{switch(t){case"P":return s.date({width:"short"});case"PP":return s.date({width:"medium"});case"PPP":return s.date({width:"long"});case"PPPP":default:return s.date({width:"full"})}},rR=(t,s)=>{switch(t){case"p":return s.time({width:"short"});case"pp":return s.time({width:"medium"});case"ppp":return s.time({width:"long"});case"pppp":default:return s.time({width:"full"})}},BB=(t,s)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return mS(t,s);let i;switch(r){case"P":i=s.dateTime({width:"short"});break;case"PP":i=s.dateTime({width:"medium"});break;case"PPP":i=s.dateTime({width:"long"});break;case"PPPP":default:i=s.dateTime({width:"full"});break}return i.replace("{{date}}",mS(r,s)).replace("{{time}}",rR(a,s))},$B={p:rR,P:BB},qB=/^D+$/,zB=/^Y+$/,UB=["D","DD","YY","YYYY"];function VB(t){return qB.test(t)}function HB(t){return zB.test(t)}function WB(t,s,n){const r=GB(t,s,n);if(console.warn(r),UB.includes(t))throw new RangeError(r)}function GB(t,s,n){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${s}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const KB=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,YB=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ZB=/^'([^]*?)'?$/,QB=/''/g,XB=/[a-zA-Z]/;function Ka(t,s,n){var p,h,x,u,N,v,w,j;const r=Cd(),a=(n==null?void 0:n.locale)??r.locale??_b,i=(n==null?void 0:n.firstWeekContainsDate)??((h=(p=n==null?void 0:n.locale)==null?void 0:p.options)==null?void 0:h.firstWeekContainsDate)??r.firstWeekContainsDate??((u=(x=r.locale)==null?void 0:x.options)==null?void 0:u.firstWeekContainsDate)??1,o=(n==null?void 0:n.weekStartsOn)??((v=(N=n==null?void 0:n.locale)==null?void 0:N.options)==null?void 0:v.weekStartsOn)??r.weekStartsOn??((j=(w=r.locale)==null?void 0:w.options)==null?void 0:j.weekStartsOn)??0,d=Vs(t);if(!Q9(d))throw new RangeError("Invalid time value");let m=s.match(YB).map(b=>{const C=b[0];if(C==="p"||C==="P"){const S=$B[C];return S(b,a.formatLong)}return b}).join("").match(KB).map(b=>{if(b==="''")return{isToken:!1,value:"'"};const C=b[0];if(C==="'")return{isToken:!1,value:JB(b)};if(dS[C])return{isToken:!0,value:b};if(C.match(XB))throw new RangeError("Format string contains an unescaped latin alphabet character `"+C+"`");return{isToken:!1,value:b}});a.localize.preprocessor&&(m=a.localize.preprocessor(d,m));const f={firstWeekContainsDate:i,weekStartsOn:o,locale:a};return m.map(b=>{if(!b.isToken)return b.value;const C=b.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&HB(C)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&VB(C))&&WB(C,s,String(t));const S=dS[C[0]];return S(d,C,a.localize,f)}).join("")}function JB(t){const s=t.match(ZB);return s?s[1].replace(QB,"'"):t}function e$(t,s,n){const r=Cd(),a=(n==null?void 0:n.locale)??r.locale??_b,i=2520,o=Hm(t,s);if(isNaN(o))throw new RangeError("Invalid time value");const d=Object.assign({},n,{addSuffix:n==null?void 0:n.addSuffix,comparison:o});let m,f;o>0?(m=Vs(s),f=Vs(t)):(m=Vs(t),f=Vs(s));const p=rB(f,m),h=(dd(f)-dd(m))/1e3,x=Math.round((p-h)/60);let u;if(x<2)return n!=null&&n.includeSeconds?p<5?a.formatDistance("lessThanXSeconds",5,d):p<10?a.formatDistance("lessThanXSeconds",10,d):p<20?a.formatDistance("lessThanXSeconds",20,d):p<40?a.formatDistance("halfAMinute",0,d):p<60?a.formatDistance("lessThanXMinutes",1,d):a.formatDistance("xMinutes",1,d):x===0?a.formatDistance("lessThanXMinutes",1,d):a.formatDistance("xMinutes",x,d);if(x<45)return a.formatDistance("xMinutes",x,d);if(x<90)return a.formatDistance("aboutXHours",1,d);if(xr.getTime()}function iR(t,s){const n=Vs(t),r=Vs(s);return+n<+r}function Tb(t,s){const n=Vs(t),r=Vs(s);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()}function a$(t,s){const n=Vs(t),r=Vs(s);return n.getFullYear()===r.getFullYear()}function Og(t,s){return Zr(t,-s)}function Lg(t,s){const n=Vs(t),r=n.getFullYear(),a=n.getDate(),i=xa(t,0);i.setFullYear(r,s,15),i.setHours(0,0,0,0);const o=t$(i);return n.setMonth(s,Math.min(a,o)),n}function fS(t,s){const n=Vs(t);return isNaN(+n)?xa(t,NaN):(n.setFullYear(s),n)}function i$({title:t,subtitle:s,onRefresh:n}){const{user:r}=In(h=>h.auth),{socket:a}=QD(),[i,o]=g.useState([]),[d,m]=g.useState(0);g.useEffect(()=>{(async()=>{try{const x=await Zo.getNotifications(1,15);x.success&&(o(x.data),x.pagination&&x.pagination.unreadCount!==void 0?m(x.pagination.unreadCount):m(x.data.filter(u=>!u.isRead).length))}catch(x){console.error("Fetch notifications error:",x)}})()},[]),g.useEffect(()=>{if(a)return a.on("notification",h=>{o(x=>[h,...x].slice(0,15)),m(x=>x+1),te(h.title,{description:h.message,action:h.link?{label:"View",onClick:()=>window.location.href=h.link}:void 0})}),()=>{a.off("notification")}},[a]);const f=async h=>{try{h.isRead||(await Zo.markAsRead(h.id)).success&&(o(u=>u.map(N=>N.id===h.id?{...N,isRead:!0}:N)),m(u=>Math.max(0,u-1))),h.link&&(window.location.href=h.link)}catch(x){console.error("Notification click error:",x)}},p=async()=>{try{(await Zo.markAllAsRead()).success&&(o(x=>x.map(u=>({...u,isRead:!0}))),m(0))}catch(h){console.error("Mark all as read error:",h)}};return e.jsx("header",{className:"bg-white border-b border-slate-200 px-6 py-4",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-slate-900",children:t}),e.jsx("p",{className:"text-slate-600 text-sm leading-snug max-w-3xl",children:s})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[r&&e.jsxs("div",{className:"flex items-center gap-3 px-3 py-2 bg-slate-100 rounded-lg",children:[e.jsx("div",{className:"w-8 h-8 bg-re-red rounded-full flex items-center justify-center",children:e.jsx(Lr,{className:"w-4 h-4 text-white"})}),e.jsxs("div",{className:"text-left",children:[e.jsx("p",{className:"text-slate-900",children:r.name}),e.jsx("p",{className:"text-slate-600",children:r.role})]})]}),n&&e.jsx(se,{variant:"outline",size:"icon",onClick:n,title:"Refresh",children:e.jsx(xr,{className:"w-4 h-4"})}),e.jsx(se,{variant:"outline",size:"icon",title:"Help",children:e.jsx(ck,{className:"w-4 h-4"})}),e.jsxs(bb,{children:[e.jsx(jb,{asChild:!0,children:e.jsxs(se,{variant:"outline",size:"icon",className:"relative",children:[e.jsx(Au,{className:"w-4 h-4"}),d>0&&e.jsx(Ce,{variant:"destructive",className:"absolute -top-1 -right-1 w-5 h-5 p-0 flex items-center justify-center text-xs",children:d})]})}),e.jsxs(Nb,{align:"end",className:"w-80",children:[e.jsxs("div",{className:"p-3 border-b flex items-center justify-between",children:[e.jsx("p",{className:"font-semibold text-slate-900",children:"Notifications"}),d>0&&e.jsx("button",{onClick:p,className:"text-xs text-blue-600 hover:underline",children:"Mark all read"})]}),e.jsx("div",{className:"max-h-96 overflow-y-auto custom-scrollbar",children:i.length===0?e.jsx("div",{className:"p-8 text-center text-slate-500",children:"No notifications yet"}):i.map(h=>e.jsxs(ID,{className:`p-3 cursor-pointer flex items-start gap-3 ${h.isRead?"":"bg-blue-50/50"}`,onClick:()=>f(h),children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-slate-900 text-sm font-medium",children:h.title}),e.jsx("p",{className:"text-slate-600 text-xs mt-1 leading-relaxed",children:h.message}),e.jsx("p",{className:"text-slate-400 text-[10px] mt-2",children:aR(new Date(h.createdAt),{addSuffix:!0})})]}),!h.isRead&&e.jsx("div",{className:"w-2 h-2 bg-blue-600 rounded-full mt-1.5 flex-shrink-0"})]},h.id))}),e.jsx("div",{className:"p-3 border-t text-center",children:e.jsx("button",{onClick:()=>window.location.href="/notifications",className:"text-xs font-medium text-blue-600 hover:text-blue-800 transition-colors",children:"View All Notifications"})})]})]})]})]})})}function Le({className:t,...s}){return e.jsx("div",{"data-slot":"card",className:Nt("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border",t),...s})}function Qe({className:t,...s}){return e.jsx("div",{"data-slot":"card-header",className:Nt("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 pt-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",t),...s})}function Je({className:t,...s}){return e.jsx("h4",{"data-slot":"card-title",className:Nt("leading-none",t),...s})}function Xt({className:t,...s}){return e.jsx("p",{"data-slot":"card-description",className:Nt("text-muted-foreground",t),...s})}function Fe({className:t,...s}){return e.jsx("div",{"data-slot":"card-content",className:Nt("px-6 [&:last-child]:pb-6",t),...s})}function Ny(t,[s,n]){return Math.min(n,Math.max(s,t))}function l$(t,s){return g.useReducer((n,r)=>s[n][r]??n,t)}var Pb="ScrollArea",[lR]=ga(Pb),[o$,Ya]=lR(Pb),oR=g.forwardRef((t,s)=>{const{__scopeScrollArea:n,type:r="hover",dir:a,scrollHideDelay:i=600,...o}=t,[d,m]=g.useState(null),[f,p]=g.useState(null),[h,x]=g.useState(null),[u,N]=g.useState(null),[v,w]=g.useState(null),[j,b]=g.useState(0),[C,S]=g.useState(0),[R,_]=g.useState(!1),[A,E]=g.useState(!1),q=Gs(s,D=>m(D)),O=Ku(a);return e.jsx(o$,{scope:n,type:r,dir:O,scrollHideDelay:i,scrollArea:d,viewport:f,onViewportChange:p,content:h,onContentChange:x,scrollbarX:u,onScrollbarXChange:N,scrollbarXEnabled:R,onScrollbarXEnabledChange:_,scrollbarY:v,onScrollbarYChange:w,scrollbarYEnabled:A,onScrollbarYEnabledChange:E,onCornerWidthChange:b,onCornerHeightChange:S,children:e.jsx(js.div,{dir:O,...o,ref:q,style:{position:"relative","--radix-scroll-area-corner-width":j+"px","--radix-scroll-area-corner-height":C+"px",...t.style}})})});oR.displayName=Pb;var cR="ScrollAreaViewport",dR=g.forwardRef((t,s)=>{const{__scopeScrollArea:n,children:r,nonce:a,...i}=t,o=Ya(cR,n),d=g.useRef(null),m=Gs(s,d,o.onViewportChange);return e.jsxs(e.Fragment,{children:[e.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:a}),e.jsx(js.div,{"data-radix-scroll-area-viewport":"",...i,ref:m,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...t.style},children:e.jsx("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});dR.displayName=cR;var Ui="ScrollAreaScrollbar",uR=g.forwardRef((t,s)=>{const{forceMount:n,...r}=t,a=Ya(Ui,t.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:o}=a,d=t.orientation==="horizontal";return g.useEffect(()=>(d?i(!0):o(!0),()=>{d?i(!1):o(!1)}),[d,i,o]),a.type==="hover"?e.jsx(c$,{...r,ref:s,forceMount:n}):a.type==="scroll"?e.jsx(d$,{...r,ref:s,forceMount:n}):a.type==="auto"?e.jsx(hR,{...r,ref:s,forceMount:n}):a.type==="always"?e.jsx(Ob,{...r,ref:s}):null});uR.displayName=Ui;var c$=g.forwardRef((t,s)=>{const{forceMount:n,...r}=t,a=Ya(Ui,t.__scopeScrollArea),[i,o]=g.useState(!1);return g.useEffect(()=>{const d=a.scrollArea;let m=0;if(d){const f=()=>{window.clearTimeout(m),o(!0)},p=()=>{m=window.setTimeout(()=>o(!1),a.scrollHideDelay)};return d.addEventListener("pointerenter",f),d.addEventListener("pointerleave",p),()=>{window.clearTimeout(m),d.removeEventListener("pointerenter",f),d.removeEventListener("pointerleave",p)}}},[a.scrollArea,a.scrollHideDelay]),e.jsx(Dr,{present:n||i,children:e.jsx(hR,{"data-state":i?"visible":"hidden",...r,ref:s})})}),d$=g.forwardRef((t,s)=>{const{forceMount:n,...r}=t,a=Ya(Ui,t.__scopeScrollArea),i=t.orientation==="horizontal",o=rp(()=>m("SCROLL_END"),100),[d,m]=l$("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 g.useEffect(()=>{if(d==="idle"){const f=window.setTimeout(()=>m("HIDE"),a.scrollHideDelay);return()=>window.clearTimeout(f)}},[d,a.scrollHideDelay,m]),g.useEffect(()=>{const f=a.viewport,p=i?"scrollLeft":"scrollTop";if(f){let h=f[p];const x=()=>{const u=f[p];h!==u&&(m("SCROLL"),o()),h=u};return f.addEventListener("scroll",x),()=>f.removeEventListener("scroll",x)}},[a.viewport,i,m,o]),e.jsx(Dr,{present:n||d!=="hidden",children:e.jsx(Ob,{"data-state":d==="hidden"?"hidden":"visible",...r,ref:s,onPointerEnter:Kt(t.onPointerEnter,()=>m("POINTER_ENTER")),onPointerLeave:Kt(t.onPointerLeave,()=>m("POINTER_LEAVE"))})})}),hR=g.forwardRef((t,s)=>{const n=Ya(Ui,t.__scopeScrollArea),{forceMount:r,...a}=t,[i,o]=g.useState(!1),d=t.orientation==="horizontal",m=rp(()=>{if(n.viewport){const f=n.viewport.offsetWidth{const{orientation:n="vertical",...r}=t,a=Ya(Ui,t.__scopeScrollArea),i=g.useRef(null),o=g.useRef(0),[d,m]=g.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),f=gR(d.viewport,d.content),p={...r,sizes:d,onSizesChange:m,hasThumb:f>0&&f<1,onThumbChange:x=>i.current=x,onThumbPointerUp:()=>o.current=0,onThumbPointerDown:x=>o.current=x};function h(x,u){return x$(x,o.current,d,u)}return n==="horizontal"?e.jsx(u$,{...p,ref:s,onThumbPositionChange:()=>{if(a.viewport&&i.current){const x=a.viewport.scrollLeft,u=pS(x,d,a.dir);i.current.style.transform=`translate3d(${u}px, 0, 0)`}},onWheelScroll:x=>{a.viewport&&(a.viewport.scrollLeft=x)},onDragScroll:x=>{a.viewport&&(a.viewport.scrollLeft=h(x,a.dir))}}):n==="vertical"?e.jsx(h$,{...p,ref:s,onThumbPositionChange:()=>{if(a.viewport&&i.current){const x=a.viewport.scrollTop,u=pS(x,d);i.current.style.transform=`translate3d(0, ${u}px, 0)`}},onWheelScroll:x=>{a.viewport&&(a.viewport.scrollTop=x)},onDragScroll:x=>{a.viewport&&(a.viewport.scrollTop=h(x))}}):null}),u$=g.forwardRef((t,s)=>{const{sizes:n,onSizesChange:r,...a}=t,i=Ya(Ui,t.__scopeScrollArea),[o,d]=g.useState(),m=g.useRef(null),f=Gs(s,m,i.onScrollbarXChange);return g.useEffect(()=>{m.current&&d(getComputedStyle(m.current))},[m]),e.jsx(fR,{"data-orientation":"horizontal",...a,ref:f,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":np(n)+"px",...t.style},onThumbPointerDown:p=>t.onThumbPointerDown(p.x),onDragScroll:p=>t.onDragScroll(p.x),onWheelScroll:(p,h)=>{if(i.viewport){const x=i.viewport.scrollLeft+p.deltaX;t.onWheelScroll(x),yR(x,h)&&p.preventDefault()}},onResize:()=>{m.current&&i.viewport&&o&&r({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:m.current.clientWidth,paddingStart:pf(o.paddingLeft),paddingEnd:pf(o.paddingRight)}})}})}),h$=g.forwardRef((t,s)=>{const{sizes:n,onSizesChange:r,...a}=t,i=Ya(Ui,t.__scopeScrollArea),[o,d]=g.useState(),m=g.useRef(null),f=Gs(s,m,i.onScrollbarYChange);return g.useEffect(()=>{m.current&&d(getComputedStyle(m.current))},[m]),e.jsx(fR,{"data-orientation":"vertical",...a,ref:f,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":np(n)+"px",...t.style},onThumbPointerDown:p=>t.onThumbPointerDown(p.y),onDragScroll:p=>t.onDragScroll(p.y),onWheelScroll:(p,h)=>{if(i.viewport){const x=i.viewport.scrollTop+p.deltaY;t.onWheelScroll(x),yR(x,h)&&p.preventDefault()}},onResize:()=>{m.current&&i.viewport&&o&&r({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:m.current.clientHeight,paddingStart:pf(o.paddingTop),paddingEnd:pf(o.paddingBottom)}})}})}),[m$,mR]=lR(Ui),fR=g.forwardRef((t,s)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:a,onThumbChange:i,onThumbPointerUp:o,onThumbPointerDown:d,onThumbPositionChange:m,onDragScroll:f,onWheelScroll:p,onResize:h,...x}=t,u=Ya(Ui,n),[N,v]=g.useState(null),w=Gs(s,q=>v(q)),j=g.useRef(null),b=g.useRef(""),C=u.viewport,S=r.content-r.viewport,R=Sr(p),_=Sr(m),A=rp(h,10);function E(q){if(j.current){const O=q.clientX-j.current.left,D=q.clientY-j.current.top;f({x:O,y:D})}}return g.useEffect(()=>{const q=O=>{const D=O.target;(N==null?void 0:N.contains(D))&&R(O,S)};return document.addEventListener("wheel",q,{passive:!1}),()=>document.removeEventListener("wheel",q,{passive:!1})},[C,N,S,R]),g.useEffect(_,[r,_]),hd(N,A),hd(u.content,A),e.jsx(m$,{scope:n,scrollbar:N,hasThumb:a,onThumbChange:Sr(i),onThumbPointerUp:Sr(o),onThumbPositionChange:_,onThumbPointerDown:Sr(d),children:e.jsx(js.div,{...x,ref:w,style:{position:"absolute",...x.style},onPointerDown:Kt(t.onPointerDown,q=>{q.button===0&&(q.target.setPointerCapture(q.pointerId),j.current=N.getBoundingClientRect(),b.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",u.viewport&&(u.viewport.style.scrollBehavior="auto"),E(q))}),onPointerMove:Kt(t.onPointerMove,E),onPointerUp:Kt(t.onPointerUp,q=>{const O=q.target;O.hasPointerCapture(q.pointerId)&&O.releasePointerCapture(q.pointerId),document.body.style.webkitUserSelect=b.current,u.viewport&&(u.viewport.style.scrollBehavior=""),j.current=null})})})}),ff="ScrollAreaThumb",pR=g.forwardRef((t,s)=>{const{forceMount:n,...r}=t,a=mR(ff,t.__scopeScrollArea);return e.jsx(Dr,{present:n||a.hasThumb,children:e.jsx(f$,{ref:s,...r})})}),f$=g.forwardRef((t,s)=>{const{__scopeScrollArea:n,style:r,...a}=t,i=Ya(ff,n),o=mR(ff,n),{onThumbPositionChange:d}=o,m=Gs(s,h=>o.onThumbChange(h)),f=g.useRef(void 0),p=rp(()=>{f.current&&(f.current(),f.current=void 0)},100);return g.useEffect(()=>{const h=i.viewport;if(h){const x=()=>{if(p(),!f.current){const u=g$(h,d);f.current=u,d()}};return d(),h.addEventListener("scroll",x),()=>h.removeEventListener("scroll",x)}},[i.viewport,p,d]),e.jsx(js.div,{"data-state":o.hasThumb?"visible":"hidden",...a,ref:m,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:Kt(t.onPointerDownCapture,h=>{const u=h.target.getBoundingClientRect(),N=h.clientX-u.left,v=h.clientY-u.top;o.onThumbPointerDown({x:N,y:v})}),onPointerUp:Kt(t.onPointerUp,o.onThumbPointerUp)})});pR.displayName=ff;var Lb="ScrollAreaCorner",xR=g.forwardRef((t,s)=>{const n=Ya(Lb,t.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?e.jsx(p$,{...t,ref:s}):null});xR.displayName=Lb;var p$=g.forwardRef((t,s)=>{const{__scopeScrollArea:n,...r}=t,a=Ya(Lb,n),[i,o]=g.useState(0),[d,m]=g.useState(0),f=!!(i&&d);return hd(a.scrollbarX,()=>{var h;const p=((h=a.scrollbarX)==null?void 0:h.offsetHeight)||0;a.onCornerHeightChange(p),m(p)}),hd(a.scrollbarY,()=>{var h;const p=((h=a.scrollbarY)==null?void 0:h.offsetWidth)||0;a.onCornerWidthChange(p),o(p)}),f?e.jsx(js.div,{...r,ref:s,style:{width:i,height:d,position:"absolute",right:a.dir==="ltr"?0:void 0,left:a.dir==="rtl"?0:void 0,bottom:0,...t.style}}):null});function pf(t){return t?parseInt(t,10):0}function gR(t,s){const n=t/s;return isNaN(n)?0:n}function np(t){const s=gR(t.viewport,t.content),n=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,r=(t.scrollbar.size-n)*s;return Math.max(r,18)}function x$(t,s,n,r="ltr"){const a=np(n),i=a/2,o=s||i,d=a-o,m=n.scrollbar.paddingStart+o,f=n.scrollbar.size-n.scrollbar.paddingEnd-d,p=n.content-n.viewport,h=r==="ltr"?[0,p]:[p*-1,0];return vR([m,f],h)(t)}function pS(t,s,n="ltr"){const r=np(s),a=s.scrollbar.paddingStart+s.scrollbar.paddingEnd,i=s.scrollbar.size-a,o=s.content-s.viewport,d=i-r,m=n==="ltr"?[0,o]:[o*-1,0],f=Ny(t,m);return vR([0,o],[0,d])(f)}function vR(t,s){return n=>{if(t[0]===t[1]||s[0]===s[1])return s[0];const r=(s[1]-s[0])/(t[1]-t[0]);return s[0]+r*(n-t[0])}}function yR(t,s){return t>0&&t{})=>{let n={left:t.scrollLeft,top:t.scrollTop},r=0;return(function a(){const i={left:t.scrollLeft,top:t.scrollTop},o=n.left!==i.left,d=n.top!==i.top;(o||d)&&s(),n=i,r=window.requestAnimationFrame(a)})(),()=>window.cancelAnimationFrame(r)};function rp(t,s){const n=Sr(t),r=g.useRef(0);return g.useEffect(()=>()=>window.clearTimeout(r.current),[]),g.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,s)},[n,s])}function hd(t,s){const n=Sr(s);cr(()=>{let r=0;if(t){const a=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return a.observe(t),()=>{window.cancelAnimationFrame(r),a.unobserve(t)}}},[t,n])}var v$=oR,y$=dR,b$=xR;function Ib({className:t,children:s,...n}){return e.jsxs(v$,{"data-slot":"scroll-area",className:Nt("relative",t),...n,children:[e.jsx(y$,{"data-slot":"scroll-area-viewport",className:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",children:s}),e.jsx(j$,{}),e.jsx(b$,{})]})}function j$({className:t,orientation:s="vertical",...n}){return e.jsx(uR,{"data-slot":"scroll-area-scrollbar",orientation:s,className:Nt("flex touch-none p-px transition-colors select-none",s==="vertical"&&"h-full w-2.5 border-l border-l-transparent",s==="horizontal"&&"h-1 flex-col border-t border-t-transparent",t),...n,children:e.jsx(pR,{"data-slot":"scroll-area-thumb",className:Nt("relative flex-1 rounded-full",s==="vertical"&&"bg-border",s==="horizontal"&&"bg-slate-200/70")})})}function N$({onNavigate:t}){const s=[{title:"Total Applications",value:Ei.totalApplications,icon:Ns,color:"bg-blue-500",trend:{value:12,isPositive:!0},filter:"all"},{title:"LOA Issued",value:Ei.loaIssued,icon:un,color:"bg-green-500",trend:{value:8,isPositive:!0},filter:"Approved"},{title:"Level 1 Pending",value:Ei.level1Pending,icon:vn,color:"bg-red-500",trend:{value:3,isPositive:!1},filter:"Level 1 Pending"},{title:"Level 2 Pending",value:Ei.level2Pending,icon:iM,color:"bg-purple-500",trend:{value:5,isPositive:!0},filter:"Level 2 Pending"},{title:"Level 3 Pending",value:Ei.level3Pending,icon:ik,color:"bg-indigo-500",trend:{value:2,isPositive:!1},filter:"Level 3 Pending"},{title:"EOR In Progress",value:Ei.eorInProgress,icon:sn,color:"bg-cyan-500",trend:{value:1,isPositive:!0},filter:"EOR In Progress"},{title:"Disqualified",value:Ei.disqualified,icon:mi,color:"bg-red-500",trend:{value:4,isPositive:!1},filter:"Disqualified"},{title:"Pending Reminders",value:Ei.pendingReminders,icon:Ur,color:"bg-orange-500",trend:{value:7,isPositive:!1},filter:"Questionnaire Pending"},{title:"Shortlisted Today",value:Ei.shortlistedToday,icon:un,color:"bg-teal-500",trend:{value:5,isPositive:!0},filter:"Shortlisted"},{title:"Pending Shortlisting",value:Ei.pendingShortlisting,icon:UI,color:"bg-yellow-500",trend:{value:2,isPositive:!1},filter:"all",action:"opportunity-requests"}],n=[{status:"Pending",count:45,color:"#f59e0b"},{status:"In Progress",count:68,color:"#3b82f6"},{status:"Approved",count:25,color:"#10b981"},{status:"Rejected",count:12,color:"#ef4444"}],r=[{location:"Mumbai",count:23},{location:"Delhi",count:18},{location:"Bangalore",count:21},{location:"Chennai",count:15},{location:"Kolkata",count:12},{location:"Others",count:61}],a=Math.max(...r.map(i=>i.count));return e.jsxs("div",{className:"space-y-6",children:[e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:s.map(i=>{const o=i.icon,d=i.trend.isPositive?dl:Yo;return e.jsxs(Le,{className:"cursor-pointer hover:shadow-lg transition-shadow",onClick:()=>t(i.action||"applications",i.filter),children:[e.jsxs(Qe,{className:"flex flex-row items-center justify-between pb-2",children:[e.jsx(Je,{className:"text-slate-600",children:i.title}),e.jsx("div",{className:`${i.color} p-2 rounded-lg`,children:e.jsx(o,{className:"w-5 h-5 text-white"})})]}),e.jsx(Fe,{children:e.jsx("div",{className:"flex items-end justify-between",children:e.jsxs("div",{children:[e.jsx("div",{className:"text-slate-900",children:i.value}),e.jsxs("div",{className:`flex items-center gap-1 mt-1 ${i.trend.isPositive?"text-green-600":"text-red-600"}`,children:[e.jsx(d,{className:"w-3 h-3"}),e.jsxs("span",{children:[i.trend.value,"% from last month"]})]})]})})})]},i.title)})}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[e.jsxs(Le,{children:[e.jsx(Qe,{children:e.jsx(Je,{children:"Application Status Distribution"})}),e.jsx(Fe,{children:e.jsx("div",{className:"space-y-4",children:n.map(i=>e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:i.color}}),e.jsx("span",{className:"text-slate-700",children:i.status})]}),e.jsx("span",{className:"text-slate-900",children:i.count})]}),e.jsx("div",{className:"w-full bg-slate-200 rounded-full h-2",children:e.jsx("div",{className:"h-2 rounded-full transition-all",style:{width:`${i.count/150*100}%`,backgroundColor:i.color}})})]},i.status))})})]}),e.jsxs(Le,{children:[e.jsx(Qe,{children:e.jsx(Je,{children:"Applications by Location"})}),e.jsx(Fe,{children:e.jsx("div",{className:"space-y-3",children:r.map(i=>e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-24 text-slate-700",children:i.location}),e.jsx("div",{className:"flex-1 bg-slate-200 rounded-full h-8 relative overflow-hidden",children:e.jsx("div",{className:"bg-re-red h-full rounded-full transition-all flex items-center justify-end px-3",style:{width:`${i.count/a*100}%`},children:e.jsx("span",{className:"text-white",children:i.count})})})]},i.location))})})]})]}),e.jsxs(Le,{children:[e.jsx(Qe,{children:e.jsx(Je,{children:"Recent Activity"})}),e.jsx(Fe,{children:e.jsx(Ib,{className:"h-80",children:e.jsx("div",{className:"space-y-4",children:zM.map(i=>e.jsxs("div",{className:"flex items-start gap-4 p-3 hover:bg-slate-50 rounded-lg cursor-pointer transition-colors",onClick:()=>t("applications"),children:[e.jsxs("div",{className:"w-10 h-10 bg-red-50 rounded-full flex items-center justify-center flex-shrink-0",children:[i.action==="Approved"&&e.jsx(un,{className:"w-5 h-5 text-green-600"}),i.action==="Interview Scheduled"&&e.jsx(vn,{className:"w-5 h-5 text-blue-600"}),i.action==="Document Uploaded"&&e.jsx(Ns,{className:"w-5 h-5 text-purple-600"}),i.action==="Reminder Sent"&&e.jsx(Ur,{className:"w-5 h-5 text-orange-600"})]}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx(Ce,{variant:"outline",children:i.applicationId}),e.jsx("span",{className:"text-slate-700",children:i.action})]}),e.jsxs("p",{className:"text-slate-500 mt-1",children:["by ",i.user]})]}),e.jsx("div",{className:"text-slate-500 flex-shrink-0",children:i.timestamp})]},i.id))})})})]})]})}var ap="Tabs",[w$]=ga(ap,[Kf]),bR=Kf(),[S$,Mb]=w$(ap),jR=g.forwardRef((t,s)=>{const{__scopeTabs:n,value:r,onValueChange:a,defaultValue:i,orientation:o="horizontal",dir:d,activationMode:m="automatic",...f}=t,p=Ku(d),[h,x]=Bi({prop:r,onChange:a,defaultProp:i??"",caller:ap});return e.jsx(S$,{scope:n,baseId:Ar(),value:h,onValueChange:x,orientation:o,dir:p,activationMode:m,children:e.jsx(js.div,{dir:p,"data-orientation":o,...f,ref:s})})});jR.displayName=ap;var NR="TabsList",wR=g.forwardRef((t,s)=>{const{__scopeTabs:n,loop:r=!0,...a}=t,i=Mb(NR,n),o=bR(n);return e.jsx(Hk,{asChild:!0,...o,orientation:i.orientation,dir:i.dir,loop:r,children:e.jsx(js.div,{role:"tablist","aria-orientation":i.orientation,...a,ref:s})})});wR.displayName=NR;var SR="TabsTrigger",CR=g.forwardRef((t,s)=>{const{__scopeTabs:n,value:r,disabled:a=!1,...i}=t,o=Mb(SR,n),d=bR(n),m=DR(o.baseId,r),f=RR(o.baseId,r),p=r===o.value;return e.jsx(Wk,{asChild:!0,...d,focusable:!a,active:p,children:e.jsx(js.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":f,"data-state":p?"active":"inactive","data-disabled":a?"":void 0,disabled:a,id:m,...i,ref:s,onMouseDown:Kt(t.onMouseDown,h=>{!a&&h.button===0&&h.ctrlKey===!1?o.onValueChange(r):h.preventDefault()}),onKeyDown:Kt(t.onKeyDown,h=>{[" ","Enter"].includes(h.key)&&o.onValueChange(r)}),onFocus:Kt(t.onFocus,()=>{const h=o.activationMode!=="manual";!p&&!a&&h&&o.onValueChange(r)})})})});CR.displayName=SR;var AR="TabsContent",kR=g.forwardRef((t,s)=>{const{__scopeTabs:n,value:r,forceMount:a,children:i,...o}=t,d=Mb(AR,n),m=DR(d.baseId,r),f=RR(d.baseId,r),p=r===d.value,h=g.useRef(p);return g.useEffect(()=>{const x=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(x)},[]),e.jsx(Dr,{present:a||p,children:({present:x})=>e.jsx(js.div,{"data-state":p?"active":"inactive","data-orientation":d.orientation,role:"tabpanel","aria-labelledby":m,hidden:!x,id:f,tabIndex:0,...o,ref:s,style:{...t.style,animationDuration:h.current?"0s":void 0},children:x&&i})})});kR.displayName=AR;function DR(t,s){return`${t}-trigger-${s}`}function RR(t,s){return`${t}-content-${s}`}var C$=jR,A$=wR,k$=CR,D$=kR;function Bn({className:t,...s}){return e.jsx(C$,{"data-slot":"tabs",className:Nt("flex flex-col gap-2",t),...s})}function $n({className:t,...s}){return e.jsx(A$,{"data-slot":"tabs-list",className:Nt("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-xl p-[3px] flex",t),...s})}function Wt({className:t,...s}){return e.jsx(k$,{"data-slot":"tabs-trigger",className:Nt("data-[state=active]:bg-card dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-xl border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...s})}function Ut({className:t,...s}){return e.jsx(D$,{"data-slot":"tabs-content",className:Nt("flex-1 outline-none",t),...s})}function R$(t){const s=E$(t),n=g.forwardRef((r,a)=>{const{children:i,...o}=r,d=g.Children.toArray(i),m=d.find(T$);if(m){const f=m.props.children,p=d.map(h=>h===m?g.Children.count(f)>1?g.Children.only(null):g.isValidElement(f)?f.props.children:null:h);return e.jsx(s,{...o,ref:a,children:g.isValidElement(f)?g.cloneElement(f,void 0,p):null})}return e.jsx(s,{...o,ref:a,children:i})});return n.displayName=`${t}.Slot`,n}function E$(t){const s=g.forwardRef((n,r)=>{const{children:a,...i}=n;if(g.isValidElement(a)){const o=O$(a),d=P$(i,a.props);return a.type!==g.Fragment&&(d.ref=r?Xr(r,o):o),g.cloneElement(a,d)}return g.Children.count(a)>1?g.Children.only(null):null});return s.displayName=`${t}.SlotClone`,s}var _$=Symbol("radix.slottable");function T$(t){return g.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===_$}function P$(t,s){const n={...s};for(const r in s){const a=t[r],i=s[r];/^on[A-Z]/.test(r)?a&&i?n[r]=(...d)=>{const m=i(...d);return a(...d),m}:a&&(n[r]=a):r==="style"?n[r]={...a,...i}:r==="className"&&(n[r]=[a,i].filter(Boolean).join(" "))}return{...t,...n}}function O$(t){var r,a;let s=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=s&&"isReactWarning"in s&&s.isReactWarning;return n?t.ref:(s=(a=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:a.get,n=s&&"isReactWarning"in s&&s.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var ip="Dialog",[ER,_R]=ga(ip),[L$,Ni]=ER(ip),TR=t=>{const{__scopeDialog:s,children:n,open:r,defaultOpen:a,onOpenChange:i,modal:o=!0}=t,d=g.useRef(null),m=g.useRef(null),[f,p]=Bi({prop:r,defaultProp:a??!1,onChange:i,caller:ip});return e.jsx(L$,{scope:s,triggerRef:d,contentRef:m,contentId:Ar(),titleId:Ar(),descriptionId:Ar(),open:f,onOpenChange:p,onOpenToggle:g.useCallback(()=>p(h=>!h),[p]),modal:o,children:n})};TR.displayName=ip;var PR="DialogTrigger",OR=g.forwardRef((t,s)=>{const{__scopeDialog:n,...r}=t,a=Ni(PR,n),i=Gs(s,a.triggerRef);return e.jsx(js.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":$b(a.open),...r,ref:i,onClick:Kt(t.onClick,a.onOpenToggle)})});OR.displayName=PR;var Fb="DialogPortal",[I$,LR]=ER(Fb,{forceMount:void 0}),IR=t=>{const{__scopeDialog:s,forceMount:n,children:r,container:a}=t,i=Ni(Fb,s);return e.jsx(I$,{scope:s,forceMount:n,children:g.Children.map(r,o=>e.jsx(Dr,{present:n||i.open,children:e.jsx(wd,{asChild:!0,container:a,children:o})}))})};IR.displayName=Fb;var xf="DialogOverlay",MR=g.forwardRef((t,s)=>{const n=LR(xf,t.__scopeDialog),{forceMount:r=n.forceMount,...a}=t,i=Ni(xf,t.__scopeDialog);return i.modal?e.jsx(Dr,{present:r||i.open,children:e.jsx(F$,{...a,ref:s})}):null});MR.displayName=xf;var M$=R$("DialogOverlay.RemoveScroll"),F$=g.forwardRef((t,s)=>{const{__scopeDialog:n,...r}=t,a=Ni(xf,n);return e.jsx(Ju,{as:M$,allowPinchZoom:!0,shards:[a.contentRef],children:e.jsx(js.div,{"data-state":$b(a.open),...r,ref:s,style:{pointerEvents:"auto",...r.style}})})}),lc="DialogContent",FR=g.forwardRef((t,s)=>{const n=LR(lc,t.__scopeDialog),{forceMount:r=n.forceMount,...a}=t,i=Ni(lc,t.__scopeDialog);return e.jsx(Dr,{present:r||i.open,children:i.modal?e.jsx(B$,{...a,ref:s}):e.jsx($$,{...a,ref:s})})});FR.displayName=lc;var B$=g.forwardRef((t,s)=>{const n=Ni(lc,t.__scopeDialog),r=g.useRef(null),a=Gs(s,n.contentRef,r);return g.useEffect(()=>{const i=r.current;if(i)return Yf(i)},[]),e.jsx(BR,{...t,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Kt(t.onCloseAutoFocus,i=>{var o;i.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:Kt(t.onPointerDownOutside,i=>{const o=i.detail.originalEvent,d=o.button===0&&o.ctrlKey===!0;(o.button===2||d)&&i.preventDefault()}),onFocusOutside:Kt(t.onFocusOutside,i=>i.preventDefault())})}),$$=g.forwardRef((t,s)=>{const n=Ni(lc,t.__scopeDialog),r=g.useRef(!1),a=g.useRef(!1);return e.jsx(BR,{...t,ref:s,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,d;(o=t.onCloseAutoFocus)==null||o.call(t,i),i.defaultPrevented||(r.current||(d=n.triggerRef.current)==null||d.focus(),i.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:i=>{var m,f;(m=t.onInteractOutside)==null||m.call(t,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const o=i.target;((f=n.triggerRef.current)==null?void 0:f.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&a.current&&i.preventDefault()}})}),BR=g.forwardRef((t,s)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:i,...o}=t,d=Ni(lc,n),m=g.useRef(null),f=Gs(s,m);return $f(),e.jsxs(e.Fragment,{children:[e.jsx(Yu,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:i,children:e.jsx(bd,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":$b(d.open),...o,ref:f,onDismiss:()=>d.onOpenChange(!1)})}),e.jsxs(e.Fragment,{children:[e.jsx(z$,{titleId:d.titleId}),e.jsx(V$,{contentRef:m,descriptionId:d.descriptionId})]})]})}),Bb="DialogTitle",$R=g.forwardRef((t,s)=>{const{__scopeDialog:n,...r}=t,a=Ni(Bb,n);return e.jsx(js.h2,{id:a.titleId,...r,ref:s})});$R.displayName=Bb;var qR="DialogDescription",zR=g.forwardRef((t,s)=>{const{__scopeDialog:n,...r}=t,a=Ni(qR,n);return e.jsx(js.p,{id:a.descriptionId,...r,ref:s})});zR.displayName=qR;var UR="DialogClose",VR=g.forwardRef((t,s)=>{const{__scopeDialog:n,...r}=t,a=Ni(UR,n);return e.jsx(js.button,{type:"button",...r,ref:s,onClick:Kt(t.onClick,()=>a.onOpenChange(!1))})});VR.displayName=UR;function $b(t){return t?"open":"closed"}var HR="DialogTitleWarning",[q$,WR]=uI(HR,{contentName:lc,titleName:Bb,docsSlug:"dialog"}),z$=({titleId:t})=>{const s=WR(HR),n=`\`${s.contentName}\` requires a \`${s.titleName}\` for the component to be accessible for screen reader users. - -If you want to hide the \`${s.titleName}\`, you can wrap it with our VisuallyHidden component. - -For more information, see https://radix-ui.com/primitives/docs/components/${s.docsSlug}`;return g.useEffect(()=>{t&&(document.getElementById(t)||console.error(n))},[n,t]),null},U$="DialogDescriptionWarning",V$=({contentRef:t,descriptionId:s})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${WR(U$).contentName}}.`;return g.useEffect(()=>{var i;const a=(i=t.current)==null?void 0:i.getAttribute("aria-describedby");s&&a&&(document.getElementById(s)||console.warn(r))},[r,t,s]),null},qb=TR,GR=OR,zb=IR,lp=MR,op=FR,KR=$R,YR=zR,Ub=VR;function ds({...t}){return e.jsx(qb,{"data-slot":"dialog",...t})}function co({...t}){return e.jsx(GR,{"data-slot":"dialog-trigger",...t})}function H$({...t}){return e.jsx(zb,{"data-slot":"dialog-portal",...t})}const ZR=g.forwardRef(({className:t,...s},n)=>e.jsx(lp,{ref:n,"data-slot":"dialog-overlay",className:Nt("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...s}));ZR.displayName=lp.displayName;const os=g.forwardRef(({className:t,children:s,...n},r)=>e.jsxs(H$,{"data-slot":"dialog-portal",children:[e.jsx(ZR,{}),e.jsxs(op,{ref:r,"data-slot":"dialog-content",className:Nt("bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",t),...n,children:[s,e.jsxs(Ub,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[e.jsx(ld,{}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));os.displayName=op.displayName;function xs({className:t,...s}){return e.jsx("div",{"data-slot":"dialog-header",className:Nt("flex flex-col gap-2 text-center sm:text-left",t),...s})}function bn({className:t,...s}){return e.jsx("div",{"data-slot":"dialog-footer",className:Nt("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...s})}function ms({className:t,...s}){return e.jsx(KR,{"data-slot":"dialog-title",className:Nt("text-lg leading-none font-semibold",t),...s})}function bs({className:t,...s}){return e.jsx(YR,{"data-slot":"dialog-description",className:Nt("text-muted-foreground text-sm",t),...s})}function W$(t){const s=G$(t),n=g.forwardRef((r,a)=>{const{children:i,...o}=r,d=g.Children.toArray(i),m=d.find(Y$);if(m){const f=m.props.children,p=d.map(h=>h===m?g.Children.count(f)>1?g.Children.only(null):g.isValidElement(f)?f.props.children:null:h);return e.jsx(s,{...o,ref:a,children:g.isValidElement(f)?g.cloneElement(f,void 0,p):null})}return e.jsx(s,{...o,ref:a,children:i})});return n.displayName=`${t}.Slot`,n}function G$(t){const s=g.forwardRef((n,r)=>{const{children:a,...i}=n;if(g.isValidElement(a)){const o=Q$(a),d=Z$(i,a.props);return a.type!==g.Fragment&&(d.ref=r?Xr(r,o):o),g.cloneElement(a,d)}return g.Children.count(a)>1?g.Children.only(null):null});return s.displayName=`${t}.SlotClone`,s}var K$=Symbol("radix.slottable");function Y$(t){return g.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===K$}function Z$(t,s){const n={...s};for(const r in s){const a=t[r],i=s[r];/^on[A-Z]/.test(r)?a&&i?n[r]=(...d)=>{const m=i(...d);return a(...d),m}:a&&(n[r]=a):r==="style"?n[r]={...a,...i}:r==="className"&&(n[r]=[a,i].filter(Boolean).join(" "))}return{...t,...n}}function Q$(t){var r,a;let s=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=s&&"isReactWarning"in s&&s.isReactWarning;return n?t.ref:(s=(a=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:a.get,n=s&&"isReactWarning"in s&&s.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var QR=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),X$="VisuallyHidden",XR=g.forwardRef((t,s)=>e.jsx(js.span,{...t,ref:s,style:{...QR,...t.style}}));XR.displayName=X$;var J$=XR,e7=[" ","Enter","ArrowUp","ArrowDown"],t7=[" ","Enter"],oc="Select",[cp,dp,s7]=rb(oc),[Ad]=ga(oc,[s7,oo]),up=oo(),[n7,uo]=Ad(oc),[r7,a7]=Ad(oc),JR=t=>{const{__scopeSelect:s,children:n,open:r,defaultOpen:a,onOpenChange:i,value:o,defaultValue:d,onValueChange:m,dir:f,name:p,autoComplete:h,disabled:x,required:u,form:N}=t,v=up(s),[w,j]=g.useState(null),[b,C]=g.useState(null),[S,R]=g.useState(!1),_=Ku(f),[A,E]=Bi({prop:r,defaultProp:a??!1,onChange:i,caller:oc}),[q,O]=Bi({prop:o,defaultProp:d,onChange:m,caller:oc}),D=g.useRef(null),P=w?N||!!w.closest("form"):!0,[L,$]=g.useState(new Set),Y=Array.from(L).map(Z=>Z.props.value).join(";");return e.jsx(Hf,{...v,children:e.jsxs(n7,{required:u,scope:s,trigger:w,onTriggerChange:j,valueNode:b,onValueNodeChange:C,valueNodeHasChildren:S,onValueNodeHasChildrenChange:R,contentId:Ar(),value:q,onValueChange:O,open:A,onOpenChange:E,dir:_,triggerPointerDownPosRef:D,disabled:x,children:[e.jsx(cp.Provider,{scope:s,children:e.jsx(r7,{scope:t.__scopeSelect,onNativeOptionAdd:g.useCallback(Z=>{$(W=>new Set(W).add(Z))},[]),onNativeOptionRemove:g.useCallback(Z=>{$(W=>{const U=new Set(W);return U.delete(Z),U})},[]),children:n})}),P?e.jsxs(wE,{"aria-hidden":!0,required:u,tabIndex:-1,name:p,autoComplete:h,value:q,onChange:Z=>O(Z.target.value),disabled:x,form:N,children:[q===void 0?e.jsx("option",{value:""}):null,Array.from(L)]},Y):null]})})};JR.displayName=oc;var eE="SelectTrigger",tE=g.forwardRef((t,s)=>{const{__scopeSelect:n,disabled:r=!1,...a}=t,i=up(n),o=uo(eE,n),d=o.disabled||r,m=Gs(s,o.onTriggerChange),f=dp(n),p=g.useRef("touch"),[h,x,u]=CE(v=>{const w=f().filter(C=>!C.disabled),j=w.find(C=>C.value===o.value),b=AE(w,v,j);b!==void 0&&o.onValueChange(b.value)}),N=v=>{d||(o.onOpenChange(!0),u()),v&&(o.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)})};return e.jsx(Qu,{asChild:!0,...i,children:e.jsx(js.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:d,"data-disabled":d?"":void 0,"data-placeholder":SE(o.value)?"":void 0,...a,ref:m,onClick:Kt(a.onClick,v=>{v.currentTarget.focus(),p.current!=="mouse"&&N(v)}),onPointerDown:Kt(a.onPointerDown,v=>{p.current=v.pointerType;const w=v.target;w.hasPointerCapture(v.pointerId)&&w.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&v.pointerType==="mouse"&&(N(v),v.preventDefault())}),onKeyDown:Kt(a.onKeyDown,v=>{const w=h.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&x(v.key),!(w&&v.key===" ")&&e7.includes(v.key)&&(N(),v.preventDefault())})})})});tE.displayName=eE;var sE="SelectValue",nE=g.forwardRef((t,s)=>{const{__scopeSelect:n,className:r,style:a,children:i,placeholder:o="",...d}=t,m=uo(sE,n),{onValueNodeHasChildrenChange:f}=m,p=i!==void 0,h=Gs(s,m.onValueNodeChange);return cr(()=>{f(p)},[f,p]),e.jsx(js.span,{...d,ref:h,style:{pointerEvents:"none"},children:SE(m.value)?e.jsx(e.Fragment,{children:o}):i})});nE.displayName=sE;var i7="SelectIcon",rE=g.forwardRef((t,s)=>{const{__scopeSelect:n,children:r,...a}=t;return e.jsx(js.span,{"aria-hidden":!0,...a,ref:s,children:r||"▼"})});rE.displayName=i7;var l7="SelectPortal",aE=t=>e.jsx(wd,{asChild:!0,...t});aE.displayName=l7;var cc="SelectContent",iE=g.forwardRef((t,s)=>{const n=uo(cc,t.__scopeSelect),[r,a]=g.useState();if(cr(()=>{a(new DocumentFragment)},[]),!n.open){const i=r;return i?zu.createPortal(e.jsx(lE,{scope:t.__scopeSelect,children:e.jsx(cp.Slot,{scope:t.__scopeSelect,children:e.jsx("div",{children:t.children})})}),i):null}return e.jsx(oE,{...t,ref:s})});iE.displayName=cc;var oi=10,[lE,ho]=Ad(cc),o7="SelectContentImpl",c7=W$("SelectContent.RemoveScroll"),oE=g.forwardRef((t,s)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:i,onPointerDownOutside:o,side:d,sideOffset:m,align:f,alignOffset:p,arrowPadding:h,collisionBoundary:x,collisionPadding:u,sticky:N,hideWhenDetached:v,avoidCollisions:w,...j}=t,b=uo(cc,n),[C,S]=g.useState(null),[R,_]=g.useState(null),A=Gs(s,X=>S(X)),[E,q]=g.useState(null),[O,D]=g.useState(null),P=dp(n),[L,$]=g.useState(!1),Y=g.useRef(!1);g.useEffect(()=>{if(C)return Yf(C)},[C]),$f();const Z=g.useCallback(X=>{const[J,...ae]=P().map(ce=>ce.ref.current),[le]=ae.slice(-1),xe=document.activeElement;for(const ce of X)if(ce===xe||(ce==null||ce.scrollIntoView({block:"nearest"}),ce===J&&R&&(R.scrollTop=0),ce===le&&R&&(R.scrollTop=R.scrollHeight),ce==null||ce.focus(),document.activeElement!==xe))return},[P,R]),W=g.useCallback(()=>Z([E,C]),[Z,E,C]);g.useEffect(()=>{L&&W()},[L,W]);const{onOpenChange:U,triggerPointerDownPosRef:M}=b;g.useEffect(()=>{if(C){let X={x:0,y:0};const J=le=>{var xe,ce;X={x:Math.abs(Math.round(le.pageX)-(((xe=M.current)==null?void 0:xe.x)??0)),y:Math.abs(Math.round(le.pageY)-(((ce=M.current)==null?void 0:ce.y)??0))}},ae=le=>{X.x<=10&&X.y<=10?le.preventDefault():C.contains(le.target)||U(!1),document.removeEventListener("pointermove",J),M.current=null};return M.current!==null&&(document.addEventListener("pointermove",J),document.addEventListener("pointerup",ae,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",J),document.removeEventListener("pointerup",ae,{capture:!0})}}},[C,U,M]),g.useEffect(()=>{const X=()=>U(!1);return window.addEventListener("blur",X),window.addEventListener("resize",X),()=>{window.removeEventListener("blur",X),window.removeEventListener("resize",X)}},[U]);const[z,T]=CE(X=>{const J=P().filter(xe=>!xe.disabled),ae=J.find(xe=>xe.ref.current===document.activeElement),le=AE(J,X,ae);le&&setTimeout(()=>le.ref.current.focus())}),I=g.useCallback((X,J,ae)=>{const le=!Y.current&&!ae;(b.value!==void 0&&b.value===J||le)&&(q(X),le&&(Y.current=!0))},[b.value]),B=g.useCallback(()=>C==null?void 0:C.focus(),[C]),G=g.useCallback((X,J,ae)=>{const le=!Y.current&&!ae;(b.value!==void 0&&b.value===J||le)&&D(X)},[b.value]),K=r==="popper"?wy:cE,H=K===wy?{side:d,sideOffset:m,align:f,alignOffset:p,arrowPadding:h,collisionBoundary:x,collisionPadding:u,sticky:N,hideWhenDetached:v,avoidCollisions:w}:{};return e.jsx(lE,{scope:n,content:C,viewport:R,onViewportChange:_,itemRefCallback:I,selectedItem:E,onItemLeave:B,itemTextRefCallback:G,focusSelectedItem:W,selectedItemText:O,position:r,isPositioned:L,searchRef:z,children:e.jsx(Ju,{as:c7,allowPinchZoom:!0,children:e.jsx(Yu,{asChild:!0,trapped:b.open,onMountAutoFocus:X=>{X.preventDefault()},onUnmountAutoFocus:Kt(a,X=>{var J;(J=b.trigger)==null||J.focus({preventScroll:!0}),X.preventDefault()}),children:e.jsx(bd,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:X=>X.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:e.jsx(K,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:X=>X.preventDefault(),...j,...H,onPlaced:()=>$(!0),ref:A,style:{display:"flex",flexDirection:"column",outline:"none",...j.style},onKeyDown:Kt(j.onKeyDown,X=>{const J=X.ctrlKey||X.altKey||X.metaKey;if(X.key==="Tab"&&X.preventDefault(),!J&&X.key.length===1&&T(X.key),["ArrowUp","ArrowDown","Home","End"].includes(X.key)){let le=P().filter(xe=>!xe.disabled).map(xe=>xe.ref.current);if(["ArrowUp","End"].includes(X.key)&&(le=le.slice().reverse()),["ArrowUp","ArrowDown"].includes(X.key)){const xe=X.target,ce=le.indexOf(xe);le=le.slice(ce+1)}setTimeout(()=>Z(le)),X.preventDefault()}})})})})})})});oE.displayName=o7;var d7="SelectItemAlignedPosition",cE=g.forwardRef((t,s)=>{const{__scopeSelect:n,onPlaced:r,...a}=t,i=uo(cc,n),o=ho(cc,n),[d,m]=g.useState(null),[f,p]=g.useState(null),h=Gs(s,A=>p(A)),x=dp(n),u=g.useRef(!1),N=g.useRef(!0),{viewport:v,selectedItem:w,selectedItemText:j,focusSelectedItem:b}=o,C=g.useCallback(()=>{if(i.trigger&&i.valueNode&&d&&f&&v&&w&&j){const A=i.trigger.getBoundingClientRect(),E=f.getBoundingClientRect(),q=i.valueNode.getBoundingClientRect(),O=j.getBoundingClientRect();if(i.dir!=="rtl"){const xe=O.left-E.left,ce=q.left-xe,ve=A.left-ce,Pe=A.width+ve,et=Math.max(Pe,E.width),kt=window.innerWidth-oi,vt=Ny(ce,[oi,Math.max(oi,kt-et)]);d.style.minWidth=Pe+"px",d.style.left=vt+"px"}else{const xe=E.right-O.right,ce=window.innerWidth-q.right-xe,ve=window.innerWidth-A.right-ce,Pe=A.width+ve,et=Math.max(Pe,E.width),kt=window.innerWidth-oi,vt=Ny(ce,[oi,Math.max(oi,kt-et)]);d.style.minWidth=Pe+"px",d.style.right=vt+"px"}const D=x(),P=window.innerHeight-oi*2,L=v.scrollHeight,$=window.getComputedStyle(f),Y=parseInt($.borderTopWidth,10),Z=parseInt($.paddingTop,10),W=parseInt($.borderBottomWidth,10),U=parseInt($.paddingBottom,10),M=Y+Z+L+U+W,z=Math.min(w.offsetHeight*5,M),T=window.getComputedStyle(v),I=parseInt(T.paddingTop,10),B=parseInt(T.paddingBottom,10),G=A.top+A.height/2-oi,K=P-G,H=w.offsetHeight/2,X=w.offsetTop+H,J=Y+Z+X,ae=M-J;if(J<=G){const xe=D.length>0&&w===D[D.length-1].ref.current;d.style.bottom="0px";const ce=f.clientHeight-v.offsetTop-v.offsetHeight,ve=Math.max(K,H+(xe?B:0)+ce+W),Pe=J+ve;d.style.height=Pe+"px"}else{const xe=D.length>0&&w===D[0].ref.current;d.style.top="0px";const ve=Math.max(G,Y+v.offsetTop+(xe?I:0)+H)+ae;d.style.height=ve+"px",v.scrollTop=J-G+v.offsetTop}d.style.margin=`${oi}px 0`,d.style.minHeight=z+"px",d.style.maxHeight=P+"px",r==null||r(),requestAnimationFrame(()=>u.current=!0)}},[x,i.trigger,i.valueNode,d,f,v,w,j,i.dir,r]);cr(()=>C(),[C]);const[S,R]=g.useState();cr(()=>{f&&R(window.getComputedStyle(f).zIndex)},[f]);const _=g.useCallback(A=>{A&&N.current===!0&&(C(),b==null||b(),N.current=!1)},[C,b]);return e.jsx(h7,{scope:n,contentWrapper:d,shouldExpandOnScrollRef:u,onScrollButtonChange:_,children:e.jsx("div",{ref:m,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:e.jsx(js.div,{...a,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});cE.displayName=d7;var u7="SelectPopperPosition",wy=g.forwardRef((t,s)=>{const{__scopeSelect:n,align:r="start",collisionPadding:a=oi,...i}=t,o=up(n);return e.jsx(Wf,{...o,...i,ref:s,align:r,collisionPadding:a,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)"}})});wy.displayName=u7;var[h7,Vb]=Ad(cc,{}),Sy="SelectViewport",dE=g.forwardRef((t,s)=>{const{__scopeSelect:n,nonce:r,...a}=t,i=ho(Sy,n),o=Vb(Sy,n),d=Gs(s,i.onViewportChange),m=g.useRef(0);return e.jsxs(e.Fragment,{children:[e.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}),e.jsx(cp.Slot,{scope:n,children:e.jsx(js.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:d,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:Kt(a.onScroll,f=>{const p=f.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:x}=o;if(x!=null&&x.current&&h){const u=Math.abs(m.current-p.scrollTop);if(u>0){const N=window.innerHeight-oi*2,v=parseFloat(h.style.minHeight),w=parseFloat(h.style.height),j=Math.max(v,w);if(j0?S:0,h.style.justifyContent="flex-end")}}}m.current=p.scrollTop})})})]})});dE.displayName=Sy;var uE="SelectGroup",[m7,f7]=Ad(uE),hE=g.forwardRef((t,s)=>{const{__scopeSelect:n,...r}=t,a=Ar();return e.jsx(m7,{scope:n,id:a,children:e.jsx(js.div,{role:"group","aria-labelledby":a,...r,ref:s})})});hE.displayName=uE;var mE="SelectLabel",fE=g.forwardRef((t,s)=>{const{__scopeSelect:n,...r}=t,a=f7(mE,n);return e.jsx(js.div,{id:a.id,...r,ref:s})});fE.displayName=mE;var gf="SelectItem",[p7,pE]=Ad(gf),xE=g.forwardRef((t,s)=>{const{__scopeSelect:n,value:r,disabled:a=!1,textValue:i,...o}=t,d=uo(gf,n),m=ho(gf,n),f=d.value===r,[p,h]=g.useState(i??""),[x,u]=g.useState(!1),N=Gs(s,b=>{var C;return(C=m.itemRefCallback)==null?void 0:C.call(m,b,r,a)}),v=Ar(),w=g.useRef("touch"),j=()=>{a||(d.onValueChange(r),d.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 e.jsx(p7,{scope:n,value:r,disabled:a,textId:v,isSelected:f,onItemTextChange:g.useCallback(b=>{h(C=>C||((b==null?void 0:b.textContent)??"").trim())},[]),children:e.jsx(cp.ItemSlot,{scope:n,value:r,disabled:a,textValue:p,children:e.jsx(js.div,{role:"option","aria-labelledby":v,"data-highlighted":x?"":void 0,"aria-selected":f&&x,"data-state":f?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...o,ref:N,onFocus:Kt(o.onFocus,()=>u(!0)),onBlur:Kt(o.onBlur,()=>u(!1)),onClick:Kt(o.onClick,()=>{w.current!=="mouse"&&j()}),onPointerUp:Kt(o.onPointerUp,()=>{w.current==="mouse"&&j()}),onPointerDown:Kt(o.onPointerDown,b=>{w.current=b.pointerType}),onPointerMove:Kt(o.onPointerMove,b=>{var C;w.current=b.pointerType,a?(C=m.onItemLeave)==null||C.call(m):w.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Kt(o.onPointerLeave,b=>{var C;b.currentTarget===document.activeElement&&((C=m.onItemLeave)==null||C.call(m))}),onKeyDown:Kt(o.onKeyDown,b=>{var S;((S=m.searchRef)==null?void 0:S.current)!==""&&b.key===" "||(t7.includes(b.key)&&j(),b.key===" "&&b.preventDefault())})})})})});xE.displayName=gf;var pu="SelectItemText",gE=g.forwardRef((t,s)=>{const{__scopeSelect:n,className:r,style:a,...i}=t,o=uo(pu,n),d=ho(pu,n),m=pE(pu,n),f=a7(pu,n),[p,h]=g.useState(null),x=Gs(s,j=>h(j),m.onItemTextChange,j=>{var b;return(b=d.itemTextRefCallback)==null?void 0:b.call(d,j,m.value,m.disabled)}),u=p==null?void 0:p.textContent,N=g.useMemo(()=>e.jsx("option",{value:m.value,disabled:m.disabled,children:u},m.value),[m.disabled,m.value,u]),{onNativeOptionAdd:v,onNativeOptionRemove:w}=f;return cr(()=>(v(N),()=>w(N)),[v,w,N]),e.jsxs(e.Fragment,{children:[e.jsx(js.span,{id:m.textId,...i,ref:x}),m.isSelected&&o.valueNode&&!o.valueNodeHasChildren?zu.createPortal(i.children,o.valueNode):null]})});gE.displayName=pu;var vE="SelectItemIndicator",yE=g.forwardRef((t,s)=>{const{__scopeSelect:n,...r}=t;return pE(vE,n).isSelected?e.jsx(js.span,{"aria-hidden":!0,...r,ref:s}):null});yE.displayName=vE;var Cy="SelectScrollUpButton",bE=g.forwardRef((t,s)=>{const n=ho(Cy,t.__scopeSelect),r=Vb(Cy,t.__scopeSelect),[a,i]=g.useState(!1),o=Gs(s,r.onScrollButtonChange);return cr(()=>{if(n.viewport&&n.isPositioned){let d=function(){const f=m.scrollTop>0;i(f)};const m=n.viewport;return d(),m.addEventListener("scroll",d),()=>m.removeEventListener("scroll",d)}},[n.viewport,n.isPositioned]),a?e.jsx(NE,{...t,ref:o,onAutoScroll:()=>{const{viewport:d,selectedItem:m}=n;d&&m&&(d.scrollTop=d.scrollTop-m.offsetHeight)}}):null});bE.displayName=Cy;var Ay="SelectScrollDownButton",jE=g.forwardRef((t,s)=>{const n=ho(Ay,t.__scopeSelect),r=Vb(Ay,t.__scopeSelect),[a,i]=g.useState(!1),o=Gs(s,r.onScrollButtonChange);return cr(()=>{if(n.viewport&&n.isPositioned){let d=function(){const f=m.scrollHeight-m.clientHeight,p=Math.ceil(m.scrollTop)m.removeEventListener("scroll",d)}},[n.viewport,n.isPositioned]),a?e.jsx(NE,{...t,ref:o,onAutoScroll:()=>{const{viewport:d,selectedItem:m}=n;d&&m&&(d.scrollTop=d.scrollTop+m.offsetHeight)}}):null});jE.displayName=Ay;var NE=g.forwardRef((t,s)=>{const{__scopeSelect:n,onAutoScroll:r,...a}=t,i=ho("SelectScrollButton",n),o=g.useRef(null),d=dp(n),m=g.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return g.useEffect(()=>()=>m(),[m]),cr(()=>{var p;const f=d().find(h=>h.ref.current===document.activeElement);(p=f==null?void 0:f.ref.current)==null||p.scrollIntoView({block:"nearest"})},[d]),e.jsx(js.div,{"aria-hidden":!0,...a,ref:s,style:{flexShrink:0,...a.style},onPointerDown:Kt(a.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:Kt(a.onPointerMove,()=>{var f;(f=i.onItemLeave)==null||f.call(i),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:Kt(a.onPointerLeave,()=>{m()})})}),x7="SelectSeparator",g7=g.forwardRef((t,s)=>{const{__scopeSelect:n,...r}=t;return e.jsx(js.div,{"aria-hidden":!0,...r,ref:s})});g7.displayName=x7;var ky="SelectArrow",v7=g.forwardRef((t,s)=>{const{__scopeSelect:n,...r}=t,a=up(n),i=uo(ky,n),o=ho(ky,n);return i.open&&o.position==="popper"?e.jsx(Gf,{...a,...r,ref:s}):null});v7.displayName=ky;var y7="SelectBubbleInput",wE=g.forwardRef(({__scopeSelect:t,value:s,...n},r)=>{const a=g.useRef(null),i=Gs(r,a),o=Zy(s);return g.useEffect(()=>{const d=a.current;if(!d)return;const m=window.HTMLSelectElement.prototype,p=Object.getOwnPropertyDescriptor(m,"value").set;if(o!==s&&p){const h=new Event("change",{bubbles:!0});p.call(d,s),d.dispatchEvent(h)}},[o,s]),e.jsx(js.select,{...n,style:{...QR,...n.style},ref:i,defaultValue:s})});wE.displayName=y7;function SE(t){return t===""||t===void 0}function CE(t){const s=Sr(t),n=g.useRef(""),r=g.useRef(0),a=g.useCallback(o=>{const d=n.current+o;s(d),(function m(f){n.current=f,window.clearTimeout(r.current),f!==""&&(r.current=window.setTimeout(()=>m(""),1e3))})(d)},[s]),i=g.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return g.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,a,i]}function AE(t,s,n){const a=s.length>1&&Array.from(s).every(f=>f===s[0])?s[0]:s,i=n?t.indexOf(n):-1;let o=b7(t,Math.max(i,0));a.length===1&&(o=o.filter(f=>f!==n));const m=o.find(f=>f.textValue.toLowerCase().startsWith(a.toLowerCase()));return m!==n?m:void 0}function b7(t,s){return t.map((n,r)=>t[(s+r)%t.length])}var j7=JR,N7=tE,w7=nE,S7=rE,C7=aE,A7=iE,k7=dE,D7=hE,R7=fE,kE=xE,DE=gE,RE=yE,E7=bE,_7=jE;function Dt({...t}){return e.jsx(j7,{"data-slot":"select",...t})}function xS({...t}){return e.jsx(D7,{"data-slot":"select-group",...t})}function Rt({...t}){return e.jsx(w7,{"data-slot":"select-value",...t})}function Et({className:t,size:s="default",children:n,...r}){return e.jsxs(N7,{"data-slot":"select-trigger","data-size":s,className:Nt("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-full items-center justify-between gap-2 rounded-md border bg-input-background px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...r,children:[n,e.jsx(S7,{asChild:!0,children:e.jsx(Aa,{className:"size-4 opacity-50"})})]})}function _t({className:t,children:s,position:n="popper",...r}){return e.jsx(C7,{children:e.jsxs(A7,{"data-slot":"select-content",className:Nt("bg-popover 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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",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:[e.jsx(P7,{}),e.jsx(k7,{className:Nt("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:s}),e.jsx(O7,{})]})})}function T7({className:t,...s}){return e.jsx(R7,{"data-slot":"select-label",className:Nt("text-muted-foreground px-2 py-1.5 text-xs",t),...s})}function Me({className:t,children:s,...n}){return e.jsxs(kE,{"data-slot":"select-item",className:Nt("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",t),...n,children:[e.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:e.jsx(RE,{children:e.jsx(Hn,{className:"size-4"})})}),e.jsx(DE,{children:s})]})}function P7({className:t,...s}){return e.jsx(E7,{"data-slot":"select-scroll-up-button",className:Nt("flex cursor-default items-center justify-center py-1",t),...s,children:e.jsx(yu,{className:"size-4"})})}function O7({className:t,...s}){return e.jsx(_7,{"data-slot":"select-scroll-down-button",className:Nt("flex cursor-default items-center justify-center py-1",t),...s,children:e.jsx(Aa,{className:"size-4"})})}function Ts({className:t,...s}){return e.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto custom-scrollbar-x-slim",children:e.jsx("table",{"data-slot":"table",className:Nt("w-full caption-bottom text-sm",t),...s})})}function Ps({className:t,...s}){return e.jsx("thead",{"data-slot":"table-header",className:Nt("[&_tr]:border-b",t),...s})}function Os({className:t,...s}){return e.jsx("tbody",{"data-slot":"table-body",className:Nt("[&_tr:last-child]:border-0",t),...s})}function it({className:t,...s}){return e.jsx("tr",{"data-slot":"table-row",className:Nt("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",t),...s})}function fe({className:t,...s}){return e.jsx("th",{"data-slot":"table-head",className:Nt("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),...s})}function ue({className:t,...s}){return e.jsx("td",{"data-slot":"table-cell",className:Nt("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",t),...s})}const EE={getOnboardingPayments:async()=>{var s,n;const t=await Ee.getOnboardingPayments();if(!t.ok)throw new Error(((s=t.data)==null?void 0:s.message)||"Failed to fetch onboarding payments");return((n=t.data)==null?void 0:n.payments)||[]},getFnFSettlements:async()=>{var s,n;const t=await Ee.getFnFSettlements();if(!t.ok)throw new Error(((s=t.data)==null?void 0:s.message)||"Failed to fetch F&F settlements");return((n=t.data)==null?void 0:n.settlements)||[]},getFnFSettlementById:async t=>{var n,r;const s=await Ee.getFnFSettlementById(t);if(!s.ok)throw new Error(((n=s.data)==null?void 0:n.message)||"Failed to fetch F&F details");return(r=s.data)==null?void 0:r.fnf},updatePayment:async(t,s)=>{var r;const n=await Ee.updatePayment(t,s);if(!n.ok)throw new Error(((r=n.data)==null?void 0:r.message)||"Failed to update payment");return n.data},calculateFnF:async t=>{var n;const s=await Ee.calculateFnF(t);if(!s.ok)throw new Error(((n=s.data)==null?void 0:n.message)||"Failed to calculate F&F");return s.data},addLineItem:async(t,s)=>{var r;const n=await Ee.addLineItem(t,s);if(!n.ok)throw new Error(((r=n.data)==null?void 0:r.message)||"Failed to add line item");return n.data},updateFnF:async(t,s)=>{var r;const n=await Ee.updateFnF(t,s);if(!n.ok)throw new Error(((r=n.data)==null?void 0:r.message)||"Failed to update F&F settlement");return n.data}};function L7({onNavigate:t,onViewPaymentDetails:s,onViewAuditDetails:n,onViewFnFDetails:r}){var T,I,B,G;const[a,i]=g.useState([]),[o,d]=g.useState([]),[m,f]=g.useState([]),[p,h]=g.useState(!0);g.useEffect(()=>{x()},[]);const x=async()=>{try{h(!0);const[K,H]=await Promise.all([EE.getFnFSettlements(),hs.getApplications()]),X=H.data||[],J=[];X.forEach(le=>{const xe=le.overallStatus||le.status,ce=["Payment Pending","Security Deposit","Security Details","LOI In Progress","LOI Issued","LOA Pending","Dealer Code Generation","LOA_APPROVAL"].includes(xe),ve=le.securityDeposits||[];ve.length>0?ve.forEach(Pe=>{J.push({...Pe,application:le,paymentStatus:Pe.status,paymentType:Pe.depositType,amount:Pe.amount,id:Pe.id,applicationId:le.applicationId||le.id,createdAt:Pe.createdAt,verificationDate:Pe.verifiedAt})}):ce&&(["Payment Pending","Security Deposit","Security Details","LOI In Progress"].includes(xe)?J.push({id:`virtual-${le.id}-sd`,applicationId:le.applicationId||le.id,application:le,paymentStatus:"Pending",paymentType:"SECURITY_DEPOSIT",amount:5e5,createdAt:le.updatedAt,isVirtual:!0}):["LOA Pending","Dealer Code Generation","LOA_APPROVAL"].includes(xe)&&J.push({id:`virtual-${le.id}-ff`,applicationId:le.applicationId||le.id,application:le,paymentStatus:"Pending",paymentType:"FIRST_FILL",amount:15e5,createdAt:le.updatedAt,isVirtual:!0}))}),i(J),d(K);const ae=X.filter(le=>le.status==="FDD_VERIFICATION"||le.overallStatus==="FDD Verification"||le.currentStage==="FDD");f(ae)}catch(K){console.error("Fetch error:",K),te.error("Failed to load dashboard data")}finally{h(!1)}},[u,N]=g.useState(!1),[v,w]=g.useState(!1),[j,b]=g.useState(null),[C,S]=g.useState([]),[R,_]=g.useState({department:"",description:"",type:"receivable",amount:""}),[A,E]=g.useState(""),q=()=>{const K=C.filter(J=>J.type==="receivable").reduce((J,ae)=>J+ae.amount,0),H=C.filter(J=>J.type==="payable").reduce((J,ae)=>J+ae.amount,0),X=H-K;return{totalReceivable:K,totalPayable:H,netAmount:X}},O=async()=>{if(C.length===0){te.error("Please add at least one line item");return}if(!A){te.error("Please add final remarks");return}try{h(!0),te.success("Finance summary submitted successfully"),N(!1),b(null),S([]),E(""),x()}catch{te.error("Failed to submit summary")}finally{h(!1)}},D=K=>{const H=String(K||"").trim().toLowerCase();return H==="paid"||H==="verified"},P=a.filter(K=>!D(K.paymentStatus)),L=a.filter(K=>D(K.paymentStatus)),$=o.filter(K=>K.status==="Initiated"||K.status==="Calculated"),Y=o.filter(K=>K.status==="Completed"||K.status==="Cleared"),Z=()=>{if(!R.department||!R.description||!R.amount){te.error("Please fill in all line item fields");return}const K={id:Date.now().toString(),department:R.department,description:R.description,type:R.type,amount:parseFloat(R.amount)};S([...C,K]),_({department:"",description:"",type:"receivable",amount:""}),te.success("Line item added")},W=K=>{S(C.filter(H=>H.id!==K)),te.info("Line item removed")},{totalReceivable:U,totalPayable:M,netAmount:z}=q();return p?e.jsxs("div",{className:"flex items-center justify-center p-20 text-re-red",children:[e.jsx(vn,{className:"w-8 h-8 animate-spin mr-3"}),e.jsx("span",{children:"Loading Finance Data..."})]}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-3xl mb-2",children:"Finance Dashboard"}),e.jsx("p",{className:"text-slate-600",children:"Verify payments and create financial settlement summaries"})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-5 gap-3",children:[e.jsxs(Le,{className:"cursor-pointer hover:shadow-lg transition-shadow border-red-200 bg-red-50/20",onClick:()=>{m.length>0&&n?n(m[0].applicationId||m[0].id):t==null||t("finance-onboarding")},children:[e.jsxs(Qe,{className:"pb-3",children:[e.jsx(Xt,{className:"text-re-red font-bold",children:"Pending Audits"}),e.jsx(Je,{className:"text-3xl text-re-red",children:m.length})]}),e.jsxs(Fe,{children:[e.jsx("p",{className:"text-slate-600 text-xs font-medium",children:"FDD Sign-offs"}),e.jsx(se,{variant:"link",className:"p-0 h-auto text-re-red mt-2 text-xs",children:"Review Now →"})]})]}),e.jsxs(Le,{className:"cursor-pointer hover:shadow-lg transition-shadow border-yellow-200",onClick:()=>t==null?void 0:t("finance-onboarding"),children:[e.jsxs(Qe,{className:"pb-3",children:[e.jsx(Xt,{children:"Pending Verification"}),e.jsx(Je,{className:"text-3xl text-yellow-600",children:P.length})]}),e.jsxs(Fe,{children:[e.jsx("p",{className:"text-slate-600",children:"Onboarding Payments"}),e.jsx(se,{variant:"link",className:"p-0 h-auto text-re-red mt-2",children:"View All →"})]})]}),e.jsxs(Le,{className:"cursor-pointer hover:shadow-lg transition-shadow border-green-200",onClick:()=>t==null?void 0:t("finance-onboarding"),children:[e.jsxs(Qe,{className:"pb-3",children:[e.jsx(Xt,{children:"Verified"}),e.jsx(Je,{className:"text-3xl text-green-600",children:L.length})]}),e.jsxs(Fe,{children:[e.jsx("p",{className:"text-slate-600",children:"Total Validated"}),e.jsx(se,{variant:"link",className:"p-0 h-auto text-re-red mt-2",children:"View All →"})]})]}),e.jsxs(Le,{className:"cursor-pointer hover:shadow-lg transition-shadow border-orange-200",onClick:()=>t==null?void 0:t("finance-fnf"),children:[e.jsxs(Qe,{className:"pb-3",children:[e.jsx(Xt,{children:"Pending F&F Summary"}),e.jsx(Je,{className:"text-3xl text-orange-600",children:$.length})]}),e.jsxs(Fe,{children:[e.jsx("p",{className:"text-slate-600",children:"Offboarding Cases"}),e.jsx(se,{variant:"link",className:"p-0 h-auto text-re-red mt-2",children:"View All →"})]})]}),e.jsxs(Le,{className:"cursor-pointer hover:shadow-lg transition-shadow border-green-200",onClick:()=>t==null?void 0:t("finance-fnf"),children:[e.jsxs(Qe,{className:"pb-3",children:[e.jsx(Xt,{children:"F&F Completed"}),e.jsx(Je,{className:"text-3xl text-green-600",children:Y.length})]}),e.jsxs(Fe,{children:[e.jsx("p",{className:"text-slate-600",children:"Settlements Done"}),e.jsx(se,{variant:"link",className:"p-0 h-auto text-re-red mt-2",children:"View All →"})]})]})]}),e.jsxs(Bn,{defaultValue:"onboarding",className:"w-full",children:[e.jsxs($n,{className:"grid w-full grid-cols-2",children:[e.jsxs(Wt,{value:"onboarding",children:[e.jsx(ka,{className:"w-4 h-4 mr-2"}),"Onboarding"]}),e.jsxs(Wt,{value:"fnf",children:[e.jsx(Ns,{className:"w-4 h-4 mr-2"}),"F&F Settlement"]})]}),e.jsx(Ut,{value:"onboarding",className:"space-y-4",children:e.jsxs(Le,{children:[e.jsxs(Qe,{children:[e.jsx(Je,{children:"Payment Verification"}),e.jsx(Xt,{children:"Verify dealer advance payments for onboarding applications"})]}),e.jsx(Fe,{children:e.jsxs(Bn,{defaultValue:"pending",className:"w-full",children:[e.jsxs($n,{children:[e.jsxs(Wt,{value:"pending",children:["Pending (",P.length,")"]}),e.jsxs(Wt,{value:"verified",children:["Verified (",L.length,")"]})]}),e.jsx(Ut,{value:"pending",className:"mt-6",children:e.jsxs("div",{className:"space-y-4",children:[P.map(K=>{var H,X;return e.jsx(Le,{className:"border-yellow-200 bg-yellow-50/30",children:e.jsx(Fe,{className:"pt-6",children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[e.jsx("h3",{className:"text-lg font-bold",children:((H=K.application)==null?void 0:H.applicationId)||"N/A"}),e.jsx(Ce,{className:"bg-yellow-100 text-yellow-700 border-yellow-300",children:K.paymentStatus})]}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 text-sm",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Applicant Name"}),e.jsx("p",{className:"font-medium",children:(X=K.application)==null?void 0:X.applicantName})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Type"}),e.jsx("p",{children:K.paymentType==="SECURITY_DEPOSIT"?"Security Deposit":K.paymentType==="FIRST_FILL"?"First Fill":K.paymentType})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Amount"}),e.jsxs("p",{className:"text-re-red-hover font-bold",children:["₹",parseFloat(K.amount).toLocaleString("en-IN")]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Created On"}),e.jsx("p",{children:Yt(K.createdAt)})]})]})]}),e.jsxs("div",{className:"ml-4 flex flex-col gap-2",children:[e.jsxs(se,{size:"sm",variant:"outline",onClick:()=>{s&&s(K.applicationId||K.id)},children:[e.jsx(Ns,{className:"w-4 h-4 mr-2"}),"View Details"]}),e.jsxs(se,{size:"sm",className:"bg-green-600 hover:bg-green-700 font-bold",onClick:()=>{s&&s(K.applicationId||K.id)},children:[e.jsx(un,{className:"w-4 h-4 mr-2"}),"Verify Payment"]})]})]})})},K.id)}),P.length===0&&e.jsxs("div",{className:"text-center py-12 text-slate-500",children:[e.jsx(un,{className:"w-12 h-12 mx-auto mb-4 text-slate-400"}),e.jsx("p",{children:"No pending payment verifications"})]})]})}),e.jsx(Ut,{value:"verified",className:"mt-6",children:e.jsx("div",{className:"space-y-4",children:L.map(K=>{var H,X;return e.jsx(Le,{className:"border-green-200 bg-green-50/30",children:e.jsx(Fe,{className:"pt-6",children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[e.jsx("h3",{className:"text-lg font-bold",children:((H=K.application)==null?void 0:H.applicationId)||"N/A"}),e.jsx(Ce,{className:"bg-green-100 text-green-700 border-green-300",children:K.paymentStatus})]}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 text-sm",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Applicant Name"}),e.jsx("p",{className:"font-medium",children:(X=K.application)==null?void 0:X.applicantName})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Type"}),e.jsx("p",{children:K.paymentType==="SECURITY_DEPOSIT"?"Security Deposit":K.paymentType==="FIRST_FILL"?"First Fill":K.paymentType})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Amount"}),e.jsxs("p",{className:"text-green-700 font-bold",children:["₹",parseFloat(K.amount).toLocaleString("en-IN")]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Verified On"}),e.jsx("p",{children:K.verificationDate?Yt(K.verificationDate):"N/A"})]})]})]}),e.jsx("div",{className:"ml-4",children:e.jsxs(se,{size:"sm",variant:"outline",onClick:()=>{s&&s(K.applicationId||K.id)},children:[e.jsx(Ns,{className:"w-4 h-4 mr-2"}),"View Details"]})})]})})},K.id)})})})]})})]})}),e.jsx(Ut,{value:"fnf",className:"space-y-4",children:e.jsxs(Le,{children:[e.jsxs(Qe,{children:[e.jsx(Je,{children:"F&F Financial Summary"}),e.jsx(Xt,{children:"Create financial settlement summaries for resignation and termination cases"})]}),e.jsx(Fe,{children:e.jsxs(Bn,{defaultValue:"pending",className:"w-full",children:[e.jsxs($n,{children:[e.jsxs(Wt,{value:"pending",children:["Pending Summary (",$.length,")"]}),e.jsxs(Wt,{value:"completed",children:["Completed (",Y.length,")"]})]}),e.jsx(Ut,{value:"pending",className:"mt-6",children:e.jsxs("div",{className:"space-y-4",children:[$.map(K=>{var H,X,J,ae,le,xe,ce;return e.jsx(Le,{className:"border-orange-200 bg-orange-50/30",children:e.jsx(Fe,{className:"pt-6",children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[e.jsx("h3",{className:"text-lg font-bold",children:((H=K.resignation)==null?void 0:H.resignationId)||K.id}),e.jsx(Ce,{variant:"outline",children:K.resignation?"Resignation":K.terminationRequest?"Termination":"General"}),e.jsx(Ce,{className:"bg-orange-100 text-orange-700 border-orange-300",children:K.status})]}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4 text-sm mb-3",children:[e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4 text-sm mb-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600 font-medium text-[10px] uppercase tracking-wider mb-1",children:"Dealer Name"}),e.jsx("p",{className:"font-semibold text-slate-900",children:((J=(X=K.outlet)==null?void 0:X.dealer)==null?void 0:J.fullName)||((ae=K.outlet)==null?void 0:ae.name)||"N/A"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600 font-medium text-[10px] uppercase tracking-wider mb-1",children:"Dealer Code"}),e.jsx("p",{className:"font-mono text-xs font-bold text-blue-600",children:((le=K.outlet)==null?void 0:le.code)||"N/A"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600 font-medium text-[10px] uppercase tracking-wider mb-1",children:"Location"}),e.jsxs("p",{className:"text-slate-900",children:[((xe=K.outlet)==null?void 0:xe.city)||"N/A",", ",((ce=K.outlet)==null?void 0:ce.state)||""]})]})]}),e.jsxs("div",{className:"flex items-center gap-2 text-sm bg-white/50 p-2 rounded-lg border border-slate-100",children:[e.jsx(un,{className:"w-4 h-4 text-emerald-500"}),e.jsxs("span",{className:"text-slate-600 font-medium",children:[e.jsx("span",{className:"text-emerald-600 font-bold",children:(K.clearances||[]).filter(ve=>ve.status==="NOC Submitted"||ve.status==="Dues Pending").length}),"/16 Departments Cleared"]})]})]})]}),e.jsxs("div",{className:"ml-4 flex flex-col gap-2",children:[e.jsxs(se,{size:"sm",variant:"outline",onClick:()=>{b(K),w(!0)},children:[e.jsx(Ns,{className:"w-4 h-4 mr-2"}),"View Details"]}),e.jsxs(se,{size:"sm",className:"bg-blue-600 hover:bg-blue-700",onClick:()=>{b(K),S([]),E(""),N(!0)},children:[e.jsx(ak,{className:"w-4 h-4 mr-2"}),"Create Summary"]})]})]})})},K.id)}),$.length===0&&e.jsxs("div",{className:"text-center py-12 text-slate-500",children:[e.jsx(Ns,{className:"w-12 h-12 mx-auto mb-4 text-slate-400"}),e.jsx("p",{children:"No F&F cases pending financial summary"})]})]})}),e.jsx(Ut,{value:"completed",className:"mt-6",children:e.jsx("div",{className:"space-y-4",children:Y.map(K=>e.jsx(Le,{className:"border-green-200 bg-green-50/30",children:e.jsx(Fe,{className:"pt-6",children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[e.jsx("h3",{className:"text-lg font-bold",children:K.id}),e.jsx(Ce,{variant:"outline",children:K.type}),e.jsx(Ce,{className:"bg-green-100 text-green-700 border-green-300",children:K.status})]}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 text-sm",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Dealer Name"}),e.jsx("p",{className:"font-medium",children:K.dealerName})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Dealer Code"}),e.jsx("p",{children:K.dealerCode})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Net Settlement"}),e.jsxs("p",{className:K.netAmount&&K.netAmount>=0?"text-green-700":"text-red-700",children:["₹",K.netAmount?Math.abs(K.netAmount).toLocaleString("en-IN"):"0"]}),e.jsx("p",{className:"text-xs text-slate-500",children:K.netAmount&&K.netAmount>=0?"Payable to Dealer":"Receivable from Dealer"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Completed On"}),e.jsx("p",{children:K.completedOn})]})]})]}),e.jsx("div",{className:"ml-4",children:e.jsxs(se,{size:"sm",variant:"outline",onClick:()=>{r&&r(K.id)},children:[e.jsx(Ns,{className:"w-4 h-4 mr-2"}),"View Details"]})})]})})},K.id))})})]})})]})})]}),e.jsx(ds,{open:u,onOpenChange:N,children:e.jsxs(os,{className:"max-w-4xl max-h-[90vh] overflow-y-auto",children:[e.jsxs(xs,{children:[e.jsx(ms,{children:"Create Financial Settlement Summary"}),e.jsxs(bs,{children:[((T=j==null?void 0:j.resignation)==null?void 0:T.resignationId)||(j==null?void 0:j.id)," - ",j==null?void 0:j.dealerName," (",j==null?void 0:j.dealerCode,")"]})]}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"border rounded-lg p-4 bg-slate-50",children:[e.jsx("h3",{className:"text-sm font-bold mb-4",children:"Add Financial Line Item"}),e.jsxs("div",{className:"grid grid-cols-12 gap-3",children:[e.jsxs("div",{className:"col-span-3",children:[e.jsx(de,{className:"text-xs",children:"Department"}),e.jsx(at,{placeholder:"e.g., Warranty",value:R.department,onChange:K=>_({...R,department:K.target.value})})]}),e.jsxs("div",{className:"col-span-4",children:[e.jsx(de,{className:"text-xs",children:"Description"}),e.jsx(at,{placeholder:"e.g., Pending warranty claims",value:R.description,onChange:K=>_({...R,description:K.target.value})})]}),e.jsxs("div",{className:"col-span-2",children:[e.jsx(de,{className:"text-xs",children:"Type"}),e.jsxs(Dt,{value:R.type,onValueChange:K=>_({...R,type:K}),children:[e.jsx(Et,{children:e.jsx(Rt,{})}),e.jsxs(_t,{children:[e.jsx(Me,{value:"receivable",children:"Receivable"}),e.jsx(Me,{value:"payable",children:"Payable"})]})]})]}),e.jsxs("div",{className:"col-span-2",children:[e.jsx(de,{className:"text-xs",children:"Amount (₹)"}),e.jsx(at,{type:"number",placeholder:"0",value:R.amount,onChange:K=>_({...R,amount:K.target.value})})]}),e.jsx("div",{className:"col-span-1 flex items-end",children:e.jsx(se,{size:"sm",onClick:Z,className:"w-full bg-re-red hover:bg-re-red-hover",children:e.jsx(An,{className:"w-4 h-4"})})})]})]}),C.length>0&&e.jsx("div",{className:"border rounded-lg overflow-hidden",children:e.jsxs(Ts,{children:[e.jsx(Ps,{children:e.jsxs(it,{children:[e.jsx(fe,{children:"Department"}),e.jsx(fe,{children:"Description"}),e.jsx(fe,{className:"text-center",children:"Type"}),e.jsx(fe,{className:"text-right",children:"Amount"}),e.jsx(fe,{className:"w-16"})]})}),e.jsx(Os,{children:C.map(K=>e.jsxs(it,{children:[e.jsx(ue,{children:K.department}),e.jsx(ue,{children:K.description}),e.jsx(ue,{className:"text-center",children:e.jsx(Ce,{className:K.type==="receivable"?"bg-red-100 text-red-700 border-red-200":"bg-green-100 text-green-700 border-green-200",children:K.type==="receivable"?"Receivable":"Payable"})}),e.jsxs(ue,{className:`text-right font-medium ${K.type==="receivable"?"text-red-700":"text-green-700"}`,children:["₹",K.amount.toLocaleString("en-IN")]}),e.jsx(ue,{children:e.jsx(se,{size:"sm",variant:"ghost",onClick:()=>W(K.id),children:e.jsx(ar,{className:"w-4 h-4 text-red-600"})})})]},K.id))})]})}),C.length>0&&e.jsxs("div",{className:"border rounded-lg p-4 bg-slate-900 text-white",children:[e.jsx("h3",{className:"text-sm font-bold mb-4",children:"Financial Settlement Summary"}),e.jsxs("div",{className:"grid grid-cols-3 gap-8",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-slate-400 uppercase tracking-wider mb-1",children:"Total Payable"}),e.jsxs("p",{className:"text-3xl font-bold text-green-400",children:["₹",M.toLocaleString("en-IN")]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-slate-400 uppercase tracking-wider mb-1",children:"Total receivable"}),e.jsxs("p",{className:"text-3xl font-bold text-red-400",children:["₹",U.toLocaleString("en-IN")]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-slate-400 uppercase tracking-wider mb-1",children:"Net Settlement"}),e.jsxs("p",{className:`text-3xl font-bold ${z>=0?"text-green-400":"text-red-400"}`,children:["₹",Math.abs(z).toLocaleString("en-IN")]}),e.jsx("p",{className:"text-xs text-slate-400 mt-1 italic",children:z>=0?"Payable to Dealer":"Receivable from Dealer"})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(de,{className:"font-bold",children:["Summary Remarks ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx(Ws,{placeholder:"Add your final reconciliation remarks here...",rows:4,value:A,onChange:K=>E(K.target.value)})]})]}),e.jsxs(bn,{className:"border-t pt-4",children:[e.jsx(se,{variant:"outline",onClick:()=>N(!1),children:"Discard"}),e.jsxs(se,{className:"bg-green-600 hover:bg-green-700",onClick:O,disabled:C.length===0,children:[e.jsx(ml,{className:"w-4 h-4 mr-2"}),"Finalize & Submit Summary"]})]})]})}),e.jsx(ds,{open:v,onOpenChange:w,children:e.jsxs(os,{className:"max-w-4xl max-h-[90vh] overflow-y-auto",children:[e.jsxs(xs,{children:[e.jsx(ms,{children:"Full Settlement Details"}),e.jsxs(bs,{children:[((I=j==null?void 0:j.resignation)==null?void 0:I.resignationId)||(j==null?void 0:j.id)," - ",j==null?void 0:j.dealerName]})]}),j&&e.jsxs("div",{className:"space-y-6",children:[e.jsx(Le,{className:"bg-slate-50 border-none",children:e.jsxs(Fe,{className:"pt-6 grid grid-cols-3 gap-6",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-slate-500 uppercase tracking-wider mb-1",children:"Dealer Code"}),e.jsx("p",{className:"text-lg font-bold",children:((B=j.outlet)==null?void 0:B.code)||"N/A"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-slate-500 uppercase tracking-wider mb-1",children:"Location"}),e.jsx("p",{className:"text-lg font-bold",children:((G=j.outlet)==null?void 0:G.city)||"N/A"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-slate-500 uppercase tracking-wider mb-1",children:"Current Status"}),e.jsx(Ce,{variant:"outline",className:"bg-red-50 text-re-red-hover border-red-200",children:j.status})]})]})}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs(Le,{className:"border-blue-100",children:[e.jsx(Qe,{className:"bg-blue-50/50 pb-2",children:e.jsxs(Je,{className:"text-sm font-bold flex items-center gap-2",children:[e.jsx(dl,{className:"w-4 h-4 text-blue-600"}),"Receivables Check"]})}),e.jsxs(Fe,{className:"pt-4 space-y-3",children:[e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-slate-500",children:"Security Deposit Credits"}),e.jsxs("span",{className:"font-bold text-slate-900",children:["₹",parseFloat(j.totalPayables||0).toLocaleString("en-IN")]})]}),e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-slate-500",children:"Other Payable Credits"}),e.jsx("span",{className:"font-bold text-slate-900",children:"₹0"})]}),e.jsxs("div",{className:"border-t pt-2 flex justify-between font-bold text-blue-700",children:[e.jsx("span",{children:"Total Payables"}),e.jsxs("span",{children:["₹",parseFloat(j.totalPayables||0).toLocaleString("en-IN")]})]})]})]}),e.jsxs(Le,{className:"border-red-100 shadow-sm",children:[e.jsx(Qe,{className:"bg-red-50/30 pb-2 border-b border-red-50",children:e.jsxs(Je,{className:"text-sm font-bold flex items-center gap-2 text-red-700",children:[e.jsx(Yo,{className:"w-4 h-4"}),"Receivables Check"]})}),e.jsxs(Fe,{className:"pt-4 space-y-3",children:[e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-slate-500",children:"Departmental Dues (Recoverable)"}),e.jsxs("span",{className:"font-bold text-red-600",children:["₹",parseFloat(j.totalReceivables||0).toLocaleString("en-IN")]})]}),e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-slate-500",children:"Outstanding Invoices"}),e.jsx("span",{className:"font-bold text-slate-900",children:"₹0"})]}),e.jsxs("div",{className:"border-t pt-2 flex justify-between font-bold text-red-700",children:[e.jsx("span",{children:"Total Recoveries"}),e.jsxs("span",{children:["₹",parseFloat(j.totalReceivables||0).toLocaleString("en-IN")]})]})]})]})]}),e.jsxs("div",{className:"p-5 bg-slate-900 text-white rounded-xl flex items-center justify-between shadow-lg",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:`p-3 rounded-lg ${parseFloat(j.netAmount||0)>=0?"bg-emerald-500/20":"bg-rose-500/20"}`,children:e.jsx(ka,{className:`w-6 h-6 ${parseFloat(j.netAmount||0)>=0?"text-emerald-400":"text-rose-400"}`})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] text-slate-400 uppercase font-bold tracking-widest mb-1",children:"Final Net Financial Position"}),e.jsxs("div",{className:"flex items-baseline gap-2",children:[e.jsxs("p",{className:`text-3xl font-bold tracking-tight ${parseFloat(j.netAmount||0)>=0?"text-emerald-400":"text-rose-400"}`,children:["₹",Math.abs(parseFloat(j.netAmount||0)).toLocaleString("en-IN")]}),e.jsxs("span",{className:"text-xs font-medium text-slate-400",children:["(",parseFloat(j.netAmount||0)>=0?"Payable to Dealer":"Recoverable from Dealer",")"]})]})]})]}),e.jsx(se,{className:"bg-blue-600 hover:bg-blue-500 px-6 font-bold shadow-md transition-all active:scale-95",children:"Generate PDF Summary"})]})]}),e.jsx(bn,{children:e.jsx(se,{onClick:()=>w(!1),children:"Close Overview"})})]})})]})}const Jl={getDashboardData:async()=>{var t;try{const s=await Ee.getDealerDashboard();return((t=s.data)==null?void 0:t.data)||s.data}catch(s){throw console.error("Get dealer dashboard error:",s),s}},getConstitutionalChanges:async()=>{try{return(await Ee.getConstitutionalChanges()).data}catch(t){throw console.error("Get constitutional changes error:",t),t}},submitConstitutionalChange:async t=>{try{return(await Ee.createConstitutionalChange(t)).data}catch(s){throw console.error("Submit constitutional change error:",s),s}},getRelocationRequests:async()=>{try{return(await Ee.getRelocationRequests()).data}catch(t){throw console.error("Get relocation requests error:",t),t}},submitRelocationRequest:async t=>{try{return(await Ee.createRelocationRequest(t)).data}catch(s){throw console.error("Submit relocation request error:",s),s}}};function I7({currentUser:t,onNavigate:s}){var u,N;const[n,r]=g.useState(!0),[a,i]=g.useState(null);if(g.useEffect(()=>{(async()=>{try{const w=await Jl.getDashboardData();i(w)}catch(w){console.error("Failed to fetch dashboard:",w)}finally{r(!1)}})()},[]),n)return e.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px]",children:[e.jsx(ns,{className:"w-10 h-10 text-re-red animate-spin mb-4"}),e.jsx("p",{className:"text-slate-600",children:"Loading your dashboard..."})]});const o=a||{},d=o.profile||{},m=o.stats||{constitutional:0,relocation:0,total:0},f=o.recentRequests||[],p=((u=o.outlets)==null?void 0:u[0])||{},h=[{title:"Constitutional Changes",value:m.constitutional,icon:hl,color:"bg-blue-500",change:"Active Requests",onClick:()=>s("dealer-constitutional")},{title:"Relocation Requests",value:m.relocation,icon:Vr,color:"bg-re-red",change:"Active Requests",onClick:()=>s("dealer-relocation")},{title:"My Outlets",value:((N=o.outlets)==null?void 0:N.length)||0,icon:QI,color:"bg-purple-500",change:"Registered",onClick:()=>{}},{title:"Total Requests",value:m.total,icon:dl,color:"bg-green-500",change:"All time",onClick:()=>{}}],x=[{title:"Constitutional Change",description:"Request change in business structure",icon:hl,color:"bg-blue-50 hover:bg-blue-100 border-blue-200",textColor:"text-blue-700",onClick:()=>s("dealer-constitutional")},{title:"Request Relocation",description:"Move dealership to new location",icon:Vr,color:"bg-red-50 hover:bg-red-100 border-red-200",textColor:"text-re-red",onClick:()=>s("dealer-relocation")}];return e.jsxs("div",{className:"space-y-6",children:[e.jsx("div",{className:"rounded-lg bg-gradient-to-r from-re-red to-re-red-hover p-6 text-white",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsxs("h1",{className:"text-white mb-2",children:["Welcome back, ",d.name||(t==null?void 0:t.name),"!"]}),e.jsxs("p",{className:"text-white/90",children:["Dealer Code: ",d.dealerCode," • ",d.businessName]}),e.jsxs("p",{className:"text-white/90 text-sm mt-1",children:[p.name," • ",p.location]})]}),e.jsxs("div",{className:"text-right",children:[e.jsx("div",{className:"text-white",children:"Active Dealership"}),e.jsxs(Ce,{className:"bg-green-500 text-white border-0 mt-2",children:[e.jsx(un,{className:"w-3 h-3 mr-1"}),"Operational"]})]})]})}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4",children:h.map((v,w)=>{const j=v.icon;return e.jsxs(Le,{className:"cursor-pointer hover:shadow-lg transition-shadow",onClick:v.onClick,children:[e.jsxs(Qe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(Je,{className:"text-sm",children:v.title}),e.jsx("div",{className:`${v.color} p-2 rounded-lg`,children:e.jsx(j,{className:"h-4 w-4 text-white"})})]}),e.jsxs(Fe,{children:[e.jsx("div",{className:"text-slate-900 text-2xl",children:v.value}),e.jsx("p",{className:"text-xs text-slate-600 mt-1",children:v.change})]})]},w)})}),e.jsxs(Le,{children:[e.jsxs(Qe,{children:[e.jsx(Je,{children:"Quick Actions"}),e.jsx(Xt,{children:"Submit new requests and manage your dealership"})]}),e.jsx(Fe,{children:e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:x.map((v,w)=>{const j=v.icon;return e.jsx("button",{onClick:v.onClick,className:`${v.color} border-2 rounded-lg p-4 text-left transition-all`,children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:`${v.textColor} p-2 bg-white rounded-lg`,children:e.jsx(j,{className:"w-5 h-5"})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h3",{className:`${v.textColor} mb-1`,children:v.title}),e.jsx("p",{className:"text-slate-600 text-sm",children:v.description})]})]})},w)})})})]}),e.jsxs(Le,{children:[e.jsxs(Qe,{children:[e.jsx(Je,{children:"My Recent Requests"}),e.jsx(Xt,{children:"Track the status of your submitted requests"})]}),e.jsx(Fe,{children:e.jsx("div",{className:"space-y-3",children:f.map(v=>e.jsxs("div",{className:"flex items-center justify-between p-4 border border-slate-200 rounded-lg hover:bg-slate-50 transition-colors",children:[e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("span",{className:"text-slate-900",children:v.id}),e.jsx(Ce,{variant:"outline",className:"text-xs",children:v.type})]}),e.jsx("p",{className:"text-slate-600 text-sm",children:v.title}),e.jsxs("p",{className:"text-slate-500 text-xs mt-1",children:["Submitted on ",v.date]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(Ce,{className:`border ${v.color}`,children:v.status}),e.jsx(se,{variant:"ghost",size:"sm",children:"View"})]})]},v.id))})})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs(Le,{children:[e.jsx(Qe,{children:e.jsxs(Je,{className:"flex items-center gap-2",children:[e.jsx(vn,{className:"w-5 h-5 text-re-red"}),"Important Reminders"]})}),e.jsx(Fe,{children:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(sn,{className:"w-4 h-4 text-re-red mt-0.5"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-900 text-sm",children:"GST Filing Due"}),e.jsx("p",{className:"text-slate-600 text-xs",children:"Due by Jan 15, 2026"})]})]}),e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(sn,{className:"w-4 h-4 text-re-red mt-0.5"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-900 text-sm",children:"Inventory Audit Scheduled"}),e.jsx("p",{className:"text-slate-600 text-xs",children:"Jan 20, 2026"})]})]}),e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(un,{className:"w-4 h-4 text-green-600 mt-0.5"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-900 text-sm",children:"Compliance Report Submitted"}),e.jsx("p",{className:"text-slate-600 text-xs",children:"Jan 2, 2026"})]})]})]})})]}),e.jsxs(Le,{children:[e.jsx(Qe,{children:e.jsxs(Je,{className:"flex items-center gap-2",children:[e.jsx(Ra,{className:"w-5 h-5 text-blue-600"}),"Support & Help"]})}),e.jsx(Fe,{children:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-900 text-sm mb-1",children:"Regional Manager"}),e.jsx("p",{className:"text-slate-600 text-xs",children:"Rajesh Kumar - +91 98765 43210"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-900 text-sm mb-1",children:"Zonal Business Head"}),e.jsx("p",{className:"text-slate-600 text-xs",children:"Priya Sharma - +91 98765 43211"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-900 text-sm mb-1",children:"Support Email"}),e.jsx("p",{className:"text-slate-600 text-xs",children:"dealer.support@royalenfield.com"})]}),e.jsx(se,{variant:"outline",className:"w-full mt-2",children:"Contact Support"})]})})]})]})]})}function M7({id:t,onBack:s}){const n=["PAN Card","GST Certificate","Aadhaar Card","Security Deposit Receipt","First Fill Receipt","Partnership Deed","LLP Agreement","Certificate of Incorporation","MOA","AOA","Firm Registration","Rental Agreement","Property Documents","Nodal Agreement","Cancelled Check","LOI Acknowledgement","Architecture Blueprint","Site Plan","Other"],[r,a]=g.useState(null),[i,o]=g.useState(!0),[d,m]=g.useState([]),[f,p]=g.useState(""),[h,x]=g.useState(null),[u,N]=g.useState(!1),[v,w]=g.useState(!1),j={panNumber:"",gstNumber:"",registeredAddress:"",bankName:"",accountNumber:"",ifscCode:"",branchName:"",accountHolderName:""},[b,C]=g.useState(j),[S,R]=g.useState(j),_=JSON.stringify(b)!==JSON.stringify(S),A=new Set(d.map(L=>String(L.documentType||"").trim().toLowerCase())),E=f?A.has(f.toLowerCase()):!1;g.useEffect(()=>{q()},[t]);const q=async()=>{var L,$;o(!0);try{const[Y,Z]=await Promise.all([Ee.getApplicationById(t),Ee.getDocuments(t)]);if((L=Y.data)!=null&&L.success){const W=Y.data.data,U={panNumber:W.panNumber||"",gstNumber:W.gstNumber||"",registeredAddress:W.registeredAddress||W.address||"",bankName:W.bankName||"",accountNumber:W.accountNumber||"",ifscCode:W.ifscCode||"",branchName:W.branchName||"",accountHolderName:W.accountHolderName||W.applicantName||""};a(W),C(U),R(U)}(($=Z.data)!=null&&$.success||Z.ok)&&m(Z.data.data||[])}catch(Y){console.error("Failed to fetch details:",Y),te.error("Failed to load application details")}finally{o(!1)}},O=async()=>{var L;w(!0);try{console.log("Saving business details for:",t,b);const $=await Ee.updateApplication(t,b);if($.ok)te.success("Business details saved successfully"),await q();else{const Y=((L=$.data)==null?void 0:L.message)||"Failed to update business details";te.error(Y),console.error("Update failed:",$)}}catch($){console.error("Save details fatal error:",$),te.error($.message||"A network error occurred while saving")}finally{w(!1)}},D=L=>{L.target.files&&L.target.files[0]&&x(L.target.files[0])},P=async()=>{var $,Y,Z;if(!h||!f){te.error("Please select a document type and file");return}const L=new FormData;L.append("file",h),L.append("documentType",f),N(!0);try{const W=await Ee.uploadDocument(t,L);if(($=W.data)!=null&&$.success||W.ok){te.success("Document uploaded successfully"),x(null),p("");const U=document.getElementById("file-upload");U&&(U.value="");const M=await Ee.getDocuments(t);((Y=M.data)!=null&&Y.success||M.ok)&&m(M.data.data||[])}else te.error(((Z=W.data)==null?void 0:Z.message)||"Upload failed")}catch(W){console.error("Upload error:",W),te.error("Upload failed")}finally{N(!1)}};return i?e.jsx("div",{className:"flex items-center justify-center py-20",children:e.jsx(xr,{className:"w-8 h-8 animate-spin text-re-red"})}):r?e.jsxs("div",{className:"space-y-6",children:[e.jsx("div",{className:"flex items-center justify-between mb-4",children:e.jsxs("div",{className:"flex items-center",children:[e.jsx("button",{onClick:s,className:"mr-3 p-1.5 rounded-full hover:bg-slate-200 text-slate-600 transition-colors","data-testid":"onboarding-prospective-details-back-btn",children:e.jsx(lo,{className:"w-5 h-5"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-slate-900 text-2xl font-bold mb-1",children:"Application Details"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("p",{className:"text-slate-600 font-medium","data-testid":"onboarding-prospective-details-app-id",children:r.applicationId||"Loading..."}),r.districtId?e.jsx("span",{className:"text-[10px] bg-green-100 text-green-700 font-bold px-1.5 py-0.5 rounded uppercase tracking-wider","data-testid":"onboarding-prospective-details-type-badge",children:"Opportunity"}):e.jsx("span",{className:"text-[10px] bg-blue-100 text-blue-700 font-bold px-1.5 py-0.5 rounded uppercase tracking-wider","data-testid":"onboarding-prospective-details-type-badge",children:"Future Reference"})]})]})]})}),e.jsxs("div",{className:"animate-in fade-in duration-500 space-y-6",children:[e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 shadow-sm p-6","data-testid":"onboarding-prospective-details-summary-card",children:[e.jsx("div",{className:"mb-4 border-b pb-2",children:e.jsxs("h4",{className:"text-lg font-semibold text-slate-900 flex items-center gap-2",children:[e.jsx(_a,{className:"w-5 h-5 text-re-red"})," Application Summary"]})}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-start gap-3","data-testid":"onboarding-prospective-details-applicant-info",children:[e.jsx("div",{className:"p-2 bg-blue-50 rounded-lg",children:e.jsx(Lr,{className:"w-4 h-4 text-blue-600"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] text-slate-500 uppercase font-bold",children:"Applicant"}),e.jsx("p",{className:"text-sm font-semibold text-slate-900","data-testid":"onboarding-prospective-details-name",children:r.applicantName}),e.jsxs("p",{className:"text-xs text-slate-600",children:[r.email," | ",r.phone]})]})]}),e.jsxs("div",{className:"flex items-start gap-3","data-testid":"onboarding-prospective-details-location-info",children:[e.jsx("div",{className:"p-2 bg-red-50 rounded-lg",children:e.jsx(Vr,{className:"w-4 h-4 text-re-red"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] text-slate-500 uppercase font-bold",children:"Proposed Location"}),e.jsxs("p",{className:"text-sm font-semibold text-slate-900",children:[r.city,", ",r.state]}),e.jsx("p",{className:"text-xs text-slate-600",children:r.preferredLocation||"Standard Area"})]})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-start gap-3","data-testid":"onboarding-prospective-details-concept-info",children:[e.jsx("div",{className:"p-2 bg-green-50 rounded-lg",children:e.jsx(id,{className:"w-4 h-4 text-green-600"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] text-slate-500 uppercase font-bold",children:"Business Concept"}),e.jsxs("p",{className:"text-sm font-semibold text-slate-900",children:[r.businessType," - ",r.constitutionType]}),e.jsxs("p",{className:"text-xs text-slate-600",children:["Investment: ",r.investmentCapacity]})]})]}),e.jsxs("div",{className:"flex items-start gap-3","data-testid":"onboarding-prospective-details-date-info",children:[e.jsx("div",{className:"p-2 bg-slate-50 rounded-lg",children:e.jsx(vn,{className:"w-4 h-4 text-slate-600"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] text-slate-500 uppercase font-bold",children:"Applied On"}),e.jsx("p",{className:"text-sm font-semibold text-slate-900",children:r.createdAt?new Date(r.createdAt).toLocaleDateString("en-IN",{day:"numeric",month:"long",year:"numeric"}):"-"})]})]})]})]})]}),e.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:e.jsxs("div",{className:"lg:col-span-3 space-y-6",children:[e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 shadow-sm overflow-hidden","data-testid":"onboarding-prospective-details-statutory-card",children:[e.jsxs("div",{className:"p-4 bg-slate-900 text-white flex justify-between items-center",children:[e.jsxs("h4",{className:"flex items-center gap-2 text-sm font-bold uppercase tracking-widest",children:[e.jsx(Wu,{className:"w-4 h-4 text-re-red"})," Statutory & Bank Details"]}),e.jsxs("button",{onClick:O,disabled:v,className:`text-xs text-white px-3 py-1 rounded font-bold transition-all flex items-center gap-1 disabled:opacity-50 ${_?"bg-emerald-600 hover:bg-emerald-700 ring-2 ring-emerald-300 animate-pulse":"bg-re-red hover:bg-re-red-hover"}`,"data-testid":"onboarding-prospective-details-save-statutory-btn",children:[v?e.jsx(xr,{className:"w-3 h-3 animate-spin"}):e.jsx(Zn,{className:"w-3 h-3"}),"Save Business Info"]})]}),e.jsx("div",{className:"p-6",children:e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-x-6 gap-y-4",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{className:"text-[10px] font-bold text-slate-500 uppercase",children:"Registered Business Name"}),e.jsx("input",{type:"text",className:"w-full rounded-md border border-slate-200 bg-white px-3 py-2 text-sm focus:ring-2 focus:ring-re-red outline-none transition-all",value:b.accountHolderName,onChange:L=>C({...b,accountHolderName:L.target.value}),placeholder:"As per legal documents","data-testid":"onboarding-prospective-details-input-biz-name"})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{className:"text-[10px] font-bold text-slate-500 uppercase",children:"Permanent Account Number (PAN)"}),e.jsx("input",{type:"text",className:"w-full rounded-md border border-slate-200 bg-white px-3 py-2 text-sm focus:ring-2 focus:ring-re-red outline-none transition-all uppercase",value:b.panNumber,onChange:L=>C({...b,panNumber:L.target.value.toUpperCase()}),placeholder:"ABCDE1234F",maxLength:10,"data-testid":"onboarding-prospective-details-input-pan"})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{className:"text-[10px] font-bold text-slate-500 uppercase",children:"GST Identification Number (GSTIN)"}),e.jsx("input",{type:"text",className:"w-full rounded-md border border-slate-200 bg-white px-3 py-2 text-sm focus:ring-2 focus:ring-re-red outline-none transition-all uppercase",value:b.gstNumber,onChange:L=>C({...b,gstNumber:L.target.value.toUpperCase()}),placeholder:"27ABCDE1234F1Z5",maxLength:15,"data-testid":"onboarding-prospective-details-input-gst"})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{className:"text-[10px] font-bold text-slate-500 uppercase",children:"Registered Office Address"}),e.jsx("textarea",{rows:1,className:"w-full rounded-md border border-slate-200 bg-white px-3 py-2 text-sm focus:ring-2 focus:ring-re-red outline-none transition-all",value:b.registeredAddress,onChange:L=>C({...b,registeredAddress:L.target.value}),placeholder:"Full legal address","data-testid":"onboarding-prospective-details-input-address"})]}),e.jsx("div",{className:"md:col-span-2 border-t pt-2 mt-2",children:e.jsxs("h5",{className:"text-xs font-black text-slate-900 uppercase flex items-center gap-2 mb-3",children:[e.jsx(dk,{className:"w-3.5 h-3.5 text-blue-600"})," Primary Bank Information"]})}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{className:"text-[10px] font-bold text-slate-500 uppercase",children:"Bank Name"}),e.jsx("input",{type:"text",className:"w-full rounded-md border border-slate-200 bg-white px-3 py-2 text-sm focus:ring-2 focus:ring-re-red outline-none transition-all",value:b.bankName,onChange:L=>C({...b,bankName:L.target.value}),placeholder:"e.g. HDFC Bank","data-testid":"onboarding-prospective-details-input-bank"})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{className:"text-[10px] font-bold text-slate-500 uppercase",children:"Account Number"}),e.jsx("input",{type:"text",className:"w-full rounded-md border border-slate-200 bg-white px-3 py-2 text-sm focus:ring-2 focus:ring-re-red outline-none transition-all",value:b.accountNumber,onChange:L=>C({...b,accountNumber:L.target.value}),placeholder:"Bank account number","data-testid":"onboarding-prospective-details-input-acc-num"})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{className:"text-[10px] font-bold text-slate-500 uppercase",children:"IFSC Code"}),e.jsx("input",{type:"text",className:"w-full rounded-md border border-slate-200 bg-white px-3 py-2 text-sm focus:ring-2 focus:ring-re-red outline-none transition-all uppercase",value:b.ifscCode,onChange:L=>C({...b,ifscCode:L.target.value.toUpperCase()}),placeholder:"HDFC0001234",maxLength:11,"data-testid":"onboarding-prospective-details-input-ifsc"})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{className:"text-[10px] font-bold text-slate-500 uppercase",children:"Branch Name"}),e.jsx("input",{type:"text",className:"w-full rounded-md border border-slate-200 bg-white px-3 py-2 text-sm focus:ring-2 focus:ring-re-red outline-none transition-all",value:b.branchName,onChange:L=>C({...b,branchName:L.target.value}),placeholder:"e.g. South Mumbai","data-testid":"onboarding-prospective-details-input-branch"})]})]})})]}),e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 shadow-sm overflow-hidden","data-testid":"onboarding-prospective-details-upload-card",children:[e.jsx("div",{className:"p-4 border-b border-slate-200 bg-slate-50 flex justify-between items-center",children:e.jsxs("h4",{className:"flex items-center gap-2 text-sm font-bold uppercase tracking-widest text-slate-900",children:[e.jsx(or,{className:"w-4 h-4 text-re-red"})," Required Documents"]})}),e.jsxs("div",{className:"p-6 space-y-6",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 p-4 bg-slate-50 rounded-lg border border-slate-100",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("label",{className:"text-[10px] font-bold text-slate-500 uppercase",children:"Document Category"}),f&&e.jsx("span",{className:"rounded-full bg-red-50 px-2 py-0.5 text-[10px] font-bold text-re-red",children:E?"Already uploaded":"Pending upload"})]}),e.jsxs("div",{className:"relative",children:[e.jsx(Zn,{className:`pointer-events-none absolute left-3 top-1/2 z-10 h-4 w-4 -translate-y-1/2 ${E?"text-green-600":"text-slate-300"}`}),e.jsxs(Dt,{value:f,onValueChange:p,disabled:u,children:[e.jsx(Et,{className:"h-12 rounded-xl border-slate-200 bg-gradient-to-r from-white to-slate-50 pl-10 pr-3 text-sm font-medium text-slate-700 shadow-sm focus:border-re-red/40 focus:ring-2 focus:ring-re-red","data-testid":"onboarding-prospective-details-doc-type-select",children:e.jsx(Rt,{placeholder:"Choose document type"})}),e.jsx(_t,{className:"rounded-xl border-slate-200 shadow-lg","data-testid":"onboarding-prospective-details-doc-type-content",children:n.map(L=>{const $=A.has(L.toLowerCase());return e.jsxs(kE,{value:L,textValue:L,className:Nt("relative flex w-full cursor-default select-none items-center gap-2 rounded-lg py-2 pl-2 pr-8 text-sm text-slate-700 outline-none","focus:bg-red-50 focus:text-slate-900 data-[disabled]:pointer-events-none data-[disabled]:opacity-50"),"data-testid":`onboarding-prospective-details-doc-type-item-${L.replace(/\s+/g,"-").toLowerCase()}`,children:[e.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:e.jsx(RE,{children:e.jsx(Hn,{className:"size-4"})})}),e.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[e.jsx(Zn,{className:Nt("h-4 w-4 shrink-0",$?"text-green-600":"text-slate-300"),"aria-hidden":!0}),e.jsx(DE,{children:L})]})]},L)})})]})]})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("label",{className:"text-[10px] font-bold text-slate-500 uppercase",children:"Select File"}),e.jsx("input",{type:"file",id:"file-upload",className:"w-full text-xs text-slate-600 file:mr-4 file:py-1 file:px-4 file:rounded-full file:border-0 file:text-xs file:font-semibold file:bg-red-50 file:text-re-red hover:file:bg-red-100",onChange:D,disabled:u,"data-testid":"onboarding-prospective-details-file-input"})]}),e.jsx("div",{className:"md:col-span-2 flex justify-end",children:e.jsxs("button",{onClick:P,disabled:!h||!f||u,className:"bg-re-red text-white px-5 py-2 rounded-md hover:bg-re-red-hover disabled:opacity-50 text-xs font-bold transition-all shadow-sm flex items-center gap-2","data-testid":"onboarding-prospective-details-upload-btn",children:[u?e.jsx(xr,{className:"w-3.5 h-3.5 animate-spin"}):e.jsx(or,{className:"w-3.5 h-3.5"}),"Upload Document"]})})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-slate-900 border-b pb-1",children:[e.jsx(af,{className:"w-4 h-4 text-blue-600"}),e.jsxs("h3",{className:"text-xs font-black uppercase tracking-tighter",children:["Uploaded Library (",d.length,")"]})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3","data-testid":"onboarding-prospective-details-doc-library",children:d.length>0?d.map((L,$)=>e.jsxs("div",{className:"flex justify-between items-center p-3 border border-slate-100 rounded-xl bg-slate-50 group hover:border-red-200 transition-all","data-testid":`onboarding-prospective-details-doc-item-${$}`,children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-8 h-8 rounded bg-white flex items-center justify-center border border-slate-200 group-hover:bg-blue-50",children:e.jsx(af,{className:"w-4 h-4 text-slate-400 group-hover:text-blue-600"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[11px] font-bold text-slate-900","data-testid":`onboarding-prospective-details-doc-type-${$}`,children:L.documentType}),e.jsx("p",{className:"text-[10px] text-slate-400 truncate w-32",children:L.fileName})]})]}),e.jsx("span",{className:`text-[9px] px-2 py-0.5 rounded-full font-black uppercase tracking-tighter ${L.status==="Approved"?"bg-green-100 text-green-700":"bg-red-50 text-re-red"}`,"data-testid":`onboarding-prospective-details-doc-status-${$}`,children:L.status||"Pending"})]},L.id)):e.jsxs("div",{className:"col-span-2 py-8 text-center bg-slate-50 rounded-xl border border-dashed border-slate-200","data-testid":"onboarding-prospective-details-doc-empty",children:[e.jsx(_a,{className:"w-6 h-6 text-slate-300 mx-auto mb-2"}),e.jsx("p",{className:"text-xs text-slate-500 font-medium",children:"No documents in your library yet"})]})})]})]})]})]})})]})]}):e.jsxs("div",{className:"bg-white rounded-xl border border-slate-200 p-8 text-center",children:[e.jsx("p",{className:"text-slate-600 mb-4",children:"Application details not found."}),e.jsx("button",{onClick:s,className:"bg-re-red text-white px-4 py-2 rounded-md hover:bg-re-red-hover",children:"Go Back"})]})}function F7(){var f;const t=Lu(),s=tr(),n=yl(),{user:r}=In(p=>p.auth),[a,i]=g.useState(!1),[o,d]=g.useState("applicant"),m=()=>{t(CA()),te.info("Logged out successfully"),s("/")};return e.jsxs("div",{className:"flex h-screen bg-slate-50",children:[e.jsxs("div",{className:`bg-slate-900 text-white h-screen flex flex-col transition-all duration-300 ${a?"w-20":"w-64"}`,children:[e.jsx("div",{className:"p-4 border-b border-slate-800",children:a?e.jsxs("div",{className:"flex flex-col items-center gap-3",children:[e.jsx("div",{className:"w-full",children:e.jsx("img",{src:"/assets/images/Re_Logo.png",alt:"Royal Enfield",className:"block h-auto w-full max-h-10 object-contain"})}),e.jsx("button",{onClick:()=>i(!1),className:"p-1 hover:bg-slate-800 rounded transition-colors",title:"Expand sidebar",children:e.jsx(bi,{className:"w-5 h-5"})})]}):e.jsxs("div",{className:"space-y-3",children:[e.jsx("div",{className:"flex justify-end",children:e.jsx("button",{onClick:()=>i(!0),className:"p-1 hover:bg-slate-800 rounded transition-colors",title:"Collapse sidebar",children:e.jsx(lo,{className:"w-5 h-5"})})}),e.jsx("div",{className:"w-full",children:e.jsx("img",{src:"/assets/images/Re_Logo.png",alt:"Royal Enfield",className:"mx-auto block h-auto w-full max-h-14 object-contain"})}),e.jsx("p",{className:"text-center text-[10px] font-bold uppercase tracking-[0.2em] text-slate-400",children:"Applicant Portal"})]})}),e.jsx("nav",{className:"flex-1 p-4 space-y-2",children:e.jsx("div",{children:e.jsxs("button",{onClick:()=>{d("applicant"),s("/prospective-dashboard")},className:`w-full flex items-center gap-3 px-4 py-3 rounded-lg transition-colors ${o==="applicant"?"bg-re-red text-white hover:bg-re-red-hover":"text-slate-300 hover:bg-slate-800 hover:text-white"}`,children:[e.jsx(Ns,{className:"w-5 h-5 flex-shrink-0"}),!a&&e.jsx("span",{className:"flex-1 text-left",children:"My Applications"})]})})}),e.jsxs("div",{className:"p-4 border-t border-slate-800 space-y-2",children:[!a&&e.jsx("div",{className:"px-4 py-2 bg-slate-800 rounded-lg mb-2",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-re-red rounded-full flex items-center justify-center text-white ring-2 ring-white/20",children:e.jsx("span",{className:"font-bold",children:((f=r==null?void 0:r.name)==null?void 0:f.charAt(0))||"A"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"truncate text-sm font-medium",children:(r==null?void 0:r.name)||"Applicant"}),e.jsx("p",{className:"text-slate-400 truncate text-xs",children:(r==null?void 0:r.role)||"Prospective"})]})]})}),e.jsxs("button",{onClick:m,className:`w-full flex items-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all h-9 px-4 py-2 text-slate-300 hover:bg-slate-800 hover:text-white ${a?"justify-center":"justify-start"}`,children:[e.jsx(hk,{className:"w-5 h-5 flex-shrink-0"}),!a&&e.jsx("span",{className:"ml-3",children:"Logout"})]})]})]}),e.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[e.jsx("header",{className:"bg-white border-b border-slate-200 px-6 py-4",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-slate-900 text-xl font-semibold",children:n.pathname.includes("/application/")?"Application details":"Applicant management"}),e.jsx("p",{className:"text-slate-600 text-sm max-w-2xl leading-snug",children:n.pathname.includes("/application/")?"Review and update statutory information and required documents for this application. Progress is coordinated by Royal Enfield after you submit.":"Start or continue your dealership application, upload documents, and use links we email you (for example the questionnaire)."})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("div",{className:"flex items-center gap-3 px-3 py-2 bg-slate-100 rounded-lg",children:[e.jsx("div",{className:"w-8 h-8 bg-re-red rounded-full flex items-center justify-center ring-2 ring-re-red/20",children:e.jsx(Lr,{className:"w-4 h-4 text-white"})}),e.jsxs("div",{className:"text-left",children:[e.jsx("p",{className:"text-slate-900 text-sm font-medium",children:(r==null?void 0:r.name)||"Applicant"}),e.jsx("p",{className:"text-slate-600 text-xs",children:(r==null?void 0:r.role)||"User"})]})]}),e.jsx("button",{className:"p-2 rounded-md hover:bg-slate-100",title:"Refresh",onClick:()=>window.location.reload(),children:e.jsx(xr,{className:"w-4 h-4 text-slate-600"})})]})]})}),e.jsx("main",{className:"flex-1 overflow-y-auto p-6",children:e.jsxs(Xv,{children:[e.jsx(ks,{path:"/",element:e.jsx(B7,{})}),e.jsx(ks,{path:"/application/:id",element:e.jsx($7,{})})]})})]})]})}function B7(){const t=tr(),{user:s}=In(i=>i.auth),[n,r]=g.useState([]);g.useEffect(()=>{s!=null&&s.id&&a()},[s==null?void 0:s.id]);const a=async()=>{var i;try{const o=await Ee.getApplications();(i=o.data)!=null&&i.success&&r(o.data.data)}catch(o){console.error("Failed to fetch applications",o)}};return e.jsx("div",{className:"max-w-7xl mx-auto",children:e.jsxs("div",{className:"space-y-6",children:[e.jsx("div",{className:"flex items-center justify-between mb-8",children:e.jsxs("div",{children:[e.jsx("h1",{className:"text-slate-900 text-3xl font-bold mb-2",children:"My Applications"}),e.jsx("p",{className:"text-slate-500 font-medium",children:"Track and manage your dealership applications"})]})}),n.length===0?e.jsxs("div",{className:"bg-white rounded-2xl border border-slate-200 border-dashed p-12 text-center",children:[e.jsx("div",{className:"w-16 h-16 bg-slate-50 rounded-full flex items-center justify-center mx-auto mb-4",children:e.jsx(Ns,{className:"w-8 h-8 text-slate-400"})}),e.jsx("h3",{className:"text-lg font-semibold text-slate-900 mb-1",children:"No applications found"}),e.jsx("p",{className:"text-slate-500 max-w-sm mx-auto mb-6",children:"You haven't submitted any dealership applications yet."})]}):e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:n.map(i=>e.jsxs("div",{className:"bg-white rounded-2xl border border-slate-200 p-6 shadow-sm hover:shadow-md hover:border-re-red cursor-pointer transition-all group",onClick:()=>t(`/prospective-dashboard/application/${i.id}`),children:[e.jsx("div",{className:"mb-4",children:e.jsx("div",{className:"w-12 h-12 bg-red-50 rounded-xl flex items-center justify-center group-hover:bg-re-red transition-colors",children:e.jsx(Ns,{className:"w-6 h-6 text-re-red group-hover:text-white"})})}),e.jsx("h3",{className:"text-xl font-bold text-slate-900 mb-1 truncate",children:i.applicationId}),e.jsxs("p",{className:"text-slate-500 text-sm mb-4 font-medium",children:[i.city,", ",i.state]}),e.jsx("div",{className:"space-y-4 pt-6 border-t border-slate-100",children:e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-xs text-slate-500 font-medium",children:"Applied"}),e.jsx("span",{className:"text-xs font-bold text-slate-600",children:Yt(i.createdAt)})]})})]},i.id))})]})})}function $7(){const{id:t}=vd(),s=tr();return t?e.jsx("div",{className:"max-w-7xl mx-auto",children:e.jsx(M7,{id:t,onBack:()=>s("/prospective-dashboard")})}):null}function q7(){const t=tr(),[s,n]=g.useState([]),[r,a]=g.useState(!0),[i,o]=g.useState("");g.useEffect(()=>{d()},[]);const d=async()=>{var f;a(!0);try{const p=await Ee.getApplications();(f=p.data)!=null&&f.success&&n(p.data.data)}catch(p){console.error("Failed to fetch FDD applications:",p),te.error("Failed to load assigned applications")}finally{a(!1)}},m=s.filter(f=>{var p;return f.applicationId.toLowerCase().includes(i.toLowerCase())||f.applicantName.toLowerCase().includes(i.toLowerCase())||((p=f.city)==null?void 0:p.toLowerCase().includes(i.toLowerCase()))});return e.jsxs("div",{className:"space-y-6 max-w-7xl mx-auto",children:[e.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-3xl font-bold text-slate-900 tracking-tight",children:"FDD Dashboard"}),e.jsx("p",{className:"text-slate-500",children:"Manage financial due diligence for assigned dealer applications"})]}),e.jsxs("button",{onClick:d,className:"flex items-center gap-2 px-4 py-2 bg-white border border-slate-200 rounded-lg hover:bg-slate-50 transition-colors text-sm font-medium",children:[e.jsx(xr,{className:`w-4 h-4 ${r?"animate-spin":""}`}),"Refresh"]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[e.jsx(Le,{className:"bg-white border-slate-200 shadow-sm",children:e.jsx(Fe,{className:"pt-6",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-semibold text-slate-500 uppercase tracking-wider",children:"Total Assigned"}),e.jsx("h3",{className:"text-2xl font-bold text-slate-900",children:s.length})]}),e.jsx("div",{className:"p-2 bg-slate-100 rounded-lg text-slate-600",children:e.jsx(Ns,{className:"w-5 h-5"})})]})})}),e.jsx(Le,{className:"bg-white border-slate-200 shadow-sm",children:e.jsx(Fe,{className:"pt-6",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-semibold text-slate-500 uppercase tracking-wider",children:"Pending Reports"}),e.jsx("h3",{className:"text-2xl font-bold text-slate-900",children:s.filter(f=>f.currentStage==="FDD"||f.overallStatus==="Active").length})]}),e.jsx("div",{className:"p-2 bg-slate-100 rounded-lg text-slate-600",children:e.jsx(vn,{className:"w-5 h-5"})})]})})}),e.jsx(Le,{className:"bg-white border-slate-200 shadow-sm",children:e.jsx(Fe,{className:"pt-6",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs font-semibold text-slate-500 uppercase tracking-wider",children:"Completed Reports"}),e.jsx("h3",{className:"text-2xl font-bold text-slate-900",children:"0"})]}),e.jsx("div",{className:"p-2 bg-slate-100 rounded-lg text-slate-600",children:e.jsx(Zn,{className:"w-5 h-5"})})]})})})]}),e.jsxs(Le,{className:"shadow-sm border-slate-200 overflow-hidden",children:[e.jsxs(Qe,{className:"bg-white border-b border-slate-100 px-6 py-4 flex flex-row items-center justify-between",children:[e.jsxs(Je,{className:"text-lg font-semibold flex items-center gap-2",children:[e.jsx(Ns,{className:"w-5 h-5 text-blue-600"}),"My Assigned Cases"]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("div",{className:"relative",children:[e.jsx(Ta,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"}),e.jsx("input",{type:"text",placeholder:"Search by ID or Name...",className:"pl-9 pr-4 py-2 bg-slate-50 border-slate-200 rounded-lg text-sm focus:ring-2 focus:ring-blue-500 transition-all outline-none",value:i,onChange:f=>o(f.target.value)})]}),e.jsx("button",{className:"p-2 border border-slate-200 rounded-lg hover:bg-slate-50 transition-colors",children:e.jsx(eb,{className:"w-4 h-4 text-slate-600"})})]})]}),e.jsx(Fe,{className:"p-0",children:r?e.jsxs("div",{className:"flex flex-col items-center justify-center py-20 px-6",children:[e.jsx(xr,{className:"w-10 h-10 animate-spin text-blue-600 mb-4"}),e.jsx("p",{className:"text-slate-500 font-medium",children:"Synchronizing application data..."})]}):m.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-20 px-6 text-center",children:[e.jsx("div",{className:"w-20 h-20 bg-slate-50 rounded-full flex items-center justify-center mb-6",children:e.jsx(sn,{className:"w-10 h-10 text-slate-200"})}),e.jsx("h3",{className:"text-xl font-bold text-slate-900 mb-2",children:"No Applications Found"}),e.jsx("p",{className:"text-slate-500 max-w-md mx-auto",children:"You don't have any applications assigned for Financial Due Diligence at this time."})]}):e.jsx("div",{className:"overflow-x-auto custom-scrollbar-x-slim",children:e.jsxs("table",{className:"w-full text-left border-collapse",children:[e.jsx("thead",{className:"bg-slate-50 border-b border-slate-200",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-6 py-4 text-xs font-bold text-slate-500 uppercase tracking-wider",children:"Application Details"}),e.jsx("th",{className:"px-6 py-4 text-xs font-bold text-slate-500 uppercase tracking-wider",children:"Location"}),e.jsx("th",{className:"px-6 py-4 text-xs font-bold text-slate-500 uppercase tracking-wider",children:"Current Stage"}),e.jsx("th",{className:"px-6 py-4 text-xs font-bold text-slate-500 uppercase tracking-wider text-right",children:"Action"})]})}),e.jsx("tbody",{className:"divide-y divide-slate-100",children:m.map(f=>e.jsxs("tr",{className:"hover:bg-slate-50 transition-colors cursor-pointer group",onClick:()=>t(`/fdd-details/${f.id}`),children:[e.jsx("td",{className:"px-6 py-4",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 bg-blue-100 text-blue-600 rounded-lg flex items-center justify-center font-bold",children:f.applicantName.charAt(0)}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-bold text-slate-900 group-hover:text-blue-600 transition-colors",children:f.applicationId}),e.jsx("p",{className:"text-xs text-slate-500",children:f.applicantName})]})]})}),e.jsx("td",{className:"px-6 py-4",children:e.jsxs("div",{children:[e.jsxs("p",{className:"text-sm font-medium text-slate-700",children:[f.city,", ",f.state]}),e.jsx("p",{className:"text-xs text-slate-400 capitalize",children:f.locationType||"New Market"})]})}),e.jsx("td",{className:"px-6 py-4",children:e.jsx(Ce,{className:`px-3 py-1 rounded-full text-[10px] uppercase font-bold tracking-wider ${f.overallStatus==="Completed"?"bg-green-100 text-green-700":"bg-red-50 text-re-red-hover"}`,children:f.overallStatus==="Active"?"FDD Pending":f.overallStatus})}),e.jsx("td",{className:"px-6 py-4 text-right",children:e.jsx("button",{className:"p-2 text-slate-400 hover:text-blue-600 hover:bg-blue-50 rounded-lg transition-all",children:e.jsx(Ko,{className:"w-5 h-5"})})})]},f.id))})]})})})]})]})}const z7="modulepreload",U7=function(t){return"/"+t},gS={},Qo=function(s,n,r){let a=Promise.resolve();if(n&&n.length>0){let o=function(f){return Promise.all(f.map(p=>Promise.resolve(p).then(h=>({status:"fulfilled",value:h}),h=>({status:"rejected",reason:h}))))};document.getElementsByTagName("link");const d=document.querySelector("meta[property=csp-nonce]"),m=(d==null?void 0:d.nonce)||(d==null?void 0:d.getAttribute("nonce"));a=o(n.map(f=>{if(f=U7(f),f in gS)return;gS[f]=!0;const p=f.endsWith(".css"),h=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${h}`))return;const x=document.createElement("link");if(x.rel=p?"stylesheet":z7,p||(x.as="script"),x.crossOrigin="",x.href=f,m&&x.setAttribute("nonce",m),document.head.appendChild(x),p)return new Promise((u,N)=>{x.addEventListener("load",u),x.addEventListener("error",()=>N(new Error(`Unable to preload CSS for ${f}`)))})}))}function i(o){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=o,window.dispatchEvent(d),!d.defaultPrevented)throw o}return a.then(o=>{for(const d of o||[])d.status==="rejected"&&i(d.reason);return s().catch(i)})};function V7(t,s=[]){let n=[];function r(i,o){const d=g.createContext(o);d.displayName=i+"Context";const m=n.length;n=[...n,o];const f=h=>{var j;const{scope:x,children:u,...N}=h,v=((j=x==null?void 0:x[t])==null?void 0:j[m])||d,w=g.useMemo(()=>N,Object.values(N));return e.jsx(v.Provider,{value:w,children:u})};f.displayName=i+"Provider";function p(h,x){var v;const u=((v=x==null?void 0:x[t])==null?void 0:v[m])||d,N=g.useContext(u);if(N)return N;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${i}\``)}return[f,p]}const a=()=>{const i=n.map(o=>g.createContext(o));return function(d){const m=(d==null?void 0:d[t])||i;return g.useMemo(()=>({[`__scope${t}`]:{...d,[t]:m}}),[d,m])}};return a.scopeName=t,[r,H7(a,...s)]}function H7(...t){const s=t[0];if(t.length===1)return s;const n=()=>{const r=t.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(i){const o=r.reduce((d,{useScope:m,scopeName:f})=>{const h=m(i)[`__scope${f}`];return{...d,...h}},{});return g.useMemo(()=>({[`__scope${s.scopeName}`]:o}),[o])}};return n.scopeName=s.scopeName,n}var W7=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Hb=W7.reduce((t,s)=>{const n=Hu(`Primitive.${s}`),r=g.forwardRef((a,i)=>{const{asChild:o,...d}=a,m=o?n:s;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),e.jsx(m,{...d,ref:i})});return r.displayName=`Primitive.${s}`,{...t,[s]:r}},{}),Ig={exports:{}},Mg={};/** - * @license React - * use-sync-external-store-shim.production.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var vS;function G7(){if(vS)return Mg;vS=1;var t=pd();function s(h,x){return h===x&&(h!==0||1/h===1/x)||h!==h&&x!==x}var n=typeof Object.is=="function"?Object.is:s,r=t.useState,a=t.useEffect,i=t.useLayoutEffect,o=t.useDebugValue;function d(h,x){var u=x(),N=r({inst:{value:u,getSnapshot:x}}),v=N[0].inst,w=N[1];return i(function(){v.value=u,v.getSnapshot=x,m(v)&&w({inst:v})},[h,u,x]),a(function(){return m(v)&&w({inst:v}),h(function(){m(v)&&w({inst:v})})},[h]),o(u),u}function m(h){var x=h.getSnapshot;h=h.value;try{var u=x();return!n(h,u)}catch{return!0}}function f(h,x){return x()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:d;return Mg.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:p,Mg}var yS;function K7(){return yS||(yS=1,Ig.exports=G7()),Ig.exports}var Y7=K7();function Z7(){return Y7.useSyncExternalStore(Q7,()=>!0,()=>!1)}function Q7(){return()=>{}}var Wb="Avatar",[X7]=V7(Wb),[J7,_E]=X7(Wb),TE=g.forwardRef((t,s)=>{const{__scopeAvatar:n,...r}=t,[a,i]=g.useState("idle");return e.jsx(J7,{scope:n,imageLoadingStatus:a,onImageLoadingStatusChange:i,children:e.jsx(Hb.span,{...r,ref:s})})});TE.displayName=Wb;var PE="AvatarImage",eq=g.forwardRef((t,s)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:a=()=>{},...i}=t,o=_E(PE,n),d=tq(r,i),m=Sr(f=>{a(f),o.onImageLoadingStatusChange(f)});return cr(()=>{d!=="idle"&&m(d)},[d,m]),d==="loaded"?e.jsx(Hb.img,{...i,ref:s,src:r}):null});eq.displayName=PE;var OE="AvatarFallback",LE=g.forwardRef((t,s)=>{const{__scopeAvatar:n,delayMs:r,...a}=t,i=_E(OE,n),[o,d]=g.useState(r===void 0);return g.useEffect(()=>{if(r!==void 0){const m=window.setTimeout(()=>d(!0),r);return()=>window.clearTimeout(m)}},[r]),o&&i.imageLoadingStatus!=="loaded"?e.jsx(Hb.span,{...a,ref:s}):null});LE.displayName=OE;function bS(t,s){return t?s?(t.src!==s&&(t.src=s),t.complete&&t.naturalWidth>0?"loaded":"loading"):"error":"idle"}function tq(t,{referrerPolicy:s,crossOrigin:n}){const r=Z7(),a=g.useRef(null),i=r?(a.current||(a.current=new window.Image),a.current):null,[o,d]=g.useState(()=>bS(i,t));return cr(()=>{d(bS(i,t))},[i,t]),cr(()=>{const m=h=>()=>{d(h)};if(!i)return;const f=m("loaded"),p=m("error");return i.addEventListener("load",f),i.addEventListener("error",p),s&&(i.referrerPolicy=s),typeof n=="string"&&(i.crossOrigin=n),()=>{i.removeEventListener("load",f),i.removeEventListener("error",p)}},[i,n,s]),o}var sq=TE,nq=LE;function Nm({className:t,...s}){return e.jsx(sq,{"data-slot":"avatar",className:Nt("relative flex size-10 shrink-0 overflow-hidden rounded-full",t),...s})}function wm({className:t,...s}){return e.jsx(nq,{"data-slot":"avatar-fallback",className:Nt("bg-muted flex size-full items-center justify-center rounded-full",t),...s})}const Sm="/collaboration",Cm={getWorknotes:async(t,s)=>(await qe.get(`${Sm}/worknotes`,{requestId:t,requestType:s})).data,addWorknote:async t=>(await qe.post(`${Sm}/worknotes`,t)).data,uploadAttachment:async(t,s,n)=>{const r=new FormData;return r.append("file",t),s&&r.append("requestId",s),n&&r.append("requestType",n),(await qe.post(`${Sm}/upload`,r,{headers:{"Content-Type":"multipart/form-data"}})).data},revokeParticipant:async(t,s)=>(await qe.delete(`${Sm}/participants/${t}`,{data:{reason:s}})).data},au=t=>[...t].sort((s,n)=>new Date(s.createdAt).getTime()-new Date(n.createdAt).getTime()),Fg=t=>{var s,n,r,a,i;return{name:((s=t==null?void 0:t.author)==null?void 0:s.name)||((n=t==null?void 0:t.author)==null?void 0:n.fullName)||"System",email:((r=t==null?void 0:t.author)==null?void 0:r.email)||"",role:String(((a=t==null?void 0:t.author)==null?void 0:a.role)||((i=t==null?void 0:t.author)==null?void 0:i.roleCode)||"")}},rq=new Set(["internal","workflow","system","audit","status"]),aq=t=>rq.has(String(t.noteType||"").toLowerCase()),iq=t=>{const s=String(t.noteType||"").toLowerCase();return s==="workflow"?"Workflow activity":s==="internal"?"Review / approval":s==="system"?"System":s==="audit"?"Audit":s==="status"?"Status update":"Activity"},lq=t=>{const s=String(t.noteType||"").toLowerCase();return s==="internal"?"APPROVAL":s==="workflow"?"WORKFLOW":s==="system"?"SYSTEM":s==="audit"?"AUDIT":s==="status"?"STATUS":"ACTIVITY"},jS=t=>t?new Date(t).toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"}):"",Vc="https://dealeronboarding-uat.royalenfield.com/api".replace("/api","")||"http://localhost:5000";function IE(t){var Ks,Qs,Xs,$s,Q;const{user:s}=In(oe=>oe.auth),{id:n,type:r}=vd(),a=yl(),i=tr(),o=t.requestId||n||"",d=t.requestType||r||((Ks=a.state)==null?void 0:Ks.requestType)||"application",m=t.mode||((Qs=a.state)==null?void 0:Qs.mode)||"page",[f,p]=g.useState(t.applicationName||((Xs=a.state)==null?void 0:Xs.applicationName)||"Application"),[h,x]=g.useState(t.registrationNumber||(($s=a.state)==null?void 0:$s.registrationNumber)||""),u=t.onBack||(()=>i(-1)),N=t.participants||((Q=a.state)==null?void 0:Q.participants)||[],[v,w]=g.useState(N),[j,b]=g.useState([]),[C,S]=g.useState(""),[R,_]=g.useState(!1),[A,E]=g.useState(""),[q,O]=g.useState(0),[D,P]=g.useState(!0),[L,$]=g.useState(!1),[Y,Z]=g.useState([]),[W,U]=g.useState(!1),[M,z]=g.useState(!0),[T,I]=g.useState(""),[B,G]=g.useState(""),[K,H]=g.useState(null),[X,J]=g.useState(""),[ae,le]=g.useState(!1),{socket:xe}=QD(),ce=g.useRef(null),ve=g.useRef(null),[Pe,et]=g.useState(null),kt=(oe,we)=>oe.startsWith("image/")&&we?e.jsx("img",{src:`${Vc}/${we.replace(/\\/g,"/")}`,className:"w-full h-full object-cover rounded",alt:"Thumbnail"}):oe.startsWith("image/")?e.jsx(k1,{className:"w-5 h-5 text-blue-500"}):oe==="application/pdf"?e.jsx(Ns,{className:"w-5 h-5 text-red-500"}):e.jsx(af,{className:"w-5 h-5 text-slate-500"}),vt=["😊","😂","🤣","❤️","👍","🙏","🔥","✨","😍","🥰","😎","🤔","😅","🙌","👏","🎉","✅","❌","📌","📎","📍","💡","🔔","📢","⭐","🌟","💪","🚀","👀","💯","🌈","☀️","😢","😭","😞","😔","😟","😕","😠","😡","🤬","😤","😲","🙄","🤨","😓","😩","😫","🤐","😴","🤢","🤮","😱","🤡","💀","👻","🤝","👋","✌️","👌","✋","🍎","🍕","☕","💻","📱","⌚","📁","📄","📅","🔒","🔑","🛠️","⚙️","💬","💭","🌊","🍀","✈️","🏠"],ee=oe=>oe.split(" ").map(we=>we[0]).join("").toUpperCase().substring(0,2),ge=oe=>{const we=["bg-green-600","bg-blue-600","bg-purple-600","bg-re-red","bg-pink-600","bg-indigo-600","bg-teal-600"],Oe=oe.length%we.length;return we[Oe]},ye=[],Be=new Set;v.forEach(oe=>{var ke,je,Ve,Ge,nt,Zt,Jt;const we=((ke=oe.user)==null?void 0:ke.id)||oe.userId||"",Oe=oe.id;if(we&&!Be.has(we)){Be.add(we);const lt=((je=oe.user)==null?void 0:je.fullName)||((Ve=oe.user)==null?void 0:Ve.name)||oe.fullName||oe.name||"Unknown User",mt=((Ge=oe.user)==null?void 0:Ge.email)||oe.email||"",Ds=((nt=oe.user)==null?void 0:nt.roleCode)||oe.roleCode||((Zt=oe.user)==null?void 0:Zt.role)||oe.role||"Participant";ye.push({id:we,recordId:Oe,name:lt,email:mt,initials:ee(lt),color:ge(lt),role:Ds,isOnline:!1,revokedAt:(Jt=oe.metadata)==null?void 0:Jt.revokedAt})}});const $e=async()=>{try{P(!0);const oe=await Cm.getWorknotes(o,d);if(oe.success){const we=oe.data.map(Oe=>({id:Oe.id,noteText:Oe.noteText,noteType:Oe.noteType,createdAt:Oe.createdAt,userId:Oe.userId,author:Oe.author?Fg(Oe):{name:"System",email:"",role:"system"},attachments:Oe.attachments||[]}));b(au(we))}}catch(oe){console.error("Fetch notes error:",oe),te.error("Failed to load work notes")}finally{P(!1)}};g.useEffect(()=>{if($e(),xe)return xe.emit("join_room",o),xe.on("new_worknote",oe=>{const we={id:oe.id,noteText:oe.noteText,noteType:oe.noteType,createdAt:oe.createdAt,userId:oe.userId,author:oe.author?Fg(oe):{name:"System",email:"",role:"system"},attachments:oe.attachments||[]};b(Oe=>{if(Oe.some(Ve=>Ve.id===we.id))return Oe;const je=Oe.findIndex(Ve=>{var Ge,nt;return Ve.id.startsWith("temp-")&&Ve.noteText===we.noteText&&((Ge=Ve.author.email)==null?void 0:Ge.toLowerCase())===((nt=we.author.email)==null?void 0:nt.toLowerCase())});if(je!==-1){const Ve=[...Oe];return Ve[je]=we,au(Ve)}return au([...Oe,we])})}),()=>{xe.emit("leave_room",o),xe.off("new_worknote")}},[o,d,xe]),g.useEffect(()=>{if(!o||!d)return;(async()=>{var we,Oe,ke,je,Ve,Ge,nt,Zt,Jt,lt;try{let mt=null;if(d==="application")mt=await hs.getApplicationById(o),mt&&(v.length===0&&mt.participants&&w(mt.participants),(!f||f==="Application")&&p(mt.companyName||"Application"),h||x(mt.registrationNumber||""));else if(d==="termination"){const{API:Ds}=await Qo(async()=>{const{API:Ae}=await Promise.resolve().then(()=>cm);return{API:Ae}},void 0),ss=await Ds.getTerminationById(o);(we=ss.data)!=null&&we.success&&(mt=ss.data.termination,v.length===0&&mt.participants&&w(mt.participants),(!f||f==="Application"||f==="Termination")&&p(((Oe=mt.dealer)==null?void 0:Oe.businessName)||"Termination"),h||x(mt.requestId||""))}else if(d==="constitutional"||d==="constitutional-change"){const{API:Ds}=await Qo(async()=>{const{API:Ae}=await Promise.resolve().then(()=>cm);return{API:Ae}},void 0),ss=await Ds.getConstitutionalChangeById(o);(ke=ss.data)!=null&&ke.success&&(mt=ss.data.request,v.length===0&&mt.participants&&w(mt.participants),(!f||f==="Application"||f==="Constitutional Change")&&p(((je=mt.outlet)==null?void 0:je.name)||"Constitutional Change"),h||x(mt.requestId||""))}else if(d==="resignation"){const{API:Ds}=await Qo(async()=>{const{API:Ae}=await Promise.resolve().then(()=>cm);return{API:Ae}},void 0),ss=await Ds.getResignationById(o);(Ve=ss.data)!=null&&Ve.success&&(mt=ss.data.resignation,v.length===0&&mt.participants&&w(mt.participants),(!f||f==="Application"||f==="Resignation")&&p(((Ge=mt.dealer)==null?void 0:Ge.businessName)||"Resignation"),h||x(mt.resignationId||""))}else if(d==="fnf"){const{API:Ds}=await Qo(async()=>{const{API:Ae}=await Promise.resolve().then(()=>cm);return{API:Ae}},void 0),ss=await Ds.getFnFSettlementById(o);if((nt=ss.data)!=null&&nt.success){mt=ss.data.fnf,v.length===0&&mt.participants&&w(mt.participants||[]);const Ae=((Jt=(Zt=mt.outlet)==null?void 0:Zt.dealer)==null?void 0:Jt.fullName)||((lt=mt.dealer)==null?void 0:lt.fullName)||"F&F Settlement";(!f||f==="Application"||f==="F&F Settlement")&&p(Ae),h||x(mt.settlementId||"")}}}catch(mt){console.error(`Failed to fetch ${d} details:`,mt)}})()},[o,d,v.length,f,h]);const dt=g.useRef(null);g.useEffect(()=>{dt.current&&dt.current.scrollIntoView({behavior:"smooth"})},[j]);const st=oe=>{const we=oe.target.value,Oe=oe.target.selectionStart||0;S(we),O(Oe);const ke=we.substring(0,Oe),je=ke.lastIndexOf("@");if(je!==-1&&je===ke.length-1)_(!0),E("");else if(je!==-1){const Ve=ke.substring(je+1);Ve.includes(" ")?_(!1):(_(!0),E(Ve))}else _(!1)},xt=oe=>{var Ge;const Oe=C.substring(0,q).lastIndexOf("@"),ke=C.substring(q),je=`@${oe.name}`,Ve=C.substring(0,Oe)+je+" "+ke;S(Ve),_(!1),(Ge=ce.current)==null||Ge.focus()},Mt=oe=>{var ke,je;const we=((ke=ce.current)==null?void 0:ke.selectionStart)||C.length,Oe=C.substring(0,we)+oe+C.substring(we);S(Oe),$(!1),(je=ce.current)==null||je.focus()},It=async oe=>{const we=oe.target.files;if(!(!we||we.length===0)){U(!0);try{for(const Oe of Array.from(we)){const ke=await Cm.uploadAttachment(Oe,o,d);ke.success&&Z(je=>[...je,ke.data])}}catch(Oe){console.error("File upload error:",Oe),te.error("Failed to upload attachment")}finally{U(!1),ve.current&&(ve.current.value="")}}},he=oe=>{Z(we=>we.filter(Oe=>Oe.id!==oe))},pt=async()=>{if(!C.trim()&&Y.length===0)return;const oe=C,we=Y;S(""),Z([]);let Oe=oe;const ke=[];ye.forEach(je=>{if(je.id&&je.name){const Ve=je.name.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Ge=new RegExp(`@${Ve}\\b`,"gi");Oe.match(Ge)&&(ke.push(je.id),Oe=Oe.replace(Ge,`@[${je.name}](user:${je.id})`))}});try{const je=`temp-${Date.now()}`,Ve={id:je,noteText:Oe,noteType:"General",createdAt:new Date().toISOString(),userId:s==null?void 0:s.id,author:{name:(s==null?void 0:s.name)||"You",email:(s==null?void 0:s.email)||"",role:(s==null?void 0:s.role)||""},attachments:we};b(nt=>au([...nt,Ve]));const Ge=await Cm.addWorknote({requestId:o,requestType:d,noteText:Oe,noteType:"General",tags:ke,attachmentDocIds:we.map(nt=>nt.id)});if(Ge.success&&Ge.data){const nt=Ge.data,Zt={id:nt.id,noteText:nt.noteText,noteType:nt.noteType,createdAt:nt.createdAt,userId:nt.userId,author:nt.author?Fg(nt):{name:"System",email:"",role:"system"},attachments:nt.attachments||[]};b(Jt=>au(Jt.map(lt=>lt.id===je?Zt:lt)))}}catch(je){console.error("Send message error:",je),te.error("Failed to send message")}},ht=oe=>{if(!["DD Lead","DD Head","NBH","DD Admin","Super Admin"].includes((s==null?void 0:s.roleCode)||"")){te.error("Only authorized roles can revoke participants");return}H(oe),J("")},_e=async()=>{if(K){le(!0);try{const oe=await Cm.revokeParticipant(K.recordId,X);oe.success&&(te.success(oe.message),H(null),w([]))}catch{te.error("Error revoking participant")}finally{le(!1)}}},Vt=oe=>{oe.key==="Enter"&&!oe.shiftKey&&(oe.preventDefault(),pt())},Pt=oe=>{if(!oe)return"";const we=/(@\[[^\]]+\]\([^\)]+\))/g;return oe.split(we).map((ke,je)=>{const Ve=ke.match(/@\[([^\]]+)\]\(([^\)]+)\)/);if(Ve){const Ge=Ve[1];return e.jsxs("span",{className:"text-blue-600 font-medium hover:underline cursor-pointer",children:["@",Ge]},je)}return ke})},_s=B.trim().toLowerCase(),Ys=_s?j.filter(oe=>{var we;return(oe.noteText||"").toLowerCase().includes(_s)||(((we=oe.author)==null?void 0:we.name)||"").toLowerCase().includes(_s)||(oe.noteType||"").toLowerCase().includes(_s)}):j,Bs=ye.filter(oe=>{const we=oe.name.toLowerCase().includes(A.toLowerCase()),Oe=oe.id&&(s==null?void 0:s.id)&&String(oe.id)===String(s.id)||oe.email&&(s==null?void 0:s.email)&&oe.email.toLowerCase()===s.email.toLowerCase();return we&&!Oe});return e.jsxs("div",{className:"h-full flex flex-col bg-slate-50 overflow-hidden",children:[e.jsx("div",{className:"bg-white border-b border-slate-200 px-6 py-4 z-10","data-testid":"onboarding-worknotes-header",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(se,{variant:"ghost",size:"icon",onClick:u,className:"hover:bg-slate-100","data-testid":"onboarding-worknotes-back-btn",children:e.jsx(Jr,{className:"w-5 h-5"})}),e.jsx("div",{className:"w-12 h-12 bg-purple-600 rounded-lg flex items-center justify-center",children:e.jsx(Ga,{className:"w-6 h-6 text-white"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-slate-900","data-testid":"onboarding-worknotes-title",children:"Work Notes"}),e.jsxs("div",{className:"flex items-center gap-2 text-slate-600","data-testid":"onboarding-worknotes-meta",children:[e.jsx("span",{"data-testid":"onboarding-worknotes-app-name",children:f}),e.jsx("span",{className:"text-slate-400",children:"|"}),e.jsx("span",{className:"text-slate-500","data-testid":"onboarding-worknotes-reg-num",children:h})]})]})]}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs("div",{className:"hidden sm:flex items-center -space-x-2 mr-2","data-testid":"onboarding-worknotes-participant-avatars",children:[ye.slice(0,3).map((oe,we)=>e.jsx(Nm,{className:"w-8 h-8 border-2 border-white ring-1 ring-slate-100","data-testid":`onboarding-worknotes-avatar-${we}`,children:e.jsx(wm,{className:`${oe.color} text-white text-[10px]`,children:oe.initials})},we)),ye.length>3&&e.jsx("div",{className:"w-8 h-8 rounded-full bg-slate-100 border-2 border-white flex items-center justify-center ring-1 ring-slate-100","data-testid":"onboarding-worknotes-avatar-more",children:e.jsxs("span",{className:"text-slate-600 text-[10px] font-bold",children:["+",ye.length-3]})})]}),e.jsxs(se,{variant:"ghost",size:"sm",onClick:$e,className:"text-slate-500 hover:text-blue-600 flex items-center gap-1.5 px-2 h-9 rounded-lg hover:bg-slate-50 transition-colors",disabled:D,"data-testid":"onboarding-worknotes-sync-btn",children:[e.jsx(hl,{className:`w-4 h-4 ${D?"animate-spin":""}`}),e.jsx("span",{className:"text-xs font-medium hidden md:inline",children:"Sync"})]}),e.jsxs(se,{variant:M?"secondary":"ghost",size:"sm",onClick:()=>z(!M),className:`flex items-center gap-1.5 px-2 h-9 rounded-lg transition-all ${M?"bg-blue-50 text-blue-600 hover:bg-blue-100":"text-slate-500 hover:bg-slate-50"}`,"data-testid":"onboarding-worknotes-toggle-sidebar-btn",children:[e.jsx(Ra,{className:"w-4 h-4"}),e.jsx("span",{className:"text-xs font-medium hidden md:inline",children:"Participants"})]})]})]})}),e.jsxs("div",{className:"flex-1 flex overflow-hidden",children:[e.jsxs("div",{className:"flex-1 flex flex-col min-w-0 bg-white min-h-0 relative",children:[e.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-4 custom-scrollbar bg-slate-50 relative z-0","data-testid":"onboarding-worknotes-chat-area",children:e.jsxs("div",{className:`max-w-4xl mx-auto flex flex-col py-4 gap-4 ${m==="modal"?"":"px-4"}`,children:[e.jsx("div",{className:"sticky top-0 z-[1] -mx-1 px-1 pb-1 bg-slate-50/95 backdrop-blur-sm",children:e.jsxs("div",{className:"relative",children:[e.jsx(Ta,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400 pointer-events-none"}),e.jsx(at,{type:"search",value:B,onChange:oe=>G(oe.target.value),placeholder:"Search messages...",className:"pl-9 h-10 bg-white border-slate-200 rounded-xl text-sm shadow-sm","aria-label":"Search messages","data-testid":"onboarding-worknotes-search-input"})]})}),Ys.map((oe,we)=>{var ke,je,Ve,Ge,nt,Zt,Jt;if(aq(oe)){const lt=((ke=oe.author)==null?void 0:ke.name)||"System",mt=(je=oe.author)!=null&&je.role&&oe.author.role!=="0"&&oe.author.role!==""?oe.author.role:"";return e.jsx("div",{className:"flex w-full justify-center px-1 py-1 sm:px-2","data-testid":`onboarding-worknotes-activity-row-${we}`,children:e.jsxs("div",{role:"status",title:iq(oe),className:"flex w-full max-w-[min(100%,42rem)] items-start gap-2.5 rounded-xl border border-slate-200/90 bg-slate-100/80 px-3 py-2.5 shadow-sm",children:[e.jsx(ad,{className:"mt-0.5 h-4 w-4 shrink-0 text-purple-600",strokeWidth:2.5,"aria-hidden":!0}),e.jsx("span",{className:"shrink-0 pt-0.5 text-[10px] font-bold uppercase tracking-wide text-slate-600","data-testid":`onboarding-worknotes-activity-type-${we}`,children:lq(oe)}),e.jsx("div",{className:"min-w-0 flex-1 text-left",children:e.jsxs("p",{className:"text-sm leading-snug text-slate-800",children:[e.jsx("span",{className:"font-semibold text-slate-900","data-testid":`onboarding-worknotes-activity-who-${we}`,children:lt}),mt?e.jsxs("span",{className:"text-xs font-normal text-slate-500",children:[" · ",mt]}):null,e.jsx("span",{className:"font-normal text-slate-600",children:" — "}),e.jsx("span",{className:"font-normal text-slate-700","data-testid":`onboarding-worknotes-activity-text-${we}`,children:Pt(oe.noteText)})]})}),e.jsx("time",{className:"shrink-0 whitespace-nowrap pt-0.5 text-right text-[10px] leading-tight text-slate-400 tabular-nums sm:text-[11px]",dateTime:oe.createdAt,"data-testid":`onboarding-worknotes-activity-time-${we}`,children:jS(oe.createdAt)})]})},oe.id)}const Oe=((Ve=oe==null?void 0:oe.author)==null?void 0:Ve.email)&&(s==null?void 0:s.email)&&oe.author.email.toLowerCase()===s.email.toLowerCase()||(oe==null?void 0:oe.userId)&&(s==null?void 0:s.id)&&String(oe.userId)===String(s.id)||oe.id.startsWith("temp-");return e.jsx("div",{className:`flex w-full ${Oe?"justify-end":"justify-start"}`,"data-testid":`onboarding-worknotes-message-row-${we}`,children:e.jsxs("div",{className:`flex gap-3 max-w-[min(85%,36rem)] ${Oe?"flex-row-reverse":""}`,children:[e.jsx(Nm,{className:"w-10 h-10 flex-shrink-0 mt-1","data-testid":`onboarding-worknotes-message-avatar-${we}`,children:e.jsx(wm,{className:`${ge(((Ge=oe==null?void 0:oe.author)==null?void 0:Ge.name)||"System")} text-white`,children:ee(((nt=oe==null?void 0:oe.author)==null?void 0:nt.name)||"S")})}),e.jsxs("div",{className:`flex flex-col min-w-0 ${Oe?"items-end":"items-start"}`,children:[e.jsxs("div",{className:`flex flex-wrap items-center gap-x-2 gap-y-0.5 mb-1 px-1 ${Oe?"flex-row-reverse text-right":"text-left"}`,children:[e.jsx("span",{className:"text-slate-900 font-medium text-sm","data-testid":`onboarding-worknotes-message-author-${we}`,children:Oe?"You":((Zt=oe==null?void 0:oe.author)==null?void 0:Zt.name)||"Unknown"}),e.jsx("span",{className:"text-slate-400 text-[10px] uppercase tracking-wide",children:(Jt=oe==null?void 0:oe.author)!=null&&Jt.role&&oe.author.role!=="0"&&oe.author.role!==""?`(${oe.author.role})`:""}),e.jsx("span",{className:"text-slate-400 text-[10px] tabular-nums","data-testid":`onboarding-worknotes-message-time-${we}`,children:jS(oe.createdAt)})]}),e.jsxs("div",{className:`rounded-2xl border px-4 py-2.5 shadow-sm relative text-left ${Oe?"bg-blue-50 border-blue-100 text-slate-800 rounded-tr-none":"bg-white border-slate-200 text-slate-700 rounded-tl-none"}`,"data-testid":`onboarding-worknotes-message-bubble-${we}`,children:[e.jsx("p",{className:"text-sm leading-relaxed whitespace-pre-wrap break-words","data-testid":`onboarding-worknotes-message-text-${we}`,children:Pt(oe.noteText)}),oe.attachments&&oe.attachments.length>0&&e.jsx("div",{className:"mt-2 space-y-2 border-t border-slate-100 pt-2","data-testid":`onboarding-worknotes-message-attachments-${we}`,children:oe.attachments.map((lt,mt)=>{const Ds=lt.mimeType.startsWith("image/");return e.jsx("div",{className:"flex items-center gap-2","data-testid":`onboarding-worknotes-message-attachment-${we}-${mt}`,children:Ds?e.jsx("div",{className:"rounded-lg overflow-hidden border border-slate-100 max-w-[200px]",children:e.jsx("img",{src:`${Vc}/${lt.filePath.replace(/\\/g,"/")}`,alt:lt.fileName,className:"w-full h-auto cursor-pointer",onClick:()=>et(lt),"data-testid":`onboarding-worknotes-message-attachment-img-${we}-${mt}`})}):lt.mimeType==="application/pdf"?e.jsxs("button",{type:"button",onClick:()=>et(lt),className:"flex items-center gap-2 text-xs text-blue-600 hover:underline","data-testid":`onboarding-worknotes-message-attachment-preview-${we}-${mt}`,children:[e.jsx(bu,{className:"w-3 h-3"}),lt.fileName," (Preview)"]}):e.jsxs("a",{href:`${Vc}/${lt.filePath.replace(/\\/g,"/")}`,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-xs text-blue-600 hover:underline","data-testid":`onboarding-worknotes-message-attachment-link-${we}-${mt}`,children:[e.jsx(bu,{className:"w-3 h-3"}),lt.fileName]})},lt.id)})})]})]})]})},oe.id)}),j.length===0&&!D&&e.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center","data-testid":"onboarding-worknotes-empty-state",children:[e.jsx(Ga,{className:"w-16 h-16 text-slate-300 mb-4"}),e.jsx("h3",{className:"text-slate-900 mb-2",children:"No messages yet"}),e.jsx("p",{className:"text-slate-600",children:"Start the conversation by sending a message below"})]}),j.length>0&&Ys.length===0&&!D&&e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center text-slate-500 text-sm",children:['No messages match "',B.trim(),'". Clear the search box to see the full thread.']}),D&&e.jsx("div",{className:"flex justify-center items-center py-8",children:e.jsx("span",{className:"text-slate-500",children:"Loading notes..."})}),e.jsx("div",{ref:dt})]})}),e.jsx("div",{className:"bg-white border-t border-slate-100 px-6 py-4 shadow-[0_-4px_10px_-5px_rgba(0,0,0,0.05)]","data-testid":"onboarding-worknotes-composer",children:e.jsxs("div",{className:"max-w-4xl mx-auto space-y-4",children:[Y.length>0&&e.jsx("div",{className:"flex flex-wrap gap-3 mb-3","data-testid":"onboarding-worknotes-attached-files",children:Y.map((oe,we)=>{const Oe=oe.mimeType.startsWith("image/")||oe.mimeType==="application/pdf";return e.jsxs("div",{className:"flex items-center gap-3 p-2 bg-white rounded-xl border border-slate-200 shadow-sm hover:border-blue-300 transition-all group max-w-[200px]","data-testid":`onboarding-worknotes-attached-file-${we}`,children:[e.jsx("div",{className:"w-10 h-10 bg-slate-50 rounded-lg flex items-center justify-center flex-shrink-0 overflow-hidden",children:kt(oe.mimeType,oe.filePath)}),e.jsxs("div",{className:"flex-1 min-w-0 pr-6 relative",children:[e.jsx("p",{className:`text-xs font-medium text-slate-700 truncate ${Oe?"hover:text-blue-600 cursor-pointer hover:underline":""}`,onClick:()=>Oe&&et(oe),children:oe.fileName}),e.jsx("button",{onClick:()=>he(oe.id),className:"absolute -top-1 -right-1 p-1 bg-white rounded-full border border-slate-100 text-slate-400 hover:text-red-500 shadow-sm opacity-0 group-hover:opacity-100 transition-opacity","data-testid":`onboarding-worknotes-remove-attachment-${we}`,children:e.jsx(ld,{className:"w-3 h-3"})})]})]},oe.id)})}),e.jsxs("div",{className:"flex items-end gap-3 bg-white p-2.5 rounded-2xl border border-slate-200 shadow-sm focus-within:border-blue-400 focus-within:ring-1 focus-within:ring-blue-100 transition-all relative",children:[R&&Bs.length>0&&e.jsx("div",{className:"absolute bottom-full left-0 mb-2 w-64 bg-white border border-slate-200 rounded-lg shadow-lg overflow-hidden max-h-48 overflow-y-auto z-50 custom-scrollbar","data-testid":"onboarding-worknotes-mention-suggestions",children:Bs.map((oe,we)=>e.jsxs("button",{onClick:()=>xt(oe),className:"w-full flex items-center gap-3 px-4 py-2 hover:bg-slate-50 transition-colors text-left","data-testid":`onboarding-worknotes-mention-item-${we}`,children:[e.jsx(Nm,{className:"w-8 h-8",children:e.jsx(wm,{className:`${oe.color} text-white text-xs`,children:oe.initials})}),e.jsx("div",{className:"flex flex-col",children:e.jsx("span",{className:"text-slate-900 text-sm font-medium",children:oe.name})})]},oe.id))}),e.jsxs("div",{className:"flex items-center gap-1 mb-1",children:[e.jsx("input",{type:"file",ref:ve,className:"hidden",multiple:!0,onChange:It}),e.jsx(se,{variant:"ghost",size:"icon",className:"w-9 h-9 text-slate-400 hover:text-blue-600 hover:bg-blue-50 rounded-xl",onClick:()=>{var oe;return(oe=ve.current)==null?void 0:oe.click()},"data-testid":"onboarding-worknotes-attachment-btn",children:e.jsx(bu,{className:"w-5 h-5"})}),e.jsxs(se,{variant:"ghost",size:"icon",className:`w-9 h-9 text-slate-400 hover:text-blue-600 hover:bg-blue-50 rounded-xl relative ${L?"bg-blue-50 text-blue-600":""}`,onClick:()=>$(!L),"data-testid":"onboarding-worknotes-emoji-btn",children:[e.jsx(eM,{className:"w-5 h-5"}),L&&e.jsxs("div",{className:"absolute bottom-12 left-0 z-50 bg-white border border-slate-200 rounded-xl shadow-2xl w-72 animate-in fade-in slide-in-from-bottom-2 overflow-hidden","data-testid":"onboarding-worknotes-emoji-picker",children:[e.jsxs("div",{className:"px-3 py-2 border-b border-slate-100 bg-slate-50 flex items-center justify-between",children:[e.jsx("span",{className:"text-xs font-semibold text-slate-500 uppercase tracking-wider",children:"Emojis"}),e.jsx("button",{onClick:()=>$(!1),className:"text-slate-400 hover:text-slate-600 text-lg leading-none",children:"×"})]}),e.jsx("div",{className:"p-2 grid grid-cols-8 gap-1 max-h-60 overflow-y-auto custom-scrollbar",children:vt.map((oe,we)=>e.jsx("button",{className:"w-8 h-8 flex items-center justify-center hover:bg-blue-50 hover:scale-110 rounded-lg transition-all text-lg",onClick:Oe=>{Oe.stopPropagation(),Mt(oe)},"data-testid":`onboarding-worknotes-emoji-item-${we}`,children:oe},oe))})]})]}),e.jsx(se,{variant:"ghost",size:"icon",className:"w-9 h-9 text-slate-400 hover:text-blue-600 hover:bg-blue-50 rounded-xl",onClick:()=>{var oe;return(oe=ve.current)==null?void 0:oe.click()},children:e.jsx(k1,{className:"w-5 h-5"})})]}),e.jsx("div",{className:"flex-1 relative",children:e.jsx(at,{ref:ce,type:"text",placeholder:"Type your message... Use @username to mention someone",value:C,onChange:st,onKeyPress:Vt,className:"w-full pr-4 border-none focus-visible:ring-0 px-0"})}),e.jsx(se,{onClick:pt,disabled:!C.trim()&&Y.length===0||W,className:"bg-blue-600 hover:bg-blue-700 text-white rounded-xl h-10 w-10 p-0",children:W?e.jsx("div",{className:"h-4 w-4 border-2 border-white border-t-transparent rounded-full animate-spin"}):e.jsx(Gu,{className:"w-5 h-5"})})]}),e.jsxs("p",{className:"text-slate-400 text-[10px] px-1 flex items-center gap-1",children:[e.jsx(_a,{className:"w-3 h-3"}),e.jsxs("span",{children:["Press Enter to send • Use @ to mention • ",W?"Uploading files...":"Files attached appear above"]})]})]})})]}),M&&e.jsxs("div",{className:`w-[280px] lg:w-[320px] bg-slate-50 border-l border-slate-200 flex flex-col transition-all animate-in slide-in-from-right-full ${m==="modal"?"hidden lg:flex":"flex"}`,children:[e.jsxs("div",{className:"p-4 border-b border-slate-200 bg-white",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("h3",{className:"font-semibold text-slate-900 flex items-center gap-2",children:[e.jsx(Ra,{className:"w-4 h-4 text-blue-600"}),"Participants",e.jsx(Ce,{variant:"secondary",className:"bg-slate-100 text-slate-600 ml-1",children:ye.length})]}),e.jsx(se,{variant:"ghost",size:"icon",className:"h-8 w-8 text-slate-400 hover:text-slate-600",onClick:()=>z(!1),children:e.jsx(ld,{className:"w-4 h-4"})})]}),e.jsxs("div",{className:"relative",children:[e.jsx(Ta,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"}),e.jsx(at,{type:"text",placeholder:"Search people...",value:T,onChange:oe=>I(oe.target.value),className:"pl-9 bg-slate-50 border-slate-200 h-9 text-sm rounded-lg focus-visible:bg-white transition-all"})]})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto p-2 space-y-1 custom-scrollbar",children:[ye.filter(oe=>{var we;return oe.name.toLowerCase().includes(T.toLowerCase())||((we=oe.role)==null?void 0:we.toLowerCase().includes(T.toLowerCase()))}).map(oe=>{const we=!!oe.revokedAt,Oe=["DD Lead","DD Head","NBH","DD Admin","Super Admin"].includes((s==null?void 0:s.roleCode)||"")&&!we&&oe.id!==(s==null?void 0:s.id);return e.jsxs("div",{className:Nt("group flex items-start gap-3 p-3 rounded-xl transition-all cursor-default border border-transparent",we?"opacity-50 bg-slate-100 grayscale-[0.5]":"hover:bg-white hover:shadow-sm hover:border-slate-100"),children:[e.jsxs("div",{className:"relative",children:[e.jsx(Nm,{className:Nt("w-10 h-10 ring-2 ring-transparent transition-all",!we&&"group-hover:ring-blue-100"),children:e.jsx(wm,{className:`${oe.color} text-white text-xs font-bold`,children:oe.initials})}),oe.isOnline&&!we&&e.jsx("span",{className:"absolute bottom-0 right-0 w-3 h-3 bg-green-500 border-2 border-slate-50 rounded-full shadow-sm"}),we&&e.jsx("span",{className:"absolute -top-1 -right-1 bg-red-100 rounded-full p-0.5 border border-white",children:e.jsx(vg,{className:"w-2.5 h-2.5 text-red-600"})})]}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center justify-between mb-0.5",children:[e.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[e.jsx("p",{className:Nt("text-sm font-semibold truncate",we?"text-slate-500 line-through":"text-slate-900"),children:oe.name}),we&&e.jsx(Ce,{variant:"outline",className:"text-[8px] h-3.5 px-1 bg-red-50 text-red-600 border-red-100",children:"Revoked"})]}),oe.id===(s==null?void 0:s.id)&&e.jsx(Ce,{variant:"outline",className:"text-[9px] h-4 px-1 border-blue-200 text-blue-600 bg-blue-50",children:"You"})]}),e.jsx("p",{className:"text-[11px] text-slate-500 font-medium uppercase tracking-wider mb-1",children:oe.role}),e.jsx("p",{className:"text-[11px] text-slate-400 truncate italic",children:oe.email})]}),Oe&&e.jsx(se,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 text-slate-300 hover:text-red-600 hover:bg-red-50 opacity-0 group-hover:opacity-100 transition-all self-center",onClick:()=>ht(oe),children:e.jsx(vg,{className:"w-3.5 h-3.5"})}),!Oe&&!we&&e.jsx(bi,{className:"w-4 h-4 text-slate-300 group-hover:text-slate-400 opacity-0 group-hover:opacity-100 transition-all self-center"})]},oe.id)}),ye.length===0&&e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center opacity-50",children:[e.jsx(Ra,{className:"w-8 h-8 text-slate-300 mb-2"}),e.jsx("p",{className:"text-xs text-slate-500",children:"No participants found"})]})]}),e.jsxs("div",{className:"p-4 bg-white border-t border-slate-200",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx("div",{className:"w-2 h-2 bg-green-500 rounded-full animate-pulse"}),e.jsx("span",{className:"text-[10px] font-bold text-slate-500 uppercase tracking-widest",children:"Active Session"})]}),e.jsxs("div",{className:"flex items-center gap-3 p-2 rounded-lg bg-slate-50 border border-slate-100",children:[e.jsx(vn,{className:"w-4 h-4 text-slate-400"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] text-slate-500 font-medium uppercase",children:"Last Activity"}),e.jsx("p",{className:"text-xs text-slate-900 font-semibold",children:"Just now"})]})]})]})]})]}),e.jsx(ds,{open:!!Pe,onOpenChange:oe=>!oe&&et(null),children:e.jsxs(os,{className:"max-w-6xl h-[90vh] flex flex-col p-4",children:[e.jsx(xs,{children:e.jsxs(ms,{className:"flex items-center gap-2",children:[Pe&&kt(Pe.mimeType),e.jsx("span",{className:"truncate",children:Pe==null?void 0:Pe.fileName})]})}),e.jsx("div",{className:"flex-1 overflow-hidden rounded-lg bg-slate-100 flex items-center justify-center p-4",children:Pe!=null&&Pe.mimeType.startsWith("image/")?e.jsx("img",{src:`${Vc}/${Pe.filePath.replace(/\\/g,"/")}`,className:"max-w-full max-h-full object-contain",alt:"Preview"}):(Pe==null?void 0:Pe.mimeType)==="application/pdf"?e.jsx("iframe",{src:`${Vc}/${Pe.filePath.replace(/\\/g,"/")}`,className:"w-full h-full border-none",title:"PDF Preview"}):e.jsxs("div",{className:"text-center",children:[e.jsx(af,{className:"w-16 h-16 text-slate-300 mx-auto mb-4"}),e.jsx("p",{className:"text-slate-500",children:"Preview not available for this file type."}),e.jsx("a",{href:`${Vc}/${Pe==null?void 0:Pe.filePath.replace(/\\/g,"/")}`,target:"_blank",rel:"noreferrer",className:"text-blue-600 hover:underline text-sm",children:"Open in new tab"})]})})]})}),e.jsx(ds,{open:!!K,onOpenChange:oe=>!oe&&H(null),children:e.jsxs(os,{className:"max-w-md p-0 overflow-hidden border-none shadow-2xl [&>button]:text-white [&>button]:opacity-100",children:[e.jsxs("div",{className:"bg-gradient-to-br from-red-600 to-red-700 p-6 text-white text-center",children:[e.jsx("div",{className:"w-16 h-16 bg-white/20 rounded-full flex items-center justify-center mx-auto mb-4 border border-white/30 backdrop-blur-sm animate-pulse",children:e.jsx(vg,{className:"w-8 h-8 text-white"})}),e.jsx("h3",{className:"text-xl font-bold mb-2",children:"Revoke Participant Access?"}),e.jsxs("p",{className:"text-red-100 text-sm",children:["You are about to revoke access for ",e.jsx("span",{className:"font-bold text-white",children:K==null?void 0:K.name}),". They will no longer be able to view or interact with this request."]})]}),e.jsxs("div",{className:"p-6 bg-white space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("label",{className:"text-xs font-bold text-slate-500 uppercase tracking-widest",children:"Reason for Revocation"}),e.jsx(at,{value:X,onChange:oe=>J(oe.target.value),placeholder:"e.g. Roles changed, Case transferred...",className:"bg-slate-50 border-slate-200 focus:bg-white transition-all h-11"})]}),e.jsxs("div",{className:"flex gap-3 pt-2",children:[e.jsx(se,{variant:"outline",className:"flex-1 h-11 border-slate-200 text-slate-600 hover:bg-slate-50",onClick:()=>H(null),children:"Cancel"}),e.jsxs(se,{className:"flex-1 h-11 bg-red-600 hover:bg-red-700 text-white font-bold shadow-lg shadow-red-200",onClick:_e,disabled:ae,children:[ae?e.jsx(hl,{className:"w-4 h-4 animate-spin mr-2"}):null,"Revoke Access"]})]})]})]})})]})}const Gb="!w-[80vw] !max-w-[80vw] sm:!max-w-[80vw]",mo=({isOpen:t,onClose:s,document:n})=>{var i;const a=n?`http://localhost:5000${n.filePath.startsWith("/")?"":"/"}${n.filePath}`:"";return e.jsx(ds,{open:t,onOpenChange:s,children:e.jsx(os,{className:`${Gb} h-[85vh] flex flex-col p-0 overflow-hidden bg-white shadow-2xl border-none`,children:n?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center justify-between p-4 border-b bg-slate-50",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 rounded-lg bg-red-50 flex items-center justify-center border border-red-200",children:e.jsx(yn,{className:"w-5 h-5 text-re-red"})}),e.jsxs("div",{children:[e.jsx(ms,{className:"text-sm font-bold text-slate-900 leading-none mb-1",children:n.fileName}),e.jsx("p",{className:"text-[10px] text-slate-500 font-medium uppercase tracking-wider",children:n.documentType})]})]}),e.jsx("div",{className:"flex items-center gap-2 pr-10",children:e.jsxs(se,{variant:"outline",size:"sm",className:"h-8 gap-2",onClick:()=>window.open(a,"_blank"),children:[e.jsx(ji,{className:"w-4 h-4"}),e.jsx("span",{className:"hidden sm:inline",children:"Download"})]})})]}),e.jsx("div",{className:"flex-1 bg-slate-100 relative overflow-hidden flex items-center justify-center p-4",children:(i=n.fileName)!=null&&i.toLowerCase().endsWith(".pdf")?e.jsx("iframe",{src:`${a}#toolbar=0`,className:"w-full h-full bg-white shadow-inner rounded-sm",title:"Preview"}):e.jsx("img",{src:a,className:"max-h-full max-w-full object-contain shadow-lg rounded-sm",alt:"Preview"})})]}):e.jsx("div",{className:"flex items-center justify-center h-full text-slate-400",children:"Loading document..."})})})};function oq(){var W,U,M,z;const{id:t}=vd(),s=tr(),[n,r]=g.useState(null),[a,i]=g.useState(null),[o,d]=g.useState(!0),[m,f]=g.useState(!1),[p,h]=g.useState(""),[x,u]=g.useState("details"),[N,v]=g.useState(!1),[w,j]=g.useState(null),[b,C]=g.useState(!1),[S,R]=g.useState(!1),[_,A]=g.useState(""),E=In(T=>T.auth.user),q=(E==null?void 0:E.role)==="FDD";g.useEffect(()=>{t&&O()},[t]);const O=async()=>{var T,I,B,G;d(!0);try{const[K,H]=await Promise.all([Ee.getApplicationById(t),Ee.getFddAssignment(t)]);(T=K.data)!=null&&T.success&&r(K.data.data),(I=H.data)!=null&&I.success&&i(H.data.data)}catch(K){console.error("Error fetching application:",K);const H=((G=(B=K.response)==null?void 0:B.data)==null?void 0:G.message)||"Access Denied: Not authorized for FDD access";te.error(H),s("/fdd-dashboard")}finally{d(!1)}},D=async T=>{var G,K,H;const I=(G=T.target.files)==null?void 0:G[0];if(!I||!p){p||te.error("Please select a document type first");return}f(!0);const B=new FormData;B.append("file",I),B.append("documentType",p),B.append("stage","FDD"),B.append("applicationId",t),B.append("requestType","application");try{const X=await Ee.uploadDocument(t,B);if((K=X.data)!=null&&K.success){if(p==="FDD Final Audit Report"){const J=((H=X.data.data)==null?void 0:H.id)||X.data.id;await Ee.submitFddReport({assignmentId:a==null?void 0:a.id,applicationId:t,reportDocumentId:J,findings:"Final Audit Report submitted.",recommendation:"REVIEW_PENDING"})}te.success(`${p} uploaded successfully`),O(),h("")}}catch{te.error("Failed to upload document")}finally{f(!1)}},P=T=>{if(!T||!T.filePath){te.error("Document source file not found");return}j({fileName:T.originalName||T.fileName||"Document",filePath:T.filePath,documentType:T.documentType,createdAt:T.createdAt,mimeType:T.mimeType}),v(!0)};if(o)return e.jsxs("div",{className:"flex flex-col items-center justify-center h-[70vh] bg-slate-50/50 rounded-2xl border border-slate-200 border-dashed",children:[e.jsx(ns,{className:"w-12 h-12 animate-spin text-blue-600 mb-4"}),e.jsx("p",{className:"text-slate-500 font-medium",children:"Authenticating and loading secure data..."})]});if(!n)return null;const L=n.currentStage==="FDD_VERIFICATION"||n.currentStage==="FDD",$=(a==null?void 0:a.status)==="Report Submitted",Y=!L&&(n.overallStatus!=="Active"||n.currentProgress>=75)||$,Z=!L&&n.currentProgress<70&&!$;return e.jsxs("div",{className:"flex flex-col gap-6 max-w-7xl mx-auto mb-10",children:[(n==null?void 0:n.statutoryStatus)==="Flagged"&&e.jsxs("div",{className:"bg-red-50 border border-red-200 p-4 rounded-xl flex items-center gap-4 animate-in fade-in slide-in-from-top-4 duration-500","data-testid":"onboarding-fdd-details-flag-banner",children:[e.jsx("div",{className:"bg-red-100 p-2 rounded-lg",children:e.jsx(Ha,{className:"w-5 h-5 text-red-600"})}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-sm font-bold text-red-900 leading-none",children:"APPLICATION FLAGGED BY YOU"}),e.jsx("p",{className:"text-red-700 text-[10px] font-bold uppercase tracking-wider mt-1 opacity-80",children:"Marked as non-responsive for follow-up by DD Team"})]})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("button",{onClick:()=>s("/fdd-dashboard"),className:"flex items-center gap-2 text-slate-600 hover:text-slate-900 font-medium transition-all group","data-testid":"onboarding-fdd-details-back-btn",children:[e.jsx("div",{className:"p-2 rounded-full group-hover:bg-slate-100 transition-colors",children:e.jsx(Jr,{className:"w-5 h-5"})}),"Back to Dashboard"]}),e.jsx("div",{className:"flex items-center gap-3",children:Z?e.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 bg-slate-100 border border-slate-200 text-slate-500 font-bold text-[10px] uppercase tracking-[0.1em] rounded-lg","data-testid":"onboarding-fdd-details-awaiting-badge",children:[e.jsx(vn,{className:"w-4 h-4"}),"Awaiting Previous Stages"]}):Y?e.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 bg-green-50 border border-green-200 text-green-700 font-bold text-[10px] uppercase tracking-[0.1em] rounded-lg shadow-inner","data-testid":"onboarding-fdd-details-submitted-badge",children:[e.jsx(Zn,{className:"w-4 h-4"}),"Final Audit Report Submitted"]}):e.jsx(e.Fragment,{children:q&&e.jsxs("button",{disabled:m,onClick:()=>R(!0),className:"px-4 py-2 bg-red-50 text-red-600 font-bold text-xs uppercase tracking-wider hover:bg-red-100 rounded-lg transition-all flex items-center gap-2 border border-red-100 shadow-sm","data-testid":"onboarding-fdd-details-flag-btn",children:[e.jsx(Ha,{className:"w-4 h-4"}),"Flag Non-Responsive"]})})})]}),e.jsx(Le,{className:"border border-slate-200 shadow-sm bg-white","data-testid":"onboarding-fdd-details-header",children:e.jsx(Fe,{className:"p-6",children:e.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-6",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"w-14 h-14 bg-slate-900 text-white rounded-lg flex items-center justify-center font-bold text-xl","data-testid":"onboarding-fdd-details-avatar",children:n.applicantName.charAt(0)}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[e.jsx("h1",{className:"text-2xl font-bold text-slate-900 tracking-tight","data-testid":"onboarding-fdd-details-name",children:n.applicantName}),e.jsx(Ce,{variant:"outline",className:"text-slate-500 font-medium px-2 py-0","data-testid":"onboarding-fdd-details-id-badge",children:n.applicationId})]}),e.jsxs("div",{className:"flex items-center gap-3 text-sm text-slate-500","data-testid":"onboarding-fdd-details-meta",children:[e.jsxs("span",{children:[n.city,", ",n.state]}),e.jsx("span",{className:"text-slate-300",children:"•"}),e.jsx("span",{children:n.businessType||"Dealership"})]})]})]}),e.jsx("div",{className:"flex items-center gap-3",children:e.jsxs("div",{className:"text-right hidden md:block",children:[e.jsx("p",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wider",children:"Status"}),e.jsx("p",{className:"text-sm font-bold text-slate-700",children:"Financial Due Diligence"})]})})]})})}),e.jsxs("div",{className:"flex items-center gap-8 border-b border-slate-200","data-testid":"onboarding-fdd-details-tabs",children:[e.jsxs("button",{onClick:()=>u("details"),className:`pb-3 text-sm font-semibold transition-all relative ${x==="details"?"text-blue-600":"text-slate-500 hover:text-slate-700"}`,"data-testid":"onboarding-fdd-details-tab-workspace",children:["Workspace",x==="details"&&e.jsx("div",{className:"absolute bottom-[-1px] left-0 right-0 h-0.5 bg-blue-600"})]}),e.jsxs("button",{onClick:()=>u("worknotes"),className:`pb-3 text-sm font-semibold transition-all relative ${x==="worknotes"?"text-blue-600":"text-slate-500 hover:text-slate-700"}`,"data-testid":"onboarding-fdd-details-tab-worknotes",children:[e.jsx("div",{className:"flex items-center gap-2",children:"Work Notes"}),x==="worknotes"&&e.jsx("div",{className:"absolute bottom-[-1px] left-0 right-0 h-0.5 bg-blue-600"})]})]}),x==="details"?e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[e.jsx("div",{className:"lg:col-span-2 space-y-6",children:e.jsxs(Le,{className:"border border-slate-200 shadow-sm bg-white","data-testid":"onboarding-fdd-details-workspace-card",children:[e.jsx(Qe,{className:"border-b border-slate-100 px-6 py-4",children:e.jsxs(Je,{className:"text-base font-bold flex items-center gap-2 text-slate-800",children:[e.jsx(or,{className:"w-4 h-4 text-slate-500"}),Y?"Finalized Financial Reports":Z?"Audit Workspace":"Financial Report Submission"]})}),e.jsxs(Fe,{className:"p-6",children:[Z&&e.jsxs("div",{className:"mb-6 p-8 bg-slate-50 border border-dashed border-slate-200 rounded-xl flex flex-col items-center justify-center text-center","data-testid":"onboarding-fdd-details-not-active",children:[e.jsx("div",{className:"w-16 h-16 bg-white rounded-full flex items-center justify-center text-slate-300 mb-4 shadow-sm",children:e.jsx(vn,{className:"w-8 h-8"})}),e.jsx("h4",{className:"text-lg font-bold text-slate-900 mb-2",children:"Stage Not Yet Active"}),e.jsx("p",{className:"text-sm text-slate-500 max-w-sm mb-6",children:"This application is still being processed in previous documentation or interview stages. The FDD workspace will activate once the previous stages are approved."}),e.jsxs("div",{className:"flex items-center gap-2 text-[10px] font-bold text-slate-400 uppercase tracking-widest px-4 py-1.5 bg-white rounded-full border border-slate-200",children:["Status: ",n.status||"Pending Review"]})]}),Y&&e.jsxs("div",{className:"mb-6 p-4 bg-green-50/50 border border-green-100 rounded-xl flex items-center gap-4","data-testid":"onboarding-fdd-details-completed-alert",children:[e.jsx("div",{className:"w-10 h-10 bg-green-100 rounded-full flex items-center justify-center text-green-600 shrink-0",children:e.jsx(Zn,{className:"w-5 h-5"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-bold text-green-800",children:"Verification Stage Completed"}),e.jsx("p",{className:"text-[11px] text-green-600 font-medium",children:"The FDD report has been submitted and the case is now locked for further audits."})]})]}),!Y&&!Z&&e.jsxs("div",{className:"p-10 border-2 border-dashed border-slate-200 rounded-lg flex flex-col items-center justify-center text-center","data-testid":"onboarding-fdd-details-upload-section",children:[e.jsx("div",{className:"w-12 h-12 bg-slate-50 text-slate-400 rounded-full flex items-center justify-center mb-4",children:e.jsx(Ns,{className:"w-6 h-6"})}),e.jsx("p",{className:"text-slate-600 font-medium mb-1","data-testid":"onboarding-fdd-details-upload-title",children:q?"Select and upload the due diligence report":"View Authorized Documents"}),e.jsx("p",{className:"text-slate-400 text-xs mb-6","data-testid":"onboarding-fdd-details-upload-hint",children:q?"PDF or JPG formats accepted (Max 10MB)":"You are in View-Only mode for this Audit"}),q&&e.jsxs("div",{className:"w-full max-w-sm space-y-4",children:[e.jsxs("select",{value:p,onChange:T=>h(T.target.value),className:"w-full px-3 py-2 bg-slate-50 border border-slate-200 rounded text-sm font-medium text-slate-700 outline-none focus:ring-1 focus:ring-blue-500 transition-all","data-testid":"onboarding-fdd-details-doc-type-select",children:[e.jsx("option",{value:"",children:"Select Document Category..."}),e.jsx("option",{value:"FDD Final Audit Report",children:"FDD Final Audit Report"}),e.jsx("option",{value:"Bank Statement",children:"Bank Statement"}),e.jsx("option",{value:"Income Tax Returns (ITR)",children:"Income Tax Returns (ITR)"}),e.jsx("option",{value:"CIBIL Report",children:"CIBIL Report"}),e.jsx("option",{value:"Business Valuation Report",children:"Business Valuation Report"}),e.jsx("option",{value:"Property Documents",children:"Property Documents"})]}),e.jsx("div",{className:"relative",children:m?e.jsxs("div",{className:"w-full py-2.5 bg-slate-100 rounded flex items-center justify-center gap-2","data-testid":"onboarding-fdd-details-uploading-state",children:[e.jsx(ns,{className:"w-4 h-4 animate-spin text-slate-400"}),e.jsx("span",{className:"text-slate-500 text-xs font-bold uppercase tracking-wider",children:"Uploading..."})]}):e.jsxs(e.Fragment,{children:[e.jsx("input",{type:"file",className:"absolute inset-0 opacity-0 cursor-pointer",onChange:D,disabled:!p,"data-testid":"onboarding-fdd-details-file-input"}),e.jsx("div",{className:`w-full py-2.5 text-center font-bold uppercase tracking-wider text-xs rounded transition-all ${p?"bg-slate-900 text-white hover:bg-slate-800":"bg-slate-100 text-slate-300"}`,"data-testid":"onboarding-fdd-details-browse-btn",children:"Browse & Upload"})]})})]})]}),e.jsxs("div",{className:"mt-8 border-t border-slate-100 pt-8","data-testid":"onboarding-fdd-details-documents-section",children:[e.jsx("h3",{className:"text-sm font-bold text-slate-800 mb-4 px-1",children:"Submitted Documentation"}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{"data-testid":"onboarding-fdd-details-applicant-docs",children:[e.jsxs("p",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wider mb-2 flex items-center gap-2",children:[e.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-blue-500"}),"Applicant's KYC & Financials"]}),e.jsxs("div",{className:"space-y-2",children:[(W=n.uploadedDocuments)==null?void 0:W.filter(T=>!T.uploader||T.uploader.roleCode!=="FDD").map((T,I)=>{var B;return e.jsxs("div",{className:"p-3 border border-slate-100 rounded flex items-center justify-between hover:bg-slate-50 transition-all group","data-testid":`onboarding-fdd-details-applicant-doc-row-${I}`,children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-8 h-8 rounded bg-slate-100 flex items-center justify-center text-slate-400 group-hover:bg-white transition-colors",children:e.jsx(Ns,{className:"w-4 h-4"})}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("p",{className:"text-xs font-bold text-slate-900","data-testid":`onboarding-fdd-details-applicant-doc-name-${I}`,children:T.originalName||T.fileName}),e.jsx("span",{className:"text-[8px] bg-slate-100 text-slate-500 px-1 py-0.5 rounded uppercase font-bold tracking-tighter",children:"APPLICANT"})]}),e.jsxs("p",{className:"text-[10px] text-slate-400 font-medium","data-testid":`onboarding-fdd-details-applicant-doc-meta-${I}`,children:[T.documentType," • ",Yt(T.createdAt),((B=T.uploader)==null?void 0:B.fullName)&&` • by ${T.uploader.fullName}`]})]})]}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsx("button",{type:"button",onClick:()=>P(T),className:"p-1.5 hover:bg-white rounded text-slate-400 hover:text-blue-600 transition-all","data-testid":`onboarding-fdd-details-applicant-doc-preview-${I}`,children:e.jsx(yn,{className:"w-4 h-4"})})})]},I)}),((U=n.uploadedDocuments)==null?void 0:U.filter(T=>!T.uploader||T.uploader.roleCode!=="FDD").length)===0&&e.jsx("p",{className:"text-[10px] text-slate-400 italic px-1","data-testid":"onboarding-fdd-details-applicant-docs-empty",children:"No documents from applicant yet."})]})]}),e.jsxs("div",{"data-testid":"onboarding-fdd-details-my-submissions",children:[e.jsxs("p",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wider mb-2 flex items-center gap-2",children:[e.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-red-500"}),"My Uploaded Reports"]}),e.jsxs("div",{className:"space-y-2",children:[(M=n.uploadedDocuments)==null?void 0:M.filter(T=>{var I;return((I=T.uploader)==null?void 0:I.roleCode)==="FDD"}).map((T,I)=>{var B;return e.jsxs("div",{className:"p-3 border border-red-100 bg-red-50/30 rounded flex items-center justify-between hover:bg-red-50 transition-all group","data-testid":`onboarding-fdd-details-my-report-row-${I}`,children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-8 h-8 rounded bg-red-50 flex items-center justify-center text-re-red",children:e.jsx(Ns,{className:"w-4 h-4"})}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("p",{className:"text-xs font-bold text-slate-900","data-testid":`onboarding-fdd-details-my-report-name-${I}`,children:T.originalName||T.fileName}),e.jsx("span",{className:"text-[8px] bg-red-500 text-white px-1 py-0.5 rounded uppercase font-bold tracking-tighter",children:"YOUR AUDIT REPORT"})]}),e.jsxs("p",{className:"text-[10px] text-slate-400 font-medium","data-testid":`onboarding-fdd-details-my-report-meta-${I}`,children:[T.documentType," • ",Yt(T.createdAt),((B=T.uploader)==null?void 0:B.fullName)&&` • by ${T.uploader.fullName}`]})]})]}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsx("button",{type:"button",onClick:()=>P(T),className:"p-1.5 hover:bg-white rounded text-slate-400 hover:text-re-red transition-all","data-testid":`onboarding-fdd-details-my-report-preview-${I}`,children:e.jsx(yn,{className:"w-4 h-4"})})})]},I)}),((z=n.uploadedDocuments)==null?void 0:z.filter(T=>{var I;return((I=T.uploader)==null?void 0:I.roleCode)==="FDD"}).length)===0&&e.jsx("div",{className:"text-center py-4 bg-slate-50 border border-dashed border-slate-200 rounded-lg","data-testid":"onboarding-fdd-details-my-submissions-empty",children:e.jsx("p",{className:"text-slate-400 text-[10px]",children:"No audit reports uploaded yet."})})]})]})]})]})]})]})}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs(Le,{className:"border border-slate-200 shadow-sm bg-white","data-testid":"onboarding-fdd-details-profile-card",children:[e.jsx(Qe,{className:"border-b border-slate-100 px-6 pt-4 pb-2.5",children:e.jsx(Je,{className:"text-xs font-bold uppercase tracking-wider text-slate-500",children:"Applicant Profile"})}),e.jsxs(Fe,{className:"p-5 space-y-4",children:[e.jsxs("div",{className:"space-y-1 pb-3 border-b border-slate-50","data-testid":"onboarding-fdd-details-target-loc",children:[e.jsx("p",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wider",children:"Target Location"}),e.jsxs("p",{className:"text-sm font-extrabold text-slate-900",children:[n.city,", ",n.state]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3 text-xs","data-testid":"onboarding-fdd-details-profile-meta",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wider",children:"Education"}),e.jsx("p",{className:"font-bold text-slate-800",children:n.education||"N/A"})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wider",children:"Experience"}),e.jsxs("p",{className:"font-bold text-slate-800",children:[n.experienceYears||"0"," Years"]})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wider",children:"Investment Cap"}),e.jsx("p",{className:"font-bold text-slate-800",children:n.investmentCapacity||"N/A"})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wider",children:"Age"}),e.jsx("p",{className:"font-bold text-slate-800",children:n.age||"N/A"})]})]}),e.jsxs("div",{className:"space-y-1 pt-3 border-t border-slate-50 text-xs","data-testid":"onboarding-fdd-details-communication",children:[e.jsx("p",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wider",children:"Communication"}),e.jsx("p",{className:"font-bold text-slate-800",children:n.email}),e.jsx("p",{className:"text-slate-500 font-medium",children:n.phone})]})]})]}),e.jsxs(Le,{className:"border border-slate-200 shadow-sm bg-white","data-testid":"onboarding-fdd-details-statutory-card",children:[e.jsx(Qe,{className:"border-b border-slate-100 px-6 pt-4 pb-2.5",children:e.jsx(Je,{className:"text-xs font-bold uppercase tracking-wider text-slate-500",children:"Statutory Details"})}),e.jsx(Fe,{className:"p-5 space-y-3",children:e.jsxs("div",{className:"grid grid-cols-1 gap-2.5 text-xs",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wider",children:"Constitution Type"}),e.jsx("p",{className:"font-bold text-slate-800",children:n.constitutionType||"N/A"})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wider",children:"PAN Number"}),e.jsx("p",{className:"font-bold text-slate-800 uppercase tracking-tight",children:n.panNumber||"N/A"})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wider",children:"GST Number"}),e.jsx("p",{className:"font-bold text-slate-800 uppercase tracking-tight",children:n.gstNumber||"N/A"})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wider",children:"Registered Address"}),e.jsx("p",{className:"font-medium text-slate-700 leading-relaxed text-[11px]",children:n.registeredAddress||"N/A"})]})]})})]}),e.jsxs(Le,{className:"border border-slate-200 shadow-sm bg-white","data-testid":"onboarding-fdd-details-bank-card",children:[e.jsx(Qe,{className:"border-b border-slate-100 px-6 pt-4 pb-2.5",children:e.jsx(Je,{className:"text-xs font-bold uppercase tracking-wider text-slate-500",children:"Bank Details"})}),e.jsx(Fe,{className:"p-5 space-y-3",children:e.jsxs("div",{className:"grid grid-cols-1 gap-2.5 text-xs",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wider",children:"Account Holder"}),e.jsx("p",{className:"font-bold text-slate-800",children:n.accountHolderName||"N/A"})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wider",children:"Bank Name"}),e.jsx("p",{className:"font-bold text-slate-800",children:n.bankName||"N/A"})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wider",children:"Account Number"}),e.jsx("p",{className:"font-bold text-slate-800 tabular-nums",children:n.accountNumber||"N/A"})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wider",children:"IFSC Code & Branch"}),e.jsxs("p",{className:"font-bold text-slate-800 uppercase tracking-tight",children:[n.ifscCode||"N/A",n.branchName&&e.jsxs("span",{className:"text-slate-400 font-medium ml-2",children:["— ",n.branchName]})]})]})]})})]}),e.jsxs("div",{className:"p-6 bg-slate-900 rounded-lg text-white font-medium","data-testid":"onboarding-fdd-details-instructions",children:[e.jsx("h4",{className:"text-sm font-bold mb-2",children:"Instructions"}),e.jsxs("ul",{className:"text-xs text-slate-300 space-y-2 list-disc pl-4",children:[e.jsx("li",{children:"Bank statements must cover 12 months."}),e.jsx("li",{children:"GST discrepancies must be noted."}),e.jsx("li",{children:"Verify property papers with originals."})]})]})]})]}):e.jsx("div",{className:"bg-white rounded-lg border border-slate-200 min-h-[600px] overflow-hidden",children:e.jsx(IE,{onBack:()=>u("details"),requestId:t,requestType:"application"})}),e.jsx(mo,{isOpen:N,onClose:()=>v(!1),document:w}),e.jsx(ds,{open:b,onOpenChange:C,children:e.jsxs(os,{className:"max-w-md p-0 overflow-hidden border-none shadow-2xl","data-testid":"onboarding-fdd-details-finalize-modal",children:[e.jsxs("div",{className:"bg-slate-950 p-6 flex items-center justify-center relative overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-re-red/20 to-transparent"}),e.jsx("div",{className:"w-16 h-16 bg-re-red/20 rounded-full flex items-center justify-center animate-pulse relative z-10",children:e.jsx(no,{className:"w-8 h-8 text-re-red"})})]}),e.jsxs("div",{className:"p-8 space-y-4",children:[e.jsxs(xs,{children:[e.jsx(ms,{className:"text-2xl font-bold text-slate-900 text-center","data-testid":"onboarding-fdd-details-finalize-title",children:"Submit Audit Report"}),e.jsxs(bs,{className:"text-slate-500 text-center pt-2 leading-relaxed text-base","data-testid":"onboarding-fdd-details-finalize-desc",children:["You are about to submit your final findings. This action will ",e.jsx("span",{className:"font-bold text-slate-800 underline decoration-re-red decoration-2",children:"notify the Admin"})," for review and approval."]})]}),e.jsxs("div",{className:"bg-red-50 p-4 rounded-xl flex gap-3 border border-red-100 italic","data-testid":"onboarding-fdd-details-finalize-info",children:[e.jsx(_a,{className:"w-5 h-5 text-re-red shrink-0 mt-0.5"}),e.jsx("p",{className:"text-xs text-red-800 leading-normal",children:"Once submitted, you cannot edit the findings. Ensure all documents are uploaded."})]}),e.jsx("div",{className:"space-y-4 pt-2",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{className:"text-[10px] font-black uppercase tracking-widest text-slate-400",children:"Detailed Audit Findings & Remarks"}),e.jsx(Ws,{placeholder:"Enter detailed financial observations...",className:"min-h-[120px] bg-slate-50 border-slate-200 rounded-xl focus:ring-re-red text-sm resize-none",value:_,onChange:T=>A(T.target.value),"data-testid":"onboarding-fdd-details-finalize-remarks"})]})}),e.jsxs(bn,{className:"flex flex-col sm:flex-row gap-3 pt-4 sm:pt-6",children:[e.jsx(se,{variant:"outline",className:"w-full sm:flex-1 h-12 rounded-xl font-bold text-slate-600 hover:bg-slate-50 border-slate-200",onClick:()=>C(!1),disabled:m,"data-testid":"onboarding-fdd-details-finalize-cancel",children:"Cancel"}),e.jsx(se,{className:"w-full sm:flex-1 h-12 rounded-xl font-bold bg-slate-950 hover:bg-slate-900 text-white shadow-lg shadow-slate-200 transition-all active:scale-95 border-b-2 border-re-red","data-testid":"onboarding-fdd-details-finalize-confirm",onClick:async()=>{var T,I;try{if(!_.trim()){te.error("Please provide findings.");return}f(!0);const B=(T=a==null?void 0:a.reports)==null?void 0:T[0];(I=(await Ee.submitFddReport({assignmentId:a==null?void 0:a.id,applicationId:t,reportDocumentId:B==null?void 0:B.reportDocumentId,findings:_,recommendation:null})).data)!=null&&I.success&&(te.success("FDD Report submitted successfully."),C(!1),O())}catch{te.error("Failed to submit report")}finally{f(!1)}},disabled:m,children:m?e.jsx(ns,{className:"w-5 h-5 animate-spin"}):"Confirm & Submit"})]})]})]})}),e.jsx(ds,{open:S,onOpenChange:R,children:e.jsxs(os,{className:"max-w-md p-0 overflow-hidden border-none shadow-2xl","data-testid":"onboarding-fdd-details-flag-modal",children:[e.jsxs("div",{className:"bg-slate-950 p-6 flex items-center justify-center relative overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-red-600/20 to-transparent"}),e.jsx("div",{className:"w-16 h-16 bg-red-600/20 rounded-full flex items-center justify-center relative z-10",children:e.jsx(Ha,{className:"w-8 h-8 text-red-500"})})]}),e.jsxs("div",{className:"p-8 space-y-4",children:[e.jsxs(xs,{children:[e.jsx(ms,{className:"text-2xl font-bold text-slate-900 text-center","data-testid":"onboarding-fdd-details-flag-modal-title",children:"Flag Applicant"}),e.jsxs(bs,{className:"text-slate-500 text-center pt-2 leading-relaxed text-base","data-testid":"onboarding-fdd-details-flag-modal-desc",children:["Are you sure you want to flag this applicant as ",e.jsx("span",{className:"font-bold text-red-600",children:"Non-Responsive"}),"?"]})]}),e.jsx("div",{className:"bg-red-50 p-4 rounded-xl flex gap-3 border border-red-100 italic",children:e.jsx("p",{className:"text-xs text-red-800 leading-normal text-center w-full","data-testid":"onboarding-fdd-details-flag-modal-text",children:'"Applicant is non-responsive to FDD queries."'})}),e.jsxs(bn,{className:"flex flex-col sm:flex-row gap-3 pt-4 sm:pt-6",children:[e.jsx(se,{variant:"outline",className:"w-full sm:flex-1 h-12 rounded-xl font-bold text-slate-600 hover:bg-slate-50 border-slate-200",onClick:()=>R(!1),disabled:m,"data-testid":"onboarding-fdd-details-flag-modal-cancel",children:"Go Back"}),e.jsx(se,{className:"w-full sm:flex-1 h-12 rounded-xl font-bold bg-slate-950 hover:bg-slate-900 text-white shadow-lg shadow-slate-200 transition-all active:scale-95 border-b-2 border-red-600","data-testid":"onboarding-fdd-details-flag-modal-confirm",onClick:async()=>{try{f(!0),await Ee.flagNonResponsive({applicationId:t,remarks:"Applicant is non-responsive to FDD queries."}),te.error("Application flagged for non-responsiveness."),R(!1),O()}catch{te.error("Action failed")}finally{f(!1)}},disabled:m,children:m?e.jsx(ns,{className:"w-5 h-5 animate-spin"}):"Flag Applicant"})]})]})]})})]})}const Zl={getOperationsDashboard:async t=>(await Ee.getSlaOperationsDashboard(t)).data,getBatchStatus:async t=>(await Ee.postSlaBatchStatus({items:t})).data,exportOperationsCsv:async t=>{const s="https://dealeronboarding-uat.royalenfield.com/api",n=new URLSearchParams;t!=null&&t.module&&n.set("module",t.module),t!=null&&t.mineOnly&&n.set("mineOnly","true");const r=localStorage.getItem("token"),a=await fetch(`${s}/sla/operations/export?${n.toString()}`,{headers:r?{Authorization:`Bearer ${r}`}:{}});if(!a.ok)throw new Error("Export failed");const i=await a.blob(),o=URL.createObjectURL(i),d=document.createElement("a");d.href=o,d.download=`sla-queue-${Date.now()}.csv`,d.click(),URL.revokeObjectURL(o)},getQuestionnaireReminderSettings:async()=>(await Ee.getQuestionnaireReminderSettings()).data,updateQuestionnaireReminderSettings:async t=>(await Ee.updateQuestionnaireReminderSettings(t)).data},cq={healthy:"bg-emerald-100 text-emerald-800 border-emerald-200",warning:"bg-red-50 text-red-800 border-red-200",critical:"bg-orange-100 text-orange-800 border-orange-200",breached:"bg-red-100 text-red-800 border-red-200"},dq={healthy:"On track",warning:"Due soon",critical:"At risk",breached:"Breached"};function kr({status:t,compact:s}){if(!t)return null;const n=t.isPaused?"warning":t.bucket,r=t.isPaused?"Paused":dq[t.bucket];return e.jsx(Ce,{variant:"outline",className:`text-[10px] font-semibold ${cq[n]} ${s?"px-1.5":""}`,title:`${t.stageName} · ${t.remainingLabel} (${t.percentUsed}% of TAT)`,children:s?r:`${r} · ${t.remainingLabel}`})}function uq(t,s=[]){let n=[];function r(i,o){const d=g.createContext(o);d.displayName=i+"Context";const m=n.length;n=[...n,o];const f=h=>{var j;const{scope:x,children:u,...N}=h,v=((j=x==null?void 0:x[t])==null?void 0:j[m])||d,w=g.useMemo(()=>N,Object.values(N));return e.jsx(v.Provider,{value:w,children:u})};f.displayName=i+"Provider";function p(h,x){var v;const u=((v=x==null?void 0:x[t])==null?void 0:v[m])||d,N=g.useContext(u);if(N)return N;if(o!==void 0)return o;throw new Error(`\`${h}\` must be used within \`${i}\``)}return[f,p]}const a=()=>{const i=n.map(o=>g.createContext(o));return function(d){const m=(d==null?void 0:d[t])||i;return g.useMemo(()=>({[`__scope${t}`]:{...d,[t]:m}}),[d,m])}};return a.scopeName=t,[r,hq(a,...s)]}function hq(...t){const s=t[0];if(t.length===1)return s;const n=()=>{const r=t.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(i){const o=r.reduce((d,{useScope:m,scopeName:f})=>{const h=m(i)[`__scope${f}`];return{...d,...h}},{});return g.useMemo(()=>({[`__scope${s.scopeName}`]:o}),[o])}};return n.scopeName=s.scopeName,n}var mq=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ME=mq.reduce((t,s)=>{const n=Hu(`Primitive.${s}`),r=g.forwardRef((a,i)=>{const{asChild:o,...d}=a,m=o?n:s;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),e.jsx(m,{...d,ref:i})});return r.displayName=`Primitive.${s}`,{...t,[s]:r}},{}),Kb="Progress",Yb=100,[fq]=uq(Kb),[pq,xq]=fq(Kb),FE=g.forwardRef((t,s)=>{const{__scopeProgress:n,value:r=null,max:a,getValueLabel:i=gq,...o}=t;(a||a===0)&&!NS(a)&&console.error(vq(`${a}`,"Progress"));const d=NS(a)?a:Yb;r!==null&&!wS(r,d)&&console.error(yq(`${r}`,"Progress"));const m=wS(r,d)?r:null,f=vf(m)?i(m,d):void 0;return e.jsx(pq,{scope:n,value:m,max:d,children:e.jsx(ME.div,{"aria-valuemax":d,"aria-valuemin":0,"aria-valuenow":vf(m)?m:void 0,"aria-valuetext":f,role:"progressbar","data-state":qE(m,d),"data-value":m??void 0,"data-max":d,...o,ref:s})})});FE.displayName=Kb;var BE="ProgressIndicator",$E=g.forwardRef((t,s)=>{const{__scopeProgress:n,...r}=t,a=xq(BE,n);return e.jsx(ME.div,{"data-state":qE(a.value,a.max),"data-value":a.value??void 0,"data-max":a.max,...r,ref:s})});$E.displayName=BE;function gq(t,s){return`${Math.round(t/s*100)}%`}function qE(t,s){return t==null?"indeterminate":t===s?"complete":"loading"}function vf(t){return typeof t=="number"}function NS(t){return vf(t)&&!isNaN(t)&&t>0}function wS(t,s){return vf(t)&&!isNaN(t)&&t<=s&&t>=0}function vq(t,s){return`Invalid prop \`max\` of value \`${t}\` supplied to \`${s}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Yb}\`.`}function yq(t,s){return`Invalid prop \`value\` of value \`${t}\` supplied to \`${s}\`. The \`value\` prop must be: - - a positive number - - less than the value passed to \`max\` (or ${Yb} if no \`max\` prop is set) - - \`null\` or \`undefined\` if the progress is indeterminate. - -Defaulting to \`null\`.`}var bq=FE,jq=$E;function dc({className:t,indicatorClassName:s,value:n,...r}){return e.jsx(bq,{"data-slot":"progress",className:Nt("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",t),...r,children:e.jsx(jq,{"data-slot":"progress-indicator",className:Nt("bg-primary h-full w-full flex-1 transition-all",s),style:{transform:`translateX(-${100-(n||0)}%)`}})})}const Nq=["Rejected","Revoked","Withdrawn"];function kd(t,s){const n=String(t||""),r=String(s||"");return Nq.some(a=>n.includes(a)||r===a)}function Zb(t,s){const n=String(t||""),r=String(s||"");return n==="Completed"||r==="Completed"||n==="Settled"||n==="Onboarded"||n==="Verified"||n==="Closed"}function wq(t,s){return Zb(t,s)?"success":kd(t,s)?"negative":"inProgress"}const pr={inProgress:{bar:"bg-status-progress",barBadge:"bg-status-progress hover:bg-status-progress-hover text-white border-transparent",badge:"bg-status-progress-soft text-status-progress-strong border-status-progress",badgeSolid:"bg-status-progress hover:bg-status-progress-hover text-white border-transparent",text:"text-status-progress-muted",textStrong:"text-status-progress-strong",icon:"text-status-progress",workflowIcon:"bg-status-workflow-icon",workflowPanel:"bg-status-workflow-panel -ml-4 pl-4 pr-4 py-3 rounded-lg border border-status-workflow-panel",workflowTitle:"text-status-progress-strong",workflowSubtitle:"text-status-progress-muted",workflowStageBadge:"bg-status-workflow-badge border",panel:"bg-status-workflow-panel -ml-4 pl-4 pr-4 py-3 rounded-lg border border-status-workflow-panel",title:"text-status-progress-strong",subtitle:"text-status-progress-muted",stageBadge:"bg-status-workflow-badge border",progress:"bg-status-progress",workflowActive:"bg-status-workflow-active"},success:{bar:"bg-green-600",barBadge:"bg-green-600 hover:bg-green-700 text-white border-transparent",badge:"bg-green-100 text-green-800 border-green-200",badgeSolid:"bg-green-600 hover:bg-green-700 text-white border-transparent",text:"text-green-700",textStrong:"text-green-900",icon:"text-green-600",workflowIcon:"bg-green-100 text-green-600",workflowPanel:"bg-green-50 border border-green-200",workflowTitle:"text-green-900",workflowSubtitle:"text-green-700",workflowStageBadge:"bg-green-100 text-green-700 border-green-300",panel:"bg-green-50 border border-green-200",title:"text-green-900",subtitle:"text-green-700",stageBadge:"bg-green-100 text-green-700 border-green-300",progress:"bg-green-600",workflowActive:"bg-green-600 border-green-600"},negative:{bar:"bg-re-red",barBadge:"bg-re-red hover:bg-re-red-hover text-white border-transparent",badge:"bg-red-50 text-re-red border-red-200",badgeSolid:"bg-re-red hover:bg-re-red-hover text-white border-transparent",text:"text-re-red-hover",textStrong:"text-red-900",icon:"text-re-red",workflowIcon:"bg-red-100 text-re-red",workflowPanel:"bg-red-50 border border-red-200",workflowTitle:"text-red-900",workflowSubtitle:"text-re-red-hover",workflowStageBadge:"bg-red-50 text-re-red border-red-200",panel:"bg-red-50 border border-red-200",title:"text-red-900",subtitle:"text-re-red-hover",stageBadge:"bg-red-50 text-re-red border-red-200",progress:"bg-re-red",workflowActive:"bg-re-red border-re-red"},neutral:{bar:"bg-slate-300",barBadge:"bg-slate-500 text-white border-transparent",badge:"bg-slate-100 text-slate-700 border-slate-200",badgeSolid:"bg-slate-600 hover:bg-slate-700 text-white border-transparent",text:"text-slate-600",textStrong:"text-slate-900",icon:"text-slate-500",workflowIcon:"bg-slate-100 text-slate-400",workflowPanel:"",workflowTitle:"text-slate-900",workflowSubtitle:"text-slate-600",workflowStageBadge:"bg-slate-100 text-slate-500 border-slate-300",panel:"",title:"text-slate-900",subtitle:"text-slate-600",stageBadge:"bg-slate-100 text-slate-500 border-slate-300",progress:"bg-slate-300",workflowActive:"bg-slate-400 border-slate-400"}};function zE(t,s){return pr[wq(t,s)]}function gl(t,s){return zE(t,s).bar}function Sq(t,s){return zE(t,s).barBadge}function Cq(t){return t>=100?pr.success.bar:pr.inProgress.bar}function Aq(t){return t>=100?pr.success.barBadge:pr.inProgress.barBadge}function UE(t){const s=String(t||""),n=s.toUpperCase();return s.includes("Rejected")||n.includes("DOCUMENT_REJECTED")?pr.negative.badge:s==="Verified"||s==="Completed"||n.includes("DOCUMENT_VERIFIED")?pr.success.badge:s.includes("Pending")||s.includes("Review")||s==="In Progress"?pr.inProgress.badge:pr.neutral.badge}function Qb(t,s){return Zb(t,s)?pr.success.badge:(kd(t,s),pr.negative.badge)}function Xb(t,s){return Zb(t,s)?pr.success.badgeSolid:(kd(t,s),pr.negative.badgeSolid)}function eo(t,s){const n=String(t||""),r=String(s||"");return kd(r,n)||/rejected|revoked/i.test(n)?pr.negative.badge:n==="Completed"||r==="Completed"||n==="Closed"?pr.success.badge:pr.negative.badge}function hp({value:t,status:s,currentStage:n,barClassName:r="h-2 w-20 bg-status-progress-soft",showPercent:a=!1,percentClassName:i="text-slate-600 shrink-0","data-testid":o}){return e.jsxs("div",{className:Nt("flex items-center gap-2 min-w-0",a&&"w-full max-w-[8rem]"),"data-testid":o?`${o}-container`:void 0,children:[e.jsx(dc,{value:t,className:r,indicatorClassName:gl(s,n),"data-testid":o}),a&&e.jsxs("span",{className:i,"data-testid":o?`${o}-text`:void 0,children:[t,"%"]})]})}function fo({className:t,...s}){return e.jsx("nav",{role:"navigation","aria-label":"pagination","data-slot":"pagination",className:Nt("mx-auto flex w-full justify-center",t),...s})}function po({className:t,...s}){return e.jsx("ul",{"data-slot":"pagination-content",className:Nt("flex flex-row items-center gap-1",t),...s})}function Sn({...t}){return e.jsx("li",{"data-slot":"pagination-item",...t})}function Vi({className:t,isActive:s,size:n="icon",...r}){return e.jsx("a",{"aria-current":s?"page":void 0,"data-slot":"pagination-link","data-active":s,className:Nt(rd({variant:s?"outline":"ghost",size:n}),t),...r})}function xo({className:t,...s}){return e.jsxs(Vi,{"aria-label":"Go to previous page",size:"default",className:Nt("gap-1 px-2.5 sm:pl-2.5",t),...s,children:[e.jsx(lo,{}),e.jsx("span",{className:"hidden sm:block",children:"Previous"})]})}function go({className:t,...s}){return e.jsxs(Vi,{"aria-label":"Go to next page",size:"default",className:Nt("gap-1 px-2.5 sm:pr-2.5",t),...s,children:[e.jsx("span",{className:"hidden sm:block",children:"Next"}),e.jsx(bi,{})]})}function vo({className:t,...s}){return e.jsxs("span",{"aria-hidden":!0,"data-slot":"pagination-ellipsis",className:Nt("flex size-9 items-center justify-center",t),...s,children:[e.jsx(GI,{className:"size-4"}),e.jsx("span",{className:"sr-only",children:"More pages"})]})}function kq({onViewDetails:t,initialFilter:s}){const{user:n}=In(z=>z.auth),[r,a]=g.useState(""),[i,o]=g.useState("all"),[d,m]=g.useState(s||"all"),[f,p]=g.useState([]),[h,x]=g.useState(!1),[u]=g.useState("date"),[N,v]=g.useState(!1),[w,j]=g.useState(!1),[b,C]=g.useState([]),[S,R]=g.useState({}),[_,A]=g.useState([]),[E,q]=g.useState(1),[O,D]=g.useState(null),P=10;g.useEffect(()=>{L()},[E,i,d,r]);const L=async()=>{try{const z=await hs.getApplications({page:E,limit:P,status:d!=="all"?d:void 0,location:i!=="all"?i:void 0,search:r||void 0,ddLeadShortlisted:"true",isShortlisted:"true",assignedTo:w?n==null?void 0:n.id:void 0}),T=z.data||[];D(z.meta);const I=T.map(B=>({id:B.id,registrationNumber:B.applicationId||"N/A",name:B.applicantName,email:B.email,phone:B.phone,age:B.age,education:B.education,residentialAddress:B.address||B.city||"",businessAddress:B.address||"",preferredLocation:B.preferredLocation,state:B.state,ownsBike:B.ownRoyalEnfield==="yes",pastExperience:B.experienceYears?`${B.experienceYears} years`:B.description||"",status:B.overallStatus,questionnaireMarks:0,rank:0,totalApplicantsAtLocation:0,submissionDate:B.createdAt,assignedUsers:[],assignedTo:B.assignedTo,progress:B.progressPercentage||0,isShortlisted:B.ddLeadShortlisted||B.isShortlisted||!1,companyName:B.companyName,source:B.source,existingDealer:B.existingDealer,royalEnfieldModel:B.royalEnfieldModel,description:B.description,pincode:B.pincode,locationType:B.locationType,ownRoyalEnfield:B.ownRoyalEnfield,address:B.address}));if(C(I),I.length>0?Zl.getBatchStatus(I.map(B=>({entityType:"application",entityId:B.id}))).then(B=>{if(B!=null&&B.success){const G={};I.forEach(K=>{G[K.id]=B.data[`application:${K.id}`]??null}),R(G)}}).catch(()=>R({})):R({}),_.length===0){const B=Array.from(new Set(I.map(G=>G.preferredLocation))).filter(Boolean);A(B)}}catch(z){console.error("Failed to fetch applications",z)}finally{}},$=b.sort((z,T)=>u==="date"?new Date(T.submissionDate).getTime()-new Date(z.submissionDate).getTime():0),Y=z=>{p(T=>T.includes(z)?T.filter(I=>I!==z):[...T,z])},Z=()=>{f.length===$.length?p([]):p($.map(z=>z.id))},W=async()=>{if(f.length!==0)try{x(!0);const z=await hs.sendBulkReminders(f);z.success&&(te.success(z.message||`Reminder emails sent to ${f.length} applicant(s)`),p([]))}catch(z){console.error("Failed to send reminders:",z),te.error(z.message||"Failed to send reminders")}finally{x(!1)}},U=()=>{alert("Exporting applications to CSV...")},M=z=>({Submitted:"bg-slate-500","Questionnaire Pending":"bg-orange-500","Questionnaire Completed":"bg-blue-500",Shortlisted:"bg-cyan-500","Level 1 Pending":"bg-red-500","Level 1 Approved":"bg-green-500","Level 2 Pending":"bg-purple-500","Level 2 Approved":"bg-green-600","Level 2 Recommended":"bg-teal-500","Level 3 Pending":"bg-indigo-500","FDD Verification":"bg-violet-500","Payment Pending":"bg-yellow-500","LOI Issued":"bg-lime-500","Dealer Code Generation":"bg-fuchsia-500","Architecture Team Assigned":"bg-blue-500","Architecture Document Upload":"bg-blue-500","Architecture Team Completion":"bg-blue-500","Statutory GST":"bg-emerald-500","Statutory PAN":"bg-emerald-500","Statutory Nodal":"bg-emerald-500","Statutory Check":"bg-emerald-500","Statutory Partnership":"bg-emerald-500","Statutory Firm Reg":"bg-emerald-500","Statutory Virtual Code":"bg-emerald-500","Statutory Domain":"bg-emerald-500","Statutory MSD":"bg-emerald-500","Statutory LOI Ack":"bg-emerald-500","EOR In Progress":"bg-sky-500","LOA Pending":"bg-emerald-500",Approved:"bg-green-700",Rejected:"bg-red-500",Disqualified:"bg-red-700"})[z]||"bg-slate-500";return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"bg-white rounded-lg border border-slate-200 p-4",children:[e.jsxs("div",{className:"flex flex-col lg:flex-row gap-4",children:[e.jsxs("div",{className:"flex-1 relative",children:[e.jsx(Ta,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"}),e.jsx(at,{type:"text",placeholder:"Search by name, ID, or email...",value:r,onChange:z=>a(z.target.value),className:"pl-10","data-testid":"onboarding-applications-search-input"})]}),e.jsxs(Dt,{value:i,onValueChange:o,children:[e.jsx(Et,{className:"w-full lg:w-48","data-testid":"onboarding-applications-location-filter",children:e.jsx(Rt,{placeholder:"All Locations"})}),e.jsxs(_t,{children:[e.jsx(Me,{value:"all",children:"All Locations"}),_.map(z=>e.jsx(Me,{value:z,children:z},z))]})]}),e.jsxs(Dt,{value:d,onValueChange:m,children:[e.jsx(Et,{className:"w-full lg:w-48","data-testid":"onboarding-applications-status-filter",children:e.jsx(Rt,{placeholder:"All Statuses"})}),e.jsxs(_t,{children:[e.jsx(Me,{value:"all",children:"All Statuses"}),e.jsx(Me,{value:"Questionnaire Pending",children:"Questionnaire Pending"}),e.jsx(Me,{value:"Shortlisted",children:"Shortlisted"}),e.jsx(Me,{value:"Level 1 Pending",children:"Level 1 Pending"}),e.jsx(Me,{value:"Level 2 Pending",children:"Level 2 Pending"}),e.jsx(Me,{value:"Level 3 Pending",children:"Level 3 Pending"}),e.jsx(Me,{value:"EOR In Progress",children:"EOR In Progress"}),e.jsx(Me,{value:"Approved",children:"Approved"}),e.jsx(Me,{value:"Rejected",children:"Rejected"})]})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Ln,{id:"my-assignments",checked:w,onCheckedChange:z=>j(z),"data-testid":"onboarding-applications-assignments-checkbox"}),e.jsx(de,{htmlFor:"my-assignments","data-testid":"onboarding-applications-assignments-label",children:"My Assignments Only"})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3 mt-4",children:[e.jsxs(se,{variant:"outline",size:"sm",onClick:U,"data-testid":"onboarding-applications-export-button",children:[e.jsx(ji,{className:"w-4 h-4 mr-2"}),"Export"]}),f.length>0&&e.jsxs(se,{variant:"outline",size:"sm",onClick:W,disabled:h,"data-testid":"onboarding-applications-reminders-button",children:[h?e.jsx(ns,{className:"w-4 h-4 mr-2 animate-spin"}):e.jsx(Ur,{className:"w-4 h-4 mr-2"}),"Send Reminders (",f.length,")"]}),e.jsxs("div",{className:"ml-auto text-slate-600","data-testid":"onboarding-applications-count-text",children:[O?O.total:$.length," application",(O==null?void 0:O.total)!==1?"s":""]})]})]}),e.jsxs("div",{className:"bg-white rounded-lg border border-slate-200",children:[e.jsxs(Ts,{"data-testid":"onboarding-applications-table",children:[e.jsx(Ps,{children:e.jsxs(it,{children:[e.jsx(fe,{className:"w-12",children:e.jsx(Ln,{checked:f.length===$.length&&$.length>0,onCheckedChange:Z,"data-testid":"onboarding-applications-header-checkbox"})}),e.jsx(fe,{children:"ID"}),e.jsx(fe,{children:"Name"}),e.jsx(fe,{children:"Preferred Location"}),e.jsx(fe,{children:"Status"}),e.jsx(fe,{children:"SLA"}),e.jsx(fe,{children:"Applicant Location"}),e.jsx(fe,{children:"Progress"}),e.jsx(fe,{children:"Applied On"}),e.jsx(fe,{children:"Actions"})]})}),e.jsx(Os,{children:$.map((z,T)=>e.jsxs(it,{"data-testid":`onboarding-application-row-${T}`,children:[e.jsx(ue,{children:e.jsx(Ln,{checked:f.includes(z.id),onCheckedChange:()=>Y(z.id),"data-testid":`onboarding-application-checkbox-${T}`})}),e.jsx(ue,{"data-testid":`onboarding-application-id-${T}`,children:z.registrationNumber}),e.jsx(ue,{"data-testid":`onboarding-application-name-${T}`,children:z.name}),e.jsx(ue,{"data-testid":`onboarding-application-pref-location-${T}`,children:z.preferredLocation}),e.jsx(ue,{children:e.jsx(Ce,{className:M(z.status),"data-testid":`onboarding-application-status-${T}`,children:z.status})}),e.jsx(ue,{children:e.jsx(kr,{status:S[z.id],compact:!0})}),e.jsx(ue,{className:"text-slate-600 max-w-xs truncate","data-testid":`onboarding-application-addr-${T}`,children:z.residentialAddress}),e.jsx(ue,{children:e.jsx(hp,{value:z.progress,status:z.status,showPercent:!0,"data-testid":`onboarding-application-progress-bar-${T}`})}),e.jsx(ue,{"data-testid":`onboarding-application-date-${T}`,children:Yt(z.submissionDate)}),e.jsx(ue,{children:e.jsx(se,{size:"sm",variant:"outline",onClick:()=>t(z.id),"data-testid":`onboarding-application-view-btn-${T}`,children:"View"})})]},z.id))})]}),O&&O.totalPages>1&&e.jsx("div",{className:"py-4 border-t px-4 flex justify-center",children:e.jsx(fo,{children:e.jsxs(po,{children:[e.jsx(Sn,{children:e.jsx(xo,{onClick:()=>q(z=>Math.max(1,z-1)),className:E===1?"pointer-events-none opacity-50":"cursor-pointer"})}),[...Array(O.totalPages)].map((z,T)=>{const I=T+1;return I===1||I===O.totalPages||I>=E-1&&I<=E+1?e.jsx(Sn,{children:e.jsx(Vi,{isActive:E===I,onClick:()=>q(I),className:"cursor-pointer",children:I})},I):I===2&&E>3||I===O.totalPages-1&&Eq(z=>Math.min(O.totalPages,z+1)),className:E===O.totalPages?"pointer-events-none opacity-50":"cursor-pointer"})})]})})})]}),e.jsx(ds,{open:N,onOpenChange:v,children:e.jsxs(os,{className:"max-w-2xl","data-testid":"onboarding-new-app-modal",children:[e.jsx(xs,{children:e.jsx(ms,{children:"Add New Application (Admin)"})}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("p",{className:"text-slate-600",children:"This form allows administrators to manually add applications to the system."}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx(de,{children:"Name"}),e.jsx(at,{placeholder:"Full Name","data-testid":"onboarding-new-app-name"})]}),e.jsxs("div",{children:[e.jsx(de,{children:"Email"}),e.jsx(at,{type:"email",placeholder:"email@example.com","data-testid":"onboarding-new-app-email"})]}),e.jsxs("div",{children:[e.jsx(de,{children:"Phone"}),e.jsx(at,{placeholder:"+91 XXXXX XXXXX","data-testid":"onboarding-new-app-phone"})]}),e.jsxs("div",{children:[e.jsx(de,{children:"Preferred Location"}),e.jsxs(Dt,{children:[e.jsx(Et,{"data-testid":"onboarding-new-app-location-select",children:e.jsx(Rt,{placeholder:"Select location"})}),e.jsx(_t,{children:_.map(z=>e.jsx(Me,{value:z,children:z},z))})]})]})]}),e.jsxs("div",{className:"flex justify-end gap-3",children:[e.jsx(se,{variant:"outline",onClick:()=>v(!1),"data-testid":"onboarding-new-app-cancel",children:"Cancel"}),e.jsx(se,{className:"bg-re-red hover:bg-re-red-hover","data-testid":"onboarding-new-app-submit",children:"Create Application"})]})]})]})})]})}function VE({application:t,onViewDetails:s}){var r;const n=a=>({Submitted:"bg-slate-500","Questionnaire Pending":"bg-orange-500","Questionnaire Completed":"bg-blue-500",Shortlisted:"bg-cyan-500","Level 1 Pending":"bg-red-500","Level 1 Approved":"bg-green-500","Level 2 Pending":"bg-purple-500","Level 2 Approved":"bg-green-600","Level 2 Recommended":"bg-teal-500","Level 3 Pending":"bg-indigo-500","FDD Verification":"bg-violet-500","Payment Pending":"bg-yellow-500","LOI Issued":"bg-lime-500","Dealer Code Generation":"bg-fuchsia-500","Architecture Team Assigned":"bg-blue-500","Architecture Document Upload":"bg-blue-500","Architecture Team Completion":"bg-blue-500","Statutory GST":"bg-emerald-500","Statutory PAN":"bg-emerald-500","Statutory Nodal":"bg-emerald-500","Statutory Check":"bg-emerald-500","Statutory Partnership":"bg-emerald-500","Statutory Firm Reg":"bg-emerald-500","Statutory Virtual Code":"bg-emerald-500","Statutory Domain":"bg-emerald-500","Statutory MSD":"bg-emerald-500","Statutory LOI Ack":"bg-emerald-500","EOR In Progress":"bg-sky-500","LOA Pending":"bg-emerald-500",Approved:"bg-green-700",Rejected:"bg-red-500",Disqualified:"bg-red-700"})[a]||"bg-slate-500";return e.jsxs("div",{className:"bg-white rounded-lg border border-slate-200 p-6 hover:shadow-lg transition-shadow","data-testid":`onboarding-application-card-${t.id}`,children:[e.jsxs("div",{className:"flex items-start justify-between mb-4",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("h3",{className:"text-slate-900","data-testid":"onboarding-application-card-name",children:t.name}),(r=t.tags)==null?void 0:r.map(a=>e.jsx(Ce,{variant:"outline",className:a==="Approved"?"border-green-500 text-green-700":"border-teal-500 text-teal-700","data-testid":`onboarding-application-card-tag-${a}`,children:a},a))]}),e.jsx("p",{className:"text-slate-600","data-testid":"onboarding-application-card-registration",children:t.registrationNumber})]}),e.jsx(Ce,{className:n(t.status),"data-testid":"onboarding-application-card-status",children:t.status})]}),e.jsxs("div",{className:"space-y-3 mb-4",children:[e.jsxs("div",{className:"flex items-center gap-2 text-slate-600",children:[e.jsx(Vr,{className:"w-4 h-4"}),e.jsx("span",{"data-testid":"onboarding-application-card-location",children:t.preferredLocation}),t.rank&&t.totalApplicantsAtLocation&&e.jsxs(Ce,{variant:"outline","data-testid":"onboarding-application-card-rank",children:["Rank ",t.rank,"/",t.totalApplicantsAtLocation]})]}),e.jsxs("div",{className:"flex items-start gap-2 text-slate-600",children:[e.jsx(id,{className:"w-4 h-4 mt-0.5"}),e.jsx("span",{className:"text-sm","data-testid":"onboarding-application-card-address",children:t.businessAddress})]}),e.jsxs("div",{className:"flex items-center gap-2 text-slate-600",children:[e.jsx(Ur,{className:"w-4 h-4"}),e.jsx("span",{"data-testid":"onboarding-application-card-email",children:t.email})]}),e.jsxs("div",{className:"flex items-center gap-2 text-slate-600",children:[e.jsx(tb,{className:"w-4 h-4"}),e.jsx("span",{"data-testid":"onboarding-application-card-phone",children:t.phone})]}),t.questionnaireMarks!==void 0&&e.jsxs("div",{className:"flex items-center gap-2 text-slate-600",children:[e.jsx(rk,{className:"w-4 h-4"}),e.jsxs("span",{"data-testid":"onboarding-application-card-score",children:["Score: ",t.questionnaireMarks,"/100"]})]}),e.jsxs("div",{className:"flex items-center gap-2 text-slate-600",children:[e.jsx(dr,{className:"w-4 h-4"}),e.jsxs("span",{"data-testid":"onboarding-application-card-submission-date",children:["Submitted: ",Yt(t.submissionDate)]})]})]}),e.jsxs("div",{className:"mb-4",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-slate-600",children:"Progress"}),e.jsxs("span",{className:"text-slate-900","data-testid":"onboarding-application-card-progress-text",children:[t.progress,"%"]})]}),e.jsx(hp,{value:t.progress,status:t.status,barClassName:"h-2 w-full bg-status-progress-soft","data-testid":"onboarding-application-card-progress-bar"})]}),t.deadline&&t.status==="Questionnaire Pending"&&e.jsx("div",{className:"mb-4 p-3 bg-orange-50 border border-orange-200 rounded-md","data-testid":"onboarding-application-card-deadline-warning",children:e.jsxs("p",{className:"text-orange-800",children:["Deadline: ",Yt(t.deadline)]})}),e.jsx(se,{onClick:()=>s(t.id),className:"w-full bg-re-red hover:bg-re-red-hover","data-testid":"onboarding-application-card-view-button",children:"View Details"})]})}function Dq({onViewDetails:t,initialFilter:s="all"}){const[n,r]=g.useState("grid"),[a,i]=g.useState(""),[o,d]=g.useState(s),[m,f]=g.useState("all"),[p,h]=g.useState("all"),[x,u]=g.useState([]),[N,v]=g.useState(!1),[w,j]=g.useState(""),[b,C]=g.useState([]),[S,R]=g.useState(!0),[_,A]=g.useState([]),[E,q]=g.useState([]),[O,D]=g.useState(1),[P,L]=g.useState(null);g.useEffect(()=>{Y()},[O,a,o,m,p]),g.useEffect(()=>{D(1)},[a,o,m,p]),g.useEffect(()=>{$()},[]);const $=async()=>{try{const B=await Is.getStates(),K=(Array.isArray(B)?B:(B==null?void 0:B.data)||(B==null?void 0:B.states)||[]).map(H=>typeof H=="string"?H:H.name||H.stateName).filter(Boolean);A(K)}catch(B){console.error("Failed to fetch states:",B)}},Y=async()=>{try{R(!0);const B=await hs.getApplications({page:O,limit:10,search:a,status:o==="all"?void 0:o,location:m!=="all"?m:void 0,state:p!=="all"?p:void 0,isShortlisted:void 0}),G=B.data||[];L(B.meta);const K=G.map(X=>({id:X.id,registrationNumber:X.applicationId||"N/A",name:X.applicantName,email:X.email,phone:X.phone,age:X.age,education:X.education,residentialAddress:X.address||X.city||"",businessAddress:X.address||"",preferredLocation:X.preferredLocation,state:X.state,ownsBike:X.ownRoyalEnfield==="yes",pastExperience:X.experienceYears?`${X.experienceYears} years`:X.description||"",status:X.overallStatus,questionnaireMarks:X.score||X.questionnaireMarks||0,rank:0,totalApplicantsAtLocation:0,submissionDate:X.createdAt,assignedUsers:[],progress:X.progressPercentage||0,isShortlisted:X.isShortlisted||X.ddLeadShortlisted,companyName:X.companyName,source:X.source,existingDealer:X.existingDealer,royalEnfieldModel:X.royalEnfieldModel,description:X.description,pincode:X.pincode,locationType:X.locationType,ownRoyalEnfield:X.ownRoyalEnfield,address:X.address}));C(K);const H=Array.from(new Set(K.map(X=>X.preferredLocation))).filter(Boolean);q(H)}catch(B){console.error("Failed to fetch applications:",B),te.error("Failed to load applications")}finally{R(!1)}},Z=b,W=B=>{u(B?Z.map(G=>G.id):[])},U=(B,G)=>{u(G?[...x,B]:x.filter(K=>K!==B))},M=()=>{if(x.length===0){te.error("Please select at least one application to shortlist");return}v(!0)},z=async()=>{try{te.success(`${x.length} application(s) shortlisted successfully!`),v(!1),Y()}catch{te.error("Failed to shortlist")}},T=["Submitted","Questionnaire Pending","Questionnaire Completed"],I=B=>({Submitted:"bg-blue-100 text-blue-800","Questionnaire Pending":"bg-yellow-100 text-yellow-800","Questionnaire Completed":"bg-cyan-100 text-cyan-800",Shortlisted:"bg-purple-100 text-purple-800","Level 1 Interview Pending":"bg-orange-100 text-orange-800","Level 1 Approved":"bg-green-100 text-green-800","Level 2 Interview Pending":"bg-orange-100 text-orange-800","Level 2 Approved":"bg-green-100 text-green-800","Level 2 Recommended":"bg-teal-100 text-teal-800","Level 3 Interview Pending":"bg-orange-100 text-orange-800","In Review":"bg-slate-100 text-slate-800","Level 3 Approved":"bg-green-100 text-green-800","FDD Verification":"bg-indigo-100 text-indigo-800","Payment Pending":"bg-red-50 text-red-800","LOI In Progress":"bg-sky-100 text-sky-800","LOI Issued":"bg-sky-100 text-sky-800","Dealer Code Generation":"bg-purple-100 text-purple-800","Architecture Team Assigned":"bg-blue-100 text-blue-800","Architecture Document Upload":"bg-blue-100 text-blue-800","Architecture Team Completion":"bg-blue-100 text-blue-800","Statutory GST":"bg-emerald-100 text-emerald-800","Statutory PAN":"bg-emerald-100 text-emerald-800","Statutory Nodal":"bg-emerald-100 text-emerald-800","Statutory Check":"bg-emerald-100 text-emerald-800","Statutory Partnership":"bg-emerald-100 text-emerald-800","Statutory Firm Reg":"bg-emerald-100 text-emerald-800","Statutory Rental":"bg-emerald-100 text-emerald-800","Statutory Virtual Code":"bg-emerald-100 text-emerald-800","Statutory Domain":"bg-emerald-100 text-emerald-800","Statutory MSD":"bg-emerald-100 text-emerald-800","Statutory LOI Ack":"bg-emerald-100 text-emerald-800","EOR In Progress":"bg-violet-100 text-violet-800","EOR Complete":"bg-violet-100 text-violet-800","LOA Pending":"bg-pink-100 text-pink-800",Inauguration:"bg-red-50 text-red-800",Approved:"bg-green-100 text-green-800",Rejected:"bg-red-100 text-red-800",Disqualified:"bg-gray-100 text-gray-800",Onboarded:"bg-emerald-100 text-emerald-800","LOI Approved":"bg-sky-100 text-sky-800","Security Deposit In Progress":"bg-red-50 text-red-800","Security Deposit Approved":"bg-green-100 text-green-800","Security Deposit":"bg-red-50 text-red-800","Security Details In Progress":"bg-red-50 text-red-800","Security Details Approved":"bg-green-100 text-green-800","Security Details":"bg-red-50 text-red-800","LOA Issued":"bg-pink-100 text-pink-800"})[B]||"bg-gray-100 text-gray-800";return e.jsxs("div",{className:"space-y-6",children:[e.jsx("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4","data-testid":"onboarding-all-apps-banner",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(sn,{className:"w-5 h-5 text-re-red flex-shrink-0 mt-0.5"}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-red-900 mb-1",children:"DD Workflow - Initial Application Review"}),e.jsxs("p",{className:"text-red-800",children:["This page shows ",e.jsx("strong",{children:"only applications that haven't been shortlisted yet"}),". Review and select promising candidates using the ",e.jsx("strong",{children:"Shortlist"})," button. Once shortlisted, applications will be removed from here and moved to the ",e.jsx("strong",{children:"Dealership Requests"})," page for further processing."]})]})]})}),e.jsx("div",{className:"bg-white rounded-lg border border-slate-200 p-6",children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"flex flex-col md:flex-row gap-4",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx(Ta,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"}),e.jsx(at,{type:"text",placeholder:"Search by name or registration number...",value:a,onChange:B=>i(B.target.value),className:"pl-10","data-testid":"onboarding-all-apps-search-input"})]}),e.jsxs(Dt,{value:o,onValueChange:d,children:[e.jsx(Et,{className:"w-full md:w-48","data-testid":"onboarding-all-apps-status-filter",children:e.jsx(Rt,{placeholder:"Filter by status"})}),e.jsxs(_t,{children:[e.jsx(Me,{value:"all",children:"All Statuses"}),T.map(B=>e.jsx(Me,{value:B,children:B},B))]})]}),e.jsxs(Dt,{value:p,onValueChange:h,children:[e.jsx(Et,{className:"w-full md:w-48","data-testid":"onboarding-all-apps-state-filter",children:e.jsx(Rt,{placeholder:"Filter by state"})}),e.jsxs(_t,{children:[e.jsx(Me,{value:"all",children:"All States"}),_.map(B=>e.jsx(Me,{value:B,children:B},B))]})]}),e.jsxs(Dt,{value:m,onValueChange:f,children:[e.jsx(Et,{className:"w-full md:w-48","data-testid":"onboarding-all-apps-location-filter",children:e.jsx(Rt,{placeholder:"Filter by location"})}),e.jsxs(_t,{children:[e.jsx(Me,{value:"all",children:"All Locations"}),E.map(B=>e.jsx(Me,{value:B,children:B},B))]})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(se,{variant:n==="grid"?"default":"outline",size:"sm",onClick:()=>r("grid"),className:n==="grid"?"bg-re-red hover:bg-re-red-hover":"","data-testid":"onboarding-all-apps-grid-view-btn",children:[e.jsx(ok,{className:"w-4 h-4 mr-2"}),"Grid"]}),e.jsxs(se,{variant:n==="table"?"default":"outline",size:"sm",onClick:()=>r("table"),className:n==="table"?"bg-re-red hover:bg-re-red-hover":"","data-testid":"onboarding-all-apps-table-view-btn",children:[e.jsx(uk,{className:"w-4 h-4 mr-2"}),"Table"]})]}),e.jsxs(se,{variant:"outline",size:"sm","data-testid":"onboarding-all-apps-export-btn",children:[e.jsx(ji,{className:"w-4 h-4 mr-2"}),"Export"]}),x.length>0&&e.jsx(e.Fragment,{children:e.jsxs(se,{size:"sm",onClick:M,className:"bg-green-600 hover:bg-green-700","data-testid":"onboarding-all-apps-shortlist-btn",children:[e.jsx(un,{className:"w-4 h-4 mr-2"}),"Shortlist (",x.length,")"]})}),e.jsx("div",{className:"ml-auto",children:e.jsxs(Ce,{variant:"outline",className:"text-slate-600","data-testid":"onboarding-all-apps-pending-badge",children:[(P==null?void 0:P.total)||Z.length," pending shortlisting"]})})]})]})}),S?e.jsx("div",{className:"flex justify-center items-center h-96 bg-white rounded-lg border border-slate-200",children:e.jsx(ns,{className:"w-8 h-8 animate-spin text-re-red"})}):n==="grid"?e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4","data-testid":"onboarding-all-apps-grid-container",children:Z.map((B,G)=>e.jsxs("div",{className:"relative","data-testid":`onboarding-all-apps-grid-item-${G}`,children:[e.jsx("div",{className:"absolute top-4 left-4 z-10",children:e.jsx(Ln,{checked:x.includes(B.id),onCheckedChange:K=>U(B.id,K),className:"bg-white","data-testid":`onboarding-all-apps-grid-checkbox-${G}`})}),B.isShortlisted&&e.jsx("div",{className:"absolute top-4 right-4 z-10",children:e.jsx(Ce,{className:"bg-green-600","data-testid":`onboarding-all-apps-grid-shortlisted-badge-${G}`,children:"Shortlisted"})}),e.jsx(VE,{application:B,onViewDetails:t})]},B.id))}):e.jsx("div",{className:"bg-white rounded-lg border border-slate-200",children:e.jsxs(Ts,{"data-testid":"onboarding-all-apps-table",children:[e.jsx(Ps,{children:e.jsxs(it,{children:[e.jsx(fe,{className:"w-12",children:e.jsx(Ln,{checked:x.length===Z.length&&Z.length>0,onCheckedChange:W,"data-testid":"onboarding-all-apps-header-checkbox"})}),e.jsx(fe,{children:"Registration"}),e.jsx(fe,{children:"Name"}),e.jsx(fe,{children:"Location"}),e.jsx(fe,{children:"Status"}),e.jsx(fe,{children:"Shortlisted"}),e.jsx(fe,{children:"Progress"}),e.jsx(fe,{children:"Submitted"})]})}),e.jsx(Os,{children:Z.map((B,G)=>e.jsxs(it,{className:"cursor-pointer hover:bg-slate-50",onClick:()=>t(B.id),"data-testid":`onboarding-all-apps-row-${G}`,children:[e.jsx(ue,{onClick:K=>K.stopPropagation(),children:e.jsx(Ln,{checked:x.includes(B.id),onCheckedChange:K=>U(B.id,K),"data-testid":`onboarding-all-apps-checkbox-${G}`})}),e.jsx(ue,{children:e.jsx("span",{className:"text-slate-900","data-testid":`onboarding-all-apps-reg-id-${G}`,children:B.registrationNumber})}),e.jsx(ue,{children:e.jsx("span",{className:"text-slate-900","data-testid":`onboarding-all-apps-name-${G}`,children:B.name})}),e.jsx(ue,{children:e.jsx("span",{className:"text-slate-600","data-testid":`onboarding-all-apps-location-${G}`,children:B.preferredLocation})}),e.jsx(ue,{children:e.jsx(Ce,{className:I(B.status),"data-testid":`onboarding-all-apps-status-${G}`,children:B.status})}),e.jsx(ue,{children:B.isShortlisted?e.jsx(Ce,{className:"bg-green-600","data-testid":`onboarding-all-apps-shortlisted-yes-${G}`,children:"Yes"}):e.jsx(Ce,{variant:"outline","data-testid":`onboarding-all-apps-shortlisted-no-${G}`,children:"No"})}),e.jsx(ue,{children:e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(hp,{value:B.progress,status:B.status,showPercent:!0,"data-testid":`onboarding-all-apps-progress-bar-${G}`})})}),e.jsx(ue,{children:e.jsx("span",{className:"text-slate-600","data-testid":`onboarding-all-apps-date-${G}`,children:Yt(B.submissionDate)})})]},B.id))})]})}),P&&P.totalPages>1&&e.jsx("div",{className:"py-6 border-t border-slate-200 bg-white rounded-b-lg",children:e.jsx(fo,{children:e.jsxs(po,{children:[e.jsx(Sn,{children:e.jsx(xo,{onClick:()=>D(B=>Math.max(1,B-1)),className:O===1?"pointer-events-none opacity-50":"cursor-pointer"})}),[...Array(P.totalPages)].map((B,G)=>{const K=G+1;return K===1||K===P.totalPages||K>=O-1&&K<=O+1?e.jsx(Sn,{children:e.jsx(Vi,{isActive:O===K,onClick:()=>D(K),className:"cursor-pointer",children:K})},K):K===O-2||K===O+2?e.jsx(Sn,{children:e.jsx(vo,{})},K):null}),e.jsx(Sn,{children:e.jsx(go,{onClick:()=>D(B=>Math.min(P.totalPages,B+1)),className:O===P.totalPages?"pointer-events-none opacity-50":"cursor-pointer"})})]})})}),e.jsx(ds,{open:N,onOpenChange:v,children:e.jsxs(os,{"data-testid":"onboarding-all-apps-shortlist-modal",children:[e.jsxs(xs,{children:[e.jsx(ms,{"data-testid":"onboarding-all-apps-shortlist-title",children:"Shortlist Applications"}),e.jsxs(bs,{"data-testid":"onboarding-all-apps-shortlist-desc",children:["You are about to shortlist ",x.length," application(s). These applications will be moved to the Dealership Requests page."]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx(de,{htmlFor:"shortlist-remark",children:"Shortlisting Remark (Optional)"}),e.jsx(Ws,{id:"shortlist-remark",placeholder:"Enter reason for shortlisting these applications...",value:w,onChange:B=>j(B.target.value),className:"mt-2",rows:4,"data-testid":"onboarding-all-apps-shortlist-remark"})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx(se,{variant:"outline",className:"flex-1",onClick:()=>v(!1),"data-testid":"onboarding-all-apps-shortlist-cancel",children:"Cancel"}),e.jsx(se,{className:"flex-1 bg-green-600 hover:bg-green-700",onClick:z,"data-testid":"onboarding-all-apps-shortlist-confirm",children:"Confirm Shortlist"})]})]})]})})]})}function Rq(t){const s=Eq(t),n=g.forwardRef((r,a)=>{const{children:i,...o}=r,d=g.Children.toArray(i),m=d.find(Tq);if(m){const f=m.props.children,p=d.map(h=>h===m?g.Children.count(f)>1?g.Children.only(null):g.isValidElement(f)?f.props.children:null:h);return e.jsx(s,{...o,ref:a,children:g.isValidElement(f)?g.cloneElement(f,void 0,p):null})}return e.jsx(s,{...o,ref:a,children:i})});return n.displayName=`${t}.Slot`,n}function Eq(t){const s=g.forwardRef((n,r)=>{const{children:a,...i}=n;if(g.isValidElement(a)){const o=Oq(a),d=Pq(i,a.props);return a.type!==g.Fragment&&(d.ref=r?Xr(r,o):o),g.cloneElement(a,d)}return g.Children.count(a)>1?g.Children.only(null):null});return s.displayName=`${t}.SlotClone`,s}var _q=Symbol("radix.slottable");function Tq(t){return g.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===_q}function Pq(t,s){const n={...s};for(const r in s){const a=t[r],i=s[r];/^on[A-Z]/.test(r)?a&&i?n[r]=(...d)=>{const m=i(...d);return a(...d),m}:a&&(n[r]=a):r==="style"?n[r]={...a,...i}:r==="className"&&(n[r]=[a,i].filter(Boolean).join(" "))}return{...t,...n}}function Oq(t){var r,a;let s=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=s&&"isReactWarning"in s&&s.isReactWarning;return n?t.ref:(s=(a=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:a.get,n=s&&"isReactWarning"in s&&s.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var mp="Popover",[HE]=ga(mp,[oo]),sh=oo(),[Lq,yo]=HE(mp),WE=t=>{const{__scopePopover:s,children:n,open:r,defaultOpen:a,onOpenChange:i,modal:o=!1}=t,d=sh(s),m=g.useRef(null),[f,p]=g.useState(!1),[h,x]=Bi({prop:r,defaultProp:a??!1,onChange:i,caller:mp});return e.jsx(Hf,{...d,children:e.jsx(Lq,{scope:s,contentId:Ar(),triggerRef:m,open:h,onOpenChange:x,onOpenToggle:g.useCallback(()=>x(u=>!u),[x]),hasCustomAnchor:f,onCustomAnchorAdd:g.useCallback(()=>p(!0),[]),onCustomAnchorRemove:g.useCallback(()=>p(!1),[]),modal:o,children:n})})};WE.displayName=mp;var GE="PopoverAnchor",Iq=g.forwardRef((t,s)=>{const{__scopePopover:n,...r}=t,a=yo(GE,n),i=sh(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:d}=a;return g.useEffect(()=>(o(),()=>d()),[o,d]),e.jsx(Qu,{...i,...r,ref:s})});Iq.displayName=GE;var KE="PopoverTrigger",YE=g.forwardRef((t,s)=>{const{__scopePopover:n,...r}=t,a=yo(KE,n),i=sh(n),o=Gs(s,a.triggerRef),d=e.jsx(js.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":e_(a.open),...r,ref:o,onClick:Kt(t.onClick,a.onOpenToggle)});return a.hasCustomAnchor?d:e.jsx(Qu,{asChild:!0,...i,children:d})});YE.displayName=KE;var Jb="PopoverPortal",[Mq,Fq]=HE(Jb,{forceMount:void 0}),ZE=t=>{const{__scopePopover:s,forceMount:n,children:r,container:a}=t,i=yo(Jb,s);return e.jsx(Mq,{scope:s,forceMount:n,children:e.jsx(Dr,{present:n||i.open,children:e.jsx(wd,{asChild:!0,container:a,children:r})})})};ZE.displayName=Jb;var md="PopoverContent",QE=g.forwardRef((t,s)=>{const n=Fq(md,t.__scopePopover),{forceMount:r=n.forceMount,...a}=t,i=yo(md,t.__scopePopover);return e.jsx(Dr,{present:r||i.open,children:i.modal?e.jsx($q,{...a,ref:s}):e.jsx(qq,{...a,ref:s})})});QE.displayName=md;var Bq=Rq("PopoverContent.RemoveScroll"),$q=g.forwardRef((t,s)=>{const n=yo(md,t.__scopePopover),r=g.useRef(null),a=Gs(s,r),i=g.useRef(!1);return g.useEffect(()=>{const o=r.current;if(o)return Yf(o)},[]),e.jsx(Ju,{as:Bq,allowPinchZoom:!0,children:e.jsx(XE,{...t,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Kt(t.onCloseAutoFocus,o=>{var d;o.preventDefault(),i.current||(d=n.triggerRef.current)==null||d.focus()}),onPointerDownOutside:Kt(t.onPointerDownOutside,o=>{const d=o.detail.originalEvent,m=d.button===0&&d.ctrlKey===!0,f=d.button===2||m;i.current=f},{checkForDefaultPrevented:!1}),onFocusOutside:Kt(t.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1})})})}),qq=g.forwardRef((t,s)=>{const n=yo(md,t.__scopePopover),r=g.useRef(!1),a=g.useRef(!1);return e.jsx(XE,{...t,ref:s,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,d;(o=t.onCloseAutoFocus)==null||o.call(t,i),i.defaultPrevented||(r.current||(d=n.triggerRef.current)==null||d.focus(),i.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:i=>{var m,f;(m=t.onInteractOutside)==null||m.call(t,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const o=i.target;((f=n.triggerRef.current)==null?void 0:f.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&a.current&&i.preventDefault()}})}),XE=g.forwardRef((t,s)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:o,onEscapeKeyDown:d,onPointerDownOutside:m,onFocusOutside:f,onInteractOutside:p,...h}=t,x=yo(md,n),u=sh(n);return $f(),e.jsx(Yu,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:i,children:e.jsx(bd,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:p,onEscapeKeyDown:d,onPointerDownOutside:m,onFocusOutside:f,onDismiss:()=>x.onOpenChange(!1),children:e.jsx(Wf,{"data-state":e_(x.open),role:"dialog",id:x.contentId,...u,...h,ref:s,style:{...h.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)"}})})})}),JE="PopoverClose",zq=g.forwardRef((t,s)=>{const{__scopePopover:n,...r}=t,a=yo(JE,n);return e.jsx(js.button,{type:"button",...r,ref:s,onClick:Kt(t.onClick,()=>a.onOpenChange(!1))})});zq.displayName=JE;var Uq="PopoverArrow",Vq=g.forwardRef((t,s)=>{const{__scopePopover:n,...r}=t,a=sh(n);return e.jsx(Gf,{...a,...r,ref:s})});Vq.displayName=Uq;function e_(t){return t?"open":"closed"}var Hq=WE,Wq=YE,Gq=ZE,Kq=QE;function _u({...t}){return e.jsx(Hq,{"data-slot":"popover",...t})}function Tu({...t}){return e.jsx(Wq,{"data-slot":"popover-trigger",...t})}function Pu({className:t,align:s="center",sideOffset:n=4,...r}){return e.jsx(Gq,{children:e.jsx(Kq,{"data-slot":"popover-content",align:s,sideOffset:n,className:Nt("bg-popover 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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",t),...r})})}var Ms=function(){return Ms=Object.assign||function(s){for(var n,r=1,a=arguments.length;r1&&(m||!f),h=s>1&&(f||!m),x=function(){r&&i(r)},u=function(){a&&i(a)};return e.jsx(kz,{displayMonth:t.displayMonth,hideNext:p,hidePrevious:h,nextMonth:a,previousMonth:r,onPreviousClick:x,onNextClick:u})}function Dz(t){var s,n=Rn(),r=n.classNames,a=n.disableNavigation,i=n.styles,o=n.captionLayout,d=n.components,m=(s=d==null?void 0:d.CaptionLabel)!==null&&s!==void 0?s:n_,f;return a?f=e.jsx(m,{id:t.id,displayMonth:t.displayMonth}):o==="dropdown"?f=e.jsx(SS,{displayMonth:t.displayMonth,id:t.id}):o==="dropdown-buttons"?f=e.jsxs(e.Fragment,{children:[e.jsx(SS,{displayMonth:t.displayMonth,displayIndex:t.displayIndex,id:t.id}),e.jsx(CS,{displayMonth:t.displayMonth,displayIndex:t.displayIndex,id:t.id})]}):f=e.jsxs(e.Fragment,{children:[e.jsx(m,{id:t.id,displayMonth:t.displayMonth,displayIndex:t.displayIndex}),e.jsx(CS,{displayMonth:t.displayMonth,id:t.id})]}),e.jsx("div",{className:r.caption,style:i.caption,children:f})}function Rz(t){var s=Rn(),n=s.footer,r=s.styles,a=s.classNames.tfoot;return n?e.jsx("tfoot",{className:a,style:r.tfoot,children:e.jsx("tr",{children:e.jsx("td",{colSpan:8,children:n})})}):e.jsx(e.Fragment,{})}function Ez(t,s,n){for(var r=n?ic(new Date):qi(new Date,{locale:t,weekStartsOn:s}),a=[],i=0;i<7;i++){var o=Zr(r,i);a.push(o)}return a}function _z(){var t=Rn(),s=t.classNames,n=t.styles,r=t.showWeekNumber,a=t.locale,i=t.weekStartsOn,o=t.ISOWeek,d=t.formatters.formatWeekdayName,m=t.labels.labelWeekday,f=Ez(a,i,o);return e.jsxs("tr",{style:n.head_row,className:s.head_row,children:[r&&e.jsx("td",{style:n.head_cell,className:s.head_cell}),f.map(function(p,h){return e.jsx("th",{scope:"col",className:s.head_cell,style:n.head_cell,"aria-label":m(p,{locale:a}),children:d(p,{locale:a})},h)})]})}function Tz(){var t,s=Rn(),n=s.classNames,r=s.styles,a=s.components,i=(t=a==null?void 0:a.HeadRow)!==null&&t!==void 0?t:_z;return e.jsx("thead",{style:r.head,className:n.head,children:e.jsx(i,{})})}function Pz(t){var s=Rn(),n=s.locale,r=s.formatters.formatDay;return e.jsx(e.Fragment,{children:r(t.date,{locale:n})})}var ej=g.createContext(void 0);function Oz(t){if(!nh(t.initialProps)){var s={selected:void 0,modifiers:{disabled:[]}};return e.jsx(ej.Provider,{value:s,children:t.children})}return e.jsx(Lz,{initialProps:t.initialProps,children:t.children})}function Lz(t){var s=t.initialProps,n=t.children,r=s.selected,a=s.min,i=s.max,o=function(f,p,h){var x,u;(x=s.onDayClick)===null||x===void 0||x.call(s,f,p,h);var N=!!(p.selected&&a&&(r==null?void 0:r.length)===a);if(!N){var v=!!(!p.selected&&i&&(r==null?void 0:r.length)===i);if(!v){var w=r?t_([],r):[];if(p.selected){var j=w.findIndex(function(b){return ha(f,b)});w.splice(j,1)}else w.push(f);(u=s.onSelect)===null||u===void 0||u.call(s,w,f,p,h)}}},d={disabled:[]};r&&d.disabled.push(function(f){var p=i&&r.length>i-1,h=r.some(function(x){return ha(x,f)});return!!(p&&!h)});var m={selected:r,onDayClick:o,modifiers:d};return e.jsx(ej.Provider,{value:m,children:n})}function tj(){var t=g.useContext(ej);if(!t)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return t}function Iz(t,s){var n=s||{},r=n.from,a=n.to;return r&&a?ha(a,t)&&ha(r,t)?void 0:ha(a,t)?{from:a,to:void 0}:ha(r,t)?void 0:jy(r,t)?{from:t,to:a}:{from:r,to:t}:a?jy(t,a)?{from:a,to:t}:{from:t,to:a}:r?iR(t,r)?{from:t,to:r}:{from:r,to:t}:{from:t,to:void 0}}var sj=g.createContext(void 0);function Mz(t){if(!rh(t.initialProps)){var s={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return e.jsx(sj.Provider,{value:s,children:t.children})}return e.jsx(Fz,{initialProps:t.initialProps,children:t.children})}function Fz(t){var s=t.initialProps,n=t.children,r=s.selected,a=r||{},i=a.from,o=a.to,d=s.min,m=s.max,f=function(u,N,v){var w,j;(w=s.onDayClick)===null||w===void 0||w.call(s,u,N,v);var b=Iz(u,r);(j=s.onSelect)===null||j===void 0||j.call(s,b,u,N,v)},p={range_start:[],range_end:[],range_middle:[],disabled:[]};if(i?(p.range_start=[i],o?(p.range_end=[o],ha(i,o)||(p.range_middle=[{after:i,before:o}])):p.range_end=[i]):o&&(p.range_start=[o],p.range_end=[o]),d&&(i&&!o&&p.disabled.push({after:Og(i,d-1),before:Zr(i,d-1)}),i&&o&&p.disabled.push({after:i,before:Zr(i,d-1)}),!i&&o&&p.disabled.push({after:Og(o,d-1),before:Zr(o,d-1)})),m){if(i&&!o&&(p.disabled.push({before:Zr(i,-m+1)}),p.disabled.push({after:Zr(i,m-1)})),i&&o){var h=Ii(o,i)+1,x=m-h;p.disabled.push({before:Og(i,x)}),p.disabled.push({after:Zr(o,x)})}!i&&o&&(p.disabled.push({before:Zr(o,-m+1)}),p.disabled.push({after:Zr(o,m-1)}))}return e.jsx(sj.Provider,{value:{selected:r,onDayClick:f,modifiers:p},children:n})}function nj(){var t=g.useContext(sj);if(!t)throw new Error("useSelectRange must be used within a SelectRangeProvider");return t}function Wm(t){return Array.isArray(t)?t_([],t):t!==void 0?[t]:[]}function Bz(t){var s={};return Object.entries(t).forEach(function(n){var r=n[0],a=n[1];s[r]=Wm(a)}),s}var vi;(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"})(vi||(vi={}));var $z=vi.Selected,il=vi.Disabled,qz=vi.Hidden,zz=vi.Today,Bg=vi.RangeEnd,$g=vi.RangeMiddle,qg=vi.RangeStart,Uz=vi.Outside;function Vz(t,s,n){var r,a=(r={},r[$z]=Wm(t.selected),r[il]=Wm(t.disabled),r[qz]=Wm(t.hidden),r[zz]=[t.today],r[Bg]=[],r[$g]=[],r[qg]=[],r[Uz]=[],r);return t.fromDate&&a[il].push({before:t.fromDate}),t.toDate&&a[il].push({after:t.toDate}),nh(t)?a[il]=a[il].concat(s.modifiers[il]):rh(t)&&(a[il]=a[il].concat(n.modifiers[il]),a[qg]=n.modifiers[qg],a[$g]=n.modifiers[$g],a[Bg]=n.modifiers[Bg]),a}var i_=g.createContext(void 0);function Hz(t){var s=Rn(),n=tj(),r=nj(),a=Vz(s,n,r),i=Bz(s.modifiers),o=Ms(Ms({},a),i);return e.jsx(i_.Provider,{value:o,children:t.children})}function l_(){var t=g.useContext(i_);if(!t)throw new Error("useModifiers must be used within a ModifiersProvider");return t}function Wz(t){return!!(t&&typeof t=="object"&&"before"in t&&"after"in t)}function Gz(t){return!!(t&&typeof t=="object"&&"from"in t)}function Kz(t){return!!(t&&typeof t=="object"&&"after"in t)}function Yz(t){return!!(t&&typeof t=="object"&&"before"in t)}function Zz(t){return!!(t&&typeof t=="object"&&"dayOfWeek"in t)}function Qz(t,s){var n,r=s.from,a=s.to;if(r&&a){var i=Ii(a,r)<0;i&&(n=[a,r],r=n[0],a=n[1]);var o=Ii(t,r)>=0&&Ii(a,t)>=0;return o}return a?ha(a,t):r?ha(r,t):!1}function Xz(t){return Rb(t)}function Jz(t){return Array.isArray(t)&&t.every(Rb)}function eU(t,s){return s.some(function(n){if(typeof n=="boolean")return n;if(Xz(n))return ha(t,n);if(Jz(n))return n.includes(t);if(Gz(n))return Qz(t,n);if(Zz(n))return n.dayOfWeek.includes(t.getDay());if(Wz(n)){var r=Ii(n.before,t),a=Ii(n.after,t),i=r>0,o=a<0,d=jy(n.before,n.after);return d?o&&i:i||o}return Kz(n)?Ii(t,n.after)>0:Yz(n)?Ii(n.before,t)>0:typeof n=="function"?n(t):!1})}function rj(t,s,n){var r=Object.keys(s).reduce(function(i,o){var d=s[o];return eU(t,d)&&i.push(o),i},[]),a={};return r.forEach(function(i){return a[i]=!0}),n&&!Tb(t,n)&&(a.outside=!0),a}function tU(t,s){for(var n=pa(t[0]),r=sp(t[t.length-1]),a,i,o=n;o<=r;){var d=rj(o,s),m=!d.disabled&&!d.hidden;if(!m){o=Zr(o,1);continue}if(d.selected)return o;d.today&&!i&&(i=o),a||(a=o),o=Zr(o,1)}return i||a}var sU=365;function o_(t,s){var n=s.moveBy,r=s.direction,a=s.context,i=s.modifiers,o=s.retry,d=o===void 0?{count:0,lastFocused:t}:o,m=a.weekStartsOn,f=a.fromDate,p=a.toDate,h=a.locale,x={day:Zr,week:by,month:gi,year:G9,startOfWeek:function(w){return a.ISOWeek?ic(w):qi(w,{locale:h,weekStartsOn:m})},endOfWeek:function(w){return a.ISOWeek?eR(w):Eb(w,{locale:h,weekStartsOn:m})}},u=x[n](t,r==="after"?1:-1);r==="before"&&f?u=K9([f,u]):r==="after"&&p&&(u=Y9([p,u]));var N=!0;if(i){var v=rj(u,i);N=!v.disabled&&!v.hidden}return N?u:d.count>sU?d.lastFocused:o_(u,{moveBy:n,direction:r,context:a,modifiers:i,retry:Ms(Ms({},d),{count:d.count+1})})}var c_=g.createContext(void 0);function nU(t){var s=ah(),n=l_(),r=g.useState(),a=r[0],i=r[1],o=g.useState(),d=o[0],m=o[1],f=tU(s.displayMonths,n),p=a??(d&&s.isDateDisplayed(d))?d:f,h=function(){m(a),i(void 0)},x=function(w){i(w)},u=Rn(),N=function(w,j){if(a){var b=o_(a,{moveBy:w,direction:j,context:u,modifiers:n});ha(a,b)||(s.goToDate(b,a),x(b))}},v={focusedDay:a,focusTarget:p,blur:h,focus:x,focusDayAfter:function(){return N("day","after")},focusDayBefore:function(){return N("day","before")},focusWeekAfter:function(){return N("week","after")},focusWeekBefore:function(){return N("week","before")},focusMonthBefore:function(){return N("month","before")},focusMonthAfter:function(){return N("month","after")},focusYearBefore:function(){return N("year","before")},focusYearAfter:function(){return N("year","after")},focusStartOfWeek:function(){return N("startOfWeek","before")},focusEndOfWeek:function(){return N("endOfWeek","after")}};return e.jsx(c_.Provider,{value:v,children:t.children})}function aj(){var t=g.useContext(c_);if(!t)throw new Error("useFocusContext must be used within a FocusProvider");return t}function rU(t,s){var n=l_(),r=rj(t,n,s);return r}var ij=g.createContext(void 0);function aU(t){if(!fp(t.initialProps)){var s={selected:void 0};return e.jsx(ij.Provider,{value:s,children:t.children})}return e.jsx(iU,{initialProps:t.initialProps,children:t.children})}function iU(t){var s=t.initialProps,n=t.children,r=function(i,o,d){var m,f,p;if((m=s.onDayClick)===null||m===void 0||m.call(s,i,o,d),o.selected&&!s.required){(f=s.onSelect)===null||f===void 0||f.call(s,void 0,i,o,d);return}(p=s.onSelect)===null||p===void 0||p.call(s,i,i,o,d)},a={selected:s.selected,onDayClick:r};return e.jsx(ij.Provider,{value:a,children:n})}function d_(){var t=g.useContext(ij);if(!t)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return t}function lU(t,s){var n=Rn(),r=d_(),a=tj(),i=nj(),o=aj(),d=o.focusDayAfter,m=o.focusDayBefore,f=o.focusWeekAfter,p=o.focusWeekBefore,h=o.blur,x=o.focus,u=o.focusMonthBefore,N=o.focusMonthAfter,v=o.focusYearBefore,w=o.focusYearAfter,j=o.focusStartOfWeek,b=o.focusEndOfWeek,C=function(W){var U,M,z,T;fp(n)?(U=r.onDayClick)===null||U===void 0||U.call(r,t,s,W):nh(n)?(M=a.onDayClick)===null||M===void 0||M.call(a,t,s,W):rh(n)?(z=i.onDayClick)===null||z===void 0||z.call(i,t,s,W):(T=n.onDayClick)===null||T===void 0||T.call(n,t,s,W)},S=function(W){var U;x(t),(U=n.onDayFocus)===null||U===void 0||U.call(n,t,s,W)},R=function(W){var U;h(),(U=n.onDayBlur)===null||U===void 0||U.call(n,t,s,W)},_=function(W){var U;(U=n.onDayMouseEnter)===null||U===void 0||U.call(n,t,s,W)},A=function(W){var U;(U=n.onDayMouseLeave)===null||U===void 0||U.call(n,t,s,W)},E=function(W){var U;(U=n.onDayPointerEnter)===null||U===void 0||U.call(n,t,s,W)},q=function(W){var U;(U=n.onDayPointerLeave)===null||U===void 0||U.call(n,t,s,W)},O=function(W){var U;(U=n.onDayTouchCancel)===null||U===void 0||U.call(n,t,s,W)},D=function(W){var U;(U=n.onDayTouchEnd)===null||U===void 0||U.call(n,t,s,W)},P=function(W){var U;(U=n.onDayTouchMove)===null||U===void 0||U.call(n,t,s,W)},L=function(W){var U;(U=n.onDayTouchStart)===null||U===void 0||U.call(n,t,s,W)},$=function(W){var U;(U=n.onDayKeyUp)===null||U===void 0||U.call(n,t,s,W)},Y=function(W){var U;switch(W.key){case"ArrowLeft":W.preventDefault(),W.stopPropagation(),n.dir==="rtl"?d():m();break;case"ArrowRight":W.preventDefault(),W.stopPropagation(),n.dir==="rtl"?m():d();break;case"ArrowDown":W.preventDefault(),W.stopPropagation(),f();break;case"ArrowUp":W.preventDefault(),W.stopPropagation(),p();break;case"PageUp":W.preventDefault(),W.stopPropagation(),W.shiftKey?v():u();break;case"PageDown":W.preventDefault(),W.stopPropagation(),W.shiftKey?w():N();break;case"Home":W.preventDefault(),W.stopPropagation(),j();break;case"End":W.preventDefault(),W.stopPropagation(),b();break}(U=n.onDayKeyDown)===null||U===void 0||U.call(n,t,s,W)},Z={onClick:C,onFocus:S,onBlur:R,onKeyDown:Y,onKeyUp:$,onMouseEnter:_,onMouseLeave:A,onPointerEnter:E,onPointerLeave:q,onTouchCancel:O,onTouchEnd:D,onTouchMove:P,onTouchStart:L};return Z}function oU(){var t=Rn(),s=d_(),n=tj(),r=nj(),a=fp(t)?s.selected:nh(t)?n.selected:rh(t)?r.selected:void 0;return a}function cU(t){return Object.values(vi).includes(t)}function dU(t,s){var n=[t.classNames.day];return Object.keys(s).forEach(function(r){var a=t.modifiersClassNames[r];if(a)n.push(a);else if(cU(r)){var i=t.classNames["day_".concat(r)];i&&n.push(i)}}),n}function uU(t,s){var n=Ms({},t.styles.day);return Object.keys(s).forEach(function(r){var a;n=Ms(Ms({},n),(a=t.modifiersStyles)===null||a===void 0?void 0:a[r])}),n}function hU(t,s,n){var r,a,i,o=Rn(),d=aj(),m=rU(t,s),f=lU(t,m),p=oU(),h=!!(o.onDayClick||o.mode!=="default");g.useEffect(function(){var _;m.outside||d.focusedDay&&h&&ha(d.focusedDay,t)&&((_=n.current)===null||_===void 0||_.focus())},[d.focusedDay,t,n,h,m.outside]);var x=dU(o,m).join(" "),u=uU(o,m),N=!!(m.outside&&!o.showOutsideDays||m.hidden),v=(i=(a=o.components)===null||a===void 0?void 0:a.DayContent)!==null&&i!==void 0?i:Pz,w=e.jsx(v,{date:t,displayMonth:s,activeModifiers:m}),j={style:u,className:x,children:w,role:"gridcell"},b=d.focusTarget&&ha(d.focusTarget,t)&&!m.outside,C=d.focusedDay&&ha(d.focusedDay,t),S=Ms(Ms(Ms({},j),(r={disabled:m.disabled,role:"gridcell"},r["aria-selected"]=m.selected,r.tabIndex=C||b?0:-1,r)),f),R={isButton:h,isHidden:N,activeModifiers:m,selectedDays:p,buttonProps:S,divProps:j};return R}function mU(t){var s=g.useRef(null),n=hU(t.date,t.displayMonth,s);return n.isHidden?e.jsx("div",{role:"gridcell"}):n.isButton?e.jsx(yf,Ms({name:"day",ref:s},n.buttonProps)):e.jsx("div",Ms({},n.divProps))}function fU(t){var s=t.number,n=t.dates,r=Rn(),a=r.onWeekNumberClick,i=r.styles,o=r.classNames,d=r.locale,m=r.labels.labelWeekNumber,f=r.formatters.formatWeekNumber,p=f(Number(s),{locale:d});if(!a)return e.jsx("span",{className:o.weeknumber,style:i.weeknumber,children:p});var h=m(Number(s),{locale:d}),x=function(u){a(s,n,u)};return e.jsx(yf,{name:"week-number","aria-label":h,className:o.weeknumber,style:i.weeknumber,onClick:x,children:p})}function pU(t){var s,n,r=Rn(),a=r.styles,i=r.classNames,o=r.showWeekNumber,d=r.components,m=(s=d==null?void 0:d.Day)!==null&&s!==void 0?s:mU,f=(n=d==null?void 0:d.WeekNumber)!==null&&n!==void 0?n:fU,p;return o&&(p=e.jsx("td",{className:i.cell,style:a.cell,children:e.jsx(f,{number:t.weekNumber,dates:t.dates})})),e.jsxs("tr",{className:i.row,style:a.row,children:[p,t.dates.map(function(h){return e.jsx("td",{className:i.cell,style:a.cell,role:"presentation",children:e.jsx(m,{displayMonth:t.displayMonth,date:h})},s$(h))})]})}function AS(t,s,n){for(var r=n!=null&&n.ISOWeek?eR(s):Eb(s,n),a=n!=null&&n.ISOWeek?ic(t):qi(t,n),i=Ii(r,a),o=[],d=0;d<=i;d++)o.push(Zr(a,d));var m=o.reduce(function(f,p){var h=n!=null&&n.ISOWeek?tR(p):nR(p,n),x=f.find(function(u){return u.weekNumber===h});return x?(x.dates.push(p),f):(f.push({weekNumber:h,dates:[p]}),f)},[]);return m}function xU(t,s){var n=AS(pa(t),sp(t),s);if(s!=null&&s.useFixedWeeks){var r=r$(t,s);if(r<6){var a=n[n.length-1],i=a.dates[a.dates.length-1],o=by(i,6-r),d=AS(by(i,1),o,s);n.push.apply(n,d)}}return n}function gU(t){var s,n,r,a=Rn(),i=a.locale,o=a.classNames,d=a.styles,m=a.hideHead,f=a.fixedWeeks,p=a.components,h=a.weekStartsOn,x=a.firstWeekContainsDate,u=a.ISOWeek,N=xU(t.displayMonth,{useFixedWeeks:!!f,ISOWeek:u,locale:i,weekStartsOn:h,firstWeekContainsDate:x}),v=(s=p==null?void 0:p.Head)!==null&&s!==void 0?s:Tz,w=(n=p==null?void 0:p.Row)!==null&&n!==void 0?n:pU,j=(r=p==null?void 0:p.Footer)!==null&&r!==void 0?r:Rz;return e.jsxs("table",{id:t.id,className:o.table,style:d.table,role:"grid","aria-labelledby":t["aria-labelledby"],children:[!m&&e.jsx(v,{}),e.jsx("tbody",{className:o.tbody,style:d.tbody,children:N.map(function(b){return e.jsx(w,{displayMonth:t.displayMonth,dates:b.dates,weekNumber:b.weekNumber},b.weekNumber)})}),e.jsx(j,{displayMonth:t.displayMonth})]})}function vU(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var yU=vU()?g.useLayoutEffect:g.useEffect,zg=!1,bU=0;function kS(){return"react-day-picker-".concat(++bU)}function jU(t){var s,n=t??(zg?kS():null),r=g.useState(n),a=r[0],i=r[1];return yU(function(){a===null&&i(kS())},[]),g.useEffect(function(){zg===!1&&(zg=!0)},[]),(s=t??a)!==null&&s!==void 0?s:void 0}function NU(t){var s,n,r=Rn(),a=r.dir,i=r.classNames,o=r.styles,d=r.components,m=ah().displayMonths,f=jU(r.id?"".concat(r.id,"-").concat(t.displayIndex):void 0),p=r.id?"".concat(r.id,"-grid-").concat(t.displayIndex):void 0,h=[i.month],x=o.month,u=t.displayIndex===0,N=t.displayIndex===m.length-1,v=!u&&!N;a==="rtl"&&(s=[u,N],N=s[0],u=s[1]),u&&(h.push(i.caption_start),x=Ms(Ms({},x),o.caption_start)),N&&(h.push(i.caption_end),x=Ms(Ms({},x),o.caption_end)),v&&(h.push(i.caption_between),x=Ms(Ms({},x),o.caption_between));var w=(n=d==null?void 0:d.Caption)!==null&&n!==void 0?n:Dz;return e.jsxs("div",{className:h.join(" "),style:x,children:[e.jsx(w,{id:f,displayMonth:t.displayMonth,displayIndex:t.displayIndex}),e.jsx(gU,{id:p,"aria-labelledby":f,displayMonth:t.displayMonth})]},t.displayIndex)}function wU(t){var s=Rn(),n=s.classNames,r=s.styles;return e.jsx("div",{className:n.months,style:r.months,children:t.children})}function SU(t){var s,n,r=t.initialProps,a=Rn(),i=aj(),o=ah(),d=g.useState(!1),m=d[0],f=d[1];g.useEffect(function(){a.initialFocus&&i.focusTarget&&(m||(i.focus(i.focusTarget),f(!0)))},[a.initialFocus,m,i.focus,i.focusTarget,i]);var p=[a.classNames.root,a.className];a.numberOfMonths>1&&p.push(a.classNames.multiple_months),a.showWeekNumber&&p.push(a.classNames.with_weeknumber);var h=Ms(Ms({},a.styles.root),a.style),x=Object.keys(r).filter(function(N){return N.startsWith("data-")}).reduce(function(N,v){var w;return Ms(Ms({},N),(w={},w[v]=r[v],w))},{}),u=(n=(s=r.components)===null||s===void 0?void 0:s.Months)!==null&&n!==void 0?n:wU;return e.jsx("div",Ms({className:p.join(" "),style:h,dir:a.dir,id:a.id,nonce:r.nonce,title:r.title,lang:r.lang},x,{children:e.jsx(u,{children:o.displayMonths.map(function(N,v){return e.jsx(NU,{displayIndex:v,displayMonth:N},v)})})}))}function CU(t){var s=t.children,n=Yq(t,["children"]);return e.jsx(fz,{initialProps:n,children:e.jsx(Sz,{children:e.jsx(aU,{initialProps:n,children:e.jsx(Oz,{initialProps:n,children:e.jsx(Mz,{initialProps:n,children:e.jsx(Hz,{children:e.jsx(nU,{children:s})})})})})})})}function AU(t){return e.jsx(CU,Ms({},t,{children:e.jsx(SU,{initialProps:t})}))}function bf({className:t,classNames:s,showOutsideDays:n=!0,...r}){return e.jsx(AU,{showOutsideDays:n,className:Nt("p-3",t),classNames:{months:"flex flex-col sm:flex-row gap-2",month:"flex flex-col gap-4",caption:"flex justify-center pt-1 relative items-center w-full",caption_label:"text-sm font-medium",nav:"flex items-center gap-1",nav_button:Nt(rd({variant:"outline"}),"size-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-x-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:Nt("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-range-end)]:rounded-r-md",r.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:Nt(rd({variant:"ghost"}),"size-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start aria-selected:bg-primary aria-selected:text-primary-foreground",day_range_end:"day-range-end aria-selected:bg-primary aria-selected:text-primary-foreground",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...s},components:{IconLeft:({className:a,...i})=>e.jsx(lo,{className:Nt("size-4",a),...i}),IconRight:({className:a,...i})=>e.jsx(bi,{className:Nt("size-4",a),...i})},...r})}function kU({onViewDetails:t}){const[s,n]=g.useState("table"),[r,a]=g.useState(""),[i,o]=g.useState("all"),[d,m]=g.useState("all"),[f,p]=g.useState("all"),[h,x]=g.useState(""),[u,N]=g.useState(""),[v,w]=g.useState("date-desc"),[j,b]=g.useState(1),[C,S]=g.useState(null),[R,_]=g.useState([]),[A,E]=g.useState(!1),[q,O]=g.useState(!1),[D,P]=g.useState(""),[L,$]=g.useState([]),[Y,Z]=g.useState([]),[W,U]=g.useState([]),[M,z]=g.useState(!0);g.useEffect(()=>{I()},[h,u,i,r,j,d,f]),g.useEffect(()=>{b(1)},[h,u,i,r,d,f]),g.useEffect(()=>{T()},[]);const T=async()=>{try{const ce=await Is.getStates(),Pe=(Array.isArray(ce)?ce:(ce==null?void 0:ce.data)||(ce==null?void 0:ce.states)||[]).map(et=>typeof et=="string"?et:et.name||et.stateName).filter(Boolean);$(Pe)}catch(ce){console.error("Failed to fetch states:",ce)}},I=async()=>{try{z(!0);const ce=["Questionnaire Pending","Questionnaire Completed","Shortlisted"],ve=await hs.getApplications({fromDate:h,toDate:u,status:i==="all"?ce.join(","):i,location:d!=="all"?d:void 0,state:f!=="all"?f:void 0,ddLeadShortlisted:"false",isShortlisted:"true",search:r,page:j,limit:10}),Pe=ve.data||[];S(ve.meta);const et=Pe.map(ee=>({id:ee.id,registrationNumber:ee.applicationId||"N/A",name:ee.applicantName,email:ee.email,phone:ee.phone,age:ee.age,education:ee.education,residentialAddress:ee.address||ee.city||"",businessAddress:ee.address||"",preferredLocation:ee.preferredLocation,state:ee.state,ownsBike:ee.ownRoyalEnfield==="yes",pastExperience:ee.experienceYears?`${ee.experienceYears} years`:ee.description||"",status:ee.overallStatus,questionnaireMarks:ee.score||ee.questionnaireMarks||0,rank:0,totalApplicantsAtLocation:0,submissionDate:ee.createdAt,assignedUsers:[],progress:ee.progressPercentage||0,isShortlisted:ee.isShortlisted,ddLeadShortlisted:ee.ddLeadShortlisted,companyName:ee.companyName,source:ee.source,existingDealer:ee.existingDealer,royalEnfieldModel:ee.royalEnfieldModel,description:ee.description,pincode:ee.pincode,locationType:ee.locationType,ownRoyalEnfield:ee.ownRoyalEnfield,address:ee.address}));U(et);const kt=Array.from(new Set(et.map(ee=>ee.preferredLocation))).filter(Boolean);Z(ee=>Array.from(new Set([...ee,...kt])));const vt=Array.from(new Set(et.map(ee=>ee.state))).filter(Boolean);$(ee=>Array.from(new Set([...ee,...vt])))}catch(ce){console.error("Failed to fetch applications:",ce),te.error("Failed to load opportunity requests")}finally{z(!1)}},B=W.sort((ce,ve)=>v==="score-desc"?(ve.questionnaireMarks||0)-(ce.questionnaireMarks||0):v==="score-asc"?(ce.questionnaireMarks||0)-(ve.questionnaireMarks||0):v==="date-desc"?new Date(ve.submissionDate).getTime()-new Date(ce.submissionDate).getTime():v==="date-asc"?new Date(ce.submissionDate).getTime()-new Date(ve.submissionDate).getTime():0),G=ce=>{_(ce?B.map(ve=>ve.id):[])},K=(ce,ve)=>{_(ve?[...R,ce]:R.filter(Pe=>Pe!==ce))},H=()=>{if(R.length===0){te.error("Please select at least one application to shortlist");return}O(!0)},X=async()=>{try{const ce=await hs.shortlistApplications(R,[],D);if(ce&&ce.success)await I(),_([]),O(!1),P(""),te.success(`${R.length} application(s) shortlisted successfully. Users will be assigned automatically.`);else throw new Error((ce==null?void 0:ce.message)||"Failed to process shortlisting")}catch(ce){console.error("Failed to shortlist applications:",ce),te.error(ce.message||"Failed to process shortlisting")}},J=async()=>{if(R.length===0){te.error("Please select at least one application");return}try{E(!0);const ce=await hs.sendBulkReminders(R);ce.success&&(te.success(ce.message||`Reminder emails sent to ${R.length} applicant(s)`),_([]))}catch(ce){console.error("Failed to send reminders:",ce),te.error(ce.message||"Failed to send reminders")}finally{E(!1)}},ae=async()=>{const ce=B.filter(et=>et.status!=="Questionnaire Pending"),ve=ce.filter(et=>R.includes(et.id));let Pe=[];if(R.length>0){if(ve.length===0){te.error('Selected applications are in "Questionnaire Pending" status and cannot be exported.');return}Pe=ve.map(et=>et.id),ve.lengthet.id);if(Pe.length===0){te.error("No applications with completed questionnaires available for export");return}try{const et=te.loading("Preparing Excel export..."),kt=await hs.exportResponses(Pe);if(te.dismiss(et),!kt||kt.length===0){te.error("No response data found");return}const vt=Object.keys(kt[0]),ge=[vt.join(","),...kt.map(dt=>vt.map(st=>{const xt=dt[st]??"";return`"${String(xt).replace(/"/g,'""')}"`}).join(","))].join(` -`),ye=new Blob([ge],{type:"text/csv;charset=utf-8;"}),Be=URL.createObjectURL(ye),$e=document.createElement("a");$e.setAttribute("href",Be),$e.setAttribute("download",`onboarding_responses_${new Date().toISOString().split("T")[0]}.xlsx`),document.body.appendChild($e),$e.click(),document.body.removeChild($e),te.success(`Exported ${Pe.length} records to Excel successfully`)}catch(et){console.error("Export failed:",et),te.error(et.message||"Failed to export responses")}},le=["Questionnaire Pending","Questionnaire Completed","Shortlisted"],xe=ce=>({Submitted:"bg-blue-100 text-blue-800","Questionnaire Pending":"bg-yellow-100 text-yellow-800","Questionnaire Completed":"bg-cyan-100 text-cyan-800",Shortlisted:"bg-purple-100 text-purple-800","Level 1 Interview Pending":"bg-orange-100 text-orange-800","Level 1 Approved":"bg-green-100 text-green-800","Level 2 Interview Pending":"bg-orange-100 text-orange-800","Level 2 Approved":"bg-green-100 text-green-800","Level 2 Recommended":"bg-teal-100 text-teal-800","Level 3 Interview Pending":"bg-orange-100 text-orange-800","FDD Verification":"bg-indigo-100 text-indigo-800","Payment Pending":"bg-red-50 text-red-800","LOI Issued":"bg-sky-100 text-sky-800","Dealer Code Generation":"bg-purple-100 text-purple-800","Architecture Team Assigned":"bg-blue-100 text-blue-800","Architecture Document Upload":"bg-blue-100 text-blue-800","Architecture Team Completion":"bg-blue-100 text-blue-800","Statutory GST":"bg-emerald-100 text-emerald-800","Statutory PAN":"bg-emerald-100 text-emerald-800","Statutory Nodal":"bg-emerald-100 text-emerald-800","Statutory Check":"bg-emerald-100 text-emerald-800","Statutory Partnership":"bg-emerald-100 text-emerald-800","Statutory Firm Reg":"bg-emerald-100 text-emerald-800","Statutory Rental":"bg-emerald-100 text-emerald-800","Statutory Virtual Code":"bg-emerald-100 text-emerald-800","Statutory Domain":"bg-emerald-100 text-emerald-800","Statutory MSD":"bg-emerald-100 text-emerald-800","Statutory LOI Ack":"bg-emerald-100 text-emerald-800","EOR In Progress":"bg-violet-100 text-violet-800","LOA Pending":"bg-pink-100 text-pink-800",Inauguration:"bg-green-100 text-green-800",Approved:"bg-green-100 text-green-800",Rejected:"bg-red-100 text-red-800",Disqualified:"bg-gray-100 text-gray-800","In Review":"bg-slate-100 text-slate-800","Level 3 Approved":"bg-green-100 text-green-800","LOI In Progress":"bg-sky-50 text-sky-700","LOI Approved":"bg-green-100 text-green-800","Security Deposit In Progress":"bg-blue-50 text-blue-700","Security Deposit Approved":"bg-green-100 text-green-800","Security Deposit":"bg-blue-100 text-blue-800","Security Details In Progress":"bg-blue-50 text-blue-700","Security Details Approved":"bg-green-100 text-green-800","Security Details":"bg-blue-100 text-blue-800","LOI Issued In Progress":"bg-sky-50 text-sky-700","Statutory Work In Progress":"bg-emerald-50 text-emerald-700","Statutory Work Completed":"bg-green-100 text-green-800","Architecture Work In Progress":"bg-blue-50 text-blue-700","Architecture Work Completed":"bg-green-100 text-green-800","Dealer Code Generation In Progress":"bg-purple-50 text-purple-700","Dealer Code Generated":"bg-green-100 text-green-800","LOA Issued":"bg-pink-100 text-pink-800","EOR Complete":"bg-violet-100 text-violet-800",Onboarded:"bg-green-200 text-green-900"})[ce]||"bg-gray-100 text-gray-800";return M?e.jsx("div",{className:"flex justify-center items-center h-96",children:e.jsx(ns,{className:"w-8 h-8 animate-spin text-re-red"})}):e.jsxs("div",{className:"space-y-6",children:[e.jsx("div",{className:"bg-white rounded-lg border border-slate-200 p-6",children:e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"flex flex-col md:flex-row gap-4",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx(Ta,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"}),e.jsx(at,{type:"text",placeholder:"Search by name or registration number...",value:r,onChange:ce=>a(ce.target.value),className:"pl-10","data-testid":"onboarding-opp-requests-search-input"})]}),e.jsxs(Dt,{value:i,onValueChange:o,children:[e.jsx(Et,{className:"w-full md:w-48","data-testid":"onboarding-opp-requests-status-select",children:e.jsx(Rt,{placeholder:"Filter by status"})}),e.jsxs(_t,{children:[e.jsx(Me,{value:"all",children:"All Statuses"}),le.map(ce=>e.jsx(Me,{value:ce,children:ce},ce))]})]}),e.jsx(se,{variant:"ghost",size:"sm",className:"text-slate-500 hover:text-slate-700 h-9",onClick:()=>{x(""),N(""),o("all"),m("all"),p("all"),a("")},"data-testid":"onboarding-opp-requests-clear-filters",children:"Clear Filters"}),e.jsxs(Dt,{value:f,onValueChange:p,children:[e.jsx(Et,{className:"w-full md:w-48","data-testid":"onboarding-opp-requests-state-select",children:e.jsx(Rt,{placeholder:"Filter by state"})}),e.jsxs(_t,{children:[e.jsx(Me,{value:"all",children:"All States"}),L.map(ce=>e.jsx(Me,{value:ce,children:ce},ce))]})]}),e.jsxs(Dt,{value:d,onValueChange:m,children:[e.jsx(Et,{className:"w-full md:w-48","data-testid":"onboarding-opp-requests-location-select",children:e.jsx(Rt,{placeholder:"Filter by location"})}),e.jsxs(_t,{children:[e.jsx(Me,{value:"all",children:"All Locations"}),Y.map(ce=>e.jsx(Me,{value:ce,children:ce},ce))]})]}),e.jsxs("div",{className:"flex items-center gap-2 flex-1 md:flex-none",children:[e.jsxs(_u,{children:[e.jsx(Tu,{asChild:!0,children:e.jsxs(se,{variant:"outline",className:Nt("w-full md:w-40 justify-start text-left font-normal h-9 px-3",!h&&"text-muted-foreground"),"data-testid":"onboarding-opp-requests-from-date-trigger",children:[e.jsx(dr,{className:"mr-2 h-4 w-4 text-slate-400"}),h?Ka(new Date(h),"PPP"):e.jsx("span",{className:"text-xs",children:"From Date"})]})}),e.jsx(Pu,{className:"w-auto p-0",align:"start",children:e.jsx(bf,{mode:"single",selected:h?new Date(h):void 0,onSelect:ce=>x(ce?ce.toISOString().split("T")[0]:""),initialFocus:!0})})]}),e.jsx("span",{className:"text-slate-400",children:"to"}),e.jsxs(_u,{children:[e.jsx(Tu,{asChild:!0,children:e.jsxs(se,{variant:"outline",className:Nt("w-full md:w-40 justify-start text-left font-normal h-9 px-3",!u&&"text-muted-foreground"),"data-testid":"onboarding-opp-requests-to-date-trigger",children:[e.jsx(dr,{className:"mr-2 h-4 w-4 text-slate-400"}),u?Ka(new Date(u),"PPP"):e.jsx("span",{className:"text-xs",children:"To Date"})]})}),e.jsx(Pu,{className:"w-auto p-0",align:"start",children:e.jsx(bf,{mode:"single",selected:u?new Date(u):void 0,onSelect:ce=>N(ce?ce.toISOString().split("T")[0]:""),initialFocus:!0})})]})]}),e.jsxs(Dt,{value:v,onValueChange:w,children:[e.jsx(Et,{className:"w-full md:w-48","data-testid":"onboarding-opp-requests-sort-select",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(TI,{className:"w-4 h-4 text-slate-400"}),e.jsx(Rt,{placeholder:"Sort by"})]})}),e.jsxs(_t,{children:[e.jsx(Me,{value:"date-desc",children:"Newest Applied"}),e.jsx(Me,{value:"date-asc",children:"Oldest Applied"}),e.jsx(Me,{value:"score-desc",children:"Highest Score"}),e.jsx(Me,{value:"score-asc",children:"Lowest Score"})]})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(se,{variant:s==="grid"?"default":"outline",size:"sm",onClick:()=>n("grid"),className:s==="grid"?"bg-re-red hover:bg-re-red-hover":"","data-testid":"onboarding-opp-requests-view-grid-btn",children:[e.jsx(ok,{className:"w-4 h-4 mr-2"}),"Grid"]}),e.jsxs(se,{variant:s==="table"?"default":"outline",size:"sm",onClick:()=>n("table"),className:s==="table"?"bg-re-red hover:bg-re-red-hover":"","data-testid":"onboarding-opp-requests-view-table-btn",children:[e.jsx(uk,{className:"w-4 h-4 mr-2"}),"Table"]})]}),e.jsxs(se,{variant:"outline",size:"sm",onClick:ae,"data-testid":"onboarding-opp-requests-export-btn",children:[e.jsx(ji,{className:"w-4 h-4 mr-2"}),"Export"]}),R.length>0&&e.jsxs(e.Fragment,{children:[e.jsxs(se,{variant:"outline",size:"sm",onClick:J,disabled:A,"data-testid":"onboarding-opp-requests-bulk-reminder-btn",children:[A?e.jsx(ns,{className:"w-4 h-4 mr-2 animate-spin"}):e.jsx(Ur,{className:"w-4 h-4 mr-2"}),"Send Reminders (",R.length,")"]}),e.jsxs(se,{size:"sm",onClick:H,className:"bg-green-600 hover:bg-green-700","data-testid":"onboarding-opp-requests-bulk-shortlist-btn",children:[e.jsx(un,{className:"w-4 h-4 mr-2"}),"Shortlist (",R.length,")"]})]}),e.jsx("div",{className:"ml-auto",children:e.jsxs(Ce,{variant:"outline",className:"text-slate-600","data-testid":"onboarding-opp-requests-pending-count",children:[(C==null?void 0:C.total)||B.length," pending shortlisting"]})})]})]})}),s==="grid"?e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4","data-testid":"onboarding-opp-requests-grid",children:[B.map((ce,ve)=>e.jsxs("div",{className:"relative","data-testid":`onboarding-opp-requests-grid-item-${ve}`,children:[e.jsx("div",{className:"absolute top-4 left-4 z-10",children:e.jsx(Ln,{checked:R.includes(ce.id),onCheckedChange:Pe=>K(ce.id,Pe),className:"bg-white","data-testid":`onboarding-opp-requests-grid-checkbox-${ve}`})}),e.jsx(VE,{application:ce,onViewDetails:t})]},ce.id)),B.length===0&&e.jsxs("div",{className:"col-span-full text-center py-12 text-slate-500 bg-white rounded-lg border border-slate-200","data-testid":"onboarding-opp-requests-grid-empty",children:[e.jsx(un,{className:"w-12 h-12 mx-auto mb-4 text-slate-400"}),e.jsx("p",{className:"text-lg mb-2",children:"No opportunity requests found"}),e.jsx("p",{className:"text-sm",children:"Try adjusting your filters"})]})]}):e.jsxs("div",{className:"bg-white rounded-lg border border-slate-200","data-testid":"onboarding-opp-requests-table-container",children:[e.jsxs(Ts,{children:[e.jsx(Ps,{children:e.jsxs(it,{children:[e.jsx(fe,{className:"w-12",children:e.jsx(Ln,{checked:R.length===B.length&&B.length>0,onCheckedChange:G,"data-testid":"onboarding-opp-requests-table-select-all"})}),e.jsx(fe,{"data-testid":"onboarding-opp-requests-th-reg",children:"Registration"}),e.jsx(fe,{"data-testid":"onboarding-opp-requests-th-name",children:"Name"}),e.jsx(fe,{"data-testid":"onboarding-opp-requests-th-pref-loc",children:"Preferred Location"}),e.jsx(fe,{"data-testid":"onboarding-opp-requests-th-status",children:"Status"}),e.jsx(fe,{"data-testid":"onboarding-opp-requests-th-score",children:"Score"}),e.jsx(fe,{"data-testid":"onboarding-opp-requests-th-app-loc",children:"Applicant Location"}),e.jsx(fe,{"data-testid":"onboarding-opp-requests-th-shortlisted",children:"Shortlisted"}),e.jsx(fe,{"data-testid":"onboarding-opp-requests-th-progress",children:"Progress"}),e.jsx(fe,{"data-testid":"onboarding-opp-requests-th-date",children:"Applied On"})]})}),e.jsxs(Os,{children:[B.map((ce,ve)=>e.jsxs(it,{className:"cursor-pointer hover:bg-slate-50",onClick:()=>t(ce.id),"data-testid":`onboarding-opp-requests-row-${ve}`,children:[e.jsx(ue,{onClick:Pe=>Pe.stopPropagation(),children:e.jsx(Ln,{checked:R.includes(ce.id),onCheckedChange:Pe=>K(ce.id,Pe),"data-testid":`onboarding-opp-requests-table-select-item-${ce.id}`})}),e.jsx(ue,{children:e.jsx("span",{className:"text-slate-900","data-testid":`onboarding-opp-requests-reg-${ve}`,children:ce.registrationNumber})}),e.jsx(ue,{children:e.jsx("span",{className:"text-slate-900","data-testid":`onboarding-opp-requests-name-${ve}`,children:ce.name})}),e.jsx(ue,{children:e.jsx("span",{className:"text-slate-600","data-testid":`onboarding-opp-requests-pref-loc-${ve}`,children:ce.preferredLocation})}),e.jsx(ue,{children:e.jsx(Ce,{className:xe(ce.status),"data-testid":`onboarding-opp-requests-status-${ve}`,children:ce.status})}),e.jsx(ue,{children:e.jsx("span",{className:"font-semibold text-slate-900","data-testid":`onboarding-opp-requests-score-${ve}`,children:ce.questionnaireMarks})}),e.jsx(ue,{children:e.jsx("span",{className:"text-slate-600","data-testid":`onboarding-opp-requests-app-loc-${ve}`,children:ce.businessAddress})}),e.jsx(ue,{children:e.jsx(Ce,{variant:"outline","data-testid":`onboarding-opp-requests-shortlisted-badge-${ve}`,children:"No"})}),e.jsx(ue,{children:e.jsx(hp,{value:ce.progress,status:ce.status,showPercent:!0,"data-testid":`onboarding-opp-requests-progress-${ve}`})}),e.jsx(ue,{children:e.jsx("span",{className:"text-slate-600","data-testid":`onboarding-opp-requests-date-${ve}`,children:Yt(ce.submissionDate)})})]},ce.id)),B.length===0&&e.jsx(it,{children:e.jsxs(ue,{colSpan:9,className:"text-center py-12 text-slate-500","data-testid":"onboarding-opp-requests-table-empty",children:[e.jsx(un,{className:"w-12 h-12 mx-auto mb-4 text-slate-400"}),e.jsx("p",{className:"text-lg mb-2",children:"No opportunity requests found"}),e.jsx("p",{className:"text-sm",children:"Try adjusting your filters"})]})})]})]}),C&&C.totalPages>1&&e.jsx("div",{className:"py-4 border-t border-slate-200",children:e.jsx(fo,{children:e.jsxs(po,{children:[e.jsx(Sn,{children:e.jsx(xo,{onClick:()=>b(ce=>Math.max(1,ce-1)),className:j===1?"pointer-events-none opacity-50":"cursor-pointer"})}),[...Array(C.totalPages)].map((ce,ve)=>{const Pe=ve+1;return Pe===1||Pe===C.totalPages||Pe>=j-1&&Pe<=j+1?e.jsx(Sn,{children:e.jsx(Vi,{isActive:j===Pe,onClick:()=>b(Pe),className:"cursor-pointer",children:Pe})},Pe):Pe===j-2||Pe===j+2?e.jsx(Sn,{children:e.jsx(vo,{})},Pe):null}),e.jsx(Sn,{children:e.jsx(go,{onClick:()=>b(ce=>Math.min(C.totalPages,ce+1)),className:j===C.totalPages?"pointer-events-none opacity-50":"cursor-pointer"})})]})})})]}),e.jsx(ds,{open:q,onOpenChange:O,children:e.jsxs(os,{className:"overflow-visible","data-testid":"onboarding-opp-requests-shortlist-modal",children:[e.jsxs(xs,{children:[e.jsx(ms,{"data-testid":"onboarding-opp-requests-shortlist-modal-title",children:"Shortlist Applications"}),e.jsxs(bs,{children:["You are about to shortlist ",R.length," application(s). These applications will be moved to the Dealership Requests page and users will be assigned automatically based on the applied location."]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx(de,{children:"Shortlisting Remark (Optional)"}),e.jsx(Ws,{placeholder:"Enter reason for shortlisting these applications...",value:D,onChange:ce=>P(ce.target.value),className:"mt-2",rows:4,"data-testid":"onboarding-opp-requests-remark-textarea"})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx(se,{variant:"outline",className:"flex-1",onClick:()=>{O(!1),P("")},"data-testid":"onboarding-opp-requests-shortlist-cancel-btn",children:"Cancel"}),e.jsx(se,{className:"flex-1 bg-green-600 hover:bg-green-700",onClick:X,"data-testid":"onboarding-opp-requests-shortlist-confirm-btn",children:"Confirm Shortlist"})]})]})]})})]})}function DU({onViewDetails:t}){var W,U;const[s,n]=g.useState(""),[r,a]=g.useState("all"),[i,o]=g.useState("all"),[d,m]=g.useState(""),[f,p]=g.useState(""),[h,x]=g.useState(1),[u,N]=g.useState(null),[v,w]=g.useState([]),[j,b]=g.useState(!0),[C,S]=g.useState([]),[R,_]=g.useState([]),[A,E]=g.useState([]),[q,O]=g.useState(!1),D=async()=>{var M,z,T,I;if(A.length!==0)try{O(!0);const B=await hs.bulkConvertToOpportunity({ids:A});B!=null&&B.success&&((((M=B.data)==null?void 0:M.success)>0||!B.data)&&te.success(B.message||`Successfully converted ${((z=B.data)==null?void 0:z.success)||A.length} leads.`),((T=B.data)==null?void 0:T.failed)>0&&((I=B.data)!=null&&I.errors)&&B.data.errors.forEach(G=>{te.error(G,{duration:5e3})}),E([]),await Y())}catch(B){console.error("Bulk conversion error:",B),te.error(B.message||"Failed to perform bulk conversion")}finally{O(!1)}},P=()=>{A.length===Z.length?E([]):E(Z.map(M=>M.id))},L=M=>{E(z=>z.includes(M)?z.filter(T=>T!==M):[...z,M])};g.useEffect(()=>{Y()},[d,f,s,h,r,i]),g.useEffect(()=>{x(1)},[d,f,s,r,i]),g.useEffect(()=>{$()},[]);const $=async()=>{try{const M=await Is.getStates(),T=(Array.isArray(M)?M:(M==null?void 0:M.data)||(M==null?void 0:M.states)||[]).map(I=>typeof I=="string"?I:I.name||I.stateName).filter(Boolean);S(T)}catch(M){console.error("Failed to fetch states:",M)}},Y=async()=>{try{b(!0);const M=await hs.getApplications({fromDate:d,toDate:f,search:s,status:"Submitted",isShortlisted:"false",location:r!=="all"?r:void 0,state:i!=="all"?i:void 0,page:h,limit:10}),z=M.data||[];N(M.meta);const T=z.map(G=>({id:G.id,registrationNumber:G.applicationId||"N/A",name:G.applicantName,email:G.email,phone:G.phone,age:G.age,education:G.education,residentialAddress:G.address||G.city||"",businessAddress:G.address||"",preferredLocation:G.preferredLocation,state:G.state,ownsBike:G.ownRoyalEnfield==="yes",pastExperience:G.experienceYears?`${G.experienceYears} years`:G.description||"",status:G.overallStatus,questionnaireMarks:G.score||G.questionnaireMarks||0,rank:0,totalApplicantsAtLocation:0,submissionDate:G.createdAt,assignedUsers:[],progress:G.progressPercentage||0,isShortlisted:G.isShortlisted,companyName:G.companyName,source:G.source,existingDealer:G.existingDealer,royalEnfieldModel:G.royalEnfieldModel,description:G.description,pincode:G.pincode,locationType:G.locationType,ownRoyalEnfield:G.ownRoyalEnfield,address:G.address}));w(T);const I=Array.from(new Set(T.map(G=>G.preferredLocation))).filter(Boolean);_(G=>Array.from(new Set([...G,...I])));const B=Array.from(new Set(T.map(G=>G.state))).filter(Boolean);S(G=>Array.from(new Set([...G,...B])))}catch(M){console.error("Failed to fetch applications:",M),te.error("Failed to load non-opportunity requests")}finally{b(!1)}},Z=v;return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl mb-2",children:"Non-opportunities (Lead Generation)"}),e.jsx("p",{className:"text-slate-600",children:"Interest submissions from regions where dealerships are currently not being offered. These leads received non-opportunity notification and are stored for future reference."})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[e.jsx("div",{className:"bg-white rounded-lg border border-slate-200 p-4","data-testid":"onboarding-non-opps-stat-total",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Total Leads"}),e.jsx("p",{className:"text-2xl text-slate-900 mt-1",children:(u==null?void 0:u.total)||v.length})]}),e.jsx("div",{className:"p-3 bg-blue-100 rounded-lg",children:e.jsx(ty,{className:"w-6 h-6 text-blue-600"})})]})}),e.jsxs("div",{className:"bg-white rounded-lg border border-slate-200 p-4","data-testid":"onboarding-non-opps-stat-locations",children:[e.jsx("p",{className:"text-slate-600",children:"Unique Locations"}),e.jsx("p",{className:"text-2xl text-slate-900 mt-1",children:((W=u==null?void 0:u.stats)==null?void 0:W.uniqueLocations)||0})]}),e.jsxs("div",{className:"bg-white rounded-lg border border-slate-200 p-4","data-testid":"onboarding-non-opps-stat-exp",children:[e.jsx("p",{className:"text-slate-600",children:"With Experience"}),e.jsx("p",{className:"text-2xl text-re-red mt-1",children:((U=u==null?void 0:u.stats)==null?void 0:U.withExperience)||0})]})]}),e.jsxs("div",{className:"flex flex-col lg:flex-row gap-4",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx(Ta,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"}),e.jsx(at,{type:"text",placeholder:"Search by name, email, phone, or registration number...",value:s,onChange:M=>n(M.target.value),className:"pl-10","data-testid":"onboarding-non-opps-search-input"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(_u,{children:[e.jsx(Tu,{asChild:!0,children:e.jsxs(se,{variant:"outline",className:Nt("w-full md:w-36 justify-start text-left font-normal h-10 px-3",!d&&"text-muted-foreground"),"data-testid":"onboarding-non-opps-from-date-trigger",children:[e.jsx(dr,{className:"mr-2 h-4 w-4 text-slate-400"}),d?Ka(new Date(d),"PP"):e.jsx("span",{className:"text-xs text-slate-500",children:"From Date"})]})}),e.jsx(Pu,{className:"w-auto p-0",align:"start",children:e.jsx(bf,{mode:"single",selected:d?new Date(d):void 0,onSelect:M=>m(M?M.toISOString().split("T")[0]:""),initialFocus:!0})})]}),e.jsx("span",{className:"text-slate-400",children:"to"}),e.jsxs(_u,{children:[e.jsx(Tu,{asChild:!0,children:e.jsxs(se,{variant:"outline",className:Nt("w-full md:w-36 justify-start text-left font-normal h-10 px-3",!f&&"text-muted-foreground"),"data-testid":"onboarding-non-opps-to-date-trigger",children:[e.jsx(dr,{className:"mr-2 h-4 w-4 text-slate-400"}),f?Ka(new Date(f),"PP"):e.jsx("span",{className:"text-xs text-slate-500",children:"To Date"})]})}),e.jsx(Pu,{className:"w-auto p-0",align:"start",children:e.jsx(bf,{mode:"single",selected:f?new Date(f):void 0,onSelect:M=>p(M?M.toISOString().split("T")[0]:""),initialFocus:!0})})]})]}),e.jsxs(Dt,{value:r,onValueChange:a,children:[e.jsx(Et,{className:"w-full lg:w-48","data-testid":"onboarding-non-opps-location-select",children:e.jsx(Rt,{placeholder:"All Locations"})}),e.jsxs(_t,{children:[e.jsx(Me,{value:"all",children:"All Locations"}),R.map(M=>e.jsx(Me,{value:M,children:M},M))]})]}),e.jsx(se,{variant:"ghost",size:"sm",className:"text-slate-500 hover:text-slate-700 h-10 px-3",onClick:()=>{m(""),p(""),a("all"),o("all"),n("")},"data-testid":"onboarding-non-opps-clear-filters",children:"Clear Filters"}),e.jsxs(Dt,{value:i,onValueChange:o,children:[e.jsx(Et,{className:"w-full lg:w-48","data-testid":"onboarding-non-opps-state-select",children:e.jsx(Rt,{placeholder:"All States"})}),e.jsxs(_t,{children:[e.jsx(Me,{value:"all",children:"All States"}),C.map(M=>e.jsx(Me,{value:M,children:M},M))]})]}),e.jsx(se,{variant:"outline",size:"icon","data-testid":"onboarding-non-opps-export-btn",children:e.jsx(ji,{className:"w-4 h-4"})}),A.length>0&&e.jsxs(se,{className:"bg-re-red hover:bg-re-red-hover font-bold",onClick:D,disabled:q,children:[q?e.jsx(ns,{className:"w-4 h-4 mr-2 animate-spin"}):e.jsx(LI,{className:"w-4 h-4 mr-2"}),"Convert ",A.length," to Opportunity"]})]}),e.jsxs("div",{className:"bg-white rounded-lg border border-slate-200 overflow-hidden","data-testid":"onboarding-non-opps-table-container",children:[e.jsxs(Ts,{children:[e.jsx(Ps,{children:e.jsxs(it,{children:[e.jsx(fe,{className:"w-12",children:e.jsx(Ln,{checked:Z.length>0&&A.length===Z.length,onCheckedChange:P})}),e.jsx(fe,{"data-testid":"onboarding-non-opps-th-name",children:"Name"}),e.jsx(fe,{"data-testid":"onboarding-non-opps-th-phone",children:"Phone"}),e.jsx(fe,{"data-testid":"onboarding-non-opps-th-email",children:"Email"}),e.jsx(fe,{"data-testid":"onboarding-non-opps-th-loc",children:"Preferred Location"}),e.jsx(fe,{"data-testid":"onboarding-non-opps-th-address",children:"Main Address"}),e.jsx(fe,{"data-testid":"onboarding-non-opps-th-age",children:"Age"}),e.jsx(fe,{"data-testid":"onboarding-non-opps-th-exp",children:"Experience"}),e.jsx(fe,{"data-testid":"onboarding-non-opps-th-edu",children:"Education"}),e.jsx(fe,{"data-testid":"onboarding-non-opps-th-date",children:"Applied On"}),e.jsx(fe,{className:"text-right","data-testid":"onboarding-non-opps-th-actions",children:"Actions"})]})}),e.jsx(Os,{children:j?e.jsx(it,{children:e.jsxs(ue,{colSpan:11,className:"text-center py-20",children:[e.jsx(ns,{className:"w-8 h-8 mx-auto animate-spin text-re-red mb-2"}),e.jsx("p",{className:"text-slate-500 text-sm",children:"Loading applications..."})]})}):Z.length===0?e.jsx(it,{children:e.jsxs(ue,{colSpan:11,className:"text-center py-12 text-slate-500","data-testid":"onboarding-non-opps-empty-state",children:[e.jsx(ty,{className:"w-12 h-12 mx-auto mb-4 text-slate-400"}),e.jsx("p",{className:"text-lg mb-2",children:"No lead generation data found"}),e.jsx("p",{className:"text-sm",children:"Try adjusting your filters"})]})}):Z.map((M,z)=>e.jsxs(it,{"data-testid":`onboarding-non-opps-row-${z}`,className:A.includes(M.id)?"bg-red-50/50":"",children:[e.jsx(ue,{children:e.jsx(Ln,{checked:A.includes(M.id),onCheckedChange:()=>L(M.id)})}),e.jsx(ue,{children:e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-900","data-testid":`onboarding-non-opps-name-${z}`,children:M.name}),e.jsx("p",{className:"text-slate-500 text-sm","data-testid":`onboarding-non-opps-id-${z}`,children:M.registrationNumber})]})}),e.jsx(ue,{className:"text-slate-900","data-testid":`onboarding-non-opps-phone-${z}`,children:M.phone}),e.jsx(ue,{className:"text-slate-600","data-testid":`onboarding-non-opps-email-${z}`,children:M.email}),e.jsx(ue,{children:e.jsxs("div",{"data-testid":`onboarding-non-opps-pref-loc-${z}`,children:[e.jsx("p",{className:"text-slate-900",children:M.preferredLocation}),e.jsx("p",{className:"text-slate-500 text-sm",children:M.state})]})}),e.jsx(ue,{className:"text-slate-600 max-w-xs truncate","data-testid":`onboarding-non-opps-address-${z}`,children:M.residentialAddress}),e.jsx(ue,{className:"text-slate-900","data-testid":`onboarding-non-opps-age-${z}`,children:M.age}),e.jsx(ue,{className:"text-slate-600","data-testid":`onboarding-non-opps-experience-${z}`,children:M.pastExperience}),e.jsx(ue,{className:"text-slate-900","data-testid":`onboarding-non-opps-education-${z}`,children:M.education}),e.jsx(ue,{className:"text-slate-600","data-testid":`onboarding-non-opps-date-${z}`,children:Yt(M.submissionDate)}),e.jsx(ue,{className:"text-right",children:e.jsx("div",{className:"flex justify-end gap-2",children:e.jsx(se,{variant:"outline",size:"sm",onClick:()=>t(M.id),"data-testid":`onboarding-non-opps-view-btn-${z}`,children:"View"})})})]},M.id))})]}),u&&u.totalPages>1&&e.jsx("div",{className:"py-4 border-t border-slate-200",children:e.jsx(fo,{children:e.jsxs(po,{children:[e.jsx(Sn,{children:e.jsx(xo,{onClick:()=>x(M=>Math.max(1,M-1)),className:h===1?"pointer-events-none opacity-50":"cursor-pointer"})}),[...Array(u.totalPages)].map((M,z)=>{const T=z+1;return T===1||T===u.totalPages||T>=h-1&&T<=h+1?e.jsx(Sn,{children:e.jsx(Vi,{isActive:h===T,onClick:()=>x(T),className:"cursor-pointer",children:T})},T):T===h-2||T===h+2?e.jsx(Sn,{children:e.jsx(vo,{})},T):null}),e.jsx(Sn,{children:e.jsx(go,{onClick:()=>x(M=>Math.min(u.totalPages,M+1)),className:h===u.totalPages?"pointer-events-none opacity-50":"cursor-pointer"})})]})})})]})]})}function RU({application:t,slaStatus:s,isNonResponsive:n,isAdmin:r,onBack:a,onOpenWorknotes:i}){return e.jsxs(e.Fragment,{children:[n&&e.jsxs("div",{className:"bg-red-50 border border-red-200 p-4 rounded-2xl flex items-center justify-between animate-in fade-in slide-in-from-top-4 duration-500","data-testid":"onboarding-details-non-responsive-banner",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"bg-red-100 p-2 rounded-xl",children:e.jsx(fk,{className:"w-6 h-6 text-red-600"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-black text-red-900 tracking-tight leading-none uppercase",children:"Applicant Flagged Non-Responsive"}),e.jsx("p",{className:"text-red-700 text-[11px] font-bold uppercase tracking-widest mt-1 opacity-80",children:"Audit process is currently on hold due to missing cooperation"})]})]}),r&&e.jsx(se,{variant:"outline",size:"sm",className:"bg-white border-red-200 text-red-600 hover:bg-red-50 font-black text-[10px] uppercase tracking-widest hidden sm:block h-9","data-testid":"onboarding-details-review-audit-button",onClick:()=>{const o=document.querySelector('[value="worknotes"]');o==null||o.click()},children:"Review Audit"})]}),e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(se,{variant:"outline",size:"icon",onClick:a,className:"shrink-0","data-testid":"onboarding-details-back-button",children:e.jsx(Jr,{className:"w-4 h-4"})}),e.jsxs("div",{className:"truncate",children:[e.jsx("h1",{className:"text-slate-900 truncate leading-tight","data-testid":"onboarding-details-application-name",children:t.name}),e.jsx("p",{className:"text-slate-600 truncate text-sm","data-testid":"onboarding-details-registration-number",children:t.registrationNumber}),s&&e.jsx("div",{className:"mt-1",children:e.jsx(kr,{status:s})})]})]}),e.jsx("div",{className:"flex flex-wrap gap-2",children:e.jsxs(se,{variant:"outline",className:"relative hover:bg-red-50 hover:border-red-300 hover:text-re-red-hover transition-all shadow-sm",onClick:i,"data-testid":"onboarding-details-view-work-notes",children:[e.jsx(Ga,{className:"w-4 h-4 mr-2"}),"View Work Notes"]})})]})]})}var EU=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],_U=EU.reduce((t,s)=>{const n=Hu(`Primitive.${s}`),r=g.forwardRef((a,i)=>{const{asChild:o,...d}=a,m=o?n:s;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),e.jsx(m,{...d,ref:i})});return r.displayName=`Primitive.${s}`,{...t,[s]:r}},{}),TU="Separator",DS="horizontal",PU=["horizontal","vertical"],u_=g.forwardRef((t,s)=>{const{decorative:n,orientation:r=DS,...a}=t,i=OU(r)?r:DS,d=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return e.jsx(_U.div,{"data-orientation":i,...d,...a,ref:s})});u_.displayName=TU;function OU(t){return PU.includes(t)}var LU=u_;function ec({className:t,orientation:s="horizontal",decorative:n=!0,...r}){return e.jsx(LU,{"data-slot":"separator-root",decorative:n,orientation:s,className:Nt("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",t),...r})}function IU({application:t,canEditStatutory:s,isEditingStatutory:n,isSavingStatutory:r,statutoryForm:a,onEditFirmType:i,onEditStatutory:o,onCancelEditStatutory:d,onSaveStatutory:m,onStatutoryFormChange:f}){return e.jsxs(Le,{"data-testid":"onboarding-applicant-info-card",children:[e.jsx(Qe,{children:e.jsx(Je,{children:"Applicant Information"})}),e.jsxs(Fe,{className:"p-4 sm:p-6 space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-3 gap-x-6 gap-y-4",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(Lr,{className:"w-5 h-5 text-slate-400 mt-1"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Full Name"}),e.jsx("p",{className:"text-slate-900","data-testid":"onboarding-applicant-info-name",children:t.name})]})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(Ur,{className:"w-5 h-5 text-slate-400 mt-1"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Email"}),e.jsx("p",{className:"text-slate-900","data-testid":"onboarding-applicant-info-email",children:t.email})]})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(tb,{className:"w-5 h-5 text-slate-400 mt-1"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Phone"}),e.jsx("p",{className:"text-slate-900","data-testid":"onboarding-applicant-info-phone",children:t.phone})]})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(Lr,{className:"w-5 h-5 text-slate-400 mt-1"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Age"}),e.jsx("p",{className:"text-slate-900","data-testid":"onboarding-applicant-info-age",children:t.age?`${t.age} years`:"N/A"})]})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(zI,{className:"w-5 h-5 text-slate-400 mt-1"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Education"}),e.jsx("p",{className:"text-slate-900","data-testid":"onboarding-applicant-info-education",children:t.education||"N/A"})]})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(Vr,{className:"w-5 h-5 text-slate-400 mt-1"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Preferred Location"}),e.jsx("p",{className:"text-slate-900","data-testid":"onboarding-applicant-info-preferred-location",children:t.preferredLocation||"N/A"})]})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(Vr,{className:"w-5 h-5 text-slate-400 mt-1"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Location Type"}),e.jsx("p",{className:"text-slate-900","data-testid":"onboarding-applicant-info-location-type",children:t.locationType||"N/A"})]})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(so,{className:"w-5 h-5 text-slate-400 mt-1"}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("p",{className:"text-slate-600 flex items-center justify-between group cursor-pointer",onClick:i,"data-testid":"onboarding-applicant-info-edit-firm-type",children:["Proposed Firm Type",e.jsx(ry,{className:"w-3 h-3 text-slate-300 group-hover:text-re-red transition-colors"})]}),e.jsx("p",{className:"text-slate-900 font-black text-re-red-hover tracking-tight leading-none mt-1","data-testid":"onboarding-applicant-info-firm-type",children:t.constitutionType||"Not Provided"})]})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(S1,{className:"w-5 h-5 text-slate-400 mt-1"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Owns Bike"}),e.jsx("p",{className:"text-slate-900","data-testid":"onboarding-applicant-info-owns-bike",children:t.ownRoyalEnfield==="yes"?"Yes":"No"})]})]}),t.ownRoyalEnfield==="yes"&&e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(S1,{className:"w-5 h-5 text-slate-400 mt-1"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Bike Model"}),e.jsx("p",{className:"text-slate-900","data-testid":"onboarding-applicant-info-bike-model",children:t.royalEnfieldModel||"N/A"})]})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(Lr,{className:"w-5 h-5 text-slate-400 mt-1"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Existing Dealer"}),e.jsx("p",{className:"text-slate-900","data-testid":"onboarding-applicant-info-existing-dealer",children:t.existingDealer==="yes"?"Yes":"No"})]})]}),t.existingDealer==="yes"&&e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(Lr,{className:"w-5 h-5 text-slate-400 mt-1"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Company Name"}),e.jsx("p",{className:"text-slate-900","data-testid":"onboarding-applicant-info-company-name",children:t.companyName||"N/A"})]})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(rc,{className:"w-5 h-5 text-slate-400 mt-1"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Source"}),e.jsx("p",{className:"text-slate-900","data-testid":"onboarding-applicant-info-source",children:t.source||"N/A"})]})]}),t.questionnaireMarks!==void 0&&e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(rk,{className:"w-5 h-5 text-slate-400 mt-1"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Questionnaire Score"}),e.jsxs("p",{className:"text-slate-900","data-testid":"onboarding-applicant-info-score",children:[t.questionnaireMarks,"/100"]})]})]})]}),e.jsx(ec,{}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600 mb-2",children:"Address"}),e.jsx("p",{className:"text-slate-900","data-testid":"onboarding-applicant-info-address",children:t.address||"N/A"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600 mb-2",children:"Pincode"}),e.jsx("p",{className:"text-slate-900","data-testid":"onboarding-applicant-info-pincode",children:t.pincode||"N/A"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600 mb-2",children:"Description"}),e.jsx("p",{className:"text-slate-900","data-testid":"onboarding-applicant-info-description",children:t.description||"N/A"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600 mb-2",children:"Past Experience"}),e.jsx("p",{className:"text-slate-900","data-testid":"onboarding-applicant-info-experience",children:t.pastExperience||"N/A"})]}),e.jsxs("div",{className:"pt-6 border-t mt-6",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("h3",{className:"text-sm font-black text-slate-900 uppercase tracking-widest flex items-center gap-2",children:[e.jsx(Wu,{className:"w-4 h-4 text-re-red"})," Statutory & Bank Information"]}),s&&!n&&e.jsxs(se,{variant:"ghost",size:"sm",onClick:o,className:"h-8 text-re-red hover:text-re-red-hover hover:bg-red-50 gap-1.5","data-testid":"onboarding-applicant-info-edit-statutory",children:[e.jsx(ry,{className:"w-3.5 h-3.5"}),"Edit Details"]})]}),n?e.jsxs("div",{className:"bg-slate-50/50 p-6 rounded-xl border-2 border-red-100 space-y-4","data-testid":"onboarding-applicant-info-statutory-edit-form",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{className:"text-[10px] uppercase font-bold text-slate-500",children:"Legal Entity Name"}),e.jsx(at,{value:a.accountHolderName,onChange:p=>f({...a,accountHolderName:p.target.value}),placeholder:"Enter Legal Entity Name",className:"bg-white border-slate-200","data-testid":"onboarding-applicant-info-input-legal-name"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{className:"text-[10px] uppercase font-bold text-slate-500",children:"PAN Number"}),e.jsx(at,{value:a.panNumber,onChange:p=>f({...a,panNumber:p.target.value.toUpperCase()}),placeholder:"10-digit PAN",maxLength:10,className:"bg-white border-slate-200 uppercase","data-testid":"onboarding-applicant-info-input-pan"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{className:"text-[10px] uppercase font-bold text-slate-500",children:"GST Number"}),e.jsx(at,{value:a.gstNumber,onChange:p=>f({...a,gstNumber:p.target.value.toUpperCase()}),placeholder:"15-digit GSTIN",maxLength:15,className:"bg-white border-slate-200 uppercase","data-testid":"onboarding-applicant-info-input-gst"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{className:"text-[10px] uppercase font-bold text-slate-500",children:"Registered Address"}),e.jsx(at,{value:a.registeredAddress,onChange:p=>f({...a,registeredAddress:p.target.value}),placeholder:"Enter Registered Office Address",className:"bg-white border-slate-200","data-testid":"onboarding-applicant-info-input-registered-address"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{className:"text-[10px] uppercase font-bold text-slate-500",children:"Bank Name"}),e.jsx(at,{value:a.bankName,onChange:p=>f({...a,bankName:p.target.value}),placeholder:"Enter Bank Name",className:"bg-white border-slate-200","data-testid":"onboarding-applicant-info-input-bank-name"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{className:"text-[10px] uppercase font-bold text-slate-500",children:"Account Number"}),e.jsx(at,{value:a.accountNumber,onChange:p=>f({...a,accountNumber:p.target.value}),placeholder:"Enter Account Number",className:"bg-white border-slate-200","data-testid":"onboarding-applicant-info-input-account-number"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{className:"text-[10px] uppercase font-bold text-slate-500",children:"IFSC Code"}),e.jsx(at,{value:a.ifscCode,onChange:p=>f({...a,ifscCode:p.target.value.toUpperCase()}),placeholder:"11-digit IFSC",maxLength:11,className:"bg-white border-slate-200 uppercase","data-testid":"onboarding-applicant-info-input-ifsc-code"})]})]}),e.jsxs("div",{className:"flex justify-end gap-3 pt-4 border-t",children:[e.jsx(se,{variant:"outline",size:"sm",onClick:d,disabled:r,"data-testid":"onboarding-applicant-info-statutory-cancel",children:"Cancel"}),e.jsx(se,{size:"sm",onClick:m,disabled:r,className:"bg-re-red hover:bg-re-red-hover","data-testid":"onboarding-applicant-info-statutory-save",children:r?e.jsx(ns,{className:"w-4 h-4 animate-spin"}):"Save Details"})]})]}):e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 bg-slate-50/50 p-4 rounded-xl border border-slate-100","data-testid":"onboarding-applicant-info-statutory-display",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-[10px] text-slate-500 uppercase font-bold tracking-tight",children:"Legal Entity Name"}),e.jsx("p",{className:"text-xs font-semibold text-slate-900","data-testid":"onboarding-applicant-info-display-legal-name",children:t.accountHolderName||"Pending"})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-[10px] text-slate-500 uppercase font-bold tracking-tight",children:"PAN Number"}),e.jsx("p",{className:"text-xs font-semibold text-slate-900 uppercase","data-testid":"onboarding-applicant-info-display-pan",children:t.panNumber||"Pending"})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-[10px] text-slate-500 uppercase font-bold tracking-tight",children:"GST Number"}),e.jsx("p",{className:"text-xs font-semibold text-slate-900 uppercase","data-testid":"onboarding-applicant-info-display-gst",children:t.gstNumber||"Pending"})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-[10px] text-slate-500 uppercase font-bold tracking-tight",children:"Registered Address"}),e.jsx("p",{className:"text-xs font-semibold text-slate-900","data-testid":"onboarding-applicant-info-display-registered-address",children:t.registeredAddress||"Pending"})]}),e.jsxs("div",{className:"space-y-1","data-testid":"onboarding-applicant-info-display-bank-info",children:[e.jsx("p",{className:"text-[10px] text-slate-500 uppercase font-bold tracking-tight",children:"Bank Details"}),e.jsx("p",{className:"text-xs font-semibold text-slate-900",children:t.bankName||"N/A"}),e.jsxs("p",{className:"text-[10px] text-slate-600",children:["A/C: ",t.accountNumber||"N/A"]}),e.jsxs("p",{className:"text-[10px] text-slate-600",children:["IFSC: ",t.ifscCode||"N/A"]})]})]})]})]})]})}const MU=({application:t})=>{if(!t.questionnaireResponses||t.questionnaireResponses.length===0)return e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-slate-500 bg-slate-50 rounded-lg border border-dashed border-slate-300","data-testid":"onboarding-questionnaire-empty",children:[e.jsx(rc,{className:"w-12 h-12 mb-3 text-slate-300"}),e.jsx("h3",{className:"text-lg font-medium text-slate-700",children:"Response is Pending"}),e.jsx("p",{className:"text-sm",children:"The applicant has not submitted the questionnaire yet."})]});const s=[...t.questionnaireResponses].sort((r,a)=>{var i,o;return(((i=r.question)==null?void 0:i.order)||0)-(((o=a.question)==null?void 0:o.order)||0)}),n=t.score||t.questionnaireMarks||0;return e.jsxs("div",{className:"space-y-6","data-testid":"onboarding-questionnaire-view",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(rc,{className:"w-5 h-5 text-re-red"}),e.jsx("h3",{className:"text-slate-900",children:"Questionnaire Responses"})]}),n!==void 0&&e.jsxs(Ce,{className:"bg-re-red","data-testid":"onboarding-questionnaire-total-score",children:["Score: ",n,"/100"]})]}),e.jsx("div",{className:"space-y-6",children:s.map((r,a)=>{const i=r.question,o=(i==null?void 0:i.questionText)||"Unknown Question",d=r.responseValue||"No Answer",m=(i==null?void 0:i.sectionName)||"General",f=(i==null?void 0:i.questionOptions)||[],p=f.find(v=>v.optionText===d),h=p?p.score:0,x=Math.max(...f.map(v=>v.score||0),0),u=typeof d=="string"&&d.startsWith("data:"),N=u&&d.startsWith("data:image");return e.jsxs("div",{className:"border border-slate-200 rounded-lg p-5 hover:border-red-300 transition-colors","data-testid":`onboarding-questionnaire-item-${a}`,children:[e.jsxs("div",{className:"flex items-start gap-3 mb-3",children:[e.jsx("div",{className:"w-8 h-8 rounded-full bg-red-50 flex items-center justify-center flex-shrink-0",children:e.jsx("span",{className:"text-re-red",children:a+1})}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx(Ce,{variant:"outline",className:"text-slate-600 bg-slate-50","data-testid":`onboarding-questionnaire-item-section-${a}`,children:m}),f.length>0&&x>0&&e.jsxs(Ce,{className:h>0?"bg-green-600":"bg-slate-400","data-testid":`onboarding-questionnaire-item-score-${a}`,children:[h,"/",x]})]}),e.jsx("h4",{className:"text-slate-900 font-medium","data-testid":`onboarding-questionnaire-item-text-${a}`,children:o})]})]}),e.jsx("div",{className:"ml-11",children:N?e.jsx("div",{className:"mt-2","data-testid":`onboarding-questionnaire-item-image-${a}`,children:e.jsx("img",{src:d,alt:"Response Attachment",className:"max-w-full h-auto max-h-64 rounded border p-1 object-contain"})}):u?e.jsx("a",{href:d,download:`upload_${a}.pdf`,className:"text-blue-600 underline text-sm break-all","data-testid":`onboarding-questionnaire-item-download-${a}`,children:"Download Attachment"}):e.jsx("div",{className:"text-slate-600 leading-relaxed break-words whitespace-pre-wrap","data-testid":`onboarding-questionnaire-item-answer-${a}`,children:r.attachmentUrl?e.jsx("a",{href:r.attachmentUrl,target:"_blank",rel:"noreferrer",className:"text-blue-600 underline","data-testid":`onboarding-questionnaire-item-attachment-${a}`,children:"View Attachment"}):d})})]},r.id)})})]})},FU=Ky("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"}},defaultVariants:{variant:"default"}});function di({className:t,variant:s,...n}){return e.jsx("div",{"data-slot":"alert",role:"alert",className:Nt(FU({variant:s}),t),...n})}function _i({className:t,...s}){return e.jsx("div",{"data-slot":"alert-title",className:Nt("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",t),...s})}function ui({className:t,...s}){return e.jsx("div",{"data-slot":"alert-description",className:Nt("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",t),...s})}var BU={};function $U(t){const{application:s,activeTab:n,setActiveTab:r,processStages:a,documents:i,interviews:o,expandedBranches:d,setExpandedBranches:m,setSelectedStage:f,setShowDocumentsModal:p,setShowUploadForm:h,handleRetriggerEvaluators:x,handleRescheduleInterview:u,setSelectedEvaluationForView:N,setShowFeedbackDetailsModal:v,renderFddAuditContent:w,eorProgress:j,eorData:b,eorChecklist:C,setUploadDocType:S,isAdmin:R,fetchApplication:_,fetchEorData:A,deposits:E,getDeposit:q,paymentConfigs:O,setPreviewDoc:D,setShowPreviewModal:P,auditLoading:L,auditLogs:$,auditLogActionBadgeClass:Y}=t,Z=U=>String(U||"").trim().toLowerCase().replace(/[_\s-]+/g," "),W=(U,M)=>{var I,B,G;const z=[(I=U==null?void 0:U.user)==null?void 0:I.role,(B=U==null?void 0:U.user)==null?void 0:B.roleCode,(G=U==null?void 0:U.metadata)==null?void 0:G.role].map(Z),T=M.map(Z);return z.some(K=>T.includes(K))};return e.jsx(Le,{"data-testid":"onboarding-details-tabs-container",children:e.jsxs(Bn,{value:n,onValueChange:r,children:[e.jsx(Qe,{className:"pb-4 px-4 sm:px-6",children:e.jsx("div",{className:"overflow-x-auto custom-scrollbar-x-slim -mx-4 px-4 sm:-mx-6 sm:px-6",children:e.jsxs($n,{className:"w-max min-w-full justify-start h-11 bg-slate-100/80 p-1","data-testid":"onboarding-tabs-list",children:[e.jsx(Wt,{value:"questionnaire",className:"min-w-[120px]","data-testid":"onboarding-tab-trigger-questionnaire",children:"Questionnaire"}),e.jsx(Wt,{value:"progress",className:"min-w-[80px]","data-testid":"onboarding-tab-trigger-progress",children:"Progress"}),e.jsx(Wt,{value:"documents",className:"min-w-[100px]","data-testid":"onboarding-tab-trigger-documents",children:"Documents"}),e.jsx(Wt,{value:"interviews",className:"min-w-[100px]","data-testid":"onboarding-tab-trigger-interviews",children:"Interviews"}),e.jsx(Wt,{value:"fdd",className:"min-w-[120px]","data-testid":"onboarding-tab-trigger-fdd",children:"FDD Audit"}),e.jsx(Wt,{value:"eor",className:"min-w-[120px]","data-testid":"onboarding-tab-trigger-eor",children:"EOR Checklist"}),e.jsx(Wt,{value:"payments",className:"min-w-[100px]","data-testid":"onboarding-tab-trigger-payments",children:"Payments"}),e.jsx(Wt,{value:"audit",className:"min-w-[100px]","data-testid":"onboarding-tab-trigger-audit",children:"Audit Trail"})]})})}),e.jsxs(Fe,{children:[e.jsx(Ut,{value:"questionnaire",className:"space-y-6","data-testid":"onboarding-tab-content-questionnaire",children:e.jsx(MU,{application:s})}),e.jsxs(Ut,{value:"progress",className:"space-y-6","data-testid":"onboarding-tab-content-progress",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsx("h3",{className:"text-slate-900",children:"Application Journey"}),e.jsxs(Ce,{className:Sq(s.status),"data-testid":"onboarding-progress-percentage-badge",children:[s.progress,"% Complete"]})]}),e.jsx(dc,{value:s.progress,className:"h-3 mb-6 bg-status-progress-soft",indicatorClassName:gl(s.status),"data-testid":"onboarding-progress-bar"})]}),e.jsx("div",{className:"relative status-progress-ui","data-testid":"onboarding-progress-stages-container",children:(()=>{const U={1:["DD-ZM","RBM"],2:["DD Lead","ZBH"],3:["NBH","DD Head"]},M={LOI_APPROVAL:["DD Head","NBH"],LOA_APPROVAL:["DD Head","NBH"]},z=I=>(s.participants||[]).filter(G=>{var H,X,J,ae,le,xe,ce,ve,Pe,et,kt,vt;return((H=G.metadata)==null?void 0:H.stageCode)===I||((J=(X=G.metadata)==null?void 0:X.allAssignments)==null?void 0:J.includes(I))||typeof I=="number"&&(((ae=G.metadata)==null?void 0:ae.interviewLevel)===I||((le=G.metadata)==null?void 0:le.interviewLevel)===String(I)||((ce=(xe=G.metadata)==null?void 0:xe.allAssignments)==null?void 0:ce.includes(I))||((Pe=(ve=G.metadata)==null?void 0:ve.allAssignments)==null?void 0:Pe.includes(String(I))))||typeof I=="string"&&!isNaN(Number(I))&&(((et=G.metadata)==null?void 0:et.interviewLevel)===Number(I)||((vt=(kt=G.metadata)==null?void 0:kt.allAssignments)==null?void 0:vt.includes(Number(I))))?!0:typeof I=="number"?W(G,U[I]||[]):W(G,M[I]||[])}).map(G=>{var X,J,ae,le,xe;const K=typeof I=="number"?`INTERVIEW_LEVEL_${I}`:I,H=(s.stageApprovals||[]).find(ce=>ce.stageCode===K&&String(ce.actorUserId)===String(G.userId));return{name:((X=G.user)==null?void 0:X.name)||((J=G.user)==null?void 0:J.fullName)||"Unknown",role:((ae=G.user)==null?void 0:ae.role)||((le=G.user)==null?void 0:le.roleCode)||((xe=G.metadata)==null?void 0:xe.role)||"Reviewer",status:H?H.decision==="Approved"?"approved":"rejected":"pending"}}),T=(I,B)=>{const K={"1st Level Interview":1,"2nd Level Interview":2,"3rd Level Interview":3,"LOI Approval":"LOI_APPROVAL",LOA:"LOA_APPROVAL"}[I];if(!K)return null;const H=z(K);return H.length===0?null:e.jsx("div",{className:"flex flex-wrap gap-2 mt-3","data-testid":`onboarding-stage-approvers-${B}`,children:H.map((X,J)=>e.jsxs("div",{className:"group relative flex items-center gap-1.5 bg-slate-50 border border-slate-200 rounded-full pl-1 pr-2.5 py-0.5 transition-all hover:bg-white hover:shadow-sm","data-testid":`onboarding-stage-approver-${B}-${J}`,children:[e.jsx("div",{className:Nt("w-6 h-6 rounded-full flex items-center justify-center text-[10px] font-bold text-white",X.status==="approved"?"bg-green-500":X.status==="rejected"?"bg-red-500":"bg-slate-300"),children:X.name.split(" ").map(ae=>ae[0]).join("").substring(0,2).toUpperCase()}),e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{className:"text-[10px] font-medium text-slate-700 leading-none",children:X.name}),e.jsx("span",{className:"text-[8px] text-slate-500 leading-none mt-0.5",children:X.role})]}),e.jsx("div",{className:Nt("absolute -top-0.5 -right-0.5 w-2 h-2 rounded-full border border-white",X.status==="approved"?"bg-green-500":X.status==="rejected"?"bg-red-500":"bg-status-progress"),"data-testid":`onboarding-stage-approver-status-dot-${B}-${J}`}),e.jsxs("div",{className:"absolute bottom-full left-1/2 -translate-x-1/2 mb-2 px-2 py-1 bg-slate-900 text-white text-[10px] rounded opacity-0 group-hover:opacity-100 pointer-events-none transition-opacity whitespace-nowrap z-50",children:[X.role,": ",X.status.toUpperCase()]})]},J))})};return a.map((I,B)=>e.jsxs("div",{"data-testid":`onboarding-progress-stage-${B}`,children:[e.jsxs("div",{className:"flex gap-4 pb-8",children:[e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:`w-10 h-10 rounded-full flex items-center justify-center border-2 z-10 relative ${I.status==="completed"?"bg-green-500 border-green-500 text-white shadow-md":I.status==="active"?I.isLocked?"bg-slate-400 border-slate-400 text-white":"bg-status-workflow-active border-status-workflow-active text-white animate-pulse-subtle":"bg-white border-slate-300 text-slate-400 shadow-none"}`,"data-testid":`onboarding-progress-stage-icon-${B}`,children:I.isParallel?e.jsx(sy,{className:"w-5 h-5"}):I.isLocked?e.jsxs("div",{className:"group relative",children:[e.jsx(ny,{className:"w-5 h-5 text-white cursor-help"}),e.jsxs("div",{className:"absolute bottom-full left-1/2 -translate-x-1/2 mb-2 px-3 py-1.5 bg-slate-900 text-white text-[10px] rounded shadow-xl opacity-0 group-hover:opacity-100 pointer-events-none transition-all duration-200 whitespace-nowrap z-[100] border border-slate-700",children:[e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsxs("span",{className:"font-bold text-status-progress flex items-center gap-1",children:[e.jsx(sn,{className:"w-3 h-3"})," Stage Locked"]}),e.jsx("span",{children:I.lockMessage})]}),e.jsx("div",{className:"absolute top-full left-1/2 -translate-x-1/2 border-8 border-transparent border-t-slate-900"})]})]}):e.jsx(e.Fragment,{children:I.status==="completed"?e.jsx(Zn,{className:"w-6 h-6"}):I.status==="active"?e.jsx(vn,{className:"w-5 h-5 text-white"}):e.jsx("div",{className:"w-3 h-3 bg-slate-300 rounded-full"})})}),B0&&!["LOI Approval","LOA","1st Level Interview","2nd Level Interview","3rd Level Interview"].includes(I.name)&&e.jsxs("p",{className:"text-status-progress text-xs mt-1.5 flex items-center gap-1 bg-status-progress-soft w-fit px-2 py-0.5 rounded border border-status-progress","data-testid":`onboarding-progress-stage-evaluators-${B}`,children:[e.jsx(Lr,{className:"w-3 h-3"}),"Evaluators: ",I.evaluators.join(" + ")]}),(()=>{var xe;const G={3:2,4:2,5:2,6:2,8:2,12:2},K=Number(I.id),H=G[K],J={3:1,4:1,5:2,6:3,8:"LOI_APPROVAL",12:"LOA_APPROVAL"}[K],ae=J?z(J).length:((xe=I.evaluators)==null?void 0:xe.length)||0,le=K===3?I.status==="completed":I.status!=="pending";return H&&ae{const G=i.filter(H=>{var X;return H.stage===I.name||!H.stage&&((X=H.documentType)==null?void 0:X.toLowerCase().includes(I.name.toLowerCase().split(" ")[0]))}).length,K=I.status==="active"&&!I.isLocked;return G===0&&!K?null:e.jsx("div",{className:"flex items-center gap-2 mt-1",children:e.jsxs("button",{onClick:()=>{f(I.name),p(!0),G===0&&K&&h(!0)},className:"text-xs font-semibold text-blue-600 hover:text-blue-800 flex items-center gap-1.5 px-3 py-1 rounded-full bg-blue-50 border border-blue-100 hover:bg-blue-100 transition-all shadow-sm","data-testid":`onboarding-progress-stage-docs-${B}`,children:[e.jsx(Ns,{className:"w-3.5 h-3.5"}),G>0?`${G} Documents`:"Upload"]})})})(),e.jsxs("p",{className:"text-slate-500 mt-1 text-xs","data-testid":`onboarding-progress-stage-status-text-${B}`,children:[I.status==="completed"&&I.date&&`Completed: ${Yt(I.date)}`,I.status==="active"&&"In Progress",I.status==="pending"&&"Pending"]})]})]}),I.isParallel&&I.branches&&e.jsxs("div",{className:"ml-5 mb-8","data-testid":`onboarding-progress-parallel-branches-${B}`,children:[I.branches.map((G,K)=>{const H=G.name.toLowerCase().replace(/\s+/g,"-"),X=d[H],J=G.color==="blue"?"blue":"green";return e.jsxs("div",{className:"mb-6 last:mb-0",children:[e.jsx("div",{className:"flex items-center gap-3 mb-2",children:e.jsxs("button",{onClick:()=>m(ae=>({...ae,[H]:!ae[H]})),className:`flex-1 flex items-center gap-3 p-4 rounded-lg border-2 transition-all hover:shadow-md ${J==="blue"?"border-blue-300 bg-blue-50 hover:bg-blue-100":"border-green-300 bg-green-50 hover:bg-green-100"}`,"data-testid":`onboarding-progress-branch-trigger-${H}`,children:[X?e.jsx(Aa,{className:`w-5 h-5 ${J==="blue"?"text-blue-600":"text-green-600"}`}):e.jsx(bi,{className:`w-5 h-5 ${J==="blue"?"text-blue-600":"text-green-600"}`}),e.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center ${J==="blue"?"bg-blue-200":"bg-green-200"}`,children:e.jsx(sy,{className:`w-4 h-4 ${J==="blue"?"text-blue-700":"text-green-700"}`})}),e.jsxs("div",{className:"flex-1 text-left",children:[e.jsx("p",{className:`${J==="blue"?"text-blue-900":"text-green-900"} font-semibold tracking-tight`,children:G.name}),e.jsxs("p",{className:`text-[10px] uppercase font-bold tracking-wider ${J==="blue"?"text-blue-500":"text-green-500"}`,children:[G.stages.length," SUB-STEPS"]})]})]})}),X&&e.jsx("div",{className:"mt-4 ml-8 border-l-2 border-slate-200 pl-6 space-y-6","data-testid":`onboarding-progress-branch-content-${H}`,children:G.stages.map((ae,le)=>e.jsx("div",{className:"relative",children:e.jsx("div",{className:"flex gap-4 text-xs","data-testid":`onboarding-progress-branch-stage-${H}-${le}`,children:(()=>{const xe=i.filter(ve=>{var Pe;return((Pe=ve.documentType)==null?void 0:Pe.toLowerCase().includes(ae.name.toLowerCase().split(" ")[0]))||ve.stage===ae.name}),ce=ae.status==="completed"||xe.length>0;return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"relative",children:e.jsx("div",{className:`w-8 h-8 rounded-full flex items-center justify-center border-2 ${ce?`${J==="blue"?"bg-blue-500 border-blue-500":"bg-green-500 border-green-500"}`:ae.status==="active"?"bg-status-workflow-active border-status-workflow-active text-white shadow-sm":"bg-white border-slate-300 text-slate-400"}`,"data-testid":`onboarding-progress-branch-stage-icon-${H}-${le}`,children:ce?e.jsx(Hn,{className:"w-4 h-4 text-white",strokeWidth:3}):ae.status==="active"?e.jsx(vn,{className:"w-4 h-4 text-white"}):e.jsx("div",{className:"w-2 h-2 bg-slate-300 rounded-full"})})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("p",{className:"font-semibold text-slate-800","data-testid":`onboarding-progress-branch-stage-name-${H}-${le}`,children:ae.name}),ae.description&&e.jsx("p",{className:"text-slate-500 text-xs mt-0.5",children:ae.description}),(()=>{const ve=ae.status==="active";return xe.length===0&&!ve?null:e.jsx("div",{className:"flex items-center gap-2 mt-1",children:e.jsxs("button",{onClick:()=>{f(ae.name),p(!0),xe.length===0&&ve&&h(!0)},className:Nt("text-[10px] font-medium flex items-center gap-1 transition-colors",J==="blue"?"text-blue-600 hover:text-blue-800":"text-green-600 hover:text-green-800"),"data-testid":`onboarding-progress-branch-stage-docs-${H}-${le}`,children:[e.jsx(Ns,{className:"w-2.5 h-2.5"}),xe.length>0?`${xe.length} Docs`:"Upload"]})})})(),e.jsx("p",{className:"text-slate-400 text-[10px] mt-1","data-testid":`onboarding-progress-branch-stage-status-${H}-${le}`,children:ce&&ae.date?`Done: ${Yt(ae.date)}`:ce&&xe.length>0?`Uploaded: ${Yt(xe[0].updatedAt||xe[0].createdAt)}`:"Pending"})]})]})})()})},ae.id))})]},K)}),e.jsx("div",{className:"h-8 w-0.5 bg-slate-300 ml-5 opacity-50"})]})]},I.id))})()})]}),e.jsxs(Ut,{value:"documents",className:"space-y-4","data-testid":"onboarding-tab-content-documents",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h3",{className:"text-slate-900",children:"Uploaded Documents"}),e.jsxs(se,{size:"sm",className:"bg-re-red hover:bg-re-red-hover","data-testid":"onboarding-documents-upload-tab-button",onClick:()=>{f(null),p(!0),h(!0)},children:[e.jsx(or,{className:"w-4 h-4 mr-2"}),"Upload Document"]})]}),e.jsx("div",{className:"overflow-x-auto custom-scrollbar-x-slim",children:e.jsxs(Ts,{"data-testid":"onboarding-documents-table",children:[e.jsx(Ps,{children:e.jsxs(it,{children:[e.jsx(fe,{className:"min-w-[200px]",children:"File Name"}),e.jsx(fe,{className:"min-w-[120px]",children:"Type"}),e.jsx(fe,{className:"min-w-[120px]",children:"Upload Date"}),e.jsx(fe,{className:"min-w-[150px]",children:"Uploader"}),e.jsx(fe,{className:"text-right min-w-[100px]",children:"Actions"})]})}),e.jsx(Os,{children:i.length===0?e.jsx(it,{"data-testid":"onboarding-documents-empty-row",children:e.jsx(ue,{colSpan:5,className:"text-center py-8 text-slate-500",children:"No documents uploaded yet"})}):i.map((U,M)=>{var z;return e.jsxs(it,{"data-testid":`onboarding-document-row-${M}`,children:[e.jsxs(ue,{className:"flex items-center gap-2",children:[e.jsx(Ns,{className:"w-4 h-4 text-slate-400"}),e.jsx("span",{className:"truncate max-w-[150px] md:max-w-[300px]","data-testid":`onboarding-document-name-${M}`,children:U.fileName})]}),e.jsx(ue,{"data-testid":`onboarding-document-type-${M}`,children:U.documentType}),e.jsx(ue,{children:Yt(U.createdAt)}),e.jsx(ue,{"data-testid":`onboarding-document-uploader-${M}`,children:((z=U.uploader)==null?void 0:z.fullName)||(U.uploadedBy?"Unknown User":"Applicant")}),e.jsx(ue,{children:e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx(se,{size:"sm",variant:"outline","data-testid":`onboarding-document-preview-${M}`,onClick:()=>{D(U),P(!0)},children:e.jsx(yn,{className:"w-3 h-3 text-slate-500"})}),e.jsx(se,{size:"sm",variant:"outline","data-testid":`onboarding-document-download-${M}`,onClick:()=>{const T=BU.NEXT_PUBLIC_API_URL||"http://localhost:5000";window.open(`${T}/${U.filePath}`,"_blank")},children:e.jsx(ji,{className:"w-3 h-3 text-slate-500"})})]})})]},U.id)})})]})})]}),e.jsxs(Ut,{value:"interviews",className:"space-y-6","data-testid":"onboarding-tab-content-interviews",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-slate-900 mb-4",children:"Scheduled Interviews"}),e.jsx("div",{className:"overflow-x-auto custom-scrollbar-x-slim",children:e.jsxs(Ts,{"data-testid":"onboarding-interviews-scheduled-table",children:[e.jsx(Ps,{children:e.jsxs(it,{children:[e.jsx(fe,{className:"min-w-[100px]",children:"Level"}),e.jsx(fe,{className:"min-w-[180px]",children:"Date & Time"}),e.jsx(fe,{className:"min-w-[100px]",children:"Type"}),e.jsx(fe,{className:"min-w-[200px]",children:"Location/Link"}),e.jsx(fe,{className:"min-w-[120px]",children:"Status"}),e.jsx(fe,{className:"min-w-[150px]",children:"Scheduled By"}),e.jsx(fe,{className:"text-right",children:"Actions"})]})}),e.jsx(Os,{children:!o||o.length===0?e.jsx(it,{"data-testid":"onboarding-interviews-empty-row",children:e.jsx(ue,{colSpan:7,className:"text-center py-8 text-slate-500",children:"No interviews scheduled yet"})}):(Array.isArray(o)?o:[]).map((U,M)=>{var z,T;return e.jsxs(it,{"data-testid":`onboarding-interview-row-${M}`,children:[e.jsxs(ue,{className:"font-medium",children:["Level ",U.level]}),e.jsx(ue,{children:U.scheduleDate?new Date(U.scheduleDate).toLocaleString():"N/A"}),e.jsx(ue,{className:"capitalize",children:U.interviewType}),e.jsx(ue,{children:(z=U.interviewType)!=null&&z.toLowerCase().includes("virtual")?e.jsx("a",{href:U.linkOrLocation,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:underline","data-testid":`onboarding-interview-link-${M}`,children:"Join Meeting"}):e.jsx("span",{"data-testid":`onboarding-interview-location-${M}`,children:U.linkOrLocation})}),e.jsx(ue,{children:e.jsx(Ce,{variant:U.status==="Completed"?"default":"secondary","data-testid":`onboarding-interview-status-${M}`,children:U.status})}),e.jsx(ue,{children:((T=U.scheduler)==null?void 0:T.fullName)||U.scheduledBy||"N/A"}),e.jsx(ue,{className:"text-right",children:(U.status==="Scheduled"||U.status==="scheduled")&&e.jsx(se,{variant:"ghost",size:"sm",className:"text-primary-600 hover:text-primary-700 hover:bg-primary-50 h-8 px-2","data-testid":`onboarding-interview-reschedule-${M}`,onClick:()=>u(U),children:"Reschedule"})})]},U.id)})})]})})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-slate-900 mb-4",children:"Interview Feedback"}),!o||o.length===0?e.jsx("p",{className:"text-slate-500 italic","data-testid":"onboarding-interviews-no-feedback",children:"No interviews scheduled."}):(Array.isArray(o)?o:[]).map((U,M)=>e.jsxs("div",{className:"mb-6 border p-4 rounded-lg bg-slate-50/50","data-testid":`onboarding-interview-feedback-block-${M}`,children:[e.jsxs("h4",{className:"font-semibold text-slate-800 mb-2",children:["Level ",U.level," Interview",e.jsxs("span",{className:"font-normal text-slate-500 text-sm ml-2",children:["(",Yt(U.scheduleDate)," - ",U.interviewType,")"]})]}),U.evaluations&&U.evaluations.length>0?e.jsxs(Ts,{"data-testid":`onboarding-interview-evaluations-table-${M}`,children:[e.jsx(Ps,{children:e.jsxs(it,{children:[e.jsx(fe,{children:"Interviewer"}),e.jsx(fe,{children:"Role"}),e.jsx(fe,{children:U.level===1?"Score (KT Matrix)":"Overall Score"}),e.jsx(fe,{children:"Remarks"}),e.jsx(fe,{children:"Recommendation"})]})}),e.jsx(Os,{children:U.evaluations.map((z,T)=>{var I,B,G;return e.jsxs(it,{"data-testid":`onboarding-interview-evaluation-row-${M}-${T}`,children:[e.jsx(ue,{className:"font-medium",children:(I=z.evaluator)==null?void 0:I.fullName}),e.jsx(ue,{children:((G=(B=z.evaluator)==null?void 0:B.role)==null?void 0:G.roleName)||"N/A"}),e.jsx(ue,{children:z.ktMatrixScore?e.jsxs(Ce,{variant:U.level===1?Number(z.ktMatrixScore)>=50?"outline":"destructive":Number(z.ktMatrixScore)>=5?"outline":"destructive","data-testid":`onboarding-interview-evaluation-score-${M}-${T}`,children:[z.ktMatrixScore,"/",U.level===1?"100":"10"]}):"N/A"}),e.jsx(ue,{className:"max-w-xs truncate",title:z.remarks||z.qualitativeFeedback,children:z.remarks?e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("span",{className:"font-medium text-slate-800",children:z.remarks}),z.feedbackDetails&&z.feedbackDetails.length>0&&e.jsx(se,{variant:"link",className:"p-0 h-auto font-normal text-blue-600 text-xs w-fit","data-testid":`onboarding-interview-evaluation-details-btn-${M}-${T}`,onClick:()=>{N({...z,interview:U}),v(!0)},children:"View Detailed Feedback"})]}):z.feedbackDetails&&z.feedbackDetails.length>0?e.jsx(se,{variant:"link",className:"p-0 h-auto font-normal text-blue-600","data-testid":`onboarding-interview-evaluation-details-btn-${M}-${T}`,onClick:()=>{N({...z,interview:U}),v(!0)},children:"View Detailed Feedback"}):z.qualitativeFeedback||"-"}),e.jsx(ue,{"data-testid":`onboarding-interview-evaluation-rec-${M}-${T}`,children:z.recommendation||"-"})]},z.id)})})]}):e.jsx("p",{className:"text-sm text-slate-500 italic pl-2",children:"No feedback recorded yet."})]},U.id))]}),["Level 2 Approved","Level 3 Interview Pending","Approved","Onboarded"].includes(s.status)&&e.jsxs("div",{"data-testid":"onboarding-interviews-summary-l2",children:[e.jsx("h3",{className:"text-slate-900 mb-4",children:"Level 2 Interview Summary"}),e.jsxs("div",{className:"p-4 bg-slate-50 rounded-lg",children:[e.jsx("p",{className:"text-slate-600",children:"Decision: Approved by both ZBH and DD Lead"}),e.jsx("p",{className:"text-slate-600 mt-2",children:"Overall Assessment: Strong candidate with excellent business plan"})]})]})]}),e.jsx(Ut,{value:"fdd",className:"space-y-6","data-testid":"onboarding-tab-content-fdd",children:w()}),e.jsxs(Ut,{value:"eor",className:"space-y-4 status-progress-ui","data-testid":"onboarding-tab-content-eor",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsx("h3",{className:"text-slate-900",children:"Essential Operating Requirements"}),e.jsxs(Ce,{className:Aq(j),"data-testid":"onboarding-eor-progress-badge",children:[Math.round(j),"% Complete"]})]}),e.jsx(dc,{value:j,className:"h-3 mb-6 bg-status-progress-soft",indicatorClassName:Cq(j),"data-testid":"onboarding-eor-progress-bar"}),e.jsx("div",{className:"space-y-3","data-testid":"onboarding-eor-checklist",children:((b==null?void 0:b.items)||C).map((U,M)=>{const z=U.description||U.item,T=!!U.proofDocument;return e.jsxs("div",{className:"flex items-center gap-3 p-3 bg-slate-50 rounded-xl transition-all border border-transparent hover:border-slate-200 group","data-testid":`onboarding-eor-item-${M}`,children:[e.jsx(Ln,{checked:U.isCompliant||U.completed,className:"pointer-events-none shrink-0","data-testid":`onboarding-eor-checkbox-${M}`}),e.jsxs("div",{className:"flex flex-col flex-1 min-w-0 cursor-pointer","data-testid":`onboarding-eor-clickable-${M}`,onClick:()=>{f(`EOR: ${z}`),S(z),p(!0),h(!T)},children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:U.isCompliant||U.completed?"text-slate-900 font-bold":"text-slate-600 font-medium",children:z}),T&&!U.isCompliant&&e.jsx(Ce,{variant:"outline",className:"text-[10px] h-4 px-1.5 bg-red-50 text-re-red border-red-200 uppercase tracking-wider font-bold",children:"Needs Verification"})]}),T&&e.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-blue-600 font-semibold mt-1",children:[e.jsx(Ns,{className:"w-3.5 h-3.5"}),e.jsx("span",{className:"truncate",children:U.proofDocument.fileName})]}),!T&&e.jsx("span",{className:"text-[10px] text-slate-400 mt-1 uppercase tracking-tighter",children:"Click to upload proof"})]}),e.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[T&&!U.isCompliant&&R&&e.jsxs("div",{className:"flex gap-2",children:[e.jsx(se,{size:"sm",className:"h-8 px-3 bg-green-600 hover:bg-green-700 text-white font-bold rounded-lg shadow-sm","data-testid":`onboarding-eor-verify-btn-${M}`,onClick:async()=>{await(await Qo(async()=>{const{eorService:I}=await Promise.resolve().then(()=>Vg);return{eorService:I}},void 0)).eorService.updateItem(b.id,{...U,isCompliant:!0}),A(),te.success(`${z} verified!`)},children:"Verify"}),e.jsx(se,{size:"sm",variant:"outline",className:"h-8 px-3 border-red-200 text-red-600 hover:bg-red-50 font-bold rounded-lg","data-testid":`onboarding-eor-reject-btn-${M}`,onClick:async()=>{await(await Qo(async()=>{const{eorService:I}=await Promise.resolve().then(()=>Vg);return{eorService:I}},void 0)).eorService.updateItem(b.id,{...U,isCompliant:!1,proofDocumentId:null}),A(),te.success(`${z} rejected.`)},children:"Reject"})]}),(U.isCompliant||U.completed)&&e.jsx("div",{className:"bg-green-100 p-1.5 rounded-full","data-testid":`onboarding-eor-done-icon-${M}`,children:e.jsx(un,{className:"w-4 h-4 text-green-600"})}),!T&&e.jsx("div",{className:"p-2 text-slate-300 group-hover:text-re-red transition-colors","data-testid":`onboarding-eor-upload-hint-${M}`,children:e.jsx(or,{className:"w-4 h-4"})})]})]},U.id)})}),j===100&&R&&(s.status==="EOR In Progress"||s.status==="LOA Pending")&&e.jsx("div",{className:"mt-8 p-6 bg-green-50 rounded-xl border-2 border-green-200 animate-in fade-in slide-in-from-bottom-4 duration-500","data-testid":"onboarding-eor-complete-banner",children:e.jsxs("div",{className:"flex flex-col sm:flex-row items-center gap-4",children:[e.jsx("div",{className:"w-12 h-12 rounded-xl bg-green-100 flex items-center justify-center shrink-0",children:e.jsx(no,{className:"w-7 h-7 text-green-600"})}),e.jsxs("div",{className:"flex-1 text-center sm:text-left",children:[e.jsx("h4",{className:"text-green-900 font-bold text-lg",children:"EOR Checklist Complete"}),e.jsx("p",{className:"text-green-700 text-sm",children:"All 12 mandatory requirements have been verified. You can now complete the audit and move to final inauguration."})]}),e.jsx(se,{className:"w-full sm:w-auto bg-green-600 hover:bg-green-700 text-white font-bold h-12 px-8 rounded-xl shadow-lg shadow-green-600/20 transition-all hover:scale-[1.02] active:scale-[0.98]","data-testid":"onboarding-eor-submit-audit",onClick:async()=>{try{const U=b==null?void 0:b.id;if(!U)throw new Error("Checklist ID not found");await(await Qo(async()=>{const{eorService:M}=await Promise.resolve().then(()=>Vg);return{eorService:M}},void 0)).eorService.submitAudit(U,{status:"Completed",overallComments:"EOR Checklist verified and audit completed."}),te.success("EOR Audit completed successfully!"),_(),A()}catch(U){te.error(U.message||"Failed to complete EOR audit")}},children:"Complete Audit & Proceed"})]})})]}),e.jsxs(Ut,{value:"payments",className:"space-y-6","data-testid":"onboarding-tab-content-payments",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("h3",{className:"text-lg font-semibold text-slate-900",children:"Security Deposits"}),e.jsxs(Ce,{variant:"outline",className:"bg-slate-50 text-slate-500 border-slate-200","data-testid":"onboarding-payments-count-badge",children:[E.length," Payment Record(s)"]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[(()=>{const U=q("SECURITY_DEPOSIT"),M=O.SECURITY_DEPOSIT,z=(M==null?void 0:M.amount)||5e5;return e.jsx(Le,{className:Nt("border-l-4",(U==null?void 0:U.status)==="Verified"?"border-l-green-500":(U==null?void 0:U.status)==="Rejected"?"border-l-red-500":"border-l-re-red"),"data-testid":"onboarding-payment-card-security",children:e.jsxs(Fe,{className:"pt-6",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-8 h-8 rounded bg-red-50 flex items-center justify-center text-re-red",children:e.jsx(rc,{className:"w-4 h-4"})}),e.jsx("span",{className:"font-semibold text-slate-700",children:"Security Deposit"})]}),e.jsx(Ce,{className:Nt((U==null?void 0:U.status)==="Verified"?"bg-green-100 text-green-700 hover:bg-green-100":(U==null?void 0:U.status)==="Rejected"?"bg-red-100 text-red-700 hover:bg-red-100":"bg-red-50 text-re-red-hover hover:bg-red-50"),"data-testid":"onboarding-payment-status-security",children:(U==null?void 0:U.status)||"Awaiting"})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex justify-between items-baseline",children:[e.jsx("span",{className:"text-xs text-slate-500 uppercase font-bold tracking-wider",children:"Amount Received"}),e.jsxs("span",{className:"text-lg font-bold text-slate-900","data-testid":"onboarding-payment-amount-security",children:["₹",Number((U==null?void 0:U.amount)||0).toLocaleString()]})]}),e.jsxs("div",{className:"flex justify-between items-baseline border-t border-slate-100 pt-2",children:[e.jsx("span",{className:"text-xs text-slate-500",children:"Expected Total"}),e.jsxs("span",{className:"text-sm font-medium text-slate-600",children:["₹",z.toLocaleString()]})]}),(U==null?void 0:U.paymentReference)&&e.jsxs("div",{className:"bg-slate-50 p-2 rounded text-xs font-mono text-slate-600 flex justify-between items-center","data-testid":"onboarding-payment-ref-security",children:[e.jsxs("span",{children:["Ref: ",U.paymentReference]}),U.verifiedAt&&e.jsx("span",{children:Yt(U.verifiedAt)})]}),(U==null?void 0:U.remarks)&&e.jsxs("div",{className:"text-[11px] text-slate-500 bg-red-50/50 p-2 rounded border border-red-100 italic","data-testid":"onboarding-payment-remarks-security",children:['"',U.remarks,'"']}),e.jsxs("div",{className:"pt-4 mt-2 border-t border-slate-100",children:[e.jsx("p",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wider mb-2",children:"Verification Documents"}),e.jsxs("div",{className:"space-y-2",children:[i.filter(T=>{var I,B;return((I=T.documentType)==null?void 0:I.toLowerCase().includes("security"))&&((B=T.documentType)==null?void 0:B.toLowerCase().includes("deposit"))}).map((T,I)=>e.jsxs("div",{className:"flex items-center justify-between p-2 rounded bg-slate-50/50 border border-slate-100","data-testid":`onboarding-payment-doc-security-${I}`,children:[e.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[e.jsx(Ns,{className:"w-3 h-3 text-slate-400"}),e.jsx("span",{className:"text-[10px] font-medium text-slate-700 truncate",children:T.fileName||T.name})]}),e.jsx(se,{variant:"ghost",size:"sm",className:"h-6 px-2 text-[10px] text-re-red hover:text-re-red-hover hover:bg-red-50","data-testid":`onboarding-payment-doc-view-security-${I}`,onClick:()=>{D(T),P(!0)},children:"View"})]},I)),i.filter(T=>{var I,B;return((I=T.documentType)==null?void 0:I.toLowerCase().includes("security"))&&((B=T.documentType)==null?void 0:B.toLowerCase().includes("deposit"))}).length===0&&e.jsx("p",{className:"text-[10px] text-slate-400 italic",children:"No proof uploaded"})]})]})]})]})})})(),(()=>{const U=q("FIRST_FILL"),M=O.FIRST_FILL,z=(M==null?void 0:M.amount)||15e5;return e.jsx(Le,{className:Nt("border-l-4",(U==null?void 0:U.status)==="Verified"?"border-l-green-500":(U==null?void 0:U.status)==="Rejected"?"border-l-red-500":"border-l-re-red"),"data-testid":"onboarding-payment-card-first-fill",children:e.jsxs(Fe,{className:"pt-6",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-8 h-8 rounded bg-blue-50 flex items-center justify-center text-blue-600",children:e.jsx(no,{className:"w-4 h-4"})}),e.jsx("span",{className:"font-semibold text-slate-700",children:"First Fill"})]}),e.jsx(Ce,{className:Nt((U==null?void 0:U.status)==="Verified"?"bg-green-100 text-green-700 hover:bg-green-100":(U==null?void 0:U.status)==="Rejected"?"bg-red-100 text-red-700 hover:bg-red-100":"bg-red-50 text-re-red-hover hover:bg-red-50"),"data-testid":"onboarding-payment-status-first-fill",children:(U==null?void 0:U.status)||"Awaiting"})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex justify-between items-baseline",children:[e.jsx("span",{className:"text-xs text-slate-500 uppercase font-bold tracking-wider",children:"Amount Received"}),e.jsxs("span",{className:"text-lg font-bold text-slate-900","data-testid":"onboarding-payment-amount-first-fill",children:["₹",Number((U==null?void 0:U.amount)||0).toLocaleString()]})]}),e.jsxs("div",{className:"flex justify-between items-baseline border-t border-slate-100 pt-2",children:[e.jsx("span",{className:"text-xs text-slate-500",children:"Expected Total"}),e.jsxs("span",{className:"text-sm font-medium text-slate-600",children:["₹",z.toLocaleString()]})]}),(U==null?void 0:U.paymentReference)&&e.jsxs("div",{className:"bg-slate-50 p-2 rounded text-xs font-mono text-slate-600 flex justify-between items-center","data-testid":"onboarding-payment-ref-first-fill",children:[e.jsxs("span",{children:["Ref: ",U.paymentReference]}),U.verifiedAt&&e.jsx("span",{children:Yt(U.verifiedAt)})]}),(U==null?void 0:U.remarks)&&e.jsxs("div",{className:"text-[11px] text-slate-500 bg-red-50/50 p-2 rounded border border-red-100 italic","data-testid":"onboarding-payment-remarks-first-fill",children:['"',U.remarks,'"']}),e.jsxs("div",{className:"pt-4 mt-2 border-t border-slate-100",children:[e.jsx("p",{className:"text-[10px] font-bold text-slate-400 uppercase tracking-wider mb-2",children:"Verification Documents"}),e.jsxs("div",{className:"space-y-2",children:[i.filter(T=>{var I,B;return((I=T.documentType)==null?void 0:I.toLowerCase().includes("first"))&&((B=T.documentType)==null?void 0:B.toLowerCase().includes("fill"))}).map((T,I)=>e.jsxs("div",{className:"flex items-center justify-between p-2 rounded bg-slate-50/50 border border-slate-100","data-testid":`onboarding-payment-doc-first-fill-${I}`,children:[e.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[e.jsx(Ns,{className:"w-3 h-3 text-slate-400"}),e.jsx("span",{className:"text-[10px] font-medium text-slate-700 truncate",children:T.fileName||T.name})]}),e.jsx(se,{variant:"ghost",size:"sm",className:"h-6 px-2 text-[10px] text-blue-600 hover:text-blue-700 hover:bg-blue-50","data-testid":`onboarding-payment-doc-view-first-fill-${I}`,onClick:()=>{D(T),P(!0)},children:"View"})]},I)),i.filter(T=>{var I,B;return((I=T.documentType)==null?void 0:I.toLowerCase().includes("first"))&&((B=T.documentType)==null?void 0:B.toLowerCase().includes("fill"))}).length===0&&e.jsx("p",{className:"text-[10px] text-slate-400 italic",children:"No proof uploaded"})]})]})]})]})})})()]})]}),e.jsx(Ut,{value:"audit","data-testid":"onboarding-tab-content-audit",children:e.jsx(Ib,{className:"h-[30rem] rounded-md border border-slate-100 bg-slate-50/50",children:e.jsx("div",{className:"space-y-2.5 p-3 pr-4","data-testid":"onboarding-audit-logs-container",children:L?e.jsxs("div",{className:"flex items-center justify-center py-10","data-testid":"onboarding-audit-loading",children:[e.jsx("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-re-red"}),e.jsx("span",{className:"ml-2 text-sm text-slate-500",children:"Loading audit trail…"})]}):$.length===0?e.jsx("div",{className:"rounded-lg border border-dashed border-slate-200 bg-white py-10 text-center text-sm text-slate-500","data-testid":"onboarding-audit-empty",children:"No audit logs recorded yet for this application."}):$.map((U,M)=>e.jsxs("div",{className:"rounded-lg border border-slate-200/90 bg-white p-3 text-sm shadow-sm","data-testid":`onboarding-audit-log-item-${M}`,children:[e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-x-3 gap-y-1.5",children:[e.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[e.jsx(Ce,{variant:"outline",className:Nt("shrink-0 text-[10px] font-semibold uppercase tracking-wide",Y(U.action)),"data-testid":`onboarding-audit-log-action-${M}`,children:String(U.action||"EVENT").replace(/_/g," ")}),U.stage?e.jsx("span",{className:"max-w-[200px] truncate text-[11px] text-slate-500",title:U.stage,"data-testid":`onboarding-audit-log-stage-${M}`,children:U.stage}):null]}),e.jsx("time",{className:"shrink-0 text-xs tabular-nums text-slate-400",dateTime:U.timestamp,"data-testid":`onboarding-audit-log-time-${M}`,children:Yt(U.timestamp)})]}),e.jsx("p",{className:"mt-2 text-[13px] leading-relaxed text-slate-800","data-testid":`onboarding-audit-log-desc-${M}`,children:U.description||"—"}),e.jsxs("div",{className:"mt-2 flex items-center gap-1.5 text-xs text-slate-500",children:[e.jsx(Lr,{className:"h-3.5 w-3.5 shrink-0 text-slate-400","aria-hidden":!0}),e.jsxs("span",{className:"min-w-0 truncate",children:[e.jsx("span",{className:"font-medium text-slate-600","data-testid":`onboarding-audit-log-user-${M}`,children:U.userName||"System"}),U.userEmail?e.jsxs("span",{className:"text-slate-400","data-testid":`onboarding-audit-log-email-${M}`,children:[" · ",U.userEmail]}):null]})]})]},U.id))})})})]})]})})}function qU(t){var B;const{application:s,permissions:n,getDeposit:r,isNonResponsive:a,isAdmin:i,currentUserStageAction:o,currentUserEvaluation:d,onOpenApproveModal:m,onOpenRejectModal:f,onOpenWorknote:p,onOpenScheduleModal:h,currentUser:x,handleGenerateDealerCodes:u,onOpenAssignArchitectureModal:N,onOpenAssignFdd:v,showAssignFddModal:w,setShowAssignFddModal:j,fddAgencies:b,selectedAgencyId:C,setSelectedAgencyId:S,isAssigningAgency:R,handleAssignAgency:_,activeInterviewForUser:A,hasSubmittedFeedback:E,setSelectedInterviewForFeedback:q,setShowKTMatrixModal:O,setShowLevel2FeedbackModal:D,setShowLevel3FeedbackModal:P,onGoToDashboard:L,showAssignModal:$,setShowAssignModal:Y,selectedUser:Z,setSelectedUser:W,users:U,participantType:M,setParticipantType:z,handleAddParticipant:T,isAssigningParticipant:I}=t;return e.jsxs("div",{className:"space-y-6",children:[e.jsxs(Le,{"data-testid":"onboarding-details-summary-card",children:[e.jsx(Qe,{children:e.jsx(Je,{children:"Summary"})}),e.jsxs(Fe,{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Registration ID"}),e.jsx("p",{className:"text-slate-900","data-testid":"onboarding-details-summary-reg-id",children:s.registrationNumber})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Current Status"}),e.jsx(Ce,{className:Nt("mt-1",Xb(s.status)),"data-testid":"onboarding-details-summary-status",children:s.status})]}),s.rank&&e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Rank"}),e.jsxs("p",{className:"text-slate-900","data-testid":"onboarding-details-summary-rank",children:[s.rank," of ",s.totalApplicantsAtLocation,e.jsxs("span",{className:"text-slate-500",children:[" in ",s.preferredLocation]})]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Progress"}),e.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[e.jsx(dc,{value:s.progress,className:"flex-1 bg-red-50",indicatorClassName:gl(s.status),"data-testid":"onboarding-details-summary-progress-bar"}),e.jsxs("span",{className:"text-slate-900","data-testid":"onboarding-details-summary-progress-text",children:[s.progress,"%"]})]})]}),s.deadline&&e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Questionnaire Deadline"}),e.jsx("p",{className:"text-slate-900","data-testid":"onboarding-details-summary-deadline",children:Yt(s.deadline)})]})]})]}),(s.isShortlisted!==!1||s.status==="Submitted")&&e.jsxs(Le,{"data-testid":"onboarding-details-actions-card",children:[e.jsx(Qe,{children:e.jsx(Je,{children:"Actions"})}),e.jsxs(Fe,{className:"space-y-3",children:[n.isLoaLocked&&e.jsxs(di,{variant:"destructive",className:"mb-4 bg-red-50 border-red-200 text-red-800","data-testid":"onboarding-details-loa-locked-alert",children:[e.jsx(ny,{className:"w-4 h-4 text-re-red"}),e.jsx(_i,{className:"text-red-900 font-semibold",children:"LOA approval locked"}),e.jsxs(ui,{className:"text-red-800",children:[e.jsx("span",{className:"font-medium",children:"First Fill"})," (later-stage payment) must be verified by Finance before LOA approval can proceed. This is separate from the initial Security Deposit before LOI Issued."]})]}),((B=r("FIRST_FILL"))==null?void 0:B.status)==="Verified"&&s.status!=="LOA Pending"&&!["LOA Issued","EOR In Progress","EOR Complete","Inauguration","Approved","Onboarded","Rejected"].includes(s.status)&&e.jsxs(di,{className:"mb-4 border-violet-200 bg-violet-50/90 text-violet-950","data-testid":"onboarding-details-first-fill-verified-alert",children:[e.jsx(_a,{className:"h-4 w-4 text-violet-700"}),e.jsx(_i,{className:"font-semibold",children:"First Fill verified on file"}),e.jsxs(ui,{className:"text-sm text-violet-900/90 leading-relaxed",children:["Finance has verified the ",e.jsx("span",{className:"font-medium",children:"First Fill"})," payment. The application status was ",e.jsx("span",{className:"font-medium",children:"not"})," changed until you reach"," ",e.jsx("span",{className:"font-medium",children:"LOA Pending"}),". When you get there, LOA approval will not be blocked by payment (same pattern as recording the initial Security Deposit before the LOI security step)."]})]}),n.isSecurityDetailsLocked&&e.jsxs(di,{variant:"destructive",className:"mb-4 bg-red-50 border-red-200 text-red-800","data-testid":"onboarding-details-security-locked-alert",children:[e.jsx(ny,{className:"w-4 h-4 text-re-red"}),e.jsx(_i,{className:"text-red-900 font-semibold",children:"Security Deposit approval locked"}),e.jsxs(ui,{className:"text-red-800",children:["Finance must verify the ",e.jsx("span",{className:"font-medium",children:"Security Deposit"})," before this stage can be approved. You can still use ",e.jsx("span",{className:"font-medium",children:"Reject"})," if needed."]})]}),["Security Deposit","Security Details","Payment Pending"].includes(s.status)&&e.jsxs(di,{className:"mb-4 border-sky-200 bg-sky-50/90 text-sky-900","data-testid":"onboarding-details-security-review-alert",children:[e.jsx(_a,{className:"h-4 w-4 text-sky-700"}),e.jsx(_i,{className:"text-sky-950 font-semibold",children:"Security Deposit review"}),e.jsxs(ui,{className:"text-sm text-sky-900/90 leading-relaxed",children:["Check the initial Security Deposit on the ",e.jsx("span",{className:"font-medium",children:"Payments"})," tab (Finance may have already marked it verified). When satisfied, use ",e.jsx("span",{className:"font-medium",children:"Approve"})," ","to move to ",e.jsx("span",{className:"font-medium",children:"LOI Issued"}),"."]})]}),a&&i&&e.jsxs(di,{variant:"destructive",className:"mb-4 bg-red-50 border-red-200 text-red-800","data-testid":"onboarding-details-non-responsive-alert",children:[e.jsx(sn,{className:"w-4 h-4 text-red-600"}),e.jsx(_i,{className:"text-red-900 font-black uppercase tracking-tighter",children:"⚠️ Non-Responsive Flag"}),e.jsx(ui,{className:"text-red-800 text-xs font-bold leading-tight",children:"FDD Audit has flagged this applicant. Review audit logs before approval."})]}),i&&(s.status==="Level 3 Approved"||s.status==="FDD Verification")&&(!s.fddAssignments||s.fddAssignments.length===0)&&e.jsxs(di,{className:"mb-4 bg-red-50 border-red-200 text-red-800","data-testid":"onboarding-details-fdd-assignment-alert",children:[e.jsx(sn,{className:"w-4 h-4 text-re-red"}),e.jsx(_i,{className:"text-red-900 font-bold",children:"FDD Assignment Required"}),e.jsx(ui,{className:"text-red-800 font-medium",children:"This application is pending financial due diligence. Please assign an FDD Agency to proceed with the audit."})]}),n.canApprove&&e.jsxs(se,{className:"w-full bg-green-600 hover:bg-green-700 font-bold",onClick:m,"data-testid":"onboarding-details-approve-button",children:[e.jsx(un,{className:"w-4 h-4 mr-2"}),["Inauguration","Approved"].includes(s.status)?"Onboard Dealer":"Approve"]}),n.canReject&&e.jsxs(se,{variant:"destructive",className:"w-full font-bold",onClick:f,"data-testid":"onboarding-details-reject-button",children:[e.jsx(mi,{className:"w-4 h-4 mr-2"}),"Reject"]}),n.showDecisionMessage&&e.jsxs("div",{className:`w-full p-2 text-center rounded border ${(o==null?void 0:o.decision)==="Approved"||(d==null?void 0:d.decision)==="Approved"||(d==null?void 0:d.recommendation)==="Approved"||(d==null?void 0:d.decision)==="Selected"?"bg-green-50 border-green-200 text-green-700":"bg-red-50 border-red-200 text-red-700"}`,"data-testid":"onboarding-details-decision-message",children:["You have ",(o==null?void 0:o.decision)==="Approved"||(d==null?void 0:d.decision)==="Approved"||(d==null?void 0:d.recommendation)==="Approved"||(d==null?void 0:d.decision)==="Selected"?"Approved":"Rejected"]}),e.jsx(ec,{}),e.jsxs(se,{variant:"outline",className:"w-full",onClick:p,"data-testid":"onboarding-details-worknote-button",children:[e.jsx(Ga,{className:"w-4 h-4 mr-2"}),"Work Note"]}),n.canSchedule&&e.jsxs(se,{variant:"outline",className:"w-full",onClick:h,"data-testid":"onboarding-details-schedule-button",children:[e.jsx(dr,{className:"w-4 h-4 mr-2"}),"Schedule Interview"]}),x&&["DD Admin","Super Admin"].includes(x.role)&&["Dealer Code Generation","LOA Pending","Architecture Team Assigned","Architecture Document Upload","Architecture Team Completion"].includes(s.status)&&e.jsxs(e.Fragment,{children:[!s.dealerCode&&e.jsxs(se,{className:"w-full bg-blue-600 hover:bg-blue-700",onClick:u,"data-testid":"onboarding-details-generate-dealer-codes",children:[e.jsx(R1,{className:"w-4 h-4 mr-2"}),"Generate Dealer Codes"]}),s.dealerCode&&!s.architectureAssignedTo&&e.jsxs(se,{variant:"outline",className:"w-full border-blue-200 hover:bg-blue-50 text-blue-700",onClick:N,"data-testid":"onboarding-details-assign-architecture",children:[e.jsx(sy,{className:"w-4 h-4 mr-2"}),"Assign Architecture Team"]})]}),i&&["Level 3 Approved","Level 3 Recommended","FDD Verification","FDD In Progress"].includes(s.status)&&(!s.fddAssignments||s.fddAssignments.length===0)&&e.jsxs(ds,{open:w,onOpenChange:j,children:[e.jsxs(se,{variant:"outline",className:"w-full border-purple-200 hover:bg-purple-50 text-purple-700",onClick:v,"data-testid":"onboarding-details-assign-fdd",children:[e.jsx(ik,{className:"w-4 h-4 mr-2"}),"Assign FDD"]}),e.jsxs(os,{"data-testid":"onboarding-details-assign-fdd-modal",children:[e.jsxs(xs,{children:[e.jsx(ms,{children:"Assign FDD Agency"}),e.jsx(bs,{children:"Select an FDD partner agency to perform the financial due diligence audit for this application."})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx(de,{children:"FDD Agency"}),e.jsxs(Dt,{value:C,onValueChange:S,children:[e.jsx(Et,{className:"mt-2","data-testid":"onboarding-details-assign-fdd-select",children:e.jsx(Rt,{placeholder:b!=null&&b.length?"Choose partner agency...":"No agencies available"})}),e.jsx(_t,{children:(b||[]).map(G=>e.jsxs(Me,{value:G.id,children:[G.fullName||G.name," (",G.email,")"]},G.id))})]})]}),e.jsx(se,{className:"w-full bg-re-red hover:bg-re-red-hover font-bold h-11",onClick:_,disabled:R||!C,"data-testid":"onboarding-details-assign-fdd-submit",children:R?"Assigning...":"Assign Agency"})]})]})]}),A&&!E&&e.jsxs(bb,{children:[e.jsx(jb,{asChild:!0,children:e.jsxs(se,{variant:"outline",className:"w-full","data-testid":"onboarding-details-feedback-dropdown-trigger",children:[e.jsx(tM,{className:"w-4 h-4 mr-2"}),"Interview Feedback",e.jsx(Aa,{className:"w-4 h-4 ml-auto"})]})}),e.jsx(Nb,{className:"w-56","data-testid":"onboarding-details-feedback-dropdown-content",children:e.jsxs(ID,{"data-testid":`onboarding-details-feedback-item-${A.id}`,onClick:()=>{q(A),A.level===1?O(!0):A.level===2?D(!0):P(!0)},children:["Level ",A.level," - ",A.interviewType]},A.id)})]}),s.status==="Questionnaire Pending"&&e.jsxs(e.Fragment,{children:[e.jsxs(se,{variant:"outline",className:"w-full","data-testid":"onboarding-details-send-reminder",children:[e.jsx(Ur,{className:"w-4 h-4 mr-2"}),"Send Reminder"]}),e.jsxs(se,{variant:"outline",className:"w-full","data-testid":"onboarding-details-extend-deadline",children:[e.jsx(vn,{className:"w-4 h-4 mr-2"}),"Extend Deadline"]})]}),s.dealer&&e.jsxs("div",{className:"p-4 bg-green-50 border border-green-200 rounded-lg space-y-3","data-testid":"onboarding-details-dealer-active-banner",children:[e.jsxs("div",{className:"flex items-center gap-2 text-green-800 font-semibold",children:[e.jsx(un,{className:"w-5 h-5 text-green-600"}),"Dealer Profile Active"]}),e.jsx("div",{className:"text-sm text-green-700",children:"This application has been successfully onboarded as a dealer. A user account has been created for the dealer."}),s.dealerCode&&e.jsxs("div",{className:"flex items-center justify-between text-xs font-mono bg-white p-2 rounded border border-green-100","data-testid":"onboarding-details-active-dealer-code",children:[e.jsx("span",{className:"text-slate-500",children:"Dealer Code:"}),e.jsx("span",{className:"font-bold text-slate-900",children:s.dealerCode.code})]}),e.jsxs(se,{className:"w-full bg-green-600 hover:bg-green-700 text-white",onClick:L,"data-testid":"onboarding-details-goto-dashboard",children:[e.jsx(R1,{className:"w-4 h-4 mr-2"}),"Go to Dealer Dashboard"]})]}),x&&["DD Admin","Super Admin"].includes(x.role)&&e.jsxs(ds,{open:$,onOpenChange:Y,children:[e.jsx(co,{asChild:!0,children:e.jsxs(se,{variant:"outline",className:"w-full","data-testid":"onboarding-details-assign-user-trigger",children:[e.jsx(Lr,{className:"w-4 h-4 mr-2"}),"Assign User"]})}),e.jsxs(os,{"data-testid":"onboarding-details-assign-user-modal",children:[e.jsxs(xs,{children:[e.jsx(ms,{children:"Assign User to Application"}),e.jsx(bs,{children:"Select a user and their role for this application."})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx(de,{children:"Select User"}),e.jsxs(Dt,{value:Z,onValueChange:W,children:[e.jsx(Et,{className:"mt-2","data-testid":"onboarding-details-assign-user-select",children:e.jsx(Rt,{placeholder:"Search users..."})}),e.jsx(_t,{children:U.map(G=>e.jsxs(Me,{value:G.id,children:[G.fullName," (",G.email,")"]},G.id))})]})]}),e.jsxs("div",{children:[e.jsx(de,{children:"Assignment Role"}),e.jsxs(Dt,{value:M,onValueChange:z,children:[e.jsx(Et,{className:"mt-2","data-testid":"onboarding-details-assign-role-select",children:e.jsx(Rt,{placeholder:"Select role"})}),e.jsxs(_t,{children:[e.jsx(Me,{value:"owner",children:"Owner"}),e.jsx(Me,{value:"contributor",children:"Contributor"}),e.jsx(Me,{value:"reviewer",children:"Reviewer"})]})]})]}),e.jsx(se,{className:"w-full bg-re-red hover:bg-re-red-hover font-bold h-11",onClick:T,disabled:I,"data-testid":"onboarding-details-assign-user-submit",children:I?"Assigning...":"Assign User"})]})]})]})]})]})]})}function zU(t){const{application:s,fetchApplication:n,showApproveModal:r,setShowApproveModal:a,approvalRemark:i,setApprovalRemark:o,setApprovalFile:d,isApproving:m,handleApprove:f,showOnboardModal:p,setShowOnboardModal:h,isOnboarding:x,setIsOnboarding:u,showRejectModal:N,setShowRejectModal:v,rejectionReason:w,setRejectionReason:j,isRejecting:b,handleReject:C,showScheduleModal:S,setShowScheduleModal:R,showCancelInterviewModal:_,setShowCancelInterviewModal:A,setInterviewIdToCancel:E,isCancellingInterview:q,handleConfirmCancelInterview:O,interviewToReschedule:D,setInterviewToReschedule:P,interviewType:L,setInterviewType:$,interviewMode:Y,setInterviewMode:Z,interviewDate:W,setInterviewDate:U,meetingLink:M,setMeetingLink:z,location:T,setLocation:I,isInterviewCompleted:B,isInterviewActive:G,users:K,selectedInterviewerId:H,setSelectedInterviewerId:X,handleAddInterviewer:J,scheduledInterviewParticipants:ae,handleRemoveInterviewer:le,isScheduling:xe,handleScheduleInterview:ce,showAssignArchitectureModal:ve,setShowAssignArchitectureModal:Pe,architectureLeadId:et,setArchitectureLeadId:kt,isAssigningArchitecture:vt,handleAssignArchitecture:ee,showArchitectureStatusModal:ge,setShowArchitectureStatusModal:ye,architectureStatus:Be,setArchitectureStatus:$e,architectureRemarks:dt,setArchitectureRemarks:st,isUpdatingArchitecture:xt,handleUpdateArchitectureStatus:Mt}=t,It=he=>{var pt,ht;return(he==null?void 0:he.__stageRole)||((pt=he==null?void 0:he.role)==null?void 0:pt.roleName)||((ht=he==null?void 0:he.role)==null?void 0:ht.roleCode)||(he==null?void 0:he.roleCode)||(he==null?void 0:he.role)||"Panelist"};return e.jsxs(e.Fragment,{children:[e.jsx(ds,{open:r,onOpenChange:a,children:e.jsxs(os,{"data-testid":"onboarding-approve-modal",children:[e.jsxs(xs,{children:[e.jsx(ms,{children:"Approve Application"}),e.jsx(bs,{children:"Provide approval remarks and optionally attach supporting documents."})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsxs(de,{children:["Remark ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx(Ws,{placeholder:"Enter approval remarks...",value:i,onChange:he=>o(he.target.value),className:"mt-2",rows:4,"data-testid":"onboarding-approve-remark-textarea"})]}),e.jsxs("div",{children:[e.jsx(de,{children:"Attach File (Optional)"}),e.jsx(at,{type:"file",className:"mt-2",onChange:he=>d(he.target.files?he.target.files[0]:null),"data-testid":"onboarding-approve-file-input"})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx(se,{variant:"outline",className:"flex-1",onClick:()=>a(!1),disabled:m,"data-testid":"onboarding-approve-cancel-button",children:"Cancel"}),e.jsx(se,{className:"flex-1 bg-green-600 hover:bg-green-700",onClick:f,disabled:m,"data-testid":"onboarding-approve-submit-button",children:m?e.jsxs(e.Fragment,{children:[e.jsx(ns,{className:"w-4 h-4 mr-2 animate-spin"}),"Approving..."]}):"Submit Approval"})]})]})]})}),e.jsx(ds,{open:p,onOpenChange:h,children:e.jsxs(os,{className:"max-w-md","data-testid":"onboarding-onboard-modal",children:[e.jsxs(xs,{children:[e.jsx("div",{className:"mx-auto w-12 h-12 bg-green-100 rounded-full flex items-center justify-center mb-4",children:e.jsx(un,{className:"w-8 h-8 text-green-600"})}),e.jsx(ms,{className:"text-center text-xl font-bold",children:"Finalize Onboarding"}),e.jsxs(bs,{className:"text-center pt-2",children:["You are about to officially onboard ",e.jsx("span",{className:"font-semibold text-slate-900",children:s.name})," as a Royal Enfield dealer."]})]}),e.jsxs("div",{className:"bg-slate-50 p-4 rounded-lg border border-slate-200 mt-4 space-y-3",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"mt-1 bg-green-500 rounded-full p-0.5",children:e.jsx(Hn,{className:"w-3 h-3 text-white"})}),e.jsx("p",{className:"text-sm text-slate-600",children:"Official dealer profile will be created."})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"mt-1 bg-green-500 rounded-full p-0.5",children:e.jsx(Hn,{className:"w-3 h-3 text-white"})}),e.jsxs("p",{className:"text-sm text-slate-600",children:["User account will be activated with role ",e.jsx("span",{className:"font-medium text-slate-900",children:"Dealer"}),"."]})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"mt-1 bg-green-500 rounded-full p-0.5",children:e.jsx(Hn,{className:"w-3 h-3 text-white"})}),e.jsx("p",{className:"text-sm text-slate-600",children:"Primary outlet will be registered in the system."})]})]}),e.jsxs("div",{className:"mt-6 flex flex-col gap-3",children:[e.jsx(se,{className:"w-full bg-green-600 hover:bg-green-700 h-11 text-lg font-semibold shadow-lg shadow-green-100","data-testid":"onboarding-onboard-confirm-button",onClick:async()=>{u(!0);try{await hs.createDealer({applicationId:s.id}),te.success("Dealer profile and login account created successfully!"),h(!1),n()}catch{te.error("Failed to create dealer profile")}finally{u(!1)}},disabled:x,children:x?e.jsxs(e.Fragment,{children:[e.jsx(ns,{className:"w-5 h-5 mr-2 animate-spin"}),"Processing Onboarding..."]}):"Confirm & Onboard Dealer"}),e.jsx(se,{variant:"ghost",className:"w-full text-slate-500 hover:text-slate-700",onClick:()=>h(!1),disabled:x,"data-testid":"onboarding-onboard-cancel-button",children:"Cancel"})]})]})}),e.jsx(ds,{open:N,onOpenChange:v,children:e.jsxs(os,{"data-testid":"onboarding-reject-modal",children:[e.jsxs(xs,{children:[e.jsx(ms,{children:"Reject Application"}),e.jsx(bs,{children:"Please provide a clear reason for rejecting this application."})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsxs(de,{children:["Reason for Rejection ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx(Ws,{placeholder:"Enter rejection reason...",value:w,onChange:he=>j(he.target.value),className:"mt-2",rows:4,"data-testid":"onboarding-reject-remark-textarea"})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx(se,{variant:"outline",className:"flex-1",onClick:()=>v(!1),disabled:b,"data-testid":"onboarding-reject-cancel-button",children:"Cancel"}),e.jsx(se,{variant:"destructive",className:"flex-1",onClick:C,disabled:b,"data-testid":"onboarding-reject-submit-button",children:b?e.jsxs(e.Fragment,{children:[e.jsx(ns,{className:"w-4 h-4 mr-2 animate-spin"}),"Rejecting..."]}):"Confirm Rejection"})]})]})]})}),e.jsx(ds,{open:S,onOpenChange:he=>{R(he),he||P(null)},children:e.jsxs(os,{"data-testid":"onboarding-schedule-modal",children:[e.jsxs(xs,{children:[e.jsx(ms,{children:D?"Reschedule Interview":"Schedule Interview"}),e.jsx(bs,{children:"Set up an interview session with the applicant and relevant team members."})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx(de,{children:"Interview Type"}),e.jsxs(Dt,{value:L,onValueChange:$,children:[e.jsx(Et,{className:"mt-2","data-testid":"onboarding-schedule-type-select",children:e.jsx(Rt,{placeholder:"Select interview type"})}),e.jsxs(_t,{children:[e.jsx(Me,{value:"level1",disabled:B(1)||G(1),children:e.jsxs("div",{className:"flex items-center justify-between w-full",children:[e.jsx("span",{children:"Level 1"}),B(1)&&e.jsx(un,{className:"w-4 h-4 text-green-500 ml-2 inline"}),G(1)&&e.jsx(vn,{className:"w-4 h-4 text-re-red ml-2 inline"})]})}),e.jsx(Me,{value:"level2",disabled:!B(1)||B(2)||G(2),children:e.jsxs("div",{className:"flex items-center justify-between w-full",children:[e.jsx("span",{children:"Level 2"}),!B(1)&&e.jsx("span",{className:"text-[10px] text-slate-400 ml-2",children:"(Prerequisite: L1)"}),B(2)&&e.jsx(un,{className:"w-4 h-4 text-green-500 ml-2 inline"}),G(2)&&e.jsx(vn,{className:"w-4 h-4 text-re-red ml-2 inline"})]})}),e.jsx(Me,{value:"level3",disabled:!B(2)||B(3)||G(3),children:e.jsxs("div",{className:"flex items-center justify-between w-full",children:[e.jsx("span",{children:"Level 3"}),!B(2)&&e.jsx("span",{className:"text-[10px] text-slate-400 ml-2",children:"(Prerequisite: L2)"}),B(3)&&e.jsx(un,{className:"w-4 h-4 text-green-500 ml-2 inline"}),G(3)&&e.jsx(vn,{className:"w-4 h-4 text-re-red ml-2 inline"})]})})]})]})]}),e.jsxs("div",{children:[e.jsxs(de,{children:["Interview Mode ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsxs(Dt,{value:Y,onValueChange:Z,children:[e.jsx(Et,{className:"mt-2","data-testid":"onboarding-schedule-mode-select",children:e.jsx(Rt,{placeholder:"Select interview mode"})}),e.jsxs(_t,{children:[e.jsx(Me,{value:"virtual",children:"Virtual"}),e.jsx(Me,{value:"physical",children:"Physical"})]})]})]}),e.jsxs("div",{children:[e.jsxs(de,{children:["Date & Time ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx(at,{type:"datetime-local",className:"mt-2",value:W,onChange:he=>U(he.target.value),"data-testid":"onboarding-schedule-date-input"})]}),Y==="virtual"&&e.jsxs("div",{children:[e.jsx(de,{children:"Meeting Link"}),e.jsx(at,{placeholder:"https://meet.google.com/...",className:"mt-2",value:M,onChange:he=>z(he.target.value),"data-testid":"onboarding-schedule-link-input"})]}),Y==="physical"&&e.jsxs("div",{children:[e.jsx(de,{children:"Location"}),e.jsx(at,{placeholder:"Enter interview location address",className:"mt-2",value:T,onChange:he=>I(he.target.value),"data-testid":"onboarding-schedule-location-input"})]}),e.jsxs("div",{children:[e.jsxs(de,{children:["Interviewers ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsxs("div",{className:"flex gap-2 mt-2",children:[e.jsxs(Dt,{value:H,onValueChange:X,children:[e.jsx(Et,{className:"flex-1","data-testid":"onboarding-schedule-interviewer-select",children:e.jsx(Rt,{placeholder:"Select interviewer"})}),e.jsx(_t,{children:K.map(he=>{var pt;return e.jsxs(Me,{value:he.id,children:[he.fullName||he.name," (",((pt=he.role)==null?void 0:pt.roleName)||he.roleCode,")"]},he.id)})})]}),e.jsx(se,{onClick:J,type:"button",variant:"secondary","data-testid":"onboarding-schedule-add-interviewer-button",children:"Add"})]}),ae.length>0&&e.jsxs("div",{className:"mt-3 space-y-2",children:[e.jsx(de,{className:"text-xs text-muted-foreground",children:"Selected Interviewers:"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:ae.map(he=>e.jsxs("div",{className:"flex items-center gap-1 bg-secondary px-2 py-1 rounded text-sm","data-testid":`onboarding-schedule-participant-${he.id}`,children:[e.jsx("span",{children:he.fullName||he.name||"Unknown"}),e.jsxs("span",{className:"text-[11px] text-muted-foreground",children:["(",It(he),")"]}),e.jsx("button",{onClick:()=>le(he.id),className:"text-muted-foreground hover:text-destructive","data-testid":`onboarding-schedule-remove-participant-${he.id}`,children:"×"})]},he.id))})]})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx(se,{variant:"outline",className:"flex-1",onClick:()=>{R(!1),P(null)},disabled:xe,"data-testid":"onboarding-schedule-cancel-button",children:"Cancel"}),e.jsx(se,{className:"flex-1 bg-primary-600 hover:bg-primary-700",onClick:ce,disabled:xe,"data-testid":"onboarding-schedule-submit-button",children:xe?D?"Rescheduling...":"Scheduling...":D?"Reschedule":"Schedule"})]})]})]})}),e.jsx(ds,{open:_,onOpenChange:he=>{A(he),he||E("")},children:e.jsxs(os,{"data-testid":"onboarding-cancel-interview-modal",children:[e.jsxs(xs,{children:[e.jsx(ms,{children:"Cancel Interview"}),e.jsx(bs,{children:"Are you sure you want to cancel this interview?"})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx(se,{variant:"outline",className:"flex-1",onClick:()=>{A(!1),E("")},disabled:q,"data-testid":"onboarding-cancel-interview-close",children:"No"}),e.jsx(se,{variant:"destructive",className:"flex-1",onClick:O,disabled:q,"data-testid":"onboarding-cancel-interview-confirm",children:q?"Cancelling...":"Yes, Cancel"})]})]})}),e.jsx(ds,{open:ve,onOpenChange:Pe,children:e.jsxs(os,{"data-testid":"onboarding-architecture-assign-modal",children:[e.jsxs(xs,{children:[e.jsx(ms,{children:"Assign Architecture Team"}),e.jsx(bs,{children:"Select an architecture team lead for site planning and blueprints."})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsxs(de,{children:["Select Architecture Lead ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsxs(Dt,{value:et,onValueChange:kt,children:[e.jsx(Et,{className:"mt-2","data-testid":"onboarding-architecture-lead-select",children:e.jsx(Rt,{placeholder:"Search users..."})}),e.jsxs(_t,{children:[K.filter(he=>{var pt;return he.roleCode==="ARCHITECTURE"||((pt=he.role)==null?void 0:pt.roleCode)==="ARCHITECTURE"||he.role==="Architecture"||he.role==="Architecture Team"}).map(he=>e.jsxs(Me,{value:he.id,children:[he.fullName," (",he.email,")"]},he.id)),K.filter(he=>{var pt;return he.roleCode==="ARCHITECTURE"||((pt=he.role)==null?void 0:pt.roleCode)==="ARCHITECTURE"||he.role==="Architecture"||he.role==="Architecture Team"}).length===0&&K.map(he=>e.jsxs(Me,{value:he.id,children:[he.fullName," (",he.roleCode||he.role,")"]},he.id))]})]})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx(se,{variant:"outline",className:"flex-1",onClick:()=>Pe(!1),disabled:vt,"data-testid":"onboarding-architecture-assign-cancel",children:"Cancel"}),e.jsx(se,{className:"flex-1 bg-blue-600 hover:bg-blue-700",onClick:ee,disabled:vt,"data-testid":"onboarding-architecture-assign-submit",children:vt?"Assigning...":"Assign Team"})]})]})]})}),e.jsx(ds,{open:ge,onOpenChange:ye,children:e.jsxs(os,{"data-testid":"onboarding-architecture-status-modal",children:[e.jsxs(xs,{children:[e.jsx(ms,{children:"Update Architecture Status"}),e.jsx(bs,{children:"Mark the architectural work as completed and optionally add remarks."})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsxs(de,{children:["Status ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsxs(Dt,{value:Be,onValueChange:$e,children:[e.jsx(Et,{className:"mt-2","data-testid":"onboarding-architecture-status-select",children:e.jsx(Rt,{placeholder:"Select status"})}),e.jsxs(_t,{children:[e.jsx(Me,{value:"COMPLETED",children:"Completed"}),e.jsx(Me,{value:"REJECTED",children:"Rejected / Needs Revision"})]})]})]}),e.jsxs("div",{children:[e.jsx(de,{children:"Remarks (Optional)"}),e.jsx(Ws,{placeholder:"Enter any planning or site-visit remarks...",value:dt,onChange:he=>st(he.target.value),className:"mt-2",rows:4,"data-testid":"onboarding-architecture-remarks-textarea"})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx(se,{variant:"outline",className:"flex-1",onClick:()=>ye(!1),disabled:xt,"data-testid":"onboarding-architecture-status-cancel",children:"Cancel"}),e.jsx(se,{className:"flex-1 bg-blue-600 hover:bg-blue-700",onClick:Mt,disabled:xt,"data-testid":"onboarding-architecture-status-submit",children:xt?"Updating...":"Update Status"})]})]})]})})]})}function UU(t){var Qs,Xs,$s,Q,oe,we,Oe,ke;const{application:s,ktCriteria:n,l2Fields:r,l3Fields:a,showKTMatrixModal:i,setShowKTMatrixModal:o,ktMatrixSelectedValues:d,handleKTMatrixChange:m,ktMatrixRemarks:f,setKtMatrixRemarks:p,ktMatrixRecommendation:h,setKtMatrixRecommendation:x,calculateKTScore:u,handleSubmitKTMatrix:N,isSubmittingKT:v,showLevel2FeedbackModal:w,setShowLevel2FeedbackModal:j,level2Feedback:b,handleLevel2Change:C,level2Recommendation:S,setLevel2Recommendation:R,handleSubmitLevel2Feedback:_,isSubmittingLevel2:A,showFeedbackDetailsModal:E,setShowFeedbackDetailsModal:q,selectedEvaluationForView:O,selectedInterviewForFeedback:D,showLevel3FeedbackModal:P,setShowLevel3FeedbackModal:L,level3Feedback:$,handleLevel3Change:Y,level3Recommendation:Z,setLevel3Recommendation:W,handleSubmitLevel3Feedback:U,isSubmittingLevel3:M,showDocumentsModal:z,setShowDocumentsModal:T,showUploadForm:I,setShowUploadForm:B,selectedStage:G,getDocumentsForStage:K,setPreviewDoc:H,setShowPreviewModal:X,uploadDocType:J,setUploadDocType:ae,setUploadFile:le,isUploading:xe,handleUpload:ce,uploadFile:ve,showPreviewModal:Pe,previewDoc:et,showFddFinalizeModal:kt,setShowFddFinalizeModal:vt,currentUser:ee,fddAuditRecommendation:ge,setFddAuditRecommendation:ye,fddAuditFindings:Be,setFddAuditFindings:$e,isFinalizingFdd:dt,setIsFinalizingFdd:st,fetchApplication:xt,showFddFlagModal:Mt,setShowFddFlagModal:It,isFddFlagging:he,setIsFddFlagging:pt,showFirmTypeModal:ht,setShowFirmTypeModal:_e,tempFirmType:Vt,setTempFirmType:Pt,updatingFirmType:_s,handleUpdateFirmType:Ys}=t,Bs=D!=null&&D.scheduleDate?new Date(D.scheduleDate).toISOString().split("T")[0]:"",Ks=(ee==null?void 0:ee.fullName)||(ee==null?void 0:ee.name)||"";return e.jsxs(e.Fragment,{children:[e.jsx(ds,{open:i,onOpenChange:o,children:e.jsxs(os,{className:"flex min-h-0 max-h-[90vh] w-[calc(100%-2rem)] max-w-lg flex-col gap-0 overflow-hidden p-0 sm:max-w-lg","data-testid":"onboarding-kt-matrix-modal",children:[e.jsxs(xs,{className:"shrink-0 space-y-2 border-b px-5 py-4 text-left",children:[e.jsx(ms,{className:"text-base",children:"KT matrix"}),e.jsxs(bs,{className:"text-sm leading-relaxed",children:["Level 1 interview · ",s.name,e.jsxs("span",{className:"mt-1 block text-xs text-muted-foreground",children:[Object.keys(d).length," of ",n.length," criteria answered"]})]})]}),e.jsx("div",{className:"custom-scrollbar-slim min-h-0 flex-1 overflow-y-auto px-5 py-5",children:e.jsxs("div",{className:"space-y-6",children:[n.length===0&&e.jsx("div",{className:"rounded-md border border-red-200 bg-red-50 px-3 py-2 text-sm text-red-800",children:"KT Matrix configuration is not available. Configure it in Master > Interview Configurations."}),n.map((je,Ve)=>e.jsxs("div",{className:"space-y-2",children:[e.jsxs(de,{htmlFor:`kt-matrix-${Ve}`,className:"block text-sm font-medium leading-relaxed text-foreground",children:[e.jsxs("span",{className:"text-muted-foreground",children:[Ve+1,"."]})," ",je.name," ",e.jsx("span",{className:"text-red-500",children:"*"})," ",e.jsxs("span",{className:"font-normal text-muted-foreground",children:["(",je.weight,"%)"]})]}),e.jsxs(Dt,{value:d[je.name]??void 0,onValueChange:Ge=>{const nt=je.options.find(Zt=>Zt.value===Ge);nt&&m(je.name,nt.value,nt.score)},children:[e.jsx(Et,{id:`kt-matrix-${Ve}`,className:"h-10 w-full text-left text-sm font-normal","data-testid":`onboarding-kt-matrix-select-${Ve}`,children:e.jsx(Rt,{placeholder:"Choose an option…"})}),e.jsx(_t,{position:"popper",className:"max-h-72 w-[var(--radix-select-trigger-width)]",children:je.options.map(Ge=>e.jsxs(Me,{value:Ge.value,className:"py-2.5 text-sm leading-snug","data-testid":`onboarding-kt-matrix-option-${Ve}-${Ge.value}`,children:[Ge.label," ",e.jsxs("span",{className:"text-muted-foreground",children:["(",Ge.score,")"]})]},Ge.value))})]})]},je.name)),e.jsxs("div",{className:"space-y-2 border-t border-border pt-6",children:[e.jsxs(de,{htmlFor:"kt-matrix-remarks",className:"text-sm font-medium",children:["Remarks ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx(Ws,{id:"kt-matrix-remarks",placeholder:"Enter remarks...",className:"min-h-[96px] resize-y text-sm leading-relaxed",value:f,onChange:je=>p(je.target.value),"data-testid":"onboarding-kt-matrix-remarks-textarea"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(de,{className:"text-sm font-medium",children:["Recommendation ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsxs(Dt,{value:h,onValueChange:x,children:[e.jsx(Et,{"data-testid":"onboarding-kt-matrix-recommendation-select",children:e.jsx(Rt,{placeholder:"Select recommendation"})}),e.jsxs(_t,{children:[e.jsx(Me,{value:"Approve",children:"Approve"}),e.jsx(Me,{value:"Reject",children:"Reject"}),e.jsx(Me,{value:"Hold",children:"Hold"})]})]})]})]})}),e.jsxs("div",{className:"flex shrink-0 flex-col gap-4 border-t px-5 py-4 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Weighted total ",e.jsx("span",{className:"font-semibold tabular-nums text-foreground","data-testid":"onboarding-kt-matrix-total-score",children:u()}),e.jsx("span",{className:"text-muted-foreground",children:" / 100"})]}),e.jsxs("div",{className:"flex gap-2 sm:shrink-0",children:[e.jsx(se,{variant:"outline",onClick:()=>o(!1),"data-testid":"onboarding-kt-matrix-cancel",children:"Cancel"}),e.jsx(se,{onClick:N,disabled:v||n.length===0||Object.keys(d).lengthC("overallScore",je),children:[e.jsx(Et,{className:"mt-2","data-testid":"onboarding-level2-overall-score-select",children:e.jsx(Rt,{placeholder:"Select score"})}),e.jsxs(_t,{children:[e.jsx(Me,{value:"10",children:"Outstanding (9-10)"}),e.jsx(Me,{value:"8",children:"Excellent (7-8)"}),e.jsx(Me,{value:"6",children:"Good (5-6)"}),e.jsx(Me,{value:"4",children:"Average (3-4)"}),e.jsx(Me,{value:"2",children:"Below Average (1-2)"})]})]})]}),e.jsx(ec,{}),r.length===0&&e.jsx("div",{className:"rounded-md border border-red-200 bg-red-50 px-3 py-2 text-sm text-red-800",children:"Level 2 feedback configuration is not available. Configure it in Master > Interview Configurations."}),(r||[]).map((je,Ve)=>e.jsxs("div",{children:[e.jsxs(de,{children:[je.label,je.isRequired&&e.jsx("span",{className:"text-red-500",children:"*"})]}),je.type==="select"?e.jsxs(Dt,{value:b[je.itemKey]||"",onValueChange:Ge=>C(je.itemKey,Ge),children:[e.jsx(Et,{className:"mt-2",children:e.jsx(Rt,{placeholder:`Select ${je.label}...`})}),e.jsx(_t,{children:(je.options||[]).map((Ge,nt)=>e.jsx(Me,{value:Ge.optionValue||Ge.value,children:Ge.optionLabel||Ge.label},nt))})]}):je.type==="number"?e.jsx(at,{type:"number",className:"mt-2",value:b[je.itemKey]||"",onChange:Ge=>C(je.itemKey,Ge.target.value)}):e.jsx(Ws,{placeholder:`Enter ${je.label.toLowerCase()}...`,className:"mt-2",rows:3,value:b[je.itemKey]||"",onChange:Ge=>C(je.itemKey,Ge.target.value)})]},je.itemKey||Ve)),e.jsxs("div",{children:[e.jsxs(de,{children:["Recommendation ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsxs(Dt,{value:S,onValueChange:R,children:[e.jsx(Et,{className:"mt-2","data-testid":"onboarding-level2-recommendation-select",children:e.jsx(Rt,{placeholder:"Select recommendation"})}),e.jsxs(_t,{children:[e.jsx(Me,{value:"Approve",children:"Approve"}),e.jsx(Me,{value:"Reject",children:"Reject"}),e.jsx(Me,{value:"Hold",children:"Hold"})]})]})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx(se,{variant:"outline",className:"flex-1",onClick:()=>j(!1),"data-testid":"onboarding-level2-feedback-cancel",children:"Cancel"}),e.jsx(se,{className:"flex-1 bg-black hover:bg-zinc-800 text-white",onClick:_,disabled:A||r.length===0,"data-testid":"onboarding-level2-feedback-submit",children:A?"Submitting...":"Submit Feedback"})]})]})]})}),e.jsx(ds,{open:E,onOpenChange:q,children:e.jsxs(os,{className:"max-w-2xl max-h-[90vh] overflow-y-auto","data-testid":"onboarding-feedback-details-modal",children:[e.jsx(xs,{children:e.jsx(ms,{children:"Interview Feedback Details"})}),O&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4 bg-slate-50 p-4 rounded-lg",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Interviewer"}),e.jsx("p",{className:"font-semibold","data-testid":"onboarding-feedback-details-interviewer",children:(Qs=O.evaluator)==null?void 0:Qs.fullName})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Role"}),e.jsx("p",{"data-testid":"onboarding-feedback-details-role",children:(($s=(Xs=O.evaluator)==null?void 0:Xs.role)==null?void 0:$s.roleName)||"N/A"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-slate-500",children:((Q=O.interview)==null?void 0:Q.level)===1?"Score (KT Matrix)":"Overall Score"}),e.jsx("p",{className:"font-bold text-lg","data-testid":"onboarding-feedback-details-score",children:O.ktMatrixScore?`${O.ktMatrixScore}/${((oe=O.interview)==null?void 0:oe.level)===1?"100":"10"}`:"N/A"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-slate-500",children:"Recommendation"}),e.jsx(Ce,{variant:(we=O.recommendation)!=null&&we.toLowerCase().includes("reject")?"destructive":(Oe=O.recommendation)!=null&&Oe.toLowerCase().includes("hold")?"secondary":"default","data-testid":"onboarding-feedback-details-recommendation",children:O.recommendation||"N/A"})]})]}),e.jsx(ec,{}),e.jsxs("div",{children:[e.jsx("h4",{className:"font-semibold mb-3",children:"Detailed Feedback"}),((ke=O.feedbackDetails)==null?void 0:ke.length)>0?e.jsx("div",{className:"space-y-4",children:O.feedbackDetails.map((je,Ve)=>e.jsxs("div",{className:"border-b last:border-0 pb-3 last:pb-0","data-testid":`onboarding-feedback-detail-item-${Ve}`,children:[e.jsx("p",{className:"font-medium text-slate-900",children:je.feedbackType}),e.jsx("p",{className:"text-slate-700 mt-1 whitespace-pre-wrap text-sm",children:je.comments})]},Ve))}):e.jsx("p",{className:"text-slate-500 italic",children:"No detailed feedback available."})]})]})]})}),e.jsx(ds,{open:P,onOpenChange:L,children:e.jsxs(os,{className:"max-w-2xl max-h-[90vh] overflow-y-auto","data-testid":"onboarding-level3-feedback-modal",children:[e.jsxs(xs,{children:[e.jsx(ms,{children:"Level 3 Interview Feedback"}),e.jsx(bs,{children:"Provide detailed feedback from the Level 3 interview (NBH + DD-Head evaluation)."})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsxs(de,{children:["Interview Date ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx(at,{type:"date",className:"mt-2",value:$.interviewDate||Bs,disabled:!0})]}),e.jsxs("div",{children:[e.jsxs(de,{children:["Interviewer Name ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx(at,{placeholder:"Enter your name",className:"mt-2",value:$.interviewerName||Ks,disabled:!0})]}),e.jsxs("div",{children:[e.jsxs(de,{children:["Overall Performance Score ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsxs(Dt,{value:$.overallScore,onValueChange:je=>Y("overallScore",je),children:[e.jsx(Et,{className:"mt-2","data-testid":"onboarding-level3-overall-score-select",children:e.jsx(Rt,{placeholder:"Select score"})}),e.jsxs(_t,{children:[e.jsx(Me,{value:"10",children:"Outstanding (9-10)"}),e.jsx(Me,{value:"8",children:"Excellent (7-8)"}),e.jsx(Me,{value:"6",children:"Good (5-6)"}),e.jsx(Me,{value:"4",children:"Average (3-4)"}),e.jsx(Me,{value:"2",children:"Below Average (1-2)"})]})]})]}),e.jsx(ec,{}),a.length===0&&e.jsx("div",{className:"rounded-md border border-red-200 bg-red-50 px-3 py-2 text-sm text-red-800",children:"Level 3 feedback configuration is not available. Configure it in Master > Interview Configurations."}),(a||[]).map((je,Ve)=>e.jsxs("div",{children:[e.jsxs(de,{children:[je.label,je.isRequired&&e.jsx("span",{className:"text-red-500",children:"*"})]}),je.type==="select"?e.jsxs(Dt,{value:$[je.itemKey]||"",onValueChange:Ge=>Y(je.itemKey,Ge),children:[e.jsx(Et,{className:"mt-2",children:e.jsx(Rt,{placeholder:`Select ${je.label}...`})}),e.jsx(_t,{children:(je.options||[]).map((Ge,nt)=>e.jsx(Me,{value:Ge.optionValue||Ge.value,children:Ge.optionLabel||Ge.label},nt))})]}):je.type==="number"?e.jsx(at,{type:"number",className:"mt-2",value:$[je.itemKey]||"",onChange:Ge=>Y(je.itemKey,Ge.target.value)}):e.jsx(Ws,{placeholder:`Enter ${je.label.toLowerCase()}...`,className:"mt-2",rows:3,value:$[je.itemKey]||"",onChange:Ge=>Y(je.itemKey,Ge.target.value)})]},je.itemKey||Ve)),e.jsxs("div",{children:[e.jsxs(de,{children:["Recommendation ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsxs(Dt,{value:Z,onValueChange:W,children:[e.jsx(Et,{className:"mt-2","data-testid":"onboarding-level3-recommendation-select",children:e.jsx(Rt,{placeholder:"Select recommendation"})}),e.jsxs(_t,{children:[e.jsx(Me,{value:"Approve",children:"Approve"}),e.jsx(Me,{value:"Reject",children:"Reject"}),e.jsx(Me,{value:"Hold",children:"Hold"})]})]})]}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx(se,{variant:"outline",className:"flex-1",onClick:()=>L(!1),"data-testid":"onboarding-level3-feedback-cancel",children:"Cancel"}),e.jsx(se,{className:"flex-1 bg-black hover:bg-zinc-800 text-white",onClick:U,disabled:M||a.length===0,"data-testid":"onboarding-level3-feedback-submit",children:M?"Submitting...":"Submit Feedback"})]})]})]})}),e.jsx(ds,{open:z,onOpenChange:je=>{T(je),je||B(!1)},children:e.jsxs(os,{className:"max-w-[95vw] sm:max-w-2xl md:max-w-3xl lg:max-w-4xl max-h-[90vh] overflow-hidden flex flex-col p-4 sm:p-6","data-testid":"onboarding-documents-modal",children:[e.jsxs(xs,{className:"pb-4",children:[e.jsxs(ms,{className:"text-xl font-bold flex items-center gap-2",children:[e.jsx(Ns,{className:"w-5 h-5 text-re-red"}),"Documents - ",G||"General"]}),e.jsx(bs,{className:"text-slate-500",children:"View and manage documents uploaded for this stage."})]}),I?e.jsxs("div",{className:"space-y-6 py-4","data-testid":"onboarding-documents-upload-form",children:[e.jsx("div",{className:"bg-slate-50/50 p-4 sm:p-6 rounded-2xl border border-slate-200",children:e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs(de,{className:"text-slate-700 font-semibold px-1",children:["Document Name ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx(at,{type:"text",placeholder:"Enter document name",value:J,onChange:je=>ae(je.target.value),className:"bg-white border-slate-200 h-12 rounded-xl focus:ring-re-red shadow-sm","data-testid":"onboarding-documents-name-input"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(de,{className:"text-slate-700 font-semibold px-1",children:["Select File ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx(at,{type:"file",className:"bg-white border-slate-200 h-12 rounded-xl focus:ring-re-red shadow-sm file:mr-4 file:py-2 file:px-4 file:rounded-full file:border-0 file:text-sm file:font-semibold file:bg-red-50 file:text-re-red-hover hover:file:bg-red-50 cursor-pointer",onChange:je=>{const Ve=je.target.files?je.target.files[0]:null;if(le(Ve),Ve){const Ge=Ve.name.replace(/\.[^/.]+$/,"");ae(Ge)}},"data-testid":"onboarding-documents-file-input"})]})]})}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 pt-4",children:[e.jsx(se,{className:"flex-1 order-2 sm:order-1 py-3 sm:py-5 rounded-xl border-slate-200 font-semibold text-slate-600 hover:bg-slate-50",variant:"outline",onClick:()=>B(!1),disabled:xe,"data-testid":"onboarding-documents-upload-cancel",children:"Cancel"}),e.jsx(se,{className:"flex-1 order-1 sm:order-2 bg-re-red hover:bg-re-red-hover text-white font-bold py-3 sm:py-5 rounded-xl shadow-lg shadow-re-red/15 transition-all hover:scale-[1.01] active:scale-[0.99]",onClick:async()=>{await ce(),B(!1)},disabled:!ve||!J||xe,"data-testid":"onboarding-documents-upload-submit",children:xe?e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}),"Uploading..."]}):e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(or,{className:"w-5 h-5"}),"Confirm Upload"]})})]})]}):e.jsxs("div",{className:"flex-1 flex flex-col min-h-0 space-y-4",children:[K(G||"").length>0?e.jsx("div",{className:"custom-scrollbar-x-slim flex-1 overflow-auto border rounded-lg border-slate-200","data-testid":"onboarding-documents-table-container",children:e.jsxs(Ts,{className:"w-full table-auto",children:[e.jsx(Ps,{className:"bg-slate-50/80 sticky top-0 z-10",children:e.jsxs(it,{className:"hover:bg-transparent border-b",children:[e.jsx(fe,{className:"w-[45%] min-w-[150px] font-semibold text-slate-900 py-3",children:"Document Name"}),e.jsx(fe,{className:"w-[15%] min-w-[100px] font-semibold text-slate-900 py-3",children:"Type"}),e.jsx(fe,{className:"w-[15%] min-w-[100px] font-semibold text-slate-900 py-3",children:"Upload Date"}),e.jsx(fe,{className:"w-[15%] min-w-[140px] font-semibold text-slate-900 py-3",children:"Uploaded By"}),e.jsx(fe,{className:"text-right w-[10%] min-w-[80px] font-semibold text-slate-900 py-3",children:"Actions"})]})}),e.jsx(Os,{children:K(G||"").map((je,Ve)=>{var Ge,nt;return e.jsxs(it,{className:"hover:bg-slate-50/50 transition-colors","data-testid":`onboarding-document-row-${Ve}`,children:[e.jsx(ue,{className:"py-3",children:e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[e.jsx(Ns,{className:"w-4 h-4 text-slate-400 shrink-0"}),e.jsx("span",{className:"truncate font-medium text-slate-700",title:je.fileName,"data-testid":`onboarding-document-name-${Ve}`,children:je.fileName})]})}),e.jsx(ue,{className:"py-3",children:e.jsx(Ce,{variant:"outline",className:"capitalize whitespace-nowrap font-normal border-slate-200 bg-white","data-testid":`onboarding-document-type-${Ve}`,children:((Ge=je.documentType)==null?void 0:Ge.toLowerCase())||"Other"})}),e.jsx(ue,{className:"py-3 whitespace-nowrap text-slate-600",children:Yt(je.createdAt)}),e.jsx(ue,{className:"py-3 text-slate-600",children:((nt=je.uploader)==null?void 0:nt.fullName)||(je.uploadedBy?"System User":"Applicant")}),e.jsx(ue,{className:"text-right py-3",children:e.jsxs("div",{className:"flex gap-1 justify-end",children:[e.jsx(se,{variant:"ghost",size:"icon",className:"h-8 w-8 text-slate-400 hover:text-indigo-600 hover:bg-indigo-50 rounded-full",onClick:()=>{H(je),X(!0)},"data-testid":`onboarding-document-preview-${Ve}`,children:e.jsx(yn,{className:"w-4 h-4"})}),e.jsx(se,{variant:"ghost",size:"icon",className:"h-8 w-8 text-slate-400 hover:text-re-red hover:bg-red-50 rounded-full",onClick:()=>{window.open(`https://dealeronboarding-uat.royalenfield.com/api/${je.filePath}`,"_blank")},"data-testid":`onboarding-document-download-${Ve}`,children:e.jsx(ji,{className:"w-4 h-4"})})]})})]},je.id)})})]})}):e.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center py-12 text-center border rounded-lg bg-slate-50/30","data-testid":"onboarding-documents-empty",children:[e.jsx("div",{className:"w-16 h-16 rounded-full bg-slate-100 flex items-center justify-center mb-4",children:e.jsx(Ns,{className:"w-8 h-8 text-slate-300"})}),e.jsx("h3",{className:"text-slate-900 font-semibold mb-2",children:"No Documents Found"}),e.jsx("p",{className:"text-slate-600 text-sm max-w-[250px]",children:"No documents have been uploaded for this stage yet."})]}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 pt-2 mt-auto",children:[e.jsxs(se,{className:"flex-1 bg-re-red hover:bg-re-red-hover text-white font-bold py-3 sm:py-5 rounded-xl shadow-lg shadow-re-red/15 transition-all hover:scale-[1.01] active:scale-[0.99]",onClick:()=>B(!0),"data-testid":"onboarding-documents-upload-button",children:[e.jsx(or,{className:"w-5 h-5 mr-3"}),"Upload Document"]}),e.jsx(se,{variant:"outline",className:"flex-1 sm:flex-none py-3 sm:py-5 px-8 rounded-xl border-slate-200 font-semibold text-slate-600 hover:bg-slate-50",onClick:()=>T(!1),"data-testid":"onboarding-documents-close-button",children:"Close"})]})]})]})}),e.jsx(mo,{isOpen:Pe,onClose:()=>X(!1),document:et}),e.jsx(ds,{open:kt,onOpenChange:vt,children:e.jsxs(os,{className:"max-w-md p-0 overflow-hidden border-none shadow-2xl rounded-3xl","data-testid":"onboarding-fdd-finalize-modal",children:[e.jsxs("div",{className:"bg-slate-950 p-8 flex items-center justify-center relative overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-re-red/20 to-transparent"}),e.jsx("div",{className:"w-20 h-20 bg-re-red/20 rounded-full flex items-center justify-center animate-pulse relative z-10 shadow-[0_0_40px_rgba(218,41,28,0.2)]",children:e.jsx(no,{className:"w-10 h-10 text-re-red"})})]}),e.jsxs("div",{className:"p-8 space-y-6 bg-white",children:[e.jsxs(xs,{children:[e.jsx(ms,{className:"text-2xl font-black text-slate-900 text-center tracking-tight",children:"Finalize FDD Audit"}),e.jsxs(bs,{className:"text-slate-500 text-center pt-2 leading-relaxed text-sm font-medium",children:["You are about to submit your final findings. This action will ",e.jsx("span",{className:"font-bold text-slate-900 underline decoration-re-red decoration-2",children:"lock the audit session"})," and trigger the LOI approval workflow."]})]}),e.jsxs("div",{className:"space-y-4",children:[(ee==null?void 0:ee.role)!=="FDD"&&(ee==null?void 0:ee.roleCode)!=="FDD"&&e.jsxs("div",{className:"space-y-2",children:[e.jsxs(de,{className:"text-[10px] font-black uppercase tracking-widest text-slate-400",children:["Auditor Recommendation ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("div",{className:"flex gap-2",children:["Recommended","Qualified with Observations","Not Recommended"].map(je=>e.jsx(se,{variant:ge===je?"default":"outline",className:Nt("flex-1 h-10 font-bold text-[9px] uppercase tracking-wider rounded-xl transition-all",ge===je&&je==="Recommended"&&"bg-emerald-600 hover:bg-emerald-700",ge===je&&je==="Qualified with Observations"&&"bg-red-500 hover:bg-re-red",ge===je&&je==="Not Recommended"&&"bg-red-600 hover:bg-red-700"),onClick:()=>ye(je),"data-testid":`onboarding-fdd-recommendation-${je.replace(/\s+/g,"-").toLowerCase()}`,children:je},je))})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{className:"text-[10px] font-black uppercase tracking-widest text-slate-400",children:"Findings Summary"}),e.jsx(Ws,{placeholder:"Summarize key financial findings or discrepancies...",className:"min-h-[100px] rounded-xl border-slate-200 focus:ring-re-red text-sm",value:Be,onChange:je=>$e(je.target.value),"data-testid":"onboarding-fdd-findings-textarea"})]})]}),e.jsxs("div",{className:"bg-red-50 p-4 rounded-2xl flex gap-3 border border-red-100",children:[e.jsx(_a,{className:"w-5 h-5 text-re-red shrink-0 mt-0.5"}),e.jsx("p",{className:"text-[11px] text-red-800 font-medium italic",children:"Ensure the final PDF report is uploaded first. This satisfies the FDD statutory requirement."})]}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 pt-2",children:[e.jsx(se,{variant:"outline",className:"w-full sm:flex-1 h-12 rounded-2xl font-bold text-slate-600 hover:bg-slate-50 border-slate-200",onClick:()=>vt(!1),disabled:dt,"data-testid":"onboarding-fdd-finalize-cancel",children:"Cancel"}),e.jsx(se,{className:"w-full sm:flex-1 h-12 rounded-2xl font-bold bg-slate-950 hover:bg-slate-900 text-white shadow-lg shadow-slate-200 transition-all active:scale-95 border-b-4 border-re-red",disabled:dt||!Be,"data-testid":"onboarding-fdd-finalize-submit",onClick:async()=>{try{st(!0),await hs.submitStageDecision({applicationId:s.id,stageCode:"FDD_VERIFICATION",decision:"Approved",remarks:(ee==null?void 0:ee.role)==="FDD"||(ee==null?void 0:ee.roleCode)==="FDD"?`Findings: ${Be}`:`[RECOMMENDATION: ${ge}] -Findings: ${Be}`,nextStatus:"LOI In Progress",nextProgress:65}),te.success("FDD Audit finalized and submitted."),vt(!1),xt()}catch{te.error("Submission failed")}finally{st(!1)}},children:dt?e.jsx(ns,{className:"w-5 h-5 animate-spin"}):"Confirm & Submit"})]})]})]})}),e.jsx(ds,{open:Mt,onOpenChange:It,children:e.jsxs(os,{className:"max-w-md p-0 overflow-hidden border-none shadow-2xl rounded-3xl","data-testid":"onboarding-fdd-flag-modal",children:[e.jsxs("div",{className:"bg-slate-950 p-8 flex items-center justify-center relative overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-red-600/20 to-transparent"}),e.jsx("div",{className:"w-20 h-20 bg-red-600/20 rounded-full flex items-center justify-center relative z-10 shadow-[0_0_40px_rgba(220,38,38,0.2)]",children:e.jsx(fk,{className:"w-10 h-10 text-red-500"})})]}),e.jsxs("div",{className:"p-8 space-y-6 bg-white text-center",children:[e.jsxs(xs,{children:[e.jsx(ms,{className:"text-2xl font-black text-slate-900 tracking-tight",children:"Flag Non-Responsive"}),e.jsx(bs,{className:"text-slate-500 pt-2 leading-relaxed text-sm font-medium",children:"Are you sure you want to flag this applicant? This will notify the DD Admin that the audit cannot proceed due to applicant's non-cooperation."})]}),e.jsxs("div",{className:"bg-red-50 p-4 rounded-2xl flex gap-3 border border-red-100",children:[e.jsx(sn,{className:"w-5 h-5 text-red-600 shrink-0 mt-0.5"}),e.jsx("p",{className:"text-[11px] text-red-800 text-left font-medium",children:'"Applicant is unresponsive to multiple queries and financial document requests."'})]}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 pt-2",children:[e.jsx(se,{variant:"outline",className:"w-full sm:flex-1 h-12 rounded-2xl font-bold text-slate-600 hover:bg-slate-50 border-slate-200",onClick:()=>It(!1),disabled:he,"data-testid":"onboarding-fdd-flag-cancel",children:"Go Back"}),e.jsx(se,{className:"w-full sm:flex-1 h-12 rounded-2xl font-bold bg-slate-950 hover:bg-slate-900 text-white shadow-lg shadow-slate-200 transition-all active:scale-95 border-b-4 border-red-600",disabled:he,"data-testid":"onboarding-fdd-flag-submit",onClick:async()=>{try{pt(!0),await hs.submitStageDecision({applicationId:s.id,stageCode:"FDD_VERIFICATION",decision:"Rejected",remarks:"Applicant is non-responsive to FDD queries."}),te.error("Applicant flagged as non-responsive."),It(!1),xt()}catch{te.error("Action failed")}finally{pt(!1)}},children:he?e.jsx(ns,{className:"w-5 h-5 animate-spin"}):"Confirm Flag"})]})]})]})}),e.jsx(ds,{open:ht,onOpenChange:_e,children:e.jsxs(os,{className:"max-w-md p-0 overflow-hidden rounded-3xl border-none shadow-2xl","data-testid":"onboarding-firm-type-modal",children:[e.jsxs("div",{className:"bg-re-red p-8 text-white",children:[e.jsx("div",{className:"w-16 h-16 rounded-2xl bg-white/20 flex items-center justify-center mb-6 backdrop-blur-sm border border-white/30 shadow-inner",children:e.jsx(so,{className:"w-8 h-8 text-white"})}),e.jsx("h3",{className:"text-2xl font-black tracking-tight mb-2",children:"Update Firm Type"}),e.jsx("p",{className:"text-red-100/80 text-sm font-medium leading-relaxed",children:"Select the proposed legal constitution for this dealership application."})]}),e.jsxs("div",{className:"p-8 space-y-6 bg-white",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs(de,{className:"text-[10px] text-slate-400 uppercase tracking-widest font-black",children:["Proposed Legal Constitution ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsxs(Dt,{value:Vt,onValueChange:Pt,children:[e.jsx(Et,{className:"h-12 rounded-xl border-slate-200 focus:ring-re-red","data-testid":"onboarding-firm-type-select",children:e.jsx(Rt,{placeholder:"Select Firm Type"})}),e.jsxs(_t,{children:[e.jsx(Me,{value:"Proprietorship","data-testid":"onboarding-firm-type-proprietorship",children:"Proprietorship"}),e.jsx(Me,{value:"Partnership","data-testid":"onboarding-firm-type-partnership",children:"Partnership"}),e.jsx(Me,{value:"Limited Liability partnership","data-testid":"onboarding-firm-type-llp",children:"LLP (Limited Liability partnership)"}),e.jsx(Me,{value:"Private Limited Company","data-testid":"onboarding-firm-type-pvt-ltd",children:"Private Limited Company"}),e.jsx(Me,{value:"Public Limited Company","data-testid":"onboarding-firm-type-pub-ltd",children:"Public Limited Company"})]})]})]}),e.jsxs("div",{className:"flex gap-3 pt-2",children:[e.jsx(se,{variant:"outline",className:"flex-1 h-12 rounded-xl font-bold text-slate-600 border-slate-200",onClick:()=>_e(!1),disabled:_s,"data-testid":"onboarding-firm-type-cancel",children:"Cancel"}),e.jsx(se,{className:"flex-1 h-12 rounded-xl font-bold bg-re-red hover:bg-re-red-hover text-white shadow-lg shadow-red-200 transition-all active:scale-95",disabled:_s||!Vt,onClick:Ys,"data-testid":"onboarding-firm-type-submit",children:_s?e.jsx(ns,{className:"w-5 h-5 animate-spin"}):"Update Type"})]})]})]})})]})}var VU={};function HU({application:t,documents:s,setPreviewDoc:n,setShowPreviewModal:r,setIsUploading:a,fetchApplication:i,refreshDocuments:o}){var N,v;const d=(t==null?void 0:t.fddAssignments)||[],m=((N=t==null?void 0:t.participants)==null?void 0:N.filter(w=>{var j,b,C,S;return((j=w.user)==null?void 0:j.role)==="FDD"||((b=w.user)==null?void 0:b.roleCode)==="FDD"||((S=(C=w.user)==null?void 0:C.allRoles)==null?void 0:S.includes("FDD"))}))||[],f=d.length>0||m.length>0,p=(v=m[0])==null?void 0:v.user,h=[{type:"Bank Statement",label:"Bank Statements"},{type:"Income Tax Returns (ITR)",label:"ITR (Last 3 Years)"},{type:"CIBIL Report",label:"CIBIL / Credit Reports"},{type:"Property Documents",label:"Property Documents"},{type:"Business Valuation Report",label:"Valuation Reports"},{type:"FDD Final Audit Report",label:"Final Audit Report"}],x=w=>{const j=w.toLowerCase();return(s||[]).find(b=>{const C=(b.documentType||"").toLowerCase(),S=(b.fileName||"").toLowerCase();return!!(C===j||j.includes("itr")&&(C.includes("itr")||S.includes("itr"))||j.includes("bank statement")&&(C.includes("bank")||S.includes("bank"))||j.includes("cibil")&&(C.includes("cibil")||S.includes("cibil")||C.includes("credit")))})},u=w=>{const j=(w.documentType||"").toLowerCase();return(w.stage||"").toLowerCase()==="fdd"||j.includes("report")||j.includes("itr")||j.includes("bank")||j.includes("cibil")||j.includes("valuation")};return!f&&!["FDD Verification","LOI In Progress","Payment Pending"].includes(t.status)?e.jsx("div",{className:"space-y-6","data-testid":"onboarding-fdd-no-assignment",children:e.jsxs("div",{className:"flex flex-col items-center justify-center p-12 bg-slate-50 rounded-2xl border-2 border-dashed border-slate-200",children:[e.jsx(no,{className:"w-12 h-12 text-slate-300 mb-4"}),e.jsx("h3",{className:"text-slate-900 font-semibold uppercase tracking-widest text-xs",children:"No FDD Assignment"}),e.jsx("p",{className:"text-slate-500 text-[10px] text-center max-w-xs mt-2 font-medium leading-relaxed uppercase tracking-tight",children:"The Financial Due Diligence process has not been initiated for this application yet."})]})}):e.jsxs("div",{className:"space-y-8","data-testid":"onboarding-fdd-audit-content",children:[f&&e.jsx("div",{className:"flex items-center justify-between p-4 bg-slate-50 border border-slate-200 rounded-xl mb-6","data-testid":"onboarding-fdd-assignment-banner",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"p-2 bg-red-50 rounded-lg",children:e.jsx(no,{className:"w-5 h-5 text-re-red"})}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-sm font-bold text-slate-900",children:"FDD Assignment Active"}),p&&e.jsxs("p",{className:"text-xs text-slate-500 font-medium","data-testid":"onboarding-fdd-assigned-user",children:["Assigned to: ",p.name]})]})]})}),e.jsxs(Le,{className:"border-slate-200 shadow-sm overflow-hidden rounded-2xl","data-testid":"onboarding-fdd-checklist-card",children:[e.jsx(Qe,{className:"bg-slate-50/50 border-b border-slate-100 py-4",children:e.jsxs(Je,{className:"text-sm font-black uppercase tracking-widest text-slate-500 flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(rc,{className:"w-4 h-4"})," Financial Artefacts Checklist"]}),e.jsx(Ce,{variant:"outline",className:"text-[10px] bg-white",children:"Verify before sign-off"})]})}),e.jsx(Fe,{className:"p-0",children:e.jsx("div",{className:"divide-y divide-slate-100",children:h.map((w,j)=>{const b=x(w.type);return e.jsxs("div",{className:"flex items-center justify-between p-4 px-6 hover:bg-slate-50/50 transition-colors","data-testid":`onboarding-fdd-checklist-item-${j}`,children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:Nt("w-8 h-8 rounded-lg flex items-center justify-center",b?"bg-emerald-50 text-emerald-600":"bg-slate-50 text-slate-300"),children:b?e.jsx(un,{className:"w-5 h-5"}):e.jsx(sn,{className:"w-5 h-5"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-bold text-slate-800",children:w.label}),e.jsx("p",{className:"text-[10px] text-slate-400 font-bold uppercase tracking-tighter","data-testid":`onboarding-fdd-checklist-status-${j}`,children:b?`Uploaded: ${Yt(b.createdAt)}`:"Missing in Documentation"})]})]}),b?e.jsxs(se,{variant:"ghost",size:"sm",className:"h-8 text-blue-600 font-black text-[10px] uppercase tracking-widest hover:bg-blue-50",onClick:()=>{n(b),r(!0)},"data-testid":`onboarding-fdd-checklist-preview-${j}`,children:[e.jsx(yn,{className:"w-4 h-4 mr-1"})," Preview"]}):e.jsxs(se,{variant:"outline",size:"sm",className:"h-8 border-slate-200 text-slate-500 font-black text-[10px] uppercase tracking-widest hover:bg-slate-50 hover:text-blue-600","data-testid":`onboarding-fdd-checklist-upload-${j}`,onClick:()=>{const C=document.createElement("input");C.type="file",C.onchange=async S=>{var _;const R=S.target.files[0];if(R)try{a(!0);const A=new FormData;A.append("file",R),A.append("documentType",w.type),A.append("stage","FDD"),A.append("applicationId",t.id);const E=await hs.uploadDocument(t.id,A);w.type==="FDD Final Audit Report"&&(await hs.submitFddReport({applicationId:t.id,reportDocumentId:((_=E.data)==null?void 0:_.id)||E.id,findings:"Final Audit Report uploaded via checklist.",recommendation:"REVIEW_PENDING"}),i()),te.success(`${w.label} uploaded successfully`),o()}catch{te.error("Upload failed")}finally{a(!1)}},C.click()},children:[e.jsx(or,{className:"w-4 h-4 mr-1 text-slate-300"})," Upload"]})]},w.type)})})})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h3",{className:"text-lg font-semibold text-slate-900",children:"Supporting Audit Documents"}),e.jsxs(Ce,{variant:"outline",className:"bg-slate-50 text-slate-500 border-slate-200","data-testid":"onboarding-fdd-support-docs-count",children:[(s||[]).filter(u).length," Document(s)"]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4","data-testid":"onboarding-fdd-support-docs-grid",children:[(s||[]).filter(u).map((w,j)=>e.jsxs("div",{className:"group bg-white border border-slate-200 rounded-xl p-4 flex items-center justify-between hover:border-red-300 transition-all hover:shadow-md","data-testid":`onboarding-fdd-support-doc-${j}`,children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 rounded-lg bg-slate-50 flex items-center justify-center",children:e.jsx(Ns,{className:"w-5 h-5 text-slate-400"})}),e.jsxs("div",{className:"overflow-hidden",children:[e.jsx("p",{className:"text-slate-900 font-bold text-sm truncate max-w-[150px]",title:w.fileName,"data-testid":`onboarding-fdd-support-doc-name-${j}`,children:w.fileName}),e.jsx("p",{className:"text-slate-500 text-[10px] font-medium uppercase",children:w.documentType})]})]}),e.jsxs("div",{className:"flex gap-1",children:[e.jsx(se,{variant:"ghost",size:"icon",className:"h-8 w-8 text-slate-400 hover:text-re-red hover:bg-red-50",onClick:()=>{const b=VU.NEXT_PUBLIC_API_URL||"http://localhost:5000";window.open(`${b}/${w.filePath}`,"_blank")},"data-testid":`onboarding-fdd-support-doc-download-${j}`,children:e.jsx(ji,{className:"w-4 h-4"})}),e.jsx(se,{variant:"ghost",size:"icon",className:"h-8 w-8 text-slate-400 hover:text-re-red hover:bg-red-50",onClick:()=>{n(w),r(!0)},"data-testid":`onboarding-fdd-support-doc-preview-${j}`,children:e.jsx(yn,{className:"w-4 h-4"})})]})]},w.id)),(s||[]).filter(u).length===0&&e.jsx("div",{className:"col-span-full p-8 text-center bg-slate-50 rounded-xl border border-dashed border-slate-200","data-testid":"onboarding-fdd-support-docs-empty",children:e.jsx("p",{className:"text-slate-400 text-sm",children:"No supporting audit documents uploaded yet."})})]})]})]})}function WU(t){const s=String(t||"").toUpperCase();return s.includes("REJECT")||s.includes("DELET")||s.includes("DISQUALIF")?"border-red-200 bg-red-50/90 text-red-800":s==="CREATED"||s.includes("APPROV")||s.includes("COMPLETE")?"border-emerald-200 bg-emerald-50/90 text-emerald-900":s.includes("DOCUMENT")||s.includes("UPLOAD")||s.includes("ATTACHMENT")?"border-sky-200 bg-sky-50/80 text-sky-900":s.includes("PAYMENT")||s.includes("SECURITY")||s.includes("DEPOSIT")?"border-violet-200 bg-violet-50/80 text-violet-900":s.includes("FDD")||s.includes("QUESTIONNAIRE")||s.includes("INTERVIEW")?"border-red-200 bg-red-50/80 text-red-900":"border-slate-200 bg-slate-50 text-slate-700"}function jf(t,s){return t==null||s==null?!1:String(t).trim()===String(s).trim()}function h_(t){return String(t??"").trim().toLowerCase().replace(/\s+/g," ")}function Am(t){const s=h_(t);return s?s==="scheduled"||s==="rescheduled"||s==="pending"||s==="in progress"||s==="inprogress":!1}function GU(t){return h_(t)==="completed"}function Ug(t,s){var n;return!s||!((n=t==null?void 0:t.participants)!=null&&n.length)?!1:t.participants.some(r=>{var a;return jf(r.userId,s)||jf((a=r.user)==null?void 0:a.id,s)})}function KU(t){const s=String(t??"").trim();return{"Level 1 Interview Pending":1,"Level 1 Recommended":1,"Level 2 Interview Pending":2,"Level 2 Recommended":2,"Level 3 Interview Pending":3,"Level 3 Recommended":3}[s]}function RS(t){return String(t??"").trim().toLowerCase().replace(/[_\s-]+/g,"")}function YU(t,s){var d,m;if(!t)return!1;const n=["Super Admin","DD Admin"];if(n.includes(String(t.role??""))||n.includes(String(t.roleCode??"")))return!0;const a={1:["DD-ZM","DD ZM","RBM"],2:["DD Lead","ZBH"],3:["NBH","DD Head"]}[s];if(!(a!=null&&a.length))return!1;const i=a.map(RS),o=[t.role,t.roleCode,t.roleName,(d=t.role)==null?void 0:d.roleCode,(m=t.role)==null?void 0:m.roleName].filter(Boolean).map(RS);for(const f of o)if(f){for(const p of i)if(p&&(f===p||f.includes(p)||p.includes(f)))return!0}return!1}function ZU({application:t,interviews:s,currentUser:n,getDeposit:r,eorProgress:a}){var C,S,R;const i=Array.isArray(s)?s:[],o=KU(t==null?void 0:t.status),d=(o!=null?i.find(_=>Am(_.status)&&Ug(_,n==null?void 0:n.id)&&Number(_.level)===o):void 0)??i.find(_=>Am(_.status)&&Ug(_,n==null?void 0:n.id)),m=o!=null&&n&&YU(n,o)?i.find(_=>Number(_.level)===o&&Am(_.status)):void 0,f=d??m,p=i.find(_=>Ug(_,n==null?void 0:n.id)),h=((C=f==null?void 0:f.evaluations)==null?void 0:C.find(_=>jf(_.evaluatorId,n==null?void 0:n.id)))??((S=p==null?void 0:p.evaluations)==null?void 0:S.find(_=>jf(_.evaluatorId,n==null?void 0:n.id))),x=_=>i.some(A=>Number(A.level)===_&&GU(A.status)),u=_=>i.some(A=>Number(A.level)===_&&Am(A.status)),N=!!h,v={"Level 1 Interview Pending":"INTERVIEW_LEVEL_1","Level 2 Interview Pending":"INTERVIEW_LEVEL_2","Level 2 Recommended":"INTERVIEW_LEVEL_2","Level 3 Interview Pending":"INTERVIEW_LEVEL_3","LOI In Progress":"LOI_APPROVAL","LOA Pending":"LOA_APPROVAL"},w=v[t==null?void 0:t.status],j=(R=t==null?void 0:t.stageApprovals)==null?void 0:R.find(_=>_.stageCode===w&&String(_.actorUserId)===String(n==null?void 0:n.id));return{activeInterviewForUser:f,lastInterviewForUser:p,currentUserEvaluation:h,hasSubmittedFeedback:N,currentUserStageAction:j,isInterviewCompleted:x,isInterviewActive:u,permissions:(()=>{var U,M,z,T,I;if(!t||!n)return{canApprove:!1,canReject:!1,canSchedule:!1,canAssign:!1,isLoaLocked:!1,isSecurityDetailsLocked:!1,showDecisionMessage:!1};const _=["DD Admin","Super Admin","NBH","DD Lead","DD Head","Finance","Finance Admin","FDD","ZBH","RBM"].includes(n.role),A=["Level 3 Approved","FDD Verification","LOI In Progress","Security Deposit","Security Details","Payment Pending","LOI Issued","Statutory LOI Ack","Architecture Team Assigned","Architecture Document Upload","Architecture Team Completion","Statutory GST","Statutory PAN","Statutory Nodal","Statutory Check","Statutory Partnership","Statutory Firm Reg","Statutory Rental","Statutory Virtual Code","Statutory Domain","Statutory MSD","LOA Pending","EOR In Progress","EOR Complete","Inauguration","Approved"].includes(t.status),E=t.status==="LOA Pending"&&((U=r("FIRST_FILL"))==null?void 0:U.status)!=="Verified",q=["Security Deposit","Security Details","Payment Pending"].includes(t.status)&&((M=r("SECURITY_DEPOSIT"))==null?void 0:M.status)!=="Verified",O=t.status==="Onboarded"||t.status==="Rejected",D=(z=t.stageApprovals)==null?void 0:z.some(B=>B.stageCode==="LOI_APPROVAL"&&B.actorRole==="DD Head"&&B.decision==="Approved"),P=(T=t.stageApprovals)==null?void 0:T.some(B=>B.stageCode==="LOA_APPROVAL"&&B.actorRole==="DD Head"&&B.decision==="Approved");let L=!0;["Super Admin","DD Admin","DD Lead","DD Head"].includes(n.role)||((t.status==="FDD Verification"||t.status==="Level 3 Approved")&&(L=!1),t.status==="LOI In Progress"&&(L=n.role==="NBH"?!!D:n.role==="DD Head"),t.status==="LOA Pending"&&(L=n.role==="NBH"?!!P:n.role==="DD Head"));const $=!!((I=t.stageApprovals)!=null&&I.find(B=>v[t.status]===B.stageCode&&String(B.actorUserId)===String(n.id))),Y=["Approved","Rejected","Selected"].includes((h==null?void 0:h.decision)||(h==null?void 0:h.recommendation)||""),Z=(f?Y:!1)||$,W=!O&&!Z&&_&&A&&L&&(!["EOR In Progress","Inauguration","Approved"].includes(t.status)||a===100);return{canApprove:W&&!E&&!q,canReject:W&&!E,isLoaLocked:E,isSecurityDetailsLocked:q,showDecisionMessage:Z&&(!A||$),canSchedule:["DD Admin","Super Admin","DD AM","ASM"].includes(n.role)&&!O&&![1,2,3].every(B=>i.some(G=>G.level===B)),canAssign:["DD Admin","Super Admin","DD AM"].includes(n.role)}})()}}function QU({initialTab:t="questionnaire"}){const[s,n]=g.useState(!1),[r,a]=g.useState(!1),[i,o]=g.useState(""),[d,m]=g.useState(t),[f,p]=g.useState(!1),[h,x]=g.useState(!1),[u,N]=g.useState(!1),[v,w]=g.useState(!1),[j,b]=g.useState(""),[C,S]=g.useState([]),[R,_]=g.useState(!1),[A,E]=g.useState(!1),[q,O]=g.useState(""),[D,P]=g.useState(null),[L,$]=g.useState(!1),[Y,Z]=g.useState(!1),[W,U]=g.useState(!1),[M,z]=g.useState(!1),[T,I]=g.useState(!1),[B,G]=g.useState(null),[K,H]=g.useState("virtual"),[X,J]=g.useState(""),[ae,le]=g.useState({}),[xe,ce]=g.useState([]),[ve,Pe]=g.useState(""),[et,kt]=g.useState("contributor"),[vt,ee]=g.useState(""),[ge,ye]=g.useState("level1"),[Be,$e]=g.useState(""),[dt,st]=g.useState(""),[xt,Mt]=g.useState(!1),[It,he]=g.useState(null),[pt,ht]=g.useState(""),[_e,Vt]=g.useState(null),[Pt,_s]=g.useState(!1),[Ys,Bs]=g.useState(null),[Ks,Qs]=g.useState(!1),[Xs,$s]=g.useState(""),[Q,oe]=g.useState(!1),[we,Oe]=g.useState({}),[ke,je]=g.useState(!1),[Ve,Ge]=g.useState([]),[nt,Zt]=g.useState(!1),[Jt,lt]=g.useState(!1),[mt,Ds]=g.useState(!1),[ss,Ae]=g.useState(""),[be,ut]=g.useState(!1),[He,yt]=g.useState(!1),[ft,es]=g.useState(""),[ts,Cs]=g.useState(""),[Us,rn]=g.useState(!1),[Js,an]=g.useState(!1),[hn,De]=g.useState([]),[bt,Te]=g.useState([]),[ct,tt]=g.useState(""),[jt,Ht]=g.useState(!1),[zt,fs]=g.useState(!1),[qt,As]=g.useState(!1),[vs,cs]=g.useState(!1),[mn,qs]=g.useState({}),[ln,fn]=g.useState({}),[on,Ye]=g.useState(""),[Ot,St]=g.useState("Approve"),[rt,Ft]=g.useState(!1),[jn,xn]=g.useState(null),[qn,En]=g.useState(!1),[Hs,Za]=g.useState(!1),[Pa,Ls]=g.useState("Recommended"),[nn,ta]=g.useState(""),[sa,na]=g.useState(!1),[Ir,Xn]=g.useState(!1),[zn,Qt]=g.useState({}),[Jn,Rr]=g.useState("Approve"),[Wn,Er]=g.useState(!1),[_n,ur]=g.useState({}),[rs,en]=g.useState("Approve"),[va,wi]=g.useState(!1),[Si,Mr]=g.useState(null),[Hr,sr]=g.useState(!1);return{showFirmTypeModal:s,setShowFirmTypeModal:n,updatingFirmType:r,setUpdatingFirmType:a,tempFirmType:i,setTempFirmType:o,activeTab:d,setActiveTab:m,showApproveModal:f,setShowApproveModal:p,showOnboardModal:h,setShowOnboardModal:x,isOnboarding:u,setIsOnboarding:N,showRejectModal:v,setShowRejectModal:w,rejectionReason:j,setRejectionReason:b,scheduledInterviewParticipants:C,setScheduledInterviewParticipants:S,showScheduleModal:R,setShowScheduleModal:_,showCancelInterviewModal:A,setShowCancelInterviewModal:E,interviewIdToCancel:q,setInterviewIdToCancel:O,interviewToReschedule:D,setInterviewToReschedule:P,showKTMatrixModal:L,setShowKTMatrixModal:$,showLevel2FeedbackModal:Y,setShowLevel2FeedbackModal:Z,showLevel3FeedbackModal:W,setShowLevel3FeedbackModal:U,showDocumentsModal:M,setShowDocumentsModal:z,showAssignModal:T,setShowAssignModal:I,selectedStage:B,setSelectedStage:G,interviewMode:K,setInterviewMode:H,approvalRemark:X,setApprovalRemark:J,expandedBranches:ae,setExpandedBranches:le,users:xe,setUsers:ce,selectedUser:ve,setSelectedUser:Pe,participantType:et,setParticipantType:kt,interviewDate:vt,setInterviewDate:ee,interviewType:ge,setInterviewType:ye,meetingLink:Be,setMeetingLink:$e,location:dt,setLocation:st,showUploadForm:xt,setShowUploadForm:Mt,uploadFile:It,setUploadFile:he,uploadDocType:pt,setUploadDocType:ht,approvalFile:_e,setApprovalFile:Vt,isUploading:Pt,setIsUploading:_s,previewDoc:Ys,setPreviewDoc:Bs,showPreviewModal:Ks,setShowPreviewModal:Qs,selectedInterviewerId:Xs,setSelectedInterviewerId:$s,isEditingStatutory:Q,setIsEditingStatutory:oe,statutoryForm:we,setStatutoryForm:Oe,isSavingStatutory:ke,setIsSavingStatutory:je,interviews:Ve,setInterviews:Ge,isScheduling:nt,setIsScheduling:Zt,isCancellingInterview:Jt,setIsCancellingInterview:lt,showAssignArchitectureModal:mt,setShowAssignArchitectureModal:Ds,architectureLeadId:ss,setArchitectureLeadId:Ae,isAssigningArchitecture:be,setIsAssigningArchitecture:ut,showArchitectureStatusModal:He,setShowArchitectureStatusModal:yt,architectureStatus:ft,setArchitectureStatus:es,architectureRemarks:ts,setArchitectureRemarks:Cs,isUpdatingArchitecture:Us,setIsUpdatingArchitecture:rn,isAssigningParticipant:Js,setIsAssigningParticipant:an,documentConfigs:hn,setDocumentConfigs:De,fddAgencies:bt,setFddAgencies:Te,selectedAgencyId:ct,setSelectedAgencyId:tt,isAssigningAgency:jt,setIsAssigningAgency:Ht,showAssignFddModal:zt,setShowAssignFddModal:fs,isApproving:qt,setIsApproving:As,isRejecting:vs,setIsRejecting:cs,ktMatrixScores:mn,setKtMatrixScores:qs,ktMatrixSelectedValues:ln,setKtMatrixSelectedValues:fn,ktMatrixRemarks:on,setKtMatrixRemarks:Ye,ktMatrixRecommendation:Ot,setKtMatrixRecommendation:St,isSubmittingKT:rt,setIsSubmittingKT:Ft,selectedInterviewForFeedback:jn,setSelectedInterviewForFeedback:xn,showFddFinalizeModal:qn,setShowFddFinalizeModal:En,showFddFlagModal:Hs,setShowFddFlagModal:Za,fddAuditRecommendation:Pa,setFddAuditRecommendation:Ls,fddAuditFindings:nn,setFddAuditFindings:ta,isFinalizingFdd:sa,setIsFinalizingFdd:na,isFddFlagging:Ir,setIsFddFlagging:Xn,level2Feedback:zn,setLevel2Feedback:Qt,level2Recommendation:Jn,setLevel2Recommendation:Rr,isSubmittingLevel2:Wn,setIsSubmittingLevel2:Er,level3Feedback:_n,setLevel3Feedback:ur,level3Recommendation:rs,setLevel3Recommendation:en,isSubmittingLevel3:va,setIsSubmittingLevel3:wi,selectedEvaluationForView:Si,setSelectedEvaluationForView:Mr,showFeedbackDetailsModal:Hr,setShowFeedbackDetailsModal:sr}}const m_=()=>new Date().toISOString().split("T")[0],XU=t=>({strategicVision:"",managementCapabilities:"",operationalUnderstanding:"",keyStrengths:"",areasOfConcern:"",additionalComments:"",overallScore:"",interviewerName:(t==null?void 0:t.name)||"",interviewDate:m_()}),JU=t=>({strategicVision:"",managementCapabilities:"",operationalUnderstanding:"",brandAlignment:"",executiveSummary:"",keyStrengths:"",areasOfConcern:"",additionalComments:"",overallScore:"",interviewerName:(t==null?void 0:t.name)||"",interviewDate:m_()});function eV({ktMatrixScores:t,setKtMatrixScores:s,setKtMatrixSelectedValues:n,ktMatrixRemarks:r,setKtMatrixRemarks:a,ktMatrixRecommendation:i,setKtMatrixRecommendation:o,selectedInterviewForFeedback:d,interviews:m,setIsSubmittingKT:f,setShowKTMatrixModal:p,level2Feedback:h,setLevel2Feedback:x,level2Recommendation:u,setLevel2Recommendation:N,setIsSubmittingLevel2:v,setShowLevel2FeedbackModal:w,level3Feedback:j,setLevel3Feedback:b,level3Recommendation:C,setLevel3Recommendation:S,setIsSubmittingLevel3:R,setShowLevel3FeedbackModal:_,currentUser:A,fetchInterviews:E,fetchApplication:q,ktMatrixConfig:O,level2Config:D,level3Config:P}){const L=J=>J==="Approve"?"Recommended":J==="Reject"?"Not Recommended":"Hold",$=J=>J==="Approve"?"Approved":J==="Reject"?"Rejected":null,Y=()=>O!=null&&O.items&&O.items.length>0?O.items.map(J=>({name:J.label,weight:Number(J.weight)||0,maxScore:Number(J.maxScore)||10,options:(J.options||[]).map(ae=>({label:ae.optionLabel,value:ae.optionValue,score:Number(ae.score)||0}))})):[],Z=()=>D!=null&&D.items&&D.items.length>0?D.items:[],W=()=>P!=null&&P.items&&P.items.length>0?P.items:[],U=Y(),M=Z(),z=W();return{handleKTMatrixChange:(J,ae,le)=>{s(xe=>({...xe,[J]:le})),n(xe=>({...xe,[J]:ae}))},calculateKTScore:()=>{let J=0;return U.forEach(ae=>{const le=t[ae.name||ae.label]||0,xe=ae.maxScore||10,ce=ae.weight||0;J+=le/xe*ce}),J.toFixed(2)},handleSubmitKTMatrix:async()=>{var ae,le;if(U.length===0){te.error("KT Matrix configuration is missing. Please configure it in Master > Interview Configurations.");return}if(Object.keys(t).lengthxe.status!=="Completed"))==null?void 0:ae.id)||((le=m[0])==null?void 0:le.id);if(!J){te.error("No active interview found to link this KT Matrix to.");return}try{f(!0);const xe=U.map(ve=>({criterionName:ve.name||ve.label,score:t[ve.name||ve.label]||0,maxScore:ve.maxScore||10,weightage:ve.weight||0}));await hs.submitKTMatrix({interviewId:J,criteriaScores:xe,feedback:r,recommendation:L(i)});const ce=$(i);ce&&await hs.updateInterviewDecision({interviewId:J,decision:ce,remarks:r||`Level 1 ${ce.toLowerCase()} via KT Matrix`}),te.success(ce?`KT Matrix submitted and interview ${ce.toLowerCase()}`:"KT Matrix submitted and interview kept on hold"),p(!1),s({}),n({}),a(""),o("Approve"),await E(),await q()}catch{te.error("Failed to submit KT Matrix")}finally{f(!1)}},handleLevel2Change:(J,ae)=>{x(le=>({...le,[J]:ae}))},handleSubmitLevel2Feedback:async()=>{var ae;if(M.length===0){te.error("Level 2 feedback configuration is missing. Please configure it in Master > Interview Configurations.");return}if(!h.overallScore){te.warning("Please provide an overall score.");return}const J=(d==null?void 0:d.id)||((ae=m.find(le=>le.status!=="Completed"&&le.level===2))==null?void 0:ae.id);if(!J){te.error("No active Level 2 interview found to link this feedback to.");return}try{v(!0);const le=M.map(ve=>({type:ve.label,comments:h[ve.itemKey]||""})).filter(ve=>ve.comments.trim()!=="");await hs.submitLevel2Feedback({interviewId:J,overallScore:Number(h.overallScore),feedbackItems:le,recommendation:L(u)});const xe=$(u),ce=h.additionalComments||"Level 2 decision submitted via feedback modal";xe&&await hs.updateInterviewDecision({interviewId:J,decision:xe,remarks:ce}),te.success(xe?`Level 2 feedback submitted and interview ${xe.toLowerCase()}`:"Level 2 feedback submitted and interview kept on hold"),w(!1),x(XU(A)),N("Approve"),await E(),await q()}catch{te.error("Failed to submit Level 2 Feedback")}finally{v(!1)}},handleLevel3Change:(J,ae)=>{b(le=>({...le,[J]:ae}))},handleSubmitLevel3Feedback:async()=>{var ae;if(z.length===0){te.error("Level 3 feedback configuration is missing. Please configure it in Master > Interview Configurations.");return}if(!j.overallScore){te.warning("Please provide an overall score.");return}const J=(d==null?void 0:d.id)||((ae=m.find(le=>le.status!=="Completed"&&le.level===3))==null?void 0:ae.id);if(!J){te.error("No active Level 3 interview found to link this feedback to.");return}try{R(!0);const le=z.map(ve=>({type:ve.label,comments:j[ve.itemKey]||""})).filter(ve=>ve.comments.trim()!=="");await hs.submitLevel2Feedback({interviewId:J,overallScore:Number(j.overallScore),feedbackItems:le,recommendation:L(C)});const xe=$(C),ce=j.executiveSummary||j.additionalComments||"Level 3 decision submitted via feedback modal";xe&&await hs.updateInterviewDecision({interviewId:J,decision:xe,remarks:ce}),te.success(xe?`Level 3 feedback submitted and interview ${xe.toLowerCase()}`:"Level 3 feedback submitted and interview kept on hold"),_(!1),b(JU(A)),S("Approve"),await E(),await q()}catch{te.error("Failed to submit Level 3 Feedback")}finally{R(!1)}},ktCriteria:U,l2Fields:M,l3Fields:z}}function tV(){const[t,s]=g.useState(null),[n,r]=g.useState(null),[a,i]=g.useState(null),[o,d]=g.useState(!1),[m,f]=g.useState(null),p=g.useCallback(async x=>{var u,N;try{const v=await Ee.getInterviewConfigByType(x);if((u=v.data)!=null&&u.success)return v.data.data}catch(v){((N=v==null?void 0:v.response)==null?void 0:N.status)!==404&&console.warn(`Failed to fetch ${x} config:`,v)}return null},[]),h=g.useCallback(async()=>{d(!0),f(null);try{const[x,u,N]=await Promise.all([p("KT_MATRIX"),p("LEVEL2_FEEDBACK"),p("LEVEL3_FEEDBACK")]);s(x),r(u),i(N)}catch{f("Failed to load interview configurations"),te.error("Failed to load interview configurations")}finally{d(!1)}},[p]);return g.useEffect(()=>{h()},[h]),{ktMatrixConfig:t,level2Config:n,level3Config:a,loading:o,error:m,refresh:h}}function sV(t){const{application:s,applicationId:n,currentUser:r,interviews:a,approvalFile:i,approvalRemark:o,rejectionReason:d,architectureLeadId:m,architectureStatus:f,architectureRemarks:p,selectedUser:h,participantType:x,users:u,interviewDate:N,setInterviewDate:v,interviewType:w,setInterviewType:j,interviewMode:b,setInterviewMode:C,meetingLink:S,setMeetingLink:R,location:_,setLocation:A,scheduledInterviewParticipants:E,uploadFile:q,uploadDocType:O,selectedStage:D,setIsApproving:P,setShowApproveModal:L,setApprovalRemark:$,setApprovalFile:Y,setIsRejecting:Z,setShowRejectModal:W,setRejectionReason:U,setIsAssigningArchitecture:M,setShowAssignArchitectureModal:z,setIsUpdatingArchitecture:T,setShowArchitectureStatusModal:I,setIsAssigningParticipant:B,setSelectedUser:G,setShowAssignModal:K,setLoading:H,setIsScheduling:X,setShowScheduleModal:J,setShowCancelInterviewModal:ae,interviewIdToCancel:le,setInterviewIdToCancel:xe,interviewToReschedule:ce,setInterviewToReschedule:ve,setIsCancellingInterview:Pe,setIsUploading:et,setShowUploadForm:kt,setUploadFile:vt,setUploadDocType:ee,setDocuments:ge,selectedInterviewerId:ye,setSelectedInterviewerId:Be,setScheduledInterviewParticipants:$e,setUsers:dt,showScheduleModal:st,showAssignArchitectureModal:xt,showAssignModal:Mt,fetchApplication:It,fetchInterviews:he,fetchEorData:pt}=t,ht=()=>{if(!ye)return;const Ge=(Array.isArray(u)?u:[]).find(nt=>nt.id===ye);Ge&&!E.find(nt=>nt.id===Ge.id)&&($e([...E,Ge]),Be(""))},_e=Ve=>{$e(E.filter(Ge=>Ge.id!==Ve))},Vt=g.useCallback(async Ve=>{if(!(!r||!["DD Admin","Super Admin","DD Lead","DD Head","NBH"].includes(r.role)))try{const Ge={};if(Ve){const lt={level1:["DD-ZM","RBM"],level2:["DD Lead","ZBH"],level3:["NBH","DD Head"]};lt[Ve]&&(Ge.preferredRoleCode=lt[Ve]),s&&(Ge.locationId=s.districtId||s.areaId||s.regionId||s.zoneId)}Ge.isExternal=!1;const nt=await hs.getUsers(Ge),Jt=(Array.isArray(nt)?nt:nt&&Array.isArray(nt.data)?nt.data:nt&&Array.isArray(nt.users)?nt.users:[]).filter(lt=>(lt.status||"").toLowerCase()!=="inactive");dt(Jt.sort((lt,mt)=>String(lt.fullName||lt.name||"").localeCompare(String(mt.fullName||mt.name||""))))}catch{dt([])}},[r,s,dt]),Pt=g.useCallback(()=>{if(!st||!s||ce)return;const Ve=parseInt(w.replace("level",""))||1,Ge={1:["DD-ZM","RBM"],2:["DD Lead","ZBH"],3:["NBH","DD Head"]},nt=ss=>String(ss||"").trim().toLowerCase().replace(/[_\s-]+/g," "),Zt=(Ge[Ve]||[]).map(nt),Jt=(ss,Ae)=>{var He,yt,ft;const be=[(He=ss==null?void 0:ss.metadata)==null?void 0:He.role,(yt=Ae==null?void 0:Ae.role)==null?void 0:yt.roleName,(ft=Ae==null?void 0:Ae.role)==null?void 0:ft.roleCode,Ae==null?void 0:Ae.roleCode,Ae==null?void 0:Ae.role].filter(Boolean),ut=be.find(es=>Zt.includes(nt(es)));return String(ut||be[0]||"Panelist")},lt=((s==null?void 0:s.participants)||[]).filter(ss=>{var Ae,be,ut,He,yt,ft,es,ts,Cs;return((Ae=ss.metadata)==null?void 0:Ae.interviewLevel)===Ve||((be=ss.metadata)==null?void 0:be.interviewLevel)===String(Ve)||((He=(ut=ss.metadata)==null?void 0:ut.allAssignments)==null?void 0:He.includes(Ve))||((ft=(yt=ss.metadata)==null?void 0:yt.allAssignments)==null?void 0:ft.includes(String(Ve)))||Zt.includes(nt((es=ss.user)==null?void 0:es.role))||Zt.includes(nt((ts=ss.user)==null?void 0:ts.roleCode))||Zt.includes(nt((Cs=ss.metadata)==null?void 0:Cs.role))}).map(ss=>{const Ae=ss.user||{};return{...Ae,__stageRole:Jt(ss,Ae)}}).filter(ss=>!!(ss!=null&&ss.id));if(lt.length===0){$e([]);return}const mt=[],Ds=new Set;lt.forEach(ss=>{ss.id&&!Ds.has(ss.id)&&(Ds.add(ss.id),mt.push(ss))}),$e(mt)},[st,s,w,ce,$e]),_s=async()=>{if(!N){te.warning("Please select date and time");return}try{X(!0);const Ve={applicationId:s==null?void 0:s.id,level:w,scheduledAt:N,type:b==="virtual"?"Virtual Interview":"Physical Interview",location:b==="virtual"?S:_,participants:E.map(Ge=>Ge.id)};ce?(await hs.updateInterview(ce.id,{...Ve,status:"Scheduled"}),te.success("Interview rescheduled successfully")):(await hs.scheduleInterview(Ve),te.success("Interview scheduled successfully")),J(!1),ve(null),await he(),await It()}catch{te.error(ce?"Failed to reschedule interview":"Failed to schedule interview")}finally{X(!1)}},Ys=async Ve=>{xe(Ve),ae(!0)},Bs=async Ve=>{var nt,Zt;ve(Ve),j(`level${Ve.level}`),C((nt=Ve.interviewType)!=null&&nt.toLowerCase().includes("virtual")?"virtual":"physical"),v(Ve.scheduleDate?(()=>{const Jt=new Date(Ve.scheduleDate);return new Date(Jt.getTime()-Jt.getTimezoneOffset()*6e4).toISOString().slice(0,16)})():""),(Zt=Ve.interviewType)!=null&&Zt.toLowerCase().includes("virtual")?R(Ve.linkOrLocation||""):A(Ve.linkOrLocation||"");const Ge=(Ve.participants||[]).map(Jt=>Jt.user||Jt).filter(Boolean);$e(Ge),J(!0)},Ks=async()=>{if(le)try{Pe(!0),await hs.updateInterview(le,{status:"Cancelled"}),te.success("Interview cancelled successfully"),ae(!1),xe(""),await he()}catch{te.error("Failed to cancel interview")}finally{Pe(!1)}},Qs=async()=>{var Ve;if(!q||!O){te.warning("Please enter a document name and select a file");return}try{et(!0);const Ge=new FormData,nt=((Ve=q.name.match(/\.[^/.]+$/))==null?void 0:Ve[0])||"",Zt=O.trim(),Jt=Zt.toLowerCase().endsWith(nt.toLowerCase())?Zt:`${Zt}${nt}`;Ge.append("file",q,Jt);const lt=D!=null&&D.startsWith("EOR: ")?D.replace(/^EOR:\s*/,""):null;Ge.append("documentType",lt||"Other"),D&&Ge.append("stage",D),await hs.uploadDocument(n,Ge),te.success("Document uploaded successfully"),kt(!1),vt(null),ee("");const mt=await hs.getDocuments(n);ge(mt||[]),await pt()}catch{te.error("Failed to upload document")}finally{et(!1)}},Xs=async()=>{var Ve;try{P(!0);const Ge=a.find(lt=>{var mt;return lt.status!=="Completed"&<.status!=="Cancelled"&&((mt=lt.participants)==null?void 0:mt.some(Ds=>Ds.userId===(r==null?void 0:r.id)))});if(i&&n)try{const lt=new FormData;lt.append("file",i),lt.append("documentType","Approval Attachment");let mt=null;Ge&&(Ge.level===1||Ge.level==="1"?mt="1st Level Interview":Ge.level===2||Ge.level==="2"?mt="2nd Level Interview":(Ge.level===3||Ge.level==="3")&&(mt="3rd Level Interview")),mt||(s.status==="Shortlisted"||s.status==="Level 1 Interview Pending"?mt="1st Level Interview":s.status==="Level 1 Approved"||s.status==="Level 2 Interview Pending"?mt="2nd Level Interview":(s.status==="Level 2 Approved"||s.status==="Level 3 Interview Pending")&&(mt="3rd Level Interview")),mt&<.append("stage",mt),await hs.uploadDocument(n,lt)}catch{te.error("Failed to upload document")}if(Ge)try{await hs.updateInterviewDecision({interviewId:Ge.id,decision:"Approved",remarks:o}),te.success("Interview approved successfully"),L(!1),$(""),Y(null),await he(),await It();return}catch{te.error("Failed to approve interview");return}if(!o.trim()){te.warning("Please enter a remark");return}let nt=s.status;switch(s.status){case"Shortlisted":case"Level 1 Interview Pending":nt="Level 1 Approved";break;case"Level 1 Approved":case"Level 2 Interview Pending":nt="Level 2 Approved";break;case"Level 2 Approved":case"Level 3 Interview Pending":nt="Level 3 Approved";break;case"Level 3 Approved":nt="FDD Verification";break;case"FDD Verification":nt="LOI In Progress";break;case"LOI In Progress":nt="Security Deposit";break;case"Security Deposit":case"Security Details":case"Payment Pending":nt="LOI Issued";break;case"LOI Issued":nt="Dealer Code Generation";break;case"Dealer Code Generation":case"Architecture Team Assigned":case"Architecture Document Upload":case"Architecture Team Completion":case"Statutory GST":case"Statutory PAN":case"Statutory Nodal":case"Statutory Check":case"Statutory Partnership":case"Statutory Firm Reg":case"Statutory Rental":case"Statutory Virtual Code":case"Statutory Domain":case"Statutory MSD":case"Statutory LOI Ack":nt="LOA Pending";break;case"LOA Pending":nt="EOR In Progress";break;case"EOR In Progress":nt="EOR Complete";break;case"EOR Complete":nt="Inauguration";break;case"Inauguration":case"Approved":nt="Onboarded";break;default:nt="Onboarded"}const Jt={"Level 1 Interview Pending":"INTERVIEW_LEVEL_1","Level 2 Interview Pending":"INTERVIEW_LEVEL_2","Level 2 Recommended":"INTERVIEW_LEVEL_2","Level 3 Interview Pending":"INTERVIEW_LEVEL_3","LOI In Progress":"LOI_APPROVAL","LOA Pending":"LOA_APPROVAL"}[s.status];if(Jt){const lt=await hs.submitStageDecision({applicationId:s.id,stageCode:Jt,decision:"Approved",remarks:o,nextStatus:nt});(Ve=lt.data)!=null&&Ve.statusUpdated?te.success(lt.message||"Stage completed and moved to next step"):te.info(lt.message||"Approval recorded. Waiting for other mandatory approvers.")}else await hs.updateApplicationStatus(n,{status:nt,remarks:o});nt==="Onboarded"?(await hs.createDealer({applicationId:n}),te.success("Application finalized and Dealer profile created!")):te.success(`Application moved to ${nt}`),L(!1),$(""),Y(null),await It()}catch(Ge){te.error(Ge.message||"Failed to process approval")}finally{P(!1)}},$s=async()=>{try{Z(!0);const Ve=a.find(Zt=>{var Jt;return Zt.status!=="Completed"&&Zt.status!=="Cancelled"&&((Jt=Zt.participants)==null?void 0:Jt.some(lt=>lt.userId===(r==null?void 0:r.id)))});if(Ve)try{await hs.updateInterviewDecision({interviewId:Ve.id,decision:"Rejected",remarks:d}),te.success("Interview rejected"),W(!1),U(""),await he(),await It();return}catch{te.error("Failed to reject interview");return}if(!d.trim()){te.warning("Please enter a reason for rejection");return}const nt={"Level 1 Interview Pending":"INTERVIEW_LEVEL_1","Level 2 Interview Pending":"INTERVIEW_LEVEL_2","Level 2 Recommended":"INTERVIEW_LEVEL_2","Level 3 Interview Pending":"INTERVIEW_LEVEL_3","LOI In Progress":"LOI_APPROVAL","LOA Pending":"LOA_APPROVAL"}[s.status];nt?await hs.submitStageDecision({applicationId:s.id,stageCode:nt,decision:"Rejected",remarks:d,interviewId:Ve==null?void 0:Ve.id}):await hs.updateApplicationStatus(n,{status:"Rejected",remarks:d}),te.success("Application rejected"),W(!1),U(""),await It()}catch(Ve){te.error(Ve.message||"Failed to process rejection")}finally{Z(!1)}},Q=async()=>{try{await hs.generateDealerCodes(n),te.success("Dealer codes generated successfully"),await It()}catch(Ve){te.error(Ve.message||"Failed to generate dealer codes")}},oe=async()=>{if(!m){te.warning("Please select an architecture lead");return}try{M(!0),await hs.assignArchitectureTeam(n,m),te.success("Architecture team assigned successfully"),z(!1),await It()}catch(Ve){te.error(Ve.message||"Failed to assign architecture team")}finally{M(!1)}},we=async()=>{try{T(!0),await hs.updateArchitectureStatus(n,f,p),te.success("Architecture status updated successfully"),I(!1),await It()}catch{te.error("Failed to update architecture status")}finally{T(!1)}},Oe=async()=>{if(!h){te.warning("Please select a user");return}try{B(!0);const Ve=Array.isArray(u)?u.find(Ge=>Ge.id===h):null;Ve&&(Ve.role==="FDD"||Ve.roleCode==="FDD")&&(await hs.assignFddAgency({applicationId:n,assignedToAgency:h}),te.info(`${Ve.fullName||Ve.name} assigned as FDD Agency based on role.`)),await hs.addParticipant({requestId:n,requestType:"application",userId:h,participantType:x||"contributor"}),te.success("User assigned successfully!"),await It(),G(""),K(!1)}catch{te.error("Failed to assign user")}finally{B(!1)}},ke=async()=>{try{H(!0),await hs.retriggerEvaluators(n),te.success("Evaluators re-assigned successfully"),await It()}catch{te.error("Failed to re-assign evaluators")}finally{H(!1)}},je=g.useCallback(async()=>{if(st&&s){await Vt(w),Pt();return}(xt||Mt)&&s&&await Vt()},[st,xt,Mt,s,w,Vt,Pt]);return{handleAddInterviewer:ht,handleRemoveInterviewer:_e,fetchUsers:Vt,maybeFetchUsersForModal:je,handleScheduleInterview:_s,handleRescheduleInterview:Bs,handleCancelInterview:Ys,handleConfirmCancelInterview:Ks,handleUpload:Qs,handleApprove:Xs,handleReject:$s,handleGenerateDealerCodes:Q,handleAssignArchitecture:oe,handleUpdateArchitectureStatus:we,handleAddParticipant:Oe,handleRetriggerEvaluators:ke}}const f_={getChecklist:async(t,s)=>{const n=s?`/eor/relocation/${s}`:`/eor/application/${t}`;return(await qe.get(n)).data},createChecklist:async t=>(await qe.post("/eor",t)).data,updateItem:async(t,s)=>(await qe.post(`/eor/item/${t}`,s)).data,submitAudit:async(t,s)=>(await qe.post(`/eor/audit/${t}`,s)).data},Vg=Object.freeze(Object.defineProperty({__proto__:null,eorService:f_},Symbol.toStringTag,{value:"Module"})),nV={getAuditLogs:async(t,s,n=1,r=50)=>{var a;try{const i=await Ee.getAuditLogs(t,s,n,r);return((a=i.data)==null?void 0:a.data)||i.data||[]}catch(i){throw console.error("Get audit logs error:",i),i}},getAuditSummary:async(t,s)=>{var n;try{const r=await Ee.getAuditSummary(t,s);return((n=r.data)==null?void 0:n.data)||r.data}catch(r){throw console.error("Get audit summary error:",r),r}}},rV={getWorknotes:async(t,s)=>{var r,a;const n=await Ee.getWorknotes(t,s);if(!n.ok)throw new Error(((r=n.data)==null?void 0:r.message)||"Failed to fetch worknotes");return((a=n.data)==null?void 0:a.data)||n.data},addWorknote:async t=>{var n,r;const s=await Ee.addWorknote(t);if(!s.ok)throw new Error(((n=s.data)==null?void 0:n.message)||"Failed to add worknote");return((r=s.data)==null?void 0:r.data)||s.data},addParticipant:async t=>{var n;const s=await Ee.addParticipant(t);if(!s.ok)throw new Error(((n=s.data)==null?void 0:n.message)||"Failed to add participant");return s.data},removeParticipant:async t=>{var n;const s=await Ee.removeParticipant(t);if(!s.ok)throw new Error(((n=s.data)==null?void 0:n.message)||"Failed to remove participant");return s.data}};function aV({applicationId:t}){const[s,n]=g.useState(null),[r,a]=g.useState(!0),[i,o]=g.useState([]),[d,m]=g.useState(null),[f,p]=g.useState([]),[h,x]=g.useState(!1),[u,N]=g.useState([]),[v,w]=g.useState([]),[j,b]=g.useState({}),C=g.useCallback(async()=>{try{const A=await hs.getDocuments(t);o(A||[])}catch(A){console.error("Failed to refresh documents:",A)}},[t]),S=g.useCallback(async(A=!1)=>{try{A||a(!0);const E=await hs.getApplicationById(t),q=(D,P)=>{var $;const L=($=E.progressTracking)==null?void 0:$.find(Y=>Y.stageName===D);if(L!=null&&L.stageCompletedAt)return new Date(L.stageCompletedAt).toISOString();if(L!=null&&L.stageStartedAt)return new Date(L.stageStartedAt).toISOString();if(P){const Y=(E.statusHistory||[]).find(Z=>Z.newStatus===P);if(Y)return new Date(Y.createdAt).toISOString()}},O={id:E.id,registrationNumber:E.applicationId||"N/A",name:E.applicantName,email:E.email,phone:E.phone,age:E.age,education:E.education,residentialAddress:E.address||E.city||"",businessAddress:E.address||"",preferredLocation:E.preferredLocation,state:E.state,ownsBike:E.ownRoyalEnfield==="yes",pastExperience:E.experienceYears?`${E.experienceYears} years`:E.description||"",status:E.overallStatus,questionnaireMarks:E.score||E.questionnaireMarks||0,questionnaireResponses:E.questionnaireResponses||[],rank:0,totalApplicantsAtLocation:0,assignedUsers:[],progress:E.progressPercentage||0,isShortlisted:E.isShortlisted||!0,companyName:E.companyName,source:E.source,existingDealer:E.existingDealer,royalEnfieldModel:E.royalEnfieldModel,description:E.description,pincode:E.pincode,locationType:E.locationType,ownRoyalEnfield:E.ownRoyalEnfield,address:E.address,submissionDate:E.createdAt?new Date(E.createdAt).toISOString():"",questionnaireDate:q("Questionnaire","Questionnaire Completed")||q("Questionnaire","Questionnaire Pending"),shortlistDate:q("Shortlist","Shortlisted"),level1InterviewDate:q("1st Level Interview","Level 1 Approved"),level2InterviewDate:q("2nd Level Interview","Level 2 Approved"),level3InterviewDate:q("3rd Level Interview","Level 3 Approved"),fddDate:q("FDD","FDD Verification"),loiApprovalDate:q("LOI Approval","LOI In Progress"),securityDetailsDate:q("Security Deposit","Security Deposit")||q("Security Details","Security Details"),loiIssueDate:q("LOI Issue","LOI Issued"),dealerCodeDate:q("Dealer Code Generation","Dealer Code Generation"),architectureAssignedDate:q("Architecture Team Assigned","Architecture Team Assigned"),architectureDocumentDate:q("Architecture Document Upload","Architecture Document Upload"),architectureCompletionDate:q("Architecture Team Completion","Architecture Team Completion"),loaDate:q("LOA","LOA Pending"),eorCompleteDate:q("EOR Complete","EOR Complete"),inaugurationDate:q("Inauguration","Inauguration"),onboardedDate:E.overallStatus==="Onboarded"?E.updatedAt?new Date(E.updatedAt).toISOString():new Date().toISOString():void 0,progressTracking:E.progressTracking||[],participants:E.participants||[],dealerCode:E.dealerCode,zoneId:E.zoneId,regionId:E.regionId,areaId:E.areaId,districtId:E.districtId,stageApprovals:E.stageApprovals||[],fddAssignments:E.fddAssignments||[],constitutionType:E.constitutionType,architectureStatus:E.architectureStatus,statutoryStatus:E.statutoryStatus,panNumber:E.panNumber,gstNumber:E.gstNumber,bankName:E.bankName,accountNumber:E.accountNumber,ifscCode:E.ifscCode,branchName:E.branchName,accountHolderName:E.accountHolderName,registeredAddress:E.registeredAddress};n(O),E.uploadedDocuments&&o(E.uploadedDocuments||[])}catch(E){console.error("Failed to fetch application details",E)}finally{a(!1)}},[t]),R=g.useCallback(async()=>{if(t)try{const A=await f_.getChecklist(t);A.success&&A.data&&m(A.data)}catch{m(null)}},[t]),_=A=>v.find(E=>E.depositType===A);return g.useEffect(()=>{t&&(S(),C())},[t]),g.useEffect(()=>{t&&R()},[t,s==null?void 0:s.status]),g.useEffect(()=>{if(!(s!=null&&s.id))return;(async()=>{x(!0);try{const E=await nV.getAuditLogs("application",s.id,1,100);p(Array.isArray(E)?E:[])}catch{p([])}finally{x(!1)}try{const E=await rV.getWorknotes("application",s.id);N(E.data||[])}catch{N([])}})()},[s==null?void 0:s.id]),g.useEffect(()=>{if(!t)return;(async()=>{try{const[E,q]=await Promise.all([hs.getSecurityDeposit(t),hs.getSystemConfigs({category:"SECURITY_DEPOSIT",format:"map"})]);w(Array.isArray(E)?E:[E].filter(Boolean)),b(q||{})}catch(E){console.error("Failed to fetch payment data",E)}})()},[t]),{application:s,loading:r,setLoading:a,documents:i,setDocuments:o,eorData:d,auditLogs:f,auditLoading:h,worknotes:u,deposits:v,paymentConfigs:j,refreshDocuments:C,fetchApplication:S,fetchEorData:R,getDeposit:_}}function iV({application:t,applicationId:s,tempFirmType:n,setUpdatingFirmType:r,setShowFirmTypeModal:a,setStatutoryForm:i,setIsEditingStatutory:o,setIsSavingStatutory:d,statutoryForm:m,setFddAgencies:f,selectedAgencyId:p,setIsAssigningAgency:h,fetchApplication:x}){const u=async()=>{try{r(!0),await hs.updateApplication(s,{constitutionType:n}),te.success("Firm type updated successfully"),a(!1),await x()}catch{te.error("Failed to update firm type")}finally{r(!1)}},N=()=>{t&&(i({accountHolderName:t.accountHolderName||"",panNumber:t.panNumber||"",gstNumber:t.gstNumber||"",bankName:t.bankName||"",accountNumber:t.accountNumber||"",ifscCode:t.ifscCode||"",registeredAddress:t.registeredAddress||""}),o(!0))},v=async()=>{try{d(!0),await hs.updateApplication(s,m),te.success("Statutory & Bank details updated successfully"),o(!1),await x(!0)}catch{te.error("Failed to update details")}finally{d(!1)}},w=g.useCallback(async()=>{try{const b=await hs.getUsers({roleCode:"FDD"});f(Array.isArray(b)?b:[])}catch{f([])}},[f]);return{handleUpdateFirmType:u,handleEditStatutory:N,handleSaveStatutory:v,fetchFddAgencies:w,handleAssignAgency:async()=>{if(!p){te.warning("Please select an agency");return}try{h(!0),await hs.assignFddAgency({applicationId:(t==null?void 0:t.id)||s,assignedToAgency:p}),await hs.addParticipant({requestId:(t==null?void 0:t.id)||s,requestType:"application",userId:p,participantType:"contributor"}),te.success("FDD Agency assigned and added as participant"),await x()}catch{te.error("Failed to assign agency")}finally{h(!1)}}}}function lV({application:t,documents:s,interviews:n,eorData:r,getDeposit:a,documentConfigs:i=[]}){var w;const o=j=>String(j||"").trim().toLowerCase().replace(/[_\s-]+/g," "),d=(j,b)=>{var R,_,A;const C=[(R=j==null?void 0:j.user)==null?void 0:R.role,(_=j==null?void 0:j.user)==null?void 0:_.roleCode,(A=j==null?void 0:j.metadata)==null?void 0:A.role].map(o),S=b.map(o);return C.some(E=>S.includes(E))},m=j=>{var b,C,S,R,_;return`${((b=j==null?void 0:j.user)==null?void 0:b.fullName)||((C=j==null?void 0:j.user)==null?void 0:C.name)||"User"} (${((S=j==null?void 0:j.user)==null?void 0:S.role)||((R=j==null?void 0:j.user)==null?void 0:R.roleCode)||((_=j==null?void 0:j.metadata)==null?void 0:_.role)||(j==null?void 0:j.participantType)||"participant"})`},f=j=>(s||[]).some(b=>b.documentType===j),p=()=>{const j=t.progressTracking||[],b=j.find(C=>C.stageName==="Security Deposit")||j.find(C=>C.stageName==="Security Details");return b!=null&&b.status?b.status:"pending"},h=(j,b="pending")=>{const C=(t.progressTracking||[]).find(S=>S.stageName===j);return C!=null&&C.status?C.status:b},x=[{id:1,name:"Submitted",status:"completed",date:t.submissionDate,description:"Application submitted",documentsUploaded:3},{id:2,name:"Questionnaire",status:h("Questionnaire"),date:t.questionnaireDate,description:"Questionnaire completed",documentsUploaded:0},{id:3,name:"Shortlist",status:h("Shortlist"),date:t.shortlistDate,description:"Application shortlisted by DD",evaluators:Array.from(new Set((t.participants||[]).filter(j=>j.participantType==="assignee").map(j=>{var b,C,S;return`${((b=j.user)==null?void 0:b.fullName)||((C=j.user)==null?void 0:C.name)||"User"} (${((S=j.user)==null?void 0:S.roleCode)||j.participantType})`}))),documentsUploaded:2},{id:4,name:"1st Level Interview",status:h("1st Level Interview"),date:t.level1InterviewDate,description:"DD-ZM + RBM evaluation",evaluators:Array.from(new Set((t.participants||[]).filter(j=>{var b,C,S,R,_,A;return((b=j.metadata)==null?void 0:b.interviewLevel)===1||((C=j.metadata)==null?void 0:C.interviewLevel)==="1"||((R=(S=j.metadata)==null?void 0:S.allAssignments)==null?void 0:R.includes(1))||((A=(_=j.metadata)==null?void 0:_.allAssignments)==null?void 0:A.includes("1"))||d(j,["DD-ZM","RBM"])}).map(m))),documentsUploaded:1},{id:5,name:"2nd Level Interview",status:h("2nd Level Interview"),date:t.level2InterviewDate,description:"DD Lead + ZBH evaluation",evaluators:Array.from(new Set((t.participants||[]).filter(j=>{var b,C,S,R,_,A;return((b=j.metadata)==null?void 0:b.interviewLevel)===2||((C=j.metadata)==null?void 0:C.interviewLevel)==="2"||((R=(S=j.metadata)==null?void 0:S.allAssignments)==null?void 0:R.includes(2))||((A=(_=j.metadata)==null?void 0:_.allAssignments)==null?void 0:A.includes("2"))||d(j,["DD Lead","ZBH"])}).map(m))),documentsUploaded:1},{id:6,name:"3rd Level Interview",status:h("3rd Level Interview"),date:t.level3InterviewDate,description:"NBH + DD Head evaluation",evaluators:Array.from(new Set((t.participants||[]).filter(j=>{var b,C,S,R,_,A;return((b=j.metadata)==null?void 0:b.interviewLevel)===3||((C=j.metadata)==null?void 0:C.interviewLevel)==="3"||((R=(S=j.metadata)==null?void 0:S.allAssignments)==null?void 0:R.includes(3))||((A=(_=j.metadata)==null?void 0:_.allAssignments)==null?void 0:A.includes("3"))||d(j,["NBH","DD Head"])}).map(m))),documentsUploaded:2},{id:7,name:"FDD",status:h("FDD"),date:t.fddDate,description:"Financial Due Diligence",documentsUploaded:5},{id:8,name:"LOI Approval",status:h("LOI Approval"),date:t.loiApprovalDate,description:"Letter of Intent approval",evaluators:Array.from(new Set((t.participants||[]).filter(j=>{var b,C,S;return((b=j.metadata)==null?void 0:b.stageCode)==="LOI_APPROVAL"||((S=(C=j.metadata)==null?void 0:C.allAssignments)==null?void 0:S.includes("LOI_APPROVAL"))}).map(m))),documentsUploaded:1},{id:9,name:"Security Deposit",status:p(),date:t.securityDetailsDate,description:"Security Deposit verification",documentsUploaded:3},{id:10,name:"LOI Issue",status:h("LOI Issue"),date:t.loiIssueDate,description:"Letter of Intent issued",isParallel:!0,branches:[{name:"LOI Documents",color:"green",stages:i.some(j=>j.stageCode==="LOI Issue")?i.filter(j=>j.stageCode==="LOI Issue").map((j,b)=>({id:`10a-${b}`,name:j.documentType,status:f(j.documentType)?"completed":"active",description:j.isMandatory?`Upload ${j.documentType} (Mandatory)`:`Upload ${j.documentType}`})):[{id:"10a-1",name:"Letter of Intent",status:f("Letter of Intent")||f("LOI")?"completed":"active",description:"Letter of Intent document"},{id:"10a-2",name:"Signed LOI",status:f("Signed LOI")||f("LOI Signed Copy")?"completed":"active",description:"Signed Letter of Intent"}]}]},{id:11,name:"Dealer Code Generation",status:h("Dealer Code Generation"),date:t.dealerCodeDate,description:"Dealer code generated and assigned",isParallel:!0,branches:[{name:"Architectural Work",color:"green",stages:[{id:"11a-1",name:"Architecture Assignment",status:t.architectureAssignedTo?"completed":t.status==="Architecture Team Assigned"?"active":"pending",description:"Assigned to architecture team"},{id:"11a-2",name:"Site Plan Blueprint",status:f("Architecture Blueprint")?"completed":t.architectureAssignedTo?"active":"pending",description:"Blueprints and site plans"},{id:"11a-3",name:"Architecture Work",status:t.architectureStatus==="COMPLETED"?"completed":t.architectureStatus==="IN_PROGRESS"||f("Architecture Blueprint")?"active":"pending",description:"Final architecture approval"}]},{name:"Statutory Documents",color:"green",stages:[{id:"11b-1",name:"GST",status:f("GST Certificate")||f("GST")?"completed":"active",description:"GST certificate"},{id:"11b-2",name:"PAN",status:f("PAN Card")||f("PAN")?"completed":"active",description:"PAN card"},{id:"11b-3",name:"Nodal Agreement",status:f("Nodal Agreement")?"completed":"active",description:"Nodal agreement document"},{id:"11b-4",name:"Cancelled Check",status:f("Cancelled Check")?"completed":"active",description:"Cancelled check copy"},{id:"11b-5",name:"Partnership Deed/LLP/MOA/AOA/COI",status:f("Partnership Deed/LLP/MOA/AOA/COI")||f("Partnership Deed")?"completed":"active",description:"Business entity documents"},{id:"11b-6",name:"Firm Registration Certificate",status:f("Firm Registration Certificate")||f("Firm Registration")?"completed":"active",description:"Firm registration certificate"},{id:"11b-7",name:"Rental agreement/ Lease agreement / Own/ Land agreement",status:f("Rental agreement/ Lease agreement / Own/ Land agreement")||f("Property Document")?"completed":"active",description:"Property agreement document"},{id:"11b-8",name:"Virtual Code",status:f("Virtual Code")||f("Virtual Code Confirmation")?"completed":"active",description:"Virtual code availability"},{id:"11b-9",name:"Domain ID",status:f("Domain ID")||f("Domain ID Setup")?"completed":"active",description:"Domain ID setup"},{id:"11b-10",name:"MSD Configuration",status:f("MSD Configuration")?"completed":"active",description:"Microsoft Dynamics configuration"},{id:"11b-11",name:"LOI Acknowledgement Copy",status:f("LOI Acknowledgement Copy")||f("LOI Acknowledgement")?"completed":"active",description:"LOI acknowledgement copy"}]}]},{id:12,name:"LOA",status:h("LOA"),isLocked:t.status==="LOA Pending"&&((w=a("FIRST_FILL"))==null?void 0:w.status)!=="Verified",lockMessage:"First Fill (₹15L) must be verified by Finance before LOA Approval.",evaluators:Array.from(new Set((t.participants||[]).filter(j=>{var b,C,S;return((b=j.metadata)==null?void 0:b.stageCode)==="LOA_APPROVAL"||((S=(C=j.metadata)==null?void 0:C.allAssignments)==null?void 0:S.includes("LOA_APPROVAL"))}).map(m))),description:"Letter of Authorization"},{id:13,name:"EOR Complete",status:h("EOR Complete"),description:"Essential Operating Requirements"},{id:14,name:"Inauguration",status:h("Inauguration"),description:"Dealership inauguration"},{id:15,name:"Dealership Active",status:h("Onboarded"),description:"Dealer profile active"}],u=[{id:1,item:"Sales Standards",completed:!1},{id:2,item:"Service & Spares",completed:!1},{id:3,item:"DMS infra",completed:!1},{id:4,item:"Manpower Training",completed:!1},{id:5,item:"Trade certificate with test ride bikes registration",completed:!1},{id:6,item:"GST certificate including Accessories & Apparels billing",completed:!1},{id:7,item:"Inventory Funding",completed:!1},{id:8,item:"Virtual code availability",completed:!1},{id:9,item:"Vendor payments",completed:!1},{id:10,item:"Details for website submission",completed:!1},{id:11,item:"Infra Insurance both Showroom and Service center",completed:!1},{id:12,item:"Auto ordering",completed:!1}],N=x.reduce((j,b)=>(j.push({name:b.name}),b.branches&&b.branches.forEach(C=>C.stages.forEach(S=>j.push({name:S.name,parentBranch:C.name}))),(b.name==="EOR In Progress"||b.name==="EOR Complete")&&((r==null?void 0:r.items)||u).forEach(C=>j.push({name:`EOR: ${C.description||C.item}`,parentBranch:"EOR"})),j),[]);return{processStages:x,eorChecklist:u,flattenedStages:N,getDocumentsForStage:j=>s.filter(b=>{var C;return b.stage===j||!b.stage&&((C=b.documentType)==null?void 0:C.toLowerCase().includes(j.toLowerCase().split(" ")[0]))})}}const ES=()=>{var bc;const{id:t}=vd(),s=tr(),{user:n}=In(yr=>yr.auth),r=t||"",a=()=>s(-1),[i,o]=g.useState(null);g.useEffect(()=>{r&&Zl.getBatchStatus([{entityType:"application",entityId:r}]).then(yr=>{yr!=null&&yr.success&&o(yr.data[`application:${r}`]??null)}).catch(()=>o(null))},[r]);const{application:d,loading:m,setLoading:f,documents:p,setDocuments:h,eorData:x,auditLogs:u,auditLoading:N,worknotes:v,deposits:w,paymentConfigs:j,refreshDocuments:b,fetchApplication:C,fetchEorData:S,getDeposit:R}=aV({applicationId:r}),_=x!=null&&x.items?x.items.filter(yr=>yr.isCompliant).length/x.items.length*100:0,A=yl(),{showFirmTypeModal:E,setShowFirmTypeModal:q,updatingFirmType:O,setUpdatingFirmType:D,tempFirmType:P,setTempFirmType:L,activeTab:$,setActiveTab:Y,showApproveModal:Z,setShowApproveModal:W,showOnboardModal:U,setShowOnboardModal:M,isOnboarding:z,setIsOnboarding:T,showRejectModal:I,setShowRejectModal:B,rejectionReason:G,setRejectionReason:K,scheduledInterviewParticipants:H,setScheduledInterviewParticipants:X,showScheduleModal:J,setShowScheduleModal:ae,showCancelInterviewModal:le,setShowCancelInterviewModal:xe,interviewIdToCancel:ce,setInterviewIdToCancel:ve,interviewToReschedule:Pe,setInterviewToReschedule:et,showKTMatrixModal:kt,setShowKTMatrixModal:vt,showLevel2FeedbackModal:ee,setShowLevel2FeedbackModal:ge,showLevel3FeedbackModal:ye,setShowLevel3FeedbackModal:Be,showDocumentsModal:$e,setShowDocumentsModal:dt,showAssignModal:st,setShowAssignModal:xt,selectedStage:Mt,setSelectedStage:It,interviewMode:he,setInterviewMode:pt,approvalRemark:ht,setApprovalRemark:_e,expandedBranches:Vt,setExpandedBranches:Pt,users:_s,setUsers:Ys,selectedUser:Bs,setSelectedUser:Ks,participantType:Qs,setParticipantType:Xs,interviewDate:$s,setInterviewDate:Q,interviewType:oe,setInterviewType:we,meetingLink:Oe,setMeetingLink:ke,location:je,setLocation:Ve,showUploadForm:Ge,setShowUploadForm:nt,uploadFile:Zt,setUploadFile:Jt,uploadDocType:lt,setUploadDocType:mt,approvalFile:Ds,setApprovalFile:ss,isUploading:Ae,setIsUploading:be,previewDoc:ut,setPreviewDoc:He,showPreviewModal:yt,setShowPreviewModal:ft,selectedInterviewerId:es,setSelectedInterviewerId:ts,isEditingStatutory:Cs,setIsEditingStatutory:Us,statutoryForm:rn,setStatutoryForm:Js,isSavingStatutory:an,setIsSavingStatutory:hn,interviews:De,setInterviews:bt,isScheduling:Te,setIsScheduling:ct,isCancellingInterview:tt,setIsCancellingInterview:jt,showAssignArchitectureModal:Ht,setShowAssignArchitectureModal:zt,architectureLeadId:fs,setArchitectureLeadId:qt,isAssigningArchitecture:As,setIsAssigningArchitecture:vs,showArchitectureStatusModal:cs,setShowArchitectureStatusModal:mn,architectureStatus:qs,setArchitectureStatus:ln,architectureRemarks:fn,setArchitectureRemarks:on,isUpdatingArchitecture:Ye,setIsUpdatingArchitecture:Ot,isAssigningParticipant:St,setIsAssigningParticipant:rt,documentConfigs:Ft,setDocumentConfigs:jn,fddAgencies:xn,setFddAgencies:qn,selectedAgencyId:En,setSelectedAgencyId:Hs,isAssigningAgency:Za,setIsAssigningAgency:Pa,showAssignFddModal:Ls,setShowAssignFddModal:nn,isApproving:ta,setIsApproving:sa,isRejecting:na,setIsRejecting:Ir,ktMatrixScores:Xn,setKtMatrixScores:zn,ktMatrixSelectedValues:Qt,setKtMatrixSelectedValues:Jn,ktMatrixRemarks:Rr,setKtMatrixRemarks:Wn,ktMatrixRecommendation:Er,setKtMatrixRecommendation:_n,isSubmittingKT:ur,setIsSubmittingKT:rs,selectedInterviewForFeedback:en,setSelectedInterviewForFeedback:va,showFddFinalizeModal:wi,setShowFddFinalizeModal:Si,showFddFlagModal:Mr,setShowFddFlagModal:Hr,fddAuditRecommendation:sr,setFddAuditRecommendation:ya,fddAuditFindings:Hi,setFddAuditFindings:bo,isFinalizingFdd:Oa,setIsFinalizingFdd:Cn,isFddFlagging:ba,setIsFddFlagging:Wi,level2Feedback:Wr,setLevel2Feedback:jo,level2Recommendation:Gi,setLevel2Recommendation:No,isSubmittingLevel2:Ci,setIsSubmittingLevel2:wl,level3Feedback:Sl,setLevel3Feedback:cn,level3Recommendation:ne,setLevel3Recommendation:re,isSubmittingLevel3:me,setIsSubmittingLevel3:pe,showFeedbackDetailsModal:Se,setShowFeedbackDetailsModal:ze,selectedEvaluationForView:Ue,setSelectedEvaluationForView:ot}=QU({initialTab:((bc=A.state)==null?void 0:bc.activeTab)||"questionnaire"}),ls=(v||[]).some(yr=>(yr.noteText||"").includes("FLAGGED:"))||(d==null?void 0:d.statutoryStatus)==="Flagged",{handleUpdateFirmType:Gt,handleEditStatutory:Lt,handleSaveStatutory:ws,fetchFddAgencies:gn,handleAssignAgency:nr}=iV({application:d,applicationId:r,tempFirmType:P,setUpdatingFirmType:D,setShowFirmTypeModal:q,setStatutoryForm:Js,setIsEditingStatutory:Us,setIsSavingStatutory:hn,statutoryForm:rn,setFddAgencies:qn,selectedAgencyId:En,setIsAssigningAgency:Pa,fetchApplication:C}),Bt=(n==null?void 0:n.roleCode)==="Super Admin"||(n==null?void 0:n.roleCode)==="DD Admin"||(n==null?void 0:n.role)==="Super Admin"||(n==null?void 0:n.role)==="DD Admin",Ss=(n==null?void 0:n.roleCode)==="Super Admin"||(n==null?void 0:n.roleCode)==="DD Admin"||(n==null?void 0:n.role)==="Super Admin"||(n==null?void 0:n.role)==="DD Admin"||(n==null?void 0:n.role)==="NBH"||(n==null?void 0:n.role)==="DD Head"||(n==null?void 0:n.roleCode)==="NBH"||(n==null?void 0:n.roleCode)==="DD_HEAD";g.useEffect(()=>{(async()=>{try{const El=await hs.getDocumentConfigs({limit:1e3}),hh=El.data||(Array.isArray(El)?El:[]);jn(hh)}catch(El){console.error("Failed to fetch document configs:",El)}})()},[jn]),g.useEffect(()=>{J&&d&&(d.status==="Shortlisted"||d.status==="Questionnaire Completed"?we("level1"):d.status==="Level 1 Approved"?we("level2"):(d.status==="Level 2 Approved"||d.status==="Level 2 Recommended")&&we("level3"))},[J,d==null?void 0:d.status,we]);const is=async()=>{if(r)try{const yr=await hs.getInterviews(r);bt(yr||[])}catch(yr){console.error("Failed to fetch interviews",yr)}};g.useEffect(()=>{is()},[r]);const{ktMatrixConfig:Mn,level2Config:_r,level3Config:Gn}=tV(),{handleKTMatrixChange:gr,calculateKTScore:Gr,handleSubmitKTMatrix:Qa,handleLevel2Change:vr,handleSubmitLevel2Feedback:wo,handleLevel3Change:Cl,handleSubmitLevel3Feedback:xc,ktCriteria:So,l2Fields:Al,l3Fields:Ki}=eV({ktMatrixScores:Xn,setKtMatrixScores:zn,setKtMatrixSelectedValues:Jn,ktMatrixRemarks:Rr,setKtMatrixRemarks:Wn,ktMatrixRecommendation:Er,setKtMatrixRecommendation:_n,selectedInterviewForFeedback:en,interviews:De,setIsSubmittingKT:rs,setShowKTMatrixModal:vt,level2Feedback:Wr,setLevel2Feedback:jo,level2Recommendation:Gi,setLevel2Recommendation:No,setIsSubmittingLevel2:wl,setShowLevel2FeedbackModal:ge,level3Feedback:Sl,setLevel3Feedback:cn,level3Recommendation:ne,setLevel3Recommendation:re,setIsSubmittingLevel3:pe,setShowLevel3FeedbackModal:Be,currentUser:n,fetchInterviews:is,fetchApplication:C,ktMatrixConfig:Mn,level2Config:_r,level3Config:Gn});g.useEffect(()=>{["documents","progress","fdd","eor"].includes($)&&r&&b(),$==="fdd"&&((n==null?void 0:n.role)==="DD Admin"||(n==null?void 0:n.role)==="Super Admin")&&gn()},[$,r,b,gn,n==null?void 0:n.role]);const{handleAddInterviewer:Xa,handleRemoveInterviewer:gc,maybeFetchUsersForModal:hr,handleScheduleInterview:vc,handleRescheduleInterview:La,handleConfirmCancelInterview:kl,handleUpload:Yi,handleApprove:Ia,handleReject:Ja,handleGenerateDealerCodes:Dl,handleAssignArchitecture:Zi,handleUpdateArchitectureStatus:Co,handleAddParticipant:oh,handleRetriggerEvaluators:Rl}=sV({application:d,applicationId:r,currentUser:n,interviews:De,approvalFile:Ds,approvalRemark:ht,rejectionReason:G,architectureLeadId:fs,architectureStatus:qs,architectureRemarks:fn,selectedUser:Bs,participantType:Qs,users:_s,interviewDate:$s,setInterviewDate:Q,interviewType:oe,setInterviewType:we,interviewMode:he,setInterviewMode:pt,meetingLink:Oe,setMeetingLink:ke,location:je,setLocation:Ve,scheduledInterviewParticipants:H,uploadFile:Zt,uploadDocType:lt,selectedStage:Mt,setIsApproving:sa,setShowApproveModal:W,setApprovalRemark:_e,setApprovalFile:ss,setIsRejecting:Ir,setShowRejectModal:B,setRejectionReason:K,setIsAssigningArchitecture:vs,setShowAssignArchitectureModal:zt,setIsUpdatingArchitecture:Ot,setShowArchitectureStatusModal:mn,setIsAssigningParticipant:rt,setSelectedUser:Ks,setShowAssignModal:xt,setLoading:f,setIsScheduling:ct,setShowScheduleModal:ae,setShowCancelInterviewModal:xe,interviewIdToCancel:ce,setInterviewIdToCancel:ve,interviewToReschedule:Pe,setInterviewToReschedule:et,setIsCancellingInterview:jt,setIsUploading:be,setShowUploadForm:nt,setUploadFile:Jt,setUploadDocType:mt,setDocuments:h,selectedInterviewerId:es,setSelectedInterviewerId:ts,setScheduledInterviewParticipants:X,setUsers:Ys,showScheduleModal:J,showAssignArchitectureModal:Ht,showAssignModal:st,fetchApplication:C,fetchInterviews:is,fetchEorData:S});if(g.useEffect(()=>{hr()},[J,Ht,st,oe,d==null?void 0:d.id,hr]),m&&!d)return e.jsx("div",{className:"flex items-center justify-center min-h-[60vh]",children:e.jsx(ns,{className:"w-10 h-10 animate-spin text-re-red"})});if(!d)return e.jsx("div",{className:"flex justify-center items-center h-96",children:"Application not found"});const{processStages:kp,eorChecklist:Dp,flattenedStages:Rp,getDocumentsForStage:ch}=lV({application:d,documents:p,interviews:De,eorData:x,getDeposit:R,documentConfigs:Ft}),{activeInterviewForUser:dh,currentUserEvaluation:Ao,hasSubmittedFeedback:ko,currentUserStageAction:Ep,isInterviewCompleted:yc,isInterviewActive:_p,permissions:uh}=ZU({application:d,interviews:De,currentUser:n,getDeposit:R,eorProgress:_}),Ed=()=>e.jsx(HU,{application:d,documents:p,setPreviewDoc:He,setShowPreviewModal:ft,setIsUploading:be,fetchApplication:C,refreshDocuments:b});return e.jsxs("div",{className:"space-y-6",children:[e.jsx(RU,{application:d,slaStatus:i,isNonResponsive:ls,isAdmin:Ss,onBack:a,onOpenWorknotes:()=>s(`/worknotes/application/${d.id}`,{state:{applicationName:d.name,registrationNumber:d.registrationNumber,participants:d.participants}})}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[e.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[e.jsx(IU,{application:d,canEditStatutory:Bt,isEditingStatutory:Cs,isSavingStatutory:an,statutoryForm:rn,onEditFirmType:()=>{L(d.constitutionType||""),q(!0)},onEditStatutory:Lt,onCancelEditStatutory:()=>Us(!1),onSaveStatutory:ws,onStatutoryFormChange:Js}),d.isShortlisted!==!1&&e.jsx($U,{application:d,activeTab:$,setActiveTab:Y,processStages:kp,documents:p,interviews:De,expandedBranches:Vt,setExpandedBranches:Pt,setSelectedStage:It,setShowDocumentsModal:dt,setShowUploadForm:nt,handleRetriggerEvaluators:Rl,handleRescheduleInterview:La,setSelectedEvaluationForView:ot,setShowFeedbackDetailsModal:ze,renderFddAuditContent:Ed,eorProgress:_,eorData:x,eorChecklist:Dp,setUploadDocType:mt,isAdmin:Ss,fetchApplication:C,fetchEorData:S,deposits:w,getDeposit:R,paymentConfigs:j,setPreviewDoc:He,setShowPreviewModal:ft,auditLoading:N,auditLogs:u,auditLogActionBadgeClass:WU})]}),e.jsx(qU,{application:d,permissions:uh,getDeposit:R,isNonResponsive:ls,isAdmin:Ss,currentUserStageAction:Ep,currentUserEvaluation:Ao,onOpenApproveModal:()=>W(!0),onOpenRejectModal:()=>B(!0),onOpenWorknote:()=>s(`/worknotes/application/${d.id}`,{state:{applicationName:d.name,registrationNumber:d.registrationNumber,participants:d.participants}}),onOpenScheduleModal:()=>ae(!0),currentUser:n,handleGenerateDealerCodes:Dl,onOpenAssignArchitectureModal:()=>zt(!0),onOpenAssignFdd:()=>{Hs(""),gn(),nn(!0)},showAssignFddModal:Ls,setShowAssignFddModal:nn,fddAgencies:xn,selectedAgencyId:En,setSelectedAgencyId:Hs,isAssigningAgency:Za,handleAssignAgency:async()=>{await nr(),nn(!1)},activeInterviewForUser:dh,hasSubmittedFeedback:ko,setSelectedInterviewForFeedback:va,setShowKTMatrixModal:vt,setShowLevel2FeedbackModal:ge,setShowLevel3FeedbackModal:Be,onGoToDashboard:()=>s("/dashboard"),showAssignModal:st,setShowAssignModal:xt,selectedUser:Bs,setSelectedUser:Ks,users:_s,participantType:Qs,setParticipantType:Xs,handleAddParticipant:oh,isAssigningParticipant:St}),e.jsx(zU,{application:d,fetchApplication:C,showApproveModal:Z,setShowApproveModal:W,approvalRemark:ht,setApprovalRemark:_e,setApprovalFile:ss,isApproving:ta,handleApprove:Ia,showOnboardModal:U,setShowOnboardModal:M,isOnboarding:z,setIsOnboarding:T,showRejectModal:I,setShowRejectModal:B,rejectionReason:G,setRejectionReason:K,isRejecting:na,handleReject:Ja,showScheduleModal:J,setShowScheduleModal:ae,showCancelInterviewModal:le,setShowCancelInterviewModal:xe,setInterviewIdToCancel:ve,isCancellingInterview:tt,handleConfirmCancelInterview:kl,interviewToReschedule:Pe,setInterviewToReschedule:et,interviewType:oe,setInterviewType:we,interviewMode:he,setInterviewMode:pt,interviewDate:$s,setInterviewDate:Q,meetingLink:Oe,setMeetingLink:ke,location:je,setLocation:Ve,isInterviewCompleted:yc,isInterviewActive:_p,users:_s,selectedInterviewerId:es,setSelectedInterviewerId:ts,handleAddInterviewer:Xa,scheduledInterviewParticipants:H,handleRemoveInterviewer:gc,isScheduling:Te,handleScheduleInterview:vc,showAssignArchitectureModal:Ht,setShowAssignArchitectureModal:zt,architectureLeadId:fs,setArchitectureLeadId:qt,isAssigningArchitecture:As,handleAssignArchitecture:Zi,showArchitectureStatusModal:cs,setShowArchitectureStatusModal:mn,architectureStatus:qs,setArchitectureStatus:ln,architectureRemarks:fn,setArchitectureRemarks:on,isUpdatingArchitecture:Ye,handleUpdateArchitectureStatus:Co}),e.jsx(UU,{application:d,ktCriteria:So,l2Fields:Al,l3Fields:Ki,showKTMatrixModal:kt,setShowKTMatrixModal:vt,ktMatrixSelectedValues:Qt,handleKTMatrixChange:gr,ktMatrixRemarks:Rr,setKtMatrixRemarks:Wn,ktMatrixRecommendation:Er,setKtMatrixRecommendation:_n,calculateKTScore:Gr,handleSubmitKTMatrix:Qa,isSubmittingKT:ur,showLevel2FeedbackModal:ee,setShowLevel2FeedbackModal:ge,level2Feedback:Wr,handleLevel2Change:vr,level2Recommendation:Gi,setLevel2Recommendation:No,handleSubmitLevel2Feedback:wo,isSubmittingLevel2:Ci,showFeedbackDetailsModal:Se,setShowFeedbackDetailsModal:ze,selectedEvaluationForView:Ue,selectedInterviewForFeedback:en,showLevel3FeedbackModal:ye,setShowLevel3FeedbackModal:Be,level3Feedback:Sl,handleLevel3Change:Cl,level3Recommendation:ne,setLevel3Recommendation:re,handleSubmitLevel3Feedback:xc,isSubmittingLevel3:me,showDocumentsModal:$e,setShowDocumentsModal:dt,showUploadForm:Ge,setShowUploadForm:nt,selectedStage:Mt,getDocumentsForStage:ch,setPreviewDoc:He,setShowPreviewModal:ft,flattenedStages:Rp,setSelectedStage:It,uploadDocType:lt,setUploadDocType:mt,setUploadFile:Jt,isUploading:Ae,handleUpload:Yi,uploadFile:Zt,documentConfigs:Ft,showPreviewModal:yt,previewDoc:ut,showFddFinalizeModal:wi,setShowFddFinalizeModal:Si,currentUser:n,fddAuditRecommendation:sr,setFddAuditRecommendation:ya,fddAuditFindings:Hi,setFddAuditFindings:bo,isFinalizingFdd:Oa,setIsFinalizingFdd:Cn,fetchApplication:C,showFddFlagModal:Mr,setShowFddFlagModal:Hr,isFddFlagging:ba,setIsFddFlagging:Wi,showFirmTypeModal:E,setShowFirmTypeModal:q,tempFirmType:P,setTempFirmType:L,updatingFirmType:O,handleUpdateFirmType:Gt})]})]})};function pc(t,s=!0){const[n,r]=g.useState({});return g.useEffect(()=>{if(!s||t.length===0){r({});return}Zl.getBatchStatus(t).then(i=>{i!=null&&i.success&&r(i.data)}).catch(()=>r({}))},[s,JSON.stringify(t.map(i=>`${i.entityType}:${i.entityId}`).sort())]),{byKey:n,get:(i,o)=>n[`${i}:${o}`]??null}}const Hg=t=>t.includes("Approved")||t.includes("Completed")?"bg-green-100 text-green-700 border-green-300":t.includes("Review")||t.includes("Pending")?"bg-yellow-100 text-yellow-700 border-yellow-300":t.includes("Rejected")?"bg-red-100 text-red-700 border-red-300":"bg-blue-100 text-blue-700 border-blue-300";function oV({onViewDetails:t}){const[s,n]=g.useState([]),[r,a]=g.useState(!0),[i,o]=g.useState(1),[d,m]=g.useState("all"),[f,p]=g.useState(null),h=10,x=async()=>{var b;a(!0);try{const S=(await Ee.getResignations({page:i,limit:h,status:d==="all"?void 0:d==="open"?"open":"Completed,Closed"})).data;S!=null&&S.success&&(n(S.requests||((b=S.resignations)==null?void 0:b.rows)||S.resignations||[]),p(S.meta))}catch(C){console.error("Error fetching resignations:",C),te.error("Failed to fetch resignation requests")}finally{a(!1)}};g.useEffect(()=>{x()},[i,d]);const u=b=>{m(b),o(1)},N=d==="open"?s:[],v=d==="completed"?s:[],w=s.map(b=>({entityType:"resignation",entityId:b.id})),{get:j}=pc(w,s.length>0);return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[e.jsxs(Le,{children:[e.jsxs(Qe,{className:"pb-3",children:[e.jsx(Xt,{children:"All Requests"}),e.jsx(Je,{className:"text-3xl",children:(f==null?void 0:f.total)||0})]}),e.jsx(Fe,{children:e.jsx("p",{className:"text-slate-600",children:"Total Requests"})})]}),e.jsxs(Le,{children:[e.jsxs(Qe,{className:"pb-3",children:[e.jsx(Xt,{children:"Open"}),e.jsx(Je,{className:"text-3xl text-yellow-600",children:d==="open"?(f==null?void 0:f.total)||0:"..."})]}),e.jsx(Fe,{children:e.jsx("p",{className:"text-slate-600",children:"Requires Your Action"})})]}),e.jsxs(Le,{children:[e.jsxs(Qe,{className:"pb-3",children:[e.jsx(Xt,{children:"Completed"}),e.jsx(Je,{className:"text-3xl text-green-600",children:d==="completed"?(f==null?void 0:f.total)||0:"..."})]}),e.jsx(Fe,{children:e.jsx("p",{className:"text-slate-600",children:"Finalized"})})]})]}),e.jsxs(Le,{children:[e.jsx(Qe,{children:e.jsx("div",{className:"flex items-center justify-between",children:e.jsxs("div",{children:[e.jsx(Je,{children:"Resignation Requests"}),e.jsxs(Xt,{children:["Track and manage dealer resignation requests",e.jsx("span",{className:"block mt-1 text-slate-500",children:"• Note: Resignation requests are initiated by the dealer or via ASM."})]})]})})}),e.jsx(Fe,{children:e.jsxs(Bn,{value:d,onValueChange:u,className:"w-full",children:[e.jsxs($n,{children:[e.jsx(Wt,{value:"all",children:"All Requests"}),e.jsx(Wt,{value:"open",children:"Open"}),e.jsx(Wt,{value:"completed",children:"Completed"})]}),e.jsx(Ut,{value:"all",className:"mt-6",children:e.jsx("div",{className:"space-y-4 text-center py-1",children:r?e.jsx("div",{className:"text-center py-12",children:"Loading requests..."}):s.length>0?e.jsxs(e.Fragment,{children:[s.map(b=>{var C,S,R,_,A,E,q,O,D,P,L;return e.jsx(Le,{className:"border-slate-200",children:e.jsx(Fe,{className:"pt-6",children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex items-start gap-4 flex-1",children:[e.jsx("div",{className:"p-3 bg-red-50 rounded-lg",children:e.jsx(Ns,{className:"w-6 h-6 text-re-red"})}),e.jsxs("div",{className:"flex-1 text-left",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx("h3",{className:"text-lg",children:b.resignationId}),e.jsx(Ce,{className:Hg(b.status),children:b.status}),e.jsx(kr,{status:j("resignation",b.id),compact:!0})]}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 text-sm",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Dealer Name"}),e.jsx("p",{children:((S=(C=b.dealer)==null?void 0:C.dealerProfile)==null?void 0:S.businessName)||((R=b.outlet)==null?void 0:R.name)||"N/A"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Dealer Code"}),e.jsx("p",{children:((E=(A=(_=b.dealer)==null?void 0:_.dealerProfile)==null?void 0:A.dealerCode)==null?void 0:E.dealerCode)||((q=b.outlet)==null?void 0:q.code)||"N/A"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Location"}),e.jsx("p",{children:((D=(O=b.dealer)==null?void 0:O.dealerProfile)==null?void 0:D.registeredAddress)||((P=b.outlet)!=null&&P.city&&((L=b.outlet)!=null&&L.state)?`${b.outlet.city}, ${b.outlet.state}`:"N/A")})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Type"}),e.jsx("p",{children:b.resignationType})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Reason"}),e.jsx("p",{className:"truncate max-w-[200px]",children:b.reason})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Current Stage"}),e.jsx("p",{children:b.currentStage})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Submitted On"}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(dr,{className:"w-4 h-4 text-slate-500"}),e.jsx("p",{children:Yt(b.submittedOn)})]})]})]})]})]}),e.jsxs(se,{size:"sm",variant:"outline",onClick:()=>t(b.id),className:"ml-4",children:[e.jsx(yn,{className:"w-4 h-4 mr-2"}),"View Details"]})]})})},b.id)}),f&&f.totalPages>1&&e.jsx("div",{className:"py-4 border-t flex justify-center",children:e.jsx(fo,{children:e.jsxs(po,{children:[e.jsx(Sn,{children:e.jsx(xo,{onClick:()=>o(b=>Math.max(1,b-1)),className:i===1?"pointer-events-none opacity-50":"cursor-pointer"})}),[...Array(f.totalPages)].map((b,C)=>{const S=C+1;return S===1||S===f.totalPages||S>=i-1&&S<=i+1?e.jsx(Sn,{children:e.jsx(Vi,{isActive:i===S,onClick:()=>o(S),className:"cursor-pointer",children:S})},S):S===2&&i>3||S===f.totalPages-1&&io(b=>Math.min(f.totalPages,b+1)),className:i===f.totalPages?"pointer-events-none opacity-50":"cursor-pointer"})})]})})})]}):e.jsx("div",{className:"text-center py-12 text-slate-500",children:e.jsx("p",{children:"No resignation requests found"})})})}),e.jsx(Ut,{value:"open",className:"mt-6",children:e.jsx("div",{className:"space-y-4",children:N.length>0?N.map(b=>{var C,S,R,_,A,E,q;return e.jsx(Le,{className:"border-slate-200",children:e.jsx(Fe,{className:"pt-6",children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex items-start gap-4 flex-1",children:[e.jsx("div",{className:"p-3 bg-yellow-100 rounded-lg",children:e.jsx(Ns,{className:"w-6 h-6 text-yellow-600"})}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx("h3",{className:"text-lg",children:b.resignationId}),e.jsx(Ce,{className:Hg(b.status),children:b.status}),e.jsx(kr,{status:j("resignation",b.id),compact:!0})]}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 text-sm",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Dealer Name"}),e.jsx("p",{children:((S=(C=b.dealer)==null?void 0:C.dealerProfile)==null?void 0:S.businessName)||((R=b.outlet)==null?void 0:R.name)||"N/A"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Location"}),e.jsx("p",{children:((A=(_=b.dealer)==null?void 0:_.dealerProfile)==null?void 0:A.registeredAddress)||((E=b.outlet)!=null&&E.city&&((q=b.outlet)!=null&&q.state)?`${b.outlet.city}, ${b.outlet.state}`:"N/A")})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Current Stage"}),e.jsx("p",{children:b.currentStage})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Submitted On"}),e.jsx("p",{children:Yt(b.submittedOn)})]})]})]})]}),e.jsxs(se,{size:"sm",variant:"outline",onClick:()=>t(b.id),className:"ml-4",children:[e.jsx(yn,{className:"w-4 h-4 mr-2"}),"View Details"]})]})})},b.id)}):e.jsxs("div",{className:"text-center py-12 text-slate-500",children:[e.jsx(Ns,{className:"w-12 h-12 mx-auto mb-4 text-slate-400"}),e.jsx("p",{children:"No requests requiring your action"})]})})}),e.jsx(Ut,{value:"completed",className:"mt-6",children:e.jsx("div",{className:"space-y-4",children:v.length>0?v.map(b=>{var C,S,R,_,A,E;return e.jsx(Le,{className:"border-slate-200",children:e.jsx(Fe,{className:"pt-6",children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex items-start gap-4 flex-1",children:[e.jsx("div",{className:"p-3 bg-green-100 rounded-lg",children:e.jsx(Ns,{className:"w-6 h-6 text-green-600"})}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx("h3",{className:"text-lg",children:b.resignationId}),e.jsx(Ce,{className:Hg(b.status),children:b.status}),e.jsx(kr,{status:j("resignation",b.id),compact:!0})]}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 text-sm",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Dealer Name"}),e.jsx("p",{children:((S=(C=b.dealer)==null?void 0:C.dealerProfile)==null?void 0:S.businessName)||((R=b.outlet)==null?void 0:R.name)||"N/A"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Location"}),e.jsx("p",{children:((A=(_=b.dealer)==null?void 0:_.dealerProfile)==null?void 0:A.registeredAddress)||((E=b.outlet)==null?void 0:E.city)||"N/A"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Final Stage"}),e.jsx("p",{children:b.currentStage})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Submitted On"}),e.jsx("p",{children:Yt(b.submittedOn)})]})]})]})]}),e.jsxs(se,{size:"sm",variant:"outline",onClick:()=>t(b.id),className:"ml-4",children:[e.jsx(yn,{className:"w-4 h-4 mr-2"}),"View Details"]})]})})},b.id)}):e.jsxs("div",{className:"text-center py-12 text-slate-500",children:[e.jsx(Ns,{className:"w-12 h-12 mx-auto mb-4 text-slate-400"}),e.jsx("p",{children:"No completed resignations to display"})]})})})]})})]})]})}const Pi="Last Working Day",_S="Proposed Last Working Day",Hc={AWAITING_FNF:"Awaiting F&F",AWAITING_FNF_LWD_PENDING:"Awaiting F&F (LWD Pending)"},Oi=pr.inProgress;function lj(t){if(!t)return"Pending";let s=t;return s=s.replace(/Personal Hearing/gi,"SCN Response Evaluation"),s=s.replace(/\(LWD Pending\)/gi,"(Last Working Day Pending)"),s=s.replace(/\bLWD\b/g,Pi),s}const cV=t=>{switch(t){case"Critical":return"bg-red-100 text-red-700 border-red-300";case"High":return"bg-orange-100 text-orange-700 border-orange-300";case"Medium":return"bg-yellow-100 text-yellow-700 border-yellow-300";case"Low":return"bg-blue-100 text-blue-700 border-blue-300";default:return"bg-slate-100 text-slate-700 border-slate-300"}},Wg=t=>t.includes("Approved")||t.includes("Terminated")?"bg-green-100 text-green-700 border-green-300":t.includes("Review")||t.includes("Pending")?"bg-yellow-100 text-yellow-700 border-yellow-300":t.includes("Rejected")?"bg-red-100 text-red-700 border-red-300":"bg-blue-100 text-blue-700 border-blue-300",iu=lj;function dV({currentUser:t,onViewDetails:s}){const[n,r]=g.useState(!1),[a,i]=g.useState([]),[o,d]=g.useState(""),[m,f]=g.useState(!1),[p,h]=g.useState(""),[x,u]=g.useState(null),[N,v]=g.useState([]),[w,j]=g.useState({}),[b,C]=g.useState(!0),[S,R]=g.useState(1),[_,A]=g.useState(null),[E,q]=g.useState("all"),O=10,[D,P]=g.useState({terminationCategory:"",reason:"",proposedLwd:"",comments:"",documents:[]}),L=async()=>{C(!0);try{const ae=(await Ee.getTerminations({page:S,limit:O,status:E==="all"?void 0:E})).data;if(ae!=null&&ae.success){v(ae.terminations),A(ae.meta);const le=ae.terminations||[];le.length?Zl.getBatchStatus(le.map(xe=>({entityType:"termination",entityId:xe.id}))).then(xe=>{if(xe!=null&&xe.success){const ce={};le.forEach(ve=>{ce[ve.id]=xe.data[`termination:${ve.id}`]??null}),j(ce)}}).catch(()=>j({})):j({})}}catch(J){console.error("Error fetching terminations:",J),te.error("Failed to fetch termination requests")}finally{C(!1)}};g.useEffect(()=>{L()},[S,E]);const $=J=>{q(J),R(1)};g.useEffect(()=>{if(!n||!K)return;let J=!1;return(async()=>{try{f(!0);const le=(await Ee.getDealers({onboarded:"true",activeOnly:"true"})).data;if(!J&&(le!=null&&le.success)){const xe=(Array.isArray(le.data)?le.data:[]).filter(ce=>{var et,kt;const ve=String((ce==null?void 0:ce.status)||"").toLowerCase(),Pe=String(((et=ce==null?void 0:ce.user)==null?void 0:et.status)||"").toLowerCase();return ve==="active"&&((kt=ce==null?void 0:ce.user)==null?void 0:kt.isActive)&&Pe==="active"});i(xe)}}catch(ae){J||(console.error("Error fetching dealers:",ae),te.error("Failed to load dealer list"))}finally{J||f(!1)}})(),()=>{J=!0}},[n]);const Y=J=>{var ae,le,xe,ce,ve,Pe;return{id:J.id,dealerId:J.id,dealerCode:((ae=J.dealerCode)==null?void 0:ae.dealerCode)||"",legalName:J.legalName||"N/A",businessName:J.businessName||"N/A",gstNumber:J.gstNumber||"N/A",address:J.registeredAddress||((le=J.application)==null?void 0:le.preferredLocation)||"N/A",city:((xe=J.application)==null?void 0:xe.city)||"N/A",state:((ce=J.application)==null?void 0:ce.state)||"N/A",email:((ve=J.user)==null?void 0:ve.email)||"N/A",phoneNumber:((Pe=J.user)==null?void 0:Pe.mobileNumber)||"N/A"}},Z=J=>{d(J);const ae=a.find(xe=>String(xe.id)===String(J));if(!ae){h(""),u(null);return}const le=Y(ae);h(le.dealerCode),u(le)},W=J=>{h(J);const ae=J.trim().toLowerCase();if(!ae){d(""),u(null);return}const le=a.find(xe=>{var ce;return String(((ce=xe.dealerCode)==null?void 0:ce.dealerCode)||"").toLowerCase()===ae});if(!le){d(""),u(null);return}d(String(le.id)),u(Y(le))},M=!((t==null?void 0:t.role)==="Super Admin"),z=J=>{const ae=J.name.toLowerCase();return ae.endsWith(".ppt")||ae.endsWith(".pptx")},T=(J,ae)=>{!J||J.length===0||(P(le=>{const xe=le.documents,ce=new Set(xe.map(Pe=>`${Pe.name}::${Pe.size}`)),ve=[];return Array.from(J).forEach(Pe=>{const et=`${Pe.name}::${Pe.size}`;ce.has(et)||(ce.add(et),ve.push(Pe))}),{...le,documents:[...xe,...ve]}}),ae&&(ae.value=""))},I=J=>{P({...D,documents:D.documents.filter((ae,le)=>le!==J)})},B=async J=>{var ae,le;if(J.preventDefault(),!x){te.error("Please select a dealer");return}if(M){if(D.documents.length===0){te.error("Please upload at least one Presentation (.ppt or .pptx)");return}if(!D.documents.some(z)){te.error("At least one PowerPoint file (.ppt or .pptx) is required");return}}try{const xe=x.dealerId||x.id;if(!xe){te.error("Dealer record not found for the selected dealer");return}let ce;if(D.documents.length>0){const et=new FormData;et.append("dealerId",String(xe)),et.append("category",D.terminationCategory),et.append("reason",D.reason),et.append("proposedLwd",D.proposedLwd),et.append("comments",D.comments),D.documents.forEach(kt=>et.append("files",kt)),ce=et}else ce={dealerId:xe,category:D.terminationCategory,reason:D.reason,proposedLwd:D.proposedLwd,comments:D.comments};const Pe=(await Ee.createTermination(ce)).data;Pe!=null&&Pe.success&&(te.success(D.documents.length>0?"Termination request and documents submitted":"Termination request submitted successfully"),r(!1),L(),d(""),h(""),i([]),u(null),P({terminationCategory:"",reason:"",proposedLwd:"",comments:"",documents:[]}))}catch(xe){console.error("Error submitting termination:",xe),te.error(((le=(ae=xe.response)==null?void 0:ae.data)==null?void 0:le.message)||"Failed to submit termination request")}},G=["DD Lead","ASM","DD Admin","DD AM","Super Admin"],K=(t==null?void 0:t.role)&&G.includes(t.role),H=E==="open"||E==="all"?N:[],X=E==="completed"||E==="all"?N:[];return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[e.jsxs(Le,{children:[e.jsxs(Qe,{className:"pb-3",children:[e.jsx(Xt,{children:"All Cases"}),e.jsx(Je,{className:"text-3xl",children:(_==null?void 0:_.total)||0})]}),e.jsx(Fe,{children:e.jsx("p",{className:"text-slate-600",children:"Total Cases"})})]}),e.jsxs(Le,{children:[e.jsxs(Qe,{className:"pb-3",children:[e.jsx(Xt,{children:"Open"}),e.jsx(Je,{className:"text-3xl text-orange-600",children:E==="open"?(_==null?void 0:_.total)||0:"..."})]}),e.jsx(Fe,{children:e.jsx("p",{className:"text-slate-600",children:"Requires Your Action"})})]}),e.jsxs(Le,{children:[e.jsxs(Qe,{className:"pb-3",children:[e.jsx(Xt,{children:"Completed"}),e.jsx(Je,{className:"text-3xl text-green-600",children:E==="completed"?(_==null?void 0:_.total)||0:"..."})]}),e.jsx(Fe,{children:e.jsx("p",{className:"text-slate-600",children:"Finalized"})})]})]}),e.jsxs(Le,{children:[e.jsx(Qe,{children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(Je,{children:"Termination Requests"}),e.jsx(Xt,{children:"Manage dealer termination proceedings and legal compliance"})]}),K&&e.jsxs(ds,{open:n,onOpenChange:r,children:[e.jsx(co,{asChild:!0,children:e.jsxs(se,{className:"bg-red-600 hover:bg-red-700",children:[e.jsx(An,{className:"w-4 h-4 mr-2"}),"Create Termination Request"]})}),e.jsxs(os,{className:"max-w-4xl max-h-[90vh] overflow-y-auto",children:[e.jsxs(xs,{children:[e.jsx(ms,{children:"Create Termination Request"}),e.jsx(bs,{children:"Fill in the details to create a new termination request"})]}),e.jsxs("form",{onSubmit:B,className:"space-y-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{children:"Select Dealer *"}),e.jsxs(Dt,{value:o,onValueChange:Z,disabled:m,children:[e.jsx(Et,{children:e.jsx(Rt,{placeholder:m?"Loading dealers...":"Select dealer"})}),e.jsx(_t,{children:a.map(J=>{var ae;return e.jsxs(Me,{value:String(J.id),children:[J.legalName||J.businessName||"Unnamed Dealer"," - ",((ae=J.dealerCode)==null?void 0:ae.dealerCode)||"No Code"]},J.id)})})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{htmlFor:"dealerCode",children:"Dealer Code *"}),e.jsx(at,{id:"dealerCode",value:p,onChange:J=>W(J.target.value),placeholder:"Type dealer code to auto-select",required:!0})]}),x&&e.jsxs("div",{className:"grid grid-cols-2 gap-4 p-4 bg-slate-50 rounded-lg",children:[e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Dealer Name (Legal)"}),e.jsx("p",{children:x.legalName||"N/A"})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Business Name"}),e.jsx("p",{children:x.businessName||"N/A"})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"GST"}),e.jsx("p",{children:x.gstNumber||"N/A"})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Address"}),e.jsx("p",{children:x.address})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"City/State"}),e.jsxs("p",{children:[x.city,", ",x.state]})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Dealer Code"}),e.jsx("p",{children:x.dealerCode||"N/A"})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Contact"}),e.jsxs("p",{children:[x.email," / ",x.phoneNumber]})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{children:"Termination Category *"}),e.jsxs(Dt,{value:D.terminationCategory,onValueChange:J=>P({...D,terminationCategory:J}),children:[e.jsx(Et,{children:e.jsx(Rt,{placeholder:"Select termination category"})}),e.jsxs(_t,{children:[e.jsx(Me,{value:"Working Capital",children:"Working Capital"}),e.jsx(Me,{value:"Performance Issues",children:"Performance Issues"}),e.jsx(Me,{value:"Unethical Practice",children:"Unethical Practice"}),e.jsx(Me,{value:"Unforeseen Circumstances",children:"Unforeseen Circumstances"}),e.jsx(Me,{value:"Others",children:"Others"})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs(de,{children:[_S," *"]}),e.jsx(at,{type:"date",value:D.proposedLwd,onChange:J=>P({...D,proposedLwd:J.target.value}),required:!0})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{htmlFor:"reason",children:"Termination Reason *"}),e.jsx(at,{id:"reason",value:D.reason,onChange:J=>P({...D,reason:J.target.value}),placeholder:"Primary reason for termination",required:!0})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{htmlFor:"comments",children:"Additional Comments *"}),e.jsx(Ws,{id:"comments",value:D.comments,onChange:J=>P({...D,comments:J.target.value}),placeholder:"Detailed observations and justification",rows:4,required:!0})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{htmlFor:"documents",children:M?"Upload Documents *":"Upload Supporting Documents"}),e.jsx(at,{id:"documents",type:"file",multiple:!0,accept:".ppt,.pptx,.pdf,.doc,.docx,.xls,.xlsx,.jpg,.jpeg,.png",onChange:J=>T(J.target.files,J.currentTarget),required:M&&D.documents.length===0}),M&&e.jsx("p",{className:"text-xs text-slate-500",children:"At least one PowerPoint (.ppt / .pptx) is mandatory. You can also attach MOM, dealer commitments, and other supporting files (PDF / DOC / XLS / image)."}),D.documents.length>0&&e.jsx("div",{className:"border rounded-md divide-y bg-slate-50",children:D.documents.map((J,ae)=>e.jsxs("div",{className:"flex items-center justify-between px-3 py-2 text-sm",children:[e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[e.jsx("span",{className:"truncate",children:J.name}),z(J)&&e.jsx(Ce,{className:"bg-blue-100 text-blue-700 border-blue-300",children:"Presentation"})]}),e.jsx(se,{type:"button",variant:"ghost",size:"sm",onClick:()=>I(ae),className:"text-red-600 hover:text-red-700",children:"Remove"})]},`${J.name}-${ae}`))})]}),e.jsxs(bn,{children:[e.jsx(se,{type:"button",variant:"outline",onClick:()=>r(!1),children:"Cancel"}),e.jsx(se,{type:"submit",className:"bg-red-600 hover:bg-red-700",children:"Submit Request"})]})]})]})]})]})}),e.jsxs(Fe,{children:[e.jsxs(Bn,{value:E,onValueChange:$,className:"w-full",children:[e.jsxs($n,{children:[e.jsx(Wt,{value:"all",children:"All Cases"}),e.jsx(Wt,{value:"open",children:"Open"}),e.jsx(Wt,{value:"completed",children:"Completed"})]}),e.jsx(Ut,{value:"all",className:"mt-6",children:e.jsx("div",{className:"space-y-4",children:b?e.jsx("div",{className:"text-center py-12",children:"Loading requests..."}):N.length>0?N.map(J=>{var ae,le,xe,ce;return e.jsx(Le,{className:"border-slate-200",children:e.jsx(Fe,{className:"pt-6",children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex items-start gap-4 flex-1",children:[e.jsx("div",{className:"p-3 bg-red-100 rounded-lg",children:e.jsx(mi,{className:"w-6 h-6 text-red-600"})}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx("h3",{className:"text-lg font-bold",children:J.requestId||((le=(ae=J.dealer)==null?void 0:ae.dealerCode)==null?void 0:le.code)||"N/A"}),e.jsx(Ce,{className:cV(J.severity||"Medium"),children:J.severity||"Normal"}),e.jsx(Ce,{className:Wg(J.status),children:iu(J.status)}),e.jsx(kr,{status:w[J.id],compact:!0})]}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 text-sm",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Dealer Name"}),e.jsx("p",{children:((xe=J.dealer)==null?void 0:xe.businessName)||"N/A"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Location"}),e.jsx("p",{children:((ce=J.dealer)==null?void 0:ce.registeredAddress)||"N/A"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Category"}),e.jsx("p",{children:J.category})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Current Stage"}),e.jsx("p",{children:iu(J.currentStage)})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:_S}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(dr,{className:"w-4 h-4 text-slate-500"}),e.jsx("p",{children:J.proposedLwd})]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Submitted On"}),e.jsx("p",{children:Yt(J.createdAt)})]})]})]})]}),e.jsxs(se,{size:"sm",variant:"outline",onClick:()=>s(J.id),className:"ml-4",children:[e.jsx(yn,{className:"w-4 h-4 mr-2"}),"View Details"]})]})})},J.id)}):e.jsx("div",{className:"text-center py-12 text-slate-500",children:e.jsx("p",{children:"No termination requests found"})})})}),e.jsx(Ut,{value:"open",className:"mt-6",children:e.jsx("div",{className:"space-y-4",children:H.length>0?H.map(J=>{var ae,le,xe;return e.jsx(Le,{className:"border-slate-200",children:e.jsx(Fe,{className:"pt-6",children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex items-start gap-4 flex-1",children:[e.jsx("div",{className:"p-3 bg-orange-100 rounded-lg",children:e.jsx(Ha,{className:"w-6 h-6 text-orange-600"})}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx("h3",{className:"text-lg font-bold",children:J.requestId||((le=(ae=J.dealer)==null?void 0:ae.dealerCode)==null?void 0:le.code)||"N/A"}),e.jsx(Ce,{className:Wg(J.status),children:iu(J.status)}),e.jsx(kr,{status:w[J.id],compact:!0})]}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 text-sm",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Dealer Name"}),e.jsx("p",{children:(xe=J.dealer)==null?void 0:xe.businessName})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Reason"}),e.jsx("p",{className:"truncate",children:J.reason})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Current Stage"}),e.jsx("p",{children:iu(J.currentStage)})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Submitted On"}),e.jsx("p",{children:Yt(J.createdAt)})]})]})]})]}),e.jsxs(se,{size:"sm",variant:"outline",onClick:()=>s(J.id),className:"ml-4",children:[e.jsx(yn,{className:"w-4 h-4 mr-2"}),"View Details"]})]})})},J.id)}):e.jsxs("div",{className:"text-center py-12 text-slate-500",children:[e.jsx(mi,{className:"w-12 h-12 mx-auto mb-4 text-slate-400"}),e.jsx("p",{children:"No requests requiring your action"})]})})}),e.jsx(Ut,{value:"completed",className:"mt-6",children:e.jsx("div",{className:"space-y-4",children:X.length>0?X.map(J=>{var ae,le,xe;return e.jsx(Le,{className:"border-slate-200",children:e.jsx(Fe,{className:"pt-6",children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex items-start gap-4 flex-1",children:[e.jsx("div",{className:"p-3 bg-green-100 rounded-lg",children:e.jsx(mi,{className:"w-6 h-6 text-green-600"})}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx("h3",{className:"text-lg font-bold",children:J.requestId||((le=(ae=J.dealer)==null?void 0:ae.dealerCode)==null?void 0:le.code)||"N/A"}),e.jsx(Ce,{className:Wg(J.status),children:iu(J.status)}),e.jsx(kr,{status:w[J.id],compact:!0})]}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 text-sm",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Dealer Name"}),e.jsx("p",{children:(xe=J.dealer)==null?void 0:xe.businessName})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Closed On"}),e.jsx("p",{children:Yt(J.updatedAt)})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Termination Category"}),e.jsx("p",{children:J.category})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:Pi}),e.jsx("p",{children:J.proposedLwd})]})]})]})]}),e.jsxs(se,{size:"sm",variant:"outline",onClick:()=>s(J.id),className:"ml-4",children:[e.jsx(yn,{className:"w-4 h-4 mr-2"}),"View Details"]})]})})},J.id)}):e.jsxs("div",{className:"text-center py-12 text-slate-500",children:[e.jsx(mi,{className:"w-12 h-12 mx-auto mb-4 text-slate-400"}),e.jsx("p",{children:"No completed terminations to display"})]})})})]}),_&&_.totalPages>1&&e.jsx("div",{className:"py-4 border-t flex justify-center bg-white rounded-b-lg",children:e.jsx(fo,{children:e.jsxs(po,{children:[e.jsx(Sn,{children:e.jsx(xo,{onClick:()=>R(J=>Math.max(1,J-1)),className:S===1?"pointer-events-none opacity-50":"cursor-pointer"})}),[...Array(_.totalPages)].map((J,ae)=>{const le=ae+1;return le===1||le===_.totalPages||le>=S-1&&le<=S+1?e.jsx(Sn,{children:e.jsx(Vi,{isActive:S===le,onClick:()=>R(le),className:"cursor-pointer",children:le})},le):le===2&&S>3||le===_.totalPages-1&&S<_.totalPages-2?e.jsx(Sn,{children:e.jsx(vo,{})},le):null}),e.jsx(Sn,{children:e.jsx(go,{onClick:()=>R(J=>Math.min(_.totalPages,J+1)),className:S===_.totalPages?"pointer-events-none opacity-50":"cursor-pointer"})})]})})})]})]})]})}const lu=t=>{switch(t){case"Initiated":return"bg-blue-100 text-blue-700 border-blue-300";case"DD Clearance":case"Legal Clearance":return"bg-yellow-100 text-yellow-700 border-yellow-300";case"Finance Approval":case"Calculated":return"bg-orange-100 text-orange-700 border-orange-300";case"Completed":case"Settled":return"bg-green-100 text-green-700 border-green-300";default:return"bg-slate-100 text-slate-700 border-slate-300"}},ou=t=>t==="Resignation"?"bg-red-50 text-re-red-hover border-red-300":"bg-red-100 text-red-700 border-red-300";function uV({currentUser:t,onViewDetails:s}){const[n,r]=g.useState([]),[a,i]=g.useState(!0);g.useEffect(()=>{o()},[]);const o=async()=>{try{i(!0);const N=(await Ee.getFnFSettlements()).data;N.success&&r(N.settlements||[])}catch(u){console.error("Fetch settlements error:",u),te.error("Failed to fetch settlement cases")}finally{i(!1)}};if(a)return e.jsx("div",{className:"flex items-center justify-center p-12",children:e.jsx(ns,{className:"w-8 h-8 animate-spin text-blue-600"})});const d=u=>{var N,v,w,j,b,C,S,R,_,A,E,q,O,D,P,L;return{id:u.id,caseNumber:u.settlementId||((N=u.resignation)==null?void 0:N.resignationId)||((v=u.terminationRequest)==null?void 0:v.requestId)||u.id.substring(0,8).toUpperCase(),status:u.status,requestType:u.resignationId?"Resignation":"Termination",dealerName:((j=(w=u.outlet)==null?void 0:w.dealer)==null?void 0:j.fullName)||((b=u.dealer)==null?void 0:b.legalName)||((C=u.dealer)==null?void 0:C.businessName)||((S=u.dealer)==null?void 0:S.fullName)||"N/A",dealerCode:((R=u.outlet)==null?void 0:R.code)||((A=(_=u.dealer)==null?void 0:_.dealerCode)==null?void 0:A.dealerCode)||"N/A",dealershipName:((E=u.outlet)==null?void 0:E.name)||"N/A",location:((q=u.outlet)==null?void 0:q.city)||((O=u.outlet)==null?void 0:O.location)||"N/A",originalRequestId:((D=u.resignation)==null?void 0:D.resignationId)||((P=u.terminationRequest)==null?void 0:P.requestId)||((L=u.terminationRequest)==null?void 0:L.id)||"N/A",submittedOn:Yt(u.createdAt),financeReportStatus:u.status==="Calculated"||u.status==="Settled"?"Completed":"Pending",totalRecoveryAmount:parseFloat(u.totalReceivables)||0,totalPayableAmount:parseFloat(u.totalPayables)||0,completedOn:u.settlementDate?Yt(u.settlementDate):null,departmentResponses:u.lineItems||[]}},m=n.map(d),f=m.filter(u=>u.status==="Initiated"),p=m.filter(u=>u.status==="DD Clearance"||u.status==="Legal Clearance"),h=m.filter(u=>u.status==="Finance Approval"||u.status==="Calculated"),x=m.filter(u=>u.status==="Completed"||u.status==="Settled");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-5 gap-4",children:[e.jsxs(Le,{children:[e.jsxs(Qe,{className:"pb-3",children:[e.jsx(Xt,{children:"Initiated"}),e.jsx(Je,{className:"text-3xl text-blue-600",children:f.length})]}),e.jsx(Fe,{children:e.jsx("p",{className:"text-slate-600",children:"Newly created"})})]}),e.jsxs(Le,{children:[e.jsxs(Qe,{className:"pb-3",children:[e.jsx(Xt,{children:"Clearance"}),e.jsx(Je,{className:"text-3xl text-yellow-600",children:p.length})]}),e.jsx(Fe,{children:e.jsx("p",{className:"text-slate-600",children:"Department / legal stage"})})]}),e.jsxs(Le,{children:[e.jsxs(Qe,{className:"pb-3",children:[e.jsx(Xt,{children:"Finance Approval"}),e.jsx(Je,{className:"text-3xl text-orange-600",children:h.length})]}),e.jsx(Fe,{children:e.jsx("p",{className:"text-slate-600",children:"Ready for finance review"})})]}),e.jsxs(Le,{children:[e.jsxs(Qe,{className:"pb-3",children:[e.jsx(Xt,{children:"Completed"}),e.jsx(Je,{className:"text-3xl text-green-600",children:m.filter(u=>u.status==="Completed"||u.status==="Settled").length})]}),e.jsx(Fe,{children:e.jsx("p",{className:"text-slate-600",children:"Finalized"})})]}),e.jsxs(Le,{children:[e.jsxs(Qe,{className:"pb-3",children:[e.jsx(Xt,{children:"All Cases"}),e.jsx(Je,{className:"text-3xl",children:m.length})]}),e.jsx(Fe,{children:e.jsx("p",{className:"text-slate-600",children:"Total"})})]})]}),e.jsxs(Le,{children:[e.jsxs(Qe,{children:[e.jsx(Je,{children:"Full & Final Settlement Cases"}),e.jsxs(Xt,{children:["Manage dealer exit dues clearance and settlement",t&&` • Current Role: ${t.role}`]})]}),e.jsx(Fe,{children:e.jsxs(Bn,{defaultValue:"all",className:"w-full",children:[e.jsxs($n,{children:[e.jsx(Wt,{value:"all",children:"All Cases"}),e.jsx(Wt,{value:"initiated",children:"Initiated"}),e.jsx(Wt,{value:"clearance",children:"Clearance"}),e.jsx(Wt,{value:"finance",children:"Finance Approval"}),e.jsx(Wt,{value:"completed",children:"Completed"})]}),e.jsx(Ut,{value:"initiated",className:"mt-6",children:e.jsxs("div",{className:"space-y-4",children:[f.map(u=>e.jsx(Le,{className:"border-slate-200",children:e.jsx(Fe,{className:"pt-6",children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex items-start gap-4 flex-1",children:[e.jsx("div",{className:"p-3 bg-blue-100 rounded-lg",children:e.jsx(hu,{className:"w-6 h-6 text-blue-600"})}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx("h3",{className:"text-lg",children:u.caseNumber}),e.jsx(Ce,{className:lu(u.status),children:u.status}),e.jsx(Ce,{className:ou(u.requestType),children:u.requestType})]}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 text-sm",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Dealer Name"}),e.jsx("p",{children:u.dealerName})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Dealer Code"}),e.jsx("p",{children:u.dealerCode})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Dealership Name"}),e.jsx("p",{children:u.dealershipName})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Location"}),e.jsx("p",{children:u.location})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Original Request ID"}),e.jsx("p",{children:u.originalRequestId})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Submitted On"}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(dr,{className:"w-4 h-4 text-slate-500"}),e.jsx("p",{children:u.submittedOn})]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Finance Report"}),e.jsx("p",{children:u.financeReportStatus})]})]})]})]}),e.jsx("div",{className:"flex items-center gap-2 ml-4",children:e.jsxs(se,{size:"sm",variant:"outline",onClick:()=>s(u.id),children:[e.jsx(yn,{className:"w-4 h-4 mr-2"}),"View Details"]})})]})})},u.id)),f.length===0&&e.jsxs("div",{className:"text-center py-12 text-slate-500",children:[e.jsx(hu,{className:"w-12 h-12 mx-auto mb-4 text-slate-400"}),e.jsx("p",{children:"No initiated cases to display"})]})]})}),e.jsx(Ut,{value:"all",className:"mt-6",children:e.jsx("div",{className:"space-y-4",children:m.map(u=>e.jsx(Le,{className:"border-slate-200",children:e.jsx(Fe,{className:"pt-6",children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex items-start gap-4 flex-1",children:[e.jsx("div",{className:`p-3 rounded-lg ${u.status==="Initiated"?"bg-blue-100":u.status==="DD Clearance"||u.status==="Legal Clearance"?"bg-yellow-100":u.status==="Finance Approval"||u.status==="Calculated"?"bg-orange-100":"bg-green-100"}`,children:e.jsx(ka,{className:`w-6 h-6 ${u.status==="Initiated"?"text-blue-600":u.status==="DD Clearance"||u.status==="Legal Clearance"?"text-yellow-600":u.status==="Finance Approval"||u.status==="Calculated"?"text-orange-600":"text-green-600"}`})}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx("h3",{className:"text-lg",children:u.caseNumber}),e.jsx(Ce,{className:lu(u.status),children:u.status}),e.jsx(Ce,{className:ou(u.requestType),children:u.requestType})]}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 text-sm",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Dealer Name"}),e.jsx("p",{children:u.dealerName})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Dealership Name"}),e.jsx("p",{children:u.dealershipName})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Location"}),e.jsx("p",{children:u.location})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Submitted On"}),e.jsx("p",{children:u.submittedOn})]})]})]})]}),e.jsx("div",{className:"flex items-center gap-2 ml-4",children:e.jsxs(se,{size:"sm",variant:"outline",onClick:()=>s(u.id),children:[e.jsx(yn,{className:"w-4 h-4 mr-2"}),"View Details"]})})]})})},u.id))})}),e.jsx(Ut,{value:"clearance",className:"mt-6",children:e.jsxs("div",{className:"space-y-4",children:[p.map(u=>e.jsx(Le,{className:"border-slate-200",children:e.jsx(Fe,{className:"pt-6",children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex items-start gap-4 flex-1",children:[e.jsx("div",{className:"p-3 bg-yellow-100 rounded-lg",children:e.jsx(ka,{className:"w-6 h-6 text-yellow-600"})}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx("h3",{className:"text-lg",children:u.caseNumber}),e.jsx(Ce,{className:lu(u.status),children:u.status}),e.jsx(Ce,{className:ou(u.requestType),children:u.requestType})]}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4 text-sm",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Dealer Name"}),e.jsx("p",{children:u.dealerName})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Departments Responded"}),e.jsxs("p",{children:[u.departmentResponses.filter(N=>N.status!=="Pending").length," / ",u.departmentResponses.length]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Submitted On"}),e.jsx("p",{children:u.submittedOn})]})]})]})]}),e.jsxs(se,{size:"sm",variant:"outline",onClick:()=>s(u.id),className:"ml-4",children:[e.jsx(yn,{className:"w-4 h-4 mr-2"}),"View Details"]})]})})},u.id)),p.length===0&&e.jsxs("div",{className:"text-center py-12 text-slate-500",children:[e.jsx(ka,{className:"w-12 h-12 mx-auto mb-4 text-slate-400"}),e.jsx("p",{children:"No clearance-stage cases"})]})]})}),e.jsx(Ut,{value:"finance",className:"mt-6",children:e.jsxs("div",{className:"space-y-4",children:[h.map(u=>{var N,v;return e.jsx(Le,{className:"border-slate-200",children:e.jsx(Fe,{className:"pt-6",children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex items-start gap-4 flex-1",children:[e.jsx("div",{className:"p-3 bg-orange-100 rounded-lg",children:e.jsx(ka,{className:"w-6 h-6 text-orange-600"})}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx("h3",{className:"text-lg",children:u.caseNumber}),e.jsx(Ce,{className:lu(u.status),children:u.status}),e.jsx(Ce,{className:ou(u.requestType),children:u.requestType})]}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 text-sm",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Dealer Name"}),e.jsx("p",{children:u.dealerName})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Receivable amount"}),e.jsxs("p",{className:"text-red-600",children:["₹",(N=u.totalRecoveryAmount)==null?void 0:N.toLocaleString()]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Payable Amount"}),e.jsxs("p",{className:"text-green-600",children:["₹",(v=u.totalPayableAmount)==null?void 0:v.toLocaleString()]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Finance Status"}),e.jsx("p",{children:u.financeReportStatus})]})]})]})]}),e.jsxs(se,{size:"sm",variant:"outline",onClick:()=>s(u.id),className:"ml-4",children:[e.jsx(yn,{className:"w-4 h-4 mr-2"}),"View Details"]})]})})},u.id)}),h.length===0&&e.jsxs("div",{className:"text-center py-12 text-slate-500",children:[e.jsx(ka,{className:"w-12 h-12 mx-auto mb-4 text-slate-400"}),e.jsx("p",{children:"No finance-approval cases"})]})]})}),e.jsx(Ut,{value:"completed",className:"mt-6",children:e.jsxs("div",{className:"space-y-4",children:[x.map(u=>e.jsx(Le,{className:"border-slate-200",children:e.jsx(Fe,{className:"pt-6",children:e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{className:"flex items-start gap-4 flex-1",children:[e.jsx("div",{className:"p-3 bg-green-100 rounded-lg",children:e.jsx(hu,{className:"w-6 h-6 text-green-600"})}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx("h3",{className:"text-lg",children:u.caseNumber}),e.jsx(Ce,{className:lu(u.status),children:u.status}),e.jsx(Ce,{className:ou(u.requestType),children:u.requestType})]}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4 text-sm",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Dealer Name"}),e.jsx("p",{children:u.dealerName})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Completed On"}),e.jsx("p",{children:u.completedOn||"N/A"})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Submitted On"}),e.jsx("p",{children:u.submittedOn})]})]})]})]}),e.jsxs(se,{size:"sm",variant:"outline",onClick:()=>s(u.id),className:"ml-4",children:[e.jsx(yn,{className:"w-4 h-4 mr-2"}),"View Details"]})]})})},u.id)),x.length===0&&e.jsxs("div",{className:"text-center py-12 text-slate-500",children:[e.jsx(hu,{className:"w-12 h-12 mx-auto mb-4 text-slate-400"}),e.jsx("p",{children:"No completed cases"})]})]})})]})})]})]})}const tc={getResignations:async()=>{try{return(await Ee.getResignations()).data}catch(t){throw console.error("Get resignations error:",t),t}},createResignation:async t=>{try{return(await Ee.createResignation(t)).data}catch(s){throw console.error("Create resignation error:",s),s}},getResignationById:async t=>{var s,n;try{const r=await Ee.getResignationById(t);return((s=r.data)==null?void 0:s.resignation)||((n=r.data)==null?void 0:n.data)||r.data}catch(r){throw console.error("Get resignation error:",r),r}},updateClearance:async(t,s)=>{try{return(await Ee.updateClearance(t,s)).data}catch(n){throw console.error("Update clearance error:",n),n}},uploadDocument:async(t,s)=>{try{return(await Ee.uploadResignationDocument(t,s)).data}catch(n){throw console.error("Upload resignation document error:",n),n}},withdraw:async(t,s)=>{try{return(await Ee.withdrawResignation(t,s)).data}catch(n){throw console.error("Withdraw resignation error:",n),n}}},Gg=["Resignation Letter","Dealer Undertaking","Approval Note","Resignation Acceptance Letter","Handover Document","Settlement Supporting Document","PPT Presentation","Other"],hV=["Request Submitted","ASM","RBM","ZBH","DD Lead","DD Head","NBH","DD Admin","Legal","F&F Initiated"],Kg=["Termination Recommendation","Show Cause Notice","SCN Response","Hearing Record","Approval Note","Termination Letter","Settlement Supporting Document","Other"],mV=["Submitted","RBM + DD-ZM Review","ZBH Review","DD Lead Review","Legal Verification","NBH Evaluation","Show Cause Notice","Personal Hearing","NBH Final Approval","CCO Approval","CEO Final Approval","Legal - Termination Letter"],fV={ASM:"ASM",RBM:"RBM",ZBH:"ZBH","DD Lead":"DD Lead","DD Head":"DD Head",NBH:"NBH","DD Admin":"DD Admin",Legal:"Legal Admin"},TS=["REJECTED","Rejected","REVOKED","Revoked","WITHDRAWN","Withdrawn"],km={"Request Submitted":["Submission","Submitted","Initiation"],ASM:["ASM","ASM Review"],RBM:["RBM","RBM Review","Regional Review","RBM + DD-ZM Review"],ZBH:["ZBH","ZBH Review","ZM Review"],"DD Lead":["DD Lead","DD Lead Review","DDL Review"],"DD Head":["DD Head","DD Head Review","DDH Review"],NBH:["NBH","NBH Approval","NBH Review"],"DD Admin":["DD Admin","DD Admin Review"],"Awaiting F&F":["Awaiting F&F","Awaiting F&F — manual initiation"],Legal:["Legal","Legal - Resignation Letter"],"F&F Initiated":["F&F Initiated","FNF_INITIATED","FNF Initiated"],Completed:["Completed"]};function pV({resignationId:t,onBack:s,currentUser:n}){var $e,dt,st,xt,Mt,It,he,pt,ht,_e,Vt,Pt,_s,Ys,Bs,Ks,Qs,Xs,$s,Q,oe,we,Oe,ke,je,Ve,Ge,nt,Zt,Jt,lt,mt,Ds,ss,Ae;const{get:r}=pc(t?[{entityType:"resignation",entityId:t}]:[],!!t),a=(be,ut)=>{const He=[...(E==null?void 0:E.documents)||[],...(E==null?void 0:E.uploadedDocuments)||[]],yt=[be,ut,...ut?km[ut]||[]:[],...km[be]||[]].filter(ft=>!!ft).map(ft=>ft.trim().toLowerCase());return He.filter(ft=>{if(!(ft!=null&&ft.stage))return!1;const es=String(ft.stage).trim().toLowerCase();return yt.includes(es)})},i=tr(),[o,d]=g.useState({open:!1,type:null}),[m,f]=g.useState(""),[p,h]=g.useState(""),[x,u]=g.useState(""),[N,v]=g.useState(""),[w,j]=g.useState([]),[b,C]=g.useState(!1),[S,R]=g.useState(!1),[_,A]=g.useState({open:!1,stageName:"",documents:[]}),[E,q]=g.useState(null),[O,D]=g.useState(!1),[P,L]=g.useState([]),[$,Y]=g.useState(!1),[Z,W]=g.useState(null),[U,M]=g.useState(!1),[z,T]=g.useState(null),[I,B]=g.useState(Gg[0]),[G,K]=g.useState(""),H=g.useMemo(()=>[...(E==null?void 0:E.documents)||[],...(E==null?void 0:E.uploadedDocuments)||[]].some(ut=>(ut.documentType||ut.type)==="PPT Presentation"),[E]),X=async()=>{try{D(!0);const be=await tc.getResignationById(t);q(be),J()}catch(be){console.error("Error fetching resignation:",be)}finally{D(!1)}},J=async()=>{try{const be=await Ee.getAuditLogs("resignation",t);be.data&&be.data.success&&L(be.data.data||[])}catch(be){console.error("Error fetching audit logs:",be)}};g.useEffect(()=>{X()},[t]);const ae=[{id:1,name:"Request Submitted",key:"Request Submitted",description:"Dealer submitted the resignation request"},{id:2,name:"ASM Review",key:"ASM",description:"Area Sales Manager review"},{id:3,name:"RBM + DD-ZM Review",key:"RBM",description:"Joint approval by Regional Business Manager and DD-ZM"},{id:4,name:"ZBH Review",key:"ZBH",description:"Zonal Business Head approval"},{id:5,name:"DD Lead Review",key:"DD Lead",description:"DD Lead consolidated review"},{id:6,name:"DD Head Review",key:"DD Head",description:"DD Head final dealer development approval"},{id:7,name:"NBH Approval",key:"NBH",description:"National Business Head approval"},{id:8,name:"Legal - Resignation Letter",key:"Legal",description:"Legal team issues resignation approval letter"},{id:9,name:"DD Admin Review",key:"DD Admin",description:"DD Admin verification and final closure"},{id:10,name:"Awaiting F&F",key:"Awaiting F&F",description:"Internal review complete — start Full & Final using Push to F&F when ready"},{id:11,name:"F&F Settlement",key:"F&F Initiated",description:"Full & Final settlement process"},{id:12,name:"Completed",key:"Completed",description:"Resignation process finalized"}],le=["Request Submitted","ASM","RBM","ZBH","DD Lead","DD Head","NBH","Legal","DD Admin","Awaiting F&F","F&F Initiated","Completed"],xe=E?["F&F Initiated","Completed","Settled","FNF_INITIATED"].includes(String(E.status||E.currentStage||""))?!0:(Array.isArray(E.timeline)?E.timeline:[]).some(He=>{const yt=String((He==null?void 0:He.stage)||"").trim().toLowerCase(),ft=String((He==null?void 0:He.targetStage)||"").trim().toLowerCase(),es=String((He==null?void 0:He.action)||"").trim().toLowerCase(),ts=yt==="legal"||yt==="legal - resignation letter",Cs=ft==="legal"||ft==="dd admin"||ft==="awaiting f&f"||ft==="f&f initiated"||ft==="fnf_initiated"||es.includes("approved");return ts&&Cs}):!1,ve=(()=>{if(!E||!n)return{canApprove:!1,canDispatch:!1,dispatchMissed:!1,canWithdraw:!1,canSendBack:!1,canPushToFnF:!1,canAssign:!1};const be=E.currentStage,ut=E.status,He=n.role,yt=be==="RBM"||be==="RBM Review"||be==="RBM + DD-ZM Review",ft=String(n.roleCode||n.role||"").trim().toUpperCase(),es=yt&&P.some(Ft=>{var jn,xn,qn,En;return Ft.action==="PARTIAL_APPROVE"&&(((jn=Ft.actor)==null?void 0:jn.id)===n.id||Ft.actorId===n.id||((xn=Ft.actor)==null?void 0:xn.email)===n.email||Ft.userEmail===n.email)&&(((qn=Ft.details)==null?void 0:qn.roleCode)===ft||((En=Ft.details)==null?void 0:En.roleCode)==="DD-ZM"&&ft==="DD ZM")}),ts=["Completed","Rejected","Withdrawn","Revoked"].includes(ut),Cs=ut==="F&F Initiated"||be==="F&F Initiated"||ut==="Settled"||ut==="FNF_INITIATED",Us=le.indexOf(be),rn=le.indexOf("NBH"),Js=Us!==-1&&rn!==-1&&Us>=rn,an=ft==="SUPER_ADMIN"||yt&&(ft==="RBM"||ft==="DD-ZM"||ft==="DD ZM")||He===fV[be],hn=be==="DD Lead"||be==="DD Lead Review",De=ft==="DD_LEAD"||ft==="DD LEAD",bt=(()=>{const Ft=new Date;Ft.setHours(0,0,0,0);const jn=E.lastOperationalDateServices||E.lastOperationalDateSales;if(!jn)return!0;const xn=new Date(jn);return xn.setHours(0,0,0,0),Ft>=xn})(),Te=be==="Awaiting F&F",ct=(()=>{const Ft=String(be||"").trim();return le.find(xn=>xn===Ft||(km[xn]||[]).includes(Ft))||Ft})(),tt=ct==="NBH",jt=ct==="Awaiting F&F",Ht=ct==="Legal",zt=["DD Lead","DD Head","DD Admin","Super Admin"],fs=["DD Lead","DD Head","DD Admin","Super Admin"],qt=be==="DD Admin"||be==="DD Admin Review",As=ft==="DD_ADMIN"||He==="DD Admin",vs=ft==="SUPER_ADMIN"||He==="Super Admin",mn=[...E.documents||[],...E.uploadedDocuments||[]].some(Ft=>{const jn=String((Ft==null?void 0:Ft.documentType)||(Ft==null?void 0:Ft.type)||"").toLowerCase(),xn=String((Ft==null?void 0:Ft.stage)||"").toLowerCase();return jn.includes("acceptance letter")||xn==="legal"}),qs=P.some(Ft=>{var qn;const jn=String((Ft==null?void 0:Ft.action)||"").toUpperCase(),xn=String((Ft==null?void 0:Ft.description)||((qn=Ft==null?void 0:Ft.details)==null?void 0:qn.action)||"").toLowerCase();return jn==="RESIGNATION_LETTER_DISPATCHED"||xn.includes("resignation letter dispatched")})||(E.timeline||[]).some(Ft=>String((Ft==null?void 0:Ft.action)||"").toLowerCase().includes("resignation letter dispatched")),ln=le.indexOf("DD Admin"),fn=le.indexOf("Completed"),on=le.indexOf(le.find(Ft=>Ft===be||(km[Ft]||[]).includes(be))||be),Ot=ln!==-1&&on!==-1&&on>=ln&&(fn===-1||on0&&He!=="Legal Admin"&&ft!=="LEGAL_ADMIN",canWithdraw:He==="Dealer"&&!Js&&!ts,canRevoke:(ft==="SUPER_ADMIN"||He==="DD Admin")&&!ts&&!Cs,canPushToFnF:zt.includes(He)&&!Cs&&!ts&&!tt&&bt&&(jt||Ht&&fs.includes(He)),canAssign:He!=="Dealer"&&!ts}})(),Pe=["Super Admin","DD Lead","DD Head","NBH","DD Admin","Legal Admin","DD-ZM"].includes((n==null?void 0:n.role)||""),et={ASM:["ASM","ASM Review","Request Initiated"],RBM:["RBM","RBM Review","RBM + DD-ZM Review"],ZBH:["ZBH","ZBH Review"],"DD Lead":["DD Lead","DD Lead Review","Lead Review"],"DD Head":["DD Head","DD Head Review","Head Review"],NBH:["NBH","NBH Approval","NBH Review"],"DD Admin":["DD Admin","DD Admin Review"],"Awaiting F&F":["Awaiting F&F","Awaiting F&F — manual initiation"],Legal:["Legal","Legal - Resignation Letter","Legal Review"],"F&F Initiated":["F&F Initiated","FNF_INITIATED","F&F Settlement","Settled"],Completed:["Completed","Finalized"]},kt=be=>{if(!be)return"";const ut=String(be).trim();return le.find(yt=>yt===ut||(et[yt]||[]).includes(ut))||ut},vt=be=>{if(!E)return"pending";const ut=["Rejected","Revoked","Withdrawn"].includes(E.status);let He=E.currentStage;if(ut&&(!He||TS.includes(String(He)))){const ts=[...E.timeline||[]].reverse().find(Cs=>(Cs==null?void 0:Cs.stage)&&!TS.includes(String(Cs.stage)));ts!=null&&ts.stage&&(He=ts.stage)}const yt=le.indexOf(kt(He)),ft=le.indexOf(be);if((E.status==="Completed"||E.status==="Settled")&&ft<=yt)return"completed";const es=["Rejected","Revoked","Withdrawn"].includes(E.status);return be==="Legal"&&xe&&!es?"completed":yt===-1?be==="ASM"?"completed":"pending":ft{d({open:!0,type:be})},ge=(be,ut)=>{const He=a(be,ut).map((yt,ft)=>{var es;return{id:yt.id||`${be}-${ft}`,name:yt.name||yt.fileName||"Document",type:yt.type||yt.documentType||"Document",uploadDate:yt.uploadDate||(yt.createdAt?Yt(yt.createdAt):"N/A"),uploader:typeof yt.uploader=="string"?yt.uploader:((es=yt.uploader)==null?void 0:es.fullName)||yt.uploadedBy||"System",filePath:yt.filePath||yt.path}});A({open:!0,stageName:be,documents:He})},ye=async()=>{var be,ut,He,yt,ft,es,ts,Cs;if(!m&&!["assign","pushfnf","dispatch"].includes(o.type||"")){te.error("Please provide remarks (min 5 characters)");return}if(["sendBack","revoke"].includes(o.type||"")&&m.trim().length<5){te.error("Remarks are required for this action (min 5 characters).");return}if(o.type==="assign"&&!p){te.error("Please select a designation");return}try{Y(!0);const rn={action:o.type==="sendBack"?"sendBack":o.type,remarks:m,assignTo:N||p,force:S},Js=await Ee.updateResignationStatus(t,rn);if((be=Js.data)!=null&&be.success)te.success(((ut=Js.data)==null?void 0:ut.message)||"Action completed successfully"),d({open:!1,type:null}),f(""),h(""),v(""),j([]),R(!1),X();else{const an=((He=Js.data)==null?void 0:He.message)||"Failed to submit action";te.error(an),(yt=Js.data)!=null&&yt.canForce&&te.info(`${Pi} restriction: use "Push to F&F" and enable "Force Initiate F&F Settlement Immediately" if urgent.`)}}catch(Us){console.error("Error submitting action:",Us),te.error(((es=(ft=Us.response)==null?void 0:ft.data)==null?void 0:es.message)||"Failed to submit action"),(Cs=(ts=Us==null?void 0:Us.response)==null?void 0:ts.data)!=null&&Cs.canForce&&te.info(`${Pi} restriction: use "Push to F&F" with the force option if business-approved.`)}finally{Y(!1)}},Be=async()=>{var be,ut;if(!z){te.error("Please select a file to upload");return}try{Y(!0);const He=new FormData;He.append("file",z),He.append("documentType",I),G&&He.append("stage",G),await tc.uploadDocument(t,He),te.success("Document uploaded successfully"),M(!1),T(null),B(Gg[0]),K(""),X()}catch(He){te.error(((ut=(be=He==null?void 0:He.response)==null?void 0:be.data)==null?void 0:ut.message)||"Failed to upload document")}finally{Y(!1)}};return g.useEffect(()=>{(async()=>{if(o.type==="assign"&&(p||x)){const ut=setTimeout(async()=>{var He;try{C(!0);const yt={asm:"ASM",rbm:"RBM",zbh:"ZBH",nbh:"NBH",legal:"Legal Admin"},ft={limit:20,search:x};p&&(ft.roleCode=yt[p]||p);const es=await Ee.getUsers(ft);(He=es.data)!=null&&He.success&&j(es.data.data)}catch(yt){console.error("Error fetching users:",yt)}finally{C(!1)}},300);return()=>clearTimeout(ut)}})()},[p,x,o.type]),O&&!E?e.jsx("div",{className:"flex items-center justify-center min-h-[400px]",children:e.jsx(ns,{className:"w-8 h-8 animate-spin text-re-red"})}):e.jsxs("div",{className:"space-y-6",children:[e.jsx("div",{className:"flex items-start justify-between",children:e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(se,{variant:"outline",size:"icon",onClick:s,className:"hover:bg-slate-100 transition-colors",children:e.jsx(Jr,{className:"w-4 h-4"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl",children:(E==null?void 0:E.resignationId)||t}),e.jsx("p",{className:"text-slate-600",children:($e=E==null?void 0:E.outlet)==null?void 0:$e.name})]}),e.jsx(Ce,{className:(E==null?void 0:E.status)==="Completed"||(E==null?void 0:E.status)==="Settled"?"bg-green-100 text-green-700 border-green-300":(E==null?void 0:E.status)==="Rejected"||(E==null?void 0:E.status)==="Withdrawn"||(E==null?void 0:E.status)==="Revoked"?"bg-red-100 text-red-700 border-red-300":"bg-yellow-100 text-yellow-700 border-yellow-300",children:(E==null?void 0:E.status)==="Settled"?"Completed":lj((E==null?void 0:E.status)||"Pending")}),e.jsx(kr,{status:r("resignation",t)})]})}),e.jsxs(Bn,{defaultValue:"details",className:"w-full",children:[e.jsxs($n,{className:"bg-slate-100 p-1",children:[e.jsx(Wt,{value:"details",className:"data-[state=active]:bg-white",children:"Details"}),e.jsx(Wt,{value:"progress",className:"data-[state=active]:bg-white",children:"Progress"}),e.jsx(Wt,{value:"documents",className:"data-[state=active]:bg-white",children:"Documents"}),e.jsx(Wt,{value:"audit",className:"data-[state=active]:bg-white",children:"Audit Trail"}),Pe&&e.jsx(Wt,{value:"approvals",className:"data-[state=active]:bg-white",children:"Approval Summary"})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6 mt-6",children:[e.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[e.jsxs(Ut,{value:"details",className:"space-y-6",children:[e.jsxs(Le,{children:[e.jsx(Qe,{children:e.jsx(Je,{children:"Resignation Details"})}),e.jsx(Fe,{children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Resignation Type"}),e.jsx("p",{children:E==null?void 0:E.resignationType})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Reason"}),e.jsx("p",{children:E==null?void 0:E.reason})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Last Operational Date (Sales)"}),e.jsx("p",{children:E!=null&&E.lastOperationalDateSales?Yt(E.lastOperationalDateSales,"date"):"N/A"})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Last Operational Date (Services)"}),e.jsx("p",{children:E!=null&&E.lastOperationalDateServices?Yt(E.lastOperationalDateServices,"date"):"N/A"})]})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Additional Info / Dealer Voice"}),e.jsx("p",{children:(E==null?void 0:E.additionalInfo)||"No additional info provided"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Submitted On"}),e.jsx("p",{children:E!=null&&E.submittedOn?Yt(E.submittedOn):"N/A"})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Current Stage"}),e.jsx("p",{children:E==null?void 0:E.currentStage})]})]})]})})]}),e.jsxs(Le,{children:[e.jsx(Qe,{children:e.jsx(Je,{children:"Request Information"})}),e.jsx(Fe,{children:e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-6",children:[e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Dealer Name"}),e.jsx("p",{children:((dt=E==null?void 0:E.dealer)==null?void 0:dt.fullName)||((st=E==null?void 0:E.outlet)==null?void 0:st.name)})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"GST"}),e.jsx("p",{children:((Mt=(xt=E==null?void 0:E.dealer)==null?void 0:xt.dealerProfile)==null?void 0:Mt.gstNumber)||((It=E==null?void 0:E.outlet)==null?void 0:It.gstNumber)||"N/A"})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Dealer Email"}),e.jsx("p",{children:((he=E==null?void 0:E.dealer)==null?void 0:he.email)||"N/A"})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Sales Code"}),e.jsx("p",{children:((_e=(ht=(pt=E==null?void 0:E.dealer)==null?void 0:pt.dealerProfile)==null?void 0:ht.dealerCode)==null?void 0:_e.salesCode)||"N/A"})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Service Code"}),e.jsx("p",{children:((_s=(Pt=(Vt=E==null?void 0:E.dealer)==null?void 0:Vt.dealerProfile)==null?void 0:Pt.dealerCode)==null?void 0:_s.serviceCode)||"N/A"})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"GMA Code"}),e.jsx("p",{children:((Ks=(Bs=(Ys=E==null?void 0:E.dealer)==null?void 0:Ys.dealerProfile)==null?void 0:Bs.dealerCode)==null?void 0:Ks.gmaCode)||"N/A"})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Gear Code"}),e.jsx("p",{children:(($s=(Xs=(Qs=E==null?void 0:E.dealer)==null?void 0:Qs.dealerProfile)==null?void 0:Xs.dealerCode)==null?void 0:$s.gearCode)||"N/A"})]}),e.jsxs("div",{className:"col-span-2",children:[e.jsx(de,{className:"text-slate-600",children:"Address"}),e.jsx("p",{children:((oe=(Q=E==null?void 0:E.dealer)==null?void 0:Q.dealerProfile)==null?void 0:oe.registeredAddress)||((we=E==null?void 0:E.outlet)==null?void 0:we.address)})]})]})})]}),e.jsxs(Le,{children:[e.jsx(Qe,{children:e.jsx(Je,{children:"Operational Details"})}),e.jsx(Fe,{children:e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-6",children:[e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Inauguration"}),e.jsx("p",{children:(ke=(Oe=E==null?void 0:E.dealer)==null?void 0:Oe.dealerProfile)!=null&&ke.onboardedAt?Yt(E.dealer.dealerProfile.onboardedAt,"date"):(je=E==null?void 0:E.outlet)!=null&&je.inaugurationDate?Yt(E.outlet.inaugurationDate,"date"):"N/A"})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"LOA Date"}),e.jsx("p",{children:(Ge=(Ve=E==null?void 0:E.dealer)==null?void 0:Ve.dealerProfile)!=null&&Ge.loaDate?Yt(E.dealer.dealerProfile.loaDate,"date"):"N/A"})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"LOI Date"}),e.jsx("p",{children:(Zt=(nt=E==null?void 0:E.dealer)==null?void 0:nt.dealerProfile)!=null&&Zt.loiDate?Yt(E.dealer.dealerProfile.loiDate,"date"):"N/A"})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Dealership Type"}),e.jsx("p",{children:((mt=(lt=(Jt=E==null?void 0:E.dealer)==null?void 0:Jt.dealerProfile)==null?void 0:lt.application)==null?void 0:mt.businessType)||((Ds=E==null?void 0:E.outlet)==null?void 0:Ds.type)||"N/A"})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"City Category"}),e.jsx("p",{children:((ss=E==null?void 0:E.outlet)==null?void 0:ss.cityCategory)||"N/A"})]})]})})]})]}),e.jsx(Ut,{value:"progress",children:e.jsxs(Le,{children:[e.jsxs(Qe,{children:[e.jsx(Je,{children:"Progress Timeline"}),e.jsx(Xt,{children:"Track the resignation request approval process"})]}),e.jsx(Fe,{children:e.jsx("div",{className:"space-y-4",children:ae.map((be,ut)=>{const He=vt(be.key),yt=a(be.name,be.key).length,ft=((E==null?void 0:E.timeline)||[]).filter(ts=>ts.stage===be.key||ts.stage===be.name),es=ft.length>0?ft[ft.length-1]:null;return e.jsxs("div",{className:"flex gap-4",children:[e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsx("div",{className:`w-10 h-10 rounded-full flex items-center justify-center ${He==="completed"?"bg-green-100 text-green-600":He==="active"?"bg-blue-100 text-re-red":"bg-slate-100 text-slate-400"}`,children:He==="completed"?e.jsx(Hn,{className:"w-5 h-5"}):e.jsx("span",{children:be.id})}),ut0&&e.jsxs("button",{onClick:()=>ge(be.name,be.key),className:"flex items-center gap-1 px-2 py-1 rounded-full bg-red-50 hover:bg-red-100 text-re-red-hover text-xs transition-colors cursor-pointer",children:[e.jsx(Ns,{className:"w-3 h-3"}),e.jsxs("span",{children:[yt," ",yt===1?"doc":"docs"]})]})]}),es&&e.jsxs("div",{className:"flex items-center gap-1 text-sm text-slate-600",children:[e.jsx(dr,{className:"w-4 h-4"}),e.jsx("span",{children:Yt(es.timestamp||es.createdAt)})]})]}),e.jsx("p",{className:"text-slate-600 text-sm mb-1",children:be.description}),ft.length>0&&e.jsx("div",{className:"space-y-4 mt-3",children:ft.map((ts,Cs)=>e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ce,{variant:"secondary",className:"bg-slate-100 text-[10px] font-bold uppercase",children:ts.user||"System"}),e.jsx("span",{className:"text-[10px] text-slate-500 italic",children:ts.action}),e.jsx("span",{className:"text-[10px] text-slate-400 ml-auto",children:Yt(ts.timestamp||ts.createdAt)})]}),e.jsx("div",{className:"bg-slate-50 p-3 rounded-lg border border-slate-100 text-sm text-slate-700 shadow-sm",children:ts.comments||ts.remarks||"No remarks provided."})]},Cs))})]})]},be.id)})})})]})}),e.jsx(Ut,{value:"documents",children:e.jsxs(Le,{children:[e.jsxs(Qe,{className:"flex flex-row items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(Je,{children:"Documents"}),e.jsx(Xt,{children:"View and manage resignation documents"})]}),e.jsxs(se,{size:"sm",onClick:()=>M(!0),className:"bg-re-red hover:bg-re-red-hover",children:[e.jsx(or,{className:"w-4 h-4 mr-2"}),"Upload Document"]})]}),e.jsx(Fe,{children:e.jsxs(Ts,{children:[e.jsx(Ps,{children:e.jsxs(it,{children:[e.jsx(fe,{children:"Document Name"}),e.jsx(fe,{children:"Type"}),e.jsx(fe,{children:"Upload Date"}),e.jsx(fe,{children:"Uploader"}),e.jsx(fe,{children:"Actions"})]})}),e.jsx(Os,{children:(()=>{var ut;const be=[...(E==null?void 0:E.documents)||[],...(E==null?void 0:E.uploadedDocuments)||[]];return E!=null&&E.departmentalClearances&&Object.entries(E.departmentalClearances).forEach(([He,yt])=>{yt.supportingDocument&&be.push({name:`${He} Clearance Proof`,type:"Clearance NOC",path:yt.supportingDocument,createdAt:yt.updatedAt,uploadedBy:yt.updatedBy||"Department Admin"})}),(ut=E==null?void 0:E.settlement)!=null&&ut.clearances&&E.settlement.clearances.forEach(He=>{He.supportingDocument&&be.push({name:`${He.department} Clearance NOC`,type:"Live NOC",path:He.supportingDocument,createdAt:He.clearedAt||He.updatedAt,uploadedBy:"Department Admin"})}),be.length===0?e.jsx(it,{children:e.jsx(ue,{colSpan:5,className:"text-center py-4 text-slate-500",children:"No documents found"})}):be.map((He,yt)=>{var ft;return e.jsxs(it,{children:[e.jsx(ue,{children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ns,{className:"w-4 h-4 text-slate-500"}),e.jsx("span",{children:He.name||He.fileName})]})}),e.jsx(ue,{children:He.documentType||He.type||"Document"}),e.jsx(ue,{children:He.createdAt?Yt(He.createdAt):"N/A"}),e.jsx(ue,{children:((ft=He.uploader)==null?void 0:ft.fullName)||He.uploadedBy||"Dealer"}),e.jsx(ue,{children:e.jsx(se,{size:"sm",variant:"outline",onClick:()=>{const es=He.filePath||He.path,ts=es!=null&&es.startsWith("/uploads/")&&!es.startsWith("/uploads/documents/")?es.replace("/uploads/","/uploads/documents/"):es;W({fileName:He.fileName||He.name,filePath:ts,documentType:He.documentType||He.type})},children:"View"})})]},yt)})})()})]})})]})}),e.jsx(Ut,{value:"audit",children:e.jsxs(Le,{children:[e.jsxs(Qe,{children:[e.jsx(Je,{children:"Audit Trail"}),e.jsx(Xt,{children:"Complete history of actions on this resignation request"})]}),e.jsx(Fe,{children:e.jsx("div",{className:"space-y-4",children:P.length>0?P.map((be,ut)=>{var He,yt,ft,es,ts,Cs,Us,rn,Js,an,hn;return e.jsxs("div",{className:"flex gap-3 pb-6 border-b border-slate-100 last:border-0 relative",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-slate-300 mt-2 z-10"}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ce,{className:` - ${(be.description||be.action||((He=be.details)==null?void 0:He.action)||"").toLowerCase().includes("reject")||(be.description||be.action||((yt=be.details)==null?void 0:yt.action)||"").toLowerCase().includes("revok")?"bg-red-100 text-red-700 border-red-200":(be.description||be.action||((ft=be.details)==null?void 0:ft.action)||"").toLowerCase().includes("sent back")||(be.description||be.action||((es=be.details)==null?void 0:es.action)||"").toLowerCase().includes("send back")?"bg-red-50 text-re-red-hover border-red-200":(be.description||be.action||((ts=be.details)==null?void 0:ts.action)||"").toLowerCase().includes("approv")||(be.description||be.action||((Cs=be.details)==null?void 0:Cs.action)||"").toLowerCase().includes("initi")?"bg-emerald-100 text-emerald-700 border-emerald-200":"bg-slate-100 text-slate-700 border-slate-200"} - `,children:be.description||be.action}),e.jsxs("span",{className:"text-xs text-slate-500 font-medium italic",children:["by ",((Us=be.actor)==null?void 0:Us.name)||be.userName||"System"]})]}),e.jsx("span",{className:"text-xs text-slate-500",children:Yt(be.timestamp||be.createdAt)})]}),(be.remarks||((rn=be.newData)==null?void 0:rn.remarks)||((Js=be.details)==null?void 0:Js.remarks))&&e.jsx("div",{className:"p-3 bg-slate-50 border border-slate-100 rounded-lg text-sm text-slate-700 shadow-sm ml-1",children:be.remarks||((an=be.newData)==null?void 0:an.remarks)||((hn=be.details)==null?void 0:hn.remarks)})]})]},ut)}):e.jsx("div",{className:"text-center py-8 text-slate-500",children:e.jsx("p",{children:"No activity logs found for this case."})})})})]})}),Pe&&e.jsx(Ut,{value:"approvals",children:e.jsxs(Le,{children:[e.jsxs(Qe,{className:"flex flex-row items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(Je,{children:"Approval Summary"}),e.jsx(Xt,{children:"Comprehensive view of all approvals and remarks"})]}),ve.canApprove&&e.jsxs(se,{onClick:()=>ee("approve"),className:"bg-green-600 hover:bg-green-700",children:[e.jsx(Hn,{className:"w-4 h-4 mr-2"}),"Approve Request"]})]}),e.jsx(Fe,{children:e.jsxs(Ts,{className:"w-full border-collapse",children:[e.jsx(Ps,{children:e.jsxs(it,{className:"bg-slate-50/50",children:[e.jsx(fe,{className:"min-w-[120px]",children:"Stage"}),e.jsx(fe,{className:"min-w-[120px]",children:"Approver"}),e.jsx(fe,{className:"min-w-[200px]",children:"Action"}),e.jsx(fe,{className:"w-full min-w-[300px]",children:"Remarks"}),e.jsx(fe,{className:"min-w-[180px] text-right",children:"Date"})]})}),e.jsx(Os,{children:((E==null?void 0:E.timeline)||[]).length>0?E.timeline.map((be,ut)=>e.jsxs(it,{children:[e.jsx(ue,{className:"font-medium",children:be.stage}),e.jsx(ue,{children:e.jsx(Ce,{variant:"outline",children:be.user||"System"})}),e.jsx(ue,{className:"whitespace-normal break-words",children:be.action}),e.jsx(ue,{className:"whitespace-normal break-words",children:be.remarks||be.comments||"-"}),e.jsx(ue,{className:"text-slate-500 whitespace-nowrap text-right",children:Yt(be.timestamp||be.createdAt)})]},ut)):e.jsx(it,{children:e.jsx(ue,{colSpan:5,className:"text-center py-6 text-slate-500",children:"No approval records found"})})})]})})]})})]}),e.jsx("div",{className:"space-y-6",children:e.jsxs(Le,{children:[e.jsx(Qe,{children:e.jsx(Je,{children:"Actions"})}),e.jsxs(Fe,{className:"space-y-3",children:[(()=>{const be=String((n==null?void 0:n.roleCode)||(n==null?void 0:n.role)||"").trim().toUpperCase(),ut=be==="DD LEAD"||be==="DD_LEAD",He=["DD Lead","DD Lead Review","DDL Review"].includes(E==null?void 0:E.currentStage);return ut&&He?e.jsxs(se,{variant:"outline",className:"w-full text-re-red-hover border-red-300 hover:bg-red-50",onClick:()=>{B("PPT Presentation"),K("DD Lead"),M(!0)},children:[e.jsx(or,{className:"w-4 h-4 mr-2"}),"Upload PPT"]}):null})(),ve.canApprove&&e.jsxs(se,{disabled:$,className:"w-full bg-green-600 hover:bg-green-700 font-bold",onClick:()=>ee("approve"),children:[$&&o.type==="approve"?e.jsx(ns,{className:"w-4 h-4 mr-2 animate-spin"}):e.jsx(Hn,{className:"w-4 h-4 mr-2"}),"Approve"]}),ve.canDispatch&&e.jsxs(e.Fragment,{children:[ve.dispatchMissed&&e.jsxs("div",{className:"rounded-md border border-amber-300 bg-amber-50 text-amber-800 px-3 py-2 text-xs flex items-start gap-2",children:[e.jsx(sn,{className:"w-4 h-4 mt-0.5 flex-shrink-0"}),e.jsx("span",{children:"Resignation acceptance letter was not dispatched at the DD Admin step. Please send it to the dealer now."})]}),e.jsxs(se,{disabled:$,className:`w-full font-bold ${ve.dispatchMissed?"bg-amber-600 hover:bg-amber-700":"bg-re-red hover:bg-re-red-hover"}`,onClick:()=>ee("dispatch"),children:[$&&o.type==="dispatch"?e.jsx(ns,{className:"w-4 h-4 mr-2 animate-spin"}):e.jsx(Ur,{className:"w-4 h-4 mr-2"}),ve.dispatchMissed?"Dispatch Resignation Letter (Pending)":"Dispatch Resignation Letter"]})]}),ve.canSendBack&&e.jsxs(se,{variant:"outline",disabled:$,className:"w-full font-bold",onClick:()=>ee("sendBack"),children:[$&&o.type==="sendBack"?e.jsx(ns,{className:"w-4 h-4 mr-2 animate-spin"}):e.jsx(sb,{className:"w-4 h-4 mr-2"}),"Send Back"]}),ve.canWithdraw&&e.jsxs(se,{variant:"outline",disabled:$,className:"w-full text-red-600 border-red-300 hover:bg-red-50 font-bold",onClick:()=>ee("withdrawal"),children:[$&&o.type==="withdrawal"?e.jsx(ns,{className:"w-4 h-4 mr-2 animate-spin"}):e.jsx(ld,{className:"w-4 h-4 mr-2"}),"Withdrawal"]}),ve.canRevoke&&e.jsxs(se,{variant:"outline",disabled:$,className:"w-full text-orange-600 border-orange-300 hover:bg-orange-50 font-bold",onClick:()=>ee("revoke"),children:[$&&o.type==="revoke"?e.jsx(ns,{className:"w-4 h-4 mr-2 animate-spin"}):e.jsx(Jy,{className:"w-4 h-4 mr-2"}),"Revoke"]}),ve.canPushToFnF&&e.jsxs(se,{variant:"outline",disabled:$,className:"w-full text-re-red-hover border-red-300 hover:bg-red-50",onClick:()=>ee("pushfnf"),children:[$&&o.type==="pushfnf"?e.jsx(ns,{className:"w-4 h-4 mr-2 animate-spin"}):e.jsx(Gu,{className:"w-4 h-4 mr-2"}),"Push to F&F"]}),ve.canAssign&&e.jsxs(se,{variant:"outline",disabled:$,className:"w-full",onClick:()=>ee("assign"),children:[$&&o.type==="assign"?e.jsx(ns,{className:"w-4 h-4 mr-2 animate-spin"}):e.jsx(nb,{className:"w-4 h-4 mr-2"}),"Assign User"]}),e.jsx(ec,{}),e.jsxs(se,{variant:"outline",className:"w-full",onClick:()=>{var be;return i(`/worknotes/resignation/${t}`,{state:{applicationName:((be=E==null?void 0:E.outlet)==null?void 0:be.name)||"Resignation",registrationNumber:(E==null?void 0:E.resignationId)||"",participants:(E==null?void 0:E.participants)||[]}})},children:[e.jsx(Ga,{className:"w-4 h-4 mr-2"}),"View Work Notes",((Ae=E==null?void 0:E.worknotes)==null?void 0:Ae.length)>0&&e.jsx(Ce,{className:"ml-auto bg-re-red hover:bg-re-red-hover text-white h-5 px-2",children:E.worknotes.length})]})]})]})})]})]}),e.jsx(ds,{open:o.open,onOpenChange:be=>d({open:be,type:null}),children:e.jsxs(os,{children:[e.jsxs(xs,{children:[e.jsxs(ms,{children:[o.type==="approve"&&"Approve Resignation Request",o.type==="withdrawal"&&"Withdraw Resignation Request",o.type==="sendBack"&&"Send Back for Clarification",o.type==="revoke"&&"Revoke Resignation Request",o.type==="assign"&&"Assign to User",o.type==="pushfnf"&&"Push to Full & Final Settlement",o.type==="dispatch"&&"Dispatch Resignation Letter"]}),e.jsx(bs,{children:o.type==="assign"?"Select a user to assign this request to":o.type==="pushfnf"?"This will move the resignation request to F&F for dues clearance":o.type==="dispatch"?"The Legal-issued acceptance letter will be emailed to the dealer and the request will advance to Awaiting F&F. Remarks are optional.":"Please provide remarks for this action"})]}),e.jsx("div",{className:"space-y-4",children:o.type==="assign"?e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{children:"Designation Filter"}),e.jsxs(Dt,{value:p,onValueChange:be=>{h(be),v("")},children:[e.jsx(Et,{children:e.jsx(Rt,{placeholder:"All Roles"})}),e.jsxs(_t,{children:[e.jsx(Me,{value:"all",children:"All Roles"}),e.jsx(Me,{value:"asm",children:"ASM"}),e.jsx(Me,{value:"rbm",children:"RBM"}),e.jsx(Me,{value:"zbh",children:"ZBH"}),e.jsx(Me,{value:"nbh",children:"NBH"}),e.jsx(Me,{value:"legal",children:"Legal"})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{children:"Search Name/Email"}),e.jsxs("div",{className:"relative",children:[e.jsx(at,{placeholder:"Search...",value:x,onChange:be=>u(be.target.value),className:"pr-8"}),b&&e.jsx(ns,{className:"w-4 h-4 animate-spin absolute right-2 top-2.5 text-slate-400"})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{children:"Select Specific Person *"}),e.jsxs(Dt,{value:N,onValueChange:v,children:[e.jsx(Et,{children:e.jsx(Rt,{placeholder:w.length>0?"Choose a user":"No users found"})}),e.jsx(_t,{className:"max-h-60",children:w.map(be=>e.jsx(Me,{value:be.id,children:e.jsxs("div",{className:"flex flex-col text-left",children:[e.jsx("span",{className:"font-medium",children:be.fullName}),e.jsxs("span",{className:"text-[10px] text-slate-500",children:[be.roleCode," • ",be.email]})]})},be.id))})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{children:"Assignment Remarks *"}),e.jsx(Ws,{value:m,onChange:be=>f(be.target.value),placeholder:"Why are you assigning this user?",rows:2})]})]}):o.type==="pushfnf"?e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"p-3 bg-red-50 border border-red-200 rounded-lg flex items-start gap-3",children:[e.jsx(sn,{className:"w-5 h-5 text-re-red mt-0.5"}),e.jsxs("div",{className:"text-sm text-red-800",children:[e.jsx("p",{className:"font-bold",children:"Manual Trigger Notice"}),e.jsxs("p",{children:["Normally F&F is triggered after the ",Pi.toLowerCase(),". Use manual trigger only if urgent clearance is required."]})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"checkbox",id:"forceFnF",checked:S,onChange:be=>R(be.target.checked),className:"w-4 h-4 rounded border-slate-300"}),e.jsx(de,{htmlFor:"forceFnF",className:"font-medium text-slate-900 cursor-pointer",children:"Force Initiate F&F Settlement Immediately"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{children:"Remarks (Optional)"}),e.jsx(Ws,{value:m,onChange:be=>f(be.target.value),placeholder:"Add any additional notes...",rows:3})]})]}):e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{children:"Remarks *"}),e.jsx(Ws,{value:m,onChange:be=>f(be.target.value),placeholder:"Enter your remarks here...",rows:4})]})}),e.jsxs(bn,{children:[e.jsx(se,{variant:"outline",onClick:()=>d({open:!1,type:null}),disabled:$,children:"Cancel"}),e.jsx(se,{onClick:ye,disabled:$,className:o.type==="approve"?"bg-green-600 hover:bg-green-700":o.type==="withdrawal"?"bg-red-600 hover:bg-red-700":"bg-re-red hover:bg-re-red-hover",children:$?e.jsxs(e.Fragment,{children:[e.jsx(ns,{className:"w-4 h-4 mr-2 animate-spin"}),o.type==="dispatch"?"Dispatching...":"Processing..."]}):e.jsxs(e.Fragment,{children:[o.type==="approve"&&"Approve",o.type==="withdrawal"&&"Withdraw",o.type==="sendBack"&&"Send Back",o.type==="revoke"&&"Revoke",o.type==="assign"&&"Assign",o.type==="pushfnf"&&"Push to F&F",o.type==="dispatch"&&"Send to Dealer"]})})]})]})}),e.jsx(ds,{open:_.open,onOpenChange:be=>A({open:be,stageName:"",documents:[]}),children:e.jsxs(os,{className:Gb,children:[e.jsxs(xs,{children:[e.jsxs(ms,{className:"flex items-center gap-2",children:[e.jsx(Ns,{className:"w-5 h-5 text-re-red"}),"Documents - ",_.stageName]}),e.jsxs(bs,{children:["Documents uploaded for this stage (",_.documents.length," ",_.documents.length===1?"document":"documents",")"]})]}),e.jsx("div",{className:"max-h-96 overflow-y-auto",children:_.documents.length>0?e.jsxs(Ts,{children:[e.jsx(Ps,{children:e.jsxs(it,{children:[e.jsx(fe,{children:"Document Name"}),e.jsx(fe,{children:"Type"}),e.jsx(fe,{children:"Upload Date"}),e.jsx(fe,{children:"Uploader"}),e.jsx(fe,{children:"Action"})]})}),e.jsx(Os,{children:_.documents.map(be=>e.jsxs(it,{children:[e.jsx(ue,{children:be.name}),e.jsx(ue,{children:e.jsx(Ce,{variant:"outline",children:be.type})}),e.jsx(ue,{children:be.uploadDate}),e.jsx(ue,{children:be.uploader}),e.jsx(ue,{children:e.jsxs(se,{size:"sm",variant:"outline",className:"text-re-red hover:text-blue-700",onClick:()=>{if(!be.filePath)return;const ut=be.filePath.startsWith("/uploads/")&&!be.filePath.startsWith("/uploads/documents/")?be.filePath.replace("/uploads/","/uploads/documents/"):be.filePath;W({fileName:be.name,filePath:ut,documentType:be.type})},children:[e.jsx(Ns,{className:"w-4 h-4 mr-1"}),"View"]})})]},be.id))})]}):e.jsx("div",{className:"text-center py-8 text-slate-500",children:"No documents uploaded for this stage yet"})}),e.jsx(bn,{children:e.jsx(se,{variant:"outline",onClick:()=>A({open:!1,stageName:"",documents:[]}),children:"Close"})})]})}),e.jsx(ds,{open:U,onOpenChange:M,children:e.jsxs(os,{children:[e.jsxs(xs,{children:[e.jsx(ms,{children:"Upload Resignation Document"}),e.jsx(bs,{children:"Add a document and map it to a stage (optional)."})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{children:"Document Type"}),e.jsxs(Dt,{value:I,onValueChange:B,children:[e.jsx(Et,{children:e.jsx(Rt,{placeholder:"Select document type"})}),e.jsx(_t,{children:Gg.map(be=>e.jsx(Me,{value:be,children:be},be))})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{children:"Stage (Optional)"}),e.jsxs(Dt,{value:G||"none",onValueChange:be=>K(be==="none"?"":be),children:[e.jsx(Et,{children:e.jsx(Rt,{placeholder:"Select stage"})}),e.jsxs(_t,{children:[e.jsx(Me,{value:"none",children:"No Stage Mapping"}),hV.map(be=>e.jsx(Me,{value:be,children:be},be))]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{children:"File"}),e.jsx(at,{type:"file",onChange:be=>{var ut;return T(((ut=be.target.files)==null?void 0:ut[0])||null)}})]})]}),e.jsxs(bn,{children:[e.jsx(se,{variant:"outline",onClick:()=>M(!1),disabled:$,children:"Cancel"}),e.jsx(se,{onClick:Be,disabled:$,children:$?"Uploading...":"Upload"})]})]})}),e.jsx(mo,{isOpen:!!Z,onClose:()=>W(null),document:Z})]})}const qo={getTerminationById:async t=>{const n=(await Ee.getTerminationById(t)).data;return(n==null?void 0:n.termination)||(n==null?void 0:n.data)||n},updateTerminationStatus:async(t,s,n,r)=>(await Ee.updateTerminationStatus(t,{action:s,remarks:n,...r!=null&&r.force?{force:!0}:{}})).data,issueSCN:async(t,s)=>(await Ee.issueSCN(t,s)).data,uploadSCNResponse:async(t,s,n)=>{const r=new FormData;return r.append("file",s),n&&r.append("remarks",n),(await Ee.uploadSCNResponse(t,r)).data},uploadDocument:async(t,s)=>(await Ee.uploadTerminationDocument(t,s)).data,finalizeTermination:async(t,s,n)=>(await Ee.finalizeTermination(t,{decision:s,remarks:n})).data},Nf=t=>String(t||"").toLowerCase().replace(/\s+/g," ").trim(),xV="Evaluation of Dealer SCN Response",gV=t=>{const s=Nf(t);return s?!!(s===Nf(xV)||s.includes("evaluation")&&s.includes("scn")&&s.includes("response")||s.includes("personal hearing")):!1},vV=t=>{const s=Nf(t);return s.includes("rbm")&&(s.includes("dd-zm")||s.includes("dd zm"))};function yV(t){const s=Nf(t);return s.includes("sent back")||s.includes("send back")||s.includes("reconsider")||s.includes("reconsideration")}function PS(t,s){if(!Array.isArray(t)||t.length===0)return null;const n=s==="scn_response_eval"?gV:vV,r=t;for(let a=r.length-1;a>=0;a--){const i=r[a];if(!yV(i==null?void 0:i.action)||!n(i==null?void 0:i.targetStage))continue;const o=(i==null?void 0:i.timestamp)!=null?new Date(i.timestamp).getTime():NaN;if(!Number.isNaN(o))return o}return null}function bV(t){const s=t.createdAt??t.timestamp;if(s==null)return 0;const n=new Date(s).getTime();return Number.isNaN(n)?0:n}function jV(t,s){return s==null?!0:bV(t)>=s}function NV({terminationId:t,onBack:s,currentUser:n}){var Bs,Ks,Qs,Xs,$s,Q,oe,we,Oe,ke,je,Ve,Ge,nt,Zt,Jt,lt,mt,Ds,ss,Ae,be,ut,He,yt,ft,es,ts,Cs,Us,rn,Js,an,hn;const r=tr(),{get:a}=pc(t?[{entityType:"termination",entityId:t}]:[],!!t),[i,o]=g.useState({open:!1,type:null}),[d,m]=g.useState(""),[f,p]=g.useState(""),[h,x]=g.useState(!1),[u,N]=g.useState({open:!1,stageName:"",documents:[]}),[v,w]=g.useState(!0),[j,b]=g.useState(null),[C,S]=g.useState([]),[R,_]=g.useState(!1),[A,E]=g.useState(null),[q,O]=g.useState(""),[D,P]=g.useState(!1),[L,$]=g.useState(!1),[Y,Z]=g.useState("Approve"),[W,U]=g.useState(""),[M,z]=g.useState(!1),[T,I]=g.useState(null),[B,G]=g.useState(Kg[0]),[K,H]=g.useState(""),[X,J]=g.useState(null),ae=async()=>{try{w(!0);const De=await qo.getTerminationById(t);b(De),le()}catch(De){console.error("Error fetching termination:",De)}finally{w(!1)}},le=async()=>{try{const De=await Ee.getAuditLogs("termination",t);De.data&&De.data.success&&S(De.data.data||[])}catch(De){console.error("Error fetching audit logs:",De)}};if(g.useEffect(()=>{ae()},[t]),v)return e.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:[e.jsx(ns,{className:"w-8 h-8 text-re-red animate-spin"}),e.jsx("p",{className:"text-slate-600",children:"Loading termination details..."})]});const xe=async()=>{try{P(!0),await qo.issueSCN(t,{remarks:q}),te.success("SCN issued successfully"),_(!1),ae()}catch{te.error("Failed to issue SCN")}finally{P(!1)}},ce=async()=>{if(A)try{P(!0),await qo.uploadSCNResponse(t,A,q),te.success("SCN response uploaded"),_(!1),ae()}catch{te.error("Failed to upload response")}finally{P(!1)}},ve=async()=>{try{P(!0),await qo.finalizeTermination(t,Y,W),te.success(`Termination ${Y.toLowerCase()}ed`),$(!1),ae()}catch{te.error("Failed to finalize termination")}finally{P(!1)}},Pe=async()=>{if(!T){te.error("Please select a file to upload");return}try{P(!0);const De=new FormData;De.append("file",T),De.append("documentType",B),K&&De.append("stage",K),await qo.uploadDocument(t,De),te.success("Document uploaded successfully"),z(!1),I(null),G(Kg[0]),H(""),ae()}catch{te.error("Failed to upload document")}finally{P(!1)}},et=n&&["DD Lead","DD Head","DD_HEAD","NBH","DD Admin","Super Admin"].includes(n.role||n.roleCode),kt={Submitted:["Submitted"],"RBM + DD-ZM Review":["RBM + DD-ZM Review"],"ZBH Review":["ZBH Review"],"DD Lead Review":["DD Lead Review"],"Legal Verification":["Legal Verification"],"DD Head Review":["DD Head Review"],"NBH Evaluation":["NBH Evaluation"],"Show Cause Notice (SCN)":["Show Cause Notice","Show Cause Notice (SCN)","SCN"],"Evaluation of Dealer SCN Response":["Evaluation of Dealer SCN Response","Personal Hearing"],"NBH Final Approval":["NBH Final Approval"],"CCO Approval":["CCO Approval"],"CEO Final Approval":["CEO Final Approval"],"Legal - Termination Letter":["Legal - Termination Letter"],"Dealer Terminated":["Terminated","Dealer Terminated"]},vt=["Submitted","RBM + DD-ZM Review","ZBH Review","DD Lead Review","Legal Verification","DD Head Review","NBH Evaluation","Show Cause Notice (SCN)","Evaluation of Dealer SCN Response","NBH Final Approval","CCO Approval","CEO Final Approval","Legal - Termination Letter","Dealer Terminated"],ge=(()=>{if(!j||!n)return{canApprove:!1,canWithdraw:!1,canIssueSCN:!1,canUploadSCNResponse:!1,canFinalize:!1,canPushToFnF:!1};const De=j.currentStage,bt=j.status,Te=n.role||n.roleCode,ct=["Show Cause Notice (SCN)","SCN"].includes(De),tt=["Completed","Rejected","Withdrawn","Terminated"].includes(bt)||De==="Terminated",jt=bt==="F&F Initiated"||De==="F&F Initiated"||bt==="Settled"||bt==="FNF_INITIATED",Ht=(()=>{const qs=new Date;qs.setHours(0,0,0,0);const ln=j.proposedLwd;if(!ln)return!0;const fn=new Date(ln);return fn.setHours(0,0,0,0),qs>=fn})(),zt=PS(j.timeline,"scn_response_eval"),fs=PS(j.timeline,"rbm_review"),qt=De==="Evaluation of Dealer SCN Response"||De==="Personal Hearing",As=De==="RBM + DD-ZM Review"?fs:qt?zt:null,vs=C.some(qs=>{var jn,xn,qn;if(!jV(qs,As))return!1;const ln=qs.userId||((jn=qs.user)==null?void 0:jn.id)||((xn=qs.actor)==null?void 0:xn.id)||qs.actorId,fn=String(ln)===String(n.id),on=(qs.action||qs.description||"").toUpperCase(),Ye=on.includes("PARTIAL_APPROVE")||on.includes("PARTIAL APPROVED"),Ot=((qn=qs.details)==null?void 0:qn.stage)||qs.stage||"",St=Ot==="RBM + DD-ZM Review"||(qs.remarks||"").includes("Partial approval by"),rt=Ot==="Evaluation of Dealer SCN Response"||Ot==="Personal Hearing"||(qs.remarks||"").includes("SCN Response Review by");return fn&&Ye&&(De==="RBM + DD-ZM Review"&&St||qt&&rt)}),cs=qs=>(kt[qs]||[qs]).includes(De);return{canApprove:(Te==="Super Admin"||cs("RBM + DD-ZM Review")&&(Te==="RBM"||Te==="DD-ZM")&&!vs||cs("ZBH Review")&&Te==="ZBH"||cs("DD Lead Review")&&Te==="DD Lead"||cs("Legal Verification")&&Te==="Legal Admin"||cs("DD Head Review")&&(Te==="DD Head"||Te==="DD_HEAD")||cs("NBH Evaluation")&&Te==="NBH"||cs("Evaluation of Dealer SCN Response")&&["DD Lead","ZBH","RBM","DD Head","DD_HEAD"].includes(Te)&&!vs||cs("NBH Final Approval")&&Te==="NBH"||cs("CCO Approval")&&Te==="CCO"||cs("CEO Final Approval")&&Te==="CEO"||cs("Legal - Termination Letter")&&Te==="Legal Admin")&&!tt&&!jt&&!["NBH Final Approval","CCO Approval","CEO Final Approval","Show Cause Notice (SCN)","SCN"].includes(De),canIssueSCN:De==="NBH Evaluation"&&(Te==="NBH"||Te==="Super Admin")&&!tt,canUploadSCNResponse:ct&&["Legal Admin","DD Admin","DD Lead","Super Admin"].includes(Te)&&!tt,canHold:(cs("NBH Evaluation")||cs("NBH Final Approval"))&&(Te==="NBH"||Te==="Super Admin")&&bt!=="On Hold"&&!tt,canFinalize:(De==="NBH Final Approval"&&Te==="NBH"||De==="CCO Approval"&&Te==="CCO"||De==="CEO Final Approval"&&Te==="CEO"||Te==="Super Admin")&&["NBH Final Approval","CCO Approval","CEO Final Approval"].includes(De)&&!tt,canPushToFnF:et&&!jt&&!j.fnfSettlement&&(De==="Terminated"||bt===Hc.AWAITING_FNF||bt===Hc.AWAITING_FNF_LWD_PENDING)&&Ht,isLwdReached:Ht,canWithdraw:Te==="ASM"&&De==="Request Initiated"&&!tt,isFinalState:tt,isSettlementPhase:jt}})(),ye=j||{},Be=["Show Cause Notice","Show Cause Notice (SCN)","SCN"].includes(ye.currentStage),$e=De=>{if(!De)return"";const bt=String(De).trim();return vt.find(ct=>(kt[ct]||[ct]).includes(bt))||bt},dt=De=>{const bt=kt[De]||[De];return(ye.timeline||[]).some(Te=>Te!=null&&Te.stage?!!(bt.includes(Te.stage)||De==="Submitted"&&(Te.stage==="Submitted"||Te.stage==="Request Initiated")):!1)},st=De=>{const bt=["Rejected","Revoked","Withdrawn"].includes(ye.status),Te=["Completed","Terminated","Settled","F&F Initiated","FNF_INITIATED",Hc.AWAITING_FNF,Hc.AWAITING_FNF_LWD_PENDING].includes(ye.status)||ye.currentStage==="Terminated";let ct=ye.currentStage||ye.status;if(bt&&(ye.currentStage==="Rejected"||ye.currentStage==="Revoked"||!ye.currentStage)){const zt=[...ye.timeline||[]].reverse().find(fs=>fs.stage&&fs.stage!=="Rejected"&&fs.stage!=="Revoked");zt&&(ct=zt.stage)}const tt=$e(ct),jt=vt.indexOf(tt),Ht=vt.indexOf(De);return Te&&Ht<=jt?Ht{const Te=kt[bt]||[bt],ct=xt.filter(tt=>!tt.stage||Te.includes(tt.stage)).map(tt=>{var jt;return{id:tt.id||`${bt}-${tt.fileName||tt.name}`,name:tt.fileName||tt.name||"Document",type:tt.documentType||tt.type||"Document",uploadDate:tt.uploadDate||tt.createdAt?Yt(tt.uploadDate||tt.createdAt):"N/A",uploader:((jt=tt.uploader)==null?void 0:jt.fullName)||tt.uploader||"-",path:tt.filePath||tt.path||tt.url}});return De[bt]=ct,De},{}),It=De=>{const bt=kt[De]||[De];return(ye.timeline||[]).filter(ct=>bt.includes(ct.stage)||De==="Submitted"&&(ct.stage==="Submitted"||ct.stage==="Request Initiated")).sort((ct,tt)=>new Date(ct.timestamp).getTime()-new Date(tt.timestamp).getTime())},pt=String(ye.category||"").trim().toLowerCase().includes("unethical")?"Unethical Practice category — request was escalated directly to DD Lead Review.":null,ht=[{id:1,name:"Submitted",status:st("Submitted"),description:"Termination request initiated",date:"",actionType:"",actionBy:"",remarks:"",feedback:""},{id:2,name:"RBM + DD-ZM Review",status:st("RBM + DD-ZM Review"),description:"Joint review and approval by RBM and DD-ZM"},{id:3,name:"ZBH Review",status:st("ZBH Review"),description:"Zonal Business Head evaluation"},{id:4,name:"DD Lead Review",status:st("DD Lead Review"),description:"DD Lead validation"},{id:5,name:"Legal Verification",status:st("Legal Verification"),description:"Legal team validates termination grounds"},{id:6,name:"DD Head Review",status:st("DD Head Review"),description:"DD Head strategic review"},{id:7,name:"NBH Evaluation",status:st("NBH Evaluation"),description:"National Business Head decision"},{id:8,name:"Show Cause Notice (SCN)",status:st("Show Cause Notice (SCN)"),description:"SCN sent to dealer, awaiting response"},{id:9,name:"Evaluation of Dealer SCN Response",status:st("Evaluation of Dealer SCN Response"),description:"Joint evaluation of SCN response by DD-Lead, ZBH, RBM, and DD-Head"},{id:10,name:"NBH Final Approval",status:st("NBH Final Approval"),description:"NBH final termination decision"},{id:11,name:"CCO Approval",status:st("CCO Approval"),description:"Chief Commercial Officer approval"},{id:12,name:"CEO Final Approval",status:st("CEO Final Approval"),description:"CEO final authorization"},{id:13,name:"Legal - Termination Letter",status:st("Legal - Termination Letter"),description:"Legal team issues final termination letter"},{id:14,name:"Dealer Terminated",status:st("Dealer Terminated"),description:"Dealership termination effective",date:"",actionType:"",actionBy:"",remarks:"",feedback:""}],_e=De=>{const bt=Mt[De]||[];N({open:!0,stageName:De,documents:bt})},Vt=De=>{o({open:!0,type:De})},Pt=async()=>{var ct,tt,jt,Ht,zt,fs;const De=i.type,bt=De==="sendBack"?"sendBack":De||"approve",Te=d.trim();if(["sendBack","revoke"].includes(De||"")&&Te.length<5){te.error("Please provide detailed remarks (minimum 5 characters required for Send Back / Revoke)");return}if(!Te&&!["assign","pushfnf"].includes(De||"")){te.error("Please provide remarks/comments for this action");return}if(De==="assign"&&!f){te.error("Please select a user");return}P(!0);try{let qt;if(De==="approve"||De==="sendBack"||De==="withdrawal"||De==="revoke"||De==="hold")qt=await qo.updateTerminationStatus(t,bt,d);else if(De==="pushfnf")qt=await qo.updateTerminationStatus(t,"pushfnf",d,{force:h});else{te.error("Action logic not fully implemented for this type"),P(!1);return}if(qt&&(qt.success===!1||qt.ok===!1)){console.error("[TerminationDetails] Action failed:",qt);const vs=qt.message||((ct=qt.data)==null?void 0:ct.message)||"Failed to perform action";te.error(vs),(qt.canForce||(tt=qt.data)!=null&&tt.canForce)&&te.info('Enable "Force initiate F&F" in the dialog if an exception is approved.'),P(!1);return}const As={approve:"Request approved and forwarded",withdrawal:"Request withdrawn successfully",sendBack:"Request sent back for clarification",assign:"Request assigned successfully",pushfnf:"Request pushed to F&F successfully",revoke:"Request revoked and withdrawn"};te.success(As[De]||(qt==null?void 0:qt.message)||"Action completed"),o({open:!1,type:null}),m(""),p(""),x(!1),ae()}catch(qt){const As=((Ht=(jt=qt.response)==null?void 0:jt.data)==null?void 0:Ht.message)||"Failed to perform action";te.error(As),(fs=(zt=qt==null?void 0:qt.response)==null?void 0:zt.data)!=null&&fs.canForce&&te.info('Enable "Force initiate F&F" in the dialog if an exception is approved.')}finally{P(!1)}},_s=De=>{switch(De){case"Critical":return"bg-red-100 text-red-700 border-red-300";case"High":return"bg-orange-100 text-orange-700 border-orange-300";case"Medium":return"bg-yellow-100 text-yellow-700 border-yellow-300";default:return"bg-blue-100 text-blue-700 border-blue-300"}},Ys=(ye.worknotes||[]).length;return e.jsxs("div",{className:"space-y-6",children:[e.jsx("div",{className:"flex items-start justify-between",children:e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(se,{variant:"outline",size:"icon",onClick:s,className:"hover:bg-slate-100 transition-colors",children:e.jsx(Jr,{className:"w-4 h-4"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl",children:ye.requestId||t}),e.jsx("p",{className:"text-slate-600",children:((Bs=ye.dealer)==null?void 0:Bs.businessName)||((Ks=ye.dealer)==null?void 0:Ks.legalName)||"Termination"})]}),e.jsx(Ce,{className:_s(ye.severity),children:ye.severity}),e.jsx(Ce,{className:ye.status==="Completed"||ye.status==="Terminated"||ye.status==="Settled"?"bg-green-100 text-green-700 border-green-300":ye.status==="Rejected"||ye.status==="Withdrawn"?"bg-red-100 text-red-700 border-red-300":"bg-yellow-100 text-yellow-700 border-yellow-300",children:ye.status==="Settled"?"Completed":lj(ye.status||"Pending")}),e.jsx(kr,{status:a("termination",t)})]})}),e.jsxs(Bn,{defaultValue:"details",className:"w-full",children:[e.jsxs($n,{className:"bg-slate-100 p-1",children:[e.jsx(Wt,{value:"details",className:"data-[state=active]:bg-white",children:"Details"}),e.jsx(Wt,{value:"progress",className:"data-[state=active]:bg-white",children:"Progress"}),e.jsx(Wt,{value:"documents",className:"data-[state=active]:bg-white",children:"Documents"}),e.jsx(Wt,{value:"audit",className:"data-[state=active]:bg-white",children:"Audit Trail"})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6 mt-6",children:[e.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[e.jsxs(Ut,{value:"details",className:"space-y-6",children:[e.jsxs(Le,{children:[e.jsx(Qe,{children:e.jsx(Je,{children:"Dealer Information"})}),e.jsx(Fe,{children:e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-6",children:[e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Dealer Code"}),e.jsx("p",{children:((Xs=(Qs=ye.dealer)==null?void 0:Qs.dealerCode)==null?void 0:Xs.dealerCode)||"N/A"})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Dealer Name"}),e.jsx("p",{children:(($s=ye.dealer)==null?void 0:$s.businessName)||"N/A"})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"GST"}),e.jsx("p",{children:((Q=ye.dealer)==null?void 0:Q.gstNumber)||"N/A"})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Dealer Email"}),e.jsx("p",{children:((we=(oe=ye.dealer)==null?void 0:oe.user)==null?void 0:we.email)||"N/A"})]}),e.jsxs("div",{className:"col-span-2",children:[e.jsx(de,{className:"text-slate-600",children:"Address"}),e.jsx("p",{children:((Oe=ye.dealer)==null?void 0:Oe.registeredAddress)||((je=(ke=ye.dealer)==null?void 0:ke.application)==null?void 0:je.address)||"N/A"})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"City"}),e.jsx("p",{children:((Ge=(Ve=ye.dealer)==null?void 0:Ve.application)==null?void 0:Ge.city)||"N/A"})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"District"}),e.jsx("p",{children:((Jt=(Zt=(nt=ye.dealer)==null?void 0:nt.application)==null?void 0:Zt.district)==null?void 0:Jt.name)||"N/A"})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Dealership Name"}),e.jsx("p",{children:((lt=ye.dealer)==null?void 0:lt.businessName)||ye.dealershipName})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Sales Code"}),e.jsx("p",{children:((Ds=(mt=ye.dealer)==null?void 0:mt.dealerCode)==null?void 0:Ds.salesCode)||ye.salesCode||"N/A"})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Service Code"}),e.jsx("p",{children:((Ae=(ss=ye.dealer)==null?void 0:ss.dealerCode)==null?void 0:Ae.serviceCode)||ye.serviceCode||"N/A"})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"GMA Code"}),e.jsx("p",{children:((ut=(be=ye.dealer)==null?void 0:be.dealerCode)==null?void 0:ut.gmaCode)||ye.accessoriesCode||"N/A"})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"GMA Code"}),e.jsx("p",{children:((yt=(He=ye.dealer)==null?void 0:He.dealerCode)==null?void 0:yt.gmaCode)||"N/A"})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Gear Code"}),e.jsx("p",{children:((es=(ft=ye.dealer)==null?void 0:ft.dealerCode)==null?void 0:es.gearCode)||"N/A"})]})]})})]}),e.jsxs(Le,{children:[e.jsx(Qe,{children:e.jsx(Je,{children:"Operational Details"})}),e.jsx(Fe,{children:e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-6",children:[e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Inauguration"}),e.jsx("p",{children:(ts=ye.dealer)!=null&&ts.onboardedAt?Yt(ye.dealer.onboardedAt,"date"):ye.inauguration||"N/A"})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"LOA Date"}),e.jsx("p",{children:(Cs=ye.dealer)!=null&&Cs.loaDate?Yt(ye.dealer.loaDate,"date"):"N/A"})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"LOI Date"}),e.jsx("p",{children:(Us=ye.dealer)!=null&&Us.loiDate?Yt(ye.dealer.loiDate,"date"):"N/A"})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Last 6 Months Sales"}),e.jsx("p",{children:ye.lastSixMonthsSales})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Number of Dealerships"}),e.jsx("p",{children:ye.numberOfDealerships})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Number of Studios"}),e.jsx("p",{children:ye.numberOfStudios})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Constitution"}),e.jsx("p",{children:((rn=ye.dealer)==null?void 0:rn.constitutionType)||"N/A"})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Dealership Type"}),e.jsx("p",{children:((an=(Js=ye.dealer)==null?void 0:Js.application)==null?void 0:an.businessType)||"N/A"})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Type of Closure"}),e.jsx("p",{children:ye.typeOfClosure||"Complete"})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Format Category"}),e.jsx("p",{children:ye.formatCategory||"N/A"})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Dealer Score Card Band"}),e.jsx("p",{children:ye.dealerScoreCardBand||"N/A"})]})]})})]}),e.jsxs(Le,{className:"border-red-200 bg-red-50/30",children:[e.jsx(Qe,{children:e.jsxs(Je,{className:"text-red-900 flex items-center gap-2",children:[e.jsx(Ha,{className:"w-5 h-5"}),"Termination Details"]})}),e.jsx(Fe,{children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Termination Category"}),e.jsx("p",{className:"text-red-900",children:ye.category})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Sub Category"}),e.jsx("p",{children:ye.subCategory||"N/A"})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Description"}),e.jsx("p",{children:ye.reason})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Severity"}),e.jsx("div",{className:"mt-1",children:e.jsx(Ce,{className:_s(ye.severity),children:ye.severity})})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Submitted By"}),e.jsx("p",{children:((hn=ye.initiator)==null?void 0:hn.fullName)||"System"})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Submitted On"}),e.jsx("p",{children:Yt(ye.createdAt)})]})]})]})})]})]}),e.jsx(Ut,{value:"progress",children:e.jsxs(Le,{children:[e.jsxs(Qe,{children:[e.jsx(Je,{children:"Termination Progress Timeline"}),e.jsx(Xt,{children:"Track the termination request approval process"})]}),e.jsxs(Fe,{children:[pt&&ht.some(De=>De.status==="skipped")&&e.jsxs(di,{className:"mb-4 border-amber-300 bg-amber-50 text-amber-900",children:[e.jsx(_a,{className:"h-4 w-4 text-amber-600"}),e.jsx(_i,{children:"Fast-tracked workflow"}),e.jsxs(ui,{children:[pt," Stages marked “Skipped” below were intentionally bypassed and never reviewed."]})]}),e.jsx("div",{className:"space-y-4",children:ht.map((De,bt)=>{var tt,jt,Ht;const Te=((tt=Mt[De.name])==null?void 0:tt.length)||0,ct=It(De.name);return e.jsxs("div",{className:"flex gap-4",children:[e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsx("div",{className:`w-10 h-10 rounded-full flex items-center justify-center ${De.status==="completed"?"bg-green-100 text-green-600":De.status==="active"?"bg-red-50 text-re-red":De.status==="skipped"?"bg-amber-50 text-amber-600 border border-dashed border-amber-300":"bg-slate-100 text-slate-400"}`,children:De.status==="completed"?e.jsx(Hn,{className:"w-5 h-5"}):De.status==="active"?e.jsx(Ha,{className:"w-5 h-5"}):De.status==="skipped"?e.jsx(A1,{className:"w-5 h-5"}):e.jsx("span",{children:De.id})}),bt0&&e.jsxs("button",{onClick:()=>_e(De.name),className:"flex items-center gap-1 px-2 py-1 rounded-full bg-red-50 hover:bg-red-100 text-re-red-hover text-xs transition-colors cursor-pointer",children:[e.jsx(Ns,{className:"w-3 h-3"}),e.jsxs("span",{children:[Te," ",Te===1?"doc":"docs"]})]})]}),(((jt=ct[0])==null?void 0:jt.timestamp)||De.date)&&e.jsxs("div",{className:"flex items-center gap-1 text-xs text-slate-500 bg-slate-50 px-2 py-0.5 rounded-full border border-slate-100",children:[e.jsx(dr,{className:"w-3 h-3"}),e.jsx("span",{children:Yt(((Ht=ct[0])==null?void 0:Ht.timestamp)||De.date)})]})]}),e.jsx("p",{className:"text-slate-600 text-sm",children:De.description}),De.status==="skipped"&&e.jsxs("p",{className:"text-xs text-amber-700 mt-1 flex items-center gap-1",children:[e.jsx(A1,{className:"w-3 h-3"}),pt?`Bypassed — ${pt}`:"This stage was bypassed by the workflow and not reviewed."]}),ct.length>0&&e.jsx("div",{className:"mt-3 space-y-3",children:ct.map((zt,fs)=>{var cs,mn,qs;const qt=zt.remarks||zt.comments||"",As=qt==null?void 0:qt.startsWith("Attachment:"),vs=As?qt.replace("Attachment:","").trim():qt;return e.jsxs("div",{className:"group",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx(Ce,{className:` - text-[10px] h-4 px-1.5 - ${(cs=zt.action)!=null&&cs.toLowerCase().includes("rejected")||(mn=zt.action)!=null&&mn.toLowerCase().includes("revoked")?"bg-red-100 text-red-700":(qs=zt.action)!=null&&qs.toLowerCase().includes("approved")?"bg-emerald-100 text-emerald-700":"bg-blue-100 text-blue-700"} - `,children:zt.action||"Action"}),e.jsxs("span",{className:"text-[10px] text-slate-500 font-medium",children:["by ",zt.user||"System",zt.role?` (${zt.role})`:""," • ",Yt(zt.timestamp)]})]}),e.jsx("div",{className:` - p-2.5 rounded-lg border text-sm - ${As?"bg-red-50/50 border-red-100 text-red-900":"bg-slate-50 border-slate-100 text-slate-700"} - `,children:As?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ns,{className:"w-3.5 h-3.5 text-re-red"}),e.jsx("span",{className:"font-medium truncate",children:vs})]}):e.jsx("p",{className:"leading-relaxed",children:vs||"No remarks provided."})})]},fs)})})]})]},De.id)})})]})]})}),e.jsx(Ut,{value:"documents",children:e.jsxs(Le,{children:[e.jsxs(Qe,{className:"flex flex-row items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(Je,{children:"Documents"}),e.jsx(Xt,{children:"View and manage termination case documents"})]}),e.jsxs(se,{size:"sm",onClick:()=>z(!0),className:"bg-re-red hover:bg-re-red-hover",children:[e.jsx(or,{className:"w-4 h-4 mr-2"}),"Upload Document"]})]}),e.jsx(Fe,{children:e.jsxs(Ts,{children:[e.jsx(Ps,{children:e.jsxs(it,{children:[e.jsx(fe,{children:"Document Name"}),e.jsx(fe,{children:"Type"}),e.jsx(fe,{children:"Upload Date"}),e.jsx(fe,{children:"Uploader"}),e.jsx(fe,{children:"Actions"})]})}),e.jsx(Os,{children:(()=>{const De=[...ye.documents||[],...ye.uploadedDocuments||[]];return De.length===0?e.jsx(it,{children:e.jsx(ue,{colSpan:5,className:"text-center py-4 text-slate-500",children:"No documents found"})}):De.map((bt,Te)=>{var ct;return e.jsxs(it,{children:[e.jsx(ue,{children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ns,{className:"w-4 h-4 text-slate-500"}),e.jsx("span",{children:bt.name||bt.fileName})]})}),e.jsx(ue,{children:bt.documentType||bt.type||"Document"}),e.jsx(ue,{children:Yt(bt.uploadDate||bt.createdAt)}),e.jsx(ue,{children:((ct=bt.uploader)==null?void 0:ct.fullName)||bt.uploader||"-"}),e.jsx(ue,{children:e.jsx(se,{size:"sm",variant:"outline",onClick:()=>{const tt=bt.filePath||bt.path||bt.url;if(!tt)return;const jt=tt.startsWith("/uploads/")&&!tt.startsWith("/uploads/documents/")?tt.replace("/uploads/","/uploads/documents/"):tt;J({fileName:bt.name||bt.fileName||"Document",filePath:jt,documentType:bt.documentType||bt.type||"Document"})},children:"View"})})]},bt.id||Te)})})()})]})})]})}),e.jsx(Ut,{value:"audit",children:e.jsxs(Le,{children:[e.jsxs(Qe,{children:[e.jsx(Je,{children:"Audit Trail"}),e.jsx(Xt,{children:"Complete history of actions on this termination case"})]}),e.jsx(Fe,{children:e.jsx("div",{className:"space-y-4",children:C.length>0?C.map((De,bt)=>{var Te,ct,tt,jt,Ht,zt,fs,qt,As,vs,cs;return e.jsxs("div",{className:"flex gap-3 pb-6 border-b border-slate-100 last:border-0 relative",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-slate-300 mt-2 z-10"}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ce,{className:` - ${(De.description||De.action||((Te=De.details)==null?void 0:Te.action)||"").toLowerCase().includes("reject")||(De.description||De.action||((ct=De.details)==null?void 0:ct.action)||"").toLowerCase().includes("revok")?"bg-red-100 text-red-700 border-red-200":(De.description||De.action||((tt=De.details)==null?void 0:tt.action)||"").toLowerCase().includes("sent back")||(De.description||De.action||((jt=De.details)==null?void 0:jt.action)||"").toLowerCase().includes("send back")?"bg-red-50 text-re-red-hover border-red-200":(De.description||De.action||((Ht=De.details)==null?void 0:Ht.action)||"").toLowerCase().includes("approv")||(De.description||De.action||((zt=De.details)==null?void 0:zt.action)||"").toLowerCase().includes("initi")?"bg-emerald-100 text-emerald-700 border-emerald-200":"bg-slate-100 text-slate-700 border-slate-200"} - `,children:De.description||De.action}),e.jsxs("span",{className:"text-xs text-slate-500 font-medium italic",children:["by ",((fs=De.actor)==null?void 0:fs.name)||De.userName||"System"]})]}),e.jsx("span",{className:"text-xs text-slate-500",children:Yt(De.timestamp||De.createdAt)})]}),(De.remarks||((qt=De.newData)==null?void 0:qt.remarks)||((As=De.details)==null?void 0:As.remarks))&&e.jsx("div",{className:"p-3 bg-slate-50 border border-slate-100 rounded-lg text-sm text-slate-700 shadow-sm ml-1",children:De.remarks||((vs=De.newData)==null?void 0:vs.remarks)||((cs=De.details)==null?void 0:cs.remarks)})]})]},bt)}):e.jsx("div",{className:"text-center py-8 text-slate-500",children:e.jsx("p",{children:"No activity logs found for this case."})})})})]})})]}),e.jsx("div",{className:"space-y-6",children:e.jsxs(Le,{children:[e.jsx(Qe,{children:e.jsx(Je,{children:"Actions"})}),e.jsxs(Fe,{className:"space-y-3",children:[(ye.currentStage==="Evaluation of Dealer SCN Response"||ye.currentStage==="Personal Hearing")&&e.jsxs(di,{className:"mb-2 bg-blue-50 border-blue-200",children:[e.jsx(_i,{className:"text-blue-800 text-sm font-semibold",children:"Joint Review Stage"}),e.jsxs(ui,{className:"text-blue-700 text-xs",children:["Joint evaluation by ",e.jsx("strong",{children:"DD-Lead, ZBH, RBM, and DD-Head"})," required before advancing to NBH Final Approval."]})]}),(n==null?void 0:n.role)!=="Dealer"&&e.jsxs(e.Fragment,{children:[!ge.canFinalize&&e.jsxs(e.Fragment,{children:[ge.canApprove&&e.jsxs(se,{className:"w-full bg-green-600 hover:bg-green-700 font-bold",onClick:()=>Vt("approve"),children:[e.jsx(Hn,{className:"w-4 h-4 mr-2"}),"Approve"]}),ge.canIssueSCN&&e.jsxs(se,{className:"w-full bg-purple-600 hover:bg-purple-700",onClick:()=>_(!0),children:[e.jsx(Ha,{className:"w-4 h-4 mr-2"}),"Issue SCN"]}),ge.canUploadSCNResponse&&e.jsxs(se,{className:"w-full bg-re-red hover:bg-re-red-hover",onClick:()=>{E(null),_(!0)},children:[e.jsx(Ns,{className:"w-4 h-4 mr-2"}),"Upload SCN Response"]}),ge.canApprove&&e.jsxs(se,{variant:"outline",className:"w-full",onClick:()=>Vt("sendBack"),children:[e.jsx(sb,{className:"w-4 h-4 mr-2"}),"Send Back"]})]}),ge.canHold&&e.jsxs(se,{variant:"outline",className:"w-full border-orange-200 text-orange-700 hover:bg-orange-50",onClick:()=>Vt("hold"),children:[e.jsx(KI,{className:"w-4 h-4 mr-2"}),"Hold Decision"]}),ge.canFinalize&&e.jsxs(se,{className:"w-full bg-indigo-600 hover:bg-indigo-700",onClick:()=>$(!0),children:[e.jsx(no,{className:"w-4 h-4 mr-2"}),"Final Authorization"]})]}),ge.canPushToFnF&&e.jsxs(se,{variant:"outline",className:"w-full text-blue-600 border-blue-300 hover:bg-blue-50",onClick:()=>Vt("pushfnf"),children:[e.jsx(Gu,{className:"w-4 h-4 mr-2"}),"Push to F&F"]}),et&&!ge.isSettlementPhase&&!ge.canPushToFnF&&!ye.fnfSettlement&&(ye.currentStage==="Terminated"||ye.status===Hc.AWAITING_FNF||ye.status===Hc.AWAITING_FNF_LWD_PENDING)&&!ge.isLwdReached&&e.jsxs(di,{className:"border-red-200 bg-red-50",children:[e.jsx(Ha,{className:"h-4 w-4 text-re-red-hover"}),e.jsxs(_i,{className:"text-red-900",children:["Push to F&F locked until ",Pi]}),e.jsxs(ui,{className:"text-red-800 text-sm",children:[Pi," is"," ",ye.proposedLwd?new Date(ye.proposedLwd).toLocaleDateString("en-IN",{dateStyle:"medium"}):"not set",". Admins are notified by email when the ",Pi.toLowerCase()," is reached."]})]}),!ge.isFinalState&&e.jsxs(se,{variant:"outline",className:"w-full",onClick:()=>Vt("assign"),children:[e.jsx(nb,{className:"w-4 h-4 mr-2"}),"Assign User"]}),e.jsx(ec,{}),e.jsxs(se,{variant:"outline",className:"w-full",onClick:()=>{var De;return r(`/worknotes/termination/${t}`,{state:{applicationName:((De=ye==null?void 0:ye.dealer)==null?void 0:De.businessName)||"Termination",registrationNumber:t||"",participants:(ye==null?void 0:ye.participants)||[]}})},children:[e.jsx(Ga,{className:"w-4 h-4 mr-2"}),"View Work Notes",Ys>0&&e.jsx(Ce,{className:"ml-auto bg-re-red hover:bg-re-red-hover text-white h-5 px-2",children:Ys})]})]})]})})]})]}),e.jsx(ds,{open:i.open,onOpenChange:De=>o({open:De,type:null}),children:e.jsxs(os,{children:[e.jsxs(xs,{children:[e.jsxs(ms,{children:[i.type==="approve"&&"Approve Termination Request",i.type==="withdrawal"&&"Withdraw Termination Request",i.type==="sendBack"&&"Send Back for Clarification",i.type==="revoke"&&"Revoke Termination Request",i.type==="assign"&&"Assign to User",i.type==="pushfnf"&&"Push to Full & Final Settlement",i.type==="hold"&&"Hold Termination Case"]}),e.jsx(bs,{children:i.type==="assign"?"Select a user to assign this request to":i.type==="pushfnf"?"This creates the F&F settlement record and starts departmental clearance (manual step only).":"Please provide remarks for this action"})]}),e.jsx("div",{className:"space-y-4",children:i.type==="assign"?e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{children:"Select User"}),e.jsxs(Dt,{value:f,onValueChange:p,children:[e.jsx(Et,{children:e.jsx(Rt,{placeholder:"Choose a user"})}),e.jsxs(_t,{children:[e.jsx(Me,{value:"rbm",children:"RBM - Regional Business Manager"}),e.jsx(Me,{value:"zbh",children:"ZBH - Zonal Business Head"}),e.jsx(Me,{value:"dd-lead",children:"DD Lead"}),e.jsx(Me,{value:"legal",children:"Legal Team"}),e.jsx(Me,{value:"nbh",children:"NBH - National Business Head"}),e.jsx(Me,{value:"cco",children:"CCO - Chief Commercial Officer"}),e.jsx(Me,{value:"ceo",children:"CEO"})]})]})]}):i.type==="pushfnf"?e.jsxs("div",{className:"space-y-4",children:[e.jsxs("p",{className:"text-sm text-slate-600",children:["F&F can be started on or after the ",Pi,ye.proposedLwd?` (${new Date(ye.proposedLwd).toLocaleDateString("en-IN",{dateStyle:"medium"})})`:"","."]}),e.jsx(de,{children:"Remarks (Optional)"}),e.jsx(Ws,{value:d,onChange:De=>m(De.target.value),placeholder:"Add any additional notes...",rows:3}),e.jsxs("label",{className:"flex items-start gap-2 text-sm text-slate-700 cursor-pointer",children:[e.jsx("input",{type:"checkbox",className:"mt-1",checked:h,onChange:De=>x(De.target.checked)}),e.jsxs("span",{children:["Force initiate F&F before ",Pi," (requires business approval; exception use only)"]})]})]}):e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{children:"Remarks *"}),e.jsx(Ws,{value:d,onChange:De=>m(De.target.value),placeholder:"Enter your remarks here...",rows:4})]})}),e.jsxs(bn,{children:[e.jsx(se,{variant:"outline",onClick:()=>o({open:!1,type:null}),children:"Cancel"}),e.jsx(se,{onClick:Pt,className:i.type==="approve"?"bg-green-600 hover:bg-green-700":i.type==="withdrawal"?"bg-red-600 hover:bg-red-700":i.type==="hold"?"bg-orange-600 hover:bg-orange-700":"bg-blue-600 hover:bg-blue-700",children:"Confirm"})]})]})}),e.jsx(ds,{open:u.open,onOpenChange:De=>N({open:De,stageName:"",documents:[]}),children:e.jsxs(os,{className:Gb,children:[e.jsxs(xs,{children:[e.jsxs(ms,{className:"flex items-center gap-2",children:[e.jsx(Ns,{className:"w-5 h-5 text-re-red"}),"Documents - ",u.stageName]}),e.jsxs(bs,{children:["Documents uploaded for this stage (",u.documents.length," ",u.documents.length===1?"document":"documents",")"]})]}),e.jsx("div",{className:"max-h-96 overflow-y-auto",children:u.documents.length>0?e.jsxs(Ts,{children:[e.jsx(Ps,{children:e.jsxs(it,{children:[e.jsx(fe,{children:"Document Name"}),e.jsx(fe,{children:"Type"}),e.jsx(fe,{children:"Upload Date"}),e.jsx(fe,{children:"Uploader"}),e.jsx(fe,{children:"Action"})]})}),e.jsx(Os,{children:u.documents.map(De=>e.jsxs(it,{children:[e.jsx(ue,{children:De.name}),e.jsx(ue,{children:e.jsx(Ce,{variant:"outline",children:De.type})}),e.jsx(ue,{children:De.uploadDate}),e.jsx(ue,{children:De.uploader}),e.jsx(ue,{children:e.jsxs(se,{size:"sm",variant:"outline",className:"text-re-red hover:text-re-red-hover",onClick:()=>{const bt=De.path;if(!bt)return;const Te=bt.startsWith("/uploads/")&&!bt.startsWith("/uploads/documents/")?bt.replace("/uploads/","/uploads/documents/"):bt;J({fileName:De.name||"Document",filePath:Te,documentType:De.type||"Document"})},children:[e.jsx(Ns,{className:"w-4 h-4 mr-1"}),"View"]})})]},De.id))})]}):e.jsx("div",{className:"text-center py-8 text-slate-500",children:"No documents uploaded for this stage yet"})}),e.jsx(bn,{children:e.jsx(se,{variant:"outline",onClick:()=>N({open:!1,stageName:"",documents:[]}),children:"Close"})})]})}),e.jsx(ds,{open:R,onOpenChange:_,children:e.jsxs(os,{className:"bg-white",children:[e.jsxs(xs,{children:[e.jsx(ms,{children:Be?"Upload SCN Response":"Issue Show Cause Notice (SCN)"}),e.jsx(bs,{children:Be?"Upload the response received from the dealer regarding the SCN.":"Confirm the issuance of a formal Show Cause Notice to the dealer."})]}),e.jsxs("div",{className:"space-y-4 pt-4",children:[Be&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{children:"SCN Response File"}),e.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[e.jsx("input",{type:"file",className:"hidden",id:"scn-file-upload",onChange:De=>{var bt;return E(((bt=De.target.files)==null?void 0:bt[0])||null)}}),e.jsx(se,{variant:"outline",className:"w-full border-dashed",onClick:()=>{var De;return(De=document.getElementById("scn-file-upload"))==null?void 0:De.click()},children:A?A.name:"Select PDF or Image"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{children:"Remarks/Details"}),e.jsx(Ws,{placeholder:"Add any internal remarks or justification...",value:q,onChange:De=>O(De.target.value),rows:4})]}),e.jsxs(bn,{className:"gap-2 sm:gap-0",children:[e.jsx(se,{variant:"outline",onClick:()=>_(!1),disabled:D,children:"Cancel"}),e.jsx(se,{className:Be?"bg-re-red hover:bg-re-red-hover":"bg-purple-600 hover:bg-purple-700",onClick:Be?ce:xe,disabled:D||Be&&!A,children:D?"Processing...":Be?"Upload Response":"Issue SCN"})]})]})]})}),e.jsx(ds,{open:L,onOpenChange:$,children:e.jsxs(os,{className:"bg-white",children:[e.jsxs(xs,{children:[e.jsx(ms,{children:"Final Termination Authorization"}),e.jsx(bs,{children:"Provide your final decision on this termination case."})]}),e.jsxs("div",{className:"space-y-4 pt-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{children:"Final Decision"}),e.jsxs(Dt,{value:Y,onValueChange:De=>Z(De),children:[e.jsx(Et,{className:"mt-2 text-slate-900 border-slate-300",children:e.jsx(Rt,{placeholder:"Select decision"})}),e.jsxs(_t,{className:"bg-white border-slate-200 shadow-xl overflow-visible z-[9999]",children:[e.jsx(Me,{value:"Approve",className:"text-re-red-hover focus:bg-red-50",children:"Confirm Termination"}),e.jsx(Me,{value:"Reject",className:"text-slate-600 focus:bg-slate-50",children:"Reject Termination"}),e.jsx(Me,{value:"Reconsider",className:"text-re-red focus:bg-red-50",children:"Reconsider / Give More Time"})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{children:"Authorization Remarks"}),e.jsx(Ws,{placeholder:"Provide your rationale for this decision...",value:W,onChange:De=>U(De.target.value),rows:4})]}),e.jsxs(bn,{className:"gap-2 sm:gap-0",children:[e.jsx(se,{variant:"outline",onClick:()=>$(!1),disabled:D,children:"Cancel"}),e.jsx(se,{className:"bg-indigo-600 hover:bg-indigo-700",onClick:ve,disabled:D||!W,children:D?"Authorizing...":"Submit Decision"})]})]})]})}),e.jsx(ds,{open:M,onOpenChange:z,children:e.jsxs(os,{children:[e.jsxs(xs,{children:[e.jsx(ms,{children:"Upload Termination Document"}),e.jsx(bs,{children:"Add a document and map it to a stage (optional)."})]}),e.jsxs("div",{className:"space-y-4 pt-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{children:"Document Type"}),e.jsxs(Dt,{value:B,onValueChange:G,children:[e.jsx(Et,{children:e.jsx(Rt,{placeholder:"Select document type"})}),e.jsx(_t,{children:Kg.map(De=>e.jsx(Me,{value:De,children:De},De))})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{children:"Stage (Optional)"}),e.jsxs(Dt,{value:K||"none",onValueChange:De=>H(De==="none"?"":De),children:[e.jsx(Et,{children:e.jsx(Rt,{placeholder:"Select stage"})}),e.jsxs(_t,{children:[e.jsx(Me,{value:"none",children:"No Stage Mapping"}),mV.map(De=>e.jsx(Me,{value:De,children:De},De))]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{children:"File"}),e.jsx("input",{type:"file",onChange:De=>{var bt;return I(((bt=De.target.files)==null?void 0:bt[0])||null)}})]})]}),e.jsxs(bn,{children:[e.jsx(se,{variant:"outline",onClick:()=>z(!1),disabled:D,children:"Cancel"}),e.jsx(se,{onClick:Pe,disabled:D,children:D?"Uploading...":"Upload"})]})]})}),e.jsx(mo,{isOpen:!!X,onClose:()=>J(null),document:X})]})}const ua=t=>{if(!t)return"-";try{const s=new Date(t);return isNaN(s.getTime())?"-":s.toLocaleString("en-IN",{day:"2-digit",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!0})}catch{return"-"}},OS=t=>{if(!t)return"-";try{const s=new Date(t);return isNaN(s.getTime())?"-":s.toLocaleDateString("en-IN",{day:"2-digit",month:"short",year:"numeric"})}catch{return"-"}},p_=({isOpen:t,onClose:s,onSubmit:n,editingBank:r,isSubmitting:a})=>e.jsx(ds,{open:t,onOpenChange:s,children:e.jsxs(os,{className:"sm:max-w-[500px]",children:[e.jsxs(xs,{children:[e.jsx(ms,{children:r?"Edit Bank Details":"Add Bank Account"}),e.jsx(bs,{children:"Enter the dealer's bank information for settlement transfers."})]}),e.jsxs("form",{onSubmit:n,"data-testid":"onboarding-bank-details-form",children:[e.jsxs("div",{className:"grid gap-4 py-4",children:[e.jsxs("div",{className:"grid grid-cols-4 items-center gap-4",children:[e.jsx(de,{htmlFor:"bankName",className:"text-right text-xs",children:"Bank Name"}),e.jsx("div",{className:"col-span-3",children:e.jsx(at,{id:"bankName",name:"bankName",defaultValue:r==null?void 0:r.bankName,required:!0,placeholder:"e.g. HDFC Bank, ICICI Bank",className:"h-9","data-testid":"onboarding-bank-name-input"})})]}),e.jsxs("div",{className:"grid grid-cols-4 items-center gap-4",children:[e.jsx(de,{htmlFor:"accountHolderName",className:"text-right text-xs",children:"Holder Name"}),e.jsx("div",{className:"col-span-3",children:e.jsx(at,{id:"accountHolderName",name:"accountHolderName",defaultValue:r==null?void 0:r.accountHolderName,required:!0,placeholder:"Full name as per bank records",className:"h-9","data-testid":"onboarding-account-holder-name-input"})})]}),e.jsxs("div",{className:"grid grid-cols-4 items-center gap-4",children:[e.jsx(de,{htmlFor:"accountNumber",className:"text-right text-xs",children:"A/C Number"}),e.jsx("div",{className:"col-span-3",children:e.jsx(at,{id:"accountNumber",name:"accountNumber",defaultValue:r==null?void 0:r.accountNumber,required:!0,placeholder:"Enter account number",className:"h-9","data-testid":"onboarding-account-number-input"})})]}),e.jsxs("div",{className:"grid grid-cols-4 items-center gap-4",children:[e.jsx(de,{htmlFor:"ifscCode",className:"text-right text-xs",children:"IFSC Code"}),e.jsx("div",{className:"col-span-3",children:e.jsx(at,{id:"ifscCode",name:"ifscCode",defaultValue:r==null?void 0:r.ifscCode,required:!0,placeholder:"11-character code",className:"h-9","data-testid":"onboarding-ifsc-code-input"})})]}),e.jsxs("div",{className:"grid grid-cols-4 items-center gap-4",children:[e.jsx(de,{htmlFor:"branchName",className:"text-right text-xs",children:"Branch"}),e.jsx("div",{className:"col-span-3",children:e.jsx(at,{id:"branchName",name:"branchName",defaultValue:r==null?void 0:r.branchName,required:!0,placeholder:"Branch location",className:"h-9","data-testid":"onboarding-branch-name-input"})})]}),e.jsx("div",{className:"grid grid-cols-4 items-center gap-4",children:e.jsxs("div",{className:"flex items-center gap-2 col-start-2 col-span-3",children:[e.jsx("input",{type:"checkbox",id:"isPrimaryModal",name:"isPrimary",defaultChecked:r==null?void 0:r.isPrimary,className:"w-4 h-4 rounded border-slate-300 text-re-red focus:ring-re-red","data-testid":"onboarding-is-primary-checkbox"}),e.jsx(de,{htmlFor:"isPrimaryModal",className:"text-xs font-medium cursor-pointer",children:"Set as primary account"})]})})]}),e.jsxs(bn,{children:[e.jsx(se,{type:"button",variant:"outline",size:"sm",onClick:s,"data-testid":"onboarding-bank-details-cancel",children:"Cancel"}),e.jsxs(se,{type:"submit",disabled:a,size:"sm",className:"bg-re-red","data-testid":"onboarding-bank-details-submit",children:[a?e.jsx(ns,{className:"w-4 h-4 animate-spin mr-2"}):null,r?"Update Account":"Save Bank Details"]})]})]})]})}),LS=["Warranty Department","Accessories Department","Sales Department","RTO Department","Service Department","Parts Department","Finance Department","Insurance Department","Inventory Department","Marketing Department","HR Department","IT Department","Legal Department","Quality Department","Logistics Department","Customer Relations Department"],wV="[DEPARTMENT_CLAIM]",SV="[FINANCE_VALIDATED]";function CV({fnfId:t,onBack:s,currentUser:n}){var Bs,Ks,Qs,Xs,$s;const r=tr(),[a,i]=g.useState(null),[o,d]=g.useState(!0),[m,f]=g.useState("details"),[p,h]=g.useState(!1),[x,u]=g.useState(null),[N,v]=g.useState([]),[w,j]=g.useState([]),[b,C]=g.useState(!1),[S,R]=g.useState(null),[_,A]=g.useState(!1),[E,q]=g.useState(!1),[O,D]=g.useState(null),[P,L]=g.useState(!1),[$,Y]=g.useState({remarks:"",amount:0,type:"Receivable"}),[Z,W]=g.useState(null),[U,M]=g.useState(!1),z=g.useRef(null),[T,I]=g.useState(!1),[B,G]=g.useState(""),[K,H]=g.useState(""),[X,J]=g.useState(null);g.useEffect(()=>{Pe(),et()},[t]);const ae=Q=>{if(!Q)return Q;let oe=Q.trim();const we=LS.find(je=>je.toLowerCase()===oe.toLowerCase());if(we)return we;const ke={sales:"Sales Department",service:"Service Department",spares:"Parts Department",parts:"Parts Department","spares / parts":"Parts Department",finance:"Finance Department",accounts:"Finance Department",warranty:"Warranty Department",marketing:"Marketing Department",hr:"HR Department",it:"IT Department",legal:"Legal Department",logistics:"Logistics Department",quality:"Quality Department",fdd:"Finance Department",apparel:"Accessories Department",accessories:"Accessories Department",dms:"IT Department",rto:"Admin Department",admin:"Admin Department","admin / dd-admin":"Admin Department"}[oe.toLowerCase().replace(" department","")];return ke||Q},le=(Q,oe)=>oe==="DepartmentClaim"||typeof Q=="string"&&(Q.startsWith(wV)||Q.includes("Clearance:")),xe=Q=>(Q==null?void 0:Q.sourceType)==="FinanceValidated"&&typeof(Q==null?void 0:Q.description)=="string"&&Q.description.includes("Auto-seeded from department claim"),ce=(Q,oe)=>oe==="FinanceValidated"||typeof Q=="string"&&Q.startsWith(SV),ve=Q=>Q?{ADD_LINE_ITEM:"Line Item Added",UPDATE_LINE_ITEM:"Line Item Updated",REMOVE_LINE_ITEM:"Line Item Removed",UPDATE_CLEARANCE:"Clearance Status Updated",SETTLE_CASE:"Settlement Finalized",FNF_UPDATED:"F&F Case Updated"}[Q]||Q.split("_").map(we=>we.charAt(0).toUpperCase()+we.slice(1).toLowerCase()).join(" "):"Action",Pe=async(Q=!0)=>{var oe,we,Oe,ke,je,Ve,Ge,nt,Zt,Jt,lt,mt,Ds,ss,Ae,be,ut,He,yt,ft,es,ts,Cs,Us,rn,Js,an,hn,De,bt,Te,ct,tt,jt,Ht,zt,fs,qt,As,vs,cs,mn,qs,ln,fn,on,Ye,Ot,St,rt,Ft,jn,xn,qn,En,Hs,Za,Pa,Ls,nn,ta,sa,na,Ir;try{Q&&d(!0);const zn=(await Ee.getFnFSettlementById(t)).data;if(zn.success){const Qt=zn.fnf,Jn=(Qt.lineItems||[]).filter(rs=>rs.isActive!==!1),Wn=Jn.some(rs=>ce(rs.description,rs.sourceType))?Jn.filter(rs=>ce(rs.description,rs.sourceType)):Jn.filter(rs=>!le(rs.description,rs.sourceType)),Er={id:Qt.id,caseNumber:Qt.settlementId||((oe=Qt.resignation)==null?void 0:oe.resignationId)||((we=Qt.terminationRequest)==null?void 0:we.requestId)||Qt.id.substring(0,8),status:Qt.status,requestType:Qt.resignationId?"Resignation":"Termination",dealerName:((ke=(Oe=Qt.outlet)==null?void 0:Oe.dealer)==null?void 0:ke.fullName)||((je=Qt.dealer)==null?void 0:je.fullName)||"N/A",dealerCode:((Ve=Qt.outlet)==null?void 0:Ve.code)||((nt=(Ge=Qt.dealer)==null?void 0:Ge.dealerCode)==null?void 0:nt.dealerCode)||"N/A",dealershipName:((Zt=Qt.outlet)==null?void 0:Zt.name)||((Jt=Qt.dealer)==null?void 0:Jt.businessName)||"N/A",location:((lt=Qt.outlet)==null?void 0:lt.city)||((mt=Qt.outlet)==null?void 0:mt.location)||"N/A",originalRequestId:((Ds=Qt.resignation)==null?void 0:Ds.resignationId)||((ss=Qt.terminationRequest)==null?void 0:ss.requestId)||((Ae=Qt.terminationRequest)==null?void 0:Ae.id)||"N/A",submittedOn:ua(Qt.createdAt),lastOperationalDateSales:(be=Qt.resignation)!=null&&be.lastOperationalDateSales||(ut=Qt.terminationRequest)!=null&&ut.proposedLwd?OS(((He=Qt.resignation)==null?void 0:He.lastOperationalDateSales)||((yt=Qt.terminationRequest)==null?void 0:yt.proposedLwd)):"N/A",lastOperationalDateServices:(ft=Qt.resignation)!=null&&ft.lastOperationalDateServices||(es=Qt.terminationRequest)!=null&&es.proposedLwd?OS(((ts=Qt.resignation)==null?void 0:ts.lastOperationalDateServices)||((Cs=Qt.terminationRequest)==null?void 0:Cs.proposedLwd)):"N/A",typeOfClosure:Qt.resignationId?"Voluntary":"Involuntary",gst:((Js=(rn=(Us=Qt.outlet)==null?void 0:Us.dealer)==null?void 0:rn.dealerProfile)==null?void 0:Js.gstNumber)||((an=Qt.dealer)==null?void 0:an.gstNumber)||"N/A",pan:((bt=(De=(hn=Qt.outlet)==null?void 0:hn.dealer)==null?void 0:De.dealerProfile)==null?void 0:bt.panNumber)||((Te=Qt.dealer)==null?void 0:Te.panNumber)||"N/A",salesCode:((tt=(ct=Qt.dealer)==null?void 0:ct.dealerCode)==null?void 0:tt.salesCode)||((fs=(zt=(Ht=(jt=Qt.outlet)==null?void 0:jt.dealer)==null?void 0:Ht.dealerProfile)==null?void 0:zt.dealerCode)==null?void 0:fs.salesCode)||"N/A",serviceCode:((As=(qt=Qt.dealer)==null?void 0:qt.dealerCode)==null?void 0:As.serviceCode)||((qs=(mn=(cs=(vs=Qt.outlet)==null?void 0:vs.dealer)==null?void 0:cs.dealerProfile)==null?void 0:mn.dealerCode)==null?void 0:qs.serviceCode)||"N/A",gearCode:((fn=(ln=Qt.dealer)==null?void 0:ln.dealerCode)==null?void 0:fn.gearCode)||((St=(Ot=(Ye=(on=Qt.outlet)==null?void 0:on.dealer)==null?void 0:Ye.dealerProfile)==null?void 0:Ot.dealerCode)==null?void 0:St.gearCode)||"N/A",gmaCode:((Ft=(rt=Qt.dealer)==null?void 0:rt.dealerCode)==null?void 0:Ft.gmaCode)||((En=(qn=(xn=(jn=Qt.outlet)==null?void 0:jn.dealer)==null?void 0:xn.dealerProfile)==null?void 0:qn.dealerCode)==null?void 0:En.gmaCode)||"N/A",financeReportStatus:Qt.status==="Finance Approval"?"In Progress":Qt.status==="Completed"?"Completed":"Pending",totalPayableAmount:Wn.filter(rs=>rs.itemType==="Payable").reduce((rs,en)=>rs+(parseFloat(en.amount)||0),0),totalRecoveryAmount:Wn.filter(rs=>rs.itemType==="Receivable"||rs.itemType==="Recovery").reduce((rs,en)=>rs+(parseFloat(en.amount)||0),0),totalDeductions:Wn.filter(rs=>rs.itemType==="Deduction").reduce((rs,en)=>rs+(parseFloat(en.amount)||0),0),allLineItems:Jn,netAmount:0,departmentResponses:[]};Er.netAmount=Er.totalPayableAmount-Er.totalRecoveryAmount-Er.totalDeductions,Er.departmentResponses=["Warranty Department","Accessories Department","Sales Department","RTO Department","Service Department","Parts Department","Finance Department","Insurance Department","Inventory Department","Marketing Department","HR Department","IT Department","Legal Department","Quality Department","Logistics Department","Customer Relations Department"].map(rs=>{const en=(Qt.clearances||[]).find(Cn=>ae(Cn.department)===rs),va=Jn.filter(Cn=>ae(Cn.department)===rs&&le(Cn.description,Cn.sourceType)),wi=Jn.filter(Cn=>ae(Cn.department)===rs&&xe(Cn)),Si=va.length>0?va:wi;let Mr=0,Hr=0;Si.forEach(Cn=>{const ba=Math.abs(parseFloat(Cn.amount)||0);Cn.itemType==="Payable"?Mr+=ba:Hr+=ba});const sr=Mr-Hr,ya=Math.abs(sr)>0,Hi=(en==null?void 0:en.status)||"Pending",bo=ya?"Dues Pending":Hi==="Cleared"?"NOC Submitted":Hi,Oa=sr>0?"payable":sr<0?"recovery":null;return{id:(en==null?void 0:en.id)||`dept-${rs}`,clearanceId:(en==null?void 0:en.id)||null,departmentName:rs,status:bo,duesFlow:Oa,amountType:sr>0?"Payable to dealer":sr<0?"Receivable from dealer":null,amount:Math.abs(sr),submittedDate:en!=null&&en.clearedAt?ua(en.clearedAt):"-",remarks:(en==null?void 0:en.remarks)||"-",supportingDocument:(en==null?void 0:en.supportingDocument)||null}});const _n={...Er,documents:[...(((Hs=Qt.resignation)==null?void 0:Hs.uploadedDocuments)||[]).map(rs=>({id:`res-${rs.id}`,name:rs.fileName,type:"Resignation",uploadDate:ua(rs.createdAt),status:"Verified",url:rs.filePath})),...(Qt.clearances||[]).filter(rs=>rs.supportingDocument).map(rs=>({id:`clr-${rs.id}`,name:rs.supportingDocument.split("/").pop(),type:`${rs.department} Proof`,uploadDate:ua(rs.clearedAt),status:"Attached",url:rs.supportingDocument})),...(Qt.settlementDocs||[]).map(rs=>({id:`set-${rs.id}`,name:rs.fileName,type:"Settlement Proof",uploadDate:ua(rs.createdAt),status:"Finance",url:rs.filePath})),...(Qt.clearanceDocuments||[]).filter(rs=>rs==null?void 0:rs.supportingDocument).map((rs,en)=>({id:rs.id||`fnf-doc-${en}`,name:rs.name||(rs.supportingDocument||"").split("/").pop(),type:rs.documentType||rs.department||"F&F Document",uploadDate:rs.clearedAt?ua(rs.clearedAt):"-",status:"Attached",url:rs.supportingDocument}))],participants:Qt.participants||[]};i(_n);const ur=Qt.bankDetails||((Za=Qt.dealer)==null?void 0:Za.bankDetails)||((nn=(Ls=(Pa=Qt.outlet)==null?void 0:Pa.dealer)==null?void 0:Ls.dealerProfile)==null?void 0:nn.bankDetails);ur&&ur.length>0?j(ur):((sa=(ta=Qt.outlet)==null?void 0:ta.dealer)!=null&&sa.id||Qt.dealerId)&&kt(((Ir=(na=Qt.outlet)==null?void 0:na.dealer)==null?void 0:Ir.id)||Qt.dealerId)}}catch(Xn){console.error("Fetch F&F details error:",Xn),te.error("Failed to fetch settlement details")}finally{Q&&d(!1)}},et=async()=>{try{const oe=(await Ee.getAuditLogs("fnf",t)).data;oe.success&&v(oe.data||[])}catch(Q){console.error("Fetch audit logs error:",Q)}},kt=async Q=>{try{const we=(await Ee.getDealerBankDetails(Q)).data;we.success&&j(we.bankDetails||[])}catch(oe){console.error("Fetch bank details error:",oe)}},vt=async Q=>{var Oe,ke;Q.preventDefault();const oe=new FormData(Q.currentTarget),we=Object.fromEntries(oe.entries());try{A(!0);const je=((ke=(Oe=a==null?void 0:a.outlet)==null?void 0:Oe.dealer)==null?void 0:ke.id)||(a==null?void 0:a.dealerId);if(!je){te.error("Dealer information missing");return}(await Ee.saveBankDetail(je,{...we,id:S==null?void 0:S.id,isPrimary:oe.get("isPrimary")==="on"})).data.success&&(te.success("Bank details saved successfully"),kt(je),C(!1),R(null))}catch{te.error("Failed to save bank details")}finally{A(!1)}},ee=async Q=>{var oe,we;if(confirm("Are you sure you want to delete this bank account?"))try{if((await Ee.deleteBankDetail(Q)).data.success){te.success("Bank detail deleted");const ke=((we=(oe=a==null?void 0:a.outlet)==null?void 0:oe.dealer)==null?void 0:we.id)||(a==null?void 0:a.dealerId);ke&&kt(ke)}}catch{te.error("Failed to delete bank detail")}};if(o)return e.jsx("div",{className:"flex items-center justify-center p-12",children:e.jsx(ns,{className:"w-8 h-8 animate-spin text-re-red"})});if(!a)return e.jsxs("div",{className:"text-center py-12",children:[e.jsx("p",{className:"text-slate-600",children:"Case not found"}),e.jsx(se,{onClick:s,className:"mt-4",children:"Go Back"})]});const ye=(Q=>{const oe=new Date(Q),Oe=Math.abs(new Date().getTime()-oe.getTime());return Math.ceil(Oe/(1e3*60*60*24))})(a.submittedOn),Be=String((n==null?void 0:n.role)||"").toLowerCase(),$e=Be.includes("super admin")||Be.includes("dd admin"),dt=Q=>{if(!a||!Q)return!1;const oe=Be;if(!oe||Q.status!=="Pending")return!1;const Oe=["Finance Approval","Completed"].includes(a.status),ke=oe.includes("super admin")||oe.includes("finance")||oe.includes("dd admin");if(Oe&&!ke)return!1;if(ke)return!0;const je=Q.departmentName.replace(" Department","").toLowerCase();return oe.includes(je)},st=((a==null?void 0:a.departmentResponses)||[]).some(Q=>dt(Q)),xt=async()=>{var Q;if(!(O!=null&&O.clearanceId)||!t){te.error("Clearance record not available for this department");return}try{L(!0);const oe=new FormData,we=Number($.amount)>0?"Dues Pending":"NOC Submitted";oe.append("status",we),oe.append("remarks",$.remarks),oe.append("amount",String($.amount)),oe.append("type",$.type),Z&&oe.append("file",Z);const Oe=await Ee.updateFnFClearance(t,O.clearanceId,oe);if(!Oe.ok){te.error(((Q=Oe.data)==null?void 0:Q.message)||"Failed to update department clearance"),L(!1);return}te.success(`Clearance updated for ${O.departmentName}`),q(!1),W(null),f("departments"),Pe(!1)}catch(oe){console.error("Update clearance error:",oe),te.error("Failed to update department clearance")}finally{L(!1)}},Mt=Q=>{var we;const oe=((we=Q.target.files)==null?void 0:we[0])||null;J(oe)},It=()=>{I(!1),G(""),H(""),J(null),z.current&&(z.current.value="")},he=async()=>{var oe,we,Oe,ke;const Q=B.trim();if(!Q){te.error("Please enter a document name.");return}if(!X){te.error("Please choose a file to upload.");return}if(!t){te.error("Cannot upload — settlement id is missing.");return}M(!0);try{const je=new FormData;je.append("file",X),je.append("documentName",Q),K.trim()&&je.append("documentType",K.trim());const Ve=await Ee.uploadFnFDocument(t,je);(oe=Ve.data)!=null&&oe.success?(te.success("Document uploaded successfully"),It(),Pe(!1)):te.error(((we=Ve.data)==null?void 0:we.message)||"Failed to upload document")}catch(je){console.error("Upload F&F document error:",je),te.error(((ke=(Oe=je==null?void 0:je.response)==null?void 0:Oe.data)==null?void 0:ke.message)||"Failed to upload document")}finally{M(!1)}},pt=()=>{te.success("Notifications sent to all 16 departments"),h(!1)},ht=Q=>{switch(Q){case"New":return"bg-red-50 text-blue-700 border-blue-300";case"In Progress":return"bg-yellow-100 text-yellow-700 border-yellow-300";case"Under Review":return"bg-orange-100 text-orange-700 border-orange-300";case"Completed":return"bg-green-100 text-green-700 border-green-300";default:return"bg-slate-100 text-slate-700 border-slate-300"}},_e=Q=>{switch(Q){case"NOC Submitted":return"bg-green-100 text-green-700 border-green-300";case"Dues Pending":return"bg-red-100 text-red-700 border-red-300";case"Pending":return"bg-slate-100 text-slate-700 border-slate-300";default:return"bg-slate-100 text-slate-700 border-slate-300"}},Vt=a.departmentResponses.filter(Q=>Q.status!=="Pending").length,Pt=a.departmentResponses.length,_s=Vt/Pt*100,Ys=LS.map(Q=>{const oe=(a.departmentResponses||[]).find(lt=>lt.departmentName===Q),we=Number(oe==null?void 0:oe.amount)||0,Oe=(oe==null?void 0:oe.amountType)||"-",ke=(a.allLineItems||[]).filter(lt=>ae(lt.department)===Q),je=ke.filter(lt=>lt.sourceType==="FinanceValidated"&<.itemType==="Payable").reduce((lt,mt)=>lt+Math.abs(parseFloat(mt.amount)||0),0),Ve=ke.filter(lt=>lt.sourceType==="FinanceValidated"&&(lt.itemType==="Receivable"||lt.itemType==="Recovery")).reduce((lt,mt)=>lt+Math.abs(parseFloat(mt.amount)||0),0),Ge=ke.filter(lt=>lt.sourceType==="FinanceValidated"&<.itemType==="Deduction").reduce((lt,mt)=>lt+Math.abs(parseFloat(mt.amount)||0),0),nt=je-Ve-Ge,Zt=Math.abs(nt),Jt=nt>0?"Payable":nt<0?"Receivable":"-";return{department:Q,claimAmount:we,claimType:Oe,validatedAmount:Zt,validatedType:Jt,variance:Zt-we}});return e.jsxs("div",{className:"space-y-6",children:[e.jsx(Le,{className:`border-none shadow-md bg-gradient-to-r ${(a.totalRecoveryAmount||0)>(a.totalPayableAmount||0)?"from-red-600 to-red-500":"from-green-600 to-green-500"} text-white`,children:e.jsxs(Fe,{className:"p-6 flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"p-3 bg-white/20 rounded-full",children:e.jsx(dk,{className:"w-6 h-6"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-white/80 text-sm font-medium",children:"Net Settlement Balance"}),e.jsxs("h2",{className:"text-3xl font-bold",children:["₹",Math.abs(a.netAmount||0).toLocaleString()]})]})]}),e.jsxs("div",{className:"text-right",children:[e.jsx(Ce,{className:"bg-white/20 hover:bg-white/30 text-white border-none px-4 py-1 mb-2",children:(a.totalRecoveryAmount||0)>(a.totalPayableAmount||0)?"Receivable from Dealer":"Payable to Dealer"}),e.jsx("p",{className:"text-xs text-white/70",children:a.status==="Completed"?"Settlement Finalized":"Draft Calculation"})]})]})}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(se,{variant:"outline",size:"icon",onClick:s,children:e.jsx(Jr,{className:"w-4 h-4"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl",children:a.caseNumber}),e.jsx("p",{className:"text-slate-600",children:a.dealerName})]}),e.jsx(Ce,{className:ht(a.status),children:a.status}),e.jsx(Ce,{className:a.requestType==="Resignation"?"bg-red-50 text-re-red-hover border-red-300":"bg-red-100 text-red-700 border-red-300",children:a.requestType})]}),e.jsx("div",{className:"flex items-center gap-3",children:e.jsxs(se,{variant:"outline",onClick:()=>r(`/worknotes/fnf/${t}`,{state:{applicationName:a.dealerName||"F&F Settlement",registrationNumber:a.caseNumber||"",participants:a.participants||[]}}),children:[e.jsx(Ga,{className:"w-4 h-4 mr-2"}),"View Work Notes"]})})]}),e.jsxs(Le,{children:[e.jsxs(Qe,{children:[e.jsx(Je,{children:"Overall Progress"}),e.jsxs(Xt,{children:["Department responses: ",Vt," / ",Pt]})]}),e.jsxs(Fe,{children:[e.jsx(dc,{value:_s,className:"h-3"}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mt-6",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600 text-sm",children:"NOC Submitted"}),e.jsx("p",{className:"text-2xl text-green-600",children:a.departmentResponses.filter(Q=>Q.status==="NOC Submitted").length})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600 text-sm",children:"Dues Pending"}),e.jsx("p",{className:"text-2xl text-red-600",children:a.departmentResponses.filter(Q=>Q.status==="Dues Pending").length})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600 text-sm",children:"Pending"}),e.jsx("p",{className:"text-2xl text-slate-600",children:a.departmentResponses.filter(Q=>Q.status==="Pending").length})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600 text-sm",children:"Finance Status"}),e.jsx("p",{className:"text-lg",children:a.financeReportStatus})]})]})]})]}),e.jsxs(Bn,{value:m,onValueChange:f,className:"w-full",children:[e.jsxs($n,{children:[e.jsx(Wt,{value:"progress",children:"Progress"}),e.jsx(Wt,{value:"details",children:"Case Details"}),e.jsx(Wt,{value:"departments",children:"Department Responses"}),$e&&e.jsx(Wt,{value:"documents",children:"Documents"}),e.jsx(Wt,{value:"audit",children:"Audit Trail"})]}),e.jsx(Ut,{value:"progress",children:e.jsxs(Le,{children:[e.jsxs(Qe,{children:[e.jsx(Je,{children:"F&F Settlement Progress"}),e.jsx(Xt,{children:"Track the complete journey from initiation to completion"})]}),e.jsx(Fe,{children:e.jsx("div",{className:"relative",children:e.jsxs("div",{className:"space-y-8",children:[e.jsxs("div",{className:"flex gap-4 items-start",children:[e.jsxs("div",{className:"flex shrink-0 flex-col items-center",children:[e.jsx("div",{className:"size-12 shrink-0 aspect-square rounded-full bg-green-100 border-2 border-green-600 flex items-center justify-center",children:e.jsx(Hn,{className:"w-6 h-6 text-green-600"})}),e.jsx("div",{className:"w-0.5 h-full bg-green-300 mt-2"})]}),e.jsxs("div",{className:"flex-1 pb-8",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("h3",{className:"text-slate-900",children:"F&F Initiated"}),e.jsx(Ce,{className:"bg-green-600",children:"Completed"})]}),e.jsx("span",{className:"text-sm text-slate-600",children:a.submittedOn})]}),e.jsx("p",{className:"text-slate-600 text-sm mb-3",children:"Full & Final settlement process has been initiated. Case created and basic information collected."}),e.jsx(Le,{className:"bg-green-50 border-green-200",children:e.jsx(Fe,{className:"p-4",children:e.jsxs("div",{className:"grid grid-cols-2 gap-4 text-sm",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Case Number"}),e.jsx("p",{className:"text-slate-900",children:a.caseNumber})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Request Type"}),e.jsx("p",{className:"text-slate-900",children:a.requestType})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Dealer"}),e.jsx("p",{className:"text-slate-900",children:a.dealerName})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-600",children:"Location"}),e.jsx("p",{className:"text-slate-900",children:a.location})]})]})})})]})]}),e.jsxs("div",{className:"flex gap-4 items-start",children:[e.jsxs("div",{className:"flex shrink-0 flex-col items-center",children:[e.jsx("div",{className:`size-12 shrink-0 aspect-square rounded-full flex items-center justify-center border-2 ${Vt===Pt||["Finance Approval","Completed"].includes(a.status)?"bg-green-100 border-green-600":Vt>0?"bg-red-50 border-re-red":"bg-slate-100 border-slate-300"}`,children:Vt===Pt||["Finance Approval","Completed"].includes(a.status)?e.jsx(Hn,{className:"w-6 h-6 text-green-600"}):Vt>0?e.jsx(Ra,{className:"w-6 h-6 text-re-red"}):e.jsx(vn,{className:"w-6 h-6 text-slate-400"})}),e.jsx("div",{className:`w-0.5 h-full mt-2 ${Vt===Pt||["Finance Approval","Completed"].includes(a.status)?"bg-green-300":"bg-slate-200"}`})]}),e.jsxs("div",{className:"flex-1 pb-8",children:[e.jsx("div",{className:"flex items-center justify-between mb-2",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("h3",{className:"text-slate-900",children:"Department Responses Received"}),e.jsx(Ce,{className:Vt===Pt||["Finance Approval","Completed"].includes(a.status)?"bg-green-600":Vt>0?"bg-re-red":"bg-slate-400",children:Vt===Pt||["Finance Approval","Completed"].includes(a.status)?"Completed":Vt>0?"In Progress":"Pending"})]})}),e.jsxs("p",{className:"text-slate-600 text-sm mb-3",children:["All stakeholder departments submit their NOC or dues information.",Vt>0&&` (${Vt}/${Pt} responses received)`]}),Vt>0&&e.jsx(Le,{className:Vt===Pt||["Finance Approval","Completed"].includes(a.status)?"bg-green-50 border-green-200":"bg-blue-50 border-red-200",children:e.jsx(Fe,{className:"p-4",children:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-sm text-slate-600",children:"Progress"}),e.jsxs("span",{className:"text-sm",children:[Vt," / ",Pt," ","departments"]})]}),e.jsx(dc,{value:_s,className:"h-2"}),e.jsxs("div",{className:"grid grid-cols-3 gap-3 text-sm",children:[e.jsxs("div",{className:"text-center p-2 bg-green-100 rounded",children:[e.jsx("p",{className:"text-green-700",children:"NOC Submitted"}),e.jsx("p",{className:"text-green-900",children:a.departmentResponses.filter(Q=>Q.status==="NOC Submitted").length})]}),e.jsxs("div",{className:"text-center p-2 bg-red-100 rounded",children:[e.jsx("p",{className:"text-red-700",children:"Dues Pending"}),e.jsx("p",{className:"text-red-900",children:a.departmentResponses.filter(Q=>Q.status==="Dues Pending").length})]}),e.jsxs("div",{className:"text-center p-2 bg-slate-100 rounded",children:[e.jsx("p",{className:"text-slate-700",children:"Pending"}),e.jsx("p",{className:"text-slate-900",children:a.departmentResponses.filter(Q=>Q.status==="Pending").length})]})]})]})})})]})]}),e.jsxs("div",{className:"flex gap-4 items-start",children:[e.jsxs("div",{className:"flex shrink-0 flex-col items-center",children:[e.jsx("div",{className:`size-12 shrink-0 aspect-square rounded-full flex items-center justify-center border-2 ${a.status==="Completed"?"bg-green-100 border-green-600":a.status==="Finance Approval"?"bg-red-50 border-re-red":"bg-slate-100 border-slate-300"}`,children:a.status==="Completed"?e.jsx(Hn,{className:"w-6 h-6 text-green-600"}):a.status==="Finance Approval"?e.jsx(hu,{className:"w-6 h-6 text-re-red"}):e.jsx(vn,{className:"w-6 h-6 text-slate-400"})}),e.jsx("div",{className:`w-0.5 h-full mt-2 ${a.status==="Completed"?"bg-green-300":"bg-slate-200"}`})]}),e.jsxs("div",{className:"flex-1 pb-8",children:[e.jsx("div",{className:"flex items-center justify-between mb-2",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("h3",{className:"text-slate-900",children:"Finance Final Summary"}),e.jsx(Ce,{className:a.status==="Completed"?"bg-green-600":a.status==="Finance Approval"?"bg-re-red":"bg-slate-400",children:a.status==="Completed"?"Completed":a.status==="Finance Approval"?"In Progress":"Pending"})]})}),e.jsx("p",{className:"text-slate-600 text-sm mb-3",children:"Finance department consolidates all department responses and prepares final settlement summary with total payable and recovery amounts."}),["Finance Approval","Completed"].includes(a.status)&&e.jsx(Le,{className:a.status==="Completed"?"bg-green-50 border-green-200":"bg-blue-50 border-red-200",children:e.jsx(Fe,{className:"p-4",children:e.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[e.jsxs("div",{className:"text-center p-3 bg-green-100 rounded-lg",children:[e.jsx("p",{className:"text-xs text-green-700 mb-1",children:"Payable Amount"}),e.jsxs("p",{className:"text-green-900",children:["₹",((Bs=a.totalPayableAmount)==null?void 0:Bs.toLocaleString())||"0"]})]}),e.jsxs("div",{className:"text-center p-3 bg-red-100 rounded-lg",children:[e.jsx("p",{className:"text-xs text-red-700 mb-1",children:"Receivable amount"}),e.jsxs("p",{className:"text-red-900",children:["₹",((Ks=a.totalRecoveryAmount)==null?void 0:Ks.toLocaleString())||"0"]})]}),e.jsxs("div",{className:"text-center p-3 bg-red-50 rounded-lg",children:[e.jsx("p",{className:"text-xs text-blue-700 mb-1",children:"Net Amount"}),e.jsxs("p",{className:(a.totalRecoveryAmount||0)>(a.totalPayableAmount||0)?"text-red-900":"text-green-900",children:["₹",Math.abs((a.totalRecoveryAmount||0)-(a.totalPayableAmount||0)).toLocaleString()]})]})]})})})]})]}),e.jsxs("div",{className:"flex gap-4 items-start",children:[e.jsxs("div",{className:"flex shrink-0 flex-col items-center",children:[e.jsx("div",{className:`size-12 shrink-0 aspect-square rounded-full flex items-center justify-center border-2 ${a.status==="Completed"?"bg-green-100 border-green-600":a.status==="Finance Approval"?"bg-red-50 border-re-red":"bg-slate-100 border-slate-300"}`,children:a.status==="Completed"?e.jsx(Hn,{className:"w-6 h-6 text-green-600"}):a.status==="Finance Approval"?e.jsx(Ga,{className:"w-6 h-6 text-re-red"}):e.jsx(vn,{className:"w-6 h-6 text-slate-400"})}),e.jsx("div",{className:`w-0.5 h-full mt-2 ${a.status==="Completed"?"bg-green-300":"bg-slate-200"}`})]}),e.jsxs("div",{className:"flex-1 pb-8",children:[e.jsx("div",{className:"flex items-center justify-between mb-2",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("h3",{className:"text-slate-900",children:"Financial Discussion with Dealer"}),e.jsx(Ce,{className:a.status==="Completed"?"bg-green-600":a.status==="Finance Approval"?"bg-re-red":"bg-slate-400",children:a.status==="Completed"?"Completed":a.status==="Finance Approval"?"In Progress":"Pending"})]})}),e.jsx("p",{className:"text-slate-600 text-sm mb-3",children:"Finance team, legal team, and relevant departments discuss final settlement with the dealer. Dealer reviews and agrees to the financial terms."}),a.status==="Finance Approval"&&e.jsx(Le,{className:"bg-orange-50 border-orange-200",children:e.jsx(Fe,{className:"p-4",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(sn,{className:"w-5 h-5 text-orange-600 mt-0.5"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-orange-900 mb-1",children:"Ongoing Discussions"}),e.jsx("p",{className:"text-xs text-orange-700",children:"Negotiations in progress regarding recovery/payable amounts. Finance team is working with departments and dealer to resolve discrepancies."})]})]})})})]})]}),e.jsxs("div",{className:"flex gap-4 items-start",children:[e.jsxs("div",{className:"flex shrink-0 flex-col items-center",children:[e.jsx("div",{className:`size-12 shrink-0 aspect-square rounded-full flex items-center justify-center border-2 ${a.status==="Completed"?"bg-green-100 border-green-600":"bg-slate-100 border-slate-300"}`,children:a.status==="Completed"?e.jsx(Hn,{className:"w-6 h-6 text-green-600"}):e.jsx(vn,{className:"w-6 h-6 text-slate-400"})}),e.jsx("div",{className:`w-0.5 h-full mt-2 ${a.status==="Completed"?"bg-green-300":"bg-slate-200"}`})]}),e.jsxs("div",{className:"flex-1 pb-8",children:[e.jsx("div",{className:"flex items-center justify-between mb-2",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("h3",{className:"text-slate-900",children:"Full and Final Settlement"}),e.jsx(Ce,{className:a.status==="Completed"?"bg-green-600":"bg-slate-400",children:a.status==="Completed"?"Completed":"Pending"})]})}),e.jsx("p",{className:"text-slate-600 text-sm mb-3",children:"All financial settlements are processed. Payments made or recoveries completed as per agreed terms. All documentation finalized."})]})]}),e.jsxs("div",{className:"flex gap-4 items-start",children:[e.jsx("div",{className:"flex shrink-0 flex-col items-center",children:e.jsx("div",{className:`size-12 shrink-0 aspect-square rounded-full flex items-center justify-center border-2 ${a.status==="Completed"?"bg-green-100 border-green-600":"bg-slate-100 border-slate-300"}`,children:a.status==="Completed"?e.jsx(Zn,{className:"w-6 h-6 text-green-600"}):e.jsx(vn,{className:"w-6 h-6 text-slate-400"})})}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("h3",{className:"text-slate-900",children:"F&F Complete"}),e.jsx(Ce,{className:a.status==="Completed"?"bg-green-600":"bg-slate-400",children:a.status==="Completed"?"Completed":"Pending"})]}),a.status==="Completed"&&e.jsx("span",{className:"text-sm text-slate-600",children:a.settlementDate||"Oct 15, 2025"})]}),e.jsx("p",{className:"text-slate-600 text-sm mb-3",children:"Full & Final settlement process completed successfully. Case closed. All obligations fulfilled."}),a.status==="Completed"&&e.jsx(Le,{className:"bg-gradient-to-r from-green-50 to-blue-50 border-green-300",children:e.jsx(Fe,{className:"p-4",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"size-12 shrink-0 aspect-square rounded-full bg-green-600 flex items-center justify-center",children:e.jsx(Zn,{className:"w-7 h-7 text-white"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-green-900",children:"Settlement Successfully Completed"}),e.jsxs("p",{className:"text-xs text-green-700 mt-1",children:["All processes completed. Case Number:"," ",a.caseNumber]})]})]})})})]})]})]})})})]})}),e.jsxs(Ut,{value:"details",className:"space-y-6",children:[e.jsxs(Le,{children:[e.jsx(Qe,{children:e.jsx(Je,{children:"Basic Information"})}),e.jsx(Fe,{children:e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-6",children:[e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Case Number"}),e.jsx("p",{children:a.caseNumber})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Dealer Code"}),e.jsx("p",{children:a.dealerCode})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Dealer Name"}),e.jsx("p",{children:a.dealerName})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Dealership Name"}),e.jsx("p",{children:a.dealershipName})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Location"}),e.jsx("p",{children:a.location})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Request Type"}),e.jsx("p",{children:a.requestType})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Original Request ID"}),e.jsx("p",{children:a.originalRequestId})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Submitted On"}),e.jsx("p",{children:a.submittedOn})]})]})})]}),e.jsxs(Le,{className:"border-red-200 bg-blue-50/30",children:[e.jsx(Qe,{children:e.jsx(Je,{className:"text-blue-900",children:"F&F Settlement Information"})}),e.jsx(Fe,{children:e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-6",children:[e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Last Operational Date (Sales)"}),e.jsx("p",{children:a.lastOperationalDateSales})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Last Operational Date (Services)"}),e.jsx("p",{children:a.lastOperationalDateServices})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Submitted Date (F&F Start)"}),e.jsx("p",{children:a.submittedOn})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Days Elapsed since Submission"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("p",{children:[ye," days"]}),e.jsx(Ce,{variant:"outline",className:ye<30?"bg-green-100 text-green-700 border-green-300":ye<60?"bg-yellow-100 text-yellow-700 border-yellow-300":"bg-red-100 text-red-700 border-red-300",children:ye<30?"Recent":ye<60?"In Progress":"Overdue"})]})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Type of Closure"}),e.jsx("p",{children:a.typeOfClosure})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"GST"}),e.jsx("p",{children:a.gst})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Sales Code"}),e.jsx("p",{children:a.salesCode})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Service Code"}),e.jsx("p",{children:a.serviceCode})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"Gear Code"}),e.jsx("p",{children:a.gearCode})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-600",children:"GMA Code"}),e.jsx("p",{children:a.gmaCode})]})]})})]}),a.status==="Under Review"&&e.jsxs(Le,{className:"border-orange-200 bg-orange-50",children:[e.jsxs(Qe,{children:[e.jsx(Je,{className:"text-orange-900",children:"Under Review"}),e.jsx(Xt,{className:"text-orange-700",children:"This case is under negotiation/discussion with the dealer, finance team, legal team, and relevant departments"})]}),e.jsx(Fe,{children:e.jsx("p",{className:"text-sm text-orange-800",children:"Discussions ongoing regarding recovery/payable amounts. Finance team is working with departments to resolve discrepancies."})})]})]}),e.jsxs(Ut,{value:"departments",children:[e.jsxs(Le,{children:[e.jsxs(Qe,{children:[e.jsxs(Je,{children:["Department Responses (",Vt," / ",Pt,")"]}),e.jsx(Xt,{children:"Status of NOC and dues from all departments"})]}),e.jsx(Fe,{children:e.jsxs(Ts,{children:[e.jsx(Ps,{children:e.jsxs(it,{children:[e.jsx(fe,{children:"Department"}),e.jsx(fe,{children:"Status"}),e.jsx(fe,{children:"Amount Type"}),e.jsx(fe,{children:"Amount"}),e.jsx(fe,{children:"Submitted Date"}),e.jsx(fe,{children:"Remarks"}),st&&e.jsx(fe,{children:"Actions"})]})}),e.jsx(Os,{children:a.departmentResponses.map(Q=>e.jsxs(it,{children:[e.jsx(ue,{children:Q.departmentName}),e.jsx(ue,{children:e.jsx(Ce,{className:_e(Q.status),children:Q.status})}),e.jsx(ue,{children:Q.amountType?e.jsx(Ce,{variant:"outline",className:Q.duesFlow==="recovery"?"bg-red-100 text-red-900 border-red-400 font-semibold":"bg-emerald-100 text-emerald-900 border-emerald-400 font-semibold",children:Q.amountType}):"-"}),e.jsx(ue,{children:Q.amount?e.jsxs("span",{className:`font-semibold tabular-nums ${Q.duesFlow==="recovery"?"text-red-700":"text-emerald-700"}`,children:["₹",Q.amount.toLocaleString()]}):"-"}),e.jsx(ue,{children:Q.submittedDate||"-"}),e.jsx(ue,{className:"max-w-xs truncate",children:Q.remarks||"-"}),st&&e.jsx(ue,{children:dt(Q)?e.jsx(se,{variant:"ghost",size:"sm",className:"text-re-red hover:text-blue-700",onClick:()=>{D(Q),Y({remarks:Q.remarks==="-"?"":Q.remarks,amount:Q.amount||0,type:Q.duesFlow==="payable"?"Payable":"Receivable"}),W(null),q(!0)},children:"Action"}):e.jsx("span",{className:"text-slate-400 text-sm",children:"-"})})]},Q.id))})]})})]}),e.jsxs(Le,{className:"border-blue-200 bg-blue-50 mt-6",children:[e.jsxs(Qe,{children:[e.jsx(Je,{children:"Department Claim vs Finance Validation"}),e.jsx(Xt,{children:"Final settlement totals are based on finance validated values."})]}),e.jsx(Fe,{children:e.jsxs(Ts,{children:[e.jsx(Ps,{children:e.jsxs(it,{children:[e.jsx(fe,{children:"Department"}),e.jsx(fe,{children:"Department Claim"}),e.jsx(fe,{children:"Finance Validated"}),e.jsx(fe,{children:"Variance"})]})}),e.jsx(Os,{children:Ys.map(Q=>e.jsxs(it,{children:[e.jsx(ue,{children:Q.department}),e.jsx(ue,{children:Q.claimAmount>0?`${Q.claimType} ₹${Q.claimAmount.toLocaleString()}`:"-"}),e.jsx(ue,{children:Q.validatedAmount>0?`${Q.validatedType} ₹${Q.validatedAmount.toLocaleString()}`:"-"}),e.jsx(ue,{className:Q.variance===0?"text-slate-600":Q.variance>0?"text-red-600":"text-green-600",children:Q.claimAmount===0&&Q.validatedAmount===0?"-":`₹${Q.variance.toLocaleString()}`})]},Q.department))})]})})]}),e.jsxs(Le,{className:"mt-6",children:[e.jsxs(Qe,{children:[e.jsx(Je,{children:"Financial Summary"}),e.jsx(Xt,{children:"Consolidated view of all payable and receivable amounts"})]}),e.jsx(Fe,{children:e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[e.jsxs("div",{className:"p-6 bg-green-50 rounded-lg border border-green-200",children:[e.jsx("p",{className:"text-sm text-green-700 mb-2",children:"Total Payable Amount"}),e.jsxs("p",{className:"text-3xl text-green-600",children:["₹",((Qs=a.totalPayableAmount)==null?void 0:Qs.toLocaleString())||"0"]}),e.jsx("p",{className:"text-xs text-green-600 mt-1",children:"Amount to be paid to dealer"})]}),e.jsxs("div",{className:"p-6 bg-red-50 rounded-lg border border-red-200",children:[e.jsx("p",{className:"text-sm text-red-700 mb-2",children:"Total receivable amount"}),e.jsxs("p",{className:"text-3xl text-red-600",children:["₹",((Xs=a.totalRecoveryAmount)==null?void 0:Xs.toLocaleString())||"0"]}),e.jsx("p",{className:"text-xs text-red-600 mt-1",children:"Amount receivable from dealer"})]}),e.jsxs("div",{className:"p-6 bg-red-50 rounded-lg border border-red-200",children:[e.jsx("p",{className:"text-sm text-re-red-hover mb-2",children:"Total Deductions"}),e.jsxs("p",{className:"text-3xl text-re-red font-bold",children:["₹",(($s=a.totalDeductions)==null?void 0:$s.toLocaleString())||"0"]}),e.jsx("p",{className:"text-xs text-re-red mt-1",children:"Warranty holdbacks / Policy penalties"})]}),e.jsxs("div",{className:"p-6 bg-blue-50 rounded-lg border border-blue-200",children:[e.jsx("p",{className:"text-sm text-blue-700 mb-2",children:"Net Settlement Amount"}),e.jsxs("p",{className:`text-3xl font-extrabold ${(a.netAmount||0)<0?"text-red-600":"text-green-600"}`,children:["₹",Math.abs(a.netAmount||0).toLocaleString()]}),e.jsx("p",{className:"text-xs text-blue-600 mt-1",children:(a.netAmount||0)<0?"Receivable from dealer":"Payment to dealer"})]})]})})]}),e.jsxs(Le,{className:"mt-6",children:[e.jsx(Qe,{children:e.jsx(Je,{children:"Finance Report Status"})}),e.jsxs(Fe,{children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(Ce,{className:a.financeReportStatus==="Completed"?"bg-green-100 text-green-700 border-green-300":a.financeReportStatus==="In Progress"?"bg-yellow-100 text-yellow-700 border-yellow-300":"bg-slate-100 text-slate-700 border-slate-300",children:a.financeReportStatus}),a.financeReportStatus==="Pending"&&e.jsx("p",{className:"text-slate-600 text-sm",children:"Waiting for all department responses before finance can prepare final report"}),a.financeReportStatus==="In Progress"&&e.jsx("p",{className:"text-slate-600 text-sm",children:"Finance team is reviewing department responses and preparing final settlement report"})]}),a.financeRemarks&&e.jsxs("div",{className:"mt-4 p-4 bg-slate-50 rounded-lg",children:[e.jsx(de,{className:"text-slate-600",children:"Finance Remarks"}),e.jsx("p",{className:"mt-1",children:a.financeRemarks})]})]})]})]}),$e&&e.jsx(Ut,{value:"documents",children:e.jsxs(Le,{children:[e.jsxs(Qe,{className:"flex flex-row items-start justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx(Je,{children:"Documents"}),e.jsx(Xt,{children:"All NOC documents and due statements from departments"})]}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsxs(se,{onClick:()=>I(!0),disabled:U,className:"bg-re-red hover:bg-re-red-hover text-white","data-testid":"fnf-upload-docs-btn",children:[U?e.jsx(ns,{className:"w-4 h-4 mr-2 animate-spin"}):e.jsx(or,{className:"w-4 h-4 mr-2"}),U?"Uploading...":"Upload Document"]})})]}),e.jsx(Fe,{children:e.jsxs(Ts,{children:[e.jsx(Ps,{children:e.jsxs(it,{children:[e.jsx(fe,{children:"Document Name"}),e.jsx(fe,{children:"Type"}),e.jsx(fe,{children:"Upload Date"}),e.jsx(fe,{children:"Status"}),e.jsx(fe,{children:"Actions"})]})}),e.jsxs(Os,{children:[(a.documents||[]).length===0&&e.jsx(it,{children:e.jsxs(ue,{colSpan:5,className:"text-center text-slate-500 py-8",children:["No documents uploaded yet. Click ",e.jsx("span",{className:"font-medium",children:"Upload Documents"})," to add files."]})}),(a.documents||[]).map(Q=>e.jsxs(it,{children:[e.jsx(ue,{children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ns,{className:"w-4 h-4 text-slate-500"}),e.jsx("span",{children:Q.name})]})}),e.jsx(ue,{children:Q.type}),e.jsx(ue,{children:Q.uploadDate}),e.jsx(ue,{children:e.jsx(Ce,{variant:Q.status==="Verified"?"default":"secondary",children:Q.status})}),e.jsx(ue,{children:e.jsx(se,{size:"sm",variant:"outline",onClick:()=>{const oe=Q.url,we=oe.startsWith("/uploads/")&&!oe.startsWith("/uploads/documents/")?oe.replace("/uploads/","/uploads/documents/"):oe;u({fileName:Q.name,filePath:we,documentType:Q.type})},children:"View"})})]},Q.id))]})]})})]})}),e.jsx(Ut,{value:"bank",children:e.jsxs(Le,{children:[e.jsxs(Qe,{className:"flex flex-row items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(Je,{children:"Bank Details"}),e.jsx(Xt,{children:"Dealer bank accounts for settlement disbursement"})]}),e.jsxs(se,{onClick:()=>{R(null),C(!0)},className:"bg-re-red",children:[e.jsx(An,{className:"w-4 h-4 mr-2"}),"Add Account"]})]}),e.jsx(Fe,{children:e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:w.length>0?w.map(Q=>e.jsxs(Le,{className:`relative overflow-hidden ${Q.isPrimary?"border-re-red bg-blue-50/30":""}`,children:[Q.isPrimary&&e.jsx("div",{className:"absolute top-0 right-0 p-1 bg-re-red text-white text-[10px] uppercase font-bold px-2 rounded-bl",children:"Primary"}),e.jsxs(Fe,{className:"p-5",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:"p-2 bg-red-50 rounded-lg",children:e.jsx(so,{className:"w-5 h-5 text-re-red"})}),e.jsxs("div",{children:[e.jsx("p",{className:"font-bold text-slate-900",children:Q.bankName}),e.jsx("p",{className:"text-xs text-slate-500",children:Q.branchName})]})]}),e.jsxs("div",{className:"space-y-3 mb-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] text-slate-500 uppercase font-bold",children:"Account Holder"}),e.jsx("p",{className:"text-sm font-medium",children:Q.accountHolderName})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] text-slate-500 uppercase font-bold",children:"Account Number"}),e.jsx("p",{className:"text-sm font-mono tracking-wider",children:Q.accountNumber.replace(/.(?=.{4})/g,"*")})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] text-slate-500 uppercase font-bold",children:"IFSC"}),e.jsx("p",{className:"text-sm font-mono",children:Q.ifscCode})]})]})]}),e.jsxs("div",{className:"flex items-center justify-end gap-2 pt-2 border-t border-slate-100",children:[e.jsxs(se,{variant:"ghost",size:"sm",className:"h-8 text-re-red",onClick:()=>{R(Q),C(!0)},children:[e.jsx(ry,{className:"w-3 h-3 mr-1"}),"Edit"]}),e.jsxs(se,{variant:"ghost",size:"sm",className:"h-8 text-red-600",onClick:()=>ee(Q.id),children:[e.jsx(ar,{className:"w-3 h-3 mr-1"}),"Delete"]})]})]})]},Q.id)):e.jsxs("div",{className:"col-span-full py-12 text-center border-2 border-dashed rounded-lg bg-slate-50",children:[e.jsx(so,{className:"w-12 h-12 text-slate-300 mx-auto mb-3"}),e.jsx("p",{className:"text-slate-600",children:"No bank details found"}),e.jsx(se,{variant:"link",onClick:()=>C(!0),children:"Add first bank account"})]})})})]})}),e.jsx(Ut,{value:"audit",children:e.jsxs(Le,{children:[e.jsxs(Qe,{children:[e.jsx(Je,{children:"Audit Trail"}),e.jsx(Xt,{children:"Complete history of actions on this F&F case"})]}),e.jsx(Fe,{children:e.jsx("div",{className:"space-y-4",children:N.length>0?N.map(Q=>{var oe,we,Oe,ke,je,Ve;return e.jsxs("div",{className:"flex gap-3 pb-4 border-b border-slate-100 last:border-0",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-slate-400 mt-2"}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center justify-between mb-1",children:[e.jsxs("p",{className:"font-semibold text-slate-900 flex items-center gap-2",children:[Q.action==="FNF_CREATED"&&e.jsx(Ce,{className:"bg-re-red h-2 w-2 p-0 rounded-full"}),Q.description&&!((oe=Q.newData)!=null&&oe.action)?Q.description:e.jsxs(e.Fragment,{children:[ve(((we=Q.newData)==null?void 0:we.action)||Q.action),((Oe=Q.newData)==null?void 0:Oe.department)&&e.jsxs("span",{className:"text-re-red ml-1 font-bold",children:["- ",Q.newData.department]})]})]}),e.jsx("span",{className:"text-xs text-slate-500",children:ua(Q.createdAt||Q.timestamp)})]}),e.jsx("div",{className:"flex items-center gap-2 text-sm text-slate-600 mb-2",children:e.jsx(Ce,{variant:"outline",className:"text-[10px] uppercase",children:((ke=Q.actor)==null?void 0:ke.name)||Q.userName||"System"})}),(((je=Q.newData)==null?void 0:je.remarks)||Q.remarks)&&e.jsx("div",{className:"mt-2 p-3 bg-slate-50 border border-slate-200 rounded text-sm text-slate-700",children:((Ve=Q.newData)==null?void 0:Ve.remarks)||Q.remarks}),Q.newData&&Object.keys(Q.newData).filter(Ge=>Ge!=="remarks"&&Ge!=="status"&&Ge!=="action"&&Ge!=="department").length>0&&e.jsxs("div",{className:"mt-2 space-y-1",children:[e.jsx("p",{className:"text-[10px] text-slate-500 uppercase font-bold px-1",children:"Changes:"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:Object.entries(Q.newData).filter(([Ge])=>Ge!=="remarks"&&Ge!=="action"&&Ge!=="department").map(([Ge,nt])=>e.jsxs("div",{className:"text-[11px] bg-slate-100 border rounded px-2 py-0.5 flex items-center gap-1",children:[e.jsxs("span",{className:"text-slate-500",children:[Ge,":"]}),e.jsx("span",{className:"text-slate-900 font-medium",children:String(nt)})]},Ge))})]})]})]},Q.id)}):e.jsx("div",{className:"text-center py-8 text-slate-500",children:e.jsx("p",{children:"No activity logs found for this case."})})})})]})})]}),e.jsx(ds,{open:p,onOpenChange:h,children:e.jsxs(os,{children:[e.jsxs(xs,{children:[e.jsx(ms,{children:"Send to All Stakeholders"}),e.jsx(bs,{children:"This will send notifications to all 16 departments to submit their NOC or dues information"})]}),e.jsx("div",{className:"space-y-4",children:e.jsxs("div",{className:"p-4 bg-blue-50 rounded-lg border border-red-200",children:[e.jsx("p",{className:"text-sm text-blue-900 mb-2",children:"Notifications will be sent to:"}),e.jsxs("ul",{className:"text-sm text-blue-800 space-y-1 ml-4",children:[e.jsx("li",{children:"• All 16 departments"}),e.jsxs("li",{children:["• Case Number: ",a.caseNumber]}),e.jsxs("li",{children:["• Dealer: ",a.dealerName]}),e.jsxs("li",{children:["• Type: ",a.requestType]})]})]})}),e.jsxs(bn,{children:[e.jsx(se,{variant:"outline",onClick:()=>h(!1),children:"Cancel"}),e.jsxs(se,{onClick:pt,className:"bg-re-red hover:bg-blue-700",children:[e.jsx(Gu,{className:"w-4 h-4 mr-2"}),"Send Notifications"]})]})]})}),e.jsx(ds,{open:E,onOpenChange:q,children:e.jsxs(os,{className:"sm:max-w-[460px]",children:[e.jsxs(xs,{children:[e.jsxs(ms,{children:["Update ",O==null?void 0:O.departmentName," Response"]}),e.jsx(bs,{children:"Provide dues/NOC response with remarks and optional supporting proof."})]}),e.jsxs("div",{className:"grid gap-4 py-2",children:[e.jsxs("div",{className:"grid grid-cols-4 items-center gap-4",children:[e.jsx(de,{htmlFor:"type",className:"text-right",children:"Type"}),e.jsxs("select",{id:"type",className:"col-span-3 flex h-10 w-full rounded-md border border-slate-200 bg-white px-3 py-2 text-sm",value:$.type,onChange:Q=>Y({...$,type:Q.target.value}),children:[e.jsx("option",{value:"Receivable",children:"Receivable (from dealer)"}),e.jsx("option",{value:"Payable",children:"Payable (to dealer)"}),e.jsx("option",{value:"Deduction",children:"Deduction"})]})]}),e.jsxs("div",{className:"grid grid-cols-4 items-center gap-4",children:[e.jsx(de,{htmlFor:"amount",className:"text-right",children:"Amount"}),e.jsxs("div",{className:"col-span-3 relative",children:[e.jsx("span",{className:"absolute left-3 top-2.5 text-slate-500 font-medium",children:"₹"}),e.jsx("input",{id:"amount",type:"number",className:"flex h-10 w-full rounded-md border border-slate-200 bg-white pl-7 pr-3 py-2 text-sm",value:$.amount,onChange:Q=>Y({...$,amount:Number(Q.target.value)})})]})]}),e.jsxs("div",{className:"grid grid-cols-4 items-center gap-4",children:[e.jsx(de,{htmlFor:"remarks",className:"text-right",children:"Remarks"}),e.jsx("textarea",{id:"remarks",className:"col-span-3 flex min-h-[80px] w-full rounded-md border border-slate-200 bg-white px-3 py-2 text-sm",placeholder:"Add response details...",value:$.remarks,onChange:Q=>Y({...$,remarks:Q.target.value})})]}),e.jsxs("div",{className:"grid grid-cols-4 items-center gap-4",children:[e.jsx(de,{htmlFor:"proof",className:"text-right",children:"Proof"}),e.jsx("input",{id:"proof",type:"file",className:"col-span-3 text-sm",onChange:Q=>{var oe;return W(((oe=Q.target.files)==null?void 0:oe[0])||null)}})]})]}),e.jsxs(bn,{children:[e.jsx(se,{variant:"outline",onClick:()=>q(!1),children:"Cancel"}),e.jsx(se,{className:"bg-re-red hover:bg-blue-700",onClick:xt,disabled:P,children:P?"Saving...":"Submit Response"})]})]})}),e.jsx(ds,{open:T,onOpenChange:Q=>{Q?I(!0):It()},children:e.jsxs(os,{className:"sm:max-w-md",children:[e.jsxs(xs,{children:[e.jsx(ms,{children:"Upload Document"}),e.jsx(bs,{children:"Provide a name for this document and attach a file. The name is required."})]}),e.jsxs("div",{className:"space-y-4 py-2",children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs(de,{htmlFor:"fnf-upload-doc-name",children:["Document Name ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsx("input",{id:"fnf-upload-doc-name",type:"text",placeholder:"e.g. Final NOC — Sales",className:"flex h-10 w-full rounded-md border border-slate-200 bg-white px-3 py-2 text-sm",value:B,onChange:Q=>G(Q.target.value),"data-testid":"fnf-upload-doc-name"})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(de,{htmlFor:"fnf-upload-doc-type",children:"Document Type (optional)"}),e.jsx("input",{id:"fnf-upload-doc-type",type:"text",placeholder:"e.g. NOC, Statement, Receipt",className:"flex h-10 w-full rounded-md border border-slate-200 bg-white px-3 py-2 text-sm",value:K,onChange:Q=>H(Q.target.value),"data-testid":"fnf-upload-doc-type"})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs(de,{htmlFor:"fnf-upload-doc-file",children:["File ",e.jsx("span",{className:"text-red-600",children:"*"})]}),e.jsx("input",{id:"fnf-upload-doc-file",ref:z,type:"file",className:"flex w-full text-sm",onChange:Mt,"data-testid":"fnf-upload-docs-input"}),X&&e.jsxs("p",{className:"text-xs text-slate-500 truncate",children:["Selected: ",e.jsx("span",{className:"font-medium",children:X.name})]})]})]}),e.jsxs(bn,{children:[e.jsx(se,{variant:"outline",onClick:It,disabled:U,children:"Cancel"}),e.jsxs(se,{className:"bg-re-red hover:bg-re-red-hover text-white",onClick:he,disabled:U||!B.trim()||!X,"data-testid":"fnf-upload-doc-submit",children:[U?e.jsx(ns,{className:"w-4 h-4 mr-2 animate-spin"}):e.jsx(or,{className:"w-4 h-4 mr-2"}),U?"Uploading...":"Upload"]})]})]})}),e.jsx(p_,{isOpen:b,onClose:()=>{C(!1),R(null)},onSubmit:vt,editingBank:S,isSubmitting:_}),e.jsx(mo,{isOpen:!!x,onClose:()=>u(null),document:x})]})}function AV({onViewPaymentDetails:t}={}){const[s,n]=g.useState([]),[r,a]=g.useState(!0),[i,o]=g.useState("pending");g.useEffect(()=>{d()},[]);const d=async()=>{try{a(!0);const u=await hs.getApplications();n(u.data||[])}catch(u){console.error("Fetch error:",u),te.error("Failed to fetch applications")}finally{a(!1)}},m=u=>String(u||"").trim().toLowerCase(),f=u=>{const N=m(u);return N==="verified"||N==="paid"},p=s.flatMap(u=>{const N=u.overallStatus||u.status,v=["Payment Pending","Security Deposit","Security Details","LOI In Progress","LOI Issued","LOA Pending","Dealer Code Generation","LOA_APPROVAL"].includes(N),w=u.securityDeposits||[];return w.length>0?w.map(j=>({id:j.id,applicationId:u.applicationId||u.id,application:u,paymentStatus:j.status,paymentType:j.depositType,amount:j.amount,createdAt:j.createdAt,verificationDate:j.verifiedAt,isVirtual:!1})):v?["Payment Pending","Security Deposit","Security Details","LOI In Progress"].includes(N)?[{id:`virtual-${u.id}-sd`,applicationId:u.applicationId||u.id,application:u,paymentStatus:"Pending",paymentType:"SECURITY_DEPOSIT",amount:5e5,createdAt:u.updatedAt,verificationDate:null,isVirtual:!0}]:[{id:`virtual-${u.id}-ff`,applicationId:u.applicationId||u.id,application:u,paymentStatus:"Pending",paymentType:"FIRST_FILL",amount:15e5,createdAt:u.updatedAt,verificationDate:null,isVirtual:!0}]:[]}),h=p.filter(u=>i==="all"?!0:i==="pending"?!f(u.paymentStatus):i==="verified"?f(u.paymentStatus):!0),x=u=>{t&&t(u)};return r?e.jsxs("div",{className:"flex items-center justify-center p-20 text-blue-600",children:[e.jsx(vn,{className:"w-8 h-8 animate-spin mr-3"}),e.jsx("span",{children:"Loading Finance Queue..."})]}):e.jsxs("div",{className:"p-6 space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between bg-white p-6 rounded-2xl border border-slate-100 shadow-sm",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-3xl font-bold text-slate-900 tracking-tight mb-1",children:"Payment Verification"}),e.jsx("p",{className:"text-slate-500",children:"Review and verify Security Deposit and First Fill payments for dealers"})]}),e.jsx("div",{className:"flex items-center gap-3",children:e.jsxs(se,{onClick:d,variant:"outline",size:"sm",className:"bg-white hover:bg-slate-50","data-testid":"onboarding-finance-queue-sync-btn",children:[e.jsx(vn,{className:"w-4 h-4 mr-2"}),"Sync Dashboard"]})})]}),e.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:[e.jsx("div",{className:"inline-flex p-1 bg-slate-100 rounded-xl",children:e.jsxs("div",{className:"flex items-center px-4 py-2 bg-white rounded-lg text-slate-900 shadow-sm font-medium text-sm","data-testid":"onboarding-finance-queue-pending-count",children:[e.jsx(ka,{className:"w-4 h-4 mr-2 text-blue-600"}),"Pending Payments (",p.filter(u=>!f(u.paymentStatus)).length,")"]})}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(se,{variant:i==="pending"?"secondary":"ghost",size:"sm",onClick:()=>o("pending"),className:i==="pending"?"bg-slate-200 text-slate-900":"text-slate-500","data-testid":"onboarding-finance-queue-filter-pending",children:"Pending"}),e.jsx(se,{variant:i==="verified"?"secondary":"ghost",size:"sm",onClick:()=>o("verified"),className:i==="verified"?"bg-slate-200 text-slate-900":"text-slate-500","data-testid":"onboarding-finance-queue-filter-verified",children:"Verified"}),e.jsx(se,{variant:i==="all"?"secondary":"ghost",size:"sm",onClick:()=>o("all"),className:i==="all"?"bg-slate-200 text-slate-900":"text-slate-500","data-testid":"onboarding-finance-queue-filter-all",children:"All"})]})]}),e.jsx(Le,{className:"border-none shadow-xl overflow-hidden rounded-2xl bg-white","data-testid":"onboarding-finance-queue-table-card",children:e.jsx(Fe,{className:"p-0",children:e.jsxs(Ts,{children:[e.jsx(Ps,{className:"bg-slate-50/50",children:e.jsxs(it,{className:"border-b border-slate-100 uppercase text-[10px] tracking-wider font-bold text-slate-400",children:[e.jsx(fe,{className:"py-4 pl-6","data-testid":"onboarding-finance-queue-th-details",children:"Application Details"}),e.jsx(fe,{"data-testid":"onboarding-finance-queue-th-location",children:"Location"}),e.jsx(fe,{"data-testid":"onboarding-finance-queue-th-stage",children:"Payment Stage"}),e.jsx(fe,{"data-testid":"onboarding-finance-queue-th-status",children:"Current Status"}),e.jsx(fe,{className:"text-right pr-6","data-testid":"onboarding-finance-queue-th-action",children:"Workflow Action"})]})}),e.jsx(Os,{children:h.length>0?h.map((u,N)=>{const v=u.paymentStatus||"Awaiting Payment",w=u.application||{};return e.jsxs(it,{className:"hover:bg-blue-50/20 group transition-all","data-testid":`onboarding-finance-queue-row-${N}`,children:[e.jsx(ue,{className:"py-4 pl-6",children:e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{className:"font-mono text-xs font-bold text-blue-600 mb-1","data-testid":`onboarding-finance-queue-app-id-${N}`,children:w.applicationId||w.id}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsx("span",{className:"font-semibold text-slate-900","data-testid":`onboarding-finance-queue-name-${N}`,children:w.applicantName})})]})}),e.jsx(ue,{children:e.jsxs("div",{className:"flex flex-col text-sm","data-testid":`onboarding-finance-queue-location-${N}`,children:[e.jsx("span",{className:"text-slate-600 leading-none",children:w.city}),e.jsx("span",{className:"text-slate-400 text-xs mt-1",children:w.state})]})}),e.jsx(ue,{children:e.jsxs("div",{className:"flex items-center gap-2","data-testid":`onboarding-finance-queue-type-${N}`,children:[e.jsx(Wu,{className:"w-4 h-4 text-slate-400"}),e.jsx("span",{className:"text-sm font-medium",children:u.paymentType==="SECURITY_DEPOSIT"?"Security Deposit (₹5L)":"First Fill (₹15L)"})]})}),e.jsx(ue,{children:e.jsx(Ce,{className:v==="Verified"?"bg-emerald-50 text-emerald-700 border-emerald-100 px-3 py-1 rounded-full":v==="Rejected"?"bg-rose-50 text-rose-700 border-rose-100 px-3 py-1 rounded-full":"bg-red-50 text-re-red-hover border-red-100 px-3 py-1 rounded-full",variant:"outline","data-testid":`onboarding-finance-queue-status-${N}`,children:v})}),e.jsx(ue,{className:"text-right pr-6",children:e.jsx(se,{size:"sm",variant:f(v)?"outline":"default",className:f(v)?"bg-white text-slate-600 border-slate-200":"bg-blue-600 hover:bg-blue-700 shadow-md",onClick:()=>x(u.applicationId||w.id),"data-testid":`onboarding-finance-queue-action-btn-${N}`,children:e.jsxs(e.Fragment,{children:[e.jsx(ka,{className:"w-4 h-4 mr-2"}),f(v)?"View Receipt":"Record Payment"]})})})]},u.id)}):e.jsx(it,{children:e.jsx(ue,{colSpan:5,className:"h-48 text-center text-slate-400 py-10","data-testid":"onboarding-finance-queue-empty",children:e.jsxs("div",{className:"flex flex-col items-center gap-3",children:[e.jsx("div",{className:"w-12 h-12 bg-slate-50 rounded-full flex items-center justify-center",children:e.jsx(un,{className:"w-6 h-6 text-slate-200"})}),e.jsx("p",{className:"text-sm",children:i==="verified"?"No verified payments found":i==="pending"?"No pending payments in the queue":"No onboarding payments found"})]})})})})]})})})]})}function kV({onViewFnFDetails:t}={}){const[s,n]=g.useState([]),[r,a]=g.useState(!0),[i,o]=g.useState(null),[d,m]=g.useState(!1),[f,p]=g.useState(!1),[h,x]=g.useState(""),[u,N]=g.useState(""),[v,w]=g.useState("all");g.useEffect(()=>{j()},[]);const j=async()=>{try{a(!0);const P=(await Ee.getFnFSettlements()).data;P.success&&n(P.settlements||[])}catch(D){console.error("Fetch settlements error:",D),te.error("Failed to fetch settlement cases")}finally{a(!1)}},b=D=>{var P,L,$,Y,Z,W,U,M,z,T,I,B;return{id:D.id,caseId:D.settlementId||((P=D.resignation)==null?void 0:P.resignationId)||((L=D.terminationRequest)==null?void 0:L.requestId)||D.id.substring(0,8),dealerCode:(($=D.outlet)==null?void 0:$.code)||((Z=(Y=D.dealer)==null?void 0:Y.dealerCode)==null?void 0:Z.dealerCode)||"N/A",dealerName:((U=(W=D.outlet)==null?void 0:W.dealer)==null?void 0:U.fullName)||((M=D.dealer)==null?void 0:M.legalName)||((z=D.dealer)==null?void 0:z.businessName)||((T=D.dealer)==null?void 0:T.fullName)||"N/A",location:((I=D.outlet)==null?void 0:I.city)||((B=D.outlet)==null?void 0:B.location)||"N/A",terminationType:D.resignationId?"Resignation":"Termination",submittedDate:Yt(D.createdAt),status:D.status==="Calculated"?"Pending Finance Review":D.status==="Settled"?"Settled":D.status,financialData:{totalPayables:parseFloat(D.totalPayables)||0,totalReceivables:parseFloat(D.totalReceivables)||0,netAmount:parseFloat(D.netAmount)||0},settlementAmount:Math.abs(parseFloat(D.netAmount)||0),settlementType:parseFloat(D.netAmount)>0?"Payable to Dealer":"Receivable from Dealer",approvedDate:D.settlementDate?Yt(D.settlementDate):null}},C=s.map(b),S=C.filter(D=>v==="all"?!0:v==="pending"?D.status==="Pending Finance Review"||D.status==="Calculated"||D.status==="Initiated"||D.status==="Under Review":v==="approved"?D.status==="Settled"||D.status==="Completed":!0),R=D=>({receivables:D.totalReceivables||0,payables:D.totalPayables||0,deductions:0,netSettlement:D.netAmount||0,settlementType:(D.netAmount||0)>0?"Payable to Dealer":"Receivable from Dealer",settlementAmount:Math.abs(D.netAmount||0)}),_=D=>{t?t(D.id):(o(D),m(!0))},A=D=>{t?t(D.id):(o(D),p(!0))},E=()=>{const D=R(i.financialData);te.success(`Settlement approved: ${D.settlementType} - ₹${D.settlementAmount.toLocaleString()}`),m(!1),x(""),N(""),o(null)},q=C.filter(D=>D.status==="Pending Finance Review"||D.status==="Calculated"||D.status==="Initiated"||D.status==="Under Review").length,O=C.filter(D=>D.status==="Settled"||D.status==="Completed").length;return r?e.jsx("div",{className:"flex items-center justify-center p-12",children:e.jsx(ns,{className:"w-8 h-8 animate-spin text-re-red"})}):e.jsxs("div",{className:"p-6 space-y-6",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-slate-900 mb-2",children:"F&F Financial Settlement"}),e.jsx("p",{className:"text-slate-600",children:"Review and process full & final settlements for dealerships"})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[e.jsxs(Le,{children:[e.jsx(Qe,{className:"pb-3",children:e.jsx(Je,{className:"text-sm text-slate-600",children:"Pending Review"})}),e.jsx(Fe,{children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:"text-slate-900 text-2xl",children:q}),e.jsx(ak,{className:"w-8 h-8 text-re-red"})]})})]}),e.jsxs(Le,{children:[e.jsx(Qe,{className:"pb-3",children:e.jsx(Je,{className:"text-sm text-slate-600",children:"Approved Settlements"})}),e.jsx(Fe,{children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:"text-slate-900 text-2xl",children:O}),e.jsx(un,{className:"w-8 h-8 text-green-600"})]})})]}),e.jsxs(Le,{children:[e.jsx(Qe,{className:"pb-3",children:e.jsx(Je,{className:"text-sm text-slate-600",children:"Total Cases"})}),e.jsx(Fe,{children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:"text-slate-900 text-2xl",children:C.length}),e.jsx(Ns,{className:"w-8 h-8 text-blue-600"})]})})]}),e.jsxs(Le,{children:[e.jsx(Qe,{className:"pb-3",children:e.jsx(Je,{className:"text-sm text-slate-600",children:"Net Financial Position"})}),e.jsxs(Fe,{children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:`text-2xl ${C.reduce((D,P)=>D+(P.financialData.netAmount||0),0)<0?"text-green-600":"text-red-600"}`,children:["₹",Math.abs(C.reduce((D,P)=>D+(P.financialData.netAmount||0),0)).toLocaleString("en-IN")]}),e.jsx(dl,{className:"w-8 h-8 text-purple-600"})]}),e.jsx("p",{className:"text-[10px] text-slate-500 mt-1",children:C.reduce((D,P)=>D+(P.financialData.netAmount||0),0)<0?"Net Receivable":"Net Payable"})]})]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(se,{variant:v==="all"?"default":"outline",onClick:()=>w("all"),className:v==="all"?"bg-re-red hover:bg-re-red-hover":"",children:["All Cases (",C.length,")"]}),e.jsxs(se,{variant:v==="pending"?"default":"outline",onClick:()=>w("pending"),className:v==="pending"?"bg-re-red hover:bg-re-red-hover":"",children:["Pending Review (",q,")"]}),e.jsxs(se,{variant:v==="approved"?"default":"outline",onClick:()=>w("approved"),className:v==="approved"?"bg-re-red hover:bg-re-red-hover":"",children:["Approved (",O,")"]})]}),e.jsxs(Le,{children:[e.jsxs(Qe,{children:[e.jsx(Je,{children:"F&F Settlement Queue"}),e.jsx(Xt,{children:"Review financial status and calculate settlements"})]}),e.jsx(Fe,{children:e.jsxs(Ts,{children:[e.jsx(Ps,{children:e.jsxs(it,{children:[e.jsx(fe,{children:"Case ID"}),e.jsx(fe,{children:"Dealer Details"}),e.jsx(fe,{children:"Location"}),e.jsx(fe,{children:"Type"}),e.jsx(fe,{children:"Submitted Date"}),e.jsx(fe,{children:"Net Settlement"}),e.jsx(fe,{children:"Status"}),e.jsx(fe,{children:"Actions"})]})}),e.jsx(Os,{children:S.map(D=>{const P=R(D.financialData);return e.jsxs(it,{children:[e.jsx(ue,{children:e.jsxs("div",{children:[e.jsx("div",{className:"text-slate-900",children:D.caseId}),e.jsx("div",{className:"text-sm text-slate-500",children:D.dealerCode})]})}),e.jsx(ue,{children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Lr,{className:"w-4 h-4 text-slate-400"}),e.jsx("span",{className:"text-slate-900",children:D.dealerName})]})}),e.jsx(ue,{children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Vr,{className:"w-4 h-4 text-slate-400"}),e.jsx("span",{className:"text-slate-900",children:D.location})]})}),e.jsx(ue,{children:e.jsx(Ce,{variant:D.terminationType==="Resignation"?"default":"secondary",children:D.terminationType})}),e.jsx(ue,{children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(dr,{className:"w-4 h-4 text-slate-400"}),e.jsx("span",{className:"text-slate-900",children:D.submittedDate})]})}),e.jsx(ue,{children:e.jsxs("div",{className:"flex items-center gap-2",children:[P.settlementType==="Payable to Dealer"?e.jsx(Yo,{className:"w-4 h-4 text-red-600"}):e.jsx(dl,{className:"w-4 h-4 text-green-600"}),e.jsxs("div",{children:[e.jsxs("div",{className:"text-slate-900",children:["₹",P.settlementAmount.toLocaleString()]}),e.jsx("div",{className:"text-xs text-slate-500",children:P.settlementType})]})]})}),e.jsx(ue,{children:e.jsx(Ce,{variant:D.status==="Settlement Approved"?"default":"secondary",className:D.status==="Settlement Approved"?"bg-green-600 text-white":"bg-re-red text-white",children:D.status})}),e.jsx(ue,{children:e.jsxs(se,{size:"sm",variant:D.status==="Pending Finance Review"?"default":"outline",className:D.status==="Pending Finance Review"?"bg-re-red hover:bg-re-red-hover":"",onClick:()=>A(D),children:[e.jsx(Ns,{className:"w-4 h-4 mr-2"}),"View Details"]})})]},D.id)})})]})})]}),e.jsx(ds,{open:d,onOpenChange:m,children:e.jsxs(os,{className:"max-w-5xl max-h-[90vh] overflow-y-auto",children:[e.jsxs(xs,{children:[e.jsx(ms,{children:"Financial Settlement Review"}),e.jsxs(bs,{children:["Review financial details and calculate final settlement for ",i==null?void 0:i.dealerName]})]}),i&&e.jsxs(Bn,{defaultValue:"breakdown",className:"w-full",children:[e.jsxs($n,{className:"grid w-full grid-cols-3",children:[e.jsx(Wt,{value:"breakdown",children:"Financial Breakdown"}),e.jsx(Wt,{value:"calculation",children:"Settlement Calculation"}),e.jsx(Wt,{value:"summary",children:"Final Summary"})]}),e.jsxs(Ut,{value:"breakdown",className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs(Le,{className:"border-green-200 bg-green-50",children:[e.jsxs(Qe,{children:[e.jsxs(Je,{className:"text-base flex items-center gap-2",children:[e.jsx(lf,{className:"w-5 h-5 text-green-600"}),"Payables to Dealer"]}),e.jsx(Xt,{children:"Amounts company owes to dealer"})]}),e.jsxs(Fe,{className:"space-y-3",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-slate-600",children:"Security Deposit"}),e.jsxs("span",{className:"text-slate-900",children:["₹",i.financialData.securityDeposit.toLocaleString()]})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-slate-600",children:"Inventory Value"}),e.jsxs("span",{className:"text-slate-900",children:["₹",i.financialData.inventoryValue.toLocaleString()]})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-slate-600",children:"Equipment Value"}),e.jsxs("span",{className:"text-slate-900",children:["₹",i.financialData.equipmentValue.toLocaleString()]})]}),e.jsx("div",{className:"pt-3 border-t border-green-300",children:e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-slate-900",children:"Total Payables"}),e.jsxs("span",{className:"text-slate-900 text-lg",children:["₹",(i.financialData.securityDeposit+i.financialData.inventoryValue+i.financialData.equipmentValue).toLocaleString()]})]})})]})]}),e.jsxs(Le,{className:"border-red-200 bg-red-50",children:[e.jsxs(Qe,{children:[e.jsxs(Je,{className:"text-base flex items-center gap-2",children:[e.jsx(ay,{className:"w-5 h-5 text-red-600"}),"Receivables from Dealer"]}),e.jsx(Xt,{children:"Amounts dealer owes to company"})]}),e.jsxs(Fe,{className:"space-y-3",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-slate-600",children:"Outstanding Invoices"}),e.jsxs("span",{className:"text-slate-900",children:["₹",i.financialData.outstandingInvoices.toLocaleString()]})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-slate-600",children:"Service Dues"}),e.jsxs("span",{className:"text-slate-900",children:["₹",i.financialData.serviceDues.toLocaleString()]})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-slate-600",children:"Parts Dues"}),e.jsxs("span",{className:"text-slate-900",children:["₹",i.financialData.partsDues.toLocaleString()]})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-slate-600",children:"Advances Given"}),e.jsxs("span",{className:"text-slate-900",children:["₹",i.financialData.advancesGiven.toLocaleString()]})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-slate-600",children:"Penalties"}),e.jsxs("span",{className:"text-slate-900",children:["₹",i.financialData.penalties.toLocaleString()]})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-slate-600",children:"Other Charges"}),e.jsxs("span",{className:"text-slate-900",children:["₹",i.financialData.otherCharges.toLocaleString()]})]}),e.jsx("div",{className:"pt-3 border-t border-red-300",children:e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-slate-900",children:"Total Receivables"}),e.jsxs("span",{className:"text-slate-900 text-lg",children:["₹",R(i.financialData).receivables.toLocaleString()]})]})})]})]})]}),e.jsxs(Le,{className:"border-red-200 bg-red-50",children:[e.jsxs(Qe,{children:[e.jsxs(Je,{className:"text-base flex items-center gap-2",children:[e.jsx(sn,{className:"w-5 h-5 text-re-red"}),"Deductions"]}),e.jsx(Xt,{children:"Pending claims and deductions"})]}),e.jsx(Fe,{children:e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-slate-600",children:"Warranty Claims Pending"}),e.jsxs("span",{className:"text-slate-900 text-lg",children:["₹",i.financialData.warrantyPending.toLocaleString()]})]})})]})]}),e.jsx(Ut,{value:"calculation",className:"space-y-4",children:e.jsxs(Le,{children:[e.jsxs(Qe,{children:[e.jsx(Je,{children:"Settlement Calculation"}),e.jsx(Xt,{children:"Step-by-step calculation of final settlement amount"})]}),e.jsx(Fe,{className:"space-y-4",children:(()=>{const D=R(i.financialData);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex justify-between items-center p-3 bg-green-50 rounded",children:[e.jsx("span",{className:"text-slate-900",children:"Total Payables (to Dealer)"}),e.jsxs("span",{className:"text-green-600 text-lg",children:["+ ₹",D.payables.toLocaleString()]})]}),e.jsxs("div",{className:"flex justify-between items-center p-3 bg-red-50 rounded",children:[e.jsx("span",{className:"text-slate-900",children:"Total Receivables (from Dealer)"}),e.jsxs("span",{className:"text-red-600 text-lg",children:["- ₹",D.receivables.toLocaleString()]})]}),e.jsxs("div",{className:"flex justify-between items-center p-3 bg-red-50 rounded",children:[e.jsx("span",{className:"text-slate-900",children:"Total Deductions"}),e.jsxs("span",{className:"text-re-red text-lg",children:["- ₹",D.deductions.toLocaleString()]})]})]}),e.jsx("div",{className:"h-px bg-slate-300"}),e.jsxs("div",{className:`p-4 rounded-lg ${D.netSettlement>0?"bg-red-100 border-2 border-red-300":"bg-green-100 border-2 border-green-300"}`,children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-slate-900",children:"Net Settlement"}),e.jsxs("span",{className:"text-2xl text-slate-900",children:["₹",D.settlementAmount.toLocaleString()]})]}),e.jsx("div",{className:"flex items-center gap-2",children:D.settlementType==="Payable to Dealer"?e.jsxs(e.Fragment,{children:[e.jsx(Yo,{className:"w-5 h-5 text-red-600"}),e.jsx("span",{className:"text-red-700",children:"Company needs to pay dealer"})]}):e.jsxs(e.Fragment,{children:[e.jsx(dl,{className:"w-5 h-5 text-green-600"}),e.jsx("span",{className:"text-green-700",children:"Dealer needs to pay company"})]})})]}),e.jsxs("div",{className:"flex items-start gap-3 p-4 bg-blue-50 border border-blue-200 rounded-lg",children:[e.jsx(sn,{className:"w-5 h-5 text-blue-600 mt-0.5"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-slate-900 mb-1",children:"Calculation Formula"}),e.jsx("p",{className:"text-sm text-slate-600",children:"Net Settlement = Total Payables - Total Receivables - Total Deductions"}),e.jsxs("p",{className:"text-sm text-slate-600 mt-2",children:["= ₹",D.payables.toLocaleString()," - ₹",D.receivables.toLocaleString()," - ₹",D.deductions.toLocaleString()]})]})]})]})})()})]})}),e.jsxs(Ut,{value:"summary",className:"space-y-4",children:[e.jsxs(Le,{children:[e.jsx(Qe,{children:e.jsx(Je,{children:"Case Summary"})}),e.jsx(Fe,{className:"space-y-4",children:e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-slate-500",children:"Case ID"}),e.jsx("p",{className:"text-slate-900",children:i.id})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-slate-500",children:"Dealer Name"}),e.jsx("p",{className:"text-slate-900",children:i.dealerName})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-slate-500",children:"Dealer Code"}),e.jsx("p",{className:"text-slate-900",children:i.dealerCode})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-slate-500",children:"Location"}),e.jsx("p",{className:"text-slate-900",children:i.location})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-slate-500",children:"Termination Type"}),e.jsx("p",{className:"text-slate-900",children:i.terminationType})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-slate-500",children:"Submitted Date"}),e.jsx("p",{className:"text-slate-900",children:i.submittedDate})]})]})})]}),e.jsxs(Le,{children:[e.jsx(Qe,{children:e.jsx(Je,{children:"Final Settlement"})}),e.jsxs(Fe,{className:"space-y-4",children:[(()=>{const D=R(i.financialData);return e.jsxs("div",{className:`p-6 rounded-lg text-center ${D.settlementType==="Payable to Dealer"?"bg-red-100 border-2 border-red-300":"bg-green-100 border-2 border-green-300"}`,children:[e.jsxs("div",{className:"flex items-center justify-center gap-3 mb-3",children:[D.settlementType==="Payable to Dealer"?e.jsx(Yo,{className:"w-8 h-8 text-red-600"}):e.jsx(dl,{className:"w-8 h-8 text-green-600"}),e.jsx("span",{className:`text-lg ${D.settlementType==="Payable to Dealer"?"text-red-700":"text-green-700"}`,children:D.settlementType})]}),e.jsxs("div",{className:"text-4xl text-slate-900 mb-2",children:["₹",D.settlementAmount.toLocaleString()]}),e.jsx("p",{className:"text-slate-600",children:D.settlementType==="Payable to Dealer"?"Company will pay this amount to the dealer":"Dealer must pay this amount to the company"})]})})(),e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{htmlFor:"adjustments",children:"Adjustments (if any)"}),e.jsx(at,{id:"adjustments",value:h,onChange:D=>x(D.target.value),placeholder:"Enter any adjustments to the settlement amount"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{htmlFor:"finalNotes",children:"Final Notes"}),e.jsx(Ws,{id:"finalNotes",value:u,onChange:D=>N(D.target.value),placeholder:"Enter any final notes or remarks for this settlement...",rows:4})]})]})]})]})]}),e.jsxs(bn,{children:[e.jsx(se,{variant:"outline",onClick:()=>m(!1),children:"Cancel"}),e.jsxs(se,{className:"bg-green-600 hover:bg-green-700",onClick:E,children:[e.jsx(un,{className:"w-4 h-4 mr-2"}),"Approve Settlement"]})]})]})}),e.jsx(ds,{open:f,onOpenChange:p,children:e.jsxs(os,{className:"max-w-4xl max-h-[90vh] overflow-y-auto",children:[e.jsxs(xs,{children:[e.jsx(ms,{children:"Settlement Details"}),e.jsxs(bs,{children:["Complete settlement information for ",i==null?void 0:i.dealerName]})]}),i&&e.jsxs(Bn,{defaultValue:"info",className:"w-full",children:[e.jsxs($n,{className:"grid w-full grid-cols-2",children:[e.jsx(Wt,{value:"info",children:"Case Information"}),e.jsx(Wt,{value:"financial",children:"Financial Breakdown"})]}),e.jsx(Ut,{value:"info",className:"space-y-4 mt-4",children:e.jsxs(Le,{children:[e.jsx(Qe,{children:e.jsx(Je,{className:"text-base",children:"Case Details"})}),e.jsx(Fe,{className:"space-y-3",children:e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-slate-500",children:"Case ID"}),e.jsx("p",{className:"text-slate-900",children:i.id})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-slate-500",children:"Dealer Code"}),e.jsx("p",{className:"text-slate-900",children:i.dealerCode})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-slate-500",children:"Dealer Name"}),e.jsx("p",{className:"text-slate-900",children:i.dealerName})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-slate-500",children:"Location"}),e.jsx("p",{className:"text-slate-900",children:i.location})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-slate-500",children:"Termination Type"}),e.jsx(Ce,{variant:i.terminationType==="Resignation"?"default":"secondary",children:i.terminationType})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-slate-500",children:"Status"}),e.jsx(Ce,{variant:i.status==="Settlement Approved"?"default":"secondary",className:i.status==="Settlement Approved"?"bg-green-600 text-white":"bg-re-red text-white",children:i.status})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-slate-500",children:"Submitted Date"}),e.jsx("p",{className:"text-slate-900",children:i.submittedDate})]}),i.approvedDate&&e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-slate-500",children:"Approved Date"}),e.jsx("p",{className:"text-slate-900",children:i.approvedDate})]})]})})]})}),e.jsx(Ut,{value:"financial",className:"space-y-4 mt-4",children:(()=>{const D=R(i.financialData);return e.jsxs(e.Fragment,{children:[e.jsxs(Le,{className:"border-green-200 bg-green-50",children:[e.jsx(Qe,{children:e.jsxs(Je,{className:"text-base flex items-center gap-2",children:[e.jsx(lf,{className:"w-5 h-5 text-green-600"}),"Payables to Dealer"]})}),e.jsxs(Fe,{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-slate-600",children:"Security Deposit"}),e.jsxs("span",{className:"text-slate-900",children:["₹",i.financialData.securityDeposit.toLocaleString()]})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-slate-600",children:"Inventory Value"}),e.jsxs("span",{className:"text-slate-900",children:["₹",i.financialData.inventoryValue.toLocaleString()]})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-slate-600",children:"Equipment Value"}),e.jsxs("span",{className:"text-slate-900",children:["₹",i.financialData.equipmentValue.toLocaleString()]})]}),e.jsx("div",{className:"pt-2 border-t border-green-300",children:e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-slate-900",children:"Total Payables"}),e.jsxs("span",{className:"text-slate-900 text-lg",children:["₹",D.payables.toLocaleString()]})]})})]})]}),e.jsxs(Le,{className:"border-red-200 bg-red-50",children:[e.jsx(Qe,{children:e.jsxs(Je,{className:"text-base flex items-center gap-2",children:[e.jsx(ay,{className:"w-5 h-5 text-red-600"}),"Receivables from Dealer"]})}),e.jsxs(Fe,{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-slate-600",children:"Outstanding Invoices"}),e.jsxs("span",{className:"text-slate-900",children:["₹",i.financialData.outstandingInvoices.toLocaleString()]})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-slate-600",children:"Service Dues"}),e.jsxs("span",{className:"text-slate-900",children:["₹",i.financialData.serviceDues.toLocaleString()]})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-slate-600",children:"Parts Dues"}),e.jsxs("span",{className:"text-slate-900",children:["₹",i.financialData.partsDues.toLocaleString()]})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-slate-600",children:"Advances Given"}),e.jsxs("span",{className:"text-slate-900",children:["₹",i.financialData.advancesGiven.toLocaleString()]})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-slate-600",children:"Penalties"}),e.jsxs("span",{className:"text-slate-900",children:["₹",i.financialData.penalties.toLocaleString()]})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-slate-600",children:"Other Charges"}),e.jsxs("span",{className:"text-slate-900",children:["₹",i.financialData.otherCharges.toLocaleString()]})]}),e.jsx("div",{className:"pt-2 border-t border-red-300",children:e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-slate-900",children:"Total Receivables"}),e.jsxs("span",{className:"text-slate-900 text-lg",children:["₹",D.receivables.toLocaleString()]})]})})]})]}),e.jsxs(Le,{className:"border-red-200 bg-red-50",children:[e.jsx(Qe,{children:e.jsxs(Je,{className:"text-base flex items-center gap-2",children:[e.jsx(sn,{className:"w-5 h-5 text-re-red"}),"Deductions"]})}),e.jsx(Fe,{children:e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-slate-600",children:"Warranty Claims Pending"}),e.jsxs("span",{className:"text-slate-900 text-lg",children:["₹",i.financialData.warrantyPending.toLocaleString()]})]})})]}),e.jsxs(Le,{className:`${D.settlementType==="Payable to Dealer"?"border-red-300 bg-red-100":"border-green-300 bg-green-100"}`,children:[e.jsx(Qe,{children:e.jsx(Je,{className:"text-base",children:"Net Settlement"})}),e.jsx(Fe,{children:e.jsxs("div",{className:"text-center py-4",children:[e.jsxs("div",{className:"flex items-center justify-center gap-3 mb-2",children:[D.settlementType==="Payable to Dealer"?e.jsx(Yo,{className:"w-6 h-6 text-red-600"}):e.jsx(dl,{className:"w-6 h-6 text-green-600"}),e.jsx("span",{className:`text-lg ${D.settlementType==="Payable to Dealer"?"text-red-700":"text-green-700"}`,children:D.settlementType})]}),e.jsxs("div",{className:"text-3xl text-slate-900",children:["₹",D.settlementAmount.toLocaleString()]})]})})]})]})})()})]}),e.jsxs(bn,{children:[e.jsx(se,{variant:"outline",onClick:()=>p(!1),children:"Close"}),(i==null?void 0:i.status)==="Pending Finance Review"&&e.jsx(se,{className:"bg-re-red hover:bg-re-red-hover",onClick:()=>{p(!1),_(i)},children:"Review & Settle"})]})]})})]})}const zo=(...t)=>t.filter(Boolean).join(" ");function DV({applicationId:t,onBack:s}){var E,q,O,D;const[n,r]=g.useState(null),[a,i]=g.useState([]),[o,d]=g.useState("SECURITY_DEPOSIT"),[m,f]=g.useState(!0),[p,h]=g.useState(!1),[x,u]=g.useState({}),[N,v]=g.useState({verificationTransactionId:"",receivedAmount:"",receivedDate:new Date().toISOString().split("T")[0],verificationRemarks:""}),[w,j]=g.useState(!1),[b,C]=g.useState(null),S=a.find(P=>P.depositType===o);g.useEffect(()=>{R()},[t]),g.useEffect(()=>{var P,L,$;if(S)v({verificationTransactionId:S.paymentReference||"",receivedAmount:((P=S.amount)==null?void 0:P.toString())||"",receivedDate:S.verifiedAt?new Date(S.verifiedAt).toISOString().split("T")[0]:new Date().toISOString().split("T")[0],verificationRemarks:S.remarks||""});else{const Y=((L=x.SECURITY_DEPOSIT)==null?void 0:L.amount)||5e5,Z=(($=x.FIRST_FILL)==null?void 0:$.amount)||15e5;v({verificationTransactionId:"",receivedAmount:o==="SECURITY_DEPOSIT"?Y.toString():Z.toString(),receivedDate:new Date().toISOString().split("T")[0],verificationRemarks:""})}},[o,S,x]);const R=async()=>{try{f(!0);const[P,L,$]=await Promise.all([hs.getApplicationById(t),hs.getSecurityDeposit(t),hs.getSystemConfigs({category:"SECURITY_DEPOSIT",format:"map"})]);r(P),i(Array.isArray(L)?L:[L].filter(Boolean)),u($||{})}catch(P){console.error("Fetch error:",P),te.error("Failed to load payment data")}finally{f(!1)}},_=async()=>{if(!N.verificationTransactionId||!N.receivedDate){te.error("Please fill in all required payment details");return}try{h(!0),await hs.updateSecurityDeposit({applicationId:t,depositType:o,amount:Number(N.receivedAmount),paymentReference:N.verificationTransactionId,status:"Verified"}),te.success(`${o==="SECURITY_DEPOSIT"?"Security Deposit":"First Fill"} verified and approved`),await R()}catch{te.error("Failed to verify payment")}finally{h(!1)}},A=async()=>{if(!N.verificationRemarks){te.error("Please provide remarks for rejection");return}try{h(!0),await hs.updateSecurityDeposit({applicationId:t,depositType:o,status:"Rejected",remarks:N.verificationRemarks}),te.error(`${o==="SECURITY_DEPOSIT"?"Security Deposit":"First Fill"} rejected`),await R()}catch{te.error("Failed to reject payment")}finally{h(!1)}};return m?e.jsx("div",{className:"flex items-center justify-center p-20",children:e.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-re-red"})}):n?e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(se,{variant:"outline",size:"icon",onClick:s,children:e.jsx(Jr,{className:"w-4 h-4"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-3xl mb-1",children:"Payment Verification"}),e.jsxs("div",{className:"flex gap-2 mt-2",children:[e.jsx(se,{size:"sm",variant:o==="SECURITY_DEPOSIT"?"default":"outline",className:o==="SECURITY_DEPOSIT"?"bg-re-red hover:bg-re-red-hover":"",onClick:()=>d("SECURITY_DEPOSIT"),children:"Security Deposit"}),e.jsx(se,{size:"sm",variant:o==="FIRST_FILL"?"default":"outline",className:o==="FIRST_FILL"?"bg-re-red hover:bg-re-red-hover":"",onClick:()=>d("FIRST_FILL"),children:"First Fill"})]})]})]}),e.jsx(Le,{className:zo("border",(S==null?void 0:S.status)==="Verified"?"border-green-200 bg-green-50":((S==null?void 0:S.status)==="Rejected","border-red-200 bg-red-50")),children:e.jsx(Fe,{className:"pt-6",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:zo("w-12 h-12 rounded-full flex items-center justify-center",(S==null?void 0:S.status)==="Verified"?"bg-green-100":(S==null?void 0:S.status)==="Rejected"?"bg-red-100":"bg-red-50"),children:e.jsx(ka,{className:zo("w-6 h-6",(S==null?void 0:S.status)==="Verified"?"text-green-600":(S==null?void 0:S.status)==="Rejected"?"text-red-600":"text-re-red")})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-900 font-bold",children:o==="SECURITY_DEPOSIT"?"Security Deposit":"First Fill"}),e.jsx("p",{className:"text-sm text-slate-600",children:(S==null?void 0:S.status)==="Verified"?`Verified on ${Yt(S.verifiedAt)}`:(S==null?void 0:S.status)==="Rejected"?"Payment Rejected":"Awaiting Verification"})]})]}),e.jsx(Ce,{className:zo((S==null?void 0:S.status)==="Verified"?"bg-green-600":(S==null?void 0:S.status)==="Rejected"?"bg-red-600":"bg-re-red text-white"),children:(S==null?void 0:S.status)||"No Record"})]})})}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[e.jsxs("div",{className:"lg:col-span-2 space-y-6",children:[e.jsxs(Le,{children:[e.jsx(Qe,{children:e.jsxs(Je,{className:"flex items-center gap-2 text-xl",children:[e.jsx(Lr,{className:"w-5 h-5 text-re-red"}),"Applicant Information"]})}),e.jsxs(Fe,{className:"grid grid-cols-2 gap-y-4 gap-x-8",children:[e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-500",children:"Application ID"}),e.jsx("p",{className:"text-slate-900 font-medium",children:n.applicationId||n.id})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-500",children:"Applicant Name"}),e.jsx("p",{className:"text-slate-900 font-medium",children:n.applicantName})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-500",children:"Location"}),e.jsxs("p",{className:"text-slate-900 font-medium",children:[n.city||n.preferredLocation,", ",n.state]})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-500",children:"Email / Phone"}),e.jsx("p",{className:"text-slate-700 text-sm",children:n.email}),e.jsx("p",{className:"text-slate-700 text-sm",children:n.phone})]})]})]}),e.jsxs(Le,{children:[e.jsx(Qe,{children:e.jsxs(Je,{className:"flex items-center gap-2 text-xl",children:[e.jsx(Wu,{className:"w-5 h-5 text-re-red"}),"Deposit Tracking"]})}),e.jsxs(Fe,{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"p-4 bg-slate-50 rounded-lg border border-slate-200",children:[e.jsx(de,{className:"text-slate-500 block mb-1",children:"Expected Amount"}),e.jsxs("p",{className:"text-2xl font-bold text-red-900",children:["₹",(o==="SECURITY_DEPOSIT"?((E=x.SECURITY_DEPOSIT)==null?void 0:E.amount)||5e5:((q=x.FIRST_FILL)==null?void 0:q.amount)||15e5).toLocaleString()]})]}),e.jsxs("div",{className:zo("p-4 rounded-lg border",(S==null?void 0:S.status)==="Verified"?"bg-green-50 border-green-200":"bg-blue-50 border-blue-200"),children:[e.jsx(de,{className:"text-slate-500 block mb-1",children:"Receipt Status"}),e.jsx("p",{className:zo("text-2xl font-bold",(S==null?void 0:S.status)==="Verified"?"text-green-700":"text-blue-700"),children:(S==null?void 0:S.status)||"Not Started"})]})]}),(S==null?void 0:S.paymentReference)&&e.jsxs("div",{className:"grid grid-cols-2 gap-4 pt-2",children:[e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-500",children:"Payment Reference"}),e.jsx("p",{className:"text-slate-900 font-mono",children:S.paymentReference})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-500",children:"Verified By"}),e.jsx("p",{className:"text-slate-900",children:((O=S.verifier)==null?void 0:O.fullName)||"N/A"})]})]})]})]}),e.jsxs(Le,{children:[e.jsxs(Qe,{children:[e.jsxs(Je,{className:"flex items-center gap-2 text-xl",children:[e.jsx(Ns,{className:"w-5 h-5 text-re-red"}),"Verification Evidence"]}),e.jsx(Xt,{children:"Documents uploaded by the applicant for payment proof"})]}),e.jsx(Fe,{children:((D=n.uploadedDocuments)==null?void 0:D.filter(P=>{var L,$,Y,Z;return o==="SECURITY_DEPOSIT"?((L=P.documentType)==null?void 0:L.toLowerCase().includes("security"))&&(($=P.documentType)==null?void 0:$.toLowerCase().includes("deposit")):((Y=P.documentType)==null?void 0:Y.toLowerCase().includes("first"))&&((Z=P.documentType)==null?void 0:Z.toLowerCase().includes("fill"))}).length)>0?e.jsx("div",{className:"space-y-3",children:n.uploadedDocuments.filter(P=>{var L,$,Y,Z;return o==="SECURITY_DEPOSIT"?((L=P.documentType)==null?void 0:L.toLowerCase().includes("security"))&&(($=P.documentType)==null?void 0:$.toLowerCase().includes("deposit")):((Y=P.documentType)==null?void 0:Y.toLowerCase().includes("first"))&&((Z=P.documentType)==null?void 0:Z.toLowerCase().includes("fill"))}).map((P,L)=>e.jsxs("div",{className:"flex items-center justify-between p-3 bg-white rounded-lg border border-slate-200 hover:shadow-sm transition-shadow",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 rounded bg-slate-100 flex items-center justify-center",children:e.jsx(Ns,{className:"w-5 h-5 text-slate-500"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-900 font-medium",children:P.fileName||P.name}),e.jsxs("p",{className:"text-xs text-slate-500 uppercase",children:[P.documentType," • ",Yt(P.createdAt)]})]})]}),e.jsx(se,{variant:"ghost",size:"sm",className:"text-re-red hover:text-re-red-hover hover:bg-red-50",onClick:()=>{C(P),j(!0)},children:"View Receipt"})]},L))}):e.jsxs("div",{className:"text-center py-10 bg-slate-50 rounded-lg border-2 border-dashed border-slate-200",children:[e.jsx(sn,{className:"w-8 h-8 text-slate-300 mx-auto mb-2"}),e.jsx("p",{className:"text-slate-500",children:"No payment documents found in this application."})]})})]})]}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs(Le,{className:"border-red-100 shadow-sm",children:[e.jsx(Qe,{className:"bg-red-50/50",children:e.jsxs(Je,{className:"flex items-center gap-2 text-lg",children:[e.jsx(lf,{className:"w-5 h-5 text-re-red"}),"Finance Action"]})}),e.jsxs(Fe,{className:"pt-6 space-y-4",children:[e.jsxs("div",{children:[e.jsxs(de,{htmlFor:"verificationTxnId",className:"text-xs uppercase text-slate-500 font-bold tracking-wider",children:["UTR / Reference Number ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx(at,{id:"verificationTxnId",placeholder:"Enter Bank UTR Number",disabled:(S==null?void 0:S.status)==="Verified",className:"mt-1",value:N.verificationTransactionId,onChange:P=>v({...N,verificationTransactionId:P.target.value})})]}),e.jsxs("div",{children:[e.jsxs(de,{htmlFor:"receivedAmount",className:"text-xs uppercase text-slate-500 font-bold tracking-wider",children:["Amount Received (₹) ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx(at,{id:"receivedAmount",type:"number",placeholder:(o==="SECURITY_DEPOSIT"?5e5:15e5).toString(),disabled:(S==null?void 0:S.status)==="Verified",className:"mt-1",value:N.receivedAmount,onChange:P=>v({...N,receivedAmount:P.target.value})})]}),e.jsxs("div",{children:[e.jsxs(de,{htmlFor:"receivedDate",className:"text-xs uppercase text-slate-500 font-bold tracking-wider",children:["Credit Value Date ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx(at,{id:"receivedDate",type:"date",disabled:(S==null?void 0:S.status)==="Verified",className:"mt-1",value:N.receivedDate,onChange:P=>v({...N,receivedDate:P.target.value})})]}),e.jsxs("div",{children:[e.jsx(de,{htmlFor:"remarks",className:"text-xs uppercase text-slate-500 font-bold tracking-wider",children:"Verification Remarks"}),e.jsx(Ws,{id:"remarks",placeholder:"Any internal notes for reconciliation...",rows:3,className:"mt-1",value:N.verificationRemarks,onChange:P=>v({...N,verificationRemarks:P.target.value})})]}),e.jsxs("div",{className:"pt-4 space-y-3",children:[e.jsx(se,{className:zo("w-full transition-all duration-200",(S==null?void 0:S.status)==="Verified"?"bg-green-600 hover:bg-green-600 opacity-90":"bg-re-red hover:bg-re-red-hover"),onClick:_,disabled:p||(S==null?void 0:S.status)==="Verified",children:(S==null?void 0:S.status)==="Verified"?e.jsxs(e.Fragment,{children:[e.jsx(un,{className:"w-4 h-4 mr-2"})," Verified Successfully"]}):e.jsxs(e.Fragment,{children:[e.jsx(un,{className:"w-4 h-4 mr-2"})," Mark as Verified"]})}),(S==null?void 0:S.status)!=="Verified"&&(S==null?void 0:S.status)!=="Rejected"&&e.jsxs(se,{variant:"ghost",className:"w-full text-red-600 hover:text-red-700 hover:bg-red-50",onClick:A,disabled:p,children:[e.jsx(mi,{className:"w-4 h-4 mr-2"}),"Reject / Flag Discrepancy"]})]})]})]}),e.jsxs(Le,{className:"bg-slate-900 text-white border-none shadow-xl",children:[e.jsx(Qe,{children:e.jsxs(Je,{className:"text-base font-medium flex items-center gap-2",children:[e.jsx(vn,{className:"w-4 h-4 text-re-red"}),"Next Steps"]})}),e.jsxs(Fe,{className:"text-xs text-slate-300 space-y-3",children:[e.jsx("p",{children:"Once verified, the following will occur:"}),e.jsxs("ul",{className:"list-disc pl-4 space-y-2",children:[e.jsxs("li",{children:["Applicant status will advance to ",o==="SECURITY_DEPOSIT"?"LOI Issuance":"LOA Approval"]}),e.jsx("li",{children:"Email notification will be sent to Applicant"}),e.jsxs("li",{children:["Digital ",o==="SECURITY_DEPOSIT"?"LOI":"LOA"," generation will be unlocked"]}),e.jsxs("li",{children:["This payment confirms the ",o==="SECURITY_DEPOSIT"?"Security Deposit":"First Fill"]})]})]})]})]})]}),e.jsx(mo,{isOpen:w,onClose:()=>j(!1),document:b})]}):e.jsx("div",{className:"p-20 text-center",children:"Application not found"})}const ll=["Warranty Department","Accessories Department","Sales Department","RTO Department","Service Department","Parts Department","Finance Department","Insurance Department","Inventory Department","Marketing Department","HR Department","IT Department","Legal Department","Quality Department","Logistics Department","Customer Relations Department"],IS="[DEPARTMENT_CLAIM]",MS="[FINANCE_VALIDATED]",Yg=[{id:"calculations",label:"Verified All Department Calculations"},{id:"bank",label:"Confirmed Bank Account Details"},{id:"docs",label:"Reviewed All Supporting Documents"},{id:"sap",label:"Synced Final Dues with SAP"},{id:"noc",label:"Received All Mandatory NOCs"}];function RV({fnfId:t,onBack:s}){const n=tr(),[r,a]=g.useState(null),[i,o]=g.useState(!0),[d,m]=g.useState("overview"),[f,p]=g.useState([]),[h,x]=g.useState([]),[u,N]=g.useState([]),[v,w]=g.useState(null),[j,b]=g.useState([]),[C,S]=g.useState(!1),[R,_]=g.useState(null),[A,E]=g.useState([]);g.useEffect(()=>{q(),Y()},[t]);const q=async()=>{var Q;try{const we=(await Ee.getSettlementDepartments()).data;we&&we.success&&((Q=we.departments)==null?void 0:Q.length)>0}catch(oe){console.error("Fetch departments error:",oe)}},O=Q=>{if(!Q)return Q;let oe=Q.trim();const we=ll.find(je=>je.toLowerCase()===oe.toLowerCase());if(we)return we;const ke={sales:"Sales Department",service:"Service Department",spares:"Parts Department",parts:"Parts Department","spares / parts":"Parts Department",finance:"Finance Department",accounts:"Finance Department",warranty:"Warranty Department",marketing:"Marketing Department",hr:"HR Department",it:"IT Department",legal:"Legal Department",logistics:"Logistics Department",quality:"Quality Department",fdd:"Finance Department",apparel:"Accessories Department",accessories:"Accessories Department",dms:"IT Department",rto:"Admin Department",admin:"Admin Department","admin / dd-admin":"Admin Department"}[oe.toLowerCase().replace(" department","")];return ke||Q},D=(Q,oe)=>oe==="DepartmentClaim"||typeof Q=="string"&&(Q.startsWith(IS)||Q.includes("Clearance:")),P=Q=>(Q==null?void 0:Q.sourceType)==="FinanceValidated"&&typeof(Q==null?void 0:Q.description)=="string"&&Q.description.includes("Auto-seeded from department claim"),L=(Q,oe)=>oe==="FinanceValidated"||typeof Q=="string"&&Q.startsWith(MS),$=Q=>(Q||"").replace(IS,"").replace(MS,"").trim(),Y=async(Q=!0)=>{var oe,we,Oe,ke,je,Ve,Ge,nt,Zt,Jt,lt,mt,Ds,ss,Ae,be,ut,He,yt,ft,es,ts,Cs,Us,rn,Js,an,hn,De,bt,Te,ct,tt,jt,Ht,zt,fs,qt,As,vs,cs,mn,qs,ln,fn,on,Ye;try{Q&&o(!0);const St=(await Ee.getFnFSettlementById(t)).data;if(St.success){const rt=St.fnf,Ft={id:rt.id,caseNumber:rt.settlementId||((oe=rt.resignation)==null?void 0:oe.resignationId)||((we=rt.terminationRequest)==null?void 0:we.requestId)||rt.id.substring(0,8),dealerName:((ke=(Oe=rt.outlet)==null?void 0:Oe.dealer)==null?void 0:ke.fullName)||((je=rt.dealer)==null?void 0:je.fullName)||"N/A",dealerCode:((Ve=rt.outlet)==null?void 0:Ve.code)||((nt=(Ge=rt.dealer)==null?void 0:Ge.dealerCode)==null?void 0:nt.dealerCode)||"N/A",location:((Zt=rt.outlet)==null?void 0:Zt.city)||((Jt=rt.outlet)==null?void 0:Jt.location)||"N/A",terminationType:rt.resignationId?"Resignation":"Termination",submittedDate:ua(rt.createdAt),createdAt:rt.createdAt,dueDate:rt.settlementDate?ua(rt.settlementDate):"TBD",status:rt.status,dealerId:((mt=(lt=rt.outlet)==null?void 0:lt.dealer)==null?void 0:mt.id)||rt.dealerId,originalRequestId:((Ds=rt.resignation)==null?void 0:Ds.resignationId)||((ss=rt.terminationRequest)==null?void 0:ss.requestId)||((Ae=rt.terminationRequest)==null?void 0:Ae.id)||"N/A",salesCode:((ut=(be=rt.dealer)==null?void 0:be.dealerCode)==null?void 0:ut.salesCode)||((es=(ft=(yt=(He=rt.outlet)==null?void 0:He.dealer)==null?void 0:yt.dealerProfile)==null?void 0:ft.dealerCode)==null?void 0:es.salesCode)||"N/A",serviceCode:((Cs=(ts=rt.dealer)==null?void 0:ts.dealerCode)==null?void 0:Cs.serviceCode)||((an=(Js=(rn=(Us=rt.outlet)==null?void 0:Us.dealer)==null?void 0:rn.dealerProfile)==null?void 0:Js.dealerCode)==null?void 0:an.serviceCode)||"N/A",gearCode:((De=(hn=rt.dealer)==null?void 0:hn.dealerCode)==null?void 0:De.gearCode)||((tt=(ct=(Te=(bt=rt.outlet)==null?void 0:bt.dealer)==null?void 0:Te.dealerProfile)==null?void 0:ct.dealerCode)==null?void 0:tt.gearCode)||"N/A",gmaCode:((Ht=(jt=rt.dealer)==null?void 0:jt.dealerCode)==null?void 0:Ht.gmaCode)||((As=(qt=(fs=(zt=rt.outlet)==null?void 0:zt.dealer)==null?void 0:fs.dealerProfile)==null?void 0:qt.dealerCode)==null?void 0:As.gmaCode)||"N/A",allLineItems:(rt.lineItems||[]).filter(Ls=>Ls.isActive!==!1),departmentResponses:ll.map(Ls=>{const nn=(rt.clearances||[]).find(_n=>O(_n.department)===Ls),ta=(rt.lineItems||[]).filter(_n=>_n.isActive!==!1),sa=ta.filter(_n=>O(_n.department)===Ls&&D(_n.description,_n.sourceType)),na=ta.filter(_n=>O(_n.department)===Ls&&P(_n)),Ir=sa.length>0?sa:na;let Xn=0,zn=0;Ir.forEach(_n=>{const ur=Math.abs(parseFloat(_n.amount)||0);_n.itemType==="Payable"?Xn+=ur:zn+=ur});const Qt=Xn-zn,Jn=Math.abs(Qt)>0,Rr=(nn==null?void 0:nn.status)||"Pending",Wn=Jn?"Dues Pending":Rr==="Cleared"?"NOC Submitted":Rr,Er=Qt>0?"payable":Qt<0?"recovery":null;return{id:(nn==null?void 0:nn.id)||`dept-${Ls}`,departmentName:Ls,status:Wn,remarks:(nn==null?void 0:nn.remarks)||"-",submittedDate:nn!=null&&nn.clearedAt?ua(nn.clearedAt):"-",amount:Math.abs(Qt),duesFlow:Er,amountType:Qt>0?"Payable to dealer":Qt<0?"Receivable from dealer":null,supportingDocument:(nn==null?void 0:nn.supportingDocument)||null}}),documents:[{name:"Resignation Letter.pdf",size:"N/A",uploadedOn:ua(rt.createdAt),type:"Resignation",url:"#"},...(rt.clearances||[]).filter(Ls=>Ls.supportingDocument).map(Ls=>({name:Ls.supportingDocument.split("/").pop(),size:"N/A",uploadedOn:ua(Ls.clearedAt),type:`${Ls.department} Proof`,url:Ls.supportingDocument})),...(rt.clearanceDocuments||[]).map(Ls=>{var nn;return{name:Ls.name||((nn=Ls.supportingDocument)==null?void 0:nn.split("/").pop())||"Document",size:"N/A",uploadedOn:ua(Ls.clearedAt||rt.createdAt),type:"Finance Upload",url:Ls.supportingDocument}})]};a(Ft);const jn=rt.bankDetails||((vs=rt.dealer)==null?void 0:vs.bankDetails)||((qs=(mn=(cs=rt.outlet)==null?void 0:cs.dealer)==null?void 0:mn.dealerProfile)==null?void 0:qs.bankDetails);jn&&jn.length>0?b(jn):((fn=(ln=rt.outlet)==null?void 0:ln.dealer)!=null&&fn.id||rt.dealerId)&&Z(((Ye=(on=rt.outlet)==null?void 0:on.dealer)==null?void 0:Ye.id)||rt.dealerId);const xn=[],qn=[],En=[],Hs=(rt.lineItems||[]).filter(Ls=>Ls.isActive!==!1);(Hs.some(Ls=>L(Ls.description,Ls.sourceType))?Hs.filter(Ls=>L(Ls.description,Ls.sourceType)):Hs.filter(Ls=>!D(Ls.description,Ls.sourceType))).forEach(Ls=>{const nn={id:Ls.id,department:O(Ls.department),description:$(Ls.description||Ls.remarks||""),amount:Math.abs(Ls.amount)};Ls.itemType==="Payable"?xn.push(nn):Ls.itemType==="Deduction"?En.push(nn):qn.push(nn)}),p(xn),x(qn),N(En),$e({verificationTransactionId:rt.transactionReference||"",settlementAmount:(rt.settlementAmount||ee().settlementAmount).toString(),settlementDate:rt.settlementDate?new Date(rt.settlementDate).toISOString().split("T")[0]:new Date().toISOString().split("T")[0],paymentMode:rt.paymentMode||"",bankReference:"",verificationRemarks:rt.remarks||"",adjustments:"0"})}}catch(Ot){console.error("Fetch F&F error:",Ot),te.error("Failed to fetch settlement details")}finally{Q&&o(!1)}},Z=async Q=>{try{const we=(await Ee.getDealerBankDetails(Q)).data;we.success&&b(we.bankDetails||[])}catch(oe){console.error("Fetch bank details error:",oe)}},W=async Q=>{Q.preventDefault();const oe=new FormData(Q.currentTarget),we=Object.fromEntries(oe.entries());try{const Oe=r==null?void 0:r.dealerId;(await Ee.saveBankDetail(Oe,{...we,id:R==null?void 0:R.id,isPrimary:oe.get("isPrimary")==="on"})).data.success&&(te.success("Bank details saved"),Z(Oe),S(!1),_(null))}catch{te.error("Failed to save bank details")}},U=async Q=>{if(confirm("Are you sure you want to delete this bank account?"))try{(await Ee.deleteBankDetail(Q)).data.success&&(te.success("Bank detail deleted"),Z(r==null?void 0:r.dealerId))}catch{te.error("Failed to delete bank details")}},M=Q=>{E(oe=>oe.includes(Q)?oe.filter(we=>we!==Q):[...oe,Q])},[z,T]=g.useState({department:"",description:"",amount:""}),[I,B]=g.useState({department:"",description:"",amount:""}),[G,K]=g.useState({department:"",description:"",amount:""}),[H,X]=g.useState(null),[J,ae]=g.useState(null),[le,xe]=g.useState(null),[ce,ve]=g.useState({}),[Pe,et]=g.useState({}),[kt,vt]=g.useState({}),ee=()=>{const Q=f.reduce((ke,je)=>ke+(Number(je.amount)||0),0),oe=h.reduce((ke,je)=>ke+(Number(je.amount)||0),0),we=u.reduce((ke,je)=>ke+(Number(je.amount)||0),0),Oe=Q-oe-we;return{payables:Q,receivables:oe,deductions:we,netSettlement:Oe,settlementAmount:Math.abs(Oe),settlementType:Oe>0?"Payable to Dealer":Oe<0?"Receivable from Dealer":"No Settlement Required"}},ge=ee(),ye=ll.map(Q=>{const oe=((r==null?void 0:r.departmentResponses)||[]).find(lt=>lt.departmentName===Q),we=Number(oe==null?void 0:oe.amount)||0,Oe=(oe==null?void 0:oe.amountType)||"-",ke=f.filter(lt=>O(lt.department)===Q).reduce((lt,mt)=>lt+(Number(mt.amount)||0),0),je=h.filter(lt=>O(lt.department)===Q).reduce((lt,mt)=>lt+(Number(mt.amount)||0),0),Ve=u.filter(lt=>O(lt.department)===Q).reduce((lt,mt)=>lt+(Number(mt.amount)||0),0),Ge=ke-je-Ve,nt=Math.abs(Ge),Zt=Ge>0?"Payable":Ge<0?"Receivable":"-",Jt=nt-we;return{department:Q,claimAmount:we,claimType:Oe,validatedAmount:nt,validatedType:Zt,variance:Jt}}),[Be,$e]=g.useState({verificationTransactionId:"",settlementAmount:ge.settlementAmount.toString(),settlementDate:new Date().toISOString().split("T")[0],paymentMode:"",bankReference:"",verificationRemarks:"",adjustments:"0"}),dt=async()=>{var Q,oe;if(!z.department||!z.description||!z.amount){te.error("Please fill in all fields");return}try{const Oe=(await Ee.addLineItem(t,{department:z.department,description:z.description,amount:Math.abs(parseFloat(z.amount)),itemType:"Payable"})).data;Oe.success&&(p([...f,{id:Oe.lineItem.id,department:Oe.lineItem.department,description:Oe.lineItem.description,amount:Math.abs(Oe.lineItem.amount)}]),T({department:"",description:"",amount:""}),te.success("Payable item added"),Y())}catch(we){te.error(((oe=(Q=we.response)==null?void 0:Q.data)==null?void 0:oe.message)||"Failed to add payable item")}},st=async(Q,oe,we)=>{ve(Oe=>{const ke=Oe[Q]||f.find(je=>je.id===Q);return ke?{...Oe,[Q]:{...ke,[oe]:oe==="amount"?Number(we)||0:we}}:Oe})},xt=async Q=>{var we,Oe;const oe=ce[Q];if(!oe){X(null);return}p(ke=>ke.map(je=>je.id===Q?oe:je));try{await Ee.updateLineItem(Q,{department:oe.department,description:oe.description,amount:-Math.abs(Number(oe.amount)||0)}),X(null),ve(ke=>{const je={...ke};return delete je[Q],je}),te.success("Changes saved"),Y(!1)}catch(ke){te.error(((Oe=(we=ke.response)==null?void 0:we.data)==null?void 0:Oe.message)||"Failed to update item"),Y(!1)}},Mt=async Q=>{var oe,we;try{(await Ee.deleteLineItem(Q)).data.success&&(p(f.filter(je=>je.id!==Q)),te.info("Payable item removed"),Y())}catch(Oe){te.error(((we=(oe=Oe.response)==null?void 0:oe.data)==null?void 0:we.message)||"Failed to delete item")}},It=async()=>{var Q,oe;if(!I.department||!I.description||!I.amount){te.error("Please fill in all fields");return}try{const Oe=(await Ee.addLineItem(t,{department:I.department,description:I.description,amount:Math.abs(parseFloat(I.amount)),itemType:"Receivable"})).data;Oe.success&&(x([...h,{id:Oe.lineItem.id,department:Oe.lineItem.department,description:Oe.lineItem.description,amount:Oe.lineItem.amount}]),B({department:"",description:"",amount:""}),te.success("Receivable item added"),Y())}catch(we){te.error(((oe=(Q=we.response)==null?void 0:Q.data)==null?void 0:oe.message)||"Failed to add receivable item")}},he=async(Q,oe,we)=>{et(Oe=>{const ke=Oe[Q]||h.find(je=>je.id===Q);return ke?{...Oe,[Q]:{...ke,[oe]:oe==="amount"?Number(we)||0:we}}:Oe})},pt=async Q=>{var we,Oe;const oe=Pe[Q];if(!oe){ae(null);return}x(ke=>ke.map(je=>je.id===Q?oe:je));try{await Ee.updateLineItem(Q,{department:oe.department,description:oe.description,amount:Math.abs(Number(oe.amount)||0)}),ae(null),et(ke=>{const je={...ke};return delete je[Q],je}),te.success("Changes saved"),Y(!1)}catch(ke){te.error(((Oe=(we=ke.response)==null?void 0:we.data)==null?void 0:Oe.message)||"Failed to update item"),Y(!1)}},ht=async Q=>{var oe,we;try{await Ee.deleteLineItem(Q),x(h.filter(Oe=>Oe.id!==Q)),te.info("Receivable item removed"),Y()}catch(Oe){te.error(((we=(oe=Oe.response)==null?void 0:oe.data)==null?void 0:we.message)||"Failed to delete item")}},_e=async()=>{var Q,oe;if(!G.department||!G.description||!G.amount){te.error("Please fill in all fields");return}try{const Oe=(await Ee.addLineItem(t,{department:G.department,description:G.description,amount:Math.abs(parseFloat(G.amount)),itemType:"Deduction"})).data;Oe.success&&(N([...u,{id:Oe.lineItem.id,department:Oe.lineItem.department,description:Oe.lineItem.description,amount:Oe.lineItem.amount}]),K({department:"",description:"",amount:""}),te.success("Deduction item added"),Y())}catch(we){te.error(((oe=(Q=we.response)==null?void 0:Q.data)==null?void 0:oe.message)||"Failed to add deduction item")}},Vt=async(Q,oe,we)=>{vt(Oe=>{const ke=Oe[Q]||u.find(je=>je.id===Q);return ke?{...Oe,[Q]:{...ke,[oe]:oe==="amount"?Number(we)||0:we}}:Oe})},Pt=async Q=>{var we,Oe;const oe=kt[Q];if(!oe){xe(null);return}N(ke=>ke.map(je=>je.id===Q?oe:je));try{await Ee.updateLineItem(Q,{department:oe.department,description:oe.description,amount:Math.abs(Number(oe.amount)||0)}),xe(null),vt(ke=>{const je={...ke};return delete je[Q],je}),te.success("Changes saved"),Y(!1)}catch(ke){te.error(((Oe=(we=ke.response)==null?void 0:we.data)==null?void 0:Oe.message)||"Failed to update item"),Y(!1)}},_s=async Q=>{try{await Ee.deleteLineItem(Q),N(u.filter(oe=>oe.id!==Q)),te.info("Deduction item removed"),Y()}catch{te.error("Failed to delete item")}},Ys=async Q=>{var we;const oe=Q.target.files;if(oe&&oe.length>0){o(!0);try{let Oe=0;for(let ke=0;ke{if(!Be.verificationTransactionId||!Be.settlementDate||!Be.paymentMode){te.error("Please fill in all required settlement details");return}try{Ks(!0);const Q=(ge.settlementAmount||0)+parseFloat(Be.adjustments||"0");await EE.updateFnF(t,{status:"Completed",finalSettlementAmount:Q,settlementDate:Be.settlementDate,paymentMode:Be.paymentMode,transactionReference:Be.verificationTransactionId,remarks:Be.verificationRemarks||"Approved by Finance"}),te.success(`F&F Settlement approved and completed for ${r.dealerName}`),setTimeout(()=>s(),1500)}catch(Q){console.error("Approve settlement error:",Q),te.error(Q.message||"Failed to approve settlement")}finally{Ks(!1)}},Xs=()=>{if(!Be.verificationRemarks){te.error("Please provide remarks for rejection");return}te.error(`F&F Settlement rejected for ${r.dealerName}`),setTimeout(()=>s(),1500)},$s=()=>{if(!Be.verificationRemarks){te.error("Please provide details for clarification request");return}te.info(`Clarification request sent for ${r.dealerName}`),setTimeout(()=>s(),1500)};return i?e.jsx("div",{className:"flex items-center justify-center p-12",children:e.jsx(ns,{className:"w-8 h-8 animate-spin text-re-red"})}):r?e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(se,{variant:"outline",size:"icon",onClick:s,children:e.jsx(Jr,{className:"w-4 h-4"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-3xl mb-1",children:"F&F Settlement Review"}),e.jsxs("p",{className:"text-slate-600",children:["Full & Final Settlement for ",r.dealerName]})]})]}),e.jsxs(se,{variant:"outline",onClick:()=>n(`/worknotes/fnf/${t}`,{state:{applicationName:r.dealerName||"F&F Settlement",registrationNumber:r.caseNumber||r.settlementId||"",participants:r.participants||[]}}),children:[e.jsx(Ga,{className:"w-4 h-4 mr-2"}),"View Work Notes"]})]}),e.jsx(Le,{className:"border-red-200 bg-red-50",children:e.jsx(Fe,{className:"pt-6",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"size-12 shrink-0 aspect-square rounded-full bg-red-50 flex items-center justify-center",children:e.jsx(ka,{className:"w-5 h-5"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-900",children:"Settlement Pending Finance Approval"}),e.jsxs("p",{className:"text-sm text-slate-600",children:["Case: ",r.caseNumber," • Due: ",r.dueDate]})]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(Ce,{className:"bg-re-red",children:r.status}),e.jsx(Ce,{variant:r.terminationType==="Resignation"?"default":"secondary",children:r.terminationType})]})]})})}),e.jsx(Le,{className:`${ge.settlementType==="Payable to Dealer"?"border-red-300 bg-red-50":ge.settlementType==="Receivable from Dealer"?"border-green-300 bg-green-50":"border-slate-300 bg-slate-50"}`,children:e.jsx(Fe,{className:"pt-6",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[ge.settlementType==="Payable to Dealer"?e.jsx(Yo,{className:"w-12 h-12 text-red-600"}):ge.settlementType==="Receivable from Dealer"?e.jsx(dl,{className:"w-12 h-12 text-green-600"}):e.jsx(un,{className:"w-12 h-12 text-slate-600"}),e.jsxs("div",{children:[e.jsx("p",{className:`text-sm ${ge.settlementType==="Payable to Dealer"?"text-red-700":ge.settlementType==="Receivable from Dealer"?"text-green-700":"text-slate-700"}`,children:ge.settlementType}),e.jsx("p",{className:"text-3xl text-slate-900",children:ge.settlementType==="No Settlement Required"?"₹0":`₹${ge.settlementAmount.toLocaleString("en-IN")}`})]})]}),e.jsxs("div",{className:"text-right",children:[e.jsx("p",{className:"text-sm text-slate-600",children:"Net Settlement Amount"}),e.jsx("p",{className:"text-xs text-slate-500 mt-1",children:ge.settlementType==="Payable to Dealer"?"Company will pay to dealer":ge.settlementType==="Receivable from Dealer"?"Dealer must pay to company":"No payment required"})]})]})})}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[e.jsx("div",{className:"lg:col-span-2 space-y-6",children:e.jsxs(Bn,{value:d,onValueChange:m,className:"w-full",children:[e.jsxs($n,{className:"grid w-full grid-cols-5",children:[e.jsx(Wt,{value:"overview",children:"Overview"}),e.jsx(Wt,{value:"financial",children:"Financial"}),e.jsx(Wt,{value:"departments",children:"Departments"}),e.jsx(Wt,{value:"documents",children:"Documents"}),e.jsx(Wt,{value:"bank",children:"Bank Details"})]}),e.jsxs(Ut,{value:"overview",className:"space-y-4",children:[e.jsxs(Le,{children:[e.jsx(Qe,{children:e.jsxs(Je,{className:"flex items-center gap-2",children:[e.jsx(Lr,{className:"w-5 h-5"}),"Case Information"]})}),e.jsx(Fe,{className:"space-y-4",children:e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-500",children:"Case Number"}),e.jsx("p",{className:"text-slate-900",children:r.caseNumber})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-500",children:"Dealer Code"}),e.jsx("p",{className:"text-slate-900",children:r.dealerCode})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-500",children:"Dealer Name"}),e.jsx("p",{className:"text-slate-900",children:r.dealerName})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-500",children:"Location"}),e.jsx("p",{className:"text-slate-900",children:r.location})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-500",children:"Termination Type"}),e.jsx(Ce,{variant:r.terminationType==="Resignation"?"default":"secondary",children:r.terminationType})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-500",children:"Status"}),e.jsx(Ce,{className:"bg-re-red",children:r.status})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-500",children:"Submitted Date"}),e.jsx("p",{className:"text-slate-900",children:r.submittedDate})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-500",children:"Due Date"}),e.jsx("p",{className:"text-slate-900",children:r.dueDate})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-500",children:"Request Age"}),e.jsx("p",{className:"text-slate-900",children:(()=>{const Q=new Date(r.createdAt),we=Math.abs(new Date().getTime()-Q.getTime()),Oe=Math.ceil(we/(1e3*60*60*24));return`${Oe} day${Oe!==1?"s":""}`})()})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-500",children:"Sales Code"}),e.jsx("p",{className:"text-slate-900",children:r.salesCode})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-500",children:"Service Code"}),e.jsx("p",{className:"text-slate-900",children:r.serviceCode})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-500",children:"Gear Code"}),e.jsx("p",{className:"text-slate-900",children:r.gearCode})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-slate-500",children:"GMA Code"}),e.jsx("p",{className:"text-slate-900",children:r.gmaCode})]})]})})]}),e.jsxs(Le,{children:[e.jsx(Qe,{children:e.jsxs(Je,{className:"flex items-center gap-2",children:[e.jsx(ka,{className:"w-5 h-5"}),"Settlement Calculation Summary"]})}),e.jsxs(Fe,{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex justify-between items-center p-3 bg-green-50 rounded-lg",children:[e.jsx("span",{className:"text-slate-900",children:"Total Payables (to Dealer)"}),e.jsxs("span",{className:"text-green-700 text-lg",children:["+ ₹",ge.payables.toLocaleString("en-IN")]})]}),e.jsxs("div",{className:"flex justify-between items-center p-3 bg-red-50 rounded-lg",children:[e.jsx("span",{className:"text-slate-900",children:"Total Receivables (from Dealer)"}),e.jsxs("span",{className:"text-red-700 text-lg",children:["- ₹",ge.receivables.toLocaleString("en-IN")]})]}),e.jsxs("div",{className:"flex justify-between items-center p-3 bg-red-50 rounded-lg",children:[e.jsx("span",{className:"text-slate-900",children:"Total Deductions"}),e.jsxs("span",{className:"text-re-red-hover text-lg",children:["- ₹",ge.deductions.toLocaleString("en-IN")]})]})]}),e.jsx("div",{className:"h-px bg-slate-300"}),e.jsx("div",{className:`p-4 rounded-lg border-2 ${ge.settlementType==="Payable to Dealer"?"bg-red-100 border-red-300":ge.settlementType==="Receivable from Dealer"?"bg-green-100 border-green-300":"bg-slate-100 border-slate-300"}`,children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-slate-900",children:"Net Settlement"}),e.jsx("p",{className:`text-sm ${ge.settlementType==="Payable to Dealer"?"text-red-700":ge.settlementType==="Receivable from Dealer"?"text-green-700":"text-slate-700"}`,children:ge.settlementType})]}),e.jsx("span",{className:"text-2xl text-slate-900",children:ge.settlementType==="No Settlement Required"?"₹0":`₹${ge.settlementAmount.toLocaleString("en-IN")}`})]})}),e.jsxs("div",{className:"flex items-start gap-3 p-4 bg-blue-50 border border-red-200 rounded-lg",children:[e.jsx(sn,{className:"w-5 h-5 text-re-red mt-0.5"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-slate-900 mb-1",children:"Calculation Formula"}),e.jsxs("p",{className:"text-sm text-slate-600",children:["Net Settlement = Payables - Receivables - Deductions",e.jsx("br",{}),e.jsx("span",{className:"text-xs",children:"All amounts are editable in the Financial tab"})]})]})]})]})]})]}),e.jsxs(Ut,{value:"financial",className:"space-y-4",children:[e.jsxs(Le,{className:"border-blue-200 bg-blue-50",children:[e.jsxs(Qe,{children:[e.jsx(Je,{className:"text-base",children:"Department Claim vs Finance Validation"}),e.jsx(Xt,{children:"Finance validated values are used for final settlement totals."})]}),e.jsx(Fe,{children:e.jsxs(Ts,{children:[e.jsx(Ps,{children:e.jsxs(it,{children:[e.jsx(fe,{children:"Department"}),e.jsx(fe,{children:"Department Claim"}),e.jsx(fe,{children:"Finance Validated"}),e.jsx(fe,{children:"Variance"})]})}),e.jsx(Os,{children:ye.map(Q=>e.jsxs(it,{children:[e.jsx(ue,{children:Q.department}),e.jsx(ue,{children:Q.claimAmount>0?`${Q.claimType} ₹${Q.claimAmount.toLocaleString("en-IN")}`:"-"}),e.jsx(ue,{children:Q.validatedAmount>0?`${Q.validatedType} ₹${Q.validatedAmount.toLocaleString("en-IN")}`:"-"}),e.jsx(ue,{className:Q.variance===0?"text-slate-600":Q.variance>0?"text-red-600":"text-green-600",children:Q.claimAmount===0&&Q.validatedAmount===0?"-":`₹${Q.variance.toLocaleString("en-IN")}`})]},Q.department))})]})})]}),e.jsxs(Le,{className:"border-green-200 bg-green-50",children:[e.jsx(Qe,{children:e.jsx("div",{className:"flex items-center justify-between",children:e.jsxs("div",{children:[e.jsxs(Je,{className:"text-base flex items-center gap-2",children:[e.jsx(lf,{className:"w-5 h-5 text-green-600"}),"Payables to Dealer (Editable)"]}),e.jsx(Xt,{children:"Add or modify amounts company owes to dealer"})]})})}),e.jsxs(Fe,{className:"space-y-4",children:[e.jsxs(Ts,{children:[e.jsx(Ps,{children:e.jsxs(it,{children:[e.jsx(fe,{children:"Department"}),e.jsx(fe,{children:"Description"}),e.jsx(fe,{className:"text-right",children:"Amount (₹)"}),e.jsx(fe,{className:"w-[100px]",children:"Actions"})]})}),e.jsx(Os,{children:f.map(Q=>{var oe,we,Oe;return e.jsxs(it,{children:[e.jsx(ue,{children:H===Q.id?e.jsxs(Dt,{value:((oe=ce[Q.id])==null?void 0:oe.department)||Q.department,onValueChange:ke=>st(Q.id,"department",ke),children:[e.jsx(Et,{className:"h-8",children:e.jsx(Rt,{placeholder:"Department"})}),e.jsx(_t,{children:ll.map(ke=>e.jsx(Me,{value:ke,children:ke},ke))})]}):e.jsx("span",{className:"text-slate-900",children:O(Q.department)})}),e.jsx(ue,{children:H===Q.id?e.jsx(at,{value:((we=ce[Q.id])==null?void 0:we.description)||Q.description,onChange:ke=>st(Q.id,"description",ke.target.value),className:"h-8"}):e.jsx("span",{className:"text-slate-600",children:Q.description})}),e.jsx(ue,{className:"text-right",children:H===Q.id?e.jsx(at,{type:"number",value:((Oe=ce[Q.id])==null?void 0:Oe.amount)??Q.amount,onChange:ke=>st(Q.id,"amount",ke.target.value),className:"h-8 text-right"}):e.jsxs("span",{className:"text-slate-900",children:["₹",Q.amount.toLocaleString("en-IN")]})}),e.jsx(ue,{children:e.jsxs("div",{className:"flex gap-1",children:[H===Q.id?e.jsx(se,{size:"icon",variant:"ghost",className:"h-8 w-8",onClick:()=>xt(Q.id),children:e.jsx(ml,{className:"w-4 h-4"})}):e.jsx(se,{size:"icon",variant:"ghost",className:"h-8 w-8",onClick:()=>{X(Q.id),ve(ke=>({...ke,[Q.id]:{...Q}}))},children:e.jsx(Cr,{className:"w-4 h-4"})}),e.jsx(se,{size:"icon",variant:"ghost",className:"h-8 w-8 text-red-600 hover:text-red-700",onClick:()=>Mt(Q.id),children:e.jsx(ar,{className:"w-4 h-4"})})]})})]},Q.id)})})]}),e.jsxs("div",{className:"border-t border-green-300 pt-4 space-y-3",children:[e.jsx("p",{className:"text-sm text-slate-700",children:"Add New Payable Item:"}),e.jsxs("div",{className:"grid grid-cols-12 gap-2",children:[e.jsxs(Dt,{value:z.department,onValueChange:Q=>T({...z,department:Q}),children:[e.jsx(Et,{className:"col-span-3",children:e.jsx(Rt,{placeholder:"Department"})}),e.jsx(_t,{children:ll.map(Q=>e.jsx(Me,{value:Q,children:Q},Q))})]}),e.jsx(at,{placeholder:"Description",value:z.description,onChange:Q=>T({...z,description:Q.target.value}),className:"col-span-5"}),e.jsx(at,{type:"number",placeholder:"Amount",value:z.amount,onChange:Q=>T({...z,amount:Q.target.value}),className:"col-span-3"}),e.jsx(se,{onClick:dt,className:"col-span-1 bg-green-600 hover:bg-green-700",children:e.jsx(An,{className:"w-4 h-4"})})]})]}),e.jsx("div",{className:"pt-3 border-t-2 border-green-400",children:e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-slate-900",children:"Total Payables"}),e.jsxs("span",{className:"text-green-700 text-xl",children:["₹",ge.payables.toLocaleString("en-IN")]})]})})]})]}),e.jsxs(Le,{className:"border-red-200 bg-red-50",children:[e.jsx(Qe,{children:e.jsx("div",{className:"flex items-center justify-between",children:e.jsxs("div",{children:[e.jsxs(Je,{className:"text-base flex items-center gap-2",children:[e.jsx(ay,{className:"w-5 h-5 text-red-600"}),"Receivables from Dealer (Editable)"]}),e.jsx(Xt,{children:"Add or modify amounts dealer owes to company"})]})})}),e.jsxs(Fe,{className:"space-y-4",children:[e.jsxs(Ts,{children:[e.jsx(Ps,{children:e.jsxs(it,{children:[e.jsx(fe,{children:"Department"}),e.jsx(fe,{children:"Description"}),e.jsx(fe,{className:"text-right",children:"Amount (₹)"}),e.jsx(fe,{className:"w-[100px]",children:"Actions"})]})}),e.jsx(Os,{children:h.map(Q=>{var oe,we,Oe;return e.jsxs(it,{children:[e.jsx(ue,{children:J===Q.id?e.jsxs(Dt,{value:((oe=Pe[Q.id])==null?void 0:oe.department)||Q.department,onValueChange:ke=>he(Q.id,"department",ke),children:[e.jsx(Et,{className:"h-8",children:e.jsx(Rt,{placeholder:"Department"})}),e.jsx(_t,{children:ll.map(ke=>e.jsx(Me,{value:ke,children:ke},ke))})]}):e.jsx("span",{className:"text-slate-900",children:O(Q.department)})}),e.jsx(ue,{children:J===Q.id?e.jsx(at,{value:((we=Pe[Q.id])==null?void 0:we.description)||Q.description,onChange:ke=>he(Q.id,"description",ke.target.value),className:"h-8"}):e.jsx("span",{className:"text-slate-600",children:Q.description})}),e.jsx(ue,{className:"text-right",children:J===Q.id?e.jsx(at,{type:"number",value:((Oe=Pe[Q.id])==null?void 0:Oe.amount)??Q.amount,onChange:ke=>he(Q.id,"amount",ke.target.value),className:"h-8 text-right"}):e.jsxs("span",{className:"text-slate-900",children:["₹",Q.amount.toLocaleString("en-IN")]})}),e.jsx(ue,{children:e.jsxs("div",{className:"flex gap-1",children:[J===Q.id?e.jsx(se,{size:"icon",variant:"ghost",className:"h-8 w-8",onClick:()=>pt(Q.id),children:e.jsx(ml,{className:"w-4 h-4"})}):e.jsx(se,{size:"icon",variant:"ghost",className:"h-8 w-8",onClick:()=>{ae(Q.id),et(ke=>({...ke,[Q.id]:{...Q}}))},children:e.jsx(Cr,{className:"w-4 h-4"})}),e.jsx(se,{size:"icon",variant:"ghost",className:"h-8 w-8 text-red-600 hover:text-red-700",onClick:()=>ht(Q.id),children:e.jsx(ar,{className:"w-4 h-4"})})]})})]},Q.id)})})]}),e.jsxs("div",{className:"border-t border-red-300 pt-4 space-y-3",children:[e.jsx("p",{className:"text-sm text-slate-700",children:"Add New Receivable Item:"}),e.jsxs("div",{className:"grid grid-cols-12 gap-2",children:[e.jsxs(Dt,{value:I.department,onValueChange:Q=>B({...I,department:Q}),children:[e.jsx(Et,{className:"col-span-3",children:e.jsx(Rt,{placeholder:"Department"})}),e.jsx(_t,{children:ll.map(Q=>e.jsx(Me,{value:Q,children:Q},Q))})]}),e.jsx(at,{placeholder:"Description",value:I.description,onChange:Q=>B({...I,description:Q.target.value}),className:"col-span-5"}),e.jsx(at,{type:"number",placeholder:"Amount",value:I.amount,onChange:Q=>B({...I,amount:Q.target.value}),className:"col-span-3"}),e.jsx(se,{onClick:It,className:"col-span-1 bg-red-600 hover:bg-red-700",children:e.jsx(An,{className:"w-4 h-4"})})]})]}),e.jsx("div",{className:"pt-3 border-t-2 border-red-400",children:e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-slate-900",children:"Total Receivables"}),e.jsxs("span",{className:"text-red-700 text-xl",children:["₹",ge.receivables.toLocaleString("en-IN")]})]})})]})]}),e.jsxs(Le,{className:"border-red-200 bg-red-50",children:[e.jsx(Qe,{children:e.jsx("div",{className:"flex items-center justify-between",children:e.jsxs("div",{children:[e.jsxs(Je,{className:"text-base flex items-center gap-2",children:[e.jsx(sn,{className:"w-5 h-5 text-re-red"}),"Deductions (Editable)"]}),e.jsx(Xt,{children:"Add or modify pending claims and deductions"})]})})}),e.jsxs(Fe,{className:"space-y-4",children:[e.jsxs(Ts,{children:[e.jsx(Ps,{children:e.jsxs(it,{children:[e.jsx(fe,{children:"Department"}),e.jsx(fe,{children:"Description"}),e.jsx(fe,{className:"text-right",children:"Amount (₹)"}),e.jsx(fe,{className:"w-[100px]",children:"Actions"})]})}),e.jsx(Os,{children:u.map(Q=>{var oe,we,Oe;return e.jsxs(it,{children:[e.jsx(ue,{children:le===Q.id?e.jsxs(Dt,{value:((oe=kt[Q.id])==null?void 0:oe.department)||Q.department,onValueChange:ke=>Vt(Q.id,"department",ke),children:[e.jsx(Et,{className:"h-8",children:e.jsx(Rt,{placeholder:"Department"})}),e.jsx(_t,{children:ll.map(ke=>e.jsx(Me,{value:ke,children:ke},ke))})]}):e.jsx("span",{className:"text-slate-900",children:O(Q.department)})}),e.jsx(ue,{children:le===Q.id?e.jsx(at,{value:((we=kt[Q.id])==null?void 0:we.description)||Q.description,onChange:ke=>Vt(Q.id,"description",ke.target.value),className:"h-8"}):e.jsx("span",{className:"text-slate-600",children:Q.description})}),e.jsx(ue,{className:"text-right",children:le===Q.id?e.jsx(at,{type:"number",value:((Oe=kt[Q.id])==null?void 0:Oe.amount)??Q.amount,onChange:ke=>Vt(Q.id,"amount",ke.target.value),className:"h-8 text-right"}):e.jsxs("span",{className:"text-slate-900",children:["₹",Q.amount.toLocaleString("en-IN")]})}),e.jsx(ue,{children:e.jsxs("div",{className:"flex gap-1",children:[le===Q.id?e.jsx(se,{size:"icon",variant:"ghost",className:"h-8 w-8",onClick:()=>Pt(Q.id),children:e.jsx(ml,{className:"w-4 h-4"})}):e.jsx(se,{size:"icon",variant:"ghost",className:"h-8 w-8",onClick:()=>{xe(Q.id),vt(ke=>({...ke,[Q.id]:{...Q}}))},children:e.jsx(Cr,{className:"w-4 h-4"})}),e.jsx(se,{size:"icon",variant:"ghost",className:"h-8 w-8 text-red-600 hover:text-red-700",onClick:()=>_s(Q.id),children:e.jsx(ar,{className:"w-4 h-4"})})]})})]},Q.id)})})]}),e.jsxs("div",{className:"border-t border-red-300 pt-4 space-y-3",children:[e.jsx("p",{className:"text-sm text-slate-700",children:"Add New Deduction Item:"}),e.jsxs("div",{className:"grid grid-cols-12 gap-2",children:[e.jsxs(Dt,{value:G.department,onValueChange:Q=>K({...G,department:Q}),children:[e.jsx(Et,{className:"col-span-3",children:e.jsx(Rt,{placeholder:"Department"})}),e.jsx(_t,{children:ll.map(Q=>e.jsx(Me,{value:Q,children:Q},Q))})]}),e.jsx(at,{placeholder:"Description",value:G.description,onChange:Q=>K({...G,description:Q.target.value}),className:"col-span-5"}),e.jsx(at,{type:"number",placeholder:"Amount",value:G.amount,onChange:Q=>K({...G,amount:Q.target.value}),className:"col-span-3"}),e.jsx(se,{onClick:_e,className:"col-span-1 bg-re-red hover:bg-re-red-hover",children:e.jsx(An,{className:"w-4 h-4"})})]})]}),e.jsx("div",{className:"pt-3 border-t-2 border-red-300",children:e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-slate-900",children:"Total Deductions"}),e.jsxs("span",{className:"text-re-red-hover text-xl",children:["₹",ge.deductions.toLocaleString("en-IN")]})]})})]})]}),e.jsxs(Le,{className:"border-2 border-blue-300 bg-blue-50",children:[e.jsx(Qe,{children:e.jsxs(Je,{className:"flex items-center gap-2",children:[e.jsx(un,{className:"w-5 h-5 text-re-red"}),"Final Settlement Summary"]})}),e.jsxs(Fe,{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex justify-between items-center p-3 bg-white rounded-lg",children:[e.jsx("span",{className:"text-slate-900",children:"Total Payables (to Dealer)"}),e.jsxs("span",{className:"text-green-700 text-lg",children:["+ ₹",ge.payables.toLocaleString("en-IN")]})]}),e.jsxs("div",{className:"flex justify-between items-center p-3 bg-white rounded-lg",children:[e.jsx("span",{className:"text-slate-900",children:"Total Receivables (from Dealer)"}),e.jsxs("span",{className:"text-red-700 text-lg",children:["- ₹",ge.receivables.toLocaleString("en-IN")]})]}),e.jsxs("div",{className:"flex justify-between items-center p-3 bg-white rounded-lg",children:[e.jsx("span",{className:"text-slate-900",children:"Total Deductions"}),e.jsxs("span",{className:"text-re-red-hover text-lg",children:["- ₹",ge.deductions.toLocaleString("en-IN")]})]})]}),e.jsx("div",{className:"h-px bg-blue-300"}),e.jsx("div",{className:`p-4 rounded-lg border-2 ${ge.settlementType==="Payable to Dealer"?"bg-red-100 border-red-400":ge.settlementType==="Receivable from Dealer"?"bg-green-100 border-green-400":"bg-slate-100 border-slate-400"}`,children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-slate-600 mb-1",children:"Net Settlement"}),e.jsx("p",{className:`text-lg ${ge.settlementType==="Payable to Dealer"?"text-red-700":ge.settlementType==="Receivable from Dealer"?"text-green-700":"text-slate-700"}`,children:ge.settlementType})]}),e.jsx("span",{className:"text-3xl text-slate-900",children:ge.settlementType==="No Settlement Required"?"₹0":`₹${ge.settlementAmount.toLocaleString("en-IN")}`})]})}),e.jsxs("div",{className:"flex items-start gap-3 p-4 bg-white border border-red-200 rounded-lg",children:[e.jsx(sn,{className:"w-5 h-5 text-re-red mt-0.5"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-slate-900 mb-1",children:"Calculation Formula"}),e.jsxs("p",{className:"text-sm text-slate-600",children:["Net Settlement = Payables - Receivables - Deductions",e.jsx("br",{}),ge.netSettlement>0&&"Positive value means company pays to dealer",ge.netSettlement<0&&"Negative value means dealer pays to company",ge.netSettlement===0&&"Zero means no payment required from either party"]})]})]})]})]})]}),e.jsxs(Ut,{value:"departments",className:"space-y-4",children:[e.jsxs(Le,{children:[e.jsxs(Qe,{children:[e.jsxs(Je,{className:"flex items-center gap-2",children:[e.jsx(Ra,{className:"w-5 h-5"}),"Department Response Progress"]}),e.jsxs(Xt,{children:[r.departmentResponses.filter(Q=>Q.status!=="Pending").length," of ",r.departmentResponses.length," departments have responded"]})]}),e.jsxs(Fe,{className:"space-y-4",children:[e.jsx(dc,{value:r.departmentResponses.filter(Q=>Q.status!=="Pending").length/r.departmentResponses.length*100,className:"h-3"}),e.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[e.jsxs("div",{className:"p-4 bg-green-50 rounded-lg border border-green-200",children:[e.jsx("p",{className:"text-sm text-green-700 mb-1",children:"NOC Submitted"}),e.jsx("p",{className:"text-2xl text-green-600",children:r.departmentResponses.filter(Q=>Q.status==="NOC Submitted").length})]}),e.jsxs("div",{className:"p-4 bg-red-50 rounded-lg border border-red-200",children:[e.jsx("p",{className:"text-sm text-red-700 mb-1",children:"Dues Pending"}),e.jsx("p",{className:"text-2xl text-red-600",children:r.departmentResponses.filter(Q=>Q.status==="Dues Pending").length})]}),e.jsxs("div",{className:"p-4 bg-slate-50 rounded-lg border border-slate-200",children:[e.jsx("p",{className:"text-sm text-slate-700 mb-1",children:"Awaiting Response"}),e.jsx("p",{className:"text-2xl text-slate-600",children:r.departmentResponses.filter(Q=>Q.status==="Pending").length})]})]})]})]}),e.jsxs(Le,{children:[e.jsxs(Qe,{children:[e.jsx(Je,{children:"All Department Responses"}),e.jsx(Xt,{children:"Status of NOC and dues clearance from all 16 departments (read-only for Finance; updates are done by department stakeholders)."})]}),e.jsx(Fe,{children:e.jsxs(Ts,{children:[e.jsx(Ps,{children:e.jsxs(it,{children:[e.jsx(fe,{children:"Department"}),e.jsx(fe,{children:"Status"}),e.jsx(fe,{children:"Amount Type"}),e.jsx(fe,{children:"Amount"}),e.jsx(fe,{children:"Submitted Date"}),e.jsx(fe,{children:"Remarks"})]})}),e.jsx(Os,{children:r.departmentResponses.map(Q=>e.jsxs(it,{className:Q.duesFlow==="recovery"?"bg-red-50/40":Q.duesFlow==="payable"?"bg-emerald-50/40":"",children:[e.jsx(ue,{children:Q.departmentName}),e.jsx(ue,{children:e.jsx(Ce,{className:`border ${Q.status==="NOC Submitted"?"bg-green-100 text-green-700 border-green-300":Q.status==="Dues Pending"?"bg-red-100 text-red-700 border-red-300":"bg-slate-100 text-slate-700 border-slate-300"}`,children:Q.status})}),e.jsx(ue,{children:Q.amountType?e.jsx(Ce,{variant:"outline",className:Q.duesFlow==="recovery"?"bg-red-100 text-red-900 border-red-400 font-semibold":Q.duesFlow==="payable"?"bg-emerald-100 text-emerald-900 border-emerald-400 font-semibold":"bg-slate-50 text-slate-700 border-slate-200",children:Q.amountType}):"-"}),e.jsx(ue,{children:Q.amount?e.jsxs("span",{className:`rounded-md px-2 py-0.5 font-semibold tabular-nums ${Q.duesFlow==="recovery"?"bg-red-100 text-red-800 ring-1 ring-red-300/70":Q.duesFlow==="payable"?"bg-emerald-100 text-emerald-800 ring-1 ring-emerald-300/70":"text-slate-700"}`,children:["₹",Q.amount.toLocaleString("en-IN")]}):"-"}),e.jsx(ue,{children:Q.submittedDate||"-"}),e.jsx(ue,{className:"max-w-xs truncate",children:e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("span",{children:Q.remarks||"-"}),Q.supportingDocument&&e.jsxs("button",{onClick:()=>w({fileName:`${Q.departmentName}_Proof`,filePath:Q.supportingDocument,documentType:"Departmental Clearance Proof"}),className:"flex items-center gap-1 text-[10px] text-re-red hover:underline",children:[e.jsx(bu,{className:"w-3 h-3"}),"View Proof"]})]})})]},Q.id))})]})})]}),e.jsx(Le,{className:"bg-blue-50 border-red-200",children:e.jsx(Fe,{className:"pt-6",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(sn,{className:"w-5 h-5 text-re-red mt-0.5"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-slate-900 mb-1",children:"Department Response Guidelines"}),e.jsxs("ul",{className:"text-sm text-slate-700 space-y-1",children:[e.jsxs("li",{children:["• ",e.jsx("strong",{children:"NOC Submitted:"})," Department has no outstanding dues and provided clearance"]}),e.jsxs("li",{children:["• ",e.jsx("strong",{children:"Dues Pending:"})," Department has identified amounts to be recovered or paid"]}),e.jsxs("li",{children:["• ",e.jsx("strong",{children:"Pending:"})," Department has not yet responded to the F&F request"]})]})]})]})})})]}),e.jsxs(Ut,{value:"documents",className:"space-y-4",children:[e.jsxs(Le,{children:[e.jsx(Qe,{children:e.jsxs(Je,{className:"flex items-center gap-2",children:[e.jsx(Ns,{className:"w-5 h-5"}),"Submitted Documents"]})}),e.jsx(Fe,{children:e.jsx("div",{className:"space-y-2",children:r.documents.map((Q,oe)=>e.jsxs("div",{className:"flex items-center justify-between p-3 bg-slate-50 rounded-lg border border-slate-200",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(Ns,{className:"w-5 h-5 text-slate-400"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-slate-900",children:Q.name}),e.jsxs("p",{className:"text-sm text-slate-500",children:[Q.size," • ",Q.type," • Uploaded on ",Q.uploadedOn]})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[Q.url&&Q.url!=="#"&&e.jsxs("button",{onClick:()=>w({fileName:Q.name,filePath:Q.url,documentType:Q.type}),className:"text-re-red hover:text-re-red-hover text-[10px] font-semibold flex items-center gap-1",children:[e.jsx(bu,{className:"w-3 h-3"})," PREVIEW"]}),e.jsx(se,{variant:"outline",size:"sm",onClick:async()=>{if(Q.url&&Q.url!=="#")try{const Oe=await(await fetch(Q.url)).blob(),ke=window.URL.createObjectURL(Oe),je=document.createElement("a");je.href=ke,je.download=Q.name||"download",document.body.appendChild(je),je.click(),document.body.removeChild(je),window.URL.revokeObjectURL(ke)}catch{const Oe=document.createElement("a");Oe.href=Q.url,Oe.download=Q.name||"download",document.body.appendChild(Oe),Oe.click(),document.body.removeChild(Oe)}else te.error("Document URL not available")},children:"Download"})]})]},oe))})})]}),e.jsxs(Le,{children:[e.jsxs(Qe,{children:[e.jsxs(Je,{className:"flex items-center gap-2",children:[e.jsx(or,{className:"w-5 h-5"}),"Upload Settlement Verification Documents"]}),e.jsx(Xt,{children:"Upload bank receipts, settlement proofs, or any additional documents"})]}),e.jsx(Fe,{children:e.jsx("div",{className:"space-y-4",children:e.jsxs("div",{className:"border-2 border-dashed border-slate-300 rounded-lg p-8 text-center hover:border-red-300 hover:bg-red-50 transition-colors",children:[e.jsx(or,{className:"w-8 h-8 text-slate-400 mx-auto mb-2"}),e.jsx("p",{className:"text-slate-600 mb-2",children:"Click to upload or drag and drop"}),e.jsx("p",{className:"text-sm text-slate-500",children:"PDF, DOC, DOCX, PNG, JPG, XLSX (max 10MB)"}),e.jsx("input",{type:"file",multiple:!0,className:"hidden",id:"file-upload",onChange:Ys,accept:".pdf,.doc,.docx,.png,.jpg,.jpeg,.xlsx,.xls"}),e.jsx("label",{htmlFor:"file-upload",children:e.jsx(se,{variant:"outline",className:"mt-4",asChild:!0,children:e.jsx("span",{children:"Choose Files"})})})]})})})]})]}),e.jsx(Ut,{value:"bank",className:"space-y-4",children:e.jsxs(Le,{children:[e.jsxs(Qe,{className:"flex flex-row items-center justify-between",children:[e.jsxs("div",{children:[e.jsxs(Je,{className:"flex items-center gap-2",children:[e.jsx(id,{className:"w-5 h-5"}),"Dealer Bank Account Details"]}),e.jsx(Xt,{children:"Manage bank accounts for settlement transfer"})]}),e.jsxs(se,{size:"sm",className:"bg-re-red",onClick:()=>{_(null),S(!0)},children:[e.jsx(An,{className:"w-4 h-4 mr-2"}),"Add Bank Account"]})]}),e.jsx(Fe,{children:e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:j.length>0?j.map(Q=>e.jsxs(Le,{className:`relative ${Q.isPrimary?"border-re-red bg-blue-50/30":""}`,children:[Q.isPrimary&&e.jsx("div",{className:"absolute top-0 right-0 p-1 bg-re-red text-white text-[10px] uppercase font-bold px-2 rounded-bl",children:"Primary"}),e.jsx(Fe,{className:"p-4 pt-6",children:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx(de,{className:"text-[10px] text-slate-500 uppercase font-bold",children:"Account Holder"}),e.jsx("p",{className:"text-sm font-semibold",children:Q.accountHolderName})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[e.jsxs("div",{children:[e.jsx(de,{className:"text-[10px] text-slate-500 uppercase font-bold",children:"Bank"}),e.jsx("p",{className:"text-xs truncate",children:Q.bankName})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-[10px] text-slate-500 uppercase font-bold",children:"IFSC"}),e.jsx("p",{className:"text-xs",children:Q.ifscCode})]})]}),e.jsxs("div",{children:[e.jsx(de,{className:"text-[10px] text-slate-500 uppercase font-bold",children:"Account Number"}),e.jsx("p",{className:"text-xs font-mono",children:Q.accountNumber})]}),e.jsxs("div",{className:"flex items-center justify-end gap-2 pt-2 border-t border-slate-100",children:[e.jsxs(se,{variant:"ghost",size:"sm",className:"h-7 text-[11px] text-re-red",onClick:()=>{_(Q),S(!0)},children:[e.jsx(Cr,{className:"w-3 h-3 mr-1"}),"Edit"]}),e.jsxs(se,{variant:"ghost",size:"sm",className:"h-7 text-[11px] text-red-600",onClick:()=>U(Q.id),children:[e.jsx(ar,{className:"w-3 h-3 mr-1"}),"Delete"]})]})]})})]},Q.id)):e.jsxs("div",{className:"col-span-full py-12 text-center border-2 border-dashed rounded-lg bg-slate-50",children:[e.jsx(id,{className:"w-12 h-12 text-slate-300 mx-auto mb-3"}),e.jsx("p",{className:"text-slate-600 text-sm",children:"No bank details found"})]})})})]})})]})}),e.jsx("div",{className:"space-y-6",children:e.jsxs(Le,{className:"sticky top-6",children:[e.jsxs(Qe,{children:[e.jsxs(Je,{className:"flex items-center gap-2",children:[e.jsx(Wu,{className:"w-5 h-5"}),"Settlement Verification"]}),e.jsx(Xt,{children:"Enter settlement transaction details"})]}),e.jsx(Fe,{className:"space-y-4",children:r.status==="Completed"?e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"p-4 bg-green-50 border border-green-200 rounded-lg",children:[e.jsxs("div",{className:"flex items-center gap-3 text-green-700 mb-2",children:[e.jsx(un,{className:"w-5 h-5"}),e.jsx("span",{className:"font-semibold",children:"Settlement Completed"})]}),e.jsx("p",{className:"text-sm text-green-600",children:"This settlement has been finalized and processed."})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex justify-between items-center py-2 border-b",children:[e.jsx("span",{className:"text-slate-500 text-sm",children:"Settlement Date"}),e.jsx("span",{className:"text-slate-900 font-medium",children:ua(Be.settlementDate)})]}),e.jsxs("div",{className:"flex justify-between items-center py-2 border-b",children:[e.jsx("span",{className:"text-slate-500 text-sm",children:"Payment Mode"}),e.jsx("span",{className:"text-slate-900 font-medium",children:Be.paymentMode})]}),e.jsxs("div",{className:"flex justify-between items-center py-2 border-b",children:[e.jsx("span",{className:"text-slate-500 text-sm",children:"Transaction ID"}),e.jsx("span",{className:"text-slate-900 font-medium truncate ml-4 max-w-[150px]",title:Be.verificationTransactionId,children:Be.verificationTransactionId})]}),e.jsxs("div",{className:"flex justify-between items-center py-2 border-b",children:[e.jsx("span",{className:"text-slate-500 text-sm",children:"Final Amount"}),e.jsxs("span",{className:"text-slate-900 font-bold text-lg",children:["₹",parseFloat(Be.settlementAmount).toLocaleString()]})]})]}),Be.verificationRemarks&&e.jsxs("div",{className:"mt-4",children:[e.jsx(de,{className:"text-slate-500 mb-1 block",children:"Finance Remarks"}),e.jsx("div",{className:"p-3 bg-slate-50 rounded border text-sm text-slate-700",children:Be.verificationRemarks})]}),e.jsxs(se,{variant:"outline",className:"w-full mt-4",onClick:()=>window.print(),children:[e.jsx(FI,{className:"w-4 h-4 mr-2"}),"Download Settlement Letter"]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"bg-slate-50 border border-slate-200 rounded-lg p-4 mb-4",children:[e.jsxs("p",{className:"text-sm font-bold text-slate-900 mb-3 flex items-center gap-2",children:[e.jsx(un,{className:"w-4 h-4 text-re-red"}),"Compliance Checklist"]}),e.jsx("div",{className:"space-y-3",children:Yg.map(Q=>e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("input",{type:"checkbox",id:`check-${Q.id}`,checked:A.includes(Q.id),onChange:()=>M(Q.id),className:"w-4 h-4 mt-1 rounded border-slate-300 text-re-red focus:ring-re-red"}),e.jsx("label",{htmlFor:`check-${Q.id}`,className:"text-sm text-slate-700 leading-tight",children:Q.label})]},Q.id))})]}),e.jsxs("div",{children:[e.jsxs(de,{htmlFor:"paymentMode",children:["Payment Mode ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx(at,{id:"paymentMode",placeholder:"e.g., NEFT, RTGS, Cheque",value:Be.paymentMode,onChange:Q=>$e({...Be,paymentMode:Q.target.value})})]}),e.jsxs("div",{children:[e.jsxs(de,{htmlFor:"verificationTxnId",children:["Transaction ID / Reference ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx(at,{id:"verificationTxnId",placeholder:"Enter transaction reference",value:Be.verificationTransactionId,onChange:Q=>$e({...Be,verificationTransactionId:Q.target.value})})]}),e.jsxs("div",{children:[e.jsx(de,{htmlFor:"bankReference",children:"Bank Reference Number"}),e.jsx(at,{id:"bankReference",placeholder:"Enter bank reference",value:Be.bankReference,onChange:Q=>$e({...Be,bankReference:Q.target.value})})]}),e.jsxs("div",{children:[e.jsxs(de,{htmlFor:"settlementAmount",children:["Settlement Amount (₹) ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx(at,{id:"settlementAmount",type:"number",placeholder:"Enter settlement amount",value:Be.settlementAmount,onChange:Q=>$e({...Be,settlementAmount:Q.target.value})})]}),e.jsxs("div",{children:[e.jsx(de,{htmlFor:"adjustments",children:"Adjustments (₹)"}),e.jsx(at,{id:"adjustments",type:"number",placeholder:"Enter any adjustments",value:Be.adjustments,onChange:Q=>{const oe=Q.target.value,we=ge.settlementAmount+parseFloat(oe||"0");$e({...Be,adjustments:oe,settlementAmount:we.toString()})}}),parseFloat(Be.adjustments)!==0&&e.jsxs("p",{className:"text-sm text-re-red mt-1 flex items-center gap-1",children:[e.jsx(sn,{className:"w-3 h-3"}),"Adjusted amount: ₹",Be.settlementAmount]})]}),e.jsxs("div",{children:[e.jsxs(de,{htmlFor:"settlementDate",children:["Settlement Date ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx(at,{id:"settlementDate",type:"date",value:Be.settlementDate,onChange:Q=>$e({...Be,settlementDate:Q.target.value})})]}),e.jsxs("div",{children:[e.jsx(de,{htmlFor:"verificationRemarks",children:"Verification Remarks"}),e.jsx(Ws,{id:"verificationRemarks",placeholder:"Enter any remarks or notes...",rows:4,value:Be.verificationRemarks,onChange:Q=>$e({...Be,verificationRemarks:Q.target.value})})]}),e.jsxs("div",{className:"pt-4 space-y-3 border-t",children:[e.jsxs(se,{className:"w-full bg-green-600 hover:bg-green-700",onClick:Qs,disabled:Bs||A.length{S(!1),_(null)},onSubmit:W,editingBank:R,isSubmitting:!1}),e.jsx(mo,{isOpen:!!v,onClose:()=>w(null),document:v})]}):e.jsxs("div",{className:"text-center py-12 text-slate-500",children:[e.jsx("p",{children:"Settlement case not found"}),e.jsx(se,{onClick:s,className:"mt-4",children:"Go Back"})]})}const EV=()=>{const t=Lu(),s=g.useCallback(async()=>{try{t(l1(!0));const[r,a,i,o,d,m,f,p,h,x,u,N,v]=await Promise.all([Is.getRoles().catch(()=>({success:!1})),Is.getZones().catch(()=>({success:!1})),Is.getPermissions().catch(()=>({success:!1})),Is.getRegions().catch(()=>({success:!1})),Is.getUsers().catch(()=>({success:!1})),Is.getStates().catch(()=>({success:!1})),Is.getEmailTemplates().catch(()=>({success:!1})),Is.getDistricts({limit:"all"}).catch(()=>({success:!1})),Is.getAreas({limit:"all"}).catch(()=>({success:!1})),Is.getSlaConfigs().catch(()=>({success:!1})),Is.getASMs().catch(()=>({success:!1})),Is.getZonalManagers().catch(()=>({success:!1})),Is.getDDLeads().catch(()=>({success:!1}))]),w=H=>H.success?H:H.data?H.data:H,j=w(r),b=w(a),C=w(i),S=w(o),R=w(d),_=w(m),A=w(f),E=w(p),q=w(h),O=w(x),D=w(u),P=w(N),L=w(v),$=((R==null?void 0:R.users)||(R==null?void 0:R.data)||[]).map(H=>{var ce;const X=Array.isArray(H.territoryProfile)?H.territoryProfile:[],J=X.filter(ve=>String(ve.locationType||"").toLowerCase()==="zone").map(ve=>ve.locationName||ve.zone).filter(Boolean),ae=X.filter(ve=>String(ve.locationType||"").toLowerCase()==="region").map(ve=>ve.locationName||ve.region).filter(Boolean),le=Array.from(new Set([...H.allZones||[],...J])),xe=Array.from(new Set([...H.allRegions||[],...ae]));return{...H,name:H.fullName||H.name,role:((ce=H.role)==null?void 0:ce.roleName)||(Array.isArray(H.allRoles)&&H.allRoles.length>0?H.allRoles[0]:"System User"),zone:le.length>0?le.join(", "):"Global",region:xe.length>0?xe.join(", "):"Unassigned",status:H.isActive!==!1?"Active":"Inactive"}}),Y=((j==null?void 0:j.roles)||(j==null?void 0:j.data)||[]).map(H=>{var X;return{id:H.id,name:H.roleName,permissions:((X=H.permissions)==null?void 0:X.map(J=>J.permissionCode))||[],userCount:H.userCount||0}}),Z=((b==null?void 0:b.zones)||(b==null?void 0:b.data)||[]).map(H=>{var J,ae,le,xe,ce;const X=(H.name||H.zoneName||"").toUpperCase();return{id:H.id,name:X,description:H.description||"",code:H.name?H.name.substring(0,3).toUpperCase():"ZON",regionCount:H.regionCount||0,asmCount:H.asmCount||0,regionalOfficerCount:H.regionalOfficerCount||0,zmCount:H.zmCount||0,states:H.states||[],zonalBusinessHead:{name:((J=H.zonalBusinessHead)==null?void 0:J.name)||((ae=H.zonalBusinessHead)==null?void 0:ae.fullName)||"Not Assigned",email:((le=H.zonalBusinessHead)==null?void 0:le.email)||"",phone:((xe=H.zonalBusinessHead)==null?void 0:xe.mobileNumber)||((ce=H.zonalBusinessHead)==null?void 0:ce.phone)||""},zonalManagers:(H.zonalManagers||[]).map(ve=>({id:ve.id,name:ve.name||ve.fullName||"Unknown",email:ve.email||"",phone:ve.phone||ve.mobileNumber||"",regions:ve.regions||[]}))}}),W=((S==null?void 0:S.regions)||(S==null?void 0:S.data)||[]).map(H=>({id:H.id,code:H.code||(H.name?H.name.substring(0,3).toUpperCase():"REG"),name:H.name||H.regionName,zoneId:H.zoneId,zoneName:H.zoneName||"Unknown",states:H.states||[],cities:H.cities||[],districts:(H.districts||[]).map(X=>({id:X.id,name:X.name,stateId:X.stateId})),asmCount:H.asmCount||0,regionalOfficerCount:H.regionalOfficerCount||0,regionalManager:H.regionalManager?{id:H.regionalManager.id,name:H.regionalManager.fullName||H.regionalManager.name,email:H.regionalManager.email,phone:H.regionalManager.mobileNumber||H.regionalManager.phone}:void 0,status:H.isActive!==!1?"Active":"Inactive"})),U=Array.isArray(D==null?void 0:D.data)?D.data:Array.isArray(D)?D:[],M=Array.isArray(P==null?void 0:P.data)?P.data:Array.isArray(P)?P:[],z=M.length>0?M:$.filter(H=>{var X;return(X=H.allRoles)==null?void 0:X.some(J=>(J==="ZM"||J==="DD-ZM"||J.includes("ZONAL MANAGER"))&&!J.includes("HEAD"))}).map(H=>{const X=(H.territoryProfile||[]).find(le=>le.roleCode==="ZM"||le.roleCode==="DD-ZM")||{},J=(H.territoryProfile||[]).filter(le=>(le.roleCode==="ZM"||le.roleCode==="DD-ZM")&&le.locationType==="region").map(le=>le.locationName),ae=(H.territoryProfile||[]).filter(le=>(le.roleCode==="ZM"||le.roleCode==="DD-ZM")&&le.locationType==="region").map(le=>le.locationId);return{id:H.id,name:H.fullName,zmCode:H.employeeId||"N/A",email:H.email,phone:H.mobileNumber,zoneId:X.zoneId,zoneName:X.zone||H.zone||"Not Assigned",regionNames:J,assignedRegionIds:ae,status:H.status}}),T=((_==null?void 0:_.states)||(_==null?void 0:_.data)||[]).map(H=>({...H,stateName:H.name})),I=((E==null?void 0:E.districts)||(E==null?void 0:E.data)||[]).map(H=>({...H,districtName:H.name,stateId:H.stateId,asmId:H.asmId,ddAmId:H.ddAmId,zmId:H.zmId})),B=(q.areas||q.data||[]).map(H=>({...H,areaName:H.name,districtId:H.districtId})),G=(O.data||[]).map(H=>{var X,J;return{id:H.id,stage:H.stageCode||"Unknown",days:H.tatValue||0,enabled:H.isActive!==!1,reminders:((X=H.reminderConfig)==null?void 0:X.reminders)||[],escalations:((J=H.escalationConfig)==null?void 0:J.escalations)||[]}}),K=Array.isArray(L==null?void 0:L.data)?L.data:Array.isArray(L)?L:[];t(kA({zones:Z,regionalOffices:W,asms:U,zonalManagerMappings:z,zonalManagers:M,roles:Y,allStates:T,allDistricts:I,allAreas:B,availablePermissions:(C==null?void 0:C.permissions)||(C==null?void 0:C.data)||[],emailTemplates:(A==null?void 0:A.data)||[],slaConfigs:G,users:$,ddLeads:K,loading:!1}))}catch(r){console.error("[useMasterData] Error fetching data:",r),t(A5("Could not load configuration data")),te.error("Could not load configuration data")}finally{t(l1(!1))}},[t]),n=g.useCallback(async r=>{try{t(o1(!0));const a=await Is.getAreas(r);a.success&&t(k5({data:a.data,pagination:a.pagination}))}catch(a){console.error("[useMasterData] Error fetching areas:",a),te.error("Could not load locations")}finally{t(o1(!1))}},[t]);return{fetchInitialData:s,fetchAreas:n}},_V=({selectedZone:t,onZoneClick:s})=>{const{zones:n}=In(r=>r.master);return e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-5 gap-4",children:n.map(r=>e.jsxs(Le,{className:`border-2 transition-all cursor-pointer ${t===r.id?"border-re-red shadow-lg":"hover:border-red-400"}`,onClick:()=>s(r.id),children:[e.jsx(Qe,{className:"pb-3",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ku,{className:"w-5 h-5 text-re-red"}),e.jsx(Je,{className:"text-lg",children:r.name.toUpperCase().endsWith("ZONE")?r.name:`${r.name} Zone`})]}),e.jsx(Ce,{variant:"outline",className:"text-xs",children:r.code})]})}),e.jsxs(Fe,{className:"space-y-3 text-sm",children:[e.jsx("p",{className:"text-slate-600 text-xs leading-relaxed mb-3",children:r.description}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-slate-500",children:"States"}),e.jsx(Ce,{variant:"outline",children:r.states.length})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-slate-500",children:"Regions"}),e.jsx(Ce,{className:"bg-indigo-600",children:r.regionCount})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-slate-500",children:"Regional Officers"}),e.jsx(Ce,{className:"bg-purple-600",children:r.regionalOfficerCount})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-slate-500",children:"ASMs"}),e.jsx(Ce,{className:"bg-green-600",children:r.asmCount})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-slate-500",children:"ZMs"}),e.jsx(Ce,{className:"bg-blue-600",children:r.zmCount})]})]})]})]},r.id))})},TV=({selectedZone:t,onAddZone:s,onEditZone:n})=>{const{zones:r}=In(i=>i.master),a=r.filter(i=>t==="all"||i.id===t);return e.jsxs(Le,{children:[e.jsx(Qe,{children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(Je,{children:"Zone Details"}),e.jsx(Xt,{children:"Geographical coverage and state mappings for each zone"})]}),e.jsxs(se,{onClick:s,className:"bg-re-red hover:bg-re-red-hover",children:[e.jsx(An,{className:"w-4 h-4 mr-2"}),"Add Zone"]})]})}),e.jsx(Fe,{children:e.jsx(Ib,{className:"h-[400px]",children:e.jsx("div",{className:"space-y-4",children:a.map(i=>e.jsxs("div",{className:"border rounded-lg p-5 space-y-4 bg-gradient-to-br from-white to-slate-50",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-12 h-12 bg-gradient-to-br from-red-500 to-re-red rounded-lg flex items-center justify-center shadow-md",children:e.jsx(ku,{className:"w-6 h-6 text-white"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-slate-900",children:i.name}),e.jsx("p",{className:"text-slate-500 text-sm",children:i.code})]})]}),e.jsx("div",{className:"flex gap-2",children:e.jsx(se,{variant:"outline",size:"sm",onClick:()=>n(i),className:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",children:e.jsx(Cr,{className:"w-4 h-4"})})})]}),i.description&&e.jsx("div",{className:"bg-slate-50 rounded-lg p-3",children:e.jsx("p",{className:"text-sm text-slate-600",children:i.description})}),e.jsxs("div",{children:[e.jsxs(de,{className:"text-xs text-slate-600 mb-2 block",children:["States Covered (",i.states.length,")"]}),e.jsx("div",{className:"flex flex-wrap gap-1",children:i.states.map((o,d)=>e.jsx(Ce,{variant:"secondary",className:"text-xs border-transparent bg-secondary text-secondary-foreground",children:o},d))})]}),i.zonalBusinessHead&&e.jsxs("div",{className:"border-t pt-3",children:[e.jsx(de,{className:"text-xs text-slate-600 mb-2 block",children:"Zonal Business Head (ZBH)"}),e.jsxs("div",{className:"bg-red-50 border border-red-100 rounded-lg p-3 space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(hc,{className:"w-4 h-4 text-re-red"}),e.jsx("span",{className:"text-sm font-semibold text-slate-900",children:i.zonalBusinessHead.name}),e.jsx(Ce,{className:"bg-re-red text-white text-[10px] ml-auto",children:"ZBH"})]}),e.jsxs("div",{className:"flex items-center gap-2 ml-6 text-slate-600",children:[e.jsx(Ur,{className:"w-3 h-3"}),e.jsx("span",{className:"text-xs",children:i.zonalBusinessHead.email})]})]})]}),i.zonalManagers&&i.zonalManagers.length>0&&e.jsxs("div",{className:"border-t pt-3",children:[e.jsxs(de,{className:"text-xs text-slate-600 mb-2 block",children:["Zonal Managers (",i.zonalManagers.length,")"]}),e.jsx("div",{className:"space-y-2",children:i.zonalManagers.map((o,d)=>e.jsxs("div",{className:"bg-slate-50 rounded-lg p-3 space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ra,{className:"w-4 h-4 text-slate-600"}),e.jsx("span",{className:"text-sm text-slate-900",children:o.name}),e.jsxs(Ce,{variant:"outline",className:"text-xs ml-auto",children:["ZM-",d+1]})]}),o.email&&e.jsxs("div",{className:"flex items-center gap-2 ml-6",children:[e.jsx(Ur,{className:"w-3 h-3 text-slate-400"}),e.jsx("span",{className:"text-xs text-slate-600",children:o.email})]}),o.phone&&e.jsx("div",{className:"flex items-center gap-2 ml-6",children:e.jsx("span",{className:"text-xs text-slate-600",children:o.phone})}),o.regions&&o.regions.length>0&&e.jsxs("div",{className:"ml-6 mt-2",children:[e.jsxs(de,{className:"text-xs text-slate-500 mb-1 block",children:["Managed Regions (",o.regions.length,")"]}),e.jsx("div",{className:"flex flex-wrap gap-1",children:o.regions.map((m,f)=>e.jsxs(Ce,{variant:"outline",className:"text-xs bg-white text-foreground",children:[e.jsx(ku,{className:"w-2.5 h-2.5 mr-1"}),m]},f))})]})]},d))})]})]},i.id))})})})]})},PV=({selectedZone:t,onAddRegion:s,onEditRegion:n,onDeleteRegion:r})=>{const{regionalOffices:a}=In(o=>o.master),i=a.filter(o=>t==="all"||o.zoneId===t);return e.jsxs(Le,{children:[e.jsx(Qe,{children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(Je,{children:"Regional Offices"}),e.jsx(Xt,{children:"Manage regional offices within zones"})]}),e.jsxs(se,{onClick:s,className:"bg-re-red hover:bg-re-red-hover",children:[e.jsx(An,{className:"w-4 h-4 mr-2"}),"Add Regional Office"]})]})}),e.jsx(Fe,{children:e.jsxs(Ts,{children:[e.jsx(Ps,{children:e.jsxs(it,{children:[e.jsx(fe,{children:"Region Code"}),e.jsx(fe,{children:"Region Name"}),e.jsx(fe,{children:"Zone"}),e.jsx(fe,{children:"Regional Manager"}),e.jsx(fe,{children:"Districts"}),e.jsx(fe,{children:"Cities"}),e.jsx(fe,{children:"Regional Officers"}),e.jsx(fe,{children:"ASMs"}),e.jsx(fe,{children:"Status"}),e.jsx(fe,{className:"text-right",children:"Actions"})]})}),e.jsx(Os,{children:i.map(o=>e.jsxs(it,{children:[e.jsx(ue,{children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(so,{className:"w-4 h-4 text-indigo-600"}),e.jsx("span",{className:"font-medium",children:o.code})]})}),e.jsx(ue,{className:"font-medium",children:o.name}),e.jsx(ue,{children:o.zoneName}),e.jsx(ue,{children:o.regionalManager?e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{className:"text-sm",children:o.regionalManager.name}),e.jsx("span",{className:"text-xs text-slate-500",children:o.regionalManager.email})]}):e.jsx("span",{className:"text-slate-400 italic",children:"Not Assigned"})}),e.jsx(ue,{children:e.jsxs("div",{className:"flex flex-wrap gap-1",children:[(o.districts||[]).slice(0,2).map((d,m)=>e.jsx(Ce,{variant:"secondary",className:"text-xs",children:d.name||d},m)),(o.districts||[]).length>2&&e.jsxs(Ce,{variant:"secondary",className:"text-xs",children:["+",(o.districts||[]).length-2]})]})}),e.jsx(ue,{children:e.jsxs("div",{className:"flex flex-wrap gap-1",children:[o.cities.slice(0,3).map((d,m)=>e.jsxs("span",{className:"text-xs text-slate-600",children:[d,m3&&e.jsxs("span",{className:"text-xs text-slate-500",children:["+",o.cities.length-3]})]})}),e.jsx(ue,{children:e.jsx(Ce,{className:"bg-purple-600",children:o.regionalOfficerCount})}),e.jsx(ue,{children:e.jsx(Ce,{className:"bg-green-600",children:o.asmCount})}),e.jsx(ue,{children:e.jsx(Ce,{variant:o.status==="Active"?"default":"secondary",className:o.status==="Active"?"bg-emerald-100 text-emerald-700":"",children:o.status})}),e.jsx(ue,{className:"text-right",children:e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx(se,{variant:"ghost",size:"sm",onClick:()=>n(o),children:e.jsx(Cr,{className:"w-4 h-4"})}),e.jsx(se,{variant:"ghost",size:"sm",onClick:()=>r(o.id,o.name),className:"text-re-red hover:text-re-red-hover hover:bg-red-50",children:e.jsx(ar,{className:"w-4 h-4"})})]})})]},o.id))})]})})]})},OV=({selectedZone:t,onAddASM:s,onEditASM:n,onDeleteASM:r})=>{const{asms:a,zonalManagerMappings:i}=In(m=>m.master),o=a.filter(m=>t==="all"||m.zoneId===t),d=g.useMemo(()=>{const m={};return[...a,...i].forEach(f=>{(f.areasManaged||f.districts||[]).forEach(h=>{m[h]||(m[h]=[]),m[h].includes(f.name)||m[h].push(f.name)})}),m},[a,i]);return e.jsxs(Le,{children:[e.jsx(Qe,{children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(Je,{children:"District Development Area Managers (DD-AM)"}),e.jsx(Xt,{children:"Manage DD-AM users across districts (multi-district)"})]}),e.jsxs(se,{onClick:s,className:"bg-re-red hover:bg-re-red-hover",children:[e.jsx(An,{className:"w-4 h-4 mr-2"}),"Add DD-AM"]})]})}),e.jsx(Fe,{children:e.jsxs(Ts,{children:[e.jsx(Ps,{children:e.jsxs(it,{children:[e.jsx(fe,{children:"DD-AM Code"}),e.jsx(fe,{children:"Name"}),e.jsx(fe,{children:"Zone"}),e.jsx(fe,{children:"Region"}),e.jsx(fe,{children:"Districts Managed"}),e.jsx(fe,{children:"Contact"}),e.jsx(fe,{children:"Status"}),e.jsx(fe,{className:"text-right",children:"Actions"})]})}),e.jsx(Os,{children:o.map(m=>e.jsxs(it,{children:[e.jsx(ue,{children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(lM,{className:"w-4 h-4 text-green-600"}),e.jsx("span",{className:"font-medium",children:m.asmCode||"N/A"})]})}),e.jsx(ue,{children:m.name}),e.jsx(ue,{children:e.jsx(Ce,{variant:"outline",children:m.zoneName})}),e.jsx(ue,{className:"text-sm text-slate-600",children:m.regionName}),e.jsx(ue,{children:e.jsx("div",{className:"flex flex-wrap gap-1",children:m.areasManaged.map((f,p)=>{const h=typeof f=="string"?f:f.id,x=typeof f=="string"?f:f.name,u=(d[h]||[]).filter(v=>v!==m.name),N=u.length>0;return e.jsxs(Ce,{variant:N?"outline":"secondary",className:`text-xs ${N?"border-red-300 bg-red-50 text-re-red-hover font-medium":""}`,title:N?`Also managed by: ${u.join(", ")}`:void 0,children:[x,N&&e.jsx(Ra,{className:"w-2.5 h-2.5 ml-1 inline"})]},p)})})}),e.jsx(ue,{children:e.jsxs("div",{className:"text-sm",children:[e.jsx("p",{className:"text-slate-900",children:m.email}),e.jsx("p",{className:"text-slate-500",children:m.phone})]})}),e.jsx(ue,{children:e.jsx(Ce,{variant:m.status==="Active"?"default":"secondary",className:m.status==="Active"?"bg-emerald-100 text-emerald-700":"",children:m.status})}),e.jsx(ue,{className:"text-right",children:e.jsxs("div",{className:"flex gap-2 justify-end",children:[e.jsx(se,{variant:"ghost",size:"sm",onClick:()=>n(m),children:e.jsx(Cr,{className:"w-4 h-4"})}),e.jsx(se,{variant:"ghost",size:"sm",onClick:()=>r(m.id,m.name),className:"text-re-red hover:text-re-red-hover hover:bg-red-50",children:e.jsx(ar,{className:"w-4 h-4"})})]})})]},m.id))})]})})]})},LV=({selectedZone:t,onAddZM:s,onEditZM:n,onDeleteZM:r})=>{const{zonalManagers:a}=In(o=>o.master),i=(a||[]).filter(o=>t==="all"||o.zoneId===t||o.zones&&o.zones.includes(t));return e.jsxs(Le,{children:[e.jsx(Qe,{children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(Je,{children:"Zonal Managers (DD-ZM)"}),e.jsx(Xt,{children:"Manage Zonal Managers and their region assignments"})]}),e.jsxs(se,{onClick:s,className:"bg-re-red hover:bg-re-red-hover",children:[e.jsx(An,{className:"w-4 h-4 mr-2"}),"Add ZM"]})]})}),e.jsx(Fe,{children:e.jsxs(Ts,{children:[e.jsx(Ps,{children:e.jsxs(it,{children:[e.jsx(fe,{children:"ZM Code"}),e.jsx(fe,{children:"Name"}),e.jsx(fe,{children:"Zone"}),e.jsx(fe,{children:"Regions Managed"}),e.jsx(fe,{children:"Contact"}),e.jsx(fe,{children:"Status"}),e.jsx(fe,{className:"text-right",children:"Actions"})]})}),e.jsx(Os,{children:i.map(o=>e.jsxs(it,{children:[e.jsx(ue,{children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ra,{className:"w-4 h-4 text-blue-600"}),e.jsx("span",{className:"font-medium",children:o.zmCode||o.code})]})}),e.jsx(ue,{children:o.name}),e.jsx(ue,{children:e.jsx("div",{className:"flex flex-wrap gap-1",children:(o.zones||[o.zoneName]).map((d,m)=>e.jsx(Ce,{variant:"outline",children:d},m))})}),e.jsx(ue,{children:e.jsxs("div",{className:"flex flex-wrap gap-1",children:[(o.regionNames||[]).slice(0,3).map((d,m)=>e.jsx(Ce,{variant:"secondary",className:"text-xs",children:d},m)),(o.regionNames||[]).length>3&&e.jsxs(Ce,{variant:"secondary",className:"text-xs",children:["+",(o.regionNames||[]).length-3]})]})}),e.jsx(ue,{children:e.jsxs("div",{className:"text-sm",children:[e.jsx("p",{className:"text-slate-900",children:o.email}),e.jsx("p",{className:"text-slate-500",children:o.phone})]})}),e.jsx(ue,{children:e.jsx(Ce,{variant:o.status==="Active"?"default":"secondary",className:o.status==="Active"?"bg-emerald-100 text-emerald-700":"",children:o.status})}),e.jsx(ue,{className:"text-right",children:e.jsxs("div",{className:"flex items-center justify-end gap-2",children:[e.jsx(se,{variant:"ghost",size:"sm",onClick:()=>n(o),children:e.jsx(Cr,{className:"w-4 h-4"})}),e.jsx(se,{variant:"ghost",size:"sm",onClick:()=>r(o.id,o.name),className:"text-re-red hover:text-re-red-hover hover:bg-red-50",children:e.jsx(ar,{className:"w-4 h-4"})})]})})]},o.id))})]})})]})},IV=({userAssignedData:t})=>e.jsxs(Le,{children:[e.jsx(Qe,{children:e.jsx(Je,{className:"text-xl",children:"System Users & Territory Assignments"})}),e.jsx(Fe,{children:e.jsxs(Ts,{children:[e.jsx(Ps,{children:e.jsxs(it,{children:[e.jsx(fe,{children:"User Details"}),e.jsx(fe,{children:"Role"}),e.jsx(fe,{children:"Assigned Zone"}),e.jsx(fe,{children:"Assigned Region"}),e.jsx(fe,{children:"Status"})]})}),e.jsx(Os,{children:t.map(s=>e.jsxs(it,{children:[e.jsx(ue,{children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-8 h-8 rounded-full bg-slate-100 flex items-center justify-center",children:e.jsx(Lr,{className:"w-4 h-4 text-slate-500"})}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium text-slate-900",children:s.name}),e.jsxs("div",{className:"flex items-center gap-2 text-xs text-slate-500",children:[e.jsx(Ur,{className:"w-3 h-3"}),s.email]})]})]})}),e.jsx(ue,{children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(hc,{className:"w-3 h-3 text-re-red"}),e.jsx("span",{className:"text-sm font-medium",children:s.role})]})}),e.jsx(ue,{children:e.jsx(Ce,{variant:"outline",children:s.zone})}),e.jsx(ue,{children:e.jsx(Ce,{variant:"outline",className:"bg-indigo-50 text-indigo-700 border-indigo-200",children:s.region})}),e.jsx(ue,{children:e.jsx(Ce,{variant:s.status==="Active"?"default":"secondary",className:s.status==="Active"?"bg-emerald-100 text-emerald-700":"",children:s.status})})]},s.id))})]})})]}),MV=({onAddRole:t,onEditRole:s})=>{const{roles:n}=In(r=>r.master);return e.jsxs(Le,{className:"bg-card text-card-foreground flex flex-col gap-6 rounded-xl border shadow-sm",children:[e.jsx(Qe,{className:"@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 pt-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",children:e.jsxs("div",{className:"flex items-center justify-between w-full",children:[e.jsxs("div",{children:[e.jsx(Je,{className:"leading-none text-xl font-bold",children:"Role Definitions"}),e.jsx(Xt,{className:"text-muted-foreground mt-1.5",children:"Overview of available roles and their access levels"})]}),e.jsxs(se,{onClick:t,className:"bg-re-red hover:bg-re-red-hover h-9",children:[e.jsx(An,{className:"w-4 h-4 mr-2"}),"Add Role"]})]})}),e.jsx(Fe,{className:"px-6 [&:last-child]:pb-6",children:e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:n.map(r=>{var a;return e.jsxs("div",{className:"border rounded-lg p-4 space-y-3 bg-gradient-to-br from-white to-slate-50 hover:shadow-md transition-shadow",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(hc,{className:"w-5 h-5 text-re-red"}),e.jsx("h3",{className:"text-slate-900 font-bold",children:r.name})]}),e.jsxs(Ce,{variant:"secondary",className:"border-transparent bg-secondary text-secondary-foreground text-xs font-medium",children:[r.userCount||0," users"]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"items-center gap-2 font-medium text-xs text-slate-600 mb-2 block",children:"Key Permissions"}),e.jsxs("div",{className:"flex flex-wrap gap-1",children:[(r.permissions||[]).slice(0,3).map((i,o)=>e.jsx(Ce,{variant:"outline",className:"border px-2 py-0.5 font-medium text-foreground text-[10px] bg-white/50",children:i.replace(/_/g," ").toLowerCase()},o)),((a=r.permissions)==null?void 0:a.length)>3&&e.jsxs(Ce,{variant:"outline",className:"text-[10px] border-slate-200",children:["+",r.permissions.length-3]})]})]}),e.jsxs(se,{variant:"outline",size:"sm",onClick:()=>s(r),className:"w-full mt-2 h-8 rounded-md gap-1.5 px-3 border bg-background text-foreground hover:bg-accent hover:text-accent-foreground transition-colors",title:"Edit Permissions",children:[e.jsx(Cr,{className:"w-3 h-3 mr-1"}),"Edit Permissions"]})]},r.id)})})})]})},FV=({isOpen:t,onOpenChange:s,role:n,onSave:r})=>{const[a,i]=g.useState([]);g.useEffect(()=>{n&&i(n.permissions||[])},[n,t]);const o=m=>{i(f=>f.includes(m)?f.filter(p=>p!==m):[...f,m])};if(!n)return null;const d=[{title:"Action Permissions",color:"from-green-50 to-emerald-50 border-green-200",textColor:"text-green-900",permissions:[{id:"action:approve",label:"Approve Applications"},{id:"action:reject",label:"Reject Applications"},{id:"action:upload_docs",label:"Upload Documents"},{id:"action:request_changes",label:"Request Changes"},{id:"action:forward",label:"Forward to Others"},{id:"action:reassign",label:"Reassign Applications"},{id:"action:schedule_interview",label:"Schedule Interviews"},{id:"action:add_comments",label:"Add Comments/Notes"},{id:"action:rank_applicants",label:"Rank Applicants"},{id:"action:final_approval",label:"Final Approval"}]},{title:"View/Access Permissions",color:"from-blue-50 to-cyan-50 border-blue-200",textColor:"text-blue-900",permissions:[{id:"view:view_details",label:"Application Details"},{id:"view:view_financial",label:"Financial Information"},{id:"view:view_discussions",label:"Discussion Notes"},{id:"view:view_progress",label:"Progress Tracking"},{id:"view:view_audit",label:"Audit Logs"},{id:"view:view_documents",label:"All Documents"},{id:"view:view_personal",label:"Personal Information"},{id:"view:view_business",label:"Business Details"},{id:"view:view_reports",label:"Reports & Analytics"},{id:"view:view_history",label:"Application History"}]},{title:"Application Stage Access",color:"from-red-50 to-orange-50 border-red-200",textColor:"text-red-900",permissions:[{id:"stage:initial_review",label:"Initial Review"},{id:"stage:field_verification",label:"Field Verification"},{id:"stage:level1_interview",label:"Level 1 Interview"},{id:"stage:level2_interview",label:"Level 2 Interview"},{id:"stage:ranking",label:"Ranking & Selection"},{id:"stage:legal_review",label:"Legal Review"},{id:"stage:financial_review",label:"Financial Review"},{id:"stage:final_approval",label:"Final Approval"},{id:"stage:payment",label:"Payment Verification"},{id:"stage:onboarding",label:"Onboarding"}]}];return e.jsx(ds,{open:t,onOpenChange:s,children:e.jsxs(os,{className:"sm:max-w-lg max-w-3xl max-h-[90vh] overflow-y-auto p-0 gap-0 border-none shadow-2xl custom-scrollbar",children:[e.jsxs(xs,{className:"p-6 pb-2 space-y-2 text-left bg-white sticky top-0 z-10 border-b",children:[e.jsxs(ms,{className:"text-xl font-bold tracking-tight",children:["Edit Role Permissions - ",n.name]}),e.jsxs(bs,{className:"text-slate-500 text-sm",children:["Configure default permissions for all users assigned to the ",n.name," role"]})]}),e.jsxs("div",{className:"p-6 space-y-6",children:[e.jsx("div",{className:"bg-gradient-to-br from-purple-50 to-indigo-50 rounded-xl p-5 border border-purple-100 shadow-sm",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"w-12 h-12 bg-white rounded-xl shadow-sm flex items-center justify-center border border-purple-100",children:e.jsx(hc,{className:"w-6 h-6 text-purple-600"})}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-base font-bold text-slate-900",children:n.name}),e.jsxs("p",{className:"text-xs font-medium text-slate-500 uppercase tracking-widest",children:[n.userCount||0," users currently assigned"]})]})]}),e.jsx(Ce,{className:"bg-purple-600 hover:bg-purple-700 px-3 py-1 rounded-full text-[10px] font-bold tracking-wider uppercase",children:"Role Configuration"})]})}),e.jsxs("div",{className:"space-y-5",children:[e.jsxs("h4",{className:"text-sm font-bold text-slate-800 flex items-center gap-2",children:[e.jsx("span",{className:"w-1.5 h-1.5 bg-red-500 rounded-full"}),"Configure Default Permissions"]}),e.jsx("div",{className:"space-y-4",children:d.map((m,f)=>e.jsxs("div",{className:`border rounded-xl p-5 bg-gradient-to-br ${m.color} shadow-sm transition-all hover:shadow-md`,children:[e.jsxs("h5",{className:`text-sm font-bold ${m.textColor} mb-4 flex items-center justify-between`,children:[m.title,e.jsxs("span",{className:"text-[10px] bg-white/50 px-2 py-0.5 rounded-full opacity-70 italic font-normal",children:["Section ",f+1]})]}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-y-3 gap-x-6",children:m.permissions.map(p=>e.jsxs("div",{className:"flex items-center space-x-3 group cursor-pointer p-1 rounded-md hover:bg-white/40 transition-colors",children:[e.jsx(Ln,{id:`perm-${p.id}`,checked:a.includes(p.id),onCheckedChange:()=>o(p.id),className:"border-slate-300 data-[state=checked]:bg-purple-600 data-[state=checked]:border-purple-600"}),e.jsx("label",{htmlFor:`perm-${p.id}`,className:"text-sm font-medium text-slate-700 cursor-pointer group-hover:text-slate-900 transition-colors flex-1",children:p.label})]},p.id))})]},f))})]})]}),e.jsxs("div",{className:"flex gap-3 p-6 pt-4 border-t sticky bottom-0 bg-white/80 backdrop-blur-md z-10",children:[e.jsx(se,{variant:"ghost",onClick:()=>s(!1),className:"flex-1 h-11 font-bold text-slate-600 hover:bg-slate-100",children:"Cancel"}),e.jsxs(se,{onClick:()=>r(n.id,a),className:"flex-1 h-11 bg-purple-600 hover:bg-purple-700 font-bold text-white shadow-lg shadow-purple-200",children:[e.jsx(ml,{className:"w-4 h-4 mr-2"}),"Save Role Permissions"]})]})]})})},BV=({isOpen:t,onOpenChange:s,onSave:n})=>{const[r,a]=g.useState(""),[i,o]=g.useState(""),[d,m]=g.useState(""),[f,p]=g.useState(!1);g.useEffect(()=>{t&&(a(""),o(""),m(""),p(!1))},[t]);const h=async()=>{if(!(!r.trim()||!i.trim())){p(!0);try{await n({roleName:r.trim(),roleCode:i.trim(),description:d.trim()||void 0}),s(!1)}finally{p(!1)}}};return e.jsx(ds,{open:t,onOpenChange:s,children:e.jsxs(os,{className:"sm:max-w-md",children:[e.jsxs(xs,{children:[e.jsx(ms,{children:"Add Role"}),e.jsx(bs,{children:"Create a new role for Master Configuration."})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{htmlFor:"role-name",children:"Role Name"}),e.jsx(at,{id:"role-name",value:r,onChange:x=>a(x.target.value),placeholder:"e.g. Finance Admin"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{htmlFor:"role-code",children:"Role Code"}),e.jsx(at,{id:"role-code",value:i,onChange:x=>o(x.target.value),placeholder:"e.g. FINANCE_ADMIN"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(de,{htmlFor:"role-description",children:"Description"}),e.jsx(Ws,{id:"role-description",value:d,onChange:x=>m(x.target.value),placeholder:"Optional",rows:3})]})]}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx(se,{variant:"outline",onClick:()=>s(!1),disabled:f,children:"Cancel"}),e.jsx(se,{onClick:h,disabled:f||!r.trim()||!i.trim(),children:f?"Saving...":"Create Role"})]})]})})},$V=({onEditTemplate:t,onDeleteTemplate:s})=>{const{emailTemplates:n}=In(r=>r.master);return e.jsxs(Le,{children:[e.jsx(Qe,{children:e.jsxs("div",{children:[e.jsx(Je,{children:"Email & Letter Templates"}),e.jsx(Xt,{children:"Templates and trigger codes come from system seed data. Edit wording and layout here; new triggers are not added from this screen."})]})}),e.jsx(Fe,{children:e.jsxs(Ts,{children:[e.jsx(Ps,{children:e.jsxs(it,{children:[e.jsx(fe,{children:"Template Name"}),e.jsx(fe,{children:"Subject"}),e.jsx(fe,{children:"Trigger Code"}),e.jsx(fe,{children:"Modified Date"}),e.jsx(fe,{className:"text-right",children:"Actions"})]})}),e.jsxs(Os,{children:[n.map(r=>e.jsxs(it,{children:[e.jsx(ue,{children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-8 h-8 bg-red-50 rounded-lg flex items-center justify-center",children:e.jsx(Ur,{className:"w-4 h-4 text-re-red"})}),e.jsx("span",{className:"font-medium text-slate-900",children:r.name||r.templateCode})]})}),e.jsx(ue,{className:"text-slate-600 max-w-xs truncate",children:r.subject}),e.jsx(ue,{children:e.jsx(Ce,{variant:"outline",className:"bg-slate-50 text-[10px] font-mono",children:r.templateCode||"-"})}),e.jsx(ue,{className:"text-slate-500 text-sm",children:e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(dr,{className:"w-3.5 h-3.5"}),r.updatedAt?Yt(r.updatedAt):"-"]})}),e.jsx(ue,{className:"text-right",children:e.jsxs("div",{className:"flex gap-2 justify-end",children:[e.jsx(se,{variant:"ghost",size:"sm",onClick:()=>t(r),children:e.jsx(Cr,{className:"w-4 h-4"})}),e.jsx(se,{variant:"ghost",size:"sm",onClick:()=>s(r.id),className:"text-red-500 hover:text-re-red hover:bg-red-50",children:e.jsx(ar,{className:"w-4 h-4"})})]})})]},r.id)),n.length===0&&e.jsx(it,{children:e.jsx(ue,{colSpan:5,className:"text-center py-12",children:e.jsxs("div",{className:"flex flex-col items-center gap-2",children:[e.jsx(Ur,{className:"w-8 h-8 text-slate-200"}),e.jsx("p",{className:"text-slate-400 text-sm",children:"No templates configured yet"})]})})})]})]})})]})},qV=({onAddLocation:t,onEditLocation:s,onDeleteLocation:n,onSearch:r,onPageChange:a,searchTerm:i,states:o,stateFilter:d,onStateFilterChange:m,statusFilter:f,onStatusFilterChange:p})=>{const{allAreas:h,areasPagination:x,isAreasLoading:u}=In(N=>N.master);return e.jsx("div",{className:"space-y-4",children:e.jsxs(Le,{children:[e.jsx(Qe,{children:e.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx(Je,{children:"Dealership Locations"}),e.jsxs(Xt,{children:["Manage ",x.total," geographical locations and their operational status"]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("div",{className:"relative",children:[e.jsx(ku,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-400"}),e.jsx("input",{type:"text",placeholder:"Search locations...",value:i,onChange:N=>r(N.target.value),className:"pl-9 pr-4 py-2 bg-slate-50 border border-slate-200 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-red-500 w-64 transition-all"})]}),e.jsxs(Dt,{value:d,onValueChange:m,children:[e.jsx(Et,{className:"w-48",children:e.jsx(Rt,{placeholder:"All States"})}),e.jsxs(_t,{children:[e.jsx(Me,{value:"all",children:"All States"}),o.map(N=>e.jsx(Me,{value:N.id,children:N.name||N.stateName},N.id))]})]}),e.jsxs(Dt,{value:f,onValueChange:p,children:[e.jsx(Et,{className:"w-44",children:e.jsx(Rt,{placeholder:"Opportunity Filter"})}),e.jsxs(_t,{children:[e.jsx(Me,{value:"all",children:"All Opportunities"}),e.jsx(Me,{value:"active",children:"Opportunity: Yes"}),e.jsx(Me,{value:"inactive",children:"Opportunity: No"})]})]}),e.jsxs(se,{onClick:t,className:"bg-re-red hover:bg-re-red-hover whitespace-nowrap",children:[e.jsx(An,{className:"w-4 h-4 mr-2"}),"Add Location"]})]})]})}),e.jsxs(Fe,{children:[e.jsxs("div",{className:`relative ${u?"opacity-50 pointer-events-none":""}`,children:[e.jsxs(Ts,{children:[e.jsx(Ps,{children:e.jsxs(it,{children:[e.jsx(fe,{children:"State"}),e.jsx(fe,{children:"City"}),e.jsx(fe,{children:"District"}),e.jsx(fe,{children:"Active Period"}),e.jsx(fe,{children:"Opportunity"}),e.jsx(fe,{className:"text-right",children:"Actions"})]})}),e.jsx(Os,{children:h.length===0?e.jsx(it,{children:e.jsx(ue,{colSpan:6,className:"h-32 text-center text-slate-500 italic",children:i?"No locations found matching your search":"No locations available"})}):h.map(N=>e.jsxs(it,{children:[e.jsx(ue,{children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Vr,{className:"w-4 h-4 text-re-red"}),e.jsx("span",{className:"font-medium",children:N.stateName||"N/A"})]})}),e.jsx(ue,{className:"font-medium text-slate-900",children:N.city||"N/A"}),e.jsx(ue,{className:"text-slate-600 text-sm",children:N.name}),e.jsx(ue,{children:N.openFrom&&N.openTo?e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"text-slate-600",children:"From:"}),e.jsx(Ce,{variant:"outline",className:"text-xs font-medium",children:Yt(N.openFrom)})]}),e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"text-slate-600",children:"To:"}),e.jsx(Ce,{variant:"outline",className:"text-xs font-medium",children:Yt(N.openTo)})]})]}):e.jsx("span",{className:"text-slate-400 italic text-sm",children:"Not Defined"})}),e.jsx(ue,{children:e.jsx(Ce,{variant:N.isOpportunity?"default":"secondary",className:N.isOpportunity?"bg-green-600 hover:bg-green-700 text-white border-transparent":"",children:N.isOpportunity?"Yes":"No"})}),e.jsx(ue,{className:"text-right",children:e.jsxs("div",{className:"flex gap-2 justify-end",children:[e.jsx(se,{variant:"outline",size:"sm",onClick:()=>s(N),className:"h-8 w-8 p-0",children:e.jsx(Cr,{className:"w-4 h-4"})}),e.jsx(se,{variant:"outline",size:"sm",onClick:()=>n(N.id),className:"h-8 w-8 p-0 text-re-red hover:bg-red-50 hover:text-re-red-hover",children:e.jsx(ar,{className:"w-4 h-4"})})]})})]},N.id))})]}),u&&e.jsx("div",{className:"absolute inset-0 flex items-center justify-center bg-white/10 backdrop-blur-[1px]",children:e.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-re-red"})})]}),x.totalPages>1&&e.jsxs("div",{className:"flex items-center justify-between mt-6 pt-4 border-t border-slate-100",children:[e.jsxs("div",{className:"text-sm text-slate-500",children:["Showing ",e.jsx("span",{className:"font-medium text-slate-900",children:(x.page-1)*x.limit+1})," to ",e.jsx("span",{className:"font-medium text-slate-900",children:Math.min(x.page*x.limit,x.total)})," of ",e.jsx("span",{className:"font-medium text-slate-900",children:x.total})," results"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(se,{variant:"outline",size:"sm",onClick:()=>a(x.page-1),disabled:x.page<=1||u,className:"h-8",children:"Previous"}),e.jsx("div",{className:"flex items-center gap-1",children:Array.from({length:Math.min(5,x.totalPages)},(N,v)=>{let w=x.page;return x.page<=3?w=v+1:x.page>=x.totalPages-2?w=x.totalPages-4+v:w=x.page-2+v,w<=0||w>x.totalPages?null:e.jsx(se,{variant:x.page===w?"default":"outline",size:"sm",onClick:()=>a(w),disabled:u,className:"h-8 w-8 p-0",children:w},w)})}),e.jsx(se,{variant:"outline",size:"sm",onClick:()=>a(x.page+1),disabled:x.page>=x.totalPages||u,className:"h-8",children:"Next"})]})]})]})]})})};var zV=Symbol("radix.slottable");function UV(t){const s=({children:n})=>e.jsx(e.Fragment,{children:n});return s.displayName=`${t}.Slottable`,s.__radixId=zV,s}var[pp]=ga("Tooltip",[oo]),xp=oo(),x_="TooltipProvider",VV=700,Dy="tooltip.open",[HV,oj]=pp(x_),g_=t=>{const{__scopeTooltip:s,delayDuration:n=VV,skipDelayDuration:r=300,disableHoverableContent:a=!1,children:i}=t,o=g.useRef(!0),d=g.useRef(!1),m=g.useRef(0);return g.useEffect(()=>{const f=m.current;return()=>window.clearTimeout(f)},[]),e.jsx(HV,{scope:s,isOpenDelayedRef:o,delayDuration:n,onOpen:g.useCallback(()=>{window.clearTimeout(m.current),o.current=!1},[]),onClose:g.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:d,onPointerInTransitChange:g.useCallback(f=>{d.current=f},[]),disableHoverableContent:a,children:i})};g_.displayName=x_;var Ou="Tooltip",[WV,ih]=pp(Ou),v_=t=>{const{__scopeTooltip:s,children:n,open:r,defaultOpen:a,onOpenChange:i,disableHoverableContent:o,delayDuration:d}=t,m=oj(Ou,t.__scopeTooltip),f=xp(s),[p,h]=g.useState(null),x=Ar(),u=g.useRef(0),N=o??m.disableHoverableContent,v=d??m.delayDuration,w=g.useRef(!1),[j,b]=Bi({prop:r,defaultProp:a??!1,onChange:A=>{A?(m.onOpen(),document.dispatchEvent(new CustomEvent(Dy))):m.onClose(),i==null||i(A)},caller:Ou}),C=g.useMemo(()=>j?w.current?"delayed-open":"instant-open":"closed",[j]),S=g.useCallback(()=>{window.clearTimeout(u.current),u.current=0,w.current=!1,b(!0)},[b]),R=g.useCallback(()=>{window.clearTimeout(u.current),u.current=0,b(!1)},[b]),_=g.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>{w.current=!0,b(!0),u.current=0},v)},[v,b]);return g.useEffect(()=>()=>{u.current&&(window.clearTimeout(u.current),u.current=0)},[]),e.jsx(Hf,{...f,children:e.jsx(WV,{scope:s,contentId:x,open:j,stateAttribute:C,trigger:p,onTriggerChange:h,onTriggerEnter:g.useCallback(()=>{m.isOpenDelayedRef.current?_():S()},[m.isOpenDelayedRef,_,S]),onTriggerLeave:g.useCallback(()=>{N?R():(window.clearTimeout(u.current),u.current=0)},[R,N]),onOpen:S,onClose:R,disableHoverableContent:N,children:n})})};v_.displayName=Ou;var Ry="TooltipTrigger",y_=g.forwardRef((t,s)=>{const{__scopeTooltip:n,...r}=t,a=ih(Ry,n),i=oj(Ry,n),o=xp(n),d=g.useRef(null),m=Gs(s,d,a.onTriggerChange),f=g.useRef(!1),p=g.useRef(!1),h=g.useCallback(()=>f.current=!1,[]);return g.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),e.jsx(Qu,{asChild:!0,...o,children:e.jsx(js.button,{"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute,...r,ref:m,onPointerMove:Kt(t.onPointerMove,x=>{x.pointerType!=="touch"&&!p.current&&!i.isPointerInTransitRef.current&&(a.onTriggerEnter(),p.current=!0)}),onPointerLeave:Kt(t.onPointerLeave,()=>{a.onTriggerLeave(),p.current=!1}),onPointerDown:Kt(t.onPointerDown,()=>{a.open&&a.onClose(),f.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:Kt(t.onFocus,()=>{f.current||a.onOpen()}),onBlur:Kt(t.onBlur,a.onClose),onClick:Kt(t.onClick,a.onClose)})})});y_.displayName=Ry;var cj="TooltipPortal",[GV,KV]=pp(cj,{forceMount:void 0}),b_=t=>{const{__scopeTooltip:s,forceMount:n,children:r,container:a}=t,i=ih(cj,s);return e.jsx(GV,{scope:s,forceMount:n,children:e.jsx(Dr,{present:n||i.open,children:e.jsx(wd,{asChild:!0,container:a,children:r})})})};b_.displayName=cj;var fd="TooltipContent",j_=g.forwardRef((t,s)=>{const n=KV(fd,t.__scopeTooltip),{forceMount:r=n.forceMount,side:a="top",...i}=t,o=ih(fd,t.__scopeTooltip);return e.jsx(Dr,{present:r||o.open,children:o.disableHoverableContent?e.jsx(N_,{side:a,...i,ref:s}):e.jsx(YV,{side:a,...i,ref:s})})}),YV=g.forwardRef((t,s)=>{const n=ih(fd,t.__scopeTooltip),r=oj(fd,t.__scopeTooltip),a=g.useRef(null),i=Gs(s,a),[o,d]=g.useState(null),{trigger:m,onClose:f}=n,p=a.current,{onPointerInTransitChange:h}=r,x=g.useCallback(()=>{d(null),h(!1)},[h]),u=g.useCallback((N,v)=>{const w=N.currentTarget,j={x:N.clientX,y:N.clientY},b=JV(j,w.getBoundingClientRect()),C=eH(j,b),S=tH(v.getBoundingClientRect()),R=nH([...C,...S]);d(R),h(!0)},[h]);return g.useEffect(()=>()=>x(),[x]),g.useEffect(()=>{if(m&&p){const N=w=>u(w,p),v=w=>u(w,m);return m.addEventListener("pointerleave",N),p.addEventListener("pointerleave",v),()=>{m.removeEventListener("pointerleave",N),p.removeEventListener("pointerleave",v)}}},[m,p,u,x]),g.useEffect(()=>{if(o){const N=v=>{const w=v.target,j={x:v.clientX,y:v.clientY},b=(m==null?void 0:m.contains(w))||(p==null?void 0:p.contains(w)),C=!sH(j,o);b?x():C&&(x(),f())};return document.addEventListener("pointermove",N),()=>document.removeEventListener("pointermove",N)}},[m,p,o,f,x]),e.jsx(N_,{...t,ref:i})}),[ZV,QV]=pp(Ou,{isInside:!1}),XV=UV("TooltipContent"),N_=g.forwardRef((t,s)=>{const{__scopeTooltip:n,children:r,"aria-label":a,onEscapeKeyDown:i,onPointerDownOutside:o,...d}=t,m=ih(fd,n),f=xp(n),{onClose:p}=m;return g.useEffect(()=>(document.addEventListener(Dy,p),()=>document.removeEventListener(Dy,p)),[p]),g.useEffect(()=>{if(m.trigger){const h=x=>{const u=x.target;u!=null&&u.contains(m.trigger)&&p()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[m.trigger,p]),e.jsx(bd,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:h=>h.preventDefault(),onDismiss:p,children:e.jsxs(Wf,{"data-state":m.stateAttribute,...f,...d,ref:s,style:{...d.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:[e.jsx(XV,{children:r}),e.jsx(ZV,{scope:n,isInside:!0,children:e.jsx(J$,{id:m.contentId,role:"tooltip",children:a||r})})]})})});j_.displayName=fd;var w_="TooltipArrow",S_=g.forwardRef((t,s)=>{const{__scopeTooltip:n,...r}=t,a=xp(n);return QV(w_,n).isInside?null:e.jsx(Gf,{...a,...r,ref:s})});S_.displayName=w_;function JV(t,s){const n=Math.abs(s.top-t.y),r=Math.abs(s.bottom-t.y),a=Math.abs(s.right-t.x),i=Math.abs(s.left-t.x);switch(Math.min(n,r,a,i)){case i:return"left";case a:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function eH(t,s,n=5){const r=[];switch(s){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 tH(t){const{top:s,right:n,bottom:r,left:a}=t;return[{x:a,y:s},{x:n,y:s},{x:n,y:r},{x:a,y:r}]}function sH(t,s){const{x:n,y:r}=t;let a=!1;for(let i=0,o=s.length-1;ir!=x>r&&n<(h-f)*(r-p)/(x-p)+f&&(a=!a)}return a}function nH(t){const s=t.slice();return s.sort((n,r)=>n.xr.x?1:n.yr.y?1:0),rH(s)}function rH(t){if(t.length<=1)return t.slice();const s=[];for(let r=0;r=2;){const i=s[s.length-1],o=s[s.length-2];if((i.x-o.x)*(a.y-o.y)>=(i.y-o.y)*(a.x-o.x))s.pop();else break}s.push(a)}s.pop();const n=[];for(let r=t.length-1;r>=0;r--){const a=t[r];for(;n.length>=2;){const i=n[n.length-1],o=n[n.length-2];if((i.x-o.x)*(a.y-o.y)>=(i.y-o.y)*(a.x-o.x))n.pop();else break}n.push(a)}return n.pop(),s.length===1&&n.length===1&&s[0].x===n[0].x&&s[0].y===n[0].y?s:s.concat(n)}var aH=g_,iH=v_,lH=y_,oH=b_,cH=j_,dH=S_;function gp({delayDuration:t=0,...s}){return e.jsx(aH,{"data-slot":"tooltip-provider",delayDuration:t,...s})}function dj({...t}){return e.jsx(gp,{children:e.jsx(iH,{"data-slot":"tooltip",...t})})}function uj({...t}){return e.jsx(lH,{"data-slot":"tooltip-trigger",...t})}function hj({className:t,sideOffset:s=0,children:n,...r}){return e.jsx(oH,{children:e.jsxs(cH,{"data-slot":"tooltip-content",sideOffset:s,className:Nt("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",t),...r,children:[n,e.jsx(dH,{className:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const uH=({isOpen:t,onOpenChange:s,editingASMId:n,asmManagerId:r,setAsmManagerId:a,asmStatus:i,setAsmStatus:o,selectedASMZone:d,setSelectedASMZone:m,selectedASMRegion:f,setSelectedASMRegion:p,selectedASMStates:h,setSelectedASMStates:x,selectedASMDistricts:u,setSelectedASMDistricts:N,onSave:v,asmRoleCode:w,userAssignedData:j,districtsAssignedToOthers:b,getDistrictsForSelectedState:C})=>{const{zones:S,regionalOffices:R}=In(A=>A.master),_=j.filter(A=>{const E=(A.allRoles||[]).map(O=>String(O||"").toUpperCase()),q=String(A.roleCode||"").toUpperCase();return E.includes("DD-AM")||q==="DD-AM"});return wt.useEffect(()=>{if(r&&t){const A=j.find(E=>E.id===r);if(A&&A.territoryProfile){const E=A.territoryProfile.filter(q=>q.roleCode===w&&q.locationType==="district").map(q=>q.locationId);E.length>0&&N(E)}}},[r,w,t,j,N]),e.jsx(ds,{open:t,onOpenChange:s,children:e.jsxs(os,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[e.jsxs(xs,{children:[e.jsxs(ms,{children:[n?"Edit":"Add"," DD Area Manager"]}),e.jsx(bs,{children:"Configure DD-AM details and district assignment"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx(de,{children:"Zone"}),e.jsxs(Dt,{value:d,onValueChange:A=>{m(A),p(""),x([]),N([])},children:[e.jsx(Et,{className:"mt-2 text-slate-900",children:e.jsx(Rt,{placeholder:"Select zone"})}),e.jsx(_t,{children:S.map(A=>e.jsx(Me,{value:A.id,children:A.name},A.id))})]})]}),d&&e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx(de,{children:"Regional Office"}),e.jsxs(Dt,{value:f,onValueChange:A=>{p(A),x([]),N([])},children:[e.jsx(Et,{className:"mt-2 text-slate-900",children:e.jsx(Rt,{placeholder:"Select regional office"})}),e.jsx(_t,{children:R.filter(A=>A.zoneId===d).map(A=>e.jsx(Me,{value:A.id,children:A.name},A.id))})]})]}),e.jsxs("div",{children:[e.jsx(de,{children:"Select DD-AM User"}),e.jsxs(Dt,{value:r,onValueChange:a,children:[e.jsx(Et,{className:"mt-2 text-slate-900",children:e.jsx(Rt,{placeholder:"Select DD-AM"})}),e.jsx(_t,{className:"max-h-64",children:_.map(A=>e.jsxs(Me,{value:A.id,children:[A.name," (",A.employeeId||"No ID",")"]},A.id))})]})]})]}),f&&e.jsxs("div",{children:[e.jsx(de,{children:"States Covered"}),e.jsx("div",{className:"mt-2 border rounded-lg p-3 max-h-48 overflow-y-auto bg-slate-50",children:(()=>{const A=R.find(q=>q.id===f),E=((A==null?void 0:A.states)||[]).map(q=>typeof q=="string"?q:q.name);return E.length>0?e.jsx("div",{className:"space-y-2",children:E.map(q=>e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Ln,{id:`asm-state-${q}`,checked:h.some(O=>O.toLowerCase()===q.toLowerCase()),onCheckedChange:O=>{if(O)x([...h,q]);else{x(h.filter(P=>P.toLowerCase()!==q.toLowerCase()));const D=C(q);N(u.filter(P=>!D.some(L=>L.id===P)))}}}),e.jsx("label",{htmlFor:`asm-state-${q}`,className:"text-sm cursor-pointer text-slate-900",children:q})]},q))}):e.jsx("p",{className:"text-sm text-slate-500",children:"No states available for this regional office"})})()})]}),h.length>0&&e.jsxs("div",{children:[e.jsx(de,{children:"Districts/Cities Covered"}),e.jsx("div",{className:"mt-2 border rounded-lg p-3 max-h-64 overflow-y-auto bg-slate-50",children:e.jsx(gp,{children:h.map(A=>{const E=C(A);return E.length===0?null:e.jsxs("div",{className:"mb-4 last:mb-0",children:[e.jsx("h4",{className:"text-sm text-re-red-hover mb-2 pb-1 border-b border-slate-200",children:A}),e.jsx("div",{className:"space-y-2 ml-2",children:E.map(q=>e.jsx("div",{children:e.jsxs(dj,{children:[e.jsx(uj,{asChild:!0,children:e.jsxs("div",{className:"flex items-center space-x-2 py-0.5",children:[e.jsx(Ln,{id:`asm-district-${q.id}`,checked:u.includes(q.id),disabled:!!b[q.id],onCheckedChange:O=>{N(O?[...u,q.id]:u.filter(D=>D!==q.id))}}),e.jsx("label",{htmlFor:`asm-district-${q.id}`,className:`text-sm flex items-center gap-1.5 ${b[q.id]?"text-slate-400 cursor-not-allowed":"cursor-pointer text-slate-900"}`,children:q.name})]})}),b[q.id]&&e.jsx(hj,{children:e.jsxs("p",{children:["Already managed by: ",b[q.id].join(", ")]})})]})},q.id))})]},A)})})})]}),e.jsxs("div",{className:"border-t pt-4",children:[e.jsxs(de,{children:["DD Area Manager ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsxs(Dt,{value:r,onValueChange:A=>{var q;a(A);const E=j.find(O=>O.id===A);if(E){const O=(E.territoryProfile||[]).find(D=>D.roleCode===w);O!=null&&O.zoneId&&m(O.zoneId),O!=null&&O.regionId&&p(O.regionId),N(((q=E.areasManaged)==null?void 0:q.filter(D=>D.roleCode===w).map(D=>D.id))||[]),x(E.stateNames||[])}},disabled:!!n,children:[e.jsx(Et,{className:"mt-2 w-full text-slate-900",children:e.jsx(Rt,{placeholder:"Select DD-AM User"})}),e.jsx(_t,{className:"max-h-60",children:_.length>0?_.map(A=>e.jsx(Me,{value:A.id,children:e.jsxs("div",{className:"flex flex-col text-left",children:[e.jsx("span",{className:"font-medium text-slate-900",children:A.name}),e.jsx("span",{className:"text-xs text-slate-500",children:A.email})]})},A.id)):e.jsx("div",{className:"p-2 text-sm text-slate-500 text-center",children:"No users available"})})]})]}),e.jsxs("div",{children:[e.jsx(de,{children:"Status"}),e.jsxs(Dt,{value:i,onValueChange:A=>o(A),children:[e.jsx(Et,{className:"mt-2 text-slate-900",children:e.jsx(Rt,{})}),e.jsxs(_t,{children:[e.jsx(Me,{value:"active",children:"Active"}),e.jsx(Me,{value:"inactive",children:"Inactive"})]})]})]}),e.jsxs("div",{className:"flex gap-3 pt-4",children:[e.jsx(se,{variant:"outline",className:"flex-1",onClick:()=>s(!1),children:"Cancel"}),e.jsx(se,{className:"flex-1 bg-re-red hover:bg-re-red-hover",onClick:v,children:"Save DD-AM"})]})]})]})})};var FS=1,hH=.9,mH=.8,fH=.17,Zg=.1,Qg=.999,pH=.9999,xH=.99,gH=/[\\\/_+.#"@\[\(\{&]/,vH=/[\\\/_+.#"@\[\(\{&]/g,yH=/[\s-]/,C_=/[\s-]/g;function Ey(t,s,n,r,a,i,o){if(i===s.length)return a===t.length?FS:xH;var d=`${a},${i}`;if(o[d]!==void 0)return o[d];for(var m=r.charAt(i),f=n.indexOf(m,a),p=0,h,x,u,N;f>=0;)h=Ey(t,s,n,r,f+1,i+1,o),h>p&&(f===a?h*=FS:gH.test(t.charAt(f-1))?(h*=mH,u=t.slice(a,f-1).match(vH),u&&a>0&&(h*=Math.pow(Qg,u.length))):yH.test(t.charAt(f-1))?(h*=hH,N=t.slice(a,f-1).match(C_),N&&a>0&&(h*=Math.pow(Qg,N.length))):(h*=fH,a>0&&(h*=Math.pow(Qg,f-a))),t.charAt(f)!==s.charAt(i)&&(h*=pH)),(hh&&(h=x*Zg)),h>p&&(p=h),f=n.indexOf(m,f+1);return o[d]=p,p}function BS(t){return t.toLowerCase().replace(C_," ")}function bH(t,s,n){return t=n&&n.length>0?`${t+" "+n.join(" ")}`:t,Ey(t,s,BS(t),BS(s),0,0,{})}var cu='[cmdk-group=""]',Xg='[cmdk-group-items=""]',jH='[cmdk-group-heading=""]',A_='[cmdk-item=""]',$S=`${A_}:not([aria-disabled="true"])`,_y="cmdk-item-select",Yc="data-value",NH=(t,s,n)=>bH(t,s,n),k_=g.createContext(void 0),lh=()=>g.useContext(k_),D_=g.createContext(void 0),mj=()=>g.useContext(D_),R_=g.createContext(void 0),E_=g.forwardRef((t,s)=>{let n=Zc(()=>{var I,B;return{search:"",value:(B=(I=t.value)!=null?I:t.defaultValue)!=null?B:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=Zc(()=>new Set),a=Zc(()=>new Map),i=Zc(()=>new Map),o=Zc(()=>new Set),d=__(t),{label:m,children:f,value:p,onValueChange:h,filter:x,shouldFilter:u,loop:N,disablePointerSelection:v=!1,vimBindings:w=!0,...j}=t,b=Ar(),C=Ar(),S=Ar(),R=g.useRef(null),_=PH();uc(()=>{if(p!==void 0){let I=p.trim();n.current.value=I,A.emit()}},[p]),uc(()=>{_(6,L)},[]);let A=g.useMemo(()=>({subscribe:I=>(o.current.add(I),()=>o.current.delete(I)),snapshot:()=>n.current,setState:(I,B,G)=>{var K,H,X,J;if(!Object.is(n.current[I],B)){if(n.current[I]=B,I==="search")P(),O(),_(1,D);else if(I==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let ae=document.getElementById(S);ae?ae.focus():(K=document.getElementById(b))==null||K.focus()}if(_(7,()=>{var ae;n.current.selectedItemId=(ae=$())==null?void 0:ae.id,A.emit()}),G||_(5,L),((H=d.current)==null?void 0:H.value)!==void 0){let ae=B??"";(J=(X=d.current).onValueChange)==null||J.call(X,ae);return}}A.emit()}},emit:()=>{o.current.forEach(I=>I())}}),[]),E=g.useMemo(()=>({value:(I,B,G)=>{var K;B!==((K=i.current.get(I))==null?void 0:K.value)&&(i.current.set(I,{value:B,keywords:G}),n.current.filtered.items.set(I,q(B,G)),_(2,()=>{O(),A.emit()}))},item:(I,B)=>(r.current.add(I),B&&(a.current.has(B)?a.current.get(B).add(I):a.current.set(B,new Set([I]))),_(3,()=>{P(),O(),n.current.value||D(),A.emit()}),()=>{i.current.delete(I),r.current.delete(I),n.current.filtered.items.delete(I);let G=$();_(4,()=>{P(),(G==null?void 0:G.getAttribute("id"))===I&&D(),A.emit()})}),group:I=>(a.current.has(I)||a.current.set(I,new Set),()=>{i.current.delete(I),a.current.delete(I)}),filter:()=>d.current.shouldFilter,label:m||t["aria-label"],getDisablePointerSelection:()=>d.current.disablePointerSelection,listId:b,inputId:S,labelId:C,listInnerRef:R}),[]);function q(I,B){var G,K;let H=(K=(G=d.current)==null?void 0:G.filter)!=null?K:NH;return I?H(I,n.current.search,B):0}function O(){if(!n.current.search||d.current.shouldFilter===!1)return;let I=n.current.filtered.items,B=[];n.current.filtered.groups.forEach(K=>{let H=a.current.get(K),X=0;H.forEach(J=>{let ae=I.get(J);X=Math.max(ae,X)}),B.push([K,X])});let G=R.current;Y().sort((K,H)=>{var X,J;let ae=K.getAttribute("id"),le=H.getAttribute("id");return((X=I.get(le))!=null?X:0)-((J=I.get(ae))!=null?J:0)}).forEach(K=>{let H=K.closest(Xg);H?H.appendChild(K.parentElement===H?K:K.closest(`${Xg} > *`)):G.appendChild(K.parentElement===G?K:K.closest(`${Xg} > *`))}),B.sort((K,H)=>H[1]-K[1]).forEach(K=>{var H;let X=(H=R.current)==null?void 0:H.querySelector(`${cu}[${Yc}="${encodeURIComponent(K[0])}"]`);X==null||X.parentElement.appendChild(X)})}function D(){let I=Y().find(G=>G.getAttribute("aria-disabled")!=="true"),B=I==null?void 0:I.getAttribute(Yc);A.setState("value",B||void 0)}function P(){var I,B,G,K;if(!n.current.search||d.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let H=0;for(let X of r.current){let J=(B=(I=i.current.get(X))==null?void 0:I.value)!=null?B:"",ae=(K=(G=i.current.get(X))==null?void 0:G.keywords)!=null?K:[],le=q(J,ae);n.current.filtered.items.set(X,le),le>0&&H++}for(let[X,J]of a.current)for(let ae of J)if(n.current.filtered.items.get(ae)>0){n.current.filtered.groups.add(X);break}n.current.filtered.count=H}function L(){var I,B,G;let K=$();K&&(((I=K.parentElement)==null?void 0:I.firstChild)===K&&((G=(B=K.closest(cu))==null?void 0:B.querySelector(jH))==null||G.scrollIntoView({block:"nearest"})),K.scrollIntoView({block:"nearest"}))}function $(){var I;return(I=R.current)==null?void 0:I.querySelector(`${A_}[aria-selected="true"]`)}function Y(){var I;return Array.from(((I=R.current)==null?void 0:I.querySelectorAll($S))||[])}function Z(I){let B=Y()[I];B&&A.setState("value",B.getAttribute(Yc))}function W(I){var B;let G=$(),K=Y(),H=K.findIndex(J=>J===G),X=K[H+I];(B=d.current)!=null&&B.loop&&(X=H+I<0?K[K.length-1]:H+I===K.length?K[0]:K[H+I]),X&&A.setState("value",X.getAttribute(Yc))}function U(I){let B=$(),G=B==null?void 0:B.closest(cu),K;for(;G&&!K;)G=I>0?_H(G,cu):TH(G,cu),K=G==null?void 0:G.querySelector($S);K?A.setState("value",K.getAttribute(Yc)):W(I)}let M=()=>Z(Y().length-1),z=I=>{I.preventDefault(),I.metaKey?M():I.altKey?U(1):W(1)},T=I=>{I.preventDefault(),I.metaKey?Z(0):I.altKey?U(-1):W(-1)};return g.createElement(js.div,{ref:s,tabIndex:-1,...j,"cmdk-root":"",onKeyDown:I=>{var B;(B=j.onKeyDown)==null||B.call(j,I);let G=I.nativeEvent.isComposing||I.keyCode===229;if(!(I.defaultPrevented||G))switch(I.key){case"n":case"j":{w&&I.ctrlKey&&z(I);break}case"ArrowDown":{z(I);break}case"p":case"k":{w&&I.ctrlKey&&T(I);break}case"ArrowUp":{T(I);break}case"Home":{I.preventDefault(),Z(0);break}case"End":{I.preventDefault(),M();break}case"Enter":{I.preventDefault();let K=$();if(K){let H=new Event(_y);K.dispatchEvent(H)}}}}},g.createElement("label",{"cmdk-label":"",htmlFor:E.inputId,id:E.labelId,style:LH},m),vp(t,I=>g.createElement(D_.Provider,{value:A},g.createElement(k_.Provider,{value:E},I))))}),wH=g.forwardRef((t,s)=>{var n,r;let a=Ar(),i=g.useRef(null),o=g.useContext(R_),d=lh(),m=__(t),f=(r=(n=m.current)==null?void 0:n.forceMount)!=null?r:o==null?void 0:o.forceMount;uc(()=>{if(!f)return d.item(a,o==null?void 0:o.id)},[f]);let p=T_(a,i,[t.value,t.children,i],t.keywords),h=mj(),x=io(_=>_.value&&_.value===p.current),u=io(_=>f||d.filter()===!1?!0:_.search?_.filtered.items.get(a)>0:!0);g.useEffect(()=>{let _=i.current;if(!(!_||t.disabled))return _.addEventListener(_y,N),()=>_.removeEventListener(_y,N)},[u,t.onSelect,t.disabled]);function N(){var _,A;v(),(A=(_=m.current).onSelect)==null||A.call(_,p.current)}function v(){h.setState("value",p.current,!0)}if(!u)return null;let{disabled:w,value:j,onSelect:b,forceMount:C,keywords:S,...R}=t;return g.createElement(js.div,{ref:Xr(i,s),...R,id:a,"cmdk-item":"",role:"option","aria-disabled":!!w,"aria-selected":!!x,"data-disabled":!!w,"data-selected":!!x,onPointerMove:w||d.getDisablePointerSelection()?void 0:v,onClick:w?void 0:N},t.children)}),SH=g.forwardRef((t,s)=>{let{heading:n,children:r,forceMount:a,...i}=t,o=Ar(),d=g.useRef(null),m=g.useRef(null),f=Ar(),p=lh(),h=io(u=>a||p.filter()===!1?!0:u.search?u.filtered.groups.has(o):!0);uc(()=>p.group(o),[]),T_(o,d,[t.value,t.heading,m]);let x=g.useMemo(()=>({id:o,forceMount:a}),[a]);return g.createElement(js.div,{ref:Xr(d,s),...i,"cmdk-group":"",role:"presentation",hidden:h?void 0:!0},n&&g.createElement("div",{ref:m,"cmdk-group-heading":"","aria-hidden":!0,id:f},n),vp(t,u=>g.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?f:void 0},g.createElement(R_.Provider,{value:x},u))))}),CH=g.forwardRef((t,s)=>{let{alwaysRender:n,...r}=t,a=g.useRef(null),i=io(o=>!o.search);return!n&&!i?null:g.createElement(js.div,{ref:Xr(a,s),...r,"cmdk-separator":"",role:"separator"})}),AH=g.forwardRef((t,s)=>{let{onValueChange:n,...r}=t,a=t.value!=null,i=mj(),o=io(f=>f.search),d=io(f=>f.selectedItemId),m=lh();return g.useEffect(()=>{t.value!=null&&i.setState("search",t.value)},[t.value]),g.createElement(js.input,{ref:s,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":m.listId,"aria-labelledby":m.labelId,"aria-activedescendant":d,id:m.inputId,type:"text",value:a?t.value:o,onChange:f=>{a||i.setState("search",f.target.value),n==null||n(f.target.value)}})}),kH=g.forwardRef((t,s)=>{let{children:n,label:r="Suggestions",...a}=t,i=g.useRef(null),o=g.useRef(null),d=io(f=>f.selectedItemId),m=lh();return g.useEffect(()=>{if(o.current&&i.current){let f=o.current,p=i.current,h,x=new ResizeObserver(()=>{h=requestAnimationFrame(()=>{let u=f.offsetHeight;p.style.setProperty("--cmdk-list-height",u.toFixed(1)+"px")})});return x.observe(f),()=>{cancelAnimationFrame(h),x.unobserve(f)}}},[]),g.createElement(js.div,{ref:Xr(i,s),...a,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":d,"aria-label":r,id:m.listId},vp(t,f=>g.createElement("div",{ref:Xr(o,m.listInnerRef),"cmdk-list-sizer":""},f)))}),DH=g.forwardRef((t,s)=>{let{open:n,onOpenChange:r,overlayClassName:a,contentClassName:i,container:o,...d}=t;return g.createElement(qb,{open:n,onOpenChange:r},g.createElement(zb,{container:o},g.createElement(lp,{"cmdk-overlay":"",className:a}),g.createElement(op,{"aria-label":t.label,"cmdk-dialog":"",className:i},g.createElement(E_,{ref:s,...d}))))}),RH=g.forwardRef((t,s)=>io(n=>n.filtered.count===0)?g.createElement(js.div,{ref:s,...t,"cmdk-empty":"",role:"presentation"}):null),EH=g.forwardRef((t,s)=>{let{progress:n,children:r,label:a="Loading...",...i}=t;return g.createElement(js.div,{ref:s,...i,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},vp(t,o=>g.createElement("div",{"aria-hidden":!0},o)))}),Dd=Object.assign(E_,{List:kH,Item:wH,Input:AH,Group:SH,Separator:CH,Dialog:DH,Empty:RH,Loading:EH});function _H(t,s){let n=t.nextElementSibling;for(;n;){if(n.matches(s))return n;n=n.nextElementSibling}}function TH(t,s){let n=t.previousElementSibling;for(;n;){if(n.matches(s))return n;n=n.previousElementSibling}}function __(t){let s=g.useRef(t);return uc(()=>{s.current=t}),s}var uc=typeof window>"u"?g.useEffect:g.useLayoutEffect;function Zc(t){let s=g.useRef();return s.current===void 0&&(s.current=t()),s}function io(t){let s=mj(),n=()=>t(s.snapshot());return g.useSyncExternalStore(s.subscribe,n,n)}function T_(t,s,n,r=[]){let a=g.useRef(),i=lh();return uc(()=>{var o;let d=(()=>{var f;for(let p of n){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(f=p.current.textContent)==null?void 0:f.trim():a.current}})(),m=r.map(f=>f.trim());i.value(t,d,m),(o=s.current)==null||o.setAttribute(Yc,d),a.current=d}),a}var PH=()=>{let[t,s]=g.useState(),n=Zc(()=>new Map);return uc(()=>{n.current.forEach(r=>r()),n.current=new Map},[t]),(r,a)=>{n.current.set(r,a),s({})}};function OH(t){let s=t.type;return typeof s=="function"?s(t.props):"render"in s?s.render(t.props):t}function vp({asChild:t,children:s},n){return t&&g.isValidElement(s)?g.cloneElement(OH(s),{ref:s.ref},n(s.props.children)):n(s)}var LH={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function IH({className:t,...s}){return e.jsx(Dd,{"data-slot":"command",className:Nt("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),...s})}function MH({className:t,...s}){return e.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[e.jsx(Ta,{className:"size-4 shrink-0 opacity-50"}),e.jsx(Dd.Input,{"data-slot":"command-input",className:Nt("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",t),...s})]})}function FH({className:t,...s}){return e.jsx(Dd.List,{"data-slot":"command-list",className:Nt("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),...s})}function BH({...t}){return e.jsx(Dd.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...t})}function $H({className:t,...s}){return e.jsx(Dd.Group,{"data-slot":"command-group",className:Nt("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),...s})}function qS({className:t,...s}){return e.jsx(Dd.Item,{"data-slot":"command-item",className:Nt("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...s})}const qH=({value:t,onChange:s,asmUsers:n,className:r})=>{const[a,i]=g.useState(!1),o=n.find(d=>d.id===t);return e.jsxs(_u,{open:a,onOpenChange:i,children:[e.jsx(Tu,{asChild:!0,children:e.jsxs(se,{variant:"outline",role:"combobox","aria-expanded":a,className:Nt("w-full min-w-0 justify-between",r),children:[e.jsx("span",{className:"truncate text-left",children:t==="__none__"?"Unassign":o?`${o.fullName} (${o.employeeId||o.email})`:"Select ASM"}),e.jsx(II,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),e.jsx(Pu,{className:"w-[360px] max-w-[90vw] p-0",children:e.jsxs(IH,{children:[e.jsx(MH,{placeholder:"Search ASM by name/email/id..."}),e.jsxs(FH,{className:"max-h-64 overflow-y-auto custom-scrollbar-slim",children:[e.jsx(BH,{children:"No ASM found."}),e.jsxs($H,{children:[e.jsxs(qS,{value:"Unassign __none__",onSelect:()=>{s("__none__"),i(!1)},children:[e.jsx(Hn,{className:Nt("mr-2 h-4 w-4",t==="__none__"?"opacity-100":"opacity-0")}),"Unassign"]}),n.map(d=>e.jsxs(qS,{value:`${d.fullName} ${d.email} ${d.employeeId||""}`,onSelect:()=>{s(d.id),i(!1)},children:[e.jsx(Hn,{className:Nt("mr-2 h-4 w-4",t===d.id?"opacity-100":"opacity-0")}),d.fullName," (",d.employeeId||d.email,")"]},d.id))]})]})]})})]})},zH=()=>{const[t,s]=g.useState(!1),[n,r]=g.useState([]),[a,i]=g.useState([]),[o,d]=g.useState({}),m=async()=>{var h,x,u,N;try{s(!0);const v=await Is.getDealerAsmMappings();v!=null&&v.success&&(r(((h=v.data)==null?void 0:h.dealers)||[]),i(((x=v.data)==null?void 0:x.asmUsers)||[]))}catch(v){te.error(((N=(u=v==null?void 0:v.response)==null?void 0:u.data)==null?void 0:N.message)||"Failed to load dealer ASM mappings")}finally{s(!1)}};g.useEffect(()=>{m()},[]);const f=g.useMemo(()=>[...n].sort((h,x)=>{const u=String(h.status||"").toLowerCase()==="active",N=String(x.status||"").toLowerCase()==="active";return u!==N?u?-1:1:String(h.dealerName||"").localeCompare(String(x.dealerName||""))}),[n]),p=async h=>{var u,N;const x=o[h]||"";try{const v=await Is.saveDealerAsmMapping({dealerId:h,asmUserId:x==="__none__"?null:x||null});v!=null&&v.success?(te.success(v.message||"Dealer ASM mapping updated"),await m()):te.error((v==null?void 0:v.message)||"Failed to save mapping")}catch(v){te.error(((N=(u=v==null?void 0:v.response)==null?void 0:u.data)==null?void 0:N.message)||"Failed to save mapping")}};return e.jsxs(Le,{children:[e.jsxs(Qe,{children:[e.jsx(Je,{children:"Dealer-Level ASM Assignment"}),e.jsx(Xt,{children:"Assign Sales ASM to onboarded dealers. DD-AM remains district-level in the section above."})]}),e.jsx(Fe,{children:t?e.jsx("p",{className:"text-sm text-slate-500",children:"Loading mappings..."}):e.jsxs(Ts,{className:"w-full",children:[e.jsx(Ps,{children:e.jsxs(it,{children:[e.jsx(fe,{children:"Dealer"}),e.jsx(fe,{children:"Dealer Code"}),e.jsx(fe,{children:"Status"}),e.jsx(fe,{children:"Current ASM"}),e.jsx(fe,{children:"Assign ASM"})]})}),e.jsxs(Os,{children:[f.length===0&&e.jsx(it,{children:e.jsx(ue,{colSpan:5,className:"text-center text-slate-500 py-8",children:"No dealers available for ASM mapping yet."})}),f.map(h=>{var x;return e.jsxs(it,{children:[e.jsx(ue,{children:e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{className:"font-medium",children:h.dealerName}),e.jsx("span",{className:"text-xs text-slate-500",children:h.legalName})]})}),e.jsx(ue,{children:h.dealerCode||"N/A"}),e.jsx(ue,{children:e.jsx(Ce,{variant:String(h.status||"").toLowerCase()==="active"?"default":"secondary",className:String(h.status||"").toLowerCase()==="active"?"bg-emerald-100 text-emerald-700 hover:bg-emerald-200":"",children:h.status||"Unknown"})}),e.jsx(ue,{children:h.assignedAsm?e.jsxs("div",{className:"flex flex-col min-w-0",children:[e.jsx("span",{children:h.assignedAsm.fullName}),e.jsx("span",{className:"text-xs text-slate-500 truncate",children:h.assignedAsm.employeeId||h.assignedAsm.email})]}):e.jsx("span",{className:"text-slate-400 text-sm",children:"Unassigned"})}),e.jsx(ue,{children:e.jsxs("div",{className:"flex items-center gap-2 w-full",children:[e.jsx(qH,{asmUsers:a,value:o[h.dealerId]??((x=h.assignedAsm)==null?void 0:x.id)??"__none__",onChange:u=>d(N=>({...N,[h.dealerId]:u})),className:"flex-1 min-w-[180px]"}),e.jsx(se,{size:"sm",className:"shrink-0 bg-re-red hover:bg-re-red-hover text-white",onClick:()=>p(h.dealerId),children:"Assign"})]})})]},h.dealerId)})]})]})})]})},UH=({isOpen:t,onOpenChange:s,editingZMId:n,zmManagerId:r,setZmManagerId:a,zmStatus:i,setZmStatus:o,selectedZone:d,setSelectedZone:m,selectedRegions:f,setSelectedRegions:p,onSave:h,userAssignedData:x})=>{const{zones:u,regionalOffices:N}=In(j=>j.master),v=x.filter(j=>(j.allRoles||[]).some(C=>{const S=(C||"").toUpperCase();return["ZM","ZONAL MANAGER","ZBH","ZONE BUSINESS HEAD","RM","RBM","REGIONAL MANAGER"].includes(S)||S.includes("ZONAL")||S.includes("REGIONAL")})),w=N.filter(j=>j.zoneId===d);return e.jsx(ds,{open:t,onOpenChange:s,children:e.jsxs(os,{className:"max-w-xl max-h-[90vh] overflow-y-auto",children:[e.jsxs(xs,{children:[e.jsxs(ms,{children:[n?"Edit":"Add"," Zonal Manager"]}),e.jsx(bs,{children:"Assign Zonal Manager to Regions within a Zone"})]}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"border-b border-slate-100 pb-4",children:[e.jsxs(de,{children:["Select Zonal Manager User ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsxs(Dt,{value:r,onValueChange:j=>{a(j);const b=x.find(C=>C.id===j);b&&(b.zoneId&&m(b.zoneId),b.assignedRegionIds&&p(b.assignedRegionIds))},disabled:!!n,children:[e.jsx(Et,{className:"mt-2 w-full text-slate-900 border-slate-200",children:e.jsx(Rt,{placeholder:"Select ZM User"})}),e.jsx(_t,{className:"max-h-60",children:v.map(j=>e.jsx(Me,{value:j.id,children:e.jsxs("div",{className:"flex flex-col text-left",children:[e.jsx("span",{className:"font-medium text-slate-900",children:j.name}),e.jsx("span",{className:"text-xs text-slate-500",children:j.email})]})},j.id))})]})]}),e.jsxs("div",{children:[e.jsxs(de,{children:["Managed Zone ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsxs(Dt,{value:d,onValueChange:j=>{m(j),p([])},children:[e.jsx(Et,{className:"mt-2",children:e.jsx(Rt,{placeholder:"Select zone"})}),e.jsx(_t,{children:u.map(j=>e.jsx(Me,{value:j.id,children:j.name},j.id))})]})]}),d&&e.jsxs("div",{children:[e.jsxs(de,{className:"mb-2 block",children:["Assigned Regions ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("div",{className:"border border-slate-200 rounded-lg p-4 bg-slate-50/50 max-h-60 overflow-y-auto",children:e.jsxs("div",{className:"grid grid-cols-1 gap-3",children:[w.map(j=>e.jsxs("div",{className:"flex items-center space-x-3 p-2 rounded hover:bg-white transition-colors",children:[e.jsx(Ln,{id:`region-${j.id}`,checked:f.includes(j.id),onCheckedChange:b=>{p(b?[...f,j.id]:f.filter(C=>C!==j.id))}}),e.jsxs("label",{htmlFor:`region-${j.id}`,className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer flex-1",children:[j.name,e.jsx("span",{className:"text-xs text-slate-500 block mt-1",children:j.code||"No Code"})]})]},j.id)),w.length===0&&e.jsx("p",{className:"text-sm text-slate-500 italic text-center py-4",children:"No regions found for this zone"})]})})]}),e.jsxs("div",{children:[e.jsx(de,{children:"Status"}),e.jsxs(Dt,{value:i,onValueChange:j=>o(j),children:[e.jsx(Et,{className:"mt-2",children:e.jsx(Rt,{})}),e.jsxs(_t,{children:[e.jsx(Me,{value:"active",children:"Active"}),e.jsx(Me,{value:"inactive",children:"Inactive"})]})]})]}),e.jsxs("div",{className:"flex gap-3 pt-6",children:[e.jsx(se,{variant:"outline",className:"flex-1",onClick:()=>s(!1),children:"Cancel"}),e.jsx(se,{className:"flex-1 bg-re-red hover:bg-re-red-hover",onClick:h,children:"Save Zonal Manager"})]})]})]})})},VH=({isOpen:t,onOpenChange:s,editingZoneId:n,zoneName:r,setZoneName:a,zoneCode:i,setZoneCode:o,zoneDescription:d,setZoneDescription:m,zonalBusinessHeadId:f,setZonalBusinessHeadId:p,userAssignedData:h,onSave:x})=>{const u=(h||[]).filter(v=>{if(f!=="none"&&v.id===f)return!0;const w=(v.allRoles||[]).map(b=>String(b||"").toUpperCase()),j=String(v.roleCode||v.role||"").toUpperCase();return j==="ZBH"||j.includes("ZONAL BUSINESS HEAD")||w.some(b=>{const C=String(b||"").toUpperCase();return C==="ZBH"||C==="ZONE BUSINESS HEAD"||C==="ZONAL BUSINESS HEAD"})}),N=u.length>0?u:h||[];return wt.useEffect(()=>{},[n,t]),e.jsx(ds,{open:t,onOpenChange:s,children:e.jsxs(os,{className:"max-w-md",children:[e.jsxs(xs,{children:[e.jsxs(ms,{children:[n?"Edit":"Add"," Zone"]}),e.jsx(bs,{children:"Configure zonal details and geographical boundaries"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx(de,{children:"Zone Name"}),e.jsx(at,{placeholder:"e.g., North Zone",className:"mt-2 text-slate-900",value:r,onChange:v=>a(v.target.value)})]}),e.jsxs("div",{children:[e.jsx(de,{children:"Zone Code"}),e.jsx(at,{placeholder:"e.g., NZ",className:"mt-2 text-slate-900",value:i,onChange:v=>o(v.target.value)})]})]}),e.jsxs("div",{children:[e.jsx(de,{children:"Zonal Business Head"}),e.jsxs(Dt,{value:f,onValueChange:p,children:[e.jsx(Et,{className:"mt-2 w-full text-slate-900",children:e.jsx(Rt,{placeholder:"Select Head"})}),e.jsxs(_t,{className:"max-h-60",children:[e.jsx(Me,{value:"none",children:"None / Unassigned"}),N.map(v=>e.jsxs(Me,{value:v.id,children:[v.name," (",v.email,")"]},v.id))]})]})]}),e.jsxs("div",{children:[e.jsx(de,{children:"Description"}),e.jsx(Ws,{placeholder:"Describe the zone's coverage...",className:"mt-2 text-slate-900",rows:3,value:d,onChange:v=>m(v.target.value)})]}),e.jsxs("div",{className:"flex gap-3 pt-4",children:[e.jsx(se,{variant:"outline",className:"flex-1",onClick:()=>s(!1),children:"Cancel"}),e.jsx(se,{className:"flex-1 bg-re-red hover:bg-re-red-hover",onClick:x,children:"Save Zone"})]})]})]})})},HH=({isOpen:t,onOpenChange:s,editingRegionId:n,regionName:r,setRegionName:a,regionDescription:i,setRegionDescription:o,selectedRegionZone:d,setSelectedRegionZone:m,regionalManagerId:f,setRegionalManagerId:p,selectedRegionStates:h,setSelectedRegionStates:x,onSave:u,userAssignedData:N})=>{const{zones:v,allStates:w,allDistricts:j,regionalOffices:b}=In(D=>D.master),[C,S]=wt.useState([]),R=wt.useMemo(()=>{const D={};return(b||[]).forEach(P=>{P.id!==n&&(P.districts||[]).forEach(L=>{D[L.id]=P.name})}),D},[b,n]),_=wt.useMemo(()=>{if(!d)return w;const D=new Set(j.filter(P=>P.zoneId===d||!P.zoneId||h.includes(P.id)).map(P=>P.stateId).filter(Boolean));return w.filter(P=>P.zoneId===d||D.has(P.id)||!P.zoneId)},[w,j,d,h]),A=wt.useMemo(()=>C.length===0?[]:j.filter(D=>C.includes(D.stateId)&&(!D.zoneId||D.zoneId===d||D.regionId===n)),[j,C,d,n]),E=wt.useMemo(()=>{const D={};return A.forEach(P=>{const L=w.find(Y=>Y.id===P.stateId),$=(L==null?void 0:L.name)||P.stateId;D[P.stateId]||(D[P.stateId]={stateName:$,districts:[]}),D[P.stateId].districts.push(P)}),Object.values(D)},[A,w]);wt.useEffect(()=>{if(!t){S([]);return}if(h.length>0){const D=Array.from(new Set(j.filter(P=>h.includes(P.id)).map(P=>P.stateId).filter(Boolean)));S(D)}},[t]);const q=D=>{m(D),S([]),x([])},O=(D,P)=>{if(P)S(L=>[...L,D]);else{S($=>$.filter(Y=>Y!==D));const L=j.filter($=>$.stateId===D).map($=>$.id);x(h.filter($=>!L.includes($)))}};return e.jsx(ds,{open:t,onOpenChange:s,children:e.jsxs(os,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[e.jsxs(xs,{children:[e.jsxs(ms,{children:[n?"Edit":"Add"," Regional Office"]}),e.jsx(bs,{children:"Configure regional office details and coverage area"})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx(de,{children:"Region Name"}),e.jsx(at,{placeholder:"e.g., Delhi NCR Region",className:"mt-2 text-slate-900",value:r,onChange:D=>a(D.target.value)})]}),e.jsxs("div",{children:[e.jsx(de,{children:"Zone"}),e.jsxs(Dt,{value:d,onValueChange:q,children:[e.jsx(Et,{className:"mt-2 text-slate-900",children:e.jsx(Rt,{placeholder:"Select zone"})}),e.jsx(_t,{children:v.map(D=>e.jsx(Me,{value:D.id,children:D.name},D.id))})]})]}),e.jsxs("div",{children:[e.jsx(de,{children:"Regional Manager"}),e.jsxs(Dt,{value:f,onValueChange:p,children:[e.jsx(Et,{className:"mt-2 w-full text-slate-900",children:e.jsx(Rt,{placeholder:"Select from available users"})}),e.jsx(_t,{className:"max-h-60",children:N.map(D=>e.jsxs(Me,{value:D.id,children:[D.name||D.fullName,D.email?` — ${D.email}`:""]},D.id))})]})]}),e.jsxs("div",{children:[e.jsx(de,{children:"Description"}),e.jsx(Ws,{placeholder:"Describe the region...",className:"mt-2 text-slate-900",rows:2,value:i,onChange:D=>o(D.target.value)})]}),e.jsxs("div",{children:[e.jsx(de,{children:"States Covered"}),!d&&e.jsx("p",{className:"text-xs text-re-red mt-1",children:"Select a zone first to see available states"}),e.jsx("div",{className:"mt-2 border rounded-lg p-3 max-h-40 overflow-y-auto bg-slate-50",children:_.length===0?e.jsx("p",{className:"text-xs text-slate-400 italic",children:d?"No states with available districts in this zone":"Select a zone to load states"}):e.jsx("div",{className:"space-y-2",children:_.map(D=>e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Ln,{id:`region-state-${D.id}`,checked:C.includes(D.id),disabled:!d,onCheckedChange:P=>O(D.id,!!P)}),e.jsx("label",{htmlFor:`region-state-${D.id}`,className:`text-sm cursor-pointer ${d?"text-slate-900":"text-slate-400"}`,children:D.name})]},D.id))})}),e.jsxs("p",{className:"text-xs text-slate-500 mt-1",children:[C.length," ",C.length===1?"state":"states"," selected"]})]}),e.jsxs("div",{children:[e.jsx(de,{children:"Districts Covered"}),e.jsx("div",{className:"mt-2 border rounded-lg p-3 max-h-56 overflow-y-auto bg-slate-50",children:C.length===0?e.jsx("p",{className:"text-xs text-slate-400 italic",children:"Select one or more states above to see districts"}):E.length===0?e.jsx("p",{className:"text-xs text-slate-400 italic",children:"No available districts in the selected states for this zone"}):e.jsx(gp,{children:E.map(({stateName:D,districts:P})=>e.jsxs("div",{className:"mb-4 last:mb-0",children:[e.jsx("h4",{className:"text-xs font-semibold text-re-red-hover uppercase tracking-wide mb-2 pb-1 border-b border-slate-200",children:D}),e.jsx("div",{className:"space-y-2 ml-1",children:P.map(L=>{const $=R[L.id],Y=L.zoneId&&L.zoneId!==d&&L.regionId!==n,Z=!!($||Y),W=$?`Already assigned to region: ${$}`:Y?"Belongs to a different zone":"";return e.jsx("div",{className:"flex items-center space-x-2",children:e.jsxs(dj,{children:[e.jsx(uj,{asChild:!0,children:e.jsxs("div",{className:"flex items-center space-x-2 w-full",children:[e.jsx(Ln,{id:`region-district-${L.id}`,disabled:Z,checked:h.includes(L.id),onCheckedChange:U=>{x(U?[...h,L.id]:h.filter(M=>M!==L.id))}}),e.jsxs("label",{htmlFor:`region-district-${L.id}`,className:`text-sm flex-1 ${Z?"text-slate-400 cursor-not-allowed line-through":"text-slate-900 cursor-pointer"}`,children:[L.name,$&&e.jsxs("span",{className:"ml-2 text-xs text-red-400 font-normal no-underline",style:{textDecoration:"none"},children:["(in ",$,")"]})]})]})}),Z&&W&&e.jsx(hj,{children:e.jsx("p",{className:"text-xs",children:W})})]})},L.id)})})]},D))})}),e.jsxs("p",{className:"text-xs text-slate-500 mt-1",children:[h.length," ",h.length===1?"district":"districts"," selected"]})]}),e.jsxs("div",{className:"flex gap-3 pt-4",children:[e.jsx(se,{variant:"outline",className:"flex-1",onClick:()=>s(!1),children:"Cancel"}),e.jsx(se,{className:"flex-1 bg-re-red hover:bg-re-red-hover",onClick:u,children:"Save Regional Office"})]})]})]})})};var yp="Switch",[WH]=ga(yp),[GH,KH]=WH(yp),P_=g.forwardRef((t,s)=>{const{__scopeSwitch:n,name:r,checked:a,defaultChecked:i,required:o,disabled:d,value:m="on",onCheckedChange:f,form:p,...h}=t,[x,u]=g.useState(null),N=Gs(s,C=>u(C)),v=g.useRef(!1),w=x?p||!!x.closest("form"):!0,[j,b]=Bi({prop:a,defaultProp:i??!1,onChange:f,caller:yp});return e.jsxs(GH,{scope:n,checked:j,disabled:d,children:[e.jsx(js.button,{type:"button",role:"switch","aria-checked":j,"aria-required":o,"data-state":M_(j),"data-disabled":d?"":void 0,disabled:d,value:m,...h,ref:N,onClick:Kt(t.onClick,C=>{b(S=>!S),w&&(v.current=C.isPropagationStopped(),v.current||C.stopPropagation())})}),w&&e.jsx(I_,{control:x,bubbles:!v.current,name:r,value:m,checked:j,required:o,disabled:d,form:p,style:{transform:"translateX(-100%)"}})]})});P_.displayName=yp;var O_="SwitchThumb",L_=g.forwardRef((t,s)=>{const{__scopeSwitch:n,...r}=t,a=KH(O_,n);return e.jsx(js.span,{"data-state":M_(a.checked),"data-disabled":a.disabled?"":void 0,...r,ref:s})});L_.displayName=O_;var YH="SwitchBubbleInput",I_=g.forwardRef(({__scopeSwitch:t,control:s,checked:n,bubbles:r=!0,...a},i)=>{const o=g.useRef(null),d=Gs(o,i),m=Zy(n),f=Qy(s);return g.useEffect(()=>{const p=o.current;if(!p)return;const h=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(h,"checked").set;if(m!==n&&u){const N=new Event("click",{bubbles:r});u.call(p,n),p.dispatchEvent(N)}},[m,n,r]),e.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...a,tabIndex:-1,ref:d,style:{...a.style,...f,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});I_.displayName=YH;function M_(t){return t?"checked":"unchecked"}var ZH=P_,QH=L_;function bp({className:t,...s}){return e.jsx(ZH,{"data-slot":"switch",className:Nt("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-switch-background focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",t),...s,children:e.jsx(QH,{"data-slot":"switch-thumb",className:Nt("bg-card dark:data-[state=unchecked]:bg-card-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0")})})}var Jg,zS;function XH(){if(zS)return Jg;zS=1;function t(){this.__data__=[],this.size=0}return Jg=t,Jg}var e0,US;function F_(){if(US)return e0;US=1;function t(s,n){return s===n||s!==s&&n!==n}return e0=t,e0}var t0,VS;function jp(){if(VS)return t0;VS=1;var t=F_();function s(n,r){for(var a=n.length;a--;)if(t(n[a][0],r))return a;return-1}return t0=s,t0}var s0,HS;function JH(){if(HS)return s0;HS=1;var t=jp(),s=Array.prototype,n=s.splice;function r(a){var i=this.__data__,o=t(i,a);if(o<0)return!1;var d=i.length-1;return o==d?i.pop():n.call(i,o,1),--this.size,!0}return s0=r,s0}var n0,WS;function eW(){if(WS)return n0;WS=1;var t=jp();function s(n){var r=this.__data__,a=t(r,n);return a<0?void 0:r[a][1]}return n0=s,n0}var r0,GS;function tW(){if(GS)return r0;GS=1;var t=jp();function s(n){return t(this.__data__,n)>-1}return r0=s,r0}var a0,KS;function sW(){if(KS)return a0;KS=1;var t=jp();function s(n,r){var a=this.__data__,i=t(a,n);return i<0?(++this.size,a.push([n,r])):a[i][1]=r,this}return a0=s,a0}var i0,YS;function Np(){if(YS)return i0;YS=1;var t=XH(),s=JH(),n=eW(),r=tW(),a=sW();function i(o){var d=-1,m=o==null?0:o.length;for(this.clear();++du))return!1;var v=h.get(o),w=h.get(d);if(v&&w)return v==d&&w==o;var j=-1,b=!0,C=m&a?new t:void 0;for(h.set(o,d),h.set(d,o);++j-1&&r%1==0&&r-1&&n%1==0&&n<=t}return uv=s,uv}var hv,s2;function WW(){if(s2)return hv;s2=1;var t=wp(),s=W_(),n=Ap(),r="[object Arguments]",a="[object Array]",i="[object Boolean]",o="[object Date]",d="[object Error]",m="[object Function]",f="[object Map]",p="[object Number]",h="[object Object]",x="[object RegExp]",u="[object Set]",N="[object String]",v="[object WeakMap]",w="[object ArrayBuffer]",j="[object DataView]",b="[object Float32Array]",C="[object Float64Array]",S="[object Int8Array]",R="[object Int16Array]",_="[object Int32Array]",A="[object Uint8Array]",E="[object Uint8ClampedArray]",q="[object Uint16Array]",O="[object Uint32Array]",D={};D[b]=D[C]=D[S]=D[R]=D[_]=D[A]=D[E]=D[q]=D[O]=!0,D[r]=D[a]=D[w]=D[i]=D[j]=D[o]=D[d]=D[m]=D[f]=D[p]=D[h]=D[x]=D[u]=D[N]=D[v]=!1;function P(L){return n(L)&&s(L.length)&&!!D[t(L)]}return hv=P,hv}var mv,n2;function GW(){if(n2)return mv;n2=1;function t(s){return function(n){return s(n)}}return mv=t,mv}var gu={exports:{}};gu.exports;var r2;function KW(){return r2||(r2=1,(function(t,s){var n=B_(),r=s&&!s.nodeType&&s,a=r&&!0&&t&&!t.nodeType&&t,i=a&&a.exports===r,o=i&&n.process,d=(function(){try{var m=a&&a.require&&a.require("util").types;return m||o&&o.binding&&o.binding("util")}catch{}})();t.exports=d})(gu,gu.exports)),gu.exports}var fv,a2;function G_(){if(a2)return fv;a2=1;var t=WW(),s=GW(),n=KW(),r=n&&n.isTypedArray,a=r?s(r):t;return fv=a,fv}var pv,i2;function YW(){if(i2)return pv;i2=1;var t=qW(),s=UW(),n=xj(),r=H_(),a=HW(),i=G_(),o=Object.prototype,d=o.hasOwnProperty;function m(f,p){var h=n(f),x=!h&&s(f),u=!h&&!x&&r(f),N=!h&&!x&&!u&&i(f),v=h||x||u||N,w=v?t(f.length,String):[],j=w.length;for(var b in f)(p||d.call(f,b))&&!(v&&(b=="length"||u&&(b=="offset"||b=="parent")||N&&(b=="buffer"||b=="byteLength"||b=="byteOffset")||a(b,j)))&&w.push(b);return w}return pv=m,pv}var xv,l2;function ZW(){if(l2)return xv;l2=1;var t=Object.prototype;function s(n){var r=n&&n.constructor,a=typeof r=="function"&&r.prototype||t;return n===a}return xv=s,xv}var gv,o2;function QW(){if(o2)return gv;o2=1;function t(s,n){return function(r){return s(n(r))}}return gv=t,gv}var vv,c2;function XW(){if(c2)return vv;c2=1;var t=QW(),s=t(Object.keys,Object);return vv=s,vv}var yv,d2;function JW(){if(d2)return yv;d2=1;var t=ZW(),s=XW(),n=Object.prototype,r=n.hasOwnProperty;function a(i){if(!t(i))return s(i);var o=[];for(var d in Object(i))r.call(i,d)&&d!="constructor"&&o.push(d);return o}return yv=a,yv}var bv,u2;function eG(){if(u2)return bv;u2=1;var t=q_(),s=W_();function n(r){return r!=null&&s(r.length)&&!t(r)}return bv=n,bv}var jv,h2;function tG(){if(h2)return jv;h2=1;var t=YW(),s=JW(),n=eG();function r(a){return n(a)?t(a):s(a)}return jv=r,jv}var Nv,m2;function sG(){if(m2)return Nv;m2=1;var t=MW(),s=$W(),n=tG();function r(a){return t(a,n,s)}return Nv=r,Nv}var wv,f2;function nG(){if(f2)return wv;f2=1;var t=sG(),s=1,n=Object.prototype,r=n.hasOwnProperty;function a(i,o,d,m,f,p){var h=d&s,x=t(i),u=x.length,N=t(o),v=N.length;if(u!=v&&!h)return!1;for(var w=u;w--;){var j=x[w];if(!(h?j in o:r.call(o,j)))return!1}var b=p.get(i),C=p.get(o);if(b&&C)return b==o&&C==i;var S=!0;p.set(i,o),p.set(o,i);for(var R=h;++w1)return w.map(function(S){return v(S)});var b=w[0];if(typeof b.blotName!="string"&&typeof b.attrName!="string")throw new o("Invalid definition");if(b.blotName==="abstract")throw new o("Cannot register abstract class");if(p[b.blotName||b.attrName]=b,typeof b.keyName=="string")d[b.keyName]=b;else if(b.className!=null&&(m[b.className]=b),b.tagName!=null){Array.isArray(b.tagName)?b.tagName=b.tagName.map(function(S){return S.toUpperCase()}):b.tagName=b.tagName.toUpperCase();var C=Array.isArray(b.tagName)?b.tagName:[b.tagName];C.forEach(function(S){(f[S]==null||b.className==null)&&(f[S]=b)})}return b}r.register=v}),(function(n,r,a){var i=a(51),o=a(11),d=a(3),m=a(20),f="\0",p=function(h){Array.isArray(h)?this.ops=h:h!=null&&Array.isArray(h.ops)?this.ops=h.ops:this.ops=[]};p.prototype.insert=function(h,x){var u={};return h.length===0?this:(u.insert=h,x!=null&&typeof x=="object"&&Object.keys(x).length>0&&(u.attributes=x),this.push(u))},p.prototype.delete=function(h){return h<=0?this:this.push({delete:h})},p.prototype.retain=function(h,x){if(h<=0)return this;var u={retain:h};return x!=null&&typeof x=="object"&&Object.keys(x).length>0&&(u.attributes=x),this.push(u)},p.prototype.push=function(h){var x=this.ops.length,u=this.ops[x-1];if(h=d(!0,{},h),typeof u=="object"){if(typeof h.delete=="number"&&typeof u.delete=="number")return this.ops[x-1]={delete:u.delete+h.delete},this;if(typeof u.delete=="number"&&h.insert!=null&&(x-=1,u=this.ops[x-1],typeof u!="object"))return this.ops.unshift(h),this;if(o(h.attributes,u.attributes)){if(typeof h.insert=="string"&&typeof u.insert=="string")return this.ops[x-1]={insert:u.insert+h.insert},typeof h.attributes=="object"&&(this.ops[x-1].attributes=h.attributes),this;if(typeof h.retain=="number"&&typeof u.retain=="number")return this.ops[x-1]={retain:u.retain+h.retain},typeof h.attributes=="object"&&(this.ops[x-1].attributes=h.attributes),this}}return x===this.ops.length?this.ops.push(h):this.ops.splice(x,0,h),this},p.prototype.chop=function(){var h=this.ops[this.ops.length-1];return h&&h.retain&&!h.attributes&&this.ops.pop(),this},p.prototype.filter=function(h){return this.ops.filter(h)},p.prototype.forEach=function(h){this.ops.forEach(h)},p.prototype.map=function(h){return this.ops.map(h)},p.prototype.partition=function(h){var x=[],u=[];return this.forEach(function(N){var v=h(N)?x:u;v.push(N)}),[x,u]},p.prototype.reduce=function(h,x){return this.ops.reduce(h,x)},p.prototype.changeLength=function(){return this.reduce(function(h,x){return x.insert?h+m.length(x):x.delete?h-x.delete:h},0)},p.prototype.length=function(){return this.reduce(function(h,x){return h+m.length(x)},0)},p.prototype.slice=function(h,x){h=h||0,typeof x!="number"&&(x=1/0);for(var u=[],N=m.iterator(this.ops),v=0;v0&&u.next(v.retain-w)}for(var j=new p(N);x.hasNext()||u.hasNext();)if(u.peekType()==="insert")j.push(u.next());else if(x.peekType()==="delete")j.push(x.next());else{var b=Math.min(x.peekLength(),u.peekLength()),C=x.next(b),S=u.next(b);if(typeof S.retain=="number"){var R={};typeof C.retain=="number"?R.retain=b:R.insert=C.insert;var _=m.attributes.compose(C.attributes,S.attributes,typeof C.retain=="number");if(_&&(R.attributes=_),j.push(R),!u.hasNext()&&o(j.ops[j.ops.length-1],R)){var A=new p(x.rest());return j.concat(A).chop()}}else typeof S.delete=="number"&&typeof C.retain=="number"&&j.push(S)}return j.chop()},p.prototype.concat=function(h){var x=new p(this.ops.slice());return h.ops.length>0&&(x.push(h.ops[0]),x.ops=x.ops.concat(h.ops.slice(1))),x},p.prototype.diff=function(h,x){if(this.ops===h.ops)return new p;var u=[this,h].map(function(b){return b.map(function(C){if(C.insert!=null)return typeof C.insert=="string"?C.insert:f;var S=b===h?"on":"with";throw new Error("diff() called "+S+" non-document")}).join("")}),N=new p,v=i(u[0],u[1],x),w=m.iterator(this.ops),j=m.iterator(h.ops);return v.forEach(function(b){for(var C=b[1].length;C>0;){var S=0;switch(b[0]){case i.INSERT:S=Math.min(j.peekLength(),C),N.push(j.next(S));break;case i.DELETE:S=Math.min(C,w.peekLength()),w.next(S),N.delete(S);break;case i.EQUAL:S=Math.min(w.peekLength(),j.peekLength(),C);var R=w.next(S),_=j.next(S);o(R.insert,_.insert)?N.retain(S,m.attributes.diff(R.attributes,_.attributes)):N.push(_).delete(S);break}C-=S}}),N.chop()},p.prototype.eachLine=function(h,x){x=x||` -`;for(var u=m.iterator(this.ops),N=new p,v=0;u.hasNext();){if(u.peekType()!=="insert")return;var w=u.peek(),j=m.length(w)-u.peekLength(),b=typeof w.insert=="string"?w.insert.indexOf(x,j)-j:-1;if(b<0)N.push(u.next());else if(b>0)N.push(u.next(b));else{if(h(N,u.next(1).attributes||{},v)===!1)return;v+=1,N=new p}}N.length()>0&&h(N,{},v)},p.prototype.transform=function(h,x){if(x=!!x,typeof h=="number")return this.transformPosition(h,x);for(var u=m.iterator(this.ops),N=m.iterator(h.ops),v=new p;u.hasNext()||N.hasNext();)if(u.peekType()==="insert"&&(x||N.peekType()!=="insert"))v.retain(m.length(u.next()));else if(N.peekType()==="insert")v.push(N.next());else{var w=Math.min(u.peekLength(),N.peekLength()),j=u.next(w),b=N.next(w);if(j.delete)continue;b.delete?v.push(b):v.retain(w,m.attributes.transform(j.attributes,b.attributes,x))}return v.chop()},p.prototype.transformPosition=function(h,x){x=!!x;for(var u=m.iterator(this.ops),N=0;u.hasNext()&&N<=h;){var v=u.peekLength(),w=u.peekType();if(u.next(),w==="delete"){h-=Math.min(v,h-N);continue}else w==="insert"&&(N"u"||a.call(u,w)},p=function(u,N){o&&N.name==="__proto__"?o(u,N.name,{enumerable:!0,configurable:!0,value:N.newValue,writable:!0}):u[N.name]=N.newValue},h=function(u,N){if(N==="__proto__")if(a.call(u,N)){if(d)return d(u,N).value}else return;return u[N]};n.exports=function x(){var u,N,v,w,j,b,C=arguments[0],S=1,R=arguments.length,_=!1;for(typeof C=="boolean"&&(_=C,C=arguments[1]||{},S=2),(C==null||typeof C!="object"&&typeof C!="function")&&(C={});S0&&($1&&arguments[1]!==void 0?arguments[1]:!1;if(Y&&($===0||$>=this.length()-A)){var Z=this.clone();return $===0?(this.parent.insertBefore(Z,this),this):(this.parent.insertBefore(Z,this.next),Z)}else{var W=o(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"split",this).call(this,$,Y);return this.cache={},W}}}]),P})(x.default.Block);q.blotName="block",q.tagName="P",q.defaultChild="break",q.allowedChildren=[w.default,x.default.Embed,b.default];function O(D){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return D==null||(typeof D.formats=="function"&&(P=(0,m.default)(P,D.formats())),D.parent==null||D.parent.blotName=="scroll"||D.parent.statics.scope!==D.statics.scope)?P:O(D.parent,P)}r.bubbleFormats=O,r.BlockEmbed=E,r.default=q}),(function(n,r,a){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.overload=r.expandConfig=void 0;var i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(M){return typeof M}:function(M){return M&&typeof Symbol=="function"&&M.constructor===Symbol&&M!==Symbol.prototype?"symbol":typeof M},o=(function(){function M(z,T){var I=[],B=!0,G=!1,K=void 0;try{for(var H=z[Symbol.iterator](),X;!(B=(X=H.next()).done)&&(I.push(X.value),!(T&&I.length===T));B=!0);}catch(J){G=!0,K=J}finally{try{!B&&H.return&&H.return()}finally{if(G)throw K}}return I}return function(z,T){if(Array.isArray(z))return z;if(Symbol.iterator in Object(z))return M(z,T);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),d=(function(){function M(z,T){for(var I=0;I2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof T!="string"){var K=T.attrName||T.blotName;typeof K=="string"?this.register("formats/"+K,T,I):Object.keys(T).forEach(function(H){B.register(H,T[H],I)})}else this.imports[T]!=null&&!G&&L.warn("Overwriting "+T+" with",I),this.imports[T]=I,(T.startsWith("blots/")||T.startsWith("formats/"))&&I.blotName!=="abstract"?j.default.register(I):T.startsWith("modules")&&typeof I.register=="function"&&I.register()}}]);function M(z){var T=this,I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(P(this,M),this.options=Y(z,I),this.container=this.options.container,this.container==null)return L.error("Invalid Quill container",z);this.options.debug&&M.debug(this.options.debug);var B=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new u.default,this.scroll=j.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new h.default(this.scroll),this.selection=new C.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(u.default.events.EDITOR_CHANGE,function(K){K===u.default.events.TEXT_CHANGE&&T.root.classList.toggle("ql-blank",T.editor.isBlank())}),this.emitter.on(u.default.events.SCROLL_UPDATE,function(K,H){var X=T.selection.lastRange,J=X&&X.length===0?X.index:void 0;Z.call(T,function(){return T.editor.update(null,H,J)},K)});var G=this.clipboard.convert(`
`+B+"


");this.setContents(G),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return d(M,[{key:"addContainer",value:function(T){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof T=="string"){var B=T;T=document.createElement("div"),T.classList.add(B)}return this.container.insertBefore(T,I),T}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(T,I,B){var G=this,K=W(T,I,B),H=o(K,4);return T=H[0],I=H[1],B=H[3],Z.call(this,function(){return G.editor.deleteText(T,I)},B,T,-1*I)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(T),this.container.classList.toggle("ql-disabled",!T)}},{key:"focus",value:function(){var T=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=T,this.scrollIntoView()}},{key:"format",value:function(T,I){var B=this,G=arguments.length>2&&arguments[2]!==void 0?arguments[2]:u.default.sources.API;return Z.call(this,function(){var K=B.getSelection(!0),H=new f.default;if(K==null)return H;if(j.default.query(T,j.default.Scope.BLOCK))H=B.editor.formatLine(K.index,K.length,D({},T,I));else{if(K.length===0)return B.selection.format(T,I),H;H=B.editor.formatText(K.index,K.length,D({},T,I))}return B.setSelection(K,u.default.sources.SILENT),H},G)}},{key:"formatLine",value:function(T,I,B,G,K){var H=this,X=void 0,J=W(T,I,B,G,K),ae=o(J,4);return T=ae[0],I=ae[1],X=ae[2],K=ae[3],Z.call(this,function(){return H.editor.formatLine(T,I,X)},K,T,0)}},{key:"formatText",value:function(T,I,B,G,K){var H=this,X=void 0,J=W(T,I,B,G,K),ae=o(J,4);return T=ae[0],I=ae[1],X=ae[2],K=ae[3],Z.call(this,function(){return H.editor.formatText(T,I,X)},K,T,0)}},{key:"getBounds",value:function(T){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,B=void 0;typeof T=="number"?B=this.selection.getBounds(T,I):B=this.selection.getBounds(T.index,T.length);var G=this.container.getBoundingClientRect();return{bottom:B.bottom-G.top,height:B.height,left:B.left-G.left,right:B.right-G.left,top:B.top-G.top,width:B.width}}},{key:"getContents",value:function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-T,B=W(T,I),G=o(B,2);return T=G[0],I=G[1],this.editor.getContents(T,I)}},{key:"getFormat",value:function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof T=="number"?this.editor.getFormat(T,I):this.editor.getFormat(T.index,T.length)}},{key:"getIndex",value:function(T){return T.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(T){return this.scroll.leaf(T)}},{key:"getLine",value:function(T){return this.scroll.line(T)}},{key:"getLines",value:function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof T!="number"?this.scroll.lines(T.index,T.length):this.scroll.lines(T,I)}},{key:"getModule",value:function(T){return this.theme.modules[T]}},{key:"getSelection",value:function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return T&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-T,B=W(T,I),G=o(B,2);return T=G[0],I=G[1],this.editor.getText(T,I)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(T,I,B){var G=this,K=arguments.length>3&&arguments[3]!==void 0?arguments[3]:M.sources.API;return Z.call(this,function(){return G.editor.insertEmbed(T,I,B)},K,T)}},{key:"insertText",value:function(T,I,B,G,K){var H=this,X=void 0,J=W(T,0,B,G,K),ae=o(J,4);return T=ae[0],X=ae[2],K=ae[3],Z.call(this,function(){return H.editor.insertText(T,I,X)},K,T,I.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(T,I,B){this.clipboard.dangerouslyPasteHTML(T,I,B)}},{key:"removeFormat",value:function(T,I,B){var G=this,K=W(T,I,B),H=o(K,4);return T=H[0],I=H[1],B=H[3],Z.call(this,function(){return G.editor.removeFormat(T,I)},B,T)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(T){var I=this,B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u.default.sources.API;return Z.call(this,function(){T=new f.default(T);var G=I.getLength(),K=I.editor.deleteText(0,G),H=I.editor.applyDelta(T),X=H.ops[H.ops.length-1];X!=null&&typeof X.insert=="string"&&X.insert[X.insert.length-1]===` -`&&(I.editor.deleteText(I.getLength()-1,1),H.delete(1));var J=K.compose(H);return J},B)}},{key:"setSelection",value:function(T,I,B){if(T==null)this.selection.setRange(null,I||M.sources.API);else{var G=W(T,I,B),K=o(G,4);T=K[0],I=K[1],B=K[3],this.selection.setRange(new b.Range(T,I),B),B!==u.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(T){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u.default.sources.API,B=new f.default().insert(T);return this.setContents(B,I)}},{key:"update",value:function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:u.default.sources.USER,I=this.scroll.update(T);return this.selection.update(T),I}},{key:"updateContents",value:function(T){var I=this,B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u.default.sources.API;return Z.call(this,function(){return T=new f.default(T),I.editor.applyDelta(T,B)},B,!0)}}]),M})();$.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},$.events=u.default.events,$.sources=u.default.sources,$.version="1.3.7",$.imports={delta:f.default,parchment:j.default,"core/module":v.default,"core/theme":q.default};function Y(M,z){if(z=(0,R.default)(!0,{container:M,modules:{clipboard:!0,keyboard:!0,history:!0}},z),!z.theme||z.theme===$.DEFAULTS.theme)z.theme=q.default;else if(z.theme=$.import("themes/"+z.theme),z.theme==null)throw new Error("Invalid theme "+z.theme+". Did you register it?");var T=(0,R.default)(!0,{},z.theme.DEFAULTS);[T,z].forEach(function(G){G.modules=G.modules||{},Object.keys(G.modules).forEach(function(K){G.modules[K]===!0&&(G.modules[K]={})})});var I=Object.keys(T.modules).concat(Object.keys(z.modules)),B=I.reduce(function(G,K){var H=$.import("modules/"+K);return H==null?L.error("Cannot load "+K+" module. Are you sure you registered it?"):G[K]=H.DEFAULTS||{},G},{});return z.modules!=null&&z.modules.toolbar&&z.modules.toolbar.constructor!==Object&&(z.modules.toolbar={container:z.modules.toolbar}),z=(0,R.default)(!0,{},$.DEFAULTS,{modules:B},T,z),["bounds","container","scrollingContainer"].forEach(function(G){typeof z[G]=="string"&&(z[G]=document.querySelector(z[G]))}),z.modules=Object.keys(z.modules).reduce(function(G,K){return z.modules[K]&&(G[K]=z.modules[K]),G},{}),z}function Z(M,z,T,I){if(this.options.strict&&!this.isEnabled()&&z===u.default.sources.USER)return new f.default;var B=T==null?null:this.getSelection(),G=this.editor.delta,K=M();if(B!=null&&(T===!0&&(T=B.index),I==null?B=U(B,K,z):I!==0&&(B=U(B,T,I,z)),this.setSelection(B,u.default.sources.SILENT)),K.length()>0){var H,X=[u.default.events.TEXT_CHANGE,K,G,z];if((H=this.emitter).emit.apply(H,[u.default.events.EDITOR_CHANGE].concat(X)),z!==u.default.sources.SILENT){var J;(J=this.emitter).emit.apply(J,X)}}return K}function W(M,z,T,I,B){var G={};return typeof M.index=="number"&&typeof M.length=="number"?typeof z!="number"?(B=I,I=T,T=z,z=M.length,M=M.index):(z=M.length,M=M.index):typeof z!="number"&&(B=I,I=T,T=z,z=0),(typeof T>"u"?"undefined":i(T))==="object"?(G=T,B=I):typeof T=="string"&&(I!=null?G[T]=I:B=T),B=B||u.default.sources.API,[M,z,G,B]}function U(M,z,T,I){if(M==null)return null;var B=void 0,G=void 0;if(z instanceof f.default){var K=[M.index,M.index+M.length].map(function(ae){return z.transformPosition(ae,I!==u.default.sources.USER)}),H=o(K,2);B=H[0],G=H[1]}else{var X=[M.index,M.index+M.length].map(function(ae){return ae=0?ae+T:Math.max(z,ae+T)}),J=o(X,2);B=J[0],G=J[1]}return new b.Range(B,G-B)}r.expandConfig=Y,r.overload=W,r.default=$}),(function(n,r,a){Object.defineProperty(r,"__esModule",{value:!0});var i=(function(){function w(j,b){for(var C=0;C0){var S=this.parent.isolate(this.offset(),this.length());this.moveChildren(S),S.wrap(this)}}}],[{key:"compare",value:function(C,S){var R=j.order.indexOf(C),_=j.order.indexOf(S);return R>=0||_>=0?R-_:C===S?0:C1?_-1:0),E=1;E<_;E++)A[E-1]=arguments[E];(this.listeners[R.type]||[]).forEach(function(q){var O=q.node,D=q.handler;(R.target===O||O.contains(R.target))&&D.apply(void 0,[R].concat(A))})}},{key:"listenDOM",value:function(R,_,A){this.listeners[R]||(this.listeners[R]=[]),this.listeners[R].push({node:_,handler:A})}}]),C})(m.default);j.events={EDITOR_CHANGE:"editor-change",SCROLL_BEFORE_UPDATE:"scroll-before-update",SCROLL_OPTIMIZE:"scroll-optimize",SCROLL_UPDATE:"scroll-update",SELECTION_CHANGE:"selection-change",TEXT_CHANGE:"text-change"},j.sources={API:"api",SILENT:"silent",USER:"user"},r.default=j}),(function(n,r,a){Object.defineProperty(r,"__esModule",{value:!0});function i(d,m){if(!(d instanceof m))throw new TypeError("Cannot call a class as a function")}var o=function d(m){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};i(this,d),this.quill=m,this.options=f};o.DEFAULTS={},r.default=o}),(function(n,r,a){Object.defineProperty(r,"__esModule",{value:!0});var i=["error","warn","log","info"],o="warn";function d(f){if(i.indexOf(f)<=i.indexOf(o)){for(var p,h=arguments.length,x=Array(h>1?h-1:0),u=1;u0&&typeof x[0]!="number")}function h(x,u,N){var v,w;if(f(x)||f(u)||x.prototype!==u.prototype)return!1;if(d(x))return d(u)?(x=i.call(x),u=i.call(u),m(x,u,N)):!1;if(p(x)){if(!p(u)||x.length!==u.length)return!1;for(v=0;v=0;v--)if(j[v]!=b[v])return!1;for(v=j.length-1;v>=0;v--)if(w=j[v],!m(x[w],u[w],N))return!1;return typeof x==typeof u}}),(function(n,r,a){Object.defineProperty(r,"__esModule",{value:!0});var i=a(1),o=(function(){function d(m,f,p){p===void 0&&(p={}),this.attrName=m,this.keyName=f;var h=i.Scope.TYPE&i.Scope.ATTRIBUTE;p.scope!=null?this.scope=p.scope&i.Scope.LEVEL|h:this.scope=i.Scope.ATTRIBUTE,p.whitelist!=null&&(this.whitelist=p.whitelist)}return d.keys=function(m){return[].map.call(m.attributes,function(f){return f.name})},d.prototype.add=function(m,f){return this.canAdd(m,f)?(m.setAttribute(this.keyName,f),!0):!1},d.prototype.canAdd=function(m,f){var p=i.query(m,i.Scope.BLOT&(this.scope|i.Scope.TYPE));return p==null?!1:this.whitelist==null?!0:typeof f=="string"?this.whitelist.indexOf(f.replace(/["']/g,""))>-1:this.whitelist.indexOf(f)>-1},d.prototype.remove=function(m){m.removeAttribute(this.keyName)},d.prototype.value=function(m){var f=m.getAttribute(this.keyName);return this.canAdd(m,f)&&f?f:""},d})();r.default=o}),(function(n,r,a){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.Code=void 0;var i=(function(){function E(q,O){var D=[],P=!0,L=!1,$=void 0;try{for(var Y=q[Symbol.iterator](),Z;!(P=(Z=Y.next()).done)&&(D.push(Z.value),!(O&&D.length===O));P=!0);}catch(W){L=!0,$=W}finally{try{!P&&Y.return&&Y.return()}finally{if(L)throw $}}return D}return function(q,O){if(Array.isArray(q))return q;if(Symbol.iterator in Object(q))return E(q,O);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),o=(function(){function E(q,O){for(var D=0;D=D+P)){var Z=this.newlineIndex(D,!0)+1,W=Y-Z+1,U=this.isolate(Z,W),M=U.next;U.format(L,$),M instanceof q&&M.formatAt(0,D-Z+P-W,L,$)}}}},{key:"insertAt",value:function(D,P,L){if(L==null){var $=this.descendant(j.default,D),Y=i($,2),Z=Y[0],W=Y[1];Z.insertAt(W,P)}}},{key:"length",value:function(){var D=this.domNode.textContent.length;return this.domNode.textContent.endsWith(` -`)?D:D+1}},{key:"newlineIndex",value:function(D){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(P)return this.domNode.textContent.slice(0,D).lastIndexOf(` -`);var L=this.domNode.textContent.slice(D).indexOf(` -`);return L>-1?D+L:-1}},{key:"optimize",value:function(D){this.domNode.textContent.endsWith(` -`)||this.appendChild(h.default.create("text",` -`)),d(q.prototype.__proto__||Object.getPrototypeOf(q.prototype),"optimize",this).call(this,D);var P=this.next;P!=null&&P.prev===this&&P.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===P.statics.formats(P.domNode)&&(P.optimize(D),P.moveChildren(this),P.remove())}},{key:"replace",value:function(D){d(q.prototype.__proto__||Object.getPrototypeOf(q.prototype),"replace",this).call(this,D),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(P){var L=h.default.find(P);L==null?P.parentNode.removeChild(P):L instanceof h.default.Embed?L.remove():L.unwrap()})}}],[{key:"create",value:function(D){var P=d(q.__proto__||Object.getPrototypeOf(q),"create",this).call(this,D);return P.setAttribute("spellcheck",!1),P}},{key:"formats",value:function(){return!0}}]),q})(u.default);A.blotName="code-block",A.tagName="PRE",A.TAB=" ",r.Code=_,r.default=A}),(function(n,r,a){Object.defineProperty(r,"__esModule",{value:!0});var i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(M){return typeof M}:function(M){return M&&typeof Symbol=="function"&&M.constructor===Symbol&&M!==Symbol.prototype?"symbol":typeof M},o=(function(){function M(z,T){var I=[],B=!0,G=!1,K=void 0;try{for(var H=z[Symbol.iterator](),X;!(B=(X=H.next()).done)&&(I.push(X.value),!(T&&I.length===T));B=!0);}catch(J){G=!0,K=J}finally{try{!B&&H.return&&H.return()}finally{if(G)throw K}}return I}return function(z,T){if(Array.isArray(z))return z;if(Symbol.iterator in Object(z))return M(z,T);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),d=(function(){function M(z,T){for(var I=0;I=G&&!ae.endsWith(` -`)&&(B=!0),I.scroll.insertAt(K,ae);var le=I.scroll.line(K),xe=o(le,2),ce=xe[0],ve=xe[1],Pe=(0,D.default)({},(0,b.bubbleFormats)(ce));if(ce instanceof C.default){var et=ce.descendant(u.default.Leaf,ve),kt=o(et,1),vt=kt[0];Pe=(0,D.default)(Pe,(0,b.bubbleFormats)(vt))}J=h.default.attributes.diff(Pe,J)||{}}else if(i(H.insert)==="object"){var ee=Object.keys(H.insert)[0];if(ee==null)return K;I.scroll.insertAt(K,ee,H.insert[ee])}G+=X}return Object.keys(J).forEach(function(ge){I.scroll.formatAt(K,X,ge,J[ge])}),K+X},0),T.reduce(function(K,H){return typeof H.delete=="number"?(I.scroll.deleteAt(K,H.delete),K):K+(H.retain||H.insert.length||1)},0),this.scroll.batchEnd(),this.update(T)}},{key:"deleteText",value:function(T,I){return this.scroll.deleteAt(T,I),this.update(new f.default().retain(T).delete(I))}},{key:"formatLine",value:function(T,I){var B=this,G=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys(G).forEach(function(K){if(!(B.scroll.whitelist!=null&&!B.scroll.whitelist[K])){var H=B.scroll.lines(T,Math.max(I,1)),X=I;H.forEach(function(J){var ae=J.length();if(!(J instanceof v.default))J.format(K,G[K]);else{var le=T-J.offset(B.scroll),xe=J.newlineIndex(le+X)-le+1;J.formatAt(le,xe,K,G[K])}X-=ae})}}),this.scroll.optimize(),this.update(new f.default().retain(T).retain(I,(0,A.default)(G)))}},{key:"formatText",value:function(T,I){var B=this,G=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys(G).forEach(function(K){B.scroll.formatAt(T,I,K,G[K])}),this.update(new f.default().retain(T).retain(I,(0,A.default)(G)))}},{key:"getContents",value:function(T,I){return this.delta.slice(T,T+I)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(T,I){return T.concat(I.delta())},new f.default)}},{key:"getFormat",value:function(T){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,B=[],G=[];I===0?this.scroll.path(T).forEach(function(H){var X=o(H,1),J=X[0];J instanceof C.default?B.push(J):J instanceof u.default.Leaf&&G.push(J)}):(B=this.scroll.lines(T,I),G=this.scroll.descendants(u.default.Leaf,T,I));var K=[B,G].map(function(H){if(H.length===0)return{};for(var X=(0,b.bubbleFormats)(H.shift());Object.keys(X).length>0;){var J=H.shift();if(J==null)return X;X=W((0,b.bubbleFormats)(J),X)}return X});return D.default.apply(D.default,K)}},{key:"getText",value:function(T,I){return this.getContents(T,I).filter(function(B){return typeof B.insert=="string"}).map(function(B){return B.insert}).join("")}},{key:"insertEmbed",value:function(T,I,B){return this.scroll.insertAt(T,I,B),this.update(new f.default().retain(T).insert(L({},I,B)))}},{key:"insertText",value:function(T,I){var B=this,G=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return I=I.replace(/\r\n/g,` -`).replace(/\r/g,` -`),this.scroll.insertAt(T,I),Object.keys(G).forEach(function(K){B.scroll.formatAt(T,I.length,K,G[K])}),this.update(new f.default().retain(T).insert(I,(0,A.default)(G)))}},{key:"isBlank",value:function(){if(this.scroll.children.length==0)return!0;if(this.scroll.children.length>1)return!1;var T=this.scroll.children.head;return T.statics.blotName!==C.default.blotName||T.children.length>1?!1:T.children.head instanceof R.default}},{key:"removeFormat",value:function(T,I){var B=this.getText(T,I),G=this.scroll.line(T+I),K=o(G,2),H=K[0],X=K[1],J=0,ae=new f.default;H!=null&&(H instanceof v.default?J=H.newlineIndex(X)-X+1:J=H.length()-X,ae=H.delta().slice(X,X+J-1).insert(` -`));var le=this.getContents(T,I+J),xe=le.diff(new f.default().insert(B).concat(ae)),ce=new f.default().retain(T).concat(xe);return this.applyDelta(ce)}},{key:"update",value:function(T){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,G=this.delta;if(I.length===1&&I[0].type==="characterData"&&I[0].target.data.match(Y)&&u.default.find(I[0].target)){var K=u.default.find(I[0].target),H=(0,b.bubbleFormats)(K),X=K.offset(this.scroll),J=I[0].oldValue.replace(j.default.CONTENTS,""),ae=new f.default().insert(J),le=new f.default().insert(K.value()),xe=new f.default().retain(X).concat(ae.diff(le,B));T=xe.reduce(function(ce,ve){return ve.insert?ce.insert(ve.insert,H):ce.push(ve)},new f.default),this.delta=G.compose(T)}else this.delta=this.getDelta(),(!T||!(0,q.default)(G.compose(T),this.delta))&&(T=G.diff(this.delta,B));return T}}]),M})();function W(M,z){return Object.keys(z).reduce(function(T,I){return M[I]==null||(z[I]===M[I]?T[I]=z[I]:Array.isArray(z[I])?z[I].indexOf(M[I])<0&&(T[I]=z[I].concat([M[I]])):T[I]=[z[I],M[I]]),T},{})}function U(M){return M.reduce(function(z,T){if(T.insert===1){var I=(0,A.default)(T.attributes);return delete I.image,z.insert({image:T.attributes.image},I)}if(T.attributes!=null&&(T.attributes.list===!0||T.attributes.bullet===!0)&&(T=(0,A.default)(T),T.attributes.list?T.attributes.list="ordered":(T.attributes.list="bullet",delete T.attributes.bullet)),typeof T.insert=="string"){var B=T.insert.replace(/\r\n/g,` -`).replace(/\r/g,` -`);return z.insert(B,T.attributes)}return z.push(T)},new f.default)}r.default=Z}),(function(n,r,a){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.Range=void 0;var i=(function(){function E(q,O){var D=[],P=!0,L=!1,$=void 0;try{for(var Y=q[Symbol.iterator](),Z;!(P=(Z=Y.next()).done)&&(D.push(Z.value),!(O&&D.length===O));P=!0);}catch(W){L=!0,$=W}finally{try{!P&&Y.return&&Y.return()}finally{if(L)throw $}}return D}return function(q,O){if(Array.isArray(q))return q;if(Symbol.iterator in Object(q))return E(q,O);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),o=(function(){function E(q,O){for(var D=0;D1&&arguments[1]!==void 0?arguments[1]:0;C(this,E),this.index=q,this.length=O},_=(function(){function E(q,O){var D=this;C(this,E),this.emitter=O,this.scroll=q,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=m.default.create("cursor",this),this.lastRange=this.savedRange=new R(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){D.mouseDown||setTimeout(D.update.bind(D,N.default.sources.USER),1)}),this.emitter.on(N.default.events.EDITOR_CHANGE,function(P,L){P===N.default.events.TEXT_CHANGE&&L.length()>0&&D.update(N.default.sources.SILENT)}),this.emitter.on(N.default.events.SCROLL_BEFORE_UPDATE,function(){if(D.hasFocus()){var P=D.getNativeRange();P!=null&&P.start.node!==D.cursor.textNode&&D.emitter.once(N.default.events.SCROLL_UPDATE,function(){try{D.setNativeRange(P.start.node,P.start.offset,P.end.node,P.end.offset)}catch{}})}}),this.emitter.on(N.default.events.SCROLL_OPTIMIZE,function(P,L){if(L.range){var $=L.range,Y=$.startNode,Z=$.startOffset,W=$.endNode,U=$.endOffset;D.setNativeRange(Y,Z,W,U)}}),this.update(N.default.sources.SILENT)}return o(E,[{key:"handleComposition",value:function(){var O=this;this.root.addEventListener("compositionstart",function(){O.composing=!0}),this.root.addEventListener("compositionend",function(){if(O.composing=!1,O.cursor.parent){var D=O.cursor.restore();if(!D)return;setTimeout(function(){O.setNativeRange(D.startNode,D.startOffset,D.endNode,D.endOffset)},1)}})}},{key:"handleDragging",value:function(){var O=this;this.emitter.listenDOM("mousedown",document.body,function(){O.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){O.mouseDown=!1,O.update(N.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(O,D){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[O])){this.scroll.update();var P=this.getNativeRange();if(!(P==null||!P.native.collapsed||m.default.query(O,m.default.Scope.BLOCK))){if(P.start.node!==this.cursor.textNode){var L=m.default.find(P.start.node,!1);if(L==null)return;if(L instanceof m.default.Leaf){var $=L.split(P.start.offset);L.parent.insertBefore(this.cursor,$)}else L.insertBefore(this.cursor,P.start.node);this.cursor.attach()}this.cursor.format(O,D),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(O){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,P=this.scroll.length();O=Math.min(O,P-1),D=Math.min(O+D,P-1)-O;var L=void 0,$=this.scroll.leaf(O),Y=i($,2),Z=Y[0],W=Y[1];if(Z==null)return null;var U=Z.position(W,!0),M=i(U,2);L=M[0],W=M[1];var z=document.createRange();if(D>0){z.setStart(L,W);var T=this.scroll.leaf(O+D),I=i(T,2);if(Z=I[0],W=I[1],Z==null)return null;var B=Z.position(W,!0),G=i(B,2);return L=G[0],W=G[1],z.setEnd(L,W),z.getBoundingClientRect()}else{var K="left",H=void 0;return L instanceof Text?(W0&&(K="right")),{bottom:H.top+H.height,height:H.height,left:H[K],right:H[K],top:H.top,width:0}}}},{key:"getNativeRange",value:function(){var O=document.getSelection();if(O==null||O.rangeCount<=0)return null;var D=O.getRangeAt(0);if(D==null)return null;var P=this.normalizeNative(D);return S.info("getNativeRange",P),P}},{key:"getRange",value:function(){var O=this.getNativeRange();if(O==null)return[null,null];var D=this.normalizedToRange(O);return[D,O]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(O){var D=this,P=[[O.start.node,O.start.offset]];O.native.collapsed||P.push([O.end.node,O.end.offset]);var L=P.map(function(Z){var W=i(Z,2),U=W[0],M=W[1],z=m.default.find(U,!0),T=z.offset(D.scroll);return M===0?T:z instanceof m.default.Container?T+z.length():T+z.index(U,M)}),$=Math.min(Math.max.apply(Math,b(L)),this.scroll.length()-1),Y=Math.min.apply(Math,[$].concat(b(L)));return new R(Y,$-Y)}},{key:"normalizeNative",value:function(O){if(!A(this.root,O.startContainer)||!O.collapsed&&!A(this.root,O.endContainer))return null;var D={start:{node:O.startContainer,offset:O.startOffset},end:{node:O.endContainer,offset:O.endOffset},native:O};return[D.start,D.end].forEach(function(P){for(var L=P.node,$=P.offset;!(L instanceof Text)&&L.childNodes.length>0;)if(L.childNodes.length>$)L=L.childNodes[$],$=0;else if(L.childNodes.length===$)L=L.lastChild,$=L instanceof Text?L.data.length:L.childNodes.length+1;else break;P.node=L,P.offset=$}),D}},{key:"rangeToNative",value:function(O){var D=this,P=O.collapsed?[O.index]:[O.index,O.index+O.length],L=[],$=this.scroll.length();return P.forEach(function(Y,Z){Y=Math.min($-1,Y);var W=void 0,U=D.scroll.leaf(Y),M=i(U,2),z=M[0],T=M[1],I=z.position(T,Z!==0),B=i(I,2);W=B[0],T=B[1],L.push(W,T)}),L.length<2&&(L=L.concat(L)),L}},{key:"scrollIntoView",value:function(O){var D=this.lastRange;if(D!=null){var P=this.getBounds(D.index,D.length);if(P!=null){var L=this.scroll.length()-1,$=this.scroll.line(Math.min(D.index,L)),Y=i($,1),Z=Y[0],W=Z;if(D.length>0){var U=this.scroll.line(Math.min(D.index+D.length,L)),M=i(U,1);W=M[0]}if(!(Z==null||W==null)){var z=O.getBoundingClientRect();P.topz.bottom&&(O.scrollTop+=P.bottom-z.bottom)}}}}},{key:"setNativeRange",value:function(O,D){var P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:O,L=arguments.length>3&&arguments[3]!==void 0?arguments[3]:D,$=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(S.info("setNativeRange",O,D,P,L),!(O!=null&&(this.root.parentNode==null||O.parentNode==null||P.parentNode==null))){var Y=document.getSelection();if(Y!=null)if(O!=null){this.hasFocus()||this.root.focus();var Z=(this.getNativeRange()||{}).native;if(Z==null||$||O!==Z.startContainer||D!==Z.startOffset||P!==Z.endContainer||L!==Z.endOffset){O.tagName=="BR"&&(D=[].indexOf.call(O.parentNode.childNodes,O),O=O.parentNode),P.tagName=="BR"&&(L=[].indexOf.call(P.parentNode.childNodes,P),P=P.parentNode);var W=document.createRange();W.setStart(O,D),W.setEnd(P,L),Y.removeAllRanges(),Y.addRange(W)}}else Y.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(O){var D=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:N.default.sources.API;if(typeof D=="string"&&(P=D,D=!1),S.info("setRange",O),O!=null){var L=this.rangeToNative(O);this.setNativeRange.apply(this,b(L).concat([D]))}else this.setNativeRange(null);this.update(P)}},{key:"update",value:function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:N.default.sources.USER,D=this.lastRange,P=this.getRange(),L=i(P,2),$=L[0],Y=L[1];if(this.lastRange=$,this.lastRange!=null&&(this.savedRange=this.lastRange),!(0,x.default)(D,this.lastRange)){var Z;!this.composing&&Y!=null&&Y.native.collapsed&&Y.start.node!==this.cursor.textNode&&this.cursor.restore();var W=[N.default.events.SELECTION_CHANGE,(0,p.default)(this.lastRange),(0,p.default)(D),O];if((Z=this.emitter).emit.apply(Z,[N.default.events.EDITOR_CHANGE].concat(W)),O!==N.default.sources.SILENT){var U;(U=this.emitter).emit.apply(U,W)}}}}]),E})();function A(E,q){try{q.parentNode}catch{return!1}return q instanceof Text&&(q=q.parentNode),E.contains(q)}r.Range=R,r.default=_}),(function(n,r,a){Object.defineProperty(r,"__esModule",{value:!0});var i=(function(){function N(v,w){for(var j=0;j0&&(u+=1),[this.parent.domNode,u]},p.prototype.value=function(){var h;return h={},h[this.statics.blotName]=this.statics.value(this.domNode)||!0,h},p.scope=d.Scope.INLINE_BLOT,p})(o.default);r.default=m}),(function(n,r,a){var i=a(11),o=a(3),d={attributes:{compose:function(f,p,h){typeof f!="object"&&(f={}),typeof p!="object"&&(p={});var x=o(!0,{},p);h||(x=Object.keys(x).reduce(function(N,v){return x[v]!=null&&(N[v]=x[v]),N},{}));for(var u in f)f[u]!==void 0&&p[u]===void 0&&(x[u]=f[u]);return Object.keys(x).length>0?x:void 0},diff:function(f,p){typeof f!="object"&&(f={}),typeof p!="object"&&(p={});var h=Object.keys(f).concat(Object.keys(p)).reduce(function(x,u){return i(f[u],p[u])||(x[u]=p[u]===void 0?null:p[u]),x},{});return Object.keys(h).length>0?h:void 0},transform:function(f,p,h){if(typeof f!="object")return p;if(typeof p=="object"){if(!h)return p;var x=Object.keys(p).reduce(function(u,N){return f[N]===void 0&&(u[N]=p[N]),u},{});return Object.keys(x).length>0?x:void 0}}},iterator:function(f){return new m(f)},length:function(f){return typeof f.delete=="number"?f.delete:typeof f.retain=="number"?f.retain:typeof f.insert=="string"?f.insert.length:1}};function m(f){this.ops=f,this.index=0,this.offset=0}m.prototype.hasNext=function(){return this.peekLength()<1/0},m.prototype.next=function(f){f||(f=1/0);var p=this.ops[this.index];if(p){var h=this.offset,x=d.length(p);if(f>=x-h?(f=x-h,this.index+=1,this.offset=0):this.offset+=f,typeof p.delete=="number")return{delete:f};var u={};return p.attributes&&(u.attributes=p.attributes),typeof p.retain=="number"?u.retain=f:typeof p.insert=="string"?u.insert=p.insert.substr(h,f):u.insert=p.insert,u}else return{retain:1/0}},m.prototype.peek=function(){return this.ops[this.index]},m.prototype.peekLength=function(){return this.ops[this.index]?d.length(this.ops[this.index])-this.offset:1/0},m.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},m.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var f=this.offset,p=this.index,h=this.next(),x=this.ops.slice(this.index);return this.offset=f,this.index=p,[h].concat(x)}else return[]},n.exports=d}),(function(n,r){var a=(function(){function i(v,w){return w!=null&&v instanceof w}var o;try{o=Map}catch{o=function(){}}var d;try{d=Set}catch{d=function(){}}var m;try{m=Promise}catch{m=function(){}}function f(v,w,j,b,C){typeof w=="object"&&(j=w.depth,b=w.prototype,C=w.includeNonEnumerable,w=w.circular);var S=[],R=[],_=typeof Buffer<"u";typeof w>"u"&&(w=!0),typeof j>"u"&&(j=1/0);function A(E,q){if(E===null)return null;if(q===0)return E;var O,D;if(typeof E!="object")return E;if(i(E,o))O=new o;else if(i(E,d))O=new d;else if(i(E,m))O=new m(function(z,T){E.then(function(I){z(A(I,q-1))},function(I){T(A(I,q-1))})});else if(f.__isArray(E))O=[];else if(f.__isRegExp(E))O=new RegExp(E.source,N(E)),E.lastIndex&&(O.lastIndex=E.lastIndex);else if(f.__isDate(E))O=new Date(E.getTime());else{if(_&&Buffer.isBuffer(E))return Buffer.allocUnsafe?O=Buffer.allocUnsafe(E.length):O=new Buffer(E.length),E.copy(O),O;i(E,Error)?O=Object.create(E):typeof b>"u"?(D=Object.getPrototypeOf(E),O=Object.create(D)):(O=Object.create(b),D=b)}if(w){var P=S.indexOf(E);if(P!=-1)return R[P];S.push(E),R.push(O)}i(E,o)&&E.forEach(function(z,T){var I=A(T,q-1),B=A(z,q-1);O.set(I,B)}),i(E,d)&&E.forEach(function(z){var T=A(z,q-1);O.add(T)});for(var L in E){var $;D&&($=Object.getOwnPropertyDescriptor(D,L)),!($&&$.set==null)&&(O[L]=A(E[L],q-1))}if(Object.getOwnPropertySymbols)for(var Y=Object.getOwnPropertySymbols(E),L=0;L0){if(W instanceof x.BlockEmbed||T instanceof x.BlockEmbed){this.optimize();return}if(W instanceof j.default){var I=W.newlineIndex(W.length(),!0);if(I>-1&&(W=W.split(I+1),W===T)){this.optimize();return}}else if(T instanceof j.default){var B=T.newlineIndex(0);B>-1&&T.split(B+1)}var G=T.children.head instanceof v.default?null:T.children.head;W.moveChildren(T,G),W.remove()}this.optimize()}},{key:"enable",value:function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",L)}},{key:"formatAt",value:function(L,$,Y,Z){this.whitelist!=null&&!this.whitelist[Y]||(d(D.prototype.__proto__||Object.getPrototypeOf(D.prototype),"formatAt",this).call(this,L,$,Y,Z),this.optimize())}},{key:"insertAt",value:function(L,$,Y){if(!(Y!=null&&this.whitelist!=null&&!this.whitelist[$])){if(L>=this.length())if(Y==null||f.default.query($,f.default.Scope.BLOCK)==null){var Z=f.default.create(this.statics.defaultChild);this.appendChild(Z),Y==null&&$.endsWith(` -`)&&($=$.slice(0,-1)),Z.insertAt(0,$,Y)}else{var W=f.default.create($,Y);this.appendChild(W)}else d(D.prototype.__proto__||Object.getPrototypeOf(D.prototype),"insertAt",this).call(this,L,$,Y);this.optimize()}}},{key:"insertBefore",value:function(L,$){if(L.statics.scope===f.default.Scope.INLINE_BLOT){var Y=f.default.create(this.statics.defaultChild);Y.appendChild(L),L=Y}d(D.prototype.__proto__||Object.getPrototypeOf(D.prototype),"insertBefore",this).call(this,L,$)}},{key:"leaf",value:function(L){return this.path(L).pop()||[null,-1]}},{key:"line",value:function(L){return L===this.length()?this.line(L-1):this.descendant(E,L)}},{key:"lines",value:function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,$=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,Y=function Z(W,U,M){var z=[],T=M;return W.children.forEachAt(U,M,function(I,B,G){E(I)?z.push(I):I instanceof f.default.Container&&(z=z.concat(Z(I,B,T))),T-=G}),z};return Y(this,L,$)}},{key:"optimize",value:function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],$=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(d(D.prototype.__proto__||Object.getPrototypeOf(D.prototype),"optimize",this).call(this,L,$),L.length>0&&this.emitter.emit(h.default.events.SCROLL_OPTIMIZE,L,$))}},{key:"path",value:function(L){return d(D.prototype.__proto__||Object.getPrototypeOf(D.prototype),"path",this).call(this,L).slice(1)}},{key:"update",value:function(L){if(this.batch!==!0){var $=h.default.sources.USER;typeof L=="string"&&($=L),Array.isArray(L)||(L=this.observer.takeRecords()),L.length>0&&this.emitter.emit(h.default.events.SCROLL_BEFORE_UPDATE,$,L),d(D.prototype.__proto__||Object.getPrototypeOf(D.prototype),"update",this).call(this,L.concat([])),L.length>0&&this.emitter.emit(h.default.events.SCROLL_UPDATE,$,L)}}}]),D})(f.default.Scroll);q.blotName="scroll",q.className="ql-editor",q.tagName="DIV",q.defaultChild="block",q.allowedChildren=[u.default,x.BlockEmbed,C.default],r.default=q}),(function(n,r,a){Object.defineProperty(r,"__esModule",{value:!0}),r.SHORTKEY=r.default=void 0;var i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(H){return typeof H}:function(H){return H&&typeof Symbol=="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":typeof H},o=(function(){function H(X,J){var ae=[],le=!0,xe=!1,ce=void 0;try{for(var ve=X[Symbol.iterator](),Pe;!(le=(Pe=ve.next()).done)&&(ae.push(Pe.value),!(J&&ae.length===J));le=!0);}catch(et){xe=!0,ce=et}finally{try{!le&&ve.return&&ve.return()}finally{if(xe)throw ce}}return ae}return function(X,J){if(Array.isArray(X))return X;if(Symbol.iterator in Object(X))return H(X,J);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),d=(function(){function H(X,J){for(var ae=0;ae1&&arguments[1]!==void 0?arguments[1]:{},xe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ce=K(ae);if(ce==null||ce.key==null)return Y.warn("Attempted to add invalid keyboard binding",ce);typeof le=="function"&&(le={handler:le}),typeof xe=="function"&&(xe={handler:xe}),ce=(0,u.default)(ce,le,xe),this.bindings[ce.key]=this.bindings[ce.key]||[],this.bindings[ce.key].push(ce)}},{key:"listen",value:function(){var ae=this;this.quill.root.addEventListener("keydown",function(le){if(!le.defaultPrevented){var xe=le.which||le.keyCode,ce=(ae.bindings[xe]||[]).filter(function(ht){return X.match(le,ht)});if(ce.length!==0){var ve=ae.quill.getSelection();if(!(ve==null||!ae.quill.hasFocus())){var Pe=ae.quill.getLine(ve.index),et=o(Pe,2),kt=et[0],vt=et[1],ee=ae.quill.getLeaf(ve.index),ge=o(ee,2),ye=ge[0],Be=ge[1],$e=ve.length===0?[ye,Be]:ae.quill.getLeaf(ve.index+ve.length),dt=o($e,2),st=dt[0],xt=dt[1],Mt=ye instanceof C.default.Text?ye.value().slice(0,Be):"",It=st instanceof C.default.Text?st.value().slice(xt):"",he={collapsed:ve.length===0,empty:ve.length===0&&kt.length()<=1,format:ae.quill.getFormat(ve),offset:vt,prefix:Mt,suffix:It},pt=ce.some(function(ht){if(ht.collapsed!=null&&ht.collapsed!==he.collapsed||ht.empty!=null&&ht.empty!==he.empty||ht.offset!=null&&ht.offset!==he.offset)return!1;if(Array.isArray(ht.format)){if(ht.format.every(function(_e){return he.format[_e]==null}))return!1}else if(i(ht.format)==="object"&&!Object.keys(ht.format).every(function(_e){return ht.format[_e]===!0?he.format[_e]!=null:ht.format[_e]===!1?he.format[_e]==null:(0,h.default)(ht.format[_e],he.format[_e])}))return!1;return ht.prefix!=null&&!ht.prefix.test(he.prefix)||ht.suffix!=null&&!ht.suffix.test(he.suffix)?!1:ht.handler.call(ae,ve,he)!==!0});pt&&le.preventDefault()}}}})}}]),X})(q.default);W.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},W.DEFAULTS={bindings:{bold:G("bold"),italic:G("italic"),underline:G("underline"),indent:{key:W.keys.TAB,format:["blockquote","indent","list"],handler:function(X,J){if(J.collapsed&&J.offset!==0)return!0;this.quill.format("indent","+1",R.default.sources.USER)}},outdent:{key:W.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(X,J){if(J.collapsed&&J.offset!==0)return!0;this.quill.format("indent","-1",R.default.sources.USER)}},"outdent backspace":{key:W.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(X,J){J.format.indent!=null?this.quill.format("indent","-1",R.default.sources.USER):J.format.list!=null&&this.quill.format("list",!1,R.default.sources.USER)}},"indent code-block":B(!0),"outdent code-block":B(!1),"remove tab":{key:W.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(X){this.quill.deleteText(X.index-1,1,R.default.sources.USER)}},tab:{key:W.keys.TAB,handler:function(X){this.quill.history.cutoff();var J=new v.default().retain(X.index).delete(X.length).insert(" ");this.quill.updateContents(J,R.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(X.index+1,R.default.sources.SILENT)}},"list empty enter":{key:W.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(X,J){this.quill.format("list",!1,R.default.sources.USER),J.format.indent&&this.quill.format("indent",!1,R.default.sources.USER)}},"checklist enter":{key:W.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(X){var J=this.quill.getLine(X.index),ae=o(J,2),le=ae[0],xe=ae[1],ce=(0,u.default)({},le.formats(),{list:"checked"}),ve=new v.default().retain(X.index).insert(` -`,ce).retain(le.length()-xe-1).retain(1,{list:"unchecked"});this.quill.updateContents(ve,R.default.sources.USER),this.quill.setSelection(X.index+1,R.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:W.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(X,J){var ae=this.quill.getLine(X.index),le=o(ae,2),xe=le[0],ce=le[1],ve=new v.default().retain(X.index).insert(` -`,J.format).retain(xe.length()-ce-1).retain(1,{header:null});this.quill.updateContents(ve,R.default.sources.USER),this.quill.setSelection(X.index+1,R.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(X,J){var ae=J.prefix.length,le=this.quill.getLine(X.index),xe=o(le,2),ce=xe[0],ve=xe[1];if(ve>ae)return!0;var Pe=void 0;switch(J.prefix.trim()){case"[]":case"[ ]":Pe="unchecked";break;case"[x]":Pe="checked";break;case"-":case"*":Pe="bullet";break;default:Pe="ordered"}this.quill.insertText(X.index," ",R.default.sources.USER),this.quill.history.cutoff();var et=new v.default().retain(X.index-ve).delete(ae+1).retain(ce.length()-2-ve).retain(1,{list:Pe});this.quill.updateContents(et,R.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(X.index-ae,R.default.sources.SILENT)}},"code exit":{key:W.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(X){var J=this.quill.getLine(X.index),ae=o(J,2),le=ae[0],xe=ae[1],ce=new v.default().retain(X.index+le.length()-xe-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(ce,R.default.sources.USER)}},"embed left":U(W.keys.LEFT,!1),"embed left shift":U(W.keys.LEFT,!0),"embed right":U(W.keys.RIGHT,!1),"embed right shift":U(W.keys.RIGHT,!0)}};function U(H,X){var J,ae=H===W.keys.LEFT?"prefix":"suffix";return J={key:H,shiftKey:X,altKey:null},D(J,ae,/^$/),D(J,"handler",function(xe){var ce=xe.index;H===W.keys.RIGHT&&(ce+=xe.length+1);var ve=this.quill.getLeaf(ce),Pe=o(ve,1),et=Pe[0];return et instanceof C.default.Embed?(H===W.keys.LEFT?X?this.quill.setSelection(xe.index-1,xe.length+1,R.default.sources.USER):this.quill.setSelection(xe.index-1,R.default.sources.USER):X?this.quill.setSelection(xe.index,xe.length+1,R.default.sources.USER):this.quill.setSelection(xe.index+xe.length+1,R.default.sources.USER),!1):!0}),J}function M(H,X){if(!(H.index===0||this.quill.getLength()<=1)){var J=this.quill.getLine(H.index),ae=o(J,1),le=ae[0],xe={};if(X.offset===0){var ce=this.quill.getLine(H.index-1),ve=o(ce,1),Pe=ve[0];if(Pe!=null&&Pe.length()>1){var et=le.formats(),kt=this.quill.getFormat(H.index-1,1);xe=j.default.attributes.diff(et,kt)||{}}}var vt=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(X.prefix)?2:1;this.quill.deleteText(H.index-vt,vt,R.default.sources.USER),Object.keys(xe).length>0&&this.quill.formatLine(H.index-vt,vt,xe,R.default.sources.USER),this.quill.focus()}}function z(H,X){var J=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(X.suffix)?2:1;if(!(H.index>=this.quill.getLength()-J)){var ae={},le=0,xe=this.quill.getLine(H.index),ce=o(xe,1),ve=ce[0];if(X.offset>=ve.length()-1){var Pe=this.quill.getLine(H.index+1),et=o(Pe,1),kt=et[0];if(kt){var vt=ve.formats(),ee=this.quill.getFormat(H.index,1);ae=j.default.attributes.diff(vt,ee)||{},le=kt.length()}}this.quill.deleteText(H.index,J,R.default.sources.USER),Object.keys(ae).length>0&&this.quill.formatLine(H.index+le-1,J,ae,R.default.sources.USER)}}function T(H){var X=this.quill.getLines(H),J={};if(X.length>1){var ae=X[0].formats(),le=X[X.length-1].formats();J=j.default.attributes.diff(le,ae)||{}}this.quill.deleteText(H,R.default.sources.USER),Object.keys(J).length>0&&this.quill.formatLine(H.index,1,J,R.default.sources.USER),this.quill.setSelection(H.index,R.default.sources.SILENT),this.quill.focus()}function I(H,X){var J=this;H.length>0&&this.quill.scroll.deleteAt(H.index,H.length);var ae=Object.keys(X.format).reduce(function(le,xe){return C.default.query(xe,C.default.Scope.BLOCK)&&!Array.isArray(X.format[xe])&&(le[xe]=X.format[xe]),le},{});this.quill.insertText(H.index,` -`,ae,R.default.sources.USER),this.quill.setSelection(H.index+1,R.default.sources.SILENT),this.quill.focus(),Object.keys(X.format).forEach(function(le){ae[le]==null&&(Array.isArray(X.format[le])||le!=="link"&&J.quill.format(le,X.format[le],R.default.sources.USER))})}function B(H){return{key:W.keys.TAB,shiftKey:!H,format:{"code-block":!0},handler:function(J){var ae=C.default.query("code-block"),le=J.index,xe=J.length,ce=this.quill.scroll.descendant(ae,le),ve=o(ce,2),Pe=ve[0],et=ve[1];if(Pe!=null){var kt=this.quill.getIndex(Pe),vt=Pe.newlineIndex(et,!0)+1,ee=Pe.newlineIndex(kt+et+xe),ge=Pe.domNode.textContent.slice(vt,ee).split(` -`);et=0,ge.forEach(function(ye,Be){H?(Pe.insertAt(vt+et,ae.TAB),et+=ae.TAB.length,Be===0?le+=ae.TAB.length:xe+=ae.TAB.length):ye.startsWith(ae.TAB)&&(Pe.deleteAt(vt+et,ae.TAB.length),et-=ae.TAB.length,Be===0?le-=ae.TAB.length:xe-=ae.TAB.length),et+=ye.length+1}),this.quill.update(R.default.sources.USER),this.quill.setSelection(le,xe,R.default.sources.SILENT)}}}}function G(H){return{key:H[0].toUpperCase(),shortKey:!0,handler:function(J,ae){this.quill.format(H,!ae.format[H],R.default.sources.USER)}}}function K(H){if(typeof H=="string"||typeof H=="number")return K({key:H});if((typeof H>"u"?"undefined":i(H))==="object"&&(H=(0,f.default)(H,!1)),typeof H.key=="string")if(W.keys[H.key.toUpperCase()]!=null)H.key=W.keys[H.key.toUpperCase()];else if(H.key.length===1)H.key=H.key.toUpperCase().charCodeAt(0);else return null;return H.shortKey&&(H[Z]=H.shortKey,delete H.shortKey),H}r.default=W,r.SHORTKEY=Z}),(function(n,r,a){Object.defineProperty(r,"__esModule",{value:!0});var i=(function(){function j(b,C){var S=[],R=!0,_=!1,A=void 0;try{for(var E=b[Symbol.iterator](),q;!(R=(q=E.next()).done)&&(S.push(q.value),!(C&&S.length===C));R=!0);}catch(O){_=!0,A=O}finally{try{!R&&E.return&&E.return()}finally{if(_)throw A}}return S}return function(b,C){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return j(b,C);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),o=function j(b,C,S){b===null&&(b=Function.prototype);var R=Object.getOwnPropertyDescriptor(b,C);if(R===void 0){var _=Object.getPrototypeOf(b);return _===null?void 0:j(_,C,S)}else{if("value"in R)return R.value;var A=R.get;return A===void 0?void 0:A.call(S)}},d=(function(){function j(b,C){for(var S=0;S-1}r.default=u,r.sanitize=N}),(function(n,r,a){Object.defineProperty(r,"__esModule",{value:!0});var i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(w){return typeof w}:function(w){return w&&typeof Symbol=="function"&&w.constructor===Symbol&&w!==Symbol.prototype?"symbol":typeof w},o=(function(){function w(j,b){for(var C=0;C1&&arguments[1]!==void 0?arguments[1]:!1,S=this.container.querySelector(".ql-selected");if(b!==S&&(S!=null&&S.classList.remove("ql-selected"),b!=null&&(b.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(b.parentNode.children,b),b.hasAttribute("data-value")?this.label.setAttribute("data-value",b.getAttribute("data-value")):this.label.removeAttribute("data-value"),b.hasAttribute("data-label")?this.label.setAttribute("data-label",b.getAttribute("data-label")):this.label.removeAttribute("data-label"),C))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event>"u"?"undefined":i(Event))==="object"){var R=document.createEvent("Event");R.initEvent("change",!0,!0),this.select.dispatchEvent(R)}this.close()}}},{key:"update",value:function(){var b=void 0;if(this.select.selectedIndex>-1){var C=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];b=this.select.options[this.select.selectedIndex],this.selectItem(C)}else this.selectItem(null);var S=b!=null&&b!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",S)}}]),w})();r.default=v}),(function(n,r,a){Object.defineProperty(r,"__esModule",{value:!0});var i=a(0),o=Y(i),d=a(5),m=Y(d),f=a(4),p=Y(f),h=a(16),x=Y(h),u=a(25),N=Y(u),v=a(24),w=Y(v),j=a(35),b=Y(j),C=a(6),S=Y(C),R=a(22),_=Y(R),A=a(7),E=Y(A),q=a(55),O=Y(q),D=a(42),P=Y(D),L=a(23),$=Y(L);function Y(Z){return Z&&Z.__esModule?Z:{default:Z}}m.default.register({"blots/block":p.default,"blots/block/embed":f.BlockEmbed,"blots/break":x.default,"blots/container":N.default,"blots/cursor":w.default,"blots/embed":b.default,"blots/inline":S.default,"blots/scroll":_.default,"blots/text":E.default,"modules/clipboard":O.default,"modules/history":P.default,"modules/keyboard":$.default}),o.default.register(p.default,x.default,w.default,S.default,_.default,E.default),r.default=m.default}),(function(n,r,a){Object.defineProperty(r,"__esModule",{value:!0});var i=a(1),o=(function(){function d(m){this.domNode=m,this.domNode[i.DATA_KEY]={blot:this}}return Object.defineProperty(d.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),d.create=function(m){if(this.tagName==null)throw new i.ParchmentError("Blot definition missing tagName");var f;return Array.isArray(this.tagName)?(typeof m=="string"&&(m=m.toUpperCase(),parseInt(m).toString()===m&&(m=parseInt(m))),typeof m=="number"?f=document.createElement(this.tagName[m-1]):this.tagName.indexOf(m)>-1?f=document.createElement(m):f=document.createElement(this.tagName[0])):f=document.createElement(this.tagName),this.className&&f.classList.add(this.className),f},d.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},d.prototype.clone=function(){var m=this.domNode.cloneNode(!1);return i.create(m)},d.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[i.DATA_KEY]},d.prototype.deleteAt=function(m,f){var p=this.isolate(m,f);p.remove()},d.prototype.formatAt=function(m,f,p,h){var x=this.isolate(m,f);if(i.query(p,i.Scope.BLOT)!=null&&h)x.wrap(p,h);else if(i.query(p,i.Scope.ATTRIBUTE)!=null){var u=i.create(this.statics.scope);x.wrap(u),u.format(p,h)}},d.prototype.insertAt=function(m,f,p){var h=p==null?i.create("text",f):i.create(f,p),x=this.split(m);this.parent.insertBefore(h,x)},d.prototype.insertInto=function(m,f){f===void 0&&(f=null),this.parent!=null&&this.parent.children.remove(this);var p=null;m.children.insertBefore(this,f),f!=null&&(p=f.domNode),(this.domNode.parentNode!=m.domNode||this.domNode.nextSibling!=p)&&m.domNode.insertBefore(this.domNode,p),this.parent=m,this.attach()},d.prototype.isolate=function(m,f){var p=this.split(m);return p.split(f),p},d.prototype.length=function(){return 1},d.prototype.offset=function(m){return m===void 0&&(m=this.parent),this.parent==null||this==m?0:this.parent.children.offset(this)+this.parent.offset(m)},d.prototype.optimize=function(m){this.domNode[i.DATA_KEY]!=null&&delete this.domNode[i.DATA_KEY].mutations},d.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},d.prototype.replace=function(m){m.parent!=null&&(m.parent.insertBefore(this,m.next),m.remove())},d.prototype.replaceWith=function(m,f){var p=typeof m=="string"?i.create(m,f):m;return p.replace(this),p},d.prototype.split=function(m,f){return m===0?this:this.next},d.prototype.update=function(m,f){},d.prototype.wrap=function(m,f){var p=typeof m=="string"?i.create(m,f):m;return this.parent!=null&&this.parent.insertBefore(p,this.next),p.appendChild(this),p},d.blotName="abstract",d})();r.default=o}),(function(n,r,a){Object.defineProperty(r,"__esModule",{value:!0});var i=a(12),o=a(32),d=a(33),m=a(1),f=(function(){function p(h){this.attributes={},this.domNode=h,this.build()}return p.prototype.attribute=function(h,x){x?h.add(this.domNode,x)&&(h.value(this.domNode)!=null?this.attributes[h.attrName]=h:delete this.attributes[h.attrName]):(h.remove(this.domNode),delete this.attributes[h.attrName])},p.prototype.build=function(){var h=this;this.attributes={};var x=i.default.keys(this.domNode),u=o.default.keys(this.domNode),N=d.default.keys(this.domNode);x.concat(u).concat(N).forEach(function(v){var w=m.query(v,m.Scope.ATTRIBUTE);w instanceof i.default&&(h.attributes[w.attrName]=w)})},p.prototype.copy=function(h){var x=this;Object.keys(this.attributes).forEach(function(u){var N=x.attributes[u].value(x.domNode);h.format(u,N)})},p.prototype.move=function(h){var x=this;this.copy(h),Object.keys(this.attributes).forEach(function(u){x.attributes[u].remove(x.domNode)}),this.attributes={}},p.prototype.values=function(){var h=this;return Object.keys(this.attributes).reduce(function(x,u){return x[u]=h.attributes[u].value(h.domNode),x},{})},p})();r.default=f}),(function(n,r,a){var i=this&&this.__extends||(function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,h){p.__proto__=h}||function(p,h){for(var x in h)h.hasOwnProperty(x)&&(p[x]=h[x])};return function(p,h){f(p,h);function x(){this.constructor=p}p.prototype=h===null?Object.create(h):(x.prototype=h.prototype,new x)}})();Object.defineProperty(r,"__esModule",{value:!0});var o=a(12);function d(f,p){var h=f.getAttribute("class")||"";return h.split(/\s+/).filter(function(x){return x.indexOf(p+"-")===0})}var m=(function(f){i(p,f);function p(){return f!==null&&f.apply(this,arguments)||this}return p.keys=function(h){return(h.getAttribute("class")||"").split(/\s+/).map(function(x){return x.split("-").slice(0,-1).join("-")})},p.prototype.add=function(h,x){return this.canAdd(h,x)?(this.remove(h),h.classList.add(this.keyName+"-"+x),!0):!1},p.prototype.remove=function(h){var x=d(h,this.keyName);x.forEach(function(u){h.classList.remove(u)}),h.classList.length===0&&h.removeAttribute("class")},p.prototype.value=function(h){var x=d(h,this.keyName)[0]||"",u=x.slice(this.keyName.length+1);return this.canAdd(h,u)?u:""},p})(o.default);r.default=m}),(function(n,r,a){var i=this&&this.__extends||(function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,h){p.__proto__=h}||function(p,h){for(var x in h)h.hasOwnProperty(x)&&(p[x]=h[x])};return function(p,h){f(p,h);function x(){this.constructor=p}p.prototype=h===null?Object.create(h):(x.prototype=h.prototype,new x)}})();Object.defineProperty(r,"__esModule",{value:!0});var o=a(12);function d(f){var p=f.split("-"),h=p.slice(1).map(function(x){return x[0].toUpperCase()+x.slice(1)}).join("");return p[0]+h}var m=(function(f){i(p,f);function p(){return f!==null&&f.apply(this,arguments)||this}return p.keys=function(h){return(h.getAttribute("style")||"").split(";").map(function(x){var u=x.split(":");return u[0].trim()})},p.prototype.add=function(h,x){return this.canAdd(h,x)?(h.style[d(this.keyName)]=x,!0):!1},p.prototype.remove=function(h){h.style[d(this.keyName)]="",h.getAttribute("style")||h.removeAttribute("style")},p.prototype.value=function(h){var x=h.style[d(this.keyName)];return this.canAdd(h,x)?x:""},p})(o.default);r.default=m}),(function(n,r,a){Object.defineProperty(r,"__esModule",{value:!0});var i=(function(){function m(f,p){for(var h=0;hq&&this.stack.undo.length>0){var O=this.stack.undo.pop();E=E.compose(O.undo),_=O.redo.compose(_)}else this.lastRecorded=q;this.stack.undo.push({redo:_,undo:E}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(_){this.stack.undo.forEach(function(A){A.undo=_.transform(A.undo,!0),A.redo=_.transform(A.redo,!0)}),this.stack.redo.forEach(function(A){A.undo=_.transform(A.undo,!0),A.redo=_.transform(A.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),S})(h.default);w.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function j(C){var S=C.ops[C.ops.length-1];return S==null?!1:S.insert!=null?typeof S.insert=="string"&&S.insert.endsWith(` -`):S.attributes!=null?Object.keys(S.attributes).some(function(R){return d.default.query(R,d.default.Scope.BLOCK)!=null}):!1}function b(C){var S=C.reduce(function(_,A){return _+=A.delete||0,_},0),R=C.length()-S;return j(C)&&(R-=1),R}r.default=w,r.getLastChangeIndex=b}),(function(n,r,a){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BaseTooltip=void 0;var i=(function(){function I(B,G){for(var K=0;K0&&arguments[0]!==void 0?arguments[0]:"link",H=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),H!=null?this.textbox.value=H:K!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+K)||""),this.root.setAttribute("data-mode",K)}},{key:"restoreFocus",value:function(){var K=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=K}},{key:"save",value:function(){var K=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var H=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",K,x.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",K,x.default.sources.USER)),this.quill.root.scrollTop=H;break}case"video":K=z(K);case"formula":{if(!K)break;var X=this.quill.getSelection(!0);if(X!=null){var J=X.index+X.length;this.quill.insertEmbed(J,this.root.getAttribute("data-mode"),K,x.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(J+1," ",x.default.sources.USER),this.quill.setSelection(J+2,x.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),B})(E.default);function z(I){var B=I.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||I.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return B?(B[1]||"https")+"://www.youtube.com/embed/"+B[2]+"?showinfo=0":(B=I.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(B[1]||"https")+"://player.vimeo.com/video/"+B[2]+"/":I}function T(I,B){var G=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;B.forEach(function(K){var H=document.createElement("option");K===G?H.setAttribute("selected","selected"):H.setAttribute("value",K),I.appendChild(H)})}r.BaseTooltip=M,r.default=U}),(function(n,r,a){Object.defineProperty(r,"__esModule",{value:!0});var i=(function(){function o(){this.head=this.tail=null,this.length=0}return o.prototype.append=function(){for(var d=[],m=0;m1&&this.append.apply(this,d.slice(1))},o.prototype.contains=function(d){for(var m,f=this.iterator();m=f();)if(m===d)return!0;return!1},o.prototype.insertBefore=function(d,m){d&&(d.next=m,m!=null?(d.prev=m.prev,m.prev!=null&&(m.prev.next=d),m.prev=d,m===this.head&&(this.head=d)):this.tail!=null?(this.tail.next=d,d.prev=this.tail,this.tail=d):(d.prev=null,this.head=this.tail=d),this.length+=1)},o.prototype.offset=function(d){for(var m=0,f=this.head;f!=null;){if(f===d)return m;m+=f.length(),f=f.next}return-1},o.prototype.remove=function(d){this.contains(d)&&(d.prev!=null&&(d.prev.next=d.next),d.next!=null&&(d.next.prev=d.prev),d===this.head&&(this.head=d.next),d===this.tail&&(this.tail=d.prev),this.length-=1)},o.prototype.iterator=function(d){return d===void 0&&(d=this.head),function(){var m=d;return d!=null&&(d=d.next),m}},o.prototype.find=function(d,m){m===void 0&&(m=!1);for(var f,p=this.iterator();f=p();){var h=f.length();if(dN?f(u,d-N,Math.min(m,N+w-d)):f(u,0,Math.min(w,d+m-N)),N+=w}},o.prototype.map=function(d){return this.reduce(function(m,f){return m.push(d(f)),m},[])},o.prototype.reduce=function(d,m){for(var f,p=this.iterator();f=p();)m=d(m,f);return m},o})();r.default=i}),(function(n,r,a){var i=this&&this.__extends||(function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,u){x.__proto__=u}||function(x,u){for(var N in u)u.hasOwnProperty(N)&&(x[N]=u[N])};return function(x,u){h(x,u);function N(){this.constructor=x}x.prototype=u===null?Object.create(u):(N.prototype=u.prototype,new N)}})();Object.defineProperty(r,"__esModule",{value:!0});var o=a(17),d=a(1),m={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},f=100,p=(function(h){i(x,h);function x(u){var N=h.call(this,u)||this;return N.scroll=N,N.observer=new MutationObserver(function(v){N.update(v)}),N.observer.observe(N.domNode,m),N.attach(),N}return x.prototype.detach=function(){h.prototype.detach.call(this),this.observer.disconnect()},x.prototype.deleteAt=function(u,N){this.update(),u===0&&N===this.length()?this.children.forEach(function(v){v.remove()}):h.prototype.deleteAt.call(this,u,N)},x.prototype.formatAt=function(u,N,v,w){this.update(),h.prototype.formatAt.call(this,u,N,v,w)},x.prototype.insertAt=function(u,N,v){this.update(),h.prototype.insertAt.call(this,u,N,v)},x.prototype.optimize=function(u,N){var v=this;u===void 0&&(u=[]),N===void 0&&(N={}),h.prototype.optimize.call(this,N);for(var w=[].slice.call(this.observer.takeRecords());w.length>0;)u.push(w.pop());for(var j=function(R,_){_===void 0&&(_=!0),!(R==null||R===v)&&R.domNode.parentNode!=null&&(R.domNode[d.DATA_KEY].mutations==null&&(R.domNode[d.DATA_KEY].mutations=[]),_&&j(R.parent))},b=function(R){R.domNode[d.DATA_KEY]==null||R.domNode[d.DATA_KEY].mutations==null||(R instanceof o.default&&R.children.forEach(b),R.optimize(N))},C=u,S=0;C.length>0;S+=1){if(S>=f)throw new Error("[Parchment] Maximum optimize iterations reached");for(C.forEach(function(R){var _=d.find(R.target,!0);_!=null&&(_.domNode===R.target&&(R.type==="childList"?(j(d.find(R.previousSibling,!1)),[].forEach.call(R.addedNodes,function(A){var E=d.find(A,!1);j(E,!1),E instanceof o.default&&E.children.forEach(function(q){j(q,!1)})})):R.type==="attributes"&&j(_.prev)),j(_))}),this.children.forEach(b),C=[].slice.call(this.observer.takeRecords()),w=C.slice();w.length>0;)u.push(w.pop())}},x.prototype.update=function(u,N){var v=this;N===void 0&&(N={}),u=u||this.observer.takeRecords(),u.map(function(w){var j=d.find(w.target,!0);return j==null?null:j.domNode[d.DATA_KEY].mutations==null?(j.domNode[d.DATA_KEY].mutations=[w],j):(j.domNode[d.DATA_KEY].mutations.push(w),null)}).forEach(function(w){w==null||w===v||w.domNode[d.DATA_KEY]==null||w.update(w.domNode[d.DATA_KEY].mutations||[],N)}),this.domNode[d.DATA_KEY].mutations!=null&&h.prototype.update.call(this,this.domNode[d.DATA_KEY].mutations,N),this.optimize(u,N)},x.blotName="scroll",x.defaultChild="block",x.scope=d.Scope.BLOCK_BLOT,x.tagName="DIV",x})(o.default);r.default=p}),(function(n,r,a){var i=this&&this.__extends||(function(){var p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,x){h.__proto__=x}||function(h,x){for(var u in x)x.hasOwnProperty(u)&&(h[u]=x[u])};return function(h,x){p(h,x);function u(){this.constructor=h}h.prototype=x===null?Object.create(x):(u.prototype=x.prototype,new u)}})();Object.defineProperty(r,"__esModule",{value:!0});var o=a(18),d=a(1);function m(p,h){if(Object.keys(p).length!==Object.keys(h).length)return!1;for(var x in p)if(p[x]!==h[x])return!1;return!0}var f=(function(p){i(h,p);function h(){return p!==null&&p.apply(this,arguments)||this}return h.formats=function(x){if(x.tagName!==h.tagName)return p.formats.call(this,x)},h.prototype.format=function(x,u){var N=this;x===this.statics.blotName&&!u?(this.children.forEach(function(v){v instanceof o.default||(v=v.wrap(h.blotName,!0)),N.attributes.copy(v)}),this.unwrap()):p.prototype.format.call(this,x,u)},h.prototype.formatAt=function(x,u,N,v){if(this.formats()[N]!=null||d.query(N,d.Scope.ATTRIBUTE)){var w=this.isolate(x,u);w.format(N,v)}else p.prototype.formatAt.call(this,x,u,N,v)},h.prototype.optimize=function(x){p.prototype.optimize.call(this,x);var u=this.formats();if(Object.keys(u).length===0)return this.unwrap();var N=this.next;N instanceof h&&N.prev===this&&m(u,N.formats())&&(N.moveChildren(this),N.remove())},h.blotName="inline",h.scope=d.Scope.INLINE_BLOT,h.tagName="SPAN",h})(o.default);r.default=f}),(function(n,r,a){var i=this&&this.__extends||(function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,h){p.__proto__=h}||function(p,h){for(var x in h)h.hasOwnProperty(x)&&(p[x]=h[x])};return function(p,h){f(p,h);function x(){this.constructor=p}p.prototype=h===null?Object.create(h):(x.prototype=h.prototype,new x)}})();Object.defineProperty(r,"__esModule",{value:!0});var o=a(18),d=a(1),m=(function(f){i(p,f);function p(){return f!==null&&f.apply(this,arguments)||this}return p.formats=function(h){var x=d.query(p.blotName).tagName;if(h.tagName!==x)return f.formats.call(this,h)},p.prototype.format=function(h,x){d.query(h,d.Scope.BLOCK)!=null&&(h===this.statics.blotName&&!x?this.replaceWith(p.blotName):f.prototype.format.call(this,h,x))},p.prototype.formatAt=function(h,x,u,N){d.query(u,d.Scope.BLOCK)!=null?this.format(u,N):f.prototype.formatAt.call(this,h,x,u,N)},p.prototype.insertAt=function(h,x,u){if(u==null||d.query(x,d.Scope.INLINE)!=null)f.prototype.insertAt.call(this,h,x,u);else{var N=this.split(h),v=d.create(x,u);N.parent.insertBefore(v,N)}},p.prototype.update=function(h,x){navigator.userAgent.match(/Trident/)?this.build():f.prototype.update.call(this,h,x)},p.blotName="block",p.scope=d.Scope.BLOCK_BLOT,p.tagName="P",p})(o.default);r.default=m}),(function(n,r,a){var i=this&&this.__extends||(function(){var m=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,p){f.__proto__=p}||function(f,p){for(var h in p)p.hasOwnProperty(h)&&(f[h]=p[h])};return function(f,p){m(f,p);function h(){this.constructor=f}f.prototype=p===null?Object.create(p):(h.prototype=p.prototype,new h)}})();Object.defineProperty(r,"__esModule",{value:!0});var o=a(19),d=(function(m){i(f,m);function f(){return m!==null&&m.apply(this,arguments)||this}return f.formats=function(p){},f.prototype.format=function(p,h){m.prototype.formatAt.call(this,0,this.length(),p,h)},f.prototype.formatAt=function(p,h,x,u){p===0&&h===this.length()?this.format(x,u):m.prototype.formatAt.call(this,p,h,x,u)},f.prototype.formats=function(){return this.statics.formats(this.domNode)},f})(o.default);r.default=d}),(function(n,r,a){var i=this&&this.__extends||(function(){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,h){p.__proto__=h}||function(p,h){for(var x in h)h.hasOwnProperty(x)&&(p[x]=h[x])};return function(p,h){f(p,h);function x(){this.constructor=p}p.prototype=h===null?Object.create(h):(x.prototype=h.prototype,new x)}})();Object.defineProperty(r,"__esModule",{value:!0});var o=a(19),d=a(1),m=(function(f){i(p,f);function p(h){var x=f.call(this,h)||this;return x.text=x.statics.value(x.domNode),x}return p.create=function(h){return document.createTextNode(h)},p.value=function(h){var x=h.data;return x.normalize&&(x=x.normalize()),x},p.prototype.deleteAt=function(h,x){this.domNode.data=this.text=this.text.slice(0,h)+this.text.slice(h+x)},p.prototype.index=function(h,x){return this.domNode===h?x:-1},p.prototype.insertAt=function(h,x,u){u==null?(this.text=this.text.slice(0,h)+x+this.text.slice(h),this.domNode.data=this.text):f.prototype.insertAt.call(this,h,x,u)},p.prototype.length=function(){return this.text.length},p.prototype.optimize=function(h){f.prototype.optimize.call(this,h),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof p&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},p.prototype.position=function(h,x){return[this.domNode,h]},p.prototype.split=function(h,x){if(x===void 0&&(x=!1),!x){if(h===0)return this;if(h===this.length())return this.next}var u=d.create(this.domNode.splitText(h));return this.parent.insertBefore(u,this.next),this.text=this.statics.value(this.domNode),u},p.prototype.update=function(h,x){var u=this;h.some(function(N){return N.type==="characterData"&&N.target===u.domNode})&&(this.text=this.statics.value(this.domNode))},p.prototype.value=function(){return this.text},p.blotName="text",p.scope=d.Scope.INLINE_BLOT,p})(o.default);r.default=m}),(function(n,r,a){var i=document.createElement("div");if(i.classList.toggle("test-class",!1),i.classList.contains("test-class")){var o=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(d,m){return arguments.length>1&&!this.contains(d)==!m?m:o.call(this,d)}}String.prototype.startsWith||(String.prototype.startsWith=function(d,m){return m=m||0,this.substr(m,d.length)===d}),String.prototype.endsWith||(String.prototype.endsWith=function(d,m){var f=this.toString();(typeof m!="number"||!isFinite(m)||Math.floor(m)!==m||m>f.length)&&(m=f.length),m-=d.length;var p=f.indexOf(d,m);return p!==-1&&p===m}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(m){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof m!="function")throw new TypeError("predicate must be a function");for(var f=Object(this),p=f.length>>>0,h=arguments[1],x,u=0;uR.length?S:R,E=S.length>R.length?R:S,q=A.indexOf(E);if(q!=-1)return _=[[i,A.substring(0,q)],[o,E],[i,A.substring(q+E.length)]],S.length>R.length&&(_[0][0]=_[2][0]=a),_;if(E.length==1)return[[a,S],[i,R]];var O=u(S,R);if(O){var D=O[0],P=O[1],L=O[2],$=O[3],Y=O[4],Z=d(D,L),W=d(P,$);return Z.concat([[o,Y]],W)}return f(S,R)}function f(S,R){for(var _=S.length,A=R.length,E=Math.ceil((_+A)/2),q=E,O=2*E,D=new Array(O),P=new Array(O),L=0;L_)W+=2;else if(G>A)Z+=2;else if(Y){var K=q+$-T;if(K>=0&&K=H)return p(S,R,B,G)}}}for(var X=-z+U;X<=z-M;X+=2){var K=q+X,H;X==-z||X!=z&&P[K-1]_)M+=2;else if(J>A)U+=2;else if(!Y){var I=q+$-X;if(I>=0&&I=H)return p(S,R,B,G)}}}}return[[a,S],[i,R]]}function p(S,R,_,A){var E=S.substring(0,_),q=R.substring(0,A),O=S.substring(_),D=R.substring(A),P=d(E,q),L=d(O,D);return P.concat(L)}function h(S,R){if(!S||!R||S.charAt(0)!=R.charAt(0))return 0;for(var _=0,A=Math.min(S.length,R.length),E=A,q=0;_R.length?S:R,A=S.length>R.length?R:S;if(_.length<4||A.length*2<_.length)return null;function E(W,U,M){for(var z=W.substring(M,M+Math.floor(W.length/4)),T=-1,I="",B,G,K,H;(T=U.indexOf(z,T+1))!=-1;){var X=h(W.substring(M),U.substring(T)),J=x(W.substring(0,M),U.substring(0,T));I.length=W.length?[B,G,K,H,I]:null}var q=E(_,A,Math.ceil(_.length/4)),O=E(_,A,Math.ceil(_.length/2)),D;if(!q&&!O)return null;O?q?D=q[4].length>O[4].length?q:O:D=O:D=q;var P,L,$,Y;S.length>R.length?(P=D[0],L=D[1],$=D[2],Y=D[3]):($=D[0],Y=D[1],P=D[2],L=D[3]);var Z=D[4];return[P,L,$,Y,Z]}function N(S){S.push([o,""]);for(var R=0,_=0,A=0,E="",q="",O;R1?(_!==0&&A!==0&&(O=h(q,E),O!==0&&(R-_-A>0&&S[R-_-A-1][0]==o?S[R-_-A-1][1]+=q.substring(0,O):(S.splice(0,0,[o,q.substring(0,O)]),R++),q=q.substring(O),E=E.substring(O)),O=x(q,E),O!==0&&(S[R][1]=q.substring(q.length-O)+S[R][1],q=q.substring(0,q.length-O),E=E.substring(0,E.length-O))),_===0?S.splice(R-A,_+A,[i,q]):A===0?S.splice(R-_,_+A,[a,E]):S.splice(R-_-A,_+A,[a,E],[i,q]),R=R-_-A+(_?1:0)+(A?1:0)+1):R!==0&&S[R-1][0]==o?(S[R-1][1]+=S[R][1],S.splice(R,1)):R++,A=0,_=0,E="",q="";break}S[S.length-1][1]===""&&S.pop();var D=!1;for(R=1;R0&&A.splice(E+2,0,[O[0],D]),C(A,E,3)}else return S}function b(S){for(var R=!1,_=function(O){return O.charCodeAt(0)>=56320&&O.charCodeAt(0)<=57343},A=function(O){return O.charCodeAt(O.length-1)>=55296&&O.charCodeAt(O.length-1)<=56319},E=2;E0&&q.push(S[E]);return q}function C(S,R,_){for(var A=R+_-1;A>=0&&A>=R-1;A--)if(A+1\r?\n +\<"),this.convert();var $e=this.quill.getFormat(this.quill.selection.savedRange.index);if($e[A.default.blotName]){var dt=this.container.innerText;return this.container.innerHTML="",new h.default().insert(dt,L({},A.default.blotName,$e[A.default.blotName]))}var st=this.prepareMatching(),xt=o(st,2),Mt=xt[0],It=xt[1],he=X(this.container,Mt,It);return K(he,` -`)&&he.ops[he.ops.length-1].attributes==null&&(he=he.compose(new h.default().retain(he.length()-1).delete(1))),W.log("convert",this.container.innerHTML,he),this.container.innerHTML="",he}},{key:"dangerouslyPasteHTML",value:function(Be,$e){var dt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:v.default.sources.API;if(typeof Be=="string")this.quill.setContents(this.convert(Be),$e),this.quill.setSelection(0,v.default.sources.SILENT);else{var st=this.convert($e);this.quill.updateContents(new h.default().retain(Be).concat(st),dt),this.quill.setSelection(Be+st.length(),v.default.sources.SILENT)}}},{key:"onPaste",value:function(Be){var $e=this;if(!(Be.defaultPrevented||!this.quill.isEnabled())){var dt=this.quill.getSelection(),st=new h.default().retain(dt.index),xt=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(v.default.sources.SILENT),setTimeout(function(){st=st.concat($e.convert()).delete(dt.length),$e.quill.updateContents(st,v.default.sources.USER),$e.quill.setSelection(st.length()-dt.length,v.default.sources.SILENT),$e.quill.scrollingContainer.scrollTop=xt,$e.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var Be=this,$e=[],dt=[];return this.matchers.forEach(function(st){var xt=o(st,2),Mt=xt[0],It=xt[1];switch(Mt){case Node.TEXT_NODE:dt.push(It);break;case Node.ELEMENT_NODE:$e.push(It);break;default:[].forEach.call(Be.container.querySelectorAll(Mt),function(he){he[U]=he[U]||[],he[U].push(It)});break}}),[$e,dt]}}]),ge})(C.default);I.DEFAULTS={matchers:[],matchVisual:!0};function B(ee,ge,ye){return(typeof ge>"u"?"undefined":i(ge))==="object"?Object.keys(ge).reduce(function(Be,$e){return B(Be,$e,ge[$e])},ee):ee.reduce(function(Be,$e){return $e.attributes&&$e.attributes[ge]?Be.push($e):Be.insert($e.insert,(0,f.default)({},L({},ge,ye),$e.attributes))},new h.default)}function G(ee){if(ee.nodeType!==Node.ELEMENT_NODE)return{};var ge="__ql-computed-style";return ee[ge]||(ee[ge]=window.getComputedStyle(ee))}function K(ee,ge){for(var ye="",Be=ee.ops.length-1;Be>=0&&ye.length-1}function X(ee,ge,ye){return ee.nodeType===ee.TEXT_NODE?ye.reduce(function(Be,$e){return $e(ee,Be)},new h.default):ee.nodeType===ee.ELEMENT_NODE?[].reduce.call(ee.childNodes||[],function(Be,$e){var dt=X($e,ge,ye);return $e.nodeType===ee.ELEMENT_NODE&&(dt=ge.reduce(function(st,xt){return xt($e,st)},dt),dt=($e[U]||[]).reduce(function(st,xt){return xt($e,st)},dt)),Be.concat(dt)},new h.default):new h.default}function J(ee,ge,ye){return B(ye,ee,!0)}function ae(ee,ge){var ye=u.default.Attributor.Attribute.keys(ee),Be=u.default.Attributor.Class.keys(ee),$e=u.default.Attributor.Style.keys(ee),dt={};return ye.concat(Be).concat($e).forEach(function(st){var xt=u.default.query(st,u.default.Scope.ATTRIBUTE);xt!=null&&(dt[xt.attrName]=xt.value(ee),dt[xt.attrName])||(xt=z[st],xt!=null&&(xt.attrName===st||xt.keyName===st)&&(dt[xt.attrName]=xt.value(ee)||void 0),xt=T[st],xt!=null&&(xt.attrName===st||xt.keyName===st)&&(xt=T[st],dt[xt.attrName]=xt.value(ee)||void 0))}),Object.keys(dt).length>0&&(ge=B(ge,dt)),ge}function le(ee,ge){var ye=u.default.query(ee);if(ye==null)return ge;if(ye.prototype instanceof u.default.Embed){var Be={},$e=ye.value(ee);$e!=null&&(Be[ye.blotName]=$e,ge=new h.default().insert(Be,ye.formats(ee)))}else typeof ye.formats=="function"&&(ge=B(ge,ye.blotName,ye.formats(ee)));return ge}function xe(ee,ge){return K(ge,` -`)||ge.insert(` -`),ge}function ce(){return new h.default}function ve(ee,ge){var ye=u.default.query(ee);if(ye==null||ye.blotName!=="list-item"||!K(ge,` -`))return ge;for(var Be=-1,$e=ee.parentNode;!$e.classList.contains("ql-clipboard");)(u.default.query($e)||{}).blotName==="list"&&(Be+=1),$e=$e.parentNode;return Be<=0?ge:ge.compose(new h.default().retain(ge.length()-1).retain(1,{indent:Be}))}function Pe(ee,ge){return K(ge,` -`)||(H(ee)||ge.length()>0&&ee.nextSibling&&H(ee.nextSibling))&&ge.insert(` -`),ge}function et(ee,ge){if(H(ee)&&ee.nextElementSibling!=null&&!K(ge,` - -`)){var ye=ee.offsetHeight+parseFloat(G(ee).marginTop)+parseFloat(G(ee).marginBottom);ee.nextElementSibling.offsetTop>ee.offsetTop+ye*1.5&&ge.insert(` -`)}return ge}function kt(ee,ge){var ye={},Be=ee.style||{};return Be.fontStyle&&G(ee).fontStyle==="italic"&&(ye.italic=!0),Be.fontWeight&&(G(ee).fontWeight.startsWith("bold")||parseInt(G(ee).fontWeight)>=700)&&(ye.bold=!0),Object.keys(ye).length>0&&(ge=B(ge,ye)),parseFloat(Be.textIndent||0)>0&&(ge=new h.default().insert(" ").concat(ge)),ge}function vt(ee,ge){var ye=ee.data;if(ee.parentNode.tagName==="O:P")return ge.insert(ye.trim());if(ye.trim().length===0&&ee.parentNode.classList.contains("ql-clipboard"))return ge;if(!G(ee.parentNode).whiteSpace.startsWith("pre")){var Be=function(dt,st){return st=st.replace(/[^\u00a0]/g,""),st.length<1&&dt?" ":st};ye=ye.replace(/\r\n/g," ").replace(/\n/g," "),ye=ye.replace(/\s\s+/g,Be.bind(Be,!0)),(ee.previousSibling==null&&H(ee.parentNode)||ee.previousSibling!=null&&H(ee.previousSibling))&&(ye=ye.replace(/^\s+/,Be.bind(Be,!1))),(ee.nextSibling==null&&H(ee.parentNode)||ee.nextSibling!=null&&H(ee.nextSibling))&&(ye=ye.replace(/\s+$/,Be.bind(Be,!1)))}return ge.insert(ye)}r.default=I,r.matchAttributor=ae,r.matchBlot=le,r.matchNewline=Pe,r.matchSpacing=et,r.matchText=vt}),(function(n,r,a){Object.defineProperty(r,"__esModule",{value:!0});var i=(function(){function N(v,w){for(var j=0;j '}),(function(n,r,a){Object.defineProperty(r,"__esModule",{value:!0});var i=(function(){function N(v,w){for(var j=0;ju.right&&(v=u.right-N.right,this.root.style.left=h+v+"px"),N.leftu.bottom){var w=N.bottom-N.top,j=p.bottom-p.top+w;this.root.style.top=x-j+"px",this.root.classList.add("ql-flip")}return v}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),m})();r.default=d}),(function(n,r,a){Object.defineProperty(r,"__esModule",{value:!0});var i=(function(){function O(D,P){var L=[],$=!0,Y=!1,Z=void 0;try{for(var W=D[Symbol.iterator](),U;!($=(U=W.next()).done)&&(L.push(U.value),!(P&&L.length===P));$=!0);}catch(M){Y=!0,Z=M}finally{try{!$&&W.return&&W.return()}finally{if(Y)throw Z}}return L}return function(D,P){if(Array.isArray(D))return D;if(Symbol.iterator in Object(D))return O(D,P);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),o=function O(D,P,L){D===null&&(D=Function.prototype);var $=Object.getOwnPropertyDescriptor(D,P);if($===void 0){var Y=Object.getPrototypeOf(D);return Y===null?void 0:O(Y,P,L)}else{if("value"in $)return $.value;var Z=$.get;return Z===void 0?void 0:Z.call(L)}},d=(function(){function O(D,P){for(var L=0;L','','',''].join(""),r.default=E}),(function(n,r,a){Object.defineProperty(r,"__esModule",{value:!0});var i=a(29),o=$e(i),d=a(36),m=a(38),f=a(64),p=a(65),h=$e(p),x=a(66),u=$e(x),N=a(67),v=$e(N),w=a(37),j=a(26),b=a(39),C=a(40),S=a(56),R=$e(S),_=a(68),A=$e(_),E=a(27),q=$e(E),O=a(69),D=$e(O),P=a(70),L=$e(P),$=a(71),Y=$e($),Z=a(72),W=$e(Z),U=a(73),M=$e(U),z=a(13),T=$e(z),I=a(74),B=$e(I),G=a(75),K=$e(G),H=a(57),X=$e(H),J=a(41),ae=$e(J),le=a(28),xe=$e(le),ce=a(59),ve=$e(ce),Pe=a(60),et=$e(Pe),kt=a(61),vt=$e(kt),ee=a(108),ge=$e(ee),ye=a(62),Be=$e(ye);function $e(dt){return dt&&dt.__esModule?dt:{default:dt}}o.default.register({"attributors/attribute/direction":m.DirectionAttribute,"attributors/class/align":d.AlignClass,"attributors/class/background":w.BackgroundClass,"attributors/class/color":j.ColorClass,"attributors/class/direction":m.DirectionClass,"attributors/class/font":b.FontClass,"attributors/class/size":C.SizeClass,"attributors/style/align":d.AlignStyle,"attributors/style/background":w.BackgroundStyle,"attributors/style/color":j.ColorStyle,"attributors/style/direction":m.DirectionStyle,"attributors/style/font":b.FontStyle,"attributors/style/size":C.SizeStyle},!0),o.default.register({"formats/align":d.AlignClass,"formats/direction":m.DirectionClass,"formats/indent":f.IndentClass,"formats/background":w.BackgroundStyle,"formats/color":j.ColorStyle,"formats/font":b.FontClass,"formats/size":C.SizeClass,"formats/blockquote":h.default,"formats/code-block":T.default,"formats/header":u.default,"formats/list":v.default,"formats/bold":R.default,"formats/code":z.Code,"formats/italic":A.default,"formats/link":q.default,"formats/script":D.default,"formats/strike":L.default,"formats/underline":Y.default,"formats/image":W.default,"formats/video":M.default,"formats/list/item":N.ListItem,"modules/formula":B.default,"modules/syntax":K.default,"modules/toolbar":X.default,"themes/bubble":ge.default,"themes/snow":Be.default,"ui/icons":ae.default,"ui/picker":xe.default,"ui/icon-picker":et.default,"ui/color-picker":ve.default,"ui/tooltip":vt.default},!0),r.default=o.default}),(function(n,r,a){Object.defineProperty(r,"__esModule",{value:!0}),r.IndentClass=void 0;var i=(function(){function v(w,j){for(var b=0;b0&&this.children.tail.format(A,E)}},{key:"formats",value:function(){return N({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(A,E){if(A instanceof b)o(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"insertBefore",this).call(this,A,E);else{var q=E==null?this.length():E.offset(this),O=this.split(q);O.parent.insertBefore(A,O)}}},{key:"optimize",value:function(A){o(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"optimize",this).call(this,A);var E=this.next;E!=null&&E.prev===this&&E.statics.blotName===this.statics.blotName&&E.domNode.tagName===this.domNode.tagName&&E.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(E.moveChildren(this),E.remove())}},{key:"replace",value:function(A){if(A.statics.blotName!==this.statics.blotName){var E=m.default.create(this.statics.defaultChild);A.moveChildren(E),this.appendChild(E)}o(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"replace",this).call(this,A)}}]),R})(x.default);C.blotName="list",C.scope=m.default.Scope.BLOCK_BLOT,C.tagName=["OL","UL"],C.defaultChild="list-item",C.allowedChildren=[b],r.ListItem=b,r.default=C}),(function(n,r,a){Object.defineProperty(r,"__esModule",{value:!0});var i=a(56),o=d(i);function d(x){return x&&x.__esModule?x:{default:x}}function m(x,u){if(!(x instanceof u))throw new TypeError("Cannot call a class as a function")}function f(x,u){if(!x)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u&&(typeof u=="object"||typeof u=="function")?u:x}function p(x,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof u);x.prototype=Object.create(u&&u.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),u&&(Object.setPrototypeOf?Object.setPrototypeOf(x,u):x.__proto__=u)}var h=(function(x){p(u,x);function u(){return m(this,u),f(this,(u.__proto__||Object.getPrototypeOf(u)).apply(this,arguments))}return u})(o.default);h.blotName="italic",h.tagName=["EM","I"],r.default=h}),(function(n,r,a){Object.defineProperty(r,"__esModule",{value:!0});var i=(function(){function N(v,w){for(var j=0;j-1?S?this.domNode.setAttribute(C,S):this.domNode.removeAttribute(C):o(j.prototype.__proto__||Object.getPrototypeOf(j.prototype),"format",this).call(this,C,S)}}],[{key:"create",value:function(C){var S=o(j.__proto__||Object.getPrototypeOf(j),"create",this).call(this,C);return typeof C=="string"&&S.setAttribute("src",this.sanitize(C)),S}},{key:"formats",value:function(C){return N.reduce(function(S,R){return C.hasAttribute(R)&&(S[R]=C.getAttribute(R)),S},{})}},{key:"match",value:function(C){return/\.(jpe?g|gif|png)$/.test(C)||/^data:image\/.+;base64/.test(C)}},{key:"sanitize",value:function(C){return(0,f.sanitize)(C,["http","https","data"])?C:"//:0"}},{key:"value",value:function(C){return C.getAttribute("src")}}]),j})(m.default.Embed);v.blotName="image",v.tagName="IMG",r.default=v}),(function(n,r,a){Object.defineProperty(r,"__esModule",{value:!0});var i=(function(){function w(j,b){for(var C=0;C-1?S?this.domNode.setAttribute(C,S):this.domNode.removeAttribute(C):o(j.prototype.__proto__||Object.getPrototypeOf(j.prototype),"format",this).call(this,C,S)}}],[{key:"create",value:function(C){var S=o(j.__proto__||Object.getPrototypeOf(j),"create",this).call(this,C);return S.setAttribute("frameborder","0"),S.setAttribute("allowfullscreen",!0),S.setAttribute("src",this.sanitize(C)),S}},{key:"formats",value:function(C){return N.reduce(function(S,R){return C.hasAttribute(R)&&(S[R]=C.getAttribute(R)),S},{})}},{key:"sanitize",value:function(C){return f.default.sanitize(C)}},{key:"value",value:function(C){return C.getAttribute("src")}}]),j})(d.BlockEmbed);v.blotName="video",v.className="ql-video",v.tagName="IFRAME",r.default=v}),(function(n,r,a){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.FormulaBlot=void 0;var i=(function(){function C(S,R){for(var _=0;_0||this.cachedText==null)&&(this.domNode.innerHTML=q(O),this.domNode.normalize(),this.attach()),this.cachedText=O)}}]),A})(N.default);C.className="ql-syntax";var S=new m.default.Attributor.Class("token","hljs",{scope:m.default.Scope.INLINE}),R=(function(_){b(A,_),i(A,null,[{key:"register",value:function(){p.default.register(S,!0),p.default.register(C,!0)}}]);function A(E,q){w(this,A);var O=j(this,(A.__proto__||Object.getPrototypeOf(A)).call(this,E,q));if(typeof O.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var D=null;return O.quill.on(p.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(D),D=setTimeout(function(){O.highlight(),D=null},O.options.interval)}),O.highlight(),O}return i(A,[{key:"highlight",value:function(){var q=this;if(!this.quill.selection.composing){this.quill.update(p.default.sources.USER);var O=this.quill.getSelection();this.quill.scroll.descendants(C).forEach(function(D){D.highlight(q.options.highlight)}),this.quill.update(p.default.sources.SILENT),O!=null&&this.quill.setSelection(O,p.default.sources.SILENT)}}}]),A})(x.default);R.DEFAULTS={highlight:(function(){return window.hljs==null?null:function(_){var A=window.hljs.highlightAuto(_);return A.value}})(),interval:1e3},r.CodeBlock=C,r.CodeToken=S,r.default=R}),(function(n,r){n.exports=' '}),(function(n,r){n.exports=' '}),(function(n,r){n.exports=' '}),(function(n,r){n.exports=' '}),(function(n,r){n.exports=' '}),(function(n,r){n.exports=' '}),(function(n,r){n.exports=' '}),(function(n,r){n.exports=' '}),(function(n,r){n.exports=' '}),(function(n,r){n.exports=' '}),(function(n,r){n.exports=' '}),(function(n,r){n.exports=' '}),(function(n,r){n.exports=' '}),(function(n,r){n.exports=' '}),(function(n,r){n.exports=' '}),(function(n,r){n.exports=' '}),(function(n,r){n.exports=' '}),(function(n,r){n.exports=' '}),(function(n,r){n.exports=' '}),(function(n,r){n.exports=' '}),(function(n,r){n.exports=' '}),(function(n,r){n.exports=' '}),(function(n,r){n.exports=' '}),(function(n,r){n.exports=' '}),(function(n,r){n.exports=' '}),(function(n,r){n.exports=' '}),(function(n,r){n.exports=' '}),(function(n,r){n.exports=' '}),(function(n,r){n.exports=' '}),(function(n,r){n.exports=' '}),(function(n,r){n.exports=' '}),(function(n,r){n.exports=' '}),(function(n,r,a){Object.defineProperty(r,"__esModule",{value:!0}),r.default=r.BubbleTooltip=void 0;var i=function A(E,q,O){E===null&&(E=Function.prototype);var D=Object.getOwnPropertyDescriptor(E,q);if(D===void 0){var P=Object.getPrototypeOf(E);return P===null?void 0:A(P,q,O)}else{if("value"in D)return D.value;var L=D.get;return L===void 0?void 0:L.call(O)}},o=(function(){function A(E,q){for(var O=0;O0&&Y===p.default.sources.USER){D.show(),D.root.style.left="0px",D.root.style.width="",D.root.style.width=D.root.offsetWidth+"px";var Z=D.quill.getLines(L.index,L.length);if(Z.length===1)D.position(D.quill.getBounds(L));else{var W=Z[Z.length-1],U=D.quill.getIndex(W),M=Math.min(W.length()-1,L.index+L.length-U),z=D.quill.getBounds(new u.Range(U,M));D.position(z)}}else document.activeElement!==D.textbox&&D.quill.hasFocus()&&D.hide()}),D}return o(E,[{key:"listen",value:function(){var O=this;i(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){O.root.classList.remove("ql-editing")}),this.quill.on(p.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!O.root.classList.contains("ql-hidden")){var D=O.quill.getSelection();D!=null&&O.position(O.quill.getBounds(D))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(O){var D=i(E.prototype.__proto__||Object.getPrototypeOf(E.prototype),"position",this).call(this,O),P=this.root.querySelector(".ql-tooltip-arrow");if(P.style.marginLeft="",D===0)return D;P.style.marginLeft=-1*D-P.offsetWidth/2+"px"}}]),E})(h.BaseTooltip);_.TEMPLATE=['','
','','',"
"].join(""),r.BubbleTooltip=_,r.default=R}),(function(n,r,a){n.exports=a(63)})]).default})})(Gm)),Gm.exports}var li,S2;function fG(){if(S2)return li;S2=1;var t=li&&li.__extends||(function(){var p=function(h,x){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,N){u.__proto__=N}||function(u,N){for(var v in N)N.hasOwnProperty(v)&&(u[v]=N[v])},p(h,x)};return function(h,x){p(h,x);function u(){this.constructor=h}h.prototype=x===null?Object.create(x):(u.prototype=x.prototype,new u)}})(),s=li&&li.__assign||function(){return s=Object.assign||function(p){for(var h,x=1,u=arguments.length;x1)throw new Error("The Quill editing area can only be composed of a single React element.");if(a.default.Children.count(x.children)){var N=a.default.Children.only(x.children);if(((u=N)===null||u===void 0?void 0:u.type)==="textarea")throw new Error("Quill does not support editing on a