diff --git a/assets/index-38c34425.css b/assets/index-38c34425.css deleted file mode 100644 index ae3ea1d..0000000 --- a/assets/index-38c34425.css +++ /dev/null @@ -1 +0,0 @@ -@import"https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800;900&display=swap";.vertical-timeline *{-webkit-box-sizing:border-box;box-sizing:border-box}.vertical-timeline{width:95%;max-width:1170px;margin:0 auto;position:relative;padding:2em 0}.vertical-timeline:after{content:"";display:table;clear:both}.vertical-timeline:before{content:"";position:absolute;top:0;left:18px;height:100%;width:4px;background:var(--line-color)}.vertical-timeline.vertical-timeline--one-column-right:before{right:18px;left:unset}@media only screen and (min-width:1170px){.vertical-timeline.vertical-timeline--two-columns{width:90%}.vertical-timeline.vertical-timeline--two-columns:before{left:50%;margin-left:-2px}}.vertical-timeline-element{position:relative;margin:2em 0}.vertical-timeline-element>div{min-height:1px}.vertical-timeline-element:after{content:"";display:table;clear:both}.vertical-timeline-element:first-child{margin-top:0}.vertical-timeline-element:last-child{margin-bottom:0}@media only screen and (min-width:1170px){.vertical-timeline-element{margin:4em 0}.vertical-timeline-element:first-child{margin-top:0}.vertical-timeline-element:last-child{margin-bottom:0}}.vertical-timeline-element-icon{position:absolute;top:0;left:0;width:40px;height:40px;border-radius:50%;-webkit-box-shadow:0 0 0 4px #fff,inset 0 2px 0 rgba(0,0,0,.08),0 3px 0 4px rgba(0,0,0,.05);box-shadow:0 0 0 4px #fff,inset 0 2px #00000014,0 3px 0 4px #0000000d}.vertical-timeline--one-column-right .vertical-timeline-element-icon{right:0;left:unset}.vertical-timeline-element-icon svg{display:block;width:24px;height:24px;position:relative;left:50%;top:50%;margin-left:-12px;margin-top:-12px}@media only screen and (min-width:1170px){.vertical-timeline--two-columns .vertical-timeline-element-icon{width:60px;height:60px;left:50%;margin-left:-30px}}.vertical-timeline-element-icon{-webkit-transform:translateZ(0);-webkit-backface-visibility:hidden}.vertical-timeline--animate .vertical-timeline-element-icon.is-hidden{visibility:hidden}.vertical-timeline--animate .vertical-timeline-element-icon.bounce-in{visibility:visible;-webkit-animation:cd-bounce-1 .6s;animation:cd-bounce-1 .6s}@-webkit-keyframes cd-bounce-1{0%{opacity:0;-webkit-transform:scale(.5)}60%{opacity:1;-webkit-transform:scale(1.2)}to{-webkit-transform:scale(1)}}@keyframes cd-bounce-1{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}60%{opacity:1;-webkit-transform:scale(1.2);transform:scale(1.2)}to{-webkit-transform:scale(1);transform:scale(1)}}.vertical-timeline-element-content{position:relative;margin-left:60px;background:#fff;border-radius:.25em;padding:1em;-webkit-box-shadow:0 3px 0 #ddd;box-shadow:0 3px #ddd}.vertical-timeline--one-column-right .vertical-timeline-element-content{margin-right:60px;margin-left:unset}.vertical-timeline-element--no-children .vertical-timeline-element-content{background:0 0;-webkit-box-shadow:none;box-shadow:none}.vertical-timeline-element-content:after{content:"";display:table;clear:both}.vertical-timeline-element-content h2{color:#303e49}.vertical-timeline-element-content .vertical-timeline-element-date,.vertical-timeline-element-content p{font-size:13px;font-size:.8125rem;font-weight:500}.vertical-timeline-element-content .vertical-timeline-element-date{display:inline-block}.vertical-timeline-element-content p{margin:1em 0 0;line-height:1.6}.vertical-timeline-element-title,.vertical-timeline-element-subtitle{margin:0}.vertical-timeline-element-content .vertical-timeline-element-date{float:left;padding:.8em 0;opacity:.7}.vertical-timeline-element-content-arrow{content:"";position:absolute;top:16px;right:100%;height:0;width:0;border:7px solid transparent;border-right:7px solid #fff}.vertical-timeline--one-column-right .vertical-timeline-element-content-arrow{content:"";position:absolute;top:16px;right:unset;left:100%;height:0;width:0;border:7px solid transparent;border-left:7px solid #fff}.vertical-timeline--one-column-right .vertical-timeline-element-content:before{left:100%;border-left:7px solid #fff;border-right:unset}.vertical-timeline-element--no-children .vertical-timeline-element-content:before{display:none}.vertical-timeline-element--no-children .vertical-timeline-element-content-arrow{display:none}@media only screen and (min-width:768px){.vertical-timeline-element-content h2{font-size:20px;font-size:1.25rem}.vertical-timeline-element-content p{font-size:16px;font-size:1rem}.vertical-timeline-element-content .vertical-timeline-element-date{font-size:14px;font-size:.875rem}}@media only screen and (min-width:1170px){.vertical-timeline--two-columns .vertical-timeline-element-content{margin-left:0;padding:1.5em;width:44%}.vertical-timeline--two-columns .vertical-timeline-element-content-arrow{top:24px;left:100%;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.vertical-timeline--two-columns .vertical-timeline-element-content .vertical-timeline-element-date{position:absolute;width:100%;left:124%;top:6px;font-size:16px;font-size:1rem}.vertical-timeline--two-columns .vertical-timeline-element.vertical-timeline-element--right .vertical-timeline-element-content,.vertical-timeline--two-columns .vertical-timeline-element:nth-child(2n):not(.vertical-timeline-element--left) .vertical-timeline-element-content{float:right}.vertical-timeline--two-columns .vertical-timeline-element.vertical-timeline-element--right .vertical-timeline-element-content-arrow,.vertical-timeline--two-columns .vertical-timeline-element:nth-child(2n):not(.vertical-timeline-element--left) .vertical-timeline-element-content-arrow{top:24px;left:auto;right:100%;-webkit-transform:rotate(0);transform:rotate(0)}.vertical-timeline--one-column-right .vertical-timeline-element.vertical-timeline-element--right .vertical-timeline-element-content-arrow,.vertical-timeline--one-column-right .vertical-timeline-element:nth-child(2n):not(.vertical-timeline-element--left) .vertical-timeline-element-content-arrow{top:24px;left:100%;right:auto;-webkit-transform:rotate(0);transform:rotate(0)}.vertical-timeline--two-columns .vertical-timeline-element.vertical-timeline-element--right .vertical-timeline-element-content .vertical-timeline-element-date,.vertical-timeline--two-columns .vertical-timeline-element:nth-child(2n):not(.vertical-timeline-element--left) .vertical-timeline-element-content .vertical-timeline-element-date{left:auto;right:124%;text-align:right}}.vertical-timeline--animate .vertical-timeline-element-content.is-hidden{visibility:hidden}.vertical-timeline--animate .vertical-timeline-element-content.bounce-in{visibility:visible;-webkit-animation:cd-bounce-2 .6s;animation:cd-bounce-2 .6s}@media only screen and (min-width:1170px){.vertical-timeline--two-columns.vertical-timeline--animate .vertical-timeline-element.vertical-timeline-element--right .vertical-timeline-element-content.bounce-in,.vertical-timeline--two-columns.vertical-timeline--animate .vertical-timeline-element:nth-child(2n):not(.vertical-timeline-element--left) .vertical-timeline-element-content.bounce-in{-webkit-animation:cd-bounce-2-inverse .6s;animation:cd-bounce-2-inverse .6s}}@media only screen and (max-width:1169px){.vertical-timeline--animate .vertical-timeline-element-content.bounce-in{visibility:visible;-webkit-animation:cd-bounce-2-inverse .6s;animation:cd-bounce-2-inverse .6s}}@-webkit-keyframes cd-bounce-2{0%{opacity:0;-webkit-transform:translateX(-100px)}60%{opacity:1;-webkit-transform:translateX(20px)}to{-webkit-transform:translateX(0)}}@keyframes cd-bounce-2{0%{opacity:0;-webkit-transform:translateX(-100px);transform:translate(-100px)}60%{opacity:1;-webkit-transform:translateX(20px);transform:translate(20px)}to{-webkit-transform:translateX(0);transform:translate(0)}}@-webkit-keyframes cd-bounce-2-inverse{0%{opacity:0;-webkit-transform:translateX(100px)}60%{opacity:1;-webkit-transform:translateX(-20px)}to{-webkit-transform:translateX(0)}}@keyframes cd-bounce-2-inverse{0%{opacity:0;-webkit-transform:translateX(100px);transform:translate(100px)}60%{opacity:1;-webkit-transform:translateX(-20px);transform:translate(-20px)}to{-webkit-transform:translateX(0);transform:translate(0)}}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-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";font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-32{bottom:8rem}.right-0{right:0}.right-40{right:10rem}.top-0{top:0}.top-10{top:2.5rem}.top-20{top:5rem}.top-4{top:1rem}.top-40{top:10rem}.top-60{top:15rem}.top-80{top:20rem}.top-\[120px\]{top:120px}.top-\[400px\]{top:400px}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.m-3{margin:.75rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-10{margin-top:2.5rem;margin-bottom:2.5rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-20{margin-top:5rem;margin-bottom:5rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.ml-5{margin-left:1.25rem}.mt-12{margin-top:3rem}.mt-2{margin-top:.5rem}.mt-20{margin-top:5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.flex{display:flex}.grid{display:grid}.hidden{display:none}.h-1\/2{height:50%}.h-10{height:2.5rem}.h-16{height:4rem}.h-3{height:.75rem}.h-40{height:10rem}.h-5{height:1.25rem}.h-\[117px\]{height:117px}.h-\[230px\]{height:230px}.h-\[28px\]{height:28px}.h-\[350px\]{height:350px}.h-\[64px\]{height:64px}.h-\[75\%\]{height:75%}.h-full{height:100%}.h-screen{height:100vh}.min-h-\[280px\]{min-height:280px}.w-1{width:.25rem}.w-1\/2{width:50%}.w-10{width:2.5rem}.w-16{width:4rem}.w-3{width:.75rem}.w-5{width:1.25rem}.w-\[150px\]{width:150px}.w-\[28px\]{width:28px}.w-\[35px\]{width:35px}.w-\[75\%\]{width:75%}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.min-w-\[140px\]{min-width:140px}.max-w-7xl{max-width:80rem}.max-w-full{max-width:100%}.flex-1{flex:1 1 0%}.flex-\[0\.75\]{flex:.75}.cursor-pointer{cursor:pointer}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-evenly{justify-content:space-evenly}.gap-10{gap:2.5rem}.gap-2{gap:.5rem}.gap-5{gap:1.25rem}.gap-8{gap:2rem}.space-x-5>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1.25rem * var(--tw-space-x-reverse));margin-left:calc(1.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.5rem}.rounded-\[20px\]{border-radius:20px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-xl{border-radius:.75rem}.border-4{border-width:4px}.border-none{border-style:none}.border-\[\#373737\]{--tw-border-opacity: 1;border-color:rgb(55 55 55 / var(--tw-border-opacity))}.bg-\[\#373737\]{--tw-bg-opacity: 1;background-color:rgb(55 55 55 / var(--tw-bg-opacity))}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.bg-primary{--tw-bg-opacity: 1;background-color:rgb(246 246 246 / var(--tw-bg-opacity))}.bg-secondary{--tw-bg-opacity: 1;background-color:rgb(55 55 55 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-\[\#f6f6f6\]{--tw-gradient-from: #f6f6f6 var(--tw-gradient-from-position);--tw-gradient-from-position: ;--tw-gradient-to: rgb(246 246 246 / 0) var(--tw-gradient-from-position);--tw-gradient-to-position: ;--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-white{--tw-gradient-from: #fff var(--tw-gradient-from-position);--tw-gradient-from-position: ;--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-from-position);--tw-gradient-to-position: ;--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-primary{--tw-gradient-to: #f6f6f6 var(--tw-gradient-to-position);--tw-gradient-to-position: }.to-white{--tw-gradient-to: #fff var(--tw-gradient-to-position);--tw-gradient-to-position: }.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-2{padding:.5rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.p-\[1px\]{padding:1px}.px-12{padding-left:3rem;padding-right:3rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.pb-10{padding-bottom:2.5rem}.pl-1{padding-left:.25rem}.text-center{text-align:center}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-\[14px\]{font-size:14px}.text-\[16px\]{font-size:16px}.text-\[17px\]{font-size:17px}.text-\[18px\]{font-size:18px}.text-\[200px\]{font-size:200px}.text-\[20px\]{font-size:20px}.text-\[24px\]{font-size:24px}.text-\[30px\]{font-size:30px}.text-\[40px\]{font-size:40px}.text-\[500px\]{font-size:500px}.text-\[70px\]{font-size:70px}.text-\[80px\]{font-size:80px}.text-\[90px\]{font-size:90px}.font-black{font-weight:900}.font-bold{font-weight:700}.font-extrabold{font-weight:800}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-\[30px\]{line-height:30px}.tracking-wider{letter-spacing:.05em}.text-\[\#373737\]{--tw-text-opacity: 1;color:rgb(55 55 55 / var(--tw-text-opacity))}.text-\[\#dfd9ff\]{--tw-text-opacity: 1;color:rgb(223 217 255 / var(--tw-text-opacity))}.text-\[\#fcd4d4\]{--tw-text-opacity: 1;color:rgb(252 212 212 / var(--tw-text-opacity))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-black-100{--tw-text-opacity: 1;color:rgb(16 13 37 / var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-green-800{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity))}.text-orange-600{--tw-text-opacity: 1;color:rgb(234 88 12 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-secondary{--tw-text-opacity: 1;color:rgb(55 55 55 / var(--tw-text-opacity))}.text-slate-600{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-white-100{--tw-text-opacity: 1;color:rgb(243 243 243 / var(--tw-text-opacity))}.text-yellow-600{--tw-text-opacity: 1;color:rgb(202 138 4 / var(--tw-text-opacity))}.underline-offset-8{text-underline-offset:8px}.shadow-card{--tw-shadow: 0px 35px 120px -15px #211e35;--tw-shadow-colored: 0px 35px 120px -15px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[\#fcd4d4\]{--tw-shadow-color: #fcd4d4;--tw-shadow: var(--tw-shadow-colored)}.shadow-primary{--tw-shadow-color: #f6f6f6;--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}*{margin:0;padding:0;box-sizing:border-box;font-family:Poppins,sans-serif;scroll-behavior:smooth}body{background:linear-gradient(180deg,#e6eaf5 0%,#f6f6f6 80%)}.hash-span{margin-top:-100px;padding-bottom:100px;display:block}.black-gradient{background:#000000;background:linear-gradient(to right,#434343,#000000)}.white-gradient{background:#ffffff;background:linear-gradient(to right,#e6eaf5,#f6f6f6)}.violet-gradient{background:#373737;background:linear-gradient(-90deg,#373737 0%,rgba(60,51,80,0) 100%);background:-webkit-linear-gradient(-90deg,#373737 0%,black 100%)}.green-pink-gradient{background:"#00cea8";background:linear-gradient(90.13deg,#00cea8 1.9%,#bf61ff 97.5%);background:-webkit-linear-gradient(-90.13deg,#00cea8 1.9%,#bf61ff 97.5%)}.orange-text-gradient{background:#f12711;background:linear-gradient(to top,#f12711,#f5af19);-webkit-background-clip:text;-webkit-text-fill-color:transparent}.green-text-gradient{background:#11998e;background:linear-gradient(to top,#11998e,#38ef7d);-webkit-background-clip:text;-webkit-text-fill-color:transparent}.blue-text-gradient{background:#56ccf2;background:linear-gradient(to top,#2f80ed,#56ccf2);-webkit-background-clip:text;-webkit-text-fill-color:transparent}.pink-text-gradient{background:#ec008c;background:linear-gradient(to top,#ec008c,#fc6767);-webkit-background-clip:text;-webkit-text-fill-color:transparent}.canvas-loader{font-size:10px;width:1em;height:1em;border-radius:50%;position:relative;text-indent:-9999em;animation:mulShdSpin 1.1s infinite ease;transform:translateZ(0)}@keyframes mulShdSpin{0%,to{box-shadow:0 -2.6em #fff,1.8em -1.8em #fff3,2.5em 0 #fff3,1.75em 1.75em #fff3,0 2.5em #fff3,-1.8em 1.8em #fff3,-2.6em 0 #ffffff80,-1.8em -1.8em #ffffffb3}12.5%{box-shadow:0 -2.6em #ffffffb3,1.8em -1.8em #fff,2.5em 0 #fff3,1.75em 1.75em #fff3,0 2.5em #fff3,-1.8em 1.8em #fff3,-2.6em 0 #fff3,-1.8em -1.8em #ffffff80}25%{box-shadow:0 -2.6em #ffffff80,1.8em -1.8em #ffffffb3,2.5em 0 #fff,1.75em 1.75em #fff3,0 2.5em #fff3,-1.8em 1.8em #fff3,-2.6em 0 #fff3,-1.8em -1.8em #fff3}37.5%{box-shadow:0 -2.6em #fff3,1.8em -1.8em #ffffff80,2.5em 0 #ffffffb3,1.75em 1.75em #fff,0 2.5em #fff3,-1.8em 1.8em #fff3,-2.6em 0 #fff3,-1.8em -1.8em #fff3}50%{box-shadow:0 -2.6em #fff3,1.8em -1.8em #fff3,2.5em 0 #ffffff80,1.75em 1.75em #ffffffb3,0 2.5em #fff,-1.8em 1.8em #fff3,-2.6em 0 #fff3,-1.8em -1.8em #fff3}62.5%{box-shadow:0 -2.6em #fff3,1.8em -1.8em #fff3,2.5em 0 #fff3,1.75em 1.75em #ffffff80,0 2.5em #ffffffb3,-1.8em 1.8em #fff,-2.6em 0 #fff3,-1.8em -1.8em #fff3}75%{box-shadow:0 -2.6em #fff3,1.8em -1.8em #fff3,2.5em 0 #fff3,1.75em 1.75em #fff3,0 2.5em #ffffff80,-1.8em 1.8em #ffffffb3,-2.6em 0 #fff,-1.8em -1.8em #fff3}87.5%{box-shadow:0 -2.6em #fff3,1.8em -1.8em #fff3,2.5em 0 #fff3,1.75em 1.75em #fff3,0 2.5em #fff3,-1.8em 1.8em #ffffff80,-2.6em 0 #ffffffb3,-1.8em -1.8em #fff}}.funky-text-outline{text-shadow:-1px -1px 0 #fff,1px -1px 0 #fff,-1px 1px 0 #fff,1px 1px 0 #fff,2px 2px 0 #fff,-2px -2px 0 #fff,2px -2px 0 #fff,-2px 2px 0 #fff}.funky-text-outline-2{text-shadow:-3px -3px 0 #C0C0C0,3px -3px 0 #C0C0C0,-3px 3px 0 #C0C0C0,3px 3px 0 #C0C0C0}.placeholder\:text-white-100::-moz-placeholder{--tw-text-opacity: 1;color:rgb(243 243 243 / var(--tw-text-opacity))}.placeholder\:text-white-100::placeholder{--tw-text-opacity: 1;color:rgb(243 243 243 / var(--tw-text-opacity))}.hover\:bg-secondary:hover{--tw-bg-opacity: 1;background-color:rgb(55 55 55 / var(--tw-bg-opacity))}.hover\:bg-slate-600:hover{--tw-bg-opacity: 1;background-color:rgb(71 85 105 / var(--tw-bg-opacity))}.hover\:text-black:hover{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.hover\:text-white-100:hover{--tw-text-opacity: 1;color:rgb(243 243 243 / var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}@media (min-width: 450px){.xs\:bottom-10{bottom:2.5rem}.xs\:w-\[250px\]{width:250px}.xs\:text-\[20px\]{font-size:20px}.xs\:text-\[40px\]{font-size:40px}.xs\:text-\[50px\]{font-size:50px}}@media (min-width: 640px){.sm\:right-5{right:1.25rem}.sm\:top-20{top:5rem}.sm\:block{display:block}.sm\:flex{display:flex}.sm\:hidden{display:none}.sm\:h-80{height:20rem}.sm\:w-\[360px\]{width:360px}.sm\:px-16{padding-left:4rem;padding-right:4rem}.sm\:py-16{padding-top:4rem;padding-bottom:4rem}.sm\:text-\[18px\]{font-size:18px}.sm\:text-\[26px\]{font-size:26px}.sm\:text-\[50px\]{font-size:50px}.sm\:text-\[60px\]{font-size:60px}}@media (min-width: 768px){.md\:block{display:block}.md\:h-\[550px\]{height:550px}.md\:w-\[80\%\]{width:80%}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:gap-4{gap:1rem}.md\:text-\[60px\]{font-size:60px}}@media (min-width: 1024px){.lg\:top-\[100px\]{top:100px}.lg\:flex{display:flex}.lg\:h-\[400px\]{height:400px}.lg\:w-\[400px\]{width:400px}.lg\:w-\[70\%\]{width:70%}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:text-\[30px\]{font-size:30px}.lg\:text-\[80px\]{font-size:80px}.lg\:leading-\[40px\]{line-height:40px}.lg\:leading-\[98px\]{line-height:98px}}@media (min-width: 1280px){.xl\:mt-6{margin-top:1.5rem}.xl\:h-auto{height:auto}.xl\:flex-1{flex:1 1 0%}.xl\:flex-row{flex-direction:row}} diff --git a/assets/index-b5374d0b.css b/assets/index-b5374d0b.css new file mode 100644 index 0000000..9c6ef8d --- /dev/null +++ b/assets/index-b5374d0b.css @@ -0,0 +1 @@ +@import"https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800;900&display=swap";.vertical-timeline *{-webkit-box-sizing:border-box;box-sizing:border-box}.vertical-timeline{width:95%;max-width:1170px;margin:0 auto;position:relative;padding:2em 0}.vertical-timeline:after{content:"";display:table;clear:both}.vertical-timeline:before{content:"";position:absolute;top:0;left:18px;height:100%;width:4px;background:var(--line-color)}.vertical-timeline.vertical-timeline--one-column-right:before{right:18px;left:unset}@media only screen and (min-width:1170px){.vertical-timeline.vertical-timeline--two-columns{width:90%}.vertical-timeline.vertical-timeline--two-columns:before{left:50%;margin-left:-2px}}.vertical-timeline-element{position:relative;margin:2em 0}.vertical-timeline-element>div{min-height:1px}.vertical-timeline-element:after{content:"";display:table;clear:both}.vertical-timeline-element:first-child{margin-top:0}.vertical-timeline-element:last-child{margin-bottom:0}@media only screen and (min-width:1170px){.vertical-timeline-element{margin:4em 0}.vertical-timeline-element:first-child{margin-top:0}.vertical-timeline-element:last-child{margin-bottom:0}}.vertical-timeline-element-icon{position:absolute;top:0;left:0;width:40px;height:40px;border-radius:50%;-webkit-box-shadow:0 0 0 4px #fff,inset 0 2px 0 rgba(0,0,0,.08),0 3px 0 4px rgba(0,0,0,.05);box-shadow:0 0 0 4px #fff,inset 0 2px #00000014,0 3px 0 4px #0000000d}.vertical-timeline--one-column-right .vertical-timeline-element-icon{right:0;left:unset}.vertical-timeline-element-icon svg{display:block;width:24px;height:24px;position:relative;left:50%;top:50%;margin-left:-12px;margin-top:-12px}@media only screen and (min-width:1170px){.vertical-timeline--two-columns .vertical-timeline-element-icon{width:60px;height:60px;left:50%;margin-left:-30px}}.vertical-timeline-element-icon{-webkit-transform:translateZ(0);-webkit-backface-visibility:hidden}.vertical-timeline--animate .vertical-timeline-element-icon.is-hidden{visibility:hidden}.vertical-timeline--animate .vertical-timeline-element-icon.bounce-in{visibility:visible;-webkit-animation:cd-bounce-1 .6s;animation:cd-bounce-1 .6s}@-webkit-keyframes cd-bounce-1{0%{opacity:0;-webkit-transform:scale(.5)}60%{opacity:1;-webkit-transform:scale(1.2)}to{-webkit-transform:scale(1)}}@keyframes cd-bounce-1{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}60%{opacity:1;-webkit-transform:scale(1.2);transform:scale(1.2)}to{-webkit-transform:scale(1);transform:scale(1)}}.vertical-timeline-element-content{position:relative;margin-left:60px;background:#fff;border-radius:.25em;padding:1em;-webkit-box-shadow:0 3px 0 #ddd;box-shadow:0 3px #ddd}.vertical-timeline--one-column-right .vertical-timeline-element-content{margin-right:60px;margin-left:unset}.vertical-timeline-element--no-children .vertical-timeline-element-content{background:0 0;-webkit-box-shadow:none;box-shadow:none}.vertical-timeline-element-content:after{content:"";display:table;clear:both}.vertical-timeline-element-content h2{color:#303e49}.vertical-timeline-element-content .vertical-timeline-element-date,.vertical-timeline-element-content p{font-size:13px;font-size:.8125rem;font-weight:500}.vertical-timeline-element-content .vertical-timeline-element-date{display:inline-block}.vertical-timeline-element-content p{margin:1em 0 0;line-height:1.6}.vertical-timeline-element-title,.vertical-timeline-element-subtitle{margin:0}.vertical-timeline-element-content .vertical-timeline-element-date{float:left;padding:.8em 0;opacity:.7}.vertical-timeline-element-content-arrow{content:"";position:absolute;top:16px;right:100%;height:0;width:0;border:7px solid transparent;border-right:7px solid #fff}.vertical-timeline--one-column-right .vertical-timeline-element-content-arrow{content:"";position:absolute;top:16px;right:unset;left:100%;height:0;width:0;border:7px solid transparent;border-left:7px solid #fff}.vertical-timeline--one-column-right .vertical-timeline-element-content:before{left:100%;border-left:7px solid #fff;border-right:unset}.vertical-timeline-element--no-children .vertical-timeline-element-content:before{display:none}.vertical-timeline-element--no-children .vertical-timeline-element-content-arrow{display:none}@media only screen and (min-width:768px){.vertical-timeline-element-content h2{font-size:20px;font-size:1.25rem}.vertical-timeline-element-content p{font-size:16px;font-size:1rem}.vertical-timeline-element-content .vertical-timeline-element-date{font-size:14px;font-size:.875rem}}@media only screen and (min-width:1170px){.vertical-timeline--two-columns .vertical-timeline-element-content{margin-left:0;padding:1.5em;width:44%}.vertical-timeline--two-columns .vertical-timeline-element-content-arrow{top:24px;left:100%;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.vertical-timeline--two-columns .vertical-timeline-element-content .vertical-timeline-element-date{position:absolute;width:100%;left:124%;top:6px;font-size:16px;font-size:1rem}.vertical-timeline--two-columns .vertical-timeline-element.vertical-timeline-element--right .vertical-timeline-element-content,.vertical-timeline--two-columns .vertical-timeline-element:nth-child(2n):not(.vertical-timeline-element--left) .vertical-timeline-element-content{float:right}.vertical-timeline--two-columns .vertical-timeline-element.vertical-timeline-element--right .vertical-timeline-element-content-arrow,.vertical-timeline--two-columns .vertical-timeline-element:nth-child(2n):not(.vertical-timeline-element--left) .vertical-timeline-element-content-arrow{top:24px;left:auto;right:100%;-webkit-transform:rotate(0);transform:rotate(0)}.vertical-timeline--one-column-right .vertical-timeline-element.vertical-timeline-element--right .vertical-timeline-element-content-arrow,.vertical-timeline--one-column-right .vertical-timeline-element:nth-child(2n):not(.vertical-timeline-element--left) .vertical-timeline-element-content-arrow{top:24px;left:100%;right:auto;-webkit-transform:rotate(0);transform:rotate(0)}.vertical-timeline--two-columns .vertical-timeline-element.vertical-timeline-element--right .vertical-timeline-element-content .vertical-timeline-element-date,.vertical-timeline--two-columns .vertical-timeline-element:nth-child(2n):not(.vertical-timeline-element--left) .vertical-timeline-element-content .vertical-timeline-element-date{left:auto;right:124%;text-align:right}}.vertical-timeline--animate .vertical-timeline-element-content.is-hidden{visibility:hidden}.vertical-timeline--animate .vertical-timeline-element-content.bounce-in{visibility:visible;-webkit-animation:cd-bounce-2 .6s;animation:cd-bounce-2 .6s}@media only screen and (min-width:1170px){.vertical-timeline--two-columns.vertical-timeline--animate .vertical-timeline-element.vertical-timeline-element--right .vertical-timeline-element-content.bounce-in,.vertical-timeline--two-columns.vertical-timeline--animate .vertical-timeline-element:nth-child(2n):not(.vertical-timeline-element--left) .vertical-timeline-element-content.bounce-in{-webkit-animation:cd-bounce-2-inverse .6s;animation:cd-bounce-2-inverse .6s}}@media only screen and (max-width:1169px){.vertical-timeline--animate .vertical-timeline-element-content.bounce-in{visibility:visible;-webkit-animation:cd-bounce-2-inverse .6s;animation:cd-bounce-2-inverse .6s}}@-webkit-keyframes cd-bounce-2{0%{opacity:0;-webkit-transform:translateX(-100px)}60%{opacity:1;-webkit-transform:translateX(20px)}to{-webkit-transform:translateX(0)}}@keyframes cd-bounce-2{0%{opacity:0;-webkit-transform:translateX(-100px);transform:translate(-100px)}60%{opacity:1;-webkit-transform:translateX(20px);transform:translate(20px)}to{-webkit-transform:translateX(0);transform:translate(0)}}@-webkit-keyframes cd-bounce-2-inverse{0%{opacity:0;-webkit-transform:translateX(100px)}60%{opacity:1;-webkit-transform:translateX(-20px)}to{-webkit-transform:translateX(0)}}@keyframes cd-bounce-2-inverse{0%{opacity:0;-webkit-transform:translateX(100px);transform:translate(100px)}60%{opacity:1;-webkit-transform:translateX(-20px);transform:translate(-20px)}to{-webkit-transform:translateX(0);transform:translate(0)}}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-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";font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-32{bottom:8rem}.right-0{right:0}.right-40{right:10rem}.top-0{top:0}.top-20{top:5rem}.top-60{top:15rem}.top-\[120px\]{top:120px}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.m-3{margin:.75rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-10{margin-top:2.5rem;margin-bottom:2.5rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-20{margin-top:5rem;margin-bottom:5rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.ml-5{margin-left:1.25rem}.mt-12{margin-top:3rem}.mt-2{margin-top:.5rem}.mt-20{margin-top:5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.flex{display:flex}.grid{display:grid}.hidden{display:none}.h-1\/2{height:50%}.h-10{height:2.5rem}.h-16{height:4rem}.h-3{height:.75rem}.h-40{height:10rem}.h-5{height:1.25rem}.h-\[117px\]{height:117px}.h-\[230px\]{height:230px}.h-\[28px\]{height:28px}.h-\[350px\]{height:350px}.h-\[64px\]{height:64px}.h-\[75\%\]{height:75%}.h-full{height:100%}.h-screen{height:100vh}.min-h-\[280px\]{min-height:280px}.w-1{width:.25rem}.w-1\/2{width:50%}.w-10{width:2.5rem}.w-16{width:4rem}.w-3{width:.75rem}.w-5{width:1.25rem}.w-\[150px\]{width:150px}.w-\[28px\]{width:28px}.w-\[35px\]{width:35px}.w-\[75\%\]{width:75%}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.min-w-\[140px\]{min-width:140px}.max-w-7xl{max-width:80rem}.max-w-full{max-width:100%}.flex-1{flex:1 1 0%}.flex-\[0\.75\]{flex:.75}.cursor-pointer{cursor:pointer}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-evenly{justify-content:space-evenly}.gap-10{gap:2.5rem}.gap-2{gap:.5rem}.gap-5{gap:1.25rem}.gap-8{gap:2rem}.space-x-5>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1.25rem * var(--tw-space-x-reverse));margin-left:calc(1.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.5rem}.rounded-\[20px\]{border-radius:20px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-xl{border-radius:.75rem}.border-4{border-width:4px}.border-none{border-style:none}.border-\[\#373737\]{--tw-border-opacity: 1;border-color:rgb(55 55 55 / var(--tw-border-opacity))}.bg-\[\#373737\]{--tw-bg-opacity: 1;background-color:rgb(55 55 55 / var(--tw-bg-opacity))}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.bg-primary{--tw-bg-opacity: 1;background-color:rgb(246 246 246 / var(--tw-bg-opacity))}.bg-secondary{--tw-bg-opacity: 1;background-color:rgb(55 55 55 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-\[\#f6f6f6\]{--tw-gradient-from: #f6f6f6 var(--tw-gradient-from-position);--tw-gradient-from-position: ;--tw-gradient-to: rgb(246 246 246 / 0) var(--tw-gradient-from-position);--tw-gradient-to-position: ;--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-white{--tw-gradient-from: #fff var(--tw-gradient-from-position);--tw-gradient-from-position: ;--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-from-position);--tw-gradient-to-position: ;--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-primary{--tw-gradient-to: #f6f6f6 var(--tw-gradient-to-position);--tw-gradient-to-position: }.to-white{--tw-gradient-to: #fff var(--tw-gradient-to-position);--tw-gradient-to-position: }.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-2{padding:.5rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.p-\[1px\]{padding:1px}.px-12{padding-left:3rem;padding-right:3rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.pb-10{padding-bottom:2.5rem}.pl-1{padding-left:.25rem}.text-center{text-align:center}.text-\[14px\]{font-size:14px}.text-\[16px\]{font-size:16px}.text-\[17px\]{font-size:17px}.text-\[18px\]{font-size:18px}.text-\[20px\]{font-size:20px}.text-\[24px\]{font-size:24px}.text-\[30px\]{font-size:30px}.text-\[40px\]{font-size:40px}.font-black{font-weight:900}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-\[30px\]{line-height:30px}.tracking-wider{letter-spacing:.05em}.text-\[\#373737\]{--tw-text-opacity: 1;color:rgb(55 55 55 / var(--tw-text-opacity))}.text-\[\#dfd9ff\]{--tw-text-opacity: 1;color:rgb(223 217 255 / var(--tw-text-opacity))}.text-\[\#fcd4d4\]{--tw-text-opacity: 1;color:rgb(252 212 212 / var(--tw-text-opacity))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-black-100{--tw-text-opacity: 1;color:rgb(16 13 37 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-secondary{--tw-text-opacity: 1;color:rgb(55 55 55 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-white-100{--tw-text-opacity: 1;color:rgb(243 243 243 / var(--tw-text-opacity))}.underline-offset-8{text-underline-offset:8px}.shadow-card{--tw-shadow: 0px 35px 120px -15px #211e35;--tw-shadow-colored: 0px 35px 120px -15px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[\#fcd4d4\]{--tw-shadow-color: #fcd4d4;--tw-shadow: var(--tw-shadow-colored)}.shadow-primary{--tw-shadow-color: #f6f6f6;--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}*{margin:0;padding:0;box-sizing:border-box;font-family:Poppins,sans-serif;scroll-behavior:smooth}body{background:linear-gradient(180deg,#e6eaf5 0%,#f6f6f6 80%)}.hash-span{margin-top:-100px;padding-bottom:100px;display:block}.black-gradient{background:#000000;background:linear-gradient(to right,#434343,#000000)}.white-gradient{background:#ffffff;background:linear-gradient(to right,#e6eaf5,#f6f6f6)}.violet-gradient{background:#373737;background:linear-gradient(-90deg,#373737 0%,rgba(60,51,80,0) 100%);background:-webkit-linear-gradient(-90deg,#373737 0%,black 100%)}.green-pink-gradient{background:"#00cea8";background:linear-gradient(90.13deg,#00cea8 1.9%,#bf61ff 97.5%);background:-webkit-linear-gradient(-90.13deg,#00cea8 1.9%,#bf61ff 97.5%)}.orange-text-gradient{background:#f12711;background:linear-gradient(to top,#f12711,#f5af19);-webkit-background-clip:text;-webkit-text-fill-color:transparent}.green-text-gradient{background:#11998e;background:linear-gradient(to top,#11998e,#38ef7d);-webkit-background-clip:text;-webkit-text-fill-color:transparent}.blue-text-gradient{background:#56ccf2;background:linear-gradient(to top,#2f80ed,#56ccf2);-webkit-background-clip:text;-webkit-text-fill-color:transparent}.pink-text-gradient{background:#ec008c;background:linear-gradient(to top,#ec008c,#fc6767);-webkit-background-clip:text;-webkit-text-fill-color:transparent}.canvas-loader{font-size:10px;width:1em;height:1em;border-radius:50%;position:relative;text-indent:-9999em;animation:mulShdSpin 1.1s infinite ease;transform:translateZ(0)}@keyframes mulShdSpin{0%,to{box-shadow:0 -2.6em #fff,1.8em -1.8em #fff3,2.5em 0 #fff3,1.75em 1.75em #fff3,0 2.5em #fff3,-1.8em 1.8em #fff3,-2.6em 0 #ffffff80,-1.8em -1.8em #ffffffb3}12.5%{box-shadow:0 -2.6em #ffffffb3,1.8em -1.8em #fff,2.5em 0 #fff3,1.75em 1.75em #fff3,0 2.5em #fff3,-1.8em 1.8em #fff3,-2.6em 0 #fff3,-1.8em -1.8em #ffffff80}25%{box-shadow:0 -2.6em #ffffff80,1.8em -1.8em #ffffffb3,2.5em 0 #fff,1.75em 1.75em #fff3,0 2.5em #fff3,-1.8em 1.8em #fff3,-2.6em 0 #fff3,-1.8em -1.8em #fff3}37.5%{box-shadow:0 -2.6em #fff3,1.8em -1.8em #ffffff80,2.5em 0 #ffffffb3,1.75em 1.75em #fff,0 2.5em #fff3,-1.8em 1.8em #fff3,-2.6em 0 #fff3,-1.8em -1.8em #fff3}50%{box-shadow:0 -2.6em #fff3,1.8em -1.8em #fff3,2.5em 0 #ffffff80,1.75em 1.75em #ffffffb3,0 2.5em #fff,-1.8em 1.8em #fff3,-2.6em 0 #fff3,-1.8em -1.8em #fff3}62.5%{box-shadow:0 -2.6em #fff3,1.8em -1.8em #fff3,2.5em 0 #fff3,1.75em 1.75em #ffffff80,0 2.5em #ffffffb3,-1.8em 1.8em #fff,-2.6em 0 #fff3,-1.8em -1.8em #fff3}75%{box-shadow:0 -2.6em #fff3,1.8em -1.8em #fff3,2.5em 0 #fff3,1.75em 1.75em #fff3,0 2.5em #ffffff80,-1.8em 1.8em #ffffffb3,-2.6em 0 #fff,-1.8em -1.8em #fff3}87.5%{box-shadow:0 -2.6em #fff3,1.8em -1.8em #fff3,2.5em 0 #fff3,1.75em 1.75em #fff3,0 2.5em #fff3,-1.8em 1.8em #ffffff80,-2.6em 0 #ffffffb3,-1.8em -1.8em #fff}}.funky-text-outline{text-shadow:-1px -1px 0 #fff,1px -1px 0 #fff,-1px 1px 0 #fff,1px 1px 0 #fff,2px 2px 0 #fff,-2px -2px 0 #fff,2px -2px 0 #fff,-2px 2px 0 #fff}.funky-text-outline-2{text-shadow:-3px -3px 0 #C0C0C0,3px -3px 0 #C0C0C0,-3px 3px 0 #C0C0C0,3px 3px 0 #C0C0C0}.placeholder\:text-white-100::-moz-placeholder{--tw-text-opacity: 1;color:rgb(243 243 243 / var(--tw-text-opacity))}.placeholder\:text-white-100::placeholder{--tw-text-opacity: 1;color:rgb(243 243 243 / var(--tw-text-opacity))}.hover\:bg-secondary:hover{--tw-bg-opacity: 1;background-color:rgb(55 55 55 / var(--tw-bg-opacity))}.hover\:bg-slate-600:hover{--tw-bg-opacity: 1;background-color:rgb(71 85 105 / var(--tw-bg-opacity))}.hover\:text-black:hover{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.hover\:text-white-100:hover{--tw-text-opacity: 1;color:rgb(243 243 243 / var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}@media (min-width: 450px){.xs\:bottom-10{bottom:2.5rem}.xs\:w-\[250px\]{width:250px}.xs\:text-\[20px\]{font-size:20px}.xs\:text-\[40px\]{font-size:40px}.xs\:text-\[50px\]{font-size:50px}}@media (min-width: 640px){.sm\:right-5{right:1.25rem}.sm\:top-20{top:5rem}.sm\:block{display:block}.sm\:flex{display:flex}.sm\:hidden{display:none}.sm\:h-80{height:20rem}.sm\:w-\[360px\]{width:360px}.sm\:px-16{padding-left:4rem;padding-right:4rem}.sm\:py-16{padding-top:4rem;padding-bottom:4rem}.sm\:text-\[18px\]{font-size:18px}.sm\:text-\[26px\]{font-size:26px}.sm\:text-\[50px\]{font-size:50px}.sm\:text-\[60px\]{font-size:60px}}@media (min-width: 768px){.md\:block{display:block}.md\:h-\[550px\]{height:550px}.md\:w-\[80\%\]{width:80%}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:gap-4{gap:1rem}.md\:text-\[60px\]{font-size:60px}}@media (min-width: 1024px){.lg\:top-\[100px\]{top:100px}.lg\:flex{display:flex}.lg\:h-\[400px\]{height:400px}.lg\:w-\[400px\]{width:400px}.lg\:w-\[70\%\]{width:70%}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:text-\[30px\]{font-size:30px}.lg\:text-\[80px\]{font-size:80px}.lg\:leading-\[40px\]{line-height:40px}.lg\:leading-\[98px\]{line-height:98px}}@media (min-width: 1280px){.xl\:mt-6{margin-top:1.5rem}.xl\:h-auto{height:auto}.xl\:flex-1{flex:1 1 0%}.xl\:flex-row{flex-direction:row}} diff --git a/assets/index-bc51c3ff.js b/assets/index-c4f48c1c.js similarity index 84% rename from assets/index-bc51c3ff.js rename to assets/index-c4f48c1c.js index d8218b7..b0bf819 100644 --- a/assets/index-bc51c3ff.js +++ b/assets/index-c4f48c1c.js @@ -6,7 +6,7 @@ function tD(n,e){for(var t=0;t"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),xy=Object.prototype.hasOwnProperty,ED=/^[: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]*$/,SM={},wM={};function bD(n){return xy.call(wM,n)?!0:xy.call(SM,n)?!1:ED.test(n)?wM[n]=!0:(SM[n]=!0,!1)}function TD(n,e,t,i){if(t!==null&&t.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return i?!1:t!==null?!t.acceptsBooleans:(n=n.toLowerCase().slice(0,5),n!=="data-"&&n!=="aria-");default:return!1}}function CD(n,e,t,i){if(e===null||typeof e>"u"||TD(n,e,t,i))return!0;if(i)return!1;if(t!==null)switch(t.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function vi(n,e,t,i,r,s,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=i,this.attributeNamespace=r,this.mustUseProperty=t,this.propertyName=n,this.type=e,this.sanitizeURL=s,this.removeEmptyString=o}var jn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(n){jn[n]=new vi(n,0,!1,n,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(n){var e=n[0];jn[e]=new vi(e,1,!1,n[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(n){jn[n]=new vi(n,2,!1,n.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(n){jn[n]=new vi(n,2,!1,n,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(n){jn[n]=new vi(n,3,!1,n.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(n){jn[n]=new vi(n,3,!0,n,null,!1,!1)});["capture","download"].forEach(function(n){jn[n]=new vi(n,4,!1,n,null,!1,!1)});["cols","rows","size","span"].forEach(function(n){jn[n]=new vi(n,6,!1,n,null,!1,!1)});["rowSpan","start"].forEach(function(n){jn[n]=new vi(n,5,!1,n.toLowerCase(),null,!1,!1)});var P_=/[\-:]([a-z])/g;function L_(n){return n[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(n){var e=n.replace(P_,L_);jn[e]=new vi(e,1,!1,n,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(n){var e=n.replace(P_,L_);jn[e]=new vi(e,1,!1,n,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(n){var e=n.replace(P_,L_);jn[e]=new vi(e,1,!1,n,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(n){jn[n]=new vi(n,1,!1,n.toLowerCase(),null,!1,!1)});jn.xlinkHref=new vi("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(n){jn[n]=new vi(n,1,!1,n.toLowerCase(),null,!0,!0)});function R_(n,e,t,i){var r=jn.hasOwnProperty(e)?jn[e]:null;(r!==null?r.type!==0:i||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),xy=Object.prototype.hasOwnProperty,ED=/^[: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]*$/,SM={},wM={};function bD(n){return xy.call(wM,n)?!0:xy.call(SM,n)?!1:ED.test(n)?wM[n]=!0:(SM[n]=!0,!1)}function TD(n,e,t,i){if(t!==null&&t.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return i?!1:t!==null?!t.acceptsBooleans:(n=n.toLowerCase().slice(0,5),n!=="data-"&&n!=="aria-");default:return!1}}function CD(n,e,t,i){if(e===null||typeof e>"u"||TD(n,e,t,i))return!0;if(i)return!1;if(t!==null)switch(t.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function vi(n,e,t,i,r,s,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=i,this.attributeNamespace=r,this.mustUseProperty=t,this.propertyName=n,this.type=e,this.sanitizeURL=s,this.removeEmptyString=o}var jn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(n){jn[n]=new vi(n,0,!1,n,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(n){var e=n[0];jn[e]=new vi(e,1,!1,n[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(n){jn[n]=new vi(n,2,!1,n.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(n){jn[n]=new vi(n,2,!1,n,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(n){jn[n]=new vi(n,3,!1,n.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(n){jn[n]=new vi(n,3,!0,n,null,!1,!1)});["capture","download"].forEach(function(n){jn[n]=new vi(n,4,!1,n,null,!1,!1)});["cols","rows","size","span"].forEach(function(n){jn[n]=new vi(n,6,!1,n,null,!1,!1)});["rowSpan","start"].forEach(function(n){jn[n]=new vi(n,5,!1,n.toLowerCase(),null,!1,!1)});var P_=/[\-:]([a-z])/g;function L_(n){return n[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(n){var e=n.replace(P_,L_);jn[e]=new vi(e,1,!1,n,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(n){var e=n.replace(P_,L_);jn[e]=new vi(e,1,!1,n,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(n){var e=n.replace(P_,L_);jn[e]=new vi(e,1,!1,n,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(n){jn[n]=new vi(n,1,!1,n.toLowerCase(),null,!1,!1)});jn.xlinkHref=new vi("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(n){jn[n]=new vi(n,1,!1,n.toLowerCase(),null,!0,!0)});function R_(n,e,t,i){var r=jn.hasOwnProperty(e)?jn[e]:null;(r!==null?r.type!==0:i||!(2a||r[o]!==s[a]){var l=` -`+r[o].replace(" at new "," at ");return n.displayName&&l.includes("")&&(l=l.replace("",n.displayName)),l}while(1<=o&&0<=a);break}}}finally{X0=!1,Error.prepareStackTrace=t}return(n=n?n.displayName||n.name:"")?zc(n):""}function PD(n){switch(n.tag){case 5:return zc(n.type);case 16:return zc("Lazy");case 13:return zc("Suspense");case 19:return zc("SuspenseList");case 0:case 2:case 15:return n=Y0(n.type,!1),n;case 11:return n=Y0(n.type.render,!1),n;case 1:return n=Y0(n.type,!0),n;default:return""}}function My(n){if(n==null)return null;if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case jl:return"Fragment";case Gl:return"Portal";case _y:return"Profiler";case I_:return"StrictMode";case Sy:return"Suspense";case wy:return"SuspenseList"}if(typeof n=="object")switch(n.$$typeof){case eC:return(n.displayName||"Context")+".Consumer";case $T:return(n._context.displayName||"Context")+".Provider";case D_:var e=n.render;return n=n.displayName,n||(n=e.displayName||e.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case k_:return e=n.displayName||null,e!==null?e:My(n.type)||"Memo";case co:e=n._payload,n=n._init;try{return My(n(e))}catch{}}return null}function LD(n){var e=n.type;switch(n.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return n=e.render,n=n.displayName||n.name||"",e.displayName||(n!==""?"ForwardRef("+n+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return My(e);case 8:return e===I_?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function ko(n){switch(typeof n){case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function nC(n){var e=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function RD(n){var e=nC(n)?"checked":"value",t=Object.getOwnPropertyDescriptor(n.constructor.prototype,e),i=""+n[e];if(!n.hasOwnProperty(e)&&typeof t<"u"&&typeof t.get=="function"&&typeof t.set=="function"){var r=t.get,s=t.set;return Object.defineProperty(n,e,{configurable:!0,get:function(){return r.call(this)},set:function(o){i=""+o,s.call(this,o)}}),Object.defineProperty(n,e,{enumerable:t.enumerable}),{getValue:function(){return i},setValue:function(o){i=""+o},stopTracking:function(){n._valueTracker=null,delete n[e]}}}}function Pd(n){n._valueTracker||(n._valueTracker=RD(n))}function iC(n){if(!n)return!1;var e=n._valueTracker;if(!e)return!0;var t=e.getValue(),i="";return n&&(i=nC(n)?n.checked?"true":"false":n.value),n=i,n!==t?(e.setValue(n),!0):!1}function om(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}function Ay(n,e){var t=e.checked;return sn({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:t??n._wrapperState.initialChecked})}function AM(n,e){var t=e.defaultValue==null?"":e.defaultValue,i=e.checked!=null?e.checked:e.defaultChecked;t=ko(e.value!=null?e.value:t),n._wrapperState={initialChecked:i,initialValue:t,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function rC(n,e){e=e.checked,e!=null&&R_(n,"checked",e,!1)}function Ey(n,e){rC(n,e);var t=ko(e.value),i=e.type;if(t!=null)i==="number"?(t===0&&n.value===""||n.value!=t)&&(n.value=""+t):n.value!==""+t&&(n.value=""+t);else if(i==="submit"||i==="reset"){n.removeAttribute("value");return}e.hasOwnProperty("value")?by(n,e.type,t):e.hasOwnProperty("defaultValue")&&by(n,e.type,ko(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(n.defaultChecked=!!e.defaultChecked)}function EM(n,e,t){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var i=e.type;if(!(i!=="submit"&&i!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+n._wrapperState.initialValue,t||e===n.value||(n.value=e),n.defaultValue=e}t=n.name,t!==""&&(n.name=""),n.defaultChecked=!!n._wrapperState.initialChecked,t!==""&&(n.name=t)}function by(n,e,t){(e!=="number"||om(n.ownerDocument)!==n)&&(t==null?n.defaultValue=""+n._wrapperState.initialValue:n.defaultValue!==""+t&&(n.defaultValue=""+t))}var Fc=Array.isArray;function hu(n,e,t,i){if(n=n.options,e){e={};for(var r=0;r"+e.valueOf().toString()+"",e=Ld.firstChild;n.firstChild;)n.removeChild(n.firstChild);for(;e.firstChild;)n.appendChild(e.firstChild)}});function hf(n,e){if(e){var t=n.firstChild;if(t&&t===n.lastChild&&t.nodeType===3){t.nodeValue=e;return}}n.textContent=e}var jc={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},ID=["Webkit","ms","Moz","O"];Object.keys(jc).forEach(function(n){ID.forEach(function(e){e=e+n.charAt(0).toUpperCase()+n.substring(1),jc[e]=jc[n]})});function lC(n,e,t){return e==null||typeof e=="boolean"||e===""?"":t||typeof e!="number"||e===0||jc.hasOwnProperty(n)&&jc[n]?(""+e).trim():e+"px"}function uC(n,e){n=n.style;for(var t in e)if(e.hasOwnProperty(t)){var i=t.indexOf("--")===0,r=lC(t,e[t],i);t==="float"&&(t="cssFloat"),i?n.setProperty(t,r):n[t]=r}}var DD=sn({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 Py(n,e){if(e){if(DD[n]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(Ce(137,n));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(Ce(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(Ce(61))}if(e.style!=null&&typeof e.style!="object")throw Error(Ce(62))}}function Ly(n,e){if(n.indexOf("-")===-1)return typeof e.is=="string";switch(n){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 Ry=null;function N_(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var Iy=null,du=null,pu=null;function CM(n){if(n=nh(n)){if(typeof Iy!="function")throw Error(Ce(280));var e=n.stateNode;e&&(e=Km(e),Iy(n.stateNode,n.type,e))}}function cC(n){du?pu?pu.push(n):pu=[n]:du=n}function fC(){if(du){var n=du,e=pu;if(pu=du=null,CM(n),e)for(n=0;n>>=0,n===0?32:31-(GD(n)/jD|0)|0}var Rd=64,Id=4194304;function Bc(n){switch(n&-n){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 n&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return n&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return n}}function cm(n,e){var t=n.pendingLanes;if(t===0)return 0;var i=0,r=n.suspendedLanes,s=n.pingedLanes,o=t&268435455;if(o!==0){var a=o&~r;a!==0?i=Bc(a):(s&=o,s!==0&&(i=Bc(s)))}else o=t&~r,o!==0?i=Bc(o):s!==0&&(i=Bc(s));if(i===0)return 0;if(e!==0&&e!==i&&!(e&r)&&(r=i&-i,s=e&-e,r>=s||r===16&&(s&4194240)!==0))return e;if(i&4&&(i|=t&16),e=n.entangledLanes,e!==0)for(n=n.entanglements,e&=i;0t;t++)e.push(n);return e}function eh(n,e,t){n.pendingLanes|=e,e!==536870912&&(n.suspendedLanes=0,n.pingedLanes=0),n=n.eventTimes,e=31-Ir(e),n[e]=t}function ZD(n,e){var t=n.pendingLanes&~e;n.pendingLanes=e,n.suspendedLanes=0,n.pingedLanes=0,n.expiredLanes&=e,n.mutableReadLanes&=e,n.entangledLanes&=e,e=n.entanglements;var i=n.eventTimes;for(n=n.expirationTimes;0=Yc),UM=String.fromCharCode(32),zM=!1;function RC(n,e){switch(n){case"keyup":return Mk.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function IC(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var Xl=!1;function Ek(n,e){switch(n){case"compositionend":return IC(e);case"keypress":return e.which!==32?null:(zM=!0,UM);case"textInput":return n=e.data,n===UM&&zM?null:n;default:return null}}function bk(n,e){if(Xl)return n==="compositionend"||!W_&&RC(n,e)?(n=PC(),Hp=B_=vo=null,Xl=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:t,offset:e-n};n=i}e:{for(;t;){if(t.nextSibling){t=t.nextSibling;break e}t=t.parentNode}t=void 0}t=HM(t)}}function OC(n,e){return n&&e?n===e?!0:n&&n.nodeType===3?!1:e&&e.nodeType===3?OC(n,e.parentNode):"contains"in n?n.contains(e):n.compareDocumentPosition?!!(n.compareDocumentPosition(e)&16):!1:!1}function UC(){for(var n=window,e=om();e instanceof n.HTMLIFrameElement;){try{var t=typeof e.contentWindow.location.href=="string"}catch{t=!1}if(t)n=e.contentWindow;else break;e=om(n.document)}return e}function G_(n){var e=n&&n.nodeName&&n.nodeName.toLowerCase();return e&&(e==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||e==="textarea"||n.contentEditable==="true")}function Nk(n){var e=UC(),t=n.focusedElem,i=n.selectionRange;if(e!==t&&t&&t.ownerDocument&&OC(t.ownerDocument.documentElement,t)){if(i!==null&&G_(t)){if(e=i.start,n=i.end,n===void 0&&(n=e),"selectionStart"in t)t.selectionStart=e,t.selectionEnd=Math.min(n,t.value.length);else if(n=(e=t.ownerDocument||document)&&e.defaultView||window,n.getSelection){n=n.getSelection();var r=t.textContent.length,s=Math.min(i.start,r);i=i.end===void 0?s:Math.min(i.end,r),!n.extend&&s>i&&(r=i,i=s,s=r),r=WM(t,s);var o=WM(t,i);r&&o&&(n.rangeCount!==1||n.anchorNode!==r.node||n.anchorOffset!==r.offset||n.focusNode!==o.node||n.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(r.node,r.offset),n.removeAllRanges(),s>i?(n.addRange(e),n.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),n.addRange(e)))}}for(e=[],n=t;n=n.parentNode;)n.nodeType===1&&e.push({element:n,left:n.scrollLeft,top:n.scrollTop});for(typeof t.focus=="function"&&t.focus(),t=0;t=document.documentMode,Yl=null,zy=null,Zc=null,Fy=!1;function GM(n,e,t){var i=t.window===t?t.document:t.nodeType===9?t:t.ownerDocument;Fy||Yl==null||Yl!==om(i)||(i=Yl,"selectionStart"in i&&G_(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),Zc&&yf(Zc,i)||(Zc=i,i=dm(zy,"onSelect"),0Jl||(n.current=jy[Jl],jy[Jl]=null,Jl--)}function Gt(n,e){Jl++,jy[Jl]=n.current,n.current=e}var No={},si=Wo(No),Ci=Wo(!1),Fa=No;function wu(n,e){var t=n.type.contextTypes;if(!t)return No;var i=n.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===e)return i.__reactInternalMemoizedMaskedChildContext;var r={},s;for(s in t)r[s]=e[s];return i&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=e,n.__reactInternalMemoizedMaskedChildContext=r),r}function Pi(n){return n=n.childContextTypes,n!=null}function mm(){Xt(Ci),Xt(si)}function KM(n,e,t){if(si.current!==No)throw Error(Ce(168));Gt(si,e),Gt(Ci,t)}function XC(n,e,t){var i=n.stateNode;if(e=e.childContextTypes,typeof i.getChildContext!="function")return t;i=i.getChildContext();for(var r in i)if(!(r in e))throw Error(Ce(108,LD(n)||"Unknown",r));return sn({},t,i)}function gm(n){return n=(n=n.stateNode)&&n.__reactInternalMemoizedMergedChildContext||No,Fa=si.current,Gt(si,n),Gt(Ci,Ci.current),!0}function QM(n,e,t){var i=n.stateNode;if(!i)throw Error(Ce(169));t?(n=XC(n,e,Fa),i.__reactInternalMemoizedMergedChildContext=n,Xt(Ci),Xt(si),Gt(si,n)):Xt(Ci),Gt(Ci,t)}var Ms=null,Qm=!1,av=!1;function YC(n){Ms===null?Ms=[n]:Ms.push(n)}function Yk(n){Qm=!0,YC(n)}function Go(){if(!av&&Ms!==null){av=!0;var n=0,e=kt;try{var t=Ms;for(kt=1;n>=o,r-=o,bs=1<<32-Ir(e)+r|t<L?(C=I,I=null):C=I.sibling;var R=p(m,I,w[L],A);if(R===null){I===null&&(I=C);break}n&&I&&R.alternate===null&&e(m,I),S=s(R,S,L),P===null?b=R:P.sibling=R,P=R,I=C}if(L===w.length)return t(m,I),Kt&&ma(m,L),b;if(I===null){for(;LL?(C=I,I=null):C=I.sibling;var W=p(m,I,R.value,A);if(W===null){I===null&&(I=C);break}n&&I&&W.alternate===null&&e(m,I),S=s(W,S,L),P===null?b=W:P.sibling=W,P=W,I=C}if(R.done)return t(m,I),Kt&&ma(m,L),b;if(I===null){for(;!R.done;L++,R=w.next())R=d(m,R.value,A),R!==null&&(S=s(R,S,L),P===null?b=R:P.sibling=R,P=R);return Kt&&ma(m,L),b}for(I=i(m,I);!R.done;L++,R=w.next())R=v(I,m,L,R.value,A),R!==null&&(n&&R.alternate!==null&&I.delete(R.key===null?L:R.key),S=s(R,S,L),P===null?b=R:P.sibling=R,P=R);return n&&I.forEach(function(J){return e(m,J)}),Kt&&ma(m,L),b}function M(m,S,w,A){if(typeof w=="object"&&w!==null&&w.type===jl&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case Cd:e:{for(var b=w.key,P=S;P!==null;){if(P.key===b){if(b=w.type,b===jl){if(P.tag===7){t(m,P.sibling),S=r(P,w.props.children),S.return=m,m=S;break e}}else if(P.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===co&&sA(b)===P.type){t(m,P.sibling),S=r(P,w.props),S.ref=yc(m,P,w),S.return=m,m=S;break e}t(m,P);break}else e(m,P);P=P.sibling}w.type===jl?(S=Da(w.props.children,m.mode,A,w.key),S.return=m,m=S):(A=Jp(w.type,w.key,w.props,null,m.mode,A),A.ref=yc(m,S,w),A.return=m,m=A)}return o(m);case Gl:e:{for(P=w.key;S!==null;){if(S.key===P)if(S.tag===4&&S.stateNode.containerInfo===w.containerInfo&&S.stateNode.implementation===w.implementation){t(m,S.sibling),S=r(S,w.children||[]),S.return=m,m=S;break e}else{t(m,S);break}else e(m,S);S=S.sibling}S=mv(w,m.mode,A),S.return=m,m=S}return o(m);case co:return P=w._init,M(m,S,P(w._payload),A)}if(Fc(w))return y(m,S,w,A);if(dc(w))return _(m,S,w,A);Fd(m,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,S!==null&&S.tag===6?(t(m,S.sibling),S=r(S,w),S.return=m,m=S):(t(m,S),S=pv(w,m.mode,A),S.return=m,m=S),o(m)):t(m,S)}return M}var Au=t2(!0),n2=t2(!1),ih={},$r=Wo(ih),wf=Wo(ih),Mf=Wo(ih);function ba(n){if(n===ih)throw Error(Ce(174));return n}function $_(n,e){switch(Gt(Mf,e),Gt(wf,n),Gt($r,ih),n=e.nodeType,n){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Cy(null,"");break;default:n=n===8?e.parentNode:e,e=n.namespaceURI||null,n=n.tagName,e=Cy(e,n)}Xt($r),Gt($r,e)}function Eu(){Xt($r),Xt(wf),Xt(Mf)}function i2(n){ba(Mf.current);var e=ba($r.current),t=Cy(e,n.type);e!==t&&(Gt(wf,n),Gt($r,t))}function e1(n){wf.current===n&&(Xt($r),Xt(wf))}var $t=Wo(0);function wm(n){for(var e=n;e!==null;){if(e.tag===13){var t=e.memoizedState;if(t!==null&&(t=t.dehydrated,t===null||t.data==="$?"||t.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break;for(;e.sibling===null;){if(e.return===null||e.return===n)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var lv=[];function t1(){for(var n=0;nt?t:4,n(!0);var i=uv.transition;uv.transition={};try{n(!1),e()}finally{kt=t,uv.transition=i}}function x2(){return pr().memoizedState}function Kk(n,e,t){var i=Co(n);if(t={lane:i,action:t,hasEagerState:!1,eagerState:null,next:null},_2(n))S2(e,t);else if(t=KC(n,e,t,i),t!==null){var r=pi();Dr(t,n,i,r),w2(t,e,i)}}function Qk(n,e,t){var i=Co(n),r={lane:i,action:t,hasEagerState:!1,eagerState:null,next:null};if(_2(n))S2(e,r);else{var s=n.alternate;if(n.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var o=e.lastRenderedState,a=s(o,t);if(r.hasEagerState=!0,r.eagerState=a,Nr(a,o)){var l=e.interleaved;l===null?(r.next=r,K_(e)):(r.next=l.next,l.next=r),e.interleaved=r;return}}catch{}finally{}t=KC(n,e,r,i),t!==null&&(r=pi(),Dr(t,n,i,r),w2(t,e,i))}}function _2(n){var e=n.alternate;return n===rn||e!==null&&e===rn}function S2(n,e){Jc=Mm=!0;var t=n.pending;t===null?e.next=e:(e.next=t.next,t.next=e),n.pending=e}function w2(n,e,t){if(t&4194240){var i=e.lanes;i&=n.pendingLanes,t|=i,e.lanes=t,U_(n,t)}}var Am={readContext:dr,useCallback:Qn,useContext:Qn,useEffect:Qn,useImperativeHandle:Qn,useInsertionEffect:Qn,useLayoutEffect:Qn,useMemo:Qn,useReducer:Qn,useRef:Qn,useState:Qn,useDebugValue:Qn,useDeferredValue:Qn,useTransition:Qn,useMutableSource:Qn,useSyncExternalStore:Qn,useId:Qn,unstable_isNewReconciler:!1},$k={readContext:dr,useCallback:function(n,e){return Zr().memoizedState=[n,e===void 0?null:e],n},useContext:dr,useEffect:aA,useImperativeHandle:function(n,e,t){return t=t!=null?t.concat([n]):null,Xp(4194308,4,p2.bind(null,e,n),t)},useLayoutEffect:function(n,e){return Xp(4194308,4,n,e)},useInsertionEffect:function(n,e){return Xp(4,2,n,e)},useMemo:function(n,e){var t=Zr();return e=e===void 0?null:e,n=n(),t.memoizedState=[n,e],n},useReducer:function(n,e,t){var i=Zr();return e=t!==void 0?t(e):e,i.memoizedState=i.baseState=e,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:e},i.queue=n,n=n.dispatch=Kk.bind(null,rn,n),[i.memoizedState,n]},useRef:function(n){var e=Zr();return n={current:n},e.memoizedState=n},useState:oA,useDebugValue:o1,useDeferredValue:function(n){return Zr().memoizedState=n},useTransition:function(){var n=oA(!1),e=n[0];return n=Jk.bind(null,n[1]),Zr().memoizedState=n,[e,n]},useMutableSource:function(){},useSyncExternalStore:function(n,e,t){var i=rn,r=Zr();if(Kt){if(t===void 0)throw Error(Ce(407));t=t()}else{if(t=e(),Fn===null)throw Error(Ce(349));Va&30||o2(i,e,t)}r.memoizedState=t;var s={value:t,getSnapshot:e};return r.queue=s,aA(l2.bind(null,i,s,n),[n]),i.flags|=2048,bf(9,a2.bind(null,i,s,t,e),void 0,null),t},useId:function(){var n=Zr(),e=Fn.identifierPrefix;if(Kt){var t=Ts,i=bs;t=(i&~(1<<32-Ir(i)-1)).toString(32)+t,e=":"+e+"R"+t,t=Af++,0")&&(l=l.replace("",n.displayName)),l}while(1<=o&&0<=a);break}}}finally{j0=!1,Error.prepareStackTrace=t}return(n=n?n.displayName||n.name:"")?zc(n):""}function PD(n){switch(n.tag){case 5:return zc(n.type);case 16:return zc("Lazy");case 13:return zc("Suspense");case 19:return zc("SuspenseList");case 0:case 2:case 15:return n=X0(n.type,!1),n;case 11:return n=X0(n.type.render,!1),n;case 1:return n=X0(n.type,!0),n;default:return""}}function My(n){if(n==null)return null;if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case jl:return"Fragment";case Gl:return"Portal";case _y:return"Profiler";case I_:return"StrictMode";case Sy:return"Suspense";case wy:return"SuspenseList"}if(typeof n=="object")switch(n.$$typeof){case eC:return(n.displayName||"Context")+".Consumer";case $T:return(n._context.displayName||"Context")+".Provider";case D_:var e=n.render;return n=n.displayName,n||(n=e.displayName||e.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case k_:return e=n.displayName||null,e!==null?e:My(n.type)||"Memo";case co:e=n._payload,n=n._init;try{return My(n(e))}catch{}}return null}function LD(n){var e=n.type;switch(n.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return n=e.render,n=n.displayName||n.name||"",e.displayName||(n!==""?"ForwardRef("+n+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return My(e);case 8:return e===I_?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function ko(n){switch(typeof n){case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function nC(n){var e=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function RD(n){var e=nC(n)?"checked":"value",t=Object.getOwnPropertyDescriptor(n.constructor.prototype,e),i=""+n[e];if(!n.hasOwnProperty(e)&&typeof t<"u"&&typeof t.get=="function"&&typeof t.set=="function"){var r=t.get,s=t.set;return Object.defineProperty(n,e,{configurable:!0,get:function(){return r.call(this)},set:function(o){i=""+o,s.call(this,o)}}),Object.defineProperty(n,e,{enumerable:t.enumerable}),{getValue:function(){return i},setValue:function(o){i=""+o},stopTracking:function(){n._valueTracker=null,delete n[e]}}}}function Ld(n){n._valueTracker||(n._valueTracker=RD(n))}function iC(n){if(!n)return!1;var e=n._valueTracker;if(!e)return!0;var t=e.getValue(),i="";return n&&(i=nC(n)?n.checked?"true":"false":n.value),n=i,n!==t?(e.setValue(n),!0):!1}function om(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}function Ay(n,e){var t=e.checked;return sn({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:t??n._wrapperState.initialChecked})}function AM(n,e){var t=e.defaultValue==null?"":e.defaultValue,i=e.checked!=null?e.checked:e.defaultChecked;t=ko(e.value!=null?e.value:t),n._wrapperState={initialChecked:i,initialValue:t,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function rC(n,e){e=e.checked,e!=null&&R_(n,"checked",e,!1)}function Ey(n,e){rC(n,e);var t=ko(e.value),i=e.type;if(t!=null)i==="number"?(t===0&&n.value===""||n.value!=t)&&(n.value=""+t):n.value!==""+t&&(n.value=""+t);else if(i==="submit"||i==="reset"){n.removeAttribute("value");return}e.hasOwnProperty("value")?by(n,e.type,t):e.hasOwnProperty("defaultValue")&&by(n,e.type,ko(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(n.defaultChecked=!!e.defaultChecked)}function EM(n,e,t){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var i=e.type;if(!(i!=="submit"&&i!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+n._wrapperState.initialValue,t||e===n.value||(n.value=e),n.defaultValue=e}t=n.name,t!==""&&(n.name=""),n.defaultChecked=!!n._wrapperState.initialChecked,t!==""&&(n.name=t)}function by(n,e,t){(e!=="number"||om(n.ownerDocument)!==n)&&(t==null?n.defaultValue=""+n._wrapperState.initialValue:n.defaultValue!==""+t&&(n.defaultValue=""+t))}var Fc=Array.isArray;function hu(n,e,t,i){if(n=n.options,e){e={};for(var r=0;r"+e.valueOf().toString()+"",e=Rd.firstChild;n.firstChild;)n.removeChild(n.firstChild);for(;e.firstChild;)n.appendChild(e.firstChild)}});function hf(n,e){if(e){var t=n.firstChild;if(t&&t===n.lastChild&&t.nodeType===3){t.nodeValue=e;return}}n.textContent=e}var jc={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},ID=["Webkit","ms","Moz","O"];Object.keys(jc).forEach(function(n){ID.forEach(function(e){e=e+n.charAt(0).toUpperCase()+n.substring(1),jc[e]=jc[n]})});function lC(n,e,t){return e==null||typeof e=="boolean"||e===""?"":t||typeof e!="number"||e===0||jc.hasOwnProperty(n)&&jc[n]?(""+e).trim():e+"px"}function uC(n,e){n=n.style;for(var t in e)if(e.hasOwnProperty(t)){var i=t.indexOf("--")===0,r=lC(t,e[t],i);t==="float"&&(t="cssFloat"),i?n.setProperty(t,r):n[t]=r}}var DD=sn({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 Py(n,e){if(e){if(DD[n]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(Ce(137,n));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(Ce(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(Ce(61))}if(e.style!=null&&typeof e.style!="object")throw Error(Ce(62))}}function Ly(n,e){if(n.indexOf("-")===-1)return typeof e.is=="string";switch(n){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 Ry=null;function N_(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var Iy=null,du=null,pu=null;function CM(n){if(n=nh(n)){if(typeof Iy!="function")throw Error(Ce(280));var e=n.stateNode;e&&(e=Km(e),Iy(n.stateNode,n.type,e))}}function cC(n){du?pu?pu.push(n):pu=[n]:du=n}function fC(){if(du){var n=du,e=pu;if(pu=du=null,CM(n),e)for(n=0;n>>=0,n===0?32:31-(GD(n)/jD|0)|0}var Id=64,Dd=4194304;function Bc(n){switch(n&-n){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 n&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return n&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return n}}function cm(n,e){var t=n.pendingLanes;if(t===0)return 0;var i=0,r=n.suspendedLanes,s=n.pingedLanes,o=t&268435455;if(o!==0){var a=o&~r;a!==0?i=Bc(a):(s&=o,s!==0&&(i=Bc(s)))}else o=t&~r,o!==0?i=Bc(o):s!==0&&(i=Bc(s));if(i===0)return 0;if(e!==0&&e!==i&&!(e&r)&&(r=i&-i,s=e&-e,r>=s||r===16&&(s&4194240)!==0))return e;if(i&4&&(i|=t&16),e=n.entangledLanes,e!==0)for(n=n.entanglements,e&=i;0t;t++)e.push(n);return e}function eh(n,e,t){n.pendingLanes|=e,e!==536870912&&(n.suspendedLanes=0,n.pingedLanes=0),n=n.eventTimes,e=31-Ir(e),n[e]=t}function ZD(n,e){var t=n.pendingLanes&~e;n.pendingLanes=e,n.suspendedLanes=0,n.pingedLanes=0,n.expiredLanes&=e,n.mutableReadLanes&=e,n.entangledLanes&=e,e=n.entanglements;var i=n.eventTimes;for(n=n.expirationTimes;0=Yc),UM=String.fromCharCode(32),zM=!1;function RC(n,e){switch(n){case"keyup":return Mk.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function IC(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var Xl=!1;function Ek(n,e){switch(n){case"compositionend":return IC(e);case"keypress":return e.which!==32?null:(zM=!0,UM);case"textInput":return n=e.data,n===UM&&zM?null:n;default:return null}}function bk(n,e){if(Xl)return n==="compositionend"||!W_&&RC(n,e)?(n=PC(),Hp=B_=vo=null,Xl=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:t,offset:e-n};n=i}e:{for(;t;){if(t.nextSibling){t=t.nextSibling;break e}t=t.parentNode}t=void 0}t=HM(t)}}function OC(n,e){return n&&e?n===e?!0:n&&n.nodeType===3?!1:e&&e.nodeType===3?OC(n,e.parentNode):"contains"in n?n.contains(e):n.compareDocumentPosition?!!(n.compareDocumentPosition(e)&16):!1:!1}function UC(){for(var n=window,e=om();e instanceof n.HTMLIFrameElement;){try{var t=typeof e.contentWindow.location.href=="string"}catch{t=!1}if(t)n=e.contentWindow;else break;e=om(n.document)}return e}function G_(n){var e=n&&n.nodeName&&n.nodeName.toLowerCase();return e&&(e==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||e==="textarea"||n.contentEditable==="true")}function Nk(n){var e=UC(),t=n.focusedElem,i=n.selectionRange;if(e!==t&&t&&t.ownerDocument&&OC(t.ownerDocument.documentElement,t)){if(i!==null&&G_(t)){if(e=i.start,n=i.end,n===void 0&&(n=e),"selectionStart"in t)t.selectionStart=e,t.selectionEnd=Math.min(n,t.value.length);else if(n=(e=t.ownerDocument||document)&&e.defaultView||window,n.getSelection){n=n.getSelection();var r=t.textContent.length,s=Math.min(i.start,r);i=i.end===void 0?s:Math.min(i.end,r),!n.extend&&s>i&&(r=i,i=s,s=r),r=WM(t,s);var o=WM(t,i);r&&o&&(n.rangeCount!==1||n.anchorNode!==r.node||n.anchorOffset!==r.offset||n.focusNode!==o.node||n.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(r.node,r.offset),n.removeAllRanges(),s>i?(n.addRange(e),n.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),n.addRange(e)))}}for(e=[],n=t;n=n.parentNode;)n.nodeType===1&&e.push({element:n,left:n.scrollLeft,top:n.scrollTop});for(typeof t.focus=="function"&&t.focus(),t=0;t=document.documentMode,Yl=null,zy=null,Zc=null,Fy=!1;function GM(n,e,t){var i=t.window===t?t.document:t.nodeType===9?t:t.ownerDocument;Fy||Yl==null||Yl!==om(i)||(i=Yl,"selectionStart"in i&&G_(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),Zc&&yf(Zc,i)||(Zc=i,i=dm(zy,"onSelect"),0Jl||(n.current=jy[Jl],jy[Jl]=null,Jl--)}function Gt(n,e){Jl++,jy[Jl]=n.current,n.current=e}var No={},oi=Wo(No),Ci=Wo(!1),Fa=No;function wu(n,e){var t=n.type.contextTypes;if(!t)return No;var i=n.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===e)return i.__reactInternalMemoizedMaskedChildContext;var r={},s;for(s in t)r[s]=e[s];return i&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=e,n.__reactInternalMemoizedMaskedChildContext=r),r}function Pi(n){return n=n.childContextTypes,n!=null}function mm(){Xt(Ci),Xt(oi)}function KM(n,e,t){if(oi.current!==No)throw Error(Ce(168));Gt(oi,e),Gt(Ci,t)}function XC(n,e,t){var i=n.stateNode;if(e=e.childContextTypes,typeof i.getChildContext!="function")return t;i=i.getChildContext();for(var r in i)if(!(r in e))throw Error(Ce(108,LD(n)||"Unknown",r));return sn({},t,i)}function gm(n){return n=(n=n.stateNode)&&n.__reactInternalMemoizedMergedChildContext||No,Fa=oi.current,Gt(oi,n),Gt(Ci,Ci.current),!0}function QM(n,e,t){var i=n.stateNode;if(!i)throw Error(Ce(169));t?(n=XC(n,e,Fa),i.__reactInternalMemoizedMergedChildContext=n,Xt(Ci),Xt(oi),Gt(oi,n)):Xt(Ci),Gt(Ci,t)}var Ms=null,Qm=!1,ov=!1;function YC(n){Ms===null?Ms=[n]:Ms.push(n)}function Yk(n){Qm=!0,YC(n)}function Go(){if(!ov&&Ms!==null){ov=!0;var n=0,e=kt;try{var t=Ms;for(kt=1;n>=o,r-=o,bs=1<<32-Ir(e)+r|t<L?(C=I,I=null):C=I.sibling;var R=p(m,I,w[L],A);if(R===null){I===null&&(I=C);break}n&&I&&R.alternate===null&&e(m,I),S=s(R,S,L),P===null?b=R:P.sibling=R,P=R,I=C}if(L===w.length)return t(m,I),Kt&&ma(m,L),b;if(I===null){for(;LL?(C=I,I=null):C=I.sibling;var W=p(m,I,R.value,A);if(W===null){I===null&&(I=C);break}n&&I&&W.alternate===null&&e(m,I),S=s(W,S,L),P===null?b=W:P.sibling=W,P=W,I=C}if(R.done)return t(m,I),Kt&&ma(m,L),b;if(I===null){for(;!R.done;L++,R=w.next())R=d(m,R.value,A),R!==null&&(S=s(R,S,L),P===null?b=R:P.sibling=R,P=R);return Kt&&ma(m,L),b}for(I=i(m,I);!R.done;L++,R=w.next())R=v(I,m,L,R.value,A),R!==null&&(n&&R.alternate!==null&&I.delete(R.key===null?L:R.key),S=s(R,S,L),P===null?b=R:P.sibling=R,P=R);return n&&I.forEach(function(J){return e(m,J)}),Kt&&ma(m,L),b}function M(m,S,w,A){if(typeof w=="object"&&w!==null&&w.type===jl&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case Pd:e:{for(var b=w.key,P=S;P!==null;){if(P.key===b){if(b=w.type,b===jl){if(P.tag===7){t(m,P.sibling),S=r(P,w.props.children),S.return=m,m=S;break e}}else if(P.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===co&&sA(b)===P.type){t(m,P.sibling),S=r(P,w.props),S.ref=yc(m,P,w),S.return=m,m=S;break e}t(m,P);break}else e(m,P);P=P.sibling}w.type===jl?(S=Da(w.props.children,m.mode,A,w.key),S.return=m,m=S):(A=Jp(w.type,w.key,w.props,null,m.mode,A),A.ref=yc(m,S,w),A.return=m,m=A)}return o(m);case Gl:e:{for(P=w.key;S!==null;){if(S.key===P)if(S.tag===4&&S.stateNode.containerInfo===w.containerInfo&&S.stateNode.implementation===w.implementation){t(m,S.sibling),S=r(S,w.children||[]),S.return=m,m=S;break e}else{t(m,S);break}else e(m,S);S=S.sibling}S=pv(w,m.mode,A),S.return=m,m=S}return o(m);case co:return P=w._init,M(m,S,P(w._payload),A)}if(Fc(w))return y(m,S,w,A);if(dc(w))return _(m,S,w,A);Bd(m,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,S!==null&&S.tag===6?(t(m,S.sibling),S=r(S,w),S.return=m,m=S):(t(m,S),S=dv(w,m.mode,A),S.return=m,m=S),o(m)):t(m,S)}return M}var Au=t2(!0),n2=t2(!1),ih={},$r=Wo(ih),wf=Wo(ih),Mf=Wo(ih);function ba(n){if(n===ih)throw Error(Ce(174));return n}function $_(n,e){switch(Gt(Mf,e),Gt(wf,n),Gt($r,ih),n=e.nodeType,n){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Cy(null,"");break;default:n=n===8?e.parentNode:e,e=n.namespaceURI||null,n=n.tagName,e=Cy(e,n)}Xt($r),Gt($r,e)}function Eu(){Xt($r),Xt(wf),Xt(Mf)}function i2(n){ba(Mf.current);var e=ba($r.current),t=Cy(e,n.type);e!==t&&(Gt(wf,n),Gt($r,t))}function e1(n){wf.current===n&&(Xt($r),Xt(wf))}var $t=Wo(0);function wm(n){for(var e=n;e!==null;){if(e.tag===13){var t=e.memoizedState;if(t!==null&&(t=t.dehydrated,t===null||t.data==="$?"||t.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break;for(;e.sibling===null;){if(e.return===null||e.return===n)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var av=[];function t1(){for(var n=0;nt?t:4,n(!0);var i=lv.transition;lv.transition={};try{n(!1),e()}finally{kt=t,lv.transition=i}}function x2(){return pr().memoizedState}function Kk(n,e,t){var i=Co(n);if(t={lane:i,action:t,hasEagerState:!1,eagerState:null,next:null},_2(n))S2(e,t);else if(t=KC(n,e,t,i),t!==null){var r=pi();Dr(t,n,i,r),w2(t,e,i)}}function Qk(n,e,t){var i=Co(n),r={lane:i,action:t,hasEagerState:!1,eagerState:null,next:null};if(_2(n))S2(e,r);else{var s=n.alternate;if(n.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var o=e.lastRenderedState,a=s(o,t);if(r.hasEagerState=!0,r.eagerState=a,Nr(a,o)){var l=e.interleaved;l===null?(r.next=r,K_(e)):(r.next=l.next,l.next=r),e.interleaved=r;return}}catch{}finally{}t=KC(n,e,r,i),t!==null&&(r=pi(),Dr(t,n,i,r),w2(t,e,i))}}function _2(n){var e=n.alternate;return n===rn||e!==null&&e===rn}function S2(n,e){Jc=Mm=!0;var t=n.pending;t===null?e.next=e:(e.next=t.next,t.next=e),n.pending=e}function w2(n,e,t){if(t&4194240){var i=e.lanes;i&=n.pendingLanes,t|=i,e.lanes=t,U_(n,t)}}var Am={readContext:dr,useCallback:$n,useContext:$n,useEffect:$n,useImperativeHandle:$n,useInsertionEffect:$n,useLayoutEffect:$n,useMemo:$n,useReducer:$n,useRef:$n,useState:$n,useDebugValue:$n,useDeferredValue:$n,useTransition:$n,useMutableSource:$n,useSyncExternalStore:$n,useId:$n,unstable_isNewReconciler:!1},$k={readContext:dr,useCallback:function(n,e){return Zr().memoizedState=[n,e===void 0?null:e],n},useContext:dr,useEffect:aA,useImperativeHandle:function(n,e,t){return t=t!=null?t.concat([n]):null,Xp(4194308,4,p2.bind(null,e,n),t)},useLayoutEffect:function(n,e){return Xp(4194308,4,n,e)},useInsertionEffect:function(n,e){return Xp(4,2,n,e)},useMemo:function(n,e){var t=Zr();return e=e===void 0?null:e,n=n(),t.memoizedState=[n,e],n},useReducer:function(n,e,t){var i=Zr();return e=t!==void 0?t(e):e,i.memoizedState=i.baseState=e,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:e},i.queue=n,n=n.dispatch=Kk.bind(null,rn,n),[i.memoizedState,n]},useRef:function(n){var e=Zr();return n={current:n},e.memoizedState=n},useState:oA,useDebugValue:o1,useDeferredValue:function(n){return Zr().memoizedState=n},useTransition:function(){var n=oA(!1),e=n[0];return n=Jk.bind(null,n[1]),Zr().memoizedState=n,[e,n]},useMutableSource:function(){},useSyncExternalStore:function(n,e,t){var i=rn,r=Zr();if(Kt){if(t===void 0)throw Error(Ce(407));t=t()}else{if(t=e(),Fn===null)throw Error(Ce(349));Va&30||o2(i,e,t)}r.memoizedState=t;var s={value:t,getSnapshot:e};return r.queue=s,aA(l2.bind(null,i,s,n),[n]),i.flags|=2048,bf(9,a2.bind(null,i,s,t,e),void 0,null),t},useId:function(){var n=Zr(),e=Fn.identifierPrefix;if(Kt){var t=Ts,i=bs;t=(i&~(1<<32-Ir(i)-1)).toString(32)+t,e=":"+e+"R"+t,t=Af++,0<\/script>",n=n.removeChild(n.firstChild)):typeof i.is=="string"?n=o.createElement(t,{is:i.is}):(n=o.createElement(t),t==="select"&&(o=n,i.multiple?o.multiple=!0:i.size&&(o.size=i.size))):n=o.createElementNS(n,t),n[Kr]=e,n[Sf]=i,R2(n,e,!1,!1),e.stateNode=n;e:{switch(o=Ly(t,i),t){case"dialog":jt("cancel",n),jt("close",n),r=i;break;case"iframe":case"object":case"embed":jt("load",n),r=i;break;case"video":case"audio":for(r=0;rTu&&(e.flags|=128,i=!0,xc(s,!1),e.lanes=4194304)}else{if(!i)if(n=wm(o),n!==null){if(e.flags|=128,i=!0,t=n.updateQueue,t!==null&&(e.updateQueue=t,e.flags|=4),xc(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!Kt)return $n(e),null}else 2*mn()-s.renderingStartTime>Tu&&t!==1073741824&&(e.flags|=128,i=!0,xc(s,!1),e.lanes=4194304);s.isBackwards?(o.sibling=e.child,e.child=o):(t=s.last,t!==null?t.sibling=o:e.child=o,s.last=o)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=mn(),e.sibling=null,t=$t.current,Gt($t,i?t&1|2:t&1),e):($n(e),null);case 22:case 23:return h1(),i=e.memoizedState!==null,n!==null&&n.memoizedState!==null!==i&&(e.flags|=8192),i&&e.mode&1?Fi&1073741824&&($n(e),e.subtreeFlags&6&&(e.flags|=8192)):$n(e),null;case 24:return null;case 25:return null}throw Error(Ce(156,e.tag))}function aN(n,e){switch(X_(e),e.tag){case 1:return Pi(e.type)&&mm(),n=e.flags,n&65536?(e.flags=n&-65537|128,e):null;case 3:return Eu(),Xt(Ci),Xt(si),t1(),n=e.flags,n&65536&&!(n&128)?(e.flags=n&-65537|128,e):null;case 5:return e1(e),null;case 13:if(Xt($t),n=e.memoizedState,n!==null&&n.dehydrated!==null){if(e.alternate===null)throw Error(Ce(340));Mu()}return n=e.flags,n&65536?(e.flags=n&-65537|128,e):null;case 19:return Xt($t),null;case 4:return Eu(),null;case 10:return J_(e.type._context),null;case 22:case 23:return h1(),null;case 24:return null;default:return null}}var Vd=!1,ni=!1,lN=typeof WeakSet=="function"?WeakSet:Set,Be=null;function eu(n,e){var t=n.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(i){ln(n,e,i)}else t.current=null}function ix(n,e,t){try{t()}catch(i){ln(n,e,i)}}var gA=!1;function uN(n,e){if(By=fm,n=UC(),G_(n)){if("selectionStart"in n)var t={start:n.selectionStart,end:n.selectionEnd};else e:{t=(t=n.ownerDocument)&&t.defaultView||window;var i=t.getSelection&&t.getSelection();if(i&&i.rangeCount!==0){t=i.anchorNode;var r=i.anchorOffset,s=i.focusNode;i=i.focusOffset;try{t.nodeType,s.nodeType}catch{t=null;break e}var o=0,a=-1,l=-1,f=0,h=0,d=n,p=null;t:for(;;){for(var v;d!==t||r!==0&&d.nodeType!==3||(a=o+r),d!==s||i!==0&&d.nodeType!==3||(l=o+i),d.nodeType===3&&(o+=d.nodeValue.length),(v=d.firstChild)!==null;)p=d,d=v;for(;;){if(d===n)break t;if(p===t&&++f===r&&(a=o),p===s&&++h===i&&(l=o),(v=d.nextSibling)!==null)break;d=p,p=d.parentNode}d=v}t=a===-1||l===-1?null:{start:a,end:l}}else t=null}t=t||{start:0,end:0}}else t=null;for(Vy={focusedElem:n,selectionRange:t},fm=!1,Be=e;Be!==null;)if(e=Be,n=e.child,(e.subtreeFlags&1028)!==0&&n!==null)n.return=e,Be=n;else for(;Be!==null;){e=Be;try{var y=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var _=y.memoizedProps,M=y.memoizedState,m=e.stateNode,S=m.getSnapshotBeforeUpdate(e.elementType===e.type?_:br(e.type,_),M);m.__reactInternalSnapshotBeforeUpdate=S}break;case 3:var w=e.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ce(163))}}catch(A){ln(e,e.return,A)}if(n=e.sibling,n!==null){n.return=e.return,Be=n;break}Be=e.return}return y=gA,gA=!1,y}function Kc(n,e,t){var i=e.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var r=i=i.next;do{if((r.tag&n)===n){var s=r.destroy;r.destroy=void 0,s!==void 0&&ix(e,t,s)}r=r.next}while(r!==i)}}function tg(n,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var t=e=e.next;do{if((t.tag&n)===n){var i=t.create;t.destroy=i()}t=t.next}while(t!==e)}}function rx(n){var e=n.ref;if(e!==null){var t=n.stateNode;switch(n.tag){case 5:n=t;break;default:n=t}typeof e=="function"?e(n):e.current=n}}function k2(n){var e=n.alternate;e!==null&&(n.alternate=null,k2(e)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(e=n.stateNode,e!==null&&(delete e[Kr],delete e[Sf],delete e[Gy],delete e[jk],delete e[Xk])),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}function N2(n){return n.tag===5||n.tag===3||n.tag===4}function vA(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||N2(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function sx(n,e,t){var i=n.tag;if(i===5||i===6)n=n.stateNode,e?t.nodeType===8?t.parentNode.insertBefore(n,e):t.insertBefore(n,e):(t.nodeType===8?(e=t.parentNode,e.insertBefore(n,t)):(e=t,e.appendChild(n)),t=t._reactRootContainer,t!=null||e.onclick!==null||(e.onclick=pm));else if(i!==4&&(n=n.child,n!==null))for(sx(n,e,t),n=n.sibling;n!==null;)sx(n,e,t),n=n.sibling}function ox(n,e,t){var i=n.tag;if(i===5||i===6)n=n.stateNode,e?t.insertBefore(n,e):t.appendChild(n);else if(i!==4&&(n=n.child,n!==null))for(ox(n,e,t),n=n.sibling;n!==null;)ox(n,e,t),n=n.sibling}var Wn=null,Tr=!1;function to(n,e,t){for(t=t.child;t!==null;)O2(n,e,t),t=t.sibling}function O2(n,e,t){if(Qr&&typeof Qr.onCommitFiberUnmount=="function")try{Qr.onCommitFiberUnmount(Ym,t)}catch{}switch(t.tag){case 5:ni||eu(t,e);case 6:var i=Wn,r=Tr;Wn=null,to(n,e,t),Wn=i,Tr=r,Wn!==null&&(Tr?(n=Wn,t=t.stateNode,n.nodeType===8?n.parentNode.removeChild(t):n.removeChild(t)):Wn.removeChild(t.stateNode));break;case 18:Wn!==null&&(Tr?(n=Wn,t=t.stateNode,n.nodeType===8?ov(n.parentNode,t):n.nodeType===1&&ov(n,t),gf(n)):ov(Wn,t.stateNode));break;case 4:i=Wn,r=Tr,Wn=t.stateNode.containerInfo,Tr=!0,to(n,e,t),Wn=i,Tr=r;break;case 0:case 11:case 14:case 15:if(!ni&&(i=t.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){r=i=i.next;do{var s=r,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&ix(t,e,o),r=r.next}while(r!==i)}to(n,e,t);break;case 1:if(!ni&&(eu(t,e),i=t.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=t.memoizedProps,i.state=t.memoizedState,i.componentWillUnmount()}catch(a){ln(t,e,a)}to(n,e,t);break;case 21:to(n,e,t);break;case 22:t.mode&1?(ni=(i=ni)||t.memoizedState!==null,to(n,e,t),ni=i):to(n,e,t);break;default:to(n,e,t)}}function yA(n){var e=n.updateQueue;if(e!==null){n.updateQueue=null;var t=n.stateNode;t===null&&(t=n.stateNode=new lN),e.forEach(function(i){var r=yN.bind(null,n,i);t.has(i)||(t.add(i),i.then(r,r))})}}function wr(n,e){var t=e.deletions;if(t!==null)for(var i=0;ir&&(r=o),i&=~s}if(i=r,i=mn()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*fN(i/1960))-i,10n?16:n,yo===null)var i=!1;else{if(n=yo,yo=null,Tm=0,bt&6)throw Error(Ce(331));var r=bt;for(bt|=4,Be=n.current;Be!==null;){var s=Be,o=s.child;if(Be.flags&16){var a=s.deletions;if(a!==null){for(var l=0;lmn()-c1?Ia(n,0):u1|=t),Li(n,e)}function G2(n,e){e===0&&(n.mode&1?(e=Id,Id<<=1,!(Id&130023424)&&(Id=4194304)):e=1);var t=pi();n=Os(n,e),n!==null&&(eh(n,e,t),Li(n,t))}function vN(n){var e=n.memoizedState,t=0;e!==null&&(t=e.retryLane),G2(n,t)}function yN(n,e){var t=0;switch(n.tag){case 13:var i=n.stateNode,r=n.memoizedState;r!==null&&(t=r.retryLane);break;case 19:i=n.stateNode;break;default:throw Error(Ce(314))}i!==null&&i.delete(e),G2(n,t)}var j2;j2=function(n,e,t){if(n!==null)if(n.memoizedProps!==e.pendingProps||Ci.current)Ti=!0;else{if(!(n.lanes&t)&&!(e.flags&128))return Ti=!1,sN(n,e,t);Ti=!!(n.flags&131072)}else Ti=!1,Kt&&e.flags&1048576&&qC(e,ym,e.index);switch(e.lanes=0,e.tag){case 2:var i=e.type;Yp(n,e),n=e.pendingProps;var r=wu(e,si.current);gu(e,t),r=i1(null,e,i,n,r,t);var s=r1();return e.flags|=1,typeof r=="object"&&r!==null&&typeof r.render=="function"&&r.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Pi(i)?(s=!0,gm(e)):s=!1,e.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,Q_(e),r.updater=$m,e.stateNode=r,r._reactInternals=e,Jy(e,i,n,t),e=$y(null,e,i,!0,s,t)):(e.tag=0,Kt&&s&&j_(e),di(null,e,r,t),e=e.child),e;case 16:i=e.elementType;e:{switch(Yp(n,e),n=e.pendingProps,r=i._init,i=r(i._payload),e.type=i,r=e.tag=_N(i),n=br(i,n),r){case 0:e=Qy(null,e,i,n,t);break e;case 1:e=dA(null,e,i,n,t);break e;case 11:e=fA(null,e,i,n,t);break e;case 14:e=hA(null,e,i,br(i.type,n),t);break e}throw Error(Ce(306,i,""))}return e;case 0:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:br(i,r),Qy(n,e,i,r,t);case 1:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:br(i,r),dA(n,e,i,r,t);case 3:e:{if(C2(e),n===null)throw Error(Ce(387));i=e.pendingProps,s=e.memoizedState,r=s.element,QC(n,e),Sm(e,i,null,t);var o=e.memoizedState;if(i=o.element,s.isDehydrated)if(s={element:i,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){r=bu(Error(Ce(423)),e),e=pA(n,e,i,t,r);break e}else if(i!==r){r=bu(Error(Ce(424)),e),e=pA(n,e,i,t,r);break e}else for(Hi=Eo(e.stateNode.containerInfo.firstChild),Gi=e,Kt=!0,Pr=null,t=n2(e,null,i,t),e.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling;else{if(Mu(),i===r){e=Us(n,e,t);break e}di(n,e,i,t)}e=e.child}return e;case 5:return i2(e),n===null&&Yy(e),i=e.type,r=e.pendingProps,s=n!==null?n.memoizedProps:null,o=r.children,Hy(i,r)?o=null:s!==null&&Hy(i,s)&&(e.flags|=32),T2(n,e),di(n,e,o,t),e.child;case 6:return n===null&&Yy(e),null;case 13:return P2(n,e,t);case 4:return $_(e,e.stateNode.containerInfo),i=e.pendingProps,n===null?e.child=Au(e,null,i,t):di(n,e,i,t),e.child;case 11:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:br(i,r),fA(n,e,i,r,t);case 7:return di(n,e,e.pendingProps,t),e.child;case 8:return di(n,e,e.pendingProps.children,t),e.child;case 12:return di(n,e,e.pendingProps.children,t),e.child;case 10:e:{if(i=e.type._context,r=e.pendingProps,s=e.memoizedProps,o=r.value,Gt(xm,i._currentValue),i._currentValue=o,s!==null)if(Nr(s.value,o)){if(s.children===r.children&&!Ci.current){e=Us(n,e,t);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===i){if(s.tag===1){l=Ls(-1,t&-t),l.tag=2;var f=s.updateQueue;if(f!==null){f=f.shared;var h=f.pending;h===null?l.next=l:(l.next=h.next,h.next=l),f.pending=l}}s.lanes|=t,l=s.alternate,l!==null&&(l.lanes|=t),qy(s.return,t,e),a.lanes|=t;break}l=l.next}}else if(s.tag===10)o=s.type===e.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(Ce(341));o.lanes|=t,a=o.alternate,a!==null&&(a.lanes|=t),qy(o,t,e),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}di(n,e,r.children,t),e=e.child}return e;case 9:return r=e.type,i=e.pendingProps.children,gu(e,t),r=dr(r),i=i(r),e.flags|=1,di(n,e,i,t),e.child;case 14:return i=e.type,r=br(i,e.pendingProps),r=br(i.type,r),hA(n,e,i,r,t);case 15:return E2(n,e,e.type,e.pendingProps,t);case 17:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:br(i,r),Yp(n,e),e.tag=1,Pi(i)?(n=!0,gm(e)):n=!1,gu(e,t),e2(e,i,r),Jy(e,i,r,t),$y(null,e,i,!0,n,t);case 19:return L2(n,e,t);case 22:return b2(n,e,t)}throw Error(Ce(156,e.tag))};function X2(n,e){return yC(n,e)}function xN(n,e,t,i){this.tag=n,this.key=t,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function fr(n,e,t,i){return new xN(n,e,t,i)}function p1(n){return n=n.prototype,!(!n||!n.isReactComponent)}function _N(n){if(typeof n=="function")return p1(n)?1:0;if(n!=null){if(n=n.$$typeof,n===D_)return 11;if(n===k_)return 14}return 2}function Po(n,e){var t=n.alternate;return t===null?(t=fr(n.tag,e,n.key,n.mode),t.elementType=n.elementType,t.type=n.type,t.stateNode=n.stateNode,t.alternate=n,n.alternate=t):(t.pendingProps=e,t.type=n.type,t.flags=0,t.subtreeFlags=0,t.deletions=null),t.flags=n.flags&14680064,t.childLanes=n.childLanes,t.lanes=n.lanes,t.child=n.child,t.memoizedProps=n.memoizedProps,t.memoizedState=n.memoizedState,t.updateQueue=n.updateQueue,e=n.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},t.sibling=n.sibling,t.index=n.index,t.ref=n.ref,t}function Jp(n,e,t,i,r,s){var o=2;if(i=n,typeof n=="function")p1(n)&&(o=1);else if(typeof n=="string")o=5;else e:switch(n){case jl:return Da(t.children,r,s,e);case I_:o=8,r|=8;break;case _y:return n=fr(12,t,e,r|2),n.elementType=_y,n.lanes=s,n;case Sy:return n=fr(13,t,e,r),n.elementType=Sy,n.lanes=s,n;case wy:return n=fr(19,t,e,r),n.elementType=wy,n.lanes=s,n;case tC:return ig(t,r,s,e);default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case $T:o=10;break e;case eC:o=9;break e;case D_:o=11;break e;case k_:o=14;break e;case co:o=16,i=null;break e}throw Error(Ce(130,n==null?n:typeof n,""))}return e=fr(o,t,e,r),e.elementType=n,e.type=i,e.lanes=s,e}function Da(n,e,t,i){return n=fr(7,n,i,e),n.lanes=t,n}function ig(n,e,t,i){return n=fr(22,n,i,e),n.elementType=tC,n.lanes=t,n.stateNode={isHidden:!1},n}function pv(n,e,t){return n=fr(6,n,null,e),n.lanes=t,n}function mv(n,e,t){return e=fr(4,n.children!==null?n.children:[],n.key,e),e.lanes=t,e.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},e}function SN(n,e,t,i,r){this.tag=e,this.containerInfo=n,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Z0(0),this.expirationTimes=Z0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Z0(0),this.identifierPrefix=i,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function m1(n,e,t,i,r,s,o,a,l){return n=new SN(n,e,t,a,l),e===1?(e=1,s===!0&&(e|=8)):e=0,s=fr(3,null,null,e),n.current=s,s.stateNode=n,s.memoizedState={element:i,isDehydrated:t,cache:null,transitions:null,pendingSuspenseBoundaries:null},Q_(s),n}function wN(n,e,t){var i=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(J2)}catch(n){console.error(n)}}J2(),qT.exports=qi;var TN=qT.exports,K2,bA=TN;K2=yy.createRoot=bA.createRoot,yy.hydrateRoot=bA.hydrateRoot;/** +`+s.stack}return{value:n,source:e,stack:r,digest:null}}function fv(n,e,t){return{value:n,source:null,stack:t??null,digest:e??null}}function Ky(n,e){try{console.error(e.value)}catch(t){setTimeout(function(){throw t})}}var nN=typeof WeakMap=="function"?WeakMap:Map;function M2(n,e,t){t=Ls(-1,t),t.tag=3,t.payload={element:null};var i=e.value;return t.callback=function(){bm||(bm=!0,ax=i),Ky(n,e)},t}function A2(n,e,t){t=Ls(-1,t),t.tag=3;var i=n.type.getDerivedStateFromError;if(typeof i=="function"){var r=e.value;t.payload=function(){return i(r)},t.callback=function(){Ky(n,e)}}var s=n.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(t.callback=function(){Ky(n,e),typeof i!="function"&&(To===null?To=new Set([this]):To.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),t}function lA(n,e,t){var i=n.pingCache;if(i===null){i=n.pingCache=new nN;var r=new Set;i.set(e,r)}else r=i.get(e),r===void 0&&(r=new Set,i.set(e,r));r.has(t)||(r.add(t),n=gN.bind(null,n,e,t),e.then(n,n))}function uA(n){do{var e;if((e=n.tag===13)&&(e=n.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return n;n=n.return}while(n!==null);return null}function cA(n,e,t,i,r){return n.mode&1?(n.flags|=65536,n.lanes=r,n):(n===e?n.flags|=65536:(n.flags|=128,t.flags|=131072,t.flags&=-52805,t.tag===1&&(t.alternate===null?t.tag=17:(e=Ls(-1,1),e.tag=2,bo(t,e,1))),t.lanes|=1),n)}var iN=Hs.ReactCurrentOwner,Ti=!1;function di(n,e,t,i){e.child=n===null?n2(e,null,t,i):Au(e,n.child,t,i)}function fA(n,e,t,i,r){t=t.render;var s=e.ref;return gu(e,r),i=i1(n,e,t,i,s,r),t=r1(),n!==null&&!Ti?(e.updateQueue=n.updateQueue,e.flags&=-2053,n.lanes&=~r,Us(n,e,r)):(Kt&&t&&j_(e),e.flags|=1,di(n,e,i,r),e.child)}function hA(n,e,t,i,r){if(n===null){var s=t.type;return typeof s=="function"&&!p1(s)&&s.defaultProps===void 0&&t.compare===null&&t.defaultProps===void 0?(e.tag=15,e.type=s,E2(n,e,s,i,r)):(n=Jp(t.type,null,i,e,e.mode,r),n.ref=e.ref,n.return=e,e.child=n)}if(s=n.child,!(n.lanes&r)){var o=s.memoizedProps;if(t=t.compare,t=t!==null?t:yf,t(o,i)&&n.ref===e.ref)return Us(n,e,r)}return e.flags|=1,n=Po(s,i),n.ref=e.ref,n.return=e,e.child=n}function E2(n,e,t,i,r){if(n!==null){var s=n.memoizedProps;if(yf(s,i)&&n.ref===e.ref)if(Ti=!1,e.pendingProps=i=s,(n.lanes&r)!==0)n.flags&131072&&(Ti=!0);else return e.lanes=n.lanes,Us(n,e,r)}return Qy(n,e,t,i,r)}function b2(n,e,t){var i=e.pendingProps,r=i.children,s=n!==null?n.memoizedState:null;if(i.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},Gt(tu,Fi),Fi|=t;else{if(!(t&1073741824))return n=s!==null?s.baseLanes|t:t,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:n,cachePool:null,transitions:null},e.updateQueue=null,Gt(tu,Fi),Fi|=n,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=s!==null?s.baseLanes:t,Gt(tu,Fi),Fi|=i}else s!==null?(i=s.baseLanes|t,e.memoizedState=null):i=t,Gt(tu,Fi),Fi|=i;return di(n,e,r,t),e.child}function T2(n,e){var t=e.ref;(n===null&&t!==null||n!==null&&n.ref!==t)&&(e.flags|=512,e.flags|=2097152)}function Qy(n,e,t,i,r){var s=Pi(t)?Fa:oi.current;return s=wu(e,s),gu(e,r),t=i1(n,e,t,i,s,r),i=r1(),n!==null&&!Ti?(e.updateQueue=n.updateQueue,e.flags&=-2053,n.lanes&=~r,Us(n,e,r)):(Kt&&i&&j_(e),e.flags|=1,di(n,e,t,r),e.child)}function dA(n,e,t,i,r){if(Pi(t)){var s=!0;gm(e)}else s=!1;if(gu(e,r),e.stateNode===null)Yp(n,e),e2(e,t,i),Jy(e,t,i,r),i=!0;else if(n===null){var o=e.stateNode,a=e.memoizedProps;o.props=a;var l=o.context,f=t.contextType;typeof f=="object"&&f!==null?f=dr(f):(f=Pi(t)?Fa:oi.current,f=wu(e,f));var h=t.getDerivedStateFromProps,d=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==i||l!==f)&&rA(e,o,i,f),fo=!1;var p=e.memoizedState;o.state=p,Sm(e,i,o,r),l=e.memoizedState,a!==i||p!==l||Ci.current||fo?(typeof h=="function"&&(Zy(e,t,h,i),l=e.memoizedState),(a=fo||iA(e,t,a,i,p,l,f))?(d||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=i,e.memoizedState=l),o.props=i,o.state=l,o.context=f,i=a):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),i=!1)}else{o=e.stateNode,QC(n,e),a=e.memoizedProps,f=e.type===e.elementType?a:br(e.type,a),o.props=f,d=e.pendingProps,p=o.context,l=t.contextType,typeof l=="object"&&l!==null?l=dr(l):(l=Pi(t)?Fa:oi.current,l=wu(e,l));var v=t.getDerivedStateFromProps;(h=typeof v=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==d||p!==l)&&rA(e,o,i,l),fo=!1,p=e.memoizedState,o.state=p,Sm(e,i,o,r);var y=e.memoizedState;a!==d||p!==y||Ci.current||fo?(typeof v=="function"&&(Zy(e,t,v,i),y=e.memoizedState),(f=fo||iA(e,t,f,i,p,y,l)||!1)?(h||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(i,y,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(i,y,l)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===n.memoizedProps&&p===n.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===n.memoizedProps&&p===n.memoizedState||(e.flags|=1024),e.memoizedProps=i,e.memoizedState=y),o.props=i,o.state=y,o.context=l,i=f):(typeof o.componentDidUpdate!="function"||a===n.memoizedProps&&p===n.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===n.memoizedProps&&p===n.memoizedState||(e.flags|=1024),i=!1)}return $y(n,e,t,i,s,r)}function $y(n,e,t,i,r,s){T2(n,e);var o=(e.flags&128)!==0;if(!i&&!o)return r&&QM(e,t,!1),Us(n,e,s);i=e.stateNode,iN.current=e;var a=o&&typeof t.getDerivedStateFromError!="function"?null:i.render();return e.flags|=1,n!==null&&o?(e.child=Au(e,n.child,null,s),e.child=Au(e,null,a,s)):di(n,e,a,s),e.memoizedState=i.state,r&&QM(e,t,!0),e.child}function C2(n){var e=n.stateNode;e.pendingContext?KM(n,e.pendingContext,e.pendingContext!==e.context):e.context&&KM(n,e.context,!1),$_(n,e.containerInfo)}function pA(n,e,t,i,r){return Mu(),Y_(r),e.flags|=256,di(n,e,t,i),e.child}var ex={dehydrated:null,treeContext:null,retryLane:0};function tx(n){return{baseLanes:n,cachePool:null,transitions:null}}function P2(n,e,t){var i=e.pendingProps,r=$t.current,s=!1,o=(e.flags&128)!==0,a;if((a=o)||(a=n!==null&&n.memoizedState===null?!1:(r&2)!==0),a?(s=!0,e.flags&=-129):(n===null||n.memoizedState!==null)&&(r|=1),Gt($t,r&1),n===null)return Yy(e),n=e.memoizedState,n!==null&&(n=n.dehydrated,n!==null)?(e.mode&1?n.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(o=i.children,n=i.fallback,s?(i=e.mode,s=e.child,o={mode:"hidden",children:o},!(i&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=ig(o,i,0,null),n=Da(n,i,t,null),s.return=e,n.return=e,s.sibling=n,e.child=s,e.child.memoizedState=tx(t),e.memoizedState=ex,n):a1(e,o));if(r=n.memoizedState,r!==null&&(a=r.dehydrated,a!==null))return rN(n,e,o,i,a,r,t);if(s){s=i.fallback,o=e.mode,r=n.child,a=r.sibling;var l={mode:"hidden",children:i.children};return!(o&1)&&e.child!==r?(i=e.child,i.childLanes=0,i.pendingProps=l,e.deletions=null):(i=Po(r,l),i.subtreeFlags=r.subtreeFlags&14680064),a!==null?s=Po(a,s):(s=Da(s,o,t,null),s.flags|=2),s.return=e,i.return=e,i.sibling=s,e.child=i,i=s,s=e.child,o=n.child.memoizedState,o=o===null?tx(t):{baseLanes:o.baseLanes|t,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=n.childLanes&~t,e.memoizedState=ex,i}return s=n.child,n=s.sibling,i=Po(s,{mode:"visible",children:i.children}),!(e.mode&1)&&(i.lanes=t),i.return=e,i.sibling=null,n!==null&&(t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)),e.child=i,e.memoizedState=null,i}function a1(n,e){return e=ig({mode:"visible",children:e},n.mode,0,null),e.return=n,n.child=e}function Vd(n,e,t,i){return i!==null&&Y_(i),Au(e,n.child,null,t),n=a1(e,e.pendingProps.children),n.flags|=2,e.memoizedState=null,n}function rN(n,e,t,i,r,s,o){if(t)return e.flags&256?(e.flags&=-257,i=fv(Error(Ce(422))),Vd(n,e,o,i)):e.memoizedState!==null?(e.child=n.child,e.flags|=128,null):(s=i.fallback,r=e.mode,i=ig({mode:"visible",children:i.children},r,0,null),s=Da(s,r,o,null),s.flags|=2,i.return=e,s.return=e,i.sibling=s,e.child=i,e.mode&1&&Au(e,n.child,null,o),e.child.memoizedState=tx(o),e.memoizedState=ex,s);if(!(e.mode&1))return Vd(n,e,o,null);if(r.data==="$!"){if(i=r.nextSibling&&r.nextSibling.dataset,i)var a=i.dgst;return i=a,s=Error(Ce(419)),i=fv(s,i,void 0),Vd(n,e,o,i)}if(a=(o&n.childLanes)!==0,Ti||a){if(i=Fn,i!==null){switch(o&-o){case 4:r=2;break;case 16:r=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:r=32;break;case 536870912:r=268435456;break;default:r=0}r=r&(i.suspendedLanes|o)?0:r,r!==0&&r!==s.retryLane&&(s.retryLane=r,Os(n,r),Dr(i,n,r,-1))}return d1(),i=fv(Error(Ce(421))),Vd(n,e,o,i)}return r.data==="$?"?(e.flags|=128,e.child=n.child,e=vN.bind(null,n),r._reactRetry=e,null):(n=s.treeContext,Hi=Eo(r.nextSibling),Gi=e,Kt=!0,Pr=null,n!==null&&(ur[cr++]=bs,ur[cr++]=Ts,ur[cr++]=Ba,bs=n.id,Ts=n.overflow,Ba=e),e=a1(e,i.children),e.flags|=4096,e)}function mA(n,e,t){n.lanes|=e;var i=n.alternate;i!==null&&(i.lanes|=e),qy(n.return,e,t)}function hv(n,e,t,i,r){var s=n.memoizedState;s===null?n.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:i,tail:t,tailMode:r}:(s.isBackwards=e,s.rendering=null,s.renderingStartTime=0,s.last=i,s.tail=t,s.tailMode=r)}function L2(n,e,t){var i=e.pendingProps,r=i.revealOrder,s=i.tail;if(di(n,e,i.children,t),i=$t.current,i&2)i=i&1|2,e.flags|=128;else{if(n!==null&&n.flags&128)e:for(n=e.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&mA(n,t,e);else if(n.tag===19)mA(n,t,e);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break e;for(;n.sibling===null;){if(n.return===null||n.return===e)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}i&=1}if(Gt($t,i),!(e.mode&1))e.memoizedState=null;else switch(r){case"forwards":for(t=e.child,r=null;t!==null;)n=t.alternate,n!==null&&wm(n)===null&&(r=t),t=t.sibling;t=r,t===null?(r=e.child,e.child=null):(r=t.sibling,t.sibling=null),hv(e,!1,r,t,s);break;case"backwards":for(t=null,r=e.child,e.child=null;r!==null;){if(n=r.alternate,n!==null&&wm(n)===null){e.child=r;break}n=r.sibling,r.sibling=t,t=r,r=n}hv(e,!0,t,null,s);break;case"together":hv(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function Yp(n,e){!(e.mode&1)&&n!==null&&(n.alternate=null,e.alternate=null,e.flags|=2)}function Us(n,e,t){if(n!==null&&(e.dependencies=n.dependencies),Ha|=e.lanes,!(t&e.childLanes))return null;if(n!==null&&e.child!==n.child)throw Error(Ce(153));if(e.child!==null){for(n=e.child,t=Po(n,n.pendingProps),e.child=t,t.return=e;n.sibling!==null;)n=n.sibling,t=t.sibling=Po(n,n.pendingProps),t.return=e;t.sibling=null}return e.child}function sN(n,e,t){switch(e.tag){case 3:C2(e),Mu();break;case 5:i2(e);break;case 1:Pi(e.type)&&gm(e);break;case 4:$_(e,e.stateNode.containerInfo);break;case 10:var i=e.type._context,r=e.memoizedProps.value;Gt(xm,i._currentValue),i._currentValue=r;break;case 13:if(i=e.memoizedState,i!==null)return i.dehydrated!==null?(Gt($t,$t.current&1),e.flags|=128,null):t&e.child.childLanes?P2(n,e,t):(Gt($t,$t.current&1),n=Us(n,e,t),n!==null?n.sibling:null);Gt($t,$t.current&1);break;case 19:if(i=(t&e.childLanes)!==0,n.flags&128){if(i)return L2(n,e,t);e.flags|=128}if(r=e.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),Gt($t,$t.current),i)break;return null;case 22:case 23:return e.lanes=0,b2(n,e,t)}return Us(n,e,t)}var R2,nx,I2,D2;R2=function(n,e){for(var t=e.child;t!==null;){if(t.tag===5||t.tag===6)n.appendChild(t.stateNode);else if(t.tag!==4&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return;t=t.return}t.sibling.return=t.return,t=t.sibling}};nx=function(){};I2=function(n,e,t,i){var r=n.memoizedProps;if(r!==i){n=e.stateNode,ba($r.current);var s=null;switch(t){case"input":r=Ay(n,r),i=Ay(n,i),s=[];break;case"select":r=sn({},r,{value:void 0}),i=sn({},i,{value:void 0}),s=[];break;case"textarea":r=Ty(n,r),i=Ty(n,i),s=[];break;default:typeof r.onClick!="function"&&typeof i.onClick=="function"&&(n.onclick=pm)}Py(t,i);var o;t=null;for(f in r)if(!i.hasOwnProperty(f)&&r.hasOwnProperty(f)&&r[f]!=null)if(f==="style"){var a=r[f];for(o in a)a.hasOwnProperty(o)&&(t||(t={}),t[o]="")}else f!=="dangerouslySetInnerHTML"&&f!=="children"&&f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(ff.hasOwnProperty(f)?s||(s=[]):(s=s||[]).push(f,null));for(f in i){var l=i[f];if(a=r!=null?r[f]:void 0,i.hasOwnProperty(f)&&l!==a&&(l!=null||a!=null))if(f==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(t||(t={}),t[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(t||(t={}),t[o]=l[o])}else t||(s||(s=[]),s.push(f,t)),t=l;else f==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(f,l)):f==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(f,""+l):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&(ff.hasOwnProperty(f)?(l!=null&&f==="onScroll"&&jt("scroll",n),s||a===l||(s=[])):(s=s||[]).push(f,l))}t&&(s=s||[]).push("style",t);var f=s;(e.updateQueue=f)&&(e.flags|=4)}};D2=function(n,e,t,i){t!==i&&(e.flags|=4)};function xc(n,e){if(!Kt)switch(n.tailMode){case"hidden":e=n.tail;for(var t=null;e!==null;)e.alternate!==null&&(t=e),e=e.sibling;t===null?n.tail=null:t.sibling=null;break;case"collapsed":t=n.tail;for(var i=null;t!==null;)t.alternate!==null&&(i=t),t=t.sibling;i===null?e||n.tail===null?n.tail=null:n.tail.sibling=null:i.sibling=null}}function ei(n){var e=n.alternate!==null&&n.alternate.child===n.child,t=0,i=0;if(e)for(var r=n.child;r!==null;)t|=r.lanes|r.childLanes,i|=r.subtreeFlags&14680064,i|=r.flags&14680064,r.return=n,r=r.sibling;else for(r=n.child;r!==null;)t|=r.lanes|r.childLanes,i|=r.subtreeFlags,i|=r.flags,r.return=n,r=r.sibling;return n.subtreeFlags|=i,n.childLanes=t,e}function oN(n,e,t){var i=e.pendingProps;switch(X_(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ei(e),null;case 1:return Pi(e.type)&&mm(),ei(e),null;case 3:return i=e.stateNode,Eu(),Xt(Ci),Xt(oi),t1(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(n===null||n.child===null)&&(Fd(e)?e.flags|=4:n===null||n.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Pr!==null&&(cx(Pr),Pr=null))),nx(n,e),ei(e),null;case 5:e1(e);var r=ba(Mf.current);if(t=e.type,n!==null&&e.stateNode!=null)I2(n,e,t,i,r),n.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!i){if(e.stateNode===null)throw Error(Ce(166));return ei(e),null}if(n=ba($r.current),Fd(e)){i=e.stateNode,t=e.type;var s=e.memoizedProps;switch(i[Kr]=e,i[Sf]=s,n=(e.mode&1)!==0,t){case"dialog":jt("cancel",i),jt("close",i);break;case"iframe":case"object":case"embed":jt("load",i);break;case"video":case"audio":for(r=0;r<\/script>",n=n.removeChild(n.firstChild)):typeof i.is=="string"?n=o.createElement(t,{is:i.is}):(n=o.createElement(t),t==="select"&&(o=n,i.multiple?o.multiple=!0:i.size&&(o.size=i.size))):n=o.createElementNS(n,t),n[Kr]=e,n[Sf]=i,R2(n,e,!1,!1),e.stateNode=n;e:{switch(o=Ly(t,i),t){case"dialog":jt("cancel",n),jt("close",n),r=i;break;case"iframe":case"object":case"embed":jt("load",n),r=i;break;case"video":case"audio":for(r=0;rTu&&(e.flags|=128,i=!0,xc(s,!1),e.lanes=4194304)}else{if(!i)if(n=wm(o),n!==null){if(e.flags|=128,i=!0,t=n.updateQueue,t!==null&&(e.updateQueue=t,e.flags|=4),xc(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!Kt)return ei(e),null}else 2*mn()-s.renderingStartTime>Tu&&t!==1073741824&&(e.flags|=128,i=!0,xc(s,!1),e.lanes=4194304);s.isBackwards?(o.sibling=e.child,e.child=o):(t=s.last,t!==null?t.sibling=o:e.child=o,s.last=o)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=mn(),e.sibling=null,t=$t.current,Gt($t,i?t&1|2:t&1),e):(ei(e),null);case 22:case 23:return h1(),i=e.memoizedState!==null,n!==null&&n.memoizedState!==null!==i&&(e.flags|=8192),i&&e.mode&1?Fi&1073741824&&(ei(e),e.subtreeFlags&6&&(e.flags|=8192)):ei(e),null;case 24:return null;case 25:return null}throw Error(Ce(156,e.tag))}function aN(n,e){switch(X_(e),e.tag){case 1:return Pi(e.type)&&mm(),n=e.flags,n&65536?(e.flags=n&-65537|128,e):null;case 3:return Eu(),Xt(Ci),Xt(oi),t1(),n=e.flags,n&65536&&!(n&128)?(e.flags=n&-65537|128,e):null;case 5:return e1(e),null;case 13:if(Xt($t),n=e.memoizedState,n!==null&&n.dehydrated!==null){if(e.alternate===null)throw Error(Ce(340));Mu()}return n=e.flags,n&65536?(e.flags=n&-65537|128,e):null;case 19:return Xt($t),null;case 4:return Eu(),null;case 10:return J_(e.type._context),null;case 22:case 23:return h1(),null;case 24:return null;default:return null}}var Hd=!1,ii=!1,lN=typeof WeakSet=="function"?WeakSet:Set,Be=null;function eu(n,e){var t=n.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(i){ln(n,e,i)}else t.current=null}function ix(n,e,t){try{t()}catch(i){ln(n,e,i)}}var gA=!1;function uN(n,e){if(By=fm,n=UC(),G_(n)){if("selectionStart"in n)var t={start:n.selectionStart,end:n.selectionEnd};else e:{t=(t=n.ownerDocument)&&t.defaultView||window;var i=t.getSelection&&t.getSelection();if(i&&i.rangeCount!==0){t=i.anchorNode;var r=i.anchorOffset,s=i.focusNode;i=i.focusOffset;try{t.nodeType,s.nodeType}catch{t=null;break e}var o=0,a=-1,l=-1,f=0,h=0,d=n,p=null;t:for(;;){for(var v;d!==t||r!==0&&d.nodeType!==3||(a=o+r),d!==s||i!==0&&d.nodeType!==3||(l=o+i),d.nodeType===3&&(o+=d.nodeValue.length),(v=d.firstChild)!==null;)p=d,d=v;for(;;){if(d===n)break t;if(p===t&&++f===r&&(a=o),p===s&&++h===i&&(l=o),(v=d.nextSibling)!==null)break;d=p,p=d.parentNode}d=v}t=a===-1||l===-1?null:{start:a,end:l}}else t=null}t=t||{start:0,end:0}}else t=null;for(Vy={focusedElem:n,selectionRange:t},fm=!1,Be=e;Be!==null;)if(e=Be,n=e.child,(e.subtreeFlags&1028)!==0&&n!==null)n.return=e,Be=n;else for(;Be!==null;){e=Be;try{var y=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var _=y.memoizedProps,M=y.memoizedState,m=e.stateNode,S=m.getSnapshotBeforeUpdate(e.elementType===e.type?_:br(e.type,_),M);m.__reactInternalSnapshotBeforeUpdate=S}break;case 3:var w=e.stateNode.containerInfo;w.nodeType===1?w.textContent="":w.nodeType===9&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ce(163))}}catch(A){ln(e,e.return,A)}if(n=e.sibling,n!==null){n.return=e.return,Be=n;break}Be=e.return}return y=gA,gA=!1,y}function Kc(n,e,t){var i=e.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var r=i=i.next;do{if((r.tag&n)===n){var s=r.destroy;r.destroy=void 0,s!==void 0&&ix(e,t,s)}r=r.next}while(r!==i)}}function tg(n,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var t=e=e.next;do{if((t.tag&n)===n){var i=t.create;t.destroy=i()}t=t.next}while(t!==e)}}function rx(n){var e=n.ref;if(e!==null){var t=n.stateNode;switch(n.tag){case 5:n=t;break;default:n=t}typeof e=="function"?e(n):e.current=n}}function k2(n){var e=n.alternate;e!==null&&(n.alternate=null,k2(e)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(e=n.stateNode,e!==null&&(delete e[Kr],delete e[Sf],delete e[Gy],delete e[jk],delete e[Xk])),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}function N2(n){return n.tag===5||n.tag===3||n.tag===4}function vA(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||N2(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function sx(n,e,t){var i=n.tag;if(i===5||i===6)n=n.stateNode,e?t.nodeType===8?t.parentNode.insertBefore(n,e):t.insertBefore(n,e):(t.nodeType===8?(e=t.parentNode,e.insertBefore(n,t)):(e=t,e.appendChild(n)),t=t._reactRootContainer,t!=null||e.onclick!==null||(e.onclick=pm));else if(i!==4&&(n=n.child,n!==null))for(sx(n,e,t),n=n.sibling;n!==null;)sx(n,e,t),n=n.sibling}function ox(n,e,t){var i=n.tag;if(i===5||i===6)n=n.stateNode,e?t.insertBefore(n,e):t.appendChild(n);else if(i!==4&&(n=n.child,n!==null))for(ox(n,e,t),n=n.sibling;n!==null;)ox(n,e,t),n=n.sibling}var Wn=null,Tr=!1;function to(n,e,t){for(t=t.child;t!==null;)O2(n,e,t),t=t.sibling}function O2(n,e,t){if(Qr&&typeof Qr.onCommitFiberUnmount=="function")try{Qr.onCommitFiberUnmount(Ym,t)}catch{}switch(t.tag){case 5:ii||eu(t,e);case 6:var i=Wn,r=Tr;Wn=null,to(n,e,t),Wn=i,Tr=r,Wn!==null&&(Tr?(n=Wn,t=t.stateNode,n.nodeType===8?n.parentNode.removeChild(t):n.removeChild(t)):Wn.removeChild(t.stateNode));break;case 18:Wn!==null&&(Tr?(n=Wn,t=t.stateNode,n.nodeType===8?sv(n.parentNode,t):n.nodeType===1&&sv(n,t),gf(n)):sv(Wn,t.stateNode));break;case 4:i=Wn,r=Tr,Wn=t.stateNode.containerInfo,Tr=!0,to(n,e,t),Wn=i,Tr=r;break;case 0:case 11:case 14:case 15:if(!ii&&(i=t.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){r=i=i.next;do{var s=r,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&ix(t,e,o),r=r.next}while(r!==i)}to(n,e,t);break;case 1:if(!ii&&(eu(t,e),i=t.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=t.memoizedProps,i.state=t.memoizedState,i.componentWillUnmount()}catch(a){ln(t,e,a)}to(n,e,t);break;case 21:to(n,e,t);break;case 22:t.mode&1?(ii=(i=ii)||t.memoizedState!==null,to(n,e,t),ii=i):to(n,e,t);break;default:to(n,e,t)}}function yA(n){var e=n.updateQueue;if(e!==null){n.updateQueue=null;var t=n.stateNode;t===null&&(t=n.stateNode=new lN),e.forEach(function(i){var r=yN.bind(null,n,i);t.has(i)||(t.add(i),i.then(r,r))})}}function wr(n,e){var t=e.deletions;if(t!==null)for(var i=0;ir&&(r=o),i&=~s}if(i=r,i=mn()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*fN(i/1960))-i,10n?16:n,yo===null)var i=!1;else{if(n=yo,yo=null,Tm=0,bt&6)throw Error(Ce(331));var r=bt;for(bt|=4,Be=n.current;Be!==null;){var s=Be,o=s.child;if(Be.flags&16){var a=s.deletions;if(a!==null){for(var l=0;lmn()-c1?Ia(n,0):u1|=t),Li(n,e)}function G2(n,e){e===0&&(n.mode&1?(e=Dd,Dd<<=1,!(Dd&130023424)&&(Dd=4194304)):e=1);var t=pi();n=Os(n,e),n!==null&&(eh(n,e,t),Li(n,t))}function vN(n){var e=n.memoizedState,t=0;e!==null&&(t=e.retryLane),G2(n,t)}function yN(n,e){var t=0;switch(n.tag){case 13:var i=n.stateNode,r=n.memoizedState;r!==null&&(t=r.retryLane);break;case 19:i=n.stateNode;break;default:throw Error(Ce(314))}i!==null&&i.delete(e),G2(n,t)}var j2;j2=function(n,e,t){if(n!==null)if(n.memoizedProps!==e.pendingProps||Ci.current)Ti=!0;else{if(!(n.lanes&t)&&!(e.flags&128))return Ti=!1,sN(n,e,t);Ti=!!(n.flags&131072)}else Ti=!1,Kt&&e.flags&1048576&&qC(e,ym,e.index);switch(e.lanes=0,e.tag){case 2:var i=e.type;Yp(n,e),n=e.pendingProps;var r=wu(e,oi.current);gu(e,t),r=i1(null,e,i,n,r,t);var s=r1();return e.flags|=1,typeof r=="object"&&r!==null&&typeof r.render=="function"&&r.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Pi(i)?(s=!0,gm(e)):s=!1,e.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,Q_(e),r.updater=$m,e.stateNode=r,r._reactInternals=e,Jy(e,i,n,t),e=$y(null,e,i,!0,s,t)):(e.tag=0,Kt&&s&&j_(e),di(null,e,r,t),e=e.child),e;case 16:i=e.elementType;e:{switch(Yp(n,e),n=e.pendingProps,r=i._init,i=r(i._payload),e.type=i,r=e.tag=_N(i),n=br(i,n),r){case 0:e=Qy(null,e,i,n,t);break e;case 1:e=dA(null,e,i,n,t);break e;case 11:e=fA(null,e,i,n,t);break e;case 14:e=hA(null,e,i,br(i.type,n),t);break e}throw Error(Ce(306,i,""))}return e;case 0:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:br(i,r),Qy(n,e,i,r,t);case 1:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:br(i,r),dA(n,e,i,r,t);case 3:e:{if(C2(e),n===null)throw Error(Ce(387));i=e.pendingProps,s=e.memoizedState,r=s.element,QC(n,e),Sm(e,i,null,t);var o=e.memoizedState;if(i=o.element,s.isDehydrated)if(s={element:i,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){r=bu(Error(Ce(423)),e),e=pA(n,e,i,t,r);break e}else if(i!==r){r=bu(Error(Ce(424)),e),e=pA(n,e,i,t,r);break e}else for(Hi=Eo(e.stateNode.containerInfo.firstChild),Gi=e,Kt=!0,Pr=null,t=n2(e,null,i,t),e.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling;else{if(Mu(),i===r){e=Us(n,e,t);break e}di(n,e,i,t)}e=e.child}return e;case 5:return i2(e),n===null&&Yy(e),i=e.type,r=e.pendingProps,s=n!==null?n.memoizedProps:null,o=r.children,Hy(i,r)?o=null:s!==null&&Hy(i,s)&&(e.flags|=32),T2(n,e),di(n,e,o,t),e.child;case 6:return n===null&&Yy(e),null;case 13:return P2(n,e,t);case 4:return $_(e,e.stateNode.containerInfo),i=e.pendingProps,n===null?e.child=Au(e,null,i,t):di(n,e,i,t),e.child;case 11:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:br(i,r),fA(n,e,i,r,t);case 7:return di(n,e,e.pendingProps,t),e.child;case 8:return di(n,e,e.pendingProps.children,t),e.child;case 12:return di(n,e,e.pendingProps.children,t),e.child;case 10:e:{if(i=e.type._context,r=e.pendingProps,s=e.memoizedProps,o=r.value,Gt(xm,i._currentValue),i._currentValue=o,s!==null)if(Nr(s.value,o)){if(s.children===r.children&&!Ci.current){e=Us(n,e,t);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===i){if(s.tag===1){l=Ls(-1,t&-t),l.tag=2;var f=s.updateQueue;if(f!==null){f=f.shared;var h=f.pending;h===null?l.next=l:(l.next=h.next,h.next=l),f.pending=l}}s.lanes|=t,l=s.alternate,l!==null&&(l.lanes|=t),qy(s.return,t,e),a.lanes|=t;break}l=l.next}}else if(s.tag===10)o=s.type===e.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(Ce(341));o.lanes|=t,a=o.alternate,a!==null&&(a.lanes|=t),qy(o,t,e),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}di(n,e,r.children,t),e=e.child}return e;case 9:return r=e.type,i=e.pendingProps.children,gu(e,t),r=dr(r),i=i(r),e.flags|=1,di(n,e,i,t),e.child;case 14:return i=e.type,r=br(i,e.pendingProps),r=br(i.type,r),hA(n,e,i,r,t);case 15:return E2(n,e,e.type,e.pendingProps,t);case 17:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:br(i,r),Yp(n,e),e.tag=1,Pi(i)?(n=!0,gm(e)):n=!1,gu(e,t),e2(e,i,r),Jy(e,i,r,t),$y(null,e,i,!0,n,t);case 19:return L2(n,e,t);case 22:return b2(n,e,t)}throw Error(Ce(156,e.tag))};function X2(n,e){return yC(n,e)}function xN(n,e,t,i){this.tag=n,this.key=t,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function fr(n,e,t,i){return new xN(n,e,t,i)}function p1(n){return n=n.prototype,!(!n||!n.isReactComponent)}function _N(n){if(typeof n=="function")return p1(n)?1:0;if(n!=null){if(n=n.$$typeof,n===D_)return 11;if(n===k_)return 14}return 2}function Po(n,e){var t=n.alternate;return t===null?(t=fr(n.tag,e,n.key,n.mode),t.elementType=n.elementType,t.type=n.type,t.stateNode=n.stateNode,t.alternate=n,n.alternate=t):(t.pendingProps=e,t.type=n.type,t.flags=0,t.subtreeFlags=0,t.deletions=null),t.flags=n.flags&14680064,t.childLanes=n.childLanes,t.lanes=n.lanes,t.child=n.child,t.memoizedProps=n.memoizedProps,t.memoizedState=n.memoizedState,t.updateQueue=n.updateQueue,e=n.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},t.sibling=n.sibling,t.index=n.index,t.ref=n.ref,t}function Jp(n,e,t,i,r,s){var o=2;if(i=n,typeof n=="function")p1(n)&&(o=1);else if(typeof n=="string")o=5;else e:switch(n){case jl:return Da(t.children,r,s,e);case I_:o=8,r|=8;break;case _y:return n=fr(12,t,e,r|2),n.elementType=_y,n.lanes=s,n;case Sy:return n=fr(13,t,e,r),n.elementType=Sy,n.lanes=s,n;case wy:return n=fr(19,t,e,r),n.elementType=wy,n.lanes=s,n;case tC:return ig(t,r,s,e);default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case $T:o=10;break e;case eC:o=9;break e;case D_:o=11;break e;case k_:o=14;break e;case co:o=16,i=null;break e}throw Error(Ce(130,n==null?n:typeof n,""))}return e=fr(o,t,e,r),e.elementType=n,e.type=i,e.lanes=s,e}function Da(n,e,t,i){return n=fr(7,n,i,e),n.lanes=t,n}function ig(n,e,t,i){return n=fr(22,n,i,e),n.elementType=tC,n.lanes=t,n.stateNode={isHidden:!1},n}function dv(n,e,t){return n=fr(6,n,null,e),n.lanes=t,n}function pv(n,e,t){return e=fr(4,n.children!==null?n.children:[],n.key,e),e.lanes=t,e.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},e}function SN(n,e,t,i,r){this.tag=e,this.containerInfo=n,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=q0(0),this.expirationTimes=q0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=q0(0),this.identifierPrefix=i,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function m1(n,e,t,i,r,s,o,a,l){return n=new SN(n,e,t,a,l),e===1?(e=1,s===!0&&(e|=8)):e=0,s=fr(3,null,null,e),n.current=s,s.stateNode=n,s.memoizedState={element:i,isDehydrated:t,cache:null,transitions:null,pendingSuspenseBoundaries:null},Q_(s),n}function wN(n,e,t){var i=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(J2)}catch(n){console.error(n)}}J2(),qT.exports=qi;var TN=qT.exports,K2,bA=TN;K2=yy.createRoot=bA.createRoot,yy.hydrateRoot=bA.hydrateRoot;/** * @remix-run/router v1.5.0 * * Copyright (c) Remix Software Inc. @@ -46,7 +46,7 @@ Error generating stack: `+s.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Cf(){return Cf=Object.assign?Object.assign.bind():function(n){for(var e=1;e"u")throw new Error(e)}function x1(n,e){if(!n){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function PN(){return Math.random().toString(36).substr(2,8)}function CA(n,e){return{usr:n.state,key:n.key,idx:e}}function fx(n,e,t,i){return t===void 0&&(t=null),Cf({pathname:typeof n=="string"?n:n.pathname,search:"",hash:""},typeof e=="string"?zu(e):e,{state:t,key:e&&e.key||i||PN()})}function Lm(n){let{pathname:e="/",search:t="",hash:i=""}=n;return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),i&&i!=="#"&&(e+=i.charAt(0)==="#"?i:"#"+i),e}function zu(n){let e={};if(n){let t=n.indexOf("#");t>=0&&(e.hash=n.substr(t),n=n.substr(0,t));let i=n.indexOf("?");i>=0&&(e.search=n.substr(i),n=n.substr(0,i)),n&&(e.pathname=n)}return e}function LN(n,e,t,i){i===void 0&&(i={});let{window:r=document.defaultView,v5Compat:s=!1}=i,o=r.history,a=xo.Pop,l=null,f=h();f==null&&(f=0,o.replaceState(Cf({},o.state,{idx:f}),""));function h(){return(o.state||{idx:null}).idx}function d(){a=xo.Pop;let M=h(),m=M==null?null:M-f;f=M,l&&l({action:a,location:_.location,delta:m})}function p(M,m){a=xo.Push;let S=fx(_.location,M,m);t&&t(S,M),f=h()+1;let w=CA(S,f),A=_.createHref(S);try{o.pushState(w,"",A)}catch{r.location.assign(A)}s&&l&&l({action:a,location:_.location,delta:1})}function v(M,m){a=xo.Replace;let S=fx(_.location,M,m);t&&t(S,M),f=h();let w=CA(S,f),A=_.createHref(S);o.replaceState(w,"",A),s&&l&&l({action:a,location:_.location,delta:0})}function y(M){let m=r.location.origin!=="null"?r.location.origin:r.location.href,S=typeof M=="string"?M:Lm(M);return Cn(m,"No window.location.(origin|href) available to create URL for href: "+S),new URL(S,m)}let _={get action(){return a},get location(){return n(r,o)},listen(M){if(l)throw new Error("A history only accepts one active listener");return r.addEventListener(TA,d),l=M,()=>{r.removeEventListener(TA,d),l=null}},createHref(M){return e(r,M)},createURL:y,encodeLocation(M){let m=y(M);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:p,replace:v,go(M){return o.go(M)}};return _}var PA;(function(n){n.data="data",n.deferred="deferred",n.redirect="redirect",n.error="error"})(PA||(PA={}));function RN(n,e,t){t===void 0&&(t="/");let i=typeof e=="string"?zu(e):e,r=_1(i.pathname||"/",t);if(r==null)return null;let s=Q2(n);IN(s);let o=null;for(let a=0;o==null&&a{let l={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};l.relativePath.startsWith("/")&&(Cn(l.relativePath.startsWith(i),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+i+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(i.length));let f=Lo([i,l.relativePath]),h=t.concat(l);s.children&&s.children.length>0&&(Cn(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+f+'".')),Q2(s.children,e,h,f)),!(s.path==null&&!s.index)&&e.push({path:f,score:FN(f,s.index),routesMeta:h})};return n.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))r(s,o);else for(let l of $2(s.path))r(s,o,l)}),e}function $2(n){let e=n.split("/");if(e.length===0)return[];let[t,...i]=e,r=t.endsWith("?"),s=t.replace(/\?$/,"");if(i.length===0)return r?[s,""]:[s];let o=$2(i.join("/")),a=[];return a.push(...o.map(l=>l===""?s:[s,l].join("/"))),r&&a.push(...o),a.map(l=>n.startsWith("/")&&l===""?"/":l)}function IN(n){n.sort((e,t)=>e.score!==t.score?t.score-e.score:BN(e.routesMeta.map(i=>i.childrenIndex),t.routesMeta.map(i=>i.childrenIndex)))}const DN=/^:\w+$/,kN=3,NN=2,ON=1,UN=10,zN=-2,LA=n=>n==="*";function FN(n,e){let t=n.split("/"),i=t.length;return t.some(LA)&&(i+=zN),e&&(i+=NN),t.filter(r=>!LA(r)).reduce((r,s)=>r+(DN.test(s)?kN:s===""?ON:UN),i)}function BN(n,e){return n.length===e.length&&n.slice(0,-1).every((i,r)=>i===e[r])?n[n.length-1]-e[e.length-1]:0}function VN(n,e){let{routesMeta:t}=n,i={},r="/",s=[];for(let o=0;o{if(h==="*"){let p=a[d]||"";o=s.slice(0,s.length-p.length).replace(/(.)\/+$/,"$1")}return f[h]=jN(a[d]||"",h),f},{}),pathname:s,pathnameBase:o,pattern:n}}function WN(n,e,t){e===void 0&&(e=!1),t===void 0&&(t=!0),x1(n==="*"||!n.endsWith("*")||n.endsWith("/*"),'Route path "'+n+'" will be treated as if it were '+('"'+n.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+n.replace(/\*$/,"/*")+'".'));let i=[],r="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(o,a)=>(i.push(a),"/([^\\/]+)"));return n.endsWith("*")?(i.push("*"),r+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):t?r+="\\/*$":n!==""&&n!=="/"&&(r+="(?:(?=\\/|$))"),[new RegExp(r,e?void 0:"i"),i]}function GN(n){try{return decodeURI(n)}catch(e){return x1(!1,'The URL path "'+n+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),n}}function jN(n,e){try{return decodeURIComponent(n)}catch(t){return x1(!1,'The value for the URL param "'+e+'" will not be decoded because'+(' the string "'+n+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+t+").")),n}}function _1(n,e){if(e==="/")return n;if(!n.toLowerCase().startsWith(e.toLowerCase()))return null;let t=e.endsWith("/")?e.length-1:e.length,i=n.charAt(t);return i&&i!=="/"?null:n.slice(t)||"/"}function XN(n,e){e===void 0&&(e="/");let{pathname:t,search:i="",hash:r=""}=typeof n=="string"?zu(n):n;return{pathname:t?t.startsWith("/")?t:YN(t,e):e,search:ZN(i),hash:JN(r)}}function YN(n,e){let t=e.replace(/\/+$/,"").split("/");return n.split("/").forEach(r=>{r===".."?t.length>1&&t.pop():r!=="."&&t.push(r)}),t.length>1?t.join("/"):"/"}function gv(n,e,t,i){return"Cannot include a '"+n+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(i)+"]. Please separate it out to the ")+("`to."+t+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function eP(n){return n.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function tP(n,e,t,i){i===void 0&&(i=!1);let r;typeof n=="string"?r=zu(n):(r=Cf({},n),Cn(!r.pathname||!r.pathname.includes("?"),gv("?","pathname","search",r)),Cn(!r.pathname||!r.pathname.includes("#"),gv("#","pathname","hash",r)),Cn(!r.search||!r.search.includes("#"),gv("#","search","hash",r)));let s=n===""||r.pathname==="",o=s?"/":r.pathname,a;if(i||o==null)a=t;else{let d=e.length-1;if(o.startsWith("..")){let p=o.split("/");for(;p[0]==="..";)p.shift(),d-=1;r.pathname=p.join("/")}a=d>=0?e[d]:"/"}let l=XN(r,a),f=o&&o!=="/"&&o.endsWith("/"),h=(s||o===".")&&t.endsWith("/");return!l.pathname.endsWith("/")&&(f||h)&&(l.pathname+="/"),l}const Lo=n=>n.join("/").replace(/\/\/+/g,"/"),qN=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),ZN=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,JN=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n;function KN(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}const nP=["post","put","patch","delete"];new Set(nP);const QN=["get",...nP];new Set(QN);/** + */function Cf(){return Cf=Object.assign?Object.assign.bind():function(n){for(var e=1;e"u")throw new Error(e)}function x1(n,e){if(!n){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function PN(){return Math.random().toString(36).substr(2,8)}function CA(n,e){return{usr:n.state,key:n.key,idx:e}}function fx(n,e,t,i){return t===void 0&&(t=null),Cf({pathname:typeof n=="string"?n:n.pathname,search:"",hash:""},typeof e=="string"?zu(e):e,{state:t,key:e&&e.key||i||PN()})}function Lm(n){let{pathname:e="/",search:t="",hash:i=""}=n;return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),i&&i!=="#"&&(e+=i.charAt(0)==="#"?i:"#"+i),e}function zu(n){let e={};if(n){let t=n.indexOf("#");t>=0&&(e.hash=n.substr(t),n=n.substr(0,t));let i=n.indexOf("?");i>=0&&(e.search=n.substr(i),n=n.substr(0,i)),n&&(e.pathname=n)}return e}function LN(n,e,t,i){i===void 0&&(i={});let{window:r=document.defaultView,v5Compat:s=!1}=i,o=r.history,a=xo.Pop,l=null,f=h();f==null&&(f=0,o.replaceState(Cf({},o.state,{idx:f}),""));function h(){return(o.state||{idx:null}).idx}function d(){a=xo.Pop;let M=h(),m=M==null?null:M-f;f=M,l&&l({action:a,location:_.location,delta:m})}function p(M,m){a=xo.Push;let S=fx(_.location,M,m);t&&t(S,M),f=h()+1;let w=CA(S,f),A=_.createHref(S);try{o.pushState(w,"",A)}catch{r.location.assign(A)}s&&l&&l({action:a,location:_.location,delta:1})}function v(M,m){a=xo.Replace;let S=fx(_.location,M,m);t&&t(S,M),f=h();let w=CA(S,f),A=_.createHref(S);o.replaceState(w,"",A),s&&l&&l({action:a,location:_.location,delta:0})}function y(M){let m=r.location.origin!=="null"?r.location.origin:r.location.href,S=typeof M=="string"?M:Lm(M);return Cn(m,"No window.location.(origin|href) available to create URL for href: "+S),new URL(S,m)}let _={get action(){return a},get location(){return n(r,o)},listen(M){if(l)throw new Error("A history only accepts one active listener");return r.addEventListener(TA,d),l=M,()=>{r.removeEventListener(TA,d),l=null}},createHref(M){return e(r,M)},createURL:y,encodeLocation(M){let m=y(M);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:p,replace:v,go(M){return o.go(M)}};return _}var PA;(function(n){n.data="data",n.deferred="deferred",n.redirect="redirect",n.error="error"})(PA||(PA={}));function RN(n,e,t){t===void 0&&(t="/");let i=typeof e=="string"?zu(e):e,r=_1(i.pathname||"/",t);if(r==null)return null;let s=Q2(n);IN(s);let o=null;for(let a=0;o==null&&a{let l={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};l.relativePath.startsWith("/")&&(Cn(l.relativePath.startsWith(i),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+i+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(i.length));let f=Lo([i,l.relativePath]),h=t.concat(l);s.children&&s.children.length>0&&(Cn(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+f+'".')),Q2(s.children,e,h,f)),!(s.path==null&&!s.index)&&e.push({path:f,score:FN(f,s.index),routesMeta:h})};return n.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))r(s,o);else for(let l of $2(s.path))r(s,o,l)}),e}function $2(n){let e=n.split("/");if(e.length===0)return[];let[t,...i]=e,r=t.endsWith("?"),s=t.replace(/\?$/,"");if(i.length===0)return r?[s,""]:[s];let o=$2(i.join("/")),a=[];return a.push(...o.map(l=>l===""?s:[s,l].join("/"))),r&&a.push(...o),a.map(l=>n.startsWith("/")&&l===""?"/":l)}function IN(n){n.sort((e,t)=>e.score!==t.score?t.score-e.score:BN(e.routesMeta.map(i=>i.childrenIndex),t.routesMeta.map(i=>i.childrenIndex)))}const DN=/^:\w+$/,kN=3,NN=2,ON=1,UN=10,zN=-2,LA=n=>n==="*";function FN(n,e){let t=n.split("/"),i=t.length;return t.some(LA)&&(i+=zN),e&&(i+=NN),t.filter(r=>!LA(r)).reduce((r,s)=>r+(DN.test(s)?kN:s===""?ON:UN),i)}function BN(n,e){return n.length===e.length&&n.slice(0,-1).every((i,r)=>i===e[r])?n[n.length-1]-e[e.length-1]:0}function VN(n,e){let{routesMeta:t}=n,i={},r="/",s=[];for(let o=0;o{if(h==="*"){let p=a[d]||"";o=s.slice(0,s.length-p.length).replace(/(.)\/+$/,"$1")}return f[h]=jN(a[d]||"",h),f},{}),pathname:s,pathnameBase:o,pattern:n}}function WN(n,e,t){e===void 0&&(e=!1),t===void 0&&(t=!0),x1(n==="*"||!n.endsWith("*")||n.endsWith("/*"),'Route path "'+n+'" will be treated as if it were '+('"'+n.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+n.replace(/\*$/,"/*")+'".'));let i=[],r="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(o,a)=>(i.push(a),"/([^\\/]+)"));return n.endsWith("*")?(i.push("*"),r+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):t?r+="\\/*$":n!==""&&n!=="/"&&(r+="(?:(?=\\/|$))"),[new RegExp(r,e?void 0:"i"),i]}function GN(n){try{return decodeURI(n)}catch(e){return x1(!1,'The URL path "'+n+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),n}}function jN(n,e){try{return decodeURIComponent(n)}catch(t){return x1(!1,'The value for the URL param "'+e+'" will not be decoded because'+(' the string "'+n+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+t+").")),n}}function _1(n,e){if(e==="/")return n;if(!n.toLowerCase().startsWith(e.toLowerCase()))return null;let t=e.endsWith("/")?e.length-1:e.length,i=n.charAt(t);return i&&i!=="/"?null:n.slice(t)||"/"}function XN(n,e){e===void 0&&(e="/");let{pathname:t,search:i="",hash:r=""}=typeof n=="string"?zu(n):n;return{pathname:t?t.startsWith("/")?t:YN(t,e):e,search:ZN(i),hash:JN(r)}}function YN(n,e){let t=e.replace(/\/+$/,"").split("/");return n.split("/").forEach(r=>{r===".."?t.length>1&&t.pop():r!=="."&&t.push(r)}),t.length>1?t.join("/"):"/"}function mv(n,e,t,i){return"Cannot include a '"+n+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(i)+"]. Please separate it out to the ")+("`to."+t+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function eP(n){return n.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function tP(n,e,t,i){i===void 0&&(i=!1);let r;typeof n=="string"?r=zu(n):(r=Cf({},n),Cn(!r.pathname||!r.pathname.includes("?"),mv("?","pathname","search",r)),Cn(!r.pathname||!r.pathname.includes("#"),mv("#","pathname","hash",r)),Cn(!r.search||!r.search.includes("#"),mv("#","search","hash",r)));let s=n===""||r.pathname==="",o=s?"/":r.pathname,a;if(i||o==null)a=t;else{let d=e.length-1;if(o.startsWith("..")){let p=o.split("/");for(;p[0]==="..";)p.shift(),d-=1;r.pathname=p.join("/")}a=d>=0?e[d]:"/"}let l=XN(r,a),f=o&&o!=="/"&&o.endsWith("/"),h=(s||o===".")&&t.endsWith("/");return!l.pathname.endsWith("/")&&(f||h)&&(l.pathname+="/"),l}const Lo=n=>n.join("/").replace(/\/\/+/g,"/"),qN=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),ZN=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,JN=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n;function KN(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}const nP=["post","put","patch","delete"];new Set(nP);const QN=["get",...nP];new Set(QN);/** * React Router v6.10.0 * * Copyright (c) Remix Software Inc. @@ -55,7 +55,7 @@ Error generating stack: `+s.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function $N(n,e){return n===e&&(n!==0||1/n===1/e)||n!==n&&e!==e}const eO=typeof Object.is=="function"?Object.is:$N,{useState:tO,useEffect:nO,useLayoutEffect:iO,useDebugValue:rO}=vy;function sO(n,e,t){const i=e(),[{inst:r},s]=tO({inst:{value:i,getSnapshot:e}});return iO(()=>{r.value=i,r.getSnapshot=e,vv(r)&&s({inst:r})},[n,i,e]),nO(()=>(vv(r)&&s({inst:r}),n(()=>{vv(r)&&s({inst:r})})),[n]),rO(i),i}function vv(n){const e=n.getSnapshot,t=n.value;try{const i=e();return!eO(t,i)}catch{return!0}}function oO(n,e,t){return e()}const aO=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",lO=!aO,uO=lO?oO:sO;"useSyncExternalStore"in vy&&(n=>n.useSyncExternalStore)(vy);const iP=V.createContext(null),rP=V.createContext(null),rh=V.createContext(null),lg=V.createContext(null),Fu=V.createContext({outlet:null,matches:[]}),sP=V.createContext(null);function hx(){return hx=Object.assign?Object.assign.bind():function(n){for(var e=1;ea.pathnameBase)),s=V.useRef(!1);return V.useEffect(()=>{s.current=!0}),V.useCallback(function(a,l){if(l===void 0&&(l={}),!s.current)return;if(typeof a=="number"){e.go(a);return}let f=tP(a,JSON.parse(r),i,l.relative==="path");n!=="/"&&(f.pathname=f.pathname==="/"?n:Lo([n,f.pathname])),(l.replace?e.replace:e.push)(f,l.state,l)},[n,e,r,i])}function oP(n,e){let{relative:t}=e===void 0?{}:e,{matches:i}=V.useContext(Fu),{pathname:r}=ug(),s=JSON.stringify(eP(i).map(o=>o.pathnameBase));return V.useMemo(()=>tP(n,JSON.parse(s),r,t==="path"),[n,s,r,t])}function hO(n,e){sh()||Cn(!1);let{navigator:t}=V.useContext(rh),i=V.useContext(rP),{matches:r}=V.useContext(Fu),s=r[r.length-1],o=s?s.params:{};s&&s.pathname;let a=s?s.pathnameBase:"/";s&&s.route;let l=ug(),f;if(e){var h;let _=typeof e=="string"?zu(e):e;a==="/"||(h=_.pathname)!=null&&h.startsWith(a)||Cn(!1),f=_}else f=l;let d=f.pathname||"/",p=a==="/"?d:d.slice(a.length)||"/",v=RN(n,{pathname:p}),y=gO(v&&v.map(_=>Object.assign({},_,{params:Object.assign({},o,_.params),pathname:Lo([a,t.encodeLocation?t.encodeLocation(_.pathname).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?a:Lo([a,t.encodeLocation?t.encodeLocation(_.pathnameBase).pathname:_.pathnameBase])})),r,i||void 0);return e&&y?V.createElement(lg.Provider,{value:{location:hx({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:xo.Pop}},y):y}function dO(){let n=_O(),e=KN(n)?n.status+" "+n.statusText:n instanceof Error?n.message:JSON.stringify(n),t=n instanceof Error?n.stack:null,r={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},s=null;return V.createElement(V.Fragment,null,V.createElement("h2",null,"Unexpected Application Error!"),V.createElement("h3",{style:{fontStyle:"italic"}},e),t?V.createElement("pre",{style:r},t):null,s)}class pO extends V.Component{constructor(e){super(e),this.state={location:e.location,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location?{error:e.error,location:e.location}:{error:e.error||t.error,location:t.location}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error?V.createElement(Fu.Provider,{value:this.props.routeContext},V.createElement(sP.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function mO(n){let{routeContext:e,match:t,children:i}=n,r=V.useContext(iP);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),V.createElement(Fu.Provider,{value:e},i)}function gO(n,e,t){if(e===void 0&&(e=[]),n==null)if(t!=null&&t.errors)n=t.matches;else return null;let i=n,r=t==null?void 0:t.errors;if(r!=null){let s=i.findIndex(o=>o.route.id&&(r==null?void 0:r[o.route.id]));s>=0||Cn(!1),i=i.slice(0,Math.min(i.length,s+1))}return i.reduceRight((s,o,a)=>{let l=o.route.id?r==null?void 0:r[o.route.id]:null,f=null;t&&(o.route.ErrorBoundary?f=V.createElement(o.route.ErrorBoundary,null):o.route.errorElement?f=o.route.errorElement:f=V.createElement(dO,null));let h=e.concat(i.slice(0,a+1)),d=()=>{let p=s;return l?p=f:o.route.Component?p=V.createElement(o.route.Component,null):o.route.element&&(p=o.route.element),V.createElement(mO,{match:o,routeContext:{outlet:s,matches:h},children:p})};return t&&(o.route.ErrorBoundary||o.route.errorElement||a===0)?V.createElement(pO,{location:t.location,component:f,error:l,children:d(),routeContext:{outlet:null,matches:h}}):d()},null)}var RA;(function(n){n.UseBlocker="useBlocker",n.UseRevalidator="useRevalidator"})(RA||(RA={}));var Rm;(function(n){n.UseBlocker="useBlocker",n.UseLoaderData="useLoaderData",n.UseActionData="useActionData",n.UseRouteError="useRouteError",n.UseNavigation="useNavigation",n.UseRouteLoaderData="useRouteLoaderData",n.UseMatches="useMatches",n.UseRevalidator="useRevalidator"})(Rm||(Rm={}));function vO(n){let e=V.useContext(rP);return e||Cn(!1),e}function yO(n){let e=V.useContext(Fu);return e||Cn(!1),e}function xO(n){let e=yO(),t=e.matches[e.matches.length-1];return t.route.id||Cn(!1),t.route.id}function _O(){var n;let e=V.useContext(sP),t=vO(Rm.UseRouteError),i=xO(Rm.UseRouteError);return e||((n=t.errors)==null?void 0:n[i])}function qr(n){Cn(!1)}function SO(n){let{basename:e="/",children:t=null,location:i,navigationType:r=xo.Pop,navigator:s,static:o=!1}=n;sh()&&Cn(!1);let a=e.replace(/^\/*/,"/"),l=V.useMemo(()=>({basename:a,navigator:s,static:o}),[a,s,o]);typeof i=="string"&&(i=zu(i));let{pathname:f="/",search:h="",hash:d="",state:p=null,key:v="default"}=i,y=V.useMemo(()=>{let _=_1(f,a);return _==null?null:{location:{pathname:_,search:h,hash:d,state:p,key:v},navigationType:r}},[a,f,h,d,p,v,r]);return y==null?null:V.createElement(rh.Provider,{value:l},V.createElement(lg.Provider,{children:t,value:y}))}function wO(n){let{children:e,location:t}=n,i=V.useContext(iP),r=i&&!e?i.router.routes:dx(e);return hO(r,t)}var IA;(function(n){n[n.pending=0]="pending",n[n.success=1]="success",n[n.error=2]="error"})(IA||(IA={}));new Promise(()=>{});function dx(n,e){e===void 0&&(e=[]);let t=[];return V.Children.forEach(n,(i,r)=>{if(!V.isValidElement(i))return;let s=[...e,r];if(i.type===V.Fragment){t.push.apply(t,dx(i.props.children,s));return}i.type!==qr&&Cn(!1),!i.props.index||!i.props.children||Cn(!1);let o={id:i.props.id||s.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,loader:i.props.loader,action:i.props.action,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(o.children=dx(i.props.children,s)),t.push(o)}),t}/** + */function $N(n,e){return n===e&&(n!==0||1/n===1/e)||n!==n&&e!==e}const eO=typeof Object.is=="function"?Object.is:$N,{useState:tO,useEffect:nO,useLayoutEffect:iO,useDebugValue:rO}=vy;function sO(n,e,t){const i=e(),[{inst:r},s]=tO({inst:{value:i,getSnapshot:e}});return iO(()=>{r.value=i,r.getSnapshot=e,gv(r)&&s({inst:r})},[n,i,e]),nO(()=>(gv(r)&&s({inst:r}),n(()=>{gv(r)&&s({inst:r})})),[n]),rO(i),i}function gv(n){const e=n.getSnapshot,t=n.value;try{const i=e();return!eO(t,i)}catch{return!0}}function oO(n,e,t){return e()}const aO=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",lO=!aO,uO=lO?oO:sO;"useSyncExternalStore"in vy&&(n=>n.useSyncExternalStore)(vy);const iP=V.createContext(null),rP=V.createContext(null),rh=V.createContext(null),lg=V.createContext(null),Fu=V.createContext({outlet:null,matches:[]}),sP=V.createContext(null);function hx(){return hx=Object.assign?Object.assign.bind():function(n){for(var e=1;ea.pathnameBase)),s=V.useRef(!1);return V.useEffect(()=>{s.current=!0}),V.useCallback(function(a,l){if(l===void 0&&(l={}),!s.current)return;if(typeof a=="number"){e.go(a);return}let f=tP(a,JSON.parse(r),i,l.relative==="path");n!=="/"&&(f.pathname=f.pathname==="/"?n:Lo([n,f.pathname])),(l.replace?e.replace:e.push)(f,l.state,l)},[n,e,r,i])}function oP(n,e){let{relative:t}=e===void 0?{}:e,{matches:i}=V.useContext(Fu),{pathname:r}=ug(),s=JSON.stringify(eP(i).map(o=>o.pathnameBase));return V.useMemo(()=>tP(n,JSON.parse(s),r,t==="path"),[n,s,r,t])}function hO(n,e){sh()||Cn(!1);let{navigator:t}=V.useContext(rh),i=V.useContext(rP),{matches:r}=V.useContext(Fu),s=r[r.length-1],o=s?s.params:{};s&&s.pathname;let a=s?s.pathnameBase:"/";s&&s.route;let l=ug(),f;if(e){var h;let _=typeof e=="string"?zu(e):e;a==="/"||(h=_.pathname)!=null&&h.startsWith(a)||Cn(!1),f=_}else f=l;let d=f.pathname||"/",p=a==="/"?d:d.slice(a.length)||"/",v=RN(n,{pathname:p}),y=gO(v&&v.map(_=>Object.assign({},_,{params:Object.assign({},o,_.params),pathname:Lo([a,t.encodeLocation?t.encodeLocation(_.pathname).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?a:Lo([a,t.encodeLocation?t.encodeLocation(_.pathnameBase).pathname:_.pathnameBase])})),r,i||void 0);return e&&y?V.createElement(lg.Provider,{value:{location:hx({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:xo.Pop}},y):y}function dO(){let n=_O(),e=KN(n)?n.status+" "+n.statusText:n instanceof Error?n.message:JSON.stringify(n),t=n instanceof Error?n.stack:null,r={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},s=null;return V.createElement(V.Fragment,null,V.createElement("h2",null,"Unexpected Application Error!"),V.createElement("h3",{style:{fontStyle:"italic"}},e),t?V.createElement("pre",{style:r},t):null,s)}class pO extends V.Component{constructor(e){super(e),this.state={location:e.location,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location?{error:e.error,location:e.location}:{error:e.error||t.error,location:t.location}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error?V.createElement(Fu.Provider,{value:this.props.routeContext},V.createElement(sP.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function mO(n){let{routeContext:e,match:t,children:i}=n,r=V.useContext(iP);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),V.createElement(Fu.Provider,{value:e},i)}function gO(n,e,t){if(e===void 0&&(e=[]),n==null)if(t!=null&&t.errors)n=t.matches;else return null;let i=n,r=t==null?void 0:t.errors;if(r!=null){let s=i.findIndex(o=>o.route.id&&(r==null?void 0:r[o.route.id]));s>=0||Cn(!1),i=i.slice(0,Math.min(i.length,s+1))}return i.reduceRight((s,o,a)=>{let l=o.route.id?r==null?void 0:r[o.route.id]:null,f=null;t&&(o.route.ErrorBoundary?f=V.createElement(o.route.ErrorBoundary,null):o.route.errorElement?f=o.route.errorElement:f=V.createElement(dO,null));let h=e.concat(i.slice(0,a+1)),d=()=>{let p=s;return l?p=f:o.route.Component?p=V.createElement(o.route.Component,null):o.route.element&&(p=o.route.element),V.createElement(mO,{match:o,routeContext:{outlet:s,matches:h},children:p})};return t&&(o.route.ErrorBoundary||o.route.errorElement||a===0)?V.createElement(pO,{location:t.location,component:f,error:l,children:d(),routeContext:{outlet:null,matches:h}}):d()},null)}var RA;(function(n){n.UseBlocker="useBlocker",n.UseRevalidator="useRevalidator"})(RA||(RA={}));var Rm;(function(n){n.UseBlocker="useBlocker",n.UseLoaderData="useLoaderData",n.UseActionData="useActionData",n.UseRouteError="useRouteError",n.UseNavigation="useNavigation",n.UseRouteLoaderData="useRouteLoaderData",n.UseMatches="useMatches",n.UseRevalidator="useRevalidator"})(Rm||(Rm={}));function vO(n){let e=V.useContext(rP);return e||Cn(!1),e}function yO(n){let e=V.useContext(Fu);return e||Cn(!1),e}function xO(n){let e=yO(),t=e.matches[e.matches.length-1];return t.route.id||Cn(!1),t.route.id}function _O(){var n;let e=V.useContext(sP),t=vO(Rm.UseRouteError),i=xO(Rm.UseRouteError);return e||((n=t.errors)==null?void 0:n[i])}function qr(n){Cn(!1)}function SO(n){let{basename:e="/",children:t=null,location:i,navigationType:r=xo.Pop,navigator:s,static:o=!1}=n;sh()&&Cn(!1);let a=e.replace(/^\/*/,"/"),l=V.useMemo(()=>({basename:a,navigator:s,static:o}),[a,s,o]);typeof i=="string"&&(i=zu(i));let{pathname:f="/",search:h="",hash:d="",state:p=null,key:v="default"}=i,y=V.useMemo(()=>{let _=_1(f,a);return _==null?null:{location:{pathname:_,search:h,hash:d,state:p,key:v},navigationType:r}},[a,f,h,d,p,v,r]);return y==null?null:V.createElement(rh.Provider,{value:l},V.createElement(lg.Provider,{children:t,value:y}))}function wO(n){let{children:e,location:t}=n,i=V.useContext(iP),r=i&&!e?i.router.routes:dx(e);return hO(r,t)}var IA;(function(n){n[n.pending=0]="pending",n[n.success=1]="success",n[n.error=2]="error"})(IA||(IA={}));new Promise(()=>{});function dx(n,e){e===void 0&&(e=[]);let t=[];return V.Children.forEach(n,(i,r)=>{if(!V.isValidElement(i))return;let s=[...e,r];if(i.type===V.Fragment){t.push.apply(t,dx(i.props.children,s));return}i.type!==qr&&Cn(!1),!i.props.index||!i.props.children||Cn(!1);let o={id:i.props.id||s.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,loader:i.props.loader,action:i.props.action,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(o.children=dx(i.props.children,s)),t.push(o)}),t}/** * React Router DOM v6.10.0 * * Copyright (c) Remix Software Inc. @@ -64,22 +64,22 @@ Error generating stack: `+s.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function px(){return px=Object.assign?Object.assign.bind():function(n){for(var e=1;e=0)&&(t[r]=n[r]);return t}function AO(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function EO(n,e){return n.button===0&&(!e||e==="_self")&&!AO(n)}const bO=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"];function TO(n){let{basename:e,children:t,window:i}=n,r=V.useRef();r.current==null&&(r.current=CN({window:i,v5Compat:!0}));let s=r.current,[o,a]=V.useState({action:s.action,location:s.location});return V.useLayoutEffect(()=>s.listen(a),[s]),V.createElement(SO,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:s})}const CO=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",PO=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Gd=V.forwardRef(function(e,t){let{onClick:i,relative:r,reloadDocument:s,replace:o,state:a,target:l,to:f,preventScrollReset:h}=e,d=MO(e,bO),{basename:p}=V.useContext(rh),v,y=!1;if(typeof f=="string"&&PO.test(f)&&(v=f,CO)){let S=new URL(window.location.href),w=f.startsWith("//")?new URL(S.protocol+f):new URL(f),A=_1(w.pathname,p);w.origin===S.origin&&A!=null?f=A+w.search+w.hash:y=!0}let _=cO(f,{relative:r}),M=LO(f,{replace:o,state:a,target:l,preventScrollReset:h,relative:r});function m(S){i&&i(S),S.defaultPrevented||M(S)}return V.createElement("a",px({},d,{href:v||_,onClick:y||s?i:m,ref:t,target:l}))});var DA;(function(n){n.UseScrollRestoration="useScrollRestoration",n.UseSubmitImpl="useSubmitImpl",n.UseFetcher="useFetcher"})(DA||(DA={}));var kA;(function(n){n.UseFetchers="useFetchers",n.UseScrollRestoration="useScrollRestoration"})(kA||(kA={}));function LO(n,e){let{target:t,replace:i,state:r,preventScrollReset:s,relative:o}=e===void 0?{}:e,a=fO(),l=ug(),f=oP(n,{relative:o});return V.useCallback(h=>{if(EO(h,t)){h.preventDefault();let d=i!==void 0?i:Lm(l)===Lm(f);a(n,{replace:d,state:r,preventScrollReset:s,relative:o})}},[l,a,f,i,r,t,n,s,o])}const Ws="/portfolio-react-threejs/assets/anim-bg-41fcb528.gif",Yt={paddingX:"sm:px-16 px-6",paddingY:"sm:py-16 py-6",padding:"sm:px-16 px-6 sm:py-16 py-10",heroHeadText:"font-black text-[#373737] lg:text-[80px] sm:text-[60px] xs:text-[50px] text-[40px] lg:leading-[98px] mt-2",heroSubText:"text-[#dfd9ff] font-medium lg:text-[30px] sm:text-[26px] xs:text-[20px] text-[16px] lg:leading-[40px]",sectionHeadText:"text-black font-black md:text-[60px] sm:text-[50px] xs:text-[40px] text-[30px]",sectionSubText:"sm:text-[18px] text-[14px] text-secondary uppercase tracking-wider"},RO="/portfolio-react-threejs/assets/web-0c6824d5.webp",IO="/portfolio-react-threejs/assets/mobile-84df6906.webp",DO="/portfolio-react-threejs/assets/creator-ab86683b.webp",kO="/portfolio-react-threejs/assets/csi-1f769921.webp",NO="/portfolio-react-threejs/assets/msc-abe50c5d.webp",OO="/portfolio-react-threejs/assets/techyv-adede69e.webp",UO="/portfolio-react-threejs/assets/shapeout-d15c331a.webp",zO="/portfolio-react-threejs/assets/facedetection-65dc0246.webp",FO="/portfolio-react-threejs/assets/Hi-783be2bb.webp",BO="/portfolio-react-threejs/assets/langgo-41707292.webp",VO="/portfolio-react-threejs/assets/lifeoverseas-fd137d40.webp",HO="/portfolio-react-threejs/assets/velox-429d856c.webp",WO="/portfolio-react-threejs/assets/yolo-9ff20b51.webp",GO="/portfolio-react-threejs/assets/anon_exchange-3f3d612c.webp",jO="/portfolio-react-threejs/assets/banana_class-8925bee5.webp",XO="/portfolio-react-threejs/assets/convogen-ba953cbd.webp",YO="/portfolio-react-threejs/assets/1-710ab004.webp",qO="/portfolio-react-threejs/assets/2-bd31252c.webp",ZO="/portfolio-react-threejs/assets/3-da0bbfbc.webp",JO="/portfolio-react-threejs/assets/4-8d092131.webp",KO="/portfolio-react-threejs/assets/5-b3191ff5.webp",QO="/portfolio-react-threejs/assets/6-b412236c.webp",$O="/portfolio-react-threejs/assets/7-21761f9b.webp",eU="/portfolio-react-threejs/assets/8-b4888019.webp",tU="/portfolio-react-threejs/assets/9-22d557f1.webp",nU="/portfolio-react-threejs/assets/1-bc4e4556.webp",iU="/portfolio-react-threejs/assets/2-466546d5.webp",NA=[{id:"",title:"Home",type:"route"},{id:"projects",title:"Projects",type:"route"},{id:"skills",title:"Skills",type:"route"},{id:"certificate",title:"Certificates",type:"route"},{id:"resume",title:"Resume",type:"route"},{id:"blogs",title:"Blogs",type:"route"},{id:"contact",title:"Contact",type:"route"},{id:"freetools",title:"Free Tools",type:"tools"}],rU=[{id:"imageupscaler",title:"Image Upscaler",type:"image"}],sU=[{title:"Full Stack Web Development",icon:RO},{title:"Designing",icon:DO},{title:"ML and DL Learner",icon:IO}],oU=[{title:"Content Writer",company_name:"Techyv",icon:OO,iconBg:"white",date:"October 2023 - Ongoing",points:["Writing proffesional articles related to IT.","Ensuring use of no AI content in articles.","Creating articles on real facts and data."]},{title:"Technical member",company_name:"Microsoft Student Chapter",icon:NO,iconBg:"black",date:"October 2022 - March 2023",points:["Maintaining the website and ensuring that it is up-to-date and functioning properly.","Collaborating with other members of the chapter to identify areas for improvement on the website.","Implementing changes and updates to the website using programming languages such as React.js, tailwind and JavaScript.","Debugging any issues or errors that arise on the website and working to resolve them."]},{title:"V open source member",company_name:"CSI Chapter",icon:kO,iconBg:"white",date:"Augest 2021 - June 2022",points:["Conducting regular meetings to discuss open source projects and new initiatives.","Conducting workshops and training sessions to help members learn more about open source technologies.","Coordinating with other teams within the CSI chapter to ensure smooth execution of events."]}],aU=[{name:"ConvoGen AI",description:"'ConvoGen' is the virtual embodiment of me, a chatbot that offers lifelike insights and information about my experiences, interests, and personality. Engage in conversations that feel as real as speaking with me in person, as 'ConvoGen' shares a wealth of personal details and knowledge, creating a truly immersive and authentic chatbot experience.",tags:[{name:"T5 model",color:"blue-text-gradient"},{name:"Transformer",color:"green-text-gradient"},{name:"Colab",color:"pink-text-gradient"}],image:XO,source_code_link:"https://colab.research.google.com/drive/1a6LATySYKaS8qqfk_4maSaV4guvTRA-8?usp=sharing",date:"October 2023",link_type:"colab"},{name:"Anon Exchange - Anonymous chatting app",description:"An innovative anonymous chatting app that redefines digital interactions. This project empowers strangers to connect seamlessly, engaging in candid conversations without the constraints of identity. What sets us apart is our commitment to privacy, allowing users to create exclusive private chat rooms for confidential discussions.",tags:[{name:"vitejs",color:"blue-text-gradient"},{name:"supabase",color:"green-text-gradient"},{name:"tailwind CSS",color:"pink-text-gradient"}],image:GO,source_code_link:"https://github.com/bedead/Anon-Exchange-chatting",date:"August 2023",link_type:"github"},{name:"Banana disease classification",description:"Banana disease classification is a project that uses a YOLOv8 deep learning model to detect and identify various diseases affecting banana plants. The project is based on a custom dataset of images of banana leaves with different types of infections. The project aims to provide a fast and accurate diagnosis of banana diseases, which can help farmers and researchers to prevent crop losses and improve banana production.",tags:[{name:"YOLOv8",color:"green-text-gradient"},{name:"Colab",color:"pink-text-gradient"}],image:jO,source_code_link:"https://colab.research.google.com/drive/1TLumA28dCY-9_lzouIJtt2CsCjONGdNy?usp=sharing",date:"August 2023",link_type:"colab"},{name:"PATENT - CLASSIFICATION OF LUNG CANCER USING DEEP LEARNING TECHNIQUES.",description:"Application No - 202341039647 The model is based on a YOLOv8 (Deep learning Neural network architecture) and is trained on the publicly available dataset, which consists of lung CT scans of patients with and without lung cancer.",tags:[{name:"Gradio",color:"blue-text-gradient"},{name:"YOLO",color:"green-text-gradient"},{name:"Roboflow",color:"pink-text-gradient"}],image:WO,source_code_link:"https://github.com/bedead/lung-cancer-classification-yoloV8---gradio.git",date:"June 2023",link_type:"huggingface"},{name:"Face Detection",description:"'FACE-DETECTOR' is a GitHub repository showcasing an OpenCV project for detecting human faces using a cascade classifier. The project utilizes the OpenCV library, which is a popular computer vision library in Python, to detect human faces in images or video streams.",tags:[{name:"Cascade classifier",color:"blue-text-gradient"},{name:"Python",color:"green-text-gradient"},{name:"OpenCV",color:"pink-text-gradient"}],image:zO,source_code_link:"https://github.com/bedead/FACE-DETECTOR.git",date:"Feb 2023",link_type:"github"},{name:"Life Overseas",description:"Life Overseas is a concept website that aims to provide students with valuable resources and information to successfully clear entrance exams for foreign colleges.",tags:[{name:"Flask",color:"blue-text-gradient"},{name:"Python",color:"green-text-gradient"}],image:VO,source_code_link:"https://github.com/bedead/Life-Overseas-webiste.git",date:"Jan 2023",link_type:"github"},{name:"Velox Todo",description:"Velox Todo is a Windows application built using JavaFX and JSON files. It is a task management tool designed to help users organize and prioritize their daily tasks efficiently.",tags:[{name:"Java",color:"blue-text-gradient"},{name:"JavaFX",color:"green-text-gradient"},{name:"JSON",color:"pink-text-gradient"}],image:HO,source_code_link:"https://github.com/bedead/Velox-Todo-Application.git",date:"Sep 2022",link_type:"github"},{name:"HI",description:"'HI' is a console-based conversational app written in Python. It utilizes various libraries such as pyinstaller, pyjokes, PyDictionary, platform, psutil, requests, getpass, pywhatkit, pyttsx3, speechrecognition, Wikipedia, Pyaudio, speedtest-cli, pyautogui, and py-cpuinfo to provide a wide range of functionalities.",tags:[{name:"Python",color:"blue-text-gradient"},{name:"JSON",color:"green-text-gradient"}],image:FO,source_code_link:"https://github.com/bedead/HI_2021.12.22.4.git",date:"Mar 2022",link_type:"github"},{name:"Lang go",description:"'Lang Go' is a language translation app that is built using the Kivy and KivyMD frameworks in Python. The app utilizes the TextBlob library for translation capabilities. With 'Lang Go', users can input text in one language and translate it to another language seamlessly.",tags:[{name:"Kivy",color:"blue-text-gradient"},{name:"Kivymd",color:"green-text-gradient"},{name:"textBlob",color:"pink-text-gradient"}],image:BO,source_code_link:"https://github.com/bedead/kivymd-language-translation-app.git",date:"Mar 2022",link_type:"github"},{name:"Shape out",description:"'Shape Out' is a 2D platformer game available on Amazon, created using the Godot game engine. The game features intuitive controls, colorful graphics, and engaging gameplay that requires players to jump, run, and solve puzzles to progress through the levels.",tags:[{name:"Godot engine",color:"blue-text-gradient"},{name:"GD-script",color:"green-text-gradient"}],image:UO,source_code_link:"https://www.amazon.com/Bedead-Shape-Out-2d-platformer/dp/B0999LHBYN",date:"Aug 2021",link_type:"appstore"}],lU=[{name:"Basics of Machien Learing",image:YO},{name:"C++ Course",image:qO},{name:"Making a Webiste",image:ZO},{name:"Java (Basics)",image:JO},{name:"Matlab Onramp",image:KO},{name:"MongoDB Tutorial",image:QO},{name:"Python (Basics)",image:$O},{name:"Responsive Web Design Course",image:eU},{name:"TensorFlow Python",image:tU}],uU=[{name:"Technical Member | CSI ",image:nU},{name:"Technical Member | MSC",image:iU}],cU=[{name:"",description:"",link:""},{name:"",description:"",link:""},{name:"",description:"",link:""}],fU="/portfolio-react-threejs/assets/logo-white-f51edd31.webp",hU="data:image/webp;base64,UklGRmQCAABXRUJQVlA4WAoAAAAwAAAAOwAAOwAASUNDUMgBAAAAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADZBTFBIPwAAAAFHoJBtBOime96H8WhEROhZb4CaSFYrLDAowA0OUIAD/DffJB2TJqL/AoIiF6yAJSV4nAc6xy/oOftIb+woAABWUDggLgAAAJADAJ0BKjwAPAA+bTaYSSQjIqEiCACADYlpAAAQN1NQBXiFuQAA/vucwAAAAAA=",dU="data:image/webp;base64,UklGRvwCAABXRUJQVlA4WAoAAAAwAAAALwAALwAASUNDUMgBAAAAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADZBTFBI2wAAAAF3oKCNFDb4bDxgYMkjIgJHTaxUSfkkcBTJtqu8T84gJEpAwheABSQkIVEIq7R9a7KCV9fDr3duIK4j+s/IbSRFteDDwEL9wv2lo6Ml4bmW5Yx2LFuayjlSHbMnX5SSBupihiFD9llir3CgZ1kYDzTJ3kFCU0RWRlZBUkNShavDNYBaiBpKPpEPNHbOBNMwbBnHf5bVaQj8s1jnu6bgL451auP4i+PPNol1WsQ6TerwAhGDOrxvjqoF7FtC0cKefFFKGqiLWcS+ZarsDc4wLgwv+Rt0tC4S948OBwBWUDggKgAAADADAJ0BKjAAMAA+bTaYSKQjIqEjiACADYlpAAAbgb0+DgAA/vucwAAAAA==",Gs=()=>{const[n,e]=V.useState(""),[t,i]=V.useState(!1),[r,s]=V.useState(!1);return F.jsx("nav",{className:`${Yt.paddingX} w-full flex items-center py-5 fixed top-0 z-20 bg-gradient-to-b from-white to-primary`,children:F.jsxs("div",{className:"w-full flex justify-between items-center max-w-7xl mx-auto",children:[F.jsxs(Gd,{to:"/",className:"flex items-center gap-2",onClick:()=>{e(""),window.scrollTo(0,0)},children:[F.jsx("img",{src:fU,className:"w-10 h-10 object-contain",alt:"logo"}),F.jsxs("div",{className:" md:block lg:flex ",children:[F.jsx("p",{className:"text-black text-[18px] flex",children:"Satyam Mishra  "}),F.jsx("span",{className:"text-[18px] sm:block hidden",children:"| Bedead"})]})]}),F.jsxs("ul",{className:"list-none hidden sm:flex flex-row md:gap-4 items-center",children:[NA.map(o=>F.jsx("li",{className:o.type=="tools"?"bg-black text-white hover:text-white-100 hover:bg-secondary py-2 px-3 rounded-xl text-[18px] font-medium cursor-pointer":`${n==o.title?"text-black":"text-secondary"} - hover:text-black hover:underline underline-offset-8 text-[18px] font-medium cursor-pointer`,onClick:()=>{e(o.title),o.type=="tools"&&s(!r)},children:o.type=="tools"?o.title:F.jsxs(Gd,{to:`/${o.id}`,children:[o.title," "]})},o.id))," "]}),F.jsx("div",{className:`${r?"flex":"hidden"} p-6 bg-gradient-to-r from-[#f6f6f6] to-white absolute - top-60 right-40 sm:top-20 sm:right-5 mx-4 my-2 min-w-[140px] z-10 rounded-xl outline`,children:F.jsxs("ul",{className:"list-none flex justify-end items-start flex-col gap-2",children:[rU.map(o=>F.jsx("li",{className:`${n==o.title?"text-black":"text-secondary"} font-poppins hover:underline underline-offset-8 font-medium cursor-pointer text-[16px] hover:text-black`,onClick:()=>{s(!r),e(o.title)},children:o.type=="tools"?o.title:F.jsxs(Gd,{to:`/${o.id}`,children:[o.title," "]})},o.id))," "]})}),F.jsxs("div",{className:"sm:hidden flex flex-1 justify-end items-center",children:[F.jsx("img",{src:t?dU:hU,alt:"menu",className:"w-[28px] h-[28px] object-contain cursor-pointer",onClick:()=>i(!t)}),F.jsx("div",{className:`${t?"flex":"hidden"} p-6 bg-gradient-to-r from-[#f6f6f6] to-white absolute - top-20 right-0 mx-4 my-2 min-w-[140px] z-10 rounded-xl outline`,children:F.jsxs("ul",{className:"list-none flex justify-end items-start flex-col gap-2",children:[NA.map(o=>F.jsx("li",{className:`${n==o.title?"text-black":"text-secondary"} font-poppins hover:underline underline-offset-8 font-medium cursor-pointer text-[16px] hover:text-black`,onClick:()=>{o.type!="tools"&&i(!t),e(o.title),o.type=="tools"&&s(!r)},children:o.type=="tools"?o.title:F.jsxs(Gd,{to:`/${o.id}`,children:[o.title," "]})},o.id))," "]})})]})]})})},aP=V.createContext({transformPagePoint:n=>n,isStatic:!1,reducedMotion:"never"}),cg=V.createContext({}),S1=V.createContext(null),fg=typeof document<"u",OA=fg?V.useLayoutEffect:V.useEffect,lP=V.createContext({strict:!1});function pU(n,e,t,i){const{visualElement:r}=V.useContext(cg),s=V.useContext(lP),o=V.useContext(S1),a=V.useContext(aP).reducedMotion,l=V.useRef();i=i||s.renderer,!l.current&&i&&(l.current=i(n,{visualState:e,parent:r,props:t,presenceContext:o,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:a}));const f=l.current;return V.useInsertionEffect(()=>{f&&f.update(t,o)}),OA(()=>{f&&f.render()}),V.useEffect(()=>{f&&f.updateFeatures()}),(window.HandoffAppearAnimations?OA:V.useEffect)(()=>{f&&f.animationState&&f.animationState.animateChanges()}),f}function nu(n){return typeof n=="object"&&Object.prototype.hasOwnProperty.call(n,"current")}function mU(n,e,t){return V.useCallback(i=>{i&&n.mount&&n.mount(i),e&&(i?e.mount(i):e.unmount()),t&&(typeof t=="function"?t(i):nu(t)&&(t.current=i))},[e])}function Pf(n){return typeof n=="string"||Array.isArray(n)}function hg(n){return typeof n=="object"&&typeof n.start=="function"}const w1=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],M1=["initial",...w1];function dg(n){return hg(n.animate)||M1.some(e=>Pf(n[e]))}function uP(n){return!!(dg(n)||n.variants)}function gU(n,e){if(dg(n)){const{initial:t,animate:i}=n;return{initial:t===!1||Pf(t)?t:void 0,animate:Pf(i)?i:void 0}}return n.inherit!==!1?e:{}}function vU(n){const{initial:e,animate:t}=gU(n,V.useContext(cg));return V.useMemo(()=>({initial:e,animate:t}),[UA(e),UA(t)])}function UA(n){return Array.isArray(n)?n.join(" "):n}const zA={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Lf={};for(const n in zA)Lf[n]={isEnabled:e=>zA[n].some(t=>!!e[t])};function yU(n){for(const e in n)Lf[e]={...Lf[e],...n[e]}}function cP(n){const e=V.useRef(null);return e.current===null&&(e.current=n()),e.current}const ef={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let xU=1;function _U(){return cP(()=>{if(ef.hasEverUpdated)return xU++})}const fP=V.createContext({}),hP=V.createContext({}),SU=Symbol.for("motionComponentSymbol");function wU({preloadedFeatures:n,createVisualElement:e,useRender:t,useVisualState:i,Component:r}){n&&yU(n);function s(a,l){let f;const h={...V.useContext(aP),...a,layoutId:MU(a)},{isStatic:d}=h,p=vU(a),v=d?void 0:_U(),y=i(a,d);if(!d&&fg){p.visualElement=pU(r,y,h,e);const _=V.useContext(hP),M=V.useContext(lP).strict;p.visualElement&&(f=p.visualElement.loadFeatures(h,M,n,v,_))}return V.createElement(cg.Provider,{value:p},f&&p.visualElement?V.createElement(f,{visualElement:p.visualElement,...h}):null,t(r,a,v,mU(y,p.visualElement,l),y,d,p.visualElement))}const o=V.forwardRef(s);return o[SU]=r,o}function MU({layoutId:n}){const e=V.useContext(fP).id;return e&&n!==void 0?e+"-"+n:n}function AU(n){function e(i,r={}){return wU(n(i,r))}if(typeof Proxy>"u")return e;const t=new Map;return new Proxy(e,{get:(i,r)=>(t.has(r)||t.set(r,e(r)),t.get(r))})}const EU=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function A1(n){return typeof n!="string"||n.includes("-")?!1:!!(EU.indexOf(n)>-1||/[A-Z]/.test(n))}const Im={};function bU(n){Object.assign(Im,n)}const oh=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Qa=new Set(oh);function dP(n,{layout:e,layoutId:t}){return Qa.has(n)||n.startsWith("origin")||(e||t!==void 0)&&(!!Im[n]||n==="opacity")}const Ri=n=>!!(n&&n.getVelocity),TU={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},CU=oh.length;function PU(n,{enableHardwareAcceleration:e=!0,allowTransformNone:t=!0},i,r){let s="";for(let o=0;oe=>typeof e=="string"&&e.startsWith(n),mP=pP("--"),mx=pP("var(--"),LU=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,RU=(n,e)=>e&&typeof n=="number"?e.transform(n):n,Ga=(n,e,t)=>Math.min(Math.max(t,n),e),$a={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},tf={...$a,transform:n=>Ga(0,1,n)},jd={...$a,default:1},nf=n=>Math.round(n*1e5)/1e5,pg=/(-)?([\d]*\.?[\d])+/g,gP=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,IU=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function ah(n){return typeof n=="string"}const lh=n=>({test:e=>ah(e)&&e.endsWith(n)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${n}`}),uo=lh("deg"),es=lh("%"),it=lh("px"),DU=lh("vh"),kU=lh("vw"),FA={...es,parse:n=>es.parse(n)/100,transform:n=>es.transform(n*100)},BA={...$a,transform:Math.round},vP={borderWidth:it,borderTopWidth:it,borderRightWidth:it,borderBottomWidth:it,borderLeftWidth:it,borderRadius:it,radius:it,borderTopLeftRadius:it,borderTopRightRadius:it,borderBottomRightRadius:it,borderBottomLeftRadius:it,width:it,maxWidth:it,height:it,maxHeight:it,size:it,top:it,right:it,bottom:it,left:it,padding:it,paddingTop:it,paddingRight:it,paddingBottom:it,paddingLeft:it,margin:it,marginTop:it,marginRight:it,marginBottom:it,marginLeft:it,rotate:uo,rotateX:uo,rotateY:uo,rotateZ:uo,scale:jd,scaleX:jd,scaleY:jd,scaleZ:jd,skew:uo,skewX:uo,skewY:uo,distance:it,translateX:it,translateY:it,translateZ:it,x:it,y:it,z:it,perspective:it,transformPerspective:it,opacity:tf,originX:FA,originY:FA,originZ:it,zIndex:BA,fillOpacity:tf,strokeOpacity:tf,numOctaves:BA};function E1(n,e,t,i){const{style:r,vars:s,transform:o,transformOrigin:a}=n;let l=!1,f=!1,h=!0;for(const d in e){const p=e[d];if(mP(d)){s[d]=p;continue}const v=vP[d],y=RU(p,v);if(Qa.has(d)){if(l=!0,o[d]=y,!h)continue;p!==(v.default||0)&&(h=!1)}else d.startsWith("origin")?(f=!0,a[d]=y):r[d]=y}if(e.transform||(l||i?r.transform=PU(n.transform,t,h,i):r.transform&&(r.transform="none")),f){const{originX:d="50%",originY:p="50%",originZ:v=0}=a;r.transformOrigin=`${d} ${p} ${v}`}}const b1=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function yP(n,e,t){for(const i in e)!Ri(e[i])&&!dP(i,t)&&(n[i]=e[i])}function NU({transformTemplate:n},e,t){return V.useMemo(()=>{const i=b1();return E1(i,e,{enableHardwareAcceleration:!t},n),Object.assign({},i.vars,i.style)},[e])}function OU(n,e,t){const i=n.style||{},r={};return yP(r,i,n),Object.assign(r,NU(n,e,t)),n.transformValues?n.transformValues(r):r}function UU(n,e,t){const i={},r=OU(n,e,t);return n.drag&&n.dragListener!==!1&&(i.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=n.drag===!0?"none":`pan-${n.drag==="x"?"y":"x"}`),n.tabIndex===void 0&&(n.onTap||n.onTapStart||n.whileTap)&&(i.tabIndex=0),i.style=r,i}const zU=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function Dm(n){return n.startsWith("while")||n.startsWith("drag")&&n!=="draggable"||n.startsWith("layout")||n.startsWith("onTap")||n.startsWith("onPan")||zU.has(n)}let xP=n=>!Dm(n);function FU(n){n&&(xP=e=>e.startsWith("on")?!Dm(e):n(e))}try{FU(require("@emotion/is-prop-valid").default)}catch{}function BU(n,e,t){const i={};for(const r in n)r==="values"&&typeof n.values=="object"||(xP(r)||t===!0&&Dm(r)||!e&&!Dm(r)||n.draggable&&r.startsWith("onDrag"))&&(i[r]=n[r]);return i}function VA(n,e,t){return typeof n=="string"?n:it.transform(e+t*n)}function VU(n,e,t){const i=VA(e,n.x,n.width),r=VA(t,n.y,n.height);return`${i} ${r}`}const HU={offset:"stroke-dashoffset",array:"stroke-dasharray"},WU={offset:"strokeDashoffset",array:"strokeDasharray"};function GU(n,e,t=1,i=0,r=!0){n.pathLength=1;const s=r?HU:WU;n[s.offset]=it.transform(-i);const o=it.transform(e),a=it.transform(t);n[s.array]=`${o} ${a}`}function T1(n,{attrX:e,attrY:t,attrScale:i,originX:r,originY:s,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...f},h,d,p){if(E1(n,f,h,p),d){n.style.viewBox&&(n.attrs.viewBox=n.style.viewBox);return}n.attrs=n.style,n.style={};const{attrs:v,style:y,dimensions:_}=n;v.transform&&(_&&(y.transform=v.transform),delete v.transform),_&&(r!==void 0||s!==void 0||y.transform)&&(y.transformOrigin=VU(_,r!==void 0?r:.5,s!==void 0?s:.5)),e!==void 0&&(v.x=e),t!==void 0&&(v.y=t),i!==void 0&&(v.scale=i),o!==void 0&&GU(v,o,a,l,!1)}const _P=()=>({...b1(),attrs:{}}),C1=n=>typeof n=="string"&&n.toLowerCase()==="svg";function jU(n,e,t,i){const r=V.useMemo(()=>{const s=_P();return T1(s,e,{enableHardwareAcceleration:!1},C1(i),n.transformTemplate),{...s.attrs,style:{...s.style}}},[e]);if(n.style){const s={};yP(s,n.style,n),r.style={...s,...r.style}}return r}function XU(n=!1){return(t,i,r,s,{latestValues:o},a)=>{const f=(A1(t)?jU:UU)(i,o,a,t),d={...BU(i,typeof t=="string",n),...f,ref:s},{children:p}=i,v=V.useMemo(()=>Ri(p)?p.get():p,[p]);return r&&(d["data-projection-id"]=r),V.createElement(t,{...d,children:v})}}const P1=n=>n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function SP(n,{style:e,vars:t},i,r){Object.assign(n.style,e,r&&r.getProjectionStyles(i));for(const s in t)n.style.setProperty(s,t[s])}const wP=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function MP(n,e,t,i){SP(n,e,void 0,i);for(const r in e.attrs)n.setAttribute(wP.has(r)?r:P1(r),e.attrs[r])}function L1(n,e){const{style:t}=n,i={};for(const r in t)(Ri(t[r])||e.style&&Ri(e.style[r])||dP(r,n))&&(i[r]=t[r]);return i}function AP(n,e){const t=L1(n,e);for(const i in n)if(Ri(n[i])||Ri(e[i])){const r=oh.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;t[r]=n[i]}return t}function R1(n,e,t,i={},r={}){return typeof e=="function"&&(e=e(t!==void 0?t:n.custom,i,r)),typeof e=="string"&&(e=n.variants&&n.variants[e]),typeof e=="function"&&(e=e(t!==void 0?t:n.custom,i,r)),e}const km=n=>Array.isArray(n),YU=n=>!!(n&&typeof n=="object"&&n.mix&&n.toValue),qU=n=>km(n)?n[n.length-1]||0:n;function Kp(n){const e=Ri(n)?n.get():n;return YU(e)?e.toValue():e}function ZU({scrapeMotionValuesFromProps:n,createRenderState:e,onMount:t},i,r,s){const o={latestValues:JU(i,r,s,n),renderState:e()};return t&&(o.mount=a=>t(i,a,o)),o}const EP=n=>(e,t)=>{const i=V.useContext(cg),r=V.useContext(S1),s=()=>ZU(n,e,i,r);return t?s():cP(s)};function JU(n,e,t,i){const r={},s=i(n,{});for(const p in s)r[p]=Kp(s[p]);let{initial:o,animate:a}=n;const l=dg(n),f=uP(n);e&&f&&!l&&n.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let h=t?t.initial===!1:!1;h=h||o===!1;const d=h?a:o;return d&&typeof d!="boolean"&&!hg(d)&&(Array.isArray(d)?d:[d]).forEach(v=>{const y=R1(n,v);if(!y)return;const{transitionEnd:_,transition:M,...m}=y;for(const S in m){let w=m[S];if(Array.isArray(w)){const A=h?w.length-1:0;w=w[A]}w!==null&&(r[S]=w)}for(const S in _)r[S]=_[S]}),r}const KU={useVisualState:EP({scrapeMotionValuesFromProps:AP,createRenderState:_P,onMount:(n,e,{renderState:t,latestValues:i})=>{try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}T1(t,i,{enableHardwareAcceleration:!1},C1(e.tagName),n.transformTemplate),MP(e,t)}})},QU={useVisualState:EP({scrapeMotionValuesFromProps:L1,createRenderState:b1})};function $U(n,{forwardMotionProps:e=!1},t,i){return{...A1(n)?KU:QU,preloadedFeatures:t,useRender:XU(e),createVisualElement:i,Component:n}}function Cs(n,e,t,i={passive:!0}){return n.addEventListener(e,t,i),()=>n.removeEventListener(e,t)}const bP=n=>n.pointerType==="mouse"?typeof n.button!="number"||n.button<=0:n.isPrimary!==!1;function mg(n,e="page"){return{point:{x:n[e+"X"],y:n[e+"Y"]}}}const ez=n=>e=>bP(e)&&n(e,mg(e));function Rs(n,e,t,i){return Cs(n,e,ez(t),i)}const tz=(n,e)=>t=>e(n(t)),Ro=(...n)=>n.reduce(tz);function TP(n){let e=null;return()=>{const t=()=>{e=null};return e===null?(e=n,t):!1}}const HA=TP("dragHorizontal"),WA=TP("dragVertical");function CP(n){let e=!1;if(n==="y")e=WA();else if(n==="x")e=HA();else{const t=HA(),i=WA();t&&i?e=()=>{t(),i()}:(t&&t(),i&&i())}return e}function PP(){const n=CP(!0);return n?(n(),!1):!0}class jo{constructor(e){this.isMounted=!1,this.node=e}update(){}}function nz(n){let e=[],t=[],i=0,r=!1,s=!1;const o=new WeakSet,a={schedule:(l,f=!1,h=!1)=>{const d=h&&r,p=d?e:t;return f&&o.add(l),p.indexOf(l)===-1&&(p.push(l),d&&r&&(i=e.length)),l},cancel:l=>{const f=t.indexOf(l);f!==-1&&t.splice(f,1),o.delete(l)},process:l=>{if(r){s=!0;return}if(r=!0,[e,t]=[t,e],t.length=0,i=e.length,i)for(let f=0;f(n[e]=nz(()=>Rf=!0),n),{}),rz=n=>yu[n].process(Un),LP=n=>{Rf=!1,Un.delta=gx?1e3/60:Math.max(Math.min(n-Un.timestamp,iz),1),Un.timestamp=n,Un.isProcessing=!0,gg.forEach(rz),Un.isProcessing=!1,Rf&&(gx=!1,requestAnimationFrame(LP))},sz=()=>{Rf=!0,gx=!0,Un.isProcessing||requestAnimationFrame(LP)},nn=gg.reduce((n,e)=>{const t=yu[e];return n[e]=(i,r=!1,s=!1)=>(Rf||sz(),t.schedule(i,r,s)),n},{});function zs(n){gg.forEach(e=>yu[e].cancel(n))}function GA(n,e){const t="pointer"+(e?"enter":"leave"),i="onHover"+(e?"Start":"End"),r=(s,o)=>{if(s.type==="touch"||PP())return;const a=n.getProps();n.animationState&&a.whileHover&&n.animationState.setActive("whileHover",e),a[i]&&nn.update(()=>a[i](s,o))};return Rs(n.current,t,r,{passive:!n.getProps()[i]})}class oz extends jo{mount(){this.unmount=Ro(GA(this.node,!0),GA(this.node,!1))}unmount(){}}class az extends jo{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Ro(Cs(this.node.current,"focus",()=>this.onFocus()),Cs(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const RP=(n,e)=>e?n===e?!0:RP(n,e.parentElement):!1,bn=n=>n;function yv(n,e){if(!e)return;const t=new PointerEvent("pointer"+n);e(t,mg(t))}class lz extends jo{constructor(){super(...arguments),this.removeStartListeners=bn,this.removeEndListeners=bn,this.removeAccessibleListeners=bn,this.startPointerPress=(e,t)=>{if(this.removeEndListeners(),this.isPressing)return;const i=this.node.getProps(),s=Rs(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:f,onTapCancel:h}=this.node.getProps();nn.update(()=>{RP(this.node.current,a.target)?f&&f(a,l):h&&h(a,l)})},{passive:!(i.onTap||i.onPointerUp)}),o=Rs(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(i.onTapCancel||i.onPointerCancel)});this.removeEndListeners=Ro(s,o),this.startPress(e,t)},this.startAccessiblePress=()=>{const e=s=>{if(s.key!=="Enter"||this.isPressing)return;const o=a=>{a.key!=="Enter"||!this.checkPressEnd()||yv("up",(l,f)=>{const{onTap:h}=this.node.getProps();h&&nn.update(()=>h(l,f))})};this.removeEndListeners(),this.removeEndListeners=Cs(this.node.current,"keyup",o),yv("down",(a,l)=>{this.startPress(a,l)})},t=Cs(this.node.current,"keydown",e),i=()=>{this.isPressing&&yv("cancel",(s,o)=>this.cancelPress(s,o))},r=Cs(this.node.current,"blur",i);this.removeAccessibleListeners=Ro(t,r)}}startPress(e,t){this.isPressing=!0;const{onTapStart:i,whileTap:r}=this.node.getProps();r&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),i&&nn.update(()=>i(e,t))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!PP()}cancelPress(e,t){if(!this.checkPressEnd())return;const{onTapCancel:i}=this.node.getProps();i&&nn.update(()=>i(e,t))}mount(){const e=this.node.getProps(),t=Rs(this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),i=Cs(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Ro(t,i)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const vx=new WeakMap,xv=new WeakMap,uz=n=>{const e=vx.get(n.target);e&&e(n)},cz=n=>{n.forEach(uz)};function fz({root:n,...e}){const t=n||document;xv.has(t)||xv.set(t,{});const i=xv.get(t),r=JSON.stringify(e);return i[r]||(i[r]=new IntersectionObserver(cz,{root:n,...e})),i[r]}function hz(n,e,t){const i=fz(e);return vx.set(n,t),i.observe(n),()=>{vx.delete(n),i.unobserve(n)}}const dz={some:0,all:1};class pz extends jo{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:i,amount:r="some",once:s}=e,o={root:t?t.current:void 0,rootMargin:i,threshold:typeof r=="number"?r:dz[r]},a=l=>{const{isIntersecting:f}=l;if(this.isInView===f||(this.isInView=f,s&&!f&&this.hasEnteredView))return;f&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",f);const{onViewportEnter:h,onViewportLeave:d}=this.node.getProps(),p=f?h:d;p&&p(l)};return hz(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(mz(e,t))&&this.startObserver()}unmount(){}}function mz({viewport:n={}},{viewport:e={}}={}){return t=>n[t]!==e[t]}const gz={inView:{Feature:pz},tap:{Feature:lz},focus:{Feature:az},hover:{Feature:oz}};function IP(n,e){if(!Array.isArray(e))return!1;const t=e.length;if(t!==n.length)return!1;for(let i=0;ie[i]=t.get()),e}function yz(n){const e={};return n.values.forEach((t,i)=>e[i]=t.getVelocity()),e}function vg(n,e,t){const i=n.getProps();return R1(i,e,t!==void 0?t:i.custom,vz(n),yz(n))}const xz="framerAppearId",_z="data-"+P1(xz);let Sz=bn,I1=bn;const Io=n=>n*1e3,Is=n=>n/1e3,wz={current:!1},DP=n=>Array.isArray(n)&&typeof n[0]=="number";function kP(n){return!!(!n||typeof n=="string"&&NP[n]||DP(n)||Array.isArray(n)&&n.every(kP))}const Hc=([n,e,t,i])=>`cubic-bezier(${n}, ${e}, ${t}, ${i})`,NP={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Hc([0,.65,.55,1]),circOut:Hc([.55,0,1,.45]),backIn:Hc([.31,.01,.66,-.59]),backOut:Hc([.33,1.53,.69,.99])};function OP(n){if(n)return DP(n)?Hc(n):Array.isArray(n)?n.map(OP):NP[n]}function Mz(n,e,t,{delay:i=0,duration:r,repeat:s=0,repeatType:o="loop",ease:a,times:l}={}){const f={[e]:t};l&&(f.offset=l);const h=OP(a);return Array.isArray(h)&&(f.easing=h),n.animate(f,{delay:i,duration:r,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"})}const jA={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},_v={},UP={};for(const n in jA)UP[n]=()=>(_v[n]===void 0&&(_v[n]=jA[n]()),_v[n]);function Az(n,{repeat:e,repeatType:t="loop"}){const i=e&&t!=="loop"&&e%2===1?0:n.length-1;return n[i]}const zP=(n,e,t)=>(((1-3*t+3*e)*n+(3*t-6*e))*n+3*e)*n,Ez=1e-7,bz=12;function Tz(n,e,t,i,r){let s,o,a=0;do o=e+(t-e)/2,s=zP(o,i,r)-n,s>0?t=o:e=o;while(Math.abs(s)>Ez&&++aTz(s,0,1,n,t);return s=>s===0||s===1?s:zP(r(s),e,i)}const Cz=uh(.42,0,1,1),Pz=uh(0,0,.58,1),FP=uh(.42,0,.58,1),Lz=n=>Array.isArray(n)&&typeof n[0]!="number",BP=n=>e=>e<=.5?n(2*e)/2:(2-n(2*(1-e)))/2,VP=n=>e=>1-n(1-e),HP=n=>1-Math.sin(Math.acos(n)),D1=VP(HP),Rz=BP(D1),WP=uh(.33,1.53,.69,.99),k1=VP(WP),Iz=BP(k1),Dz=n=>(n*=2)<1?.5*k1(n):.5*(2-Math.pow(2,-10*(n-1))),kz={linear:bn,easeIn:Cz,easeInOut:FP,easeOut:Pz,circIn:HP,circInOut:Rz,circOut:D1,backIn:k1,backInOut:Iz,backOut:WP,anticipate:Dz},XA=n=>{if(Array.isArray(n)){I1(n.length===4);const[e,t,i,r]=n;return uh(e,t,i,r)}else if(typeof n=="string")return kz[n];return n},N1=(n,e)=>t=>!!(ah(t)&&IU.test(t)&&t.startsWith(n)||e&&Object.prototype.hasOwnProperty.call(t,e)),GP=(n,e,t)=>i=>{if(!ah(i))return i;const[r,s,o,a]=i.match(pg);return{[n]:parseFloat(r),[e]:parseFloat(s),[t]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},Nz=n=>Ga(0,255,n),Sv={...$a,transform:n=>Math.round(Nz(n))},Ta={test:N1("rgb","red"),parse:GP("red","green","blue"),transform:({red:n,green:e,blue:t,alpha:i=1})=>"rgba("+Sv.transform(n)+", "+Sv.transform(e)+", "+Sv.transform(t)+", "+nf(tf.transform(i))+")"};function Oz(n){let e="",t="",i="",r="";return n.length>5?(e=n.substring(1,3),t=n.substring(3,5),i=n.substring(5,7),r=n.substring(7,9)):(e=n.substring(1,2),t=n.substring(2,3),i=n.substring(3,4),r=n.substring(4,5),e+=e,t+=t,i+=i,r+=r),{red:parseInt(e,16),green:parseInt(t,16),blue:parseInt(i,16),alpha:r?parseInt(r,16)/255:1}}const yx={test:N1("#"),parse:Oz,transform:Ta.transform},iu={test:N1("hsl","hue"),parse:GP("hue","saturation","lightness"),transform:({hue:n,saturation:e,lightness:t,alpha:i=1})=>"hsla("+Math.round(n)+", "+es.transform(nf(e))+", "+es.transform(nf(t))+", "+nf(tf.transform(i))+")"},hi={test:n=>Ta.test(n)||yx.test(n)||iu.test(n),parse:n=>Ta.test(n)?Ta.parse(n):iu.test(n)?iu.parse(n):yx.parse(n),transform:n=>ah(n)?n:n.hasOwnProperty("red")?Ta.transform(n):iu.transform(n)},en=(n,e,t)=>-t*n+t*e+n;function wv(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*6*t:t<1/2?e:t<2/3?n+(e-n)*(2/3-t)*6:n}function Uz({hue:n,saturation:e,lightness:t,alpha:i}){n/=360,e/=100,t/=100;let r=0,s=0,o=0;if(!e)r=s=o=t;else{const a=t<.5?t*(1+e):t+e-t*e,l=2*t-a;r=wv(l,a,n+1/3),s=wv(l,a,n),o=wv(l,a,n-1/3)}return{red:Math.round(r*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:i}}const Mv=(n,e,t)=>{const i=n*n;return Math.sqrt(Math.max(0,t*(e*e-i)+i))},zz=[yx,Ta,iu],Fz=n=>zz.find(e=>e.test(n));function YA(n){const e=Fz(n);let t=e.parse(n);return e===iu&&(t=Uz(t)),t}const jP=(n,e)=>{const t=YA(n),i=YA(e),r={...t};return s=>(r.red=Mv(t.red,i.red,s),r.green=Mv(t.green,i.green,s),r.blue=Mv(t.blue,i.blue,s),r.alpha=en(t.alpha,i.alpha,s),Ta.transform(r))};function Bz(n){var e,t;return isNaN(n)&&ah(n)&&(((e=n.match(pg))===null||e===void 0?void 0:e.length)||0)+(((t=n.match(gP))===null||t===void 0?void 0:t.length)||0)>0}const XP={regex:LU,countKey:"Vars",token:"${v}",parse:bn},YP={regex:gP,countKey:"Colors",token:"${c}",parse:hi.parse},qP={regex:pg,countKey:"Numbers",token:"${n}",parse:$a.parse};function Av(n,{regex:e,countKey:t,token:i,parse:r}){const s=n.tokenised.match(e);s&&(n["num"+t]=s.length,n.tokenised=n.tokenised.replace(e,i),n.values.push(...s.map(r)))}function Nm(n){const e=n.toString(),t={value:e,tokenised:e,values:[],numVars:0,numColors:0,numNumbers:0};return t.value.includes("var(--")&&Av(t,XP),Av(t,YP),Av(t,qP),t}function ZP(n){return Nm(n).values}function JP(n){const{values:e,numColors:t,numVars:i,tokenised:r}=Nm(n),s=e.length;return o=>{let a=r;for(let l=0;ltypeof n=="number"?0:n;function Hz(n){const e=ZP(n);return JP(n)(e.map(Vz))}const Oo={test:Bz,parse:ZP,createTransformer:JP,getAnimatableNone:Hz},KP=(n,e)=>t=>`${t>0?e:n}`;function QP(n,e){return typeof n=="number"?t=>en(n,e,t):hi.test(n)?jP(n,e):n.startsWith("var(")?KP(n,e):e3(n,e)}const $P=(n,e)=>{const t=[...n],i=t.length,r=n.map((s,o)=>QP(s,e[o]));return s=>{for(let o=0;o{const t={...n,...e},i={};for(const r in t)n[r]!==void 0&&e[r]!==void 0&&(i[r]=QP(n[r],e[r]));return r=>{for(const s in i)t[s]=i[s](r);return t}},e3=(n,e)=>{const t=Oo.createTransformer(e),i=Nm(n),r=Nm(e);return i.numVars===r.numVars&&i.numColors===r.numColors&&i.numNumbers>=r.numNumbers?Ro($P(i.values,r.values),t):KP(n,e)},If=(n,e,t)=>{const i=e-n;return i===0?1:(t-n)/i},qA=(n,e)=>t=>en(n,e,t);function Gz(n){return typeof n=="number"?qA:typeof n=="string"?hi.test(n)?jP:e3:Array.isArray(n)?$P:typeof n=="object"?Wz:qA}function jz(n,e,t){const i=[],r=t||Gz(n[0]),s=n.length-1;for(let o=0;oe[0];n[0]>n[s-1]&&(n=[...n].reverse(),e=[...e].reverse());const o=jz(e,i,r),a=o.length,l=f=>{let h=0;if(a>1)for(;hl(Ga(n[0],n[s-1],f)):l}function Xz(n,e){const t=n[n.length-1];for(let i=1;i<=e;i++){const r=If(0,e,i);n.push(en(t,1,r))}}function Yz(n){const e=[0];return Xz(e,n.length-1),e}function qz(n,e){return n.map(t=>t*e)}function Zz(n,e){return n.map(()=>e||FP).splice(0,n.length-1)}function Om({duration:n=300,keyframes:e,times:t,ease:i="easeInOut"}){const r=Lz(i)?i.map(XA):XA(i),s={done:!1,value:e[0]},o=qz(t&&t.length===e.length?t:Yz(e),n),a=t3(o,e,{ease:Array.isArray(r)?r:Zz(e,r)});return{calculatedDuration:n,next:l=>(s.value=a(l),s.done=l>=n,s)}}function n3(n,e){return e?n*(1e3/e):0}const Jz=5;function i3(n,e,t){const i=Math.max(e-Jz,0);return n3(t-n(i),e-i)}const Ev=.001,Kz=.01,ZA=10,Qz=.05,$z=1;function eF({duration:n=800,bounce:e=.25,velocity:t=0,mass:i=1}){let r,s;Sz(n<=Io(ZA));let o=1-e;o=Ga(Qz,$z,o),n=Ga(Kz,ZA,Is(n)),o<1?(r=f=>{const h=f*o,d=h*n,p=h-t,v=xx(f,o),y=Math.exp(-d);return Ev-p/v*y},s=f=>{const d=f*o*n,p=d*t+t,v=Math.pow(o,2)*Math.pow(f,2)*n,y=Math.exp(-d),_=xx(Math.pow(f,2),o);return(-r(f)+Ev>0?-1:1)*((p-v)*y)/_}):(r=f=>{const h=Math.exp(-f*n),d=(f-t)*n+1;return-Ev+h*d},s=f=>{const h=Math.exp(-f*n),d=(t-f)*(n*n);return h*d});const a=5/n,l=nF(r,s,a);if(n=Io(n),isNaN(l))return{stiffness:100,damping:10,duration:n};{const f=Math.pow(l,2)*i;return{stiffness:f,damping:o*2*Math.sqrt(i*f),duration:n}}}const tF=12;function nF(n,e,t){let i=t;for(let r=1;rn[t]!==void 0)}function sF(n){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...n};if(!JA(n,rF)&&JA(n,iF)){const t=eF(n);e={...e,...t,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}function r3({keyframes:n,restDelta:e,restSpeed:t,...i}){const r=n[0],s=n[n.length-1],o={done:!1,value:r},{stiffness:a,damping:l,mass:f,velocity:h,duration:d,isResolvedFromDuration:p}=sF(i),v=h?-Is(h):0,y=l/(2*Math.sqrt(a*f)),_=s-r,M=Is(Math.sqrt(a/f)),m=Math.abs(_)<5;t||(t=m?.01:2),e||(e=m?.005:.5);let S;if(y<1){const w=xx(M,y);S=A=>{const b=Math.exp(-y*M*A);return s-b*((v+y*M*_)/w*Math.sin(w*A)+_*Math.cos(w*A))}}else if(y===1)S=w=>s-Math.exp(-M*w)*(_+(v+M*_)*w);else{const w=M*Math.sqrt(y*y-1);S=A=>{const b=Math.exp(-y*M*A),P=Math.min(w*A,300);return s-b*((v+y*M*_)*Math.sinh(P)+w*_*Math.cosh(P))/w}}return{calculatedDuration:p&&d||null,next:w=>{const A=S(w);if(p)o.done=w>=d;else{let b=v;w!==0&&(y<1?b=i3(S,w,A):b=0);const P=Math.abs(b)<=t,I=Math.abs(s-A)<=e;o.done=P&&I}return o.value=o.done?s:A,o}}}function KA({keyframes:n,velocity:e=0,power:t=.8,timeConstant:i=325,bounceDamping:r=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:f=.5,restSpeed:h}){const d=n[0],p={done:!1,value:d},v=L=>a!==void 0&&Ll,y=L=>a===void 0?l:l===void 0||Math.abs(a-L)-_*Math.exp(-L/i),w=L=>m+S(L),A=L=>{const C=S(L),R=w(L);p.done=Math.abs(C)<=f,p.value=p.done?m:R};let b,P;const I=L=>{v(p.value)&&(b=L,P=r3({keyframes:[p.value,y(p.value)],velocity:i3(w,L,p.value),damping:r,stiffness:s,restDelta:f,restSpeed:h}))};return I(0),{calculatedDuration:null,next:L=>{let C=!1;return!P&&b===void 0&&(C=!0,A(L),I(L)),b!==void 0&&L>b?P.next(L-b):(!C&&A(L),p)}}}const oF=n=>{const e=({timestamp:t})=>n(t);return{start:()=>nn.update(e,!0),stop:()=>zs(e),now:()=>Un.isProcessing?Un.timestamp:performance.now()}},QA=2e4;function $A(n){let e=0;const t=50;let i=n.next(e);for(;!i.done&&e=QA?1/0:e}const aF={decay:KA,inertia:KA,tween:Om,keyframes:Om,spring:r3};function Um({autoplay:n=!0,delay:e=0,driver:t=oF,keyframes:i,type:r="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:a="loop",onPlay:l,onStop:f,onComplete:h,onUpdate:d,...p}){let v=1,y=!1,_,M;const m=()=>{_&&_(),M=new Promise(te=>{_=te})};m();let S;const w=aF[r]||Om;let A;w!==Om&&typeof i[0]!="number"&&(A=t3([0,100],i,{clamp:!1}),i=[0,100]);const b=w({...p,keyframes:i});let P;a==="mirror"&&(P=w({...p,keyframes:[...i].reverse(),velocity:-(p.velocity||0)}));let I="idle",L=null,C=null,R=null;b.calculatedDuration===null&&s&&(b.calculatedDuration=$A(b));const{calculatedDuration:W}=b;let J=1/0,j=1/0;W!==null&&(J=W+o,j=J*(s+1)-o);let X=0;const Z=te=>{if(C===null)return;v>0&&(C=Math.min(C,te)),L!==null?X=L:X=(te-C)*v;const $=X-e,ee=$<0;X=Math.max($,0),I==="finished"&&L===null&&(X=j);let ue=X,Ee=b;if(s){const Ye=X/J;let xe=Math.floor(Ye),Me=Ye%1;!Me&&Ye>=1&&(Me=1),Me===1&&xe--,xe=Math.min(xe,s+1);const ge=!!(xe%2);ge&&(a==="reverse"?(Me=1-Me,o&&(Me-=o/J)):a==="mirror"&&(Ee=P));let oe=Ga(0,1,Me);X>j&&(oe=a==="reverse"&&ge?1:0),ue=oe*J}const we=ee?{done:!1,value:i[0]}:Ee.next(ue);A&&(we.value=A(we.value));let{done:Q}=we;!ee&&W!==null&&(Q=X>=j);const Xe=L===null&&(I==="finished"||I==="running"&&Q||v<0&&X<=0);return d&&d(we.value),Xe&&D(),we},se=()=>{S&&S.stop(),S=void 0},ae=()=>{I="idle",se(),m(),C=R=null},D=()=>{I="finished",h&&h(),se(),m()},H=()=>{if(y)return;S||(S=t(Z));const te=S.now();l&&l(),L!==null?C=te-L:(!C||I==="finished")&&(C=te),R=C,L=null,I="running",S.start()};n&&H();const B={then(te,$){return M.then(te,$)},get time(){return Is(X)},set time(te){te=Io(te),X=te,L!==null||!S||v===0?L=te:C=S.now()-te/v},get duration(){const te=b.calculatedDuration===null?$A(b):b.calculatedDuration;return Is(te)},get speed(){return v},set speed(te){te===v||!S||(v=te,B.time=Is(X))},get state(){return I},play:H,pause:()=>{I="paused",L=X},stop:()=>{y=!0,I!=="idle"&&(I="idle",f&&f(),ae())},cancel:()=>{R!==null&&Z(R),ae()},complete:()=>{I="finished"},sample:te=>(C=0,Z(te))};return B}const lF=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),Xd=10,uF=2e4,cF=(n,e)=>e.type==="spring"||n==="backgroundColor"||!kP(e.ease);function fF(n,e,{onUpdate:t,onComplete:i,...r}){if(!(UP.waapi()&&lF.has(e)&&!r.repeatDelay&&r.repeatType!=="mirror"&&r.damping!==0&&r.type!=="inertia"))return!1;let o=!1,a,l;const f=()=>{l=new Promise(m=>{a=m})};f();let{keyframes:h,duration:d=300,ease:p,times:v}=r;if(cF(e,r)){const m=Um({...r,repeat:0,delay:0});let S={done:!1,value:h[0]};const w=[];let A=0;for(;!S.done&&Ay.cancel(),M=()=>{nn.update(_),a(),f()};return y.onfinish=()=>{n.set(Az(h,r)),i&&i(),M()},{then(m,S){return l.then(m,S)},get time(){return Is(y.currentTime||0)},set time(m){y.currentTime=Io(m)},get speed(){return y.playbackRate},set speed(m){y.playbackRate=m},get duration(){return Is(d)},play:()=>{o||(y.play(),zs(_))},pause:()=>y.pause(),stop:()=>{if(o=!0,y.playState==="idle")return;const{currentTime:m}=y;if(m){const S=Um({...r,autoplay:!1});n.setWithVelocity(S.sample(m-Xd).value,S.sample(m).value,Xd)}M()},complete:()=>y.finish(),cancel:M}}function hF({keyframes:n,delay:e,onUpdate:t,onComplete:i}){const r=()=>(t&&t(n[n.length-1]),i&&i(),{time:0,speed:1,duration:0,play:bn,pause:bn,stop:bn,then:s=>(s(),Promise.resolve()),cancel:bn,complete:bn});return e?Um({keyframes:[0,1],duration:0,delay:e,onComplete:r}):r()}const dF={type:"spring",stiffness:500,damping:25,restSpeed:10},pF=n=>({type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restSpeed:10}),mF={type:"keyframes",duration:.8},gF={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},vF=(n,{keyframes:e})=>e.length>2?mF:Qa.has(n)?n.startsWith("scale")?pF(e[1]):dF:gF,_x=(n,e)=>n==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&Oo.test(e)&&!e.startsWith("url(")),yF=new Set(["brightness","contrast","saturate","opacity"]);function xF(n){const[e,t]=n.slice(0,-1).split("(");if(e==="drop-shadow")return n;const[i]=t.match(pg)||[];if(!i)return n;const r=t.replace(i,"");let s=yF.has(e)?1:0;return i!==t&&(s*=100),e+"("+s+r+")"}const _F=/([a-z-]*)\(.*?\)/g,Sx={...Oo,getAnimatableNone:n=>{const e=n.match(_F);return e?e.map(xF).join(" "):n}},SF={...vP,color:hi,backgroundColor:hi,outlineColor:hi,fill:hi,stroke:hi,borderColor:hi,borderTopColor:hi,borderRightColor:hi,borderBottomColor:hi,borderLeftColor:hi,filter:Sx,WebkitFilter:Sx},O1=n=>SF[n];function U1(n,e){let t=O1(n);return t!==Sx&&(t=Oo),t.getAnimatableNone?t.getAnimatableNone(e):void 0}function wF({when:n,delay:e,delayChildren:t,staggerChildren:i,staggerDirection:r,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:f,...h}){return!!Object.keys(h).length}function eE(n){return n===0||typeof n=="string"&&parseFloat(n)===0&&n.indexOf(" ")===-1}function tE(n){return typeof n=="number"?0:U1("",n)}function s3(n,e){return n[e]||n.default||n}function MF(n,[...e]){for(let t=0;tr=>{const s=s3(i,n)||{},o=s.delay||i.delay||0;let{elapsed:a=0}=i;a=a-Io(o);const l=AF(e,n,t,s),f=l[0],h=l[l.length-1],d=_x(n,f),p=_x(n,h);let v={keyframes:l,velocity:e.getVelocity(),ease:"easeOut",...s,delay:-a,onUpdate:y=>{e.set(y),s.onUpdate&&s.onUpdate(y)},onComplete:()=>{r(),s.onComplete&&s.onComplete()}};if(wF(s)||(v={...v,...vF(n,v)}),v.duration&&(v.duration=Io(v.duration)),v.repeatDelay&&(v.repeatDelay=Io(v.repeatDelay)),!d||!p||wz.current||s.type===!1)return hF(v);if(e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const y=fF(e,n,v);if(y)return y}return Um(v)};function zm(n){return!!(Ri(n)&&n.add)}const EF=n=>/^\-?\d*\.?\d+$/.test(n),bF=n=>/^0[^.\s]+$/.test(n);function F1(n,e){n.indexOf(e)===-1&&n.push(e)}function B1(n,e){const t=n.indexOf(e);t>-1&&n.splice(t,1)}class V1{constructor(){this.subscriptions=[]}add(e){return F1(this.subscriptions,e),()=>B1(this.subscriptions,e)}notify(e,t,i){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,i);else for(let s=0;s!isNaN(parseFloat(n));class CF{constructor(e,t={}){this.version="10.12.4",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(i,r=!0)=>{this.prev=this.current,this.current=i;const{delta:s,timestamp:o}=Un;this.lastUpdated!==o&&(this.timeDelta=s,this.lastUpdated=o,nn.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),r&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>nn.postRender(this.velocityCheck),this.velocityCheck=({timestamp:i})=>{i!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=TF(this.current),this.owner=t.owner}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new V1);const i=this.events[e].add(t);return e==="change"?()=>{i(),nn.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){!t||!this.passiveEffect?this.updateAndNotify(e,t):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,t,i){this.set(t),this.prev=e,this.timeDelta=i}jump(e){this.updateAndNotify(e),this.prev=e,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?n3(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Cu(n,e){return new CF(n,e)}const o3=n=>e=>e.test(n),PF={test:n=>n==="auto",parse:n=>n},a3=[$a,it,es,uo,kU,DU,PF],Sc=n=>a3.find(o3(n)),LF=[...a3,hi,Oo],RF=n=>LF.find(o3(n));function IF(n,e,t){n.hasValue(e)?n.getValue(e).set(t):n.addValue(e,Cu(t))}function DF(n,e){const t=vg(n,e);let{transitionEnd:i={},transition:r={},...s}=t?n.makeTargetAnimatable(t,!1):{};s={...s,...i};for(const o in s){const a=qU(s[o]);IF(n,o,a)}}function kF(n,e,t){var i,r;const s=Object.keys(e).filter(a=>!n.hasValue(a)),o=s.length;if(o)for(let a=0;al.remove(d))),f.push(_)}return o&&Promise.all(f).then(()=>{o&&DF(n,o)}),f}function wx(n,e,t={}){const i=vg(n,e,t.custom);let{transition:r=n.getDefaultTransition()||{}}=i||{};t.transitionOverride&&(r=t.transitionOverride);const s=i?()=>Promise.all(l3(n,i,t)):()=>Promise.resolve(),o=n.variantChildren&&n.variantChildren.size?(l=0)=>{const{delayChildren:f=0,staggerChildren:h,staggerDirection:d}=r;return zF(n,e,f+l,h,d,t)}:()=>Promise.resolve(),{when:a}=r;if(a){const[l,f]=a==="beforeChildren"?[s,o]:[o,s];return l().then(()=>f())}else return Promise.all([s(),o(t.delay)])}function zF(n,e,t=0,i=0,r=1,s){const o=[],a=(n.variantChildren.size-1)*i,l=r===1?(f=0)=>f*i:(f=0)=>a-f*i;return Array.from(n.variantChildren).sort(FF).forEach((f,h)=>{f.notify("AnimationStart",e),o.push(wx(f,e,{...s,delay:t+l(h)}).then(()=>f.notify("AnimationComplete",e)))}),Promise.all(o)}function FF(n,e){return n.sortNodePosition(e)}function BF(n,e,t={}){n.notify("AnimationStart",e);let i;if(Array.isArray(e)){const r=e.map(s=>wx(n,s,t));i=Promise.all(r)}else if(typeof e=="string")i=wx(n,e,t);else{const r=typeof e=="function"?vg(n,e,t.custom):e;i=Promise.all(l3(n,r,t))}return i.then(()=>n.notify("AnimationComplete",e))}const VF=[...w1].reverse(),HF=w1.length;function WF(n){return e=>Promise.all(e.map(({animation:t,options:i})=>BF(n,t,i)))}function GF(n){let e=WF(n);const t=XF();let i=!0;const r=(l,f)=>{const h=vg(n,f);if(h){const{transition:d,transitionEnd:p,...v}=h;l={...l,...v,...p}}return l};function s(l){e=l(n)}function o(l,f){const h=n.getProps(),d=n.getVariantContext(!0)||{},p=[],v=new Set;let y={},_=1/0;for(let m=0;m_&&b;const R=Array.isArray(A)?A:[A];let W=R.reduce(r,{});P===!1&&(W={});const{prevResolvedValues:J={}}=w,j={...J,...W},X=Z=>{C=!0,v.delete(Z),w.needsAnimating[Z]=!0};for(const Z in j){const se=W[Z],ae=J[Z];y.hasOwnProperty(Z)||(se!==ae?km(se)&&km(ae)?!IP(se,ae)||L?X(Z):w.protectedKeys[Z]=!0:se!==void 0?X(Z):v.add(Z):se!==void 0&&v.has(Z)?X(Z):w.protectedKeys[Z]=!0)}w.prevProp=A,w.prevResolvedValues=W,w.isActive&&(y={...y,...W}),i&&n.blockInitialAnimation&&(C=!1),C&&!I&&p.push(...R.map(Z=>({animation:Z,options:{type:S,...l}})))}if(v.size){const m={};v.forEach(S=>{const w=n.getBaseTarget(S);w!==void 0&&(m[S]=w)}),p.push({animation:m})}let M=!!p.length;return i&&h.initial===!1&&!n.manuallyAnimateOnMount&&(M=!1),i=!1,M?e(p):Promise.resolve()}function a(l,f,h){var d;if(t[l].isActive===f)return Promise.resolve();(d=n.variantChildren)===null||d===void 0||d.forEach(v=>{var y;return(y=v.animationState)===null||y===void 0?void 0:y.setActive(l,f)}),t[l].isActive=f;const p=o(h,l);for(const v in t)t[v].protectedKeys={};return p}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>t}}function jF(n,e){return typeof e=="string"?e!==n:Array.isArray(e)?!IP(e,n):!1}function oa(n=!1){return{isActive:n,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function XF(){return{animate:oa(!0),whileInView:oa(),whileHover:oa(),whileTap:oa(),whileDrag:oa(),whileFocus:oa(),exit:oa()}}class YF extends jo{constructor(e){super(e),e.animationState||(e.animationState=GF(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),hg(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){}}let qF=0;class ZF extends jo{constructor(){super(...arguments),this.id=qF++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t,custom:i}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;const s=this.node.animationState.setActive("exit",!e,{custom:i??this.node.getProps().custom});t&&!e&&s.then(()=>t(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const JF={animation:{Feature:YF},exit:{Feature:ZF}},nE=(n,e)=>Math.abs(n-e);function KF(n,e){const t=nE(n.x,e.x),i=nE(n.y,e.y);return Math.sqrt(t**2+i**2)}class u3{constructor(e,t,{transformPagePoint:i}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=Tv(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,d=KF(f.offset,{x:0,y:0})>=3;if(!h&&!d)return;const{point:p}=f,{timestamp:v}=Un;this.history.push({...p,timestamp:v});const{onStart:y,onMove:_}=this.handlers;h||(y&&y(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),_&&_(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=bv(h,this.transformPagePoint),nn.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:d,onSessionEnd:p}=this.handlers,v=Tv(f.type==="pointercancel"?this.lastMoveEventInfo:bv(h,this.transformPagePoint),this.history);this.startEvent&&d&&d(f,v),p&&p(f,v)},!bP(e))return;this.handlers=t,this.transformPagePoint=i;const r=mg(e),s=bv(r,this.transformPagePoint),{point:o}=s,{timestamp:a}=Un;this.history=[{...o,timestamp:a}];const{onSessionStart:l}=t;l&&l(e,Tv(s,this.history)),this.removeListeners=Ro(Rs(window,"pointermove",this.handlePointerMove),Rs(window,"pointerup",this.handlePointerUp),Rs(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),zs(this.updatePoint)}}function bv(n,e){return e?{point:e(n.point)}:n}function iE(n,e){return{x:n.x-e.x,y:n.y-e.y}}function Tv({point:n},e){return{point:n,delta:iE(n,c3(e)),offset:iE(n,QF(e)),velocity:$F(e,.1)}}function QF(n){return n[0]}function c3(n){return n[n.length-1]}function $F(n,e){if(n.length<2)return{x:0,y:0};let t=n.length-1,i=null;const r=c3(n);for(;t>=0&&(i=n[t],!(r.timestamp-i.timestamp>Io(e)));)t--;if(!i)return{x:0,y:0};const s=Is(r.timestamp-i.timestamp);if(s===0)return{x:0,y:0};const o={x:(r.x-i.x)/s,y:(r.y-i.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Yi(n){return n.max-n.min}function Mx(n,e=0,t=.01){return Math.abs(n-e)<=t}function rE(n,e,t,i=.5){n.origin=i,n.originPoint=en(e.min,e.max,n.origin),n.scale=Yi(t)/Yi(e),(Mx(n.scale,1,1e-4)||isNaN(n.scale))&&(n.scale=1),n.translate=en(t.min,t.max,n.origin)-n.originPoint,(Mx(n.translate)||isNaN(n.translate))&&(n.translate=0)}function rf(n,e,t,i){rE(n.x,e.x,t.x,i?i.originX:void 0),rE(n.y,e.y,t.y,i?i.originY:void 0)}function sE(n,e,t){n.min=t.min+e.min,n.max=n.min+Yi(e)}function e4(n,e,t){sE(n.x,e.x,t.x),sE(n.y,e.y,t.y)}function oE(n,e,t){n.min=e.min-t.min,n.max=n.min+Yi(e)}function sf(n,e,t){oE(n.x,e.x,t.x),oE(n.y,e.y,t.y)}function t4(n,{min:e,max:t},i){return e!==void 0&&nt&&(n=i?en(t,n,i.max):Math.min(n,t)),n}function aE(n,e,t){return{min:e!==void 0?n.min+e:void 0,max:t!==void 0?n.max+t-(n.max-n.min):void 0}}function n4(n,{top:e,left:t,bottom:i,right:r}){return{x:aE(n.x,t,r),y:aE(n.y,e,i)}}function lE(n,e){let t=e.min-n.min,i=e.max-n.max;return e.max-e.mini?t=If(e.min,e.max-i,n.min):i>r&&(t=If(n.min,n.max-r,e.min)),Ga(0,1,t)}function s4(n,e){const t={};return e.min!==void 0&&(t.min=e.min-n.min),e.max!==void 0&&(t.max=e.max-n.min),t}const Ax=.35;function o4(n=Ax){return n===!1?n=0:n===!0&&(n=Ax),{x:uE(n,"left","right"),y:uE(n,"top","bottom")}}function uE(n,e,t){return{min:cE(n,e),max:cE(n,t)}}function cE(n,e){return typeof n=="number"?n:n[e]||0}const fE=()=>({translate:0,scale:1,origin:0,originPoint:0}),of=()=>({x:fE(),y:fE()}),hE=()=>({min:0,max:0}),wn=()=>({x:hE(),y:hE()});function Jr(n){return[n("x"),n("y")]}function f3({top:n,left:e,right:t,bottom:i}){return{x:{min:e,max:t},y:{min:n,max:i}}}function a4({x:n,y:e}){return{top:e.min,right:n.max,bottom:e.max,left:n.min}}function l4(n,e){if(!e)return n;const t=e({x:n.left,y:n.top}),i=e({x:n.right,y:n.bottom});return{top:t.y,left:t.x,bottom:i.y,right:i.x}}function Cv(n){return n===void 0||n===1}function Ex({scale:n,scaleX:e,scaleY:t}){return!Cv(n)||!Cv(e)||!Cv(t)}function va(n){return Ex(n)||h3(n)||n.z||n.rotate||n.rotateX||n.rotateY}function h3(n){return dE(n.x)||dE(n.y)}function dE(n){return n&&n!=="0%"}function Fm(n,e,t){const i=n-t,r=e*i;return t+r}function pE(n,e,t,i,r){return r!==void 0&&(n=Fm(n,r,i)),Fm(n,t,i)+e}function bx(n,e=0,t=1,i,r){n.min=pE(n.min,e,t,i,r),n.max=pE(n.max,e,t,i,r)}function d3(n,{x:e,y:t}){bx(n.x,e.translate,e.scale,e.originPoint),bx(n.y,t.translate,t.scale,t.originPoint)}function u4(n,e,t,i=!1){const r=t.length;if(!r)return;e.x=e.y=1;let s,o;for(let a=0;a1.0000000000001||n<.999999999999?n:1}function ho(n,e){n.min=n.min+e,n.max=n.max+e}function gE(n,e,[t,i,r]){const s=e[r]!==void 0?e[r]:.5,o=en(n.min,n.max,s);bx(n,e[t],e[i],o,e.scale)}const c4=["x","scaleX","originX"],f4=["y","scaleY","originY"];function ru(n,e){gE(n.x,e,c4),gE(n.y,e,f4)}function p3(n,e){return f3(l4(n.getBoundingClientRect(),e))}function h4(n,e,t){const i=p3(n,t),{scroll:r}=e;return r&&(ho(i.x,r.offset.x),ho(i.y,r.offset.y)),i}const d4=new WeakMap;class p4{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=wn(),this.visualElement=e}start(e,{snapToCursor:t=!1}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const r=l=>{this.stopAnimation(),t&&this.snapToCursor(mg(l,"page").point)},s=(l,f)=>{const{drag:h,dragPropagation:d,onDragStart:p}=this.getProps();if(h&&!d&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=CP(h),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Jr(y=>{let _=this.getAxisMotionValue(y).get()||0;if(es.test(_)){const{projection:M}=this.visualElement;if(M&&M.layout){const m=M.layout.layoutBox[y];m&&(_=Yi(m)*(parseFloat(_)/100))}}this.originPoint[y]=_}),p&&nn.update(()=>p(l,f),!1,!0);const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},o=(l,f)=>{const{dragPropagation:h,dragDirectionLock:d,onDirectionLock:p,onDrag:v}=this.getProps();if(!h&&!this.openGlobalLock)return;const{offset:y}=f;if(d&&this.currentDirection===null){this.currentDirection=m4(y),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",f.point,y),this.updateAxis("y",f.point,y),this.visualElement.render(),v&&v(l,f)},a=(l,f)=>this.stop(l,f);this.panSession=new u3(e,{onSessionStart:r,onStart:s,onMove:o,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(e,t){const i=this.isDragging;if(this.cancel(),!i)return;const{velocity:r}=t;this.startAnimation(r);const{onDragEnd:s}=this.getProps();s&&nn.update(()=>s(e,t))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:i}=this.getProps();!i&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,i){const{drag:r}=this.getProps();if(!i||!Yd(e,r,this.currentDirection))return;const s=this.getAxisMotionValue(e);let o=this.originPoint[e]+i[e];this.constraints&&this.constraints[e]&&(o=t4(o,this.constraints[e],this.elastic[e])),s.set(o)}resolveConstraints(){const{dragConstraints:e,dragElastic:t}=this.getProps(),{layout:i}=this.visualElement.projection||{},r=this.constraints;e&&nu(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&i?this.constraints=n4(i.layoutBox,e):this.constraints=!1,this.elastic=o4(t),r!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Jr(s=>{this.getAxisMotionValue(s)&&(this.constraints[s]=s4(i.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!nu(e))return!1;const i=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const s=h4(i,r.root,this.visualElement.getTransformPagePoint());let o=i4(r.layout.layoutBox,s);if(t){const a=t(a4(o));this.hasMutatedConstraints=!!a,a&&(o=f3(a))}return o}startAnimation(e){const{drag:t,dragMomentum:i,dragElastic:r,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},f=Jr(h=>{if(!Yd(h,t,this.currentDirection))return;let d=l&&l[h]||{};o&&(d={min:0,max:0});const p=r?200:1e6,v=r?40:1e7,y={type:"inertia",velocity:i?e[h]:0,bounceStiffness:p,bounceDamping:v,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(h,y)});return Promise.all(f).then(a)}startAxisValueAnimation(e,t){const i=this.getAxisMotionValue(e);return i.start(z1(e,i,0,t))}stopAnimation(){Jr(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const t="_drag"+e.toUpperCase(),i=this.visualElement.getProps(),r=i[t];return r||this.visualElement.getValue(e,(i.initial?i.initial[e]:void 0)||0)}snapToCursor(e){Jr(t=>{const{drag:i}=this.getProps();if(!Yd(t,i,this.currentDirection))return;const{projection:r}=this.visualElement,s=this.getAxisMotionValue(t);if(r&&r.layout){const{min:o,max:a}=r.layout.layoutBox[t];s.set(e[t]-en(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:i}=this.visualElement;if(!nu(t)||!i||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Jr(o=>{const a=this.getAxisMotionValue(o);if(a){const l=a.get();r[o]=r4({min:l,max:l},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),Jr(o=>{if(!Yd(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:f}=this.constraints[o];a.set(en(l,f,r[o]))})}addListeners(){if(!this.visualElement.current)return;d4.set(this.visualElement,this);const e=this.visualElement.current,t=Rs(e,"pointerdown",l=>{const{drag:f,dragListener:h=!0}=this.getProps();f&&h&&this.start(l)}),i=()=>{const{dragConstraints:l}=this.getProps();nu(l)&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,s=r.addEventListener("measure",i);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),i();const o=Cs(window,"resize",()=>this.scalePositionWithinConstraints()),a=r.addEventListener("didUpdate",({delta:l,hasLayoutChanged:f})=>{this.isDragging&&f&&(Jr(h=>{const d=this.getAxisMotionValue(h);d&&(this.originPoint[h]+=l[h].translate,d.set(d.get()+l[h].translate))}),this.visualElement.render())});return()=>{o(),t(),s(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:i=!1,dragPropagation:r=!1,dragConstraints:s=!1,dragElastic:o=Ax,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:i,dragPropagation:r,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function Yd(n,e,t){return(e===!0||e===n)&&(t===null||t===n)}function m4(n,e=10){let t=null;return Math.abs(n.y)>e?t="y":Math.abs(n.x)>e&&(t="x"),t}class g4 extends jo{constructor(e){super(e),this.removeGroupControls=bn,this.removeListeners=bn,this.controls=new p4(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||bn}unmount(){this.removeGroupControls(),this.removeListeners()}}const vE=n=>(e,t)=>{n&&nn.update(()=>n(e,t))};class v4 extends jo{constructor(){super(...arguments),this.removePointerDownListener=bn}onPointerDown(e){this.session=new u3(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:i,onPanEnd:r}=this.node.getProps();return{onSessionStart:vE(e),onStart:vE(t),onMove:i,onEnd:(s,o)=>{delete this.session,r&&nn.update(()=>r(s,o))}}}mount(){this.removePointerDownListener=Rs(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function y4(){const n=V.useContext(S1);if(n===null)return[!0,null];const{isPresent:e,onExitComplete:t,register:i}=n,r=V.useId();return V.useEffect(()=>i(r),[]),!e&&t?[!1,()=>t&&t(r)]:[!0]}function yE(n,e){return e.max===e.min?0:n/(e.max-e.min)*100}const wc={correct:(n,e)=>{if(!e.target)return n;if(typeof n=="string")if(it.test(n))n=parseFloat(n);else return n;const t=yE(n,e.target.x),i=yE(n,e.target.y);return`${t}% ${i}%`}},x4={correct:(n,{treeScale:e,projectionDelta:t})=>{const i=n,r=Oo.parse(n);if(r.length>5)return i;const s=Oo.createTransformer(n),o=typeof r[0]!="number"?1:0,a=t.x.scale*e.x,l=t.y.scale*e.y;r[0+o]/=a,r[1+o]/=l;const f=en(a,l,.5);return typeof r[2+o]=="number"&&(r[2+o]/=f),typeof r[3+o]=="number"&&(r[3+o]/=f),s(r)}};class _4 extends $f.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:i,layoutId:r}=this.props,{projection:s}=e;bU(S4),s&&(t.group&&t.group.add(s),i&&i.register&&r&&i.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),ef.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:i,drag:r,isPresent:s}=this.props,o=i.projection;return o&&(o.isPresent=s,r||e.layoutDependency!==t||t===void 0?o.willUpdate():this.safeToRemove(),e.isPresent!==s&&(s?o.promote():o.relegate()||nn.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),!e.currentAnimation&&e.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:i}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),i&&i.deregister&&i.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function m3(n){const[e,t]=y4(),i=V.useContext(fP);return $f.createElement(_4,{...n,layoutGroup:i,switchLayoutGroup:V.useContext(hP),isPresent:e,safeToRemove:t})}const S4={borderRadius:{...wc,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:wc,borderTopRightRadius:wc,borderBottomLeftRadius:wc,borderBottomRightRadius:wc,boxShadow:x4},g3=["TopLeft","TopRight","BottomLeft","BottomRight"],w4=g3.length,xE=n=>typeof n=="string"?parseFloat(n):n,_E=n=>typeof n=="number"||it.test(n);function M4(n,e,t,i,r,s){r?(n.opacity=en(0,t.opacity!==void 0?t.opacity:1,A4(i)),n.opacityExit=en(e.opacity!==void 0?e.opacity:1,0,E4(i))):s&&(n.opacity=en(e.opacity!==void 0?e.opacity:1,t.opacity!==void 0?t.opacity:1,i));for(let o=0;oie?1:t(If(n,e,i))}function wE(n,e){n.min=e.min,n.max=e.max}function or(n,e){wE(n.x,e.x),wE(n.y,e.y)}function ME(n,e,t,i,r){return n-=e,n=Fm(n,1/t,i),r!==void 0&&(n=Fm(n,1/r,i)),n}function b4(n,e=0,t=1,i=.5,r,s=n,o=n){if(es.test(e)&&(e=parseFloat(e),e=en(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=en(s.min,s.max,i);n===s&&(a-=e),n.min=ME(n.min,e,t,a,r),n.max=ME(n.max,e,t,a,r)}function AE(n,e,[t,i,r],s,o){b4(n,e[t],e[i],e[r],e.scale,s,o)}const T4=["x","scaleX","originX"],C4=["y","scaleY","originY"];function EE(n,e,t,i){AE(n.x,e,T4,t?t.x:void 0,i?i.x:void 0),AE(n.y,e,C4,t?t.y:void 0,i?i.y:void 0)}function bE(n){return n.translate===0&&n.scale===1}function y3(n){return bE(n.x)&&bE(n.y)}function Tx(n,e){return n.x.min===e.x.min&&n.x.max===e.x.max&&n.y.min===e.y.min&&n.y.max===e.y.max}function TE(n){return Yi(n.x)/Yi(n.y)}class P4{constructor(){this.members=[]}add(e){F1(this.members,e),e.scheduleRender()}remove(e){if(B1(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(e){const t=this.members.findIndex(r=>e===r);if(t===0)return!1;let i;for(let r=t;r>=0;r--){const s=this.members[r];if(s.isPresent!==!1){i=s;break}}return i?(this.promote(i),!0):!1}promote(e,t){const i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.instance&&i.scheduleRender(),e.scheduleRender(),e.resumeFrom=i,t&&(e.resumeFrom.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:r}=e.options;r===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:t,resumingFrom:i}=e;t.onExitComplete&&t.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function CE(n,e,t){let i="";const r=n.x.translate/e.x,s=n.y.translate/e.y;if((r||s)&&(i=`translate3d(${r}px, ${s}px, 0) `),(e.x!==1||e.y!==1)&&(i+=`scale(${1/e.x}, ${1/e.y}) `),t){const{rotate:l,rotateX:f,rotateY:h}=t;l&&(i+=`rotate(${l}deg) `),f&&(i+=`rotateX(${f}deg) `),h&&(i+=`rotateY(${h}deg) `)}const o=n.x.scale*e.x,a=n.y.scale*e.y;return(o!==1||a!==1)&&(i+=`scale(${o}, ${a})`),i||"none"}const L4=(n,e)=>n.depth-e.depth;class R4{constructor(){this.children=[],this.isDirty=!1}add(e){F1(this.children,e),this.isDirty=!0}remove(e){B1(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(L4),this.isDirty=!1,this.children.forEach(e)}}function I4(n,e){const t=performance.now(),i=({timestamp:r})=>{const s=r-t;s>=e&&(zs(i),n(s-e))};return nn.read(i,!0),()=>zs(i)}function D4(n){window.MotionDebug&&window.MotionDebug.record(n)}function k4(n){return n instanceof SVGElement&&n.tagName!=="svg"}function N4(n,e,t){const i=Ri(n)?n:Cu(n);return i.start(z1("",i,e,t)),i.animation}const PE=["","X","Y","Z"],LE=1e3;let O4=0;const ya={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function x3({attachResizeListener:n,defaultParent:e,measureScroll:t,checkIsScrollRoot:i,resetTransform:r}){return class{constructor(o,a={},l=e==null?void 0:e()){this.id=O4++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{ya.totalNodes=ya.resolvedTargetDeltas=ya.recalculatedProjection=0,this.nodes.forEach(F4),this.nodes.forEach(W4),this.nodes.forEach(G4),this.nodes.forEach(B4),D4(ya)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=o,this.latestValues=a,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,o&&this.root.registerPotentialNode(o,this);for(let f=0;fthis.root.updateBlockedByResize=!1;n(o,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=I4(p,250),ef.hasAnimatedSinceResize&&(ef.hasAnimatedSinceResize=!1,this.nodes.forEach(IE))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&h&&(l||f)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:p,hasRelativeTargetChanged:v,layout:y})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const _=this.options.transition||h.getDefaultTransition()||Z4,{onLayoutAnimationStart:M,onLayoutAnimationComplete:m}=h.getProps(),S=!this.targetLayout||!Tx(this.targetLayout,y)||v,w=!p&&v;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||w||p&&(S||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,w);const A={...s3(_,"layout"),onPlay:M,onComplete:m};(h.shouldReduceMotion||this.options.layoutRoot)&&(A.delay=0,A.type=!1),this.startAnimation(A)}else!p&&this.animationProgress===0&&IE(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=y})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,zs(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(j4),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let h=0;h{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{const b=A/1e3;DE(d.x,o.x,b),DE(d.y,o.y,b),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(sf(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Y4(this.relativeTarget,this.relativeTargetOrigin,p,b),w&&Tx(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=wn()),or(w,this.relativeTarget)),_&&(this.animationValues=h,M4(h,f,this.latestValues,b,S,m)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=b},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(zs(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=nn.update(()=>{ef.hasAnimatedSinceResize=!0,this.currentAnimation=N4(0,LE,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(LE),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:f,latestValues:h}=o;if(!(!a||!l||!f)){if(this!==o&&this.layout&&f&&_3(this.options.animationType,this.layout.layoutBox,f.layoutBox)){l=this.target||wn();const d=Yi(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+d;const p=Yi(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+p}or(a,l),ru(a,h),rf(this.projectionDeltaWithTransform,this.layoutCorrected,a,h)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new P4),this.sharedNodes.get(o).add(a);const f=a.options.initialPromotionConfig;a.promote({transition:f?f.transition:void 0,preserveFollowOpacity:f&&f.shouldPreserveFollowOpacity?f.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const f=this.getStack();f&&f.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(a=!0),!a)return;const f={};for(let h=0;h{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(RE),this.root.sharedNodes.clear()}}}function U4(n){n.updateLayout()}function z4(n){var e;const t=((e=n.resumeFrom)===null||e===void 0?void 0:e.snapshot)||n.snapshot;if(n.isLead()&&n.layout&&t&&n.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:r}=n.layout,{animationType:s}=n.options,o=t.source!==n.layout.source;s==="size"?Jr(d=>{const p=o?t.measuredBox[d]:t.layoutBox[d],v=Yi(p);p.min=i[d].min,p.max=p.min+v}):_3(s,t.layoutBox,i)&&Jr(d=>{const p=o?t.measuredBox[d]:t.layoutBox[d],v=Yi(i[d]);p.max=p.min+v,n.relativeTarget&&!n.currentAnimation&&(n.isProjectionDirty=!0,n.relativeTarget[d].max=n.relativeTarget[d].min+v)});const a=of();rf(a,i,t.layoutBox);const l=of();o?rf(l,n.applyTransform(r,!0),t.measuredBox):rf(l,i,t.layoutBox);const f=!y3(a);let h=!1;if(!n.resumeFrom){const d=n.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:p,layout:v}=d;if(p&&v){const y=wn();sf(y,t.layoutBox,p.layoutBox);const _=wn();sf(_,i,v.layoutBox),Tx(y,_)||(h=!0),d.options.layoutRoot&&(n.relativeTarget=_,n.relativeTargetOrigin=y,n.relativeParent=d)}}}n.notifyListeners("didUpdate",{layout:i,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:f,hasRelativeTargetChanged:h})}else if(n.isLead()){const{onExitComplete:i}=n.options;i&&i()}n.options.transition=void 0}function F4(n){ya.totalNodes++,n.parent&&(n.isProjecting()||(n.isProjectionDirty=n.parent.isProjectionDirty),n.isSharedProjectionDirty||(n.isSharedProjectionDirty=!!(n.isProjectionDirty||n.parent.isProjectionDirty||n.parent.isSharedProjectionDirty)),n.isTransformDirty||(n.isTransformDirty=n.parent.isTransformDirty))}function B4(n){n.isProjectionDirty=n.isSharedProjectionDirty=n.isTransformDirty=!1}function V4(n){n.clearSnapshot()}function RE(n){n.clearMeasurements()}function H4(n){const{visualElement:e}=n.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),n.resetTransform()}function IE(n){n.finishAnimation(),n.targetDelta=n.relativeTarget=n.target=void 0}function W4(n){n.resolveTargetDelta()}function G4(n){n.calcProjection()}function j4(n){n.resetRotation()}function X4(n){n.removeLeadSnapshot()}function DE(n,e,t){n.translate=en(e.translate,0,t),n.scale=en(e.scale,1,t),n.origin=e.origin,n.originPoint=e.originPoint}function kE(n,e,t,i){n.min=en(e.min,t.min,i),n.max=en(e.max,t.max,i)}function Y4(n,e,t,i){kE(n.x,e.x,t.x,i),kE(n.y,e.y,t.y,i)}function q4(n){return n.animationValues&&n.animationValues.opacityExit!==void 0}const Z4={duration:.45,ease:[.4,0,.1,1]};function J4(n,e){let t=n.root;for(let s=n.path.length-1;s>=0;s--)if(n.path[s].instance){t=n.path[s];break}const r=(t&&t!==n.root?t.instance:document).querySelector(`[data-projection-id="${e}"]`);r&&n.mount(r,!0)}function NE(n){n.min=Math.round(n.min),n.max=Math.round(n.max)}function K4(n){NE(n.x),NE(n.y)}function _3(n,e,t){return n==="position"||n==="preserve-aspect"&&!Mx(TE(e),TE(t),.2)}const Q4=x3({attachResizeListener:(n,e)=>Cs(n,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Pv={current:void 0},S3=x3({measureScroll:n=>({x:n.scrollLeft,y:n.scrollTop}),defaultParent:()=>{if(!Pv.current){const n=new Q4(0,{});n.mount(window),n.setOptions({layoutScroll:!0}),Pv.current=n}return Pv.current},resetTransform:(n,e)=>{n.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:n=>window.getComputedStyle(n).position==="fixed"}),$4={pan:{Feature:v4},drag:{Feature:g4,ProjectionNode:S3,MeasureLayout:m3}},eB=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function tB(n){const e=eB.exec(n);if(!e)return[,];const[,t,i]=e;return[t,i]}function Cx(n,e,t=1){const[i,r]=tB(n);if(!i)return;const s=window.getComputedStyle(e).getPropertyValue(i);return s?s.trim():mx(r)?Cx(r,e,t+1):r}function nB(n,{...e},t){const i=n.current;if(!(i instanceof Element))return{target:e,transitionEnd:t};t&&(t={...t}),n.values.forEach(r=>{const s=r.get();if(!mx(s))return;const o=Cx(s,i);o&&r.set(o)});for(const r in e){const s=e[r];if(!mx(s))continue;const o=Cx(s,i);o&&(e[r]=o,t||(t={}),t[r]===void 0&&(t[r]=s))}return{target:e,transitionEnd:t}}const iB=new Set(["width","height","top","left","right","bottom","x","y"]),w3=n=>iB.has(n),rB=n=>Object.keys(n).some(w3),OE=n=>n===$a||n===it,UE=(n,e)=>parseFloat(n.split(", ")[e]),zE=(n,e)=>(t,{transform:i})=>{if(i==="none"||!i)return 0;const r=i.match(/^matrix3d\((.+)\)$/);if(r)return UE(r[1],e);{const s=i.match(/^matrix\((.+)\)$/);return s?UE(s[1],n):0}},sB=new Set(["x","y","z"]),oB=oh.filter(n=>!sB.has(n));function aB(n){const e=[];return oB.forEach(t=>{const i=n.getValue(t);i!==void 0&&(e.push([t,i.get()]),i.set(t.startsWith("scale")?1:0))}),e.length&&n.render(),e}const FE={width:({x:n},{paddingLeft:e="0",paddingRight:t="0"})=>n.max-n.min-parseFloat(e)-parseFloat(t),height:({y:n},{paddingTop:e="0",paddingBottom:t="0"})=>n.max-n.min-parseFloat(e)-parseFloat(t),top:(n,{top:e})=>parseFloat(e),left:(n,{left:e})=>parseFloat(e),bottom:({y:n},{top:e})=>parseFloat(e)+(n.max-n.min),right:({x:n},{left:e})=>parseFloat(e)+(n.max-n.min),x:zE(4,13),y:zE(5,14)},lB=(n,e,t)=>{const i=e.measureViewportBox(),r=e.current,s=getComputedStyle(r),{display:o}=s,a={};o==="none"&&e.setStaticValue("display",n.display||"block"),t.forEach(f=>{a[f]=FE[f](i,s)}),e.render();const l=e.measureViewportBox();return t.forEach(f=>{const h=e.getValue(f);h&&h.jump(a[f]),n[f]=FE[f](l,s)}),n},uB=(n,e,t={},i={})=>{e={...e},i={...i};const r=Object.keys(e).filter(w3);let s=[],o=!1;const a=[];if(r.forEach(l=>{const f=n.getValue(l);if(!n.hasValue(l))return;let h=t[l],d=Sc(h);const p=e[l];let v;if(km(p)){const y=p.length,_=p[0]===null?1:0;h=p[_],d=Sc(h);for(let M=_;M=0?window.pageYOffset:null,f=lB(e,n,a);return s.length&&s.forEach(([h,d])=>{n.getValue(h).set(d)}),n.render(),fg&&l!==null&&window.scrollTo({top:l}),{target:f,transitionEnd:i}}else return{target:e,transitionEnd:i}};function cB(n,e,t,i){return rB(e)?uB(n,e,t,i):{target:e,transitionEnd:i}}const fB=(n,e,t,i)=>{const r=nB(n,e,i);return e=r.target,i=r.transitionEnd,cB(n,e,t,i)},Px={current:null},M3={current:!1};function hB(){if(M3.current=!0,!!fg)if(window.matchMedia){const n=window.matchMedia("(prefers-reduced-motion)"),e=()=>Px.current=n.matches;n.addListener(e),e()}else Px.current=!1}function dB(n,e,t){const{willChange:i}=e;for(const r in e){const s=e[r],o=t[r];if(Ri(s))n.addValue(r,s),zm(i)&&i.add(r);else if(Ri(o))n.addValue(r,Cu(s,{owner:n})),zm(i)&&i.remove(r);else if(o!==s)if(n.hasValue(r)){const a=n.getValue(r);!a.hasAnimated&&a.set(s)}else{const a=n.getStaticValue(r);n.addValue(r,Cu(a!==void 0?a:s,{owner:n}))}}for(const r in t)e[r]===void 0&&n.removeValue(r);return e}const BE=new WeakMap,A3=Object.keys(Lf),pB=A3.length,VE=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],mB=M1.length;class gB{constructor({parent:e,props:t,presenceContext:i,reducedMotionConfig:r,visualState:s},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>nn.render(this.render,!1,!0);const{latestValues:a,renderState:l}=s;this.latestValues=a,this.baseTarget={...a},this.initialValues=t.initial?{...a}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=i,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=o,this.isControllingVariants=dg(t),this.isVariantNode=uP(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:f,...h}=this.scrapeMotionValuesFromProps(t,{});for(const d in h){const p=h[d];a[d]!==void 0&&Ri(p)&&(p.set(a[d],!1),zm(f)&&f.add(d))}}scrapeMotionValuesFromProps(e,t){return{}}mount(e){this.current=e,BE.set(e,this),this.projection&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,i)=>this.bindToMotionValue(i,t)),M3.current||hB(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Px.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){BE.delete(this.current),this.projection&&this.projection.unmount(),zs(this.notifyUpdate),zs(this.render),this.valueSubscriptions.forEach(e=>e()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features)this.features[e].unmount();this.current=null}bindToMotionValue(e,t){const i=Qa.has(e),r=t.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&nn.update(this.notifyUpdate,!1,!0),i&&this.projection&&(this.projection.isTransformDirty=!0)}),s=t.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{r(),s()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...t},i,r,s,o){let a,l;for(let f=0;fthis.scheduleRender(),animationType:typeof h=="string"?h:"both",initialPromotionConfig:o,layoutScroll:v,layoutRoot:y})}return l}updateFeatures(){for(const e in this.features){const t=this.features[e];t.isMounted?t.update(this.props,this.prevProps):(t.mount(),t.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):wn()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}makeTargetAnimatable(e,t=!0){return this.makeTargetAnimatableFromInstance(e,this.props,t)}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let i=0;it.variantChildren.delete(e)}addValue(e,t){t!==this.values.get(e)&&(this.removeValue(e),this.bindToMotionValue(e,t)),this.values.set(e,t),this.latestValues[e]=t.get()}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let i=this.values.get(e);return i===void 0&&t!==void 0&&(i=Cu(t,{owner:this}),this.addValue(e,i)),i}readValue(e){return this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.readValueFromInstance(this.current,e,this.options)}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:i}=this.props,r=typeof i=="string"||typeof i=="object"?(t=R1(this.props,i))===null||t===void 0?void 0:t[e]:void 0;if(i&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,e);return s!==void 0&&!Ri(s)?s:this.initialValues[e]!==void 0&&r===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new V1),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class E3 extends gB{sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:i}){delete t[e],delete i[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:t,...i},{transformValues:r},s){let o=OF(i,e||{},this);if(r&&(t&&(t=r(t)),i&&(i=r(i)),o&&(o=r(o))),s){kF(this,i,o);const a=fB(this,i,o,t);t=a.transitionEnd,i=a.target}return{transition:e,transitionEnd:t,...i}}}function vB(n){return window.getComputedStyle(n)}class yB extends E3{readValueFromInstance(e,t){if(Qa.has(t)){const i=O1(t);return i&&i.default||0}else{const i=vB(e),r=(mP(t)?i.getPropertyValue(t):i[t])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return p3(e,t)}build(e,t,i,r){E1(e,t,i,r.transformTemplate)}scrapeMotionValuesFromProps(e,t){return L1(e,t)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Ri(e)&&(this.childSubscription=e.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}renderInstance(e,t,i,r){SP(e,t,i,r)}}class xB extends E3{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Qa.has(t)){const i=O1(t);return i&&i.default||0}return t=wP.has(t)?t:P1(t),e.getAttribute(t)}measureInstanceViewportBox(){return wn()}scrapeMotionValuesFromProps(e,t){return AP(e,t)}build(e,t,i,r){T1(e,t,i,this.isSVGTag,r.transformTemplate)}renderInstance(e,t,i,r){MP(e,t,i,r)}mount(e){this.isSVGTag=C1(e.tagName),super.mount(e)}}const _B=(n,e)=>A1(n)?new xB(e,{enableHardwareAcceleration:!1}):new yB(e,{enableHardwareAcceleration:!0}),SB={layout:{ProjectionNode:S3,MeasureLayout:m3}},wB={...JF,...gz,...$4,...SB},oi=AU((n,e)=>$U(n,e,wB,_B)),MB=()=>F.jsxs("section",{className:"relative w-full h-screen mx-auto overflow-hidden",children:[F.jsxs("div",{className:`${Yt.paddingX} flex absolute z-10 inset-0 top-[120px] items-start gap-5`,children:[F.jsxs("div",{className:"flex flex-col justify-center items-center mt-5",children:[F.jsx("div",{className:"w-5 h-5 rounded-full bg-[#373737] "}),F.jsx("div",{className:"w-1 sm:h-80 h-40 violet-gradient"})]}),F.jsxs("div",{children:[F.jsxs("h1",{className:`${Yt.heroHeadText} funky-text-outline-2 `,children:["Hi, I'm",F.jsx("span",{className:"text-black ",children:"Satyam"})]}),F.jsx("p",{className:`${Yt.heroSubText} funky-text-outline mt-2 text-black-100`,children:"I'm a computer science student with simple and dumb mind."}),F.jsx("p",{className:`${Yt.sectionSubText} funky-text-outline mt-2 text-gray-600`,children:"This is just a website showcasing some of my works and experiments. Have a look untill you get bored 🥱"})]})]}),F.jsx("div",{className:"absolute z-10 xs:bottom-10 bottom-32 w-full flex justify-center items-center",children:F.jsx("a",{href:"#about",children:F.jsx("div",{className:"w-[35px] h-[64px] rounded-3xl border-4 border-[#373737] flex justify-center items-start p-2 ",children:F.jsx(oi.div,{animate:{y:[0,24,0]},transition:{duration:1.5,repeat:1/0,repeatType:"loop"},className:"w-3 h-3 rounded-full bg-secondary mb-2"})})})})]});var AB=Object.defineProperty,EB=Object.defineProperties,bB=Object.getOwnPropertyDescriptors,HE=Object.getOwnPropertySymbols,TB=Object.prototype.hasOwnProperty,CB=Object.prototype.propertyIsEnumerable,WE=(n,e,t)=>e in n?AB(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Mc=(n,e)=>{for(var t in e||(e={}))TB.call(e,t)&&WE(n,t,e[t]);if(HE)for(var t of HE(e))CB.call(e,t)&&WE(n,t,e[t]);return n},Ac=(n,e)=>EB(n,bB(e)),yg=class extends V.Component{constructor(n){super(n),this.ref=$f.createRef(),this.state={style:{}};const e={reverse:!1,max:35,perspective:1e3,easing:"cubic-bezier(.03,.98,.52,.99)",scale:"1.1",speed:"1000",transition:!0,axis:null,reset:!0};this.width=null,this.height=null,this.left=null,this.top=null,this.transitionTimeout=null,this.updateCall=null,this.element=null,this.settings=Object.assign({},e,this.props.options),this.reverse=this.settings.reverse?-1:1,this.onMouseEnter=this.onMouseEnter.bind(this,this.props.onMouseEnter),this.onMouseMove=this.onMouseMove.bind(this,this.props.onMouseMove),this.onMouseLeave=this.onMouseLeave.bind(this,this.props.onMouseLeave)}componentDidMount(){this.element=this.ref.current,setTimeout(()=>{this.element.parentElement.querySelector(":hover")===this.element&&this.onMouseEnter()},0)}componentWillUnmount(){clearTimeout(this.transitionTimeout),cancelAnimationFrame(this.updateCall)}onMouseEnter(n=()=>{},e){return this.updateElementPosition(),this.setState(Object.assign({},this.state,{style:Ac(Mc({},this.state.style),{willChange:"transform"})})),this.setTransition(),n(e)}reset(){window.requestAnimationFrame(()=>{this.setState(Object.assign({},this.state,{style:Ac(Mc({},this.state.style),{transform:`perspective(${this.settings.perspective}px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)`})}))})}onMouseMove(n=()=>{},e){return e.persist(),this.updateCall!==null&&window.cancelAnimationFrame(this.updateCall),this.event=e,this.updateCall=requestAnimationFrame(this.update.bind(this,e)),n(e)}setTransition(){clearTimeout(this.transitionTimeout),this.setState(Object.assign({},this.state,{style:Ac(Mc({},this.state.style),{transition:`${this.settings.speed}ms ${this.settings.easing}`})})),this.transitionTimeout=setTimeout(()=>{this.setState(Object.assign({},this.state,{style:Ac(Mc({},this.state.style),{transition:""})}))},this.settings.speed)}onMouseLeave(n=()=>{},e){return this.setTransition(),this.settings.reset&&this.reset(),n(e)}getValues(n){const e=(n.nativeEvent.clientX-this.left)/this.width,t=(n.nativeEvent.clientY-this.top)/this.height,i=Math.min(Math.max(e,0),1),r=Math.min(Math.max(t,0),1),s=(this.reverse*(this.settings.max/2-i*this.settings.max)).toFixed(2),o=(this.reverse*(r*this.settings.max-this.settings.max/2)).toFixed(2),a=i*100,l=r*100;return{tiltX:s,tiltY:o,percentageX:a,percentageY:l}}updateElementPosition(){const n=this.element.getBoundingClientRect();this.width=this.element.offsetWidth,this.height=this.element.offsetHeight,this.left=n.left,this.top=n.top}update(n){const e=this.getValues(n);this.setState(Object.assign({},this.state,{style:Ac(Mc({},this.state.style),{transform:`perspective(${this.settings.perspective}px) rotateX(${this.settings.axis==="x"?0:e.tiltY}deg) rotateY(${this.settings.axis==="y"?0:e.tiltX}deg) scale3d(${this.settings.scale}, ${this.settings.scale}, ${this.settings.scale})`})})),this.updateCall=null}render(){const n=Object.assign({},this.props.style,this.state.style);return F.jsx("div",{style:n,ref:this.ref,className:this.props.className,onMouseEnter:this.onMouseEnter,onMouseMove:this.onMouseMove,onMouseLeave:this.onMouseLeave,children:this.props.children})}};const xg=n=>({hidden:{y:-50,opacity:0},show:{y:0,opacity:1,transition:{type:"spring",duration:1.25,delay:n}}}),_g=(n,e,t,i)=>({hidden:{x:n==="left"?100:n==="right"?-100:0,y:n==="up"?100:n==="down"?-100:0,opacity:0},show:{x:0,y:0,opacity:1,transition:{type:e,delay:t,duration:i,ease:"easeOut"}}}),PB=(n,e,t,i)=>({hidden:{x:n==="left"?"-100%":n==="right"?"100%":0,y:n==="up"||n==="down"?"100%":0},show:{x:0,y:0,transition:{type:e,delay:t,duration:i,ease:"easeOut"}}}),LB=(n,e)=>({hidden:{},show:{transition:{staggerChildren:n,delayChildren:e||0}}}),ch=(n,e)=>function(){return F.jsxs(oi.section,{variants:LB(),initial:"hidden",whileInView:"show",viewport:{once:!0,amount:.25},className:`${Yt.padding} max-w-7xl mx-auto relative z-0`,children:[F.jsx("span",{className:"hash-span",id:e,children:" "}),F.jsx(n,{})]})},RB=({index:n,title:e,icon:t})=>F.jsx(yg,{className:"xs:w-[250px] w-full ",children:F.jsx(oi.div,{variants:_g("right","spring",.5*n,.75),className:" w-full green-pink-gradient p-[1px] rounded-[20px] shadow-[#fcd4d4] shadow-card ",children:F.jsxs("div",{options:{max:45,scale:1,speed:450},className:"bg-primary rounded-[20px] py-5 px-12 min-h-[280px] flex justify-evenly items-center flex-col ",children:[F.jsx("img",{src:t,alt:e,className:"w-16 h-16 object-contain"}),F.jsxs("h3",{className:"text-black text-[20px] font-bold text-center ",children:[e," "]})]})})}),IB=()=>F.jsxs(F.Fragment,{children:[F.jsxs(oi.div,{variants:xg(0),children:[F.jsx("h2",{className:`${Yt.sectionHeadText} text-center`,children:"Overview."}),F.jsx("p",{className:`${Yt.sectionSubText} text-center`,children:"Introduction?"})]}),F.jsx(oi.p,{variants:_g("","",.1,1),className:"mt-4 text-secondary text-center text-[17px] max-w-full leading-[30px] ",children:"I am a full stack web developer, graphic designer, and machine learning enthusiast. I have experience in creating dynamic and responsive websites using HTML, CSS, JavaScript, and other frameworks. I also have a passion for designing graphics that are eye-catching and appealing. I am always eager to learn new skills and technologies in the field of machine learning and deep learning. I have completed several projects and courses on various topics such as computer vision, and natural language processing."}),F.jsxs("div",{className:"mt-20 flex flex-wrap justify-center gap-10",children:[sU.map((n,e)=>F.jsx(RB,{index:e,...n},n.title))," "]})]}),DB=ch(IB,"about");var Sg={},b3={exports:{}},kB="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",NB=kB,OB=NB;function T3(){}function C3(){}C3.resetWarningCache=T3;var UB=function(){function n(i,r,s,o,a,l){if(l!==OB){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}n.isRequired=n;function e(){return n}var t={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:e,element:n,elementType:n,instanceOf:e,node:n,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:C3,resetWarningCache:T3};return t.PropTypes=t,t};b3.exports=UB();var P3=b3.exports,L3={exports:{}};/*! + */function px(){return px=Object.assign?Object.assign.bind():function(n){for(var e=1;e=0)&&(t[r]=n[r]);return t}function AO(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function EO(n,e){return n.button===0&&(!e||e==="_self")&&!AO(n)}const bO=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"];function TO(n){let{basename:e,children:t,window:i}=n,r=V.useRef();r.current==null&&(r.current=CN({window:i,v5Compat:!0}));let s=r.current,[o,a]=V.useState({action:s.action,location:s.location});return V.useLayoutEffect(()=>s.listen(a),[s]),V.createElement(SO,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:s})}const CO=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",PO=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,vv=V.forwardRef(function(e,t){let{onClick:i,relative:r,reloadDocument:s,replace:o,state:a,target:l,to:f,preventScrollReset:h}=e,d=MO(e,bO),{basename:p}=V.useContext(rh),v,y=!1;if(typeof f=="string"&&PO.test(f)&&(v=f,CO)){let S=new URL(window.location.href),w=f.startsWith("//")?new URL(S.protocol+f):new URL(f),A=_1(w.pathname,p);w.origin===S.origin&&A!=null?f=A+w.search+w.hash:y=!0}let _=cO(f,{relative:r}),M=LO(f,{replace:o,state:a,target:l,preventScrollReset:h,relative:r});function m(S){i&&i(S),S.defaultPrevented||M(S)}return V.createElement("a",px({},d,{href:v||_,onClick:y||s?i:m,ref:t,target:l}))});var DA;(function(n){n.UseScrollRestoration="useScrollRestoration",n.UseSubmitImpl="useSubmitImpl",n.UseFetcher="useFetcher"})(DA||(DA={}));var kA;(function(n){n.UseFetchers="useFetchers",n.UseScrollRestoration="useScrollRestoration"})(kA||(kA={}));function LO(n,e){let{target:t,replace:i,state:r,preventScrollReset:s,relative:o}=e===void 0?{}:e,a=fO(),l=ug(),f=oP(n,{relative:o});return V.useCallback(h=>{if(EO(h,t)){h.preventDefault();let d=i!==void 0?i:Lm(l)===Lm(f);a(n,{replace:d,state:r,preventScrollReset:s,relative:o})}},[l,a,f,i,r,t,n,s,o])}const Ws="/portfolio-react-threejs/assets/anim-bg-41fcb528.gif",aP=V.createContext({transformPagePoint:n=>n,isStatic:!1,reducedMotion:"never"}),cg=V.createContext({}),S1=V.createContext(null),fg=typeof document<"u",NA=fg?V.useLayoutEffect:V.useEffect,lP=V.createContext({strict:!1});function RO(n,e,t,i){const{visualElement:r}=V.useContext(cg),s=V.useContext(lP),o=V.useContext(S1),a=V.useContext(aP).reducedMotion,l=V.useRef();i=i||s.renderer,!l.current&&i&&(l.current=i(n,{visualState:e,parent:r,props:t,presenceContext:o,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:a}));const f=l.current;return V.useInsertionEffect(()=>{f&&f.update(t,o)}),NA(()=>{f&&f.render()}),V.useEffect(()=>{f&&f.updateFeatures()}),(window.HandoffAppearAnimations?NA:V.useEffect)(()=>{f&&f.animationState&&f.animationState.animateChanges()}),f}function nu(n){return typeof n=="object"&&Object.prototype.hasOwnProperty.call(n,"current")}function IO(n,e,t){return V.useCallback(i=>{i&&n.mount&&n.mount(i),e&&(i?e.mount(i):e.unmount()),t&&(typeof t=="function"?t(i):nu(t)&&(t.current=i))},[e])}function Pf(n){return typeof n=="string"||Array.isArray(n)}function hg(n){return typeof n=="object"&&typeof n.start=="function"}const w1=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],M1=["initial",...w1];function dg(n){return hg(n.animate)||M1.some(e=>Pf(n[e]))}function uP(n){return!!(dg(n)||n.variants)}function DO(n,e){if(dg(n)){const{initial:t,animate:i}=n;return{initial:t===!1||Pf(t)?t:void 0,animate:Pf(i)?i:void 0}}return n.inherit!==!1?e:{}}function kO(n){const{initial:e,animate:t}=DO(n,V.useContext(cg));return V.useMemo(()=>({initial:e,animate:t}),[OA(e),OA(t)])}function OA(n){return Array.isArray(n)?n.join(" "):n}const UA={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Lf={};for(const n in UA)Lf[n]={isEnabled:e=>UA[n].some(t=>!!e[t])};function NO(n){for(const e in n)Lf[e]={...Lf[e],...n[e]}}function cP(n){const e=V.useRef(null);return e.current===null&&(e.current=n()),e.current}const ef={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let OO=1;function UO(){return cP(()=>{if(ef.hasEverUpdated)return OO++})}const fP=V.createContext({}),hP=V.createContext({}),zO=Symbol.for("motionComponentSymbol");function FO({preloadedFeatures:n,createVisualElement:e,useRender:t,useVisualState:i,Component:r}){n&&NO(n);function s(a,l){let f;const h={...V.useContext(aP),...a,layoutId:BO(a)},{isStatic:d}=h,p=kO(a),v=d?void 0:UO(),y=i(a,d);if(!d&&fg){p.visualElement=RO(r,y,h,e);const _=V.useContext(hP),M=V.useContext(lP).strict;p.visualElement&&(f=p.visualElement.loadFeatures(h,M,n,v,_))}return V.createElement(cg.Provider,{value:p},f&&p.visualElement?V.createElement(f,{visualElement:p.visualElement,...h}):null,t(r,a,v,IO(y,p.visualElement,l),y,d,p.visualElement))}const o=V.forwardRef(s);return o[zO]=r,o}function BO({layoutId:n}){const e=V.useContext(fP).id;return e&&n!==void 0?e+"-"+n:n}function VO(n){function e(i,r={}){return FO(n(i,r))}if(typeof Proxy>"u")return e;const t=new Map;return new Proxy(e,{get:(i,r)=>(t.has(r)||t.set(r,e(r)),t.get(r))})}const HO=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function A1(n){return typeof n!="string"||n.includes("-")?!1:!!(HO.indexOf(n)>-1||/[A-Z]/.test(n))}const Im={};function WO(n){Object.assign(Im,n)}const oh=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Qa=new Set(oh);function dP(n,{layout:e,layoutId:t}){return Qa.has(n)||n.startsWith("origin")||(e||t!==void 0)&&(!!Im[n]||n==="opacity")}const Ri=n=>!!(n&&n.getVelocity),GO={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},jO=oh.length;function XO(n,{enableHardwareAcceleration:e=!0,allowTransformNone:t=!0},i,r){let s="";for(let o=0;oe=>typeof e=="string"&&e.startsWith(n),mP=pP("--"),mx=pP("var(--"),YO=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,qO=(n,e)=>e&&typeof n=="number"?e.transform(n):n,Ga=(n,e,t)=>Math.min(Math.max(t,n),e),$a={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},tf={...$a,transform:n=>Ga(0,1,n)},jd={...$a,default:1},nf=n=>Math.round(n*1e5)/1e5,pg=/(-)?([\d]*\.?[\d])+/g,gP=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,ZO=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function ah(n){return typeof n=="string"}const lh=n=>({test:e=>ah(e)&&e.endsWith(n)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${n}`}),uo=lh("deg"),es=lh("%"),it=lh("px"),JO=lh("vh"),KO=lh("vw"),zA={...es,parse:n=>es.parse(n)/100,transform:n=>es.transform(n*100)},FA={...$a,transform:Math.round},vP={borderWidth:it,borderTopWidth:it,borderRightWidth:it,borderBottomWidth:it,borderLeftWidth:it,borderRadius:it,radius:it,borderTopLeftRadius:it,borderTopRightRadius:it,borderBottomRightRadius:it,borderBottomLeftRadius:it,width:it,maxWidth:it,height:it,maxHeight:it,size:it,top:it,right:it,bottom:it,left:it,padding:it,paddingTop:it,paddingRight:it,paddingBottom:it,paddingLeft:it,margin:it,marginTop:it,marginRight:it,marginBottom:it,marginLeft:it,rotate:uo,rotateX:uo,rotateY:uo,rotateZ:uo,scale:jd,scaleX:jd,scaleY:jd,scaleZ:jd,skew:uo,skewX:uo,skewY:uo,distance:it,translateX:it,translateY:it,translateZ:it,x:it,y:it,z:it,perspective:it,transformPerspective:it,opacity:tf,originX:zA,originY:zA,originZ:it,zIndex:FA,fillOpacity:tf,strokeOpacity:tf,numOctaves:FA};function E1(n,e,t,i){const{style:r,vars:s,transform:o,transformOrigin:a}=n;let l=!1,f=!1,h=!0;for(const d in e){const p=e[d];if(mP(d)){s[d]=p;continue}const v=vP[d],y=qO(p,v);if(Qa.has(d)){if(l=!0,o[d]=y,!h)continue;p!==(v.default||0)&&(h=!1)}else d.startsWith("origin")?(f=!0,a[d]=y):r[d]=y}if(e.transform||(l||i?r.transform=XO(n.transform,t,h,i):r.transform&&(r.transform="none")),f){const{originX:d="50%",originY:p="50%",originZ:v=0}=a;r.transformOrigin=`${d} ${p} ${v}`}}const b1=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function yP(n,e,t){for(const i in e)!Ri(e[i])&&!dP(i,t)&&(n[i]=e[i])}function QO({transformTemplate:n},e,t){return V.useMemo(()=>{const i=b1();return E1(i,e,{enableHardwareAcceleration:!t},n),Object.assign({},i.vars,i.style)},[e])}function $O(n,e,t){const i=n.style||{},r={};return yP(r,i,n),Object.assign(r,QO(n,e,t)),n.transformValues?n.transformValues(r):r}function eU(n,e,t){const i={},r=$O(n,e,t);return n.drag&&n.dragListener!==!1&&(i.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=n.drag===!0?"none":`pan-${n.drag==="x"?"y":"x"}`),n.tabIndex===void 0&&(n.onTap||n.onTapStart||n.whileTap)&&(i.tabIndex=0),i.style=r,i}const tU=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function Dm(n){return n.startsWith("while")||n.startsWith("drag")&&n!=="draggable"||n.startsWith("layout")||n.startsWith("onTap")||n.startsWith("onPan")||tU.has(n)}let xP=n=>!Dm(n);function nU(n){n&&(xP=e=>e.startsWith("on")?!Dm(e):n(e))}try{nU(require("@emotion/is-prop-valid").default)}catch{}function iU(n,e,t){const i={};for(const r in n)r==="values"&&typeof n.values=="object"||(xP(r)||t===!0&&Dm(r)||!e&&!Dm(r)||n.draggable&&r.startsWith("onDrag"))&&(i[r]=n[r]);return i}function BA(n,e,t){return typeof n=="string"?n:it.transform(e+t*n)}function rU(n,e,t){const i=BA(e,n.x,n.width),r=BA(t,n.y,n.height);return`${i} ${r}`}const sU={offset:"stroke-dashoffset",array:"stroke-dasharray"},oU={offset:"strokeDashoffset",array:"strokeDasharray"};function aU(n,e,t=1,i=0,r=!0){n.pathLength=1;const s=r?sU:oU;n[s.offset]=it.transform(-i);const o=it.transform(e),a=it.transform(t);n[s.array]=`${o} ${a}`}function T1(n,{attrX:e,attrY:t,attrScale:i,originX:r,originY:s,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...f},h,d,p){if(E1(n,f,h,p),d){n.style.viewBox&&(n.attrs.viewBox=n.style.viewBox);return}n.attrs=n.style,n.style={};const{attrs:v,style:y,dimensions:_}=n;v.transform&&(_&&(y.transform=v.transform),delete v.transform),_&&(r!==void 0||s!==void 0||y.transform)&&(y.transformOrigin=rU(_,r!==void 0?r:.5,s!==void 0?s:.5)),e!==void 0&&(v.x=e),t!==void 0&&(v.y=t),i!==void 0&&(v.scale=i),o!==void 0&&aU(v,o,a,l,!1)}const _P=()=>({...b1(),attrs:{}}),C1=n=>typeof n=="string"&&n.toLowerCase()==="svg";function lU(n,e,t,i){const r=V.useMemo(()=>{const s=_P();return T1(s,e,{enableHardwareAcceleration:!1},C1(i),n.transformTemplate),{...s.attrs,style:{...s.style}}},[e]);if(n.style){const s={};yP(s,n.style,n),r.style={...s,...r.style}}return r}function uU(n=!1){return(t,i,r,s,{latestValues:o},a)=>{const f=(A1(t)?lU:eU)(i,o,a,t),d={...iU(i,typeof t=="string",n),...f,ref:s},{children:p}=i,v=V.useMemo(()=>Ri(p)?p.get():p,[p]);return r&&(d["data-projection-id"]=r),V.createElement(t,{...d,children:v})}}const P1=n=>n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function SP(n,{style:e,vars:t},i,r){Object.assign(n.style,e,r&&r.getProjectionStyles(i));for(const s in t)n.style.setProperty(s,t[s])}const wP=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function MP(n,e,t,i){SP(n,e,void 0,i);for(const r in e.attrs)n.setAttribute(wP.has(r)?r:P1(r),e.attrs[r])}function L1(n,e){const{style:t}=n,i={};for(const r in t)(Ri(t[r])||e.style&&Ri(e.style[r])||dP(r,n))&&(i[r]=t[r]);return i}function AP(n,e){const t=L1(n,e);for(const i in n)if(Ri(n[i])||Ri(e[i])){const r=oh.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;t[r]=n[i]}return t}function R1(n,e,t,i={},r={}){return typeof e=="function"&&(e=e(t!==void 0?t:n.custom,i,r)),typeof e=="string"&&(e=n.variants&&n.variants[e]),typeof e=="function"&&(e=e(t!==void 0?t:n.custom,i,r)),e}const km=n=>Array.isArray(n),cU=n=>!!(n&&typeof n=="object"&&n.mix&&n.toValue),fU=n=>km(n)?n[n.length-1]||0:n;function Kp(n){const e=Ri(n)?n.get():n;return cU(e)?e.toValue():e}function hU({scrapeMotionValuesFromProps:n,createRenderState:e,onMount:t},i,r,s){const o={latestValues:dU(i,r,s,n),renderState:e()};return t&&(o.mount=a=>t(i,a,o)),o}const EP=n=>(e,t)=>{const i=V.useContext(cg),r=V.useContext(S1),s=()=>hU(n,e,i,r);return t?s():cP(s)};function dU(n,e,t,i){const r={},s=i(n,{});for(const p in s)r[p]=Kp(s[p]);let{initial:o,animate:a}=n;const l=dg(n),f=uP(n);e&&f&&!l&&n.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let h=t?t.initial===!1:!1;h=h||o===!1;const d=h?a:o;return d&&typeof d!="boolean"&&!hg(d)&&(Array.isArray(d)?d:[d]).forEach(v=>{const y=R1(n,v);if(!y)return;const{transitionEnd:_,transition:M,...m}=y;for(const S in m){let w=m[S];if(Array.isArray(w)){const A=h?w.length-1:0;w=w[A]}w!==null&&(r[S]=w)}for(const S in _)r[S]=_[S]}),r}const pU={useVisualState:EP({scrapeMotionValuesFromProps:AP,createRenderState:_P,onMount:(n,e,{renderState:t,latestValues:i})=>{try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}T1(t,i,{enableHardwareAcceleration:!1},C1(e.tagName),n.transformTemplate),MP(e,t)}})},mU={useVisualState:EP({scrapeMotionValuesFromProps:L1,createRenderState:b1})};function gU(n,{forwardMotionProps:e=!1},t,i){return{...A1(n)?pU:mU,preloadedFeatures:t,useRender:uU(e),createVisualElement:i,Component:n}}function Cs(n,e,t,i={passive:!0}){return n.addEventListener(e,t,i),()=>n.removeEventListener(e,t)}const bP=n=>n.pointerType==="mouse"?typeof n.button!="number"||n.button<=0:n.isPrimary!==!1;function mg(n,e="page"){return{point:{x:n[e+"X"],y:n[e+"Y"]}}}const vU=n=>e=>bP(e)&&n(e,mg(e));function Rs(n,e,t,i){return Cs(n,e,vU(t),i)}const yU=(n,e)=>t=>e(n(t)),Ro=(...n)=>n.reduce(yU);function TP(n){let e=null;return()=>{const t=()=>{e=null};return e===null?(e=n,t):!1}}const VA=TP("dragHorizontal"),HA=TP("dragVertical");function CP(n){let e=!1;if(n==="y")e=HA();else if(n==="x")e=VA();else{const t=VA(),i=HA();t&&i?e=()=>{t(),i()}:(t&&t(),i&&i())}return e}function PP(){const n=CP(!0);return n?(n(),!1):!0}class jo{constructor(e){this.isMounted=!1,this.node=e}update(){}}function xU(n){let e=[],t=[],i=0,r=!1,s=!1;const o=new WeakSet,a={schedule:(l,f=!1,h=!1)=>{const d=h&&r,p=d?e:t;return f&&o.add(l),p.indexOf(l)===-1&&(p.push(l),d&&r&&(i=e.length)),l},cancel:l=>{const f=t.indexOf(l);f!==-1&&t.splice(f,1),o.delete(l)},process:l=>{if(r){s=!0;return}if(r=!0,[e,t]=[t,e],t.length=0,i=e.length,i)for(let f=0;f(n[e]=xU(()=>Rf=!0),n),{}),SU=n=>yu[n].process(Un),LP=n=>{Rf=!1,Un.delta=gx?1e3/60:Math.max(Math.min(n-Un.timestamp,_U),1),Un.timestamp=n,Un.isProcessing=!0,gg.forEach(SU),Un.isProcessing=!1,Rf&&(gx=!1,requestAnimationFrame(LP))},wU=()=>{Rf=!0,gx=!0,Un.isProcessing||requestAnimationFrame(LP)},nn=gg.reduce((n,e)=>{const t=yu[e];return n[e]=(i,r=!1,s=!1)=>(Rf||wU(),t.schedule(i,r,s)),n},{});function zs(n){gg.forEach(e=>yu[e].cancel(n))}function WA(n,e){const t="pointer"+(e?"enter":"leave"),i="onHover"+(e?"Start":"End"),r=(s,o)=>{if(s.type==="touch"||PP())return;const a=n.getProps();n.animationState&&a.whileHover&&n.animationState.setActive("whileHover",e),a[i]&&nn.update(()=>a[i](s,o))};return Rs(n.current,t,r,{passive:!n.getProps()[i]})}class MU extends jo{mount(){this.unmount=Ro(WA(this.node,!0),WA(this.node,!1))}unmount(){}}class AU extends jo{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Ro(Cs(this.node.current,"focus",()=>this.onFocus()),Cs(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const RP=(n,e)=>e?n===e?!0:RP(n,e.parentElement):!1,bn=n=>n;function yv(n,e){if(!e)return;const t=new PointerEvent("pointer"+n);e(t,mg(t))}class EU extends jo{constructor(){super(...arguments),this.removeStartListeners=bn,this.removeEndListeners=bn,this.removeAccessibleListeners=bn,this.startPointerPress=(e,t)=>{if(this.removeEndListeners(),this.isPressing)return;const i=this.node.getProps(),s=Rs(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:f,onTapCancel:h}=this.node.getProps();nn.update(()=>{RP(this.node.current,a.target)?f&&f(a,l):h&&h(a,l)})},{passive:!(i.onTap||i.onPointerUp)}),o=Rs(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(i.onTapCancel||i.onPointerCancel)});this.removeEndListeners=Ro(s,o),this.startPress(e,t)},this.startAccessiblePress=()=>{const e=s=>{if(s.key!=="Enter"||this.isPressing)return;const o=a=>{a.key!=="Enter"||!this.checkPressEnd()||yv("up",(l,f)=>{const{onTap:h}=this.node.getProps();h&&nn.update(()=>h(l,f))})};this.removeEndListeners(),this.removeEndListeners=Cs(this.node.current,"keyup",o),yv("down",(a,l)=>{this.startPress(a,l)})},t=Cs(this.node.current,"keydown",e),i=()=>{this.isPressing&&yv("cancel",(s,o)=>this.cancelPress(s,o))},r=Cs(this.node.current,"blur",i);this.removeAccessibleListeners=Ro(t,r)}}startPress(e,t){this.isPressing=!0;const{onTapStart:i,whileTap:r}=this.node.getProps();r&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),i&&nn.update(()=>i(e,t))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!PP()}cancelPress(e,t){if(!this.checkPressEnd())return;const{onTapCancel:i}=this.node.getProps();i&&nn.update(()=>i(e,t))}mount(){const e=this.node.getProps(),t=Rs(this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),i=Cs(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Ro(t,i)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const vx=new WeakMap,xv=new WeakMap,bU=n=>{const e=vx.get(n.target);e&&e(n)},TU=n=>{n.forEach(bU)};function CU({root:n,...e}){const t=n||document;xv.has(t)||xv.set(t,{});const i=xv.get(t),r=JSON.stringify(e);return i[r]||(i[r]=new IntersectionObserver(TU,{root:n,...e})),i[r]}function PU(n,e,t){const i=CU(e);return vx.set(n,t),i.observe(n),()=>{vx.delete(n),i.unobserve(n)}}const LU={some:0,all:1};class RU extends jo{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:i,amount:r="some",once:s}=e,o={root:t?t.current:void 0,rootMargin:i,threshold:typeof r=="number"?r:LU[r]},a=l=>{const{isIntersecting:f}=l;if(this.isInView===f||(this.isInView=f,s&&!f&&this.hasEnteredView))return;f&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",f);const{onViewportEnter:h,onViewportLeave:d}=this.node.getProps(),p=f?h:d;p&&p(l)};return PU(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(IU(e,t))&&this.startObserver()}unmount(){}}function IU({viewport:n={}},{viewport:e={}}={}){return t=>n[t]!==e[t]}const DU={inView:{Feature:RU},tap:{Feature:EU},focus:{Feature:AU},hover:{Feature:MU}};function IP(n,e){if(!Array.isArray(e))return!1;const t=e.length;if(t!==n.length)return!1;for(let i=0;ie[i]=t.get()),e}function NU(n){const e={};return n.values.forEach((t,i)=>e[i]=t.getVelocity()),e}function vg(n,e,t){const i=n.getProps();return R1(i,e,t!==void 0?t:i.custom,kU(n),NU(n))}const OU="framerAppearId",UU="data-"+P1(OU);let zU=bn,I1=bn;const Io=n=>n*1e3,Is=n=>n/1e3,FU={current:!1},DP=n=>Array.isArray(n)&&typeof n[0]=="number";function kP(n){return!!(!n||typeof n=="string"&&NP[n]||DP(n)||Array.isArray(n)&&n.every(kP))}const Hc=([n,e,t,i])=>`cubic-bezier(${n}, ${e}, ${t}, ${i})`,NP={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Hc([0,.65,.55,1]),circOut:Hc([.55,0,1,.45]),backIn:Hc([.31,.01,.66,-.59]),backOut:Hc([.33,1.53,.69,.99])};function OP(n){if(n)return DP(n)?Hc(n):Array.isArray(n)?n.map(OP):NP[n]}function BU(n,e,t,{delay:i=0,duration:r,repeat:s=0,repeatType:o="loop",ease:a,times:l}={}){const f={[e]:t};l&&(f.offset=l);const h=OP(a);return Array.isArray(h)&&(f.easing=h),n.animate(f,{delay:i,duration:r,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"})}const GA={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},_v={},UP={};for(const n in GA)UP[n]=()=>(_v[n]===void 0&&(_v[n]=GA[n]()),_v[n]);function VU(n,{repeat:e,repeatType:t="loop"}){const i=e&&t!=="loop"&&e%2===1?0:n.length-1;return n[i]}const zP=(n,e,t)=>(((1-3*t+3*e)*n+(3*t-6*e))*n+3*e)*n,HU=1e-7,WU=12;function GU(n,e,t,i,r){let s,o,a=0;do o=e+(t-e)/2,s=zP(o,i,r)-n,s>0?t=o:e=o;while(Math.abs(s)>HU&&++aGU(s,0,1,n,t);return s=>s===0||s===1?s:zP(r(s),e,i)}const jU=uh(.42,0,1,1),XU=uh(0,0,.58,1),FP=uh(.42,0,.58,1),YU=n=>Array.isArray(n)&&typeof n[0]!="number",BP=n=>e=>e<=.5?n(2*e)/2:(2-n(2*(1-e)))/2,VP=n=>e=>1-n(1-e),HP=n=>1-Math.sin(Math.acos(n)),D1=VP(HP),qU=BP(D1),WP=uh(.33,1.53,.69,.99),k1=VP(WP),ZU=BP(k1),JU=n=>(n*=2)<1?.5*k1(n):.5*(2-Math.pow(2,-10*(n-1))),KU={linear:bn,easeIn:jU,easeInOut:FP,easeOut:XU,circIn:HP,circInOut:qU,circOut:D1,backIn:k1,backInOut:ZU,backOut:WP,anticipate:JU},jA=n=>{if(Array.isArray(n)){I1(n.length===4);const[e,t,i,r]=n;return uh(e,t,i,r)}else if(typeof n=="string")return KU[n];return n},N1=(n,e)=>t=>!!(ah(t)&&ZO.test(t)&&t.startsWith(n)||e&&Object.prototype.hasOwnProperty.call(t,e)),GP=(n,e,t)=>i=>{if(!ah(i))return i;const[r,s,o,a]=i.match(pg);return{[n]:parseFloat(r),[e]:parseFloat(s),[t]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},QU=n=>Ga(0,255,n),Sv={...$a,transform:n=>Math.round(QU(n))},Ta={test:N1("rgb","red"),parse:GP("red","green","blue"),transform:({red:n,green:e,blue:t,alpha:i=1})=>"rgba("+Sv.transform(n)+", "+Sv.transform(e)+", "+Sv.transform(t)+", "+nf(tf.transform(i))+")"};function $U(n){let e="",t="",i="",r="";return n.length>5?(e=n.substring(1,3),t=n.substring(3,5),i=n.substring(5,7),r=n.substring(7,9)):(e=n.substring(1,2),t=n.substring(2,3),i=n.substring(3,4),r=n.substring(4,5),e+=e,t+=t,i+=i,r+=r),{red:parseInt(e,16),green:parseInt(t,16),blue:parseInt(i,16),alpha:r?parseInt(r,16)/255:1}}const yx={test:N1("#"),parse:$U,transform:Ta.transform},iu={test:N1("hsl","hue"),parse:GP("hue","saturation","lightness"),transform:({hue:n,saturation:e,lightness:t,alpha:i=1})=>"hsla("+Math.round(n)+", "+es.transform(nf(e))+", "+es.transform(nf(t))+", "+nf(tf.transform(i))+")"},hi={test:n=>Ta.test(n)||yx.test(n)||iu.test(n),parse:n=>Ta.test(n)?Ta.parse(n):iu.test(n)?iu.parse(n):yx.parse(n),transform:n=>ah(n)?n:n.hasOwnProperty("red")?Ta.transform(n):iu.transform(n)},en=(n,e,t)=>-t*n+t*e+n;function wv(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*6*t:t<1/2?e:t<2/3?n+(e-n)*(2/3-t)*6:n}function ez({hue:n,saturation:e,lightness:t,alpha:i}){n/=360,e/=100,t/=100;let r=0,s=0,o=0;if(!e)r=s=o=t;else{const a=t<.5?t*(1+e):t+e-t*e,l=2*t-a;r=wv(l,a,n+1/3),s=wv(l,a,n),o=wv(l,a,n-1/3)}return{red:Math.round(r*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:i}}const Mv=(n,e,t)=>{const i=n*n;return Math.sqrt(Math.max(0,t*(e*e-i)+i))},tz=[yx,Ta,iu],nz=n=>tz.find(e=>e.test(n));function XA(n){const e=nz(n);let t=e.parse(n);return e===iu&&(t=ez(t)),t}const jP=(n,e)=>{const t=XA(n),i=XA(e),r={...t};return s=>(r.red=Mv(t.red,i.red,s),r.green=Mv(t.green,i.green,s),r.blue=Mv(t.blue,i.blue,s),r.alpha=en(t.alpha,i.alpha,s),Ta.transform(r))};function iz(n){var e,t;return isNaN(n)&&ah(n)&&(((e=n.match(pg))===null||e===void 0?void 0:e.length)||0)+(((t=n.match(gP))===null||t===void 0?void 0:t.length)||0)>0}const XP={regex:YO,countKey:"Vars",token:"${v}",parse:bn},YP={regex:gP,countKey:"Colors",token:"${c}",parse:hi.parse},qP={regex:pg,countKey:"Numbers",token:"${n}",parse:$a.parse};function Av(n,{regex:e,countKey:t,token:i,parse:r}){const s=n.tokenised.match(e);s&&(n["num"+t]=s.length,n.tokenised=n.tokenised.replace(e,i),n.values.push(...s.map(r)))}function Nm(n){const e=n.toString(),t={value:e,tokenised:e,values:[],numVars:0,numColors:0,numNumbers:0};return t.value.includes("var(--")&&Av(t,XP),Av(t,YP),Av(t,qP),t}function ZP(n){return Nm(n).values}function JP(n){const{values:e,numColors:t,numVars:i,tokenised:r}=Nm(n),s=e.length;return o=>{let a=r;for(let l=0;ltypeof n=="number"?0:n;function sz(n){const e=ZP(n);return JP(n)(e.map(rz))}const Oo={test:iz,parse:ZP,createTransformer:JP,getAnimatableNone:sz},KP=(n,e)=>t=>`${t>0?e:n}`;function QP(n,e){return typeof n=="number"?t=>en(n,e,t):hi.test(n)?jP(n,e):n.startsWith("var(")?KP(n,e):e3(n,e)}const $P=(n,e)=>{const t=[...n],i=t.length,r=n.map((s,o)=>QP(s,e[o]));return s=>{for(let o=0;o{const t={...n,...e},i={};for(const r in t)n[r]!==void 0&&e[r]!==void 0&&(i[r]=QP(n[r],e[r]));return r=>{for(const s in i)t[s]=i[s](r);return t}},e3=(n,e)=>{const t=Oo.createTransformer(e),i=Nm(n),r=Nm(e);return i.numVars===r.numVars&&i.numColors===r.numColors&&i.numNumbers>=r.numNumbers?Ro($P(i.values,r.values),t):KP(n,e)},If=(n,e,t)=>{const i=e-n;return i===0?1:(t-n)/i},YA=(n,e)=>t=>en(n,e,t);function az(n){return typeof n=="number"?YA:typeof n=="string"?hi.test(n)?jP:e3:Array.isArray(n)?$P:typeof n=="object"?oz:YA}function lz(n,e,t){const i=[],r=t||az(n[0]),s=n.length-1;for(let o=0;oe[0];n[0]>n[s-1]&&(n=[...n].reverse(),e=[...e].reverse());const o=lz(e,i,r),a=o.length,l=f=>{let h=0;if(a>1)for(;hl(Ga(n[0],n[s-1],f)):l}function uz(n,e){const t=n[n.length-1];for(let i=1;i<=e;i++){const r=If(0,e,i);n.push(en(t,1,r))}}function cz(n){const e=[0];return uz(e,n.length-1),e}function fz(n,e){return n.map(t=>t*e)}function hz(n,e){return n.map(()=>e||FP).splice(0,n.length-1)}function Om({duration:n=300,keyframes:e,times:t,ease:i="easeInOut"}){const r=YU(i)?i.map(jA):jA(i),s={done:!1,value:e[0]},o=fz(t&&t.length===e.length?t:cz(e),n),a=t3(o,e,{ease:Array.isArray(r)?r:hz(e,r)});return{calculatedDuration:n,next:l=>(s.value=a(l),s.done=l>=n,s)}}function n3(n,e){return e?n*(1e3/e):0}const dz=5;function i3(n,e,t){const i=Math.max(e-dz,0);return n3(t-n(i),e-i)}const Ev=.001,pz=.01,qA=10,mz=.05,gz=1;function vz({duration:n=800,bounce:e=.25,velocity:t=0,mass:i=1}){let r,s;zU(n<=Io(qA));let o=1-e;o=Ga(mz,gz,o),n=Ga(pz,qA,Is(n)),o<1?(r=f=>{const h=f*o,d=h*n,p=h-t,v=xx(f,o),y=Math.exp(-d);return Ev-p/v*y},s=f=>{const d=f*o*n,p=d*t+t,v=Math.pow(o,2)*Math.pow(f,2)*n,y=Math.exp(-d),_=xx(Math.pow(f,2),o);return(-r(f)+Ev>0?-1:1)*((p-v)*y)/_}):(r=f=>{const h=Math.exp(-f*n),d=(f-t)*n+1;return-Ev+h*d},s=f=>{const h=Math.exp(-f*n),d=(t-f)*(n*n);return h*d});const a=5/n,l=xz(r,s,a);if(n=Io(n),isNaN(l))return{stiffness:100,damping:10,duration:n};{const f=Math.pow(l,2)*i;return{stiffness:f,damping:o*2*Math.sqrt(i*f),duration:n}}}const yz=12;function xz(n,e,t){let i=t;for(let r=1;rn[t]!==void 0)}function wz(n){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...n};if(!ZA(n,Sz)&&ZA(n,_z)){const t=vz(n);e={...e,...t,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}function r3({keyframes:n,restDelta:e,restSpeed:t,...i}){const r=n[0],s=n[n.length-1],o={done:!1,value:r},{stiffness:a,damping:l,mass:f,velocity:h,duration:d,isResolvedFromDuration:p}=wz(i),v=h?-Is(h):0,y=l/(2*Math.sqrt(a*f)),_=s-r,M=Is(Math.sqrt(a/f)),m=Math.abs(_)<5;t||(t=m?.01:2),e||(e=m?.005:.5);let S;if(y<1){const w=xx(M,y);S=A=>{const b=Math.exp(-y*M*A);return s-b*((v+y*M*_)/w*Math.sin(w*A)+_*Math.cos(w*A))}}else if(y===1)S=w=>s-Math.exp(-M*w)*(_+(v+M*_)*w);else{const w=M*Math.sqrt(y*y-1);S=A=>{const b=Math.exp(-y*M*A),P=Math.min(w*A,300);return s-b*((v+y*M*_)*Math.sinh(P)+w*_*Math.cosh(P))/w}}return{calculatedDuration:p&&d||null,next:w=>{const A=S(w);if(p)o.done=w>=d;else{let b=v;w!==0&&(y<1?b=i3(S,w,A):b=0);const P=Math.abs(b)<=t,I=Math.abs(s-A)<=e;o.done=P&&I}return o.value=o.done?s:A,o}}}function JA({keyframes:n,velocity:e=0,power:t=.8,timeConstant:i=325,bounceDamping:r=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:f=.5,restSpeed:h}){const d=n[0],p={done:!1,value:d},v=L=>a!==void 0&&Ll,y=L=>a===void 0?l:l===void 0||Math.abs(a-L)-_*Math.exp(-L/i),w=L=>m+S(L),A=L=>{const C=S(L),R=w(L);p.done=Math.abs(C)<=f,p.value=p.done?m:R};let b,P;const I=L=>{v(p.value)&&(b=L,P=r3({keyframes:[p.value,y(p.value)],velocity:i3(w,L,p.value),damping:r,stiffness:s,restDelta:f,restSpeed:h}))};return I(0),{calculatedDuration:null,next:L=>{let C=!1;return!P&&b===void 0&&(C=!0,A(L),I(L)),b!==void 0&&L>b?P.next(L-b):(!C&&A(L),p)}}}const Mz=n=>{const e=({timestamp:t})=>n(t);return{start:()=>nn.update(e,!0),stop:()=>zs(e),now:()=>Un.isProcessing?Un.timestamp:performance.now()}},KA=2e4;function QA(n){let e=0;const t=50;let i=n.next(e);for(;!i.done&&e=KA?1/0:e}const Az={decay:JA,inertia:JA,tween:Om,keyframes:Om,spring:r3};function Um({autoplay:n=!0,delay:e=0,driver:t=Mz,keyframes:i,type:r="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:a="loop",onPlay:l,onStop:f,onComplete:h,onUpdate:d,...p}){let v=1,y=!1,_,M;const m=()=>{_&&_(),M=new Promise(te=>{_=te})};m();let S;const w=Az[r]||Om;let A;w!==Om&&typeof i[0]!="number"&&(A=t3([0,100],i,{clamp:!1}),i=[0,100]);const b=w({...p,keyframes:i});let P;a==="mirror"&&(P=w({...p,keyframes:[...i].reverse(),velocity:-(p.velocity||0)}));let I="idle",L=null,C=null,R=null;b.calculatedDuration===null&&s&&(b.calculatedDuration=QA(b));const{calculatedDuration:W}=b;let J=1/0,j=1/0;W!==null&&(J=W+o,j=J*(s+1)-o);let X=0;const Z=te=>{if(C===null)return;v>0&&(C=Math.min(C,te)),L!==null?X=L:X=(te-C)*v;const $=X-e,ee=$<0;X=Math.max($,0),I==="finished"&&L===null&&(X=j);let ue=X,Ee=b;if(s){const Ye=X/J;let xe=Math.floor(Ye),Me=Ye%1;!Me&&Ye>=1&&(Me=1),Me===1&&xe--,xe=Math.min(xe,s+1);const ge=!!(xe%2);ge&&(a==="reverse"?(Me=1-Me,o&&(Me-=o/J)):a==="mirror"&&(Ee=P));let oe=Ga(0,1,Me);X>j&&(oe=a==="reverse"&&ge?1:0),ue=oe*J}const we=ee?{done:!1,value:i[0]}:Ee.next(ue);A&&(we.value=A(we.value));let{done:Q}=we;!ee&&W!==null&&(Q=X>=j);const Xe=L===null&&(I==="finished"||I==="running"&&Q||v<0&&X<=0);return d&&d(we.value),Xe&&D(),we},se=()=>{S&&S.stop(),S=void 0},ae=()=>{I="idle",se(),m(),C=R=null},D=()=>{I="finished",h&&h(),se(),m()},H=()=>{if(y)return;S||(S=t(Z));const te=S.now();l&&l(),L!==null?C=te-L:(!C||I==="finished")&&(C=te),R=C,L=null,I="running",S.start()};n&&H();const B={then(te,$){return M.then(te,$)},get time(){return Is(X)},set time(te){te=Io(te),X=te,L!==null||!S||v===0?L=te:C=S.now()-te/v},get duration(){const te=b.calculatedDuration===null?QA(b):b.calculatedDuration;return Is(te)},get speed(){return v},set speed(te){te===v||!S||(v=te,B.time=Is(X))},get state(){return I},play:H,pause:()=>{I="paused",L=X},stop:()=>{y=!0,I!=="idle"&&(I="idle",f&&f(),ae())},cancel:()=>{R!==null&&Z(R),ae()},complete:()=>{I="finished"},sample:te=>(C=0,Z(te))};return B}const Ez=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),Xd=10,bz=2e4,Tz=(n,e)=>e.type==="spring"||n==="backgroundColor"||!kP(e.ease);function Cz(n,e,{onUpdate:t,onComplete:i,...r}){if(!(UP.waapi()&&Ez.has(e)&&!r.repeatDelay&&r.repeatType!=="mirror"&&r.damping!==0&&r.type!=="inertia"))return!1;let o=!1,a,l;const f=()=>{l=new Promise(m=>{a=m})};f();let{keyframes:h,duration:d=300,ease:p,times:v}=r;if(Tz(e,r)){const m=Um({...r,repeat:0,delay:0});let S={done:!1,value:h[0]};const w=[];let A=0;for(;!S.done&&Ay.cancel(),M=()=>{nn.update(_),a(),f()};return y.onfinish=()=>{n.set(VU(h,r)),i&&i(),M()},{then(m,S){return l.then(m,S)},get time(){return Is(y.currentTime||0)},set time(m){y.currentTime=Io(m)},get speed(){return y.playbackRate},set speed(m){y.playbackRate=m},get duration(){return Is(d)},play:()=>{o||(y.play(),zs(_))},pause:()=>y.pause(),stop:()=>{if(o=!0,y.playState==="idle")return;const{currentTime:m}=y;if(m){const S=Um({...r,autoplay:!1});n.setWithVelocity(S.sample(m-Xd).value,S.sample(m).value,Xd)}M()},complete:()=>y.finish(),cancel:M}}function Pz({keyframes:n,delay:e,onUpdate:t,onComplete:i}){const r=()=>(t&&t(n[n.length-1]),i&&i(),{time:0,speed:1,duration:0,play:bn,pause:bn,stop:bn,then:s=>(s(),Promise.resolve()),cancel:bn,complete:bn});return e?Um({keyframes:[0,1],duration:0,delay:e,onComplete:r}):r()}const Lz={type:"spring",stiffness:500,damping:25,restSpeed:10},Rz=n=>({type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restSpeed:10}),Iz={type:"keyframes",duration:.8},Dz={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},kz=(n,{keyframes:e})=>e.length>2?Iz:Qa.has(n)?n.startsWith("scale")?Rz(e[1]):Lz:Dz,_x=(n,e)=>n==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&Oo.test(e)&&!e.startsWith("url(")),Nz=new Set(["brightness","contrast","saturate","opacity"]);function Oz(n){const[e,t]=n.slice(0,-1).split("(");if(e==="drop-shadow")return n;const[i]=t.match(pg)||[];if(!i)return n;const r=t.replace(i,"");let s=Nz.has(e)?1:0;return i!==t&&(s*=100),e+"("+s+r+")"}const Uz=/([a-z-]*)\(.*?\)/g,Sx={...Oo,getAnimatableNone:n=>{const e=n.match(Uz);return e?e.map(Oz).join(" "):n}},zz={...vP,color:hi,backgroundColor:hi,outlineColor:hi,fill:hi,stroke:hi,borderColor:hi,borderTopColor:hi,borderRightColor:hi,borderBottomColor:hi,borderLeftColor:hi,filter:Sx,WebkitFilter:Sx},O1=n=>zz[n];function U1(n,e){let t=O1(n);return t!==Sx&&(t=Oo),t.getAnimatableNone?t.getAnimatableNone(e):void 0}function Fz({when:n,delay:e,delayChildren:t,staggerChildren:i,staggerDirection:r,repeat:s,repeatType:o,repeatDelay:a,from:l,elapsed:f,...h}){return!!Object.keys(h).length}function $A(n){return n===0||typeof n=="string"&&parseFloat(n)===0&&n.indexOf(" ")===-1}function eE(n){return typeof n=="number"?0:U1("",n)}function s3(n,e){return n[e]||n.default||n}function Bz(n,[...e]){for(let t=0;tr=>{const s=s3(i,n)||{},o=s.delay||i.delay||0;let{elapsed:a=0}=i;a=a-Io(o);const l=Vz(e,n,t,s),f=l[0],h=l[l.length-1],d=_x(n,f),p=_x(n,h);let v={keyframes:l,velocity:e.getVelocity(),ease:"easeOut",...s,delay:-a,onUpdate:y=>{e.set(y),s.onUpdate&&s.onUpdate(y)},onComplete:()=>{r(),s.onComplete&&s.onComplete()}};if(Fz(s)||(v={...v,...kz(n,v)}),v.duration&&(v.duration=Io(v.duration)),v.repeatDelay&&(v.repeatDelay=Io(v.repeatDelay)),!d||!p||FU.current||s.type===!1)return Pz(v);if(e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const y=Cz(e,n,v);if(y)return y}return Um(v)};function zm(n){return!!(Ri(n)&&n.add)}const Hz=n=>/^\-?\d*\.?\d+$/.test(n),Wz=n=>/^0[^.\s]+$/.test(n);function F1(n,e){n.indexOf(e)===-1&&n.push(e)}function B1(n,e){const t=n.indexOf(e);t>-1&&n.splice(t,1)}class V1{constructor(){this.subscriptions=[]}add(e){return F1(this.subscriptions,e),()=>B1(this.subscriptions,e)}notify(e,t,i){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,i);else for(let s=0;s!isNaN(parseFloat(n));class jz{constructor(e,t={}){this.version="10.12.4",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(i,r=!0)=>{this.prev=this.current,this.current=i;const{delta:s,timestamp:o}=Un;this.lastUpdated!==o&&(this.timeDelta=s,this.lastUpdated=o,nn.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),r&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>nn.postRender(this.velocityCheck),this.velocityCheck=({timestamp:i})=>{i!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=Gz(this.current),this.owner=t.owner}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new V1);const i=this.events[e].add(t);return e==="change"?()=>{i(),nn.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){!t||!this.passiveEffect?this.updateAndNotify(e,t):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,t,i){this.set(t),this.prev=e,this.timeDelta=i}jump(e){this.updateAndNotify(e),this.prev=e,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?n3(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Cu(n,e){return new jz(n,e)}const o3=n=>e=>e.test(n),Xz={test:n=>n==="auto",parse:n=>n},a3=[$a,it,es,uo,KO,JO,Xz],Sc=n=>a3.find(o3(n)),Yz=[...a3,hi,Oo],qz=n=>Yz.find(o3(n));function Zz(n,e,t){n.hasValue(e)?n.getValue(e).set(t):n.addValue(e,Cu(t))}function Jz(n,e){const t=vg(n,e);let{transitionEnd:i={},transition:r={},...s}=t?n.makeTargetAnimatable(t,!1):{};s={...s,...i};for(const o in s){const a=fU(s[o]);Zz(n,o,a)}}function Kz(n,e,t){var i,r;const s=Object.keys(e).filter(a=>!n.hasValue(a)),o=s.length;if(o)for(let a=0;al.remove(d))),f.push(_)}return o&&Promise.all(f).then(()=>{o&&Jz(n,o)}),f}function wx(n,e,t={}){const i=vg(n,e,t.custom);let{transition:r=n.getDefaultTransition()||{}}=i||{};t.transitionOverride&&(r=t.transitionOverride);const s=i?()=>Promise.all(l3(n,i,t)):()=>Promise.resolve(),o=n.variantChildren&&n.variantChildren.size?(l=0)=>{const{delayChildren:f=0,staggerChildren:h,staggerDirection:d}=r;return tF(n,e,f+l,h,d,t)}:()=>Promise.resolve(),{when:a}=r;if(a){const[l,f]=a==="beforeChildren"?[s,o]:[o,s];return l().then(()=>f())}else return Promise.all([s(),o(t.delay)])}function tF(n,e,t=0,i=0,r=1,s){const o=[],a=(n.variantChildren.size-1)*i,l=r===1?(f=0)=>f*i:(f=0)=>a-f*i;return Array.from(n.variantChildren).sort(nF).forEach((f,h)=>{f.notify("AnimationStart",e),o.push(wx(f,e,{...s,delay:t+l(h)}).then(()=>f.notify("AnimationComplete",e)))}),Promise.all(o)}function nF(n,e){return n.sortNodePosition(e)}function iF(n,e,t={}){n.notify("AnimationStart",e);let i;if(Array.isArray(e)){const r=e.map(s=>wx(n,s,t));i=Promise.all(r)}else if(typeof e=="string")i=wx(n,e,t);else{const r=typeof e=="function"?vg(n,e,t.custom):e;i=Promise.all(l3(n,r,t))}return i.then(()=>n.notify("AnimationComplete",e))}const rF=[...w1].reverse(),sF=w1.length;function oF(n){return e=>Promise.all(e.map(({animation:t,options:i})=>iF(n,t,i)))}function aF(n){let e=oF(n);const t=uF();let i=!0;const r=(l,f)=>{const h=vg(n,f);if(h){const{transition:d,transitionEnd:p,...v}=h;l={...l,...v,...p}}return l};function s(l){e=l(n)}function o(l,f){const h=n.getProps(),d=n.getVariantContext(!0)||{},p=[],v=new Set;let y={},_=1/0;for(let m=0;m_&&b;const R=Array.isArray(A)?A:[A];let W=R.reduce(r,{});P===!1&&(W={});const{prevResolvedValues:J={}}=w,j={...J,...W},X=Z=>{C=!0,v.delete(Z),w.needsAnimating[Z]=!0};for(const Z in j){const se=W[Z],ae=J[Z];y.hasOwnProperty(Z)||(se!==ae?km(se)&&km(ae)?!IP(se,ae)||L?X(Z):w.protectedKeys[Z]=!0:se!==void 0?X(Z):v.add(Z):se!==void 0&&v.has(Z)?X(Z):w.protectedKeys[Z]=!0)}w.prevProp=A,w.prevResolvedValues=W,w.isActive&&(y={...y,...W}),i&&n.blockInitialAnimation&&(C=!1),C&&!I&&p.push(...R.map(Z=>({animation:Z,options:{type:S,...l}})))}if(v.size){const m={};v.forEach(S=>{const w=n.getBaseTarget(S);w!==void 0&&(m[S]=w)}),p.push({animation:m})}let M=!!p.length;return i&&h.initial===!1&&!n.manuallyAnimateOnMount&&(M=!1),i=!1,M?e(p):Promise.resolve()}function a(l,f,h){var d;if(t[l].isActive===f)return Promise.resolve();(d=n.variantChildren)===null||d===void 0||d.forEach(v=>{var y;return(y=v.animationState)===null||y===void 0?void 0:y.setActive(l,f)}),t[l].isActive=f;const p=o(h,l);for(const v in t)t[v].protectedKeys={};return p}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>t}}function lF(n,e){return typeof e=="string"?e!==n:Array.isArray(e)?!IP(e,n):!1}function oa(n=!1){return{isActive:n,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function uF(){return{animate:oa(!0),whileInView:oa(),whileHover:oa(),whileTap:oa(),whileDrag:oa(),whileFocus:oa(),exit:oa()}}class cF extends jo{constructor(e){super(e),e.animationState||(e.animationState=aF(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),hg(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){}}let fF=0;class hF extends jo{constructor(){super(...arguments),this.id=fF++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t,custom:i}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;const s=this.node.animationState.setActive("exit",!e,{custom:i??this.node.getProps().custom});t&&!e&&s.then(()=>t(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const dF={animation:{Feature:cF},exit:{Feature:hF}},tE=(n,e)=>Math.abs(n-e);function pF(n,e){const t=tE(n.x,e.x),i=tE(n.y,e.y);return Math.sqrt(t**2+i**2)}class u3{constructor(e,t,{transformPagePoint:i}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=Tv(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,d=pF(f.offset,{x:0,y:0})>=3;if(!h&&!d)return;const{point:p}=f,{timestamp:v}=Un;this.history.push({...p,timestamp:v});const{onStart:y,onMove:_}=this.handlers;h||(y&&y(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),_&&_(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=bv(h,this.transformPagePoint),nn.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:d,onSessionEnd:p}=this.handlers,v=Tv(f.type==="pointercancel"?this.lastMoveEventInfo:bv(h,this.transformPagePoint),this.history);this.startEvent&&d&&d(f,v),p&&p(f,v)},!bP(e))return;this.handlers=t,this.transformPagePoint=i;const r=mg(e),s=bv(r,this.transformPagePoint),{point:o}=s,{timestamp:a}=Un;this.history=[{...o,timestamp:a}];const{onSessionStart:l}=t;l&&l(e,Tv(s,this.history)),this.removeListeners=Ro(Rs(window,"pointermove",this.handlePointerMove),Rs(window,"pointerup",this.handlePointerUp),Rs(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),zs(this.updatePoint)}}function bv(n,e){return e?{point:e(n.point)}:n}function nE(n,e){return{x:n.x-e.x,y:n.y-e.y}}function Tv({point:n},e){return{point:n,delta:nE(n,c3(e)),offset:nE(n,mF(e)),velocity:gF(e,.1)}}function mF(n){return n[0]}function c3(n){return n[n.length-1]}function gF(n,e){if(n.length<2)return{x:0,y:0};let t=n.length-1,i=null;const r=c3(n);for(;t>=0&&(i=n[t],!(r.timestamp-i.timestamp>Io(e)));)t--;if(!i)return{x:0,y:0};const s=Is(r.timestamp-i.timestamp);if(s===0)return{x:0,y:0};const o={x:(r.x-i.x)/s,y:(r.y-i.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Yi(n){return n.max-n.min}function Mx(n,e=0,t=.01){return Math.abs(n-e)<=t}function iE(n,e,t,i=.5){n.origin=i,n.originPoint=en(e.min,e.max,n.origin),n.scale=Yi(t)/Yi(e),(Mx(n.scale,1,1e-4)||isNaN(n.scale))&&(n.scale=1),n.translate=en(t.min,t.max,n.origin)-n.originPoint,(Mx(n.translate)||isNaN(n.translate))&&(n.translate=0)}function rf(n,e,t,i){iE(n.x,e.x,t.x,i?i.originX:void 0),iE(n.y,e.y,t.y,i?i.originY:void 0)}function rE(n,e,t){n.min=t.min+e.min,n.max=n.min+Yi(e)}function vF(n,e,t){rE(n.x,e.x,t.x),rE(n.y,e.y,t.y)}function sE(n,e,t){n.min=e.min-t.min,n.max=n.min+Yi(e)}function sf(n,e,t){sE(n.x,e.x,t.x),sE(n.y,e.y,t.y)}function yF(n,{min:e,max:t},i){return e!==void 0&&nt&&(n=i?en(t,n,i.max):Math.min(n,t)),n}function oE(n,e,t){return{min:e!==void 0?n.min+e:void 0,max:t!==void 0?n.max+t-(n.max-n.min):void 0}}function xF(n,{top:e,left:t,bottom:i,right:r}){return{x:oE(n.x,t,r),y:oE(n.y,e,i)}}function aE(n,e){let t=e.min-n.min,i=e.max-n.max;return e.max-e.mini?t=If(e.min,e.max-i,n.min):i>r&&(t=If(n.min,n.max-r,e.min)),Ga(0,1,t)}function wF(n,e){const t={};return e.min!==void 0&&(t.min=e.min-n.min),e.max!==void 0&&(t.max=e.max-n.min),t}const Ax=.35;function MF(n=Ax){return n===!1?n=0:n===!0&&(n=Ax),{x:lE(n,"left","right"),y:lE(n,"top","bottom")}}function lE(n,e,t){return{min:uE(n,e),max:uE(n,t)}}function uE(n,e){return typeof n=="number"?n:n[e]||0}const cE=()=>({translate:0,scale:1,origin:0,originPoint:0}),of=()=>({x:cE(),y:cE()}),fE=()=>({min:0,max:0}),wn=()=>({x:fE(),y:fE()});function Jr(n){return[n("x"),n("y")]}function f3({top:n,left:e,right:t,bottom:i}){return{x:{min:e,max:t},y:{min:n,max:i}}}function AF({x:n,y:e}){return{top:e.min,right:n.max,bottom:e.max,left:n.min}}function EF(n,e){if(!e)return n;const t=e({x:n.left,y:n.top}),i=e({x:n.right,y:n.bottom});return{top:t.y,left:t.x,bottom:i.y,right:i.x}}function Cv(n){return n===void 0||n===1}function Ex({scale:n,scaleX:e,scaleY:t}){return!Cv(n)||!Cv(e)||!Cv(t)}function va(n){return Ex(n)||h3(n)||n.z||n.rotate||n.rotateX||n.rotateY}function h3(n){return hE(n.x)||hE(n.y)}function hE(n){return n&&n!=="0%"}function Fm(n,e,t){const i=n-t,r=e*i;return t+r}function dE(n,e,t,i,r){return r!==void 0&&(n=Fm(n,r,i)),Fm(n,t,i)+e}function bx(n,e=0,t=1,i,r){n.min=dE(n.min,e,t,i,r),n.max=dE(n.max,e,t,i,r)}function d3(n,{x:e,y:t}){bx(n.x,e.translate,e.scale,e.originPoint),bx(n.y,t.translate,t.scale,t.originPoint)}function bF(n,e,t,i=!1){const r=t.length;if(!r)return;e.x=e.y=1;let s,o;for(let a=0;a1.0000000000001||n<.999999999999?n:1}function ho(n,e){n.min=n.min+e,n.max=n.max+e}function mE(n,e,[t,i,r]){const s=e[r]!==void 0?e[r]:.5,o=en(n.min,n.max,s);bx(n,e[t],e[i],o,e.scale)}const TF=["x","scaleX","originX"],CF=["y","scaleY","originY"];function ru(n,e){mE(n.x,e,TF),mE(n.y,e,CF)}function p3(n,e){return f3(EF(n.getBoundingClientRect(),e))}function PF(n,e,t){const i=p3(n,t),{scroll:r}=e;return r&&(ho(i.x,r.offset.x),ho(i.y,r.offset.y)),i}const LF=new WeakMap;class RF{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=wn(),this.visualElement=e}start(e,{snapToCursor:t=!1}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const r=l=>{this.stopAnimation(),t&&this.snapToCursor(mg(l,"page").point)},s=(l,f)=>{const{drag:h,dragPropagation:d,onDragStart:p}=this.getProps();if(h&&!d&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=CP(h),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Jr(y=>{let _=this.getAxisMotionValue(y).get()||0;if(es.test(_)){const{projection:M}=this.visualElement;if(M&&M.layout){const m=M.layout.layoutBox[y];m&&(_=Yi(m)*(parseFloat(_)/100))}}this.originPoint[y]=_}),p&&nn.update(()=>p(l,f),!1,!0);const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},o=(l,f)=>{const{dragPropagation:h,dragDirectionLock:d,onDirectionLock:p,onDrag:v}=this.getProps();if(!h&&!this.openGlobalLock)return;const{offset:y}=f;if(d&&this.currentDirection===null){this.currentDirection=IF(y),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",f.point,y),this.updateAxis("y",f.point,y),this.visualElement.render(),v&&v(l,f)},a=(l,f)=>this.stop(l,f);this.panSession=new u3(e,{onSessionStart:r,onStart:s,onMove:o,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(e,t){const i=this.isDragging;if(this.cancel(),!i)return;const{velocity:r}=t;this.startAnimation(r);const{onDragEnd:s}=this.getProps();s&&nn.update(()=>s(e,t))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:i}=this.getProps();!i&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,i){const{drag:r}=this.getProps();if(!i||!Yd(e,r,this.currentDirection))return;const s=this.getAxisMotionValue(e);let o=this.originPoint[e]+i[e];this.constraints&&this.constraints[e]&&(o=yF(o,this.constraints[e],this.elastic[e])),s.set(o)}resolveConstraints(){const{dragConstraints:e,dragElastic:t}=this.getProps(),{layout:i}=this.visualElement.projection||{},r=this.constraints;e&&nu(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&i?this.constraints=xF(i.layoutBox,e):this.constraints=!1,this.elastic=MF(t),r!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Jr(s=>{this.getAxisMotionValue(s)&&(this.constraints[s]=wF(i.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!nu(e))return!1;const i=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const s=PF(i,r.root,this.visualElement.getTransformPagePoint());let o=_F(r.layout.layoutBox,s);if(t){const a=t(AF(o));this.hasMutatedConstraints=!!a,a&&(o=f3(a))}return o}startAnimation(e){const{drag:t,dragMomentum:i,dragElastic:r,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},f=Jr(h=>{if(!Yd(h,t,this.currentDirection))return;let d=l&&l[h]||{};o&&(d={min:0,max:0});const p=r?200:1e6,v=r?40:1e7,y={type:"inertia",velocity:i?e[h]:0,bounceStiffness:p,bounceDamping:v,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(h,y)});return Promise.all(f).then(a)}startAxisValueAnimation(e,t){const i=this.getAxisMotionValue(e);return i.start(z1(e,i,0,t))}stopAnimation(){Jr(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const t="_drag"+e.toUpperCase(),i=this.visualElement.getProps(),r=i[t];return r||this.visualElement.getValue(e,(i.initial?i.initial[e]:void 0)||0)}snapToCursor(e){Jr(t=>{const{drag:i}=this.getProps();if(!Yd(t,i,this.currentDirection))return;const{projection:r}=this.visualElement,s=this.getAxisMotionValue(t);if(r&&r.layout){const{min:o,max:a}=r.layout.layoutBox[t];s.set(e[t]-en(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:i}=this.visualElement;if(!nu(t)||!i||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Jr(o=>{const a=this.getAxisMotionValue(o);if(a){const l=a.get();r[o]=SF({min:l,max:l},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),Jr(o=>{if(!Yd(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:f}=this.constraints[o];a.set(en(l,f,r[o]))})}addListeners(){if(!this.visualElement.current)return;LF.set(this.visualElement,this);const e=this.visualElement.current,t=Rs(e,"pointerdown",l=>{const{drag:f,dragListener:h=!0}=this.getProps();f&&h&&this.start(l)}),i=()=>{const{dragConstraints:l}=this.getProps();nu(l)&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,s=r.addEventListener("measure",i);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),i();const o=Cs(window,"resize",()=>this.scalePositionWithinConstraints()),a=r.addEventListener("didUpdate",({delta:l,hasLayoutChanged:f})=>{this.isDragging&&f&&(Jr(h=>{const d=this.getAxisMotionValue(h);d&&(this.originPoint[h]+=l[h].translate,d.set(d.get()+l[h].translate))}),this.visualElement.render())});return()=>{o(),t(),s(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:i=!1,dragPropagation:r=!1,dragConstraints:s=!1,dragElastic:o=Ax,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:i,dragPropagation:r,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function Yd(n,e,t){return(e===!0||e===n)&&(t===null||t===n)}function IF(n,e=10){let t=null;return Math.abs(n.y)>e?t="y":Math.abs(n.x)>e&&(t="x"),t}class DF extends jo{constructor(e){super(e),this.removeGroupControls=bn,this.removeListeners=bn,this.controls=new RF(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||bn}unmount(){this.removeGroupControls(),this.removeListeners()}}const gE=n=>(e,t)=>{n&&nn.update(()=>n(e,t))};class kF extends jo{constructor(){super(...arguments),this.removePointerDownListener=bn}onPointerDown(e){this.session=new u3(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:i,onPanEnd:r}=this.node.getProps();return{onSessionStart:gE(e),onStart:gE(t),onMove:i,onEnd:(s,o)=>{delete this.session,r&&nn.update(()=>r(s,o))}}}mount(){this.removePointerDownListener=Rs(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function NF(){const n=V.useContext(S1);if(n===null)return[!0,null];const{isPresent:e,onExitComplete:t,register:i}=n,r=V.useId();return V.useEffect(()=>i(r),[]),!e&&t?[!1,()=>t&&t(r)]:[!0]}function vE(n,e){return e.max===e.min?0:n/(e.max-e.min)*100}const wc={correct:(n,e)=>{if(!e.target)return n;if(typeof n=="string")if(it.test(n))n=parseFloat(n);else return n;const t=vE(n,e.target.x),i=vE(n,e.target.y);return`${t}% ${i}%`}},OF={correct:(n,{treeScale:e,projectionDelta:t})=>{const i=n,r=Oo.parse(n);if(r.length>5)return i;const s=Oo.createTransformer(n),o=typeof r[0]!="number"?1:0,a=t.x.scale*e.x,l=t.y.scale*e.y;r[0+o]/=a,r[1+o]/=l;const f=en(a,l,.5);return typeof r[2+o]=="number"&&(r[2+o]/=f),typeof r[3+o]=="number"&&(r[3+o]/=f),s(r)}};class UF extends $f.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:i,layoutId:r}=this.props,{projection:s}=e;WO(zF),s&&(t.group&&t.group.add(s),i&&i.register&&r&&i.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),ef.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:i,drag:r,isPresent:s}=this.props,o=i.projection;return o&&(o.isPresent=s,r||e.layoutDependency!==t||t===void 0?o.willUpdate():this.safeToRemove(),e.isPresent!==s&&(s?o.promote():o.relegate()||nn.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),!e.currentAnimation&&e.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:i}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),i&&i.deregister&&i.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function m3(n){const[e,t]=NF(),i=V.useContext(fP);return $f.createElement(UF,{...n,layoutGroup:i,switchLayoutGroup:V.useContext(hP),isPresent:e,safeToRemove:t})}const zF={borderRadius:{...wc,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:wc,borderTopRightRadius:wc,borderBottomLeftRadius:wc,borderBottomRightRadius:wc,boxShadow:OF},g3=["TopLeft","TopRight","BottomLeft","BottomRight"],FF=g3.length,yE=n=>typeof n=="string"?parseFloat(n):n,xE=n=>typeof n=="number"||it.test(n);function BF(n,e,t,i,r,s){r?(n.opacity=en(0,t.opacity!==void 0?t.opacity:1,VF(i)),n.opacityExit=en(e.opacity!==void 0?e.opacity:1,0,HF(i))):s&&(n.opacity=en(e.opacity!==void 0?e.opacity:1,t.opacity!==void 0?t.opacity:1,i));for(let o=0;oie?1:t(If(n,e,i))}function SE(n,e){n.min=e.min,n.max=e.max}function or(n,e){SE(n.x,e.x),SE(n.y,e.y)}function wE(n,e,t,i,r){return n-=e,n=Fm(n,1/t,i),r!==void 0&&(n=Fm(n,1/r,i)),n}function WF(n,e=0,t=1,i=.5,r,s=n,o=n){if(es.test(e)&&(e=parseFloat(e),e=en(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=en(s.min,s.max,i);n===s&&(a-=e),n.min=wE(n.min,e,t,a,r),n.max=wE(n.max,e,t,a,r)}function ME(n,e,[t,i,r],s,o){WF(n,e[t],e[i],e[r],e.scale,s,o)}const GF=["x","scaleX","originX"],jF=["y","scaleY","originY"];function AE(n,e,t,i){ME(n.x,e,GF,t?t.x:void 0,i?i.x:void 0),ME(n.y,e,jF,t?t.y:void 0,i?i.y:void 0)}function EE(n){return n.translate===0&&n.scale===1}function y3(n){return EE(n.x)&&EE(n.y)}function Tx(n,e){return n.x.min===e.x.min&&n.x.max===e.x.max&&n.y.min===e.y.min&&n.y.max===e.y.max}function bE(n){return Yi(n.x)/Yi(n.y)}class XF{constructor(){this.members=[]}add(e){F1(this.members,e),e.scheduleRender()}remove(e){if(B1(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(e){const t=this.members.findIndex(r=>e===r);if(t===0)return!1;let i;for(let r=t;r>=0;r--){const s=this.members[r];if(s.isPresent!==!1){i=s;break}}return i?(this.promote(i),!0):!1}promote(e,t){const i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.instance&&i.scheduleRender(),e.scheduleRender(),e.resumeFrom=i,t&&(e.resumeFrom.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:r}=e.options;r===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:t,resumingFrom:i}=e;t.onExitComplete&&t.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function TE(n,e,t){let i="";const r=n.x.translate/e.x,s=n.y.translate/e.y;if((r||s)&&(i=`translate3d(${r}px, ${s}px, 0) `),(e.x!==1||e.y!==1)&&(i+=`scale(${1/e.x}, ${1/e.y}) `),t){const{rotate:l,rotateX:f,rotateY:h}=t;l&&(i+=`rotate(${l}deg) `),f&&(i+=`rotateX(${f}deg) `),h&&(i+=`rotateY(${h}deg) `)}const o=n.x.scale*e.x,a=n.y.scale*e.y;return(o!==1||a!==1)&&(i+=`scale(${o}, ${a})`),i||"none"}const YF=(n,e)=>n.depth-e.depth;class qF{constructor(){this.children=[],this.isDirty=!1}add(e){F1(this.children,e),this.isDirty=!0}remove(e){B1(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(YF),this.isDirty=!1,this.children.forEach(e)}}function ZF(n,e){const t=performance.now(),i=({timestamp:r})=>{const s=r-t;s>=e&&(zs(i),n(s-e))};return nn.read(i,!0),()=>zs(i)}function JF(n){window.MotionDebug&&window.MotionDebug.record(n)}function KF(n){return n instanceof SVGElement&&n.tagName!=="svg"}function QF(n,e,t){const i=Ri(n)?n:Cu(n);return i.start(z1("",i,e,t)),i.animation}const CE=["","X","Y","Z"],PE=1e3;let $F=0;const ya={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function x3({attachResizeListener:n,defaultParent:e,measureScroll:t,checkIsScrollRoot:i,resetTransform:r}){return class{constructor(o,a={},l=e==null?void 0:e()){this.id=$F++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{ya.totalNodes=ya.resolvedTargetDeltas=ya.recalculatedProjection=0,this.nodes.forEach(n4),this.nodes.forEach(o4),this.nodes.forEach(a4),this.nodes.forEach(i4),JF(ya)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=o,this.latestValues=a,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,o&&this.root.registerPotentialNode(o,this);for(let f=0;fthis.root.updateBlockedByResize=!1;n(o,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=ZF(p,250),ef.hasAnimatedSinceResize&&(ef.hasAnimatedSinceResize=!1,this.nodes.forEach(RE))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&h&&(l||f)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:p,hasRelativeTargetChanged:v,layout:y})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const _=this.options.transition||h.getDefaultTransition()||h4,{onLayoutAnimationStart:M,onLayoutAnimationComplete:m}=h.getProps(),S=!this.targetLayout||!Tx(this.targetLayout,y)||v,w=!p&&v;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||w||p&&(S||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,w);const A={...s3(_,"layout"),onPlay:M,onComplete:m};(h.shouldReduceMotion||this.options.layoutRoot)&&(A.delay=0,A.type=!1),this.startAnimation(A)}else!p&&this.animationProgress===0&&RE(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=y})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,zs(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(l4),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let h=0;h{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{const b=A/1e3;IE(d.x,o.x,b),IE(d.y,o.y,b),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(sf(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),c4(this.relativeTarget,this.relativeTargetOrigin,p,b),w&&Tx(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=wn()),or(w,this.relativeTarget)),_&&(this.animationValues=h,BF(h,f,this.latestValues,b,S,m)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=b},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(zs(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=nn.update(()=>{ef.hasAnimatedSinceResize=!0,this.currentAnimation=QF(0,PE,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(PE),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:f,latestValues:h}=o;if(!(!a||!l||!f)){if(this!==o&&this.layout&&f&&_3(this.options.animationType,this.layout.layoutBox,f.layoutBox)){l=this.target||wn();const d=Yi(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+d;const p=Yi(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+p}or(a,l),ru(a,h),rf(this.projectionDeltaWithTransform,this.layoutCorrected,a,h)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new XF),this.sharedNodes.get(o).add(a);const f=a.options.initialPromotionConfig;a.promote({transition:f?f.transition:void 0,preserveFollowOpacity:f&&f.shouldPreserveFollowOpacity?f.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const f=this.getStack();f&&f.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(a=!0),!a)return;const f={};for(let h=0;h{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(LE),this.root.sharedNodes.clear()}}}function e4(n){n.updateLayout()}function t4(n){var e;const t=((e=n.resumeFrom)===null||e===void 0?void 0:e.snapshot)||n.snapshot;if(n.isLead()&&n.layout&&t&&n.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:r}=n.layout,{animationType:s}=n.options,o=t.source!==n.layout.source;s==="size"?Jr(d=>{const p=o?t.measuredBox[d]:t.layoutBox[d],v=Yi(p);p.min=i[d].min,p.max=p.min+v}):_3(s,t.layoutBox,i)&&Jr(d=>{const p=o?t.measuredBox[d]:t.layoutBox[d],v=Yi(i[d]);p.max=p.min+v,n.relativeTarget&&!n.currentAnimation&&(n.isProjectionDirty=!0,n.relativeTarget[d].max=n.relativeTarget[d].min+v)});const a=of();rf(a,i,t.layoutBox);const l=of();o?rf(l,n.applyTransform(r,!0),t.measuredBox):rf(l,i,t.layoutBox);const f=!y3(a);let h=!1;if(!n.resumeFrom){const d=n.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:p,layout:v}=d;if(p&&v){const y=wn();sf(y,t.layoutBox,p.layoutBox);const _=wn();sf(_,i,v.layoutBox),Tx(y,_)||(h=!0),d.options.layoutRoot&&(n.relativeTarget=_,n.relativeTargetOrigin=y,n.relativeParent=d)}}}n.notifyListeners("didUpdate",{layout:i,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:f,hasRelativeTargetChanged:h})}else if(n.isLead()){const{onExitComplete:i}=n.options;i&&i()}n.options.transition=void 0}function n4(n){ya.totalNodes++,n.parent&&(n.isProjecting()||(n.isProjectionDirty=n.parent.isProjectionDirty),n.isSharedProjectionDirty||(n.isSharedProjectionDirty=!!(n.isProjectionDirty||n.parent.isProjectionDirty||n.parent.isSharedProjectionDirty)),n.isTransformDirty||(n.isTransformDirty=n.parent.isTransformDirty))}function i4(n){n.isProjectionDirty=n.isSharedProjectionDirty=n.isTransformDirty=!1}function r4(n){n.clearSnapshot()}function LE(n){n.clearMeasurements()}function s4(n){const{visualElement:e}=n.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),n.resetTransform()}function RE(n){n.finishAnimation(),n.targetDelta=n.relativeTarget=n.target=void 0}function o4(n){n.resolveTargetDelta()}function a4(n){n.calcProjection()}function l4(n){n.resetRotation()}function u4(n){n.removeLeadSnapshot()}function IE(n,e,t){n.translate=en(e.translate,0,t),n.scale=en(e.scale,1,t),n.origin=e.origin,n.originPoint=e.originPoint}function DE(n,e,t,i){n.min=en(e.min,t.min,i),n.max=en(e.max,t.max,i)}function c4(n,e,t,i){DE(n.x,e.x,t.x,i),DE(n.y,e.y,t.y,i)}function f4(n){return n.animationValues&&n.animationValues.opacityExit!==void 0}const h4={duration:.45,ease:[.4,0,.1,1]};function d4(n,e){let t=n.root;for(let s=n.path.length-1;s>=0;s--)if(n.path[s].instance){t=n.path[s];break}const r=(t&&t!==n.root?t.instance:document).querySelector(`[data-projection-id="${e}"]`);r&&n.mount(r,!0)}function kE(n){n.min=Math.round(n.min),n.max=Math.round(n.max)}function p4(n){kE(n.x),kE(n.y)}function _3(n,e,t){return n==="position"||n==="preserve-aspect"&&!Mx(bE(e),bE(t),.2)}const m4=x3({attachResizeListener:(n,e)=>Cs(n,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Pv={current:void 0},S3=x3({measureScroll:n=>({x:n.scrollLeft,y:n.scrollTop}),defaultParent:()=>{if(!Pv.current){const n=new m4(0,{});n.mount(window),n.setOptions({layoutScroll:!0}),Pv.current=n}return Pv.current},resetTransform:(n,e)=>{n.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:n=>window.getComputedStyle(n).position==="fixed"}),g4={pan:{Feature:kF},drag:{Feature:DF,ProjectionNode:S3,MeasureLayout:m3}},v4=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function y4(n){const e=v4.exec(n);if(!e)return[,];const[,t,i]=e;return[t,i]}function Cx(n,e,t=1){const[i,r]=y4(n);if(!i)return;const s=window.getComputedStyle(e).getPropertyValue(i);return s?s.trim():mx(r)?Cx(r,e,t+1):r}function x4(n,{...e},t){const i=n.current;if(!(i instanceof Element))return{target:e,transitionEnd:t};t&&(t={...t}),n.values.forEach(r=>{const s=r.get();if(!mx(s))return;const o=Cx(s,i);o&&r.set(o)});for(const r in e){const s=e[r];if(!mx(s))continue;const o=Cx(s,i);o&&(e[r]=o,t||(t={}),t[r]===void 0&&(t[r]=s))}return{target:e,transitionEnd:t}}const _4=new Set(["width","height","top","left","right","bottom","x","y"]),w3=n=>_4.has(n),S4=n=>Object.keys(n).some(w3),NE=n=>n===$a||n===it,OE=(n,e)=>parseFloat(n.split(", ")[e]),UE=(n,e)=>(t,{transform:i})=>{if(i==="none"||!i)return 0;const r=i.match(/^matrix3d\((.+)\)$/);if(r)return OE(r[1],e);{const s=i.match(/^matrix\((.+)\)$/);return s?OE(s[1],n):0}},w4=new Set(["x","y","z"]),M4=oh.filter(n=>!w4.has(n));function A4(n){const e=[];return M4.forEach(t=>{const i=n.getValue(t);i!==void 0&&(e.push([t,i.get()]),i.set(t.startsWith("scale")?1:0))}),e.length&&n.render(),e}const zE={width:({x:n},{paddingLeft:e="0",paddingRight:t="0"})=>n.max-n.min-parseFloat(e)-parseFloat(t),height:({y:n},{paddingTop:e="0",paddingBottom:t="0"})=>n.max-n.min-parseFloat(e)-parseFloat(t),top:(n,{top:e})=>parseFloat(e),left:(n,{left:e})=>parseFloat(e),bottom:({y:n},{top:e})=>parseFloat(e)+(n.max-n.min),right:({x:n},{left:e})=>parseFloat(e)+(n.max-n.min),x:UE(4,13),y:UE(5,14)},E4=(n,e,t)=>{const i=e.measureViewportBox(),r=e.current,s=getComputedStyle(r),{display:o}=s,a={};o==="none"&&e.setStaticValue("display",n.display||"block"),t.forEach(f=>{a[f]=zE[f](i,s)}),e.render();const l=e.measureViewportBox();return t.forEach(f=>{const h=e.getValue(f);h&&h.jump(a[f]),n[f]=zE[f](l,s)}),n},b4=(n,e,t={},i={})=>{e={...e},i={...i};const r=Object.keys(e).filter(w3);let s=[],o=!1;const a=[];if(r.forEach(l=>{const f=n.getValue(l);if(!n.hasValue(l))return;let h=t[l],d=Sc(h);const p=e[l];let v;if(km(p)){const y=p.length,_=p[0]===null?1:0;h=p[_],d=Sc(h);for(let M=_;M=0?window.pageYOffset:null,f=E4(e,n,a);return s.length&&s.forEach(([h,d])=>{n.getValue(h).set(d)}),n.render(),fg&&l!==null&&window.scrollTo({top:l}),{target:f,transitionEnd:i}}else return{target:e,transitionEnd:i}};function T4(n,e,t,i){return S4(e)?b4(n,e,t,i):{target:e,transitionEnd:i}}const C4=(n,e,t,i)=>{const r=x4(n,e,i);return e=r.target,i=r.transitionEnd,T4(n,e,t,i)},Px={current:null},M3={current:!1};function P4(){if(M3.current=!0,!!fg)if(window.matchMedia){const n=window.matchMedia("(prefers-reduced-motion)"),e=()=>Px.current=n.matches;n.addListener(e),e()}else Px.current=!1}function L4(n,e,t){const{willChange:i}=e;for(const r in e){const s=e[r],o=t[r];if(Ri(s))n.addValue(r,s),zm(i)&&i.add(r);else if(Ri(o))n.addValue(r,Cu(s,{owner:n})),zm(i)&&i.remove(r);else if(o!==s)if(n.hasValue(r)){const a=n.getValue(r);!a.hasAnimated&&a.set(s)}else{const a=n.getStaticValue(r);n.addValue(r,Cu(a!==void 0?a:s,{owner:n}))}}for(const r in t)e[r]===void 0&&n.removeValue(r);return e}const FE=new WeakMap,A3=Object.keys(Lf),R4=A3.length,BE=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],I4=M1.length;class D4{constructor({parent:e,props:t,presenceContext:i,reducedMotionConfig:r,visualState:s},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>nn.render(this.render,!1,!0);const{latestValues:a,renderState:l}=s;this.latestValues=a,this.baseTarget={...a},this.initialValues=t.initial?{...a}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=i,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=o,this.isControllingVariants=dg(t),this.isVariantNode=uP(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:f,...h}=this.scrapeMotionValuesFromProps(t,{});for(const d in h){const p=h[d];a[d]!==void 0&&Ri(p)&&(p.set(a[d],!1),zm(f)&&f.add(d))}}scrapeMotionValuesFromProps(e,t){return{}}mount(e){this.current=e,FE.set(e,this),this.projection&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,i)=>this.bindToMotionValue(i,t)),M3.current||P4(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Px.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){FE.delete(this.current),this.projection&&this.projection.unmount(),zs(this.notifyUpdate),zs(this.render),this.valueSubscriptions.forEach(e=>e()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features)this.features[e].unmount();this.current=null}bindToMotionValue(e,t){const i=Qa.has(e),r=t.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&nn.update(this.notifyUpdate,!1,!0),i&&this.projection&&(this.projection.isTransformDirty=!0)}),s=t.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{r(),s()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...t},i,r,s,o){let a,l;for(let f=0;fthis.scheduleRender(),animationType:typeof h=="string"?h:"both",initialPromotionConfig:o,layoutScroll:v,layoutRoot:y})}return l}updateFeatures(){for(const e in this.features){const t=this.features[e];t.isMounted?t.update(this.props,this.prevProps):(t.mount(),t.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):wn()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}makeTargetAnimatable(e,t=!0){return this.makeTargetAnimatableFromInstance(e,this.props,t)}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let i=0;it.variantChildren.delete(e)}addValue(e,t){t!==this.values.get(e)&&(this.removeValue(e),this.bindToMotionValue(e,t)),this.values.set(e,t),this.latestValues[e]=t.get()}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let i=this.values.get(e);return i===void 0&&t!==void 0&&(i=Cu(t,{owner:this}),this.addValue(e,i)),i}readValue(e){return this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.readValueFromInstance(this.current,e,this.options)}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:i}=this.props,r=typeof i=="string"||typeof i=="object"?(t=R1(this.props,i))===null||t===void 0?void 0:t[e]:void 0;if(i&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,e);return s!==void 0&&!Ri(s)?s:this.initialValues[e]!==void 0&&r===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new V1),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class E3 extends D4{sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:i}){delete t[e],delete i[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:t,...i},{transformValues:r},s){let o=$z(i,e||{},this);if(r&&(t&&(t=r(t)),i&&(i=r(i)),o&&(o=r(o))),s){Kz(this,i,o);const a=C4(this,i,o,t);t=a.transitionEnd,i=a.target}return{transition:e,transitionEnd:t,...i}}}function k4(n){return window.getComputedStyle(n)}class N4 extends E3{readValueFromInstance(e,t){if(Qa.has(t)){const i=O1(t);return i&&i.default||0}else{const i=k4(e),r=(mP(t)?i.getPropertyValue(t):i[t])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return p3(e,t)}build(e,t,i,r){E1(e,t,i,r.transformTemplate)}scrapeMotionValuesFromProps(e,t){return L1(e,t)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Ri(e)&&(this.childSubscription=e.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}renderInstance(e,t,i,r){SP(e,t,i,r)}}class O4 extends E3{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Qa.has(t)){const i=O1(t);return i&&i.default||0}return t=wP.has(t)?t:P1(t),e.getAttribute(t)}measureInstanceViewportBox(){return wn()}scrapeMotionValuesFromProps(e,t){return AP(e,t)}build(e,t,i,r){T1(e,t,i,this.isSVGTag,r.transformTemplate)}renderInstance(e,t,i,r){MP(e,t,i,r)}mount(e){this.isSVGTag=C1(e.tagName),super.mount(e)}}const U4=(n,e)=>A1(n)?new O4(e,{enableHardwareAcceleration:!1}):new N4(e,{enableHardwareAcceleration:!0}),z4={layout:{ProjectionNode:S3,MeasureLayout:m3}},F4={...dF,...DU,...g4,...z4},Xn=VO((n,e)=>gU(n,e,F4,U4)),Yt={paddingX:"sm:px-16 px-6",paddingY:"sm:py-16 py-6",padding:"sm:px-16 px-6 sm:py-16 py-10",heroHeadText:"font-black text-[#373737] lg:text-[80px] sm:text-[60px] xs:text-[50px] text-[40px] lg:leading-[98px] mt-2",heroSubText:"text-[#dfd9ff] font-medium lg:text-[30px] sm:text-[26px] xs:text-[20px] text-[16px] lg:leading-[40px]",sectionHeadText:"text-black font-black md:text-[60px] sm:text-[50px] xs:text-[40px] text-[30px]",sectionSubText:"sm:text-[18px] text-[14px] text-secondary uppercase tracking-wider"},B4="/portfolio-react-threejs/assets/web-0c6824d5.webp",V4="/portfolio-react-threejs/assets/mobile-84df6906.webp",H4="/portfolio-react-threejs/assets/creator-ab86683b.webp",W4="/portfolio-react-threejs/assets/csi-1f769921.webp",G4="/portfolio-react-threejs/assets/msc-abe50c5d.webp",j4="/portfolio-react-threejs/assets/techyv-adede69e.webp",X4="/portfolio-react-threejs/assets/shapeout-d15c331a.webp",Y4="/portfolio-react-threejs/assets/facedetection-65dc0246.webp",q4="/portfolio-react-threejs/assets/Hi-783be2bb.webp",Z4="/portfolio-react-threejs/assets/langgo-41707292.webp",J4="/portfolio-react-threejs/assets/lifeoverseas-fd137d40.webp",K4="/portfolio-react-threejs/assets/velox-429d856c.webp",Q4="/portfolio-react-threejs/assets/yolo-9ff20b51.webp",$4="/portfolio-react-threejs/assets/anon_exchange-3f3d612c.webp",eB="/portfolio-react-threejs/assets/banana_class-8925bee5.webp",tB="/portfolio-react-threejs/assets/convogen-ba953cbd.webp",nB="/portfolio-react-threejs/assets/1-710ab004.webp",iB="/portfolio-react-threejs/assets/2-bd31252c.webp",rB="/portfolio-react-threejs/assets/3-da0bbfbc.webp",sB="/portfolio-react-threejs/assets/4-8d092131.webp",oB="/portfolio-react-threejs/assets/5-b3191ff5.webp",aB="/portfolio-react-threejs/assets/6-b412236c.webp",lB="/portfolio-react-threejs/assets/7-21761f9b.webp",uB="/portfolio-react-threejs/assets/8-b4888019.webp",cB="/portfolio-react-threejs/assets/9-22d557f1.webp",fB="/portfolio-react-threejs/assets/1-bc4e4556.webp",hB="/portfolio-react-threejs/assets/2-466546d5.webp",VE=[{id:"",title:"Home",type:"route"},{id:"projects",title:"Projects",type:"route"},{id:"skills",title:"Skills",type:"route"},{id:"certificate",title:"Certificates",type:"route"},{id:"resume",title:"Resume",type:"route"},{id:"blogs",title:"Blogs",type:"route"},{id:"contact",title:"Contact",type:"route"},{id:"freetools",title:"Free Tools",type:"tools"}],dB=[{id:"downloadtube",title:"DownloadTube (Youtube Downloader)",type:"video",url:"https://downloadtube-iota.vercel.app/"}],pB=[{title:"Full Stack Web Development",icon:B4},{title:"Designing",icon:H4},{title:"ML and DL Learner",icon:V4}],mB=[{title:"Content Writer",company_name:"Techyv",icon:j4,iconBg:"white",date:"October 2023 - Ongoing",points:["Writing proffesional articles related to IT.","Ensuring use of no AI content in articles.","Creating articles on real facts and data."]},{title:"Technical member",company_name:"Microsoft Student Chapter",icon:G4,iconBg:"black",date:"October 2022 - March 2023",points:["Maintaining the website and ensuring that it is up-to-date and functioning properly.","Collaborating with other members of the chapter to identify areas for improvement on the website.","Implementing changes and updates to the website using programming languages such as React.js, tailwind and JavaScript.","Debugging any issues or errors that arise on the website and working to resolve them."]},{title:"V open source member",company_name:"CSI Chapter",icon:W4,iconBg:"white",date:"Augest 2021 - June 2022",points:["Conducting regular meetings to discuss open source projects and new initiatives.","Conducting workshops and training sessions to help members learn more about open source technologies.","Coordinating with other teams within the CSI chapter to ensure smooth execution of events."]}],gB=[{name:"ConvoGen AI",description:"'ConvoGen' is the virtual embodiment of me, a chatbot that offers lifelike insights and information about my experiences, interests, and personality. Engage in conversations that feel as real as speaking with me in person, as 'ConvoGen' shares a wealth of personal details and knowledge, creating a truly immersive and authentic chatbot experience.",tags:[{name:"T5 model",color:"blue-text-gradient"},{name:"Transformer",color:"green-text-gradient"},{name:"Colab",color:"pink-text-gradient"}],image:tB,source_code_link:"https://colab.research.google.com/drive/1a6LATySYKaS8qqfk_4maSaV4guvTRA-8?usp=sharing",date:"October 2023",link_type:"colab"},{name:"Anon Exchange - Anonymous chatting app",description:"An innovative anonymous chatting app that redefines digital interactions. This project empowers strangers to connect seamlessly, engaging in candid conversations without the constraints of identity. What sets us apart is our commitment to privacy, allowing users to create exclusive private chat rooms for confidential discussions.",tags:[{name:"vitejs",color:"blue-text-gradient"},{name:"supabase",color:"green-text-gradient"},{name:"tailwind CSS",color:"pink-text-gradient"}],image:$4,source_code_link:"https://github.com/bedead/Anon-Exchange-chatting",date:"August 2023",link_type:"github"},{name:"Banana disease classification",description:"Banana disease classification is a project that uses a YOLOv8 deep learning model to detect and identify various diseases affecting banana plants. The project is based on a custom dataset of images of banana leaves with different types of infections. The project aims to provide a fast and accurate diagnosis of banana diseases, which can help farmers and researchers to prevent crop losses and improve banana production.",tags:[{name:"YOLOv8",color:"green-text-gradient"},{name:"Colab",color:"pink-text-gradient"}],image:eB,source_code_link:"https://colab.research.google.com/drive/1TLumA28dCY-9_lzouIJtt2CsCjONGdNy?usp=sharing",date:"August 2023",link_type:"colab"},{name:"PATENT - CLASSIFICATION OF LUNG CANCER USING DEEP LEARNING TECHNIQUES.",description:"Application No - 202341039647 The model is based on a YOLOv8 (Deep learning Neural network architecture) and is trained on the publicly available dataset, which consists of lung CT scans of patients with and without lung cancer.",tags:[{name:"Gradio",color:"blue-text-gradient"},{name:"YOLO",color:"green-text-gradient"},{name:"Roboflow",color:"pink-text-gradient"}],image:Q4,source_code_link:"https://github.com/bedead/lung-cancer-classification-yoloV8---gradio.git",date:"June 2023",link_type:"huggingface"},{name:"Face Detection",description:"'FACE-DETECTOR' is a GitHub repository showcasing an OpenCV project for detecting human faces using a cascade classifier. The project utilizes the OpenCV library, which is a popular computer vision library in Python, to detect human faces in images or video streams.",tags:[{name:"Cascade classifier",color:"blue-text-gradient"},{name:"Python",color:"green-text-gradient"},{name:"OpenCV",color:"pink-text-gradient"}],image:Y4,source_code_link:"https://github.com/bedead/FACE-DETECTOR.git",date:"Feb 2023",link_type:"github"},{name:"Life Overseas",description:"Life Overseas is a concept website that aims to provide students with valuable resources and information to successfully clear entrance exams for foreign colleges.",tags:[{name:"Flask",color:"blue-text-gradient"},{name:"Python",color:"green-text-gradient"}],image:J4,source_code_link:"https://github.com/bedead/Life-Overseas-webiste.git",date:"Jan 2023",link_type:"github"},{name:"Velox Todo",description:"Velox Todo is a Windows application built using JavaFX and JSON files. It is a task management tool designed to help users organize and prioritize their daily tasks efficiently.",tags:[{name:"Java",color:"blue-text-gradient"},{name:"JavaFX",color:"green-text-gradient"},{name:"JSON",color:"pink-text-gradient"}],image:K4,source_code_link:"https://github.com/bedead/Velox-Todo-Application.git",date:"Sep 2022",link_type:"github"},{name:"HI",description:"'HI' is a console-based conversational app written in Python. It utilizes various libraries such as pyinstaller, pyjokes, PyDictionary, platform, psutil, requests, getpass, pywhatkit, pyttsx3, speechrecognition, Wikipedia, Pyaudio, speedtest-cli, pyautogui, and py-cpuinfo to provide a wide range of functionalities.",tags:[{name:"Python",color:"blue-text-gradient"},{name:"JSON",color:"green-text-gradient"}],image:q4,source_code_link:"https://github.com/bedead/HI_2021.12.22.4.git",date:"Mar 2022",link_type:"github"},{name:"Lang go",description:"'Lang Go' is a language translation app that is built using the Kivy and KivyMD frameworks in Python. The app utilizes the TextBlob library for translation capabilities. With 'Lang Go', users can input text in one language and translate it to another language seamlessly.",tags:[{name:"Kivy",color:"blue-text-gradient"},{name:"Kivymd",color:"green-text-gradient"},{name:"textBlob",color:"pink-text-gradient"}],image:Z4,source_code_link:"https://github.com/bedead/kivymd-language-translation-app.git",date:"Mar 2022",link_type:"github"},{name:"Shape out",description:"'Shape Out' is a 2D platformer game available on Amazon, created using the Godot game engine. The game features intuitive controls, colorful graphics, and engaging gameplay that requires players to jump, run, and solve puzzles to progress through the levels.",tags:[{name:"Godot engine",color:"blue-text-gradient"},{name:"GD-script",color:"green-text-gradient"}],image:X4,source_code_link:"https://www.amazon.com/Bedead-Shape-Out-2d-platformer/dp/B0999LHBYN",date:"Aug 2021",link_type:"appstore"}],vB=[{name:"Basics of Machien Learing",image:nB},{name:"C++ Course",image:iB},{name:"Making a Webiste",image:rB},{name:"Java (Basics)",image:sB},{name:"Matlab Onramp",image:oB},{name:"MongoDB Tutorial",image:aB},{name:"Python (Basics)",image:lB},{name:"Responsive Web Design Course",image:uB},{name:"TensorFlow Python",image:cB}],yB=[{name:"Technical Member | CSI ",image:fB},{name:"Technical Member | MSC",image:hB}],xB=[{name:"",description:"",link:""},{name:"",description:"",link:""},{name:"",description:"",link:""}],_B="/portfolio-react-threejs/assets/logo-white-f51edd31.webp",SB="data:image/webp;base64,UklGRmQCAABXRUJQVlA4WAoAAAAwAAAAOwAAOwAASUNDUMgBAAAAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADZBTFBIPwAAAAFHoJBtBOime96H8WhEROhZb4CaSFYrLDAowA0OUIAD/DffJB2TJqL/AoIiF6yAJSV4nAc6xy/oOftIb+woAABWUDggLgAAAJADAJ0BKjwAPAA+bTaYSSQjIqEiCACADYlpAAAQN1NQBXiFuQAA/vucwAAAAAA=",wB="data:image/webp;base64,UklGRvwCAABXRUJQVlA4WAoAAAAwAAAALwAALwAASUNDUMgBAAAAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADZBTFBI2wAAAAF3oKCNFDb4bDxgYMkjIgJHTaxUSfkkcBTJtqu8T84gJEpAwheABSQkIVEIq7R9a7KCV9fDr3duIK4j+s/IbSRFteDDwEL9wv2lo6Ml4bmW5Yx2LFuayjlSHbMnX5SSBupihiFD9llir3CgZ1kYDzTJ3kFCU0RWRlZBUkNShavDNYBaiBpKPpEPNHbOBNMwbBnHf5bVaQj8s1jnu6bgL451auP4i+PPNol1WsQ6TerwAhGDOrxvjqoF7FtC0cKefFFKGqiLWcS+ZarsDc4wLgwv+Rt0tC4S948OBwBWUDggKgAAADADAJ0BKjAAMAA+bTaYSKQjIqEjiACADYlpAAAbgb0+DgAA/vucwAAAAA==",yg=n=>({hidden:{y:-50,opacity:0},show:{y:0,opacity:1,transition:{type:"spring",duration:1.25,delay:n}}}),ch=(n,e,t,i)=>({hidden:{x:n==="left"?100:n==="right"?-100:0,y:n==="up"?100:n==="down"?-100:0,opacity:0},show:{x:0,y:0,opacity:1,transition:{type:e,delay:t,duration:i,ease:"easeOut"}}}),MB=(n,e,t,i)=>({hidden:{x:n==="left"?"-100%":n==="right"?"100%":0,y:n==="up"||n==="down"?"100%":0},show:{x:0,y:0,transition:{type:e,delay:t,duration:i,ease:"easeOut"}}}),AB=(n,e)=>({hidden:{},show:{transition:{staggerChildren:n,delayChildren:e||0}}}),Gs=()=>{const[n,e]=V.useState(""),[t,i]=V.useState(!1),[r,s]=V.useState(!1);return F.jsx("nav",{className:`${Yt.paddingX} w-full flex items-center py-5 fixed top-0 z-20 bg-gradient-to-b from-white to-primary`,children:F.jsxs("div",{className:"w-full flex justify-between items-center max-w-7xl mx-auto",children:[F.jsxs(vv,{to:"/",className:"flex items-center gap-2",onClick:()=>{e(""),window.scrollTo(0,0)},children:[F.jsx("img",{src:_B,className:"w-10 h-10 object-contain",alt:"logo"}),F.jsxs("div",{className:" md:block lg:flex ",children:[F.jsx("p",{className:"text-black text-[18px] flex",children:"Satyam Mishra  "}),F.jsx("span",{className:"text-[18px] sm:block hidden",children:"| Bedead"})]})]}),F.jsxs("ul",{className:"list-none hidden sm:flex flex-row md:gap-4 items-center",children:[VE.map(o=>F.jsx("li",{className:o.type=="tools"?"bg-black text-white hover:text-white-100 hover:bg-secondary py-2 px-3 rounded-xl text-[18px] font-medium cursor-pointer":`${n==o.title?"text-black":"text-secondary"} + hover:text-black hover:underline underline-offset-8 text-[18px] font-medium cursor-pointer`,onClick:()=>{e(o.title),o.type=="tools"&&s(!r)},children:o.type=="tools"?o.title:F.jsxs(vv,{to:`/${o.id}`,children:[o.title," "]})},o.id))," "]}),F.jsx("div",{className:`${r?"flex":"hidden"} p-6 bg-gradient-to-r from-[#f6f6f6] to-white absolute + top-60 right-40 sm:top-20 sm:right-5 mx-4 my-2 min-w-[140px] z-10 rounded-xl outline`,children:F.jsxs("ul",{className:"list-none flex justify-end items-start flex-col gap-2",children:[dB.map(o=>F.jsx(Xn.li,{variants:ch("right","spring",.1,.75),className:`${n==o.title?"text-black":"text-secondary"} font-poppins hover:underline underline-offset-8 font-medium cursor-pointer text-[16px] hover:text-black`,onClick:()=>{s(!r),e(o.title),window.open(o.url,"_blank")},children:o.title},o.id))," "]})}),F.jsxs("div",{className:"sm:hidden flex flex-1 justify-end items-center",children:[F.jsx("img",{src:t?wB:SB,alt:"menu",className:"w-[28px] h-[28px] object-contain cursor-pointer",onClick:()=>i(!t)}),F.jsx("div",{className:`${t?"flex":"hidden"} p-6 bg-gradient-to-r from-[#f6f6f6] to-white absolute + top-20 right-0 mx-4 my-2 min-w-[140px] z-10 rounded-xl outline`,children:F.jsxs("ul",{className:"list-none flex justify-end items-start flex-col gap-2",children:[VE.map(o=>F.jsx("li",{className:`${n==o.title?"text-black":"text-secondary"} font-poppins hover:underline underline-offset-8 font-medium cursor-pointer text-[16px] hover:text-black`,onClick:()=>{o.type!="tools"&&i(!t),e(o.title),o.type=="tools"&&s(!r)},children:o.type=="tools"?o.title:F.jsxs(vv,{to:`/${o.id}`,children:[o.title," "]})},o.id))," "]})})]})]})})},EB=()=>{const n="Hi, I'm Satyam";return F.jsxs("section",{className:"relative w-full h-screen mx-auto overflow-hidden",children:[F.jsxs("div",{className:`${Yt.paddingX} flex absolute z-10 inset-0 top-[120px] items-start gap-5`,children:[F.jsxs("div",{className:"flex flex-col justify-center items-center mt-5",children:[F.jsx("div",{className:"w-5 h-5 rounded-full bg-[#373737] "}),F.jsx("div",{className:"w-1 sm:h-80 h-40 violet-gradient"})]}),F.jsxs("div",{children:[F.jsx("h1",{className:`${Yt.heroHeadText} funky-text-outline-2 `,children:n}),F.jsxs("div",{children:[F.jsx("p",{className:`${Yt.heroSubText} funky-text-outline mt-2 text-black-100`,children:"I'm a computer science student with simple and dumb mind."}),F.jsx("p",{className:`${Yt.sectionSubText} mt-2 text-gray-600`,children:"This is just a website showcasing some of my works and experiments. Have a look untill you get bored 🥱"})]})]})]}),F.jsx("div",{className:"absolute z-10 xs:bottom-10 bottom-32 w-full flex justify-center items-center",children:F.jsx("a",{href:"#about",children:F.jsx("div",{className:"w-[35px] h-[64px] rounded-3xl border-4 border-[#373737] flex justify-center items-start p-2 ",children:F.jsx(Xn.div,{animate:{y:[0,24,0]},transition:{duration:1.5,repeat:1/0,repeatType:"loop"},className:"w-3 h-3 rounded-full bg-secondary mb-2"})})})})]})};var bB=Object.defineProperty,TB=Object.defineProperties,CB=Object.getOwnPropertyDescriptors,HE=Object.getOwnPropertySymbols,PB=Object.prototype.hasOwnProperty,LB=Object.prototype.propertyIsEnumerable,WE=(n,e,t)=>e in n?bB(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Mc=(n,e)=>{for(var t in e||(e={}))PB.call(e,t)&&WE(n,t,e[t]);if(HE)for(var t of HE(e))LB.call(e,t)&&WE(n,t,e[t]);return n},Ac=(n,e)=>TB(n,CB(e)),xg=class extends V.Component{constructor(n){super(n),this.ref=$f.createRef(),this.state={style:{}};const e={reverse:!1,max:35,perspective:1e3,easing:"cubic-bezier(.03,.98,.52,.99)",scale:"1.1",speed:"1000",transition:!0,axis:null,reset:!0};this.width=null,this.height=null,this.left=null,this.top=null,this.transitionTimeout=null,this.updateCall=null,this.element=null,this.settings=Object.assign({},e,this.props.options),this.reverse=this.settings.reverse?-1:1,this.onMouseEnter=this.onMouseEnter.bind(this,this.props.onMouseEnter),this.onMouseMove=this.onMouseMove.bind(this,this.props.onMouseMove),this.onMouseLeave=this.onMouseLeave.bind(this,this.props.onMouseLeave)}componentDidMount(){this.element=this.ref.current,setTimeout(()=>{this.element.parentElement.querySelector(":hover")===this.element&&this.onMouseEnter()},0)}componentWillUnmount(){clearTimeout(this.transitionTimeout),cancelAnimationFrame(this.updateCall)}onMouseEnter(n=()=>{},e){return this.updateElementPosition(),this.setState(Object.assign({},this.state,{style:Ac(Mc({},this.state.style),{willChange:"transform"})})),this.setTransition(),n(e)}reset(){window.requestAnimationFrame(()=>{this.setState(Object.assign({},this.state,{style:Ac(Mc({},this.state.style),{transform:`perspective(${this.settings.perspective}px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)`})}))})}onMouseMove(n=()=>{},e){return e.persist(),this.updateCall!==null&&window.cancelAnimationFrame(this.updateCall),this.event=e,this.updateCall=requestAnimationFrame(this.update.bind(this,e)),n(e)}setTransition(){clearTimeout(this.transitionTimeout),this.setState(Object.assign({},this.state,{style:Ac(Mc({},this.state.style),{transition:`${this.settings.speed}ms ${this.settings.easing}`})})),this.transitionTimeout=setTimeout(()=>{this.setState(Object.assign({},this.state,{style:Ac(Mc({},this.state.style),{transition:""})}))},this.settings.speed)}onMouseLeave(n=()=>{},e){return this.setTransition(),this.settings.reset&&this.reset(),n(e)}getValues(n){const e=(n.nativeEvent.clientX-this.left)/this.width,t=(n.nativeEvent.clientY-this.top)/this.height,i=Math.min(Math.max(e,0),1),r=Math.min(Math.max(t,0),1),s=(this.reverse*(this.settings.max/2-i*this.settings.max)).toFixed(2),o=(this.reverse*(r*this.settings.max-this.settings.max/2)).toFixed(2),a=i*100,l=r*100;return{tiltX:s,tiltY:o,percentageX:a,percentageY:l}}updateElementPosition(){const n=this.element.getBoundingClientRect();this.width=this.element.offsetWidth,this.height=this.element.offsetHeight,this.left=n.left,this.top=n.top}update(n){const e=this.getValues(n);this.setState(Object.assign({},this.state,{style:Ac(Mc({},this.state.style),{transform:`perspective(${this.settings.perspective}px) rotateX(${this.settings.axis==="x"?0:e.tiltY}deg) rotateY(${this.settings.axis==="y"?0:e.tiltX}deg) scale3d(${this.settings.scale}, ${this.settings.scale}, ${this.settings.scale})`})})),this.updateCall=null}render(){const n=Object.assign({},this.props.style,this.state.style);return F.jsx("div",{style:n,ref:this.ref,className:this.props.className,onMouseEnter:this.onMouseEnter,onMouseMove:this.onMouseMove,onMouseLeave:this.onMouseLeave,children:this.props.children})}};const fh=(n,e)=>function(){return F.jsxs(Xn.section,{variants:AB(),initial:"hidden",whileInView:"show",viewport:{once:!0,amount:.25},className:`${Yt.padding} max-w-7xl mx-auto relative z-0`,children:[F.jsx("span",{className:"hash-span",id:e,children:" "}),F.jsx(n,{})]})},RB=({index:n,title:e,icon:t})=>F.jsx(xg,{className:"xs:w-[250px] w-full ",children:F.jsx(Xn.div,{variants:ch("right","spring",.5*n,.75),className:" w-full green-pink-gradient p-[1px] rounded-[20px] shadow-[#fcd4d4] shadow-card ",children:F.jsxs("div",{options:{max:45,scale:1,speed:450},className:"bg-primary rounded-[20px] py-5 px-12 min-h-[280px] flex justify-evenly items-center flex-col ",children:[F.jsx("img",{src:t,alt:e,className:"w-16 h-16 object-contain"}),F.jsxs("h3",{className:"text-black text-[20px] font-bold text-center ",children:[e," "]})]})})}),IB=()=>F.jsxs(F.Fragment,{children:[F.jsxs(Xn.div,{variants:yg(0),children:[F.jsx("h2",{className:`${Yt.sectionHeadText} text-center`,children:"Overview."}),F.jsx("p",{className:`${Yt.sectionSubText} text-center`,children:"Introduction?"})]}),F.jsx(Xn.p,{variants:ch("","",.1,1),className:"mt-4 text-secondary text-center text-[17px] max-w-full leading-[30px] ",children:"I am a full stack web developer, graphic designer, and machine learning enthusiast. I have experience in creating dynamic and responsive websites using HTML, CSS, JavaScript, and other frameworks. I also have a passion for designing graphics that are eye-catching and appealing. I am always eager to learn new skills and technologies in the field of machine learning and deep learning. I have completed several projects and courses on various topics such as computer vision, and natural language processing."}),F.jsxs("div",{className:"mt-20 flex flex-wrap justify-center gap-10",children:[pB.map((n,e)=>F.jsx(RB,{index:e,...n},n.title))," "]})]}),DB=fh(IB,"about");var _g={},b3={exports:{}},kB="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",NB=kB,OB=NB;function T3(){}function C3(){}C3.resetWarningCache=T3;var UB=function(){function n(i,r,s,o,a,l){if(l!==OB){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}n.isRequired=n;function e(){return n}var t={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:e,element:n,elementType:n,instanceOf:e,node:n,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:C3,resetWarningCache:T3};return t.PropTypes=t,t};b3.exports=UB();var P3=b3.exports,L3={exports:{}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames -*/(function(n){(function(){var e={}.hasOwnProperty;function t(){for(var i=[],r=0;r(typeof window=="object"&&document.documentElement.style.setProperty("--line-color",i),zB.default.createElement("div",{className:(0,FB.default)(e,"vertical-timeline",{"vertical-timeline--animate":n,"vertical-timeline--two-columns":t==="2-columns","vertical-timeline--one-column-left":t==="1-column"||t==="1-column-left","vertical-timeline--one-column-right":t==="1-column-right"})},r));I3.propTypes={children:no.default.oneOfType([no.default.arrayOf(no.default.node),no.default.node]).isRequired,className:no.default.string,animate:no.default.bool,layout:no.default.oneOf(["1-column-left","1-column","2-columns","1-column-right"]),lineColor:no.default.string};var BB=I3;Sg.default=BB;var wg={};function Lx(){return Lx=Object.assign||function(n){for(var e=1;e=0)&&(t[r]=n[r]);return t}var Ix=new Map,qd=new WeakMap,GE=0,D3=void 0;function WB(n){D3=n}function GB(n){return n?(qd.has(n)||(GE+=1,qd.set(n,GE.toString())),qd.get(n)):"0"}function jB(n){return Object.keys(n).sort().filter(function(e){return n[e]!==void 0}).map(function(e){return e+"_"+(e==="root"?GB(n.root):n[e])}).toString()}function XB(n){var e=jB(n),t=Ix.get(e);if(!t){var i=new Map,r,s=new IntersectionObserver(function(o){o.forEach(function(a){var l,f=a.isIntersecting&&r.some(function(h){return a.intersectionRatio>=h});n.trackVisibility&&typeof a.isVisible>"u"&&(a.isVisible=f),(l=i.get(a.target))==null||l.forEach(function(h){h(f,a)})})},n);r=s.thresholds||(Array.isArray(n.threshold)?n.threshold:[n.threshold||0]),t={id:e,observer:s,elements:i},Ix.set(e,t)}return t}function W1(n,e,t,i){if(t===void 0&&(t={}),i===void 0&&(i=D3),typeof window.IntersectionObserver>"u"&&i!==void 0){var r=n.getBoundingClientRect();return e(i,{isIntersecting:i,target:n,intersectionRatio:typeof t.threshold=="number"?t.threshold:0,time:0,boundingClientRect:r,intersectionRect:r,rootBounds:r}),function(){}}var s=XB(t),o=s.id,a=s.observer,l=s.elements,f=l.get(n)||[];return l.has(n)||l.set(n,f),f.push(e),a.observe(n),function(){f.splice(f.indexOf(e),1),f.length===0&&(l.delete(n),a.unobserve(n)),l.size===0&&(a.disconnect(),Ix.delete(o))}}var YB=["children","as","triggerOnce","threshold","root","rootMargin","onChange","skip","trackVisibility","delay","initialInView","fallbackInView"];function jE(n){return typeof n.children!="function"}var Bm=function(n){VB(e,n);function e(i){var r;return r=n.call(this,i)||this,r.node=null,r._unobserveCb=null,r.handleNode=function(s){r.node&&(r.unobserve(),!s&&!r.props.triggerOnce&&!r.props.skip&&r.setState({inView:!!r.props.initialInView,entry:void 0})),r.node=s||null,r.observeNode()},r.handleChange=function(s,o){s&&r.props.triggerOnce&&r.unobserve(),jE(r.props)||r.setState({inView:s,entry:o}),r.props.onChange&&r.props.onChange(s,o)},r.state={inView:!!i.initialInView,entry:void 0},r}var t=e.prototype;return t.componentDidUpdate=function(r){(r.rootMargin!==this.props.rootMargin||r.root!==this.props.root||r.threshold!==this.props.threshold||r.skip!==this.props.skip||r.trackVisibility!==this.props.trackVisibility||r.delay!==this.props.delay)&&(this.unobserve(),this.observeNode())},t.componentWillUnmount=function(){this.unobserve(),this.node=null},t.observeNode=function(){if(!(!this.node||this.props.skip)){var r=this.props,s=r.threshold,o=r.root,a=r.rootMargin,l=r.trackVisibility,f=r.delay,h=r.fallbackInView;this._unobserveCb=W1(this.node,this.handleChange,{threshold:s,root:o,rootMargin:a,trackVisibility:l,delay:f},h)}},t.unobserve=function(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)},t.render=function(){if(!jE(this.props)){var r=this.state,s=r.inView,o=r.entry;return this.props.children({inView:s,entry:o,ref:this.handleNode})}var a=this.props,l=a.children,f=a.as,h=HB(a,YB);return V.createElement(f||"div",Lx({ref:this.handleNode},h),l)},e}(V.Component);Bm.displayName="InView";Bm.defaultProps={threshold:0,triggerOnce:!1,initialInView:!1};function qB(n){var e=n===void 0?{}:n,t=e.threshold,i=e.delay,r=e.trackVisibility,s=e.rootMargin,o=e.root,a=e.triggerOnce,l=e.skip,f=e.initialInView,h=e.fallbackInView,d=V.useRef(),p=V.useState({inView:!!f}),v=p[0],y=p[1],_=V.useCallback(function(m){d.current!==void 0&&(d.current(),d.current=void 0),!l&&m&&(d.current=W1(m,function(S,w){y({inView:S,entry:w}),w.isIntersecting&&a&&d.current&&(d.current(),d.current=void 0)},{root:o,rootMargin:s,threshold:t,trackVisibility:r,delay:i},h))},[Array.isArray(t)?t.toString():t,o,s,a,l,r,h,i]);V.useEffect(function(){!d.current&&v.entry&&!a&&!l&&y({inView:!!f})});var M=[_,v.inView,v.entry];return M.ref=M[0],M.inView=M[1],M.entry=M[2],M}const ZB=Object.freeze(Object.defineProperty({__proto__:null,InView:Bm,default:Bm,defaultFallbackInView:WB,observe:W1,useInView:qB},Symbol.toStringTag,{value:"Module"})),JB=nD(ZB);wg.__esModule=!0;wg.default=void 0;var io=G1(V),Jt=G1(P3),Zd=G1(R3),KB=JB;function G1(n){return n&&n.__esModule?n:{default:n}}const k3=({children:n="",className:e="",contentArrowStyle:t=null,contentStyle:i=null,date:r="",dateClassName:s="",icon:o=null,iconClassName:a="",iconOnClick:l=null,onTimelineElementClick:f=null,iconStyle:h=null,id:d="",position:p="",style:v=null,textClassName:y="",intersectionObserverProps:_={rootMargin:"0px 0px -40px 0px",triggerOnce:!0},visible:M=!1})=>io.default.createElement(KB.InView,_,({inView:m,ref:S})=>io.default.createElement("div",{ref:S,id:d,className:(0,Zd.default)(e,"vertical-timeline-element",{"vertical-timeline-element--left":p==="left","vertical-timeline-element--right":p==="right","vertical-timeline-element--no-children":n===""}),style:v},io.default.createElement(io.default.Fragment,null,io.default.createElement("span",{style:h,onClick:l,className:(0,Zd.default)(a,"vertical-timeline-element-icon",{"bounce-in":m||M,"is-hidden":!(m||M)})},o),io.default.createElement("div",{style:i,onClick:f,className:(0,Zd.default)(y,"vertical-timeline-element-content",{"bounce-in":m||M,"is-hidden":!(m||M)})},io.default.createElement("div",{style:t,className:"vertical-timeline-element-content-arrow"}),n,io.default.createElement("span",{className:(0,Zd.default)(s,"vertical-timeline-element-date")},r)))));k3.propTypes={children:Jt.default.oneOfType([Jt.default.arrayOf(Jt.default.node),Jt.default.node]),className:Jt.default.string,contentArrowStyle:Jt.default.shape({}),contentStyle:Jt.default.shape({}),date:Jt.default.node,dateClassName:Jt.default.string,icon:Jt.default.element,iconClassName:Jt.default.string,iconStyle:Jt.default.shape({}),iconOnClick:Jt.default.func,onTimelineElementClick:Jt.default.func,id:Jt.default.string,position:Jt.default.string,style:Jt.default.shape({}),textClassName:Jt.default.string,visible:Jt.default.bool,intersectionObserverProps:Jt.default.shape({root:Jt.default.object,rootMargin:Jt.default.string,threshold:Jt.default.number,triggerOnce:Jt.default.bool})};var QB=k3;wg.default=QB;var N3={VerticalTimeline:Sg.default,VerticalTimelineElement:wg.default};const $B=({experience:n})=>F.jsxs(N3.VerticalTimelineElement,{contentStyle:{background:"black",color:"black"},contentArrowStyle:{borderRight:"7px solid black"},date:n.date,iconStyle:{background:n.iconBg},icon:F.jsx("div",{className:"flex justify-center items-center w-full h-full",children:F.jsx("img",{src:n.icon,alt:n.company_name,className:"w-[75%] h-[75%] object-contain"})}),children:[F.jsxs("div",{children:[F.jsx("h3",{className:"text-[#fcd4d4] text-[24px] font-bold",children:n.title}),F.jsxs("p",{className:"text-white text-[16px] font-semibold",style:{margin:0},children:[n.company_name," "]})]}),F.jsxs("ul",{className:"mt-5 list-disc ml-5 space-y-2",children:[n.points.map((e,t)=>F.jsxs("li",{className:"text-white-100 text-[14px] pl-1 tracking-wider",children:[e," "]},`experience-point-${t}`))," "]})]}),e5=()=>F.jsxs(F.Fragment,{children:[F.jsxs(oi.div,{variants:xg(),children:[F.jsx("h2",{className:`${Yt.sectionHeadText} text-center`,children:"Work Experience."}),F.jsx("p",{className:`${Yt.sectionSubText} text-center`,children:"Where I have worked so far?"})]}),F.jsx("div",{className:"mt-20 flex flex-col",children:F.jsxs(N3.VerticalTimeline,{lineColor:"#373737",children:[oU.map((n,e)=>F.jsx($B,{experience:n},`experience-${e}`))," "]})})]}),t5=ch(e5,"work");/** +*/(function(n){(function(){var e={}.hasOwnProperty;function t(){for(var i=[],r=0;r(typeof window=="object"&&document.documentElement.style.setProperty("--line-color",i),zB.default.createElement("div",{className:(0,FB.default)(e,"vertical-timeline",{"vertical-timeline--animate":n,"vertical-timeline--two-columns":t==="2-columns","vertical-timeline--one-column-left":t==="1-column"||t==="1-column-left","vertical-timeline--one-column-right":t==="1-column-right"})},r));I3.propTypes={children:no.default.oneOfType([no.default.arrayOf(no.default.node),no.default.node]).isRequired,className:no.default.string,animate:no.default.bool,layout:no.default.oneOf(["1-column-left","1-column","2-columns","1-column-right"]),lineColor:no.default.string};var BB=I3;_g.default=BB;var Sg={};function Lx(){return Lx=Object.assign||function(n){for(var e=1;e=0)&&(t[r]=n[r]);return t}var Ix=new Map,qd=new WeakMap,GE=0,D3=void 0;function WB(n){D3=n}function GB(n){return n?(qd.has(n)||(GE+=1,qd.set(n,GE.toString())),qd.get(n)):"0"}function jB(n){return Object.keys(n).sort().filter(function(e){return n[e]!==void 0}).map(function(e){return e+"_"+(e==="root"?GB(n.root):n[e])}).toString()}function XB(n){var e=jB(n),t=Ix.get(e);if(!t){var i=new Map,r,s=new IntersectionObserver(function(o){o.forEach(function(a){var l,f=a.isIntersecting&&r.some(function(h){return a.intersectionRatio>=h});n.trackVisibility&&typeof a.isVisible>"u"&&(a.isVisible=f),(l=i.get(a.target))==null||l.forEach(function(h){h(f,a)})})},n);r=s.thresholds||(Array.isArray(n.threshold)?n.threshold:[n.threshold||0]),t={id:e,observer:s,elements:i},Ix.set(e,t)}return t}function W1(n,e,t,i){if(t===void 0&&(t={}),i===void 0&&(i=D3),typeof window.IntersectionObserver>"u"&&i!==void 0){var r=n.getBoundingClientRect();return e(i,{isIntersecting:i,target:n,intersectionRatio:typeof t.threshold=="number"?t.threshold:0,time:0,boundingClientRect:r,intersectionRect:r,rootBounds:r}),function(){}}var s=XB(t),o=s.id,a=s.observer,l=s.elements,f=l.get(n)||[];return l.has(n)||l.set(n,f),f.push(e),a.observe(n),function(){f.splice(f.indexOf(e),1),f.length===0&&(l.delete(n),a.unobserve(n)),l.size===0&&(a.disconnect(),Ix.delete(o))}}var YB=["children","as","triggerOnce","threshold","root","rootMargin","onChange","skip","trackVisibility","delay","initialInView","fallbackInView"];function jE(n){return typeof n.children!="function"}var Bm=function(n){VB(e,n);function e(i){var r;return r=n.call(this,i)||this,r.node=null,r._unobserveCb=null,r.handleNode=function(s){r.node&&(r.unobserve(),!s&&!r.props.triggerOnce&&!r.props.skip&&r.setState({inView:!!r.props.initialInView,entry:void 0})),r.node=s||null,r.observeNode()},r.handleChange=function(s,o){s&&r.props.triggerOnce&&r.unobserve(),jE(r.props)||r.setState({inView:s,entry:o}),r.props.onChange&&r.props.onChange(s,o)},r.state={inView:!!i.initialInView,entry:void 0},r}var t=e.prototype;return t.componentDidUpdate=function(r){(r.rootMargin!==this.props.rootMargin||r.root!==this.props.root||r.threshold!==this.props.threshold||r.skip!==this.props.skip||r.trackVisibility!==this.props.trackVisibility||r.delay!==this.props.delay)&&(this.unobserve(),this.observeNode())},t.componentWillUnmount=function(){this.unobserve(),this.node=null},t.observeNode=function(){if(!(!this.node||this.props.skip)){var r=this.props,s=r.threshold,o=r.root,a=r.rootMargin,l=r.trackVisibility,f=r.delay,h=r.fallbackInView;this._unobserveCb=W1(this.node,this.handleChange,{threshold:s,root:o,rootMargin:a,trackVisibility:l,delay:f},h)}},t.unobserve=function(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)},t.render=function(){if(!jE(this.props)){var r=this.state,s=r.inView,o=r.entry;return this.props.children({inView:s,entry:o,ref:this.handleNode})}var a=this.props,l=a.children,f=a.as,h=HB(a,YB);return V.createElement(f||"div",Lx({ref:this.handleNode},h),l)},e}(V.Component);Bm.displayName="InView";Bm.defaultProps={threshold:0,triggerOnce:!1,initialInView:!1};function qB(n){var e=n===void 0?{}:n,t=e.threshold,i=e.delay,r=e.trackVisibility,s=e.rootMargin,o=e.root,a=e.triggerOnce,l=e.skip,f=e.initialInView,h=e.fallbackInView,d=V.useRef(),p=V.useState({inView:!!f}),v=p[0],y=p[1],_=V.useCallback(function(m){d.current!==void 0&&(d.current(),d.current=void 0),!l&&m&&(d.current=W1(m,function(S,w){y({inView:S,entry:w}),w.isIntersecting&&a&&d.current&&(d.current(),d.current=void 0)},{root:o,rootMargin:s,threshold:t,trackVisibility:r,delay:i},h))},[Array.isArray(t)?t.toString():t,o,s,a,l,r,h,i]);V.useEffect(function(){!d.current&&v.entry&&!a&&!l&&y({inView:!!f})});var M=[_,v.inView,v.entry];return M.ref=M[0],M.inView=M[1],M.entry=M[2],M}const ZB=Object.freeze(Object.defineProperty({__proto__:null,InView:Bm,default:Bm,defaultFallbackInView:WB,observe:W1,useInView:qB},Symbol.toStringTag,{value:"Module"})),JB=nD(ZB);Sg.__esModule=!0;Sg.default=void 0;var io=G1(V),Jt=G1(P3),Zd=G1(R3),KB=JB;function G1(n){return n&&n.__esModule?n:{default:n}}const k3=({children:n="",className:e="",contentArrowStyle:t=null,contentStyle:i=null,date:r="",dateClassName:s="",icon:o=null,iconClassName:a="",iconOnClick:l=null,onTimelineElementClick:f=null,iconStyle:h=null,id:d="",position:p="",style:v=null,textClassName:y="",intersectionObserverProps:_={rootMargin:"0px 0px -40px 0px",triggerOnce:!0},visible:M=!1})=>io.default.createElement(KB.InView,_,({inView:m,ref:S})=>io.default.createElement("div",{ref:S,id:d,className:(0,Zd.default)(e,"vertical-timeline-element",{"vertical-timeline-element--left":p==="left","vertical-timeline-element--right":p==="right","vertical-timeline-element--no-children":n===""}),style:v},io.default.createElement(io.default.Fragment,null,io.default.createElement("span",{style:h,onClick:l,className:(0,Zd.default)(a,"vertical-timeline-element-icon",{"bounce-in":m||M,"is-hidden":!(m||M)})},o),io.default.createElement("div",{style:i,onClick:f,className:(0,Zd.default)(y,"vertical-timeline-element-content",{"bounce-in":m||M,"is-hidden":!(m||M)})},io.default.createElement("div",{style:t,className:"vertical-timeline-element-content-arrow"}),n,io.default.createElement("span",{className:(0,Zd.default)(s,"vertical-timeline-element-date")},r)))));k3.propTypes={children:Jt.default.oneOfType([Jt.default.arrayOf(Jt.default.node),Jt.default.node]),className:Jt.default.string,contentArrowStyle:Jt.default.shape({}),contentStyle:Jt.default.shape({}),date:Jt.default.node,dateClassName:Jt.default.string,icon:Jt.default.element,iconClassName:Jt.default.string,iconStyle:Jt.default.shape({}),iconOnClick:Jt.default.func,onTimelineElementClick:Jt.default.func,id:Jt.default.string,position:Jt.default.string,style:Jt.default.shape({}),textClassName:Jt.default.string,visible:Jt.default.bool,intersectionObserverProps:Jt.default.shape({root:Jt.default.object,rootMargin:Jt.default.string,threshold:Jt.default.number,triggerOnce:Jt.default.bool})};var QB=k3;Sg.default=QB;var N3={VerticalTimeline:_g.default,VerticalTimelineElement:Sg.default};const $B=({experience:n})=>F.jsxs(N3.VerticalTimelineElement,{contentStyle:{background:"black",color:"black"},contentArrowStyle:{borderRight:"7px solid black"},date:n.date,iconStyle:{background:n.iconBg},icon:F.jsx("div",{className:"flex justify-center items-center w-full h-full",children:F.jsx("img",{src:n.icon,alt:n.company_name,className:"w-[75%] h-[75%] object-contain"})}),children:[F.jsxs("div",{children:[F.jsx("h3",{className:"text-[#fcd4d4] text-[24px] font-bold",children:n.title}),F.jsxs("p",{className:"text-white text-[16px] font-semibold",style:{margin:0},children:[n.company_name," "]})]}),F.jsxs("ul",{className:"mt-5 list-disc ml-5 space-y-2",children:[n.points.map((e,t)=>F.jsxs("li",{className:"text-white-100 text-[14px] pl-1 tracking-wider",children:[e," "]},`experience-point-${t}`))," "]})]}),e5=()=>F.jsxs(F.Fragment,{children:[F.jsxs(Xn.div,{variants:yg(),children:[F.jsx("h2",{className:`${Yt.sectionHeadText} text-center`,children:"Work Experience."}),F.jsx("p",{className:`${Yt.sectionSubText} text-center`,children:"Where I have worked so far?"})]}),F.jsx("div",{className:"mt-20 flex flex-col",children:F.jsxs(N3.VerticalTimeline,{lineColor:"#373737",children:[mB.map((n,e)=>F.jsx($B,{experience:n},`experience-${e}`))," "]})})]}),t5=fh(e5,"work");/** * @license * Copyright 2010-2023 Three.js Authors * SPDX-License-Identifier: MIT - */const Mg="151",xa={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},_a={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},O3=0,Dx=1,U3=2,n5=3,i5=0,j1=1,X1=2,su=3,Fs=0,mi=1,Rr=2,r5=2,Ds=0,ka=1,kx=2,Nx=3,Ox=4,z3=5,wa=100,F3=101,B3=102,Ux=103,zx=104,V3=200,H3=201,W3=202,G3=203,Y1=204,q1=205,j3=206,X3=207,Y3=208,q3=209,Z3=210,J3=0,K3=1,Q3=2,Vm=3,$3=4,eL=5,tL=6,nL=7,fh=0,iL=1,rL=2,kr=0,sL=1,oL=2,aL=3,Z1=4,lL=5,Ag=300,Uo=301,zo=302,Df=303,kf=304,Bu=306,Nf=1e3,ii=1001,Of=1002,pn=1003,Hm=1004,s5=1004,af=1005,o5=1005,gn=1006,J1=1007,a5=1007,Fo=1008,l5=1008,Bo=1009,uL=1010,cL=1011,K1=1012,fL=1013,_o=1014,Ps=1015,Pu=1016,hL=1017,dL=1018,Na=1020,pL=1021,Vi=1023,mL=1024,gL=1025,Do=1026,ja=1027,vL=1028,yL=1029,xL=1030,_L=1031,SL=1033,Qp=33776,$p=33777,em=33778,tm=33779,Fx=35840,Bx=35841,Vx=35842,Hx=35843,wL=36196,Wx=37492,Gx=37496,jx=37808,Xx=37809,Yx=37810,qx=37811,Zx=37812,Jx=37813,Kx=37814,Qx=37815,$x=37816,e_=37817,t_=37818,n_=37819,i_=37820,r_=37821,nm=36492,ML=36283,s_=36284,o_=36285,a_=36286,AL=2200,EL=2201,bL=2202,Uf=2300,zf=2301,im=2302,Ca=2400,Pa=2401,Ff=2402,Eg=2500,Q1=2501,u5=0,c5=1,f5=2,Bs=3e3,zt=3001,TL=3200,CL=3201,Xo=0,PL=1,h5="",Cr="srgb",Lu="srgb-linear",$1="display-p3",d5=0,rm=7680,p5=7681,m5=7682,g5=7683,v5=34055,y5=34056,x5=5386,_5=512,S5=513,w5=514,M5=515,A5=516,E5=517,b5=518,LL=519,Bf=35044,T5=35048,C5=35040,P5=35045,L5=35049,R5=35041,I5=35046,D5=35050,k5=35042,N5="100",l_="300 es",Wm=1035;class rs{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});const i=this._listeners;i[e]===void 0&&(i[e]=[]),i[e].indexOf(t)===-1&&i[e].push(t)}hasEventListener(e,t){if(this._listeners===void 0)return!1;const i=this._listeners;return i[e]!==void 0&&i[e].indexOf(t)!==-1}removeEventListener(e,t){if(this._listeners===void 0)return;const r=this._listeners[e];if(r!==void 0){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}}dispatchEvent(e){if(this._listeners===void 0)return;const i=this._listeners[e.type];if(i!==void 0){e.target=this;const r=i.slice(0);for(let s=0,o=r.length;s>8&255]+ei[n>>16&255]+ei[n>>24&255]+"-"+ei[e&255]+ei[e>>8&255]+"-"+ei[e>>16&15|64]+ei[e>>24&255]+"-"+ei[t&63|128]+ei[t>>8&255]+"-"+ei[t>>16&255]+ei[t>>24&255]+ei[i&255]+ei[i>>8&255]+ei[i>>16&255]+ei[i>>24&255]).toLowerCase()}function cn(n,e,t){return Math.max(e,Math.min(t,n))}function eS(n,e){return(n%e+e)%e}function O5(n,e,t,i,r){return i+(n-e)*(r-i)/(t-e)}function U5(n,e,t){return n!==e?(t-n)/(e-n):0}function lf(n,e,t){return(1-t)*n+t*e}function z5(n,e,t,i){return lf(n,e,1-Math.exp(-t*i))}function F5(n,e=1){return e-Math.abs(eS(n,e*2)-e)}function B5(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*(3-2*n))}function V5(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*n*(n*(n*6-15)+10))}function H5(n,e){return n+Math.floor(Math.random()*(e-n+1))}function W5(n,e){return n+Math.random()*(e-n)}function G5(n){return n*(.5-Math.random())}function j5(n){n!==void 0&&(XE=n);let e=XE+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function X5(n){return n*Oa}function Y5(n){return n*Ru}function u_(n){return(n&n-1)===0&&n!==0}function RL(n){return Math.pow(2,Math.ceil(Math.log(n)/Math.LN2))}function IL(n){return Math.pow(2,Math.floor(Math.log(n)/Math.LN2))}function q5(n,e,t,i,r){const s=Math.cos,o=Math.sin,a=s(t/2),l=o(t/2),f=s((e+i)/2),h=o((e+i)/2),d=s((e-i)/2),p=o((e-i)/2),v=s((i-e)/2),y=o((i-e)/2);switch(r){case"XYX":n.set(a*h,l*d,l*p,a*f);break;case"YZY":n.set(l*p,a*h,l*d,a*f);break;case"ZXZ":n.set(l*d,l*p,a*h,a*f);break;case"XZX":n.set(a*h,l*y,l*v,a*f);break;case"YXY":n.set(l*v,a*h,l*y,a*f);break;case"ZYZ":n.set(l*y,l*v,a*h,a*f);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}function Wi(n,e){switch(e.constructor){case Float32Array:return n;case Uint16Array:return n/65535;case Uint8Array:return n/255;case Int16Array:return Math.max(n/32767,-1);case Int8Array:return Math.max(n/127,-1);default:throw new Error("Invalid component type.")}}function gt(n,e){switch(e.constructor){case Float32Array:return n;case Uint16Array:return Math.round(n*65535);case Uint8Array:return Math.round(n*255);case Int16Array:return Math.round(n*32767);case Int8Array:return Math.round(n*127);default:throw new Error("Invalid component type.")}}const DL={DEG2RAD:Oa,RAD2DEG:Ru,generateUUID:ji,clamp:cn,euclideanModulo:eS,mapLinear:O5,inverseLerp:U5,lerp:lf,damp:z5,pingpong:F5,smoothstep:B5,smootherstep:V5,randInt:H5,randFloat:W5,randFloatSpread:G5,seededRandom:j5,degToRad:X5,radToDeg:Y5,isPowerOfTwo:u_,ceilPowerOfTwo:RL,floorPowerOfTwo:IL,setQuaternionFromProperEuler:q5,normalize:gt,denormalize:Wi};class ye{constructor(e=0,t=0){ye.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,i=this.y,r=e.elements;return this.x=r[0]*t+r[3]*i+r[6],this.y=r[1]*t+r[4]*i+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(cn(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y;return t*t+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const i=Math.cos(t),r=Math.sin(t),s=this.x-e.x,o=this.y-e.y;return this.x=s*i-o*r+e.x,this.y=s*r+o*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Mt{constructor(){Mt.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1]}set(e,t,i,r,s,o,a,l,f){const h=this.elements;return h[0]=e,h[1]=r,h[2]=a,h[3]=t,h[4]=s,h[5]=l,h[6]=i,h[7]=o,h[8]=f,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],this}extractBasis(e,t,i){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,r=t.elements,s=this.elements,o=i[0],a=i[3],l=i[6],f=i[1],h=i[4],d=i[7],p=i[2],v=i[5],y=i[8],_=r[0],M=r[3],m=r[6],S=r[1],w=r[4],A=r[7],b=r[2],P=r[5],I=r[8];return s[0]=o*_+a*S+l*b,s[3]=o*M+a*w+l*P,s[6]=o*m+a*A+l*I,s[1]=f*_+h*S+d*b,s[4]=f*M+h*w+d*P,s[7]=f*m+h*A+d*I,s[2]=p*_+v*S+y*b,s[5]=p*M+v*w+y*P,s[8]=p*m+v*A+y*I,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],l=e[6],f=e[7],h=e[8];return t*o*h-t*a*f-i*s*h+i*a*l+r*s*f-r*o*l}invert(){const e=this.elements,t=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],l=e[6],f=e[7],h=e[8],d=h*o-a*f,p=a*l-h*s,v=f*s-o*l,y=t*d+i*p+r*v;if(y===0)return this.set(0,0,0,0,0,0,0,0,0);const _=1/y;return e[0]=d*_,e[1]=(r*f-h*i)*_,e[2]=(a*i-r*o)*_,e[3]=p*_,e[4]=(h*t-r*l)*_,e[5]=(r*s-a*t)*_,e[6]=v*_,e[7]=(i*l-f*t)*_,e[8]=(o*t-i*s)*_,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,i,r,s,o,a){const l=Math.cos(s),f=Math.sin(s);return this.set(i*l,i*f,-i*(l*o+f*a)+o+e,-r*f,r*l,-r*(-f*o+l*a)+a+t,0,0,1),this}scale(e,t){return this.premultiply(Lv.makeScale(e,t)),this}rotate(e){return this.premultiply(Lv.makeRotation(-e)),this}translate(e,t){return this.premultiply(Lv.makeTranslation(e,t)),this}makeTranslation(e,t){return this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,i,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,i=e.elements;for(let r=0;r<9;r++)if(t[r]!==i[r])return!1;return!0}fromArray(e,t=0){for(let i=0;i<9;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const Lv=new Mt;function kL(n){for(let e=n.length-1;e>=0;--e)if(n[e]>=65535)return!0;return!1}const Z5={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function ou(n,e){return new Z5[n](e)}function Vf(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}function xu(n){return n<.04045?n*.0773993808:Math.pow(n*.9478672986+.0521327014,2.4)}function Rv(n){return n<.0031308?n*12.92:1.055*Math.pow(n,.41666)-.055}const J5=new Mt().fromArray([.8224621,.0331941,.0170827,.177538,.9668058,.0723974,-1e-7,1e-7,.9105199]),K5=new Mt().fromArray([1.2249401,-.0420569,-.0196376,-.2249404,1.0420571,-.0786361,1e-7,0,1.0982735]);function Q5(n){return n.convertSRGBToLinear().applyMatrix3(K5)}function $5(n){return n.applyMatrix3(J5).convertLinearToSRGB()}const eV={[Lu]:n=>n,[Cr]:n=>n.convertSRGBToLinear(),[$1]:Q5},tV={[Lu]:n=>n,[Cr]:n=>n.convertLinearToSRGB(),[$1]:$5},Mi={enabled:!1,get legacyMode(){return console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),!this.enabled},set legacyMode(n){console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),this.enabled=!n},get workingColorSpace(){return Lu},set workingColorSpace(n){console.warn("THREE.ColorManagement: .workingColorSpace is readonly.")},convert:function(n,e,t){if(this.enabled===!1||e===t||!e||!t)return n;const i=eV[e],r=tV[t];if(i===void 0||r===void 0)throw new Error(`Unsupported color space conversion, "${e}" to "${t}".`);return r(i(n))},fromWorkingColorSpace:function(n,e){return this.convert(n,this.workingColorSpace,e)},toWorkingColorSpace:function(n,e){return this.convert(n,e,this.workingColorSpace)}};let xl;class tS{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{xl===void 0&&(xl=Vf("canvas")),xl.width=e.width,xl.height=e.height;const i=xl.getContext("2d");e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0,e.width,e.height),t=xl}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const t=Vf("canvas");t.width=e.width,t.height=e.height;const i=t.getContext("2d");i.drawImage(e,0,0,e.width,e.height);const r=i.getImageData(0,0,e.width,e.height),s=r.data;for(let o=0;o0&&(i.userData=this.userData),t||(e.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==Ag)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case Nf:e.x=e.x-Math.floor(e.x);break;case ii:e.x=e.x<0?0:1;break;case Of:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case Nf:e.y=e.y-Math.floor(e.y);break;case ii:e.y=e.y<0?0:1;break;case Of:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}}fn.DEFAULT_IMAGE=null;fn.DEFAULT_MAPPING=Ag;fn.DEFAULT_ANISOTROPY=1;class Dt{constructor(e=0,t=0,i=0,r=1){Dt.prototype.isVector4=!0,this.x=e,this.y=t,this.z=i,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,i,r){return this.x=e,this.y=t,this.z=i,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,i=this.y,r=this.z,s=this.w,o=e.elements;return this.x=o[0]*t+o[4]*i+o[8]*r+o[12]*s,this.y=o[1]*t+o[5]*i+o[9]*r+o[13]*s,this.z=o[2]*t+o[6]*i+o[10]*r+o[14]*s,this.w=o[3]*t+o[7]*i+o[11]*r+o[15]*s,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,i,r,s;const l=e.elements,f=l[0],h=l[4],d=l[8],p=l[1],v=l[5],y=l[9],_=l[2],M=l[6],m=l[10];if(Math.abs(h-p)<.01&&Math.abs(d-_)<.01&&Math.abs(y-M)<.01){if(Math.abs(h+p)<.1&&Math.abs(d+_)<.1&&Math.abs(y+M)<.1&&Math.abs(f+v+m-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const w=(f+1)/2,A=(v+1)/2,b=(m+1)/2,P=(h+p)/4,I=(d+_)/4,L=(y+M)/4;return w>A&&w>b?w<.01?(i=0,r=.707106781,s=.707106781):(i=Math.sqrt(w),r=P/i,s=I/i):A>b?A<.01?(i=.707106781,r=0,s=.707106781):(r=Math.sqrt(A),i=P/r,s=L/r):b<.01?(i=.707106781,r=.707106781,s=0):(s=Math.sqrt(b),i=I/s,r=L/s),this.set(i,r,s,t),this}let S=Math.sqrt((M-y)*(M-y)+(d-_)*(d-_)+(p-h)*(p-h));return Math.abs(S)<.001&&(S=1),this.x=(M-y)/S,this.y=(d-_)/S,this.z=(p-h)/S,this.w=Math.acos((f+v+m-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this.w=e.w+(t.w-e.w)*i,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class Or extends rs{constructor(e=1,t=1,i={}){super(),this.isWebGLRenderTarget=!0,this.width=e,this.height=t,this.depth=1,this.scissor=new Dt(0,0,e,t),this.scissorTest=!1,this.viewport=new Dt(0,0,e,t);const r={width:e,height:t,depth:1};this.texture=new fn(r,i.mapping,i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.encoding),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=i.generateMipmaps!==void 0?i.generateMipmaps:!1,this.texture.internalFormat=i.internalFormat!==void 0?i.internalFormat:null,this.texture.minFilter=i.minFilter!==void 0?i.minFilter:gn,this.depthBuffer=i.depthBuffer!==void 0?i.depthBuffer:!0,this.stencilBuffer=i.stencilBuffer!==void 0?i.stencilBuffer:!1,this.depthTexture=i.depthTexture!==void 0?i.depthTexture:null,this.samples=i.samples!==void 0?i.samples:0}setSize(e,t,i=1){(this.width!==e||this.height!==t||this.depth!==i)&&(this.width=e,this.height=t,this.depth=i,this.texture.image.width=e,this.texture.image.height=t,this.texture.image.depth=i,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.isRenderTargetTexture=!0;const t=Object.assign({},e.texture.image);return this.texture.source=new La(t),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class bg extends fn{constructor(e=null,t=1,i=1,r=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:i,depth:r},this.magFilter=pn,this.minFilter=pn,this.wrapR=ii,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class iV extends Or{constructor(e=1,t=1,i=1){super(e,t),this.isWebGLArrayRenderTarget=!0,this.depth=i,this.texture=new bg(null,e,t,i),this.texture.isRenderTargetTexture=!0}}class nS extends fn{constructor(e=null,t=1,i=1,r=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:i,depth:r},this.magFilter=pn,this.minFilter=pn,this.wrapR=ii,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class rV extends Or{constructor(e=1,t=1,i=1){super(e,t),this.isWebGL3DRenderTarget=!0,this.depth=i,this.texture=new nS(null,e,t,i),this.texture.isRenderTargetTexture=!0}}class sV extends Or{constructor(e=1,t=1,i=1,r={}){super(e,t,r),this.isWebGLMultipleRenderTargets=!0;const s=this.texture;this.texture=[];for(let o=0;o=0?1:-1,w=1-m*m;if(w>Number.EPSILON){const b=Math.sqrt(w),P=Math.atan2(b,m*S);M=Math.sin(M*P)/b,a=Math.sin(a*P)/b}const A=a*S;if(l=l*M+p*A,f=f*M+v*A,h=h*M+y*A,d=d*M+_*A,M===1-a){const b=1/Math.sqrt(l*l+f*f+h*h+d*d);l*=b,f*=b,h*=b,d*=b}}e[t]=l,e[t+1]=f,e[t+2]=h,e[t+3]=d}static multiplyQuaternionsFlat(e,t,i,r,s,o){const a=i[r],l=i[r+1],f=i[r+2],h=i[r+3],d=s[o],p=s[o+1],v=s[o+2],y=s[o+3];return e[t]=a*y+h*d+l*v-f*p,e[t+1]=l*y+h*p+f*d-a*v,e[t+2]=f*y+h*v+a*p-l*d,e[t+3]=h*y-a*d-l*p-f*v,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,i,r){return this._x=e,this._y=t,this._z=i,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t){const i=e._x,r=e._y,s=e._z,o=e._order,a=Math.cos,l=Math.sin,f=a(i/2),h=a(r/2),d=a(s/2),p=l(i/2),v=l(r/2),y=l(s/2);switch(o){case"XYZ":this._x=p*h*d+f*v*y,this._y=f*v*d-p*h*y,this._z=f*h*y+p*v*d,this._w=f*h*d-p*v*y;break;case"YXZ":this._x=p*h*d+f*v*y,this._y=f*v*d-p*h*y,this._z=f*h*y-p*v*d,this._w=f*h*d+p*v*y;break;case"ZXY":this._x=p*h*d-f*v*y,this._y=f*v*d+p*h*y,this._z=f*h*y+p*v*d,this._w=f*h*d-p*v*y;break;case"ZYX":this._x=p*h*d-f*v*y,this._y=f*v*d+p*h*y,this._z=f*h*y-p*v*d,this._w=f*h*d+p*v*y;break;case"YZX":this._x=p*h*d+f*v*y,this._y=f*v*d+p*h*y,this._z=f*h*y-p*v*d,this._w=f*h*d-p*v*y;break;case"XZY":this._x=p*h*d-f*v*y,this._y=f*v*d-p*h*y,this._z=f*h*y+p*v*d,this._w=f*h*d+p*v*y;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return t!==!1&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const i=t/2,r=Math.sin(i);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,i=t[0],r=t[4],s=t[8],o=t[1],a=t[5],l=t[9],f=t[2],h=t[6],d=t[10],p=i+a+d;if(p>0){const v=.5/Math.sqrt(p+1);this._w=.25/v,this._x=(h-l)*v,this._y=(s-f)*v,this._z=(o-r)*v}else if(i>a&&i>d){const v=2*Math.sqrt(1+i-a-d);this._w=(h-l)/v,this._x=.25*v,this._y=(r+o)/v,this._z=(s+f)/v}else if(a>d){const v=2*Math.sqrt(1+a-i-d);this._w=(s-f)/v,this._x=(r+o)/v,this._y=.25*v,this._z=(l+h)/v}else{const v=2*Math.sqrt(1+d-i-a);this._w=(o-r)/v,this._x=(s+f)/v,this._y=(l+h)/v,this._z=.25*v}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let i=e.dot(t)+1;return iMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=i):(this._x=0,this._y=-e.z,this._z=e.y,this._w=i)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=i),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(cn(this.dot(e),-1,1)))}rotateTowards(e,t){const i=this.angleTo(e);if(i===0)return this;const r=Math.min(1,t/i);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const i=e._x,r=e._y,s=e._z,o=e._w,a=t._x,l=t._y,f=t._z,h=t._w;return this._x=i*h+o*a+r*f-s*l,this._y=r*h+o*l+s*a-i*f,this._z=s*h+o*f+i*l-r*a,this._w=o*h-i*a-r*l-s*f,this._onChangeCallback(),this}slerp(e,t){if(t===0)return this;if(t===1)return this.copy(e);const i=this._x,r=this._y,s=this._z,o=this._w;let a=o*e._w+i*e._x+r*e._y+s*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=i,this._y=r,this._z=s,this;const l=1-a*a;if(l<=Number.EPSILON){const v=1-t;return this._w=v*o+t*this._w,this._x=v*i+t*this._x,this._y=v*r+t*this._y,this._z=v*s+t*this._z,this.normalize(),this._onChangeCallback(),this}const f=Math.sqrt(l),h=Math.atan2(f,a),d=Math.sin((1-t)*h)/f,p=Math.sin(t*h)/f;return this._w=o*d+this._w*p,this._x=i*d+this._x*p,this._y=r*d+this._y*p,this._z=s*d+this._z*p,this._onChangeCallback(),this}slerpQuaternions(e,t,i){return this.copy(e).slerp(t,i)}random(){const e=Math.random(),t=Math.sqrt(1-e),i=Math.sqrt(e),r=2*Math.PI*Math.random(),s=2*Math.PI*Math.random();return this.set(t*Math.cos(r),i*Math.sin(s),i*Math.cos(s),t*Math.sin(r))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class N{constructor(e=0,t=0,i=0){N.prototype.isVector3=!0,this.x=e,this.y=t,this.z=i}set(e,t,i){return i===void 0&&(i=this.z),this.x=e,this.y=t,this.z=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(YE.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(YE.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,i=this.y,r=this.z,s=e.elements;return this.x=s[0]*t+s[3]*i+s[6]*r,this.y=s[1]*t+s[4]*i+s[7]*r,this.z=s[2]*t+s[5]*i+s[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,i=this.y,r=this.z,s=e.elements,o=1/(s[3]*t+s[7]*i+s[11]*r+s[15]);return this.x=(s[0]*t+s[4]*i+s[8]*r+s[12])*o,this.y=(s[1]*t+s[5]*i+s[9]*r+s[13])*o,this.z=(s[2]*t+s[6]*i+s[10]*r+s[14])*o,this}applyQuaternion(e){const t=this.x,i=this.y,r=this.z,s=e.x,o=e.y,a=e.z,l=e.w,f=l*t+o*r-a*i,h=l*i+a*t-s*r,d=l*r+s*i-o*t,p=-s*t-o*i-a*r;return this.x=f*l+p*-s+h*-a-d*-o,this.y=h*l+p*-o+d*-s-f*-a,this.z=d*l+p*-a+f*-o-h*-s,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,i=this.y,r=this.z,s=e.elements;return this.x=s[0]*t+s[4]*i+s[8]*r,this.y=s[1]*t+s[5]*i+s[9]*r,this.z=s[2]*t+s[6]*i+s[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const i=e.x,r=e.y,s=e.z,o=t.x,a=t.y,l=t.z;return this.x=r*l-s*a,this.y=s*o-i*l,this.z=i*a-r*o,this}projectOnVector(e){const t=e.lengthSq();if(t===0)return this.set(0,0,0);const i=e.dot(this)/t;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return Dv.copy(this).projectOnVector(e),this.sub(Dv)}reflect(e){return this.sub(Dv.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(cn(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y,r=this.z-e.z;return t*t+i*i+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,i){const r=Math.sin(t)*e;return this.x=r*Math.sin(i),this.y=Math.cos(t)*e,this.z=r*Math.cos(i),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,i){return this.x=e*Math.sin(t),this.y=i,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=i,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=(Math.random()-.5)*2,t=Math.random()*Math.PI*2,i=Math.sqrt(1-e**2);return this.x=i*Math.cos(t),this.y=i*Math.sin(t),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const Dv=new N,YE=new ri;class ss{constructor(e=new N(1/0,1/0,1/0),t=new N(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,i=e.length;tthis.max.x||e.ythis.max.y||e.zthis.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}intersectsSphere(e){return this.clampPoint(e.center,gs),gs.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,i;return e.normal.x>0?(t=e.normal.x*this.min.x,i=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,i=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),t<=-e.constant&&i>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Ec),Jd.subVectors(this.max,Ec),Sl.subVectors(e.a,Ec),wl.subVectors(e.b,Ec),Ml.subVectors(e.c,Ec),ro.subVectors(wl,Sl),so.subVectors(Ml,wl),aa.subVectors(Sl,Ml);let t=[0,-ro.z,ro.y,0,-so.z,so.y,0,-aa.z,aa.y,ro.z,0,-ro.x,so.z,0,-so.x,aa.z,0,-aa.x,-ro.y,ro.x,0,-so.y,so.x,0,-aa.y,aa.x,0];return!kv(t,Sl,wl,Ml,Jd)||(t=[1,0,0,0,1,0,0,0,1],!kv(t,Sl,wl,Ml,Jd))?!1:(Kd.crossVectors(ro,so),t=[Kd.x,Kd.y,Kd.z],kv(t,Sl,wl,Ml,Jd))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,gs).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(gs).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(ms[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),ms[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),ms[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),ms[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),ms[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),ms[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),ms[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),ms[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(ms),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const ms=[new N,new N,new N,new N,new N,new N,new N,new N],gs=new N,_l=new ss,Sl=new N,wl=new N,Ml=new N,ro=new N,so=new N,aa=new N,Ec=new N,Jd=new N,Kd=new N,la=new N;function kv(n,e,t,i,r){for(let s=0,o=n.length-3;s<=o;s+=3){la.fromArray(n,s);const a=r.x*Math.abs(la.x)+r.y*Math.abs(la.y)+r.z*Math.abs(la.z),l=e.dot(la),f=t.dot(la),h=i.dot(la);if(Math.max(-Math.max(l,f,h),Math.min(l,f,h))>a)return!1}return!0}const oV=new ss,bc=new N,Nv=new N;class os{constructor(e=new N,t=-1){this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const i=this.center;t!==void 0?i.copy(t):oV.setFromPoints(e).getCenter(i);let r=0;for(let s=0,o=e.length;sthis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;bc.subVectors(e,this.center);const t=bc.lengthSq();if(t>this.radius*this.radius){const i=Math.sqrt(t),r=(i-this.radius)*.5;this.center.addScaledVector(bc,r/i),this.radius+=r}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(Nv.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(bc.copy(e.center).add(Nv)),this.expandByPoint(bc.copy(e.center).sub(Nv))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const vs=new N,Ov=new N,Qd=new N,oo=new N,Uv=new N,$d=new N,zv=new N;class hh{constructor(e=new N,t=new N(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,vs)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const i=t.dot(this.direction);return i<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=vs.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(vs.copy(this.origin).addScaledVector(this.direction,t),vs.distanceToSquared(e))}distanceSqToSegment(e,t,i,r){Ov.copy(e).add(t).multiplyScalar(.5),Qd.copy(t).sub(e).normalize(),oo.copy(this.origin).sub(Ov);const s=e.distanceTo(t)*.5,o=-this.direction.dot(Qd),a=oo.dot(this.direction),l=-oo.dot(Qd),f=oo.lengthSq(),h=Math.abs(1-o*o);let d,p,v,y;if(h>0)if(d=o*l-a,p=o*a-l,y=s*h,d>=0)if(p>=-y)if(p<=y){const _=1/h;d*=_,p*=_,v=d*(d+o*p+2*a)+p*(o*d+p+2*l)+f}else p=s,d=Math.max(0,-(o*p+a)),v=-d*d+p*(p+2*l)+f;else p=-s,d=Math.max(0,-(o*p+a)),v=-d*d+p*(p+2*l)+f;else p<=-y?(d=Math.max(0,-(-o*s+a)),p=d>0?-s:Math.min(Math.max(-s,-l),s),v=-d*d+p*(p+2*l)+f):p<=y?(d=0,p=Math.min(Math.max(-s,-l),s),v=p*(p+2*l)+f):(d=Math.max(0,-(o*s+a)),p=d>0?s:Math.min(Math.max(-s,-l),s),v=-d*d+p*(p+2*l)+f);else p=o>0?-s:s,d=Math.max(0,-(o*p+a)),v=-d*d+p*(p+2*l)+f;return i&&i.copy(this.origin).addScaledVector(this.direction,d),r&&r.copy(Ov).addScaledVector(Qd,p),v}intersectSphere(e,t){vs.subVectors(e.center,this.origin);const i=vs.dot(this.direction),r=vs.dot(vs)-i*i,s=e.radius*e.radius;if(r>s)return null;const o=Math.sqrt(s-r),a=i-o,l=i+o;return l<0?null:a<0?this.at(l,t):this.at(a,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;const i=-(this.origin.dot(e.normal)+e.constant)/t;return i>=0?i:null}intersectPlane(e,t){const i=this.distanceToPlane(e);return i===null?null:this.at(i,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let i,r,s,o,a,l;const f=1/this.direction.x,h=1/this.direction.y,d=1/this.direction.z,p=this.origin;return f>=0?(i=(e.min.x-p.x)*f,r=(e.max.x-p.x)*f):(i=(e.max.x-p.x)*f,r=(e.min.x-p.x)*f),h>=0?(s=(e.min.y-p.y)*h,o=(e.max.y-p.y)*h):(s=(e.max.y-p.y)*h,o=(e.min.y-p.y)*h),i>o||s>r||((s>i||isNaN(i))&&(i=s),(o=0?(a=(e.min.z-p.z)*d,l=(e.max.z-p.z)*d):(a=(e.max.z-p.z)*d,l=(e.min.z-p.z)*d),i>l||a>r)||((a>i||i!==i)&&(i=a),(l=0?i:r,t)}intersectsBox(e){return this.intersectBox(e,vs)!==null}intersectTriangle(e,t,i,r,s){Uv.subVectors(t,e),$d.subVectors(i,e),zv.crossVectors(Uv,$d);let o=this.direction.dot(zv),a;if(o>0){if(r)return null;a=1}else if(o<0)a=-1,o=-o;else return null;oo.subVectors(this.origin,e);const l=a*this.direction.dot($d.crossVectors(oo,$d));if(l<0)return null;const f=a*this.direction.dot(Uv.cross(oo));if(f<0||l+f>o)return null;const h=-a*oo.dot(zv);return h<0?null:this.at(h/o,s)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class ot{constructor(){ot.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}set(e,t,i,r,s,o,a,l,f,h,d,p,v,y,_,M){const m=this.elements;return m[0]=e,m[4]=t,m[8]=i,m[12]=r,m[1]=s,m[5]=o,m[9]=a,m[13]=l,m[2]=f,m[6]=h,m[10]=d,m[14]=p,m[3]=v,m[7]=y,m[11]=_,m[15]=M,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new ot().fromArray(this.elements)}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],t[9]=i[9],t[10]=i[10],t[11]=i[11],t[12]=i[12],t[13]=i[13],t[14]=i[14],t[15]=i[15],this}copyPosition(e){const t=this.elements,i=e.elements;return t[12]=i[12],t[13]=i[13],t[14]=i[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,i){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(e,t,i){return this.set(e.x,t.x,i.x,0,e.y,t.y,i.y,0,e.z,t.z,i.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,i=e.elements,r=1/Al.setFromMatrixColumn(e,0).length(),s=1/Al.setFromMatrixColumn(e,1).length(),o=1/Al.setFromMatrixColumn(e,2).length();return t[0]=i[0]*r,t[1]=i[1]*r,t[2]=i[2]*r,t[3]=0,t[4]=i[4]*s,t[5]=i[5]*s,t[6]=i[6]*s,t[7]=0,t[8]=i[8]*o,t[9]=i[9]*o,t[10]=i[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,i=e.x,r=e.y,s=e.z,o=Math.cos(i),a=Math.sin(i),l=Math.cos(r),f=Math.sin(r),h=Math.cos(s),d=Math.sin(s);if(e.order==="XYZ"){const p=o*h,v=o*d,y=a*h,_=a*d;t[0]=l*h,t[4]=-l*d,t[8]=f,t[1]=v+y*f,t[5]=p-_*f,t[9]=-a*l,t[2]=_-p*f,t[6]=y+v*f,t[10]=o*l}else if(e.order==="YXZ"){const p=l*h,v=l*d,y=f*h,_=f*d;t[0]=p+_*a,t[4]=y*a-v,t[8]=o*f,t[1]=o*d,t[5]=o*h,t[9]=-a,t[2]=v*a-y,t[6]=_+p*a,t[10]=o*l}else if(e.order==="ZXY"){const p=l*h,v=l*d,y=f*h,_=f*d;t[0]=p-_*a,t[4]=-o*d,t[8]=y+v*a,t[1]=v+y*a,t[5]=o*h,t[9]=_-p*a,t[2]=-o*f,t[6]=a,t[10]=o*l}else if(e.order==="ZYX"){const p=o*h,v=o*d,y=a*h,_=a*d;t[0]=l*h,t[4]=y*f-v,t[8]=p*f+_,t[1]=l*d,t[5]=_*f+p,t[9]=v*f-y,t[2]=-f,t[6]=a*l,t[10]=o*l}else if(e.order==="YZX"){const p=o*l,v=o*f,y=a*l,_=a*f;t[0]=l*h,t[4]=_-p*d,t[8]=y*d+v,t[1]=d,t[5]=o*h,t[9]=-a*h,t[2]=-f*h,t[6]=v*d+y,t[10]=p-_*d}else if(e.order==="XZY"){const p=o*l,v=o*f,y=a*l,_=a*f;t[0]=l*h,t[4]=-d,t[8]=f*h,t[1]=p*d+_,t[5]=o*h,t[9]=v*d-y,t[2]=y*d-v,t[6]=a*h,t[10]=_*d+p}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(aV,e,lV)}lookAt(e,t,i){const r=this.elements;return Ui.subVectors(e,t),Ui.lengthSq()===0&&(Ui.z=1),Ui.normalize(),ao.crossVectors(i,Ui),ao.lengthSq()===0&&(Math.abs(i.z)===1?Ui.x+=1e-4:Ui.z+=1e-4,Ui.normalize(),ao.crossVectors(i,Ui)),ao.normalize(),ep.crossVectors(Ui,ao),r[0]=ao.x,r[4]=ep.x,r[8]=Ui.x,r[1]=ao.y,r[5]=ep.y,r[9]=Ui.y,r[2]=ao.z,r[6]=ep.z,r[10]=Ui.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,r=t.elements,s=this.elements,o=i[0],a=i[4],l=i[8],f=i[12],h=i[1],d=i[5],p=i[9],v=i[13],y=i[2],_=i[6],M=i[10],m=i[14],S=i[3],w=i[7],A=i[11],b=i[15],P=r[0],I=r[4],L=r[8],C=r[12],R=r[1],W=r[5],J=r[9],j=r[13],X=r[2],Z=r[6],se=r[10],ae=r[14],D=r[3],H=r[7],B=r[11],te=r[15];return s[0]=o*P+a*R+l*X+f*D,s[4]=o*I+a*W+l*Z+f*H,s[8]=o*L+a*J+l*se+f*B,s[12]=o*C+a*j+l*ae+f*te,s[1]=h*P+d*R+p*X+v*D,s[5]=h*I+d*W+p*Z+v*H,s[9]=h*L+d*J+p*se+v*B,s[13]=h*C+d*j+p*ae+v*te,s[2]=y*P+_*R+M*X+m*D,s[6]=y*I+_*W+M*Z+m*H,s[10]=y*L+_*J+M*se+m*B,s[14]=y*C+_*j+M*ae+m*te,s[3]=S*P+w*R+A*X+b*D,s[7]=S*I+w*W+A*Z+b*H,s[11]=S*L+w*J+A*se+b*B,s[15]=S*C+w*j+A*ae+b*te,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[4],r=e[8],s=e[12],o=e[1],a=e[5],l=e[9],f=e[13],h=e[2],d=e[6],p=e[10],v=e[14],y=e[3],_=e[7],M=e[11],m=e[15];return y*(+s*l*d-r*f*d-s*a*p+i*f*p+r*a*v-i*l*v)+_*(+t*l*v-t*f*p+s*o*p-r*o*v+r*f*h-s*l*h)+M*(+t*f*d-t*a*v-s*o*d+i*o*v+s*a*h-i*f*h)+m*(-r*a*h-t*l*d+t*a*p+r*o*d-i*o*p+i*l*h)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,i){const r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=i),this}invert(){const e=this.elements,t=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],l=e[6],f=e[7],h=e[8],d=e[9],p=e[10],v=e[11],y=e[12],_=e[13],M=e[14],m=e[15],S=d*M*f-_*p*f+_*l*v-a*M*v-d*l*m+a*p*m,w=y*p*f-h*M*f-y*l*v+o*M*v+h*l*m-o*p*m,A=h*_*f-y*d*f+y*a*v-o*_*v-h*a*m+o*d*m,b=y*d*l-h*_*l-y*a*p+o*_*p+h*a*M-o*d*M,P=t*S+i*w+r*A+s*b;if(P===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const I=1/P;return e[0]=S*I,e[1]=(_*p*s-d*M*s-_*r*v+i*M*v+d*r*m-i*p*m)*I,e[2]=(a*M*s-_*l*s+_*r*f-i*M*f-a*r*m+i*l*m)*I,e[3]=(d*l*s-a*p*s-d*r*f+i*p*f+a*r*v-i*l*v)*I,e[4]=w*I,e[5]=(h*M*s-y*p*s+y*r*v-t*M*v-h*r*m+t*p*m)*I,e[6]=(y*l*s-o*M*s-y*r*f+t*M*f+o*r*m-t*l*m)*I,e[7]=(o*p*s-h*l*s+h*r*f-t*p*f-o*r*v+t*l*v)*I,e[8]=A*I,e[9]=(y*d*s-h*_*s-y*i*v+t*_*v+h*i*m-t*d*m)*I,e[10]=(o*_*s-y*a*s+y*i*f-t*_*f-o*i*m+t*a*m)*I,e[11]=(h*a*s-o*d*s-h*i*f+t*d*f+o*i*v-t*a*v)*I,e[12]=b*I,e[13]=(h*_*r-y*d*r+y*i*p-t*_*p-h*i*M+t*d*M)*I,e[14]=(y*a*r-o*_*r-y*i*l+t*_*l+o*i*M-t*a*M)*I,e[15]=(o*d*r-h*a*r+h*i*l-t*d*l-o*i*p+t*a*p)*I,this}scale(e){const t=this.elements,i=e.x,r=e.y,s=e.z;return t[0]*=i,t[4]*=r,t[8]*=s,t[1]*=i,t[5]*=r,t[9]*=s,t[2]*=i,t[6]*=r,t[10]*=s,t[3]*=i,t[7]*=r,t[11]*=s,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,i,r))}makeTranslation(e,t,i){return this.set(1,0,0,e,0,1,0,t,0,0,1,i,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,t,-i,0,0,i,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,0,i,0,0,1,0,0,-i,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,0,i,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const i=Math.cos(t),r=Math.sin(t),s=1-i,o=e.x,a=e.y,l=e.z,f=s*o,h=s*a;return this.set(f*o+i,f*a-r*l,f*l+r*a,0,f*a+r*l,h*a+i,h*l-r*o,0,f*l-r*a,h*l+r*o,s*l*l+i,0,0,0,0,1),this}makeScale(e,t,i){return this.set(e,0,0,0,0,t,0,0,0,0,i,0,0,0,0,1),this}makeShear(e,t,i,r,s,o){return this.set(1,i,s,0,e,1,o,0,t,r,1,0,0,0,0,1),this}compose(e,t,i){const r=this.elements,s=t._x,o=t._y,a=t._z,l=t._w,f=s+s,h=o+o,d=a+a,p=s*f,v=s*h,y=s*d,_=o*h,M=o*d,m=a*d,S=l*f,w=l*h,A=l*d,b=i.x,P=i.y,I=i.z;return r[0]=(1-(_+m))*b,r[1]=(v+A)*b,r[2]=(y-w)*b,r[3]=0,r[4]=(v-A)*P,r[5]=(1-(p+m))*P,r[6]=(M+S)*P,r[7]=0,r[8]=(y+w)*I,r[9]=(M-S)*I,r[10]=(1-(p+_))*I,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,i){const r=this.elements;let s=Al.set(r[0],r[1],r[2]).length();const o=Al.set(r[4],r[5],r[6]).length(),a=Al.set(r[8],r[9],r[10]).length();this.determinant()<0&&(s=-s),e.x=r[12],e.y=r[13],e.z=r[14],Mr.copy(this);const f=1/s,h=1/o,d=1/a;return Mr.elements[0]*=f,Mr.elements[1]*=f,Mr.elements[2]*=f,Mr.elements[4]*=h,Mr.elements[5]*=h,Mr.elements[6]*=h,Mr.elements[8]*=d,Mr.elements[9]*=d,Mr.elements[10]*=d,t.setFromRotationMatrix(Mr),i.x=s,i.y=o,i.z=a,this}makePerspective(e,t,i,r,s,o){const a=this.elements,l=2*s/(t-e),f=2*s/(i-r),h=(t+e)/(t-e),d=(i+r)/(i-r),p=-(o+s)/(o-s),v=-2*o*s/(o-s);return a[0]=l,a[4]=0,a[8]=h,a[12]=0,a[1]=0,a[5]=f,a[9]=d,a[13]=0,a[2]=0,a[6]=0,a[10]=p,a[14]=v,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this}makeOrthographic(e,t,i,r,s,o){const a=this.elements,l=1/(t-e),f=1/(i-r),h=1/(o-s),d=(t+e)*l,p=(i+r)*f,v=(o+s)*h;return a[0]=2*l,a[4]=0,a[8]=0,a[12]=-d,a[1]=0,a[5]=2*f,a[9]=0,a[13]=-p,a[2]=0,a[6]=0,a[10]=-2*h,a[14]=-v,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this}equals(e){const t=this.elements,i=e.elements;for(let r=0;r<16;r++)if(t[r]!==i[r])return!1;return!0}fromArray(e,t=0){for(let i=0;i<16;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e[t+9]=i[9],e[t+10]=i[10],e[t+11]=i[11],e[t+12]=i[12],e[t+13]=i[13],e[t+14]=i[14],e[t+15]=i[15],e}}const Al=new N,Mr=new ot,aV=new N(0,0,0),lV=new N(1,1,1),ao=new N,ep=new N,Ui=new N,qE=new ot,ZE=new ri;class el{constructor(e=0,t=0,i=0,r=el.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=i,this._order=r}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,i,r=this._order){return this._x=e,this._y=t,this._z=i,this._order=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,i=!0){const r=e.elements,s=r[0],o=r[4],a=r[8],l=r[1],f=r[5],h=r[9],d=r[2],p=r[6],v=r[10];switch(t){case"XYZ":this._y=Math.asin(cn(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-h,v),this._z=Math.atan2(-o,s)):(this._x=Math.atan2(p,f),this._z=0);break;case"YXZ":this._x=Math.asin(-cn(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(a,v),this._z=Math.atan2(l,f)):(this._y=Math.atan2(-d,s),this._z=0);break;case"ZXY":this._x=Math.asin(cn(p,-1,1)),Math.abs(p)<.9999999?(this._y=Math.atan2(-d,v),this._z=Math.atan2(-o,f)):(this._y=0,this._z=Math.atan2(l,s));break;case"ZYX":this._y=Math.asin(-cn(d,-1,1)),Math.abs(d)<.9999999?(this._x=Math.atan2(p,v),this._z=Math.atan2(l,s)):(this._x=0,this._z=Math.atan2(-o,f));break;case"YZX":this._z=Math.asin(cn(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-h,f),this._y=Math.atan2(-d,s)):(this._x=0,this._y=Math.atan2(a,v));break;case"XZY":this._z=Math.asin(-cn(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(p,f),this._y=Math.atan2(a,s)):(this._x=Math.atan2(-h,v),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,i===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,i){return qE.makeRotationFromQuaternion(e),this.setFromRotationMatrix(qE,t,i)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return ZE.setFromEuler(this),this.setFromQuaternion(ZE,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}el.DEFAULT_ORDER="XYZ";class Ua{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let t=0;t1){for(let i=0;i0&&(i=i.concat(o))}return i}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Tc,e,cV),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Tc,fV,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let i=0,r=t.length;i0&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),r.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(r.matrixAutoUpdate=!1),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(r.instanceColor=this.instanceColor.toJSON()));function s(a,l){return a[l.uuid]===void 0&&(a[l.uuid]=l.toJSON(e)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(r.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=s(e.geometries,this.geometry);const a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){const l=a.shapes;if(Array.isArray(l))for(let f=0,h=l.length;f0){r.children=[];for(let a=0;a0){r.animations=[];for(let a=0;a0&&(i.geometries=a),l.length>0&&(i.materials=l),f.length>0&&(i.textures=f),h.length>0&&(i.images=h),d.length>0&&(i.shapes=d),p.length>0&&(i.skeletons=p),v.length>0&&(i.animations=v),y.length>0&&(i.nodes=y)}return i.object=r,i;function o(a){const l=[];for(const f in a){const h=a[f];delete h.metadata,l.push(h)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let i=0;i0?r.multiplyScalar(1/Math.sqrt(s)):r.set(0,0,0)}static getBarycoord(e,t,i,r,s){Ar.subVectors(r,t),xs.subVectors(i,t),Fv.subVectors(e,t);const o=Ar.dot(Ar),a=Ar.dot(xs),l=Ar.dot(Fv),f=xs.dot(xs),h=xs.dot(Fv),d=o*f-a*a;if(d===0)return s.set(-2,-1,-1);const p=1/d,v=(f*l-a*h)*p,y=(o*h-a*l)*p;return s.set(1-v-y,y,v)}static containsPoint(e,t,i,r){return this.getBarycoord(e,t,i,r,_s),_s.x>=0&&_s.y>=0&&_s.x+_s.y<=1}static getUV(e,t,i,r,s,o,a,l){return np===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),np=!0),this.getInterpolation(e,t,i,r,s,o,a,l)}static getInterpolation(e,t,i,r,s,o,a,l){return this.getBarycoord(e,t,i,r,_s),l.setScalar(0),l.addScaledVector(s,_s.x),l.addScaledVector(o,_s.y),l.addScaledVector(a,_s.z),l}static isFrontFacing(e,t,i,r){return Ar.subVectors(i,t),xs.subVectors(e,t),Ar.cross(xs).dot(r)<0}set(e,t,i){return this.a.copy(e),this.b.copy(t),this.c.copy(i),this}setFromPointsAndIndices(e,t,i,r){return this.a.copy(e[t]),this.b.copy(e[i]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,i,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,r),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Ar.subVectors(this.c,this.b),xs.subVectors(this.a,this.b),Ar.cross(xs).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return bi.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return bi.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,i,r,s){return np===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),np=!0),bi.getInterpolation(e,this.a,this.b,this.c,t,i,r,s)}getInterpolation(e,t,i,r,s){return bi.getInterpolation(e,this.a,this.b,this.c,t,i,r,s)}containsPoint(e){return bi.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return bi.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const i=this.a,r=this.b,s=this.c;let o,a;bl.subVectors(r,i),Tl.subVectors(s,i),Bv.subVectors(e,i);const l=bl.dot(Bv),f=Tl.dot(Bv);if(l<=0&&f<=0)return t.copy(i);Vv.subVectors(e,r);const h=bl.dot(Vv),d=Tl.dot(Vv);if(h>=0&&d<=h)return t.copy(r);const p=l*d-h*f;if(p<=0&&l>=0&&h<=0)return o=l/(l-h),t.copy(i).addScaledVector(bl,o);Hv.subVectors(e,s);const v=bl.dot(Hv),y=Tl.dot(Hv);if(y>=0&&v<=y)return t.copy(s);const _=v*f-l*y;if(_<=0&&f>=0&&y<=0)return a=f/(f-y),t.copy(i).addScaledVector(Tl,a);const M=h*y-v*d;if(M<=0&&d-h>=0&&v-y>=0)return tb.subVectors(s,r),a=(d-h)/(d-h+(v-y)),t.copy(r).addScaledVector(tb,a);const m=1/(M+_+p);return o=_*m,a=p*m,t.copy(i).addScaledVector(bl,o).addScaledVector(Tl,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}let dV=0;class Xn extends rs{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:dV++}),this.uuid=ji(),this.name="",this.type="Material",this.blending=ka,this.side=Fs,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.blendSrc=Y1,this.blendDst=q1,this.blendEquation=wa,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=Vm,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=LL,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=rm,this.stencilZFail=rm,this.stencilZPass=rm,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const t in e){const i=e[t];if(i===void 0){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}const r=this[t];if(r===void 0){console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`);continue}r&&r.isColor?r.set(i):r&&r.isVector3&&i&&i.isVector3?r.copy(i):this[t]=i}}toJSON(e){const t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});const i={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),this.roughness!==void 0&&(i.roughness=this.roughness),this.metalness!==void 0&&(i.metalness=this.metalness),this.sheen!==void 0&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(i.shininess=this.shininess),this.clearcoat!==void 0&&(i.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(i.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(i.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(e).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(e).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(e).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(e).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(e).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(i.combine=this.combine)),this.envMapIntensity!==void 0&&(i.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(i.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(i.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(i.size=this.size),this.shadowSide!==null&&(i.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==ka&&(i.blending=this.blending),this.side!==Fs&&(i.side=this.side),this.vertexColors&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),this.transparent===!0&&(i.transparent=this.transparent),i.depthFunc=this.depthFunc,i.depthTest=this.depthTest,i.depthWrite=this.depthWrite,i.colorWrite=this.colorWrite,i.stencilWrite=this.stencilWrite,i.stencilWriteMask=this.stencilWriteMask,i.stencilFunc=this.stencilFunc,i.stencilRef=this.stencilRef,i.stencilFuncMask=this.stencilFuncMask,i.stencilFail=this.stencilFail,i.stencilZFail=this.stencilZFail,i.stencilZPass=this.stencilZPass,this.rotation!==void 0&&this.rotation!==0&&(i.rotation=this.rotation),this.polygonOffset===!0&&(i.polygonOffset=!0),this.polygonOffsetFactor!==0&&(i.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(i.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(i.linewidth=this.linewidth),this.dashSize!==void 0&&(i.dashSize=this.dashSize),this.gapSize!==void 0&&(i.gapSize=this.gapSize),this.scale!==void 0&&(i.scale=this.scale),this.dithering===!0&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),this.alphaToCoverage===!0&&(i.alphaToCoverage=this.alphaToCoverage),this.premultipliedAlpha===!0&&(i.premultipliedAlpha=this.premultipliedAlpha),this.forceSinglePass===!0&&(i.forceSinglePass=this.forceSinglePass),this.wireframe===!0&&(i.wireframe=this.wireframe),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(i.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(i.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(i.flatShading=this.flatShading),this.visible===!1&&(i.visible=!1),this.toneMapped===!1&&(i.toneMapped=!1),this.fog===!1&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData);function r(s){const o=[];for(const a in s){const l=s[a];delete l.metadata,o.push(l)}return o}if(t){const s=r(e.textures),o=r(e.images);s.length>0&&(i.textures=s),o.length>0&&(i.images=o)}return i}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let i=null;if(t!==null){const r=t.length;i=new Array(r);for(let s=0;s!==r;++s)i[s]=t[s].clone()}return this.clippingPlanes=i,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}const NL={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Er={h:0,s:0,l:0},ip={h:0,s:0,l:0};function Wv(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*6*t:t<1/2?e:t<2/3?n+(e-n)*6*(2/3-t):n}class Fe{constructor(e,t,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,t===void 0&&i===void 0?this.set(e):this.setRGB(e,t,i)}set(e){return e&&e.isColor?this.copy(e):typeof e=="number"?this.setHex(e):typeof e=="string"&&this.setStyle(e),this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=Cr){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Mi.toWorkingColorSpace(this,t),this}setRGB(e,t,i,r=Mi.workingColorSpace){return this.r=e,this.g=t,this.b=i,Mi.toWorkingColorSpace(this,r),this}setHSL(e,t,i,r=Mi.workingColorSpace){if(e=eS(e,1),t=cn(t,0,1),i=cn(i,0,1),t===0)this.r=this.g=this.b=i;else{const s=i<=.5?i*(1+t):i+t-i*t,o=2*i-s;this.r=Wv(o,s,e+1/3),this.g=Wv(o,s,e),this.b=Wv(o,s,e-1/3)}return Mi.toWorkingColorSpace(this,r),this}setStyle(e,t=Cr){function i(s){s!==void 0&&parseFloat(s)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(e)){let s;const o=r[1],a=r[2];switch(o){case"rgb":case"rgba":if(s=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return this.r=Math.min(255,parseInt(s[1],10))/255,this.g=Math.min(255,parseInt(s[2],10))/255,this.b=Math.min(255,parseInt(s[3],10))/255,Mi.toWorkingColorSpace(this,t),i(s[4]),this;if(s=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return this.r=Math.min(100,parseInt(s[1],10))/100,this.g=Math.min(100,parseInt(s[2],10))/100,this.b=Math.min(100,parseInt(s[3],10))/100,Mi.toWorkingColorSpace(this,t),i(s[4]),this;break;case"hsl":case"hsla":if(s=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a)){const l=parseFloat(s[1])/360,f=parseFloat(s[2])/100,h=parseFloat(s[3])/100;return i(s[4]),this.setHSL(l,f,h,t)}break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){const s=r[1],o=s.length;if(o===3)return this.setRGB(parseInt(s.charAt(0),16)/15,parseInt(s.charAt(1),16)/15,parseInt(s.charAt(2),16)/15,t);if(o===6)return this.setHex(parseInt(s,16),t);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=Cr){const i=NL[e.toLowerCase()];return i!==void 0?this.setHex(i,t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=xu(e.r),this.g=xu(e.g),this.b=xu(e.b),this}copyLinearToSRGB(e){return this.r=Rv(e.r),this.g=Rv(e.g),this.b=Rv(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Cr){return Mi.fromWorkingColorSpace(ti.copy(this),e),cn(ti.r*255,0,255)<<16^cn(ti.g*255,0,255)<<8^cn(ti.b*255,0,255)<<0}getHexString(e=Cr){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Mi.workingColorSpace){Mi.fromWorkingColorSpace(ti.copy(this),t);const i=ti.r,r=ti.g,s=ti.b,o=Math.max(i,r,s),a=Math.min(i,r,s);let l,f;const h=(a+o)/2;if(a===o)l=0,f=0;else{const d=o-a;switch(f=h<=.5?d/(o+a):d/(2-o-a),o){case i:l=(r-s)/d+(r>-f-14,i[l|256]=1024>>-f-14|32768,r[l]=-f-1,r[l|256]=-f-1):f<=15?(i[l]=f+15<<10,i[l|256]=f+15<<10|32768,r[l]=13,r[l|256]=13):f<128?(i[l]=31744,i[l|256]=64512,r[l]=24,r[l|256]=24):(i[l]=31744,i[l|256]=64512,r[l]=13,r[l|256]=13)}const s=new Uint32Array(2048),o=new Uint32Array(64),a=new Uint32Array(64);for(let l=1;l<1024;++l){let f=l<<13,h=0;for(;!(f&8388608);)f<<=1,h-=8388608;f&=-8388609,h+=947912704,s[l]=f|h}for(let l=1024;l<2048;++l)s[l]=939524096+(l-1024<<13);for(let l=1;l<31;++l)o[l]=l<<23;o[31]=1199570944,o[32]=2147483648;for(let l=33;l<63;++l)o[l]=2147483648+(l-32<<23);o[63]=3347054592;for(let l=1;l<64;++l)l!==32&&(a[l]=1024);return{floatView:e,uint32View:t,baseTable:i,shiftTable:r,mantissaTable:s,exponentTable:o,offsetTable:a}}function Ai(n){Math.abs(n)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),n=cn(n,-65504,65504),As.floatView[0]=n;const e=As.uint32View[0],t=e>>23&511;return As.baseTable[t]+((e&8388607)>>As.shiftTable[t])}function Wc(n){const e=n>>10;return As.uint32View[0]=As.mantissaTable[As.offsetTable[e]+(n&1023)]+As.exponentTable[e],As.floatView[0]}const mV={toHalfFloat:Ai,fromHalfFloat:Wc},Sn=new N,rp=new ye;class Bt{constructor(e,t,i=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=i,this.usage=Bf,this.updateRange={offset:0,count:-1},this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this}copyAt(e,t,i){e*=this.itemSize,i*=t.itemSize;for(let r=0,s=this.itemSize;r0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const f in l)l[f]!==void 0&&(e[f]=l[f]);return e}e.data={attributes:{}};const t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const i=this.attributes;for(const l in i){const f=i[l];e.data.attributes[l]=f.toJSON(e.data)}const r={};let s=!1;for(const l in this.morphAttributes){const f=this.morphAttributes[l],h=[];for(let d=0,p=f.length;d0&&(r[l]=h,s=!0)}s&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const a=this.boundingSphere;return a!==null&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const i=e.index;i!==null&&this.setIndex(i.clone(t));const r=e.attributes;for(const f in r){const h=r[f];this.setAttribute(f,h.clone(t))}const s=e.morphAttributes;for(const f in s){const h=[],d=s[f];for(let p=0,v=d.length;p0){const r=t[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;s(e.far-e.near)**2))||(nb.copy(s).invert(),Yr.copy(e.ray).applyMatrix4(nb),i.boundingBox!==null&&Yr.intersectsBox(i.boundingBox)===!1))return;let o;const a=i.index,l=i.attributes.position,f=i.attributes.uv,h=i.attributes.uv2,d=i.attributes.normal,p=i.groups,v=i.drawRange;if(a!==null)if(Array.isArray(r))for(let y=0,_=p.length;y<_;y++){const M=p[y],m=r[M.materialIndex],S=Math.max(M.start,v.start),w=Math.min(a.count,Math.min(M.start+M.count,v.start+v.count));for(let A=S,b=w;At.far?null:{distance:f,point:fp.clone(),object:n}}function hp(n,e,t,i,r,s,o,a,l,f){n.getVertexPosition(a,Pl),n.getVertexPosition(l,Ll),n.getVertexPosition(f,Rl);const h=AV(n,e,t,i,Pl,Ll,Rl,cp);if(h){r&&(ap.fromBufferAttribute(r,a),lp.fromBufferAttribute(r,l),up.fromBufferAttribute(r,f),h.uv=bi.getInterpolation(cp,Pl,Ll,Rl,ap,lp,up,new ye)),s&&(ap.fromBufferAttribute(s,a),lp.fromBufferAttribute(s,l),up.fromBufferAttribute(s,f),h.uv2=bi.getInterpolation(cp,Pl,Ll,Rl,ap,lp,up,new ye)),o&&(rb.fromBufferAttribute(o,a),sb.fromBufferAttribute(o,l),ob.fromBufferAttribute(o,f),h.normal=bi.getInterpolation(cp,Pl,Ll,Rl,rb,sb,ob,new N),h.normal.dot(i.direction)>0&&h.normal.multiplyScalar(-1));const d={a,b:l,c:f,normal:new N,materialIndex:0};bi.getNormal(Pl,Ll,Rl,d.normal),h.face=d}return h}class qo extends dt{constructor(e=1,t=1,i=1,r=1,s=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:i,widthSegments:r,heightSegments:s,depthSegments:o};const a=this;r=Math.floor(r),s=Math.floor(s),o=Math.floor(o);const l=[],f=[],h=[],d=[];let p=0,v=0;y("z","y","x",-1,-1,i,t,e,o,s,0),y("z","y","x",1,-1,i,t,-e,o,s,1),y("x","z","y",1,1,e,i,t,r,o,2),y("x","z","y",1,-1,e,i,-t,r,o,3),y("x","y","z",1,-1,e,t,i,r,s,4),y("x","y","z",-1,-1,e,t,-i,r,s,5),this.setIndex(l),this.setAttribute("position",new We(f,3)),this.setAttribute("normal",new We(h,3)),this.setAttribute("uv",new We(d,2));function y(_,M,m,S,w,A,b,P,I,L,C){const R=A/I,W=b/L,J=A/2,j=b/2,X=P/2,Z=I+1,se=L+1;let ae=0,D=0;const H=new N;for(let B=0;B0?1:-1,h.push(H.x,H.y,H.z),d.push($/I),d.push(1-B/L),ae+=1}}for(let B=0;B>8&255]+ti[n>>16&255]+ti[n>>24&255]+"-"+ti[e&255]+ti[e>>8&255]+"-"+ti[e>>16&15|64]+ti[e>>24&255]+"-"+ti[t&63|128]+ti[t>>8&255]+"-"+ti[t>>16&255]+ti[t>>24&255]+ti[i&255]+ti[i>>8&255]+ti[i>>16&255]+ti[i>>24&255]).toLowerCase()}function cn(n,e,t){return Math.max(e,Math.min(t,n))}function eS(n,e){return(n%e+e)%e}function O5(n,e,t,i,r){return i+(n-e)*(r-i)/(t-e)}function U5(n,e,t){return n!==e?(t-n)/(e-n):0}function lf(n,e,t){return(1-t)*n+t*e}function z5(n,e,t,i){return lf(n,e,1-Math.exp(-t*i))}function F5(n,e=1){return e-Math.abs(eS(n,e*2)-e)}function B5(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*(3-2*n))}function V5(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*n*(n*(n*6-15)+10))}function H5(n,e){return n+Math.floor(Math.random()*(e-n+1))}function W5(n,e){return n+Math.random()*(e-n)}function G5(n){return n*(.5-Math.random())}function j5(n){n!==void 0&&(XE=n);let e=XE+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function X5(n){return n*Oa}function Y5(n){return n*Ru}function u_(n){return(n&n-1)===0&&n!==0}function RL(n){return Math.pow(2,Math.ceil(Math.log(n)/Math.LN2))}function IL(n){return Math.pow(2,Math.floor(Math.log(n)/Math.LN2))}function q5(n,e,t,i,r){const s=Math.cos,o=Math.sin,a=s(t/2),l=o(t/2),f=s((e+i)/2),h=o((e+i)/2),d=s((e-i)/2),p=o((e-i)/2),v=s((i-e)/2),y=o((i-e)/2);switch(r){case"XYX":n.set(a*h,l*d,l*p,a*f);break;case"YZY":n.set(l*p,a*h,l*d,a*f);break;case"ZXZ":n.set(l*d,l*p,a*h,a*f);break;case"XZX":n.set(a*h,l*y,l*v,a*f);break;case"YXY":n.set(l*v,a*h,l*y,a*f);break;case"ZYZ":n.set(l*y,l*v,a*h,a*f);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}function Wi(n,e){switch(e.constructor){case Float32Array:return n;case Uint16Array:return n/65535;case Uint8Array:return n/255;case Int16Array:return Math.max(n/32767,-1);case Int8Array:return Math.max(n/127,-1);default:throw new Error("Invalid component type.")}}function gt(n,e){switch(e.constructor){case Float32Array:return n;case Uint16Array:return Math.round(n*65535);case Uint8Array:return Math.round(n*255);case Int16Array:return Math.round(n*32767);case Int8Array:return Math.round(n*127);default:throw new Error("Invalid component type.")}}const DL={DEG2RAD:Oa,RAD2DEG:Ru,generateUUID:ji,clamp:cn,euclideanModulo:eS,mapLinear:O5,inverseLerp:U5,lerp:lf,damp:z5,pingpong:F5,smoothstep:B5,smootherstep:V5,randInt:H5,randFloat:W5,randFloatSpread:G5,seededRandom:j5,degToRad:X5,radToDeg:Y5,isPowerOfTwo:u_,ceilPowerOfTwo:RL,floorPowerOfTwo:IL,setQuaternionFromProperEuler:q5,normalize:gt,denormalize:Wi};class ye{constructor(e=0,t=0){ye.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,i=this.y,r=e.elements;return this.x=r[0]*t+r[3]*i+r[6],this.y=r[1]*t+r[4]*i+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(cn(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y;return t*t+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const i=Math.cos(t),r=Math.sin(t),s=this.x-e.x,o=this.y-e.y;return this.x=s*i-o*r+e.x,this.y=s*r+o*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Mt{constructor(){Mt.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1]}set(e,t,i,r,s,o,a,l,f){const h=this.elements;return h[0]=e,h[1]=r,h[2]=a,h[3]=t,h[4]=s,h[5]=l,h[6]=i,h[7]=o,h[8]=f,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],this}extractBasis(e,t,i){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,r=t.elements,s=this.elements,o=i[0],a=i[3],l=i[6],f=i[1],h=i[4],d=i[7],p=i[2],v=i[5],y=i[8],_=r[0],M=r[3],m=r[6],S=r[1],w=r[4],A=r[7],b=r[2],P=r[5],I=r[8];return s[0]=o*_+a*S+l*b,s[3]=o*M+a*w+l*P,s[6]=o*m+a*A+l*I,s[1]=f*_+h*S+d*b,s[4]=f*M+h*w+d*P,s[7]=f*m+h*A+d*I,s[2]=p*_+v*S+y*b,s[5]=p*M+v*w+y*P,s[8]=p*m+v*A+y*I,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],l=e[6],f=e[7],h=e[8];return t*o*h-t*a*f-i*s*h+i*a*l+r*s*f-r*o*l}invert(){const e=this.elements,t=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],l=e[6],f=e[7],h=e[8],d=h*o-a*f,p=a*l-h*s,v=f*s-o*l,y=t*d+i*p+r*v;if(y===0)return this.set(0,0,0,0,0,0,0,0,0);const _=1/y;return e[0]=d*_,e[1]=(r*f-h*i)*_,e[2]=(a*i-r*o)*_,e[3]=p*_,e[4]=(h*t-r*l)*_,e[5]=(r*s-a*t)*_,e[6]=v*_,e[7]=(i*l-f*t)*_,e[8]=(o*t-i*s)*_,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,i,r,s,o,a){const l=Math.cos(s),f=Math.sin(s);return this.set(i*l,i*f,-i*(l*o+f*a)+o+e,-r*f,r*l,-r*(-f*o+l*a)+a+t,0,0,1),this}scale(e,t){return this.premultiply(Lv.makeScale(e,t)),this}rotate(e){return this.premultiply(Lv.makeRotation(-e)),this}translate(e,t){return this.premultiply(Lv.makeTranslation(e,t)),this}makeTranslation(e,t){return this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,i,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,i=e.elements;for(let r=0;r<9;r++)if(t[r]!==i[r])return!1;return!0}fromArray(e,t=0){for(let i=0;i<9;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const Lv=new Mt;function kL(n){for(let e=n.length-1;e>=0;--e)if(n[e]>=65535)return!0;return!1}const Z5={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function ou(n,e){return new Z5[n](e)}function Vf(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}function xu(n){return n<.04045?n*.0773993808:Math.pow(n*.9478672986+.0521327014,2.4)}function Rv(n){return n<.0031308?n*12.92:1.055*Math.pow(n,.41666)-.055}const J5=new Mt().fromArray([.8224621,.0331941,.0170827,.177538,.9668058,.0723974,-1e-7,1e-7,.9105199]),K5=new Mt().fromArray([1.2249401,-.0420569,-.0196376,-.2249404,1.0420571,-.0786361,1e-7,0,1.0982735]);function Q5(n){return n.convertSRGBToLinear().applyMatrix3(K5)}function $5(n){return n.applyMatrix3(J5).convertLinearToSRGB()}const eV={[Lu]:n=>n,[Cr]:n=>n.convertSRGBToLinear(),[$1]:Q5},tV={[Lu]:n=>n,[Cr]:n=>n.convertLinearToSRGB(),[$1]:$5},Mi={enabled:!1,get legacyMode(){return console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),!this.enabled},set legacyMode(n){console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),this.enabled=!n},get workingColorSpace(){return Lu},set workingColorSpace(n){console.warn("THREE.ColorManagement: .workingColorSpace is readonly.")},convert:function(n,e,t){if(this.enabled===!1||e===t||!e||!t)return n;const i=eV[e],r=tV[t];if(i===void 0||r===void 0)throw new Error(`Unsupported color space conversion, "${e}" to "${t}".`);return r(i(n))},fromWorkingColorSpace:function(n,e){return this.convert(n,this.workingColorSpace,e)},toWorkingColorSpace:function(n,e){return this.convert(n,e,this.workingColorSpace)}};let xl;class tS{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{xl===void 0&&(xl=Vf("canvas")),xl.width=e.width,xl.height=e.height;const i=xl.getContext("2d");e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0,e.width,e.height),t=xl}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const t=Vf("canvas");t.width=e.width,t.height=e.height;const i=t.getContext("2d");i.drawImage(e,0,0,e.width,e.height);const r=i.getImageData(0,0,e.width,e.height),s=r.data;for(let o=0;o0&&(i.userData=this.userData),t||(e.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==Mg)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case Nf:e.x=e.x-Math.floor(e.x);break;case ri:e.x=e.x<0?0:1;break;case Of:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case Nf:e.y=e.y-Math.floor(e.y);break;case ri:e.y=e.y<0?0:1;break;case Of:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}}fn.DEFAULT_IMAGE=null;fn.DEFAULT_MAPPING=Mg;fn.DEFAULT_ANISOTROPY=1;class Dt{constructor(e=0,t=0,i=0,r=1){Dt.prototype.isVector4=!0,this.x=e,this.y=t,this.z=i,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,i,r){return this.x=e,this.y=t,this.z=i,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,i=this.y,r=this.z,s=this.w,o=e.elements;return this.x=o[0]*t+o[4]*i+o[8]*r+o[12]*s,this.y=o[1]*t+o[5]*i+o[9]*r+o[13]*s,this.z=o[2]*t+o[6]*i+o[10]*r+o[14]*s,this.w=o[3]*t+o[7]*i+o[11]*r+o[15]*s,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,i,r,s;const l=e.elements,f=l[0],h=l[4],d=l[8],p=l[1],v=l[5],y=l[9],_=l[2],M=l[6],m=l[10];if(Math.abs(h-p)<.01&&Math.abs(d-_)<.01&&Math.abs(y-M)<.01){if(Math.abs(h+p)<.1&&Math.abs(d+_)<.1&&Math.abs(y+M)<.1&&Math.abs(f+v+m-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const w=(f+1)/2,A=(v+1)/2,b=(m+1)/2,P=(h+p)/4,I=(d+_)/4,L=(y+M)/4;return w>A&&w>b?w<.01?(i=0,r=.707106781,s=.707106781):(i=Math.sqrt(w),r=P/i,s=I/i):A>b?A<.01?(i=.707106781,r=0,s=.707106781):(r=Math.sqrt(A),i=P/r,s=L/r):b<.01?(i=.707106781,r=.707106781,s=0):(s=Math.sqrt(b),i=I/s,r=L/s),this.set(i,r,s,t),this}let S=Math.sqrt((M-y)*(M-y)+(d-_)*(d-_)+(p-h)*(p-h));return Math.abs(S)<.001&&(S=1),this.x=(M-y)/S,this.y=(d-_)/S,this.z=(p-h)/S,this.w=Math.acos((f+v+m-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this.w=e.w+(t.w-e.w)*i,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class Or extends rs{constructor(e=1,t=1,i={}){super(),this.isWebGLRenderTarget=!0,this.width=e,this.height=t,this.depth=1,this.scissor=new Dt(0,0,e,t),this.scissorTest=!1,this.viewport=new Dt(0,0,e,t);const r={width:e,height:t,depth:1};this.texture=new fn(r,i.mapping,i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.encoding),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=i.generateMipmaps!==void 0?i.generateMipmaps:!1,this.texture.internalFormat=i.internalFormat!==void 0?i.internalFormat:null,this.texture.minFilter=i.minFilter!==void 0?i.minFilter:gn,this.depthBuffer=i.depthBuffer!==void 0?i.depthBuffer:!0,this.stencilBuffer=i.stencilBuffer!==void 0?i.stencilBuffer:!1,this.depthTexture=i.depthTexture!==void 0?i.depthTexture:null,this.samples=i.samples!==void 0?i.samples:0}setSize(e,t,i=1){(this.width!==e||this.height!==t||this.depth!==i)&&(this.width=e,this.height=t,this.depth=i,this.texture.image.width=e,this.texture.image.height=t,this.texture.image.depth=i,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.isRenderTargetTexture=!0;const t=Object.assign({},e.texture.image);return this.texture.source=new La(t),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class Eg extends fn{constructor(e=null,t=1,i=1,r=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:i,depth:r},this.magFilter=pn,this.minFilter=pn,this.wrapR=ri,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class iV extends Or{constructor(e=1,t=1,i=1){super(e,t),this.isWebGLArrayRenderTarget=!0,this.depth=i,this.texture=new Eg(null,e,t,i),this.texture.isRenderTargetTexture=!0}}class nS extends fn{constructor(e=null,t=1,i=1,r=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:i,depth:r},this.magFilter=pn,this.minFilter=pn,this.wrapR=ri,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class rV extends Or{constructor(e=1,t=1,i=1){super(e,t),this.isWebGL3DRenderTarget=!0,this.depth=i,this.texture=new nS(null,e,t,i),this.texture.isRenderTargetTexture=!0}}class sV extends Or{constructor(e=1,t=1,i=1,r={}){super(e,t,r),this.isWebGLMultipleRenderTargets=!0;const s=this.texture;this.texture=[];for(let o=0;o=0?1:-1,w=1-m*m;if(w>Number.EPSILON){const b=Math.sqrt(w),P=Math.atan2(b,m*S);M=Math.sin(M*P)/b,a=Math.sin(a*P)/b}const A=a*S;if(l=l*M+p*A,f=f*M+v*A,h=h*M+y*A,d=d*M+_*A,M===1-a){const b=1/Math.sqrt(l*l+f*f+h*h+d*d);l*=b,f*=b,h*=b,d*=b}}e[t]=l,e[t+1]=f,e[t+2]=h,e[t+3]=d}static multiplyQuaternionsFlat(e,t,i,r,s,o){const a=i[r],l=i[r+1],f=i[r+2],h=i[r+3],d=s[o],p=s[o+1],v=s[o+2],y=s[o+3];return e[t]=a*y+h*d+l*v-f*p,e[t+1]=l*y+h*p+f*d-a*v,e[t+2]=f*y+h*v+a*p-l*d,e[t+3]=h*y-a*d-l*p-f*v,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,i,r){return this._x=e,this._y=t,this._z=i,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t){const i=e._x,r=e._y,s=e._z,o=e._order,a=Math.cos,l=Math.sin,f=a(i/2),h=a(r/2),d=a(s/2),p=l(i/2),v=l(r/2),y=l(s/2);switch(o){case"XYZ":this._x=p*h*d+f*v*y,this._y=f*v*d-p*h*y,this._z=f*h*y+p*v*d,this._w=f*h*d-p*v*y;break;case"YXZ":this._x=p*h*d+f*v*y,this._y=f*v*d-p*h*y,this._z=f*h*y-p*v*d,this._w=f*h*d+p*v*y;break;case"ZXY":this._x=p*h*d-f*v*y,this._y=f*v*d+p*h*y,this._z=f*h*y+p*v*d,this._w=f*h*d-p*v*y;break;case"ZYX":this._x=p*h*d-f*v*y,this._y=f*v*d+p*h*y,this._z=f*h*y-p*v*d,this._w=f*h*d+p*v*y;break;case"YZX":this._x=p*h*d+f*v*y,this._y=f*v*d+p*h*y,this._z=f*h*y-p*v*d,this._w=f*h*d-p*v*y;break;case"XZY":this._x=p*h*d-f*v*y,this._y=f*v*d-p*h*y,this._z=f*h*y+p*v*d,this._w=f*h*d+p*v*y;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return t!==!1&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const i=t/2,r=Math.sin(i);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,i=t[0],r=t[4],s=t[8],o=t[1],a=t[5],l=t[9],f=t[2],h=t[6],d=t[10],p=i+a+d;if(p>0){const v=.5/Math.sqrt(p+1);this._w=.25/v,this._x=(h-l)*v,this._y=(s-f)*v,this._z=(o-r)*v}else if(i>a&&i>d){const v=2*Math.sqrt(1+i-a-d);this._w=(h-l)/v,this._x=.25*v,this._y=(r+o)/v,this._z=(s+f)/v}else if(a>d){const v=2*Math.sqrt(1+a-i-d);this._w=(s-f)/v,this._x=(r+o)/v,this._y=.25*v,this._z=(l+h)/v}else{const v=2*Math.sqrt(1+d-i-a);this._w=(o-r)/v,this._x=(s+f)/v,this._y=(l+h)/v,this._z=.25*v}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let i=e.dot(t)+1;return iMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=i):(this._x=0,this._y=-e.z,this._z=e.y,this._w=i)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=i),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(cn(this.dot(e),-1,1)))}rotateTowards(e,t){const i=this.angleTo(e);if(i===0)return this;const r=Math.min(1,t/i);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const i=e._x,r=e._y,s=e._z,o=e._w,a=t._x,l=t._y,f=t._z,h=t._w;return this._x=i*h+o*a+r*f-s*l,this._y=r*h+o*l+s*a-i*f,this._z=s*h+o*f+i*l-r*a,this._w=o*h-i*a-r*l-s*f,this._onChangeCallback(),this}slerp(e,t){if(t===0)return this;if(t===1)return this.copy(e);const i=this._x,r=this._y,s=this._z,o=this._w;let a=o*e._w+i*e._x+r*e._y+s*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=i,this._y=r,this._z=s,this;const l=1-a*a;if(l<=Number.EPSILON){const v=1-t;return this._w=v*o+t*this._w,this._x=v*i+t*this._x,this._y=v*r+t*this._y,this._z=v*s+t*this._z,this.normalize(),this._onChangeCallback(),this}const f=Math.sqrt(l),h=Math.atan2(f,a),d=Math.sin((1-t)*h)/f,p=Math.sin(t*h)/f;return this._w=o*d+this._w*p,this._x=i*d+this._x*p,this._y=r*d+this._y*p,this._z=s*d+this._z*p,this._onChangeCallback(),this}slerpQuaternions(e,t,i){return this.copy(e).slerp(t,i)}random(){const e=Math.random(),t=Math.sqrt(1-e),i=Math.sqrt(e),r=2*Math.PI*Math.random(),s=2*Math.PI*Math.random();return this.set(t*Math.cos(r),i*Math.sin(s),i*Math.cos(s),t*Math.sin(r))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class N{constructor(e=0,t=0,i=0){N.prototype.isVector3=!0,this.x=e,this.y=t,this.z=i}set(e,t,i){return i===void 0&&(i=this.z),this.x=e,this.y=t,this.z=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(YE.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(YE.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,i=this.y,r=this.z,s=e.elements;return this.x=s[0]*t+s[3]*i+s[6]*r,this.y=s[1]*t+s[4]*i+s[7]*r,this.z=s[2]*t+s[5]*i+s[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,i=this.y,r=this.z,s=e.elements,o=1/(s[3]*t+s[7]*i+s[11]*r+s[15]);return this.x=(s[0]*t+s[4]*i+s[8]*r+s[12])*o,this.y=(s[1]*t+s[5]*i+s[9]*r+s[13])*o,this.z=(s[2]*t+s[6]*i+s[10]*r+s[14])*o,this}applyQuaternion(e){const t=this.x,i=this.y,r=this.z,s=e.x,o=e.y,a=e.z,l=e.w,f=l*t+o*r-a*i,h=l*i+a*t-s*r,d=l*r+s*i-o*t,p=-s*t-o*i-a*r;return this.x=f*l+p*-s+h*-a-d*-o,this.y=h*l+p*-o+d*-s-f*-a,this.z=d*l+p*-a+f*-o-h*-s,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,i=this.y,r=this.z,s=e.elements;return this.x=s[0]*t+s[4]*i+s[8]*r,this.y=s[1]*t+s[5]*i+s[9]*r,this.z=s[2]*t+s[6]*i+s[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const i=e.x,r=e.y,s=e.z,o=t.x,a=t.y,l=t.z;return this.x=r*l-s*a,this.y=s*o-i*l,this.z=i*a-r*o,this}projectOnVector(e){const t=e.lengthSq();if(t===0)return this.set(0,0,0);const i=e.dot(this)/t;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return Dv.copy(this).projectOnVector(e),this.sub(Dv)}reflect(e){return this.sub(Dv.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(cn(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y,r=this.z-e.z;return t*t+i*i+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,i){const r=Math.sin(t)*e;return this.x=r*Math.sin(i),this.y=Math.cos(t)*e,this.z=r*Math.cos(i),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,i){return this.x=e*Math.sin(t),this.y=i,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=i,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=(Math.random()-.5)*2,t=Math.random()*Math.PI*2,i=Math.sqrt(1-e**2);return this.x=i*Math.cos(t),this.y=i*Math.sin(t),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const Dv=new N,YE=new si;class ss{constructor(e=new N(1/0,1/0,1/0),t=new N(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,i=e.length;tthis.max.x||e.ythis.max.y||e.zthis.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}intersectsSphere(e){return this.clampPoint(e.center,gs),gs.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,i;return e.normal.x>0?(t=e.normal.x*this.min.x,i=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,i=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),t<=-e.constant&&i>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Ec),Jd.subVectors(this.max,Ec),Sl.subVectors(e.a,Ec),wl.subVectors(e.b,Ec),Ml.subVectors(e.c,Ec),ro.subVectors(wl,Sl),so.subVectors(Ml,wl),aa.subVectors(Sl,Ml);let t=[0,-ro.z,ro.y,0,-so.z,so.y,0,-aa.z,aa.y,ro.z,0,-ro.x,so.z,0,-so.x,aa.z,0,-aa.x,-ro.y,ro.x,0,-so.y,so.x,0,-aa.y,aa.x,0];return!kv(t,Sl,wl,Ml,Jd)||(t=[1,0,0,0,1,0,0,0,1],!kv(t,Sl,wl,Ml,Jd))?!1:(Kd.crossVectors(ro,so),t=[Kd.x,Kd.y,Kd.z],kv(t,Sl,wl,Ml,Jd))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,gs).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(gs).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(ms[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),ms[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),ms[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),ms[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),ms[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),ms[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),ms[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),ms[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(ms),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const ms=[new N,new N,new N,new N,new N,new N,new N,new N],gs=new N,_l=new ss,Sl=new N,wl=new N,Ml=new N,ro=new N,so=new N,aa=new N,Ec=new N,Jd=new N,Kd=new N,la=new N;function kv(n,e,t,i,r){for(let s=0,o=n.length-3;s<=o;s+=3){la.fromArray(n,s);const a=r.x*Math.abs(la.x)+r.y*Math.abs(la.y)+r.z*Math.abs(la.z),l=e.dot(la),f=t.dot(la),h=i.dot(la);if(Math.max(-Math.max(l,f,h),Math.min(l,f,h))>a)return!1}return!0}const oV=new ss,bc=new N,Nv=new N;class os{constructor(e=new N,t=-1){this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const i=this.center;t!==void 0?i.copy(t):oV.setFromPoints(e).getCenter(i);let r=0;for(let s=0,o=e.length;sthis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;bc.subVectors(e,this.center);const t=bc.lengthSq();if(t>this.radius*this.radius){const i=Math.sqrt(t),r=(i-this.radius)*.5;this.center.addScaledVector(bc,r/i),this.radius+=r}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(Nv.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(bc.copy(e.center).add(Nv)),this.expandByPoint(bc.copy(e.center).sub(Nv))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const vs=new N,Ov=new N,Qd=new N,oo=new N,Uv=new N,$d=new N,zv=new N;class dh{constructor(e=new N,t=new N(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,vs)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const i=t.dot(this.direction);return i<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=vs.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(vs.copy(this.origin).addScaledVector(this.direction,t),vs.distanceToSquared(e))}distanceSqToSegment(e,t,i,r){Ov.copy(e).add(t).multiplyScalar(.5),Qd.copy(t).sub(e).normalize(),oo.copy(this.origin).sub(Ov);const s=e.distanceTo(t)*.5,o=-this.direction.dot(Qd),a=oo.dot(this.direction),l=-oo.dot(Qd),f=oo.lengthSq(),h=Math.abs(1-o*o);let d,p,v,y;if(h>0)if(d=o*l-a,p=o*a-l,y=s*h,d>=0)if(p>=-y)if(p<=y){const _=1/h;d*=_,p*=_,v=d*(d+o*p+2*a)+p*(o*d+p+2*l)+f}else p=s,d=Math.max(0,-(o*p+a)),v=-d*d+p*(p+2*l)+f;else p=-s,d=Math.max(0,-(o*p+a)),v=-d*d+p*(p+2*l)+f;else p<=-y?(d=Math.max(0,-(-o*s+a)),p=d>0?-s:Math.min(Math.max(-s,-l),s),v=-d*d+p*(p+2*l)+f):p<=y?(d=0,p=Math.min(Math.max(-s,-l),s),v=p*(p+2*l)+f):(d=Math.max(0,-(o*s+a)),p=d>0?s:Math.min(Math.max(-s,-l),s),v=-d*d+p*(p+2*l)+f);else p=o>0?-s:s,d=Math.max(0,-(o*p+a)),v=-d*d+p*(p+2*l)+f;return i&&i.copy(this.origin).addScaledVector(this.direction,d),r&&r.copy(Ov).addScaledVector(Qd,p),v}intersectSphere(e,t){vs.subVectors(e.center,this.origin);const i=vs.dot(this.direction),r=vs.dot(vs)-i*i,s=e.radius*e.radius;if(r>s)return null;const o=Math.sqrt(s-r),a=i-o,l=i+o;return l<0?null:a<0?this.at(l,t):this.at(a,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;const i=-(this.origin.dot(e.normal)+e.constant)/t;return i>=0?i:null}intersectPlane(e,t){const i=this.distanceToPlane(e);return i===null?null:this.at(i,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let i,r,s,o,a,l;const f=1/this.direction.x,h=1/this.direction.y,d=1/this.direction.z,p=this.origin;return f>=0?(i=(e.min.x-p.x)*f,r=(e.max.x-p.x)*f):(i=(e.max.x-p.x)*f,r=(e.min.x-p.x)*f),h>=0?(s=(e.min.y-p.y)*h,o=(e.max.y-p.y)*h):(s=(e.max.y-p.y)*h,o=(e.min.y-p.y)*h),i>o||s>r||((s>i||isNaN(i))&&(i=s),(o=0?(a=(e.min.z-p.z)*d,l=(e.max.z-p.z)*d):(a=(e.max.z-p.z)*d,l=(e.min.z-p.z)*d),i>l||a>r)||((a>i||i!==i)&&(i=a),(l=0?i:r,t)}intersectsBox(e){return this.intersectBox(e,vs)!==null}intersectTriangle(e,t,i,r,s){Uv.subVectors(t,e),$d.subVectors(i,e),zv.crossVectors(Uv,$d);let o=this.direction.dot(zv),a;if(o>0){if(r)return null;a=1}else if(o<0)a=-1,o=-o;else return null;oo.subVectors(this.origin,e);const l=a*this.direction.dot($d.crossVectors(oo,$d));if(l<0)return null;const f=a*this.direction.dot(Uv.cross(oo));if(f<0||l+f>o)return null;const h=-a*oo.dot(zv);return h<0?null:this.at(h/o,s)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class ot{constructor(){ot.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}set(e,t,i,r,s,o,a,l,f,h,d,p,v,y,_,M){const m=this.elements;return m[0]=e,m[4]=t,m[8]=i,m[12]=r,m[1]=s,m[5]=o,m[9]=a,m[13]=l,m[2]=f,m[6]=h,m[10]=d,m[14]=p,m[3]=v,m[7]=y,m[11]=_,m[15]=M,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new ot().fromArray(this.elements)}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],t[9]=i[9],t[10]=i[10],t[11]=i[11],t[12]=i[12],t[13]=i[13],t[14]=i[14],t[15]=i[15],this}copyPosition(e){const t=this.elements,i=e.elements;return t[12]=i[12],t[13]=i[13],t[14]=i[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,i){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(e,t,i){return this.set(e.x,t.x,i.x,0,e.y,t.y,i.y,0,e.z,t.z,i.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,i=e.elements,r=1/Al.setFromMatrixColumn(e,0).length(),s=1/Al.setFromMatrixColumn(e,1).length(),o=1/Al.setFromMatrixColumn(e,2).length();return t[0]=i[0]*r,t[1]=i[1]*r,t[2]=i[2]*r,t[3]=0,t[4]=i[4]*s,t[5]=i[5]*s,t[6]=i[6]*s,t[7]=0,t[8]=i[8]*o,t[9]=i[9]*o,t[10]=i[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,i=e.x,r=e.y,s=e.z,o=Math.cos(i),a=Math.sin(i),l=Math.cos(r),f=Math.sin(r),h=Math.cos(s),d=Math.sin(s);if(e.order==="XYZ"){const p=o*h,v=o*d,y=a*h,_=a*d;t[0]=l*h,t[4]=-l*d,t[8]=f,t[1]=v+y*f,t[5]=p-_*f,t[9]=-a*l,t[2]=_-p*f,t[6]=y+v*f,t[10]=o*l}else if(e.order==="YXZ"){const p=l*h,v=l*d,y=f*h,_=f*d;t[0]=p+_*a,t[4]=y*a-v,t[8]=o*f,t[1]=o*d,t[5]=o*h,t[9]=-a,t[2]=v*a-y,t[6]=_+p*a,t[10]=o*l}else if(e.order==="ZXY"){const p=l*h,v=l*d,y=f*h,_=f*d;t[0]=p-_*a,t[4]=-o*d,t[8]=y+v*a,t[1]=v+y*a,t[5]=o*h,t[9]=_-p*a,t[2]=-o*f,t[6]=a,t[10]=o*l}else if(e.order==="ZYX"){const p=o*h,v=o*d,y=a*h,_=a*d;t[0]=l*h,t[4]=y*f-v,t[8]=p*f+_,t[1]=l*d,t[5]=_*f+p,t[9]=v*f-y,t[2]=-f,t[6]=a*l,t[10]=o*l}else if(e.order==="YZX"){const p=o*l,v=o*f,y=a*l,_=a*f;t[0]=l*h,t[4]=_-p*d,t[8]=y*d+v,t[1]=d,t[5]=o*h,t[9]=-a*h,t[2]=-f*h,t[6]=v*d+y,t[10]=p-_*d}else if(e.order==="XZY"){const p=o*l,v=o*f,y=a*l,_=a*f;t[0]=l*h,t[4]=-d,t[8]=f*h,t[1]=p*d+_,t[5]=o*h,t[9]=v*d-y,t[2]=y*d-v,t[6]=a*h,t[10]=_*d+p}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(aV,e,lV)}lookAt(e,t,i){const r=this.elements;return Ui.subVectors(e,t),Ui.lengthSq()===0&&(Ui.z=1),Ui.normalize(),ao.crossVectors(i,Ui),ao.lengthSq()===0&&(Math.abs(i.z)===1?Ui.x+=1e-4:Ui.z+=1e-4,Ui.normalize(),ao.crossVectors(i,Ui)),ao.normalize(),ep.crossVectors(Ui,ao),r[0]=ao.x,r[4]=ep.x,r[8]=Ui.x,r[1]=ao.y,r[5]=ep.y,r[9]=Ui.y,r[2]=ao.z,r[6]=ep.z,r[10]=Ui.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,r=t.elements,s=this.elements,o=i[0],a=i[4],l=i[8],f=i[12],h=i[1],d=i[5],p=i[9],v=i[13],y=i[2],_=i[6],M=i[10],m=i[14],S=i[3],w=i[7],A=i[11],b=i[15],P=r[0],I=r[4],L=r[8],C=r[12],R=r[1],W=r[5],J=r[9],j=r[13],X=r[2],Z=r[6],se=r[10],ae=r[14],D=r[3],H=r[7],B=r[11],te=r[15];return s[0]=o*P+a*R+l*X+f*D,s[4]=o*I+a*W+l*Z+f*H,s[8]=o*L+a*J+l*se+f*B,s[12]=o*C+a*j+l*ae+f*te,s[1]=h*P+d*R+p*X+v*D,s[5]=h*I+d*W+p*Z+v*H,s[9]=h*L+d*J+p*se+v*B,s[13]=h*C+d*j+p*ae+v*te,s[2]=y*P+_*R+M*X+m*D,s[6]=y*I+_*W+M*Z+m*H,s[10]=y*L+_*J+M*se+m*B,s[14]=y*C+_*j+M*ae+m*te,s[3]=S*P+w*R+A*X+b*D,s[7]=S*I+w*W+A*Z+b*H,s[11]=S*L+w*J+A*se+b*B,s[15]=S*C+w*j+A*ae+b*te,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[4],r=e[8],s=e[12],o=e[1],a=e[5],l=e[9],f=e[13],h=e[2],d=e[6],p=e[10],v=e[14],y=e[3],_=e[7],M=e[11],m=e[15];return y*(+s*l*d-r*f*d-s*a*p+i*f*p+r*a*v-i*l*v)+_*(+t*l*v-t*f*p+s*o*p-r*o*v+r*f*h-s*l*h)+M*(+t*f*d-t*a*v-s*o*d+i*o*v+s*a*h-i*f*h)+m*(-r*a*h-t*l*d+t*a*p+r*o*d-i*o*p+i*l*h)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,i){const r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=i),this}invert(){const e=this.elements,t=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],l=e[6],f=e[7],h=e[8],d=e[9],p=e[10],v=e[11],y=e[12],_=e[13],M=e[14],m=e[15],S=d*M*f-_*p*f+_*l*v-a*M*v-d*l*m+a*p*m,w=y*p*f-h*M*f-y*l*v+o*M*v+h*l*m-o*p*m,A=h*_*f-y*d*f+y*a*v-o*_*v-h*a*m+o*d*m,b=y*d*l-h*_*l-y*a*p+o*_*p+h*a*M-o*d*M,P=t*S+i*w+r*A+s*b;if(P===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const I=1/P;return e[0]=S*I,e[1]=(_*p*s-d*M*s-_*r*v+i*M*v+d*r*m-i*p*m)*I,e[2]=(a*M*s-_*l*s+_*r*f-i*M*f-a*r*m+i*l*m)*I,e[3]=(d*l*s-a*p*s-d*r*f+i*p*f+a*r*v-i*l*v)*I,e[4]=w*I,e[5]=(h*M*s-y*p*s+y*r*v-t*M*v-h*r*m+t*p*m)*I,e[6]=(y*l*s-o*M*s-y*r*f+t*M*f+o*r*m-t*l*m)*I,e[7]=(o*p*s-h*l*s+h*r*f-t*p*f-o*r*v+t*l*v)*I,e[8]=A*I,e[9]=(y*d*s-h*_*s-y*i*v+t*_*v+h*i*m-t*d*m)*I,e[10]=(o*_*s-y*a*s+y*i*f-t*_*f-o*i*m+t*a*m)*I,e[11]=(h*a*s-o*d*s-h*i*f+t*d*f+o*i*v-t*a*v)*I,e[12]=b*I,e[13]=(h*_*r-y*d*r+y*i*p-t*_*p-h*i*M+t*d*M)*I,e[14]=(y*a*r-o*_*r-y*i*l+t*_*l+o*i*M-t*a*M)*I,e[15]=(o*d*r-h*a*r+h*i*l-t*d*l-o*i*p+t*a*p)*I,this}scale(e){const t=this.elements,i=e.x,r=e.y,s=e.z;return t[0]*=i,t[4]*=r,t[8]*=s,t[1]*=i,t[5]*=r,t[9]*=s,t[2]*=i,t[6]*=r,t[10]*=s,t[3]*=i,t[7]*=r,t[11]*=s,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,i,r))}makeTranslation(e,t,i){return this.set(1,0,0,e,0,1,0,t,0,0,1,i,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,t,-i,0,0,i,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,0,i,0,0,1,0,0,-i,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,0,i,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const i=Math.cos(t),r=Math.sin(t),s=1-i,o=e.x,a=e.y,l=e.z,f=s*o,h=s*a;return this.set(f*o+i,f*a-r*l,f*l+r*a,0,f*a+r*l,h*a+i,h*l-r*o,0,f*l-r*a,h*l+r*o,s*l*l+i,0,0,0,0,1),this}makeScale(e,t,i){return this.set(e,0,0,0,0,t,0,0,0,0,i,0,0,0,0,1),this}makeShear(e,t,i,r,s,o){return this.set(1,i,s,0,e,1,o,0,t,r,1,0,0,0,0,1),this}compose(e,t,i){const r=this.elements,s=t._x,o=t._y,a=t._z,l=t._w,f=s+s,h=o+o,d=a+a,p=s*f,v=s*h,y=s*d,_=o*h,M=o*d,m=a*d,S=l*f,w=l*h,A=l*d,b=i.x,P=i.y,I=i.z;return r[0]=(1-(_+m))*b,r[1]=(v+A)*b,r[2]=(y-w)*b,r[3]=0,r[4]=(v-A)*P,r[5]=(1-(p+m))*P,r[6]=(M+S)*P,r[7]=0,r[8]=(y+w)*I,r[9]=(M-S)*I,r[10]=(1-(p+_))*I,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,i){const r=this.elements;let s=Al.set(r[0],r[1],r[2]).length();const o=Al.set(r[4],r[5],r[6]).length(),a=Al.set(r[8],r[9],r[10]).length();this.determinant()<0&&(s=-s),e.x=r[12],e.y=r[13],e.z=r[14],Mr.copy(this);const f=1/s,h=1/o,d=1/a;return Mr.elements[0]*=f,Mr.elements[1]*=f,Mr.elements[2]*=f,Mr.elements[4]*=h,Mr.elements[5]*=h,Mr.elements[6]*=h,Mr.elements[8]*=d,Mr.elements[9]*=d,Mr.elements[10]*=d,t.setFromRotationMatrix(Mr),i.x=s,i.y=o,i.z=a,this}makePerspective(e,t,i,r,s,o){const a=this.elements,l=2*s/(t-e),f=2*s/(i-r),h=(t+e)/(t-e),d=(i+r)/(i-r),p=-(o+s)/(o-s),v=-2*o*s/(o-s);return a[0]=l,a[4]=0,a[8]=h,a[12]=0,a[1]=0,a[5]=f,a[9]=d,a[13]=0,a[2]=0,a[6]=0,a[10]=p,a[14]=v,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this}makeOrthographic(e,t,i,r,s,o){const a=this.elements,l=1/(t-e),f=1/(i-r),h=1/(o-s),d=(t+e)*l,p=(i+r)*f,v=(o+s)*h;return a[0]=2*l,a[4]=0,a[8]=0,a[12]=-d,a[1]=0,a[5]=2*f,a[9]=0,a[13]=-p,a[2]=0,a[6]=0,a[10]=-2*h,a[14]=-v,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this}equals(e){const t=this.elements,i=e.elements;for(let r=0;r<16;r++)if(t[r]!==i[r])return!1;return!0}fromArray(e,t=0){for(let i=0;i<16;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e[t+9]=i[9],e[t+10]=i[10],e[t+11]=i[11],e[t+12]=i[12],e[t+13]=i[13],e[t+14]=i[14],e[t+15]=i[15],e}}const Al=new N,Mr=new ot,aV=new N(0,0,0),lV=new N(1,1,1),ao=new N,ep=new N,Ui=new N,qE=new ot,ZE=new si;class el{constructor(e=0,t=0,i=0,r=el.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=i,this._order=r}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,i,r=this._order){return this._x=e,this._y=t,this._z=i,this._order=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,i=!0){const r=e.elements,s=r[0],o=r[4],a=r[8],l=r[1],f=r[5],h=r[9],d=r[2],p=r[6],v=r[10];switch(t){case"XYZ":this._y=Math.asin(cn(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-h,v),this._z=Math.atan2(-o,s)):(this._x=Math.atan2(p,f),this._z=0);break;case"YXZ":this._x=Math.asin(-cn(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(a,v),this._z=Math.atan2(l,f)):(this._y=Math.atan2(-d,s),this._z=0);break;case"ZXY":this._x=Math.asin(cn(p,-1,1)),Math.abs(p)<.9999999?(this._y=Math.atan2(-d,v),this._z=Math.atan2(-o,f)):(this._y=0,this._z=Math.atan2(l,s));break;case"ZYX":this._y=Math.asin(-cn(d,-1,1)),Math.abs(d)<.9999999?(this._x=Math.atan2(p,v),this._z=Math.atan2(l,s)):(this._x=0,this._z=Math.atan2(-o,f));break;case"YZX":this._z=Math.asin(cn(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-h,f),this._y=Math.atan2(-d,s)):(this._x=0,this._y=Math.atan2(a,v));break;case"XZY":this._z=Math.asin(-cn(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(p,f),this._y=Math.atan2(a,s)):(this._x=Math.atan2(-h,v),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,i===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,i){return qE.makeRotationFromQuaternion(e),this.setFromRotationMatrix(qE,t,i)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return ZE.setFromEuler(this),this.setFromQuaternion(ZE,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}el.DEFAULT_ORDER="XYZ";class Ua{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let t=0;t1){for(let i=0;i0&&(i=i.concat(o))}return i}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Tc,e,cV),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Tc,fV,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let i=0,r=t.length;i0&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),r.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(r.matrixAutoUpdate=!1),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(r.instanceColor=this.instanceColor.toJSON()));function s(a,l){return a[l.uuid]===void 0&&(a[l.uuid]=l.toJSON(e)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(r.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=s(e.geometries,this.geometry);const a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){const l=a.shapes;if(Array.isArray(l))for(let f=0,h=l.length;f0){r.children=[];for(let a=0;a0){r.animations=[];for(let a=0;a0&&(i.geometries=a),l.length>0&&(i.materials=l),f.length>0&&(i.textures=f),h.length>0&&(i.images=h),d.length>0&&(i.shapes=d),p.length>0&&(i.skeletons=p),v.length>0&&(i.animations=v),y.length>0&&(i.nodes=y)}return i.object=r,i;function o(a){const l=[];for(const f in a){const h=a[f];delete h.metadata,l.push(h)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let i=0;i0?r.multiplyScalar(1/Math.sqrt(s)):r.set(0,0,0)}static getBarycoord(e,t,i,r,s){Ar.subVectors(r,t),xs.subVectors(i,t),Fv.subVectors(e,t);const o=Ar.dot(Ar),a=Ar.dot(xs),l=Ar.dot(Fv),f=xs.dot(xs),h=xs.dot(Fv),d=o*f-a*a;if(d===0)return s.set(-2,-1,-1);const p=1/d,v=(f*l-a*h)*p,y=(o*h-a*l)*p;return s.set(1-v-y,y,v)}static containsPoint(e,t,i,r){return this.getBarycoord(e,t,i,r,_s),_s.x>=0&&_s.y>=0&&_s.x+_s.y<=1}static getUV(e,t,i,r,s,o,a,l){return np===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),np=!0),this.getInterpolation(e,t,i,r,s,o,a,l)}static getInterpolation(e,t,i,r,s,o,a,l){return this.getBarycoord(e,t,i,r,_s),l.setScalar(0),l.addScaledVector(s,_s.x),l.addScaledVector(o,_s.y),l.addScaledVector(a,_s.z),l}static isFrontFacing(e,t,i,r){return Ar.subVectors(i,t),xs.subVectors(e,t),Ar.cross(xs).dot(r)<0}set(e,t,i){return this.a.copy(e),this.b.copy(t),this.c.copy(i),this}setFromPointsAndIndices(e,t,i,r){return this.a.copy(e[t]),this.b.copy(e[i]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,i,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,r),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Ar.subVectors(this.c,this.b),xs.subVectors(this.a,this.b),Ar.cross(xs).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return bi.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return bi.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,i,r,s){return np===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),np=!0),bi.getInterpolation(e,this.a,this.b,this.c,t,i,r,s)}getInterpolation(e,t,i,r,s){return bi.getInterpolation(e,this.a,this.b,this.c,t,i,r,s)}containsPoint(e){return bi.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return bi.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const i=this.a,r=this.b,s=this.c;let o,a;bl.subVectors(r,i),Tl.subVectors(s,i),Bv.subVectors(e,i);const l=bl.dot(Bv),f=Tl.dot(Bv);if(l<=0&&f<=0)return t.copy(i);Vv.subVectors(e,r);const h=bl.dot(Vv),d=Tl.dot(Vv);if(h>=0&&d<=h)return t.copy(r);const p=l*d-h*f;if(p<=0&&l>=0&&h<=0)return o=l/(l-h),t.copy(i).addScaledVector(bl,o);Hv.subVectors(e,s);const v=bl.dot(Hv),y=Tl.dot(Hv);if(y>=0&&v<=y)return t.copy(s);const _=v*f-l*y;if(_<=0&&f>=0&&y<=0)return a=f/(f-y),t.copy(i).addScaledVector(Tl,a);const M=h*y-v*d;if(M<=0&&d-h>=0&&v-y>=0)return tb.subVectors(s,r),a=(d-h)/(d-h+(v-y)),t.copy(r).addScaledVector(tb,a);const m=1/(M+_+p);return o=_*m,a=p*m,t.copy(i).addScaledVector(bl,o).addScaledVector(Tl,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}let dV=0;class Yn extends rs{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:dV++}),this.uuid=ji(),this.name="",this.type="Material",this.blending=ka,this.side=Fs,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.blendSrc=Y1,this.blendDst=q1,this.blendEquation=wa,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=Vm,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=LL,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=rm,this.stencilZFail=rm,this.stencilZPass=rm,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const t in e){const i=e[t];if(i===void 0){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}const r=this[t];if(r===void 0){console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`);continue}r&&r.isColor?r.set(i):r&&r.isVector3&&i&&i.isVector3?r.copy(i):this[t]=i}}toJSON(e){const t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});const i={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),this.roughness!==void 0&&(i.roughness=this.roughness),this.metalness!==void 0&&(i.metalness=this.metalness),this.sheen!==void 0&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(i.shininess=this.shininess),this.clearcoat!==void 0&&(i.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(i.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(i.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(e).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(e).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(e).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(e).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(e).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(i.combine=this.combine)),this.envMapIntensity!==void 0&&(i.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(i.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(i.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(i.size=this.size),this.shadowSide!==null&&(i.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==ka&&(i.blending=this.blending),this.side!==Fs&&(i.side=this.side),this.vertexColors&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),this.transparent===!0&&(i.transparent=this.transparent),i.depthFunc=this.depthFunc,i.depthTest=this.depthTest,i.depthWrite=this.depthWrite,i.colorWrite=this.colorWrite,i.stencilWrite=this.stencilWrite,i.stencilWriteMask=this.stencilWriteMask,i.stencilFunc=this.stencilFunc,i.stencilRef=this.stencilRef,i.stencilFuncMask=this.stencilFuncMask,i.stencilFail=this.stencilFail,i.stencilZFail=this.stencilZFail,i.stencilZPass=this.stencilZPass,this.rotation!==void 0&&this.rotation!==0&&(i.rotation=this.rotation),this.polygonOffset===!0&&(i.polygonOffset=!0),this.polygonOffsetFactor!==0&&(i.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(i.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(i.linewidth=this.linewidth),this.dashSize!==void 0&&(i.dashSize=this.dashSize),this.gapSize!==void 0&&(i.gapSize=this.gapSize),this.scale!==void 0&&(i.scale=this.scale),this.dithering===!0&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),this.alphaToCoverage===!0&&(i.alphaToCoverage=this.alphaToCoverage),this.premultipliedAlpha===!0&&(i.premultipliedAlpha=this.premultipliedAlpha),this.forceSinglePass===!0&&(i.forceSinglePass=this.forceSinglePass),this.wireframe===!0&&(i.wireframe=this.wireframe),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(i.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(i.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(i.flatShading=this.flatShading),this.visible===!1&&(i.visible=!1),this.toneMapped===!1&&(i.toneMapped=!1),this.fog===!1&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData);function r(s){const o=[];for(const a in s){const l=s[a];delete l.metadata,o.push(l)}return o}if(t){const s=r(e.textures),o=r(e.images);s.length>0&&(i.textures=s),o.length>0&&(i.images=o)}return i}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let i=null;if(t!==null){const r=t.length;i=new Array(r);for(let s=0;s!==r;++s)i[s]=t[s].clone()}return this.clippingPlanes=i,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}const NL={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Er={h:0,s:0,l:0},ip={h:0,s:0,l:0};function Wv(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*6*t:t<1/2?e:t<2/3?n+(e-n)*6*(2/3-t):n}class Fe{constructor(e,t,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,t===void 0&&i===void 0?this.set(e):this.setRGB(e,t,i)}set(e){return e&&e.isColor?this.copy(e):typeof e=="number"?this.setHex(e):typeof e=="string"&&this.setStyle(e),this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=Cr){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Mi.toWorkingColorSpace(this,t),this}setRGB(e,t,i,r=Mi.workingColorSpace){return this.r=e,this.g=t,this.b=i,Mi.toWorkingColorSpace(this,r),this}setHSL(e,t,i,r=Mi.workingColorSpace){if(e=eS(e,1),t=cn(t,0,1),i=cn(i,0,1),t===0)this.r=this.g=this.b=i;else{const s=i<=.5?i*(1+t):i+t-i*t,o=2*i-s;this.r=Wv(o,s,e+1/3),this.g=Wv(o,s,e),this.b=Wv(o,s,e-1/3)}return Mi.toWorkingColorSpace(this,r),this}setStyle(e,t=Cr){function i(s){s!==void 0&&parseFloat(s)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(e)){let s;const o=r[1],a=r[2];switch(o){case"rgb":case"rgba":if(s=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return this.r=Math.min(255,parseInt(s[1],10))/255,this.g=Math.min(255,parseInt(s[2],10))/255,this.b=Math.min(255,parseInt(s[3],10))/255,Mi.toWorkingColorSpace(this,t),i(s[4]),this;if(s=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return this.r=Math.min(100,parseInt(s[1],10))/100,this.g=Math.min(100,parseInt(s[2],10))/100,this.b=Math.min(100,parseInt(s[3],10))/100,Mi.toWorkingColorSpace(this,t),i(s[4]),this;break;case"hsl":case"hsla":if(s=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a)){const l=parseFloat(s[1])/360,f=parseFloat(s[2])/100,h=parseFloat(s[3])/100;return i(s[4]),this.setHSL(l,f,h,t)}break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){const s=r[1],o=s.length;if(o===3)return this.setRGB(parseInt(s.charAt(0),16)/15,parseInt(s.charAt(1),16)/15,parseInt(s.charAt(2),16)/15,t);if(o===6)return this.setHex(parseInt(s,16),t);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=Cr){const i=NL[e.toLowerCase()];return i!==void 0?this.setHex(i,t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=xu(e.r),this.g=xu(e.g),this.b=xu(e.b),this}copyLinearToSRGB(e){return this.r=Rv(e.r),this.g=Rv(e.g),this.b=Rv(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Cr){return Mi.fromWorkingColorSpace(ni.copy(this),e),cn(ni.r*255,0,255)<<16^cn(ni.g*255,0,255)<<8^cn(ni.b*255,0,255)<<0}getHexString(e=Cr){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Mi.workingColorSpace){Mi.fromWorkingColorSpace(ni.copy(this),t);const i=ni.r,r=ni.g,s=ni.b,o=Math.max(i,r,s),a=Math.min(i,r,s);let l,f;const h=(a+o)/2;if(a===o)l=0,f=0;else{const d=o-a;switch(f=h<=.5?d/(o+a):d/(2-o-a),o){case i:l=(r-s)/d+(r>-f-14,i[l|256]=1024>>-f-14|32768,r[l]=-f-1,r[l|256]=-f-1):f<=15?(i[l]=f+15<<10,i[l|256]=f+15<<10|32768,r[l]=13,r[l|256]=13):f<128?(i[l]=31744,i[l|256]=64512,r[l]=24,r[l|256]=24):(i[l]=31744,i[l|256]=64512,r[l]=13,r[l|256]=13)}const s=new Uint32Array(2048),o=new Uint32Array(64),a=new Uint32Array(64);for(let l=1;l<1024;++l){let f=l<<13,h=0;for(;!(f&8388608);)f<<=1,h-=8388608;f&=-8388609,h+=947912704,s[l]=f|h}for(let l=1024;l<2048;++l)s[l]=939524096+(l-1024<<13);for(let l=1;l<31;++l)o[l]=l<<23;o[31]=1199570944,o[32]=2147483648;for(let l=33;l<63;++l)o[l]=2147483648+(l-32<<23);o[63]=3347054592;for(let l=1;l<64;++l)l!==32&&(a[l]=1024);return{floatView:e,uint32View:t,baseTable:i,shiftTable:r,mantissaTable:s,exponentTable:o,offsetTable:a}}function Ai(n){Math.abs(n)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),n=cn(n,-65504,65504),As.floatView[0]=n;const e=As.uint32View[0],t=e>>23&511;return As.baseTable[t]+((e&8388607)>>As.shiftTable[t])}function Wc(n){const e=n>>10;return As.uint32View[0]=As.mantissaTable[As.offsetTable[e]+(n&1023)]+As.exponentTable[e],As.floatView[0]}const mV={toHalfFloat:Ai,fromHalfFloat:Wc},Sn=new N,rp=new ye;class Bt{constructor(e,t,i=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=i,this.usage=Bf,this.updateRange={offset:0,count:-1},this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this}copyAt(e,t,i){e*=this.itemSize,i*=t.itemSize;for(let r=0,s=this.itemSize;r0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const f in l)l[f]!==void 0&&(e[f]=l[f]);return e}e.data={attributes:{}};const t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const i=this.attributes;for(const l in i){const f=i[l];e.data.attributes[l]=f.toJSON(e.data)}const r={};let s=!1;for(const l in this.morphAttributes){const f=this.morphAttributes[l],h=[];for(let d=0,p=f.length;d0&&(r[l]=h,s=!0)}s&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const a=this.boundingSphere;return a!==null&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const i=e.index;i!==null&&this.setIndex(i.clone(t));const r=e.attributes;for(const f in r){const h=r[f];this.setAttribute(f,h.clone(t))}const s=e.morphAttributes;for(const f in s){const h=[],d=s[f];for(let p=0,v=d.length;p0){const r=t[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;s(e.far-e.near)**2))||(nb.copy(s).invert(),Yr.copy(e.ray).applyMatrix4(nb),i.boundingBox!==null&&Yr.intersectsBox(i.boundingBox)===!1))return;let o;const a=i.index,l=i.attributes.position,f=i.attributes.uv,h=i.attributes.uv2,d=i.attributes.normal,p=i.groups,v=i.drawRange;if(a!==null)if(Array.isArray(r))for(let y=0,_=p.length;y<_;y++){const M=p[y],m=r[M.materialIndex],S=Math.max(M.start,v.start),w=Math.min(a.count,Math.min(M.start+M.count,v.start+v.count));for(let A=S,b=w;At.far?null:{distance:f,point:fp.clone(),object:n}}function hp(n,e,t,i,r,s,o,a,l,f){n.getVertexPosition(a,Pl),n.getVertexPosition(l,Ll),n.getVertexPosition(f,Rl);const h=AV(n,e,t,i,Pl,Ll,Rl,cp);if(h){r&&(ap.fromBufferAttribute(r,a),lp.fromBufferAttribute(r,l),up.fromBufferAttribute(r,f),h.uv=bi.getInterpolation(cp,Pl,Ll,Rl,ap,lp,up,new ye)),s&&(ap.fromBufferAttribute(s,a),lp.fromBufferAttribute(s,l),up.fromBufferAttribute(s,f),h.uv2=bi.getInterpolation(cp,Pl,Ll,Rl,ap,lp,up,new ye)),o&&(rb.fromBufferAttribute(o,a),sb.fromBufferAttribute(o,l),ob.fromBufferAttribute(o,f),h.normal=bi.getInterpolation(cp,Pl,Ll,Rl,rb,sb,ob,new N),h.normal.dot(i.direction)>0&&h.normal.multiplyScalar(-1));const d={a,b:l,c:f,normal:new N,materialIndex:0};bi.getNormal(Pl,Ll,Rl,d.normal),h.face=d}return h}class qo extends dt{constructor(e=1,t=1,i=1,r=1,s=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:i,widthSegments:r,heightSegments:s,depthSegments:o};const a=this;r=Math.floor(r),s=Math.floor(s),o=Math.floor(o);const l=[],f=[],h=[],d=[];let p=0,v=0;y("z","y","x",-1,-1,i,t,e,o,s,0),y("z","y","x",1,-1,i,t,-e,o,s,1),y("x","z","y",1,1,e,i,t,r,o,2),y("x","z","y",1,-1,e,i,-t,r,o,3),y("x","y","z",1,-1,e,t,i,r,s,4),y("x","y","z",-1,-1,e,t,-i,r,s,5),this.setIndex(l),this.setAttribute("position",new We(f,3)),this.setAttribute("normal",new We(h,3)),this.setAttribute("uv",new We(d,2));function y(_,M,m,S,w,A,b,P,I,L,C){const R=A/I,W=b/L,J=A/2,j=b/2,X=P/2,Z=I+1,se=L+1;let ae=0,D=0;const H=new N;for(let B=0;B0?1:-1,h.push(H.x,H.y,H.z),d.push($/I),d.push(1-B/L),ae+=1}}for(let B=0;B0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader;const i={};for(const r in this.extensions)this.extensions[r]===!0&&(i[r]=!0);return Object.keys(i).length>0&&(t.extensions=i),t}}class dh extends Tt{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new ot,this.projectionMatrix=new ot,this.projectionMatrixInverse=new ot}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(-t[8],-t[9],-t[10]).normalize()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}class Wt extends dh{constructor(e=50,t=1,i=.1,r=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=i,this.far=r,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=Ru*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(Oa*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return Ru*2*Math.atan(Math.tan(Oa*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,t,i,r,s,o){this.aspect=e/t,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=r,this.view.width=s,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(Oa*.5*this.fov)/this.zoom,i=2*t,r=this.aspect*i,s=-.5*r;const o=this.view;if(this.view!==null&&this.view.enabled){const l=o.fullWidth,f=o.fullHeight;s+=o.offsetX*r/l,t-=o.offsetY*i/f,r*=o.width/l,i*=o.height/f}const a=this.filmOffset;a!==0&&(s+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(s,s+r,t,t-i,e,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,this.view!==null&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}const Il=-90,Dl=1;class sS extends Tt{constructor(e,t,i){super(),this.type="CubeCamera",this.renderTarget=i;const r=new Wt(Il,Dl,e,t);r.layers=this.layers,r.up.set(0,1,0),r.lookAt(1,0,0),this.add(r);const s=new Wt(Il,Dl,e,t);s.layers=this.layers,s.up.set(0,1,0),s.lookAt(-1,0,0),this.add(s);const o=new Wt(Il,Dl,e,t);o.layers=this.layers,o.up.set(0,0,-1),o.lookAt(0,1,0),this.add(o);const a=new Wt(Il,Dl,e,t);a.layers=this.layers,a.up.set(0,0,1),a.lookAt(0,-1,0),this.add(a);const l=new Wt(Il,Dl,e,t);l.layers=this.layers,l.up.set(0,1,0),l.lookAt(0,0,1),this.add(l);const f=new Wt(Il,Dl,e,t);f.layers=this.layers,f.up.set(0,1,0),f.lookAt(0,0,-1),this.add(f)}update(e,t){this.parent===null&&this.updateMatrixWorld();const i=this.renderTarget,[r,s,o,a,l,f]=this.children,h=e.getRenderTarget(),d=e.toneMapping,p=e.xr.enabled;e.toneMapping=kr,e.xr.enabled=!1;const v=i.texture.generateMipmaps;i.texture.generateMipmaps=!1,e.setRenderTarget(i,0),e.render(t,r),e.setRenderTarget(i,1),e.render(t,s),e.setRenderTarget(i,2),e.render(t,o),e.setRenderTarget(i,3),e.render(t,a),e.setRenderTarget(i,4),e.render(t,l),i.texture.generateMipmaps=v,e.setRenderTarget(i,5),e.render(t,f),e.setRenderTarget(h),e.toneMapping=d,e.xr.enabled=p,i.texture.needsPMREMUpdate=!0}}class ph extends fn{constructor(e,t,i,r,s,o,a,l,f,h){e=e!==void 0?e:[],t=t!==void 0?t:Uo,super(e,t,i,r,s,o,a,l,f,h),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class oS extends Or{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const i={width:e,height:e,depth:1},r=[i,i,i,i,i,i];this.texture=new ph(r,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.encoding),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=t.generateMipmaps!==void 0?t.generateMipmaps:!1,this.texture.minFilter=t.minFilter!==void 0?t.minFilter:gn}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.encoding=t.encoding,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const i={uniforms:{tEquirect:{value:null}},vertexShader:` +}`;class is extends Yn{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=bV,this.fragmentShader=TV,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,e!==void 0&&this.setValues(e)}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=Iu(e.uniforms),this.uniformsGroups=EV(e.uniformsGroups),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.fog=e.fog,this.lights=e.lights,this.clipping=e.clipping,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this}toJSON(e){const t=super.toJSON(e);t.glslVersion=this.glslVersion,t.uniforms={};for(const r in this.uniforms){const o=this.uniforms[r].value;o&&o.isTexture?t.uniforms[r]={type:"t",value:o.toJSON(e).uuid}:o&&o.isColor?t.uniforms[r]={type:"c",value:o.getHex()}:o&&o.isVector2?t.uniforms[r]={type:"v2",value:o.toArray()}:o&&o.isVector3?t.uniforms[r]={type:"v3",value:o.toArray()}:o&&o.isVector4?t.uniforms[r]={type:"v4",value:o.toArray()}:o&&o.isMatrix3?t.uniforms[r]={type:"m3",value:o.toArray()}:o&&o.isMatrix4?t.uniforms[r]={type:"m4",value:o.toArray()}:t.uniforms[r]={value:o}}Object.keys(this.defines).length>0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader;const i={};for(const r in this.extensions)this.extensions[r]===!0&&(i[r]=!0);return Object.keys(i).length>0&&(t.extensions=i),t}}class ph extends Tt{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new ot,this.projectionMatrix=new ot,this.projectionMatrixInverse=new ot}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(-t[8],-t[9],-t[10]).normalize()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}class Wt extends ph{constructor(e=50,t=1,i=.1,r=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=i,this.far=r,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=Ru*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(Oa*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return Ru*2*Math.atan(Math.tan(Oa*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,t,i,r,s,o){this.aspect=e/t,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=r,this.view.width=s,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(Oa*.5*this.fov)/this.zoom,i=2*t,r=this.aspect*i,s=-.5*r;const o=this.view;if(this.view!==null&&this.view.enabled){const l=o.fullWidth,f=o.fullHeight;s+=o.offsetX*r/l,t-=o.offsetY*i/f,r*=o.width/l,i*=o.height/f}const a=this.filmOffset;a!==0&&(s+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(s,s+r,t,t-i,e,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,this.view!==null&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}const Il=-90,Dl=1;class sS extends Tt{constructor(e,t,i){super(),this.type="CubeCamera",this.renderTarget=i;const r=new Wt(Il,Dl,e,t);r.layers=this.layers,r.up.set(0,1,0),r.lookAt(1,0,0),this.add(r);const s=new Wt(Il,Dl,e,t);s.layers=this.layers,s.up.set(0,1,0),s.lookAt(-1,0,0),this.add(s);const o=new Wt(Il,Dl,e,t);o.layers=this.layers,o.up.set(0,0,-1),o.lookAt(0,1,0),this.add(o);const a=new Wt(Il,Dl,e,t);a.layers=this.layers,a.up.set(0,0,1),a.lookAt(0,-1,0),this.add(a);const l=new Wt(Il,Dl,e,t);l.layers=this.layers,l.up.set(0,1,0),l.lookAt(0,0,1),this.add(l);const f=new Wt(Il,Dl,e,t);f.layers=this.layers,f.up.set(0,1,0),f.lookAt(0,0,-1),this.add(f)}update(e,t){this.parent===null&&this.updateMatrixWorld();const i=this.renderTarget,[r,s,o,a,l,f]=this.children,h=e.getRenderTarget(),d=e.toneMapping,p=e.xr.enabled;e.toneMapping=kr,e.xr.enabled=!1;const v=i.texture.generateMipmaps;i.texture.generateMipmaps=!1,e.setRenderTarget(i,0),e.render(t,r),e.setRenderTarget(i,1),e.render(t,s),e.setRenderTarget(i,2),e.render(t,o),e.setRenderTarget(i,3),e.render(t,a),e.setRenderTarget(i,4),e.render(t,l),i.texture.generateMipmaps=v,e.setRenderTarget(i,5),e.render(t,f),e.setRenderTarget(h),e.toneMapping=d,e.xr.enabled=p,i.texture.needsPMREMUpdate=!0}}class mh extends fn{constructor(e,t,i,r,s,o,a,l,f,h){e=e!==void 0?e:[],t=t!==void 0?t:Uo,super(e,t,i,r,s,o,a,l,f,h),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class oS extends Or{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const i={width:e,height:e,depth:1},r=[i,i,i,i,i,i];this.texture=new mh(r,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.encoding),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=t.generateMipmaps!==void 0?t.generateMipmaps:!1,this.texture.minFilter=t.minFilter!==void 0?t.minFilter:gn}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.encoding=t.encoding,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const i={uniforms:{tEquirect:{value:null}},vertexShader:` varying vec3 vWorldDirection; @@ -114,7 +114,7 @@ Error generating stack: `+s.message+` gl_FragColor = texture2D( tEquirect, sampleUV ); } - `},r=new qo(5,5,5),s=new is({name:"CubemapFromEquirect",uniforms:Iu(i.uniforms),vertexShader:i.vertexShader,fragmentShader:i.fragmentShader,side:mi,blending:Ds});s.uniforms.tEquirect.value=t;const o=new zn(r,s),a=t.minFilter;return t.minFilter===Fo&&(t.minFilter=gn),new sS(1,10,this).update(e,o),t.minFilter=a,o.geometry.dispose(),o.material.dispose(),this}clear(e,t,i,r){const s=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(t,i,r);e.setRenderTarget(s)}}const Xv=new N,CV=new N,PV=new Mt;class po{constructor(e=new N(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,i,r){return this.normal.set(e,t,i),this.constant=r,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,i){const r=Xv.subVectors(i,t).cross(CV.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(r,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,t){const i=e.delta(Xv),r=this.normal.dot(i);if(r===0)return this.distanceToPoint(e.start)===0?t.copy(e.start):null;const s=-(e.start.dot(this.normal)+this.constant)/r;return s<0||s>1?null:t.copy(e.start).addScaledVector(i,s)}intersectsLine(e){const t=this.distanceToPoint(e.start),i=this.distanceToPoint(e.end);return t<0&&i>0||i<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const i=t||PV.getNormalMatrix(e),r=this.coplanarPoint(Xv).applyMatrix4(e),s=this.normal.applyMatrix3(i).normalize();return this.constant=-r.dot(s),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}}const ua=new os,dp=new N;class Tg{constructor(e=new po,t=new po,i=new po,r=new po,s=new po,o=new po){this.planes=[e,t,i,r,s,o]}set(e,t,i,r,s,o){const a=this.planes;return a[0].copy(e),a[1].copy(t),a[2].copy(i),a[3].copy(r),a[4].copy(s),a[5].copy(o),this}copy(e){const t=this.planes;for(let i=0;i<6;i++)t[i].copy(e.planes[i]);return this}setFromProjectionMatrix(e){const t=this.planes,i=e.elements,r=i[0],s=i[1],o=i[2],a=i[3],l=i[4],f=i[5],h=i[6],d=i[7],p=i[8],v=i[9],y=i[10],_=i[11],M=i[12],m=i[13],S=i[14],w=i[15];return t[0].setComponents(a-r,d-l,_-p,w-M).normalize(),t[1].setComponents(a+r,d+l,_+p,w+M).normalize(),t[2].setComponents(a+s,d+f,_+v,w+m).normalize(),t[3].setComponents(a-s,d-f,_-v,w-m).normalize(),t[4].setComponents(a-o,d-h,_-y,w-S).normalize(),t[5].setComponents(a+o,d+h,_+y,w+S).normalize(),this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),ua.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),ua.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(ua)}intersectsSprite(e){return ua.center.set(0,0,0),ua.radius=.7071067811865476,ua.applyMatrix4(e.matrixWorld),this.intersectsSphere(ua)}intersectsSphere(e){const t=this.planes,i=e.center,r=-e.radius;for(let s=0;s<6;s++)if(t[s].distanceToPoint(i)0?e.max.x:e.min.x,dp.y=r.normal.y>0?e.max.y:e.min.y,dp.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(dp)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let i=0;i<6;i++)if(t[i].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function zL(){let n=null,e=!1,t=null,i=null;function r(s,o){t(s,o),i=n.requestAnimationFrame(r)}return{start:function(){e!==!0&&t!==null&&(i=n.requestAnimationFrame(r),e=!0)},stop:function(){n.cancelAnimationFrame(i),e=!1},setAnimationLoop:function(s){t=s},setContext:function(s){n=s}}}function LV(n,e){const t=e.isWebGL2,i=new WeakMap;function r(f,h){const d=f.array,p=f.usage,v=n.createBuffer();n.bindBuffer(h,v),n.bufferData(h,d,p),f.onUploadCallback();let y;if(d instanceof Float32Array)y=5126;else if(d instanceof Uint16Array)if(f.isFloat16BufferAttribute)if(t)y=5131;else throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");else y=5123;else if(d instanceof Int16Array)y=5122;else if(d instanceof Uint32Array)y=5125;else if(d instanceof Int32Array)y=5124;else if(d instanceof Int8Array)y=5120;else if(d instanceof Uint8Array)y=5121;else if(d instanceof Uint8ClampedArray)y=5121;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+d);return{buffer:v,type:y,bytesPerElement:d.BYTES_PER_ELEMENT,version:f.version}}function s(f,h,d){const p=h.array,v=h.updateRange;n.bindBuffer(d,f),v.count===-1?n.bufferSubData(d,0,p):(t?n.bufferSubData(d,v.offset*p.BYTES_PER_ELEMENT,p,v.offset,v.count):n.bufferSubData(d,v.offset*p.BYTES_PER_ELEMENT,p.subarray(v.offset,v.offset+v.count)),v.count=-1),h.onUploadCallback()}function o(f){return f.isInterleavedBufferAttribute&&(f=f.data),i.get(f)}function a(f){f.isInterleavedBufferAttribute&&(f=f.data);const h=i.get(f);h&&(n.deleteBuffer(h.buffer),i.delete(f))}function l(f,h){if(f.isGLBufferAttribute){const p=i.get(f);(!p||p.version1?null:t.copy(e.start).addScaledVector(i,s)}intersectsLine(e){const t=this.distanceToPoint(e.start),i=this.distanceToPoint(e.end);return t<0&&i>0||i<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const i=t||PV.getNormalMatrix(e),r=this.coplanarPoint(Xv).applyMatrix4(e),s=this.normal.applyMatrix3(i).normalize();return this.constant=-r.dot(s),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}}const ua=new os,dp=new N;class bg{constructor(e=new po,t=new po,i=new po,r=new po,s=new po,o=new po){this.planes=[e,t,i,r,s,o]}set(e,t,i,r,s,o){const a=this.planes;return a[0].copy(e),a[1].copy(t),a[2].copy(i),a[3].copy(r),a[4].copy(s),a[5].copy(o),this}copy(e){const t=this.planes;for(let i=0;i<6;i++)t[i].copy(e.planes[i]);return this}setFromProjectionMatrix(e){const t=this.planes,i=e.elements,r=i[0],s=i[1],o=i[2],a=i[3],l=i[4],f=i[5],h=i[6],d=i[7],p=i[8],v=i[9],y=i[10],_=i[11],M=i[12],m=i[13],S=i[14],w=i[15];return t[0].setComponents(a-r,d-l,_-p,w-M).normalize(),t[1].setComponents(a+r,d+l,_+p,w+M).normalize(),t[2].setComponents(a+s,d+f,_+v,w+m).normalize(),t[3].setComponents(a-s,d-f,_-v,w-m).normalize(),t[4].setComponents(a-o,d-h,_-y,w-S).normalize(),t[5].setComponents(a+o,d+h,_+y,w+S).normalize(),this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),ua.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),ua.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(ua)}intersectsSprite(e){return ua.center.set(0,0,0),ua.radius=.7071067811865476,ua.applyMatrix4(e.matrixWorld),this.intersectsSphere(ua)}intersectsSphere(e){const t=this.planes,i=e.center,r=-e.radius;for(let s=0;s<6;s++)if(t[s].distanceToPoint(i)0?e.max.x:e.min.x,dp.y=r.normal.y>0?e.max.y:e.min.y,dp.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(dp)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let i=0;i<6;i++)if(t[i].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function zL(){let n=null,e=!1,t=null,i=null;function r(s,o){t(s,o),i=n.requestAnimationFrame(r)}return{start:function(){e!==!0&&t!==null&&(i=n.requestAnimationFrame(r),e=!0)},stop:function(){n.cancelAnimationFrame(i),e=!1},setAnimationLoop:function(s){t=s},setContext:function(s){n=s}}}function LV(n,e){const t=e.isWebGL2,i=new WeakMap;function r(f,h){const d=f.array,p=f.usage,v=n.createBuffer();n.bindBuffer(h,v),n.bufferData(h,d,p),f.onUploadCallback();let y;if(d instanceof Float32Array)y=5126;else if(d instanceof Uint16Array)if(f.isFloat16BufferAttribute)if(t)y=5131;else throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");else y=5123;else if(d instanceof Int16Array)y=5122;else if(d instanceof Uint32Array)y=5125;else if(d instanceof Int32Array)y=5124;else if(d instanceof Int8Array)y=5120;else if(d instanceof Uint8Array)y=5121;else if(d instanceof Uint8ClampedArray)y=5121;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+d);return{buffer:v,type:y,bytesPerElement:d.BYTES_PER_ELEMENT,version:f.version}}function s(f,h,d){const p=h.array,v=h.updateRange;n.bindBuffer(d,f),v.count===-1?n.bufferSubData(d,0,p):(t?n.bufferSubData(d,v.offset*p.BYTES_PER_ELEMENT,p,v.offset,v.count):n.bufferSubData(d,v.offset*p.BYTES_PER_ELEMENT,p.subarray(v.offset,v.offset+v.count)),v.count=-1),h.onUploadCallback()}function o(f){return f.isInterleavedBufferAttribute&&(f=f.data),i.get(f)}function a(f){f.isInterleavedBufferAttribute&&(f=f.data);const h=i.get(f);h&&(n.deleteBuffer(h.buffer),i.delete(f))}function l(f,h){if(f.isGLBufferAttribute){const p=i.get(f);(!p||p.version #include #include -}`,mt={alphamap_fragment:RV,alphamap_pars_fragment:IV,alphatest_fragment:DV,alphatest_pars_fragment:kV,aomap_fragment:NV,aomap_pars_fragment:OV,begin_vertex:UV,beginnormal_vertex:zV,bsdfs:FV,iridescence_fragment:BV,bumpmap_pars_fragment:VV,clipping_planes_fragment:HV,clipping_planes_pars_fragment:WV,clipping_planes_pars_vertex:GV,clipping_planes_vertex:jV,color_fragment:XV,color_pars_fragment:YV,color_pars_vertex:qV,color_vertex:ZV,common:JV,cube_uv_reflection_fragment:KV,defaultnormal_vertex:QV,displacementmap_pars_vertex:$V,displacementmap_vertex:e6,emissivemap_fragment:t6,emissivemap_pars_fragment:n6,encodings_fragment:i6,encodings_pars_fragment:r6,envmap_fragment:s6,envmap_common_pars_fragment:o6,envmap_pars_fragment:a6,envmap_pars_vertex:l6,envmap_physical_pars_fragment:_6,envmap_vertex:u6,fog_vertex:c6,fog_pars_vertex:f6,fog_fragment:h6,fog_pars_fragment:d6,gradientmap_pars_fragment:p6,lightmap_fragment:m6,lightmap_pars_fragment:g6,lights_lambert_fragment:v6,lights_lambert_pars_fragment:y6,lights_pars_begin:x6,lights_toon_fragment:S6,lights_toon_pars_fragment:w6,lights_phong_fragment:M6,lights_phong_pars_fragment:A6,lights_physical_fragment:E6,lights_physical_pars_fragment:b6,lights_fragment_begin:T6,lights_fragment_maps:C6,lights_fragment_end:P6,logdepthbuf_fragment:L6,logdepthbuf_pars_fragment:R6,logdepthbuf_pars_vertex:I6,logdepthbuf_vertex:D6,map_fragment:k6,map_pars_fragment:N6,map_particle_fragment:O6,map_particle_pars_fragment:U6,metalnessmap_fragment:z6,metalnessmap_pars_fragment:F6,morphcolor_vertex:B6,morphnormal_vertex:V6,morphtarget_pars_vertex:H6,morphtarget_vertex:W6,normal_fragment_begin:G6,normal_fragment_maps:j6,normal_pars_fragment:X6,normal_pars_vertex:Y6,normal_vertex:q6,normalmap_pars_fragment:Z6,clearcoat_normal_fragment_begin:J6,clearcoat_normal_fragment_maps:K6,clearcoat_pars_fragment:Q6,iridescence_pars_fragment:$6,output_fragment:eH,packing:tH,premultiplied_alpha_fragment:nH,project_vertex:iH,dithering_fragment:rH,dithering_pars_fragment:sH,roughnessmap_fragment:oH,roughnessmap_pars_fragment:aH,shadowmap_pars_fragment:lH,shadowmap_pars_vertex:uH,shadowmap_vertex:cH,shadowmask_pars_fragment:fH,skinbase_vertex:hH,skinning_pars_vertex:dH,skinning_vertex:pH,skinnormal_vertex:mH,specularmap_fragment:gH,specularmap_pars_fragment:vH,tonemapping_fragment:yH,tonemapping_pars_fragment:xH,transmission_fragment:_H,transmission_pars_fragment:SH,uv_pars_fragment:wH,uv_pars_vertex:MH,uv_vertex:AH,worldpos_vertex:EH,background_vert:bH,background_frag:TH,backgroundCube_vert:CH,backgroundCube_frag:PH,cube_vert:LH,cube_frag:RH,depth_vert:IH,depth_frag:DH,distanceRGBA_vert:kH,distanceRGBA_frag:NH,equirect_vert:OH,equirect_frag:UH,linedashed_vert:zH,linedashed_frag:FH,meshbasic_vert:BH,meshbasic_frag:VH,meshlambert_vert:HH,meshlambert_frag:WH,meshmatcap_vert:GH,meshmatcap_frag:jH,meshnormal_vert:XH,meshnormal_frag:YH,meshphong_vert:qH,meshphong_frag:ZH,meshphysical_vert:JH,meshphysical_frag:KH,meshtoon_vert:QH,meshtoon_frag:$H,points_vert:e8,points_frag:t8,shadow_vert:n8,shadow_frag:i8,sprite_vert:r8,sprite_frag:s8},De={common:{diffuse:{value:new Fe(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Mt},alphaMap:{value:null},alphaMapTransform:{value:new Mt},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Mt}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Mt}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Mt}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Mt},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Mt},normalScale:{value:new ye(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Mt},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Mt}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Mt}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Mt}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Fe(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Fe(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new Mt}},sprite:{diffuse:{value:new Fe(16777215)},opacity:{value:1},center:{value:new ye(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Mt},alphaMap:{value:null},alphaTest:{value:0}}},Lr={basic:{uniforms:fi([De.common,De.specularmap,De.envmap,De.aomap,De.lightmap,De.fog]),vertexShader:mt.meshbasic_vert,fragmentShader:mt.meshbasic_frag},lambert:{uniforms:fi([De.common,De.specularmap,De.envmap,De.aomap,De.lightmap,De.emissivemap,De.bumpmap,De.normalmap,De.displacementmap,De.fog,De.lights,{emissive:{value:new Fe(0)}}]),vertexShader:mt.meshlambert_vert,fragmentShader:mt.meshlambert_frag},phong:{uniforms:fi([De.common,De.specularmap,De.envmap,De.aomap,De.lightmap,De.emissivemap,De.bumpmap,De.normalmap,De.displacementmap,De.fog,De.lights,{emissive:{value:new Fe(0)},specular:{value:new Fe(1118481)},shininess:{value:30}}]),vertexShader:mt.meshphong_vert,fragmentShader:mt.meshphong_frag},standard:{uniforms:fi([De.common,De.envmap,De.aomap,De.lightmap,De.emissivemap,De.bumpmap,De.normalmap,De.displacementmap,De.roughnessmap,De.metalnessmap,De.fog,De.lights,{emissive:{value:new Fe(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:mt.meshphysical_vert,fragmentShader:mt.meshphysical_frag},toon:{uniforms:fi([De.common,De.aomap,De.lightmap,De.emissivemap,De.bumpmap,De.normalmap,De.displacementmap,De.gradientmap,De.fog,De.lights,{emissive:{value:new Fe(0)}}]),vertexShader:mt.meshtoon_vert,fragmentShader:mt.meshtoon_frag},matcap:{uniforms:fi([De.common,De.bumpmap,De.normalmap,De.displacementmap,De.fog,{matcap:{value:null}}]),vertexShader:mt.meshmatcap_vert,fragmentShader:mt.meshmatcap_frag},points:{uniforms:fi([De.points,De.fog]),vertexShader:mt.points_vert,fragmentShader:mt.points_frag},dashed:{uniforms:fi([De.common,De.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:mt.linedashed_vert,fragmentShader:mt.linedashed_frag},depth:{uniforms:fi([De.common,De.displacementmap]),vertexShader:mt.depth_vert,fragmentShader:mt.depth_frag},normal:{uniforms:fi([De.common,De.bumpmap,De.normalmap,De.displacementmap,{opacity:{value:1}}]),vertexShader:mt.meshnormal_vert,fragmentShader:mt.meshnormal_frag},sprite:{uniforms:fi([De.sprite,De.fog]),vertexShader:mt.sprite_vert,fragmentShader:mt.sprite_frag},background:{uniforms:{uvTransform:{value:new Mt},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:mt.background_vert,fragmentShader:mt.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:mt.backgroundCube_vert,fragmentShader:mt.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:mt.cube_vert,fragmentShader:mt.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:mt.equirect_vert,fragmentShader:mt.equirect_frag},distanceRGBA:{uniforms:fi([De.common,De.displacementmap,{referencePosition:{value:new N},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:mt.distanceRGBA_vert,fragmentShader:mt.distanceRGBA_frag},shadow:{uniforms:fi([De.lights,De.fog,{color:{value:new Fe(0)},opacity:{value:1}}]),vertexShader:mt.shadow_vert,fragmentShader:mt.shadow_frag}};Lr.physical={uniforms:fi([Lr.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Mt},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Mt},clearcoatNormalScale:{value:new ye(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Mt},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Mt},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Mt},sheen:{value:0},sheenColor:{value:new Fe(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Mt},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Mt},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Mt},transmissionSamplerSize:{value:new ye},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Mt},attenuationDistance:{value:0},attenuationColor:{value:new Fe(0)},specularColor:{value:new Fe(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Mt},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Mt}}]),vertexShader:mt.meshphysical_vert,fragmentShader:mt.meshphysical_frag};const pp={r:0,b:0,g:0};function o8(n,e,t,i,r,s,o){const a=new Fe(0);let l=s===!0?0:1,f,h,d=null,p=0,v=null;function y(M,m){let S=!1,w=m.isScene===!0?m.background:null;w&&w.isTexture&&(w=(m.backgroundBlurriness>0?t:e).get(w));const A=n.xr,b=A.getSession&&A.getSession();b&&b.environmentBlendMode==="additive"&&(w=null),w===null?_(a,l):w&&w.isColor&&(_(w,1),S=!0),(n.autoClear||S)&&n.clear(n.autoClearColor,n.autoClearDepth,n.autoClearStencil),w&&(w.isCubeTexture||w.mapping===Bu)?(h===void 0&&(h=new zn(new qo(1,1,1),new is({name:"BackgroundCubeMaterial",uniforms:Iu(Lr.backgroundCube.uniforms),vertexShader:Lr.backgroundCube.vertexShader,fragmentShader:Lr.backgroundCube.fragmentShader,side:mi,depthTest:!1,depthWrite:!1,fog:!1})),h.geometry.deleteAttribute("normal"),h.geometry.deleteAttribute("uv"),h.onBeforeRender=function(P,I,L){this.matrixWorld.copyPosition(L.matrixWorld)},Object.defineProperty(h.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(h)),h.material.uniforms.envMap.value=w,h.material.uniforms.flipEnvMap.value=w.isCubeTexture&&w.isRenderTargetTexture===!1?-1:1,h.material.uniforms.backgroundBlurriness.value=m.backgroundBlurriness,h.material.uniforms.backgroundIntensity.value=m.backgroundIntensity,h.material.toneMapped=w.encoding!==zt,(d!==w||p!==w.version||v!==n.toneMapping)&&(h.material.needsUpdate=!0,d=w,p=w.version,v=n.toneMapping),h.layers.enableAll(),M.unshift(h,h.geometry,h.material,0,0,null)):w&&w.isTexture&&(f===void 0&&(f=new zn(new Vu(2,2),new is({name:"BackgroundMaterial",uniforms:Iu(Lr.background.uniforms),vertexShader:Lr.background.vertexShader,fragmentShader:Lr.background.fragmentShader,side:Fs,depthTest:!1,depthWrite:!1,fog:!1})),f.geometry.deleteAttribute("normal"),Object.defineProperty(f.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(f)),f.material.uniforms.t2D.value=w,f.material.uniforms.backgroundIntensity.value=m.backgroundIntensity,f.material.toneMapped=w.encoding!==zt,w.matrixAutoUpdate===!0&&w.updateMatrix(),f.material.uniforms.uvTransform.value.copy(w.matrix),(d!==w||p!==w.version||v!==n.toneMapping)&&(f.material.needsUpdate=!0,d=w,p=w.version,v=n.toneMapping),f.layers.enableAll(),M.unshift(f,f.geometry,f.material,0,0,null))}function _(M,m){M.getRGB(pp,OL(n)),i.buffers.color.setClear(pp.r,pp.g,pp.b,m,o)}return{getClearColor:function(){return a},setClearColor:function(M,m=1){a.set(M),l=m,_(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(M){l=M,_(a,l)},render:y}}function a8(n,e,t,i){const r=n.getParameter(34921),s=i.isWebGL2?null:e.get("OES_vertex_array_object"),o=i.isWebGL2||s!==null,a={},l=M(null);let f=l,h=!1;function d(X,Z,se,ae,D){let H=!1;if(o){const B=_(ae,se,Z);f!==B&&(f=B,v(f.object)),H=m(X,ae,se,D),H&&S(X,ae,se,D)}else{const B=Z.wireframe===!0;(f.geometry!==ae.id||f.program!==se.id||f.wireframe!==B)&&(f.geometry=ae.id,f.program=se.id,f.wireframe=B,H=!0)}D!==null&&t.update(D,34963),(H||h)&&(h=!1,L(X,Z,se,ae),D!==null&&n.bindBuffer(34963,t.get(D).buffer))}function p(){return i.isWebGL2?n.createVertexArray():s.createVertexArrayOES()}function v(X){return i.isWebGL2?n.bindVertexArray(X):s.bindVertexArrayOES(X)}function y(X){return i.isWebGL2?n.deleteVertexArray(X):s.deleteVertexArrayOES(X)}function _(X,Z,se){const ae=se.wireframe===!0;let D=a[X.id];D===void 0&&(D={},a[X.id]=D);let H=D[Z.id];H===void 0&&(H={},D[Z.id]=H);let B=H[ae];return B===void 0&&(B=M(p()),H[ae]=B),B}function M(X){const Z=[],se=[],ae=[];for(let D=0;D=0){const ue=D[$];let Ee=H[$];if(Ee===void 0&&($==="instanceMatrix"&&X.instanceMatrix&&(Ee=X.instanceMatrix),$==="instanceColor"&&X.instanceColor&&(Ee=X.instanceColor)),ue===void 0||ue.attribute!==Ee||Ee&&ue.data!==Ee.data)return!0;B++}return f.attributesNum!==B||f.index!==ae}function S(X,Z,se,ae){const D={},H=Z.attributes;let B=0;const te=se.getAttributes();for(const $ in te)if(te[$].location>=0){let ue=H[$];ue===void 0&&($==="instanceMatrix"&&X.instanceMatrix&&(ue=X.instanceMatrix),$==="instanceColor"&&X.instanceColor&&(ue=X.instanceColor));const Ee={};Ee.attribute=ue,ue&&ue.data&&(Ee.data=ue.data),D[$]=Ee,B++}f.attributes=D,f.attributesNum=B,f.index=ae}function w(){const X=f.newAttributes;for(let Z=0,se=X.length;Z=0){let ee=D[te];if(ee===void 0&&(te==="instanceMatrix"&&X.instanceMatrix&&(ee=X.instanceMatrix),te==="instanceColor"&&X.instanceColor&&(ee=X.instanceColor)),ee!==void 0){const ue=ee.normalized,Ee=ee.itemSize,we=t.get(ee);if(we===void 0)continue;const Q=we.buffer,Xe=we.type,Ye=we.bytesPerElement;if(ee.isInterleavedBufferAttribute){const xe=ee.data,Me=xe.stride,ge=ee.offset;if(xe.isInstancedInterleavedBuffer){for(let oe=0;oe<$.locationSize;oe++)b($.location+oe,xe.meshPerAttribute);X.isInstancedMesh!==!0&&ae._maxInstanceCount===void 0&&(ae._maxInstanceCount=xe.meshPerAttribute*xe.count)}else for(let oe=0;oe<$.locationSize;oe++)A($.location+oe);n.bindBuffer(34962,Q);for(let oe=0;oe<$.locationSize;oe++)I($.location+oe,Ee/$.locationSize,Xe,ue,Me*Ye,(ge+Ee/$.locationSize*oe)*Ye)}else{if(ee.isInstancedBufferAttribute){for(let xe=0;xe<$.locationSize;xe++)b($.location+xe,ee.meshPerAttribute);X.isInstancedMesh!==!0&&ae._maxInstanceCount===void 0&&(ae._maxInstanceCount=ee.meshPerAttribute*ee.count)}else for(let xe=0;xe<$.locationSize;xe++)A($.location+xe);n.bindBuffer(34962,Q);for(let xe=0;xe<$.locationSize;xe++)I($.location+xe,Ee/$.locationSize,Xe,ue,Ee*Ye,Ee/$.locationSize*xe*Ye)}}else if(B!==void 0){const ue=B[te];if(ue!==void 0)switch(ue.length){case 2:n.vertexAttrib2fv($.location,ue);break;case 3:n.vertexAttrib3fv($.location,ue);break;case 4:n.vertexAttrib4fv($.location,ue);break;default:n.vertexAttrib1fv($.location,ue)}}}}P()}function C(){J();for(const X in a){const Z=a[X];for(const se in Z){const ae=Z[se];for(const D in ae)y(ae[D].object),delete ae[D];delete Z[se]}delete a[X]}}function R(X){if(a[X.id]===void 0)return;const Z=a[X.id];for(const se in Z){const ae=Z[se];for(const D in ae)y(ae[D].object),delete ae[D];delete Z[se]}delete a[X.id]}function W(X){for(const Z in a){const se=a[Z];if(se[X.id]===void 0)continue;const ae=se[X.id];for(const D in ae)y(ae[D].object),delete ae[D];delete se[X.id]}}function J(){j(),h=!0,f!==l&&(f=l,v(f.object))}function j(){l.geometry=null,l.program=null,l.wireframe=!1}return{setup:d,reset:J,resetDefaultState:j,dispose:C,releaseStatesOfGeometry:R,releaseStatesOfProgram:W,initAttributes:w,enableAttribute:A,disableUnusedAttributes:P}}function l8(n,e,t,i){const r=i.isWebGL2;let s;function o(f){s=f}function a(f,h){n.drawArrays(s,f,h),t.update(h,s,1)}function l(f,h,d){if(d===0)return;let p,v;if(r)p=n,v="drawArraysInstanced";else if(p=e.get("ANGLE_instanced_arrays"),v="drawArraysInstancedANGLE",p===null){console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");return}p[v](s,f,h,d),t.update(h,s,d)}this.setMode=o,this.render=a,this.renderInstances=l}function u8(n,e,t){let i;function r(){if(i!==void 0)return i;if(e.has("EXT_texture_filter_anisotropic")===!0){const I=e.get("EXT_texture_filter_anisotropic");i=n.getParameter(I.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else i=0;return i}function s(I){if(I==="highp"){if(n.getShaderPrecisionFormat(35633,36338).precision>0&&n.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";I="mediump"}return I==="mediump"&&n.getShaderPrecisionFormat(35633,36337).precision>0&&n.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}const o=typeof WebGL2RenderingContext<"u"&&n.constructor.name==="WebGL2RenderingContext";let a=t.precision!==void 0?t.precision:"highp";const l=s(a);l!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",l,"instead."),a=l);const f=o||e.has("WEBGL_draw_buffers"),h=t.logarithmicDepthBuffer===!0,d=n.getParameter(34930),p=n.getParameter(35660),v=n.getParameter(3379),y=n.getParameter(34076),_=n.getParameter(34921),M=n.getParameter(36347),m=n.getParameter(36348),S=n.getParameter(36349),w=p>0,A=o||e.has("OES_texture_float"),b=w&&A,P=o?n.getParameter(36183):0;return{isWebGL2:o,drawBuffers:f,getMaxAnisotropy:r,getMaxPrecision:s,precision:a,logarithmicDepthBuffer:h,maxTextures:d,maxVertexTextures:p,maxTextureSize:v,maxCubemapSize:y,maxAttributes:_,maxVertexUniforms:M,maxVaryings:m,maxFragmentUniforms:S,vertexTextures:w,floatFragmentTextures:A,floatVertexTextures:b,maxSamples:P}}function c8(n){const e=this;let t=null,i=0,r=!1,s=!1;const o=new po,a=new Mt,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(d,p){const v=d.length!==0||p||i!==0||r;return r=p,i=d.length,v},this.beginShadows=function(){s=!0,h(null)},this.endShadows=function(){s=!1},this.setGlobalState=function(d,p){t=h(d,p,0)},this.setState=function(d,p,v){const y=d.clippingPlanes,_=d.clipIntersection,M=d.clipShadows,m=n.get(d);if(!r||y===null||y.length===0||s&&!M)s?h(null):f();else{const S=s?0:i,w=S*4;let A=m.clippingState||null;l.value=A,A=h(y,p,w,v);for(let b=0;b!==w;++b)A[b]=t[b];m.clippingState=A,this.numIntersection=_?this.numPlanes:0,this.numPlanes+=S}};function f(){l.value!==t&&(l.value=t,l.needsUpdate=i>0),e.numPlanes=i,e.numIntersection=0}function h(d,p,v,y){const _=d!==null?d.length:0;let M=null;if(_!==0){if(M=l.value,y!==!0||M===null){const m=v+_*4,S=p.matrixWorldInverse;a.getNormalMatrix(S),(M===null||M.length0){const f=new oS(l.height/2);return f.fromEquirectangularTexture(n,o),e.set(o,f),o.addEventListener("dispose",r),t(f.texture,o.mapping)}else return null}}return o}function r(o){const a=o.target;a.removeEventListener("dispose",r);const l=e.get(a);l!==void 0&&(e.delete(a),l.dispose())}function s(){e=new WeakMap}return{get:i,dispose:s}}class ts extends dh{constructor(e=-1,t=1,i=1,r=-1,s=.1,o=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=i,this.bottom=r,this.near=s,this.far=o,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,t,i,r,s,o){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=r,this.view.width=s,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,r=(this.top+this.bottom)/2;let s=i-e,o=i+e,a=r+t,l=r-t;if(this.view!==null&&this.view.enabled){const f=(this.right-this.left)/this.view.fullWidth/this.zoom,h=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=f*this.view.offsetX,o=s+f*this.view.width,a-=h*this.view.offsetY,l=a-h*this.view.height}this.projectionMatrix.makeOrthographic(s,o,a,l,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}}const au=4,ab=[.125,.215,.35,.446,.526,.582],Ma=20,Yv=new ts,lb=new Fe;let qv=null;const Sa=(1+Math.sqrt(5))/2,kl=1/Sa,ub=[new N(1,1,1),new N(-1,1,1),new N(1,1,-1),new N(-1,1,-1),new N(0,Sa,kl),new N(0,Sa,-kl),new N(kl,0,Sa),new N(-kl,0,Sa),new N(Sa,kl,0),new N(-Sa,kl,0)];class c_{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,i=.1,r=100){qv=this._renderer.getRenderTarget(),this._setSize(256);const s=this._allocateTargets();return s.depthBuffer=!0,this._sceneToCubeUV(e,i,r,s),t>0&&this._blur(s,0,0,t),this._applyPMREM(s),this._cleanup(s),s}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=hb(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=fb(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e2?w:0,w,w),h.setRenderTarget(r),_&&h.render(y,a),h.render(e,a)}y.geometry.dispose(),y.material.dispose(),h.toneMapping=p,h.autoClear=d,e.background=M}_textureToCubeUV(e,t){const i=this._renderer,r=e.mapping===Uo||e.mapping===zo;r?(this._cubemapMaterial===null&&(this._cubemapMaterial=hb()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=fb());const s=r?this._cubemapMaterial:this._equirectMaterial,o=new zn(this._lodPlanes[0],s),a=s.uniforms;a.envMap.value=e;const l=this._cubeSize;mp(t,0,0,3*l,2*l),i.setRenderTarget(t),i.render(o,Yv)}_applyPMREM(e){const t=this._renderer,i=t.autoClear;t.autoClear=!1;for(let r=1;rMa&&console.warn(`sigmaRadians, ${s}, is too large and will clip, as it requested ${M} samples when the maximum is set to ${Ma}`);const m=[];let S=0;for(let I=0;Iw-au?r-w+au:0),P=4*(this._cubeSize-A);mp(t,b,P,3*A,2*A),l.setRenderTarget(t),l.render(d,Yv)}}function h8(n){const e=[],t=[],i=[];let r=n;const s=n-au+1+ab.length;for(let o=0;on-au?l=ab[o-n+au-1]:o===0&&(l=0),i.push(l);const f=1/(a-2),h=-f,d=1+f,p=[h,h,d,h,d,d,h,h,d,d,h,d],v=6,y=6,_=3,M=2,m=1,S=new Float32Array(_*y*v),w=new Float32Array(M*y*v),A=new Float32Array(m*y*v);for(let P=0;P2?0:-1,C=[I,L,0,I+2/3,L,0,I+2/3,L+1,0,I,L,0,I+2/3,L+1,0,I,L+1,0];S.set(C,_*y*P),w.set(p,M*y*P);const R=[P,P,P,P,P,P];A.set(R,m*y*P)}const b=new dt;b.setAttribute("position",new Bt(S,_)),b.setAttribute("uv",new Bt(w,M)),b.setAttribute("faceIndex",new Bt(A,m)),e.push(b),r>au&&r--}return{lodPlanes:e,sizeLods:t,sigmas:i}}function cb(n,e,t){const i=new Or(n,e,t);return i.texture.mapping=Bu,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function mp(n,e,t,i,r){n.viewport.set(e,t,i,r),n.scissor.set(e,t,i,r)}function d8(n,e,t){const i=new Float32Array(Ma),r=new N(0,1,0);return new is({name:"SphericalGaussianBlur",defines:{n:Ma,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${n}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:i},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:r}},vertexShader:aS(),fragmentShader:` +}`,mt={alphamap_fragment:RV,alphamap_pars_fragment:IV,alphatest_fragment:DV,alphatest_pars_fragment:kV,aomap_fragment:NV,aomap_pars_fragment:OV,begin_vertex:UV,beginnormal_vertex:zV,bsdfs:FV,iridescence_fragment:BV,bumpmap_pars_fragment:VV,clipping_planes_fragment:HV,clipping_planes_pars_fragment:WV,clipping_planes_pars_vertex:GV,clipping_planes_vertex:jV,color_fragment:XV,color_pars_fragment:YV,color_pars_vertex:qV,color_vertex:ZV,common:JV,cube_uv_reflection_fragment:KV,defaultnormal_vertex:QV,displacementmap_pars_vertex:$V,displacementmap_vertex:e6,emissivemap_fragment:t6,emissivemap_pars_fragment:n6,encodings_fragment:i6,encodings_pars_fragment:r6,envmap_fragment:s6,envmap_common_pars_fragment:o6,envmap_pars_fragment:a6,envmap_pars_vertex:l6,envmap_physical_pars_fragment:_6,envmap_vertex:u6,fog_vertex:c6,fog_pars_vertex:f6,fog_fragment:h6,fog_pars_fragment:d6,gradientmap_pars_fragment:p6,lightmap_fragment:m6,lightmap_pars_fragment:g6,lights_lambert_fragment:v6,lights_lambert_pars_fragment:y6,lights_pars_begin:x6,lights_toon_fragment:S6,lights_toon_pars_fragment:w6,lights_phong_fragment:M6,lights_phong_pars_fragment:A6,lights_physical_fragment:E6,lights_physical_pars_fragment:b6,lights_fragment_begin:T6,lights_fragment_maps:C6,lights_fragment_end:P6,logdepthbuf_fragment:L6,logdepthbuf_pars_fragment:R6,logdepthbuf_pars_vertex:I6,logdepthbuf_vertex:D6,map_fragment:k6,map_pars_fragment:N6,map_particle_fragment:O6,map_particle_pars_fragment:U6,metalnessmap_fragment:z6,metalnessmap_pars_fragment:F6,morphcolor_vertex:B6,morphnormal_vertex:V6,morphtarget_pars_vertex:H6,morphtarget_vertex:W6,normal_fragment_begin:G6,normal_fragment_maps:j6,normal_pars_fragment:X6,normal_pars_vertex:Y6,normal_vertex:q6,normalmap_pars_fragment:Z6,clearcoat_normal_fragment_begin:J6,clearcoat_normal_fragment_maps:K6,clearcoat_pars_fragment:Q6,iridescence_pars_fragment:$6,output_fragment:eH,packing:tH,premultiplied_alpha_fragment:nH,project_vertex:iH,dithering_fragment:rH,dithering_pars_fragment:sH,roughnessmap_fragment:oH,roughnessmap_pars_fragment:aH,shadowmap_pars_fragment:lH,shadowmap_pars_vertex:uH,shadowmap_vertex:cH,shadowmask_pars_fragment:fH,skinbase_vertex:hH,skinning_pars_vertex:dH,skinning_vertex:pH,skinnormal_vertex:mH,specularmap_fragment:gH,specularmap_pars_fragment:vH,tonemapping_fragment:yH,tonemapping_pars_fragment:xH,transmission_fragment:_H,transmission_pars_fragment:SH,uv_pars_fragment:wH,uv_pars_vertex:MH,uv_vertex:AH,worldpos_vertex:EH,background_vert:bH,background_frag:TH,backgroundCube_vert:CH,backgroundCube_frag:PH,cube_vert:LH,cube_frag:RH,depth_vert:IH,depth_frag:DH,distanceRGBA_vert:kH,distanceRGBA_frag:NH,equirect_vert:OH,equirect_frag:UH,linedashed_vert:zH,linedashed_frag:FH,meshbasic_vert:BH,meshbasic_frag:VH,meshlambert_vert:HH,meshlambert_frag:WH,meshmatcap_vert:GH,meshmatcap_frag:jH,meshnormal_vert:XH,meshnormal_frag:YH,meshphong_vert:qH,meshphong_frag:ZH,meshphysical_vert:JH,meshphysical_frag:KH,meshtoon_vert:QH,meshtoon_frag:$H,points_vert:e8,points_frag:t8,shadow_vert:n8,shadow_frag:i8,sprite_vert:r8,sprite_frag:s8},De={common:{diffuse:{value:new Fe(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Mt},alphaMap:{value:null},alphaMapTransform:{value:new Mt},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Mt}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Mt}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Mt}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Mt},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Mt},normalScale:{value:new ye(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Mt},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Mt}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Mt}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Mt}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Fe(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Fe(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new Mt}},sprite:{diffuse:{value:new Fe(16777215)},opacity:{value:1},center:{value:new ye(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Mt},alphaMap:{value:null},alphaTest:{value:0}}},Lr={basic:{uniforms:fi([De.common,De.specularmap,De.envmap,De.aomap,De.lightmap,De.fog]),vertexShader:mt.meshbasic_vert,fragmentShader:mt.meshbasic_frag},lambert:{uniforms:fi([De.common,De.specularmap,De.envmap,De.aomap,De.lightmap,De.emissivemap,De.bumpmap,De.normalmap,De.displacementmap,De.fog,De.lights,{emissive:{value:new Fe(0)}}]),vertexShader:mt.meshlambert_vert,fragmentShader:mt.meshlambert_frag},phong:{uniforms:fi([De.common,De.specularmap,De.envmap,De.aomap,De.lightmap,De.emissivemap,De.bumpmap,De.normalmap,De.displacementmap,De.fog,De.lights,{emissive:{value:new Fe(0)},specular:{value:new Fe(1118481)},shininess:{value:30}}]),vertexShader:mt.meshphong_vert,fragmentShader:mt.meshphong_frag},standard:{uniforms:fi([De.common,De.envmap,De.aomap,De.lightmap,De.emissivemap,De.bumpmap,De.normalmap,De.displacementmap,De.roughnessmap,De.metalnessmap,De.fog,De.lights,{emissive:{value:new Fe(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:mt.meshphysical_vert,fragmentShader:mt.meshphysical_frag},toon:{uniforms:fi([De.common,De.aomap,De.lightmap,De.emissivemap,De.bumpmap,De.normalmap,De.displacementmap,De.gradientmap,De.fog,De.lights,{emissive:{value:new Fe(0)}}]),vertexShader:mt.meshtoon_vert,fragmentShader:mt.meshtoon_frag},matcap:{uniforms:fi([De.common,De.bumpmap,De.normalmap,De.displacementmap,De.fog,{matcap:{value:null}}]),vertexShader:mt.meshmatcap_vert,fragmentShader:mt.meshmatcap_frag},points:{uniforms:fi([De.points,De.fog]),vertexShader:mt.points_vert,fragmentShader:mt.points_frag},dashed:{uniforms:fi([De.common,De.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:mt.linedashed_vert,fragmentShader:mt.linedashed_frag},depth:{uniforms:fi([De.common,De.displacementmap]),vertexShader:mt.depth_vert,fragmentShader:mt.depth_frag},normal:{uniforms:fi([De.common,De.bumpmap,De.normalmap,De.displacementmap,{opacity:{value:1}}]),vertexShader:mt.meshnormal_vert,fragmentShader:mt.meshnormal_frag},sprite:{uniforms:fi([De.sprite,De.fog]),vertexShader:mt.sprite_vert,fragmentShader:mt.sprite_frag},background:{uniforms:{uvTransform:{value:new Mt},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:mt.background_vert,fragmentShader:mt.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:mt.backgroundCube_vert,fragmentShader:mt.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:mt.cube_vert,fragmentShader:mt.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:mt.equirect_vert,fragmentShader:mt.equirect_frag},distanceRGBA:{uniforms:fi([De.common,De.displacementmap,{referencePosition:{value:new N},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:mt.distanceRGBA_vert,fragmentShader:mt.distanceRGBA_frag},shadow:{uniforms:fi([De.lights,De.fog,{color:{value:new Fe(0)},opacity:{value:1}}]),vertexShader:mt.shadow_vert,fragmentShader:mt.shadow_frag}};Lr.physical={uniforms:fi([Lr.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Mt},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Mt},clearcoatNormalScale:{value:new ye(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Mt},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Mt},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Mt},sheen:{value:0},sheenColor:{value:new Fe(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Mt},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Mt},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Mt},transmissionSamplerSize:{value:new ye},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Mt},attenuationDistance:{value:0},attenuationColor:{value:new Fe(0)},specularColor:{value:new Fe(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Mt},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Mt}}]),vertexShader:mt.meshphysical_vert,fragmentShader:mt.meshphysical_frag};const pp={r:0,b:0,g:0};function o8(n,e,t,i,r,s,o){const a=new Fe(0);let l=s===!0?0:1,f,h,d=null,p=0,v=null;function y(M,m){let S=!1,w=m.isScene===!0?m.background:null;w&&w.isTexture&&(w=(m.backgroundBlurriness>0?t:e).get(w));const A=n.xr,b=A.getSession&&A.getSession();b&&b.environmentBlendMode==="additive"&&(w=null),w===null?_(a,l):w&&w.isColor&&(_(w,1),S=!0),(n.autoClear||S)&&n.clear(n.autoClearColor,n.autoClearDepth,n.autoClearStencil),w&&(w.isCubeTexture||w.mapping===Bu)?(h===void 0&&(h=new zn(new qo(1,1,1),new is({name:"BackgroundCubeMaterial",uniforms:Iu(Lr.backgroundCube.uniforms),vertexShader:Lr.backgroundCube.vertexShader,fragmentShader:Lr.backgroundCube.fragmentShader,side:mi,depthTest:!1,depthWrite:!1,fog:!1})),h.geometry.deleteAttribute("normal"),h.geometry.deleteAttribute("uv"),h.onBeforeRender=function(P,I,L){this.matrixWorld.copyPosition(L.matrixWorld)},Object.defineProperty(h.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(h)),h.material.uniforms.envMap.value=w,h.material.uniforms.flipEnvMap.value=w.isCubeTexture&&w.isRenderTargetTexture===!1?-1:1,h.material.uniforms.backgroundBlurriness.value=m.backgroundBlurriness,h.material.uniforms.backgroundIntensity.value=m.backgroundIntensity,h.material.toneMapped=w.encoding!==zt,(d!==w||p!==w.version||v!==n.toneMapping)&&(h.material.needsUpdate=!0,d=w,p=w.version,v=n.toneMapping),h.layers.enableAll(),M.unshift(h,h.geometry,h.material,0,0,null)):w&&w.isTexture&&(f===void 0&&(f=new zn(new Vu(2,2),new is({name:"BackgroundMaterial",uniforms:Iu(Lr.background.uniforms),vertexShader:Lr.background.vertexShader,fragmentShader:Lr.background.fragmentShader,side:Fs,depthTest:!1,depthWrite:!1,fog:!1})),f.geometry.deleteAttribute("normal"),Object.defineProperty(f.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(f)),f.material.uniforms.t2D.value=w,f.material.uniforms.backgroundIntensity.value=m.backgroundIntensity,f.material.toneMapped=w.encoding!==zt,w.matrixAutoUpdate===!0&&w.updateMatrix(),f.material.uniforms.uvTransform.value.copy(w.matrix),(d!==w||p!==w.version||v!==n.toneMapping)&&(f.material.needsUpdate=!0,d=w,p=w.version,v=n.toneMapping),f.layers.enableAll(),M.unshift(f,f.geometry,f.material,0,0,null))}function _(M,m){M.getRGB(pp,OL(n)),i.buffers.color.setClear(pp.r,pp.g,pp.b,m,o)}return{getClearColor:function(){return a},setClearColor:function(M,m=1){a.set(M),l=m,_(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(M){l=M,_(a,l)},render:y}}function a8(n,e,t,i){const r=n.getParameter(34921),s=i.isWebGL2?null:e.get("OES_vertex_array_object"),o=i.isWebGL2||s!==null,a={},l=M(null);let f=l,h=!1;function d(X,Z,se,ae,D){let H=!1;if(o){const B=_(ae,se,Z);f!==B&&(f=B,v(f.object)),H=m(X,ae,se,D),H&&S(X,ae,se,D)}else{const B=Z.wireframe===!0;(f.geometry!==ae.id||f.program!==se.id||f.wireframe!==B)&&(f.geometry=ae.id,f.program=se.id,f.wireframe=B,H=!0)}D!==null&&t.update(D,34963),(H||h)&&(h=!1,L(X,Z,se,ae),D!==null&&n.bindBuffer(34963,t.get(D).buffer))}function p(){return i.isWebGL2?n.createVertexArray():s.createVertexArrayOES()}function v(X){return i.isWebGL2?n.bindVertexArray(X):s.bindVertexArrayOES(X)}function y(X){return i.isWebGL2?n.deleteVertexArray(X):s.deleteVertexArrayOES(X)}function _(X,Z,se){const ae=se.wireframe===!0;let D=a[X.id];D===void 0&&(D={},a[X.id]=D);let H=D[Z.id];H===void 0&&(H={},D[Z.id]=H);let B=H[ae];return B===void 0&&(B=M(p()),H[ae]=B),B}function M(X){const Z=[],se=[],ae=[];for(let D=0;D=0){const ue=D[$];let Ee=H[$];if(Ee===void 0&&($==="instanceMatrix"&&X.instanceMatrix&&(Ee=X.instanceMatrix),$==="instanceColor"&&X.instanceColor&&(Ee=X.instanceColor)),ue===void 0||ue.attribute!==Ee||Ee&&ue.data!==Ee.data)return!0;B++}return f.attributesNum!==B||f.index!==ae}function S(X,Z,se,ae){const D={},H=Z.attributes;let B=0;const te=se.getAttributes();for(const $ in te)if(te[$].location>=0){let ue=H[$];ue===void 0&&($==="instanceMatrix"&&X.instanceMatrix&&(ue=X.instanceMatrix),$==="instanceColor"&&X.instanceColor&&(ue=X.instanceColor));const Ee={};Ee.attribute=ue,ue&&ue.data&&(Ee.data=ue.data),D[$]=Ee,B++}f.attributes=D,f.attributesNum=B,f.index=ae}function w(){const X=f.newAttributes;for(let Z=0,se=X.length;Z=0){let ee=D[te];if(ee===void 0&&(te==="instanceMatrix"&&X.instanceMatrix&&(ee=X.instanceMatrix),te==="instanceColor"&&X.instanceColor&&(ee=X.instanceColor)),ee!==void 0){const ue=ee.normalized,Ee=ee.itemSize,we=t.get(ee);if(we===void 0)continue;const Q=we.buffer,Xe=we.type,Ye=we.bytesPerElement;if(ee.isInterleavedBufferAttribute){const xe=ee.data,Me=xe.stride,ge=ee.offset;if(xe.isInstancedInterleavedBuffer){for(let oe=0;oe<$.locationSize;oe++)b($.location+oe,xe.meshPerAttribute);X.isInstancedMesh!==!0&&ae._maxInstanceCount===void 0&&(ae._maxInstanceCount=xe.meshPerAttribute*xe.count)}else for(let oe=0;oe<$.locationSize;oe++)A($.location+oe);n.bindBuffer(34962,Q);for(let oe=0;oe<$.locationSize;oe++)I($.location+oe,Ee/$.locationSize,Xe,ue,Me*Ye,(ge+Ee/$.locationSize*oe)*Ye)}else{if(ee.isInstancedBufferAttribute){for(let xe=0;xe<$.locationSize;xe++)b($.location+xe,ee.meshPerAttribute);X.isInstancedMesh!==!0&&ae._maxInstanceCount===void 0&&(ae._maxInstanceCount=ee.meshPerAttribute*ee.count)}else for(let xe=0;xe<$.locationSize;xe++)A($.location+xe);n.bindBuffer(34962,Q);for(let xe=0;xe<$.locationSize;xe++)I($.location+xe,Ee/$.locationSize,Xe,ue,Ee*Ye,Ee/$.locationSize*xe*Ye)}}else if(B!==void 0){const ue=B[te];if(ue!==void 0)switch(ue.length){case 2:n.vertexAttrib2fv($.location,ue);break;case 3:n.vertexAttrib3fv($.location,ue);break;case 4:n.vertexAttrib4fv($.location,ue);break;default:n.vertexAttrib1fv($.location,ue)}}}}P()}function C(){J();for(const X in a){const Z=a[X];for(const se in Z){const ae=Z[se];for(const D in ae)y(ae[D].object),delete ae[D];delete Z[se]}delete a[X]}}function R(X){if(a[X.id]===void 0)return;const Z=a[X.id];for(const se in Z){const ae=Z[se];for(const D in ae)y(ae[D].object),delete ae[D];delete Z[se]}delete a[X.id]}function W(X){for(const Z in a){const se=a[Z];if(se[X.id]===void 0)continue;const ae=se[X.id];for(const D in ae)y(ae[D].object),delete ae[D];delete se[X.id]}}function J(){j(),h=!0,f!==l&&(f=l,v(f.object))}function j(){l.geometry=null,l.program=null,l.wireframe=!1}return{setup:d,reset:J,resetDefaultState:j,dispose:C,releaseStatesOfGeometry:R,releaseStatesOfProgram:W,initAttributes:w,enableAttribute:A,disableUnusedAttributes:P}}function l8(n,e,t,i){const r=i.isWebGL2;let s;function o(f){s=f}function a(f,h){n.drawArrays(s,f,h),t.update(h,s,1)}function l(f,h,d){if(d===0)return;let p,v;if(r)p=n,v="drawArraysInstanced";else if(p=e.get("ANGLE_instanced_arrays"),v="drawArraysInstancedANGLE",p===null){console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");return}p[v](s,f,h,d),t.update(h,s,d)}this.setMode=o,this.render=a,this.renderInstances=l}function u8(n,e,t){let i;function r(){if(i!==void 0)return i;if(e.has("EXT_texture_filter_anisotropic")===!0){const I=e.get("EXT_texture_filter_anisotropic");i=n.getParameter(I.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else i=0;return i}function s(I){if(I==="highp"){if(n.getShaderPrecisionFormat(35633,36338).precision>0&&n.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";I="mediump"}return I==="mediump"&&n.getShaderPrecisionFormat(35633,36337).precision>0&&n.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}const o=typeof WebGL2RenderingContext<"u"&&n.constructor.name==="WebGL2RenderingContext";let a=t.precision!==void 0?t.precision:"highp";const l=s(a);l!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",l,"instead."),a=l);const f=o||e.has("WEBGL_draw_buffers"),h=t.logarithmicDepthBuffer===!0,d=n.getParameter(34930),p=n.getParameter(35660),v=n.getParameter(3379),y=n.getParameter(34076),_=n.getParameter(34921),M=n.getParameter(36347),m=n.getParameter(36348),S=n.getParameter(36349),w=p>0,A=o||e.has("OES_texture_float"),b=w&&A,P=o?n.getParameter(36183):0;return{isWebGL2:o,drawBuffers:f,getMaxAnisotropy:r,getMaxPrecision:s,precision:a,logarithmicDepthBuffer:h,maxTextures:d,maxVertexTextures:p,maxTextureSize:v,maxCubemapSize:y,maxAttributes:_,maxVertexUniforms:M,maxVaryings:m,maxFragmentUniforms:S,vertexTextures:w,floatFragmentTextures:A,floatVertexTextures:b,maxSamples:P}}function c8(n){const e=this;let t=null,i=0,r=!1,s=!1;const o=new po,a=new Mt,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(d,p){const v=d.length!==0||p||i!==0||r;return r=p,i=d.length,v},this.beginShadows=function(){s=!0,h(null)},this.endShadows=function(){s=!1},this.setGlobalState=function(d,p){t=h(d,p,0)},this.setState=function(d,p,v){const y=d.clippingPlanes,_=d.clipIntersection,M=d.clipShadows,m=n.get(d);if(!r||y===null||y.length===0||s&&!M)s?h(null):f();else{const S=s?0:i,w=S*4;let A=m.clippingState||null;l.value=A,A=h(y,p,w,v);for(let b=0;b!==w;++b)A[b]=t[b];m.clippingState=A,this.numIntersection=_?this.numPlanes:0,this.numPlanes+=S}};function f(){l.value!==t&&(l.value=t,l.needsUpdate=i>0),e.numPlanes=i,e.numIntersection=0}function h(d,p,v,y){const _=d!==null?d.length:0;let M=null;if(_!==0){if(M=l.value,y!==!0||M===null){const m=v+_*4,S=p.matrixWorldInverse;a.getNormalMatrix(S),(M===null||M.length0){const f=new oS(l.height/2);return f.fromEquirectangularTexture(n,o),e.set(o,f),o.addEventListener("dispose",r),t(f.texture,o.mapping)}else return null}}return o}function r(o){const a=o.target;a.removeEventListener("dispose",r);const l=e.get(a);l!==void 0&&(e.delete(a),l.dispose())}function s(){e=new WeakMap}return{get:i,dispose:s}}class ts extends ph{constructor(e=-1,t=1,i=1,r=-1,s=.1,o=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=i,this.bottom=r,this.near=s,this.far=o,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,t,i,r,s,o){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=i,this.view.offsetY=r,this.view.width=s,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,r=(this.top+this.bottom)/2;let s=i-e,o=i+e,a=r+t,l=r-t;if(this.view!==null&&this.view.enabled){const f=(this.right-this.left)/this.view.fullWidth/this.zoom,h=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=f*this.view.offsetX,o=s+f*this.view.width,a-=h*this.view.offsetY,l=a-h*this.view.height}this.projectionMatrix.makeOrthographic(s,o,a,l,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}}const au=4,ab=[.125,.215,.35,.446,.526,.582],Ma=20,Yv=new ts,lb=new Fe;let qv=null;const Sa=(1+Math.sqrt(5))/2,kl=1/Sa,ub=[new N(1,1,1),new N(-1,1,1),new N(1,1,-1),new N(-1,1,-1),new N(0,Sa,kl),new N(0,Sa,-kl),new N(kl,0,Sa),new N(-kl,0,Sa),new N(Sa,kl,0),new N(-Sa,kl,0)];class c_{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,i=.1,r=100){qv=this._renderer.getRenderTarget(),this._setSize(256);const s=this._allocateTargets();return s.depthBuffer=!0,this._sceneToCubeUV(e,i,r,s),t>0&&this._blur(s,0,0,t),this._applyPMREM(s),this._cleanup(s),s}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=hb(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=fb(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e2?w:0,w,w),h.setRenderTarget(r),_&&h.render(y,a),h.render(e,a)}y.geometry.dispose(),y.material.dispose(),h.toneMapping=p,h.autoClear=d,e.background=M}_textureToCubeUV(e,t){const i=this._renderer,r=e.mapping===Uo||e.mapping===zo;r?(this._cubemapMaterial===null&&(this._cubemapMaterial=hb()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=fb());const s=r?this._cubemapMaterial:this._equirectMaterial,o=new zn(this._lodPlanes[0],s),a=s.uniforms;a.envMap.value=e;const l=this._cubeSize;mp(t,0,0,3*l,2*l),i.setRenderTarget(t),i.render(o,Yv)}_applyPMREM(e){const t=this._renderer,i=t.autoClear;t.autoClear=!1;for(let r=1;rMa&&console.warn(`sigmaRadians, ${s}, is too large and will clip, as it requested ${M} samples when the maximum is set to ${Ma}`);const m=[];let S=0;for(let I=0;Iw-au?r-w+au:0),P=4*(this._cubeSize-A);mp(t,b,P,3*A,2*A),l.setRenderTarget(t),l.render(d,Yv)}}function h8(n){const e=[],t=[],i=[];let r=n;const s=n-au+1+ab.length;for(let o=0;on-au?l=ab[o-n+au-1]:o===0&&(l=0),i.push(l);const f=1/(a-2),h=-f,d=1+f,p=[h,h,d,h,d,d,h,h,d,d,h,d],v=6,y=6,_=3,M=2,m=1,S=new Float32Array(_*y*v),w=new Float32Array(M*y*v),A=new Float32Array(m*y*v);for(let P=0;P2?0:-1,C=[I,L,0,I+2/3,L,0,I+2/3,L+1,0,I,L,0,I+2/3,L+1,0,I,L+1,0];S.set(C,_*y*P),w.set(p,M*y*P);const R=[P,P,P,P,P,P];A.set(R,m*y*P)}const b=new dt;b.setAttribute("position",new Bt(S,_)),b.setAttribute("uv",new Bt(w,M)),b.setAttribute("faceIndex",new Bt(A,m)),e.push(b),r>au&&r--}return{lodPlanes:e,sizeLods:t,sigmas:i}}function cb(n,e,t){const i=new Or(n,e,t);return i.texture.mapping=Bu,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function mp(n,e,t,i,r){n.viewport.set(e,t,i,r),n.scissor.set(e,t,i,r)}function d8(n,e,t){const i=new Float32Array(Ma),r=new N(0,1,0);return new is({name:"SphericalGaussianBlur",defines:{n:Ma,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${n}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:i},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:r}},vertexShader:aS(),fragmentShader:` precision mediump float; precision mediump int; @@ -3428,7 +3428,7 @@ void main() { gl_Position = vec4( position, 1.0 ); } - `}function p8(n){let e=new WeakMap,t=null;function i(a){if(a&&a.isTexture){const l=a.mapping,f=l===Df||l===kf,h=l===Uo||l===zo;if(f||h)if(a.isRenderTargetTexture&&a.needsPMREMUpdate===!0){a.needsPMREMUpdate=!1;let d=e.get(a);return t===null&&(t=new c_(n)),d=f?t.fromEquirectangular(a,d):t.fromCubemap(a,d),e.set(a,d),d.texture}else{if(e.has(a))return e.get(a).texture;{const d=a.image;if(f&&d&&d.height>0||h&&d&&r(d)){t===null&&(t=new c_(n));const p=f?t.fromEquirectangular(a):t.fromCubemap(a);return e.set(a,p),a.addEventListener("dispose",s),p.texture}else return null}}}return a}function r(a){let l=0;const f=6;for(let h=0;he.maxTextureSize&&(W=Math.ceil(R/e.maxTextureSize),R=e.maxTextureSize);const J=new Float32Array(R*W*4*_),j=new bg(J,R,W,_);j.type=Ps,j.needsUpdate=!0;const X=C*4;for(let se=0;se<_;se++){const ae=P[se],D=I[se],H=L[se],B=R*W*4*se;for(let te=0;te0)return n;const r=e*t;let s=db[r];if(s===void 0&&(s=new Float32Array(r),db[r]=s),e!==0){i.toArray(s,0);for(let o=1,a=0;o!==e;++o)a+=t,n[o].toArray(s,a)}return s}function Pn(n,e){if(n.length!==e.length)return!1;for(let t=0,i=n.length;t0||h&&d&&r(d)){t===null&&(t=new c_(n));const p=f?t.fromEquirectangular(a):t.fromCubemap(a);return e.set(a,p),a.addEventListener("dispose",s),p.texture}else return null}}}return a}function r(a){let l=0;const f=6;for(let h=0;he.maxTextureSize&&(W=Math.ceil(R/e.maxTextureSize),R=e.maxTextureSize);const J=new Float32Array(R*W*4*_),j=new Eg(J,R,W,_);j.type=Ps,j.needsUpdate=!0;const X=C*4;for(let se=0;se<_;se++){const ae=P[se],D=I[se],H=L[se],B=R*W*4*se;for(let te=0;te0)return n;const r=e*t;let s=db[r];if(s===void 0&&(s=new Float32Array(r),db[r]=s),e!==0){i.toArray(s,0);for(let o=1,a=0;o!==e;++o)a+=t,n[o].toArray(s,a)}return s}function Pn(n,e){if(n.length!==e.length)return!1;for(let t=0,i=n.length;t":" "} ${a}: ${t[o]}`)}return i.join(` `)}function mW(n){switch(n){case Bs:return["Linear","( value )"];case zt:return["sRGB","( value )"];default:return console.warn("THREE.WebGLProgram: Unsupported encoding:",n),["Linear","( value )"]}}function _b(n,e,t){const i=n.getShaderParameter(e,35713),r=n.getShaderInfoLog(e).trim();if(i&&r==="")return"";const s=/ERROR: 0:(\d+)/.exec(r);if(s){const o=parseInt(s[1]);return t.toUpperCase()+` @@ -3440,7 +3440,7 @@ void main() { precision `+n.precision+" int;";return n.precision==="highp"?e+=` #define HIGH_PRECISION`:n.precision==="mediump"?e+=` #define MEDIUM_PRECISION`:n.precision==="lowp"&&(e+=` -#define LOW_PRECISION`),e}function EW(n){let e="SHADOWMAP_TYPE_BASIC";return n.shadowMapType===j1?e="SHADOWMAP_TYPE_PCF":n.shadowMapType===X1?e="SHADOWMAP_TYPE_PCF_SOFT":n.shadowMapType===su&&(e="SHADOWMAP_TYPE_VSM"),e}function bW(n){let e="ENVMAP_TYPE_CUBE";if(n.envMap)switch(n.envMapMode){case Uo:case zo:e="ENVMAP_TYPE_CUBE";break;case Bu:e="ENVMAP_TYPE_CUBE_UV";break}return e}function TW(n){let e="ENVMAP_MODE_REFLECTION";if(n.envMap)switch(n.envMapMode){case zo:e="ENVMAP_MODE_REFRACTION";break}return e}function CW(n){let e="ENVMAP_BLENDING_NONE";if(n.envMap)switch(n.combine){case fh:e="ENVMAP_BLENDING_MULTIPLY";break;case iL:e="ENVMAP_BLENDING_MIX";break;case rL:e="ENVMAP_BLENDING_ADD";break}return e}function PW(n){const e=n.envMapCubeUVHeight;if(e===null)return null;const t=Math.log2(e)-2,i=1/e;return{texelWidth:1/(3*Math.max(Math.pow(2,t),7*16)),texelHeight:i,maxMip:t}}function LW(n,e,t,i){const r=n.getContext(),s=t.defines;let o=t.vertexShader,a=t.fragmentShader;const l=EW(t),f=bW(t),h=TW(t),d=CW(t),p=PW(t),v=t.isWebGL2?"":yW(t),y=xW(s),_=r.createProgram();let M,m,S=t.glslVersion?"#version "+t.glslVersion+` +#define LOW_PRECISION`),e}function EW(n){let e="SHADOWMAP_TYPE_BASIC";return n.shadowMapType===j1?e="SHADOWMAP_TYPE_PCF":n.shadowMapType===X1?e="SHADOWMAP_TYPE_PCF_SOFT":n.shadowMapType===su&&(e="SHADOWMAP_TYPE_VSM"),e}function bW(n){let e="ENVMAP_TYPE_CUBE";if(n.envMap)switch(n.envMapMode){case Uo:case zo:e="ENVMAP_TYPE_CUBE";break;case Bu:e="ENVMAP_TYPE_CUBE_UV";break}return e}function TW(n){let e="ENVMAP_MODE_REFLECTION";if(n.envMap)switch(n.envMapMode){case zo:e="ENVMAP_MODE_REFRACTION";break}return e}function CW(n){let e="ENVMAP_BLENDING_NONE";if(n.envMap)switch(n.combine){case hh:e="ENVMAP_BLENDING_MULTIPLY";break;case iL:e="ENVMAP_BLENDING_MIX";break;case rL:e="ENVMAP_BLENDING_ADD";break}return e}function PW(n){const e=n.envMapCubeUVHeight;if(e===null)return null;const t=Math.log2(e)-2,i=1/e;return{texelWidth:1/(3*Math.max(Math.pow(2,t),7*16)),texelHeight:i,maxMip:t}}function LW(n,e,t,i){const r=n.getContext(),s=t.defines;let o=t.vertexShader,a=t.fragmentShader;const l=EW(t),f=bW(t),h=TW(t),d=CW(t),p=PW(t),v=t.isWebGL2?"":yW(t),y=xW(s),_=r.createProgram();let M,m,S=t.glslVersion?"#version "+t.glslVersion+` `:"";t.isRawShaderMaterial?(M=[y].filter(Gc).join(` `),M.length>0&&(M+=` `),m=[v,y].filter(Gc).join(` @@ -3458,7 +3458,7 @@ precision `+n.precision+" int;";return n.precision==="highp"?e+=` Program Info Log: `+C+` `+X+` -`+Z)}else C!==""?console.warn("THREE.WebGLProgram: Program Info Log:",C):(R===""||W==="")&&(j=!1);j&&(this.diagnostics={runnable:J,programLog:C,vertexShader:{log:R,prefix:M},fragmentShader:{log:W,prefix:m}})}r.deleteShader(b),r.deleteShader(P);let I;this.getUniforms=function(){return I===void 0&&(I=new sm(r,_)),I};let L;return this.getAttributes=function(){return L===void 0&&(L=_W(r,_)),L},this.destroy=function(){i.releaseStatesOfProgram(this),r.deleteProgram(_),this.program=void 0},this.name=t.shaderName,this.id=dW++,this.cacheKey=e,this.usedTimes=1,this.program=_,this.vertexShader=b,this.fragmentShader=P,this}let RW=0;class IW{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,i=e.fragmentShader,r=this._getShaderStage(t),s=this._getShaderStage(i),o=this._getShaderCacheForMaterial(e);return o.has(r)===!1&&(o.add(r),r.usedTimes++),o.has(s)===!1&&(o.add(s),s.usedTimes++),this}remove(e){const t=this.materialCache.get(e);for(const i of t)i.usedTimes--,i.usedTimes===0&&this.shaderCache.delete(i.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const t=this.materialCache;let i=t.get(e);return i===void 0&&(i=new Set,t.set(e,i)),i}_getShaderStage(e){const t=this.shaderCache;let i=t.get(e);return i===void 0&&(i=new DW(e),t.set(e,i)),i}}class DW{constructor(e){this.id=RW++,this.code=e,this.usedTimes=0}}function kW(n,e,t,i,r,s,o){const a=new Ua,l=new IW,f=[],h=r.isWebGL2,d=r.logarithmicDepthBuffer,p=r.vertexTextures;let v=r.precision;const y={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function _(C){return C===1?"uv2":"uv"}function M(C,R,W,J,j){const X=J.fog,Z=j.geometry,se=C.isMeshStandardMaterial?J.environment:null,ae=(C.isMeshStandardMaterial?t:e).get(C.envMap||se),D=ae&&ae.mapping===Bu?ae.image.height:null,H=y[C.type];C.precision!==null&&(v=r.getMaxPrecision(C.precision),v!==C.precision&&console.warn("THREE.WebGLProgram.getParameters:",C.precision,"not supported, using",v,"instead."));const B=Z.morphAttributes.position||Z.morphAttributes.normal||Z.morphAttributes.color,te=B!==void 0?B.length:0;let $=0;Z.morphAttributes.position!==void 0&&($=1),Z.morphAttributes.normal!==void 0&&($=2),Z.morphAttributes.color!==void 0&&($=3);let ee,ue,Ee,we;if(H){const Ue=Lr[H];ee=Ue.vertexShader,ue=Ue.fragmentShader}else ee=C.vertexShader,ue=C.fragmentShader,l.update(C),Ee=l.getVertexShaderID(C),we=l.getFragmentShaderID(C);const Q=n.getRenderTarget(),Xe=j.isInstancedMesh===!0,Ye=!!C.map,xe=!!C.matcap,Me=!!ae,ge=!!C.aoMap,oe=!!C.lightMap,_e=!!C.bumpMap,Ne=!!C.normalMap,Ie=!!C.displacementMap,Ge=!!C.emissiveMap,qe=!!C.metalnessMap,je=!!C.roughnessMap,nt=C.clearcoat>0,_t=C.iridescence>0,z=C.sheen>0,k=C.transmission>0,le=nt&&!!C.clearcoatMap,be=nt&&!!C.clearcoatNormalMap,Te=nt&&!!C.clearcoatRoughnessMap,Re=_t&&!!C.iridescenceMap,et=_t&&!!C.iridescenceThicknessMap,ze=z&&!!C.sheenColorMap,pe=z&&!!C.sheenRoughnessMap,He=!!C.specularMap,G=!!C.specularColorMap,de=!!C.specularIntensityMap,Se=k&&!!C.transmissionMap,Pe=k&&!!C.thicknessMap,Qe=!!C.gradientMap,ct=!!C.alphaMap,Nt=C.alphaTest>0,Y=!!C.extensions,fe=!!Z.attributes.uv2;return{isWebGL2:h,shaderID:H,shaderName:C.type,vertexShader:ee,fragmentShader:ue,defines:C.defines,customVertexShaderID:Ee,customFragmentShaderID:we,isRawShaderMaterial:C.isRawShaderMaterial===!0,glslVersion:C.glslVersion,precision:v,instancing:Xe,instancingColor:Xe&&j.instanceColor!==null,supportsVertexTextures:p,outputEncoding:Q===null?n.outputEncoding:Q.isXRRenderTarget===!0?Q.texture.encoding:Bs,map:Ye,matcap:xe,envMap:Me,envMapMode:Me&&ae.mapping,envMapCubeUVHeight:D,aoMap:ge,lightMap:oe,bumpMap:_e,normalMap:Ne,displacementMap:p&&Ie,emissiveMap:Ge,normalMapObjectSpace:Ne&&C.normalMapType===PL,normalMapTangentSpace:Ne&&C.normalMapType===Xo,decodeVideoTexture:Ye&&C.map.isVideoTexture===!0&&C.map.encoding===zt,metalnessMap:qe,roughnessMap:je,clearcoat:nt,clearcoatMap:le,clearcoatNormalMap:be,clearcoatRoughnessMap:Te,iridescence:_t,iridescenceMap:Re,iridescenceThicknessMap:et,sheen:z,sheenColorMap:ze,sheenRoughnessMap:pe,specularMap:He,specularColorMap:G,specularIntensityMap:de,transmission:k,transmissionMap:Se,thicknessMap:Pe,gradientMap:Qe,opaque:C.transparent===!1&&C.blending===ka,alphaMap:ct,alphaTest:Nt,combine:C.combine,mapUv:Ye&&_(C.map.channel),aoMapUv:ge&&_(C.aoMap.channel),lightMapUv:oe&&_(C.lightMap.channel),bumpMapUv:_e&&_(C.bumpMap.channel),normalMapUv:Ne&&_(C.normalMap.channel),displacementMapUv:Ie&&_(C.displacementMap.channel),emissiveMapUv:Ge&&_(C.emissiveMap.channel),metalnessMapUv:qe&&_(C.metalnessMap.channel),roughnessMapUv:je&&_(C.roughnessMap.channel),clearcoatMapUv:le&&_(C.clearcoatMap.channel),clearcoatNormalMapUv:be&&_(C.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Te&&_(C.clearcoatRoughnessMap.channel),iridescenceMapUv:Re&&_(C.iridescenceMap.channel),iridescenceThicknessMapUv:et&&_(C.iridescenceThicknessMap.channel),sheenColorMapUv:ze&&_(C.sheenColorMap.channel),sheenRoughnessMapUv:pe&&_(C.sheenRoughnessMap.channel),specularMapUv:He&&_(C.specularMap.channel),specularColorMapUv:G&&_(C.specularColorMap.channel),specularIntensityMapUv:de&&_(C.specularIntensityMap.channel),transmissionMapUv:Se&&_(C.transmissionMap.channel),thicknessMapUv:Pe&&_(C.thicknessMap.channel),alphaMapUv:ct&&_(C.alphaMap.channel),vertexTangents:Ne&&!!Z.attributes.tangent,vertexColors:C.vertexColors,vertexAlphas:C.vertexColors===!0&&!!Z.attributes.color&&Z.attributes.color.itemSize===4,vertexUvs2:fe,pointsUvs:j.isPoints===!0&&!!Z.attributes.uv&&(Ye||ct),fog:!!X,useFog:C.fog===!0,fogExp2:X&&X.isFogExp2,flatShading:C.flatShading===!0,sizeAttenuation:C.sizeAttenuation===!0,logarithmicDepthBuffer:d,skinning:j.isSkinnedMesh===!0,morphTargets:Z.morphAttributes.position!==void 0,morphNormals:Z.morphAttributes.normal!==void 0,morphColors:Z.morphAttributes.color!==void 0,morphTargetsCount:te,morphTextureStride:$,numDirLights:R.directional.length,numPointLights:R.point.length,numSpotLights:R.spot.length,numSpotLightMaps:R.spotLightMap.length,numRectAreaLights:R.rectArea.length,numHemiLights:R.hemi.length,numDirLightShadows:R.directionalShadowMap.length,numPointLightShadows:R.pointShadowMap.length,numSpotLightShadows:R.spotShadowMap.length,numSpotLightShadowsWithMaps:R.numSpotLightShadowsWithMaps,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:C.dithering,shadowMapEnabled:n.shadowMap.enabled&&W.length>0,shadowMapType:n.shadowMap.type,toneMapping:C.toneMapped?n.toneMapping:kr,useLegacyLights:n.useLegacyLights,premultipliedAlpha:C.premultipliedAlpha,doubleSided:C.side===Rr,flipSided:C.side===mi,useDepthPacking:C.depthPacking>=0,depthPacking:C.depthPacking||0,index0AttributeName:C.index0AttributeName,extensionDerivatives:Y&&C.extensions.derivatives===!0,extensionFragDepth:Y&&C.extensions.fragDepth===!0,extensionDrawBuffers:Y&&C.extensions.drawBuffers===!0,extensionShaderTextureLOD:Y&&C.extensions.shaderTextureLOD===!0,rendererExtensionFragDepth:h||i.has("EXT_frag_depth"),rendererExtensionDrawBuffers:h||i.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:h||i.has("EXT_shader_texture_lod"),customProgramCacheKey:C.customProgramCacheKey()}}function m(C){const R=[];if(C.shaderID?R.push(C.shaderID):(R.push(C.customVertexShaderID),R.push(C.customFragmentShaderID)),C.defines!==void 0)for(const W in C.defines)R.push(W),R.push(C.defines[W]);return C.isRawShaderMaterial===!1&&(S(R,C),w(R,C),R.push(n.outputEncoding)),R.push(C.customProgramCacheKey),R.join()}function S(C,R){C.push(R.precision),C.push(R.outputEncoding),C.push(R.envMapMode),C.push(R.envMapCubeUVHeight),C.push(R.mapUv),C.push(R.alphaMapUv),C.push(R.lightMapUv),C.push(R.aoMapUv),C.push(R.bumpMapUv),C.push(R.normalMapUv),C.push(R.displacementMapUv),C.push(R.emissiveMapUv),C.push(R.metalnessMapUv),C.push(R.roughnessMapUv),C.push(R.clearcoatMapUv),C.push(R.clearcoatNormalMapUv),C.push(R.clearcoatRoughnessMapUv),C.push(R.iridescenceMapUv),C.push(R.iridescenceThicknessMapUv),C.push(R.sheenColorMapUv),C.push(R.sheenRoughnessMapUv),C.push(R.specularMapUv),C.push(R.specularColorMapUv),C.push(R.specularIntensityMapUv),C.push(R.transmissionMapUv),C.push(R.thicknessMapUv),C.push(R.combine),C.push(R.fogExp2),C.push(R.sizeAttenuation),C.push(R.morphTargetsCount),C.push(R.morphAttributeCount),C.push(R.numDirLights),C.push(R.numPointLights),C.push(R.numSpotLights),C.push(R.numSpotLightMaps),C.push(R.numHemiLights),C.push(R.numRectAreaLights),C.push(R.numDirLightShadows),C.push(R.numPointLightShadows),C.push(R.numSpotLightShadows),C.push(R.numSpotLightShadowsWithMaps),C.push(R.shadowMapType),C.push(R.toneMapping),C.push(R.numClippingPlanes),C.push(R.numClipIntersection),C.push(R.depthPacking)}function w(C,R){a.disableAll(),R.isWebGL2&&a.enable(0),R.supportsVertexTextures&&a.enable(1),R.instancing&&a.enable(2),R.instancingColor&&a.enable(3),R.matcap&&a.enable(4),R.envMap&&a.enable(5),R.normalMapObjectSpace&&a.enable(6),R.normalMapTangentSpace&&a.enable(7),R.clearcoat&&a.enable(8),R.iridescence&&a.enable(9),R.alphaTest&&a.enable(10),R.vertexColors&&a.enable(11),R.vertexAlphas&&a.enable(12),R.vertexUvs2&&a.enable(13),R.vertexTangents&&a.enable(14),C.push(a.mask),a.disableAll(),R.fog&&a.enable(0),R.useFog&&a.enable(1),R.flatShading&&a.enable(2),R.logarithmicDepthBuffer&&a.enable(3),R.skinning&&a.enable(4),R.morphTargets&&a.enable(5),R.morphNormals&&a.enable(6),R.morphColors&&a.enable(7),R.premultipliedAlpha&&a.enable(8),R.shadowMapEnabled&&a.enable(9),R.useLegacyLights&&a.enable(10),R.doubleSided&&a.enable(11),R.flipSided&&a.enable(12),R.useDepthPacking&&a.enable(13),R.dithering&&a.enable(14),R.transmission&&a.enable(15),R.sheen&&a.enable(16),R.decodeVideoTexture&&a.enable(17),R.opaque&&a.enable(18),R.pointsUvs&&a.enable(19),C.push(a.mask)}function A(C){const R=y[C.type];let W;if(R){const J=Lr[R];W=UL.clone(J.uniforms)}else W=C.uniforms;return W}function b(C,R){let W;for(let J=0,j=f.length;J0?i.push(m):v.transparent===!0?r.push(m):t.push(m)}function l(d,p,v,y,_,M){const m=o(d,p,v,y,_,M);v.transmission>0?i.unshift(m):v.transparent===!0?r.unshift(m):t.unshift(m)}function f(d,p){t.length>1&&t.sort(d||OW),i.length>1&&i.sort(p||Eb),r.length>1&&r.sort(p||Eb)}function h(){for(let d=e,p=n.length;d=s.length?(o=new bb,s.push(o)):o=s[r],o}function t(){n=new WeakMap}return{get:e,dispose:t}}function zW(){const n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new N,color:new Fe};break;case"SpotLight":t={position:new N,direction:new N,color:new Fe,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new N,color:new Fe,distance:0,decay:0};break;case"HemisphereLight":t={direction:new N,skyColor:new Fe,groundColor:new Fe};break;case"RectAreaLight":t={color:new Fe,position:new N,halfWidth:new N,halfHeight:new N};break}return n[e.id]=t,t}}}function FW(){const n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new ye};break;case"SpotLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new ye};break;case"PointLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new ye,shadowCameraNear:1,shadowCameraFar:1e3};break}return n[e.id]=t,t}}}let BW=0;function VW(n,e){return(e.castShadow?2:0)-(n.castShadow?2:0)+(e.map?1:0)-(n.map?1:0)}function HW(n,e){const t=new zW,i=FW(),r={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0};for(let h=0;h<9;h++)r.probe.push(new N);const s=new N,o=new ot,a=new ot;function l(h,d){let p=0,v=0,y=0;for(let W=0;W<9;W++)r.probe[W].set(0,0,0);let _=0,M=0,m=0,S=0,w=0,A=0,b=0,P=0,I=0,L=0;h.sort(VW);const C=d===!0?Math.PI:1;for(let W=0,J=h.length;W0&&(e.isWebGL2||n.has("OES_texture_float_linear")===!0?(r.rectAreaLTC1=De.LTC_FLOAT_1,r.rectAreaLTC2=De.LTC_FLOAT_2):n.has("OES_texture_half_float_linear")===!0?(r.rectAreaLTC1=De.LTC_HALF_1,r.rectAreaLTC2=De.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),r.ambient[0]=p,r.ambient[1]=v,r.ambient[2]=y;const R=r.hash;(R.directionalLength!==_||R.pointLength!==M||R.spotLength!==m||R.rectAreaLength!==S||R.hemiLength!==w||R.numDirectionalShadows!==A||R.numPointShadows!==b||R.numSpotShadows!==P||R.numSpotMaps!==I)&&(r.directional.length=_,r.spot.length=m,r.rectArea.length=S,r.point.length=M,r.hemi.length=w,r.directionalShadow.length=A,r.directionalShadowMap.length=A,r.pointShadow.length=b,r.pointShadowMap.length=b,r.spotShadow.length=P,r.spotShadowMap.length=P,r.directionalShadowMatrix.length=A,r.pointShadowMatrix.length=b,r.spotLightMatrix.length=P+I-L,r.spotLightMap.length=I,r.numSpotLightShadowsWithMaps=L,R.directionalLength=_,R.pointLength=M,R.spotLength=m,R.rectAreaLength=S,R.hemiLength=w,R.numDirectionalShadows=A,R.numPointShadows=b,R.numSpotShadows=P,R.numSpotMaps=I,r.version=BW++)}function f(h,d){let p=0,v=0,y=0,_=0,M=0;const m=d.matrixWorldInverse;for(let S=0,w=h.length;S=a.length?(l=new Tb(n,e),a.push(l)):l=a[o],l}function r(){t=new WeakMap}return{get:i,dispose:r}}class lS extends Xn{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=TL,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class uS extends Xn{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}const GW=`void main() { +`+Z)}else C!==""?console.warn("THREE.WebGLProgram: Program Info Log:",C):(R===""||W==="")&&(j=!1);j&&(this.diagnostics={runnable:J,programLog:C,vertexShader:{log:R,prefix:M},fragmentShader:{log:W,prefix:m}})}r.deleteShader(b),r.deleteShader(P);let I;this.getUniforms=function(){return I===void 0&&(I=new sm(r,_)),I};let L;return this.getAttributes=function(){return L===void 0&&(L=_W(r,_)),L},this.destroy=function(){i.releaseStatesOfProgram(this),r.deleteProgram(_),this.program=void 0},this.name=t.shaderName,this.id=dW++,this.cacheKey=e,this.usedTimes=1,this.program=_,this.vertexShader=b,this.fragmentShader=P,this}let RW=0;class IW{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,i=e.fragmentShader,r=this._getShaderStage(t),s=this._getShaderStage(i),o=this._getShaderCacheForMaterial(e);return o.has(r)===!1&&(o.add(r),r.usedTimes++),o.has(s)===!1&&(o.add(s),s.usedTimes++),this}remove(e){const t=this.materialCache.get(e);for(const i of t)i.usedTimes--,i.usedTimes===0&&this.shaderCache.delete(i.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const t=this.materialCache;let i=t.get(e);return i===void 0&&(i=new Set,t.set(e,i)),i}_getShaderStage(e){const t=this.shaderCache;let i=t.get(e);return i===void 0&&(i=new DW(e),t.set(e,i)),i}}class DW{constructor(e){this.id=RW++,this.code=e,this.usedTimes=0}}function kW(n,e,t,i,r,s,o){const a=new Ua,l=new IW,f=[],h=r.isWebGL2,d=r.logarithmicDepthBuffer,p=r.vertexTextures;let v=r.precision;const y={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function _(C){return C===1?"uv2":"uv"}function M(C,R,W,J,j){const X=J.fog,Z=j.geometry,se=C.isMeshStandardMaterial?J.environment:null,ae=(C.isMeshStandardMaterial?t:e).get(C.envMap||se),D=ae&&ae.mapping===Bu?ae.image.height:null,H=y[C.type];C.precision!==null&&(v=r.getMaxPrecision(C.precision),v!==C.precision&&console.warn("THREE.WebGLProgram.getParameters:",C.precision,"not supported, using",v,"instead."));const B=Z.morphAttributes.position||Z.morphAttributes.normal||Z.morphAttributes.color,te=B!==void 0?B.length:0;let $=0;Z.morphAttributes.position!==void 0&&($=1),Z.morphAttributes.normal!==void 0&&($=2),Z.morphAttributes.color!==void 0&&($=3);let ee,ue,Ee,we;if(H){const Ue=Lr[H];ee=Ue.vertexShader,ue=Ue.fragmentShader}else ee=C.vertexShader,ue=C.fragmentShader,l.update(C),Ee=l.getVertexShaderID(C),we=l.getFragmentShaderID(C);const Q=n.getRenderTarget(),Xe=j.isInstancedMesh===!0,Ye=!!C.map,xe=!!C.matcap,Me=!!ae,ge=!!C.aoMap,oe=!!C.lightMap,_e=!!C.bumpMap,Ne=!!C.normalMap,Ie=!!C.displacementMap,Ge=!!C.emissiveMap,qe=!!C.metalnessMap,je=!!C.roughnessMap,nt=C.clearcoat>0,_t=C.iridescence>0,z=C.sheen>0,k=C.transmission>0,le=nt&&!!C.clearcoatMap,be=nt&&!!C.clearcoatNormalMap,Te=nt&&!!C.clearcoatRoughnessMap,Re=_t&&!!C.iridescenceMap,et=_t&&!!C.iridescenceThicknessMap,ze=z&&!!C.sheenColorMap,pe=z&&!!C.sheenRoughnessMap,He=!!C.specularMap,G=!!C.specularColorMap,de=!!C.specularIntensityMap,Se=k&&!!C.transmissionMap,Pe=k&&!!C.thicknessMap,Qe=!!C.gradientMap,ct=!!C.alphaMap,Nt=C.alphaTest>0,Y=!!C.extensions,fe=!!Z.attributes.uv2;return{isWebGL2:h,shaderID:H,shaderName:C.type,vertexShader:ee,fragmentShader:ue,defines:C.defines,customVertexShaderID:Ee,customFragmentShaderID:we,isRawShaderMaterial:C.isRawShaderMaterial===!0,glslVersion:C.glslVersion,precision:v,instancing:Xe,instancingColor:Xe&&j.instanceColor!==null,supportsVertexTextures:p,outputEncoding:Q===null?n.outputEncoding:Q.isXRRenderTarget===!0?Q.texture.encoding:Bs,map:Ye,matcap:xe,envMap:Me,envMapMode:Me&&ae.mapping,envMapCubeUVHeight:D,aoMap:ge,lightMap:oe,bumpMap:_e,normalMap:Ne,displacementMap:p&&Ie,emissiveMap:Ge,normalMapObjectSpace:Ne&&C.normalMapType===PL,normalMapTangentSpace:Ne&&C.normalMapType===Xo,decodeVideoTexture:Ye&&C.map.isVideoTexture===!0&&C.map.encoding===zt,metalnessMap:qe,roughnessMap:je,clearcoat:nt,clearcoatMap:le,clearcoatNormalMap:be,clearcoatRoughnessMap:Te,iridescence:_t,iridescenceMap:Re,iridescenceThicknessMap:et,sheen:z,sheenColorMap:ze,sheenRoughnessMap:pe,specularMap:He,specularColorMap:G,specularIntensityMap:de,transmission:k,transmissionMap:Se,thicknessMap:Pe,gradientMap:Qe,opaque:C.transparent===!1&&C.blending===ka,alphaMap:ct,alphaTest:Nt,combine:C.combine,mapUv:Ye&&_(C.map.channel),aoMapUv:ge&&_(C.aoMap.channel),lightMapUv:oe&&_(C.lightMap.channel),bumpMapUv:_e&&_(C.bumpMap.channel),normalMapUv:Ne&&_(C.normalMap.channel),displacementMapUv:Ie&&_(C.displacementMap.channel),emissiveMapUv:Ge&&_(C.emissiveMap.channel),metalnessMapUv:qe&&_(C.metalnessMap.channel),roughnessMapUv:je&&_(C.roughnessMap.channel),clearcoatMapUv:le&&_(C.clearcoatMap.channel),clearcoatNormalMapUv:be&&_(C.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Te&&_(C.clearcoatRoughnessMap.channel),iridescenceMapUv:Re&&_(C.iridescenceMap.channel),iridescenceThicknessMapUv:et&&_(C.iridescenceThicknessMap.channel),sheenColorMapUv:ze&&_(C.sheenColorMap.channel),sheenRoughnessMapUv:pe&&_(C.sheenRoughnessMap.channel),specularMapUv:He&&_(C.specularMap.channel),specularColorMapUv:G&&_(C.specularColorMap.channel),specularIntensityMapUv:de&&_(C.specularIntensityMap.channel),transmissionMapUv:Se&&_(C.transmissionMap.channel),thicknessMapUv:Pe&&_(C.thicknessMap.channel),alphaMapUv:ct&&_(C.alphaMap.channel),vertexTangents:Ne&&!!Z.attributes.tangent,vertexColors:C.vertexColors,vertexAlphas:C.vertexColors===!0&&!!Z.attributes.color&&Z.attributes.color.itemSize===4,vertexUvs2:fe,pointsUvs:j.isPoints===!0&&!!Z.attributes.uv&&(Ye||ct),fog:!!X,useFog:C.fog===!0,fogExp2:X&&X.isFogExp2,flatShading:C.flatShading===!0,sizeAttenuation:C.sizeAttenuation===!0,logarithmicDepthBuffer:d,skinning:j.isSkinnedMesh===!0,morphTargets:Z.morphAttributes.position!==void 0,morphNormals:Z.morphAttributes.normal!==void 0,morphColors:Z.morphAttributes.color!==void 0,morphTargetsCount:te,morphTextureStride:$,numDirLights:R.directional.length,numPointLights:R.point.length,numSpotLights:R.spot.length,numSpotLightMaps:R.spotLightMap.length,numRectAreaLights:R.rectArea.length,numHemiLights:R.hemi.length,numDirLightShadows:R.directionalShadowMap.length,numPointLightShadows:R.pointShadowMap.length,numSpotLightShadows:R.spotShadowMap.length,numSpotLightShadowsWithMaps:R.numSpotLightShadowsWithMaps,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:C.dithering,shadowMapEnabled:n.shadowMap.enabled&&W.length>0,shadowMapType:n.shadowMap.type,toneMapping:C.toneMapped?n.toneMapping:kr,useLegacyLights:n.useLegacyLights,premultipliedAlpha:C.premultipliedAlpha,doubleSided:C.side===Rr,flipSided:C.side===mi,useDepthPacking:C.depthPacking>=0,depthPacking:C.depthPacking||0,index0AttributeName:C.index0AttributeName,extensionDerivatives:Y&&C.extensions.derivatives===!0,extensionFragDepth:Y&&C.extensions.fragDepth===!0,extensionDrawBuffers:Y&&C.extensions.drawBuffers===!0,extensionShaderTextureLOD:Y&&C.extensions.shaderTextureLOD===!0,rendererExtensionFragDepth:h||i.has("EXT_frag_depth"),rendererExtensionDrawBuffers:h||i.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:h||i.has("EXT_shader_texture_lod"),customProgramCacheKey:C.customProgramCacheKey()}}function m(C){const R=[];if(C.shaderID?R.push(C.shaderID):(R.push(C.customVertexShaderID),R.push(C.customFragmentShaderID)),C.defines!==void 0)for(const W in C.defines)R.push(W),R.push(C.defines[W]);return C.isRawShaderMaterial===!1&&(S(R,C),w(R,C),R.push(n.outputEncoding)),R.push(C.customProgramCacheKey),R.join()}function S(C,R){C.push(R.precision),C.push(R.outputEncoding),C.push(R.envMapMode),C.push(R.envMapCubeUVHeight),C.push(R.mapUv),C.push(R.alphaMapUv),C.push(R.lightMapUv),C.push(R.aoMapUv),C.push(R.bumpMapUv),C.push(R.normalMapUv),C.push(R.displacementMapUv),C.push(R.emissiveMapUv),C.push(R.metalnessMapUv),C.push(R.roughnessMapUv),C.push(R.clearcoatMapUv),C.push(R.clearcoatNormalMapUv),C.push(R.clearcoatRoughnessMapUv),C.push(R.iridescenceMapUv),C.push(R.iridescenceThicknessMapUv),C.push(R.sheenColorMapUv),C.push(R.sheenRoughnessMapUv),C.push(R.specularMapUv),C.push(R.specularColorMapUv),C.push(R.specularIntensityMapUv),C.push(R.transmissionMapUv),C.push(R.thicknessMapUv),C.push(R.combine),C.push(R.fogExp2),C.push(R.sizeAttenuation),C.push(R.morphTargetsCount),C.push(R.morphAttributeCount),C.push(R.numDirLights),C.push(R.numPointLights),C.push(R.numSpotLights),C.push(R.numSpotLightMaps),C.push(R.numHemiLights),C.push(R.numRectAreaLights),C.push(R.numDirLightShadows),C.push(R.numPointLightShadows),C.push(R.numSpotLightShadows),C.push(R.numSpotLightShadowsWithMaps),C.push(R.shadowMapType),C.push(R.toneMapping),C.push(R.numClippingPlanes),C.push(R.numClipIntersection),C.push(R.depthPacking)}function w(C,R){a.disableAll(),R.isWebGL2&&a.enable(0),R.supportsVertexTextures&&a.enable(1),R.instancing&&a.enable(2),R.instancingColor&&a.enable(3),R.matcap&&a.enable(4),R.envMap&&a.enable(5),R.normalMapObjectSpace&&a.enable(6),R.normalMapTangentSpace&&a.enable(7),R.clearcoat&&a.enable(8),R.iridescence&&a.enable(9),R.alphaTest&&a.enable(10),R.vertexColors&&a.enable(11),R.vertexAlphas&&a.enable(12),R.vertexUvs2&&a.enable(13),R.vertexTangents&&a.enable(14),C.push(a.mask),a.disableAll(),R.fog&&a.enable(0),R.useFog&&a.enable(1),R.flatShading&&a.enable(2),R.logarithmicDepthBuffer&&a.enable(3),R.skinning&&a.enable(4),R.morphTargets&&a.enable(5),R.morphNormals&&a.enable(6),R.morphColors&&a.enable(7),R.premultipliedAlpha&&a.enable(8),R.shadowMapEnabled&&a.enable(9),R.useLegacyLights&&a.enable(10),R.doubleSided&&a.enable(11),R.flipSided&&a.enable(12),R.useDepthPacking&&a.enable(13),R.dithering&&a.enable(14),R.transmission&&a.enable(15),R.sheen&&a.enable(16),R.decodeVideoTexture&&a.enable(17),R.opaque&&a.enable(18),R.pointsUvs&&a.enable(19),C.push(a.mask)}function A(C){const R=y[C.type];let W;if(R){const J=Lr[R];W=UL.clone(J.uniforms)}else W=C.uniforms;return W}function b(C,R){let W;for(let J=0,j=f.length;J0?i.push(m):v.transparent===!0?r.push(m):t.push(m)}function l(d,p,v,y,_,M){const m=o(d,p,v,y,_,M);v.transmission>0?i.unshift(m):v.transparent===!0?r.unshift(m):t.unshift(m)}function f(d,p){t.length>1&&t.sort(d||OW),i.length>1&&i.sort(p||Eb),r.length>1&&r.sort(p||Eb)}function h(){for(let d=e,p=n.length;d=s.length?(o=new bb,s.push(o)):o=s[r],o}function t(){n=new WeakMap}return{get:e,dispose:t}}function zW(){const n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new N,color:new Fe};break;case"SpotLight":t={position:new N,direction:new N,color:new Fe,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new N,color:new Fe,distance:0,decay:0};break;case"HemisphereLight":t={direction:new N,skyColor:new Fe,groundColor:new Fe};break;case"RectAreaLight":t={color:new Fe,position:new N,halfWidth:new N,halfHeight:new N};break}return n[e.id]=t,t}}}function FW(){const n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new ye};break;case"SpotLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new ye};break;case"PointLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new ye,shadowCameraNear:1,shadowCameraFar:1e3};break}return n[e.id]=t,t}}}let BW=0;function VW(n,e){return(e.castShadow?2:0)-(n.castShadow?2:0)+(e.map?1:0)-(n.map?1:0)}function HW(n,e){const t=new zW,i=FW(),r={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0};for(let h=0;h<9;h++)r.probe.push(new N);const s=new N,o=new ot,a=new ot;function l(h,d){let p=0,v=0,y=0;for(let W=0;W<9;W++)r.probe[W].set(0,0,0);let _=0,M=0,m=0,S=0,w=0,A=0,b=0,P=0,I=0,L=0;h.sort(VW);const C=d===!0?Math.PI:1;for(let W=0,J=h.length;W0&&(e.isWebGL2||n.has("OES_texture_float_linear")===!0?(r.rectAreaLTC1=De.LTC_FLOAT_1,r.rectAreaLTC2=De.LTC_FLOAT_2):n.has("OES_texture_half_float_linear")===!0?(r.rectAreaLTC1=De.LTC_HALF_1,r.rectAreaLTC2=De.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),r.ambient[0]=p,r.ambient[1]=v,r.ambient[2]=y;const R=r.hash;(R.directionalLength!==_||R.pointLength!==M||R.spotLength!==m||R.rectAreaLength!==S||R.hemiLength!==w||R.numDirectionalShadows!==A||R.numPointShadows!==b||R.numSpotShadows!==P||R.numSpotMaps!==I)&&(r.directional.length=_,r.spot.length=m,r.rectArea.length=S,r.point.length=M,r.hemi.length=w,r.directionalShadow.length=A,r.directionalShadowMap.length=A,r.pointShadow.length=b,r.pointShadowMap.length=b,r.spotShadow.length=P,r.spotShadowMap.length=P,r.directionalShadowMatrix.length=A,r.pointShadowMatrix.length=b,r.spotLightMatrix.length=P+I-L,r.spotLightMap.length=I,r.numSpotLightShadowsWithMaps=L,R.directionalLength=_,R.pointLength=M,R.spotLength=m,R.rectAreaLength=S,R.hemiLength=w,R.numDirectionalShadows=A,R.numPointShadows=b,R.numSpotShadows=P,R.numSpotMaps=I,r.version=BW++)}function f(h,d){let p=0,v=0,y=0,_=0,M=0;const m=d.matrixWorldInverse;for(let S=0,w=h.length;S=a.length?(l=new Tb(n,e),a.push(l)):l=a[o],l}function r(){t=new WeakMap}return{get:i,dispose:r}}class lS extends Yn{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=TL,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class uS extends Yn{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}const GW=`void main() { gl_Position = vec4( position, 1.0 ); }`,jW=`uniform sampler2D shadow_pass; uniform vec2 resolution; @@ -3486,7 +3486,7 @@ void main() { squared_mean = squared_mean / samples; float std_dev = sqrt( squared_mean - mean * mean ); gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); -}`;function XW(n,e,t){let i=new Tg;const r=new ye,s=new ye,o=new Dt,a=new lS({depthPacking:CL}),l=new uS,f={},h=t.maxTextureSize,d={[Fs]:mi,[mi]:Fs,[Rr]:Rr},p=new is({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new ye},radius:{value:4}},vertexShader:GW,fragmentShader:jW}),v=p.clone();v.defines.HORIZONTAL_PASS=1;const y=new dt;y.setAttribute("position",new Bt(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const _=new zn(y,p),M=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=j1,this.render=function(A,b,P){if(M.enabled===!1||M.autoUpdate===!1&&M.needsUpdate===!1||A.length===0)return;const I=n.getRenderTarget(),L=n.getActiveCubeFace(),C=n.getActiveMipmapLevel(),R=n.state;R.setBlending(Ds),R.buffers.color.setClear(1,1,1,1),R.buffers.depth.setTest(!0),R.setScissorTest(!1);for(let W=0,J=A.length;Wh||r.y>h)&&(r.x>h&&(s.x=Math.floor(h/Z.x),r.x=s.x*Z.x,X.mapSize.x=s.x),r.y>h&&(s.y=Math.floor(h/Z.y),r.y=s.y*Z.y,X.mapSize.y=s.y)),X.map===null){const ae=this.type!==su?{minFilter:pn,magFilter:pn}:{};X.map=new Or(r.x,r.y,ae),X.map.texture.name=j.name+".shadowMap",X.camera.updateProjectionMatrix()}n.setRenderTarget(X.map),n.clear();const se=X.getViewportCount();for(let ae=0;ae0||b.map&&b.alphaTest>0){const R=L.uuid,W=b.uuid;let J=f[R];J===void 0&&(J={},f[R]=J);let j=J[W];j===void 0&&(j=L.clone(),J[W]=j),L=j}if(L.visible=b.visible,L.wireframe=b.wireframe,I===su?L.side=b.shadowSide!==null?b.shadowSide:b.side:L.side=b.shadowSide!==null?b.shadowSide:d[b.side],L.alphaMap=b.alphaMap,L.alphaTest=b.alphaTest,L.map=b.map,L.clipShadows=b.clipShadows,L.clippingPlanes=b.clippingPlanes,L.clipIntersection=b.clipIntersection,L.displacementMap=b.displacementMap,L.displacementScale=b.displacementScale,L.displacementBias=b.displacementBias,L.wireframeLinewidth=b.wireframeLinewidth,L.linewidth=b.linewidth,P.isPointLight===!0&&L.isMeshDistanceMaterial===!0){const R=n.properties.get(L);R.light=P}return L}function w(A,b,P,I,L){if(A.visible===!1)return;if(A.layers.test(b.layers)&&(A.isMesh||A.isLine||A.isPoints)&&(A.castShadow||A.receiveShadow&&L===su)&&(!A.frustumCulled||i.intersectsObject(A))){A.modelViewMatrix.multiplyMatrices(P.matrixWorldInverse,A.matrixWorld);const W=e.update(A),J=A.material;if(Array.isArray(J)){const j=W.groups;for(let X=0,Z=j.length;X=1):D.indexOf("OpenGL ES")!==-1&&(ae=parseFloat(/^OpenGL ES (\d)/.exec(D)[1]),se=ae>=2);let H=null,B={};const te=n.getParameter(3088),$=n.getParameter(2978),ee=new Dt().fromArray(te),ue=new Dt().fromArray($);function Ee(Y,fe,Ae){const Ue=new Uint8Array(4),Je=n.createTexture();n.bindTexture(Y,Je),n.texParameteri(Y,10241,9728),n.texParameteri(Y,10240,9728);for(let Ot=0;Ot"u"?!1:/OculusBrowser/g.test(navigator.userAgent),y=new WeakMap;let _;const M=new WeakMap;let m=!1;try{m=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function S(z,k){return m?new OffscreenCanvas(z,k):Vf("canvas")}function w(z,k,le,be){let Te=1;if((z.width>be||z.height>be)&&(Te=be/Math.max(z.width,z.height)),Te<1||k===!0)if(typeof HTMLImageElement<"u"&&z instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&z instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&z instanceof ImageBitmap){const Re=k?IL:Math.floor,et=Re(Te*z.width),ze=Re(Te*z.height);_===void 0&&(_=S(et,ze));const pe=le?S(et,ze):_;return pe.width=et,pe.height=ze,pe.getContext("2d").drawImage(z,0,0,et,ze),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+z.width+"x"+z.height+") to ("+et+"x"+ze+")."),pe}else return"data"in z&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+z.width+"x"+z.height+")."),z;return z}function A(z){return u_(z.width)&&u_(z.height)}function b(z){return a?!1:z.wrapS!==ii||z.wrapT!==ii||z.minFilter!==pn&&z.minFilter!==gn}function P(z,k){return z.generateMipmaps&&k&&z.minFilter!==pn&&z.minFilter!==gn}function I(z){n.generateMipmap(z)}function L(z,k,le,be,Te=!1){if(a===!1)return k;if(z!==null){if(n[z]!==void 0)return n[z];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+z+"'")}let Re=k;return k===6403&&(le===5126&&(Re=33326),le===5131&&(Re=33325),le===5121&&(Re=33321)),k===33319&&(le===5126&&(Re=33328),le===5131&&(Re=33327),le===5121&&(Re=33323)),k===6408&&(le===5126&&(Re=34836),le===5131&&(Re=34842),le===5121&&(Re=be===zt&&Te===!1?35907:32856),le===32819&&(Re=32854),le===32820&&(Re=32855)),(Re===33325||Re===33326||Re===33327||Re===33328||Re===34842||Re===34836)&&e.get("EXT_color_buffer_float"),Re}function C(z,k,le){return P(z,le)===!0||z.isFramebufferTexture&&z.minFilter!==pn&&z.minFilter!==gn?Math.log2(Math.max(k.width,k.height))+1:z.mipmaps!==void 0&&z.mipmaps.length>0?z.mipmaps.length:z.isCompressedTexture&&Array.isArray(z.image)?k.mipmaps.length:1}function R(z){return z===pn||z===Hm||z===af?9728:9729}function W(z){const k=z.target;k.removeEventListener("dispose",W),j(k),k.isVideoTexture&&y.delete(k)}function J(z){const k=z.target;k.removeEventListener("dispose",J),Z(k)}function j(z){const k=i.get(z);if(k.__webglInit===void 0)return;const le=z.source,be=M.get(le);if(be){const Te=be[k.__cacheKey];Te.usedTimes--,Te.usedTimes===0&&X(z),Object.keys(be).length===0&&M.delete(le)}i.remove(z)}function X(z){const k=i.get(z);n.deleteTexture(k.__webglTexture);const le=z.source,be=M.get(le);delete be[k.__cacheKey],o.memory.textures--}function Z(z){const k=z.texture,le=i.get(z),be=i.get(k);if(be.__webglTexture!==void 0&&(n.deleteTexture(be.__webglTexture),o.memory.textures--),z.depthTexture&&z.depthTexture.dispose(),z.isWebGLCubeRenderTarget)for(let Te=0;Te<6;Te++)n.deleteFramebuffer(le.__webglFramebuffer[Te]),le.__webglDepthbuffer&&n.deleteRenderbuffer(le.__webglDepthbuffer[Te]);else{if(n.deleteFramebuffer(le.__webglFramebuffer),le.__webglDepthbuffer&&n.deleteRenderbuffer(le.__webglDepthbuffer),le.__webglMultisampledFramebuffer&&n.deleteFramebuffer(le.__webglMultisampledFramebuffer),le.__webglColorRenderbuffer)for(let Te=0;Te=l&&console.warn("THREE.WebGLTextures: Trying to use "+z+" texture units while this GPU supports only "+l),se+=1,z}function H(z){const k=[];return k.push(z.wrapS),k.push(z.wrapT),k.push(z.wrapR||0),k.push(z.magFilter),k.push(z.minFilter),k.push(z.anisotropy),k.push(z.internalFormat),k.push(z.format),k.push(z.type),k.push(z.generateMipmaps),k.push(z.premultiplyAlpha),k.push(z.flipY),k.push(z.unpackAlignment),k.push(z.encoding),k.join()}function B(z,k){const le=i.get(z);if(z.isVideoTexture&&nt(z),z.isRenderTargetTexture===!1&&z.version>0&&le.__version!==z.version){const be=z.image;if(be===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(be.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{Xe(le,z,k);return}}t.bindTexture(3553,le.__webglTexture,33984+k)}function te(z,k){const le=i.get(z);if(z.version>0&&le.__version!==z.version){Xe(le,z,k);return}t.bindTexture(35866,le.__webglTexture,33984+k)}function $(z,k){const le=i.get(z);if(z.version>0&&le.__version!==z.version){Xe(le,z,k);return}t.bindTexture(32879,le.__webglTexture,33984+k)}function ee(z,k){const le=i.get(z);if(z.version>0&&le.__version!==z.version){Ye(le,z,k);return}t.bindTexture(34067,le.__webglTexture,33984+k)}const ue={[Nf]:10497,[ii]:33071,[Of]:33648},Ee={[pn]:9728,[Hm]:9984,[af]:9986,[gn]:9729,[J1]:9985,[Fo]:9987};function we(z,k,le){if(le?(n.texParameteri(z,10242,ue[k.wrapS]),n.texParameteri(z,10243,ue[k.wrapT]),(z===32879||z===35866)&&n.texParameteri(z,32882,ue[k.wrapR]),n.texParameteri(z,10240,Ee[k.magFilter]),n.texParameteri(z,10241,Ee[k.minFilter])):(n.texParameteri(z,10242,33071),n.texParameteri(z,10243,33071),(z===32879||z===35866)&&n.texParameteri(z,32882,33071),(k.wrapS!==ii||k.wrapT!==ii)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),n.texParameteri(z,10240,R(k.magFilter)),n.texParameteri(z,10241,R(k.minFilter)),k.minFilter!==pn&&k.minFilter!==gn&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),e.has("EXT_texture_filter_anisotropic")===!0){const be=e.get("EXT_texture_filter_anisotropic");if(k.magFilter===pn||k.minFilter!==af&&k.minFilter!==Fo||k.type===Ps&&e.has("OES_texture_float_linear")===!1||a===!1&&k.type===Pu&&e.has("OES_texture_half_float_linear")===!1)return;(k.anisotropy>1||i.get(k).__currentAnisotropy)&&(n.texParameterf(z,be.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(k.anisotropy,r.getMaxAnisotropy())),i.get(k).__currentAnisotropy=k.anisotropy)}}function Q(z,k){let le=!1;z.__webglInit===void 0&&(z.__webglInit=!0,k.addEventListener("dispose",W));const be=k.source;let Te=M.get(be);Te===void 0&&(Te={},M.set(be,Te));const Re=H(k);if(Re!==z.__cacheKey){Te[Re]===void 0&&(Te[Re]={texture:n.createTexture(),usedTimes:0},o.memory.textures++,le=!0),Te[Re].usedTimes++;const et=Te[z.__cacheKey];et!==void 0&&(Te[z.__cacheKey].usedTimes--,et.usedTimes===0&&X(k)),z.__cacheKey=Re,z.__webglTexture=Te[Re].texture}return le}function Xe(z,k,le){let be=3553;(k.isDataArrayTexture||k.isCompressedArrayTexture)&&(be=35866),k.isData3DTexture&&(be=32879);const Te=Q(z,k),Re=k.source;t.bindTexture(be,z.__webglTexture,33984+le);const et=i.get(Re);if(Re.version!==et.__version||Te===!0){t.activeTexture(33984+le),n.pixelStorei(37440,k.flipY),n.pixelStorei(37441,k.premultiplyAlpha),n.pixelStorei(3317,k.unpackAlignment),n.pixelStorei(37443,0);const ze=b(k)&&A(k.image)===!1;let pe=w(k.image,ze,!1,h);pe=_t(k,pe);const He=A(pe)||a,G=s.convert(k.format,k.encoding);let de=s.convert(k.type),Se=L(k.internalFormat,G,de,k.encoding,k.isVideoTexture);we(be,k,He);let Pe;const Qe=k.mipmaps,ct=a&&k.isVideoTexture!==!0,Nt=et.__version===void 0||Te===!0,Y=C(k,pe,He);if(k.isDepthTexture)Se=6402,a?k.type===Ps?Se=36012:k.type===_o?Se=33190:k.type===Na?Se=35056:Se=33189:k.type===Ps&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),k.format===Do&&Se===6402&&k.type!==K1&&k.type!==_o&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),k.type=_o,de=s.convert(k.type)),k.format===ja&&Se===6402&&(Se=34041,k.type!==Na&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),k.type=Na,de=s.convert(k.type))),Nt&&(ct?t.texStorage2D(3553,1,Se,pe.width,pe.height):t.texImage2D(3553,0,Se,pe.width,pe.height,0,G,de,null));else if(k.isDataTexture)if(Qe.length>0&&He){ct&&Nt&&t.texStorage2D(3553,Y,Se,Qe[0].width,Qe[0].height);for(let fe=0,Ae=Qe.length;fe>=1,Ae>>=1}}else if(Qe.length>0&&He){ct&&Nt&&t.texStorage2D(3553,Y,Se,Qe[0].width,Qe[0].height);for(let fe=0,Ae=Qe.length;fe0&&Nt++,t.texStorage2D(34067,Nt,Pe,pe[0].width,pe[0].height));for(let fe=0;fe<6;fe++)if(ze){Qe?t.texSubImage2D(34069+fe,0,0,0,pe[fe].width,pe[fe].height,de,Se,pe[fe].data):t.texImage2D(34069+fe,0,Pe,pe[fe].width,pe[fe].height,0,de,Se,pe[fe].data);for(let Ae=0;Ae=34069&&Te<=34074)&&n.framebufferTexture2D(36160,be,Te,i.get(le).__webglTexture,0),t.bindFramebuffer(36160,null)}function Me(z,k,le){if(n.bindRenderbuffer(36161,z),k.depthBuffer&&!k.stencilBuffer){let be=33189;if(le||je(k)){const Te=k.depthTexture;Te&&Te.isDepthTexture&&(Te.type===Ps?be=36012:Te.type===_o&&(be=33190));const Re=qe(k);je(k)?p.renderbufferStorageMultisampleEXT(36161,Re,be,k.width,k.height):n.renderbufferStorageMultisample(36161,Re,be,k.width,k.height)}else n.renderbufferStorage(36161,be,k.width,k.height);n.framebufferRenderbuffer(36160,36096,36161,z)}else if(k.depthBuffer&&k.stencilBuffer){const be=qe(k);le&&je(k)===!1?n.renderbufferStorageMultisample(36161,be,35056,k.width,k.height):je(k)?p.renderbufferStorageMultisampleEXT(36161,be,35056,k.width,k.height):n.renderbufferStorage(36161,34041,k.width,k.height),n.framebufferRenderbuffer(36160,33306,36161,z)}else{const be=k.isWebGLMultipleRenderTargets===!0?k.texture:[k.texture];for(let Te=0;Te0&&je(z)===!1){const ze=Re?k:[k];le.__webglMultisampledFramebuffer=n.createFramebuffer(),le.__webglColorRenderbuffer=[],t.bindFramebuffer(36160,le.__webglMultisampledFramebuffer);for(let pe=0;pe0&&je(z)===!1){const k=z.isWebGLMultipleRenderTargets?z.texture:[z.texture],le=z.width,be=z.height;let Te=16384;const Re=[],et=z.stencilBuffer?33306:36096,ze=i.get(z),pe=z.isWebGLMultipleRenderTargets===!0;if(pe)for(let He=0;He0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&k.__useRenderToTexture!==!1}function nt(z){const k=o.render.frame;y.get(z)!==k&&(y.set(z,k),z.update())}function _t(z,k){const le=z.encoding,be=z.format,Te=z.type;return z.isCompressedTexture===!0||z.isVideoTexture===!0||z.format===Wm||le!==Bs&&(le===zt?a===!1?e.has("EXT_sRGB")===!0&&be===Vi?(z.format=Wm,z.minFilter=gn,z.generateMipmaps=!1):k=tS.sRGBToLinear(k):(be!==Vi||Te!==Bo)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture encoding:",le)),k}this.allocateTextureUnit=D,this.resetTextureUnits=ae,this.setTexture2D=B,this.setTexture2DArray=te,this.setTexture3D=$,this.setTextureCube=ee,this.rebindTextures=_e,this.setupRenderTarget=Ne,this.updateRenderTargetMipmap=Ie,this.updateMultisampleRenderTarget=Ge,this.setupDepthRenderbuffer=oe,this.setupFrameBufferTexture=xe,this.useMultisampledRTT=je}function WL(n,e,t){const i=t.isWebGL2;function r(s,o=null){let a;if(s===Bo)return 5121;if(s===hL)return 32819;if(s===dL)return 32820;if(s===uL)return 5120;if(s===cL)return 5122;if(s===K1)return 5123;if(s===fL)return 5124;if(s===_o)return 5125;if(s===Ps)return 5126;if(s===Pu)return i?5131:(a=e.get("OES_texture_half_float"),a!==null?a.HALF_FLOAT_OES:null);if(s===pL)return 6406;if(s===Vi)return 6408;if(s===mL)return 6409;if(s===gL)return 6410;if(s===Do)return 6402;if(s===ja)return 34041;if(s===Wm)return a=e.get("EXT_sRGB"),a!==null?a.SRGB_ALPHA_EXT:null;if(s===vL)return 6403;if(s===yL)return 36244;if(s===xL)return 33319;if(s===_L)return 33320;if(s===SL)return 36249;if(s===Qp||s===$p||s===em||s===tm)if(o===zt)if(a=e.get("WEBGL_compressed_texture_s3tc_srgb"),a!==null){if(s===Qp)return a.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(s===$p)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(s===em)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(s===tm)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(a=e.get("WEBGL_compressed_texture_s3tc"),a!==null){if(s===Qp)return a.COMPRESSED_RGB_S3TC_DXT1_EXT;if(s===$p)return a.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(s===em)return a.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(s===tm)return a.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(s===Fx||s===Bx||s===Vx||s===Hx)if(a=e.get("WEBGL_compressed_texture_pvrtc"),a!==null){if(s===Fx)return a.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(s===Bx)return a.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(s===Vx)return a.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(s===Hx)return a.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(s===wL)return a=e.get("WEBGL_compressed_texture_etc1"),a!==null?a.COMPRESSED_RGB_ETC1_WEBGL:null;if(s===Wx||s===Gx)if(a=e.get("WEBGL_compressed_texture_etc"),a!==null){if(s===Wx)return o===zt?a.COMPRESSED_SRGB8_ETC2:a.COMPRESSED_RGB8_ETC2;if(s===Gx)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:a.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(s===jx||s===Xx||s===Yx||s===qx||s===Zx||s===Jx||s===Kx||s===Qx||s===$x||s===e_||s===t_||s===n_||s===i_||s===r_)if(a=e.get("WEBGL_compressed_texture_astc"),a!==null){if(s===jx)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:a.COMPRESSED_RGBA_ASTC_4x4_KHR;if(s===Xx)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:a.COMPRESSED_RGBA_ASTC_5x4_KHR;if(s===Yx)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:a.COMPRESSED_RGBA_ASTC_5x5_KHR;if(s===qx)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:a.COMPRESSED_RGBA_ASTC_6x5_KHR;if(s===Zx)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:a.COMPRESSED_RGBA_ASTC_6x6_KHR;if(s===Jx)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:a.COMPRESSED_RGBA_ASTC_8x5_KHR;if(s===Kx)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:a.COMPRESSED_RGBA_ASTC_8x6_KHR;if(s===Qx)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:a.COMPRESSED_RGBA_ASTC_8x8_KHR;if(s===$x)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:a.COMPRESSED_RGBA_ASTC_10x5_KHR;if(s===e_)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:a.COMPRESSED_RGBA_ASTC_10x6_KHR;if(s===t_)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:a.COMPRESSED_RGBA_ASTC_10x8_KHR;if(s===n_)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:a.COMPRESSED_RGBA_ASTC_10x10_KHR;if(s===i_)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:a.COMPRESSED_RGBA_ASTC_12x10_KHR;if(s===r_)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:a.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(s===nm)if(a=e.get("EXT_texture_compression_bptc"),a!==null){if(s===nm)return o===zt?a.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:a.COMPRESSED_RGBA_BPTC_UNORM_EXT}else return null;if(s===ML||s===s_||s===o_||s===a_)if(a=e.get("EXT_texture_compression_rgtc"),a!==null){if(s===nm)return a.COMPRESSED_RED_RGTC1_EXT;if(s===s_)return a.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(s===o_)return a.COMPRESSED_RED_GREEN_RGTC2_EXT;if(s===a_)return a.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return s===Na?i?34042:(a=e.get("WEBGL_depth_texture"),a!==null?a.UNSIGNED_INT_24_8_WEBGL:null):n[s]!==void 0?n[s]:null}return{convert:r}}class GL extends Wt{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}class lu extends Tt{constructor(){super(),this.isGroup=!0,this.type="Group"}}const ZW={type:"move"};class Jv{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new lu,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new lu,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new N,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new N),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new lu,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new N,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new N),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const t=this._hand;if(t)for(const i of e.hand.values())this._getHandJoint(t,i)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,t,i){let r=null,s=null,o=null;const a=this._targetRay,l=this._grip,f=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(f&&e.hand){o=!0;for(const _ of e.hand.values()){const M=t.getJointPose(_,i),m=this._getHandJoint(f,_);M!==null&&(m.matrix.fromArray(M.transform.matrix),m.matrix.decompose(m.position,m.rotation,m.scale),m.jointRadius=M.radius),m.visible=M!==null}const h=f.joints["index-finger-tip"],d=f.joints["thumb-tip"],p=h.position.distanceTo(d.position),v=.02,y=.005;f.inputState.pinching&&p>v+y?(f.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!f.inputState.pinching&&p<=v-y&&(f.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(s=t.getPose(e.gripSpace,i),s!==null&&(l.matrix.fromArray(s.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),s.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(s.linearVelocity)):l.hasLinearVelocity=!1,s.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(s.angularVelocity)):l.hasAngularVelocity=!1));a!==null&&(r=t.getPose(e.targetRaySpace,i),r===null&&s!==null&&(r=s),r!==null&&(a.matrix.fromArray(r.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),r.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(r.linearVelocity)):a.hasLinearVelocity=!1,r.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(r.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(ZW)))}return a!==null&&(a.visible=r!==null),l!==null&&(l.visible=s!==null),f!==null&&(f.visible=o!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){const i=new lu;i.matrixAutoUpdate=!1,i.visible=!1,e.joints[t.jointName]=i,e.add(i)}return e.joints[t.jointName]}}class jL extends fn{constructor(e,t,i,r,s,o,a,l,f,h){if(h=h!==void 0?h:Do,h!==Do&&h!==ja)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");i===void 0&&h===Do&&(i=_o),i===void 0&&h===ja&&(i=Na),super(null,r,s,o,a,l,h,i,f),this.isDepthTexture=!0,this.image={width:e,height:t},this.magFilter=a!==void 0?a:pn,this.minFilter=l!==void 0?l:pn,this.flipY=!1,this.generateMipmaps=!1}}class JW extends rs{constructor(e,t){super();const i=this;let r=null,s=1,o=null,a="local-floor",l=1,f=null,h=null,d=null,p=null,v=null,y=null;const _=t.getContextAttributes();let M=null,m=null;const S=[],w=[],A=new Set,b=new Map,P=new Wt;P.layers.enable(1),P.viewport=new Dt;const I=new Wt;I.layers.enable(2),I.viewport=new Dt;const L=[P,I],C=new GL;C.layers.enable(1),C.layers.enable(2);let R=null,W=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(ee){let ue=S[ee];return ue===void 0&&(ue=new Jv,S[ee]=ue),ue.getTargetRaySpace()},this.getControllerGrip=function(ee){let ue=S[ee];return ue===void 0&&(ue=new Jv,S[ee]=ue),ue.getGripSpace()},this.getHand=function(ee){let ue=S[ee];return ue===void 0&&(ue=new Jv,S[ee]=ue),ue.getHandSpace()};function J(ee){const ue=w.indexOf(ee.inputSource);if(ue===-1)return;const Ee=S[ue];Ee!==void 0&&Ee.dispatchEvent({type:ee.type,data:ee.inputSource})}function j(){r.removeEventListener("select",J),r.removeEventListener("selectstart",J),r.removeEventListener("selectend",J),r.removeEventListener("squeeze",J),r.removeEventListener("squeezestart",J),r.removeEventListener("squeezeend",J),r.removeEventListener("end",j),r.removeEventListener("inputsourceschange",X);for(let ee=0;ee=0&&(w[we]=null,S[we].disconnect(Ee))}for(let ue=0;ue=w.length){w.push(Ee),we=Xe;break}else if(w[Xe]===null){w[Xe]=Ee,we=Xe;break}if(we===-1)break}const Q=S[we];Q&&Q.connect(Ee)}}const Z=new N,se=new N;function ae(ee,ue,Ee){Z.setFromMatrixPosition(ue.matrixWorld),se.setFromMatrixPosition(Ee.matrixWorld);const we=Z.distanceTo(se),Q=ue.projectionMatrix.elements,Xe=Ee.projectionMatrix.elements,Ye=Q[14]/(Q[10]-1),xe=Q[14]/(Q[10]+1),Me=(Q[9]+1)/Q[5],ge=(Q[9]-1)/Q[5],oe=(Q[8]-1)/Q[0],_e=(Xe[8]+1)/Xe[0],Ne=Ye*oe,Ie=Ye*_e,Ge=we/(-oe+_e),qe=Ge*-oe;ue.matrixWorld.decompose(ee.position,ee.quaternion,ee.scale),ee.translateX(qe),ee.translateZ(Ge),ee.matrixWorld.compose(ee.position,ee.quaternion,ee.scale),ee.matrixWorldInverse.copy(ee.matrixWorld).invert();const je=Ye+Ge,nt=xe+Ge,_t=Ne-qe,z=Ie+(we-qe),k=Me*xe/nt*je,le=ge*xe/nt*je;ee.projectionMatrix.makePerspective(_t,z,k,le,je,nt),ee.projectionMatrixInverse.copy(ee.projectionMatrix).invert()}function D(ee,ue){ue===null?ee.matrixWorld.copy(ee.matrix):ee.matrixWorld.multiplyMatrices(ue.matrixWorld,ee.matrix),ee.matrixWorldInverse.copy(ee.matrixWorld).invert()}this.updateCamera=function(ee){if(r===null)return;C.near=I.near=P.near=ee.near,C.far=I.far=P.far=ee.far,(R!==C.near||W!==C.far)&&(r.updateRenderState({depthNear:C.near,depthFar:C.far}),R=C.near,W=C.far);const ue=ee.parent,Ee=C.cameras;D(C,ue);for(let we=0;weQ&&(b.set(we,we.lastChangedTime),i.dispatchEvent({type:"planechanged",data:we}))}}y=null}const $=new zL;$.setAnimationLoop(te),this.setAnimationLoop=function(ee){B=ee},this.dispose=function(){}}}function KW(n,e){function t(M,m){M.matrixAutoUpdate===!0&&M.updateMatrix(),m.value.copy(M.matrix)}function i(M,m){m.color.getRGB(M.fogColor.value,OL(n)),m.isFog?(M.fogNear.value=m.near,M.fogFar.value=m.far):m.isFogExp2&&(M.fogDensity.value=m.density)}function r(M,m,S,w,A){m.isMeshBasicMaterial||m.isMeshLambertMaterial?s(M,m):m.isMeshToonMaterial?(s(M,m),d(M,m)):m.isMeshPhongMaterial?(s(M,m),h(M,m)):m.isMeshStandardMaterial?(s(M,m),p(M,m),m.isMeshPhysicalMaterial&&v(M,m,A)):m.isMeshMatcapMaterial?(s(M,m),y(M,m)):m.isMeshDepthMaterial?s(M,m):m.isMeshDistanceMaterial?(s(M,m),_(M,m)):m.isMeshNormalMaterial?s(M,m):m.isLineBasicMaterial?(o(M,m),m.isLineDashedMaterial&&a(M,m)):m.isPointsMaterial?l(M,m,S,w):m.isSpriteMaterial?f(M,m):m.isShadowMaterial?(M.color.value.copy(m.color),M.opacity.value=m.opacity):m.isShaderMaterial&&(m.uniformsNeedUpdate=!1)}function s(M,m){M.opacity.value=m.opacity,m.color&&M.diffuse.value.copy(m.color),m.emissive&&M.emissive.value.copy(m.emissive).multiplyScalar(m.emissiveIntensity),m.map&&(M.map.value=m.map,t(m.map,M.mapTransform)),m.alphaMap&&(M.alphaMap.value=m.alphaMap,t(m.alphaMap,M.alphaMapTransform)),m.bumpMap&&(M.bumpMap.value=m.bumpMap,t(m.bumpMap,M.bumpMapTransform),M.bumpScale.value=m.bumpScale,m.side===mi&&(M.bumpScale.value*=-1)),m.normalMap&&(M.normalMap.value=m.normalMap,t(m.normalMap,M.normalMapTransform),M.normalScale.value.copy(m.normalScale),m.side===mi&&M.normalScale.value.negate()),m.displacementMap&&(M.displacementMap.value=m.displacementMap,t(m.displacementMap,M.displacementMapTransform),M.displacementScale.value=m.displacementScale,M.displacementBias.value=m.displacementBias),m.emissiveMap&&(M.emissiveMap.value=m.emissiveMap,t(m.emissiveMap,M.emissiveMapTransform)),m.specularMap&&(M.specularMap.value=m.specularMap,t(m.specularMap,M.specularMapTransform)),m.alphaTest>0&&(M.alphaTest.value=m.alphaTest);const S=e.get(m).envMap;if(S&&(M.envMap.value=S,M.flipEnvMap.value=S.isCubeTexture&&S.isRenderTargetTexture===!1?-1:1,M.reflectivity.value=m.reflectivity,M.ior.value=m.ior,M.refractionRatio.value=m.refractionRatio),m.lightMap){M.lightMap.value=m.lightMap;const w=n.useLegacyLights===!0?Math.PI:1;M.lightMapIntensity.value=m.lightMapIntensity*w,t(m.lightMap,M.lightMapTransform)}m.aoMap&&(M.aoMap.value=m.aoMap,M.aoMapIntensity.value=m.aoMapIntensity,t(m.aoMap,M.aoMapTransform))}function o(M,m){M.diffuse.value.copy(m.color),M.opacity.value=m.opacity,m.map&&(M.map.value=m.map,t(m.map,M.mapTransform))}function a(M,m){M.dashSize.value=m.dashSize,M.totalSize.value=m.dashSize+m.gapSize,M.scale.value=m.scale}function l(M,m,S,w){M.diffuse.value.copy(m.color),M.opacity.value=m.opacity,M.size.value=m.size*S,M.scale.value=w*.5,m.map&&(M.map.value=m.map,t(m.map,M.uvTransform)),m.alphaMap&&(M.alphaMap.value=m.alphaMap),m.alphaTest>0&&(M.alphaTest.value=m.alphaTest)}function f(M,m){M.diffuse.value.copy(m.color),M.opacity.value=m.opacity,M.rotation.value=m.rotation,m.map&&(M.map.value=m.map,t(m.map,M.mapTransform)),m.alphaMap&&(M.alphaMap.value=m.alphaMap),m.alphaTest>0&&(M.alphaTest.value=m.alphaTest)}function h(M,m){M.specular.value.copy(m.specular),M.shininess.value=Math.max(m.shininess,1e-4)}function d(M,m){m.gradientMap&&(M.gradientMap.value=m.gradientMap)}function p(M,m){M.metalness.value=m.metalness,m.metalnessMap&&(M.metalnessMap.value=m.metalnessMap,t(m.metalnessMap,M.metalnessMapTransform)),M.roughness.value=m.roughness,m.roughnessMap&&(M.roughnessMap.value=m.roughnessMap,t(m.roughnessMap,M.roughnessMapTransform)),e.get(m).envMap&&(M.envMapIntensity.value=m.envMapIntensity)}function v(M,m,S){M.ior.value=m.ior,m.sheen>0&&(M.sheenColor.value.copy(m.sheenColor).multiplyScalar(m.sheen),M.sheenRoughness.value=m.sheenRoughness,m.sheenColorMap&&(M.sheenColorMap.value=m.sheenColorMap,t(m.sheenColorMap,M.sheenColorMapTransform)),m.sheenRoughnessMap&&(M.sheenRoughnessMap.value=m.sheenRoughnessMap,t(m.sheenRoughnessMap,M.sheenRoughnessMapTransform))),m.clearcoat>0&&(M.clearcoat.value=m.clearcoat,M.clearcoatRoughness.value=m.clearcoatRoughness,m.clearcoatMap&&(M.clearcoatMap.value=m.clearcoatMap,t(m.clearcoatMap,M.clearcoatMapTransform)),m.clearcoatRoughnessMap&&(M.clearcoatRoughnessMap.value=m.clearcoatRoughnessMap,t(m.clearcoatRoughnessMap,M.clearcoatRoughnessMapTransform)),m.clearcoatNormalMap&&(M.clearcoatNormalMap.value=m.clearcoatNormalMap,t(m.clearcoatNormalMap,M.clearcoatNormalMapTransform),M.clearcoatNormalScale.value.copy(m.clearcoatNormalScale),m.side===mi&&M.clearcoatNormalScale.value.negate())),m.iridescence>0&&(M.iridescence.value=m.iridescence,M.iridescenceIOR.value=m.iridescenceIOR,M.iridescenceThicknessMinimum.value=m.iridescenceThicknessRange[0],M.iridescenceThicknessMaximum.value=m.iridescenceThicknessRange[1],m.iridescenceMap&&(M.iridescenceMap.value=m.iridescenceMap,t(m.iridescenceMap,M.iridescenceMapTransform)),m.iridescenceThicknessMap&&(M.iridescenceThicknessMap.value=m.iridescenceThicknessMap,t(m.iridescenceThicknessMap,M.iridescenceThicknessMapTransform))),m.transmission>0&&(M.transmission.value=m.transmission,M.transmissionSamplerMap.value=S.texture,M.transmissionSamplerSize.value.set(S.width,S.height),m.transmissionMap&&(M.transmissionMap.value=m.transmissionMap,t(m.transmissionMap,M.transmissionMapTransform)),M.thickness.value=m.thickness,m.thicknessMap&&(M.thicknessMap.value=m.thicknessMap,t(m.thicknessMap,M.thicknessMapTransform)),M.attenuationDistance.value=m.attenuationDistance,M.attenuationColor.value.copy(m.attenuationColor)),M.specularIntensity.value=m.specularIntensity,M.specularColor.value.copy(m.specularColor),m.specularColorMap&&(M.specularColorMap.value=m.specularColorMap,t(m.specularColorMap,M.specularColorMapTransform)),m.specularIntensityMap&&(M.specularIntensityMap.value=m.specularIntensityMap,t(m.specularIntensityMap,M.specularIntensityMapTransform))}function y(M,m){m.matcap&&(M.matcap.value=m.matcap)}function _(M,m){const S=e.get(m).light;M.referencePosition.value.setFromMatrixPosition(S.matrixWorld),M.nearDistance.value=S.shadow.camera.near,M.farDistance.value=S.shadow.camera.far}return{refreshFogUniforms:i,refreshMaterialUniforms:r}}function QW(n,e,t,i){let r={},s={},o=[];const a=t.isWebGL2?n.getParameter(35375):0;function l(S,w){const A=w.program;i.uniformBlockBinding(S,A)}function f(S,w){let A=r[S.id];A===void 0&&(y(S),A=h(S),r[S.id]=A,S.addEventListener("dispose",M));const b=w.program;i.updateUBOMapping(S,b);const P=e.render.frame;s[S.id]!==P&&(p(S),s[S.id]=P)}function h(S){const w=d();S.__bindingPointIndex=w;const A=n.createBuffer(),b=S.__size,P=S.usage;return n.bindBuffer(35345,A),n.bufferData(35345,b,P),n.bindBuffer(35345,null),n.bindBufferBase(35345,w,A),A}function d(){for(let S=0;S0){P=A%b;const J=b-P;P!==0&&J-R.boundary<0&&(A+=b-P,C.__offset=A)}A+=R.storage}return P=A%b,P>0&&(A+=b-P),S.__size=A,S.__cache={},this}function _(S){const w={boundary:0,storage:0};return typeof S=="number"?(w.boundary=4,w.storage=4):S.isVector2?(w.boundary=8,w.storage=8):S.isVector3||S.isColor?(w.boundary=16,w.storage=12):S.isVector4?(w.boundary=16,w.storage=16):S.isMatrix3?(w.boundary=48,w.storage=48):S.isMatrix4?(w.boundary=64,w.storage=64):S.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",S),w}function M(S){const w=S.target;w.removeEventListener("dispose",M);const A=o.indexOf(w.__bindingPointIndex);o.splice(A,1),n.deleteBuffer(r[w.id]),delete r[w.id],delete s[w.id]}function m(){for(const S in r)n.deleteBuffer(r[S]);o=[],r={},s={}}return{bind:l,update:f,dispose:m}}function $W(){const n=Vf("canvas");return n.style.display="block",n}class cS{constructor(e={}){const{canvas:t=$W(),context:i=null,depth:r=!0,stencil:s=!0,alpha:o=!1,antialias:a=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:f=!1,powerPreference:h="default",failIfMajorPerformanceCaveat:d=!1}=e;this.isWebGLRenderer=!0;let p;i!==null?p=i.getContextAttributes().alpha:p=o;let v=null,y=null;const _=[],M=[];this.domElement=t,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.outputEncoding=Bs,this.useLegacyLights=!0,this.toneMapping=kr,this.toneMappingExposure=1;const m=this;let S=!1,w=0,A=0,b=null,P=-1,I=null;const L=new Dt,C=new Dt;let R=null,W=t.width,J=t.height,j=1,X=null,Z=null;const se=new Dt(0,0,W,J),ae=new Dt(0,0,W,J);let D=!1;const H=new Tg;let B=!1,te=!1,$=null;const ee=new ot,ue=new N,Ee={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function we(){return b===null?j:1}let Q=i;function Xe(O,re){for(let me=0;me0?y=M[M.length-1]:y=null,_.pop(),_.length>0?v=_[_.length-1]:v=null};function Rn(O,re,me,ne){if(O.visible===!1)return;if(O.layers.test(re.layers)){if(O.isGroup)me=O.renderOrder;else if(O.isLOD)O.autoUpdate===!0&&O.update(re);else if(O.isLight)y.pushLight(O),O.castShadow&&y.pushShadow(O);else if(O.isSprite){if(!O.frustumCulled||H.intersectsSprite(O)){ne&&ue.setFromMatrixPosition(O.matrixWorld).applyMatrix4(ee);const rt=je.update(O),st=O.material;st.visible&&v.push(O,rt,st,me,ue.z,null)}}else if((O.isMesh||O.isLine||O.isPoints)&&(O.isSkinnedMesh&&O.skeleton.frame!==ge.render.frame&&(O.skeleton.update(),O.skeleton.frame=ge.render.frame),!O.frustumCulled||H.intersectsObject(O))){ne&&ue.setFromMatrixPosition(O.matrixWorld).applyMatrix4(ee);const rt=je.update(O),st=O.material;if(Array.isArray(st)){const ft=rt.groups;for(let vt=0,yt=ft.length;vt0&&qt(ve,$e,re,me),ne&&Me.viewport(L.copy(ne)),ve.length>0&&ai(ve,re,me),$e.length>0&&ai($e,re,me),rt.length>0&&ai(rt,re,me),Me.buffers.depth.setTest(!0),Me.buffers.depth.setMask(!0),Me.buffers.color.setMask(!0),Me.setPolygonOffset(!1)}function qt(O,re,me,ne){if($===null){const st=xe.isWebGL2;$=new Or(1024,1024,{generateMipmaps:!0,type:Ye.has("EXT_color_buffer_half_float")?Pu:Bo,minFilter:Fo,samples:st&&a===!0?4:0})}const ve=m.getRenderTarget();m.setRenderTarget($),m.clear();const $e=m.toneMapping;m.toneMapping=kr,ai(O,me,ne),_e.updateMultisampleRenderTarget($),_e.updateRenderTargetMipmap($);let rt=!1;for(let st=0,ft=re.length;st0&&_e.useMultisampledRTT(O)===!1?ve=oe.get(O).__webglMultisampledFramebuffer:ve=yt,L.copy(O.viewport),C.copy(O.scissor),R=O.scissorTest}else L.copy(se).multiplyScalar(j).floor(),C.copy(ae).multiplyScalar(j).floor(),R=D;if(Me.bindFramebuffer(36160,ve)&&xe.drawBuffers&&ne&&Me.drawBuffers(O,ve),Me.viewport(L),Me.scissor(C),Me.setScissorTest(R),$e){const ft=oe.get(O.texture);Q.framebufferTexture2D(36160,36064,34069+re,ft.__webglTexture,me)}else if(rt){const ft=oe.get(O.texture),vt=re||0;Q.framebufferTextureLayer(36160,36064,ft.__webglTexture,me||0,vt)}P=-1},this.readRenderTargetPixels=function(O,re,me,ne,ve,$e,rt){if(!(O&&O.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let st=oe.get(O).__webglFramebuffer;if(O.isWebGLCubeRenderTarget&&rt!==void 0&&(st=st[rt]),st){Me.bindFramebuffer(36160,st);try{const ft=O.texture,vt=ft.format,yt=ft.type;if(vt!==Vi&&pe.convert(vt)!==Q.getParameter(35739)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const St=yt===Pu&&(Ye.has("EXT_color_buffer_half_float")||xe.isWebGL2&&Ye.has("EXT_color_buffer_float"));if(yt!==Bo&&pe.convert(yt)!==Q.getParameter(35738)&&!(yt===Ps&&(xe.isWebGL2||Ye.has("OES_texture_float")||Ye.has("WEBGL_color_buffer_float")))&&!St){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}re>=0&&re<=O.width-ne&&me>=0&&me<=O.height-ve&&Q.readPixels(re,me,ne,ve,pe.convert(vt),pe.convert(yt),$e)}finally{const ft=b!==null?oe.get(b).__webglFramebuffer:null;Me.bindFramebuffer(36160,ft)}}},this.copyFramebufferToTexture=function(O,re,me=0){const ne=Math.pow(2,-me),ve=Math.floor(re.image.width*ne),$e=Math.floor(re.image.height*ne);_e.setTexture2D(re,0),Q.copyTexSubImage2D(3553,me,0,0,O.x,O.y,ve,$e),Me.unbindTexture()},this.copyTextureToTexture=function(O,re,me,ne=0){const ve=re.image.width,$e=re.image.height,rt=pe.convert(me.format),st=pe.convert(me.type);_e.setTexture2D(me,0),Q.pixelStorei(37440,me.flipY),Q.pixelStorei(37441,me.premultiplyAlpha),Q.pixelStorei(3317,me.unpackAlignment),re.isDataTexture?Q.texSubImage2D(3553,ne,O.x,O.y,ve,$e,rt,st,re.image.data):re.isCompressedTexture?Q.compressedTexSubImage2D(3553,ne,O.x,O.y,re.mipmaps[0].width,re.mipmaps[0].height,rt,re.mipmaps[0].data):Q.texSubImage2D(3553,ne,O.x,O.y,rt,st,re.image),ne===0&&me.generateMipmaps&&Q.generateMipmap(3553),Me.unbindTexture()},this.copyTextureToTexture3D=function(O,re,me,ne,ve=0){if(m.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}const $e=O.max.x-O.min.x+1,rt=O.max.y-O.min.y+1,st=O.max.z-O.min.z+1,ft=pe.convert(ne.format),vt=pe.convert(ne.type);let yt;if(ne.isData3DTexture)_e.setTexture3D(ne,0),yt=32879;else if(ne.isDataArrayTexture)_e.setTexture2DArray(ne,0),yt=35866;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}Q.pixelStorei(37440,ne.flipY),Q.pixelStorei(37441,ne.premultiplyAlpha),Q.pixelStorei(3317,ne.unpackAlignment);const St=Q.getParameter(3314),Rt=Q.getParameter(32878),Bn=Q.getParameter(3316),Ii=Q.getParameter(3315),gr=Q.getParameter(32877),Ht=me.isCompressedTexture?me.mipmaps[0]:me.image;Q.pixelStorei(3314,Ht.width),Q.pixelStorei(32878,Ht.height),Q.pixelStorei(3316,O.min.x),Q.pixelStorei(3315,O.min.y),Q.pixelStorei(32877,O.min.z),me.isDataTexture||me.isData3DTexture?Q.texSubImage3D(yt,ve,re.x,re.y,re.z,$e,rt,st,ft,vt,Ht.data):me.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),Q.compressedTexSubImage3D(yt,ve,re.x,re.y,re.z,$e,rt,st,ft,Ht.data)):Q.texSubImage3D(yt,ve,re.x,re.y,re.z,$e,rt,st,ft,vt,Ht),Q.pixelStorei(3314,St),Q.pixelStorei(32878,Rt),Q.pixelStorei(3316,Bn),Q.pixelStorei(3315,Ii),Q.pixelStorei(32877,gr),ve===0&&ne.generateMipmaps&&Q.generateMipmap(yt),Me.unbindTexture()},this.initTexture=function(O){O.isCubeTexture?_e.setTextureCube(O,0):O.isData3DTexture?_e.setTexture3D(O,0):O.isDataArrayTexture||O.isCompressedArrayTexture?_e.setTexture2DArray(O,0):_e.setTexture2D(O,0),Me.unbindTexture()},this.resetState=function(){w=0,A=0,b=null,Me.reset(),He.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get physicallyCorrectLights(){return console.warn("THREE.WebGLRenderer: the property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),!this.useLegacyLights}set physicallyCorrectLights(e){console.warn("THREE.WebGLRenderer: the property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),this.useLegacyLights=!e}}class XL extends cS{}XL.prototype.isWebGL1Renderer=!0;class Pg{constructor(e,t=25e-5){this.isFogExp2=!0,this.name="",this.color=new Fe(e),this.density=t}clone(){return new Pg(this.color,this.density)}toJSON(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}}class Lg{constructor(e,t=1,i=1e3){this.isFog=!0,this.name="",this.color=new Fe(e),this.near=t,this.far=i}clone(){return new Lg(this.color,this.near,this.far)}toJSON(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}}class fS extends Tt{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(t.object.backgroundIntensity=this.backgroundIntensity),t}get autoUpdate(){return console.warn("THREE.Scene: autoUpdate was renamed to matrixWorldAutoUpdate in r144."),this.matrixWorldAutoUpdate}set autoUpdate(e){console.warn("THREE.Scene: autoUpdate was renamed to matrixWorldAutoUpdate in r144."),this.matrixWorldAutoUpdate=e}}class Rg{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=Bf,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=ji()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,i){e*=this.stride,i*=t.stride;for(let r=0,s=this.stride;re.far||t.push({distance:l,point:Pc.clone(),uv:bi.getInterpolation(Pc,gp,Rc,vp,Cb,Kv,Pb,new ye),face:null,object:this})}copy(e,t){return super.copy(e,t),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}}function yp(n,e,t,i,r,s){zl.subVectors(n,t).addScalar(.5).multiply(i),r!==void 0?(Lc.x=s*zl.x-r*zl.y,Lc.y=r*zl.x+s*zl.y):Lc.copy(zl),n.copy(e),n.x+=Lc.x,n.y+=Lc.y,n.applyMatrix4(YL)}const xp=new N,Lb=new N;class ZL extends Tt{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const t=e.levels;for(let i=0,r=t.length;i0){let i,r;for(i=1,r=t.length;i0){xp.setFromMatrixPosition(this.matrixWorld);const r=e.ray.origin.distanceTo(xp);this.getObjectForDistance(r).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){xp.setFromMatrixPosition(e.matrixWorld),Lb.setFromMatrixPosition(this.matrixWorld);const i=xp.distanceTo(Lb)/e.zoom;t[0].object.visible=!0;let r,s;for(r=1,s=t.length;r=o)t[r-1].object.visible=!1,t[r].object.visible=!0;else break}for(this._currentLevel=r-1;rl)continue;p.applyMatrix4(this.matrixWorld);const L=e.ray.origin.distanceTo(p);Le.far||t.push({distance:L,point:d.clone().applyMatrix4(this.matrixWorld),index:w,face:null,faceIndex:null,object:this})}}else{const m=Math.max(0,o.start),S=Math.min(M.count,o.start+o.count);for(let w=m,A=S-1;wl)continue;p.applyMatrix4(this.matrixWorld);const P=e.ray.origin.distanceTo(p);Pe.far||t.push({distance:P,point:d.clone().applyMatrix4(this.matrixWorld),index:w,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const t=this.geometry.morphAttributes,i=Object.keys(t);if(i.length>0){const r=t[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;s0){const r=t[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;sr.far)return;s.push({distance:f,distanceToRay:Math.sqrt(a),point:l,index:e,face:null,object:o})}}class iG extends fn{constructor(e,t,i,r,s,o,a,l,f){super(e,t,i,r,s,o,a,l,f),this.isVideoTexture=!0,this.minFilter=o!==void 0?o:gn,this.magFilter=s!==void 0?s:gn,this.generateMipmaps=!1;const h=this;function d(){h.needsUpdate=!0,e.requestVideoFrameCallback(d)}"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback(d)}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;"requestVideoFrameCallback"in e===!1&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class rG extends fn{constructor(e,t,i){super({width:e,height:t}),this.isFramebufferTexture=!0,this.format=i,this.magFilter=pn,this.minFilter=pn,this.generateMipmaps=!1,this.needsUpdate=!0}}class mS extends fn{constructor(e,t,i,r,s,o,a,l,f,h,d,p){super(null,o,a,l,f,h,r,s,d,p),this.isCompressedTexture=!0,this.image={width:t,height:i},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class sG extends mS{constructor(e,t,i,r,s,o){super(e,t,i,s,o),this.isCompressedArrayTexture=!0,this.image.depth=r,this.wrapR=ii}}class oG extends fn{constructor(e,t,i,r,s,o,a,l,f){super(e,t,i,r,s,o,a,l,f),this.isCanvasTexture=!0,this.needsUpdate=!0}}class Ur{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,t){const i=this.getUtoTmapping(e);return this.getPoint(i,t)}getPoints(e=5){const t=[];for(let i=0;i<=e;i++)t.push(this.getPoint(i/e));return t}getSpacedPoints(e=5){const t=[];for(let i=0;i<=e;i++)t.push(this.getPointAt(i/e));return t}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const t=[];let i,r=this.getPoint(0),s=0;t.push(0);for(let o=1;o<=e;o++)i=this.getPoint(o/e),s+=i.distanceTo(r),t.push(s),r=i;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t){const i=this.getLengths();let r=0;const s=i.length;let o;t?o=t:o=e*i[s-1];let a=0,l=s-1,f;for(;a<=l;)if(r=Math.floor(a+(l-a)/2),f=i[r]-o,f<0)a=r+1;else if(f>0)l=r-1;else{l=r;break}if(r=l,i[r]===o)return r/(s-1);const h=i[r],p=i[r+1]-h,v=(o-h)/p;return(r+v)/(s-1)}getTangent(e,t){let r=e-1e-4,s=e+1e-4;r<0&&(r=0),s>1&&(s=1);const o=this.getPoint(r),a=this.getPoint(s),l=t||(o.isVector2?new ye:new N);return l.copy(a).sub(o).normalize(),l}getTangentAt(e,t){const i=this.getUtoTmapping(e);return this.getTangent(i,t)}computeFrenetFrames(e,t){const i=new N,r=[],s=[],o=[],a=new N,l=new ot;for(let v=0;v<=e;v++){const y=v/e;r[v]=this.getTangentAt(y,new N)}s[0]=new N,o[0]=new N;let f=Number.MAX_VALUE;const h=Math.abs(r[0].x),d=Math.abs(r[0].y),p=Math.abs(r[0].z);h<=f&&(f=h,i.set(1,0,0)),d<=f&&(f=d,i.set(0,1,0)),p<=f&&i.set(0,0,1),a.crossVectors(r[0],i).normalize(),s[0].crossVectors(r[0],a),o[0].crossVectors(r[0],s[0]);for(let v=1;v<=e;v++){if(s[v]=s[v-1].clone(),o[v]=o[v-1].clone(),a.crossVectors(r[v-1],r[v]),a.length()>Number.EPSILON){a.normalize();const y=Math.acos(cn(r[v-1].dot(r[v]),-1,1));s[v].applyMatrix4(l.makeRotationAxis(a,y))}o[v].crossVectors(r[v],s[v])}if(t===!0){let v=Math.acos(cn(s[0].dot(s[e]),-1,1));v/=e,r[0].dot(a.crossVectors(s[0],s[e]))>0&&(v=-v);for(let y=1;y<=e;y++)s[y].applyMatrix4(l.makeRotationAxis(r[y],v*y)),o[y].crossVectors(r[y],s[y])}return{tangents:r,normals:s,binormals:o}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class Dg extends Ur{constructor(e=0,t=0,i=1,r=1,s=0,o=Math.PI*2,a=!1,l=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=i,this.yRadius=r,this.aStartAngle=s,this.aEndAngle=o,this.aClockwise=a,this.aRotation=l}getPoint(e,t){const i=t||new ye,r=Math.PI*2;let s=this.aEndAngle-this.aStartAngle;const o=Math.abs(s)r;)s-=r;s0?0:(Math.floor(Math.abs(a)/s)+1)*s:l===0&&a===s-1&&(a=s-2,l=1);let f,h;this.closed||a>0?f=r[(a-1)%s]:(Ap.subVectors(r[0],r[1]).add(r[0]),f=Ap);const d=r[a%s],p=r[(a+1)%s];if(this.closed||a+2r.length-2?r.length-1:o+1],d=r[o>r.length-3?r.length-1:o+2];return i.set(jb(a,l.x,f.x,h.x,d.x),jb(a,l.y,f.y,h.y,d.y)),i}copy(e){super.copy(e),this.points=[];for(let t=0,i=e.points.length;t=i){const o=r[s]-i,a=this.curves[s],l=a.getLength(),f=l===0?0:1-o/l;return a.getPointAt(f,t)}s++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let t=0;for(let i=0,r=this.curves.length;i1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,i=e.curves.length;t0){const d=f.getPoint(0);d.equals(this.currentPoint)||this.lineTo(d.x,d.y)}this.curves.push(f);const h=f.getPoint(1);return this.currentPoint.copy(h),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class Wu extends dt{constructor(e=[new ye(0,-.5),new ye(.5,0),new ye(0,.5)],t=12,i=0,r=Math.PI*2){super(),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:i,phiLength:r},t=Math.floor(t),r=cn(r,0,Math.PI*2);const s=[],o=[],a=[],l=[],f=[],h=1/t,d=new N,p=new ye,v=new N,y=new N,_=new N;let M=0,m=0;for(let S=0;S<=e.length-1;S++)switch(S){case 0:M=e[S+1].x-e[S].x,m=e[S+1].y-e[S].y,v.x=m*1,v.y=-M,v.z=m*0,_.copy(v),v.normalize(),l.push(v.x,v.y,v.z);break;case e.length-1:l.push(_.x,_.y,_.z);break;default:M=e[S+1].x-e[S].x,m=e[S+1].y-e[S].y,v.x=m*1,v.y=-M,v.z=m*0,y.copy(v),v.x+=_.x,v.y+=_.y,v.z+=_.z,v.normalize(),l.push(v.x,v.y,v.z),_.copy(y)}for(let S=0;S<=t;S++){const w=i+S*h*r,A=Math.sin(w),b=Math.cos(w);for(let P=0;P<=e.length-1;P++){d.x=e[P].x*A,d.y=e[P].y,d.z=e[P].x*b,o.push(d.x,d.y,d.z),p.x=S/t,p.y=P/(e.length-1),a.push(p.x,p.y);const I=l[3*P+0]*A,L=l[3*P+1],C=l[3*P+0]*b;f.push(I,L,C)}}for(let S=0;S0&&w(!0),t>0&&w(!1)),this.setIndex(h),this.setAttribute("position",new We(d,3)),this.setAttribute("normal",new We(p,3)),this.setAttribute("uv",new We(v,2));function S(){const A=new N,b=new N;let P=0;const I=(t-e)/i;for(let L=0;L<=s;L++){const C=[],R=L/s,W=R*(t-e)+e;for(let J=0;J<=r;J++){const j=J/r,X=j*l+a,Z=Math.sin(X),se=Math.cos(X);b.x=W*Z,b.y=-R*i+M,b.z=W*se,d.push(b.x,b.y,b.z),A.set(Z,I,se).normalize(),p.push(A.x,A.y,A.z),v.push(j,1-R),C.push(y++)}_.push(C)}for(let L=0;L.9&&I<.1&&(w<.2&&(o[S+0]+=1),A<.2&&(o[S+2]+=1),b<.2&&(o[S+4]+=1))}}function p(S){s.push(S.x,S.y,S.z)}function v(S,w){const A=S*3;w.x=e[A+0],w.y=e[A+1],w.z=e[A+2]}function y(){const S=new N,w=new N,A=new N,b=new N,P=new ye,I=new ye,L=new ye;for(let C=0,R=0;C80*t){a=f=n[0],l=h=n[1];for(let y=t;yf&&(f=d),p>h&&(h=p);v=Math.max(f-a,h-l),v=v!==0?32767/v:0}return Wf(s,o,t,a,l,v,0),o}};function oR(n,e,t,i,r){let s,o;if(r===LG(n,e,t,i)>0)for(s=e;s=e;s-=i)o=Xb(s,n[s],n[s+1],o);return o&&Ng(o,o.next)&&(jf(o),o=o.next),o}function Ya(n,e){if(!n)return n;e||(e=n);let t=n,i;do if(i=!1,!t.steiner&&(Ng(t,t.next)||tn(t.prev,t,t.next)===0)){if(jf(t),t=e=t.prev,t===t.next)break;i=!0}else t=t.next;while(i||t!==e);return e}function Wf(n,e,t,i,r,s,o){if(!n)return;!o&&s&&AG(n,i,r,s);let a=n,l,f;for(;n.prev!==n.next;){if(l=n.prev,f=n.next,s?gG(n,i,r,s):mG(n)){e.push(l.i/t|0),e.push(n.i/t|0),e.push(f.i/t|0),jf(n),n=f.next,a=f.next;continue}if(n=f,n===a){o?o===1?(n=vG(Ya(n),e,t),Wf(n,e,t,i,r,s,2)):o===2&&yG(n,e,t,i,r,s):Wf(Ya(n),e,t,i,r,s,1);break}}}function mG(n){const e=n.prev,t=n,i=n.next;if(tn(e,t,i)>=0)return!1;const r=e.x,s=t.x,o=i.x,a=e.y,l=t.y,f=i.y,h=rs?r>o?r:o:s>o?s:o,v=a>l?a>f?a:f:l>f?l:f;let y=i.next;for(;y!==e;){if(y.x>=h&&y.x<=p&&y.y>=d&&y.y<=v&&uu(r,a,s,l,o,f,y.x,y.y)&&tn(y.prev,y,y.next)>=0)return!1;y=y.next}return!0}function gG(n,e,t,i){const r=n.prev,s=n,o=n.next;if(tn(r,s,o)>=0)return!1;const a=r.x,l=s.x,f=o.x,h=r.y,d=s.y,p=o.y,v=al?a>f?a:f:l>f?l:f,M=h>d?h>p?h:p:d>p?d:p,m=d_(v,y,e,t,i),S=d_(_,M,e,t,i);let w=n.prevZ,A=n.nextZ;for(;w&&w.z>=m&&A&&A.z<=S;){if(w.x>=v&&w.x<=_&&w.y>=y&&w.y<=M&&w!==r&&w!==o&&uu(a,h,l,d,f,p,w.x,w.y)&&tn(w.prev,w,w.next)>=0||(w=w.prevZ,A.x>=v&&A.x<=_&&A.y>=y&&A.y<=M&&A!==r&&A!==o&&uu(a,h,l,d,f,p,A.x,A.y)&&tn(A.prev,A,A.next)>=0))return!1;A=A.nextZ}for(;w&&w.z>=m;){if(w.x>=v&&w.x<=_&&w.y>=y&&w.y<=M&&w!==r&&w!==o&&uu(a,h,l,d,f,p,w.x,w.y)&&tn(w.prev,w,w.next)>=0)return!1;w=w.prevZ}for(;A&&A.z<=S;){if(A.x>=v&&A.x<=_&&A.y>=y&&A.y<=M&&A!==r&&A!==o&&uu(a,h,l,d,f,p,A.x,A.y)&&tn(A.prev,A,A.next)>=0)return!1;A=A.nextZ}return!0}function vG(n,e,t){let i=n;do{const r=i.prev,s=i.next.next;!Ng(r,s)&&aR(r,i,i.next,s)&&Gf(r,s)&&Gf(s,r)&&(e.push(r.i/t|0),e.push(i.i/t|0),e.push(s.i/t|0),jf(i),jf(i.next),i=n=s),i=i.next}while(i!==n);return Ya(i)}function yG(n,e,t,i,r,s){let o=n;do{let a=o.next.next;for(;a!==o.prev;){if(o.i!==a.i&&TG(o,a)){let l=lR(o,a);o=Ya(o,o.next),l=Ya(l,l.next),Wf(o,e,t,i,r,s,0),Wf(l,e,t,i,r,s,0);return}a=a.next}o=o.next}while(o!==n)}function xG(n,e,t,i){const r=[];let s,o,a,l,f;for(s=0,o=e.length;s=t.next.y&&t.next.y!==t.y){const p=t.x+(o-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(p<=s&&p>i&&(i=p,r=t.x=t.x&&t.x>=l&&s!==t.x&&uu(or.x||t.x===r.x&&MG(r,t)))&&(r=t,h=d)),t=t.next;while(t!==a);return r}function MG(n,e){return tn(n.prev,n,e.prev)<0&&tn(e.next,n,n.next)<0}function AG(n,e,t,i){let r=n;do r.z===0&&(r.z=d_(r.x,r.y,e,t,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next;while(r!==n);r.prevZ.nextZ=null,r.prevZ=null,EG(r)}function EG(n){let e,t,i,r,s,o,a,l,f=1;do{for(t=n,n=null,s=null,o=0;t;){for(o++,i=t,a=0,e=0;e0||l>0&&i;)a!==0&&(l===0||!i||t.z<=i.z)?(r=t,t=t.nextZ,a--):(r=i,i=i.nextZ,l--),s?s.nextZ=r:n=r,r.prevZ=s,s=r;t=i}s.nextZ=null,f*=2}while(o>1);return n}function d_(n,e,t,i,r){return n=(n-t)*r|0,e=(e-i)*r|0,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,n|e<<1}function bG(n){let e=n,t=n;do(e.x=(n-o)*(s-a)&&(n-o)*(i-a)>=(t-o)*(e-a)&&(t-o)*(s-a)>=(r-o)*(i-a)}function TG(n,e){return n.next.i!==e.i&&n.prev.i!==e.i&&!CG(n,e)&&(Gf(n,e)&&Gf(e,n)&&PG(n,e)&&(tn(n.prev,n,e.prev)||tn(n,e.prev,e))||Ng(n,e)&&tn(n.prev,n,n.next)>0&&tn(e.prev,e,e.next)>0)}function tn(n,e,t){return(e.y-n.y)*(t.x-e.x)-(e.x-n.x)*(t.y-e.y)}function Ng(n,e){return n.x===e.x&&n.y===e.y}function aR(n,e,t,i){const r=Pp(tn(n,e,t)),s=Pp(tn(n,e,i)),o=Pp(tn(t,i,n)),a=Pp(tn(t,i,e));return!!(r!==s&&o!==a||r===0&&Cp(n,t,e)||s===0&&Cp(n,i,e)||o===0&&Cp(t,n,i)||a===0&&Cp(t,e,i))}function Cp(n,e,t){return e.x<=Math.max(n.x,t.x)&&e.x>=Math.min(n.x,t.x)&&e.y<=Math.max(n.y,t.y)&&e.y>=Math.min(n.y,t.y)}function Pp(n){return n>0?1:n<0?-1:0}function CG(n,e){let t=n;do{if(t.i!==n.i&&t.next.i!==n.i&&t.i!==e.i&&t.next.i!==e.i&&aR(t,t.next,n,e))return!0;t=t.next}while(t!==n);return!1}function Gf(n,e){return tn(n.prev,n,n.next)<0?tn(n,e,n.next)>=0&&tn(n,n.prev,e)>=0:tn(n,e,n.prev)<0||tn(n,n.next,e)<0}function PG(n,e){let t=n,i=!1;const r=(n.x+e.x)/2,s=(n.y+e.y)/2;do t.y>s!=t.next.y>s&&t.next.y!==t.y&&r<(t.next.x-t.x)*(s-t.y)/(t.next.y-t.y)+t.x&&(i=!i),t=t.next;while(t!==n);return i}function lR(n,e){const t=new p_(n.i,n.x,n.y),i=new p_(e.i,e.x,e.y),r=n.next,s=e.prev;return n.next=e,e.prev=n,t.next=r,r.prev=t,i.next=t,t.prev=i,s.next=i,i.prev=s,i}function Xb(n,e,t,i){const r=new p_(n,e,t);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function jf(n){n.next.prev=n.prev,n.prev.next=n.next,n.prevZ&&(n.prevZ.nextZ=n.nextZ),n.nextZ&&(n.nextZ.prevZ=n.prevZ)}function p_(n,e,t){this.i=n,this.x=e,this.y=t,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function LG(n,e,t,i){let r=0;for(let s=e,o=t-i;s2&&n[e-1].equals(n[0])&&n.pop()}function qb(n,e){for(let t=0;tNumber.EPSILON){const le=Math.sqrt(z),be=Math.sqrt(nt*nt+_t*_t),Te=oe.x-je/le,Re=oe.y+qe/le,et=_e.x-_t/be,ze=_e.y+nt/be,pe=((et-Te)*_t-(ze-Re)*nt)/(qe*_t-je*nt);Ne=Te+qe*pe-ge.x,Ie=Re+je*pe-ge.y;const He=Ne*Ne+Ie*Ie;if(He<=2)return new ye(Ne,Ie);Ge=Math.sqrt(He/2)}else{let le=!1;qe>Number.EPSILON?nt>Number.EPSILON&&(le=!0):qe<-Number.EPSILON?nt<-Number.EPSILON&&(le=!0):Math.sign(je)===Math.sign(_t)&&(le=!0),le?(Ne=-je,Ie=qe,Ge=Math.sqrt(z)):(Ne=qe,Ie=je,Ge=Math.sqrt(z/2))}return new ye(Ne/Ge,Ie/Ge)}const H=[];for(let ge=0,oe=X.length,_e=oe-1,Ne=ge+1;ge=0;ge--){const oe=ge/M,_e=v*Math.cos(oe*Math.PI/2),Ne=y*Math.sin(oe*Math.PI/2)+_;for(let Ie=0,Ge=X.length;Ie=0;){const Ne=_e;let Ie=_e-1;Ie<0&&(Ie=ge.length-1);for(let Ge=0,qe=h+M*2;Ge0)&&v.push(w,A,P),(m!==i-1||l0!=e>0&&this.version++,this._sheen=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class dR extends Xn{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new Fe(16777215),this.specular=new Fe(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Fe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Xo,this.normalScale=new ye(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=fh,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class pR extends Xn{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Fe(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Fe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Xo,this.normalScale=new ye(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}class mR extends Xn{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Xo,this.normalScale=new ye(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}}class gR extends Xn{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new Fe(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Fe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Xo,this.normalScale=new ye(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=fh,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class vR extends Xn{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Fe(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Xo,this.normalScale=new ye(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.flatShading=e.flatShading,this.fog=e.fog,this}}class yR extends yi{constructor(e){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}}function lr(n,e,t){return MS(n)?new n.constructor(n.subarray(e,t!==void 0?t:n.length)):n.slice(e,t)}function Ra(n,e,t){return!n||!t&&n.constructor===e?n:typeof e.BYTES_PER_ELEMENT=="number"?new e(n):Array.prototype.slice.call(n)}function MS(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function xR(n){function e(r,s){return n[r]-n[s]}const t=n.length,i=new Array(t);for(let r=0;r!==t;++r)i[r]=r;return i.sort(e),i}function m_(n,e,t){const i=n.length,r=new n.constructor(i);for(let s=0,o=0;o!==i;++s){const a=t[s]*e;for(let l=0;l!==e;++l)r[o++]=n[a+l]}return r}function AS(n,e,t,i){let r=1,s=n[0];for(;s!==void 0&&s[i]===void 0;)s=n[r++];if(s===void 0)return;let o=s[i];if(o!==void 0)if(Array.isArray(o))do o=s[i],o!==void 0&&(e.push(s.time),t.push.apply(t,o)),s=n[r++];while(s!==void 0);else if(o.toArray!==void 0)do o=s[i],o!==void 0&&(e.push(s.time),o.toArray(t,t.length)),s=n[r++];while(s!==void 0);else do o=s[i],o!==void 0&&(e.push(s.time),t.push(o)),s=n[r++];while(s!==void 0)}function kG(n,e,t,i,r=30){const s=n.clone();s.name=e;const o=[];for(let l=0;l=i)){d.push(f.times[v]);for(let _=0;_s.tracks[l].times[0]&&(a=s.tracks[l].times[0]);for(let l=0;l=a.times[y]){const m=y*d+h,S=m+d-h;_=lr(a.values,m,S)}else{const m=a.createInterpolant(),S=h,w=d-h;m.evaluate(s),_=lr(m.resultBuffer,S,w)}l==="quaternion"&&new ri().fromArray(_).normalize().conjugate().toArray(_);const M=f.times.length;for(let m=0;m=s)){const a=t[1];e=s)break t}o=i,i=0;break n}break e}for(;i>>1;et;)--o;if(++o,s!==0||o!==r){s>=o&&(o=Math.max(o,1),s=o-1);const a=this.getValueSize();this.times=lr(i,s,o),this.values=lr(this.values,s*a,o*a)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const i=this.times,r=this.values,s=i.length;s===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let a=0;a!==s;a++){const l=i[a];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),e=!1;break}if(o!==null&&o>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,o),e=!1;break}o=l}if(r!==void 0&&MS(r))for(let a=0,l=r.length;a!==l;++a){const f=r[a];if(isNaN(f)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,f),e=!1;break}}return e}optimize(){const e=lr(this.times),t=lr(this.values),i=this.getValueSize(),r=this.getInterpolation()===im,s=e.length-1;let o=1;for(let a=1;a0){e[o]=e[s];for(let a=s*i,l=o*i,f=0;f!==i;++f)t[l+f]=t[a+f];++o}return o!==e.length?(this.times=lr(e,0,o),this.values=lr(t,0,o*i)):(this.times=e,this.values=t),this}clone(){const e=lr(this.times,0),t=lr(this.values,0),i=this.constructor,r=new i(this.name,e,t);return r.createInterpolant=this.createInterpolant,r}}zr.prototype.TimeBufferType=Float32Array;zr.prototype.ValueBufferType=Float32Array;zr.prototype.DefaultInterpolation=zf;class nl extends zr{}nl.prototype.ValueTypeName="bool";nl.prototype.ValueBufferType=Array;nl.prototype.DefaultInterpolation=Uf;nl.prototype.InterpolantFactoryMethodLinear=void 0;nl.prototype.InterpolantFactoryMethodSmooth=void 0;class bS extends zr{}bS.prototype.ValueTypeName="color";class Xf extends zr{}Xf.prototype.ValueTypeName="number";class wR extends Th{constructor(e,t,i,r){super(e,t,i,r)}interpolate_(e,t,i,r){const s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=(i-t)/(r-t);let f=e*a;for(let h=f+a;f!==h;f+=4)ri.slerpFlat(s,0,o,f-a,o,f,l);return s}}class Xu extends zr{InterpolantFactoryMethodLinear(e){return new wR(this.times,this.values,this.getValueSize(),e)}}Xu.prototype.ValueTypeName="quaternion";Xu.prototype.DefaultInterpolation=zf;Xu.prototype.InterpolantFactoryMethodSmooth=void 0;class il extends zr{}il.prototype.ValueTypeName="string";il.prototype.ValueBufferType=Array;il.prototype.DefaultInterpolation=Uf;il.prototype.InterpolantFactoryMethodLinear=void 0;il.prototype.InterpolantFactoryMethodSmooth=void 0;class Yf extends zr{}Yf.prototype.ValueTypeName="vector";class qf{constructor(e,t=-1,i,r=Eg){this.name=e,this.tracks=i,this.duration=t,this.blendMode=r,this.uuid=ji(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],i=e.tracks,r=1/(e.fps||1);for(let o=0,a=i.length;o!==a;++o)t.push(zG(i[o]).scale(r));const s=new this(e.name,e.duration,t,e.blendMode);return s.uuid=e.uuid,s}static toJSON(e){const t=[],i=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let s=0,o=i.length;s!==o;++s)t.push(zr.toJSON(i[s]));return r}static CreateFromMorphTargetSequence(e,t,i,r){const s=t.length,o=[];for(let a=0;a1){const d=h[1];let p=r[d];p||(r[d]=p=[]),p.push(f)}}const o=[];for(const a in r)o.push(this.CreateFromMorphTargetSequence(a,r[a],t,i));return o}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const i=function(d,p,v,y,_){if(v.length!==0){const M=[],m=[];AS(v,M,m,y),M.length!==0&&_.push(new d(p,M,m))}},r=[],s=e.name||"default",o=e.fps||30,a=e.blendMode;let l=e.length||-1;const f=e.hierarchy||[];for(let d=0;d{t&&t(s),this.manager.itemEnd(e)},0),s;if(Ss[e]!==void 0){Ss[e].push({onLoad:t,onProgress:i,onError:r});return}Ss[e]=[],Ss[e].push({onLoad:t,onProgress:i,onError:r});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,l=this.responseType;fetch(o).then(f=>{if(f.status===200||f.status===0){if(f.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||f.body===void 0||f.body.getReader===void 0)return f;const h=Ss[e],d=f.body.getReader(),p=f.headers.get("Content-Length")||f.headers.get("X-File-Size"),v=p?parseInt(p):0,y=v!==0;let _=0;const M=new ReadableStream({start(m){S();function S(){d.read().then(({done:w,value:A})=>{if(w)m.close();else{_+=A.byteLength;const b=new ProgressEvent("progress",{lengthComputable:y,loaded:_,total:v});for(let P=0,I=h.length;P{switch(l){case"arraybuffer":return f.arrayBuffer();case"blob":return f.blob();case"document":return f.text().then(h=>new DOMParser().parseFromString(h,a));case"json":return f.json();default:if(a===void 0)return f.text();{const d=/charset="?([^;"\s]*)"?/i.exec(a),p=d&&d[1]?d[1].toLowerCase():void 0,v=new TextDecoder(p);return f.arrayBuffer().then(y=>v.decode(y))}}}).then(f=>{qa.add(e,f);const h=Ss[e];delete Ss[e];for(let d=0,p=h.length;d{const h=Ss[e];if(h===void 0)throw this.manager.itemError(e),f;delete Ss[e];for(let d=0,p=h.length;d{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class BG extends Ji{constructor(e){super(e)}load(e,t,i,r){const s=this,o=new Vs(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(a){try{t(s.parse(JSON.parse(a)))}catch(l){r?r(l):console.error(l),s.manager.itemError(e)}},i,r)}parse(e){const t=[];for(let i=0;i0:r.vertexColors=e.vertexColors),e.uniforms!==void 0)for(const s in e.uniforms){const o=e.uniforms[s];switch(r.uniforms[s]={},o.type){case"t":r.uniforms[s].value=i(o.value);break;case"c":r.uniforms[s].value=new Fe().setHex(o.value);break;case"v2":r.uniforms[s].value=new ye().fromArray(o.value);break;case"v3":r.uniforms[s].value=new N().fromArray(o.value);break;case"v4":r.uniforms[s].value=new Dt().fromArray(o.value);break;case"m3":r.uniforms[s].value=new Mt().fromArray(o.value);break;case"m4":r.uniforms[s].value=new ot().fromArray(o.value);break;default:r.uniforms[s].value=o.value}}if(e.defines!==void 0&&(r.defines=e.defines),e.vertexShader!==void 0&&(r.vertexShader=e.vertexShader),e.fragmentShader!==void 0&&(r.fragmentShader=e.fragmentShader),e.glslVersion!==void 0&&(r.glslVersion=e.glslVersion),e.extensions!==void 0)for(const s in e.extensions)r.extensions[s]=e.extensions[s];if(e.size!==void 0&&(r.size=e.size),e.sizeAttenuation!==void 0&&(r.sizeAttenuation=e.sizeAttenuation),e.map!==void 0&&(r.map=i(e.map)),e.matcap!==void 0&&(r.matcap=i(e.matcap)),e.alphaMap!==void 0&&(r.alphaMap=i(e.alphaMap)),e.bumpMap!==void 0&&(r.bumpMap=i(e.bumpMap)),e.bumpScale!==void 0&&(r.bumpScale=e.bumpScale),e.normalMap!==void 0&&(r.normalMap=i(e.normalMap)),e.normalMapType!==void 0&&(r.normalMapType=e.normalMapType),e.normalScale!==void 0){let s=e.normalScale;Array.isArray(s)===!1&&(s=[s,s]),r.normalScale=new ye().fromArray(s)}return e.displacementMap!==void 0&&(r.displacementMap=i(e.displacementMap)),e.displacementScale!==void 0&&(r.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(r.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(r.roughnessMap=i(e.roughnessMap)),e.metalnessMap!==void 0&&(r.metalnessMap=i(e.metalnessMap)),e.emissiveMap!==void 0&&(r.emissiveMap=i(e.emissiveMap)),e.emissiveIntensity!==void 0&&(r.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(r.specularMap=i(e.specularMap)),e.specularIntensityMap!==void 0&&(r.specularIntensityMap=i(e.specularIntensityMap)),e.specularColorMap!==void 0&&(r.specularColorMap=i(e.specularColorMap)),e.envMap!==void 0&&(r.envMap=i(e.envMap)),e.envMapIntensity!==void 0&&(r.envMapIntensity=e.envMapIntensity),e.reflectivity!==void 0&&(r.reflectivity=e.reflectivity),e.refractionRatio!==void 0&&(r.refractionRatio=e.refractionRatio),e.lightMap!==void 0&&(r.lightMap=i(e.lightMap)),e.lightMapIntensity!==void 0&&(r.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(r.aoMap=i(e.aoMap)),e.aoMapIntensity!==void 0&&(r.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(r.gradientMap=i(e.gradientMap)),e.clearcoatMap!==void 0&&(r.clearcoatMap=i(e.clearcoatMap)),e.clearcoatRoughnessMap!==void 0&&(r.clearcoatRoughnessMap=i(e.clearcoatRoughnessMap)),e.clearcoatNormalMap!==void 0&&(r.clearcoatNormalMap=i(e.clearcoatNormalMap)),e.clearcoatNormalScale!==void 0&&(r.clearcoatNormalScale=new ye().fromArray(e.clearcoatNormalScale)),e.iridescenceMap!==void 0&&(r.iridescenceMap=i(e.iridescenceMap)),e.iridescenceThicknessMap!==void 0&&(r.iridescenceThicknessMap=i(e.iridescenceThicknessMap)),e.transmissionMap!==void 0&&(r.transmissionMap=i(e.transmissionMap)),e.thicknessMap!==void 0&&(r.thicknessMap=i(e.thicknessMap)),e.sheenColorMap!==void 0&&(r.sheenColorMap=i(e.sheenColorMap)),e.sheenRoughnessMap!==void 0&&(r.sheenRoughnessMap=i(e.sheenRoughnessMap)),r}setTextures(e){return this.textures=e,this}static createMaterialFromType(e){const t={ShadowMaterial:cR,SpriteMaterial:hS,RawShaderMaterial:fR,ShaderMaterial:is,PointsMaterial:pS,MeshPhysicalMaterial:hR,MeshStandardMaterial:wS,MeshPhongMaterial:dR,MeshToonMaterial:pR,MeshNormalMaterial:mR,MeshLambertMaterial:gR,MeshDepthMaterial:lS,MeshDistanceMaterial:uS,MeshBasicMaterial:Yo,MeshMatcapMaterial:vR,LineDashedMaterial:yR,LineBasicMaterial:yi,Material:Xn};return new t[e]}}class g_{static decodeText(e){if(typeof TextDecoder<"u")return new TextDecoder().decode(e);let t="";for(let i=0,r=e.length;i0){const l=new TS(t);s=new Zf(l),s.setCrossOrigin(this.crossOrigin);for(let f=0,h=e.length;f0){r=new Zf(this.manager),r.setCrossOrigin(this.crossOrigin);for(let o=0,a=e.length;o"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,t,i,r){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const s=this,o=qa.get(e);if(o!==void 0)return s.manager.itemStart(e),setTimeout(function(){t&&t(o),s.manager.itemEnd(e)},0),o;const a={};a.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",a.headers=this.requestHeader,fetch(e,a).then(function(l){return l.blob()}).then(function(l){return createImageBitmap(l,Object.assign(s.options,{colorSpaceConversion:"none"}))}).then(function(l){qa.add(e,l),t&&t(l),s.manager.itemEnd(e)}).catch(function(l){r&&r(l),s.manager.itemError(e),s.manager.itemEnd(e)}),s.manager.itemStart(e)}}let Lp;class PS{static getContext(){return Lp===void 0&&(Lp=new(window.AudioContext||window.webkitAudioContext)),Lp}static setContext(e){Lp=e}}class JG extends Ji{constructor(e){super(e)}load(e,t,i,r){const s=this,o=new Vs(this.manager);o.setResponseType("arraybuffer"),o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(a){try{const l=a.slice(0);PS.getContext().decodeAudioData(l,function(h){t(h)})}catch(l){r?r(l):console.error(l),s.manager.itemError(e)}},i,r)}}class KG extends Ug{constructor(e,t,i=1){super(void 0,i),this.isHemisphereLightProbe=!0;const r=new Fe().set(e),s=new Fe().set(t),o=new N(r.r,r.g,r.b),a=new N(s.r,s.g,s.b),l=Math.sqrt(Math.PI),f=l*Math.sqrt(.75);this.sh.coefficients[0].copy(o).add(a).multiplyScalar(l),this.sh.coefficients[1].copy(o).sub(a).multiplyScalar(f)}}class QG extends Ug{constructor(e,t=1){super(void 0,t),this.isAmbientLightProbe=!0;const i=new Fe().set(e);this.sh.coefficients[0].set(i.r,i.g,i.b).multiplyScalar(2*Math.sqrt(Math.PI))}}const nT=new ot,iT=new ot,ca=new ot;class $G{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Wt,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Wt,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(e){const t=this._cache;if(t.focus!==e.focus||t.fov!==e.fov||t.aspect!==e.aspect*this.aspect||t.near!==e.near||t.far!==e.far||t.zoom!==e.zoom||t.eyeSep!==this.eyeSep){t.focus=e.focus,t.fov=e.fov,t.aspect=e.aspect*this.aspect,t.near=e.near,t.far=e.far,t.zoom=e.zoom,t.eyeSep=this.eyeSep,ca.copy(e.projectionMatrix);const r=t.eyeSep/2,s=r*t.near/t.focus,o=t.near*Math.tan(Oa*t.fov*.5)/t.zoom;let a,l;iT.elements[12]=-r,nT.elements[12]=r,a=-o*t.aspect+s,l=o*t.aspect+s,ca.elements[0]=2*t.near/(l-a),ca.elements[8]=(l+a)/(l-a),this.cameraL.projectionMatrix.copy(ca),a=-o*t.aspect-s,l=o*t.aspect-s,ca.elements[0]=2*t.near/(l-a),ca.elements[8]=(l+a)/(l-a),this.cameraR.projectionMatrix.copy(ca)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(iT),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(nT)}}class LS{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=rT(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const t=rT();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function rT(){return(typeof performance>"u"?Date:performance).now()}const fa=new N,sT=new ri,ej=new N,ha=new N;class tj extends Tt{constructor(){super(),this.type="AudioListener",this.context=PS.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new LS}getInput(){return this.gain}removeFilter(){return this.filter!==null&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(e){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}updateMatrixWorld(e){super.updateMatrixWorld(e);const t=this.context.listener,i=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(fa,sT,ej),ha.set(0,0,-1).applyQuaternion(sT),t.positionX){const r=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(fa.x,r),t.positionY.linearRampToValueAtTime(fa.y,r),t.positionZ.linearRampToValueAtTime(fa.z,r),t.forwardX.linearRampToValueAtTime(ha.x,r),t.forwardY.linearRampToValueAtTime(ha.y,r),t.forwardZ.linearRampToValueAtTime(ha.z,r),t.upX.linearRampToValueAtTime(i.x,r),t.upY.linearRampToValueAtTime(i.y,r),t.upZ.linearRampToValueAtTime(i.z,r)}else t.setPosition(fa.x,fa.y,fa.z),t.setOrientation(ha.x,ha.y,ha.z,i.x,i.y,i.z)}}class IR extends Tt{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(e=0){if(this.isPlaying===!0){console.warn("THREE.Audio: Audio is already playing.");return}if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}this._startedAt=this.context.currentTime+e;const t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.loopStart=this.loopStart,t.loopEnd=this.loopEnd,t.onended=this.onEnded.bind(this),t.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=t,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this}stop(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this._progress=0,this.source!==null&&(this.source.stop(),this.source.onended=null),this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,t=this.filters.length;e0){this.source.disconnect(this.filters[0]);for(let e=1,t=this.filters.length;e0&&this._mixBufferRegionAdditive(i,r,this._addIndex*t,1,t);for(let l=t,f=t+t;l!==f;++l)if(i[l]!==i[l+t]){a.setValue(i,r);break}}saveOriginalState(){const e=this.binding,t=this.buffer,i=this.valueSize,r=i*this._origIndex;e.getValue(t,r);for(let s=i,o=r;s!==o;++s)t[s]=t[r+s%i];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=this.valueSize*3;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let i=e;i=.5)for(let o=0;o!==s;++o)e[t+o]=e[i+o]}_slerp(e,t,i,r){ri.slerpFlat(e,t,e,t,e,i,r)}_slerpAdditive(e,t,i,r,s){const o=this._workIndex*s;ri.multiplyQuaternionsFlat(e,o,e,t,e,i),ri.slerpFlat(e,t,e,t,e,o,r)}_lerp(e,t,i,r,s){const o=1-r;for(let a=0;a!==s;++a){const l=t+a;e[l]=e[l]*o+e[i+a]*r}}_lerpAdditive(e,t,i,r,s){for(let o=0;o!==s;++o){const a=t+o;e[a]=e[a]+e[i+o]*r}}}const RS="\\[\\]\\.:\\/",sj=new RegExp("["+RS+"]","g"),IS="[^"+RS+"]",oj="[^"+RS.replace("\\.","")+"]",aj=/((?:WC+[\/:])*)/.source.replace("WC",IS),lj=/(WCOD+)?/.source.replace("WCOD",oj),uj=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",IS),cj=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",IS),fj=new RegExp("^"+aj+lj+uj+cj+"$"),hj=["material","materials","bones","map"];class dj{constructor(e,t,i){const r=i||Et.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}getValue(e,t){this.bind();const i=this._targetGroup.nCachedObjects_,r=this._bindings[i];r!==void 0&&r.getValue(e,t)}setValue(e,t){const i=this._bindings;for(let r=this._targetGroup.nCachedObjects_,s=i.length;r!==s;++r)i[r].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].unbind()}}class Et{constructor(e,t,i){this.path=t,this.parsedPath=i||Et.parseTrackName(t),this.node=Et.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,i){return e&&e.isAnimationObjectGroup?new Et.Composite(e,t,i):new Et(e,t,i)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(sj,"")}static parseTrackName(e){const t=fj.exec(e);if(t===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const i={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},r=i.nodeName&&i.nodeName.lastIndexOf(".");if(r!==void 0&&r!==-1){const s=i.nodeName.substring(r+1);hj.indexOf(s)!==-1&&(i.nodeName=i.nodeName.substring(0,r),i.objectName=s)}if(i.propertyName===null||i.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return i}static findNode(e,t){if(t===void 0||t===""||t==="."||t===-1||t===e.name||t===e.uuid)return e;if(e.skeleton){const i=e.skeleton.getBoneByName(t);if(i!==void 0)return i}if(e.children){const i=function(s){for(let o=0;o=s){const d=s++,p=e[d];t[p.uuid]=h,e[h]=p,t[f]=d,e[d]=l;for(let v=0,y=r;v!==y;++v){const _=i[v],M=_[d],m=_[h];_[h]=M,_[d]=m}}}this.nCachedObjects_=s}uncache(){const e=this._objects,t=this._indicesByUUID,i=this._bindings,r=i.length;let s=this.nCachedObjects_,o=e.length;for(let a=0,l=arguments.length;a!==l;++a){const f=arguments[a],h=f.uuid,d=t[h];if(d!==void 0)if(delete t[h],d0&&(t[v.uuid]=d),e[d]=v,e.pop();for(let y=0,_=r;y!==_;++y){const M=i[y];M[d]=M[p],M.pop()}}}this.nCachedObjects_=s}subscribe_(e,t){const i=this._bindingsIndicesByPath;let r=i[e];const s=this._bindings;if(r!==void 0)return s[r];const o=this._paths,a=this._parsedPaths,l=this._objects,f=l.length,h=this.nCachedObjects_,d=new Array(f);r=s.length,i[e]=r,o.push(e),a.push(t),s.push(d);for(let p=h,v=l.length;p!==v;++p){const y=l[p];d[p]=new Et(y,e,t)}return d}unsubscribe_(e){const t=this._bindingsIndicesByPath,i=t[e];if(i!==void 0){const r=this._paths,s=this._parsedPaths,o=this._bindings,a=o.length-1,l=o[a],f=e[a];t[f]=i,o[i]=l,o.pop(),s[i]=s[a],s.pop(),r[i]=r[a],r.pop()}}}class kR{constructor(e,t,i=null,r=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=i,this.blendMode=r;const s=t.tracks,o=s.length,a=new Array(o),l={endingStart:Ca,endingEnd:Ca};for(let f=0;f!==o;++f){const h=s[f].createInterpolant(null);a[f]=h,h.settings=l}this._interpolantSettings=l,this._interpolants=a,this._propertyBindings=new Array(o),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=EL,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,i){if(e.fadeOut(t),this.fadeIn(t),i){const r=this._clip.duration,s=e._clip.duration,o=s/r,a=r/s;e.warp(1,o,t),this.warp(a,1,t)}return this}crossFadeTo(e,t,i){return e.crossFadeFrom(this,t,i)}stopFading(){const e=this._weightInterpolant;return e!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,i){const r=this._mixer,s=r.time,o=this.timeScale;let a=this._timeScaleInterpolant;a===null&&(a=r._lendControlInterpolant(),this._timeScaleInterpolant=a);const l=a.parameterPositions,f=a.sampleValues;return l[0]=s,l[1]=s+i,f[0]=e/o,f[1]=t/o,this}stopWarping(){const e=this._timeScaleInterpolant;return e!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,i,r){if(!this.enabled){this._updateWeight(e);return}const s=this._startTime;if(s!==null){const l=(e-s)*i;l<0||i===0?t=0:(this._startTime=null,t=i*l)}t*=this._updateTimeScale(e);const o=this._updateTime(t),a=this._updateWeight(e);if(a>0){const l=this._interpolants,f=this._propertyBindings;switch(this.blendMode){case Q1:for(let h=0,d=l.length;h!==d;++h)l[h].evaluate(o),f[h].accumulateAdditive(a);break;case Eg:default:for(let h=0,d=l.length;h!==d;++h)l[h].evaluate(o),f[h].accumulate(r,a)}}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;const i=this._weightInterpolant;if(i!==null){const r=i.evaluate(e)[0];t*=r,e>i.parameterPositions[1]&&(this.stopFading(),r===0&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;const i=this._timeScaleInterpolant;if(i!==null){const r=i.evaluate(e)[0];t*=r,e>i.parameterPositions[1]&&(this.stopWarping(),t===0?this.paused=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t}_updateTime(e){const t=this._clip.duration,i=this.loop;let r=this.time+e,s=this._loopCount;const o=i===bL;if(e===0)return s===-1?r:o&&(s&1)===1?t-r:r;if(i===AL){s===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(r>=t)r=t;else if(r<0)r=0;else{this.time=r;break e}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(s===-1&&(e>=0?(s=0,this._setEndings(!0,this.repetitions===0,o)):this._setEndings(this.repetitions===0,!0,o)),r>=t||r<0){const a=Math.floor(r/t);r-=t*a,s+=Math.abs(a);const l=this.repetitions-s;if(l<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,r=e>0?t:0,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(l===1){const f=e<0;this._setEndings(f,!f,o)}else this._setEndings(!1,!1,o);this._loopCount=s,this.time=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}else this.time=r;if(o&&(s&1)===1)return t-r}return r}_setEndings(e,t,i){const r=this._interpolantSettings;i?(r.endingStart=Pa,r.endingEnd=Pa):(e?r.endingStart=this.zeroSlopeAtStart?Pa:Ca:r.endingStart=Ff,t?r.endingEnd=this.zeroSlopeAtEnd?Pa:Ca:r.endingEnd=Ff)}_scheduleFading(e,t,i){const r=this._mixer,s=r.time;let o=this._weightInterpolant;o===null&&(o=r._lendControlInterpolant(),this._weightInterpolant=o);const a=o.parameterPositions,l=o.sampleValues;return a[0]=s,l[0]=t,a[1]=s+e,l[1]=i,this}}const mj=new Float32Array(1);class gj extends rs{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){const i=e._localRoot||this._root,r=e._clip.tracks,s=r.length,o=e._propertyBindings,a=e._interpolants,l=i.uuid,f=this._bindingsByRootAndName;let h=f[l];h===void 0&&(h={},f[l]=h);for(let d=0;d!==s;++d){const p=r[d],v=p.name;let y=h[v];if(y!==void 0)++y.referenceCount,o[d]=y;else{if(y=o[d],y!==void 0){y._cacheIndex===null&&(++y.referenceCount,this._addInactiveBinding(y,l,v));continue}const _=t&&t._propertyBindings[d].binding.parsedPath;y=new DR(Et.create(i,v,_),p.ValueTypeName,p.getValueSize()),++y.referenceCount,this._addInactiveBinding(y,l,v),o[d]=y}a[d].resultBuffer=y.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){const i=(e._localRoot||this._root).uuid,r=e._clip.uuid,s=this._actionsByClip[r];this._bindAction(e,s&&s.knownActions[0]),this._addInactiveAction(e,r,i)}const t=e._propertyBindings;for(let i=0,r=t.length;i!==r;++i){const s=t[i];s.useCount++===0&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const t=e._propertyBindings;for(let i=0,r=t.length;i!==r;++i){const s=t[i];--s.useCount===0&&(s.restoreOriginalState(),this._takeBackBinding(s))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const t=e._cacheIndex;return t!==null&&t=0;--i)e[i].stop();return this}update(e){e*=this.timeScale;const t=this._actions,i=this._nActiveActions,r=this.time+=e,s=Math.sign(e),o=this._accuIndex^=1;for(let f=0;f!==i;++f)t[f]._update(r,e,s,o);const a=this._bindings,l=this._nActiveBindings;for(let f=0;f!==l;++f)a[f].apply(o);return this}setTime(e){this.time=0;for(let t=0;tthis.max.x||e.ythis.max.y)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y)}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,lT).distanceTo(e)}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const uT=new N,Rp=new N;class Mj{constructor(e=new N,t=new N){this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){uT.subVectors(e,this.start),Rp.subVectors(this.end,this.start);const i=Rp.dot(Rp);let s=Rp.dot(uT)/i;return t&&(s=cn(s,0,1)),s}closestPointToPoint(e,t,i){const r=this.closestPointToPointParameter(e,t);return this.delta(i).multiplyScalar(r).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}const cT=new N;class Aj extends Tt{constructor(e,t){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=t,this.type="SpotLightHelper";const i=new dt,r=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let o=0,a=1,l=32;o1)for(let d=0;d.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{mT.set(e.z,0,-e.x).normalize();const t=Math.acos(e.y);this.quaternion.setFromAxisAngle(mT,t)}}setLength(e,t=e*.2,i=t*.2){this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(i,t,i),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class Uj extends as{constructor(e=1){const t=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],i=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],r=new dt;r.setAttribute("position",new We(t,3)),r.setAttribute("color",new We(i,3));const s=new yi({vertexColors:!0,toneMapped:!1});super(r,s),this.type="AxesHelper"}setColors(e,t,i){const r=new Fe,s=this.geometry.attributes.color.array;return r.set(e),r.toArray(s,0),r.toArray(s,3),r.set(t),r.toArray(s,6),r.toArray(s,9),r.set(i),r.toArray(s,12),r.toArray(s,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class zj{constructor(){this.type="ShapePath",this.color=new Fe,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new Hf,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,i,r){return this.currentPath.quadraticCurveTo(e,t,i,r),this}bezierCurveTo(e,t,i,r,s,o){return this.currentPath.bezierCurveTo(e,t,i,r,s,o),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function t(m){const S=[];for(let w=0,A=m.length;wNumber.EPSILON){if(R<0&&(I=S[P],C=-C,L=S[b],R=-R),m.yL.y)continue;if(m.y===I.y){if(m.x===I.x)return!0}else{const W=R*(m.x-I.x)-C*(m.y-I.y);if(W===0)return!0;if(W<0)continue;A=!A}}else{if(m.y!==I.y)continue;if(L.x<=m.x&&m.x<=I.x||I.x<=m.x&&m.x<=L.x)return!0}}return A}const r=ns.isClockWise,s=this.subPaths;if(s.length===0)return[];let o,a,l;const f=[];if(s.length===1)return a=s[0],l=new za,l.curves=a.curves,f.push(l),f;let h=!r(s[0].getPoints());h=e?!h:h;const d=[],p=[];let v=[],y=0,_;p[y]=void 0,v[y]=[];for(let m=0,S=s.length;m1){let m=!1,S=0;for(let w=0,A=p.length;w0&&m===!1&&(v=d)}let M;for(let m=0,S=p.length;mh||r.y>h)&&(r.x>h&&(s.x=Math.floor(h/Z.x),r.x=s.x*Z.x,X.mapSize.x=s.x),r.y>h&&(s.y=Math.floor(h/Z.y),r.y=s.y*Z.y,X.mapSize.y=s.y)),X.map===null){const ae=this.type!==su?{minFilter:pn,magFilter:pn}:{};X.map=new Or(r.x,r.y,ae),X.map.texture.name=j.name+".shadowMap",X.camera.updateProjectionMatrix()}n.setRenderTarget(X.map),n.clear();const se=X.getViewportCount();for(let ae=0;ae0||b.map&&b.alphaTest>0){const R=L.uuid,W=b.uuid;let J=f[R];J===void 0&&(J={},f[R]=J);let j=J[W];j===void 0&&(j=L.clone(),J[W]=j),L=j}if(L.visible=b.visible,L.wireframe=b.wireframe,I===su?L.side=b.shadowSide!==null?b.shadowSide:b.side:L.side=b.shadowSide!==null?b.shadowSide:d[b.side],L.alphaMap=b.alphaMap,L.alphaTest=b.alphaTest,L.map=b.map,L.clipShadows=b.clipShadows,L.clippingPlanes=b.clippingPlanes,L.clipIntersection=b.clipIntersection,L.displacementMap=b.displacementMap,L.displacementScale=b.displacementScale,L.displacementBias=b.displacementBias,L.wireframeLinewidth=b.wireframeLinewidth,L.linewidth=b.linewidth,P.isPointLight===!0&&L.isMeshDistanceMaterial===!0){const R=n.properties.get(L);R.light=P}return L}function w(A,b,P,I,L){if(A.visible===!1)return;if(A.layers.test(b.layers)&&(A.isMesh||A.isLine||A.isPoints)&&(A.castShadow||A.receiveShadow&&L===su)&&(!A.frustumCulled||i.intersectsObject(A))){A.modelViewMatrix.multiplyMatrices(P.matrixWorldInverse,A.matrixWorld);const W=e.update(A),J=A.material;if(Array.isArray(J)){const j=W.groups;for(let X=0,Z=j.length;X=1):D.indexOf("OpenGL ES")!==-1&&(ae=parseFloat(/^OpenGL ES (\d)/.exec(D)[1]),se=ae>=2);let H=null,B={};const te=n.getParameter(3088),$=n.getParameter(2978),ee=new Dt().fromArray(te),ue=new Dt().fromArray($);function Ee(Y,fe,Ae){const Ue=new Uint8Array(4),Je=n.createTexture();n.bindTexture(Y,Je),n.texParameteri(Y,10241,9728),n.texParameteri(Y,10240,9728);for(let Ot=0;Ot"u"?!1:/OculusBrowser/g.test(navigator.userAgent),y=new WeakMap;let _;const M=new WeakMap;let m=!1;try{m=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function S(z,k){return m?new OffscreenCanvas(z,k):Vf("canvas")}function w(z,k,le,be){let Te=1;if((z.width>be||z.height>be)&&(Te=be/Math.max(z.width,z.height)),Te<1||k===!0)if(typeof HTMLImageElement<"u"&&z instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&z instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&z instanceof ImageBitmap){const Re=k?IL:Math.floor,et=Re(Te*z.width),ze=Re(Te*z.height);_===void 0&&(_=S(et,ze));const pe=le?S(et,ze):_;return pe.width=et,pe.height=ze,pe.getContext("2d").drawImage(z,0,0,et,ze),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+z.width+"x"+z.height+") to ("+et+"x"+ze+")."),pe}else return"data"in z&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+z.width+"x"+z.height+")."),z;return z}function A(z){return u_(z.width)&&u_(z.height)}function b(z){return a?!1:z.wrapS!==ri||z.wrapT!==ri||z.minFilter!==pn&&z.minFilter!==gn}function P(z,k){return z.generateMipmaps&&k&&z.minFilter!==pn&&z.minFilter!==gn}function I(z){n.generateMipmap(z)}function L(z,k,le,be,Te=!1){if(a===!1)return k;if(z!==null){if(n[z]!==void 0)return n[z];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+z+"'")}let Re=k;return k===6403&&(le===5126&&(Re=33326),le===5131&&(Re=33325),le===5121&&(Re=33321)),k===33319&&(le===5126&&(Re=33328),le===5131&&(Re=33327),le===5121&&(Re=33323)),k===6408&&(le===5126&&(Re=34836),le===5131&&(Re=34842),le===5121&&(Re=be===zt&&Te===!1?35907:32856),le===32819&&(Re=32854),le===32820&&(Re=32855)),(Re===33325||Re===33326||Re===33327||Re===33328||Re===34842||Re===34836)&&e.get("EXT_color_buffer_float"),Re}function C(z,k,le){return P(z,le)===!0||z.isFramebufferTexture&&z.minFilter!==pn&&z.minFilter!==gn?Math.log2(Math.max(k.width,k.height))+1:z.mipmaps!==void 0&&z.mipmaps.length>0?z.mipmaps.length:z.isCompressedTexture&&Array.isArray(z.image)?k.mipmaps.length:1}function R(z){return z===pn||z===Hm||z===af?9728:9729}function W(z){const k=z.target;k.removeEventListener("dispose",W),j(k),k.isVideoTexture&&y.delete(k)}function J(z){const k=z.target;k.removeEventListener("dispose",J),Z(k)}function j(z){const k=i.get(z);if(k.__webglInit===void 0)return;const le=z.source,be=M.get(le);if(be){const Te=be[k.__cacheKey];Te.usedTimes--,Te.usedTimes===0&&X(z),Object.keys(be).length===0&&M.delete(le)}i.remove(z)}function X(z){const k=i.get(z);n.deleteTexture(k.__webglTexture);const le=z.source,be=M.get(le);delete be[k.__cacheKey],o.memory.textures--}function Z(z){const k=z.texture,le=i.get(z),be=i.get(k);if(be.__webglTexture!==void 0&&(n.deleteTexture(be.__webglTexture),o.memory.textures--),z.depthTexture&&z.depthTexture.dispose(),z.isWebGLCubeRenderTarget)for(let Te=0;Te<6;Te++)n.deleteFramebuffer(le.__webglFramebuffer[Te]),le.__webglDepthbuffer&&n.deleteRenderbuffer(le.__webglDepthbuffer[Te]);else{if(n.deleteFramebuffer(le.__webglFramebuffer),le.__webglDepthbuffer&&n.deleteRenderbuffer(le.__webglDepthbuffer),le.__webglMultisampledFramebuffer&&n.deleteFramebuffer(le.__webglMultisampledFramebuffer),le.__webglColorRenderbuffer)for(let Te=0;Te=l&&console.warn("THREE.WebGLTextures: Trying to use "+z+" texture units while this GPU supports only "+l),se+=1,z}function H(z){const k=[];return k.push(z.wrapS),k.push(z.wrapT),k.push(z.wrapR||0),k.push(z.magFilter),k.push(z.minFilter),k.push(z.anisotropy),k.push(z.internalFormat),k.push(z.format),k.push(z.type),k.push(z.generateMipmaps),k.push(z.premultiplyAlpha),k.push(z.flipY),k.push(z.unpackAlignment),k.push(z.encoding),k.join()}function B(z,k){const le=i.get(z);if(z.isVideoTexture&&nt(z),z.isRenderTargetTexture===!1&&z.version>0&&le.__version!==z.version){const be=z.image;if(be===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(be.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{Xe(le,z,k);return}}t.bindTexture(3553,le.__webglTexture,33984+k)}function te(z,k){const le=i.get(z);if(z.version>0&&le.__version!==z.version){Xe(le,z,k);return}t.bindTexture(35866,le.__webglTexture,33984+k)}function $(z,k){const le=i.get(z);if(z.version>0&&le.__version!==z.version){Xe(le,z,k);return}t.bindTexture(32879,le.__webglTexture,33984+k)}function ee(z,k){const le=i.get(z);if(z.version>0&&le.__version!==z.version){Ye(le,z,k);return}t.bindTexture(34067,le.__webglTexture,33984+k)}const ue={[Nf]:10497,[ri]:33071,[Of]:33648},Ee={[pn]:9728,[Hm]:9984,[af]:9986,[gn]:9729,[J1]:9985,[Fo]:9987};function we(z,k,le){if(le?(n.texParameteri(z,10242,ue[k.wrapS]),n.texParameteri(z,10243,ue[k.wrapT]),(z===32879||z===35866)&&n.texParameteri(z,32882,ue[k.wrapR]),n.texParameteri(z,10240,Ee[k.magFilter]),n.texParameteri(z,10241,Ee[k.minFilter])):(n.texParameteri(z,10242,33071),n.texParameteri(z,10243,33071),(z===32879||z===35866)&&n.texParameteri(z,32882,33071),(k.wrapS!==ri||k.wrapT!==ri)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),n.texParameteri(z,10240,R(k.magFilter)),n.texParameteri(z,10241,R(k.minFilter)),k.minFilter!==pn&&k.minFilter!==gn&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),e.has("EXT_texture_filter_anisotropic")===!0){const be=e.get("EXT_texture_filter_anisotropic");if(k.magFilter===pn||k.minFilter!==af&&k.minFilter!==Fo||k.type===Ps&&e.has("OES_texture_float_linear")===!1||a===!1&&k.type===Pu&&e.has("OES_texture_half_float_linear")===!1)return;(k.anisotropy>1||i.get(k).__currentAnisotropy)&&(n.texParameterf(z,be.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(k.anisotropy,r.getMaxAnisotropy())),i.get(k).__currentAnisotropy=k.anisotropy)}}function Q(z,k){let le=!1;z.__webglInit===void 0&&(z.__webglInit=!0,k.addEventListener("dispose",W));const be=k.source;let Te=M.get(be);Te===void 0&&(Te={},M.set(be,Te));const Re=H(k);if(Re!==z.__cacheKey){Te[Re]===void 0&&(Te[Re]={texture:n.createTexture(),usedTimes:0},o.memory.textures++,le=!0),Te[Re].usedTimes++;const et=Te[z.__cacheKey];et!==void 0&&(Te[z.__cacheKey].usedTimes--,et.usedTimes===0&&X(k)),z.__cacheKey=Re,z.__webglTexture=Te[Re].texture}return le}function Xe(z,k,le){let be=3553;(k.isDataArrayTexture||k.isCompressedArrayTexture)&&(be=35866),k.isData3DTexture&&(be=32879);const Te=Q(z,k),Re=k.source;t.bindTexture(be,z.__webglTexture,33984+le);const et=i.get(Re);if(Re.version!==et.__version||Te===!0){t.activeTexture(33984+le),n.pixelStorei(37440,k.flipY),n.pixelStorei(37441,k.premultiplyAlpha),n.pixelStorei(3317,k.unpackAlignment),n.pixelStorei(37443,0);const ze=b(k)&&A(k.image)===!1;let pe=w(k.image,ze,!1,h);pe=_t(k,pe);const He=A(pe)||a,G=s.convert(k.format,k.encoding);let de=s.convert(k.type),Se=L(k.internalFormat,G,de,k.encoding,k.isVideoTexture);we(be,k,He);let Pe;const Qe=k.mipmaps,ct=a&&k.isVideoTexture!==!0,Nt=et.__version===void 0||Te===!0,Y=C(k,pe,He);if(k.isDepthTexture)Se=6402,a?k.type===Ps?Se=36012:k.type===_o?Se=33190:k.type===Na?Se=35056:Se=33189:k.type===Ps&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),k.format===Do&&Se===6402&&k.type!==K1&&k.type!==_o&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),k.type=_o,de=s.convert(k.type)),k.format===ja&&Se===6402&&(Se=34041,k.type!==Na&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),k.type=Na,de=s.convert(k.type))),Nt&&(ct?t.texStorage2D(3553,1,Se,pe.width,pe.height):t.texImage2D(3553,0,Se,pe.width,pe.height,0,G,de,null));else if(k.isDataTexture)if(Qe.length>0&&He){ct&&Nt&&t.texStorage2D(3553,Y,Se,Qe[0].width,Qe[0].height);for(let fe=0,Ae=Qe.length;fe>=1,Ae>>=1}}else if(Qe.length>0&&He){ct&&Nt&&t.texStorage2D(3553,Y,Se,Qe[0].width,Qe[0].height);for(let fe=0,Ae=Qe.length;fe0&&Nt++,t.texStorage2D(34067,Nt,Pe,pe[0].width,pe[0].height));for(let fe=0;fe<6;fe++)if(ze){Qe?t.texSubImage2D(34069+fe,0,0,0,pe[fe].width,pe[fe].height,de,Se,pe[fe].data):t.texImage2D(34069+fe,0,Pe,pe[fe].width,pe[fe].height,0,de,Se,pe[fe].data);for(let Ae=0;Ae=34069&&Te<=34074)&&n.framebufferTexture2D(36160,be,Te,i.get(le).__webglTexture,0),t.bindFramebuffer(36160,null)}function Me(z,k,le){if(n.bindRenderbuffer(36161,z),k.depthBuffer&&!k.stencilBuffer){let be=33189;if(le||je(k)){const Te=k.depthTexture;Te&&Te.isDepthTexture&&(Te.type===Ps?be=36012:Te.type===_o&&(be=33190));const Re=qe(k);je(k)?p.renderbufferStorageMultisampleEXT(36161,Re,be,k.width,k.height):n.renderbufferStorageMultisample(36161,Re,be,k.width,k.height)}else n.renderbufferStorage(36161,be,k.width,k.height);n.framebufferRenderbuffer(36160,36096,36161,z)}else if(k.depthBuffer&&k.stencilBuffer){const be=qe(k);le&&je(k)===!1?n.renderbufferStorageMultisample(36161,be,35056,k.width,k.height):je(k)?p.renderbufferStorageMultisampleEXT(36161,be,35056,k.width,k.height):n.renderbufferStorage(36161,34041,k.width,k.height),n.framebufferRenderbuffer(36160,33306,36161,z)}else{const be=k.isWebGLMultipleRenderTargets===!0?k.texture:[k.texture];for(let Te=0;Te0&&je(z)===!1){const ze=Re?k:[k];le.__webglMultisampledFramebuffer=n.createFramebuffer(),le.__webglColorRenderbuffer=[],t.bindFramebuffer(36160,le.__webglMultisampledFramebuffer);for(let pe=0;pe0&&je(z)===!1){const k=z.isWebGLMultipleRenderTargets?z.texture:[z.texture],le=z.width,be=z.height;let Te=16384;const Re=[],et=z.stencilBuffer?33306:36096,ze=i.get(z),pe=z.isWebGLMultipleRenderTargets===!0;if(pe)for(let He=0;He0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&k.__useRenderToTexture!==!1}function nt(z){const k=o.render.frame;y.get(z)!==k&&(y.set(z,k),z.update())}function _t(z,k){const le=z.encoding,be=z.format,Te=z.type;return z.isCompressedTexture===!0||z.isVideoTexture===!0||z.format===Wm||le!==Bs&&(le===zt?a===!1?e.has("EXT_sRGB")===!0&&be===Vi?(z.format=Wm,z.minFilter=gn,z.generateMipmaps=!1):k=tS.sRGBToLinear(k):(be!==Vi||Te!==Bo)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture encoding:",le)),k}this.allocateTextureUnit=D,this.resetTextureUnits=ae,this.setTexture2D=B,this.setTexture2DArray=te,this.setTexture3D=$,this.setTextureCube=ee,this.rebindTextures=_e,this.setupRenderTarget=Ne,this.updateRenderTargetMipmap=Ie,this.updateMultisampleRenderTarget=Ge,this.setupDepthRenderbuffer=oe,this.setupFrameBufferTexture=xe,this.useMultisampledRTT=je}function WL(n,e,t){const i=t.isWebGL2;function r(s,o=null){let a;if(s===Bo)return 5121;if(s===hL)return 32819;if(s===dL)return 32820;if(s===uL)return 5120;if(s===cL)return 5122;if(s===K1)return 5123;if(s===fL)return 5124;if(s===_o)return 5125;if(s===Ps)return 5126;if(s===Pu)return i?5131:(a=e.get("OES_texture_half_float"),a!==null?a.HALF_FLOAT_OES:null);if(s===pL)return 6406;if(s===Vi)return 6408;if(s===mL)return 6409;if(s===gL)return 6410;if(s===Do)return 6402;if(s===ja)return 34041;if(s===Wm)return a=e.get("EXT_sRGB"),a!==null?a.SRGB_ALPHA_EXT:null;if(s===vL)return 6403;if(s===yL)return 36244;if(s===xL)return 33319;if(s===_L)return 33320;if(s===SL)return 36249;if(s===Qp||s===$p||s===em||s===tm)if(o===zt)if(a=e.get("WEBGL_compressed_texture_s3tc_srgb"),a!==null){if(s===Qp)return a.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(s===$p)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(s===em)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(s===tm)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(a=e.get("WEBGL_compressed_texture_s3tc"),a!==null){if(s===Qp)return a.COMPRESSED_RGB_S3TC_DXT1_EXT;if(s===$p)return a.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(s===em)return a.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(s===tm)return a.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(s===Fx||s===Bx||s===Vx||s===Hx)if(a=e.get("WEBGL_compressed_texture_pvrtc"),a!==null){if(s===Fx)return a.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(s===Bx)return a.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(s===Vx)return a.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(s===Hx)return a.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(s===wL)return a=e.get("WEBGL_compressed_texture_etc1"),a!==null?a.COMPRESSED_RGB_ETC1_WEBGL:null;if(s===Wx||s===Gx)if(a=e.get("WEBGL_compressed_texture_etc"),a!==null){if(s===Wx)return o===zt?a.COMPRESSED_SRGB8_ETC2:a.COMPRESSED_RGB8_ETC2;if(s===Gx)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:a.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(s===jx||s===Xx||s===Yx||s===qx||s===Zx||s===Jx||s===Kx||s===Qx||s===$x||s===e_||s===t_||s===n_||s===i_||s===r_)if(a=e.get("WEBGL_compressed_texture_astc"),a!==null){if(s===jx)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:a.COMPRESSED_RGBA_ASTC_4x4_KHR;if(s===Xx)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:a.COMPRESSED_RGBA_ASTC_5x4_KHR;if(s===Yx)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:a.COMPRESSED_RGBA_ASTC_5x5_KHR;if(s===qx)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:a.COMPRESSED_RGBA_ASTC_6x5_KHR;if(s===Zx)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:a.COMPRESSED_RGBA_ASTC_6x6_KHR;if(s===Jx)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:a.COMPRESSED_RGBA_ASTC_8x5_KHR;if(s===Kx)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:a.COMPRESSED_RGBA_ASTC_8x6_KHR;if(s===Qx)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:a.COMPRESSED_RGBA_ASTC_8x8_KHR;if(s===$x)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:a.COMPRESSED_RGBA_ASTC_10x5_KHR;if(s===e_)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:a.COMPRESSED_RGBA_ASTC_10x6_KHR;if(s===t_)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:a.COMPRESSED_RGBA_ASTC_10x8_KHR;if(s===n_)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:a.COMPRESSED_RGBA_ASTC_10x10_KHR;if(s===i_)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:a.COMPRESSED_RGBA_ASTC_12x10_KHR;if(s===r_)return o===zt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:a.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(s===nm)if(a=e.get("EXT_texture_compression_bptc"),a!==null){if(s===nm)return o===zt?a.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:a.COMPRESSED_RGBA_BPTC_UNORM_EXT}else return null;if(s===ML||s===s_||s===o_||s===a_)if(a=e.get("EXT_texture_compression_rgtc"),a!==null){if(s===nm)return a.COMPRESSED_RED_RGTC1_EXT;if(s===s_)return a.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(s===o_)return a.COMPRESSED_RED_GREEN_RGTC2_EXT;if(s===a_)return a.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return s===Na?i?34042:(a=e.get("WEBGL_depth_texture"),a!==null?a.UNSIGNED_INT_24_8_WEBGL:null):n[s]!==void 0?n[s]:null}return{convert:r}}class GL extends Wt{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}class lu extends Tt{constructor(){super(),this.isGroup=!0,this.type="Group"}}const ZW={type:"move"};class Jv{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new lu,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new lu,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new N,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new N),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new lu,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new N,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new N),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const t=this._hand;if(t)for(const i of e.hand.values())this._getHandJoint(t,i)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,t,i){let r=null,s=null,o=null;const a=this._targetRay,l=this._grip,f=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(f&&e.hand){o=!0;for(const _ of e.hand.values()){const M=t.getJointPose(_,i),m=this._getHandJoint(f,_);M!==null&&(m.matrix.fromArray(M.transform.matrix),m.matrix.decompose(m.position,m.rotation,m.scale),m.jointRadius=M.radius),m.visible=M!==null}const h=f.joints["index-finger-tip"],d=f.joints["thumb-tip"],p=h.position.distanceTo(d.position),v=.02,y=.005;f.inputState.pinching&&p>v+y?(f.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!f.inputState.pinching&&p<=v-y&&(f.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(s=t.getPose(e.gripSpace,i),s!==null&&(l.matrix.fromArray(s.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),s.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(s.linearVelocity)):l.hasLinearVelocity=!1,s.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(s.angularVelocity)):l.hasAngularVelocity=!1));a!==null&&(r=t.getPose(e.targetRaySpace,i),r===null&&s!==null&&(r=s),r!==null&&(a.matrix.fromArray(r.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),r.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(r.linearVelocity)):a.hasLinearVelocity=!1,r.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(r.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(ZW)))}return a!==null&&(a.visible=r!==null),l!==null&&(l.visible=s!==null),f!==null&&(f.visible=o!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){const i=new lu;i.matrixAutoUpdate=!1,i.visible=!1,e.joints[t.jointName]=i,e.add(i)}return e.joints[t.jointName]}}class jL extends fn{constructor(e,t,i,r,s,o,a,l,f,h){if(h=h!==void 0?h:Do,h!==Do&&h!==ja)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");i===void 0&&h===Do&&(i=_o),i===void 0&&h===ja&&(i=Na),super(null,r,s,o,a,l,h,i,f),this.isDepthTexture=!0,this.image={width:e,height:t},this.magFilter=a!==void 0?a:pn,this.minFilter=l!==void 0?l:pn,this.flipY=!1,this.generateMipmaps=!1}}class JW extends rs{constructor(e,t){super();const i=this;let r=null,s=1,o=null,a="local-floor",l=1,f=null,h=null,d=null,p=null,v=null,y=null;const _=t.getContextAttributes();let M=null,m=null;const S=[],w=[],A=new Set,b=new Map,P=new Wt;P.layers.enable(1),P.viewport=new Dt;const I=new Wt;I.layers.enable(2),I.viewport=new Dt;const L=[P,I],C=new GL;C.layers.enable(1),C.layers.enable(2);let R=null,W=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(ee){let ue=S[ee];return ue===void 0&&(ue=new Jv,S[ee]=ue),ue.getTargetRaySpace()},this.getControllerGrip=function(ee){let ue=S[ee];return ue===void 0&&(ue=new Jv,S[ee]=ue),ue.getGripSpace()},this.getHand=function(ee){let ue=S[ee];return ue===void 0&&(ue=new Jv,S[ee]=ue),ue.getHandSpace()};function J(ee){const ue=w.indexOf(ee.inputSource);if(ue===-1)return;const Ee=S[ue];Ee!==void 0&&Ee.dispatchEvent({type:ee.type,data:ee.inputSource})}function j(){r.removeEventListener("select",J),r.removeEventListener("selectstart",J),r.removeEventListener("selectend",J),r.removeEventListener("squeeze",J),r.removeEventListener("squeezestart",J),r.removeEventListener("squeezeend",J),r.removeEventListener("end",j),r.removeEventListener("inputsourceschange",X);for(let ee=0;ee=0&&(w[we]=null,S[we].disconnect(Ee))}for(let ue=0;ue=w.length){w.push(Ee),we=Xe;break}else if(w[Xe]===null){w[Xe]=Ee,we=Xe;break}if(we===-1)break}const Q=S[we];Q&&Q.connect(Ee)}}const Z=new N,se=new N;function ae(ee,ue,Ee){Z.setFromMatrixPosition(ue.matrixWorld),se.setFromMatrixPosition(Ee.matrixWorld);const we=Z.distanceTo(se),Q=ue.projectionMatrix.elements,Xe=Ee.projectionMatrix.elements,Ye=Q[14]/(Q[10]-1),xe=Q[14]/(Q[10]+1),Me=(Q[9]+1)/Q[5],ge=(Q[9]-1)/Q[5],oe=(Q[8]-1)/Q[0],_e=(Xe[8]+1)/Xe[0],Ne=Ye*oe,Ie=Ye*_e,Ge=we/(-oe+_e),qe=Ge*-oe;ue.matrixWorld.decompose(ee.position,ee.quaternion,ee.scale),ee.translateX(qe),ee.translateZ(Ge),ee.matrixWorld.compose(ee.position,ee.quaternion,ee.scale),ee.matrixWorldInverse.copy(ee.matrixWorld).invert();const je=Ye+Ge,nt=xe+Ge,_t=Ne-qe,z=Ie+(we-qe),k=Me*xe/nt*je,le=ge*xe/nt*je;ee.projectionMatrix.makePerspective(_t,z,k,le,je,nt),ee.projectionMatrixInverse.copy(ee.projectionMatrix).invert()}function D(ee,ue){ue===null?ee.matrixWorld.copy(ee.matrix):ee.matrixWorld.multiplyMatrices(ue.matrixWorld,ee.matrix),ee.matrixWorldInverse.copy(ee.matrixWorld).invert()}this.updateCamera=function(ee){if(r===null)return;C.near=I.near=P.near=ee.near,C.far=I.far=P.far=ee.far,(R!==C.near||W!==C.far)&&(r.updateRenderState({depthNear:C.near,depthFar:C.far}),R=C.near,W=C.far);const ue=ee.parent,Ee=C.cameras;D(C,ue);for(let we=0;weQ&&(b.set(we,we.lastChangedTime),i.dispatchEvent({type:"planechanged",data:we}))}}y=null}const $=new zL;$.setAnimationLoop(te),this.setAnimationLoop=function(ee){B=ee},this.dispose=function(){}}}function KW(n,e){function t(M,m){M.matrixAutoUpdate===!0&&M.updateMatrix(),m.value.copy(M.matrix)}function i(M,m){m.color.getRGB(M.fogColor.value,OL(n)),m.isFog?(M.fogNear.value=m.near,M.fogFar.value=m.far):m.isFogExp2&&(M.fogDensity.value=m.density)}function r(M,m,S,w,A){m.isMeshBasicMaterial||m.isMeshLambertMaterial?s(M,m):m.isMeshToonMaterial?(s(M,m),d(M,m)):m.isMeshPhongMaterial?(s(M,m),h(M,m)):m.isMeshStandardMaterial?(s(M,m),p(M,m),m.isMeshPhysicalMaterial&&v(M,m,A)):m.isMeshMatcapMaterial?(s(M,m),y(M,m)):m.isMeshDepthMaterial?s(M,m):m.isMeshDistanceMaterial?(s(M,m),_(M,m)):m.isMeshNormalMaterial?s(M,m):m.isLineBasicMaterial?(o(M,m),m.isLineDashedMaterial&&a(M,m)):m.isPointsMaterial?l(M,m,S,w):m.isSpriteMaterial?f(M,m):m.isShadowMaterial?(M.color.value.copy(m.color),M.opacity.value=m.opacity):m.isShaderMaterial&&(m.uniformsNeedUpdate=!1)}function s(M,m){M.opacity.value=m.opacity,m.color&&M.diffuse.value.copy(m.color),m.emissive&&M.emissive.value.copy(m.emissive).multiplyScalar(m.emissiveIntensity),m.map&&(M.map.value=m.map,t(m.map,M.mapTransform)),m.alphaMap&&(M.alphaMap.value=m.alphaMap,t(m.alphaMap,M.alphaMapTransform)),m.bumpMap&&(M.bumpMap.value=m.bumpMap,t(m.bumpMap,M.bumpMapTransform),M.bumpScale.value=m.bumpScale,m.side===mi&&(M.bumpScale.value*=-1)),m.normalMap&&(M.normalMap.value=m.normalMap,t(m.normalMap,M.normalMapTransform),M.normalScale.value.copy(m.normalScale),m.side===mi&&M.normalScale.value.negate()),m.displacementMap&&(M.displacementMap.value=m.displacementMap,t(m.displacementMap,M.displacementMapTransform),M.displacementScale.value=m.displacementScale,M.displacementBias.value=m.displacementBias),m.emissiveMap&&(M.emissiveMap.value=m.emissiveMap,t(m.emissiveMap,M.emissiveMapTransform)),m.specularMap&&(M.specularMap.value=m.specularMap,t(m.specularMap,M.specularMapTransform)),m.alphaTest>0&&(M.alphaTest.value=m.alphaTest);const S=e.get(m).envMap;if(S&&(M.envMap.value=S,M.flipEnvMap.value=S.isCubeTexture&&S.isRenderTargetTexture===!1?-1:1,M.reflectivity.value=m.reflectivity,M.ior.value=m.ior,M.refractionRatio.value=m.refractionRatio),m.lightMap){M.lightMap.value=m.lightMap;const w=n.useLegacyLights===!0?Math.PI:1;M.lightMapIntensity.value=m.lightMapIntensity*w,t(m.lightMap,M.lightMapTransform)}m.aoMap&&(M.aoMap.value=m.aoMap,M.aoMapIntensity.value=m.aoMapIntensity,t(m.aoMap,M.aoMapTransform))}function o(M,m){M.diffuse.value.copy(m.color),M.opacity.value=m.opacity,m.map&&(M.map.value=m.map,t(m.map,M.mapTransform))}function a(M,m){M.dashSize.value=m.dashSize,M.totalSize.value=m.dashSize+m.gapSize,M.scale.value=m.scale}function l(M,m,S,w){M.diffuse.value.copy(m.color),M.opacity.value=m.opacity,M.size.value=m.size*S,M.scale.value=w*.5,m.map&&(M.map.value=m.map,t(m.map,M.uvTransform)),m.alphaMap&&(M.alphaMap.value=m.alphaMap),m.alphaTest>0&&(M.alphaTest.value=m.alphaTest)}function f(M,m){M.diffuse.value.copy(m.color),M.opacity.value=m.opacity,M.rotation.value=m.rotation,m.map&&(M.map.value=m.map,t(m.map,M.mapTransform)),m.alphaMap&&(M.alphaMap.value=m.alphaMap),m.alphaTest>0&&(M.alphaTest.value=m.alphaTest)}function h(M,m){M.specular.value.copy(m.specular),M.shininess.value=Math.max(m.shininess,1e-4)}function d(M,m){m.gradientMap&&(M.gradientMap.value=m.gradientMap)}function p(M,m){M.metalness.value=m.metalness,m.metalnessMap&&(M.metalnessMap.value=m.metalnessMap,t(m.metalnessMap,M.metalnessMapTransform)),M.roughness.value=m.roughness,m.roughnessMap&&(M.roughnessMap.value=m.roughnessMap,t(m.roughnessMap,M.roughnessMapTransform)),e.get(m).envMap&&(M.envMapIntensity.value=m.envMapIntensity)}function v(M,m,S){M.ior.value=m.ior,m.sheen>0&&(M.sheenColor.value.copy(m.sheenColor).multiplyScalar(m.sheen),M.sheenRoughness.value=m.sheenRoughness,m.sheenColorMap&&(M.sheenColorMap.value=m.sheenColorMap,t(m.sheenColorMap,M.sheenColorMapTransform)),m.sheenRoughnessMap&&(M.sheenRoughnessMap.value=m.sheenRoughnessMap,t(m.sheenRoughnessMap,M.sheenRoughnessMapTransform))),m.clearcoat>0&&(M.clearcoat.value=m.clearcoat,M.clearcoatRoughness.value=m.clearcoatRoughness,m.clearcoatMap&&(M.clearcoatMap.value=m.clearcoatMap,t(m.clearcoatMap,M.clearcoatMapTransform)),m.clearcoatRoughnessMap&&(M.clearcoatRoughnessMap.value=m.clearcoatRoughnessMap,t(m.clearcoatRoughnessMap,M.clearcoatRoughnessMapTransform)),m.clearcoatNormalMap&&(M.clearcoatNormalMap.value=m.clearcoatNormalMap,t(m.clearcoatNormalMap,M.clearcoatNormalMapTransform),M.clearcoatNormalScale.value.copy(m.clearcoatNormalScale),m.side===mi&&M.clearcoatNormalScale.value.negate())),m.iridescence>0&&(M.iridescence.value=m.iridescence,M.iridescenceIOR.value=m.iridescenceIOR,M.iridescenceThicknessMinimum.value=m.iridescenceThicknessRange[0],M.iridescenceThicknessMaximum.value=m.iridescenceThicknessRange[1],m.iridescenceMap&&(M.iridescenceMap.value=m.iridescenceMap,t(m.iridescenceMap,M.iridescenceMapTransform)),m.iridescenceThicknessMap&&(M.iridescenceThicknessMap.value=m.iridescenceThicknessMap,t(m.iridescenceThicknessMap,M.iridescenceThicknessMapTransform))),m.transmission>0&&(M.transmission.value=m.transmission,M.transmissionSamplerMap.value=S.texture,M.transmissionSamplerSize.value.set(S.width,S.height),m.transmissionMap&&(M.transmissionMap.value=m.transmissionMap,t(m.transmissionMap,M.transmissionMapTransform)),M.thickness.value=m.thickness,m.thicknessMap&&(M.thicknessMap.value=m.thicknessMap,t(m.thicknessMap,M.thicknessMapTransform)),M.attenuationDistance.value=m.attenuationDistance,M.attenuationColor.value.copy(m.attenuationColor)),M.specularIntensity.value=m.specularIntensity,M.specularColor.value.copy(m.specularColor),m.specularColorMap&&(M.specularColorMap.value=m.specularColorMap,t(m.specularColorMap,M.specularColorMapTransform)),m.specularIntensityMap&&(M.specularIntensityMap.value=m.specularIntensityMap,t(m.specularIntensityMap,M.specularIntensityMapTransform))}function y(M,m){m.matcap&&(M.matcap.value=m.matcap)}function _(M,m){const S=e.get(m).light;M.referencePosition.value.setFromMatrixPosition(S.matrixWorld),M.nearDistance.value=S.shadow.camera.near,M.farDistance.value=S.shadow.camera.far}return{refreshFogUniforms:i,refreshMaterialUniforms:r}}function QW(n,e,t,i){let r={},s={},o=[];const a=t.isWebGL2?n.getParameter(35375):0;function l(S,w){const A=w.program;i.uniformBlockBinding(S,A)}function f(S,w){let A=r[S.id];A===void 0&&(y(S),A=h(S),r[S.id]=A,S.addEventListener("dispose",M));const b=w.program;i.updateUBOMapping(S,b);const P=e.render.frame;s[S.id]!==P&&(p(S),s[S.id]=P)}function h(S){const w=d();S.__bindingPointIndex=w;const A=n.createBuffer(),b=S.__size,P=S.usage;return n.bindBuffer(35345,A),n.bufferData(35345,b,P),n.bindBuffer(35345,null),n.bindBufferBase(35345,w,A),A}function d(){for(let S=0;S0){P=A%b;const J=b-P;P!==0&&J-R.boundary<0&&(A+=b-P,C.__offset=A)}A+=R.storage}return P=A%b,P>0&&(A+=b-P),S.__size=A,S.__cache={},this}function _(S){const w={boundary:0,storage:0};return typeof S=="number"?(w.boundary=4,w.storage=4):S.isVector2?(w.boundary=8,w.storage=8):S.isVector3||S.isColor?(w.boundary=16,w.storage=12):S.isVector4?(w.boundary=16,w.storage=16):S.isMatrix3?(w.boundary=48,w.storage=48):S.isMatrix4?(w.boundary=64,w.storage=64):S.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",S),w}function M(S){const w=S.target;w.removeEventListener("dispose",M);const A=o.indexOf(w.__bindingPointIndex);o.splice(A,1),n.deleteBuffer(r[w.id]),delete r[w.id],delete s[w.id]}function m(){for(const S in r)n.deleteBuffer(r[S]);o=[],r={},s={}}return{bind:l,update:f,dispose:m}}function $W(){const n=Vf("canvas");return n.style.display="block",n}class cS{constructor(e={}){const{canvas:t=$W(),context:i=null,depth:r=!0,stencil:s=!0,alpha:o=!1,antialias:a=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:f=!1,powerPreference:h="default",failIfMajorPerformanceCaveat:d=!1}=e;this.isWebGLRenderer=!0;let p;i!==null?p=i.getContextAttributes().alpha:p=o;let v=null,y=null;const _=[],M=[];this.domElement=t,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.outputEncoding=Bs,this.useLegacyLights=!0,this.toneMapping=kr,this.toneMappingExposure=1;const m=this;let S=!1,w=0,A=0,b=null,P=-1,I=null;const L=new Dt,C=new Dt;let R=null,W=t.width,J=t.height,j=1,X=null,Z=null;const se=new Dt(0,0,W,J),ae=new Dt(0,0,W,J);let D=!1;const H=new bg;let B=!1,te=!1,$=null;const ee=new ot,ue=new N,Ee={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function we(){return b===null?j:1}let Q=i;function Xe(O,re){for(let me=0;me0?y=M[M.length-1]:y=null,_.pop(),_.length>0?v=_[_.length-1]:v=null};function Rn(O,re,me,ne){if(O.visible===!1)return;if(O.layers.test(re.layers)){if(O.isGroup)me=O.renderOrder;else if(O.isLOD)O.autoUpdate===!0&&O.update(re);else if(O.isLight)y.pushLight(O),O.castShadow&&y.pushShadow(O);else if(O.isSprite){if(!O.frustumCulled||H.intersectsSprite(O)){ne&&ue.setFromMatrixPosition(O.matrixWorld).applyMatrix4(ee);const rt=je.update(O),st=O.material;st.visible&&v.push(O,rt,st,me,ue.z,null)}}else if((O.isMesh||O.isLine||O.isPoints)&&(O.isSkinnedMesh&&O.skeleton.frame!==ge.render.frame&&(O.skeleton.update(),O.skeleton.frame=ge.render.frame),!O.frustumCulled||H.intersectsObject(O))){ne&&ue.setFromMatrixPosition(O.matrixWorld).applyMatrix4(ee);const rt=je.update(O),st=O.material;if(Array.isArray(st)){const ft=rt.groups;for(let vt=0,yt=ft.length;vt0&&qt(ve,$e,re,me),ne&&Me.viewport(L.copy(ne)),ve.length>0&&ai(ve,re,me),$e.length>0&&ai($e,re,me),rt.length>0&&ai(rt,re,me),Me.buffers.depth.setTest(!0),Me.buffers.depth.setMask(!0),Me.buffers.color.setMask(!0),Me.setPolygonOffset(!1)}function qt(O,re,me,ne){if($===null){const st=xe.isWebGL2;$=new Or(1024,1024,{generateMipmaps:!0,type:Ye.has("EXT_color_buffer_half_float")?Pu:Bo,minFilter:Fo,samples:st&&a===!0?4:0})}const ve=m.getRenderTarget();m.setRenderTarget($),m.clear();const $e=m.toneMapping;m.toneMapping=kr,ai(O,me,ne),_e.updateMultisampleRenderTarget($),_e.updateRenderTargetMipmap($);let rt=!1;for(let st=0,ft=re.length;st0&&_e.useMultisampledRTT(O)===!1?ve=oe.get(O).__webglMultisampledFramebuffer:ve=yt,L.copy(O.viewport),C.copy(O.scissor),R=O.scissorTest}else L.copy(se).multiplyScalar(j).floor(),C.copy(ae).multiplyScalar(j).floor(),R=D;if(Me.bindFramebuffer(36160,ve)&&xe.drawBuffers&&ne&&Me.drawBuffers(O,ve),Me.viewport(L),Me.scissor(C),Me.setScissorTest(R),$e){const ft=oe.get(O.texture);Q.framebufferTexture2D(36160,36064,34069+re,ft.__webglTexture,me)}else if(rt){const ft=oe.get(O.texture),vt=re||0;Q.framebufferTextureLayer(36160,36064,ft.__webglTexture,me||0,vt)}P=-1},this.readRenderTargetPixels=function(O,re,me,ne,ve,$e,rt){if(!(O&&O.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let st=oe.get(O).__webglFramebuffer;if(O.isWebGLCubeRenderTarget&&rt!==void 0&&(st=st[rt]),st){Me.bindFramebuffer(36160,st);try{const ft=O.texture,vt=ft.format,yt=ft.type;if(vt!==Vi&&pe.convert(vt)!==Q.getParameter(35739)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const St=yt===Pu&&(Ye.has("EXT_color_buffer_half_float")||xe.isWebGL2&&Ye.has("EXT_color_buffer_float"));if(yt!==Bo&&pe.convert(yt)!==Q.getParameter(35738)&&!(yt===Ps&&(xe.isWebGL2||Ye.has("OES_texture_float")||Ye.has("WEBGL_color_buffer_float")))&&!St){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}re>=0&&re<=O.width-ne&&me>=0&&me<=O.height-ve&&Q.readPixels(re,me,ne,ve,pe.convert(vt),pe.convert(yt),$e)}finally{const ft=b!==null?oe.get(b).__webglFramebuffer:null;Me.bindFramebuffer(36160,ft)}}},this.copyFramebufferToTexture=function(O,re,me=0){const ne=Math.pow(2,-me),ve=Math.floor(re.image.width*ne),$e=Math.floor(re.image.height*ne);_e.setTexture2D(re,0),Q.copyTexSubImage2D(3553,me,0,0,O.x,O.y,ve,$e),Me.unbindTexture()},this.copyTextureToTexture=function(O,re,me,ne=0){const ve=re.image.width,$e=re.image.height,rt=pe.convert(me.format),st=pe.convert(me.type);_e.setTexture2D(me,0),Q.pixelStorei(37440,me.flipY),Q.pixelStorei(37441,me.premultiplyAlpha),Q.pixelStorei(3317,me.unpackAlignment),re.isDataTexture?Q.texSubImage2D(3553,ne,O.x,O.y,ve,$e,rt,st,re.image.data):re.isCompressedTexture?Q.compressedTexSubImage2D(3553,ne,O.x,O.y,re.mipmaps[0].width,re.mipmaps[0].height,rt,re.mipmaps[0].data):Q.texSubImage2D(3553,ne,O.x,O.y,rt,st,re.image),ne===0&&me.generateMipmaps&&Q.generateMipmap(3553),Me.unbindTexture()},this.copyTextureToTexture3D=function(O,re,me,ne,ve=0){if(m.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}const $e=O.max.x-O.min.x+1,rt=O.max.y-O.min.y+1,st=O.max.z-O.min.z+1,ft=pe.convert(ne.format),vt=pe.convert(ne.type);let yt;if(ne.isData3DTexture)_e.setTexture3D(ne,0),yt=32879;else if(ne.isDataArrayTexture)_e.setTexture2DArray(ne,0),yt=35866;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}Q.pixelStorei(37440,ne.flipY),Q.pixelStorei(37441,ne.premultiplyAlpha),Q.pixelStorei(3317,ne.unpackAlignment);const St=Q.getParameter(3314),Rt=Q.getParameter(32878),Bn=Q.getParameter(3316),Ii=Q.getParameter(3315),gr=Q.getParameter(32877),Ht=me.isCompressedTexture?me.mipmaps[0]:me.image;Q.pixelStorei(3314,Ht.width),Q.pixelStorei(32878,Ht.height),Q.pixelStorei(3316,O.min.x),Q.pixelStorei(3315,O.min.y),Q.pixelStorei(32877,O.min.z),me.isDataTexture||me.isData3DTexture?Q.texSubImage3D(yt,ve,re.x,re.y,re.z,$e,rt,st,ft,vt,Ht.data):me.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),Q.compressedTexSubImage3D(yt,ve,re.x,re.y,re.z,$e,rt,st,ft,Ht.data)):Q.texSubImage3D(yt,ve,re.x,re.y,re.z,$e,rt,st,ft,vt,Ht),Q.pixelStorei(3314,St),Q.pixelStorei(32878,Rt),Q.pixelStorei(3316,Bn),Q.pixelStorei(3315,Ii),Q.pixelStorei(32877,gr),ve===0&&ne.generateMipmaps&&Q.generateMipmap(yt),Me.unbindTexture()},this.initTexture=function(O){O.isCubeTexture?_e.setTextureCube(O,0):O.isData3DTexture?_e.setTexture3D(O,0):O.isDataArrayTexture||O.isCompressedArrayTexture?_e.setTexture2DArray(O,0):_e.setTexture2D(O,0),Me.unbindTexture()},this.resetState=function(){w=0,A=0,b=null,Me.reset(),He.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get physicallyCorrectLights(){return console.warn("THREE.WebGLRenderer: the property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),!this.useLegacyLights}set physicallyCorrectLights(e){console.warn("THREE.WebGLRenderer: the property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),this.useLegacyLights=!e}}class XL extends cS{}XL.prototype.isWebGL1Renderer=!0;class Cg{constructor(e,t=25e-5){this.isFogExp2=!0,this.name="",this.color=new Fe(e),this.density=t}clone(){return new Cg(this.color,this.density)}toJSON(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}}class Pg{constructor(e,t=1,i=1e3){this.isFog=!0,this.name="",this.color=new Fe(e),this.near=t,this.far=i}clone(){return new Pg(this.color,this.near,this.far)}toJSON(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}}class fS extends Tt{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(t.object.backgroundIntensity=this.backgroundIntensity),t}get autoUpdate(){return console.warn("THREE.Scene: autoUpdate was renamed to matrixWorldAutoUpdate in r144."),this.matrixWorldAutoUpdate}set autoUpdate(e){console.warn("THREE.Scene: autoUpdate was renamed to matrixWorldAutoUpdate in r144."),this.matrixWorldAutoUpdate=e}}class Lg{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=Bf,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=ji()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,i){e*=this.stride,i*=t.stride;for(let r=0,s=this.stride;re.far||t.push({distance:l,point:Pc.clone(),uv:bi.getInterpolation(Pc,gp,Rc,vp,Cb,Kv,Pb,new ye),face:null,object:this})}copy(e,t){return super.copy(e,t),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}}function yp(n,e,t,i,r,s){zl.subVectors(n,t).addScalar(.5).multiply(i),r!==void 0?(Lc.x=s*zl.x-r*zl.y,Lc.y=r*zl.x+s*zl.y):Lc.copy(zl),n.copy(e),n.x+=Lc.x,n.y+=Lc.y,n.applyMatrix4(YL)}const xp=new N,Lb=new N;class ZL extends Tt{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const t=e.levels;for(let i=0,r=t.length;i0){let i,r;for(i=1,r=t.length;i0){xp.setFromMatrixPosition(this.matrixWorld);const r=e.ray.origin.distanceTo(xp);this.getObjectForDistance(r).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){xp.setFromMatrixPosition(e.matrixWorld),Lb.setFromMatrixPosition(this.matrixWorld);const i=xp.distanceTo(Lb)/e.zoom;t[0].object.visible=!0;let r,s;for(r=1,s=t.length;r=o)t[r-1].object.visible=!1,t[r].object.visible=!0;else break}for(this._currentLevel=r-1;rl)continue;p.applyMatrix4(this.matrixWorld);const L=e.ray.origin.distanceTo(p);Le.far||t.push({distance:L,point:d.clone().applyMatrix4(this.matrixWorld),index:w,face:null,faceIndex:null,object:this})}}else{const m=Math.max(0,o.start),S=Math.min(M.count,o.start+o.count);for(let w=m,A=S-1;wl)continue;p.applyMatrix4(this.matrixWorld);const P=e.ray.origin.distanceTo(p);Pe.far||t.push({distance:P,point:d.clone().applyMatrix4(this.matrixWorld),index:w,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const t=this.geometry.morphAttributes,i=Object.keys(t);if(i.length>0){const r=t[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;s0){const r=t[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;sr.far)return;s.push({distance:f,distanceToRay:Math.sqrt(a),point:l,index:e,face:null,object:o})}}class iG extends fn{constructor(e,t,i,r,s,o,a,l,f){super(e,t,i,r,s,o,a,l,f),this.isVideoTexture=!0,this.minFilter=o!==void 0?o:gn,this.magFilter=s!==void 0?s:gn,this.generateMipmaps=!1;const h=this;function d(){h.needsUpdate=!0,e.requestVideoFrameCallback(d)}"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback(d)}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;"requestVideoFrameCallback"in e===!1&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class rG extends fn{constructor(e,t,i){super({width:e,height:t}),this.isFramebufferTexture=!0,this.format=i,this.magFilter=pn,this.minFilter=pn,this.generateMipmaps=!1,this.needsUpdate=!0}}class mS extends fn{constructor(e,t,i,r,s,o,a,l,f,h,d,p){super(null,o,a,l,f,h,r,s,d,p),this.isCompressedTexture=!0,this.image={width:t,height:i},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class sG extends mS{constructor(e,t,i,r,s,o){super(e,t,i,s,o),this.isCompressedArrayTexture=!0,this.image.depth=r,this.wrapR=ri}}class oG extends fn{constructor(e,t,i,r,s,o,a,l,f){super(e,t,i,r,s,o,a,l,f),this.isCanvasTexture=!0,this.needsUpdate=!0}}class Ur{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,t){const i=this.getUtoTmapping(e);return this.getPoint(i,t)}getPoints(e=5){const t=[];for(let i=0;i<=e;i++)t.push(this.getPoint(i/e));return t}getSpacedPoints(e=5){const t=[];for(let i=0;i<=e;i++)t.push(this.getPointAt(i/e));return t}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const t=[];let i,r=this.getPoint(0),s=0;t.push(0);for(let o=1;o<=e;o++)i=this.getPoint(o/e),s+=i.distanceTo(r),t.push(s),r=i;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t){const i=this.getLengths();let r=0;const s=i.length;let o;t?o=t:o=e*i[s-1];let a=0,l=s-1,f;for(;a<=l;)if(r=Math.floor(a+(l-a)/2),f=i[r]-o,f<0)a=r+1;else if(f>0)l=r-1;else{l=r;break}if(r=l,i[r]===o)return r/(s-1);const h=i[r],p=i[r+1]-h,v=(o-h)/p;return(r+v)/(s-1)}getTangent(e,t){let r=e-1e-4,s=e+1e-4;r<0&&(r=0),s>1&&(s=1);const o=this.getPoint(r),a=this.getPoint(s),l=t||(o.isVector2?new ye:new N);return l.copy(a).sub(o).normalize(),l}getTangentAt(e,t){const i=this.getUtoTmapping(e);return this.getTangent(i,t)}computeFrenetFrames(e,t){const i=new N,r=[],s=[],o=[],a=new N,l=new ot;for(let v=0;v<=e;v++){const y=v/e;r[v]=this.getTangentAt(y,new N)}s[0]=new N,o[0]=new N;let f=Number.MAX_VALUE;const h=Math.abs(r[0].x),d=Math.abs(r[0].y),p=Math.abs(r[0].z);h<=f&&(f=h,i.set(1,0,0)),d<=f&&(f=d,i.set(0,1,0)),p<=f&&i.set(0,0,1),a.crossVectors(r[0],i).normalize(),s[0].crossVectors(r[0],a),o[0].crossVectors(r[0],s[0]);for(let v=1;v<=e;v++){if(s[v]=s[v-1].clone(),o[v]=o[v-1].clone(),a.crossVectors(r[v-1],r[v]),a.length()>Number.EPSILON){a.normalize();const y=Math.acos(cn(r[v-1].dot(r[v]),-1,1));s[v].applyMatrix4(l.makeRotationAxis(a,y))}o[v].crossVectors(r[v],s[v])}if(t===!0){let v=Math.acos(cn(s[0].dot(s[e]),-1,1));v/=e,r[0].dot(a.crossVectors(s[0],s[e]))>0&&(v=-v);for(let y=1;y<=e;y++)s[y].applyMatrix4(l.makeRotationAxis(r[y],v*y)),o[y].crossVectors(r[y],s[y])}return{tangents:r,normals:s,binormals:o}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class Ig extends Ur{constructor(e=0,t=0,i=1,r=1,s=0,o=Math.PI*2,a=!1,l=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=i,this.yRadius=r,this.aStartAngle=s,this.aEndAngle=o,this.aClockwise=a,this.aRotation=l}getPoint(e,t){const i=t||new ye,r=Math.PI*2;let s=this.aEndAngle-this.aStartAngle;const o=Math.abs(s)r;)s-=r;s0?0:(Math.floor(Math.abs(a)/s)+1)*s:l===0&&a===s-1&&(a=s-2,l=1);let f,h;this.closed||a>0?f=r[(a-1)%s]:(Ap.subVectors(r[0],r[1]).add(r[0]),f=Ap);const d=r[a%s],p=r[(a+1)%s];if(this.closed||a+2r.length-2?r.length-1:o+1],d=r[o>r.length-3?r.length-1:o+2];return i.set(jb(a,l.x,f.x,h.x,d.x),jb(a,l.y,f.y,h.y,d.y)),i}copy(e){super.copy(e),this.points=[];for(let t=0,i=e.points.length;t=i){const o=r[s]-i,a=this.curves[s],l=a.getLength(),f=l===0?0:1-o/l;return a.getPointAt(f,t)}s++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let t=0;for(let i=0,r=this.curves.length;i1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,i=e.curves.length;t0){const d=f.getPoint(0);d.equals(this.currentPoint)||this.lineTo(d.x,d.y)}this.curves.push(f);const h=f.getPoint(1);return this.currentPoint.copy(h),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class Wu extends dt{constructor(e=[new ye(0,-.5),new ye(.5,0),new ye(0,.5)],t=12,i=0,r=Math.PI*2){super(),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:i,phiLength:r},t=Math.floor(t),r=cn(r,0,Math.PI*2);const s=[],o=[],a=[],l=[],f=[],h=1/t,d=new N,p=new ye,v=new N,y=new N,_=new N;let M=0,m=0;for(let S=0;S<=e.length-1;S++)switch(S){case 0:M=e[S+1].x-e[S].x,m=e[S+1].y-e[S].y,v.x=m*1,v.y=-M,v.z=m*0,_.copy(v),v.normalize(),l.push(v.x,v.y,v.z);break;case e.length-1:l.push(_.x,_.y,_.z);break;default:M=e[S+1].x-e[S].x,m=e[S+1].y-e[S].y,v.x=m*1,v.y=-M,v.z=m*0,y.copy(v),v.x+=_.x,v.y+=_.y,v.z+=_.z,v.normalize(),l.push(v.x,v.y,v.z),_.copy(y)}for(let S=0;S<=t;S++){const w=i+S*h*r,A=Math.sin(w),b=Math.cos(w);for(let P=0;P<=e.length-1;P++){d.x=e[P].x*A,d.y=e[P].y,d.z=e[P].x*b,o.push(d.x,d.y,d.z),p.x=S/t,p.y=P/(e.length-1),a.push(p.x,p.y);const I=l[3*P+0]*A,L=l[3*P+1],C=l[3*P+0]*b;f.push(I,L,C)}}for(let S=0;S0&&w(!0),t>0&&w(!1)),this.setIndex(h),this.setAttribute("position",new We(d,3)),this.setAttribute("normal",new We(p,3)),this.setAttribute("uv",new We(v,2));function S(){const A=new N,b=new N;let P=0;const I=(t-e)/i;for(let L=0;L<=s;L++){const C=[],R=L/s,W=R*(t-e)+e;for(let J=0;J<=r;J++){const j=J/r,X=j*l+a,Z=Math.sin(X),se=Math.cos(X);b.x=W*Z,b.y=-R*i+M,b.z=W*se,d.push(b.x,b.y,b.z),A.set(Z,I,se).normalize(),p.push(A.x,A.y,A.z),v.push(j,1-R),C.push(y++)}_.push(C)}for(let L=0;L.9&&I<.1&&(w<.2&&(o[S+0]+=1),A<.2&&(o[S+2]+=1),b<.2&&(o[S+4]+=1))}}function p(S){s.push(S.x,S.y,S.z)}function v(S,w){const A=S*3;w.x=e[A+0],w.y=e[A+1],w.z=e[A+2]}function y(){const S=new N,w=new N,A=new N,b=new N,P=new ye,I=new ye,L=new ye;for(let C=0,R=0;C80*t){a=f=n[0],l=h=n[1];for(let y=t;yf&&(f=d),p>h&&(h=p);v=Math.max(f-a,h-l),v=v!==0?32767/v:0}return Wf(s,o,t,a,l,v,0),o}};function oR(n,e,t,i,r){let s,o;if(r===LG(n,e,t,i)>0)for(s=e;s=e;s-=i)o=Xb(s,n[s],n[s+1],o);return o&&kg(o,o.next)&&(jf(o),o=o.next),o}function Ya(n,e){if(!n)return n;e||(e=n);let t=n,i;do if(i=!1,!t.steiner&&(kg(t,t.next)||tn(t.prev,t,t.next)===0)){if(jf(t),t=e=t.prev,t===t.next)break;i=!0}else t=t.next;while(i||t!==e);return e}function Wf(n,e,t,i,r,s,o){if(!n)return;!o&&s&&AG(n,i,r,s);let a=n,l,f;for(;n.prev!==n.next;){if(l=n.prev,f=n.next,s?gG(n,i,r,s):mG(n)){e.push(l.i/t|0),e.push(n.i/t|0),e.push(f.i/t|0),jf(n),n=f.next,a=f.next;continue}if(n=f,n===a){o?o===1?(n=vG(Ya(n),e,t),Wf(n,e,t,i,r,s,2)):o===2&&yG(n,e,t,i,r,s):Wf(Ya(n),e,t,i,r,s,1);break}}}function mG(n){const e=n.prev,t=n,i=n.next;if(tn(e,t,i)>=0)return!1;const r=e.x,s=t.x,o=i.x,a=e.y,l=t.y,f=i.y,h=rs?r>o?r:o:s>o?s:o,v=a>l?a>f?a:f:l>f?l:f;let y=i.next;for(;y!==e;){if(y.x>=h&&y.x<=p&&y.y>=d&&y.y<=v&&uu(r,a,s,l,o,f,y.x,y.y)&&tn(y.prev,y,y.next)>=0)return!1;y=y.next}return!0}function gG(n,e,t,i){const r=n.prev,s=n,o=n.next;if(tn(r,s,o)>=0)return!1;const a=r.x,l=s.x,f=o.x,h=r.y,d=s.y,p=o.y,v=al?a>f?a:f:l>f?l:f,M=h>d?h>p?h:p:d>p?d:p,m=d_(v,y,e,t,i),S=d_(_,M,e,t,i);let w=n.prevZ,A=n.nextZ;for(;w&&w.z>=m&&A&&A.z<=S;){if(w.x>=v&&w.x<=_&&w.y>=y&&w.y<=M&&w!==r&&w!==o&&uu(a,h,l,d,f,p,w.x,w.y)&&tn(w.prev,w,w.next)>=0||(w=w.prevZ,A.x>=v&&A.x<=_&&A.y>=y&&A.y<=M&&A!==r&&A!==o&&uu(a,h,l,d,f,p,A.x,A.y)&&tn(A.prev,A,A.next)>=0))return!1;A=A.nextZ}for(;w&&w.z>=m;){if(w.x>=v&&w.x<=_&&w.y>=y&&w.y<=M&&w!==r&&w!==o&&uu(a,h,l,d,f,p,w.x,w.y)&&tn(w.prev,w,w.next)>=0)return!1;w=w.prevZ}for(;A&&A.z<=S;){if(A.x>=v&&A.x<=_&&A.y>=y&&A.y<=M&&A!==r&&A!==o&&uu(a,h,l,d,f,p,A.x,A.y)&&tn(A.prev,A,A.next)>=0)return!1;A=A.nextZ}return!0}function vG(n,e,t){let i=n;do{const r=i.prev,s=i.next.next;!kg(r,s)&&aR(r,i,i.next,s)&&Gf(r,s)&&Gf(s,r)&&(e.push(r.i/t|0),e.push(i.i/t|0),e.push(s.i/t|0),jf(i),jf(i.next),i=n=s),i=i.next}while(i!==n);return Ya(i)}function yG(n,e,t,i,r,s){let o=n;do{let a=o.next.next;for(;a!==o.prev;){if(o.i!==a.i&&TG(o,a)){let l=lR(o,a);o=Ya(o,o.next),l=Ya(l,l.next),Wf(o,e,t,i,r,s,0),Wf(l,e,t,i,r,s,0);return}a=a.next}o=o.next}while(o!==n)}function xG(n,e,t,i){const r=[];let s,o,a,l,f;for(s=0,o=e.length;s=t.next.y&&t.next.y!==t.y){const p=t.x+(o-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(p<=s&&p>i&&(i=p,r=t.x=t.x&&t.x>=l&&s!==t.x&&uu(or.x||t.x===r.x&&MG(r,t)))&&(r=t,h=d)),t=t.next;while(t!==a);return r}function MG(n,e){return tn(n.prev,n,e.prev)<0&&tn(e.next,n,n.next)<0}function AG(n,e,t,i){let r=n;do r.z===0&&(r.z=d_(r.x,r.y,e,t,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next;while(r!==n);r.prevZ.nextZ=null,r.prevZ=null,EG(r)}function EG(n){let e,t,i,r,s,o,a,l,f=1;do{for(t=n,n=null,s=null,o=0;t;){for(o++,i=t,a=0,e=0;e0||l>0&&i;)a!==0&&(l===0||!i||t.z<=i.z)?(r=t,t=t.nextZ,a--):(r=i,i=i.nextZ,l--),s?s.nextZ=r:n=r,r.prevZ=s,s=r;t=i}s.nextZ=null,f*=2}while(o>1);return n}function d_(n,e,t,i,r){return n=(n-t)*r|0,e=(e-i)*r|0,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,n|e<<1}function bG(n){let e=n,t=n;do(e.x=(n-o)*(s-a)&&(n-o)*(i-a)>=(t-o)*(e-a)&&(t-o)*(s-a)>=(r-o)*(i-a)}function TG(n,e){return n.next.i!==e.i&&n.prev.i!==e.i&&!CG(n,e)&&(Gf(n,e)&&Gf(e,n)&&PG(n,e)&&(tn(n.prev,n,e.prev)||tn(n,e.prev,e))||kg(n,e)&&tn(n.prev,n,n.next)>0&&tn(e.prev,e,e.next)>0)}function tn(n,e,t){return(e.y-n.y)*(t.x-e.x)-(e.x-n.x)*(t.y-e.y)}function kg(n,e){return n.x===e.x&&n.y===e.y}function aR(n,e,t,i){const r=Pp(tn(n,e,t)),s=Pp(tn(n,e,i)),o=Pp(tn(t,i,n)),a=Pp(tn(t,i,e));return!!(r!==s&&o!==a||r===0&&Cp(n,t,e)||s===0&&Cp(n,i,e)||o===0&&Cp(t,n,i)||a===0&&Cp(t,e,i))}function Cp(n,e,t){return e.x<=Math.max(n.x,t.x)&&e.x>=Math.min(n.x,t.x)&&e.y<=Math.max(n.y,t.y)&&e.y>=Math.min(n.y,t.y)}function Pp(n){return n>0?1:n<0?-1:0}function CG(n,e){let t=n;do{if(t.i!==n.i&&t.next.i!==n.i&&t.i!==e.i&&t.next.i!==e.i&&aR(t,t.next,n,e))return!0;t=t.next}while(t!==n);return!1}function Gf(n,e){return tn(n.prev,n,n.next)<0?tn(n,e,n.next)>=0&&tn(n,n.prev,e)>=0:tn(n,e,n.prev)<0||tn(n,n.next,e)<0}function PG(n,e){let t=n,i=!1;const r=(n.x+e.x)/2,s=(n.y+e.y)/2;do t.y>s!=t.next.y>s&&t.next.y!==t.y&&r<(t.next.x-t.x)*(s-t.y)/(t.next.y-t.y)+t.x&&(i=!i),t=t.next;while(t!==n);return i}function lR(n,e){const t=new p_(n.i,n.x,n.y),i=new p_(e.i,e.x,e.y),r=n.next,s=e.prev;return n.next=e,e.prev=n,t.next=r,r.prev=t,i.next=t,t.prev=i,s.next=i,i.prev=s,i}function Xb(n,e,t,i){const r=new p_(n,e,t);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function jf(n){n.next.prev=n.prev,n.prev.next=n.next,n.prevZ&&(n.prevZ.nextZ=n.nextZ),n.nextZ&&(n.nextZ.prevZ=n.prevZ)}function p_(n,e,t){this.i=n,this.x=e,this.y=t,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function LG(n,e,t,i){let r=0;for(let s=e,o=t-i;s2&&n[e-1].equals(n[0])&&n.pop()}function qb(n,e){for(let t=0;tNumber.EPSILON){const le=Math.sqrt(z),be=Math.sqrt(nt*nt+_t*_t),Te=oe.x-je/le,Re=oe.y+qe/le,et=_e.x-_t/be,ze=_e.y+nt/be,pe=((et-Te)*_t-(ze-Re)*nt)/(qe*_t-je*nt);Ne=Te+qe*pe-ge.x,Ie=Re+je*pe-ge.y;const He=Ne*Ne+Ie*Ie;if(He<=2)return new ye(Ne,Ie);Ge=Math.sqrt(He/2)}else{let le=!1;qe>Number.EPSILON?nt>Number.EPSILON&&(le=!0):qe<-Number.EPSILON?nt<-Number.EPSILON&&(le=!0):Math.sign(je)===Math.sign(_t)&&(le=!0),le?(Ne=-je,Ie=qe,Ge=Math.sqrt(z)):(Ne=qe,Ie=je,Ge=Math.sqrt(z/2))}return new ye(Ne/Ge,Ie/Ge)}const H=[];for(let ge=0,oe=X.length,_e=oe-1,Ne=ge+1;ge=0;ge--){const oe=ge/M,_e=v*Math.cos(oe*Math.PI/2),Ne=y*Math.sin(oe*Math.PI/2)+_;for(let Ie=0,Ge=X.length;Ie=0;){const Ne=_e;let Ie=_e-1;Ie<0&&(Ie=ge.length-1);for(let Ge=0,qe=h+M*2;Ge0)&&v.push(w,A,P),(m!==i-1||l0!=e>0&&this.version++,this._sheen=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class dR extends Yn{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new Fe(16777215),this.specular=new Fe(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Fe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Xo,this.normalScale=new ye(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=hh,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class pR extends Yn{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Fe(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Fe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Xo,this.normalScale=new ye(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}class mR extends Yn{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Xo,this.normalScale=new ye(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}}class gR extends Yn{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new Fe(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Fe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Xo,this.normalScale=new ye(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=hh,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class vR extends Yn{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Fe(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Xo,this.normalScale=new ye(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.flatShading=e.flatShading,this.fog=e.fog,this}}class yR extends yi{constructor(e){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}}function lr(n,e,t){return MS(n)?new n.constructor(n.subarray(e,t!==void 0?t:n.length)):n.slice(e,t)}function Ra(n,e,t){return!n||!t&&n.constructor===e?n:typeof e.BYTES_PER_ELEMENT=="number"?new e(n):Array.prototype.slice.call(n)}function MS(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function xR(n){function e(r,s){return n[r]-n[s]}const t=n.length,i=new Array(t);for(let r=0;r!==t;++r)i[r]=r;return i.sort(e),i}function m_(n,e,t){const i=n.length,r=new n.constructor(i);for(let s=0,o=0;o!==i;++s){const a=t[s]*e;for(let l=0;l!==e;++l)r[o++]=n[a+l]}return r}function AS(n,e,t,i){let r=1,s=n[0];for(;s!==void 0&&s[i]===void 0;)s=n[r++];if(s===void 0)return;let o=s[i];if(o!==void 0)if(Array.isArray(o))do o=s[i],o!==void 0&&(e.push(s.time),t.push.apply(t,o)),s=n[r++];while(s!==void 0);else if(o.toArray!==void 0)do o=s[i],o!==void 0&&(e.push(s.time),o.toArray(t,t.length)),s=n[r++];while(s!==void 0);else do o=s[i],o!==void 0&&(e.push(s.time),t.push(o)),s=n[r++];while(s!==void 0)}function kG(n,e,t,i,r=30){const s=n.clone();s.name=e;const o=[];for(let l=0;l=i)){d.push(f.times[v]);for(let _=0;_s.tracks[l].times[0]&&(a=s.tracks[l].times[0]);for(let l=0;l=a.times[y]){const m=y*d+h,S=m+d-h;_=lr(a.values,m,S)}else{const m=a.createInterpolant(),S=h,w=d-h;m.evaluate(s),_=lr(m.resultBuffer,S,w)}l==="quaternion"&&new si().fromArray(_).normalize().conjugate().toArray(_);const M=f.times.length;for(let m=0;m=s)){const a=t[1];e=s)break t}o=i,i=0;break n}break e}for(;i>>1;et;)--o;if(++o,s!==0||o!==r){s>=o&&(o=Math.max(o,1),s=o-1);const a=this.getValueSize();this.times=lr(i,s,o),this.values=lr(this.values,s*a,o*a)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const i=this.times,r=this.values,s=i.length;s===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let a=0;a!==s;a++){const l=i[a];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),e=!1;break}if(o!==null&&o>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,o),e=!1;break}o=l}if(r!==void 0&&MS(r))for(let a=0,l=r.length;a!==l;++a){const f=r[a];if(isNaN(f)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,f),e=!1;break}}return e}optimize(){const e=lr(this.times),t=lr(this.values),i=this.getValueSize(),r=this.getInterpolation()===im,s=e.length-1;let o=1;for(let a=1;a0){e[o]=e[s];for(let a=s*i,l=o*i,f=0;f!==i;++f)t[l+f]=t[a+f];++o}return o!==e.length?(this.times=lr(e,0,o),this.values=lr(t,0,o*i)):(this.times=e,this.values=t),this}clone(){const e=lr(this.times,0),t=lr(this.values,0),i=this.constructor,r=new i(this.name,e,t);return r.createInterpolant=this.createInterpolant,r}}zr.prototype.TimeBufferType=Float32Array;zr.prototype.ValueBufferType=Float32Array;zr.prototype.DefaultInterpolation=zf;class nl extends zr{}nl.prototype.ValueTypeName="bool";nl.prototype.ValueBufferType=Array;nl.prototype.DefaultInterpolation=Uf;nl.prototype.InterpolantFactoryMethodLinear=void 0;nl.prototype.InterpolantFactoryMethodSmooth=void 0;class bS extends zr{}bS.prototype.ValueTypeName="color";class Xf extends zr{}Xf.prototype.ValueTypeName="number";class wR extends Ch{constructor(e,t,i,r){super(e,t,i,r)}interpolate_(e,t,i,r){const s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,l=(i-t)/(r-t);let f=e*a;for(let h=f+a;f!==h;f+=4)si.slerpFlat(s,0,o,f-a,o,f,l);return s}}class Xu extends zr{InterpolantFactoryMethodLinear(e){return new wR(this.times,this.values,this.getValueSize(),e)}}Xu.prototype.ValueTypeName="quaternion";Xu.prototype.DefaultInterpolation=zf;Xu.prototype.InterpolantFactoryMethodSmooth=void 0;class il extends zr{}il.prototype.ValueTypeName="string";il.prototype.ValueBufferType=Array;il.prototype.DefaultInterpolation=Uf;il.prototype.InterpolantFactoryMethodLinear=void 0;il.prototype.InterpolantFactoryMethodSmooth=void 0;class Yf extends zr{}Yf.prototype.ValueTypeName="vector";class qf{constructor(e,t=-1,i,r=Ag){this.name=e,this.tracks=i,this.duration=t,this.blendMode=r,this.uuid=ji(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],i=e.tracks,r=1/(e.fps||1);for(let o=0,a=i.length;o!==a;++o)t.push(zG(i[o]).scale(r));const s=new this(e.name,e.duration,t,e.blendMode);return s.uuid=e.uuid,s}static toJSON(e){const t=[],i=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let s=0,o=i.length;s!==o;++s)t.push(zr.toJSON(i[s]));return r}static CreateFromMorphTargetSequence(e,t,i,r){const s=t.length,o=[];for(let a=0;a1){const d=h[1];let p=r[d];p||(r[d]=p=[]),p.push(f)}}const o=[];for(const a in r)o.push(this.CreateFromMorphTargetSequence(a,r[a],t,i));return o}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const i=function(d,p,v,y,_){if(v.length!==0){const M=[],m=[];AS(v,M,m,y),M.length!==0&&_.push(new d(p,M,m))}},r=[],s=e.name||"default",o=e.fps||30,a=e.blendMode;let l=e.length||-1;const f=e.hierarchy||[];for(let d=0;d{t&&t(s),this.manager.itemEnd(e)},0),s;if(Ss[e]!==void 0){Ss[e].push({onLoad:t,onProgress:i,onError:r});return}Ss[e]=[],Ss[e].push({onLoad:t,onProgress:i,onError:r});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,l=this.responseType;fetch(o).then(f=>{if(f.status===200||f.status===0){if(f.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||f.body===void 0||f.body.getReader===void 0)return f;const h=Ss[e],d=f.body.getReader(),p=f.headers.get("Content-Length")||f.headers.get("X-File-Size"),v=p?parseInt(p):0,y=v!==0;let _=0;const M=new ReadableStream({start(m){S();function S(){d.read().then(({done:w,value:A})=>{if(w)m.close();else{_+=A.byteLength;const b=new ProgressEvent("progress",{lengthComputable:y,loaded:_,total:v});for(let P=0,I=h.length;P{switch(l){case"arraybuffer":return f.arrayBuffer();case"blob":return f.blob();case"document":return f.text().then(h=>new DOMParser().parseFromString(h,a));case"json":return f.json();default:if(a===void 0)return f.text();{const d=/charset="?([^;"\s]*)"?/i.exec(a),p=d&&d[1]?d[1].toLowerCase():void 0,v=new TextDecoder(p);return f.arrayBuffer().then(y=>v.decode(y))}}}).then(f=>{qa.add(e,f);const h=Ss[e];delete Ss[e];for(let d=0,p=h.length;d{const h=Ss[e];if(h===void 0)throw this.manager.itemError(e),f;delete Ss[e];for(let d=0,p=h.length;d{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class BG extends Ji{constructor(e){super(e)}load(e,t,i,r){const s=this,o=new Vs(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(a){try{t(s.parse(JSON.parse(a)))}catch(l){r?r(l):console.error(l),s.manager.itemError(e)}},i,r)}parse(e){const t=[];for(let i=0;i0:r.vertexColors=e.vertexColors),e.uniforms!==void 0)for(const s in e.uniforms){const o=e.uniforms[s];switch(r.uniforms[s]={},o.type){case"t":r.uniforms[s].value=i(o.value);break;case"c":r.uniforms[s].value=new Fe().setHex(o.value);break;case"v2":r.uniforms[s].value=new ye().fromArray(o.value);break;case"v3":r.uniforms[s].value=new N().fromArray(o.value);break;case"v4":r.uniforms[s].value=new Dt().fromArray(o.value);break;case"m3":r.uniforms[s].value=new Mt().fromArray(o.value);break;case"m4":r.uniforms[s].value=new ot().fromArray(o.value);break;default:r.uniforms[s].value=o.value}}if(e.defines!==void 0&&(r.defines=e.defines),e.vertexShader!==void 0&&(r.vertexShader=e.vertexShader),e.fragmentShader!==void 0&&(r.fragmentShader=e.fragmentShader),e.glslVersion!==void 0&&(r.glslVersion=e.glslVersion),e.extensions!==void 0)for(const s in e.extensions)r.extensions[s]=e.extensions[s];if(e.size!==void 0&&(r.size=e.size),e.sizeAttenuation!==void 0&&(r.sizeAttenuation=e.sizeAttenuation),e.map!==void 0&&(r.map=i(e.map)),e.matcap!==void 0&&(r.matcap=i(e.matcap)),e.alphaMap!==void 0&&(r.alphaMap=i(e.alphaMap)),e.bumpMap!==void 0&&(r.bumpMap=i(e.bumpMap)),e.bumpScale!==void 0&&(r.bumpScale=e.bumpScale),e.normalMap!==void 0&&(r.normalMap=i(e.normalMap)),e.normalMapType!==void 0&&(r.normalMapType=e.normalMapType),e.normalScale!==void 0){let s=e.normalScale;Array.isArray(s)===!1&&(s=[s,s]),r.normalScale=new ye().fromArray(s)}return e.displacementMap!==void 0&&(r.displacementMap=i(e.displacementMap)),e.displacementScale!==void 0&&(r.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(r.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(r.roughnessMap=i(e.roughnessMap)),e.metalnessMap!==void 0&&(r.metalnessMap=i(e.metalnessMap)),e.emissiveMap!==void 0&&(r.emissiveMap=i(e.emissiveMap)),e.emissiveIntensity!==void 0&&(r.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(r.specularMap=i(e.specularMap)),e.specularIntensityMap!==void 0&&(r.specularIntensityMap=i(e.specularIntensityMap)),e.specularColorMap!==void 0&&(r.specularColorMap=i(e.specularColorMap)),e.envMap!==void 0&&(r.envMap=i(e.envMap)),e.envMapIntensity!==void 0&&(r.envMapIntensity=e.envMapIntensity),e.reflectivity!==void 0&&(r.reflectivity=e.reflectivity),e.refractionRatio!==void 0&&(r.refractionRatio=e.refractionRatio),e.lightMap!==void 0&&(r.lightMap=i(e.lightMap)),e.lightMapIntensity!==void 0&&(r.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(r.aoMap=i(e.aoMap)),e.aoMapIntensity!==void 0&&(r.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(r.gradientMap=i(e.gradientMap)),e.clearcoatMap!==void 0&&(r.clearcoatMap=i(e.clearcoatMap)),e.clearcoatRoughnessMap!==void 0&&(r.clearcoatRoughnessMap=i(e.clearcoatRoughnessMap)),e.clearcoatNormalMap!==void 0&&(r.clearcoatNormalMap=i(e.clearcoatNormalMap)),e.clearcoatNormalScale!==void 0&&(r.clearcoatNormalScale=new ye().fromArray(e.clearcoatNormalScale)),e.iridescenceMap!==void 0&&(r.iridescenceMap=i(e.iridescenceMap)),e.iridescenceThicknessMap!==void 0&&(r.iridescenceThicknessMap=i(e.iridescenceThicknessMap)),e.transmissionMap!==void 0&&(r.transmissionMap=i(e.transmissionMap)),e.thicknessMap!==void 0&&(r.thicknessMap=i(e.thicknessMap)),e.sheenColorMap!==void 0&&(r.sheenColorMap=i(e.sheenColorMap)),e.sheenRoughnessMap!==void 0&&(r.sheenRoughnessMap=i(e.sheenRoughnessMap)),r}setTextures(e){return this.textures=e,this}static createMaterialFromType(e){const t={ShadowMaterial:cR,SpriteMaterial:hS,RawShaderMaterial:fR,ShaderMaterial:is,PointsMaterial:pS,MeshPhysicalMaterial:hR,MeshStandardMaterial:wS,MeshPhongMaterial:dR,MeshToonMaterial:pR,MeshNormalMaterial:mR,MeshLambertMaterial:gR,MeshDepthMaterial:lS,MeshDistanceMaterial:uS,MeshBasicMaterial:Yo,MeshMatcapMaterial:vR,LineDashedMaterial:yR,LineBasicMaterial:yi,Material:Yn};return new t[e]}}class g_{static decodeText(e){if(typeof TextDecoder<"u")return new TextDecoder().decode(e);let t="";for(let i=0,r=e.length;i0){const l=new TS(t);s=new Zf(l),s.setCrossOrigin(this.crossOrigin);for(let f=0,h=e.length;f0){r=new Zf(this.manager),r.setCrossOrigin(this.crossOrigin);for(let o=0,a=e.length;o"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,t,i,r){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const s=this,o=qa.get(e);if(o!==void 0)return s.manager.itemStart(e),setTimeout(function(){t&&t(o),s.manager.itemEnd(e)},0),o;const a={};a.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",a.headers=this.requestHeader,fetch(e,a).then(function(l){return l.blob()}).then(function(l){return createImageBitmap(l,Object.assign(s.options,{colorSpaceConversion:"none"}))}).then(function(l){qa.add(e,l),t&&t(l),s.manager.itemEnd(e)}).catch(function(l){r&&r(l),s.manager.itemError(e),s.manager.itemEnd(e)}),s.manager.itemStart(e)}}let Lp;class PS{static getContext(){return Lp===void 0&&(Lp=new(window.AudioContext||window.webkitAudioContext)),Lp}static setContext(e){Lp=e}}class JG extends Ji{constructor(e){super(e)}load(e,t,i,r){const s=this,o=new Vs(this.manager);o.setResponseType("arraybuffer"),o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(a){try{const l=a.slice(0);PS.getContext().decodeAudioData(l,function(h){t(h)})}catch(l){r?r(l):console.error(l),s.manager.itemError(e)}},i,r)}}class KG extends Og{constructor(e,t,i=1){super(void 0,i),this.isHemisphereLightProbe=!0;const r=new Fe().set(e),s=new Fe().set(t),o=new N(r.r,r.g,r.b),a=new N(s.r,s.g,s.b),l=Math.sqrt(Math.PI),f=l*Math.sqrt(.75);this.sh.coefficients[0].copy(o).add(a).multiplyScalar(l),this.sh.coefficients[1].copy(o).sub(a).multiplyScalar(f)}}class QG extends Og{constructor(e,t=1){super(void 0,t),this.isAmbientLightProbe=!0;const i=new Fe().set(e);this.sh.coefficients[0].set(i.r,i.g,i.b).multiplyScalar(2*Math.sqrt(Math.PI))}}const nT=new ot,iT=new ot,ca=new ot;class $G{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Wt,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Wt,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(e){const t=this._cache;if(t.focus!==e.focus||t.fov!==e.fov||t.aspect!==e.aspect*this.aspect||t.near!==e.near||t.far!==e.far||t.zoom!==e.zoom||t.eyeSep!==this.eyeSep){t.focus=e.focus,t.fov=e.fov,t.aspect=e.aspect*this.aspect,t.near=e.near,t.far=e.far,t.zoom=e.zoom,t.eyeSep=this.eyeSep,ca.copy(e.projectionMatrix);const r=t.eyeSep/2,s=r*t.near/t.focus,o=t.near*Math.tan(Oa*t.fov*.5)/t.zoom;let a,l;iT.elements[12]=-r,nT.elements[12]=r,a=-o*t.aspect+s,l=o*t.aspect+s,ca.elements[0]=2*t.near/(l-a),ca.elements[8]=(l+a)/(l-a),this.cameraL.projectionMatrix.copy(ca),a=-o*t.aspect-s,l=o*t.aspect-s,ca.elements[0]=2*t.near/(l-a),ca.elements[8]=(l+a)/(l-a),this.cameraR.projectionMatrix.copy(ca)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(iT),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(nT)}}class LS{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=rT(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const t=rT();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function rT(){return(typeof performance>"u"?Date:performance).now()}const fa=new N,sT=new si,ej=new N,ha=new N;class tj extends Tt{constructor(){super(),this.type="AudioListener",this.context=PS.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new LS}getInput(){return this.gain}removeFilter(){return this.filter!==null&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(e){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}updateMatrixWorld(e){super.updateMatrixWorld(e);const t=this.context.listener,i=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(fa,sT,ej),ha.set(0,0,-1).applyQuaternion(sT),t.positionX){const r=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(fa.x,r),t.positionY.linearRampToValueAtTime(fa.y,r),t.positionZ.linearRampToValueAtTime(fa.z,r),t.forwardX.linearRampToValueAtTime(ha.x,r),t.forwardY.linearRampToValueAtTime(ha.y,r),t.forwardZ.linearRampToValueAtTime(ha.z,r),t.upX.linearRampToValueAtTime(i.x,r),t.upY.linearRampToValueAtTime(i.y,r),t.upZ.linearRampToValueAtTime(i.z,r)}else t.setPosition(fa.x,fa.y,fa.z),t.setOrientation(ha.x,ha.y,ha.z,i.x,i.y,i.z)}}class IR extends Tt{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(e=0){if(this.isPlaying===!0){console.warn("THREE.Audio: Audio is already playing.");return}if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}this._startedAt=this.context.currentTime+e;const t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.loopStart=this.loopStart,t.loopEnd=this.loopEnd,t.onended=this.onEnded.bind(this),t.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=t,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this}stop(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this._progress=0,this.source!==null&&(this.source.stop(),this.source.onended=null),this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,t=this.filters.length;e0){this.source.disconnect(this.filters[0]);for(let e=1,t=this.filters.length;e0&&this._mixBufferRegionAdditive(i,r,this._addIndex*t,1,t);for(let l=t,f=t+t;l!==f;++l)if(i[l]!==i[l+t]){a.setValue(i,r);break}}saveOriginalState(){const e=this.binding,t=this.buffer,i=this.valueSize,r=i*this._origIndex;e.getValue(t,r);for(let s=i,o=r;s!==o;++s)t[s]=t[r+s%i];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=this.valueSize*3;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let i=e;i=.5)for(let o=0;o!==s;++o)e[t+o]=e[i+o]}_slerp(e,t,i,r){si.slerpFlat(e,t,e,t,e,i,r)}_slerpAdditive(e,t,i,r,s){const o=this._workIndex*s;si.multiplyQuaternionsFlat(e,o,e,t,e,i),si.slerpFlat(e,t,e,t,e,o,r)}_lerp(e,t,i,r,s){const o=1-r;for(let a=0;a!==s;++a){const l=t+a;e[l]=e[l]*o+e[i+a]*r}}_lerpAdditive(e,t,i,r,s){for(let o=0;o!==s;++o){const a=t+o;e[a]=e[a]+e[i+o]*r}}}const RS="\\[\\]\\.:\\/",sj=new RegExp("["+RS+"]","g"),IS="[^"+RS+"]",oj="[^"+RS.replace("\\.","")+"]",aj=/((?:WC+[\/:])*)/.source.replace("WC",IS),lj=/(WCOD+)?/.source.replace("WCOD",oj),uj=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",IS),cj=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",IS),fj=new RegExp("^"+aj+lj+uj+cj+"$"),hj=["material","materials","bones","map"];class dj{constructor(e,t,i){const r=i||Et.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}getValue(e,t){this.bind();const i=this._targetGroup.nCachedObjects_,r=this._bindings[i];r!==void 0&&r.getValue(e,t)}setValue(e,t){const i=this._bindings;for(let r=this._targetGroup.nCachedObjects_,s=i.length;r!==s;++r)i[r].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].unbind()}}class Et{constructor(e,t,i){this.path=t,this.parsedPath=i||Et.parseTrackName(t),this.node=Et.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,i){return e&&e.isAnimationObjectGroup?new Et.Composite(e,t,i):new Et(e,t,i)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(sj,"")}static parseTrackName(e){const t=fj.exec(e);if(t===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const i={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},r=i.nodeName&&i.nodeName.lastIndexOf(".");if(r!==void 0&&r!==-1){const s=i.nodeName.substring(r+1);hj.indexOf(s)!==-1&&(i.nodeName=i.nodeName.substring(0,r),i.objectName=s)}if(i.propertyName===null||i.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return i}static findNode(e,t){if(t===void 0||t===""||t==="."||t===-1||t===e.name||t===e.uuid)return e;if(e.skeleton){const i=e.skeleton.getBoneByName(t);if(i!==void 0)return i}if(e.children){const i=function(s){for(let o=0;o=s){const d=s++,p=e[d];t[p.uuid]=h,e[h]=p,t[f]=d,e[d]=l;for(let v=0,y=r;v!==y;++v){const _=i[v],M=_[d],m=_[h];_[h]=M,_[d]=m}}}this.nCachedObjects_=s}uncache(){const e=this._objects,t=this._indicesByUUID,i=this._bindings,r=i.length;let s=this.nCachedObjects_,o=e.length;for(let a=0,l=arguments.length;a!==l;++a){const f=arguments[a],h=f.uuid,d=t[h];if(d!==void 0)if(delete t[h],d0&&(t[v.uuid]=d),e[d]=v,e.pop();for(let y=0,_=r;y!==_;++y){const M=i[y];M[d]=M[p],M.pop()}}}this.nCachedObjects_=s}subscribe_(e,t){const i=this._bindingsIndicesByPath;let r=i[e];const s=this._bindings;if(r!==void 0)return s[r];const o=this._paths,a=this._parsedPaths,l=this._objects,f=l.length,h=this.nCachedObjects_,d=new Array(f);r=s.length,i[e]=r,o.push(e),a.push(t),s.push(d);for(let p=h,v=l.length;p!==v;++p){const y=l[p];d[p]=new Et(y,e,t)}return d}unsubscribe_(e){const t=this._bindingsIndicesByPath,i=t[e];if(i!==void 0){const r=this._paths,s=this._parsedPaths,o=this._bindings,a=o.length-1,l=o[a],f=e[a];t[f]=i,o[i]=l,o.pop(),s[i]=s[a],s.pop(),r[i]=r[a],r.pop()}}}class kR{constructor(e,t,i=null,r=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=i,this.blendMode=r;const s=t.tracks,o=s.length,a=new Array(o),l={endingStart:Ca,endingEnd:Ca};for(let f=0;f!==o;++f){const h=s[f].createInterpolant(null);a[f]=h,h.settings=l}this._interpolantSettings=l,this._interpolants=a,this._propertyBindings=new Array(o),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=EL,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,i){if(e.fadeOut(t),this.fadeIn(t),i){const r=this._clip.duration,s=e._clip.duration,o=s/r,a=r/s;e.warp(1,o,t),this.warp(a,1,t)}return this}crossFadeTo(e,t,i){return e.crossFadeFrom(this,t,i)}stopFading(){const e=this._weightInterpolant;return e!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,i){const r=this._mixer,s=r.time,o=this.timeScale;let a=this._timeScaleInterpolant;a===null&&(a=r._lendControlInterpolant(),this._timeScaleInterpolant=a);const l=a.parameterPositions,f=a.sampleValues;return l[0]=s,l[1]=s+i,f[0]=e/o,f[1]=t/o,this}stopWarping(){const e=this._timeScaleInterpolant;return e!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,i,r){if(!this.enabled){this._updateWeight(e);return}const s=this._startTime;if(s!==null){const l=(e-s)*i;l<0||i===0?t=0:(this._startTime=null,t=i*l)}t*=this._updateTimeScale(e);const o=this._updateTime(t),a=this._updateWeight(e);if(a>0){const l=this._interpolants,f=this._propertyBindings;switch(this.blendMode){case Q1:for(let h=0,d=l.length;h!==d;++h)l[h].evaluate(o),f[h].accumulateAdditive(a);break;case Ag:default:for(let h=0,d=l.length;h!==d;++h)l[h].evaluate(o),f[h].accumulate(r,a)}}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;const i=this._weightInterpolant;if(i!==null){const r=i.evaluate(e)[0];t*=r,e>i.parameterPositions[1]&&(this.stopFading(),r===0&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;const i=this._timeScaleInterpolant;if(i!==null){const r=i.evaluate(e)[0];t*=r,e>i.parameterPositions[1]&&(this.stopWarping(),t===0?this.paused=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t}_updateTime(e){const t=this._clip.duration,i=this.loop;let r=this.time+e,s=this._loopCount;const o=i===bL;if(e===0)return s===-1?r:o&&(s&1)===1?t-r:r;if(i===AL){s===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(r>=t)r=t;else if(r<0)r=0;else{this.time=r;break e}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(s===-1&&(e>=0?(s=0,this._setEndings(!0,this.repetitions===0,o)):this._setEndings(this.repetitions===0,!0,o)),r>=t||r<0){const a=Math.floor(r/t);r-=t*a,s+=Math.abs(a);const l=this.repetitions-s;if(l<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,r=e>0?t:0,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(l===1){const f=e<0;this._setEndings(f,!f,o)}else this._setEndings(!1,!1,o);this._loopCount=s,this.time=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}else this.time=r;if(o&&(s&1)===1)return t-r}return r}_setEndings(e,t,i){const r=this._interpolantSettings;i?(r.endingStart=Pa,r.endingEnd=Pa):(e?r.endingStart=this.zeroSlopeAtStart?Pa:Ca:r.endingStart=Ff,t?r.endingEnd=this.zeroSlopeAtEnd?Pa:Ca:r.endingEnd=Ff)}_scheduleFading(e,t,i){const r=this._mixer,s=r.time;let o=this._weightInterpolant;o===null&&(o=r._lendControlInterpolant(),this._weightInterpolant=o);const a=o.parameterPositions,l=o.sampleValues;return a[0]=s,l[0]=t,a[1]=s+e,l[1]=i,this}}const mj=new Float32Array(1);class gj extends rs{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){const i=e._localRoot||this._root,r=e._clip.tracks,s=r.length,o=e._propertyBindings,a=e._interpolants,l=i.uuid,f=this._bindingsByRootAndName;let h=f[l];h===void 0&&(h={},f[l]=h);for(let d=0;d!==s;++d){const p=r[d],v=p.name;let y=h[v];if(y!==void 0)++y.referenceCount,o[d]=y;else{if(y=o[d],y!==void 0){y._cacheIndex===null&&(++y.referenceCount,this._addInactiveBinding(y,l,v));continue}const _=t&&t._propertyBindings[d].binding.parsedPath;y=new DR(Et.create(i,v,_),p.ValueTypeName,p.getValueSize()),++y.referenceCount,this._addInactiveBinding(y,l,v),o[d]=y}a[d].resultBuffer=y.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){const i=(e._localRoot||this._root).uuid,r=e._clip.uuid,s=this._actionsByClip[r];this._bindAction(e,s&&s.knownActions[0]),this._addInactiveAction(e,r,i)}const t=e._propertyBindings;for(let i=0,r=t.length;i!==r;++i){const s=t[i];s.useCount++===0&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const t=e._propertyBindings;for(let i=0,r=t.length;i!==r;++i){const s=t[i];--s.useCount===0&&(s.restoreOriginalState(),this._takeBackBinding(s))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const t=e._cacheIndex;return t!==null&&t=0;--i)e[i].stop();return this}update(e){e*=this.timeScale;const t=this._actions,i=this._nActiveActions,r=this.time+=e,s=Math.sign(e),o=this._accuIndex^=1;for(let f=0;f!==i;++f)t[f]._update(r,e,s,o);const a=this._bindings,l=this._nActiveBindings;for(let f=0;f!==l;++f)a[f].apply(o);return this}setTime(e){this.time=0;for(let t=0;tthis.max.x||e.ythis.max.y)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y)}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,lT).distanceTo(e)}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const uT=new N,Rp=new N;class Mj{constructor(e=new N,t=new N){this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){uT.subVectors(e,this.start),Rp.subVectors(this.end,this.start);const i=Rp.dot(Rp);let s=Rp.dot(uT)/i;return t&&(s=cn(s,0,1)),s}closestPointToPoint(e,t,i){const r=this.closestPointToPointParameter(e,t);return this.delta(i).multiplyScalar(r).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}const cT=new N;class Aj extends Tt{constructor(e,t){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=t,this.type="SpotLightHelper";const i=new dt,r=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let o=0,a=1,l=32;o1)for(let d=0;d.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{mT.set(e.z,0,-e.x).normalize();const t=Math.acos(e.y);this.quaternion.setFromAxisAngle(mT,t)}}setLength(e,t=e*.2,i=t*.2){this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(i,t,i),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class Uj extends as{constructor(e=1){const t=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],i=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],r=new dt;r.setAttribute("position",new We(t,3)),r.setAttribute("color",new We(i,3));const s=new yi({vertexColors:!0,toneMapped:!1});super(r,s),this.type="AxesHelper"}setColors(e,t,i){const r=new Fe,s=this.geometry.attributes.color.array;return r.set(e),r.toArray(s,0),r.toArray(s,3),r.set(t),r.toArray(s,6),r.toArray(s,9),r.set(i),r.toArray(s,12),r.toArray(s,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class zj{constructor(){this.type="ShapePath",this.color=new Fe,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new Hf,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,i,r){return this.currentPath.quadraticCurveTo(e,t,i,r),this}bezierCurveTo(e,t,i,r,s,o){return this.currentPath.bezierCurveTo(e,t,i,r,s,o),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function t(m){const S=[];for(let w=0,A=m.length;wNumber.EPSILON){if(R<0&&(I=S[P],C=-C,L=S[b],R=-R),m.yL.y)continue;if(m.y===I.y){if(m.x===I.x)return!0}else{const W=R*(m.x-I.x)-C*(m.y-I.y);if(W===0)return!0;if(W<0)continue;A=!A}}else{if(m.y!==I.y)continue;if(L.x<=m.x&&m.x<=I.x||I.x<=m.x&&m.x<=L.x)return!0}}return A}const r=ns.isClockWise,s=this.subPaths;if(s.length===0)return[];let o,a,l;const f=[];if(s.length===1)return a=s[0],l=new za,l.curves=a.curves,f.push(l),f;let h=!r(s[0].getPoints());h=e?!h:h;const d=[],p=[];let v=[],y=0,_;p[y]=void 0,v[y]=[];for(let m=0,S=s.length;m1){let m=!1,S=0;for(let w=0,A=p.length;w0&&m===!1&&(v=d)}let M;for(let m=0,S=p.length;mq||E[U]!==T[q]){var he=` -`+E[U].replace(" at new "," at ");return u.displayName&&he.includes("")&&(he=he.replace("",u.displayName)),he}while(1<=U&&0<=q);break}}}finally{wt=!1,Error.prepareStackTrace=g}return(u=u?u.displayName||u.name:"")?Ht(u):""}var vn=Object.prototype.hasOwnProperty,vr=[],ls=-1;function xi(u){return{current:u}}function It(u){0>ls||(u.current=vr[ls],vr[ls]=null,ls--)}function ht(u,c){ls++,vr[ls]=u.current,u.current=c}var Yn={},yn=xi(Yn),Ut=xi(!1),yr=Yn;function Xs(u,c){var g=u.type.contextTypes;if(!g)return Yn;var x=u.stateNode;if(x&&x.__reactInternalMemoizedUnmaskedChildContext===c)return x.__reactInternalMemoizedMaskedChildContext;var E={},T;for(T in g)E[T]=c[T];return x&&(u=u.stateNode,u.__reactInternalMemoizedUnmaskedChildContext=c,u.__reactInternalMemoizedMaskedChildContext=E),E}function Vn(u){return u=u.childContextTypes,u!=null}function Dh(){It(Ut),It(yn)}function zS(u,c,g){if(yn.current!==Yn)throw Error(o(168));ht(yn,c),ht(Ut,g)}function FS(u,c,g){var x=u.stateNode;if(c=c.childContextTypes,typeof x.getChildContext!="function")return g;x=x.getChildContext();for(var E in x)if(!(E in c))throw Error(o(108,L(u)||"Unknown",E));return s({},g,x)}function kh(u){return u=(u=u.stateNode)&&u.__reactInternalMemoizedMergedChildContext||Yn,yr=yn.current,ht(yn,u),ht(Ut,Ut.current),!0}function BS(u,c,g){var x=u.stateNode;if(!x)throw Error(o(169));g?(u=FS(u,c,yr),x.__reactInternalMemoizedMergedChildContext=u,It(Ut),It(yn),ht(yn,u)):It(Ut),ht(Ut,g)}var xr=Math.clz32?Math.clz32:hI,cI=Math.log,fI=Math.LN2;function hI(u){return u>>>=0,u===0?32:31-(cI(u)/fI|0)|0}var Nh=64,Oh=4194304;function qu(u){switch(u&-u){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 u&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return u&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return u}}function Uh(u,c){var g=u.pendingLanes;if(g===0)return 0;var x=0,E=u.suspendedLanes,T=u.pingedLanes,U=g&268435455;if(U!==0){var q=U&~E;q!==0?x=qu(q):(T&=U,T!==0&&(x=qu(T)))}else U=g&~E,U!==0?x=qu(U):T!==0&&(x=qu(T));if(x===0)return 0;if(c!==0&&c!==x&&!(c&E)&&(E=x&-x,T=c&-c,E>=T||E===16&&(T&4194240)!==0))return c;if(x&4&&(x|=g&16),c=u.entangledLanes,c!==0)for(u=u.entanglements,c&=x;0g;g++)c.push(u);return c}function Zu(u,c,g){u.pendingLanes|=c,c!==536870912&&(u.suspendedLanes=0,u.pingedLanes=0),u=u.eventTimes,c=31-xr(c),u[c]=g}function mI(u,c){var g=u.pendingLanes&~c;u.pendingLanes=c,u.suspendedLanes=0,u.pingedLanes=0,u.expiredLanes&=c,u.mutableReadLanes&=c,u.entangledLanes&=c,c=u.entanglements;var x=u.eventTimes;for(u=u.expirationTimes;0>=U,E-=U,fs=1<<32-xr(c)+E|g<Pt?(kn=lt,lt=null):kn=lt.sibling;var Lt=tt(ie,lt,ce[Pt],Oe);if(Lt===null){lt===null&&(lt=kn);break}u&<&&Lt.alternate===null&&c(ie,lt),K=T(Lt,K,Pt),pt===null?Ze=Lt:pt.sibling=Lt,pt=Lt,lt=kn}if(Pt===ce.length)return g(ie,lt),Zt&&Qo(ie,Pt),Ze;if(lt===null){for(;PtPt?(kn=lt,lt=null):kn=lt.sibling;var eo=tt(ie,lt,Lt.value,Oe);if(eo===null){lt===null&&(lt=kn);break}u&<&&eo.alternate===null&&c(ie,lt),K=T(eo,K,Pt),pt===null?Ze=eo:pt.sibling=eo,pt=eo,lt=kn}if(Lt.done)return g(ie,lt),Zt&&Qo(ie,Pt),Ze;if(lt===null){for(;!Lt.done;Pt++,Lt=ce.next())Lt=at(ie,Lt.value,Oe),Lt!==null&&(K=T(Lt,K,Pt),pt===null?Ze=Lt:pt.sibling=Lt,pt=Lt);return Zt&&Qo(ie,Pt),Ze}for(lt=x(ie,lt);!Lt.done;Pt++,Lt=ce.next())Lt=Ft(lt,ie,Pt,Lt.value,Oe),Lt!==null&&(u&&Lt.alternate!==null&<.delete(Lt.key===null?Pt:Lt.key),K=T(Lt,K,Pt),pt===null?Ze=Lt:pt.sibling=Lt,pt=Lt);return u&<.forEach(function(eD){return c(ie,eD)}),Zt&&Qo(ie,Pt),Ze}function sr(ie,K,ce,Oe){if(typeof ce=="object"&&ce!==null&&ce.type===h&&ce.key===null&&(ce=ce.props.children),typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case l:e:{for(var Ze=ce.key,pt=K;pt!==null;){if(pt.key===Ze){if(Ze=ce.type,Ze===h){if(pt.tag===7){g(ie,pt.sibling),K=E(pt,ce.props.children),K.return=ie,ie=K;break e}}else if(pt.elementType===Ze||typeof Ze=="object"&&Ze!==null&&Ze.$$typeof===w&&nw(Ze)===pt.type){g(ie,pt.sibling),K=E(pt,ce.props),K.ref=Qu(ie,pt,ce),K.return=ie,ie=K;break e}g(ie,pt);break}else c(ie,pt);pt=pt.sibling}ce.type===h?(K=sa(ce.props.children,ie.mode,Oe,ce.key),K.return=ie,ie=K):(Oe=Ed(ce.type,ce.key,ce.props,null,ie.mode,Oe),Oe.ref=Qu(ie,K,ce),Oe.return=ie,ie=Oe)}return U(ie);case f:e:{for(pt=ce.key;K!==null;){if(K.key===pt)if(K.tag===4&&K.stateNode.containerInfo===ce.containerInfo&&K.stateNode.implementation===ce.implementation){g(ie,K.sibling),K=E(K,ce.children||[]),K.return=ie,ie=K;break e}else{g(ie,K);break}else c(ie,K);K=K.sibling}K=H0(ce,ie.mode,Oe),K.return=ie,ie=K}return U(ie);case w:return pt=ce._init,sr(ie,K,pt(ce._payload),Oe)}if(Z(ce))return Ke(ie,K,ce,Oe);if(P(ce))return Kn(ie,K,ce,Oe);qh(ie,ce)}return typeof ce=="string"&&ce!==""||typeof ce=="number"?(ce=""+ce,K!==null&&K.tag===6?(g(ie,K.sibling),K=E(K,ce),K.return=ie,ie=K):(g(ie,K),K=V0(ce,ie.mode,Oe),K.return=ie,ie=K),U(ie)):g(ie,K)}return sr}var fl=iw(!0),rw=iw(!1),$u={},tr=xi($u),ec=xi($u),hl=xi($u);function Wr(u){if(u===$u)throw Error(o(174));return u}function s0(u,c){ht(hl,c),ht(ec,u),ht(tr,$u),u=ae(c),It(tr),ht(tr,u)}function dl(){It(tr),It(ec),It(hl)}function sw(u){var c=Wr(hl.current),g=Wr(tr.current);c=D(g,u.type,c),g!==c&&(ht(ec,u),ht(tr,c))}function o0(u){ec.current===u&&(It(tr),It(ec))}var Qt=xi(0);function Zh(u){for(var c=u;c!==null;){if(c.tag===13){var g=c.memoizedState;if(g!==null&&(g=g.dehydrated,g===null||Ih(g)||Yu(g)))return c}else if(c.tag===19&&c.memoizedProps.revealOrder!==void 0){if(c.flags&128)return c}else if(c.child!==null){c.child.return=c,c=c.child;continue}if(c===u)break;for(;c.sibling===null;){if(c.return===null||c.return===u)return null;c=c.return}c.sibling.return=c.return,c=c.sibling}return null}var a0=[];function l0(){for(var u=0;ug?g:4,u(!0);var x=nr.transition;nr.transition={};try{u(!1),c()}finally{Ct=g,nr.transition=x}}function xw(){return Gr().memoizedState}function TI(u,c,g){var x=Ks(u);g={lane:x,action:g,hasEagerState:!1,eagerState:null,next:null},_w(u)?Sw(c,g):(ww(u,c,g),g=ui(),u=ir(u,x,g),u!==null&&Mw(u,c,x))}function CI(u,c,g){var x=Ks(u),E={lane:x,action:g,hasEagerState:!1,eagerState:null,next:null};if(_w(u))Sw(c,E);else{ww(u,c,E);var T=u.alternate;if(u.lanes===0&&(T===null||T.lanes===0)&&(T=c.lastRenderedReducer,T!==null))try{var U=c.lastRenderedState,q=T(U,g);if(E.hasEagerState=!0,E.eagerState=q,Br(q,U))return}catch{}finally{}g=ui(),u=ir(u,x,g),u!==null&&Mw(u,c,x)}}function _w(u){var c=u.alternate;return u===on||c!==null&&c===on}function Sw(u,c){tc=Kh=!0;var g=u.pending;g===null?c.next=c:(c.next=g.next,g.next=c),u.pending=c}function ww(u,c,g){xn!==null&&u.mode&1&&!(xt&2)?(u=c.interleaved,u===null?(g.next=g,Hr===null?Hr=[c]:Hr.push(c)):(g.next=u.next,u.next=g),c.interleaved=g):(u=c.pending,u===null?g.next=g:(g.next=u.next,u.next=g),c.pending=g)}function Mw(u,c,g){if(g&4194240){var x=c.lanes;x&=u.pendingLanes,g|=x,c.lanes=g,Hg(u,g)}}var nd={readContext:Qi,useCallback:Zn,useContext:Zn,useEffect:Zn,useImperativeHandle:Zn,useInsertionEffect:Zn,useLayoutEffect:Zn,useMemo:Zn,useReducer:Zn,useRef:Zn,useState:Zn,useDebugValue:Zn,useDeferredValue:Zn,useTransition:Zn,useMutableSource:Zn,useSyncExternalStore:Zn,useId:Zn,unstable_isNewReconciler:!1},PI={readContext:Qi,useCallback:function(u,c){return ds().memoizedState=[u,c===void 0?null:c],u},useContext:Qi,useEffect:d0,useImperativeHandle:function(u,c,g){return g=g!=null?g.concat([u]):null,ed(4194308,4,mw.bind(null,c,u),g)},useLayoutEffect:function(u,c){return ed(4194308,4,u,c)},useInsertionEffect:function(u,c){return ed(4,2,u,c)},useMemo:function(u,c){var g=ds();return c=c===void 0?null:c,u=u(),g.memoizedState=[u,c],u},useReducer:function(u,c,g){var x=ds();return c=g!==void 0?g(c):c,x.memoizedState=x.baseState=c,u={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:u,lastRenderedState:c},x.queue=u,u=u.dispatch=TI.bind(null,on,u),[x.memoizedState,u]},useRef:function(u){var c=ds();return u={current:u},c.memoizedState=u},useState:h0,useDebugValue:p0,useDeferredValue:function(u){var c=h0(u),g=c[0],x=c[1];return d0(function(){var E=nr.transition;nr.transition={};try{x(u)}finally{nr.transition=E}},[u]),g},useTransition:function(){var u=h0(!1),c=u[0];return u=bI.bind(null,u[1]),ds().memoizedState=u,[c,u]},useMutableSource:function(){},useSyncExternalStore:function(u,c,g){var x=on,E=ds();if(Zt){if(g===void 0)throw Error(o(407));g=g()}else{if(g=c(),xn===null)throw Error(o(349));pl&30||lw(x,c,g)}E.memoizedState=g;var T={value:g,getSnapshot:c};return E.queue=T,d0(cw.bind(null,x,T,u),[u]),x.flags|=2048,ic(9,uw.bind(null,x,T,g,c),void 0,null),g},useId:function(){var u=ds(),c=xn.identifierPrefix;if(Zt){var g=hs,x=fs;g=(x&~(1<<32-xr(x)-1)).toString(32)+g,c=":"+c+"R"+g,g=nc++,0")&&(he=he.replace("",u.displayName)),he}while(1<=U&&0<=q);break}}}finally{wt=!1,Error.prepareStackTrace=g}return(u=u?u.displayName||u.name:"")?Ht(u):""}var vn=Object.prototype.hasOwnProperty,vr=[],ls=-1;function xi(u){return{current:u}}function It(u){0>ls||(u.current=vr[ls],vr[ls]=null,ls--)}function ht(u,c){ls++,vr[ls]=u.current,u.current=c}var qn={},yn=xi(qn),Ut=xi(!1),yr=qn;function Xs(u,c){var g=u.type.contextTypes;if(!g)return qn;var x=u.stateNode;if(x&&x.__reactInternalMemoizedUnmaskedChildContext===c)return x.__reactInternalMemoizedMaskedChildContext;var E={},T;for(T in g)E[T]=c[T];return x&&(u=u.stateNode,u.__reactInternalMemoizedUnmaskedChildContext=c,u.__reactInternalMemoizedMaskedChildContext=E),E}function Vn(u){return u=u.childContextTypes,u!=null}function kh(){It(Ut),It(yn)}function zS(u,c,g){if(yn.current!==qn)throw Error(o(168));ht(yn,c),ht(Ut,g)}function FS(u,c,g){var x=u.stateNode;if(c=c.childContextTypes,typeof x.getChildContext!="function")return g;x=x.getChildContext();for(var E in x)if(!(E in c))throw Error(o(108,L(u)||"Unknown",E));return s({},g,x)}function Nh(u){return u=(u=u.stateNode)&&u.__reactInternalMemoizedMergedChildContext||qn,yr=yn.current,ht(yn,u),ht(Ut,Ut.current),!0}function BS(u,c,g){var x=u.stateNode;if(!x)throw Error(o(169));g?(u=FS(u,c,yr),x.__reactInternalMemoizedMergedChildContext=u,It(Ut),It(yn),ht(yn,u)):It(Ut),ht(Ut,g)}var xr=Math.clz32?Math.clz32:hI,cI=Math.log,fI=Math.LN2;function hI(u){return u>>>=0,u===0?32:31-(cI(u)/fI|0)|0}var Oh=64,Uh=4194304;function qu(u){switch(u&-u){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 u&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return u&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return u}}function zh(u,c){var g=u.pendingLanes;if(g===0)return 0;var x=0,E=u.suspendedLanes,T=u.pingedLanes,U=g&268435455;if(U!==0){var q=U&~E;q!==0?x=qu(q):(T&=U,T!==0&&(x=qu(T)))}else U=g&~E,U!==0?x=qu(U):T!==0&&(x=qu(T));if(x===0)return 0;if(c!==0&&c!==x&&!(c&E)&&(E=x&-x,T=c&-c,E>=T||E===16&&(T&4194240)!==0))return c;if(x&4&&(x|=g&16),c=u.entangledLanes,c!==0)for(u=u.entanglements,c&=x;0g;g++)c.push(u);return c}function Zu(u,c,g){u.pendingLanes|=c,c!==536870912&&(u.suspendedLanes=0,u.pingedLanes=0),u=u.eventTimes,c=31-xr(c),u[c]=g}function mI(u,c){var g=u.pendingLanes&~c;u.pendingLanes=c,u.suspendedLanes=0,u.pingedLanes=0,u.expiredLanes&=c,u.mutableReadLanes&=c,u.entangledLanes&=c,c=u.entanglements;var x=u.eventTimes;for(u=u.expirationTimes;0>=U,E-=U,fs=1<<32-xr(c)+E|g<Pt?(kn=lt,lt=null):kn=lt.sibling;var Lt=tt(ie,lt,ce[Pt],Oe);if(Lt===null){lt===null&&(lt=kn);break}u&<&&Lt.alternate===null&&c(ie,lt),K=T(Lt,K,Pt),pt===null?Ze=Lt:pt.sibling=Lt,pt=Lt,lt=kn}if(Pt===ce.length)return g(ie,lt),Zt&&Qo(ie,Pt),Ze;if(lt===null){for(;PtPt?(kn=lt,lt=null):kn=lt.sibling;var eo=tt(ie,lt,Lt.value,Oe);if(eo===null){lt===null&&(lt=kn);break}u&<&&eo.alternate===null&&c(ie,lt),K=T(eo,K,Pt),pt===null?Ze=eo:pt.sibling=eo,pt=eo,lt=kn}if(Lt.done)return g(ie,lt),Zt&&Qo(ie,Pt),Ze;if(lt===null){for(;!Lt.done;Pt++,Lt=ce.next())Lt=at(ie,Lt.value,Oe),Lt!==null&&(K=T(Lt,K,Pt),pt===null?Ze=Lt:pt.sibling=Lt,pt=Lt);return Zt&&Qo(ie,Pt),Ze}for(lt=x(ie,lt);!Lt.done;Pt++,Lt=ce.next())Lt=Ft(lt,ie,Pt,Lt.value,Oe),Lt!==null&&(u&&Lt.alternate!==null&<.delete(Lt.key===null?Pt:Lt.key),K=T(Lt,K,Pt),pt===null?Ze=Lt:pt.sibling=Lt,pt=Lt);return u&<.forEach(function(eD){return c(ie,eD)}),Zt&&Qo(ie,Pt),Ze}function sr(ie,K,ce,Oe){if(typeof ce=="object"&&ce!==null&&ce.type===h&&ce.key===null&&(ce=ce.props.children),typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case l:e:{for(var Ze=ce.key,pt=K;pt!==null;){if(pt.key===Ze){if(Ze=ce.type,Ze===h){if(pt.tag===7){g(ie,pt.sibling),K=E(pt,ce.props.children),K.return=ie,ie=K;break e}}else if(pt.elementType===Ze||typeof Ze=="object"&&Ze!==null&&Ze.$$typeof===w&&nw(Ze)===pt.type){g(ie,pt.sibling),K=E(pt,ce.props),K.ref=Qu(ie,pt,ce),K.return=ie,ie=K;break e}g(ie,pt);break}else c(ie,pt);pt=pt.sibling}ce.type===h?(K=sa(ce.props.children,ie.mode,Oe,ce.key),K.return=ie,ie=K):(Oe=bd(ce.type,ce.key,ce.props,null,ie.mode,Oe),Oe.ref=Qu(ie,K,ce),Oe.return=ie,ie=Oe)}return U(ie);case f:e:{for(pt=ce.key;K!==null;){if(K.key===pt)if(K.tag===4&&K.stateNode.containerInfo===ce.containerInfo&&K.stateNode.implementation===ce.implementation){g(ie,K.sibling),K=E(K,ce.children||[]),K.return=ie,ie=K;break e}else{g(ie,K);break}else c(ie,K);K=K.sibling}K=V0(ce,ie.mode,Oe),K.return=ie,ie=K}return U(ie);case w:return pt=ce._init,sr(ie,K,pt(ce._payload),Oe)}if(Z(ce))return Ke(ie,K,ce,Oe);if(P(ce))return Qn(ie,K,ce,Oe);Zh(ie,ce)}return typeof ce=="string"&&ce!==""||typeof ce=="number"?(ce=""+ce,K!==null&&K.tag===6?(g(ie,K.sibling),K=E(K,ce),K.return=ie,ie=K):(g(ie,K),K=B0(ce,ie.mode,Oe),K.return=ie,ie=K),U(ie)):g(ie,K)}return sr}var fl=iw(!0),rw=iw(!1),$u={},tr=xi($u),ec=xi($u),hl=xi($u);function Wr(u){if(u===$u)throw Error(o(174));return u}function r0(u,c){ht(hl,c),ht(ec,u),ht(tr,$u),u=ae(c),It(tr),ht(tr,u)}function dl(){It(tr),It(ec),It(hl)}function sw(u){var c=Wr(hl.current),g=Wr(tr.current);c=D(g,u.type,c),g!==c&&(ht(ec,u),ht(tr,c))}function s0(u){ec.current===u&&(It(tr),It(ec))}var Qt=xi(0);function Jh(u){for(var c=u;c!==null;){if(c.tag===13){var g=c.memoizedState;if(g!==null&&(g=g.dehydrated,g===null||Dh(g)||Yu(g)))return c}else if(c.tag===19&&c.memoizedProps.revealOrder!==void 0){if(c.flags&128)return c}else if(c.child!==null){c.child.return=c,c=c.child;continue}if(c===u)break;for(;c.sibling===null;){if(c.return===null||c.return===u)return null;c=c.return}c.sibling.return=c.return,c=c.sibling}return null}var o0=[];function a0(){for(var u=0;ug?g:4,u(!0);var x=nr.transition;nr.transition={};try{u(!1),c()}finally{Ct=g,nr.transition=x}}function xw(){return Gr().memoizedState}function TI(u,c,g){var x=Ks(u);g={lane:x,action:g,hasEagerState:!1,eagerState:null,next:null},_w(u)?Sw(c,g):(ww(u,c,g),g=ui(),u=ir(u,x,g),u!==null&&Mw(u,c,x))}function CI(u,c,g){var x=Ks(u),E={lane:x,action:g,hasEagerState:!1,eagerState:null,next:null};if(_w(u))Sw(c,E);else{ww(u,c,E);var T=u.alternate;if(u.lanes===0&&(T===null||T.lanes===0)&&(T=c.lastRenderedReducer,T!==null))try{var U=c.lastRenderedState,q=T(U,g);if(E.hasEagerState=!0,E.eagerState=q,Br(q,U))return}catch{}finally{}g=ui(),u=ir(u,x,g),u!==null&&Mw(u,c,x)}}function _w(u){var c=u.alternate;return u===on||c!==null&&c===on}function Sw(u,c){tc=Qh=!0;var g=u.pending;g===null?c.next=c:(c.next=g.next,g.next=c),u.pending=c}function ww(u,c,g){xn!==null&&u.mode&1&&!(xt&2)?(u=c.interleaved,u===null?(g.next=g,Hr===null?Hr=[c]:Hr.push(c)):(g.next=u.next,u.next=g),c.interleaved=g):(u=c.pending,u===null?g.next=g:(g.next=u.next,u.next=g),c.pending=g)}function Mw(u,c,g){if(g&4194240){var x=c.lanes;x&=u.pendingLanes,g|=x,c.lanes=g,Vg(u,g)}}var id={readContext:Qi,useCallback:Jn,useContext:Jn,useEffect:Jn,useImperativeHandle:Jn,useInsertionEffect:Jn,useLayoutEffect:Jn,useMemo:Jn,useReducer:Jn,useRef:Jn,useState:Jn,useDebugValue:Jn,useDeferredValue:Jn,useTransition:Jn,useMutableSource:Jn,useSyncExternalStore:Jn,useId:Jn,unstable_isNewReconciler:!1},PI={readContext:Qi,useCallback:function(u,c){return ds().memoizedState=[u,c===void 0?null:c],u},useContext:Qi,useEffect:h0,useImperativeHandle:function(u,c,g){return g=g!=null?g.concat([u]):null,td(4194308,4,mw.bind(null,c,u),g)},useLayoutEffect:function(u,c){return td(4194308,4,u,c)},useInsertionEffect:function(u,c){return td(4,2,u,c)},useMemo:function(u,c){var g=ds();return c=c===void 0?null:c,u=u(),g.memoizedState=[u,c],u},useReducer:function(u,c,g){var x=ds();return c=g!==void 0?g(c):c,x.memoizedState=x.baseState=c,u={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:u,lastRenderedState:c},x.queue=u,u=u.dispatch=TI.bind(null,on,u),[x.memoizedState,u]},useRef:function(u){var c=ds();return u={current:u},c.memoizedState=u},useState:f0,useDebugValue:d0,useDeferredValue:function(u){var c=f0(u),g=c[0],x=c[1];return h0(function(){var E=nr.transition;nr.transition={};try{x(u)}finally{nr.transition=E}},[u]),g},useTransition:function(){var u=f0(!1),c=u[0];return u=bI.bind(null,u[1]),ds().memoizedState=u,[c,u]},useMutableSource:function(){},useSyncExternalStore:function(u,c,g){var x=on,E=ds();if(Zt){if(g===void 0)throw Error(o(407));g=g()}else{if(g=c(),xn===null)throw Error(o(349));pl&30||lw(x,c,g)}E.memoizedState=g;var T={value:g,getSnapshot:c};return E.queue=T,h0(cw.bind(null,x,T,u),[u]),x.flags|=2048,ic(9,uw.bind(null,x,T,g,c),void 0,null),g},useId:function(){var u=ds(),c=xn.identifierPrefix;if(Zt){var g=hs,x=fs;g=(x&~(1<<32-xr(x)-1)).toString(32)+g,c=":"+c+"R"+g,g=nc++,0D0&&(c.flags|=128,x=!0,ac(E,!1),c.lanes=4194304)}else{if(!x)if(u=Zh(T),u!==null){if(c.flags|=128,x=!0,u=u.updateQueue,u!==null&&(c.updateQueue=u,c.flags|=4),ac(E,!0),E.tail===null&&E.tailMode==="hidden"&&!T.alternate&&!Zt)return Jn(c),null}else 2*In()-E.renderingStartTime>D0&&g!==1073741824&&(c.flags|=128,x=!0,ac(E,!1),c.lanes=4194304);E.isBackwards?(T.sibling=c.child,c.child=T):(u=E.last,u!==null?u.sibling=T:c.child=T,E.last=T)}return E.tail!==null?(c=E.tail,E.rendering=c,E.tail=c.sibling,E.renderingStartTime=In(),c.sibling=null,u=Qt.current,ht(Qt,x?u&1|2:u&1),c):(Jn(c),null);case 22:case 23:return z0(),x=c.memoizedState!==null,u!==null&&u.memoizedState!==null!==x&&(c.flags|=8192),x&&c.mode&1?Oi&1073741824&&(Jn(c),Me&&c.subtreeFlags&6&&(c.flags|=8192)):Jn(c),null;case 24:return null;case 25:return null}throw Error(o(156,c.tag))}var kI=a.ReactCurrentOwner,Ni=!1;function li(u,c,g,x){c.child=u===null?rw(c,null,g,x):fl(c,u.child,g,x)}function Rw(u,c,g,x,E){g=g.render;var T=c.ref;return al(c,E),x=c0(u,c,g,x,T,E),g=f0(),u!==null&&!Ni?(c.updateQueue=u.updateQueue,c.flags&=-2053,u.lanes&=~E,ps(u,c,E)):(Zt&&g&&e0(c),c.flags|=1,li(u,c,x,E),c.child)}function Iw(u,c,g,x,E){if(u===null){var T=g.type;return typeof T=="function"&&!B0(T)&&T.defaultProps===void 0&&g.compare===null&&g.defaultProps===void 0?(c.tag=15,c.type=T,Dw(u,c,T,x,E)):(u=Ed(g.type,null,x,c,c.mode,E),u.ref=c.ref,u.return=c,c.child=u)}if(T=u.child,!(u.lanes&E)){var U=T.memoizedProps;if(g=g.compare,g=g!==null?g:Bh,g(U,x)&&u.ref===c.ref)return ps(u,c,E)}return c.flags|=1,u=$s(T,x),u.ref=c.ref,u.return=c,c.child=u}function Dw(u,c,g,x,E){if(u!==null&&Bh(u.memoizedProps,x)&&u.ref===c.ref)if(Ni=!1,(u.lanes&E)!==0)u.flags&131072&&(Ni=!0);else return c.lanes=u.lanes,ps(u,c,E);return v0(u,c,g,x,E)}function kw(u,c,g){var x=c.pendingProps,E=x.children,T=u!==null?u.memoizedState:null;if(x.mode==="hidden")if(!(c.mode&1))c.memoizedState={baseLanes:0,cachePool:null},ht(ml,Oi),Oi|=g;else if(g&1073741824)c.memoizedState={baseLanes:0,cachePool:null},x=T!==null?T.baseLanes:g,ht(ml,Oi),Oi|=x;else return u=T!==null?T.baseLanes|g:g,c.lanes=c.childLanes=1073741824,c.memoizedState={baseLanes:u,cachePool:null},c.updateQueue=null,ht(ml,Oi),Oi|=u,null;else T!==null?(x=T.baseLanes|g,c.memoizedState=null):x=g,ht(ml,Oi),Oi|=x;return li(u,c,E,g),c.child}function Nw(u,c){var g=c.ref;(u===null&&g!==null||u!==null&&u.ref!==g)&&(c.flags|=512,c.flags|=2097152)}function v0(u,c,g,x,E){var T=Vn(g)?yr:yn.current;return T=Xs(c,T),al(c,E),g=c0(u,c,g,x,T,E),x=f0(),u!==null&&!Ni?(c.updateQueue=u.updateQueue,c.flags&=-2053,u.lanes&=~E,ps(u,c,E)):(Zt&&x&&e0(c),c.flags|=1,li(u,c,g,E),c.child)}function Ow(u,c,g,x,E){if(Vn(g)){var T=!0;kh(c)}else T=!1;if(al(c,E),c.stateNode===null)u!==null&&(u.alternate=null,c.alternate=null,c.flags|=2),JS(c,g,x),$g(c,g,x,E),x=!0;else if(u===null){var U=c.stateNode,q=c.memoizedProps;U.props=q;var he=U.context,Le=g.contextType;typeof Le=="object"&&Le!==null?Le=Qi(Le):(Le=Vn(g)?yr:yn.current,Le=Xs(c,Le));var Ve=g.getDerivedStateFromProps,at=typeof Ve=="function"||typeof U.getSnapshotBeforeUpdate=="function";at||typeof U.UNSAFE_componentWillReceiveProps!="function"&&typeof U.componentWillReceiveProps!="function"||(q!==x||he!==Le)&&KS(c,U,x,Le),Ys=!1;var tt=c.memoizedState;U.state=tt,Gh(c,x,U,E),he=c.memoizedState,q!==x||tt!==he||Ut.current||Ys?(typeof Ve=="function"&&(Qg(c,g,Ve,x),he=c.memoizedState),(q=Ys||ZS(c,g,q,x,tt,he,Le))?(at||typeof U.UNSAFE_componentWillMount!="function"&&typeof U.componentWillMount!="function"||(typeof U.componentWillMount=="function"&&U.componentWillMount(),typeof U.UNSAFE_componentWillMount=="function"&&U.UNSAFE_componentWillMount()),typeof U.componentDidMount=="function"&&(c.flags|=4194308)):(typeof U.componentDidMount=="function"&&(c.flags|=4194308),c.memoizedProps=x,c.memoizedState=he),U.props=x,U.state=he,U.context=Le,x=q):(typeof U.componentDidMount=="function"&&(c.flags|=4194308),x=!1)}else{U=c.stateNode,jS(u,c),q=c.memoizedProps,Le=c.type===c.elementType?q:_r(c.type,q),U.props=Le,at=c.pendingProps,tt=U.context,he=g.contextType,typeof he=="object"&&he!==null?he=Qi(he):(he=Vn(g)?yr:yn.current,he=Xs(c,he));var Ft=g.getDerivedStateFromProps;(Ve=typeof Ft=="function"||typeof U.getSnapshotBeforeUpdate=="function")||typeof U.UNSAFE_componentWillReceiveProps!="function"&&typeof U.componentWillReceiveProps!="function"||(q!==at||tt!==he)&&KS(c,U,x,he),Ys=!1,tt=c.memoizedState,U.state=tt,Gh(c,x,U,E);var Ke=c.memoizedState;q!==at||tt!==Ke||Ut.current||Ys?(typeof Ft=="function"&&(Qg(c,g,Ft,x),Ke=c.memoizedState),(Le=Ys||ZS(c,g,Le,x,tt,Ke,he)||!1)?(Ve||typeof U.UNSAFE_componentWillUpdate!="function"&&typeof U.componentWillUpdate!="function"||(typeof U.componentWillUpdate=="function"&&U.componentWillUpdate(x,Ke,he),typeof U.UNSAFE_componentWillUpdate=="function"&&U.UNSAFE_componentWillUpdate(x,Ke,he)),typeof U.componentDidUpdate=="function"&&(c.flags|=4),typeof U.getSnapshotBeforeUpdate=="function"&&(c.flags|=1024)):(typeof U.componentDidUpdate!="function"||q===u.memoizedProps&&tt===u.memoizedState||(c.flags|=4),typeof U.getSnapshotBeforeUpdate!="function"||q===u.memoizedProps&&tt===u.memoizedState||(c.flags|=1024),c.memoizedProps=x,c.memoizedState=Ke),U.props=x,U.state=Ke,U.context=he,x=Le):(typeof U.componentDidUpdate!="function"||q===u.memoizedProps&&tt===u.memoizedState||(c.flags|=4),typeof U.getSnapshotBeforeUpdate!="function"||q===u.memoizedProps&&tt===u.memoizedState||(c.flags|=1024),x=!1)}return y0(u,c,g,x,T,E)}function y0(u,c,g,x,E,T){Nw(u,c);var U=(c.flags&128)!==0;if(!x&&!U)return E&&BS(c,g,!1),ps(u,c,T);x=c.stateNode,kI.current=c;var q=U&&typeof g.getDerivedStateFromError!="function"?null:x.render();return c.flags|=1,u!==null&&U?(c.child=fl(c,u.child,null,T),c.child=fl(c,null,q,T)):li(u,c,q,T),c.memoizedState=x.state,E&&BS(c,g,!0),c.child}function Uw(u){var c=u.stateNode;c.pendingContext?zS(u,c.pendingContext,c.pendingContext!==c.context):c.context&&zS(u,c.context,!1),s0(u,c.containerInfo)}function zw(u,c,g,x,E){return cl(),r0(E),c.flags|=256,li(u,c,g,x),c.child}var sd={dehydrated:null,treeContext:null,retryLane:0};function od(u){return{baseLanes:u,cachePool:null}}function Fw(u,c,g){var x=c.pendingProps,E=Qt.current,T=!1,U=(c.flags&128)!==0,q;if((q=U)||(q=u!==null&&u.memoizedState===null?!1:(E&2)!==0),q?(T=!0,c.flags&=-129):(u===null||u.memoizedState!==null)&&(E|=1),ht(Qt,E&1),u===null)return i0(c),u=c.memoizedState,u!==null&&(u=u.dehydrated,u!==null)?(c.mode&1?Yu(u)?c.lanes=8:c.lanes=1073741824:c.lanes=1,null):(E=x.children,u=x.fallback,T?(x=c.mode,T=c.child,E={mode:"hidden",children:E},!(x&1)&&T!==null?(T.childLanes=0,T.pendingProps=E):T=bd(E,x,0,null),u=sa(u,x,g,null),T.return=c,u.return=c,T.sibling=u,c.child=T,c.child.memoizedState=od(g),c.memoizedState=sd,u):x0(c,E));if(E=u.memoizedState,E!==null){if(q=E.dehydrated,q!==null){if(U)return c.flags&256?(c.flags&=-257,ad(u,c,g,Error(o(422)))):c.memoizedState!==null?(c.child=u.child,c.flags|=128,null):(T=x.fallback,E=c.mode,x=bd({mode:"visible",children:x.children},E,0,null),T=sa(T,E,g,null),T.flags|=2,x.return=c,T.return=c,x.sibling=T,c.child=x,c.mode&1&&fl(c,u.child,null,g),c.child.memoizedState=od(g),c.memoizedState=sd,T);if(!(c.mode&1))c=ad(u,c,g,null);else if(Yu(q))c=ad(u,c,g,Error(o(419)));else if(x=(g&u.childLanes)!==0,Ni||x){if(x=xn,x!==null){switch(g&-g){case 4:T=2;break;case 16:T=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:T=32;break;case 536870912:T=268435456;break;default:T=0}x=T&(x.suspendedLanes|g)?0:T,x!==0&&x!==E.retryLane&&(E.retryLane=x,ir(u,x,-1))}F0(),c=ad(u,c,g,Error(o(421)))}else Ih(q)?(c.flags|=128,c.child=u.child,c=YI.bind(null,u),Fg(q,c),c=null):(g=E.treeContext,oe&&(ki=ne(q),Di=c,Zt=!0,Sr=null,Ju=!1,g!==null&&($i[er++]=fs,$i[er++]=hs,$i[er++]=Ko,fs=g.id,hs=g.overflow,Ko=c)),c=x0(c,c.pendingProps.children),c.flags|=4096);return c}return T?(x=Vw(u,c,x.children,x.fallback,g),T=c.child,E=u.child.memoizedState,T.memoizedState=E===null?od(g):{baseLanes:E.baseLanes|g,cachePool:null},T.childLanes=u.childLanes&~g,c.memoizedState=sd,x):(g=Bw(u,c,x.children,g),c.memoizedState=null,g)}return T?(x=Vw(u,c,x.children,x.fallback,g),T=c.child,E=u.child.memoizedState,T.memoizedState=E===null?od(g):{baseLanes:E.baseLanes|g,cachePool:null},T.childLanes=u.childLanes&~g,c.memoizedState=sd,x):(g=Bw(u,c,x.children,g),c.memoizedState=null,g)}function x0(u,c){return c=bd({mode:"visible",children:c},u.mode,0,null),c.return=u,u.child=c}function Bw(u,c,g,x){var E=u.child;return u=E.sibling,g=$s(E,{mode:"visible",children:g}),!(c.mode&1)&&(g.lanes=x),g.return=c,g.sibling=null,u!==null&&(x=c.deletions,x===null?(c.deletions=[u],c.flags|=16):x.push(u)),c.child=g}function Vw(u,c,g,x,E){var T=c.mode;u=u.child;var U=u.sibling,q={mode:"hidden",children:g};return!(T&1)&&c.child!==u?(g=c.child,g.childLanes=0,g.pendingProps=q,c.deletions=null):(g=$s(u,q),g.subtreeFlags=u.subtreeFlags&14680064),U!==null?x=$s(U,x):(x=sa(x,T,E,null),x.flags|=2),x.return=c,g.return=c,g.sibling=x,c.child=g,x}function ad(u,c,g,x){return x!==null&&r0(x),fl(c,u.child,null,g),u=x0(c,c.pendingProps.children),u.flags|=2,c.memoizedState=null,u}function Hw(u,c,g){u.lanes|=c;var x=u.alternate;x!==null&&(x.lanes|=c),Jg(u.return,c,g)}function _0(u,c,g,x,E){var T=u.memoizedState;T===null?u.memoizedState={isBackwards:c,rendering:null,renderingStartTime:0,last:x,tail:g,tailMode:E}:(T.isBackwards=c,T.rendering=null,T.renderingStartTime=0,T.last=x,T.tail=g,T.tailMode=E)}function Ww(u,c,g){var x=c.pendingProps,E=x.revealOrder,T=x.tail;if(li(u,c,x.children,g),x=Qt.current,x&2)x=x&1|2,c.flags|=128;else{if(u!==null&&u.flags&128)e:for(u=c.child;u!==null;){if(u.tag===13)u.memoizedState!==null&&Hw(u,g,c);else if(u.tag===19)Hw(u,g,c);else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===c)break e;for(;u.sibling===null;){if(u.return===null||u.return===c)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}x&=1}if(ht(Qt,x),!(c.mode&1))c.memoizedState=null;else switch(E){case"forwards":for(g=c.child,E=null;g!==null;)u=g.alternate,u!==null&&Zh(u)===null&&(E=g),g=g.sibling;g=E,g===null?(E=c.child,c.child=null):(E=g.sibling,g.sibling=null),_0(c,!1,E,g,T);break;case"backwards":for(g=null,E=c.child,c.child=null;E!==null;){if(u=E.alternate,u!==null&&Zh(u)===null){c.child=E;break}u=E.sibling,E.sibling=g,g=E,E=u}_0(c,!0,g,null,T);break;case"together":_0(c,!1,null,null,void 0);break;default:c.memoizedState=null}return c.child}function ps(u,c,g){if(u!==null&&(c.dependencies=u.dependencies),gl|=c.lanes,!(g&c.childLanes))return null;if(u!==null&&c.child!==u.child)throw Error(o(153));if(c.child!==null){for(u=c.child,g=$s(u,u.pendingProps),c.child=g,g.return=c;u.sibling!==null;)u=u.sibling,g=g.sibling=$s(u,u.pendingProps),g.return=c;g.sibling=null}return c.child}function NI(u,c,g){switch(c.tag){case 3:Uw(c),cl();break;case 5:sw(c);break;case 1:Vn(c.type)&&kh(c);break;case 4:s0(c,c.stateNode.containerInfo);break;case 10:GS(c,c.type._context,c.memoizedProps.value);break;case 13:var x=c.memoizedState;if(x!==null)return x.dehydrated!==null?(ht(Qt,Qt.current&1),c.flags|=128,null):g&c.child.childLanes?Fw(u,c,g):(ht(Qt,Qt.current&1),u=ps(u,c,g),u!==null?u.sibling:null);ht(Qt,Qt.current&1);break;case 19:if(x=(g&c.childLanes)!==0,u.flags&128){if(x)return Ww(u,c,g);c.flags|=128}var E=c.memoizedState;if(E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),ht(Qt,Qt.current),x)break;return null;case 22:case 23:return c.lanes=0,kw(u,c,g)}return ps(u,c,g)}function OI(u,c){switch(t0(c),c.tag){case 1:return Vn(c.type)&&Dh(),u=c.flags,u&65536?(c.flags=u&-65537|128,c):null;case 3:return dl(),It(Ut),It(yn),l0(),u=c.flags,u&65536&&!(u&128)?(c.flags=u&-65537|128,c):null;case 5:return o0(c),null;case 13:if(It(Qt),u=c.memoizedState,u!==null&&u.dehydrated!==null){if(c.alternate===null)throw Error(o(340));cl()}return u=c.flags,u&65536?(c.flags=u&-65537|128,c):null;case 19:return It(Qt),null;case 4:return dl(),null;case 10:return Zg(c.type._context),null;case 22:case 23:return z0(),null;case 24:return null;default:return null}}var ld=!1,ea=!1,UI=typeof WeakSet=="function"?WeakSet:Set,ke=null;function ud(u,c){var g=u.ref;if(g!==null)if(typeof g=="function")try{g(null)}catch(x){wi(u,c,x)}else g.current=null}function S0(u,c,g){try{g()}catch(x){wi(u,c,x)}}var Gw=!1;function zI(u,c){for(H(u.containerInfo),ke=c;ke!==null;)if(u=ke,c=u.child,(u.subtreeFlags&1028)!==0&&c!==null)c.return=u,ke=c;else for(;ke!==null;){u=ke;try{var g=u.alternate;if(u.flags&1024)switch(u.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var x=g.memoizedProps,E=g.memoizedState,T=u.stateNode,U=T.getSnapshotBeforeUpdate(u.elementType===u.type?x:_r(u.type,x),E);T.__reactInternalSnapshotBeforeUpdate=U}break;case 3:Me&&Ue(u.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch(q){wi(u,u.return,q)}if(c=u.sibling,c!==null){c.return=u.return,ke=c;break}ke=u.return}return g=Gw,Gw=!1,g}function ta(u,c,g){var x=c.updateQueue;if(x=x!==null?x.lastEffect:null,x!==null){var E=x=x.next;do{if((E.tag&u)===u){var T=E.destroy;E.destroy=void 0,T!==void 0&&S0(c,g,T)}E=E.next}while(E!==x)}}function lc(u,c){if(c=c.updateQueue,c=c!==null?c.lastEffect:null,c!==null){var g=c=c.next;do{if((g.tag&u)===u){var x=g.create;g.destroy=x()}g=g.next}while(g!==c)}}function w0(u){var c=u.ref;if(c!==null){var g=u.stateNode;switch(u.tag){case 5:u=se(g);break;default:u=g}typeof c=="function"?c(u):c.current=u}}function jw(u,c,g){if(Fr&&typeof Fr.onCommitFiberUnmount=="function")try{Fr.onCommitFiberUnmount(zh,c)}catch{}switch(c.tag){case 0:case 11:case 14:case 15:if(u=c.updateQueue,u!==null&&(u=u.lastEffect,u!==null)){var x=u=u.next;do{var E=x,T=E.destroy;E=E.tag,T!==void 0&&(E&2||E&4)&&S0(c,g,T),x=x.next}while(x!==u)}break;case 1:if(ud(c,g),u=c.stateNode,typeof u.componentWillUnmount=="function")try{u.props=c.memoizedProps,u.state=c.memoizedState,u.componentWillUnmount()}catch(U){wi(c,g,U)}break;case 5:ud(c,g);break;case 4:Me?Kw(u,c,g):ge&&ge&&(c=c.stateNode.containerInfo,g=Ot(c),mr(c,g))}}function Xw(u,c,g){for(var x=c;;)if(jw(u,x,g),x.child===null||Me&&x.tag===4){if(x===c)break;for(;x.sibling===null;){if(x.return===null||x.return===c)return;x=x.return}x.sibling.return=x.return,x=x.sibling}else x.child.return=x,x=x.child}function Yw(u){var c=u.alternate;c!==null&&(u.alternate=null,Yw(c)),u.child=null,u.deletions=null,u.sibling=null,u.tag===5&&(c=u.stateNode,c!==null&&Ge(c)),u.stateNode=null,u.return=null,u.dependencies=null,u.memoizedProps=null,u.memoizedState=null,u.pendingProps=null,u.stateNode=null,u.updateQueue=null}function qw(u){return u.tag===5||u.tag===3||u.tag===4}function Zw(u){e:for(;;){for(;u.sibling===null;){if(u.return===null||qw(u.return))return null;u=u.return}for(u.sibling.return=u.return,u=u.sibling;u.tag!==5&&u.tag!==6&&u.tag!==18;){if(u.flags&2||u.child===null||u.tag===4)continue e;u.child.return=u,u=u.child}if(!(u.flags&2))return u.stateNode}}function Jw(u){if(Me){e:{for(var c=u.return;c!==null;){if(qw(c))break e;c=c.return}throw Error(o(160))}var g=c;switch(g.tag){case 5:c=g.stateNode,g.flags&32&&(ct(c),g.flags&=-33),g=Zw(u),A0(u,g,c);break;case 3:case 4:c=g.stateNode.containerInfo,g=Zw(u),M0(u,g,c);break;default:throw Error(o(161))}}}function M0(u,c,g){var x=u.tag;if(x===5||x===6)u=u.stateNode,c?Se(g,u,c):ze(g,u);else if(x!==4&&(u=u.child,u!==null))for(M0(u,c,g),u=u.sibling;u!==null;)M0(u,c,g),u=u.sibling}function A0(u,c,g){var x=u.tag;if(x===5||x===6)u=u.stateNode,c?de(g,u,c):et(g,u);else if(x!==4&&(u=u.child,u!==null))for(A0(u,c,g),u=u.sibling;u!==null;)A0(u,c,g),u=u.sibling}function Kw(u,c,g){for(var x=c,E=!1,T,U;;){if(!E){E=x.return;e:for(;;){if(E===null)throw Error(o(160));switch(T=E.stateNode,E.tag){case 5:U=!1;break e;case 3:T=T.containerInfo,U=!0;break e;case 4:T=T.containerInfo,U=!0;break e}E=E.return}E=!0}if(x.tag===5||x.tag===6)Xw(u,x,g),U?Qe(T,x.stateNode):Pe(T,x.stateNode);else if(x.tag===18)U?St(T,x.stateNode):yt(T,x.stateNode);else if(x.tag===4){if(x.child!==null){T=x.stateNode.containerInfo,U=!0,x.child.return=x,x=x.child;continue}}else if(jw(u,x,g),x.child!==null){x.child.return=x,x=x.child;continue}if(x===c)break;for(;x.sibling===null;){if(x.return===null||x.return===c)return;x=x.return,x.tag===4&&(E=!1)}x.sibling.return=x.return,x=x.sibling}}function E0(u,c){if(Me){switch(c.tag){case 0:case 11:case 14:case 15:ta(3,c,c.return),lc(3,c),ta(5,c,c.return);return;case 1:return;case 5:var g=c.stateNode;if(g!=null){var x=c.memoizedProps;u=u!==null?u.memoizedProps:x;var E=c.type,T=c.updateQueue;c.updateQueue=null,T!==null&&G(g,T,E,u,x,c)}return;case 6:if(c.stateNode===null)throw Error(o(162));g=c.memoizedProps,pe(c.stateNode,u!==null?u.memoizedProps:g,g);return;case 3:oe&&u!==null&&u.memoizedState.isDehydrated&&ft(c.stateNode.containerInfo);return;case 12:return;case 13:cd(c);return;case 19:cd(c);return;case 17:return}throw Error(o(163))}switch(c.tag){case 0:case 11:case 14:case 15:ta(3,c,c.return),lc(3,c),ta(5,c,c.return);return;case 12:return;case 13:cd(c);return;case 19:cd(c);return;case 3:oe&&u!==null&&u.memoizedState.isDehydrated&&ft(c.stateNode.containerInfo);break;case 22:case 23:return}e:if(ge){switch(c.tag){case 1:case 5:case 6:break e;case 3:case 4:c=c.stateNode,mr(c.containerInfo,c.pendingChildren);break e}throw Error(o(163))}}function cd(u){var c=u.updateQueue;if(c!==null){u.updateQueue=null;var g=u.stateNode;g===null&&(g=u.stateNode=new UI),c.forEach(function(x){var E=qI.bind(null,u,x);g.has(x)||(g.add(x),x.then(E,E))})}}function FI(u,c){for(ke=c;ke!==null;){c=ke;var g=c.deletions;if(g!==null)for(var x=0;x";case hd:return":has("+(C0(u)||"")+")";case dd:return'[role="'+u.value+'"]';case md:return'"'+u.value+'"';case pd:return'[data-testname="'+u.value+'"]';default:throw Error(o(365))}}function nM(u,c){var g=[];u=[u,0];for(var x=0;xE&&(E=U),x&=~T}if(x=E,x=In()-x,x=(120>x?120:480>x?480:1080>x?1080:1920>x?1920:3e3>x?3e3:4320>x?4320:1960*VI(x/1960))-x,10u?16:u,Js===null)var x=!1;else{if(u=Js,Js=null,_d=0,xt&6)throw Error(o(331));var E=xt;for(xt|=4,ke=u.current;ke!==null;){var T=ke,U=T.child;if(ke.flags&16){var q=T.deletions;if(q!==null){for(var he=0;heIn()-I0?na(u,0):R0|=g),Si(u,c)}function fM(u,c){c===0&&(u.mode&1?(c=Oh,Oh<<=1,!(Oh&130023424)&&(Oh=4194304)):c=1);var g=ui();u=Md(u,c),u!==null&&(Zu(u,c,g),Si(u,g))}function YI(u){var c=u.memoizedState,g=0;c!==null&&(g=c.retryLane),fM(u,g)}function qI(u,c){var g=0;switch(u.tag){case 13:var x=u.stateNode,E=u.memoizedState;E!==null&&(g=E.retryLane);break;case 19:x=u.stateNode;break;default:throw Error(o(314))}x!==null&&x.delete(c),fM(u,g)}var hM;hM=function(u,c,g){if(u!==null)if(u.memoizedProps!==c.pendingProps||Ut.current)Ni=!0;else{if(!(u.lanes&g)&&!(c.flags&128))return Ni=!1,NI(u,c,g);Ni=!!(u.flags&131072)}else Ni=!1,Zt&&c.flags&1048576&&QS(c,Yh,c.index);switch(c.lanes=0,c.tag){case 2:var x=c.type;u!==null&&(u.alternate=null,c.alternate=null,c.flags|=2),u=c.pendingProps;var E=Xs(c,yn.current);al(c,g),E=c0(null,c,x,u,E,g);var T=f0();return c.flags|=1,typeof E=="object"&&E!==null&&typeof E.render=="function"&&E.$$typeof===void 0?(c.tag=1,c.memoizedState=null,c.updateQueue=null,Vn(x)?(T=!0,kh(c)):T=!1,c.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,Kg(c),E.updater=jh,c.stateNode=E,E._reactInternals=c,$g(c,x,u,g),c=y0(null,c,x,!0,T,g)):(c.tag=0,Zt&&T&&e0(c),li(null,c,E,g),c=c.child),c;case 16:x=c.elementType;e:{switch(u!==null&&(u.alternate=null,c.alternate=null,c.flags|=2),u=c.pendingProps,E=x._init,x=E(x._payload),c.type=x,E=c.tag=JI(x),u=_r(x,u),E){case 0:c=v0(null,c,x,u,g);break e;case 1:c=Ow(null,c,x,u,g);break e;case 11:c=Rw(null,c,x,u,g);break e;case 14:c=Iw(null,c,x,_r(x.type,u),g);break e}throw Error(o(306,x,""))}return c;case 0:return x=c.type,E=c.pendingProps,E=c.elementType===x?E:_r(x,E),v0(u,c,x,E,g);case 1:return x=c.type,E=c.pendingProps,E=c.elementType===x?E:_r(x,E),Ow(u,c,x,E,g);case 3:e:{if(Uw(c),u===null)throw Error(o(387));x=c.pendingProps,T=c.memoizedState,E=T.element,jS(u,c),Gh(c,x,null,g);var U=c.memoizedState;if(x=U.element,oe&&T.isDehydrated)if(T={element:x,isDehydrated:!1,cache:U.cache,transitions:U.transitions},c.updateQueue.baseState=T,c.memoizedState=T,c.flags&256){E=Error(o(423)),c=zw(u,c,x,g,E);break e}else if(x!==E){E=Error(o(424)),c=zw(u,c,x,g,E);break e}else for(oe&&(ki=me(c.stateNode.containerInfo),Di=c,Zt=!0,Sr=null,Ju=!1),g=rw(c,null,x,g),c.child=g;g;)g.flags=g.flags&-3|4096,g=g.sibling;else{if(cl(),x===E){c=ps(u,c,g);break e}li(u,c,x,g)}c=c.child}return c;case 5:return sw(c),u===null&&i0(c),x=c.type,E=c.pendingProps,T=u!==null?u.memoizedProps:null,U=E.children,Ee(x,E)?U=null:T!==null&&Ee(x,T)&&(c.flags|=32),Nw(u,c),li(u,c,U,g),c.child;case 6:return u===null&&i0(c),null;case 13:return Fw(u,c,g);case 4:return s0(c,c.stateNode.containerInfo),x=c.pendingProps,u===null?c.child=fl(c,null,x,g):li(u,c,x,g),c.child;case 11:return x=c.type,E=c.pendingProps,E=c.elementType===x?E:_r(x,E),Rw(u,c,x,E,g);case 7:return li(u,c,c.pendingProps,g),c.child;case 8:return li(u,c,c.pendingProps.children,g),c.child;case 12:return li(u,c,c.pendingProps.children,g),c.child;case 10:e:{if(x=c.type._context,E=c.pendingProps,T=c.memoizedProps,U=E.value,GS(c,x,U),T!==null)if(Br(T.value,U)){if(T.children===E.children&&!Ut.current){c=ps(u,c,g);break e}}else for(T=c.child,T!==null&&(T.return=c);T!==null;){var q=T.dependencies;if(q!==null){U=T.child;for(var he=q.firstContext;he!==null;){if(he.context===x){if(T.tag===1){he=cs(-1,g&-g),he.tag=2;var Le=T.updateQueue;if(Le!==null){Le=Le.shared;var Ve=Le.pending;Ve===null?he.next=he:(he.next=Ve.next,Ve.next=he),Le.pending=he}}T.lanes|=g,he=T.alternate,he!==null&&(he.lanes|=g),Jg(T.return,g,c),q.lanes|=g;break}he=he.next}}else if(T.tag===10)U=T.type===c.type?null:T.child;else if(T.tag===18){if(U=T.return,U===null)throw Error(o(341));U.lanes|=g,q=U.alternate,q!==null&&(q.lanes|=g),Jg(U,g,c),U=T.sibling}else U=T.child;if(U!==null)U.return=T;else for(U=T;U!==null;){if(U===c){U=null;break}if(T=U.sibling,T!==null){T.return=U.return,U=T;break}U=U.return}T=U}li(u,c,E.children,g),c=c.child}return c;case 9:return E=c.type,x=c.pendingProps.children,al(c,g),E=Qi(E),x=x(E),c.flags|=1,li(u,c,x,g),c.child;case 14:return x=c.type,E=_r(x,c.pendingProps),E=_r(x.type,E),Iw(u,c,x,E,g);case 15:return Dw(u,c,c.type,c.pendingProps,g);case 17:return x=c.type,E=c.pendingProps,E=c.elementType===x?E:_r(x,E),u!==null&&(u.alternate=null,c.alternate=null,c.flags|=2),c.tag=1,Vn(x)?(u=!0,kh(c)):u=!1,al(c,g),JS(c,x,E),$g(c,x,E,g),y0(null,c,x,!0,u,g);case 19:return Ww(u,c,g);case 22:return kw(u,c,g)}throw Error(o(156,c.tag))};function dM(u,c){return Wg(u,c)}function ZI(u,c,g,x){this.tag=u,this.key=g,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=x,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function rr(u,c,g,x){return new ZI(u,c,g,x)}function B0(u){return u=u.prototype,!(!u||!u.isReactComponent)}function JI(u){if(typeof u=="function")return B0(u)?1:0;if(u!=null){if(u=u.$$typeof,u===_)return 11;if(u===S)return 14}return 2}function $s(u,c){var g=u.alternate;return g===null?(g=rr(u.tag,c,u.key,u.mode),g.elementType=u.elementType,g.type=u.type,g.stateNode=u.stateNode,g.alternate=u,u.alternate=g):(g.pendingProps=c,g.type=u.type,g.flags=0,g.subtreeFlags=0,g.deletions=null),g.flags=u.flags&14680064,g.childLanes=u.childLanes,g.lanes=u.lanes,g.child=u.child,g.memoizedProps=u.memoizedProps,g.memoizedState=u.memoizedState,g.updateQueue=u.updateQueue,c=u.dependencies,g.dependencies=c===null?null:{lanes:c.lanes,firstContext:c.firstContext},g.sibling=u.sibling,g.index=u.index,g.ref=u.ref,g}function Ed(u,c,g,x,E,T){var U=2;if(x=u,typeof u=="function")B0(u)&&(U=1);else if(typeof u=="string")U=5;else e:switch(u){case h:return sa(g.children,E,T,c);case d:U=8,E|=8;break;case p:return u=rr(12,g,c,E|2),u.elementType=p,u.lanes=T,u;case M:return u=rr(13,g,c,E),u.elementType=M,u.lanes=T,u;case m:return u=rr(19,g,c,E),u.elementType=m,u.lanes=T,u;case A:return bd(g,E,T,c);default:if(typeof u=="object"&&u!==null)switch(u.$$typeof){case v:U=10;break e;case y:U=9;break e;case _:U=11;break e;case S:U=14;break e;case w:U=16,x=null;break e}throw Error(o(130,u==null?u:typeof u,""))}return c=rr(U,g,c,E),c.elementType=u,c.type=x,c.lanes=T,c}function sa(u,c,g,x){return u=rr(7,u,x,c),u.lanes=g,u}function bd(u,c,g,x){return u=rr(22,u,x,c),u.elementType=A,u.lanes=g,u.stateNode={},u}function V0(u,c,g){return u=rr(6,u,null,c),u.lanes=g,u}function H0(u,c,g){return c=rr(4,u.children!==null?u.children:[],u.key,c),c.lanes=g,c.stateNode={containerInfo:u.containerInfo,pendingChildren:null,implementation:u.implementation},c}function KI(u,c,g,x,E){this.tag=c,this.containerInfo=u,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=Ye,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Vg(0),this.expirationTimes=Vg(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Vg(0),this.identifierPrefix=x,this.onRecoverableError=E,oe&&(this.mutableSourceEagerHydrationData=null)}function pM(u,c,g,x,E,T,U,q,he){return u=new KI(u,c,g,q,he),c===1?(c=1,T===!0&&(c|=8)):c=0,T=rr(3,null,null,c),u.current=T,T.stateNode=u,T.memoizedState={element:x,isDehydrated:g,cache:null,transitions:null},Kg(T),u}function mM(u){if(!u)return Yn;u=u._reactInternals;e:{if(C(u)!==u||u.tag!==1)throw Error(o(170));var c=u;do{switch(c.tag){case 3:c=c.stateNode.context;break e;case 1:if(Vn(c.type)){c=c.stateNode.__reactInternalMemoizedMergedChildContext;break e}}c=c.return}while(c!==null);throw Error(o(171))}if(u.tag===1){var g=u.type;if(Vn(g))return FS(u,g,c)}return c}function gM(u){var c=u._reactInternals;if(c===void 0)throw typeof u.render=="function"?Error(o(188)):(u=Object.keys(u).join(","),Error(o(268,u)));return u=J(c),u===null?null:u.stateNode}function vM(u,c){if(u=u.memoizedState,u!==null&&u.dehydrated!==null){var g=u.retryLane;u.retryLane=g!==0&&g=Le&&T>=at&&E<=Ve&&U<=tt){u.splice(c,1);break}else if(x!==Le||g.width!==he.width||ttU){if(!(T!==at||g.height!==he.height||VeE)){Le>x&&(he.width+=Le-x,he.x=x),VeT&&(he.height+=at-T,he.y=T),ttg&&(g=U)),UI0&&(c.flags|=128,x=!0,ac(E,!1),c.lanes=4194304)}else{if(!x)if(u=Jh(T),u!==null){if(c.flags|=128,x=!0,u=u.updateQueue,u!==null&&(c.updateQueue=u,c.flags|=4),ac(E,!0),E.tail===null&&E.tailMode==="hidden"&&!T.alternate&&!Zt)return Kn(c),null}else 2*In()-E.renderingStartTime>I0&&g!==1073741824&&(c.flags|=128,x=!0,ac(E,!1),c.lanes=4194304);E.isBackwards?(T.sibling=c.child,c.child=T):(u=E.last,u!==null?u.sibling=T:c.child=T,E.last=T)}return E.tail!==null?(c=E.tail,E.rendering=c,E.tail=c.sibling,E.renderingStartTime=In(),c.sibling=null,u=Qt.current,ht(Qt,x?u&1|2:u&1),c):(Kn(c),null);case 22:case 23:return U0(),x=c.memoizedState!==null,u!==null&&u.memoizedState!==null!==x&&(c.flags|=8192),x&&c.mode&1?Oi&1073741824&&(Kn(c),Me&&c.subtreeFlags&6&&(c.flags|=8192)):Kn(c),null;case 24:return null;case 25:return null}throw Error(o(156,c.tag))}var kI=a.ReactCurrentOwner,Ni=!1;function li(u,c,g,x){c.child=u===null?rw(c,null,g,x):fl(c,u.child,g,x)}function Rw(u,c,g,x,E){g=g.render;var T=c.ref;return al(c,E),x=u0(u,c,g,x,T,E),g=c0(),u!==null&&!Ni?(c.updateQueue=u.updateQueue,c.flags&=-2053,u.lanes&=~E,ps(u,c,E)):(Zt&&g&&$g(c),c.flags|=1,li(u,c,x,E),c.child)}function Iw(u,c,g,x,E){if(u===null){var T=g.type;return typeof T=="function"&&!F0(T)&&T.defaultProps===void 0&&g.compare===null&&g.defaultProps===void 0?(c.tag=15,c.type=T,Dw(u,c,T,x,E)):(u=bd(g.type,null,x,c,c.mode,E),u.ref=c.ref,u.return=c,c.child=u)}if(T=u.child,!(u.lanes&E)){var U=T.memoizedProps;if(g=g.compare,g=g!==null?g:Vh,g(U,x)&&u.ref===c.ref)return ps(u,c,E)}return c.flags|=1,u=$s(T,x),u.ref=c.ref,u.return=c,c.child=u}function Dw(u,c,g,x,E){if(u!==null&&Vh(u.memoizedProps,x)&&u.ref===c.ref)if(Ni=!1,(u.lanes&E)!==0)u.flags&131072&&(Ni=!0);else return c.lanes=u.lanes,ps(u,c,E);return g0(u,c,g,x,E)}function kw(u,c,g){var x=c.pendingProps,E=x.children,T=u!==null?u.memoizedState:null;if(x.mode==="hidden")if(!(c.mode&1))c.memoizedState={baseLanes:0,cachePool:null},ht(ml,Oi),Oi|=g;else if(g&1073741824)c.memoizedState={baseLanes:0,cachePool:null},x=T!==null?T.baseLanes:g,ht(ml,Oi),Oi|=x;else return u=T!==null?T.baseLanes|g:g,c.lanes=c.childLanes=1073741824,c.memoizedState={baseLanes:u,cachePool:null},c.updateQueue=null,ht(ml,Oi),Oi|=u,null;else T!==null?(x=T.baseLanes|g,c.memoizedState=null):x=g,ht(ml,Oi),Oi|=x;return li(u,c,E,g),c.child}function Nw(u,c){var g=c.ref;(u===null&&g!==null||u!==null&&u.ref!==g)&&(c.flags|=512,c.flags|=2097152)}function g0(u,c,g,x,E){var T=Vn(g)?yr:yn.current;return T=Xs(c,T),al(c,E),g=u0(u,c,g,x,T,E),x=c0(),u!==null&&!Ni?(c.updateQueue=u.updateQueue,c.flags&=-2053,u.lanes&=~E,ps(u,c,E)):(Zt&&x&&$g(c),c.flags|=1,li(u,c,g,E),c.child)}function Ow(u,c,g,x,E){if(Vn(g)){var T=!0;Nh(c)}else T=!1;if(al(c,E),c.stateNode===null)u!==null&&(u.alternate=null,c.alternate=null,c.flags|=2),JS(c,g,x),Qg(c,g,x,E),x=!0;else if(u===null){var U=c.stateNode,q=c.memoizedProps;U.props=q;var he=U.context,Le=g.contextType;typeof Le=="object"&&Le!==null?Le=Qi(Le):(Le=Vn(g)?yr:yn.current,Le=Xs(c,Le));var Ve=g.getDerivedStateFromProps,at=typeof Ve=="function"||typeof U.getSnapshotBeforeUpdate=="function";at||typeof U.UNSAFE_componentWillReceiveProps!="function"&&typeof U.componentWillReceiveProps!="function"||(q!==x||he!==Le)&&KS(c,U,x,Le),Ys=!1;var tt=c.memoizedState;U.state=tt,jh(c,x,U,E),he=c.memoizedState,q!==x||tt!==he||Ut.current||Ys?(typeof Ve=="function"&&(Kg(c,g,Ve,x),he=c.memoizedState),(q=Ys||ZS(c,g,q,x,tt,he,Le))?(at||typeof U.UNSAFE_componentWillMount!="function"&&typeof U.componentWillMount!="function"||(typeof U.componentWillMount=="function"&&U.componentWillMount(),typeof U.UNSAFE_componentWillMount=="function"&&U.UNSAFE_componentWillMount()),typeof U.componentDidMount=="function"&&(c.flags|=4194308)):(typeof U.componentDidMount=="function"&&(c.flags|=4194308),c.memoizedProps=x,c.memoizedState=he),U.props=x,U.state=he,U.context=Le,x=q):(typeof U.componentDidMount=="function"&&(c.flags|=4194308),x=!1)}else{U=c.stateNode,jS(u,c),q=c.memoizedProps,Le=c.type===c.elementType?q:_r(c.type,q),U.props=Le,at=c.pendingProps,tt=U.context,he=g.contextType,typeof he=="object"&&he!==null?he=Qi(he):(he=Vn(g)?yr:yn.current,he=Xs(c,he));var Ft=g.getDerivedStateFromProps;(Ve=typeof Ft=="function"||typeof U.getSnapshotBeforeUpdate=="function")||typeof U.UNSAFE_componentWillReceiveProps!="function"&&typeof U.componentWillReceiveProps!="function"||(q!==at||tt!==he)&&KS(c,U,x,he),Ys=!1,tt=c.memoizedState,U.state=tt,jh(c,x,U,E);var Ke=c.memoizedState;q!==at||tt!==Ke||Ut.current||Ys?(typeof Ft=="function"&&(Kg(c,g,Ft,x),Ke=c.memoizedState),(Le=Ys||ZS(c,g,Le,x,tt,Ke,he)||!1)?(Ve||typeof U.UNSAFE_componentWillUpdate!="function"&&typeof U.componentWillUpdate!="function"||(typeof U.componentWillUpdate=="function"&&U.componentWillUpdate(x,Ke,he),typeof U.UNSAFE_componentWillUpdate=="function"&&U.UNSAFE_componentWillUpdate(x,Ke,he)),typeof U.componentDidUpdate=="function"&&(c.flags|=4),typeof U.getSnapshotBeforeUpdate=="function"&&(c.flags|=1024)):(typeof U.componentDidUpdate!="function"||q===u.memoizedProps&&tt===u.memoizedState||(c.flags|=4),typeof U.getSnapshotBeforeUpdate!="function"||q===u.memoizedProps&&tt===u.memoizedState||(c.flags|=1024),c.memoizedProps=x,c.memoizedState=Ke),U.props=x,U.state=Ke,U.context=he,x=Le):(typeof U.componentDidUpdate!="function"||q===u.memoizedProps&&tt===u.memoizedState||(c.flags|=4),typeof U.getSnapshotBeforeUpdate!="function"||q===u.memoizedProps&&tt===u.memoizedState||(c.flags|=1024),x=!1)}return v0(u,c,g,x,T,E)}function v0(u,c,g,x,E,T){Nw(u,c);var U=(c.flags&128)!==0;if(!x&&!U)return E&&BS(c,g,!1),ps(u,c,T);x=c.stateNode,kI.current=c;var q=U&&typeof g.getDerivedStateFromError!="function"?null:x.render();return c.flags|=1,u!==null&&U?(c.child=fl(c,u.child,null,T),c.child=fl(c,null,q,T)):li(u,c,q,T),c.memoizedState=x.state,E&&BS(c,g,!0),c.child}function Uw(u){var c=u.stateNode;c.pendingContext?zS(u,c.pendingContext,c.pendingContext!==c.context):c.context&&zS(u,c.context,!1),r0(u,c.containerInfo)}function zw(u,c,g,x,E){return cl(),i0(E),c.flags|=256,li(u,c,g,x),c.child}var od={dehydrated:null,treeContext:null,retryLane:0};function ad(u){return{baseLanes:u,cachePool:null}}function Fw(u,c,g){var x=c.pendingProps,E=Qt.current,T=!1,U=(c.flags&128)!==0,q;if((q=U)||(q=u!==null&&u.memoizedState===null?!1:(E&2)!==0),q?(T=!0,c.flags&=-129):(u===null||u.memoizedState!==null)&&(E|=1),ht(Qt,E&1),u===null)return n0(c),u=c.memoizedState,u!==null&&(u=u.dehydrated,u!==null)?(c.mode&1?Yu(u)?c.lanes=8:c.lanes=1073741824:c.lanes=1,null):(E=x.children,u=x.fallback,T?(x=c.mode,T=c.child,E={mode:"hidden",children:E},!(x&1)&&T!==null?(T.childLanes=0,T.pendingProps=E):T=Td(E,x,0,null),u=sa(u,x,g,null),T.return=c,u.return=c,T.sibling=u,c.child=T,c.child.memoizedState=ad(g),c.memoizedState=od,u):y0(c,E));if(E=u.memoizedState,E!==null){if(q=E.dehydrated,q!==null){if(U)return c.flags&256?(c.flags&=-257,ld(u,c,g,Error(o(422)))):c.memoizedState!==null?(c.child=u.child,c.flags|=128,null):(T=x.fallback,E=c.mode,x=Td({mode:"visible",children:x.children},E,0,null),T=sa(T,E,g,null),T.flags|=2,x.return=c,T.return=c,x.sibling=T,c.child=x,c.mode&1&&fl(c,u.child,null,g),c.child.memoizedState=ad(g),c.memoizedState=od,T);if(!(c.mode&1))c=ld(u,c,g,null);else if(Yu(q))c=ld(u,c,g,Error(o(419)));else if(x=(g&u.childLanes)!==0,Ni||x){if(x=xn,x!==null){switch(g&-g){case 4:T=2;break;case 16:T=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:T=32;break;case 536870912:T=268435456;break;default:T=0}x=T&(x.suspendedLanes|g)?0:T,x!==0&&x!==E.retryLane&&(E.retryLane=x,ir(u,x,-1))}z0(),c=ld(u,c,g,Error(o(421)))}else Dh(q)?(c.flags|=128,c.child=u.child,c=YI.bind(null,u),zg(q,c),c=null):(g=E.treeContext,oe&&(ki=ne(q),Di=c,Zt=!0,Sr=null,Ju=!1,g!==null&&($i[er++]=fs,$i[er++]=hs,$i[er++]=Ko,fs=g.id,hs=g.overflow,Ko=c)),c=y0(c,c.pendingProps.children),c.flags|=4096);return c}return T?(x=Vw(u,c,x.children,x.fallback,g),T=c.child,E=u.child.memoizedState,T.memoizedState=E===null?ad(g):{baseLanes:E.baseLanes|g,cachePool:null},T.childLanes=u.childLanes&~g,c.memoizedState=od,x):(g=Bw(u,c,x.children,g),c.memoizedState=null,g)}return T?(x=Vw(u,c,x.children,x.fallback,g),T=c.child,E=u.child.memoizedState,T.memoizedState=E===null?ad(g):{baseLanes:E.baseLanes|g,cachePool:null},T.childLanes=u.childLanes&~g,c.memoizedState=od,x):(g=Bw(u,c,x.children,g),c.memoizedState=null,g)}function y0(u,c){return c=Td({mode:"visible",children:c},u.mode,0,null),c.return=u,u.child=c}function Bw(u,c,g,x){var E=u.child;return u=E.sibling,g=$s(E,{mode:"visible",children:g}),!(c.mode&1)&&(g.lanes=x),g.return=c,g.sibling=null,u!==null&&(x=c.deletions,x===null?(c.deletions=[u],c.flags|=16):x.push(u)),c.child=g}function Vw(u,c,g,x,E){var T=c.mode;u=u.child;var U=u.sibling,q={mode:"hidden",children:g};return!(T&1)&&c.child!==u?(g=c.child,g.childLanes=0,g.pendingProps=q,c.deletions=null):(g=$s(u,q),g.subtreeFlags=u.subtreeFlags&14680064),U!==null?x=$s(U,x):(x=sa(x,T,E,null),x.flags|=2),x.return=c,g.return=c,g.sibling=x,c.child=g,x}function ld(u,c,g,x){return x!==null&&i0(x),fl(c,u.child,null,g),u=y0(c,c.pendingProps.children),u.flags|=2,c.memoizedState=null,u}function Hw(u,c,g){u.lanes|=c;var x=u.alternate;x!==null&&(x.lanes|=c),Zg(u.return,c,g)}function x0(u,c,g,x,E){var T=u.memoizedState;T===null?u.memoizedState={isBackwards:c,rendering:null,renderingStartTime:0,last:x,tail:g,tailMode:E}:(T.isBackwards=c,T.rendering=null,T.renderingStartTime=0,T.last=x,T.tail=g,T.tailMode=E)}function Ww(u,c,g){var x=c.pendingProps,E=x.revealOrder,T=x.tail;if(li(u,c,x.children,g),x=Qt.current,x&2)x=x&1|2,c.flags|=128;else{if(u!==null&&u.flags&128)e:for(u=c.child;u!==null;){if(u.tag===13)u.memoizedState!==null&&Hw(u,g,c);else if(u.tag===19)Hw(u,g,c);else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===c)break e;for(;u.sibling===null;){if(u.return===null||u.return===c)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}x&=1}if(ht(Qt,x),!(c.mode&1))c.memoizedState=null;else switch(E){case"forwards":for(g=c.child,E=null;g!==null;)u=g.alternate,u!==null&&Jh(u)===null&&(E=g),g=g.sibling;g=E,g===null?(E=c.child,c.child=null):(E=g.sibling,g.sibling=null),x0(c,!1,E,g,T);break;case"backwards":for(g=null,E=c.child,c.child=null;E!==null;){if(u=E.alternate,u!==null&&Jh(u)===null){c.child=E;break}u=E.sibling,E.sibling=g,g=E,E=u}x0(c,!0,g,null,T);break;case"together":x0(c,!1,null,null,void 0);break;default:c.memoizedState=null}return c.child}function ps(u,c,g){if(u!==null&&(c.dependencies=u.dependencies),gl|=c.lanes,!(g&c.childLanes))return null;if(u!==null&&c.child!==u.child)throw Error(o(153));if(c.child!==null){for(u=c.child,g=$s(u,u.pendingProps),c.child=g,g.return=c;u.sibling!==null;)u=u.sibling,g=g.sibling=$s(u,u.pendingProps),g.return=c;g.sibling=null}return c.child}function NI(u,c,g){switch(c.tag){case 3:Uw(c),cl();break;case 5:sw(c);break;case 1:Vn(c.type)&&Nh(c);break;case 4:r0(c,c.stateNode.containerInfo);break;case 10:GS(c,c.type._context,c.memoizedProps.value);break;case 13:var x=c.memoizedState;if(x!==null)return x.dehydrated!==null?(ht(Qt,Qt.current&1),c.flags|=128,null):g&c.child.childLanes?Fw(u,c,g):(ht(Qt,Qt.current&1),u=ps(u,c,g),u!==null?u.sibling:null);ht(Qt,Qt.current&1);break;case 19:if(x=(g&c.childLanes)!==0,u.flags&128){if(x)return Ww(u,c,g);c.flags|=128}var E=c.memoizedState;if(E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),ht(Qt,Qt.current),x)break;return null;case 22:case 23:return c.lanes=0,kw(u,c,g)}return ps(u,c,g)}function OI(u,c){switch(e0(c),c.tag){case 1:return Vn(c.type)&&kh(),u=c.flags,u&65536?(c.flags=u&-65537|128,c):null;case 3:return dl(),It(Ut),It(yn),a0(),u=c.flags,u&65536&&!(u&128)?(c.flags=u&-65537|128,c):null;case 5:return s0(c),null;case 13:if(It(Qt),u=c.memoizedState,u!==null&&u.dehydrated!==null){if(c.alternate===null)throw Error(o(340));cl()}return u=c.flags,u&65536?(c.flags=u&-65537|128,c):null;case 19:return It(Qt),null;case 4:return dl(),null;case 10:return qg(c.type._context),null;case 22:case 23:return U0(),null;case 24:return null;default:return null}}var ud=!1,ea=!1,UI=typeof WeakSet=="function"?WeakSet:Set,ke=null;function cd(u,c){var g=u.ref;if(g!==null)if(typeof g=="function")try{g(null)}catch(x){wi(u,c,x)}else g.current=null}function _0(u,c,g){try{g()}catch(x){wi(u,c,x)}}var Gw=!1;function zI(u,c){for(H(u.containerInfo),ke=c;ke!==null;)if(u=ke,c=u.child,(u.subtreeFlags&1028)!==0&&c!==null)c.return=u,ke=c;else for(;ke!==null;){u=ke;try{var g=u.alternate;if(u.flags&1024)switch(u.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var x=g.memoizedProps,E=g.memoizedState,T=u.stateNode,U=T.getSnapshotBeforeUpdate(u.elementType===u.type?x:_r(u.type,x),E);T.__reactInternalSnapshotBeforeUpdate=U}break;case 3:Me&&Ue(u.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch(q){wi(u,u.return,q)}if(c=u.sibling,c!==null){c.return=u.return,ke=c;break}ke=u.return}return g=Gw,Gw=!1,g}function ta(u,c,g){var x=c.updateQueue;if(x=x!==null?x.lastEffect:null,x!==null){var E=x=x.next;do{if((E.tag&u)===u){var T=E.destroy;E.destroy=void 0,T!==void 0&&_0(c,g,T)}E=E.next}while(E!==x)}}function lc(u,c){if(c=c.updateQueue,c=c!==null?c.lastEffect:null,c!==null){var g=c=c.next;do{if((g.tag&u)===u){var x=g.create;g.destroy=x()}g=g.next}while(g!==c)}}function S0(u){var c=u.ref;if(c!==null){var g=u.stateNode;switch(u.tag){case 5:u=se(g);break;default:u=g}typeof c=="function"?c(u):c.current=u}}function jw(u,c,g){if(Fr&&typeof Fr.onCommitFiberUnmount=="function")try{Fr.onCommitFiberUnmount(Fh,c)}catch{}switch(c.tag){case 0:case 11:case 14:case 15:if(u=c.updateQueue,u!==null&&(u=u.lastEffect,u!==null)){var x=u=u.next;do{var E=x,T=E.destroy;E=E.tag,T!==void 0&&(E&2||E&4)&&_0(c,g,T),x=x.next}while(x!==u)}break;case 1:if(cd(c,g),u=c.stateNode,typeof u.componentWillUnmount=="function")try{u.props=c.memoizedProps,u.state=c.memoizedState,u.componentWillUnmount()}catch(U){wi(c,g,U)}break;case 5:cd(c,g);break;case 4:Me?Kw(u,c,g):ge&&ge&&(c=c.stateNode.containerInfo,g=Ot(c),mr(c,g))}}function Xw(u,c,g){for(var x=c;;)if(jw(u,x,g),x.child===null||Me&&x.tag===4){if(x===c)break;for(;x.sibling===null;){if(x.return===null||x.return===c)return;x=x.return}x.sibling.return=x.return,x=x.sibling}else x.child.return=x,x=x.child}function Yw(u){var c=u.alternate;c!==null&&(u.alternate=null,Yw(c)),u.child=null,u.deletions=null,u.sibling=null,u.tag===5&&(c=u.stateNode,c!==null&&Ge(c)),u.stateNode=null,u.return=null,u.dependencies=null,u.memoizedProps=null,u.memoizedState=null,u.pendingProps=null,u.stateNode=null,u.updateQueue=null}function qw(u){return u.tag===5||u.tag===3||u.tag===4}function Zw(u){e:for(;;){for(;u.sibling===null;){if(u.return===null||qw(u.return))return null;u=u.return}for(u.sibling.return=u.return,u=u.sibling;u.tag!==5&&u.tag!==6&&u.tag!==18;){if(u.flags&2||u.child===null||u.tag===4)continue e;u.child.return=u,u=u.child}if(!(u.flags&2))return u.stateNode}}function Jw(u){if(Me){e:{for(var c=u.return;c!==null;){if(qw(c))break e;c=c.return}throw Error(o(160))}var g=c;switch(g.tag){case 5:c=g.stateNode,g.flags&32&&(ct(c),g.flags&=-33),g=Zw(u),M0(u,g,c);break;case 3:case 4:c=g.stateNode.containerInfo,g=Zw(u),w0(u,g,c);break;default:throw Error(o(161))}}}function w0(u,c,g){var x=u.tag;if(x===5||x===6)u=u.stateNode,c?Se(g,u,c):ze(g,u);else if(x!==4&&(u=u.child,u!==null))for(w0(u,c,g),u=u.sibling;u!==null;)w0(u,c,g),u=u.sibling}function M0(u,c,g){var x=u.tag;if(x===5||x===6)u=u.stateNode,c?de(g,u,c):et(g,u);else if(x!==4&&(u=u.child,u!==null))for(M0(u,c,g),u=u.sibling;u!==null;)M0(u,c,g),u=u.sibling}function Kw(u,c,g){for(var x=c,E=!1,T,U;;){if(!E){E=x.return;e:for(;;){if(E===null)throw Error(o(160));switch(T=E.stateNode,E.tag){case 5:U=!1;break e;case 3:T=T.containerInfo,U=!0;break e;case 4:T=T.containerInfo,U=!0;break e}E=E.return}E=!0}if(x.tag===5||x.tag===6)Xw(u,x,g),U?Qe(T,x.stateNode):Pe(T,x.stateNode);else if(x.tag===18)U?St(T,x.stateNode):yt(T,x.stateNode);else if(x.tag===4){if(x.child!==null){T=x.stateNode.containerInfo,U=!0,x.child.return=x,x=x.child;continue}}else if(jw(u,x,g),x.child!==null){x.child.return=x,x=x.child;continue}if(x===c)break;for(;x.sibling===null;){if(x.return===null||x.return===c)return;x=x.return,x.tag===4&&(E=!1)}x.sibling.return=x.return,x=x.sibling}}function A0(u,c){if(Me){switch(c.tag){case 0:case 11:case 14:case 15:ta(3,c,c.return),lc(3,c),ta(5,c,c.return);return;case 1:return;case 5:var g=c.stateNode;if(g!=null){var x=c.memoizedProps;u=u!==null?u.memoizedProps:x;var E=c.type,T=c.updateQueue;c.updateQueue=null,T!==null&&G(g,T,E,u,x,c)}return;case 6:if(c.stateNode===null)throw Error(o(162));g=c.memoizedProps,pe(c.stateNode,u!==null?u.memoizedProps:g,g);return;case 3:oe&&u!==null&&u.memoizedState.isDehydrated&&ft(c.stateNode.containerInfo);return;case 12:return;case 13:fd(c);return;case 19:fd(c);return;case 17:return}throw Error(o(163))}switch(c.tag){case 0:case 11:case 14:case 15:ta(3,c,c.return),lc(3,c),ta(5,c,c.return);return;case 12:return;case 13:fd(c);return;case 19:fd(c);return;case 3:oe&&u!==null&&u.memoizedState.isDehydrated&&ft(c.stateNode.containerInfo);break;case 22:case 23:return}e:if(ge){switch(c.tag){case 1:case 5:case 6:break e;case 3:case 4:c=c.stateNode,mr(c.containerInfo,c.pendingChildren);break e}throw Error(o(163))}}function fd(u){var c=u.updateQueue;if(c!==null){u.updateQueue=null;var g=u.stateNode;g===null&&(g=u.stateNode=new UI),c.forEach(function(x){var E=qI.bind(null,u,x);g.has(x)||(g.add(x),x.then(E,E))})}}function FI(u,c){for(ke=c;ke!==null;){c=ke;var g=c.deletions;if(g!==null)for(var x=0;x";case dd:return":has("+(T0(u)||"")+")";case pd:return'[role="'+u.value+'"]';case gd:return'"'+u.value+'"';case md:return'[data-testname="'+u.value+'"]';default:throw Error(o(365))}}function nM(u,c){var g=[];u=[u,0];for(var x=0;xE&&(E=U),x&=~T}if(x=E,x=In()-x,x=(120>x?120:480>x?480:1080>x?1080:1920>x?1920:3e3>x?3e3:4320>x?4320:1960*VI(x/1960))-x,10u?16:u,Js===null)var x=!1;else{if(u=Js,Js=null,Sd=0,xt&6)throw Error(o(331));var E=xt;for(xt|=4,ke=u.current;ke!==null;){var T=ke,U=T.child;if(ke.flags&16){var q=T.deletions;if(q!==null){for(var he=0;heIn()-R0?na(u,0):L0|=g),Si(u,c)}function fM(u,c){c===0&&(u.mode&1?(c=Uh,Uh<<=1,!(Uh&130023424)&&(Uh=4194304)):c=1);var g=ui();u=Ad(u,c),u!==null&&(Zu(u,c,g),Si(u,g))}function YI(u){var c=u.memoizedState,g=0;c!==null&&(g=c.retryLane),fM(u,g)}function qI(u,c){var g=0;switch(u.tag){case 13:var x=u.stateNode,E=u.memoizedState;E!==null&&(g=E.retryLane);break;case 19:x=u.stateNode;break;default:throw Error(o(314))}x!==null&&x.delete(c),fM(u,g)}var hM;hM=function(u,c,g){if(u!==null)if(u.memoizedProps!==c.pendingProps||Ut.current)Ni=!0;else{if(!(u.lanes&g)&&!(c.flags&128))return Ni=!1,NI(u,c,g);Ni=!!(u.flags&131072)}else Ni=!1,Zt&&c.flags&1048576&&QS(c,qh,c.index);switch(c.lanes=0,c.tag){case 2:var x=c.type;u!==null&&(u.alternate=null,c.alternate=null,c.flags|=2),u=c.pendingProps;var E=Xs(c,yn.current);al(c,g),E=u0(null,c,x,u,E,g);var T=c0();return c.flags|=1,typeof E=="object"&&E!==null&&typeof E.render=="function"&&E.$$typeof===void 0?(c.tag=1,c.memoizedState=null,c.updateQueue=null,Vn(x)?(T=!0,Nh(c)):T=!1,c.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,Jg(c),E.updater=Xh,c.stateNode=E,E._reactInternals=c,Qg(c,x,u,g),c=v0(null,c,x,!0,T,g)):(c.tag=0,Zt&&T&&$g(c),li(null,c,E,g),c=c.child),c;case 16:x=c.elementType;e:{switch(u!==null&&(u.alternate=null,c.alternate=null,c.flags|=2),u=c.pendingProps,E=x._init,x=E(x._payload),c.type=x,E=c.tag=JI(x),u=_r(x,u),E){case 0:c=g0(null,c,x,u,g);break e;case 1:c=Ow(null,c,x,u,g);break e;case 11:c=Rw(null,c,x,u,g);break e;case 14:c=Iw(null,c,x,_r(x.type,u),g);break e}throw Error(o(306,x,""))}return c;case 0:return x=c.type,E=c.pendingProps,E=c.elementType===x?E:_r(x,E),g0(u,c,x,E,g);case 1:return x=c.type,E=c.pendingProps,E=c.elementType===x?E:_r(x,E),Ow(u,c,x,E,g);case 3:e:{if(Uw(c),u===null)throw Error(o(387));x=c.pendingProps,T=c.memoizedState,E=T.element,jS(u,c),jh(c,x,null,g);var U=c.memoizedState;if(x=U.element,oe&&T.isDehydrated)if(T={element:x,isDehydrated:!1,cache:U.cache,transitions:U.transitions},c.updateQueue.baseState=T,c.memoizedState=T,c.flags&256){E=Error(o(423)),c=zw(u,c,x,g,E);break e}else if(x!==E){E=Error(o(424)),c=zw(u,c,x,g,E);break e}else for(oe&&(ki=me(c.stateNode.containerInfo),Di=c,Zt=!0,Sr=null,Ju=!1),g=rw(c,null,x,g),c.child=g;g;)g.flags=g.flags&-3|4096,g=g.sibling;else{if(cl(),x===E){c=ps(u,c,g);break e}li(u,c,x,g)}c=c.child}return c;case 5:return sw(c),u===null&&n0(c),x=c.type,E=c.pendingProps,T=u!==null?u.memoizedProps:null,U=E.children,Ee(x,E)?U=null:T!==null&&Ee(x,T)&&(c.flags|=32),Nw(u,c),li(u,c,U,g),c.child;case 6:return u===null&&n0(c),null;case 13:return Fw(u,c,g);case 4:return r0(c,c.stateNode.containerInfo),x=c.pendingProps,u===null?c.child=fl(c,null,x,g):li(u,c,x,g),c.child;case 11:return x=c.type,E=c.pendingProps,E=c.elementType===x?E:_r(x,E),Rw(u,c,x,E,g);case 7:return li(u,c,c.pendingProps,g),c.child;case 8:return li(u,c,c.pendingProps.children,g),c.child;case 12:return li(u,c,c.pendingProps.children,g),c.child;case 10:e:{if(x=c.type._context,E=c.pendingProps,T=c.memoizedProps,U=E.value,GS(c,x,U),T!==null)if(Br(T.value,U)){if(T.children===E.children&&!Ut.current){c=ps(u,c,g);break e}}else for(T=c.child,T!==null&&(T.return=c);T!==null;){var q=T.dependencies;if(q!==null){U=T.child;for(var he=q.firstContext;he!==null;){if(he.context===x){if(T.tag===1){he=cs(-1,g&-g),he.tag=2;var Le=T.updateQueue;if(Le!==null){Le=Le.shared;var Ve=Le.pending;Ve===null?he.next=he:(he.next=Ve.next,Ve.next=he),Le.pending=he}}T.lanes|=g,he=T.alternate,he!==null&&(he.lanes|=g),Zg(T.return,g,c),q.lanes|=g;break}he=he.next}}else if(T.tag===10)U=T.type===c.type?null:T.child;else if(T.tag===18){if(U=T.return,U===null)throw Error(o(341));U.lanes|=g,q=U.alternate,q!==null&&(q.lanes|=g),Zg(U,g,c),U=T.sibling}else U=T.child;if(U!==null)U.return=T;else for(U=T;U!==null;){if(U===c){U=null;break}if(T=U.sibling,T!==null){T.return=U.return,U=T;break}U=U.return}T=U}li(u,c,E.children,g),c=c.child}return c;case 9:return E=c.type,x=c.pendingProps.children,al(c,g),E=Qi(E),x=x(E),c.flags|=1,li(u,c,x,g),c.child;case 14:return x=c.type,E=_r(x,c.pendingProps),E=_r(x.type,E),Iw(u,c,x,E,g);case 15:return Dw(u,c,c.type,c.pendingProps,g);case 17:return x=c.type,E=c.pendingProps,E=c.elementType===x?E:_r(x,E),u!==null&&(u.alternate=null,c.alternate=null,c.flags|=2),c.tag=1,Vn(x)?(u=!0,Nh(c)):u=!1,al(c,g),JS(c,x,E),Qg(c,x,E,g),v0(null,c,x,!0,u,g);case 19:return Ww(u,c,g);case 22:return kw(u,c,g)}throw Error(o(156,c.tag))};function dM(u,c){return Hg(u,c)}function ZI(u,c,g,x){this.tag=u,this.key=g,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=x,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function rr(u,c,g,x){return new ZI(u,c,g,x)}function F0(u){return u=u.prototype,!(!u||!u.isReactComponent)}function JI(u){if(typeof u=="function")return F0(u)?1:0;if(u!=null){if(u=u.$$typeof,u===_)return 11;if(u===S)return 14}return 2}function $s(u,c){var g=u.alternate;return g===null?(g=rr(u.tag,c,u.key,u.mode),g.elementType=u.elementType,g.type=u.type,g.stateNode=u.stateNode,g.alternate=u,u.alternate=g):(g.pendingProps=c,g.type=u.type,g.flags=0,g.subtreeFlags=0,g.deletions=null),g.flags=u.flags&14680064,g.childLanes=u.childLanes,g.lanes=u.lanes,g.child=u.child,g.memoizedProps=u.memoizedProps,g.memoizedState=u.memoizedState,g.updateQueue=u.updateQueue,c=u.dependencies,g.dependencies=c===null?null:{lanes:c.lanes,firstContext:c.firstContext},g.sibling=u.sibling,g.index=u.index,g.ref=u.ref,g}function bd(u,c,g,x,E,T){var U=2;if(x=u,typeof u=="function")F0(u)&&(U=1);else if(typeof u=="string")U=5;else e:switch(u){case h:return sa(g.children,E,T,c);case d:U=8,E|=8;break;case p:return u=rr(12,g,c,E|2),u.elementType=p,u.lanes=T,u;case M:return u=rr(13,g,c,E),u.elementType=M,u.lanes=T,u;case m:return u=rr(19,g,c,E),u.elementType=m,u.lanes=T,u;case A:return Td(g,E,T,c);default:if(typeof u=="object"&&u!==null)switch(u.$$typeof){case v:U=10;break e;case y:U=9;break e;case _:U=11;break e;case S:U=14;break e;case w:U=16,x=null;break e}throw Error(o(130,u==null?u:typeof u,""))}return c=rr(U,g,c,E),c.elementType=u,c.type=x,c.lanes=T,c}function sa(u,c,g,x){return u=rr(7,u,x,c),u.lanes=g,u}function Td(u,c,g,x){return u=rr(22,u,x,c),u.elementType=A,u.lanes=g,u.stateNode={},u}function B0(u,c,g){return u=rr(6,u,null,c),u.lanes=g,u}function V0(u,c,g){return c=rr(4,u.children!==null?u.children:[],u.key,c),c.lanes=g,c.stateNode={containerInfo:u.containerInfo,pendingChildren:null,implementation:u.implementation},c}function KI(u,c,g,x,E){this.tag=c,this.containerInfo=u,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=Ye,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Bg(0),this.expirationTimes=Bg(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Bg(0),this.identifierPrefix=x,this.onRecoverableError=E,oe&&(this.mutableSourceEagerHydrationData=null)}function pM(u,c,g,x,E,T,U,q,he){return u=new KI(u,c,g,q,he),c===1?(c=1,T===!0&&(c|=8)):c=0,T=rr(3,null,null,c),u.current=T,T.stateNode=u,T.memoizedState={element:x,isDehydrated:g,cache:null,transitions:null},Jg(T),u}function mM(u){if(!u)return qn;u=u._reactInternals;e:{if(C(u)!==u||u.tag!==1)throw Error(o(170));var c=u;do{switch(c.tag){case 3:c=c.stateNode.context;break e;case 1:if(Vn(c.type)){c=c.stateNode.__reactInternalMemoizedMergedChildContext;break e}}c=c.return}while(c!==null);throw Error(o(171))}if(u.tag===1){var g=u.type;if(Vn(g))return FS(u,g,c)}return c}function gM(u){var c=u._reactInternals;if(c===void 0)throw typeof u.render=="function"?Error(o(188)):(u=Object.keys(u).join(","),Error(o(268,u)));return u=J(c),u===null?null:u.stateNode}function vM(u,c){if(u=u.memoizedState,u!==null&&u.dehydrated!==null){var g=u.retryLane;u.retryLane=g!==0&&g=Le&&T>=at&&E<=Ve&&U<=tt){u.splice(c,1);break}else if(x!==Le||g.width!==he.width||ttU){if(!(T!==at||g.height!==he.height||VeE)){Le>x&&(he.width+=Le-x,he.x=x),VeT&&(he.height+=at-T,he.y=T),ttg&&(g=U)),U ")+` No matching component was found for: - `)+u.join(" > ")}return null},t.getPublicRootInstance=function(u){if(u=u.current,!u.child)return null;switch(u.child.tag){case 5:return se(u.child.stateNode);default:return u.child.stateNode}},t.injectIntoDevTools=function(u){if(u={bundleType:u.bundleType,version:u.version,rendererPackageName:u.rendererPackageName,rendererConfig:u.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:a.ReactCurrentDispatcher,findHostInstanceByFiber:QI,findFiberByHostInstance:u.findFiberByHostInstance||$I,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.0.0-fc46dba67-20220329"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")u=!1;else{var c=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(c.isDisabled||!c.supportsFiber)u=!0;else{try{zh=c.inject(u),Fr=c}catch{}u=!!c.checkDCE}}return u},t.isAlreadyRendering=function(){return!1},t.observeVisibleRects=function(u,c,g,x){if(!nt)throw Error(o(363));u=P0(u,c);var E=Re(u,g,x).disconnect;return{disconnect:function(){E()}}},t.registerMutableSourceForHydration=function(u,c){var g=c._getVersion;g=g(c._source),u.mutableSourceEagerHydrationData==null?u.mutableSourceEagerHydrationData=[c,g]:u.mutableSourceEagerHydrationData.push(c,g)},t.runWithPriority=function(u,c){var g=Ct;try{return Ct=u,c()}finally{Ct=g}},t.shouldError=function(){return null},t.shouldSuspend=function(){return!1},t.updateContainer=function(u,c,g,x){var E=c.current,T=ui(),U=Ks(E);return g=mM(g),c.context===null?c.context=g:c.pendingContext=g,c=cs(T,U),c.payload={element:u},x=x===void 0?null:x,x!==null&&(c.callback=x),qs(E,c),u=ir(E,U,T),u!==null&&Wh(u,E,U),U},t};FR.exports=l9;var u9=FR.exports;const c9=A_(u9);var BR={exports:{}},VR={};/** + `)+u.join(" > ")}return null},t.getPublicRootInstance=function(u){if(u=u.current,!u.child)return null;switch(u.child.tag){case 5:return se(u.child.stateNode);default:return u.child.stateNode}},t.injectIntoDevTools=function(u){if(u={bundleType:u.bundleType,version:u.version,rendererPackageName:u.rendererPackageName,rendererConfig:u.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:a.ReactCurrentDispatcher,findHostInstanceByFiber:QI,findFiberByHostInstance:u.findFiberByHostInstance||$I,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.0.0-fc46dba67-20220329"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")u=!1;else{var c=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(c.isDisabled||!c.supportsFiber)u=!0;else{try{Fh=c.inject(u),Fr=c}catch{}u=!!c.checkDCE}}return u},t.isAlreadyRendering=function(){return!1},t.observeVisibleRects=function(u,c,g,x){if(!nt)throw Error(o(363));u=C0(u,c);var E=Re(u,g,x).disconnect;return{disconnect:function(){E()}}},t.registerMutableSourceForHydration=function(u,c){var g=c._getVersion;g=g(c._source),u.mutableSourceEagerHydrationData==null?u.mutableSourceEagerHydrationData=[c,g]:u.mutableSourceEagerHydrationData.push(c,g)},t.runWithPriority=function(u,c){var g=Ct;try{return Ct=u,c()}finally{Ct=g}},t.shouldError=function(){return null},t.shouldSuspend=function(){return!1},t.updateContainer=function(u,c,g,x){var E=c.current,T=ui(),U=Ks(E);return g=mM(g),c.context===null?c.context=g:c.pendingContext=g,c=cs(T,U),c.payload={element:u},x=x===void 0?null:x,x!==null&&(c.callback=x),qs(E,c),u=ir(E,U,T),u!==null&&Gh(u,E,U),U},t};FR.exports=l9;var u9=FR.exports;const c9=A_(u9);var BR={exports:{}},VR={};/** * @license React * scheduler.production.min.js * @@ -3528,7 +3528,7 @@ No matching component was found for: * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */(function(n){function e(D,H){var B=D.length;D.push(H);e:for(;0>>1,$=D[te];if(0>>1;ter(Ee,B))we<$&&0>r(Q,Ee)?(D[te]=Q,D[we]=B,te=we):(D[te]=Ee,D[ue]=B,te=ue);else if(we<$&&0>r(Q,B))D[te]=Q,D[we]=B,te=we;else break e}}return H}function r(D,H){var B=D.sortIndex-H.sortIndex;return B!==0?B:D.id-H.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;n.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();n.unstable_now=function(){return o.now()-a}}var l=[],f=[],h=1,d=null,p=3,v=!1,y=!1,_=!1,M=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(D){for(var H=t(f);H!==null;){if(H.callback===null)i(f);else if(H.startTime<=D)i(f),H.sortIndex=H.expirationTime,e(l,H);else break;H=t(f)}}function A(D){if(_=!1,w(D),!y)if(t(l)!==null)y=!0,se(b);else{var H=t(f);H!==null&&ae(A,H.startTime-D)}}function b(D,H){y=!1,_&&(_=!1,m(L),L=-1),v=!0;var B=p;try{for(w(H),d=t(l);d!==null&&(!(d.expirationTime>H)||D&&!W());){var te=d.callback;if(typeof te=="function"){d.callback=null,p=d.priorityLevel;var $=te(d.expirationTime<=H);H=n.unstable_now(),typeof $=="function"?d.callback=$:d===t(l)&&i(l),w(H)}else i(l);d=t(l)}if(d!==null)var ee=!0;else{var ue=t(f);ue!==null&&ae(A,ue.startTime-H),ee=!1}return ee}finally{d=null,p=B,v=!1}}var P=!1,I=null,L=-1,C=5,R=-1;function W(){return!(n.unstable_now()-RD||125te?(D.sortIndex=B,e(f,D),t(l)===null&&D===t(f)&&(_?(m(L),L=-1):_=!0,ae(A,B-te))):(D.sortIndex=$,e(l,D),y||v||(y=!0,se(b))),D},n.unstable_shouldYield=W,n.unstable_wrapCallback=function(D){var H=p;return function(){var B=p;p=H;try{return D.apply(this,arguments)}finally{p=B}}}})(VR);BR.exports=VR;var xT=BR.exports;function HR(n,e,t=(i,r)=>i===r){if(n===e)return!0;if(!n||!e)return!1;const i=n.length;if(e.length!==i)return!1;for(let r=0;rr.response=s).then(()=>{i.lifespan&&i.lifespan>0&&setTimeout(()=>{const s=Es.indexOf(r);s!==-1&&Es.splice(s,1)},i.lifespan)}).catch(s=>r.error=s)};if(Es.push(r),!t)throw r.promise}const f9=(n,e,t)=>WR(n,e,!1,t),h9=(n,e,t)=>void WR(n,e,!0,t),d9=n=>{if(n===void 0||n.length===0)Es.splice(0,Es.length);else{const e=Es.find(t=>HR(n,t.keys,t.equal));if(e){const t=Es.indexOf(e);t!==-1&&Es.splice(t,1)}}};var _T,ST;const GR=n=>n&&n.isOrthographicCamera,p9=n=>n&&n.hasOwnProperty("current"),Ch=typeof window<"u"&&((_T=window.document)!=null&&_T.createElement||((ST=window.navigator)==null?void 0:ST.product)==="ReactNative")?V.useLayoutEffect:V.useEffect;function jR(n){const e=V.useRef(n);return Ch(()=>void(e.current=n),[n]),e}function m9({set:n}){return Ch(()=>(n(new Promise(()=>null)),()=>n(!1)),[n]),null}class XR extends V.Component{constructor(...e){super(...e),this.state={error:!1}}componentDidCatch(e){this.props.set(e)}render(){return this.state.error?null:this.props.children}}XR.getDerivedStateFromError=()=>({error:!0});const YR="__default",g9=n=>n&&!!n.memoized&&!!n.changes;function qR(n){const e=typeof window<"u"?window.devicePixelRatio:1;return Array.isArray(n)?Math.min(Math.max(n[0],e),n[1]):n}const Nc=n=>{var e;return(e=n.__r3f)==null?void 0:e.root.getState()},un={obj:n=>n===Object(n)&&!un.arr(n)&&typeof n!="function",fun:n=>typeof n=="function",str:n=>typeof n=="string",num:n=>typeof n=="number",boo:n=>typeof n=="boolean",und:n=>n===void 0,arr:n=>Array.isArray(n),equ(n,e,{arrays:t="shallow",objects:i="reference",strict:r=!0}={}){if(typeof n!=typeof e||!!n!=!!e)return!1;if(un.str(n)||un.num(n))return n===e;const s=un.obj(n);if(s&&i==="reference")return n===e;const o=un.arr(n);if(o&&t==="reference")return n===e;if((o||s)&&n===e)return!0;let a;for(a in n)if(!(a in e))return!1;for(a in r?e:n)if(n[a]!==e[a])return!1;if(un.und(a)){if(o&&n.length===0&&e.length===0||s&&Object.keys(n).length===0&&Object.keys(e).length===0)return!0;if(n!==e)return!1}return!0}};function v9(n){const e={nodes:{},materials:{}};return n&&n.traverse(t=>{t.name&&(e.nodes[t.name]=t),t.material&&!e.materials[t.material.name]&&(e.materials[t.material.name]=t.material)}),e}function y9(n){n.dispose&&n.type!=="Scene"&&n.dispose();for(const e in n)e.dispose==null||e.dispose(),delete n[e]}function Hl(n,e){const t=n;return(e!=null&&e.primitive||!t.__r3f)&&(t.__r3f={type:"",root:null,previousAttach:null,memoizedProps:{},eventCount:0,handlers:{},objects:[],parent:null,...e}),n}function x_(n,e){let t=n;if(e.includes("-")){const i=e.split("-"),r=i.pop();return t=i.reduce((s,o)=>s[o],n),{target:t,key:r}}else return{target:t,key:e}}const wT=/-\d+$/;function uy(n,e,t){if(un.str(t)){if(wT.test(t)){const s=t.replace(wT,""),{target:o,key:a}=x_(n,s);Array.isArray(o[a])||(o[a]=[])}const{target:i,key:r}=x_(n,t);e.__r3f.previousAttach=i[r],i[r]=e}else e.__r3f.previousAttach=t(n,e)}function MT(n,e,t){var i,r;if(un.str(t)){const{target:s,key:o}=x_(n,t),a=e.__r3f.previousAttach;a===void 0?delete s[o]:s[o]=a}else(i=e.__r3f)==null||i.previousAttach==null||i.previousAttach(n,e);(r=e.__r3f)==null||delete r.previousAttach}function ZR(n,{children:e,key:t,ref:i,...r},{children:s,key:o,ref:a,...l}={},f=!1){var h;const d=(h=n==null?void 0:n.__r3f)!=null?h:{},p=Object.entries(r),v=[];if(f){const _=Object.keys(l);for(let M=0;M<_.length;M++)r.hasOwnProperty(_[M])||p.unshift([_[M],YR+"remove"])}p.forEach(([_,M])=>{var m;if((m=n.__r3f)!=null&&m.primitive&&_==="object"||un.equ(M,l[_]))return;if(/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/.test(_))return v.push([_,M,!0,[]]);let S=[];_.includes("-")&&(S=_.split("-")),v.push([_,M,!1,S]);for(const w in r){const A=r[w];w.startsWith(`${_}-`)&&v.push([w,A,!1,w.split("-")])}});const y={...r};return d.memoizedProps&&d.memoizedProps.args&&(y.args=d.memoizedProps.args),d.memoizedProps&&d.memoizedProps.attach&&(y.attach=d.memoizedProps.attach),{memoized:y,changes:v}}function cy(n,e){var t,i,r;const s=(t=n.__r3f)!=null?t:{},o=s.root,a=(i=o==null||o.getState==null?void 0:o.getState())!=null?i:{},{memoized:l,changes:f}=g9(e)?e:ZR(n,e),h=s.eventCount;n.__r3f&&(n.__r3f.memoizedProps=l);for(let v=0;vA[b],n),!(w&&w.set))){const[A,...b]=m.reverse();S=b.reverse().reduce((P,I)=>P[I],n),y=A}if(_===YR+"remove")if(w&&w.constructor){var d;_=new w.constructor(...(d=l.args)!=null?d:[])}else if(S.constructor){var p;const A=new S.constructor(...(p=S.__r3f.memoizedProps.args)!=null?p:[]);_=A[w],A.dispose&&A.dispose()}else _=0;if(M)_?s.handlers[y]=_:delete s.handlers[y],s.eventCount=Object.keys(s.handlers).length;else if(w&&w.set&&(w.copy||w instanceof Ua)){if(Array.isArray(_))w.fromArray?w.fromArray(_):w.set(..._);else if(w.copy&&_&&_.constructor&&w.constructor.name===_.constructor.name)w.copy(_);else if(_!==void 0){const A=w instanceof Fe;!A&&w.setScalar?w.setScalar(_):w instanceof Ua&&_ instanceof Ua?w.mask=_.mask:w.set(_),!("ColorManagement"in Gm)&&!a.linear&&A&&w.convertSRGBToLinear()}}else S[y]=_,!a.linear&&S[y]instanceof fn&&(S[y].encoding=zt);Wl(n)}if(s.parent&&a.internal&&n.raycast&&h!==s.eventCount){const v=a.internal.interaction.indexOf(n);v>-1&&a.internal.interaction.splice(v,1),s.eventCount&&a.internal.interaction.push(n)}return f.length&&(r=n.__r3f)!=null&&r.parent&&__(n),n}function Wl(n){var e,t;const i=(e=n.__r3f)==null||(t=e.root)==null||t.getState==null?void 0:t.getState();i&&i.internal.frames===0&&i.invalidate()}function __(n){n.onUpdate==null||n.onUpdate(n)}function x9(n,e){n.manual||(GR(n)?(n.left=e.width/-2,n.right=e.width/2,n.top=e.height/2,n.bottom=e.height/-2):n.aspect=e.width/e.height,n.updateProjectionMatrix(),n.updateMatrixWorld())}function _9(n,e,t){const i=t.pop(),r=t.reduce((s,o)=>s[o],n);return r[i]=e}function Up(n){return(n.eventObject||n.object).uuid+"/"+n.index+n.instanceId}function S9(){var n;const e=typeof self<"u"&&self||typeof window<"u"&&window;if(!e)return fu.DefaultEventPriority;switch((n=e.event)==null?void 0:n.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return fu.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return fu.ContinuousEventPriority;default:return fu.DefaultEventPriority}}function JR(n,e,t,i){const r=t.get(e);r&&(t.delete(e),t.size===0&&(n.delete(i),r.target.releasePointerCapture(i)))}function w9(n,e){const{internal:t}=n.getState();t.interaction=t.interaction.filter(i=>i!==e),t.initialHits=t.initialHits.filter(i=>i!==e),t.hovered.forEach((i,r)=>{(i.eventObject===e||i.object===e)&&t.hovered.delete(r)}),t.capturedMap.forEach((i,r)=>{JR(t.capturedMap,e,i,r)})}function M9(n){function e(l){const{internal:f}=n.getState(),h=l.offsetX-f.initialClick[0],d=l.offsetY-f.initialClick[1];return Math.round(Math.sqrt(h*h+d*d))}function t(l){return l.filter(f=>["Move","Over","Enter","Out","Leave"].some(h=>{var d;return(d=f.__r3f)==null?void 0:d.handlers["onPointer"+h]}))}function i(l,f){const h=n.getState(),d=new Set,p=[],v=f?f(h.internal.interaction):h.internal.interaction;for(let m=0;m{const w=Nc(m.object),A=Nc(S.object);return!w||!A?m.distance-S.distance:A.events.priority-w.events.priority||m.distance-S.distance}).filter(m=>{const S=Up(m);return d.has(S)?!1:(d.add(S),!0)});h.events.filter&&(_=h.events.filter(_,h));for(const m of _){let S=m.object;for(;S;){var M;(M=S.__r3f)!=null&&M.eventCount&&p.push({...m,eventObject:S}),S=S.parent}}if("pointerId"in l&&h.internal.capturedMap.has(l.pointerId))for(let m of h.internal.capturedMap.get(l.pointerId).values())d.has(Up(m.intersection))||p.push(m.intersection);return p}function r(l,f,h,d){const p=n.getState();if(l.length){const v={stopped:!1};for(const y of l){const _=Nc(y.object)||p,{raycaster:M,pointer:m,camera:S,internal:w}=_,A=new N(m.x,m.y,0).unproject(S),b=R=>{var W,J;return(W=(J=w.capturedMap.get(R))==null?void 0:J.has(y.eventObject))!=null?W:!1},P=R=>{const W={intersection:y,target:f.target};w.capturedMap.has(R)?w.capturedMap.get(R).set(y.eventObject,W):w.capturedMap.set(R,new Map([[y.eventObject,W]])),f.target.setPointerCapture(R)},I=R=>{const W=w.capturedMap.get(R);W&&JR(w.capturedMap,y.eventObject,W,R)};let L={};for(let R in f){let W=f[R];typeof W!="function"&&(L[R]=W)}let C={...y,...L,pointer:m,intersections:l,stopped:v.stopped,delta:h,unprojectedPoint:A,ray:M.ray,camera:S,stopPropagation(){const R="pointerId"in f&&w.capturedMap.get(f.pointerId);if((!R||R.has(y.eventObject))&&(C.stopped=v.stopped=!0,w.hovered.size&&Array.from(w.hovered.values()).find(W=>W.eventObject===y.eventObject))){const W=l.slice(0,l.indexOf(y));s([...W,y])}},target:{hasPointerCapture:b,setPointerCapture:P,releasePointerCapture:I},currentTarget:{hasPointerCapture:b,setPointerCapture:P,releasePointerCapture:I},nativeEvent:f};if(d(C),v.stopped===!0)break}}return l}function s(l){const{internal:f}=n.getState();for(const h of f.hovered.values())if(!l.length||!l.find(d=>d.object===h.object&&d.index===h.index&&d.instanceId===h.instanceId)){const p=h.eventObject.__r3f,v=p==null?void 0:p.handlers;if(f.hovered.delete(Up(h)),p!=null&&p.eventCount){const y={...h,intersections:l};v.onPointerOut==null||v.onPointerOut(y),v.onPointerLeave==null||v.onPointerLeave(y)}}}function o(l,f){for(let h=0;hs([]);case"onLostPointerCapture":return f=>{const{internal:h}=n.getState();"pointerId"in f&&h.capturedMap.has(f.pointerId)&&(h.capturedMap.delete(f.pointerId),s([]))}}return function(h){const{onPointerMissed:d,internal:p}=n.getState();p.lastEvent.current=h;const v=l==="onPointerMove",y=l==="onClick"||l==="onContextMenu"||l==="onDoubleClick",M=i(h,v?t:void 0),m=y?e(h):0;l==="onPointerDown"&&(p.initialClick=[h.offsetX,h.offsetY],p.initialHits=M.map(w=>w.eventObject)),y&&!M.length&&m<=2&&(o(h,p.interaction),d&&d(h)),v&&s(M);function S(w){const A=w.eventObject,b=A.__r3f,P=b==null?void 0:b.handlers;if(b!=null&&b.eventCount)if(v){if(P.onPointerOver||P.onPointerEnter||P.onPointerOut||P.onPointerLeave){const I=Up(w),L=p.hovered.get(I);L?L.stopped&&w.stopPropagation():(p.hovered.set(I,w),P.onPointerOver==null||P.onPointerOver(w),P.onPointerEnter==null||P.onPointerEnter(w))}P.onPointerMove==null||P.onPointerMove(w)}else{const I=P[l];I?(!y||p.initialHits.includes(A))&&(o(h,p.interaction.filter(L=>!p.initialHits.includes(L))),I(w)):y&&p.initialHits.includes(A)&&o(h,p.interaction.filter(L=>!p.initialHits.includes(L)))}}r(M,h,m,S)}}return{handlePointer:a}}let S_={},A9=n=>void(S_={...S_,...n});function E9(n,e){function t(h,{args:d=[],attach:p,...v},y){let _=`${h[0].toUpperCase()}${h.slice(1)}`,M;if(h==="primitive"){if(v.object===void 0)throw new Error("R3F: Primitives without 'object' are invalid!");const m=v.object;M=Hl(m,{type:h,root:y,attach:p,primitive:!0})}else{const m=S_[_];if(!m)throw new Error(`R3F: ${_} is not part of the THREE namespace! Did you forget to extend? See: https://docs.pmnd.rs/react-three-fiber/api/objects#using-3rd-party-objects-declaratively`);if(!Array.isArray(d))throw new Error("R3F: The args prop must be an array!");M=Hl(new m(...d),{type:h,root:y,attach:p,memoizedProps:{args:d}})}return M.__r3f.attach===void 0&&(M instanceof dt?M.__r3f.attach="geometry":M instanceof Xn&&(M.__r3f.attach="material")),_!=="inject"&&cy(M,v),M}function i(h,d){let p=!1;if(d){var v,y;(v=d.__r3f)!=null&&v.attach?uy(h,d,d.__r3f.attach):d.isObject3D&&h.isObject3D&&(h.add(d),p=!0),p||(y=h.__r3f)==null||y.objects.push(d),d.__r3f||Hl(d,{}),d.__r3f.parent=h,__(d),Wl(d)}}function r(h,d,p){let v=!1;if(d){var y,_;if((y=d.__r3f)!=null&&y.attach)uy(h,d,d.__r3f.attach);else if(d.isObject3D&&h.isObject3D){d.parent=h,d.dispatchEvent({type:"added"});const M=h.children.filter(S=>S!==d),m=M.indexOf(p);h.children=[...M.slice(0,m),d,...M.slice(m)],v=!0}v||(_=h.__r3f)==null||_.objects.push(d),d.__r3f||Hl(d,{}),d.__r3f.parent=h,__(d),Wl(d)}}function s(h,d,p=!1){h&&[...h].forEach(v=>o(d,v,p))}function o(h,d,p){if(d){var v,y,_;if(d.__r3f&&(d.__r3f.parent=null),(v=h.__r3f)!=null&&v.objects&&(h.__r3f.objects=h.__r3f.objects.filter(A=>A!==d)),(y=d.__r3f)!=null&&y.attach)MT(h,d,d.__r3f.attach);else if(d.isObject3D&&h.isObject3D){var M;h.remove(d),(M=d.__r3f)!=null&&M.root&&w9(d.__r3f.root,d)}const S=(_=d.__r3f)==null?void 0:_.primitive,w=p===void 0?d.dispose!==null&&!S:p;if(!S){var m;s((m=d.__r3f)==null?void 0:m.objects,d,w),s(d.children,d,w)}d.__r3f&&(delete d.__r3f.root,delete d.__r3f.objects,delete d.__r3f.handlers,delete d.__r3f.memoizedProps,S||delete d.__r3f),w&&d.dispose&&d.type!=="Scene"&&xT.unstable_scheduleCallback(xT.unstable_IdlePriority,()=>{try{d.dispose()}catch{}}),Wl(h)}}function a(h,d,p,v){var y;const _=(y=h.__r3f)==null?void 0:y.parent;if(!_)return;const M=t(d,p,h.__r3f.root);if(h.children){for(const m of h.children)m.__r3f&&i(M,m);h.children=h.children.filter(m=>!m.__r3f)}h.__r3f.objects.forEach(m=>i(M,m)),h.__r3f.objects=[],o(_,h),i(_,M),M.raycast&&M.__r3f.eventCount&&M.__r3f.root.getState().internal.interaction.push(M),[v,v.alternate].forEach(m=>{m!==null&&(m.stateNode=M,m.ref&&(typeof m.ref=="function"?m.ref(M):m.ref.current=M))})}const l=()=>console.warn("Text is not allowed in the R3F tree! This could be stray whitespace or characters.");return{reconciler:c9({createInstance:t,removeChild:o,appendChild:i,appendInitialChild:i,insertBefore:r,supportsMutation:!0,isPrimaryRenderer:!1,supportsPersistence:!1,supportsHydration:!1,noTimeout:-1,appendChildToContainer:(h,d)=>{if(!d)return;const p=h.getState().scene;p.__r3f&&(p.__r3f.root=h,i(p,d))},removeChildFromContainer:(h,d)=>{d&&o(h.getState().scene,d)},insertInContainerBefore:(h,d,p)=>{if(!d||!p)return;const v=h.getState().scene;v.__r3f&&r(v,d,p)},getRootHostContext:()=>null,getChildHostContext:h=>h,finalizeInitialChildren(h){var d;return!!((d=h==null?void 0:h.__r3f)!=null?d:{}).handlers},prepareUpdate(h,d,p,v){if(h.__r3f.primitive&&v.object&&v.object!==h)return[!0];{const{args:y=[],children:_,...M}=v,{args:m=[],children:S,...w}=p;if(!Array.isArray(y))throw new Error("R3F: the args prop must be an array!");if(y.some((b,P)=>b!==m[P]))return[!0];const A=ZR(h,M,w,!0);return A.changes.length?[!1,A]:null}},commitUpdate(h,[d,p],v,y,_,M){d?a(h,v,_,M):cy(h,p)},commitMount(h,d,p,v){var y;const _=(y=h.__r3f)!=null?y:{};h.raycast&&_.handlers&&_.eventCount&&h.__r3f.root.getState().internal.interaction.push(h)},getPublicInstance:h=>h,prepareForCommit:()=>null,preparePortalMount:h=>Hl(h.getState().scene),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance(h){var d;const{attach:p,parent:v}=(d=h.__r3f)!=null?d:{};p&&v&&MT(v,h,p),h.isObject3D&&(h.visible=!1),Wl(h)},unhideInstance(h,d){var p;const{attach:v,parent:y}=(p=h.__r3f)!=null?p:{};v&&y&&uy(y,h,v),(h.isObject3D&&d.visible==null||d.visible)&&(h.visible=!0),Wl(h)},createTextInstance:l,hideTextInstance:l,unhideTextInstance:l,getCurrentEventPriority:()=>e?e():fu.DefaultEventPriority,beforeActiveInstanceBlur:()=>{},afterActiveInstanceBlur:()=>{},detachDeletedInstance:()=>{},now:typeof performance<"u"&&un.fun(performance.now)?performance.now:un.fun(Date.now)?Date.now:()=>0,scheduleTimeout:un.fun(setTimeout)?setTimeout:void 0,cancelTimeout:un.fun(clearTimeout)?clearTimeout:void 0}),applyProps:cy}}const KR=n=>!!(n!=null&&n.render),QR=V.createContext(null),b9=(n,e)=>{const t=zR((a,l)=>{const f=new N,h=new N,d=new N;function p(m=l().camera,S=h,w=l().size){const{width:A,height:b,top:P,left:I}=w,L=A/b;S instanceof N?d.copy(S):d.set(...S);const C=m.getWorldPosition(f).distanceTo(d);if(GR(m))return{width:A/m.zoom,height:b/m.zoom,top:P,left:I,factor:1,distance:C,aspect:L};{const R=m.fov*Math.PI/180,W=2*Math.tan(R/2)*C,J=W*(A/b);return{width:J,height:W,top:P,left:I,factor:A/J,distance:C,aspect:L}}}let v;const y=m=>a(S=>({performance:{...S.performance,current:m}})),_=new ye;return{set:a,get:l,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},xr:null,invalidate:(m=1)=>n(l(),m),advance:(m,S)=>e(m,S,l()),legacy:!1,linear:!1,flat:!1,scene:Hl(new fS),controls:null,clock:new LS,pointer:_,mouse:_,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{const m=l();v&&clearTimeout(v),m.performance.current!==m.performance.min&&y(m.performance.min),v=setTimeout(()=>y(l().performance.max),m.performance.debounce)}},size:{width:0,height:0,top:0,left:0,updateStyle:!1},viewport:{initialDpr:0,dpr:0,width:0,height:0,top:0,left:0,aspect:0,distance:0,factor:0,getCurrentViewport:p},setEvents:m=>a(S=>({...S,events:{...S.events,...m}})),setSize:(m,S,w,A,b)=>{const P=l().camera,I={width:m,height:S,top:A||0,left:b||0,updateStyle:w};a(L=>({size:I,viewport:{...L.viewport,...p(P,h,I)}}))},setDpr:m=>a(S=>{const w=qR(m);return{viewport:{...S.viewport,dpr:w,initialDpr:S.viewport.initialDpr||w}}}),setFrameloop:(m="always")=>{const S=l().clock;S.stop(),S.elapsedTime=0,m!=="never"&&(S.start(),S.elapsedTime=0),a(()=>({frameloop:m}))},previousRoot:void 0,internal:{active:!1,priority:0,frames:0,lastEvent:V.createRef(),interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,subscribe:(m,S,w)=>{const A=l().internal;return A.priority=A.priority+(S>0?1:0),A.subscribers.push({ref:m,priority:S,store:w}),A.subscribers=A.subscribers.sort((b,P)=>b.priority-P.priority),()=>{const b=l().internal;b!=null&&b.subscribers&&(b.priority=b.priority-(S>0?1:0),b.subscribers=b.subscribers.filter(P=>P.ref!==m))}}}}}),i=t.getState();let r=i.size,s=i.viewport.dpr,o=i.camera;return t.subscribe(()=>{const{camera:a,size:l,viewport:f,gl:h,set:d}=t.getState();(l!==r||f.dpr!==s)&&(r=l,s=f.dpr,x9(a,l),h.setPixelRatio(f.dpr),h.setSize(l.width,l.height,l.updateStyle)),a!==o&&(o=a,d(p=>({viewport:{...p.viewport,...p.viewport.getCurrentViewport(a)}})))}),t.subscribe(a=>n(a)),t};let zp,T9=new Set,C9=new Set,P9=new Set;function fy(n,e){if(n.size)for(const{callback:t}of n.values())t(e)}function Oc(n,e){switch(n){case"before":return fy(T9,e);case"after":return fy(C9,e);case"tail":return fy(P9,e)}}let hy,dy;function py(n,e,t){let i=e.clock.getDelta();for(e.frameloop==="never"&&typeof n=="number"&&(i=n-e.clock.elapsedTime,e.clock.oldTime=e.clock.elapsedTime,e.clock.elapsedTime=n),hy=e.internal.subscribers,zp=0;zp0)&&!((f=r.gl.xr)!=null&&f.isPresenting)&&(t+=py(l,r))}if(Oc("after",l),t===0)return Oc("tail",l),e=!1,cancelAnimationFrame(i)}function o(l,f=1){var h;if(!l)return n.forEach(d=>o(d.store.getState()),f);(h=l.gl.xr)!=null&&h.isPresenting||!l.internal.active||l.frameloop==="never"||(l.internal.frames=Math.min(60,l.internal.frames+f),e||(e=!0,requestAnimationFrame(s)))}function a(l,f=!0,h,d){if(f&&Oc("before",l),h)py(l,h,d);else for(const p of n.values())py(l,p.store.getState());f&&Oc("after",l)}return{loop:s,invalidate:o,advance:a}}function $R(){const n=V.useContext(QR);if(!n)throw new Error("R3F: Hooks can only be used within the Canvas component!");return n}function Bi(n=t=>t,e){return $R()(n,e)}function kS(n,e=0){const t=$R(),i=t.getState().internal.subscribe,r=jR(n);return Ch(()=>i(r,e,t),[e,i,t]),null}function eI(n,e){return function(t,...i){const r=new t;return n&&n(r),Promise.all(i.map(s=>new Promise((o,a)=>r.load(s,l=>{l.scene&&Object.assign(l,v9(l.scene)),o(l)},e,l=>a(new Error(`Could not load ${s}: ${l.message})`))))))}}function Ph(n,e,t,i){const r=Array.isArray(e)?e:[e],s=f9(eI(t,i),[n,...r],{equal:un.equ});return Array.isArray(e)?s:s[0]}Ph.preload=function(n,e,t){const i=Array.isArray(e)?e:[e];return h9(eI(t),[n,...i])};Ph.clear=function(n,e){const t=Array.isArray(e)?e:[e];return d9([n,...t])};const ku=new Map,{invalidate:AT,advance:ET}=L9(ku),{reconciler:jm,applyProps:So}=E9(ku,S9),Vl={objects:"shallow",strict:!1},R9=(n,e)=>{const t=typeof n=="function"?n(e):n;return KR(t)?t:new cS({powerPreference:"high-performance",canvas:e,antialias:!0,alpha:!0,...n})};function I9(n){return n instanceof HTMLCanvasElement}function D9(n,e){if(e)return e;if(I9(n)&&n.parentElement){const{width:t,height:i,top:r,left:s}=n.parentElement.getBoundingClientRect();return{width:t,height:i,top:r,left:s}}return{width:0,height:0,top:0,left:0}}function k9(n){const e=ku.get(n),t=e==null?void 0:e.fiber,i=e==null?void 0:e.store;e&&console.warn("R3F.createRoot should only be called once!");const r=typeof reportError=="function"?reportError:console.error,s=i||b9(AT,ET),o=t||jm.createContainer(s,fu.ConcurrentRoot,null,!1,null,"",r,null);e||ku.set(n,{fiber:o,store:s});let a,l=!1;return{configure(f={}){let{gl:h,size:d,events:p,onCreated:v,shadows:y=!1,linear:_=!1,flat:M=!1,legacy:m=!1,orthographic:S=!1,frameloop:w="always",dpr:A=[1,2],performance:b,raycaster:P,camera:I,onPointerMissed:L}=f,C=s.getState(),R=C.gl;C.gl||C.set({gl:R=R9(h,n)});let W=C.raycaster;W||C.set({raycaster:W=new NR});const{params:J,...j}=P||{};if(un.equ(j,W,Vl)||So(W,{...j}),un.equ(J,W.params,Vl)||So(W,{params:{...W.params,...J}}),!C.camera){const ae=I instanceof dh,D=ae?I:S?new ts(0,0,0,0,.1,1e3):new Wt(75,0,.1,1e3);ae||(D.position.z=5,I&&So(D,I),I!=null&&I.rotation||D.lookAt(0,0,0)),C.set({camera:D})}if(!C.xr){const ae=(B,te)=>{const $=s.getState();$.frameloop!=="never"&&ET(B,!0,$,te)},D=()=>{const B=s.getState();B.gl.xr.enabled=B.gl.xr.isPresenting,B.gl.xr.setAnimationLoop(B.gl.xr.isPresenting?ae:null),B.gl.xr.isPresenting||AT(B)},H={connect(){const B=s.getState().gl;B.xr.addEventListener("sessionstart",D),B.xr.addEventListener("sessionend",D)},disconnect(){const B=s.getState().gl;B.xr.removeEventListener("sessionstart",D),B.xr.removeEventListener("sessionend",D)}};R.xr&&H.connect(),C.set({xr:H})}if(R.shadowMap){const ae=un.boo(y);if(ae&&R.shadowMap.enabled!==y||!un.equ(y,R.shadowMap,Vl)){const D=R.shadowMap.enabled;R.shadowMap.enabled=!!y,ae?R.shadowMap.type=X1:Object.assign(R.shadowMap,y),D!==R.shadowMap.enabled&&(R.shadowMap.needsUpdate=!0)}}"ColorManagement"in Gm&&_9(Gm,m,["ColorManagement","legacyMode"]);const X=_?Bs:zt,Z=M?kr:Z1;R.outputEncoding!==X&&(R.outputEncoding=X),R.toneMapping!==Z&&(R.toneMapping=Z),C.legacy!==m&&C.set(()=>({legacy:m})),C.linear!==_&&C.set(()=>({linear:_})),C.flat!==M&&C.set(()=>({flat:M})),h&&!un.fun(h)&&!KR(h)&&!un.equ(h,R,Vl)&&So(R,h),p&&!C.events.handlers&&C.set({events:p(s)}),A&&C.viewport.dpr!==qR(A)&&C.setDpr(A);const se=D9(n,d);return un.equ(se,C.size,Vl)||C.setSize(se.width,se.height,se.updateStyle,se.top,se.left),C.frameloop!==w&&C.setFrameloop(w),C.onPointerMissed||C.set({onPointerMissed:L}),b&&!un.equ(b,C.performance,Vl)&&C.set(ae=>({performance:{...ae.performance,...b}})),a=v,l=!0,this},render(f){return l||this.configure(),jm.updateContainer(V.createElement(N9,{store:s,children:f,onCreated:a,rootElement:n}),o,null,()=>{}),s},unmount(){tI(n)}}}function N9({store:n,children:e,onCreated:t,rootElement:i}){return Ch(()=>{const r=n.getState();r.set(s=>({internal:{...s.internal,active:!0}})),t&&t(r),n.getState().events.connected||r.events.connect==null||r.events.connect(i)},[]),V.createElement(QR.Provider,{value:n},e)}function tI(n,e){const t=ku.get(n),i=t==null?void 0:t.fiber;if(i){const r=t==null?void 0:t.store.getState();r&&(r.internal.active=!1),jm.updateContainer(null,i,null,()=>{r&&setTimeout(()=>{try{var s,o,a,l;r.events.disconnect==null||r.events.disconnect(),(s=r.gl)==null||(o=s.renderLists)==null||o.dispose==null||o.dispose(),(a=r.gl)==null||a.forceContextLoss==null||a.forceContextLoss(),(l=r.gl)!=null&&l.xr&&r.xr.disconnect(),y9(r),ku.delete(n),e&&e(n)}catch{}},500)})}}jm.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:V.version});function Za(){return Za=Object.assign?Object.assign.bind():function(n){for(var e=1;e=0?i=setTimeout(l,e-h):(i=null,t||(a=n.apply(s,r),s=r=null))}var f=function(){s=this,r=arguments,o=Date.now();var h=t&&!i;return i||(i=setTimeout(l,e)),h&&(a=n.apply(s,r),s=r=null),a};return f.clear=function(){i&&(clearTimeout(i),i=null)},f.flush=function(){i&&(a=n.apply(s,r),s=r=null,clearTimeout(i),i=null)},f}w_.debounce=w_;var O9=w_;const bT=A_(O9);function U9(n){let{debounce:e,scroll:t,polyfill:i,offsetSize:r}=n===void 0?{debounce:0,scroll:!1,offsetSize:!1}:n;const s=i||(typeof window>"u"?class{}:window.ResizeObserver);if(!s)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[o,a]=V.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),l=V.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:o}),f=e?typeof e=="number"?e:e.scroll:null,h=e?typeof e=="number"?e:e.resize:null,d=V.useRef(!1);V.useEffect(()=>(d.current=!0,()=>void(d.current=!1)));const[p,v,y]=V.useMemo(()=>{const S=()=>{if(!l.current.element)return;const{left:w,top:A,width:b,height:P,bottom:I,right:L,x:C,y:R}=l.current.element.getBoundingClientRect(),W={left:w,top:A,width:b,height:P,bottom:I,right:L,x:C,y:R};l.current.element instanceof HTMLElement&&r&&(W.height=l.current.element.offsetHeight,W.width=l.current.element.offsetWidth),Object.freeze(W),d.current&&!V9(l.current.lastBounds,W)&&a(l.current.lastBounds=W)};return[S,h?bT(S,h):S,f?bT(S,f):S]},[a,r,f,h]);function _(){l.current.scrollContainers&&(l.current.scrollContainers.forEach(S=>S.removeEventListener("scroll",y,!0)),l.current.scrollContainers=null),l.current.resizeObserver&&(l.current.resizeObserver.disconnect(),l.current.resizeObserver=null)}function M(){l.current.element&&(l.current.resizeObserver=new s(y),l.current.resizeObserver.observe(l.current.element),t&&l.current.scrollContainers&&l.current.scrollContainers.forEach(S=>S.addEventListener("scroll",y,{capture:!0,passive:!0})))}const m=S=>{!S||S===l.current.element||(_(),l.current.element=S,l.current.scrollContainers=nI(S),M())};return F9(y,!!t),z9(v),V.useEffect(()=>{_(),M()},[t,y,v]),V.useEffect(()=>_,[]),[m,o,p]}function z9(n){V.useEffect(()=>{const e=n;return window.addEventListener("resize",e),()=>void window.removeEventListener("resize",e)},[n])}function F9(n,e){V.useEffect(()=>{if(e){const t=n;return window.addEventListener("scroll",t,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",t,!0)}},[n,e])}function nI(n){const e=[];if(!n||n===document.body)return e;const{overflow:t,overflowX:i,overflowY:r}=window.getComputedStyle(n);return[t,i,r].some(s=>s==="auto"||s==="scroll")&&e.push(n),[...e,...nI(n.parentElement)]}const B9=["x","y","top","bottom","left","right","width","height"],V9=(n,e)=>B9.every(t=>n[t]===e[t]);var H9=Object.defineProperty,W9=Object.defineProperties,G9=Object.getOwnPropertyDescriptors,TT=Object.getOwnPropertySymbols,j9=Object.prototype.hasOwnProperty,X9=Object.prototype.propertyIsEnumerable,CT=(n,e,t)=>e in n?H9(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,PT=(n,e)=>{for(var t in e||(e={}))j9.call(e,t)&&CT(n,t,e[t]);if(TT)for(var t of TT(e))X9.call(e,t)&&CT(n,t,e[t]);return n},Y9=(n,e)=>W9(n,G9(e));function iI(n,e,t){if(!n)return;if(t(n)===!0)return n;let i=e?n.return:n.child;for(;i;){const r=iI(i,e,t);if(r)return r;i=e?null:i.sibling}}function rI(n){try{return Object.defineProperties(n,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return n}}const NS=rI(V.createContext(null));class sI extends V.Component{render(){return V.createElement(NS.Provider,{value:this._reactInternals},this.props.children)}}const{ReactCurrentOwner:LT,ReactCurrentDispatcher:RT}=V.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function q9(){const n=V.useContext(NS);if(n===null)throw new Error("its-fine: useFiber must be called within a !");const e=V.useId();return V.useMemo(()=>{var i;return(i=LT==null?void 0:LT.current)!=null?i:iI(n,!1,r=>{let s=r.memoizedState;for(;s;){if(s.memoizedState===e)return!0;s=s.next}})},[n,e])}function Z9(){var n,e;const t=q9(),[i]=V.useState(()=>new Map);i.clear();let r=t;for(;r;){const s=(n=r.type)==null?void 0:n._context;s&&s!==NS&&!i.has(s)&&i.set(s,(e=RT==null?void 0:RT.current)==null?void 0:e.readContext(rI(s))),r=r.return}return i}function J9(){const n=Z9();return V.useMemo(()=>Array.from(n.keys()).reduce((e,t)=>i=>V.createElement(e,null,V.createElement(t.Provider,Y9(PT({},i),{value:n.get(t)}))),e=>V.createElement(sI,PT({},e))),[n])}const my={onClick:["click",!1],onContextMenu:["contextmenu",!1],onDoubleClick:["dblclick",!1],onWheel:["wheel",!0],onPointerDown:["pointerdown",!0],onPointerUp:["pointerup",!0],onPointerLeave:["pointerleave",!0],onPointerMove:["pointermove",!0],onPointerCancel:["pointercancel",!0],onLostPointerCapture:["lostpointercapture",!0]};function K9(n){const{handlePointer:e}=M9(n);return{priority:1,enabled:!0,compute(t,i,r){i.pointer.set(t.offsetX/i.size.width*2-1,-(t.offsetY/i.size.height)*2+1),i.raycaster.setFromCamera(i.pointer,i.camera)},connected:void 0,handlers:Object.keys(my).reduce((t,i)=>({...t,[i]:e(i)}),{}),connect:t=>{var i;const{set:r,events:s}=n.getState();s.disconnect==null||s.disconnect(),r(o=>({events:{...o.events,connected:t}})),Object.entries((i=s.handlers)!=null?i:[]).forEach(([o,a])=>{const[l,f]=my[o];t.addEventListener(l,a,{passive:f})})},disconnect:()=>{const{set:t,events:i}=n.getState();if(i.connected){var r;Object.entries((r=i.handlers)!=null?r:[]).forEach(([s,o])=>{if(i&&i.connected instanceof HTMLElement){const[a]=my[s];i.connected.removeEventListener(a,o)}}),t(s=>({events:{...s.events,connected:void 0}}))}}}}const Q9=V.forwardRef(function({children:e,fallback:t,resize:i,style:r,gl:s,events:o=K9,eventSource:a,eventPrefix:l,shadows:f,linear:h,flat:d,legacy:p,orthographic:v,frameloop:y,dpr:_,performance:M,raycaster:m,camera:S,onPointerMissed:w,onCreated:A,...b},P){V.useMemo(()=>A9(Gm),[]);const I=J9(),[L,C]=U9({scroll:!0,debounce:{scroll:50,resize:0},...i}),R=V.useRef(null),W=V.useRef(null),[J,j]=V.useState(null);V.useImperativeHandle(P,()=>R.current);const X=jR(w),[Z,se]=V.useState(!1),[ae,D]=V.useState(!1);if(Z)throw Z;if(ae)throw ae;const H=V.useRef(null);C.width>0&&C.height>0&&J&&(H.current||(H.current=k9(J)),H.current.configure({gl:s,events:o,shadows:f,linear:h,flat:d,legacy:p,orthographic:v,frameloop:y,dpr:_,performance:M,raycaster:m,camera:S,size:C,onPointerMissed:(...te)=>X.current==null?void 0:X.current(...te),onCreated:te=>{te.events.connect==null||te.events.connect(a?p9(a)?a.current:a:W.current),l&&te.setEvents({compute:($,ee)=>{const ue=$[l+"X"],Ee=$[l+"Y"];ee.pointer.set(ue/ee.size.width*2-1,-(Ee/ee.size.height)*2+1),ee.raycaster.setFromCamera(ee.pointer,ee.camera)}}),A==null||A(te)}}),H.current.render(V.createElement(I,null,V.createElement(XR,{set:D},V.createElement(V.Suspense,{fallback:V.createElement(m9,{set:se})},e))))),Ch(()=>{j(R.current)},[]),V.useEffect(()=>{if(J)return()=>tI(J)},[J]);const B=a?"none":"auto";return V.createElement("div",Za({ref:W,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:B,...r}},b),V.createElement("div",{ref:L,style:{width:"100%",height:"100%"}},V.createElement("canvas",{ref:R,style:{display:"block"}},t)))}),$9=V.forwardRef(function(e,t){return V.createElement(sI,null,V.createElement(Q9,Za({},e,{ref:t})))}),Lh=new N,OS=new N,e7=new N;function t7(n,e,t){const i=Lh.setFromMatrixPosition(n.matrixWorld);i.project(e);const r=t.width/2,s=t.height/2;return[i.x*r+r,-(i.y*s)+s]}function n7(n,e){const t=Lh.setFromMatrixPosition(n.matrixWorld),i=OS.setFromMatrixPosition(e.matrixWorld),r=t.sub(i),s=e.getWorldDirection(e7);return r.angleTo(s)>Math.PI/2}function i7(n,e,t,i){const r=Lh.setFromMatrixPosition(n.matrixWorld),s=r.clone();s.project(e),t.setFromCamera(s,e);const o=t.intersectObjects(i,!0);if(o.length){const a=o[0].distance;return r.distanceTo(t.ray.origin)Math.abs(n)<1e-10?0:n;function oI(n,e,t=""){let i="matrix3d(";for(let r=0;r!==16;r++)i+=M_(e[r]*n.elements[r])+(r!==15?",":")");return t+i}const o7=(n=>e=>oI(e,n))([1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1]),a7=(n=>(e,t)=>oI(e,n(t),"translate(-50%,-50%)"))(n=>[1/n,1/n,1/n,1,-1/n,-1/n,-1/n,-1,1/n,1/n,1/n,1,1,1,1,1]);function l7(n){return n&&typeof n=="object"&&"current"in n}const u7=V.forwardRef(({children:n,eps:e=.001,style:t,className:i,prepend:r,center:s,fullscreen:o,portal:a,distanceFactor:l,sprite:f=!1,transform:h=!1,occlude:d,onOcclude:p,castShadow:v,receiveShadow:y,material:_,geometry:M,zIndexRange:m=[16777271,0],calculatePosition:S=t7,as:w="div",wrapperClass:A,pointerEvents:b="auto",...P},I)=>{const{gl:L,camera:C,scene:R,size:W,raycaster:J,events:j,viewport:X}=Bi(),[Z]=V.useState(()=>document.createElement(w)),se=V.useRef(),ae=V.useRef(null),D=V.useRef(0),H=V.useRef([0,0]),B=V.useRef(null),te=V.useRef(null),$=(a==null?void 0:a.current)||j.connected||L.domElement.parentNode,ee=V.useRef(null),ue=V.useRef(!1),Ee=V.useMemo(()=>d&&d!=="blending"||Array.isArray(d)&&d.length&&l7(d[0]),[d]);V.useLayoutEffect(()=>{const xe=L.domElement;d&&d==="blending"?(xe.style.zIndex=`${Math.floor(m[0]/2)}`,xe.style.position="absolute",xe.style.pointerEvents="none"):(xe.style.zIndex=null,xe.style.position=null,xe.style.pointerEvents=null)},[d]),V.useLayoutEffect(()=>{if(ae.current){const xe=se.current=K2(Z);if(R.updateMatrixWorld(),h)Z.style.cssText="position:absolute;top:0;left:0;pointer-events:none;overflow:hidden;";else{const Me=S(ae.current,C,W);Z.style.cssText=`position:absolute;top:0;left:0;transform:translate3d(${Me[0]}px,${Me[1]}px,0);transform-origin:0 0;`}return $&&(r?$.prepend(Z):$.appendChild(Z)),()=>{$&&$.removeChild(Z),xe.unmount()}}},[$,h]),V.useLayoutEffect(()=>{A&&(Z.className=A)},[A]);const we=V.useMemo(()=>h?{position:"absolute",top:0,left:0,width:W.width,height:W.height,transformStyle:"preserve-3d",pointerEvents:"none"}:{position:"absolute",transform:s?"translate3d(-50%,-50%,0)":"none",...o&&{top:-W.height/2,left:-W.width/2,width:W.width,height:W.height},...t},[t,s,o,W,h]),Q=V.useMemo(()=>({position:"absolute",pointerEvents:b}),[b]);V.useLayoutEffect(()=>{if(ue.current=!1,h){var xe;(xe=se.current)==null||xe.render(V.createElement("div",{ref:B,style:we},V.createElement("div",{ref:te,style:Q},V.createElement("div",{ref:I,className:i,style:t,children:n}))))}else{var Me;(Me=se.current)==null||Me.render(V.createElement("div",{ref:I,style:we,className:i,children:n}))}});const Xe=V.useRef(!0);kS(xe=>{if(ae.current){C.updateMatrixWorld(),ae.current.updateWorldMatrix(!0,!1);const Me=h?H.current:S(ae.current,C,W);if(h||Math.abs(D.current-C.zoom)>e||Math.abs(H.current[0]-Me[0])>e||Math.abs(H.current[1]-Me[1])>e){const ge=n7(ae.current,C);let oe=!1;Ee&&(d!=="blending"?oe=[R]:Array.isArray(d)&&(oe=d.map(Ge=>Ge.current)));const _e=Xe.current;if(oe){const Ge=i7(ae.current,C,J,oe);Xe.current=Ge&&!ge}else Xe.current=!ge;_e!==Xe.current&&(p?p(!Xe.current):Z.style.display=Xe.current?"block":"none");const Ne=Math.floor(m[0]/2),Ie=d?Ee?[m[0],Ne]:[Ne-1,0]:m;if(Z.style.zIndex=`${s7(ae.current,C,Ie)}`,h){const[Ge,qe]=[W.width/2,W.height/2],je=C.projectionMatrix.elements[5]*qe,{isOrthographicCamera:nt,top:_t,left:z,bottom:k,right:le}=C,be=o7(C.matrixWorldInverse),Te=nt?`scale(${je})translate(${M_(-(le+z)/2)}px,${M_((_t+k)/2)}px)`:`translateZ(${je}px)`;let Re=ae.current.matrixWorld;f&&(Re=C.matrixWorldInverse.clone().transpose().copyPosition(Re).scale(ae.current.scale),Re.elements[3]=Re.elements[7]=Re.elements[11]=0,Re.elements[15]=1),Z.style.width=W.width+"px",Z.style.height=W.height+"px",Z.style.perspective=nt?"":`${je}px`,B.current&&te.current&&(B.current.style.transform=`${Te}${be}translate(${Ge}px,${qe}px)`,te.current.style.transform=a7(Re,1/((l||10)/400)))}else{const Ge=l===void 0?1:r7(ae.current,C)*l;Z.style.transform=`translate3d(${Me[0]}px,${Me[1]}px,0) scale(${Ge})`}H.current=Me,D.current=C.zoom}}if(!Ee&&ee.current&&!ue.current)if(h){if(B.current){const Me=B.current.children[0];if(Me!=null&&Me.clientWidth&&Me!=null&&Me.clientHeight){const{isOrthographicCamera:ge}=C;if(ge||M)P.scale&&(Array.isArray(P.scale)?P.scale instanceof N?ee.current.scale.copy(P.scale.clone().divideScalar(1)):ee.current.scale.set(1/P.scale[0],1/P.scale[1],1/P.scale[2]):ee.current.scale.setScalar(1/P.scale));else{const oe=(l||10)/400,_e=Me.clientWidth*oe,Ne=Me.clientHeight*oe;ee.current.scale.set(_e,Ne,1)}ue.current=!0}}}else{const Me=Z.children[0];if(Me!=null&&Me.clientWidth&&Me!=null&&Me.clientHeight){const ge=1/X.factor,oe=Me.clientWidth*ge,_e=Me.clientHeight*ge;ee.current.scale.set(oe,_e,1),ue.current=!0}ee.current.lookAt(xe.camera.position)}});const Ye=V.useMemo(()=>({vertexShader:h?void 0:` + */(function(n){function e(D,H){var B=D.length;D.push(H);e:for(;0>>1,$=D[te];if(0>>1;ter(Ee,B))we<$&&0>r(Q,Ee)?(D[te]=Q,D[we]=B,te=we):(D[te]=Ee,D[ue]=B,te=ue);else if(we<$&&0>r(Q,B))D[te]=Q,D[we]=B,te=we;else break e}}return H}function r(D,H){var B=D.sortIndex-H.sortIndex;return B!==0?B:D.id-H.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;n.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();n.unstable_now=function(){return o.now()-a}}var l=[],f=[],h=1,d=null,p=3,v=!1,y=!1,_=!1,M=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function w(D){for(var H=t(f);H!==null;){if(H.callback===null)i(f);else if(H.startTime<=D)i(f),H.sortIndex=H.expirationTime,e(l,H);else break;H=t(f)}}function A(D){if(_=!1,w(D),!y)if(t(l)!==null)y=!0,se(b);else{var H=t(f);H!==null&&ae(A,H.startTime-D)}}function b(D,H){y=!1,_&&(_=!1,m(L),L=-1),v=!0;var B=p;try{for(w(H),d=t(l);d!==null&&(!(d.expirationTime>H)||D&&!W());){var te=d.callback;if(typeof te=="function"){d.callback=null,p=d.priorityLevel;var $=te(d.expirationTime<=H);H=n.unstable_now(),typeof $=="function"?d.callback=$:d===t(l)&&i(l),w(H)}else i(l);d=t(l)}if(d!==null)var ee=!0;else{var ue=t(f);ue!==null&&ae(A,ue.startTime-H),ee=!1}return ee}finally{d=null,p=B,v=!1}}var P=!1,I=null,L=-1,C=5,R=-1;function W(){return!(n.unstable_now()-RD||125te?(D.sortIndex=B,e(f,D),t(l)===null&&D===t(f)&&(_?(m(L),L=-1):_=!0,ae(A,B-te))):(D.sortIndex=$,e(l,D),y||v||(y=!0,se(b))),D},n.unstable_shouldYield=W,n.unstable_wrapCallback=function(D){var H=p;return function(){var B=p;p=H;try{return D.apply(this,arguments)}finally{p=B}}}})(VR);BR.exports=VR;var xT=BR.exports;function HR(n,e,t=(i,r)=>i===r){if(n===e)return!0;if(!n||!e)return!1;const i=n.length;if(e.length!==i)return!1;for(let r=0;rr.response=s).then(()=>{i.lifespan&&i.lifespan>0&&setTimeout(()=>{const s=Es.indexOf(r);s!==-1&&Es.splice(s,1)},i.lifespan)}).catch(s=>r.error=s)};if(Es.push(r),!t)throw r.promise}const f9=(n,e,t)=>WR(n,e,!1,t),h9=(n,e,t)=>void WR(n,e,!0,t),d9=n=>{if(n===void 0||n.length===0)Es.splice(0,Es.length);else{const e=Es.find(t=>HR(n,t.keys,t.equal));if(e){const t=Es.indexOf(e);t!==-1&&Es.splice(t,1)}}};var _T,ST;const GR=n=>n&&n.isOrthographicCamera,p9=n=>n&&n.hasOwnProperty("current"),Ph=typeof window<"u"&&((_T=window.document)!=null&&_T.createElement||((ST=window.navigator)==null?void 0:ST.product)==="ReactNative")?V.useLayoutEffect:V.useEffect;function jR(n){const e=V.useRef(n);return Ph(()=>void(e.current=n),[n]),e}function m9({set:n}){return Ph(()=>(n(new Promise(()=>null)),()=>n(!1)),[n]),null}class XR extends V.Component{constructor(...e){super(...e),this.state={error:!1}}componentDidCatch(e){this.props.set(e)}render(){return this.state.error?null:this.props.children}}XR.getDerivedStateFromError=()=>({error:!0});const YR="__default",g9=n=>n&&!!n.memoized&&!!n.changes;function qR(n){const e=typeof window<"u"?window.devicePixelRatio:1;return Array.isArray(n)?Math.min(Math.max(n[0],e),n[1]):n}const Nc=n=>{var e;return(e=n.__r3f)==null?void 0:e.root.getState()},un={obj:n=>n===Object(n)&&!un.arr(n)&&typeof n!="function",fun:n=>typeof n=="function",str:n=>typeof n=="string",num:n=>typeof n=="number",boo:n=>typeof n=="boolean",und:n=>n===void 0,arr:n=>Array.isArray(n),equ(n,e,{arrays:t="shallow",objects:i="reference",strict:r=!0}={}){if(typeof n!=typeof e||!!n!=!!e)return!1;if(un.str(n)||un.num(n))return n===e;const s=un.obj(n);if(s&&i==="reference")return n===e;const o=un.arr(n);if(o&&t==="reference")return n===e;if((o||s)&&n===e)return!0;let a;for(a in n)if(!(a in e))return!1;for(a in r?e:n)if(n[a]!==e[a])return!1;if(un.und(a)){if(o&&n.length===0&&e.length===0||s&&Object.keys(n).length===0&&Object.keys(e).length===0)return!0;if(n!==e)return!1}return!0}};function v9(n){const e={nodes:{},materials:{}};return n&&n.traverse(t=>{t.name&&(e.nodes[t.name]=t),t.material&&!e.materials[t.material.name]&&(e.materials[t.material.name]=t.material)}),e}function y9(n){n.dispose&&n.type!=="Scene"&&n.dispose();for(const e in n)e.dispose==null||e.dispose(),delete n[e]}function Hl(n,e){const t=n;return(e!=null&&e.primitive||!t.__r3f)&&(t.__r3f={type:"",root:null,previousAttach:null,memoizedProps:{},eventCount:0,handlers:{},objects:[],parent:null,...e}),n}function x_(n,e){let t=n;if(e.includes("-")){const i=e.split("-"),r=i.pop();return t=i.reduce((s,o)=>s[o],n),{target:t,key:r}}else return{target:t,key:e}}const wT=/-\d+$/;function uy(n,e,t){if(un.str(t)){if(wT.test(t)){const s=t.replace(wT,""),{target:o,key:a}=x_(n,s);Array.isArray(o[a])||(o[a]=[])}const{target:i,key:r}=x_(n,t);e.__r3f.previousAttach=i[r],i[r]=e}else e.__r3f.previousAttach=t(n,e)}function MT(n,e,t){var i,r;if(un.str(t)){const{target:s,key:o}=x_(n,t),a=e.__r3f.previousAttach;a===void 0?delete s[o]:s[o]=a}else(i=e.__r3f)==null||i.previousAttach==null||i.previousAttach(n,e);(r=e.__r3f)==null||delete r.previousAttach}function ZR(n,{children:e,key:t,ref:i,...r},{children:s,key:o,ref:a,...l}={},f=!1){var h;const d=(h=n==null?void 0:n.__r3f)!=null?h:{},p=Object.entries(r),v=[];if(f){const _=Object.keys(l);for(let M=0;M<_.length;M++)r.hasOwnProperty(_[M])||p.unshift([_[M],YR+"remove"])}p.forEach(([_,M])=>{var m;if((m=n.__r3f)!=null&&m.primitive&&_==="object"||un.equ(M,l[_]))return;if(/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/.test(_))return v.push([_,M,!0,[]]);let S=[];_.includes("-")&&(S=_.split("-")),v.push([_,M,!1,S]);for(const w in r){const A=r[w];w.startsWith(`${_}-`)&&v.push([w,A,!1,w.split("-")])}});const y={...r};return d.memoizedProps&&d.memoizedProps.args&&(y.args=d.memoizedProps.args),d.memoizedProps&&d.memoizedProps.attach&&(y.attach=d.memoizedProps.attach),{memoized:y,changes:v}}function cy(n,e){var t,i,r;const s=(t=n.__r3f)!=null?t:{},o=s.root,a=(i=o==null||o.getState==null?void 0:o.getState())!=null?i:{},{memoized:l,changes:f}=g9(e)?e:ZR(n,e),h=s.eventCount;n.__r3f&&(n.__r3f.memoizedProps=l);for(let v=0;vA[b],n),!(w&&w.set))){const[A,...b]=m.reverse();S=b.reverse().reduce((P,I)=>P[I],n),y=A}if(_===YR+"remove")if(w&&w.constructor){var d;_=new w.constructor(...(d=l.args)!=null?d:[])}else if(S.constructor){var p;const A=new S.constructor(...(p=S.__r3f.memoizedProps.args)!=null?p:[]);_=A[w],A.dispose&&A.dispose()}else _=0;if(M)_?s.handlers[y]=_:delete s.handlers[y],s.eventCount=Object.keys(s.handlers).length;else if(w&&w.set&&(w.copy||w instanceof Ua)){if(Array.isArray(_))w.fromArray?w.fromArray(_):w.set(..._);else if(w.copy&&_&&_.constructor&&w.constructor.name===_.constructor.name)w.copy(_);else if(_!==void 0){const A=w instanceof Fe;!A&&w.setScalar?w.setScalar(_):w instanceof Ua&&_ instanceof Ua?w.mask=_.mask:w.set(_),!("ColorManagement"in Gm)&&!a.linear&&A&&w.convertSRGBToLinear()}}else S[y]=_,!a.linear&&S[y]instanceof fn&&(S[y].encoding=zt);Wl(n)}if(s.parent&&a.internal&&n.raycast&&h!==s.eventCount){const v=a.internal.interaction.indexOf(n);v>-1&&a.internal.interaction.splice(v,1),s.eventCount&&a.internal.interaction.push(n)}return f.length&&(r=n.__r3f)!=null&&r.parent&&__(n),n}function Wl(n){var e,t;const i=(e=n.__r3f)==null||(t=e.root)==null||t.getState==null?void 0:t.getState();i&&i.internal.frames===0&&i.invalidate()}function __(n){n.onUpdate==null||n.onUpdate(n)}function x9(n,e){n.manual||(GR(n)?(n.left=e.width/-2,n.right=e.width/2,n.top=e.height/2,n.bottom=e.height/-2):n.aspect=e.width/e.height,n.updateProjectionMatrix(),n.updateMatrixWorld())}function _9(n,e,t){const i=t.pop(),r=t.reduce((s,o)=>s[o],n);return r[i]=e}function Up(n){return(n.eventObject||n.object).uuid+"/"+n.index+n.instanceId}function S9(){var n;const e=typeof self<"u"&&self||typeof window<"u"&&window;if(!e)return fu.DefaultEventPriority;switch((n=e.event)==null?void 0:n.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return fu.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return fu.ContinuousEventPriority;default:return fu.DefaultEventPriority}}function JR(n,e,t,i){const r=t.get(e);r&&(t.delete(e),t.size===0&&(n.delete(i),r.target.releasePointerCapture(i)))}function w9(n,e){const{internal:t}=n.getState();t.interaction=t.interaction.filter(i=>i!==e),t.initialHits=t.initialHits.filter(i=>i!==e),t.hovered.forEach((i,r)=>{(i.eventObject===e||i.object===e)&&t.hovered.delete(r)}),t.capturedMap.forEach((i,r)=>{JR(t.capturedMap,e,i,r)})}function M9(n){function e(l){const{internal:f}=n.getState(),h=l.offsetX-f.initialClick[0],d=l.offsetY-f.initialClick[1];return Math.round(Math.sqrt(h*h+d*d))}function t(l){return l.filter(f=>["Move","Over","Enter","Out","Leave"].some(h=>{var d;return(d=f.__r3f)==null?void 0:d.handlers["onPointer"+h]}))}function i(l,f){const h=n.getState(),d=new Set,p=[],v=f?f(h.internal.interaction):h.internal.interaction;for(let m=0;m{const w=Nc(m.object),A=Nc(S.object);return!w||!A?m.distance-S.distance:A.events.priority-w.events.priority||m.distance-S.distance}).filter(m=>{const S=Up(m);return d.has(S)?!1:(d.add(S),!0)});h.events.filter&&(_=h.events.filter(_,h));for(const m of _){let S=m.object;for(;S;){var M;(M=S.__r3f)!=null&&M.eventCount&&p.push({...m,eventObject:S}),S=S.parent}}if("pointerId"in l&&h.internal.capturedMap.has(l.pointerId))for(let m of h.internal.capturedMap.get(l.pointerId).values())d.has(Up(m.intersection))||p.push(m.intersection);return p}function r(l,f,h,d){const p=n.getState();if(l.length){const v={stopped:!1};for(const y of l){const _=Nc(y.object)||p,{raycaster:M,pointer:m,camera:S,internal:w}=_,A=new N(m.x,m.y,0).unproject(S),b=R=>{var W,J;return(W=(J=w.capturedMap.get(R))==null?void 0:J.has(y.eventObject))!=null?W:!1},P=R=>{const W={intersection:y,target:f.target};w.capturedMap.has(R)?w.capturedMap.get(R).set(y.eventObject,W):w.capturedMap.set(R,new Map([[y.eventObject,W]])),f.target.setPointerCapture(R)},I=R=>{const W=w.capturedMap.get(R);W&&JR(w.capturedMap,y.eventObject,W,R)};let L={};for(let R in f){let W=f[R];typeof W!="function"&&(L[R]=W)}let C={...y,...L,pointer:m,intersections:l,stopped:v.stopped,delta:h,unprojectedPoint:A,ray:M.ray,camera:S,stopPropagation(){const R="pointerId"in f&&w.capturedMap.get(f.pointerId);if((!R||R.has(y.eventObject))&&(C.stopped=v.stopped=!0,w.hovered.size&&Array.from(w.hovered.values()).find(W=>W.eventObject===y.eventObject))){const W=l.slice(0,l.indexOf(y));s([...W,y])}},target:{hasPointerCapture:b,setPointerCapture:P,releasePointerCapture:I},currentTarget:{hasPointerCapture:b,setPointerCapture:P,releasePointerCapture:I},nativeEvent:f};if(d(C),v.stopped===!0)break}}return l}function s(l){const{internal:f}=n.getState();for(const h of f.hovered.values())if(!l.length||!l.find(d=>d.object===h.object&&d.index===h.index&&d.instanceId===h.instanceId)){const p=h.eventObject.__r3f,v=p==null?void 0:p.handlers;if(f.hovered.delete(Up(h)),p!=null&&p.eventCount){const y={...h,intersections:l};v.onPointerOut==null||v.onPointerOut(y),v.onPointerLeave==null||v.onPointerLeave(y)}}}function o(l,f){for(let h=0;hs([]);case"onLostPointerCapture":return f=>{const{internal:h}=n.getState();"pointerId"in f&&h.capturedMap.has(f.pointerId)&&(h.capturedMap.delete(f.pointerId),s([]))}}return function(h){const{onPointerMissed:d,internal:p}=n.getState();p.lastEvent.current=h;const v=l==="onPointerMove",y=l==="onClick"||l==="onContextMenu"||l==="onDoubleClick",M=i(h,v?t:void 0),m=y?e(h):0;l==="onPointerDown"&&(p.initialClick=[h.offsetX,h.offsetY],p.initialHits=M.map(w=>w.eventObject)),y&&!M.length&&m<=2&&(o(h,p.interaction),d&&d(h)),v&&s(M);function S(w){const A=w.eventObject,b=A.__r3f,P=b==null?void 0:b.handlers;if(b!=null&&b.eventCount)if(v){if(P.onPointerOver||P.onPointerEnter||P.onPointerOut||P.onPointerLeave){const I=Up(w),L=p.hovered.get(I);L?L.stopped&&w.stopPropagation():(p.hovered.set(I,w),P.onPointerOver==null||P.onPointerOver(w),P.onPointerEnter==null||P.onPointerEnter(w))}P.onPointerMove==null||P.onPointerMove(w)}else{const I=P[l];I?(!y||p.initialHits.includes(A))&&(o(h,p.interaction.filter(L=>!p.initialHits.includes(L))),I(w)):y&&p.initialHits.includes(A)&&o(h,p.interaction.filter(L=>!p.initialHits.includes(L)))}}r(M,h,m,S)}}return{handlePointer:a}}let S_={},A9=n=>void(S_={...S_,...n});function E9(n,e){function t(h,{args:d=[],attach:p,...v},y){let _=`${h[0].toUpperCase()}${h.slice(1)}`,M;if(h==="primitive"){if(v.object===void 0)throw new Error("R3F: Primitives without 'object' are invalid!");const m=v.object;M=Hl(m,{type:h,root:y,attach:p,primitive:!0})}else{const m=S_[_];if(!m)throw new Error(`R3F: ${_} is not part of the THREE namespace! Did you forget to extend? See: https://docs.pmnd.rs/react-three-fiber/api/objects#using-3rd-party-objects-declaratively`);if(!Array.isArray(d))throw new Error("R3F: The args prop must be an array!");M=Hl(new m(...d),{type:h,root:y,attach:p,memoizedProps:{args:d}})}return M.__r3f.attach===void 0&&(M instanceof dt?M.__r3f.attach="geometry":M instanceof Yn&&(M.__r3f.attach="material")),_!=="inject"&&cy(M,v),M}function i(h,d){let p=!1;if(d){var v,y;(v=d.__r3f)!=null&&v.attach?uy(h,d,d.__r3f.attach):d.isObject3D&&h.isObject3D&&(h.add(d),p=!0),p||(y=h.__r3f)==null||y.objects.push(d),d.__r3f||Hl(d,{}),d.__r3f.parent=h,__(d),Wl(d)}}function r(h,d,p){let v=!1;if(d){var y,_;if((y=d.__r3f)!=null&&y.attach)uy(h,d,d.__r3f.attach);else if(d.isObject3D&&h.isObject3D){d.parent=h,d.dispatchEvent({type:"added"});const M=h.children.filter(S=>S!==d),m=M.indexOf(p);h.children=[...M.slice(0,m),d,...M.slice(m)],v=!0}v||(_=h.__r3f)==null||_.objects.push(d),d.__r3f||Hl(d,{}),d.__r3f.parent=h,__(d),Wl(d)}}function s(h,d,p=!1){h&&[...h].forEach(v=>o(d,v,p))}function o(h,d,p){if(d){var v,y,_;if(d.__r3f&&(d.__r3f.parent=null),(v=h.__r3f)!=null&&v.objects&&(h.__r3f.objects=h.__r3f.objects.filter(A=>A!==d)),(y=d.__r3f)!=null&&y.attach)MT(h,d,d.__r3f.attach);else if(d.isObject3D&&h.isObject3D){var M;h.remove(d),(M=d.__r3f)!=null&&M.root&&w9(d.__r3f.root,d)}const S=(_=d.__r3f)==null?void 0:_.primitive,w=p===void 0?d.dispose!==null&&!S:p;if(!S){var m;s((m=d.__r3f)==null?void 0:m.objects,d,w),s(d.children,d,w)}d.__r3f&&(delete d.__r3f.root,delete d.__r3f.objects,delete d.__r3f.handlers,delete d.__r3f.memoizedProps,S||delete d.__r3f),w&&d.dispose&&d.type!=="Scene"&&xT.unstable_scheduleCallback(xT.unstable_IdlePriority,()=>{try{d.dispose()}catch{}}),Wl(h)}}function a(h,d,p,v){var y;const _=(y=h.__r3f)==null?void 0:y.parent;if(!_)return;const M=t(d,p,h.__r3f.root);if(h.children){for(const m of h.children)m.__r3f&&i(M,m);h.children=h.children.filter(m=>!m.__r3f)}h.__r3f.objects.forEach(m=>i(M,m)),h.__r3f.objects=[],o(_,h),i(_,M),M.raycast&&M.__r3f.eventCount&&M.__r3f.root.getState().internal.interaction.push(M),[v,v.alternate].forEach(m=>{m!==null&&(m.stateNode=M,m.ref&&(typeof m.ref=="function"?m.ref(M):m.ref.current=M))})}const l=()=>console.warn("Text is not allowed in the R3F tree! This could be stray whitespace or characters.");return{reconciler:c9({createInstance:t,removeChild:o,appendChild:i,appendInitialChild:i,insertBefore:r,supportsMutation:!0,isPrimaryRenderer:!1,supportsPersistence:!1,supportsHydration:!1,noTimeout:-1,appendChildToContainer:(h,d)=>{if(!d)return;const p=h.getState().scene;p.__r3f&&(p.__r3f.root=h,i(p,d))},removeChildFromContainer:(h,d)=>{d&&o(h.getState().scene,d)},insertInContainerBefore:(h,d,p)=>{if(!d||!p)return;const v=h.getState().scene;v.__r3f&&r(v,d,p)},getRootHostContext:()=>null,getChildHostContext:h=>h,finalizeInitialChildren(h){var d;return!!((d=h==null?void 0:h.__r3f)!=null?d:{}).handlers},prepareUpdate(h,d,p,v){if(h.__r3f.primitive&&v.object&&v.object!==h)return[!0];{const{args:y=[],children:_,...M}=v,{args:m=[],children:S,...w}=p;if(!Array.isArray(y))throw new Error("R3F: the args prop must be an array!");if(y.some((b,P)=>b!==m[P]))return[!0];const A=ZR(h,M,w,!0);return A.changes.length?[!1,A]:null}},commitUpdate(h,[d,p],v,y,_,M){d?a(h,v,_,M):cy(h,p)},commitMount(h,d,p,v){var y;const _=(y=h.__r3f)!=null?y:{};h.raycast&&_.handlers&&_.eventCount&&h.__r3f.root.getState().internal.interaction.push(h)},getPublicInstance:h=>h,prepareForCommit:()=>null,preparePortalMount:h=>Hl(h.getState().scene),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance(h){var d;const{attach:p,parent:v}=(d=h.__r3f)!=null?d:{};p&&v&&MT(v,h,p),h.isObject3D&&(h.visible=!1),Wl(h)},unhideInstance(h,d){var p;const{attach:v,parent:y}=(p=h.__r3f)!=null?p:{};v&&y&&uy(y,h,v),(h.isObject3D&&d.visible==null||d.visible)&&(h.visible=!0),Wl(h)},createTextInstance:l,hideTextInstance:l,unhideTextInstance:l,getCurrentEventPriority:()=>e?e():fu.DefaultEventPriority,beforeActiveInstanceBlur:()=>{},afterActiveInstanceBlur:()=>{},detachDeletedInstance:()=>{},now:typeof performance<"u"&&un.fun(performance.now)?performance.now:un.fun(Date.now)?Date.now:()=>0,scheduleTimeout:un.fun(setTimeout)?setTimeout:void 0,cancelTimeout:un.fun(clearTimeout)?clearTimeout:void 0}),applyProps:cy}}const KR=n=>!!(n!=null&&n.render),QR=V.createContext(null),b9=(n,e)=>{const t=zR((a,l)=>{const f=new N,h=new N,d=new N;function p(m=l().camera,S=h,w=l().size){const{width:A,height:b,top:P,left:I}=w,L=A/b;S instanceof N?d.copy(S):d.set(...S);const C=m.getWorldPosition(f).distanceTo(d);if(GR(m))return{width:A/m.zoom,height:b/m.zoom,top:P,left:I,factor:1,distance:C,aspect:L};{const R=m.fov*Math.PI/180,W=2*Math.tan(R/2)*C,J=W*(A/b);return{width:J,height:W,top:P,left:I,factor:A/J,distance:C,aspect:L}}}let v;const y=m=>a(S=>({performance:{...S.performance,current:m}})),_=new ye;return{set:a,get:l,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},xr:null,invalidate:(m=1)=>n(l(),m),advance:(m,S)=>e(m,S,l()),legacy:!1,linear:!1,flat:!1,scene:Hl(new fS),controls:null,clock:new LS,pointer:_,mouse:_,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{const m=l();v&&clearTimeout(v),m.performance.current!==m.performance.min&&y(m.performance.min),v=setTimeout(()=>y(l().performance.max),m.performance.debounce)}},size:{width:0,height:0,top:0,left:0,updateStyle:!1},viewport:{initialDpr:0,dpr:0,width:0,height:0,top:0,left:0,aspect:0,distance:0,factor:0,getCurrentViewport:p},setEvents:m=>a(S=>({...S,events:{...S.events,...m}})),setSize:(m,S,w,A,b)=>{const P=l().camera,I={width:m,height:S,top:A||0,left:b||0,updateStyle:w};a(L=>({size:I,viewport:{...L.viewport,...p(P,h,I)}}))},setDpr:m=>a(S=>{const w=qR(m);return{viewport:{...S.viewport,dpr:w,initialDpr:S.viewport.initialDpr||w}}}),setFrameloop:(m="always")=>{const S=l().clock;S.stop(),S.elapsedTime=0,m!=="never"&&(S.start(),S.elapsedTime=0),a(()=>({frameloop:m}))},previousRoot:void 0,internal:{active:!1,priority:0,frames:0,lastEvent:V.createRef(),interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,subscribe:(m,S,w)=>{const A=l().internal;return A.priority=A.priority+(S>0?1:0),A.subscribers.push({ref:m,priority:S,store:w}),A.subscribers=A.subscribers.sort((b,P)=>b.priority-P.priority),()=>{const b=l().internal;b!=null&&b.subscribers&&(b.priority=b.priority-(S>0?1:0),b.subscribers=b.subscribers.filter(P=>P.ref!==m))}}}}}),i=t.getState();let r=i.size,s=i.viewport.dpr,o=i.camera;return t.subscribe(()=>{const{camera:a,size:l,viewport:f,gl:h,set:d}=t.getState();(l!==r||f.dpr!==s)&&(r=l,s=f.dpr,x9(a,l),h.setPixelRatio(f.dpr),h.setSize(l.width,l.height,l.updateStyle)),a!==o&&(o=a,d(p=>({viewport:{...p.viewport,...p.viewport.getCurrentViewport(a)}})))}),t.subscribe(a=>n(a)),t};let zp,T9=new Set,C9=new Set,P9=new Set;function fy(n,e){if(n.size)for(const{callback:t}of n.values())t(e)}function Oc(n,e){switch(n){case"before":return fy(T9,e);case"after":return fy(C9,e);case"tail":return fy(P9,e)}}let hy,dy;function py(n,e,t){let i=e.clock.getDelta();for(e.frameloop==="never"&&typeof n=="number"&&(i=n-e.clock.elapsedTime,e.clock.oldTime=e.clock.elapsedTime,e.clock.elapsedTime=n),hy=e.internal.subscribers,zp=0;zp0)&&!((f=r.gl.xr)!=null&&f.isPresenting)&&(t+=py(l,r))}if(Oc("after",l),t===0)return Oc("tail",l),e=!1,cancelAnimationFrame(i)}function o(l,f=1){var h;if(!l)return n.forEach(d=>o(d.store.getState()),f);(h=l.gl.xr)!=null&&h.isPresenting||!l.internal.active||l.frameloop==="never"||(l.internal.frames=Math.min(60,l.internal.frames+f),e||(e=!0,requestAnimationFrame(s)))}function a(l,f=!0,h,d){if(f&&Oc("before",l),h)py(l,h,d);else for(const p of n.values())py(l,p.store.getState());f&&Oc("after",l)}return{loop:s,invalidate:o,advance:a}}function $R(){const n=V.useContext(QR);if(!n)throw new Error("R3F: Hooks can only be used within the Canvas component!");return n}function Bi(n=t=>t,e){return $R()(n,e)}function kS(n,e=0){const t=$R(),i=t.getState().internal.subscribe,r=jR(n);return Ph(()=>i(r,e,t),[e,i,t]),null}function eI(n,e){return function(t,...i){const r=new t;return n&&n(r),Promise.all(i.map(s=>new Promise((o,a)=>r.load(s,l=>{l.scene&&Object.assign(l,v9(l.scene)),o(l)},e,l=>a(new Error(`Could not load ${s}: ${l.message})`))))))}}function Lh(n,e,t,i){const r=Array.isArray(e)?e:[e],s=f9(eI(t,i),[n,...r],{equal:un.equ});return Array.isArray(e)?s:s[0]}Lh.preload=function(n,e,t){const i=Array.isArray(e)?e:[e];return h9(eI(t),[n,...i])};Lh.clear=function(n,e){const t=Array.isArray(e)?e:[e];return d9([n,...t])};const ku=new Map,{invalidate:AT,advance:ET}=L9(ku),{reconciler:jm,applyProps:So}=E9(ku,S9),Vl={objects:"shallow",strict:!1},R9=(n,e)=>{const t=typeof n=="function"?n(e):n;return KR(t)?t:new cS({powerPreference:"high-performance",canvas:e,antialias:!0,alpha:!0,...n})};function I9(n){return n instanceof HTMLCanvasElement}function D9(n,e){if(e)return e;if(I9(n)&&n.parentElement){const{width:t,height:i,top:r,left:s}=n.parentElement.getBoundingClientRect();return{width:t,height:i,top:r,left:s}}return{width:0,height:0,top:0,left:0}}function k9(n){const e=ku.get(n),t=e==null?void 0:e.fiber,i=e==null?void 0:e.store;e&&console.warn("R3F.createRoot should only be called once!");const r=typeof reportError=="function"?reportError:console.error,s=i||b9(AT,ET),o=t||jm.createContainer(s,fu.ConcurrentRoot,null,!1,null,"",r,null);e||ku.set(n,{fiber:o,store:s});let a,l=!1;return{configure(f={}){let{gl:h,size:d,events:p,onCreated:v,shadows:y=!1,linear:_=!1,flat:M=!1,legacy:m=!1,orthographic:S=!1,frameloop:w="always",dpr:A=[1,2],performance:b,raycaster:P,camera:I,onPointerMissed:L}=f,C=s.getState(),R=C.gl;C.gl||C.set({gl:R=R9(h,n)});let W=C.raycaster;W||C.set({raycaster:W=new NR});const{params:J,...j}=P||{};if(un.equ(j,W,Vl)||So(W,{...j}),un.equ(J,W.params,Vl)||So(W,{params:{...W.params,...J}}),!C.camera){const ae=I instanceof ph,D=ae?I:S?new ts(0,0,0,0,.1,1e3):new Wt(75,0,.1,1e3);ae||(D.position.z=5,I&&So(D,I),I!=null&&I.rotation||D.lookAt(0,0,0)),C.set({camera:D})}if(!C.xr){const ae=(B,te)=>{const $=s.getState();$.frameloop!=="never"&&ET(B,!0,$,te)},D=()=>{const B=s.getState();B.gl.xr.enabled=B.gl.xr.isPresenting,B.gl.xr.setAnimationLoop(B.gl.xr.isPresenting?ae:null),B.gl.xr.isPresenting||AT(B)},H={connect(){const B=s.getState().gl;B.xr.addEventListener("sessionstart",D),B.xr.addEventListener("sessionend",D)},disconnect(){const B=s.getState().gl;B.xr.removeEventListener("sessionstart",D),B.xr.removeEventListener("sessionend",D)}};R.xr&&H.connect(),C.set({xr:H})}if(R.shadowMap){const ae=un.boo(y);if(ae&&R.shadowMap.enabled!==y||!un.equ(y,R.shadowMap,Vl)){const D=R.shadowMap.enabled;R.shadowMap.enabled=!!y,ae?R.shadowMap.type=X1:Object.assign(R.shadowMap,y),D!==R.shadowMap.enabled&&(R.shadowMap.needsUpdate=!0)}}"ColorManagement"in Gm&&_9(Gm,m,["ColorManagement","legacyMode"]);const X=_?Bs:zt,Z=M?kr:Z1;R.outputEncoding!==X&&(R.outputEncoding=X),R.toneMapping!==Z&&(R.toneMapping=Z),C.legacy!==m&&C.set(()=>({legacy:m})),C.linear!==_&&C.set(()=>({linear:_})),C.flat!==M&&C.set(()=>({flat:M})),h&&!un.fun(h)&&!KR(h)&&!un.equ(h,R,Vl)&&So(R,h),p&&!C.events.handlers&&C.set({events:p(s)}),A&&C.viewport.dpr!==qR(A)&&C.setDpr(A);const se=D9(n,d);return un.equ(se,C.size,Vl)||C.setSize(se.width,se.height,se.updateStyle,se.top,se.left),C.frameloop!==w&&C.setFrameloop(w),C.onPointerMissed||C.set({onPointerMissed:L}),b&&!un.equ(b,C.performance,Vl)&&C.set(ae=>({performance:{...ae.performance,...b}})),a=v,l=!0,this},render(f){return l||this.configure(),jm.updateContainer(V.createElement(N9,{store:s,children:f,onCreated:a,rootElement:n}),o,null,()=>{}),s},unmount(){tI(n)}}}function N9({store:n,children:e,onCreated:t,rootElement:i}){return Ph(()=>{const r=n.getState();r.set(s=>({internal:{...s.internal,active:!0}})),t&&t(r),n.getState().events.connected||r.events.connect==null||r.events.connect(i)},[]),V.createElement(QR.Provider,{value:n},e)}function tI(n,e){const t=ku.get(n),i=t==null?void 0:t.fiber;if(i){const r=t==null?void 0:t.store.getState();r&&(r.internal.active=!1),jm.updateContainer(null,i,null,()=>{r&&setTimeout(()=>{try{var s,o,a,l;r.events.disconnect==null||r.events.disconnect(),(s=r.gl)==null||(o=s.renderLists)==null||o.dispose==null||o.dispose(),(a=r.gl)==null||a.forceContextLoss==null||a.forceContextLoss(),(l=r.gl)!=null&&l.xr&&r.xr.disconnect(),y9(r),ku.delete(n),e&&e(n)}catch{}},500)})}}jm.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:V.version});function Za(){return Za=Object.assign?Object.assign.bind():function(n){for(var e=1;e=0?i=setTimeout(l,e-h):(i=null,t||(a=n.apply(s,r),s=r=null))}var f=function(){s=this,r=arguments,o=Date.now();var h=t&&!i;return i||(i=setTimeout(l,e)),h&&(a=n.apply(s,r),s=r=null),a};return f.clear=function(){i&&(clearTimeout(i),i=null)},f.flush=function(){i&&(a=n.apply(s,r),s=r=null,clearTimeout(i),i=null)},f}w_.debounce=w_;var O9=w_;const bT=A_(O9);function U9(n){let{debounce:e,scroll:t,polyfill:i,offsetSize:r}=n===void 0?{debounce:0,scroll:!1,offsetSize:!1}:n;const s=i||(typeof window>"u"?class{}:window.ResizeObserver);if(!s)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[o,a]=V.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),l=V.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:o}),f=e?typeof e=="number"?e:e.scroll:null,h=e?typeof e=="number"?e:e.resize:null,d=V.useRef(!1);V.useEffect(()=>(d.current=!0,()=>void(d.current=!1)));const[p,v,y]=V.useMemo(()=>{const S=()=>{if(!l.current.element)return;const{left:w,top:A,width:b,height:P,bottom:I,right:L,x:C,y:R}=l.current.element.getBoundingClientRect(),W={left:w,top:A,width:b,height:P,bottom:I,right:L,x:C,y:R};l.current.element instanceof HTMLElement&&r&&(W.height=l.current.element.offsetHeight,W.width=l.current.element.offsetWidth),Object.freeze(W),d.current&&!V9(l.current.lastBounds,W)&&a(l.current.lastBounds=W)};return[S,h?bT(S,h):S,f?bT(S,f):S]},[a,r,f,h]);function _(){l.current.scrollContainers&&(l.current.scrollContainers.forEach(S=>S.removeEventListener("scroll",y,!0)),l.current.scrollContainers=null),l.current.resizeObserver&&(l.current.resizeObserver.disconnect(),l.current.resizeObserver=null)}function M(){l.current.element&&(l.current.resizeObserver=new s(y),l.current.resizeObserver.observe(l.current.element),t&&l.current.scrollContainers&&l.current.scrollContainers.forEach(S=>S.addEventListener("scroll",y,{capture:!0,passive:!0})))}const m=S=>{!S||S===l.current.element||(_(),l.current.element=S,l.current.scrollContainers=nI(S),M())};return F9(y,!!t),z9(v),V.useEffect(()=>{_(),M()},[t,y,v]),V.useEffect(()=>_,[]),[m,o,p]}function z9(n){V.useEffect(()=>{const e=n;return window.addEventListener("resize",e),()=>void window.removeEventListener("resize",e)},[n])}function F9(n,e){V.useEffect(()=>{if(e){const t=n;return window.addEventListener("scroll",t,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",t,!0)}},[n,e])}function nI(n){const e=[];if(!n||n===document.body)return e;const{overflow:t,overflowX:i,overflowY:r}=window.getComputedStyle(n);return[t,i,r].some(s=>s==="auto"||s==="scroll")&&e.push(n),[...e,...nI(n.parentElement)]}const B9=["x","y","top","bottom","left","right","width","height"],V9=(n,e)=>B9.every(t=>n[t]===e[t]);var H9=Object.defineProperty,W9=Object.defineProperties,G9=Object.getOwnPropertyDescriptors,TT=Object.getOwnPropertySymbols,j9=Object.prototype.hasOwnProperty,X9=Object.prototype.propertyIsEnumerable,CT=(n,e,t)=>e in n?H9(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,PT=(n,e)=>{for(var t in e||(e={}))j9.call(e,t)&&CT(n,t,e[t]);if(TT)for(var t of TT(e))X9.call(e,t)&&CT(n,t,e[t]);return n},Y9=(n,e)=>W9(n,G9(e));function iI(n,e,t){if(!n)return;if(t(n)===!0)return n;let i=e?n.return:n.child;for(;i;){const r=iI(i,e,t);if(r)return r;i=e?null:i.sibling}}function rI(n){try{return Object.defineProperties(n,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return n}}const NS=rI(V.createContext(null));class sI extends V.Component{render(){return V.createElement(NS.Provider,{value:this._reactInternals},this.props.children)}}const{ReactCurrentOwner:LT,ReactCurrentDispatcher:RT}=V.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function q9(){const n=V.useContext(NS);if(n===null)throw new Error("its-fine: useFiber must be called within a !");const e=V.useId();return V.useMemo(()=>{var i;return(i=LT==null?void 0:LT.current)!=null?i:iI(n,!1,r=>{let s=r.memoizedState;for(;s;){if(s.memoizedState===e)return!0;s=s.next}})},[n,e])}function Z9(){var n,e;const t=q9(),[i]=V.useState(()=>new Map);i.clear();let r=t;for(;r;){const s=(n=r.type)==null?void 0:n._context;s&&s!==NS&&!i.has(s)&&i.set(s,(e=RT==null?void 0:RT.current)==null?void 0:e.readContext(rI(s))),r=r.return}return i}function J9(){const n=Z9();return V.useMemo(()=>Array.from(n.keys()).reduce((e,t)=>i=>V.createElement(e,null,V.createElement(t.Provider,Y9(PT({},i),{value:n.get(t)}))),e=>V.createElement(sI,PT({},e))),[n])}const my={onClick:["click",!1],onContextMenu:["contextmenu",!1],onDoubleClick:["dblclick",!1],onWheel:["wheel",!0],onPointerDown:["pointerdown",!0],onPointerUp:["pointerup",!0],onPointerLeave:["pointerleave",!0],onPointerMove:["pointermove",!0],onPointerCancel:["pointercancel",!0],onLostPointerCapture:["lostpointercapture",!0]};function K9(n){const{handlePointer:e}=M9(n);return{priority:1,enabled:!0,compute(t,i,r){i.pointer.set(t.offsetX/i.size.width*2-1,-(t.offsetY/i.size.height)*2+1),i.raycaster.setFromCamera(i.pointer,i.camera)},connected:void 0,handlers:Object.keys(my).reduce((t,i)=>({...t,[i]:e(i)}),{}),connect:t=>{var i;const{set:r,events:s}=n.getState();s.disconnect==null||s.disconnect(),r(o=>({events:{...o.events,connected:t}})),Object.entries((i=s.handlers)!=null?i:[]).forEach(([o,a])=>{const[l,f]=my[o];t.addEventListener(l,a,{passive:f})})},disconnect:()=>{const{set:t,events:i}=n.getState();if(i.connected){var r;Object.entries((r=i.handlers)!=null?r:[]).forEach(([s,o])=>{if(i&&i.connected instanceof HTMLElement){const[a]=my[s];i.connected.removeEventListener(a,o)}}),t(s=>({events:{...s.events,connected:void 0}}))}}}}const Q9=V.forwardRef(function({children:e,fallback:t,resize:i,style:r,gl:s,events:o=K9,eventSource:a,eventPrefix:l,shadows:f,linear:h,flat:d,legacy:p,orthographic:v,frameloop:y,dpr:_,performance:M,raycaster:m,camera:S,onPointerMissed:w,onCreated:A,...b},P){V.useMemo(()=>A9(Gm),[]);const I=J9(),[L,C]=U9({scroll:!0,debounce:{scroll:50,resize:0},...i}),R=V.useRef(null),W=V.useRef(null),[J,j]=V.useState(null);V.useImperativeHandle(P,()=>R.current);const X=jR(w),[Z,se]=V.useState(!1),[ae,D]=V.useState(!1);if(Z)throw Z;if(ae)throw ae;const H=V.useRef(null);C.width>0&&C.height>0&&J&&(H.current||(H.current=k9(J)),H.current.configure({gl:s,events:o,shadows:f,linear:h,flat:d,legacy:p,orthographic:v,frameloop:y,dpr:_,performance:M,raycaster:m,camera:S,size:C,onPointerMissed:(...te)=>X.current==null?void 0:X.current(...te),onCreated:te=>{te.events.connect==null||te.events.connect(a?p9(a)?a.current:a:W.current),l&&te.setEvents({compute:($,ee)=>{const ue=$[l+"X"],Ee=$[l+"Y"];ee.pointer.set(ue/ee.size.width*2-1,-(Ee/ee.size.height)*2+1),ee.raycaster.setFromCamera(ee.pointer,ee.camera)}}),A==null||A(te)}}),H.current.render(V.createElement(I,null,V.createElement(XR,{set:D},V.createElement(V.Suspense,{fallback:V.createElement(m9,{set:se})},e))))),Ph(()=>{j(R.current)},[]),V.useEffect(()=>{if(J)return()=>tI(J)},[J]);const B=a?"none":"auto";return V.createElement("div",Za({ref:W,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:B,...r}},b),V.createElement("div",{ref:L,style:{width:"100%",height:"100%"}},V.createElement("canvas",{ref:R,style:{display:"block"}},t)))}),$9=V.forwardRef(function(e,t){return V.createElement(sI,null,V.createElement(Q9,Za({},e,{ref:t})))}),Rh=new N,OS=new N,e7=new N;function t7(n,e,t){const i=Rh.setFromMatrixPosition(n.matrixWorld);i.project(e);const r=t.width/2,s=t.height/2;return[i.x*r+r,-(i.y*s)+s]}function n7(n,e){const t=Rh.setFromMatrixPosition(n.matrixWorld),i=OS.setFromMatrixPosition(e.matrixWorld),r=t.sub(i),s=e.getWorldDirection(e7);return r.angleTo(s)>Math.PI/2}function i7(n,e,t,i){const r=Rh.setFromMatrixPosition(n.matrixWorld),s=r.clone();s.project(e),t.setFromCamera(s,e);const o=t.intersectObjects(i,!0);if(o.length){const a=o[0].distance;return r.distanceTo(t.ray.origin)Math.abs(n)<1e-10?0:n;function oI(n,e,t=""){let i="matrix3d(";for(let r=0;r!==16;r++)i+=M_(e[r]*n.elements[r])+(r!==15?",":")");return t+i}const o7=(n=>e=>oI(e,n))([1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1]),a7=(n=>(e,t)=>oI(e,n(t),"translate(-50%,-50%)"))(n=>[1/n,1/n,1/n,1,-1/n,-1/n,-1/n,-1,1/n,1/n,1/n,1,1,1,1,1]);function l7(n){return n&&typeof n=="object"&&"current"in n}const u7=V.forwardRef(({children:n,eps:e=.001,style:t,className:i,prepend:r,center:s,fullscreen:o,portal:a,distanceFactor:l,sprite:f=!1,transform:h=!1,occlude:d,onOcclude:p,castShadow:v,receiveShadow:y,material:_,geometry:M,zIndexRange:m=[16777271,0],calculatePosition:S=t7,as:w="div",wrapperClass:A,pointerEvents:b="auto",...P},I)=>{const{gl:L,camera:C,scene:R,size:W,raycaster:J,events:j,viewport:X}=Bi(),[Z]=V.useState(()=>document.createElement(w)),se=V.useRef(),ae=V.useRef(null),D=V.useRef(0),H=V.useRef([0,0]),B=V.useRef(null),te=V.useRef(null),$=(a==null?void 0:a.current)||j.connected||L.domElement.parentNode,ee=V.useRef(null),ue=V.useRef(!1),Ee=V.useMemo(()=>d&&d!=="blending"||Array.isArray(d)&&d.length&&l7(d[0]),[d]);V.useLayoutEffect(()=>{const xe=L.domElement;d&&d==="blending"?(xe.style.zIndex=`${Math.floor(m[0]/2)}`,xe.style.position="absolute",xe.style.pointerEvents="none"):(xe.style.zIndex=null,xe.style.position=null,xe.style.pointerEvents=null)},[d]),V.useLayoutEffect(()=>{if(ae.current){const xe=se.current=K2(Z);if(R.updateMatrixWorld(),h)Z.style.cssText="position:absolute;top:0;left:0;pointer-events:none;overflow:hidden;";else{const Me=S(ae.current,C,W);Z.style.cssText=`position:absolute;top:0;left:0;transform:translate3d(${Me[0]}px,${Me[1]}px,0);transform-origin:0 0;`}return $&&(r?$.prepend(Z):$.appendChild(Z)),()=>{$&&$.removeChild(Z),xe.unmount()}}},[$,h]),V.useLayoutEffect(()=>{A&&(Z.className=A)},[A]);const we=V.useMemo(()=>h?{position:"absolute",top:0,left:0,width:W.width,height:W.height,transformStyle:"preserve-3d",pointerEvents:"none"}:{position:"absolute",transform:s?"translate3d(-50%,-50%,0)":"none",...o&&{top:-W.height/2,left:-W.width/2,width:W.width,height:W.height},...t},[t,s,o,W,h]),Q=V.useMemo(()=>({position:"absolute",pointerEvents:b}),[b]);V.useLayoutEffect(()=>{if(ue.current=!1,h){var xe;(xe=se.current)==null||xe.render(V.createElement("div",{ref:B,style:we},V.createElement("div",{ref:te,style:Q},V.createElement("div",{ref:I,className:i,style:t,children:n}))))}else{var Me;(Me=se.current)==null||Me.render(V.createElement("div",{ref:I,style:we,className:i,children:n}))}});const Xe=V.useRef(!0);kS(xe=>{if(ae.current){C.updateMatrixWorld(),ae.current.updateWorldMatrix(!0,!1);const Me=h?H.current:S(ae.current,C,W);if(h||Math.abs(D.current-C.zoom)>e||Math.abs(H.current[0]-Me[0])>e||Math.abs(H.current[1]-Me[1])>e){const ge=n7(ae.current,C);let oe=!1;Ee&&(d!=="blending"?oe=[R]:Array.isArray(d)&&(oe=d.map(Ge=>Ge.current)));const _e=Xe.current;if(oe){const Ge=i7(ae.current,C,J,oe);Xe.current=Ge&&!ge}else Xe.current=!ge;_e!==Xe.current&&(p?p(!Xe.current):Z.style.display=Xe.current?"block":"none");const Ne=Math.floor(m[0]/2),Ie=d?Ee?[m[0],Ne]:[Ne-1,0]:m;if(Z.style.zIndex=`${s7(ae.current,C,Ie)}`,h){const[Ge,qe]=[W.width/2,W.height/2],je=C.projectionMatrix.elements[5]*qe,{isOrthographicCamera:nt,top:_t,left:z,bottom:k,right:le}=C,be=o7(C.matrixWorldInverse),Te=nt?`scale(${je})translate(${M_(-(le+z)/2)}px,${M_((_t+k)/2)}px)`:`translateZ(${je}px)`;let Re=ae.current.matrixWorld;f&&(Re=C.matrixWorldInverse.clone().transpose().copyPosition(Re).scale(ae.current.scale),Re.elements[3]=Re.elements[7]=Re.elements[11]=0,Re.elements[15]=1),Z.style.width=W.width+"px",Z.style.height=W.height+"px",Z.style.perspective=nt?"":`${je}px`,B.current&&te.current&&(B.current.style.transform=`${Te}${be}translate(${Ge}px,${qe}px)`,te.current.style.transform=a7(Re,1/((l||10)/400)))}else{const Ge=l===void 0?1:r7(ae.current,C)*l;Z.style.transform=`translate3d(${Me[0]}px,${Me[1]}px,0) scale(${Ge})`}H.current=Me,D.current=C.zoom}}if(!Ee&&ee.current&&!ue.current)if(h){if(B.current){const Me=B.current.children[0];if(Me!=null&&Me.clientWidth&&Me!=null&&Me.clientHeight){const{isOrthographicCamera:ge}=C;if(ge||M)P.scale&&(Array.isArray(P.scale)?P.scale instanceof N?ee.current.scale.copy(P.scale.clone().divideScalar(1)):ee.current.scale.set(1/P.scale[0],1/P.scale[1],1/P.scale[2]):ee.current.scale.setScalar(1/P.scale));else{const oe=(l||10)/400,_e=Me.clientWidth*oe,Ne=Me.clientHeight*oe;ee.current.scale.set(_e,Ne,1)}ue.current=!0}}}else{const Me=Z.children[0];if(Me!=null&&Me.clientWidth&&Me!=null&&Me.clientHeight){const ge=1/X.factor,oe=Me.clientWidth*ge,_e=Me.clientHeight*ge;ee.current.scale.set(oe,_e,1),ue.current=!0}ee.current.lookAt(xe.camera.position)}});const Ye=V.useMemo(()=>({vertexShader:h?void 0:` /* This shader is from the THREE's SpriteMaterial. We need to turn the backing plane into a Sprite @@ -3565,4 +3565,4 @@ No matching component was found for: void main() { gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); } - `}),[h]);return V.createElement("group",Za({},P,{ref:ae}),d&&!Ee&&V.createElement("mesh",{castShadow:v,receiveShadow:y,ref:ee},M||V.createElement("planeGeometry",null),_||V.createElement("shaderMaterial",{side:Rr,vertexShader:Ye.vertexShader,fragmentShader:Ye.fragmentShader})))});let Uc=0;const c7=zR(n=>(cu.onStart=(e,t,i)=>{n({active:!0,item:e,loaded:t,total:i,progress:(t-Uc)/(i-Uc)*100})},cu.onLoad=()=>{n({active:!1})},cu.onError=e=>n(t=>({errors:[...t.errors,e]})),cu.onProgress=(e,t,i)=>{t===i&&(Uc=i),n({active:!0,item:e,loaded:t,total:i,progress:(t-Uc)/(i-Uc)*100||100})},{errors:[],active:!1,progress:0,item:"",loaded:0,total:0}));function f7(n){return function(e){n.forEach(function(t){typeof t=="function"?t(e):t!=null&&(t.current=e)})}}function Jf(n){"@babel/helpers - typeof";return Jf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Jf(n)}function h7(n,e){if(Jf(n)!=="object"||n===null)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var i=t.call(n,e||"default");if(Jf(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function d7(n){var e=h7(n,"string");return Jf(e)==="symbol"?e:String(e)}function ut(n,e,t){return e=d7(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}const IT=(n,e)=>(n%e+e)%e;let p7=class extends rs{constructor(e,t){super(),ut(this,"object",void 0),ut(this,"domElement",void 0),ut(this,"enabled",!0),ut(this,"target",new N),ut(this,"minDistance",0),ut(this,"maxDistance",1/0),ut(this,"minZoom",0),ut(this,"maxZoom",1/0),ut(this,"minPolarAngle",0),ut(this,"maxPolarAngle",Math.PI),ut(this,"minAzimuthAngle",-1/0),ut(this,"maxAzimuthAngle",1/0),ut(this,"enableDamping",!1),ut(this,"dampingFactor",.05),ut(this,"enableZoom",!0),ut(this,"zoomSpeed",1),ut(this,"enableRotate",!0),ut(this,"rotateSpeed",1),ut(this,"enablePan",!0),ut(this,"panSpeed",1),ut(this,"screenSpacePanning",!0),ut(this,"keyPanSpeed",7),ut(this,"autoRotate",!1),ut(this,"autoRotateSpeed",2),ut(this,"reverseOrbit",!1),ut(this,"keys",{LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"}),ut(this,"mouseButtons",{LEFT:xa.ROTATE,MIDDLE:xa.DOLLY,RIGHT:xa.PAN}),ut(this,"touches",{ONE:_a.ROTATE,TWO:_a.DOLLY_PAN}),ut(this,"target0",void 0),ut(this,"position0",void 0),ut(this,"zoom0",void 0),ut(this,"_domElementKeyEvents",null),ut(this,"getPolarAngle",void 0),ut(this,"getAzimuthalAngle",void 0),ut(this,"setPolarAngle",void 0),ut(this,"setAzimuthalAngle",void 0),ut(this,"getDistance",void 0),ut(this,"listenToKeyEvents",void 0),ut(this,"saveState",void 0),ut(this,"reset",void 0),ut(this,"update",void 0),ut(this,"connect",void 0),ut(this,"dispose",void 0),this.object=e,this.domElement=t,this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object instanceof Wt?this.object.zoom:1,this.getPolarAngle=()=>h.phi,this.getAzimuthalAngle=()=>h.theta,this.setPolarAngle=G=>{let de=IT(G,2*Math.PI),Se=h.phi;Se<0&&(Se+=2*Math.PI),de<0&&(de+=2*Math.PI);let Pe=Math.abs(de-Se);2*Math.PI-Pe{let de=IT(G,2*Math.PI),Se=h.theta;Se<0&&(Se+=2*Math.PI),de<0&&(de+=2*Math.PI);let Pe=Math.abs(de-Se);2*Math.PI-Pei.object.position.distanceTo(i.target),this.listenToKeyEvents=G=>{G.addEventListener("keydown",le),this._domElementKeyEvents=G},this.saveState=()=>{i.target0.copy(i.target),i.position0.copy(i.object.position),i.zoom0=i.object instanceof Wt?i.object.zoom:1},this.reset=()=>{i.target.copy(i.target0),i.object.position.copy(i.position0),i.object instanceof Wt&&(i.object.zoom=i.zoom0,i.object.updateProjectionMatrix()),i.dispatchEvent(r),i.update(),l=a.NONE},this.update=(()=>{const G=new N,de=new ri().setFromUnitVectors(e.up,new N(0,1,0)),Se=de.clone().invert(),Pe=new N,Qe=new ri,ct=2*Math.PI;return function(){const Y=i.object.position;G.copy(Y).sub(i.target),G.applyQuaternion(de),h.setFromVector3(G),i.autoRotate&&l===a.NONE&&J(R()),i.enableDamping?(h.theta+=d.theta*i.dampingFactor,h.phi+=d.phi*i.dampingFactor):(h.theta+=d.theta,h.phi+=d.phi);let fe=i.minAzimuthAngle,Ae=i.maxAzimuthAngle;return isFinite(fe)&&isFinite(Ae)&&(fe<-Math.PI?fe+=ct:fe>Math.PI&&(fe-=ct),Ae<-Math.PI?Ae+=ct:Ae>Math.PI&&(Ae-=ct),fe<=Ae?h.theta=Math.max(fe,Math.min(Ae,h.theta)):h.theta=h.theta>(fe+Ae)/2?Math.max(fe,h.theta):Math.min(Ae,h.theta)),h.phi=Math.max(i.minPolarAngle,Math.min(i.maxPolarAngle,h.phi)),h.makeSafe(),h.radius*=p,h.radius=Math.max(i.minDistance,Math.min(i.maxDistance,h.radius)),i.enableDamping===!0?i.target.addScaledVector(v,i.dampingFactor):i.target.add(v),G.setFromSpherical(h),G.applyQuaternion(Se),Y.copy(i.target).add(G),i.object.lookAt(i.target),i.enableDamping===!0?(d.theta*=1-i.dampingFactor,d.phi*=1-i.dampingFactor,v.multiplyScalar(1-i.dampingFactor)):(d.set(0,0,0),v.set(0,0,0)),p=1,y||Pe.distanceToSquared(i.object.position)>f||8*(1-Qe.dot(i.object.quaternion))>f?(i.dispatchEvent(r),Pe.copy(i.object.position),Qe.copy(i.object.quaternion),y=!1,!0):!1}})(),this.connect=G=>{G===document&&console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'),i.domElement=G,i.domElement.style.touchAction="none",i.domElement.addEventListener("contextmenu",Re),i.domElement.addEventListener("pointerdown",Ge),i.domElement.addEventListener("pointercancel",nt),i.domElement.addEventListener("wheel",k)},this.dispose=()=>{var G,de,Se,Pe,Qe,ct;(G=i.domElement)===null||G===void 0||G.removeEventListener("contextmenu",Re),(de=i.domElement)===null||de===void 0||de.removeEventListener("pointerdown",Ge),(Se=i.domElement)===null||Se===void 0||Se.removeEventListener("pointercancel",nt),(Pe=i.domElement)===null||Pe===void 0||Pe.removeEventListener("wheel",k),(Qe=i.domElement)===null||Qe===void 0||Qe.ownerDocument.removeEventListener("pointermove",qe),(ct=i.domElement)===null||ct===void 0||ct.ownerDocument.removeEventListener("pointerup",je),i._domElementKeyEvents!==null&&i._domElementKeyEvents.removeEventListener("keydown",le)};const i=this,r={type:"change"},s={type:"start"},o={type:"end"},a={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let l=a.NONE;const f=1e-6,h=new y_,d=new y_;let p=1;const v=new N;let y=!1;const _=new ye,M=new ye,m=new ye,S=new ye,w=new ye,A=new ye,b=new ye,P=new ye,I=new ye,L=[],C={};function R(){return 2*Math.PI/60/60*i.autoRotateSpeed}function W(){return Math.pow(.95,i.zoomSpeed)}function J(G){i.reverseOrbit?d.theta+=G:d.theta-=G}function j(G){i.reverseOrbit?d.phi+=G:d.phi-=G}const X=(()=>{const G=new N;return function(Se,Pe){G.setFromMatrixColumn(Pe,0),G.multiplyScalar(-Se),v.add(G)}})(),Z=(()=>{const G=new N;return function(Se,Pe){i.screenSpacePanning===!0?G.setFromMatrixColumn(Pe,1):(G.setFromMatrixColumn(Pe,0),G.crossVectors(i.object.up,G)),G.multiplyScalar(Se),v.add(G)}})(),se=(()=>{const G=new N;return function(Se,Pe){const Qe=i.domElement;if(Qe&&i.object instanceof Wt&&i.object.isPerspectiveCamera){const ct=i.object.position;G.copy(ct).sub(i.target);let Nt=G.length();Nt*=Math.tan(i.object.fov/2*Math.PI/180),X(2*Se*Nt/Qe.clientHeight,i.object.matrix),Z(2*Pe*Nt/Qe.clientHeight,i.object.matrix)}else Qe&&i.object instanceof ts&&i.object.isOrthographicCamera?(X(Se*(i.object.right-i.object.left)/i.object.zoom/Qe.clientWidth,i.object.matrix),Z(Pe*(i.object.top-i.object.bottom)/i.object.zoom/Qe.clientHeight,i.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),i.enablePan=!1)}})();function ae(G){i.object instanceof Wt&&i.object.isPerspectiveCamera?p/=G:i.object instanceof ts&&i.object.isOrthographicCamera?(i.object.zoom=Math.max(i.minZoom,Math.min(i.maxZoom,i.object.zoom*G)),i.object.updateProjectionMatrix(),y=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),i.enableZoom=!1)}function D(G){i.object instanceof Wt&&i.object.isPerspectiveCamera?p*=G:i.object instanceof ts&&i.object.isOrthographicCamera?(i.object.zoom=Math.max(i.minZoom,Math.min(i.maxZoom,i.object.zoom/G)),i.object.updateProjectionMatrix(),y=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),i.enableZoom=!1)}function H(G){_.set(G.clientX,G.clientY)}function B(G){b.set(G.clientX,G.clientY)}function te(G){S.set(G.clientX,G.clientY)}function $(G){M.set(G.clientX,G.clientY),m.subVectors(M,_).multiplyScalar(i.rotateSpeed);const de=i.domElement;de&&(J(2*Math.PI*m.x/de.clientHeight),j(2*Math.PI*m.y/de.clientHeight)),_.copy(M),i.update()}function ee(G){P.set(G.clientX,G.clientY),I.subVectors(P,b),I.y>0?ae(W()):I.y<0&&D(W()),b.copy(P),i.update()}function ue(G){w.set(G.clientX,G.clientY),A.subVectors(w,S).multiplyScalar(i.panSpeed),se(A.x,A.y),S.copy(w),i.update()}function Ee(G){G.deltaY<0?D(W()):G.deltaY>0&&ae(W()),i.update()}function we(G){let de=!1;switch(G.code){case i.keys.UP:se(0,i.keyPanSpeed),de=!0;break;case i.keys.BOTTOM:se(0,-i.keyPanSpeed),de=!0;break;case i.keys.LEFT:se(i.keyPanSpeed,0),de=!0;break;case i.keys.RIGHT:se(-i.keyPanSpeed,0),de=!0;break}de&&(G.preventDefault(),i.update())}function Q(){if(L.length==1)_.set(L[0].pageX,L[0].pageY);else{const G=.5*(L[0].pageX+L[1].pageX),de=.5*(L[0].pageY+L[1].pageY);_.set(G,de)}}function Xe(){if(L.length==1)S.set(L[0].pageX,L[0].pageY);else{const G=.5*(L[0].pageX+L[1].pageX),de=.5*(L[0].pageY+L[1].pageY);S.set(G,de)}}function Ye(){const G=L[0].pageX-L[1].pageX,de=L[0].pageY-L[1].pageY,Se=Math.sqrt(G*G+de*de);b.set(0,Se)}function xe(){i.enableZoom&&Ye(),i.enablePan&&Xe()}function Me(){i.enableZoom&&Ye(),i.enableRotate&&Q()}function ge(G){if(L.length==1)M.set(G.pageX,G.pageY);else{const Se=He(G),Pe=.5*(G.pageX+Se.x),Qe=.5*(G.pageY+Se.y);M.set(Pe,Qe)}m.subVectors(M,_).multiplyScalar(i.rotateSpeed);const de=i.domElement;de&&(J(2*Math.PI*m.x/de.clientHeight),j(2*Math.PI*m.y/de.clientHeight)),_.copy(M)}function oe(G){if(L.length==1)w.set(G.pageX,G.pageY);else{const de=He(G),Se=.5*(G.pageX+de.x),Pe=.5*(G.pageY+de.y);w.set(Se,Pe)}A.subVectors(w,S).multiplyScalar(i.panSpeed),se(A.x,A.y),S.copy(w)}function _e(G){const de=He(G),Se=G.pageX-de.x,Pe=G.pageY-de.y,Qe=Math.sqrt(Se*Se+Pe*Pe);P.set(0,Qe),I.set(0,Math.pow(P.y/b.y,i.zoomSpeed)),ae(I.y),b.copy(P)}function Ne(G){i.enableZoom&&_e(G),i.enablePan&&oe(G)}function Ie(G){i.enableZoom&&_e(G),i.enableRotate&&ge(G)}function Ge(G){if(i.enabled!==!1){if(L.length===0){var de,Se;(de=i.domElement)===null||de===void 0||de.ownerDocument.addEventListener("pointermove",qe),(Se=i.domElement)===null||Se===void 0||Se.ownerDocument.addEventListener("pointerup",je)}et(G),G.pointerType==="touch"?be(G):_t(G)}}function qe(G){i.enabled!==!1&&(G.pointerType==="touch"?Te(G):z(G))}function je(G){if(ze(G),L.length===0){var de,Se,Pe;(de=i.domElement)===null||de===void 0||de.releasePointerCapture(G.pointerId),(Se=i.domElement)===null||Se===void 0||Se.ownerDocument.removeEventListener("pointermove",qe),(Pe=i.domElement)===null||Pe===void 0||Pe.ownerDocument.removeEventListener("pointerup",je)}i.dispatchEvent(o),l=a.NONE}function nt(G){ze(G)}function _t(G){let de;switch(G.button){case 0:de=i.mouseButtons.LEFT;break;case 1:de=i.mouseButtons.MIDDLE;break;case 2:de=i.mouseButtons.RIGHT;break;default:de=-1}switch(de){case xa.DOLLY:if(i.enableZoom===!1)return;B(G),l=a.DOLLY;break;case xa.ROTATE:if(G.ctrlKey||G.metaKey||G.shiftKey){if(i.enablePan===!1)return;te(G),l=a.PAN}else{if(i.enableRotate===!1)return;H(G),l=a.ROTATE}break;case xa.PAN:if(G.ctrlKey||G.metaKey||G.shiftKey){if(i.enableRotate===!1)return;H(G),l=a.ROTATE}else{if(i.enablePan===!1)return;te(G),l=a.PAN}break;default:l=a.NONE}l!==a.NONE&&i.dispatchEvent(s)}function z(G){if(i.enabled!==!1)switch(l){case a.ROTATE:if(i.enableRotate===!1)return;$(G);break;case a.DOLLY:if(i.enableZoom===!1)return;ee(G);break;case a.PAN:if(i.enablePan===!1)return;ue(G);break}}function k(G){i.enabled===!1||i.enableZoom===!1||l!==a.NONE&&l!==a.ROTATE||(G.preventDefault(),i.dispatchEvent(s),Ee(G),i.dispatchEvent(o))}function le(G){i.enabled===!1||i.enablePan===!1||we(G)}function be(G){switch(pe(G),L.length){case 1:switch(i.touches.ONE){case _a.ROTATE:if(i.enableRotate===!1)return;Q(),l=a.TOUCH_ROTATE;break;case _a.PAN:if(i.enablePan===!1)return;Xe(),l=a.TOUCH_PAN;break;default:l=a.NONE}break;case 2:switch(i.touches.TWO){case _a.DOLLY_PAN:if(i.enableZoom===!1&&i.enablePan===!1)return;xe(),l=a.TOUCH_DOLLY_PAN;break;case _a.DOLLY_ROTATE:if(i.enableZoom===!1&&i.enableRotate===!1)return;Me(),l=a.TOUCH_DOLLY_ROTATE;break;default:l=a.NONE}break;default:l=a.NONE}l!==a.NONE&&i.dispatchEvent(s)}function Te(G){switch(pe(G),l){case a.TOUCH_ROTATE:if(i.enableRotate===!1)return;ge(G),i.update();break;case a.TOUCH_PAN:if(i.enablePan===!1)return;oe(G),i.update();break;case a.TOUCH_DOLLY_PAN:if(i.enableZoom===!1&&i.enablePan===!1)return;Ne(G),i.update();break;case a.TOUCH_DOLLY_ROTATE:if(i.enableZoom===!1&&i.enableRotate===!1)return;Ie(G),i.update();break;default:l=a.NONE}}function Re(G){i.enabled!==!1&&G.preventDefault()}function et(G){L.push(G)}function ze(G){delete C[G.pointerId];for(let de=0;de0,b=j>0,P=X>0,I=(A?1:0)+(b?1:0)+(P?1:0),I){case 0:{m.push(_[w]),m.push(_[w+1]),m.push(_[w+2]);break}case 1:{if(A&&(L=_[w+1],C=_[w+2],R=y(_[w],L,M,S),W=y(_[w],C,M,S)),b){L=_[w],C=_[w+2],R=y(_[w+1],L,M,S),W=y(_[w+1],C,M,S),m.push(R),m.push(C.clone()),m.push(L.clone()),m.push(C.clone()),m.push(R.clone()),m.push(W);break}P&&(L=_[w],C=_[w+1],R=y(_[w+2],L,M,S),W=y(_[w+2],C,M,S)),m.push(L.clone()),m.push(C.clone()),m.push(R),m.push(W),m.push(R.clone()),m.push(C.clone());break}case 2:{A||(L=_[w].clone(),C=y(L,_[w+1],M,S),R=y(L,_[w+2],M,S),m.push(L),m.push(C),m.push(R)),b||(L=_[w+1].clone(),C=y(L,_[w+2],M,S),R=y(L,_[w],M,S),m.push(L),m.push(C),m.push(R)),P||(L=_[w+2].clone(),C=y(L,_[w],M,S),R=y(L,_[w+1],M,S),m.push(L),m.push(C),m.push(R));break}}}return m}function y(_,M,m,S){const w=_.position.dot(m)-S,A=M.position.dot(m)-S,b=w/(w-A);return new DT(new N(_.position.x+b*(M.position.x-_.position.x),_.position.y+b*(M.position.y-_.position.y),_.position.z+b*(M.position.z-_.position.z)),new N(_.normal.x+b*(M.normal.x-_.normal.x),_.normal.y+b*(M.normal.y-_.normal.y),_.normal.z+b*(M.normal.z-_.normal.z)))}}}class DT{constructor(e,t){this.position=e,this.normal=t}clone(){return new this.constructor(this.position.clone(),this.normal.clone())}}const kT=n=>n===Object(n)&&!Array.isArray(n)&&typeof n!="function";function US(n,e){const t=Bi(r=>r.gl),i=Ph(Og,kT(n)?Object.values(n):n);if(V.useLayoutEffect(()=>{e==null||e(i)},[e]),V.useEffect(()=>{(Array.isArray(i)?i:[i]).forEach(t.initTexture)},[t,i]),kT(n)){const r=Object.keys(n),s={};return r.forEach(o=>Object.assign(s,{[o]:i[r.indexOf(o)]})),s}else return i}US.preload=n=>Ph.preload(Og,n);US.clear=n=>Ph.clear(Og,n);function g7(n){return Array.isArray(n)}function gy(n=[0,0,0]){return g7(n)?n:n instanceof N||n instanceof el?[n.x,n.y,n.z]:[n,n,n]}const v7=V.forwardRef(function({debug:e,mesh:t,children:i,position:r,rotation:s,scale:o,...a},l){const f=V.useRef(null);V.useImperativeHandle(l,()=>f.current);const h=V.useRef(null);return V.useLayoutEffect(()=>{const d=(t==null?void 0:t.current)||f.current.parent,p=f.current;if(!(d instanceof zn))throw new Error('Decal must have a Mesh as parent or specify its "mesh" prop');const v={position:new N,rotation:new el,scale:new N(1,1,1)};if(d){So(v,{position:r,scale:o});const y=d.matrixWorld.clone();if(d.matrixWorld.identity(),!s||typeof s=="number"){const _=new Tt;_.position.copy(v.position),_.lookAt(d.position),typeof s=="number"&&_.rotateZ(s),So(v,{rotation:_.rotation})}else So(v,{rotation:s});return p.geometry=new m7(d,v.position,v.rotation,v.scale),h.current&&So(h.current,v),d.matrixWorld=y,()=>{p.geometry.dispose()}}},[t,...gy(r),...gy(o),...gy(s)]),V.createElement("mesh",{ref:f},i||V.createElement("meshStandardMaterial",Za({transparent:!0,polygonOffset:!0,polygonOffsetFactor:-10},a)),e&&V.createElement("mesh",{ref:h},V.createElement("boxGeometry",null),V.createElement("meshNormalMaterial",{wireframe:!0}),V.createElement("axesHelper",null)))}),y7=V.forwardRef(({makeDefault:n,camera:e,regress:t,domElement:i,enableDamping:r=!0,onChange:s,onStart:o,onEnd:a,...l},f)=>{const h=Bi(b=>b.invalidate),d=Bi(b=>b.camera),p=Bi(b=>b.gl),v=Bi(b=>b.events),y=Bi(b=>b.setEvents),_=Bi(b=>b.set),M=Bi(b=>b.get),m=Bi(b=>b.performance),S=e||d,w=i||v.connected||p.domElement,A=V.useMemo(()=>new p7(S),[S]);return kS(()=>{A.enabled&&A.update()},-1),V.useEffect(()=>(A.connect(w),()=>void A.dispose()),[w,t,A,h]),V.useEffect(()=>{const b=L=>{h(),t&&m.regress(),s&&s(L)},P=L=>{o&&o(L)},I=L=>{a&&a(L)};return A.addEventListener("change",b),A.addEventListener("start",P),A.addEventListener("end",I),()=>{A.removeEventListener("start",P),A.removeEventListener("end",I),A.removeEventListener("change",b)}},[s,o,a,A,h,y]),V.useEffect(()=>{if(n){const b=M().controls;return _({controls:A}),()=>_({controls:b})}},[n,A]),V.createElement("primitive",Za({ref:f,object:A,enableDamping:r},l))}),x7=V.forwardRef(({children:n,enabled:e=!0,speed:t=1,rotationIntensity:i=1,floatIntensity:r=1,floatingRange:s=[-.1,.1],...o},a)=>{const l=V.useRef(null),f=V.useRef(Math.random()*1e4);return kS(h=>{var d,p;if(!e||t===0)return;const v=f.current+h.clock.getElapsedTime();l.current.rotation.x=Math.cos(v/4*t)/8*i,l.current.rotation.y=Math.sin(v/4*t)/8*i,l.current.rotation.z=Math.sin(v/4*t)/20*i;let y=Math.sin(v/4*t)/10;y=DL.mapLinear(y,-.1,.1,(d=s==null?void 0:s[0])!==null&&d!==void 0?d:-.1,(p=s==null?void 0:s[1])!==null&&p!==void 0?p:.1),l.current.position.y=y*r,l.current.updateMatrix()}),V.createElement("group",o,V.createElement("group",{ref:f7([l,a]),matrixAutoUpdate:!1},n))});function _7({all:n,scene:e,camera:t}){const i=Bi(({gl:o})=>o),r=Bi(({camera:o})=>o),s=Bi(({scene:o})=>o);return V.useLayoutEffect(()=>{const o=[];n&&(e||s).traverse(f=>{f.visible===!1&&(o.push(f),f.visible=!0)}),i.compile(e||s,t||r);const a=new oS(128);new sS(.01,1e5,a).update(i,e||s),a.dispose(),o.forEach(f=>f.visible=!1)},[]),null}const S7=()=>{const{progress:n}=c7();return F.jsxs(u7,{as:"div",center:!0,style:{display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column"},children:[F.jsx("span",{className:"canvas-loader"}),F.jsxs("p",{style:{fontSize:14,color:"#F1F1F1",fontWeight:800,marginTop:40},children:[n.toFixed(2),"%"]})]})},w7=n=>{const[e]=US([n.imgUrl]);return F.jsxs(x7,{speed:1.5,rotationIntensity:1,floatIntensity:1,children:[F.jsx("ambientLight",{intensity:.25}),F.jsx("directionalLight",{position:[0,0,.05]}),F.jsxs("mesh",{castShadow:!0,receiveShadow:!0,scale:2.75,children:[F.jsx("icosahedronGeometry",{args:[1,1]}),F.jsx("meshStandardMaterial",{color:"#fcd4d4",polygonOffset:!0,polygonOffsetFactor:-5,flatShading:!0}),F.jsx(v7,{position:[0,0,1],rotation:[2*Math.PI,0,6.25],scale:1,map:e,flatShading:!0})]})]})},M7=({icon:n})=>F.jsxs($9,{frameloop:"demand",dpr:[1,2],gl:{preserveDrawingBuffer:!0},children:[F.jsxs(V.Suspense,{fallback:F.jsx(S7,{}),children:[F.jsx(y7,{enableZoom:!1}),F.jsx(w7,{imgUrl:n})]}),F.jsx(_7,{all:!0})]}),A7="/portfolio-react-threejs/assets/texture-5adaf7bf.webp",E7=()=>F.jsxs("div",{className:"flex flex-row flex-wrap justify-center items-center gap-10",children:[F.jsxs(oi.div,{variants:xg(),children:[F.jsx("h2",{className:`${Yt.sectionHeadText} text-center`,children:"Skills & Technologies."}),F.jsx("p",{className:`${Yt.sectionSubText} text-center`,children:"What have i learnd?"})]}),F.jsx("div",{className:"lg:w-[400px] lg:h-[400px]",children:F.jsx(M7,{icon:A7})},"skillsBall")]}),b7=ch(E7,"skills"),NT="data:image/webp;base64,UklGRggMAABXRUJQVlA4WAoAAAAwAAAA7wAA7wAASUNDUMgBAAAAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADZBTFBIggkAAAGwBgC0MTfWGWamsV3bbVDbdvu29tp23dRuk7VRu12btW0H89Kkk0wwcx6Ce8+959tf721ETAD87f//pevfqP+jaW9v+fHERZfrHuI9l+viiR+3vJX2aP9G/n81nMlTln+biVLvfLN8SrLzr0HMgLSfPUi05ETG+OrGztE9bT+Sv5AxwGHQQibsdKOi7h3jgw2X/5jtHlTas220v5FqlJaDGrybkWSQnNMPoDb3T3MYn8jnb6BWM9PijE3V9ALUbsHaROMSlVaIWi7KiDMmYUsKUNsFi0ONh3V6Jmo953Grweh5ArV/rLuRCMtAFtdHGoYRmcika7oxiNuDjO6ONQCDs5DVrEHcOVcgux/4s1b/JDJ8vC5jA/6JLOcN48oy34dM++ZaWPLfhozvCWQoZh+yfjienUaXkflLDZlJykb2Xa1Z6XAXDWB+V0a65KMhdPdio6cHDaKnBxNt89EwujuxkJqHBvJuCgONXGgosxtqL+YyGsxL0Zpz/o6Gc7+/1izb0IBuMetsPhrS2Rob5DMmvmHaqpuLBjWvgab8T6JhPVZFT2+ggV2rpcEoPbuWf2i9HtNW/1akH8+vq6Z2rxvqXztbmG+AhuKy5A2CcgMGvOnSSU5Gf38od6gwzIzRzx6U/g1U2G/UL7r4abgdKvy9MNypnXEof2DFAKDD7zr4tR1Udog4HK2ZqCx5LmulwDTinGrnhpug0rZccXci9PIJyt8IIh1LvCp5F/qByC3i8H2t9ESCrwgB6HpVnUudQOwLErCLRqwnKIwWBBE/qvJtGAgeIOOIRR+PIMVWosDv/cpk7duw+JH+bVrWjAu1WEMTaia1HfDY0s0HXZV52w6im8nAB7QRlk0iShiYVpSXtWtGv0gQHjtw9heu8paA+GgpmSG6WIIkg8SBaQUiurdPrwnyTXUf2lOIiEtAYogUXKCJuAIagRLAvC69nxPI+g9+K90kI0iOO0YPa5Cmvwy9BsrB5Vqo5jEWAZIKE3SQjkTjuUiQhKs1EFlApTkXSbLcEerNQKo9uegjC19VzplJZgwXE6Tddqg2Dcm+ysUMaThFtQN0PuTiM3l/KpaEdPdxcUgetlArnVCeiQezm8BqpfzvEsI6PDRAgrlVVBqLlMfwMJECjlJpB6kVPKwjsVmhEA+pP3g4SKIwUJ2JSLo0lINwLwkco85OWjiYg+FIc6syDjex+RwsJ5JvV6UX0r4czUH1TBrYVZXltAqSgMX2RTQWqnKa1jBg8iEaxxSJQ9IZwOYGEhijxkhS5wP5iLhFYogayyh5WwOjA0ksVmMfpXRgdTuF35RwFhNyRfJS20OgyKFCChJ+HJhdQACTVJhK6LaDm7B8AhNVWEHoWWB3GYElKnxHJzeYn4QieV+pcIfOCmD4c3k3FfBHukkcDZDnq0KvMZ0TwLH1tjRsQK8/nddYgnXy+tJ7lE5bnobLe4heGpk8G0/hXmnz6L1FZjcwfUjaG/S2kpnP1fvSNtH7icwErl6S9j29U2RacTVE2nF618jEcZUk7Qq9TDIBXNWVdoteLhWvmatYaS56BVTuAdeB0tz0SqmUsBUlrZSelwr6cVVDPx4yYVw1kVZIL49MDa7aScujl0OmC1djpGXTu05mGlevS7tC7ziZNK4+lHaE3s9ktnO1T9qP9HaQyTHzFFgibQe998hgU556o/S36M2l8whP8+XNpPcQnb08HZX3AL2BdEpiOGqK8gfQa0EHn+BoIYFG9AJ8dA4yZLsmz+ekBzfoYE9+JqH8a6DgN4R+ZMdylsDXKqwhhJ24GYMEF6owjdJhGy9VLlIYqUISJXyGl2VIsaYK9iJK7pqcJJdSyDGpAAcp4c92PoJOIsUvQcmVpHANG6YNSHKuGsNp4WQuXkWaw9SI9tEq6sfDZC+N0nA14CQt9PTlYIIXaf4Kii4lhp6++hvvRaKvqtKTGpY8rznT816kmqyKXz41xDftOgvYhGQzzarAVnr4Sy19NT+OdD8AZccogPceM+vJNqMYCd+nTlChAog/1NdRymGk7A5SB7Ypgd711XRTLcOLpD8AhUepgeieF66T+DXFSLy7Sg6XIoieD5roouUHxUj9mkUlWKMMou+roQ71Asb8igrOAaVTFELEux/0tankHLa+AFX01VEL/lQKEXM+mVJNjboPbcpDRX8Gxcep9t/n1o1vbKVkbznlnSuo8CjV/G5r4L8L/lj3QM/adll+9fs8+uaBIlT7vEU1mKGJsksvv2oRZ3n9mg91+CAoH54v6tLQyLovnqHmug+kjs7VwR2nerBEVFcAAPOQk6QO1QTJNQ5r4BXQYJxH0MD/ArA9U0jnS3+QHvilcvlhOoAVgq7VKwOgySkqOx1A0LFXtcWgxah8MXh3aFkQ8iWN35xA0rlfLVeYHmCWIPQ+WBbYN1G4GAVEq2Yq9SRoMuiOIPSNKAusW+QVpwLZziUKnbPrAqaJQndSWVBln7TngPALCg0FbZoPiMKrQWVB7FVJf5op2Y4q8wNotJ1PFC4rB5rlSSlNAtLtfIp4k3UCbworaVYODPPJeBOIv6XIatBq6E1RuK08mCPBk0gttlCJCwF6geHCfA3LM70jbiWQT1fB1wV0u14UvlMemJeJ8taiV7tUgTWg3fAbou4FlAcw8IKY7aDg5/QuBugHevoE4YSKgLn7gq9PuYoQ81xXLxz7dfs7aQ/3behQoSc5XxfQ8VJRX1dIn9Y71OaDlm0/C/Im6gjWEvvGoidIzBKDz2upE60rkaDrXqViTmjJXkjJkwL6fkYMpuoIfqU0FXT+rph0LS0j9CZo3e9HIe5IHY2ms9umNwg9LgJn66g9md/8QffxV0S4a2moPpWzUaD/RlkC8EuzfiKIXE0EDlu4BOBy/ZhpZDcAHlNyBeBck26ARFYScNnKJQA3BvNzoyHw2ey2ALw52sTMhZrAab2rAhBPPhDKyYk44DX+sAjEkh9mjmySGMzCvgjgNugLIUJ1tT0Q+LVlMOabYwaWpxdxdW84cN3+Fk8XmwLfMV9z9FUEcG56vJibwufNwHzbc7wcaAT8O9O8fJSm2cEQdjvPxdk2YBQdMzwcuGc4wEA2+Ep7vk8TwGB2P6a3Qx3BeNoeuamvGw9YwJD6Tb+lpyuPO8GwBjx1TT/nJtvA0NonHNfLsbFWMLymLuuLK2RVxYaI7vfagUGOfelUBaJVqYqHHw4BI5266nZZjVSJTwXDbU6acRoR/6GKUa85ff2Cv1Z/+///8wRWUDggkAAAAFAPAJ0BKvAA8AA+bTaZSaQjIqEgKACADYlpbuF2sRtACewD32ych77ZOQ99snIe+2TkPfbJyHvtk5D32ych77ZOQ99snIe+2TkPfbJyHvtk5D32ych77ZOQ99snIe+2TkPfbJyHvtk5D32ych77ZOQ99snIe+2TkPfbJyHvtk5D31gAAP7/1gAAAAAAAAAAAA==",T7="/portfolio-react-threejs/assets/appstore-0b8f390b.png",C7="/portfolio-react-threejs/assets/colab-9e4861eb.png",P7="/portfolio-react-threejs/assets/huggingface-720eadc9.png",L7=({index:n,name:e,description:t,tags:i,image:r,source_code_link:s,date:o,link_type:a})=>F.jsx(oi.div,{children:F.jsx("div",{children:F.jsx(oi.div,{children:F.jsxs(yg,{options:{max:45,scale:1,speed:450},className:"bg-white shadow-[#fcd4d4] shadow-card p-5 rounded-2xl sm:w-[360px] w-full",children:[F.jsxs("div",{className:"relative w-full h-[230px]",children:[F.jsx("img",{src:r,alt:"project_image",className:"w-full h-full object-cover rounded-2xl"}),F.jsx("div",{className:"absolute inset-0 flex justify-end m-3 card-img_hover",children:F.jsx("div",{onClick:()=>window.open(s,"_blank"),className:"white-gradient w-10 h-10 rounded-full flex justify-center items-center cursor-pointer",children:F.jsx("img",{src:a=="github"?NT:a=="colab"?C7:a=="huggingface"?P7:a=="appstore"?T7:NT,alt:"github repositories for projects",className:"w-1/2 h-1/2 object-contain"})})})]}),F.jsxs("div",{className:"mt-5",children:[F.jsx("h3",{className:"text-black font-bold text-[24px]",children:e}),F.jsx("p",{className:"mt-2 text-secondary text-[14px]",children:t})]}),F.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[i.map(l=>F.jsxs("p",{className:`text-[14px] ${l.color}`,children:["#",l.name," "]},`${e}-${l.name}`))," "]}),F.jsx("p",{children:o})]})})})}),R7=()=>F.jsxs("div",{children:[F.jsxs(oi.div,{children:[F.jsx("h2",{className:`${Yt.sectionHeadText} text-center`,children:"Projects."}),F.jsx("p",{className:`${Yt.sectionSubText} text-center`,children:"My works?"})]}),F.jsx(oi.div,{className:"w-full flex",children:F.jsx("p",{className:"mt-3 text-secondary text-center text-[17px] max-w-full leading-[30px]",children:"The projects that are listed below provide examples of my work in the real world, showcasing my abilities and experience. Each project has a brief description, links to code repositories, and live demonstrations. It exhibits my ability to work with various technologies, manage projects efficiently, and solve complex problems."})}),F.jsxs("div",{className:" mt-20 grid md:grid-cols-2 lg:grid-cols-3 gap-5",children:[aU.map((n,e)=>F.jsx(L7,{index:e,...n},`project-${e}`))," "]})]}),I7=ch(R7,"project"),D7=()=>F.jsx("div",{className:"h-screen flex justify-center items-center",children:F.jsx("img",{src:Ws,className:"w-[150px] h-[117px] "})});function k7(){return F.jsx(V.Suspense,{fallback:D7(),children:F.jsxs("div",{className:" z-0 bg-white",children:[F.jsx(Gs,{}),F.jsxs("div",{className:"bg-gradient-to-b from-white to-primary",children:[F.jsx(MB,{}),F.jsx(DB,{}),F.jsx(t5,{})]})]})})}const OT=({index:n,name:e,image:t})=>F.jsx(oi.div,{children:F.jsx("div",{children:F.jsx(oi.div,{variants:_g("right","spring",.5*n,.75),children:F.jsxs(yg,{options:{max:45,scale:1,speed:450},className:"bg-white shadow-[#fcd4d4] shadow-card p-5 rounded-2xl sm:w-[360px] w-full",children:[F.jsx("div",{className:"relative w-full h-[230px]",children:F.jsx("img",{src:t,placeholder:`${e}`,loading:"lazy",alt:"certificate image",className:"w-full h-full object-cover rounded-2xl"})}),F.jsx("h3",{className:"mt-5 text-black font-bold text-[24px] text-center",children:e})]})})})});function N7(){return F.jsxs("div",{className:"my-10",children:[F.jsxs("div",{children:[F.jsx("h2",{className:`${Yt.sectionHeadText} text-center`,children:"Certificates."}),F.jsx("p",{className:`${Yt.sectionSubText} text-center`,children:"Work Certificates"})]}),F.jsxs("div",{className:"my-20 flex flex-wrap justify-center mx-auto space-x-5 gap-5 w-full",children:[uU.map((n,e)=>F.jsx(OT,{index:e,...n},`project-${e}`))," "]}),F.jsx("p",{className:`${Yt.sectionSubText} text-center`,children:"Course Certificates"}),F.jsxs("div",{className:"my-20 flex flex-wrap justify-center mx-auto space-x-5 gap-5 w-full",children:[lU.map((n,e)=>F.jsx(OT,{index:e,...n},`project-${e}`))," "]})]})}const O7=()=>F.jsx("div",{className:"h-screen flex justify-center items-center",children:F.jsx("img",{src:Ws,className:"w-[150px] h-[117px] "})});function U7(){return F.jsx(V.Suspense,{fallback:O7(),children:F.jsxs("div",{className:"bg-white",children:[F.jsx(Gs,{}),F.jsx("div",{className:"relative pb-10 top-[120px] lg:top-[100px] bg-gradient-to-b from-white to-primary",children:F.jsx(N7,{})})]})})}function aI(){return F.jsxs(oi.div,{variants:xg(0),className:"h-screen ",children:[F.jsx("h1",{className:`${Yt.sectionHeadText} text-center`,children:"Coming soon"}),F.jsx("p",{className:`${Yt.heroSubText} mt-2 text-black-100 text-center`,children:"More things are on the way ✌️."})]})}const z7=()=>F.jsx("div",{className:"h-screen flex justify-center items-center",children:F.jsx("img",{src:Ws,className:"w-[150px] h-[117px] "})});function F7(){return F.jsx(V.Suspense,{fallback:z7(),children:F.jsxs("div",{className:"bg-white",children:[F.jsx(Gs,{}),F.jsx("div",{className:"relative pb-10 top-[120px] lg:top-[100px] bg-gradient-to-b from-white to-primary",children:F.jsx(aI,{})})]})})}const B7=({index:n,name:e,image:t,link:i})=>F.jsx("div",{href:"",children:F.jsx(oi.div,{variants:_g("right","spring",.5*n,.75),children:F.jsxs(yg,{options:{max:45,scale:1,speed:450},className:"bg-white shadow-[#fcd4d4] shadow-card p-5 rounded-2xl sm:w-[360px] w-full",children:[F.jsx("div",{className:"relative w-full h-[230px]",children:F.jsx("img",{src:t,placeholder:`${e}`,loading:"lazy",alt:"blog feature image",className:"w-full h-full object-cover rounded-2xl"})}),F.jsx("h3",{className:"mt-5 text-black font-bold text-[24px] text-center",children:e})]})})});function V7(){return F.jsxs("div",{className:"my-10",children:[F.jsxs("div",{children:[F.jsx("h2",{className:`${Yt.sectionHeadText} text-center`,children:"Blogs."}),F.jsx("p",{className:`${Yt.sectionSubText} text-center`,children:"Blogs written by me"})]}),F.jsxs("div",{className:"my-20 flex flex-wrap justify-center mx-auto space-x-5 gap-5 w-full",children:[cU.map((n,e)=>F.jsx(B7,{index:e,...n},`project-${e}`))," "]})]})}const H7=()=>F.jsx("div",{className:"h-screen flex justify-center items-center",children:F.jsx("img",{src:Ws,className:"w-[150px] h-[117px] "})});function W7(){return F.jsx(V.Suspense,{fallback:H7(),children:F.jsxs("div",{className:"bg-white",children:[F.jsx(Gs,{}),F.jsx("div",{className:"relative pb-10 top-[120px] lg:top-[100px] bg-gradient-to-b from-white to-primary",children:F.jsx(V7,{})})]})})}const Kf={_origin:"https://api.emailjs.com"},G7=(n,e="https://api.emailjs.com")=>{Kf._userID=n,Kf._origin=e},lI=(n,e,t)=>{if(!n)throw"The public key is required. Visit https://dashboard.emailjs.com/admin/account";if(!e)throw"The service ID is required. Visit https://dashboard.emailjs.com/admin";if(!t)throw"The template ID is required. Visit https://dashboard.emailjs.com/admin/templates";return!0};class UT{constructor(e){this.status=e?e.status:0,this.text=e?e.responseText:"Network Error"}}const uI=(n,e,t={})=>new Promise((i,r)=>{const s=new XMLHttpRequest;s.addEventListener("load",({target:o})=>{const a=new UT(o);a.status===200||a.text==="OK"?i(a):r(a)}),s.addEventListener("error",({target:o})=>{r(new UT(o))}),s.open("POST",Kf._origin+n,!0),Object.keys(t).forEach(o=>{s.setRequestHeader(o,t[o])}),s.send(e)}),j7=(n,e,t,i)=>{const r=i||Kf._userID;return lI(r,n,e),uI("/api/v1.0/email/send",JSON.stringify({lib_version:"3.11.0",user_id:r,service_id:n,template_id:e,template_params:t}),{"Content-type":"application/json"})},X7=n=>{let e;if(typeof n=="string"?e=document.querySelector(n):e=n,!e||e.nodeName!=="FORM")throw"The 3rd parameter is expected to be the HTML form element or the style selector of form";return e},Y7=(n,e,t,i)=>{const r=i||Kf._userID,s=X7(t);lI(r,n,e);const o=new FormData(s);return o.append("lib_version","3.11.0"),o.append("service_id",n),o.append("template_id",e),o.append("user_id",r),uI("/api/v1.0/email/send-form",o)},q7={init:G7,send:j7,sendForm:Y7},Z7=()=>{const n=V.useRef(),[e,t]=V.useState({name:"",email:"",message:""}),[i,r]=V.useState(!1),s=a=>{const{target:l}=a,{name:f,value:h}=l;t({...e,[f]:h})},o=a=>{a.preventDefault(),r(!0),q7.send("service_w2nrv74","template_hmf109b",{from_name:e.name,to_name:"Satyam Mishra",from_email:e.email,to_email:"satyammishra9050@gmail.com",message:e.message},"Tlnn1O7PC8WlYPRT7").then(()=>{r(!1),alert("Thank you. I will get back to you as soon as possible."),t({name:"",email:"",message:""})},l=>{r(!1),console.error(l),alert("Ahh, something went wrong. Please try again.")})};return F.jsxs("div",{className:"xl:mt-6 flex xl:flex-row flex-col-reverse gap-10 overflow-hidden md:w-[80%] lg:w-[70%] ",children:[F.jsxs(oi.div,{variants:PB("left","tween",.2,1),className:"flex-[0.75] bg-white p-8 shadow-[#fcd4d4] shadow-card rounded-2xl",children:[F.jsx("p",{className:Yt.sectionSubText,children:"I am open to work"}),F.jsx("h3",{className:Yt.sectionHeadText,children:"Get In Touch."}),F.jsxs("form",{ref:n,onSubmit:o,className:"mt-12 flex flex-col gap-8",children:[F.jsxs("label",{className:"flex flex-col",children:[F.jsx("span",{className:"text-black font-medium mb-4",children:"Your Name"}),F.jsx("input",{type:"text",name:"name",value:e.name,onChange:s,placeholder:"What's your good name?",className:"bg-secondary py-4 px-6 placeholder:text-white-100 text-white rounded-lg outline-none border-none font-medium"})]}),F.jsxs("label",{className:"flex flex-col",children:[F.jsx("span",{className:"text-black font-medium mb-4",children:"Your email"}),F.jsx("input",{type:"email",name:"email",value:e.email,onChange:s,placeholder:"What's your web address?",className:"bg-secondary py-4 px-6 placeholder:text-white-100 text-white rounded-lg outline-none border-none font-medium"})]}),F.jsxs("label",{className:"flex flex-col",children:[F.jsx("span",{className:"text-black font-medium mb-4",children:"Your Message"}),F.jsx("textarea",{rows:7,name:"message",value:e.message,onChange:s,placeholder:"What you want to say?",className:"bg-secondary py-4 px-6 placeholder:text-white-100 text-white rounded-lg outline-none border-none font-medium"})]}),F.jsxs("button",{type:"submit",className:"bg-black hover:bg-slate-600 py-3 px-8 rounded-xl outline-none w-fit text-white font-bold shadow-md shadow-primary",children:[i?"Sending...":"Send"," "]})]})]})," "]})},J7=ch(Z7,"contact"),K7=()=>F.jsx("div",{className:"h-screen flex justify-center items-center",children:F.jsx("img",{src:Ws,className:"w-[150px] h-[117px] "})});function Q7(){return F.jsx(V.Suspense,{fallback:K7(),children:F.jsxs("div",{className:"bg-white",children:[F.jsx(Gs,{}),F.jsx("div",{className:"relative pb-10 top-[120px] lg:top-[100px] bg-gradient-to-b from-white to-primary",children:F.jsx(J7,{})})]})})}const $7=()=>F.jsx("div",{className:"h-screen flex justify-center items-center",children:F.jsx("img",{src:Ws,className:"w-[150px] h-[117px] "})});function eX(){return F.jsx(V.Suspense,{fallback:$7(),children:F.jsxs("div",{className:"bg-white",children:[F.jsx(Gs,{}),F.jsx("div",{className:"relative pb-10 top-[120px] lg:top-[100px] bg-gradient-to-b from-white to-primary",children:F.jsx(I7,{})})]})})}const tX=()=>F.jsx("div",{className:"h-screen flex justify-center items-center",children:F.jsx("img",{src:Ws,className:"w-[150px] h-[117px] "})});function nX(){return F.jsx(V.Suspense,{fallback:tX(),children:F.jsxs("div",{className:"bg-white",children:[F.jsx(Gs,{}),F.jsx("div",{className:"relative pb-10 top-[120px] lg:top-[100px] bg-gradient-to-b from-white to-primary",children:F.jsx(b7,{})})]})})}const iX=()=>F.jsx("div",{className:"h-screen flex justify-center items-center",children:F.jsx("img",{src:Ws,className:"w-[150px] h-[117px] "})});function rX(){return F.jsx(V.Suspense,{fallback:iX(),children:F.jsxs("div",{className:"bg-white",children:[F.jsx(Gs,{}),F.jsx("div",{className:"relative pb-10 top-[120px] lg:top-[100px] bg-gradient-to-b from-white to-primary",children:F.jsx(aI,{})})]})})}const sX=()=>F.jsx("div",{className:"h-screen flex justify-center items-center",children:F.jsx("img",{src:Ws,className:"w-[150px] h-[117px] "})});function oX(){return F.jsx(V.Suspense,{fallback:sX(),children:F.jsxs("div",{className:"bg-white",children:[F.jsx(Gs,{}),F.jsx("div",{className:"relative pb-10 top-[120px] lg:top-[100px] bg-gradient-to-b from-white to-primary",children:F.jsxs("div",{className:"h-screen ",children:[F.jsx("h1",{className:`${Yt.sectionHeadText} text-center`,children:"No Page Found"}),F.jsx("p",{className:`${Yt.heroSubText} mt-2 text-black-100 text-center`,children:"Try after something, it might showup 😊."})]})})]})})}function aX(){return F.jsx(TO,{basename:"/portfolio-react-threejs",children:F.jsxs(wO,{children:[F.jsx(qr,{index:!0,element:F.jsx(k7,{})}),F.jsx(qr,{path:"/certificate",element:F.jsx(U7,{})}),F.jsx(qr,{path:"/resume",element:F.jsx(F7,{})}),F.jsx(qr,{path:"/blogs",element:F.jsx(W7,{})}),F.jsx(qr,{path:"/contact",element:F.jsx(Q7,{})}),F.jsx(qr,{path:"/projects",element:F.jsx(eX,{})}),F.jsx(qr,{path:"/skills",element:F.jsx(nX,{})}),F.jsx(qr,{path:"/freetools",element:F.jsx(rX,{})}),F.jsx(qr,{path:"*",element:F.jsx(oX,{})})]})})}yy.createRoot(document.getElementById("root")).render(F.jsx($f.StrictMode,{children:F.jsx(aX,{})})); + `}),[h]);return V.createElement("group",Za({},P,{ref:ae}),d&&!Ee&&V.createElement("mesh",{castShadow:v,receiveShadow:y,ref:ee},M||V.createElement("planeGeometry",null),_||V.createElement("shaderMaterial",{side:Rr,vertexShader:Ye.vertexShader,fragmentShader:Ye.fragmentShader})))});let Uc=0;const c7=zR(n=>(cu.onStart=(e,t,i)=>{n({active:!0,item:e,loaded:t,total:i,progress:(t-Uc)/(i-Uc)*100})},cu.onLoad=()=>{n({active:!1})},cu.onError=e=>n(t=>({errors:[...t.errors,e]})),cu.onProgress=(e,t,i)=>{t===i&&(Uc=i),n({active:!0,item:e,loaded:t,total:i,progress:(t-Uc)/(i-Uc)*100||100})},{errors:[],active:!1,progress:0,item:"",loaded:0,total:0}));function f7(n){return function(e){n.forEach(function(t){typeof t=="function"?t(e):t!=null&&(t.current=e)})}}function Jf(n){"@babel/helpers - typeof";return Jf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Jf(n)}function h7(n,e){if(Jf(n)!=="object"||n===null)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var i=t.call(n,e||"default");if(Jf(i)!=="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function d7(n){var e=h7(n,"string");return Jf(e)==="symbol"?e:String(e)}function ut(n,e,t){return e=d7(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}const IT=(n,e)=>(n%e+e)%e;let p7=class extends rs{constructor(e,t){super(),ut(this,"object",void 0),ut(this,"domElement",void 0),ut(this,"enabled",!0),ut(this,"target",new N),ut(this,"minDistance",0),ut(this,"maxDistance",1/0),ut(this,"minZoom",0),ut(this,"maxZoom",1/0),ut(this,"minPolarAngle",0),ut(this,"maxPolarAngle",Math.PI),ut(this,"minAzimuthAngle",-1/0),ut(this,"maxAzimuthAngle",1/0),ut(this,"enableDamping",!1),ut(this,"dampingFactor",.05),ut(this,"enableZoom",!0),ut(this,"zoomSpeed",1),ut(this,"enableRotate",!0),ut(this,"rotateSpeed",1),ut(this,"enablePan",!0),ut(this,"panSpeed",1),ut(this,"screenSpacePanning",!0),ut(this,"keyPanSpeed",7),ut(this,"autoRotate",!1),ut(this,"autoRotateSpeed",2),ut(this,"reverseOrbit",!1),ut(this,"keys",{LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"}),ut(this,"mouseButtons",{LEFT:xa.ROTATE,MIDDLE:xa.DOLLY,RIGHT:xa.PAN}),ut(this,"touches",{ONE:_a.ROTATE,TWO:_a.DOLLY_PAN}),ut(this,"target0",void 0),ut(this,"position0",void 0),ut(this,"zoom0",void 0),ut(this,"_domElementKeyEvents",null),ut(this,"getPolarAngle",void 0),ut(this,"getAzimuthalAngle",void 0),ut(this,"setPolarAngle",void 0),ut(this,"setAzimuthalAngle",void 0),ut(this,"getDistance",void 0),ut(this,"listenToKeyEvents",void 0),ut(this,"saveState",void 0),ut(this,"reset",void 0),ut(this,"update",void 0),ut(this,"connect",void 0),ut(this,"dispose",void 0),this.object=e,this.domElement=t,this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object instanceof Wt?this.object.zoom:1,this.getPolarAngle=()=>h.phi,this.getAzimuthalAngle=()=>h.theta,this.setPolarAngle=G=>{let de=IT(G,2*Math.PI),Se=h.phi;Se<0&&(Se+=2*Math.PI),de<0&&(de+=2*Math.PI);let Pe=Math.abs(de-Se);2*Math.PI-Pe{let de=IT(G,2*Math.PI),Se=h.theta;Se<0&&(Se+=2*Math.PI),de<0&&(de+=2*Math.PI);let Pe=Math.abs(de-Se);2*Math.PI-Pei.object.position.distanceTo(i.target),this.listenToKeyEvents=G=>{G.addEventListener("keydown",le),this._domElementKeyEvents=G},this.saveState=()=>{i.target0.copy(i.target),i.position0.copy(i.object.position),i.zoom0=i.object instanceof Wt?i.object.zoom:1},this.reset=()=>{i.target.copy(i.target0),i.object.position.copy(i.position0),i.object instanceof Wt&&(i.object.zoom=i.zoom0,i.object.updateProjectionMatrix()),i.dispatchEvent(r),i.update(),l=a.NONE},this.update=(()=>{const G=new N,de=new si().setFromUnitVectors(e.up,new N(0,1,0)),Se=de.clone().invert(),Pe=new N,Qe=new si,ct=2*Math.PI;return function(){const Y=i.object.position;G.copy(Y).sub(i.target),G.applyQuaternion(de),h.setFromVector3(G),i.autoRotate&&l===a.NONE&&J(R()),i.enableDamping?(h.theta+=d.theta*i.dampingFactor,h.phi+=d.phi*i.dampingFactor):(h.theta+=d.theta,h.phi+=d.phi);let fe=i.minAzimuthAngle,Ae=i.maxAzimuthAngle;return isFinite(fe)&&isFinite(Ae)&&(fe<-Math.PI?fe+=ct:fe>Math.PI&&(fe-=ct),Ae<-Math.PI?Ae+=ct:Ae>Math.PI&&(Ae-=ct),fe<=Ae?h.theta=Math.max(fe,Math.min(Ae,h.theta)):h.theta=h.theta>(fe+Ae)/2?Math.max(fe,h.theta):Math.min(Ae,h.theta)),h.phi=Math.max(i.minPolarAngle,Math.min(i.maxPolarAngle,h.phi)),h.makeSafe(),h.radius*=p,h.radius=Math.max(i.minDistance,Math.min(i.maxDistance,h.radius)),i.enableDamping===!0?i.target.addScaledVector(v,i.dampingFactor):i.target.add(v),G.setFromSpherical(h),G.applyQuaternion(Se),Y.copy(i.target).add(G),i.object.lookAt(i.target),i.enableDamping===!0?(d.theta*=1-i.dampingFactor,d.phi*=1-i.dampingFactor,v.multiplyScalar(1-i.dampingFactor)):(d.set(0,0,0),v.set(0,0,0)),p=1,y||Pe.distanceToSquared(i.object.position)>f||8*(1-Qe.dot(i.object.quaternion))>f?(i.dispatchEvent(r),Pe.copy(i.object.position),Qe.copy(i.object.quaternion),y=!1,!0):!1}})(),this.connect=G=>{G===document&&console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'),i.domElement=G,i.domElement.style.touchAction="none",i.domElement.addEventListener("contextmenu",Re),i.domElement.addEventListener("pointerdown",Ge),i.domElement.addEventListener("pointercancel",nt),i.domElement.addEventListener("wheel",k)},this.dispose=()=>{var G,de,Se,Pe,Qe,ct;(G=i.domElement)===null||G===void 0||G.removeEventListener("contextmenu",Re),(de=i.domElement)===null||de===void 0||de.removeEventListener("pointerdown",Ge),(Se=i.domElement)===null||Se===void 0||Se.removeEventListener("pointercancel",nt),(Pe=i.domElement)===null||Pe===void 0||Pe.removeEventListener("wheel",k),(Qe=i.domElement)===null||Qe===void 0||Qe.ownerDocument.removeEventListener("pointermove",qe),(ct=i.domElement)===null||ct===void 0||ct.ownerDocument.removeEventListener("pointerup",je),i._domElementKeyEvents!==null&&i._domElementKeyEvents.removeEventListener("keydown",le)};const i=this,r={type:"change"},s={type:"start"},o={type:"end"},a={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let l=a.NONE;const f=1e-6,h=new y_,d=new y_;let p=1;const v=new N;let y=!1;const _=new ye,M=new ye,m=new ye,S=new ye,w=new ye,A=new ye,b=new ye,P=new ye,I=new ye,L=[],C={};function R(){return 2*Math.PI/60/60*i.autoRotateSpeed}function W(){return Math.pow(.95,i.zoomSpeed)}function J(G){i.reverseOrbit?d.theta+=G:d.theta-=G}function j(G){i.reverseOrbit?d.phi+=G:d.phi-=G}const X=(()=>{const G=new N;return function(Se,Pe){G.setFromMatrixColumn(Pe,0),G.multiplyScalar(-Se),v.add(G)}})(),Z=(()=>{const G=new N;return function(Se,Pe){i.screenSpacePanning===!0?G.setFromMatrixColumn(Pe,1):(G.setFromMatrixColumn(Pe,0),G.crossVectors(i.object.up,G)),G.multiplyScalar(Se),v.add(G)}})(),se=(()=>{const G=new N;return function(Se,Pe){const Qe=i.domElement;if(Qe&&i.object instanceof Wt&&i.object.isPerspectiveCamera){const ct=i.object.position;G.copy(ct).sub(i.target);let Nt=G.length();Nt*=Math.tan(i.object.fov/2*Math.PI/180),X(2*Se*Nt/Qe.clientHeight,i.object.matrix),Z(2*Pe*Nt/Qe.clientHeight,i.object.matrix)}else Qe&&i.object instanceof ts&&i.object.isOrthographicCamera?(X(Se*(i.object.right-i.object.left)/i.object.zoom/Qe.clientWidth,i.object.matrix),Z(Pe*(i.object.top-i.object.bottom)/i.object.zoom/Qe.clientHeight,i.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),i.enablePan=!1)}})();function ae(G){i.object instanceof Wt&&i.object.isPerspectiveCamera?p/=G:i.object instanceof ts&&i.object.isOrthographicCamera?(i.object.zoom=Math.max(i.minZoom,Math.min(i.maxZoom,i.object.zoom*G)),i.object.updateProjectionMatrix(),y=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),i.enableZoom=!1)}function D(G){i.object instanceof Wt&&i.object.isPerspectiveCamera?p*=G:i.object instanceof ts&&i.object.isOrthographicCamera?(i.object.zoom=Math.max(i.minZoom,Math.min(i.maxZoom,i.object.zoom/G)),i.object.updateProjectionMatrix(),y=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),i.enableZoom=!1)}function H(G){_.set(G.clientX,G.clientY)}function B(G){b.set(G.clientX,G.clientY)}function te(G){S.set(G.clientX,G.clientY)}function $(G){M.set(G.clientX,G.clientY),m.subVectors(M,_).multiplyScalar(i.rotateSpeed);const de=i.domElement;de&&(J(2*Math.PI*m.x/de.clientHeight),j(2*Math.PI*m.y/de.clientHeight)),_.copy(M),i.update()}function ee(G){P.set(G.clientX,G.clientY),I.subVectors(P,b),I.y>0?ae(W()):I.y<0&&D(W()),b.copy(P),i.update()}function ue(G){w.set(G.clientX,G.clientY),A.subVectors(w,S).multiplyScalar(i.panSpeed),se(A.x,A.y),S.copy(w),i.update()}function Ee(G){G.deltaY<0?D(W()):G.deltaY>0&&ae(W()),i.update()}function we(G){let de=!1;switch(G.code){case i.keys.UP:se(0,i.keyPanSpeed),de=!0;break;case i.keys.BOTTOM:se(0,-i.keyPanSpeed),de=!0;break;case i.keys.LEFT:se(i.keyPanSpeed,0),de=!0;break;case i.keys.RIGHT:se(-i.keyPanSpeed,0),de=!0;break}de&&(G.preventDefault(),i.update())}function Q(){if(L.length==1)_.set(L[0].pageX,L[0].pageY);else{const G=.5*(L[0].pageX+L[1].pageX),de=.5*(L[0].pageY+L[1].pageY);_.set(G,de)}}function Xe(){if(L.length==1)S.set(L[0].pageX,L[0].pageY);else{const G=.5*(L[0].pageX+L[1].pageX),de=.5*(L[0].pageY+L[1].pageY);S.set(G,de)}}function Ye(){const G=L[0].pageX-L[1].pageX,de=L[0].pageY-L[1].pageY,Se=Math.sqrt(G*G+de*de);b.set(0,Se)}function xe(){i.enableZoom&&Ye(),i.enablePan&&Xe()}function Me(){i.enableZoom&&Ye(),i.enableRotate&&Q()}function ge(G){if(L.length==1)M.set(G.pageX,G.pageY);else{const Se=He(G),Pe=.5*(G.pageX+Se.x),Qe=.5*(G.pageY+Se.y);M.set(Pe,Qe)}m.subVectors(M,_).multiplyScalar(i.rotateSpeed);const de=i.domElement;de&&(J(2*Math.PI*m.x/de.clientHeight),j(2*Math.PI*m.y/de.clientHeight)),_.copy(M)}function oe(G){if(L.length==1)w.set(G.pageX,G.pageY);else{const de=He(G),Se=.5*(G.pageX+de.x),Pe=.5*(G.pageY+de.y);w.set(Se,Pe)}A.subVectors(w,S).multiplyScalar(i.panSpeed),se(A.x,A.y),S.copy(w)}function _e(G){const de=He(G),Se=G.pageX-de.x,Pe=G.pageY-de.y,Qe=Math.sqrt(Se*Se+Pe*Pe);P.set(0,Qe),I.set(0,Math.pow(P.y/b.y,i.zoomSpeed)),ae(I.y),b.copy(P)}function Ne(G){i.enableZoom&&_e(G),i.enablePan&&oe(G)}function Ie(G){i.enableZoom&&_e(G),i.enableRotate&&ge(G)}function Ge(G){if(i.enabled!==!1){if(L.length===0){var de,Se;(de=i.domElement)===null||de===void 0||de.ownerDocument.addEventListener("pointermove",qe),(Se=i.domElement)===null||Se===void 0||Se.ownerDocument.addEventListener("pointerup",je)}et(G),G.pointerType==="touch"?be(G):_t(G)}}function qe(G){i.enabled!==!1&&(G.pointerType==="touch"?Te(G):z(G))}function je(G){if(ze(G),L.length===0){var de,Se,Pe;(de=i.domElement)===null||de===void 0||de.releasePointerCapture(G.pointerId),(Se=i.domElement)===null||Se===void 0||Se.ownerDocument.removeEventListener("pointermove",qe),(Pe=i.domElement)===null||Pe===void 0||Pe.ownerDocument.removeEventListener("pointerup",je)}i.dispatchEvent(o),l=a.NONE}function nt(G){ze(G)}function _t(G){let de;switch(G.button){case 0:de=i.mouseButtons.LEFT;break;case 1:de=i.mouseButtons.MIDDLE;break;case 2:de=i.mouseButtons.RIGHT;break;default:de=-1}switch(de){case xa.DOLLY:if(i.enableZoom===!1)return;B(G),l=a.DOLLY;break;case xa.ROTATE:if(G.ctrlKey||G.metaKey||G.shiftKey){if(i.enablePan===!1)return;te(G),l=a.PAN}else{if(i.enableRotate===!1)return;H(G),l=a.ROTATE}break;case xa.PAN:if(G.ctrlKey||G.metaKey||G.shiftKey){if(i.enableRotate===!1)return;H(G),l=a.ROTATE}else{if(i.enablePan===!1)return;te(G),l=a.PAN}break;default:l=a.NONE}l!==a.NONE&&i.dispatchEvent(s)}function z(G){if(i.enabled!==!1)switch(l){case a.ROTATE:if(i.enableRotate===!1)return;$(G);break;case a.DOLLY:if(i.enableZoom===!1)return;ee(G);break;case a.PAN:if(i.enablePan===!1)return;ue(G);break}}function k(G){i.enabled===!1||i.enableZoom===!1||l!==a.NONE&&l!==a.ROTATE||(G.preventDefault(),i.dispatchEvent(s),Ee(G),i.dispatchEvent(o))}function le(G){i.enabled===!1||i.enablePan===!1||we(G)}function be(G){switch(pe(G),L.length){case 1:switch(i.touches.ONE){case _a.ROTATE:if(i.enableRotate===!1)return;Q(),l=a.TOUCH_ROTATE;break;case _a.PAN:if(i.enablePan===!1)return;Xe(),l=a.TOUCH_PAN;break;default:l=a.NONE}break;case 2:switch(i.touches.TWO){case _a.DOLLY_PAN:if(i.enableZoom===!1&&i.enablePan===!1)return;xe(),l=a.TOUCH_DOLLY_PAN;break;case _a.DOLLY_ROTATE:if(i.enableZoom===!1&&i.enableRotate===!1)return;Me(),l=a.TOUCH_DOLLY_ROTATE;break;default:l=a.NONE}break;default:l=a.NONE}l!==a.NONE&&i.dispatchEvent(s)}function Te(G){switch(pe(G),l){case a.TOUCH_ROTATE:if(i.enableRotate===!1)return;ge(G),i.update();break;case a.TOUCH_PAN:if(i.enablePan===!1)return;oe(G),i.update();break;case a.TOUCH_DOLLY_PAN:if(i.enableZoom===!1&&i.enablePan===!1)return;Ne(G),i.update();break;case a.TOUCH_DOLLY_ROTATE:if(i.enableZoom===!1&&i.enableRotate===!1)return;Ie(G),i.update();break;default:l=a.NONE}}function Re(G){i.enabled!==!1&&G.preventDefault()}function et(G){L.push(G)}function ze(G){delete C[G.pointerId];for(let de=0;de0,b=j>0,P=X>0,I=(A?1:0)+(b?1:0)+(P?1:0),I){case 0:{m.push(_[w]),m.push(_[w+1]),m.push(_[w+2]);break}case 1:{if(A&&(L=_[w+1],C=_[w+2],R=y(_[w],L,M,S),W=y(_[w],C,M,S)),b){L=_[w],C=_[w+2],R=y(_[w+1],L,M,S),W=y(_[w+1],C,M,S),m.push(R),m.push(C.clone()),m.push(L.clone()),m.push(C.clone()),m.push(R.clone()),m.push(W);break}P&&(L=_[w],C=_[w+1],R=y(_[w+2],L,M,S),W=y(_[w+2],C,M,S)),m.push(L.clone()),m.push(C.clone()),m.push(R),m.push(W),m.push(R.clone()),m.push(C.clone());break}case 2:{A||(L=_[w].clone(),C=y(L,_[w+1],M,S),R=y(L,_[w+2],M,S),m.push(L),m.push(C),m.push(R)),b||(L=_[w+1].clone(),C=y(L,_[w+2],M,S),R=y(L,_[w],M,S),m.push(L),m.push(C),m.push(R)),P||(L=_[w+2].clone(),C=y(L,_[w],M,S),R=y(L,_[w+1],M,S),m.push(L),m.push(C),m.push(R));break}}}return m}function y(_,M,m,S){const w=_.position.dot(m)-S,A=M.position.dot(m)-S,b=w/(w-A);return new DT(new N(_.position.x+b*(M.position.x-_.position.x),_.position.y+b*(M.position.y-_.position.y),_.position.z+b*(M.position.z-_.position.z)),new N(_.normal.x+b*(M.normal.x-_.normal.x),_.normal.y+b*(M.normal.y-_.normal.y),_.normal.z+b*(M.normal.z-_.normal.z)))}}}class DT{constructor(e,t){this.position=e,this.normal=t}clone(){return new this.constructor(this.position.clone(),this.normal.clone())}}const kT=n=>n===Object(n)&&!Array.isArray(n)&&typeof n!="function";function US(n,e){const t=Bi(r=>r.gl),i=Lh(Ng,kT(n)?Object.values(n):n);if(V.useLayoutEffect(()=>{e==null||e(i)},[e]),V.useEffect(()=>{(Array.isArray(i)?i:[i]).forEach(t.initTexture)},[t,i]),kT(n)){const r=Object.keys(n),s={};return r.forEach(o=>Object.assign(s,{[o]:i[r.indexOf(o)]})),s}else return i}US.preload=n=>Lh.preload(Ng,n);US.clear=n=>Lh.clear(Ng,n);function g7(n){return Array.isArray(n)}function gy(n=[0,0,0]){return g7(n)?n:n instanceof N||n instanceof el?[n.x,n.y,n.z]:[n,n,n]}const v7=V.forwardRef(function({debug:e,mesh:t,children:i,position:r,rotation:s,scale:o,...a},l){const f=V.useRef(null);V.useImperativeHandle(l,()=>f.current);const h=V.useRef(null);return V.useLayoutEffect(()=>{const d=(t==null?void 0:t.current)||f.current.parent,p=f.current;if(!(d instanceof zn))throw new Error('Decal must have a Mesh as parent or specify its "mesh" prop');const v={position:new N,rotation:new el,scale:new N(1,1,1)};if(d){So(v,{position:r,scale:o});const y=d.matrixWorld.clone();if(d.matrixWorld.identity(),!s||typeof s=="number"){const _=new Tt;_.position.copy(v.position),_.lookAt(d.position),typeof s=="number"&&_.rotateZ(s),So(v,{rotation:_.rotation})}else So(v,{rotation:s});return p.geometry=new m7(d,v.position,v.rotation,v.scale),h.current&&So(h.current,v),d.matrixWorld=y,()=>{p.geometry.dispose()}}},[t,...gy(r),...gy(o),...gy(s)]),V.createElement("mesh",{ref:f},i||V.createElement("meshStandardMaterial",Za({transparent:!0,polygonOffset:!0,polygonOffsetFactor:-10},a)),e&&V.createElement("mesh",{ref:h},V.createElement("boxGeometry",null),V.createElement("meshNormalMaterial",{wireframe:!0}),V.createElement("axesHelper",null)))}),y7=V.forwardRef(({makeDefault:n,camera:e,regress:t,domElement:i,enableDamping:r=!0,onChange:s,onStart:o,onEnd:a,...l},f)=>{const h=Bi(b=>b.invalidate),d=Bi(b=>b.camera),p=Bi(b=>b.gl),v=Bi(b=>b.events),y=Bi(b=>b.setEvents),_=Bi(b=>b.set),M=Bi(b=>b.get),m=Bi(b=>b.performance),S=e||d,w=i||v.connected||p.domElement,A=V.useMemo(()=>new p7(S),[S]);return kS(()=>{A.enabled&&A.update()},-1),V.useEffect(()=>(A.connect(w),()=>void A.dispose()),[w,t,A,h]),V.useEffect(()=>{const b=L=>{h(),t&&m.regress(),s&&s(L)},P=L=>{o&&o(L)},I=L=>{a&&a(L)};return A.addEventListener("change",b),A.addEventListener("start",P),A.addEventListener("end",I),()=>{A.removeEventListener("start",P),A.removeEventListener("end",I),A.removeEventListener("change",b)}},[s,o,a,A,h,y]),V.useEffect(()=>{if(n){const b=M().controls;return _({controls:A}),()=>_({controls:b})}},[n,A]),V.createElement("primitive",Za({ref:f,object:A,enableDamping:r},l))}),x7=V.forwardRef(({children:n,enabled:e=!0,speed:t=1,rotationIntensity:i=1,floatIntensity:r=1,floatingRange:s=[-.1,.1],...o},a)=>{const l=V.useRef(null),f=V.useRef(Math.random()*1e4);return kS(h=>{var d,p;if(!e||t===0)return;const v=f.current+h.clock.getElapsedTime();l.current.rotation.x=Math.cos(v/4*t)/8*i,l.current.rotation.y=Math.sin(v/4*t)/8*i,l.current.rotation.z=Math.sin(v/4*t)/20*i;let y=Math.sin(v/4*t)/10;y=DL.mapLinear(y,-.1,.1,(d=s==null?void 0:s[0])!==null&&d!==void 0?d:-.1,(p=s==null?void 0:s[1])!==null&&p!==void 0?p:.1),l.current.position.y=y*r,l.current.updateMatrix()}),V.createElement("group",o,V.createElement("group",{ref:f7([l,a]),matrixAutoUpdate:!1},n))});function _7({all:n,scene:e,camera:t}){const i=Bi(({gl:o})=>o),r=Bi(({camera:o})=>o),s=Bi(({scene:o})=>o);return V.useLayoutEffect(()=>{const o=[];n&&(e||s).traverse(f=>{f.visible===!1&&(o.push(f),f.visible=!0)}),i.compile(e||s,t||r);const a=new oS(128);new sS(.01,1e5,a).update(i,e||s),a.dispose(),o.forEach(f=>f.visible=!1)},[]),null}const S7=()=>{const{progress:n}=c7();return F.jsxs(u7,{as:"div",center:!0,style:{display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column"},children:[F.jsx("span",{className:"canvas-loader"}),F.jsxs("p",{style:{fontSize:14,color:"#F1F1F1",fontWeight:800,marginTop:40},children:[n.toFixed(2),"%"]})]})},w7=n=>{const[e]=US([n.imgUrl]);return F.jsxs(x7,{speed:1.5,rotationIntensity:1,floatIntensity:1,children:[F.jsx("ambientLight",{intensity:.25}),F.jsx("directionalLight",{position:[0,0,.05]}),F.jsxs("mesh",{castShadow:!0,receiveShadow:!0,scale:2.75,children:[F.jsx("icosahedronGeometry",{args:[1,1]}),F.jsx("meshStandardMaterial",{color:"#fcd4d4",polygonOffset:!0,polygonOffsetFactor:-5,flatShading:!0}),F.jsx(v7,{position:[0,0,1],rotation:[2*Math.PI,0,6.25],scale:1,map:e,flatShading:!0})]})]})},M7=({icon:n})=>F.jsxs($9,{frameloop:"demand",dpr:[1,2],gl:{preserveDrawingBuffer:!0},children:[F.jsxs(V.Suspense,{fallback:F.jsx(S7,{}),children:[F.jsx(y7,{enableZoom:!1}),F.jsx(w7,{imgUrl:n})]}),F.jsx(_7,{all:!0})]}),A7="/portfolio-react-threejs/assets/texture-5adaf7bf.webp",E7=()=>F.jsxs("div",{className:"flex flex-row flex-wrap justify-center items-center gap-10",children:[F.jsxs(Xn.div,{variants:yg(),children:[F.jsx("h2",{className:`${Yt.sectionHeadText} text-center`,children:"Skills & Technologies."}),F.jsx("p",{className:`${Yt.sectionSubText} text-center`,children:"What have i learnd?"})]}),F.jsx("div",{className:"lg:w-[400px] lg:h-[400px]",children:F.jsx(M7,{icon:A7})},"skillsBall")]}),b7=fh(E7,"skills"),NT="data:image/webp;base64,UklGRggMAABXRUJQVlA4WAoAAAAwAAAA7wAA7wAASUNDUMgBAAAAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADZBTFBIggkAAAGwBgC0MTfWGWamsV3bbVDbdvu29tp23dRuk7VRu12btW0H89Kkk0wwcx6Ce8+959tf721ETAD87f//pevfqP+jaW9v+fHERZfrHuI9l+viiR+3vJX2aP9G/n81nMlTln+biVLvfLN8SrLzr0HMgLSfPUi05ETG+OrGztE9bT+Sv5AxwGHQQibsdKOi7h3jgw2X/5jtHlTas220v5FqlJaDGrybkWSQnNMPoDb3T3MYn8jnb6BWM9PijE3V9ALUbsHaROMSlVaIWi7KiDMmYUsKUNsFi0ONh3V6Jmo953Grweh5ArV/rLuRCMtAFtdHGoYRmcika7oxiNuDjO6ONQCDs5DVrEHcOVcgux/4s1b/JDJ8vC5jA/6JLOcN48oy34dM++ZaWPLfhozvCWQoZh+yfjienUaXkflLDZlJykb2Xa1Z6XAXDWB+V0a65KMhdPdio6cHDaKnBxNt89EwujuxkJqHBvJuCgONXGgosxtqL+YyGsxL0Zpz/o6Gc7+/1izb0IBuMetsPhrS2Rob5DMmvmHaqpuLBjWvgab8T6JhPVZFT2+ggV2rpcEoPbuWf2i9HtNW/1akH8+vq6Z2rxvqXztbmG+AhuKy5A2CcgMGvOnSSU5Gf38od6gwzIzRzx6U/g1U2G/UL7r4abgdKvy9MNypnXEof2DFAKDD7zr4tR1Udog4HK2ZqCx5LmulwDTinGrnhpug0rZccXci9PIJyt8IIh1LvCp5F/qByC3i8H2t9ESCrwgB6HpVnUudQOwLErCLRqwnKIwWBBE/qvJtGAgeIOOIRR+PIMVWosDv/cpk7duw+JH+bVrWjAu1WEMTaia1HfDY0s0HXZV52w6im8nAB7QRlk0iShiYVpSXtWtGv0gQHjtw9heu8paA+GgpmSG6WIIkg8SBaQUiurdPrwnyTXUf2lOIiEtAYogUXKCJuAIagRLAvC69nxPI+g9+K90kI0iOO0YPa5Cmvwy9BsrB5Vqo5jEWAZIKE3SQjkTjuUiQhKs1EFlApTkXSbLcEerNQKo9uegjC19VzplJZgwXE6Tddqg2Dcm+ysUMaThFtQN0PuTiM3l/KpaEdPdxcUgetlArnVCeiQezm8BqpfzvEsI6PDRAgrlVVBqLlMfwMJECjlJpB6kVPKwjsVmhEA+pP3g4SKIwUJ2JSLo0lINwLwkco85OWjiYg+FIc6syDjex+RwsJ5JvV6UX0r4czUH1TBrYVZXltAqSgMX2RTQWqnKa1jBg8iEaxxSJQ9IZwOYGEhijxkhS5wP5iLhFYogayyh5WwOjA0ksVmMfpXRgdTuF35RwFhNyRfJS20OgyKFCChJ+HJhdQACTVJhK6LaDm7B8AhNVWEHoWWB3GYElKnxHJzeYn4QieV+pcIfOCmD4c3k3FfBHukkcDZDnq0KvMZ0TwLH1tjRsQK8/nddYgnXy+tJ7lE5bnobLe4heGpk8G0/hXmnz6L1FZjcwfUjaG/S2kpnP1fvSNtH7icwErl6S9j29U2RacTVE2nF618jEcZUk7Qq9TDIBXNWVdoteLhWvmatYaS56BVTuAdeB0tz0SqmUsBUlrZSelwr6cVVDPx4yYVw1kVZIL49MDa7aScujl0OmC1djpGXTu05mGlevS7tC7ziZNK4+lHaE3s9ktnO1T9qP9HaQyTHzFFgibQe998hgU556o/S36M2l8whP8+XNpPcQnb08HZX3AL2BdEpiOGqK8gfQa0EHn+BoIYFG9AJ8dA4yZLsmz+ekBzfoYE9+JqH8a6DgN4R+ZMdylsDXKqwhhJ24GYMEF6owjdJhGy9VLlIYqUISJXyGl2VIsaYK9iJK7pqcJJdSyDGpAAcp4c92PoJOIsUvQcmVpHANG6YNSHKuGsNp4WQuXkWaw9SI9tEq6sfDZC+N0nA14CQt9PTlYIIXaf4Kii4lhp6++hvvRaKvqtKTGpY8rznT816kmqyKXz41xDftOgvYhGQzzarAVnr4Sy19NT+OdD8AZccogPceM+vJNqMYCd+nTlChAog/1NdRymGk7A5SB7Ypgd711XRTLcOLpD8AhUepgeieF66T+DXFSLy7Sg6XIoieD5roouUHxUj9mkUlWKMMou+roQ71Asb8igrOAaVTFELEux/0tankHLa+AFX01VEL/lQKEXM+mVJNjboPbcpDRX8Gxcep9t/n1o1vbKVkbznlnSuo8CjV/G5r4L8L/lj3QM/adll+9fs8+uaBIlT7vEU1mKGJsksvv2oRZ3n9mg91+CAoH54v6tLQyLovnqHmug+kjs7VwR2nerBEVFcAAPOQk6QO1QTJNQ5r4BXQYJxH0MD/ArA9U0jnS3+QHvilcvlhOoAVgq7VKwOgySkqOx1A0LFXtcWgxah8MXh3aFkQ8iWN35xA0rlfLVeYHmCWIPQ+WBbYN1G4GAVEq2Yq9SRoMuiOIPSNKAusW+QVpwLZziUKnbPrAqaJQndSWVBln7TngPALCg0FbZoPiMKrQWVB7FVJf5op2Y4q8wNotJ1PFC4rB5rlSSlNAtLtfIp4k3UCbworaVYODPPJeBOIv6XIatBq6E1RuK08mCPBk0gttlCJCwF6geHCfA3LM70jbiWQT1fB1wV0u14UvlMemJeJ8taiV7tUgTWg3fAbou4FlAcw8IKY7aDg5/QuBugHevoE4YSKgLn7gq9PuYoQ81xXLxz7dfs7aQ/3behQoSc5XxfQ8VJRX1dIn9Y71OaDlm0/C/Im6gjWEvvGoidIzBKDz2upE60rkaDrXqViTmjJXkjJkwL6fkYMpuoIfqU0FXT+rph0LS0j9CZo3e9HIe5IHY2ms9umNwg9LgJn66g9md/8QffxV0S4a2moPpWzUaD/RlkC8EuzfiKIXE0EDlu4BOBy/ZhpZDcAHlNyBeBck26ARFYScNnKJQA3BvNzoyHw2ey2ALw52sTMhZrAab2rAhBPPhDKyYk44DX+sAjEkh9mjmySGMzCvgjgNugLIUJ1tT0Q+LVlMOabYwaWpxdxdW84cN3+Fk8XmwLfMV9z9FUEcG56vJibwufNwHzbc7wcaAT8O9O8fJSm2cEQdjvPxdk2YBQdMzwcuGc4wEA2+Ep7vk8TwGB2P6a3Qx3BeNoeuamvGw9YwJD6Tb+lpyuPO8GwBjx1TT/nJtvA0NonHNfLsbFWMLymLuuLK2RVxYaI7vfagUGOfelUBaJVqYqHHw4BI5266nZZjVSJTwXDbU6acRoR/6GKUa85ff2Cv1Z/+///8wRWUDggkAAAAFAPAJ0BKvAA8AA+bTaZSaQjIqEgKACADYlpbuF2sRtACewD32ych77ZOQ99snIe+2TkPfbJyHvtk5D32ych77ZOQ99snIe+2TkPfbJyHvtk5D32ych77ZOQ99snIe+2TkPfbJyHvtk5D32ych77ZOQ99snIe+2TkPfbJyHvtk5D31gAAP7/1gAAAAAAAAAAAA==",T7="/portfolio-react-threejs/assets/appstore-0b8f390b.png",C7="/portfolio-react-threejs/assets/colab-9e4861eb.png",P7="/portfolio-react-threejs/assets/huggingface-720eadc9.png",L7=({index:n,name:e,description:t,tags:i,image:r,source_code_link:s,date:o,link_type:a})=>F.jsx(Xn.div,{children:F.jsx("div",{children:F.jsx(Xn.div,{children:F.jsxs(xg,{options:{max:45,scale:1,speed:450},className:"bg-white shadow-[#fcd4d4] shadow-card p-5 rounded-2xl sm:w-[360px] w-full",children:[F.jsxs("div",{className:"relative w-full h-[230px]",children:[F.jsx("img",{src:r,alt:"project_image",className:"w-full h-full object-cover rounded-2xl"}),F.jsx("div",{className:"absolute inset-0 flex justify-end m-3 card-img_hover",children:F.jsx("div",{onClick:()=>window.open(s,"_blank"),className:"white-gradient w-10 h-10 rounded-full flex justify-center items-center cursor-pointer",children:F.jsx("img",{src:a=="github"?NT:a=="colab"?C7:a=="huggingface"?P7:a=="appstore"?T7:NT,alt:"github repositories for projects",className:"w-1/2 h-1/2 object-contain"})})})]}),F.jsxs("div",{className:"mt-5",children:[F.jsx("h3",{className:"text-black font-bold text-[24px]",children:e}),F.jsx("p",{className:"mt-2 text-secondary text-[14px]",children:t})]}),F.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[i.map(l=>F.jsxs("p",{className:`text-[14px] ${l.color}`,children:["#",l.name," "]},`${e}-${l.name}`))," "]}),F.jsx("p",{children:o})]})})})}),R7=()=>F.jsxs("div",{children:[F.jsxs(Xn.div,{children:[F.jsx("h2",{className:`${Yt.sectionHeadText} text-center`,children:"Projects."}),F.jsx("p",{className:`${Yt.sectionSubText} text-center`,children:"My works?"})]}),F.jsx(Xn.div,{className:"w-full flex",children:F.jsx("p",{className:"mt-3 text-secondary text-center text-[17px] max-w-full leading-[30px]",children:"The projects that are listed below provide examples of my work in the real world, showcasing my abilities and experience. Each project has a brief description, links to code repositories, and live demonstrations. It exhibits my ability to work with various technologies, manage projects efficiently, and solve complex problems."})}),F.jsxs("div",{className:" mt-20 grid md:grid-cols-2 lg:grid-cols-3 gap-5",children:[gB.map((n,e)=>F.jsx(L7,{index:e,...n},`project-${e}`))," "]})]}),I7=fh(R7,"project"),D7=()=>F.jsx("div",{className:"h-screen flex justify-center items-center",children:F.jsx("img",{src:Ws,className:"w-[150px] h-[117px] "})});function k7(){return F.jsx(V.Suspense,{fallback:D7(),children:F.jsxs("div",{className:" z-0 bg-white",children:[F.jsx(Gs,{}),F.jsxs("div",{className:"bg-gradient-to-b from-white to-primary",children:[F.jsx(EB,{}),F.jsx(DB,{}),F.jsx(t5,{})]})]})})}const OT=({index:n,name:e,image:t})=>F.jsx(Xn.div,{children:F.jsx("div",{children:F.jsx(Xn.div,{variants:ch("right","spring",.5*n,.75),children:F.jsxs(xg,{options:{max:45,scale:1,speed:450},className:"bg-white shadow-[#fcd4d4] shadow-card p-5 rounded-2xl sm:w-[360px] w-full",children:[F.jsx("div",{className:"relative w-full h-[230px]",children:F.jsx("img",{src:t,placeholder:`${e}`,loading:"lazy",alt:"certificate image",className:"w-full h-full object-cover rounded-2xl"})}),F.jsx("h3",{className:"mt-5 text-black font-bold text-[24px] text-center",children:e})]})})})});function N7(){return F.jsxs("div",{className:"my-10",children:[F.jsxs("div",{children:[F.jsx("h2",{className:`${Yt.sectionHeadText} text-center`,children:"Certificates."}),F.jsx("p",{className:`${Yt.sectionSubText} text-center`,children:"Work Certificates"})]}),F.jsxs("div",{className:"my-20 flex flex-wrap justify-center mx-auto space-x-5 gap-5 w-full",children:[yB.map((n,e)=>F.jsx(OT,{index:e,...n},`project-${e}`))," "]}),F.jsx("p",{className:`${Yt.sectionSubText} text-center`,children:"Course Certificates"}),F.jsxs("div",{className:"my-20 flex flex-wrap justify-center mx-auto space-x-5 gap-5 w-full",children:[vB.map((n,e)=>F.jsx(OT,{index:e,...n},`project-${e}`))," "]})]})}const O7=()=>F.jsx("div",{className:"h-screen flex justify-center items-center",children:F.jsx("img",{src:Ws,className:"w-[150px] h-[117px] "})});function U7(){return F.jsx(V.Suspense,{fallback:O7(),children:F.jsxs("div",{className:"bg-white",children:[F.jsx(Gs,{}),F.jsx("div",{className:"relative pb-10 top-[120px] lg:top-[100px] bg-gradient-to-b from-white to-primary",children:F.jsx(N7,{})})]})})}function aI(){return F.jsxs(Xn.div,{variants:yg(0),className:"h-screen ",children:[F.jsx("h1",{className:`${Yt.sectionHeadText} text-center`,children:"Coming soon"}),F.jsx("p",{className:`${Yt.heroSubText} mt-2 text-black-100 text-center`,children:"More things are on the way ✌️."})]})}const z7=()=>F.jsx("div",{className:"h-screen flex justify-center items-center",children:F.jsx("img",{src:Ws,className:"w-[150px] h-[117px] "})});function F7(){return F.jsx(V.Suspense,{fallback:z7(),children:F.jsxs("div",{className:"bg-white",children:[F.jsx(Gs,{}),F.jsx("div",{className:"relative pb-10 top-[120px] lg:top-[100px] bg-gradient-to-b from-white to-primary",children:F.jsx(aI,{})})]})})}const B7=({index:n,name:e,image:t,link:i})=>F.jsx("div",{href:"",children:F.jsx(Xn.div,{variants:ch("right","spring",.5*n,.75),children:F.jsxs(xg,{options:{max:45,scale:1,speed:450},className:"bg-white shadow-[#fcd4d4] shadow-card p-5 rounded-2xl sm:w-[360px] w-full",children:[F.jsx("div",{className:"relative w-full h-[230px]",children:F.jsx("img",{src:t,placeholder:`${e}`,loading:"lazy",alt:"blog feature image",className:"w-full h-full object-cover rounded-2xl"})}),F.jsx("h3",{className:"mt-5 text-black font-bold text-[24px] text-center",children:e})]})})});function V7(){return F.jsxs("div",{className:"my-10",children:[F.jsxs("div",{children:[F.jsx("h2",{className:`${Yt.sectionHeadText} text-center`,children:"Blogs."}),F.jsx("p",{className:`${Yt.sectionSubText} text-center`,children:"Blogs written by me"})]}),F.jsxs("div",{className:"my-20 flex flex-wrap justify-center mx-auto space-x-5 gap-5 w-full",children:[xB.map((n,e)=>F.jsx(B7,{index:e,...n},`project-${e}`))," "]})]})}const H7=()=>F.jsx("div",{className:"h-screen flex justify-center items-center",children:F.jsx("img",{src:Ws,className:"w-[150px] h-[117px] "})});function W7(){return F.jsx(V.Suspense,{fallback:H7(),children:F.jsxs("div",{className:"bg-white",children:[F.jsx(Gs,{}),F.jsx("div",{className:"relative pb-10 top-[120px] lg:top-[100px] bg-gradient-to-b from-white to-primary",children:F.jsx(V7,{})})]})})}const Kf={_origin:"https://api.emailjs.com"},G7=(n,e="https://api.emailjs.com")=>{Kf._userID=n,Kf._origin=e},lI=(n,e,t)=>{if(!n)throw"The public key is required. Visit https://dashboard.emailjs.com/admin/account";if(!e)throw"The service ID is required. Visit https://dashboard.emailjs.com/admin";if(!t)throw"The template ID is required. Visit https://dashboard.emailjs.com/admin/templates";return!0};class UT{constructor(e){this.status=e?e.status:0,this.text=e?e.responseText:"Network Error"}}const uI=(n,e,t={})=>new Promise((i,r)=>{const s=new XMLHttpRequest;s.addEventListener("load",({target:o})=>{const a=new UT(o);a.status===200||a.text==="OK"?i(a):r(a)}),s.addEventListener("error",({target:o})=>{r(new UT(o))}),s.open("POST",Kf._origin+n,!0),Object.keys(t).forEach(o=>{s.setRequestHeader(o,t[o])}),s.send(e)}),j7=(n,e,t,i)=>{const r=i||Kf._userID;return lI(r,n,e),uI("/api/v1.0/email/send",JSON.stringify({lib_version:"3.11.0",user_id:r,service_id:n,template_id:e,template_params:t}),{"Content-type":"application/json"})},X7=n=>{let e;if(typeof n=="string"?e=document.querySelector(n):e=n,!e||e.nodeName!=="FORM")throw"The 3rd parameter is expected to be the HTML form element or the style selector of form";return e},Y7=(n,e,t,i)=>{const r=i||Kf._userID,s=X7(t);lI(r,n,e);const o=new FormData(s);return o.append("lib_version","3.11.0"),o.append("service_id",n),o.append("template_id",e),o.append("user_id",r),uI("/api/v1.0/email/send-form",o)},q7={init:G7,send:j7,sendForm:Y7},Z7=()=>{const n=V.useRef(),[e,t]=V.useState({name:"",email:"",message:""}),[i,r]=V.useState(!1),s=a=>{const{target:l}=a,{name:f,value:h}=l;t({...e,[f]:h})},o=a=>{a.preventDefault(),r(!0),q7.send("service_w2nrv74","template_hmf109b",{from_name:e.name,to_name:"Satyam Mishra",from_email:e.email,to_email:"satyammishra9050@gmail.com",message:e.message},"Tlnn1O7PC8WlYPRT7").then(()=>{r(!1),alert("Thank you. I will get back to you as soon as possible."),t({name:"",email:"",message:""})},l=>{r(!1),console.error(l),alert("Ahh, something went wrong. Please try again.")})};return F.jsxs("div",{className:"xl:mt-6 flex xl:flex-row flex-col-reverse gap-10 overflow-hidden md:w-[80%] lg:w-[70%] ",children:[F.jsxs(Xn.div,{variants:MB("left","tween",.2,1),className:"flex-[0.75] bg-white p-8 shadow-[#fcd4d4] shadow-card rounded-2xl",children:[F.jsx("p",{className:Yt.sectionSubText,children:"I am open to work"}),F.jsx("h3",{className:Yt.sectionHeadText,children:"Get In Touch."}),F.jsxs("form",{ref:n,onSubmit:o,className:"mt-12 flex flex-col gap-8",children:[F.jsxs("label",{className:"flex flex-col",children:[F.jsx("span",{className:"text-black font-medium mb-4",children:"Your Name"}),F.jsx("input",{type:"text",name:"name",value:e.name,onChange:s,placeholder:"What's your good name?",className:"bg-secondary py-4 px-6 placeholder:text-white-100 text-white rounded-lg outline-none border-none font-medium"})]}),F.jsxs("label",{className:"flex flex-col",children:[F.jsx("span",{className:"text-black font-medium mb-4",children:"Your email"}),F.jsx("input",{type:"email",name:"email",value:e.email,onChange:s,placeholder:"What's your web address?",className:"bg-secondary py-4 px-6 placeholder:text-white-100 text-white rounded-lg outline-none border-none font-medium"})]}),F.jsxs("label",{className:"flex flex-col",children:[F.jsx("span",{className:"text-black font-medium mb-4",children:"Your Message"}),F.jsx("textarea",{rows:7,name:"message",value:e.message,onChange:s,placeholder:"What you want to say?",className:"bg-secondary py-4 px-6 placeholder:text-white-100 text-white rounded-lg outline-none border-none font-medium"})]}),F.jsxs("button",{type:"submit",className:"bg-black hover:bg-slate-600 py-3 px-8 rounded-xl outline-none w-fit text-white font-bold shadow-md shadow-primary",children:[i?"Sending...":"Send"," "]})]})]})," "]})},J7=fh(Z7,"contact"),K7=()=>F.jsx("div",{className:"h-screen flex justify-center items-center",children:F.jsx("img",{src:Ws,className:"w-[150px] h-[117px] "})});function Q7(){return F.jsx(V.Suspense,{fallback:K7(),children:F.jsxs("div",{className:"bg-white",children:[F.jsx(Gs,{}),F.jsx("div",{className:"relative pb-10 top-[120px] lg:top-[100px] bg-gradient-to-b from-white to-primary",children:F.jsx(J7,{})})]})})}const $7=()=>F.jsx("div",{className:"h-screen flex justify-center items-center",children:F.jsx("img",{src:Ws,className:"w-[150px] h-[117px] "})});function eX(){return F.jsx(V.Suspense,{fallback:$7(),children:F.jsxs("div",{className:"bg-white",children:[F.jsx(Gs,{}),F.jsx("div",{className:"relative pb-10 top-[120px] lg:top-[100px] bg-gradient-to-b from-white to-primary",children:F.jsx(I7,{})})]})})}const tX=()=>F.jsx("div",{className:"h-screen flex justify-center items-center",children:F.jsx("img",{src:Ws,className:"w-[150px] h-[117px] "})});function nX(){return F.jsx(V.Suspense,{fallback:tX(),children:F.jsxs("div",{className:"bg-white",children:[F.jsx(Gs,{}),F.jsx("div",{className:"relative pb-10 top-[120px] lg:top-[100px] bg-gradient-to-b from-white to-primary",children:F.jsx(b7,{})})]})})}const iX=()=>F.jsx("div",{className:"h-screen flex justify-center items-center",children:F.jsx("img",{src:Ws,className:"w-[150px] h-[117px] "})});function rX(){return F.jsx(V.Suspense,{fallback:iX(),children:F.jsxs("div",{className:"bg-white",children:[F.jsx(Gs,{}),F.jsx("div",{className:"relative pb-10 top-[120px] lg:top-[100px] bg-gradient-to-b from-white to-primary",children:F.jsx(aI,{})})]})})}const sX=()=>F.jsx("div",{className:"h-screen flex justify-center items-center",children:F.jsx("img",{src:Ws,className:"w-[150px] h-[117px] "})});function oX(){return F.jsx(V.Suspense,{fallback:sX(),children:F.jsxs("div",{className:"bg-white",children:[F.jsx(Gs,{}),F.jsx("div",{className:"relative pb-10 top-[120px] lg:top-[100px] bg-gradient-to-b from-white to-primary",children:F.jsxs("div",{className:"h-screen ",children:[F.jsx("h1",{className:`${Yt.sectionHeadText} text-center`,children:"No Page Found"}),F.jsx("p",{className:`${Yt.heroSubText} mt-2 text-black-100 text-center`,children:"Try after something, it might showup 😊."})]})})]})})}function aX(){return F.jsx(TO,{basename:"/portfolio-react-threejs",children:F.jsxs(wO,{children:[F.jsx(qr,{index:!0,element:F.jsx(k7,{})}),F.jsx(qr,{path:"/certificate",element:F.jsx(U7,{})}),F.jsx(qr,{path:"/resume",element:F.jsx(F7,{})}),F.jsx(qr,{path:"/blogs",element:F.jsx(W7,{})}),F.jsx(qr,{path:"/contact",element:F.jsx(Q7,{})}),F.jsx(qr,{path:"/projects",element:F.jsx(eX,{})}),F.jsx(qr,{path:"/skills",element:F.jsx(nX,{})}),F.jsx(qr,{path:"/freetools",element:F.jsx(rX,{})}),F.jsx(qr,{path:"*",element:F.jsx(oX,{})})]})})}yy.createRoot(document.getElementById("root")).render(F.jsx($f.StrictMode,{children:F.jsx(aX,{})})); diff --git a/index.html b/index.html index dba40e4..3183340 100644 --- a/index.html +++ b/index.html @@ -7,8 +7,8 @@ Satyam Mishra | Bedead - - + +