diff --git a/assets/index-351f4eb5.css b/assets/index-351f4eb5.css new file mode 100644 index 0000000..e3c4d87 --- /dev/null +++ b/assets/index-351f4eb5.css @@ -0,0 +1 @@ +@import"https://fonts.googleapis.com/css2?family=Kalam:wght@700&display=swap";@import"https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800;900&display=swap";.ityped-cursor{animation:blink 2s infinite}@keyframes blink{50%{opacity:1}to{opacity:0}}.head1{top:80px}.head1 .head2{line-height:95px}@media (max-width: 1024px){.head1 .head2{line-height:70px}.head1 .head2 h3 span{font-size:20px}}.head1 .head2 .link1{line-height:40px;background:rgba(0,0,0,.3);width:-moz-max-content;width:max-content;display:block;display:flex;z-index:2;gap:.8rem;border-radius:3rem}.head1 .head2 .link1 a{background:transparent;padding:.9rem;border-radius:50%;display:flex;color:var(--color-light);font-size:2rem}.head1 .name{font-family:Kalam,cursive;font-weight:900}.imgcontainer1{right:4rem;top:6rem;width:300px;height:300px;border-radius:40%;display:flex;align-items:center;justify-content:center}@media (max-width: 830px){.imgcontainer1{width:200px;height:200px;right:5px}}@media (max-width: 540px){.imgcontainer1{display:none}}.imgcontainer1 img{height:90%;border-radius:45%}.top2{text-decoration:underline}.logo{border-radius:50%}.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(even):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(even):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(even):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(even):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(even):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)}}.portfoliolist{font-size:14px;margin:0 23px;padding:7px;font-weight:700;border-radius:10px;cursor:pointer;overflow:hidden}.portfoliolist li{justify-content:center;align-items:center}@media (max-width: 480px){.portfoliolist{margin:auto}}.portfoliolist.active{background-color:#398485;color:#fff}.project{display:flex;flex-direction:column;align-items:center}.project .project-box{height:500px}.project ul{margin:10px;padding:0;list-style:none;display:flex;justify-content:center}.project ul li{border:solid 2px #00e9ff;border-radius:10px}.project .Box1{cursor:pointer}.project .Box1 .image{z-index:1}.project .Box1 h3,.project .Box1 .title{opacity:0}.project .Box1:hover{background-color:#030325}.project .Box1:hover .image{opacity:.2;z-index:0}.project .Box1:hover h3{opacity:1;z-index:1;color:#fff}.project .Box1:hover .title{opacity:1;z-index:1}.project .box{gap:1.75rem}.contact{flex-direction:row}@media (max-width: 540px){.contact{flex-direction:column}.contact .earth{flex:none;align-content:center}}@media (max-width: 830px){.contact .form1{zoom:.8}}.contact .contact__options{display:flex;flex-direction:column;gap:1.2rem}.contact .contact__option{display:flex;flex-direction:row;padding:.6rem;border-radius:1.2rem;text-align:center;align-items:center;border:1px solid white;gap:.8rem}.contact .contact__option:hover{text-decoration:underline}.contact button{border:2px solid #49a891}.nav{background:rgba(0,0,0,.3);width:-moz-max-content;width:max-content;display:block;padding:.7rem 1.7rem;z-index:2;position:fixed;transform:translate(-50%);left:50%;bottom:1rem;display:flex;gap:.8rem;border-radius:3rem;-webkit-backdrop-filter:blur(15px);backdrop-filter:blur(15px)}.nav a{background:transparent;padding:.9rem;border-radius:50%;display:flex;color:var(--color-light);font-size:1.1rem}.nav a:hover{background:rgba(0,0,0,.3)}.nav a:active{background:var(--color-bg);color:var(--color-white)}.my-skills{margin-top:30px;display:flex;flex-wrap:wrap;align-items:center;justify-content:center;text-align:center}.my-skills .skill{margin:0 15px;display:flex;flex-direction:column;justify-content:center;align-items:center}@media (max-width: 540px){.my-skills .skill{margin:0 10px}}.my-skills .skill .icon-container{margin-bottom:2rem;display:flex;transition:all 1s ease}.my-skills .skill .icon-container a{overflow:hidden}.my-skills .skill .icon-container a img{width:70px;height:70px}@media (max-width: 1024px){.my-skills .skill .icon-container a img{width:50px;height:50px}}.my-skills .skill .icon-container:hover{transform:scale(1.1)}.Box2{--tw-bg-opacity: 1;background-color:rgb(9 3 17/var(--tw-bg-opacity))}body{zoom:.85}.footer{position:relative;bottom:2rem;padding-bottom:4rem}@media (max-width: 480px){.footer{font-size:12px}}.footer p a,.footer p h1{text-decoration:none;color:#6e6ef0}.footer .visitcounter{display:inline}*,: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-feature-settings:inherit;font-variation-settings: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}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0px}.bottom-6{bottom:1.5rem}.top-0{top:0px}.z-0{z-index:0}.z-20{z-index:20}.z-\[-1\]{z-index:-1}.m-2{margin:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.-mt-20{margin-top:-5rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.ml-5{margin-left:1.25rem}.mt-1{margin-top:.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}.mt-7{margin-top:1.75rem}.flex{display:flex}.hidden{display:none}.h-1\/2{height:50%}.h-10{height:2.5rem}.h-3{height:.75rem}.h-40{height:10rem}.h-5{height:1.25rem}.h-9{height:2.25rem}.h-\[180px\]{height:180px}.h-\[400px\]{height:400px}.h-\[60\%\]{height:60%}.h-\[64px\]{height:64px}.h-auto{height:auto}.h-full{height:100%}.h-screen{height:100vh}.min-h-\[300px\]{min-height:300px}.w-1{width:.25rem}.w-1\/2{width:50%}.w-10{width:2.5rem}.w-3{width:.75rem}.w-5{width:1.25rem}.w-9{width:2.25rem}.w-\[35px\]{width:35px}.w-\[60\%\]{width:60%}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.max-w-7xl{max-width:80rem}.flex-1{flex:1 1 0%}.flex-\[0\.5\]{flex:.5}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-pointer{cursor:pointer}.list-disc{list-style-type:disc}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.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}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-7{gap:1.75rem}.gap-8{gap:2rem}.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{border-width:1px}.border-4{border-width:4px}.border-none{border-style:none}.border-secondary{--tw-border-opacity: 1;border-color:rgb(170 166 195 / var(--tw-border-opacity))}.bg-\[\#915EFF\]{--tw-bg-opacity: 1;background-color:rgb(145 94 255 / var(--tw-bg-opacity))}.bg-black-100{--tw-bg-opacity: 1;background-color:rgb(16 13 37 / var(--tw-bg-opacity))}.bg-primary{--tw-bg-opacity: 1;background-color:rgb(5 8 22 / var(--tw-bg-opacity))}.bg-secondary{--tw-bg-opacity: 1;background-color:rgb(170 166 195 / var(--tw-bg-opacity))}.bg-tertiary{--tw-bg-opacity: 1;background-color:rgb(21 16 48 / var(--tw-bg-opacity))}.bg-transparent{background-color:transparent}.bg-hero-pattern{background-image:url(/3d-react-portfolio/assets/herobg-ecbfddc8.png)}.bg-cover{background-size:cover}.bg-center{background-position:center}.bg-no-repeat{background-repeat:no-repeat}.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}.px-3{padding-left:.75rem;padding-right:.75rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.pb-14{padding-bottom:3.5rem}.pl-1{padding-left:.25rem}.text-center{text-align:center}.text-\[12px\]{font-size:12px}.text-\[14px\]{font-size:14px}.text-\[15px\]{font-size:15px}.text-\[16px\]{font-size:16px}.text-\[17px\]{font-size:17px}.text-\[18px\]{font-size:18px}.text-\[24px\]{font-size:24px}.text-\[30px\]{font-size:30px}.text-\[40px\]{font-size:40px}.text-\[48px\]{font-size:48px}.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-\[\#915EFF\]{--tw-text-opacity: 1;color:rgb(145 94 255 / var(--tw-text-opacity))}.text-\[\#dfd9ff\]{--tw-text-opacity: 1;color:rgb(223 217 255 / var(--tw-text-opacity))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-secondary{--tw-text-opacity: 1;color:rgb(170 166 195 / 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))}.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-primary{--tw-shadow-color: #050816;--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.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;color-scheme:dark}.hash-span{margin-top:-100px;padding-bottom:50px;display:block}.black-gradient{background:#000000;background:linear-gradient(to right,#434343,#000000)}.violet-gradient{background:#804dee;background:linear-gradient(-90deg,#804dee 0%,rgba(60,51,80,0) 100%);background:-webkit-linear-gradient(-90deg,#804dee 0%,rgba(60,51,80,0) 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}}.placeholder\:text-secondary::-moz-placeholder{--tw-text-opacity: 1;color:rgb(170 166 195 / var(--tw-text-opacity))}.placeholder\:text-secondary::placeholder{--tw-text-opacity: 1;color:rgb(170 166 195 / var(--tw-text-opacity))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}@media (min-width: 450px){.xs\:bottom-2{bottom:.5rem}.xs\:w-\[320px\]{width:320px}.xs\:text-\[20px\]{font-size:20px}.xs\:text-\[40px\]{font-size:40px}}@media (min-width: 640px){.sm\:block{display:block}.sm\:flex{display:flex}.sm\:w-\[330px\]{width:330px}.sm\:px-16{padding-left:4rem;padding-right:4rem}.sm\:px-4{padding-left:1rem;padding-right:1rem}.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}}@media (min-width: 768px){.md\:h-\[600px\]{height:600px}.md\:text-\[60px\]{font-size:60px}}@media (min-width: 1024px){.lg\:text-\[30px\]{font-size:30px}.lg\:text-\[80px\]{font-size:80px}}@media (min-width: 1280px){.xl\:mt-12{margin-top:3rem}.xl\:h-auto{height:auto}} diff --git a/assets/index-7ecf8cee.js b/assets/index-a434ccd9.js similarity index 69% rename from assets/index-7ecf8cee.js rename to assets/index-a434ccd9.js index aae78f8..08bddc6 100644 --- a/assets/index-7ecf8cee.js +++ b/assets/index-a434ccd9.js @@ -1,4 +1,4 @@ -function PI(n,e){for(var t=0;ti[r]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function t(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(r){if(r.ep)return;r.ep=!0;const s=t(r);fetch(r.href,s)}})();function X1(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function BI(n){if(n.__esModule)return n;var e=n.default;if(typeof e=="function"){var t=function i(){if(this instanceof i){var r=[null];r.push.apply(r,arguments);var s=Function.bind.apply(e,r);return new s}return e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(n).forEach(function(i){var r=Object.getOwnPropertyDescriptor(n,i);Object.defineProperty(t,i,r.get?r:{enumerable:!0,get:function(){return n[i]}})}),t}var Pf={},RI={get exports(){return Pf},set exports(n){Pf=n}},ug={},U={},LI={get exports(){return U},set exports(n){U=n}},wt={};/** +function CI(n,e){for(var t=0;ti[r]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function t(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(r){if(r.ep)return;r.ep=!0;const s=t(r);fetch(r.href,s)}})();function J1(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function EI(n){if(n.__esModule)return n;var e=n.default;if(typeof e=="function"){var t=function i(){if(this instanceof i){var r=[null];r.push.apply(r,arguments);var s=Function.bind.apply(e,r);return new s}return e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(n).forEach(function(i){var r=Object.getOwnPropertyDescriptor(n,i);Object.defineProperty(t,i,r.get?r:{enumerable:!0,get:function(){return n[i]}})}),t}var Pf={},bI={get exports(){return Pf},set exports(n){Pf=n}},cg={},U={},TI={get exports(){return U},set exports(n){U=n}},wt={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ function PI(n,e){for(var t=0;t>>1,G=L[$];if(0>>1;$r(Y,H))_er(Ae,Y)?(L[$]=Ae,L[_e]=H,$=_e):(L[$]=Y,L[me]=H,$=me);else if(_er(Ae,H))L[$]=Ae,L[_e]=H,$=_e;else break e}}return V}function r(L,V){var H=L.sortIndex-V.sortIndex;return H!==0?H:L.id-V.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=[],u=[],h=1,d=null,p=3,m=!1,y=!1,v=!1,x=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,_=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(L){for(var V=t(u);V!==null;){if(V.callback===null)i(u);else if(V.startTime<=L)i(u),V.sortIndex=V.expirationTime,e(l,V);else break;V=t(u)}}function M(L){if(v=!1,w(L),!y)if(t(l)!==null)y=!0,re(b);else{var V=t(u);V!==null&&ce(M,V.startTime-L)}}function b(L,V){y=!1,v&&(v=!1,A(E),E=-1),m=!0;var H=p;try{for(w(V),d=t(l);d!==null&&(!(d.expirationTime>V)||L&&!z());){var $=d.callback;if(typeof $=="function"){d.callback=null,p=d.priorityLevel;var G=$(d.expirationTime<=V);V=n.unstable_now(),typeof G=="function"?d.callback=G:d===t(l)&&i(l),w(V)}else i(l);d=t(l)}if(d!==null)var se=!0;else{var me=t(u);me!==null&&ce(M,me.startTime-V),se=!1}return se}finally{d=null,p=H,m=!1}}var P=!1,R=null,E=-1,B=5,I=-1;function z(){return!(n.unstable_now()-IL||125$?(L.sortIndex=H,e(u,L),t(l)===null&&L===t(u)&&(v?(A(E),E=-1):v=!0,ce(M,H-$))):(L.sortIndex=G,e(l,L),y||m||(y=!0,re(b))),L},n.unstable_shouldYield=z,n.unstable_wrapCallback=function(L){var V=p;return function(){var H=p;p=V;try{return L.apply(this,arguments)}finally{p=H}}}})(TT);(function(n){n.exports=TT})(nD);/** + */(function(n){function e(L,V){var H=L.length;L.push(V);e:for(;0>>1,G=L[$];if(0>>1;$r(Y,H))_er(Ae,Y)?(L[$]=Ae,L[_e]=H,$=_e):(L[$]=Y,L[me]=H,$=me);else if(_er(Ae,H))L[$]=Ae,L[_e]=H,$=_e;else break e}}return V}function r(L,V){var H=L.sortIndex-V.sortIndex;return H!==0?H:L.id-V.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=[],u=[],h=1,d=null,p=3,m=!1,y=!1,v=!1,x=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,_=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(L){for(var V=t(u);V!==null;){if(V.callback===null)i(u);else if(V.startTime<=L)i(u),V.sortIndex=V.expirationTime,e(l,V);else break;V=t(u)}}function M(L){if(v=!1,w(L),!y)if(t(l)!==null)y=!0,re(b);else{var V=t(u);V!==null&&ce(M,V.startTime-L)}}function b(L,V){y=!1,v&&(v=!1,A(E),E=-1),m=!0;var H=p;try{for(w(V),d=t(l);d!==null&&(!(d.expirationTime>V)||L&&!z());){var $=d.callback;if(typeof $=="function"){d.callback=null,p=d.priorityLevel;var G=$(d.expirationTime<=V);V=n.unstable_now(),typeof G=="function"?d.callback=G:d===t(l)&&i(l),w(V)}else i(l);d=t(l)}if(d!==null)var se=!0;else{var me=t(u);me!==null&&ce(M,me.startTime-V),se=!1}return se}finally{d=null,p=H,m=!1}}var P=!1,R=null,E=-1,B=5,I=-1;function z(){return!(n.unstable_now()-IL||125$?(L.sortIndex=H,e(u,L),t(l)===null&&L===t(u)&&(v?(A(E),E=-1):v=!0,ce(M,H-$))):(L.sortIndex=G,e(l,L),y||m||(y=!0,re(b))),L},n.unstable_shouldYield=z,n.unstable_wrapCallback=function(L){var V=p;return function(){var H=p;p=V;try{return L.apply(this,arguments)}finally{p=H}}}})(ET);(function(n){n.exports=ET})(qI);/** * @license React * react-dom.production.min.js * @@ -30,14 +30,14 @@ function PI(n,e){for(var t=0;t"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Wv=Object.prototype.hasOwnProperty,iD=/^[: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]*$/,KS={},QS={};function rD(n){return Wv.call(QS,n)?!0:Wv.call(KS,n)?!1:iD.test(n)?QS[n]=!0:(KS[n]=!0,!1)}function sD(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 oD(n,e,t,i){if(e===null||typeof e>"u"||sD(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 _i(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 Zn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(n){Zn[n]=new _i(n,0,!1,n,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(n){var e=n[0];Zn[e]=new _i(e,1,!1,n[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(n){Zn[n]=new _i(n,2,!1,n.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(n){Zn[n]=new _i(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){Zn[n]=new _i(n,3,!1,n.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(n){Zn[n]=new _i(n,3,!0,n,null,!1,!1)});["capture","download"].forEach(function(n){Zn[n]=new _i(n,4,!1,n,null,!1,!1)});["cols","rows","size","span"].forEach(function(n){Zn[n]=new _i(n,6,!1,n,null,!1,!1)});["rowSpan","start"].forEach(function(n){Zn[n]=new _i(n,5,!1,n.toLowerCase(),null,!1,!1)});var q1=/[\-:]([a-z])/g;function $1(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(q1,$1);Zn[e]=new _i(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(q1,$1);Zn[e]=new _i(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(q1,$1);Zn[e]=new _i(e,1,!1,n,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(n){Zn[n]=new _i(n,1,!1,n.toLowerCase(),null,!1,!1)});Zn.xlinkHref=new _i("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(n){Zn[n]=new _i(n,1,!1,n.toLowerCase(),null,!0,!0)});function e_(n,e,t,i){var r=Zn.hasOwnProperty(e)?Zn[e]:null;(r!==null?r.type!==0:i||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Vv=Object.prototype.hasOwnProperty,$I=/^[: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]*$/,YS={},KS={};function eD(n){return Vv.call(KS,n)?!0:Vv.call(YS,n)?!1:$I.test(n)?KS[n]=!0:(YS[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 nD(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 _i(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 Zn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(n){Zn[n]=new _i(n,0,!1,n,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(n){var e=n[0];Zn[e]=new _i(e,1,!1,n[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(n){Zn[n]=new _i(n,2,!1,n.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(n){Zn[n]=new _i(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){Zn[n]=new _i(n,3,!1,n.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(n){Zn[n]=new _i(n,3,!0,n,null,!1,!1)});["capture","download"].forEach(function(n){Zn[n]=new _i(n,4,!1,n,null,!1,!1)});["cols","rows","size","span"].forEach(function(n){Zn[n]=new _i(n,6,!1,n,null,!1,!1)});["rowSpan","start"].forEach(function(n){Zn[n]=new _i(n,5,!1,n.toLowerCase(),null,!1,!1)});var Z1=/[\-:]([a-z])/g;function q1(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(Z1,q1);Zn[e]=new _i(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(Z1,q1);Zn[e]=new _i(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(Z1,q1);Zn[e]=new _i(e,1,!1,n,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(n){Zn[n]=new _i(n,1,!1,n.toLowerCase(),null,!1,!1)});Zn.xlinkHref=new _i("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(n){Zn[n]=new _i(n,1,!1,n.toLowerCase(),null,!0,!0)});function $1(n,e,t,i){var r=Zn.hasOwnProperty(e)?Zn[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{fy=!1,Error.prepareStackTrace=t}return(n=n?n.displayName||n.name:"")?of(n):""}function aD(n){switch(n.tag){case 5:return of(n.type);case 16:return of("Lazy");case 13:return of("Suspense");case 19:return of("SuspenseList");case 0:case 2:case 15:return n=hy(n.type,!1),n;case 11:return n=hy(n.type.render,!1),n;case 1:return n=hy(n.type,!0),n;default:return""}}function Yv(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 rc:return"Fragment";case ic:return"Portal";case jv:return"Profiler";case t_:return"StrictMode";case Jv:return"Suspense";case Xv:return"SuspenseList"}if(typeof n=="object")switch(n.$$typeof){case LT:return(n.displayName||"Context")+".Consumer";case RT:return(n._context.displayName||"Context")+".Provider";case n_:var e=n.render;return n=n.displayName,n||(n=e.displayName||e.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case i_:return e=n.displayName||null,e!==null?e:Yv(n.type)||"Memo";case Ao:e=n._payload,n=n._init;try{return Yv(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 Yv(e);case 8:return e===t_?"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 Wo(n){switch(typeof n){case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function DT(n){var e=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function cD(n){var e=DT(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 Gd(n){n._valueTracker||(n._valueTracker=cD(n))}function FT(n){if(!n)return!1;var e=n._valueTracker;if(!e)return!0;var t=e.getValue(),i="";return n&&(i=DT(n)?n.checked?"true":"false":n.value),n=i,n!==t?(e.setValue(n),!0):!1}function Am(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 Kv(n,e){var t=e.checked;return an({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:t??n._wrapperState.initialChecked})}function qS(n,e){var t=e.defaultValue==null?"":e.defaultValue,i=e.checked!=null?e.checked:e.defaultChecked;t=Wo(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 kT(n,e){e=e.checked,e!=null&&e_(n,"checked",e,!1)}function Qv(n,e){kT(n,e);var t=Wo(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")?Zv(n,e.type,t):e.hasOwnProperty("defaultValue")&&Zv(n,e.type,Wo(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(n.defaultChecked=!!e.defaultChecked)}function $S(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 Zv(n,e,t){(e!=="number"||Am(n.ownerDocument)!==n)&&(t==null?n.defaultValue=""+n._wrapperState.initialValue:n.defaultValue!==""+t&&(n.defaultValue=""+t))}var af=Array.isArray;function Sc(n,e,t,i){if(n=n.options,e){e={};for(var r=0;r"+e.valueOf().toString()+"",e=Hd.firstChild;n.firstChild;)n.removeChild(n.firstChild);for(;e.firstChild;)n.appendChild(e.firstChild)}});function Rf(n,e){if(e){var t=n.firstChild;if(t&&t===n.lastChild&&t.nodeType===3){t.nodeValue=e;return}}n.textContent=e}var hf={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},uD=["Webkit","ms","Moz","O"];Object.keys(hf).forEach(function(n){uD.forEach(function(e){e=e+n.charAt(0).toUpperCase()+n.substring(1),hf[e]=hf[n]})});function UT(n,e,t){return e==null||typeof e=="boolean"||e===""?"":t||typeof e!="number"||e===0||hf.hasOwnProperty(n)&&hf[n]?(""+e).trim():e+"px"}function GT(n,e){n=n.style;for(var t in e)if(e.hasOwnProperty(t)){var i=t.indexOf("--")===0,r=UT(t,e[t],i);t==="float"&&(t="cssFloat"),i?n.setProperty(t,r):n[t]=r}}var fD=an({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 ex(n,e){if(e){if(fD[n]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(Se(137,n));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(Se(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(Se(61))}if(e.style!=null&&typeof e.style!="object")throw Error(Se(62))}}function tx(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 nx=null;function r_(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var ix=null,Mc=null,Cc=null;function nM(n){if(n=dh(n)){if(typeof ix!="function")throw Error(Se(280));var e=n.stateNode;e&&(e=gg(e),ix(n.stateNode,n.type,e))}}function HT(n){Mc?Cc?Cc.push(n):Cc=[n]:Mc=n}function VT(){if(Mc){var n=Mc,e=Cc;if(Cc=Mc=null,nM(n),e)for(n=0;n>>=0,n===0?32:31-(wD(n)/SD|0)|0}var Vd=64,Wd=4194304;function lf(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=lf(a):(s&=o,s!==0&&(i=lf(s)))}else o=t&~r,o!==0?i=lf(o):s!==0&&(i=lf(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 fh(n,e,t){n.pendingLanes|=e,e!==536870912&&(n.suspendedLanes=0,n.pingedLanes=0),n=n.eventTimes,e=31-kr(e),n[e]=t}function bD(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=pf),fM=String.fromCharCode(32),hM=!1;function c2(n,e){switch(n){case"keyup":return tF.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function u2(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var sc=!1;function iF(n,e){switch(n){case"compositionend":return u2(e);case"keypress":return e.which!==32?null:(hM=!0,fM);case"textInput":return n=e.data,n===fM&&hM?null:n;default:return null}}function rF(n,e){if(sc)return n==="compositionend"||!h_&&c2(n,e)?(n=a2(),tm=c_=bo=null,sc=!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=gM(t)}}function p2(n,e){return n&&e?n===e?!0:n&&n.nodeType===3?!1:e&&e.nodeType===3?p2(n,e.parentNode):"contains"in n?n.contains(e):n.compareDocumentPosition?!!(n.compareDocumentPosition(e)&16):!1:!1}function m2(){for(var n=window,e=Am();e instanceof n.HTMLIFrameElement;){try{var t=typeof e.contentWindow.location.href=="string"}catch{t=!1}if(t)n=e.contentWindow;else break;e=Am(n.document)}return e}function d_(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 dF(n){var e=m2(),t=n.focusedElem,i=n.selectionRange;if(e!==t&&t&&t.ownerDocument&&p2(t.ownerDocument.documentElement,t)){if(i!==null&&d_(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=yM(t,s);var o=yM(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,oc=null,cx=null,gf=null,ux=!1;function vM(n,e,t){var i=t.window===t?t.document:t.nodeType===9?t:t.ownerDocument;ux||oc==null||oc!==Am(i)||(i=oc,"selectionStart"in i&&d_(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}),gf&&Nf(gf,i)||(gf=i,i=Tm(cx,"onSelect"),0cc||(n.current=gx[cc],gx[cc]=null,cc--)}function Vt(n,e){cc++,gx[cc]=n.current,n.current=e}var jo={},ci=ta(jo),Pi=ta(!1),rl=jo;function Fc(n,e){var t=n.type.contextTypes;if(!t)return jo;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 Bi(n){return n=n.childContextTypes,n!=null}function Bm(){Xt(Pi),Xt(ci)}function CM(n,e,t){if(ci.current!==jo)throw Error(Se(168));Vt(ci,e),Vt(Pi,t)}function M2(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(Se(108,lD(n)||"Unknown",r));return an({},t,i)}function Rm(n){return n=(n=n.stateNode)&&n.__reactInternalMemoizedMergedChildContext||jo,rl=ci.current,Vt(ci,n),Vt(Pi,Pi.current),!0}function EM(n,e,t){var i=n.stateNode;if(!i)throw Error(Se(169));t?(n=M2(n,e,rl),i.__reactInternalMemoizedMergedChildContext=n,Xt(Pi),Xt(ci),Vt(ci,n)):Xt(Pi),Vt(Pi,t)}var Is=null,yg=!1,Ey=!1;function C2(n){Is===null?Is=[n]:Is.push(n)}function CF(n){yg=!0,C2(n)}function na(){if(!Ey&&Is!==null){Ey=!0;var n=0,e=Ot;try{var t=Is;for(Ot=1;n>=o,r-=o,Ns=1<<32-kr(e)+r|t<E?(B=R,R=null):B=R.sibling;var I=p(A,R,w[E],M);if(I===null){R===null&&(R=B);break}n&&R&&I.alternate===null&&e(A,R),_=s(I,_,E),P===null?b=I:P.sibling=I,P=I,R=B}if(E===w.length)return t(A,R),qt&&Ba(A,E),b;if(R===null){for(;EE?(B=R,R=null):B=R.sibling;var z=p(A,R,I.value,M);if(z===null){R===null&&(R=B);break}n&&R&&z.alternate===null&&e(A,R),_=s(z,_,E),P===null?b=z:P.sibling=z,P=z,R=B}if(I.done)return t(A,R),qt&&Ba(A,E),b;if(R===null){for(;!I.done;E++,I=w.next())I=d(A,I.value,M),I!==null&&(_=s(I,_,E),P===null?b=I:P.sibling=I,P=I);return qt&&Ba(A,E),b}for(R=i(A,R);!I.done;E++,I=w.next())I=m(R,A,E,I.value,M),I!==null&&(n&&I.alternate!==null&&R.delete(I.key===null?E:I.key),_=s(I,_,E),P===null?b=I:P.sibling=I,P=I);return n&&R.forEach(function(Z){return e(A,Z)}),qt&&Ba(A,E),b}function x(A,_,w,M){if(typeof w=="object"&&w!==null&&w.type===rc&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case Ud:e:{for(var b=w.key,P=_;P!==null;){if(P.key===b){if(b=w.type,b===rc){if(P.tag===7){t(A,P.sibling),_=r(P,w.props.children),_.return=A,A=_;break e}}else if(P.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===Ao&&IM(b)===P.type){t(A,P.sibling),_=r(P,w.props),_.ref=Nu(A,P,w),_.return=A,A=_;break e}t(A,P);break}else e(A,P);P=P.sibling}w.type===rc?(_=Za(w.props.children,A.mode,M,w.key),_.return=A,A=_):(M=cm(w.type,w.key,w.props,null,A.mode,M),M.ref=Nu(A,_,w),M.return=A,A=M)}return o(A);case ic:e:{for(P=w.key;_!==null;){if(_.key===P)if(_.tag===4&&_.stateNode.containerInfo===w.containerInfo&&_.stateNode.implementation===w.implementation){t(A,_.sibling),_=r(_,w.children||[]),_.return=A,A=_;break e}else{t(A,_);break}else e(A,_);_=_.sibling}_=Dy(w,A.mode,M),_.return=A,A=_}return o(A);case Ao:return P=w._init,x(A,_,P(w._payload),M)}if(af(w))return y(A,_,w,M);if(Lu(w))return v(A,_,w,M);Zd(A,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,_!==null&&_.tag===6?(t(A,_.sibling),_=r(_,w),_.return=A,A=_):(t(A,_),_=Iy(w,A.mode,M),_.return=A,A=_),o(A)):t(A,_)}return x}var Nc=I2(!0),D2=I2(!1),ph={},ls=ta(ph),Gf=ta(ph),Hf=ta(ph);function Ga(n){if(n===ph)throw Error(Se(174));return n}function w_(n,e){switch(Vt(Hf,e),Vt(Gf,n),Vt(ls,ph),n=e.nodeType,n){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:$v(null,"");break;default:n=n===8?e.parentNode:e,e=n.namespaceURI||null,n=n.tagName,e=$v(e,n)}Xt(ls),Vt(ls,e)}function Oc(){Xt(ls),Xt(Gf),Xt(Hf)}function F2(n){Ga(Hf.current);var e=Ga(ls.current),t=$v(e,n.type);e!==t&&(Vt(Gf,n),Vt(ls,t))}function S_(n){Gf.current===n&&(Xt(ls),Xt(Gf))}var tn=ta(0);function Nm(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 by=[];function M_(){for(var n=0;nt?t:4,n(!0);var i=Ty.transition;Ty.transition={};try{n(!1),e()}finally{Ot=t,Ty.transition=i}}function Z2(){return xr().memoizedState}function PF(n,e,t){var i=Oo(n);if(t={lane:i,action:t,hasEagerState:!1,eagerState:null,next:null},q2(n))$2(e,t);else if(t=P2(n,e,t,i),t!==null){var r=vi();Nr(t,n,i,r),e3(t,e,i)}}function BF(n,e,t){var i=Oo(n),r={lane:i,action:t,hasEagerState:!1,eagerState:null,next:null};if(q2(n))$2(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,Ur(a,o)){var l=e.interleaved;l===null?(r.next=r,__(e)):(r.next=l.next,l.next=r),e.interleaved=r;return}}catch{}finally{}t=P2(n,e,r,i),t!==null&&(r=vi(),Nr(t,n,i,r),e3(t,e,i))}}function q2(n){var e=n.alternate;return n===on||e!==null&&e===on}function $2(n,e){yf=Om=!0;var t=n.pending;t===null?e.next=e:(e.next=t.next,t.next=e),n.pending=e}function e3(n,e,t){if(t&4194240){var i=e.lanes;i&=n.pendingLanes,t|=i,e.lanes=t,o_(n,t)}}var zm={readContext:vr,useCallback:ii,useContext:ii,useEffect:ii,useImperativeHandle:ii,useInsertionEffect:ii,useLayoutEffect:ii,useMemo:ii,useReducer:ii,useRef:ii,useState:ii,useDebugValue:ii,useDeferredValue:ii,useTransition:ii,useMutableSource:ii,useSyncExternalStore:ii,useId:ii,unstable_isNewReconciler:!1},RF={readContext:vr,useCallback:function(n,e){return is().memoizedState=[n,e===void 0?null:e],n},useContext:vr,useEffect:FM,useImperativeHandle:function(n,e,t){return t=t!=null?t.concat([n]):null,sm(4194308,4,J2.bind(null,e,n),t)},useLayoutEffect:function(n,e){return sm(4194308,4,n,e)},useInsertionEffect:function(n,e){return sm(4,2,n,e)},useMemo:function(n,e){var t=is();return e=e===void 0?null:e,n=n(),t.memoizedState=[n,e],n},useReducer:function(n,e,t){var i=is();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=PF.bind(null,on,n),[i.memoizedState,n]},useRef:function(n){var e=is();return n={current:n},e.memoizedState=n},useState:DM,useDebugValue:P_,useDeferredValue:function(n){return is().memoizedState=n},useTransition:function(){var n=DM(!1),e=n[0];return n=TF.bind(null,n[1]),is().memoizedState=n,[e,n]},useMutableSource:function(){},useSyncExternalStore:function(n,e,t){var i=on,r=is();if(qt){if(t===void 0)throw Error(Se(407));t=t()}else{if(t=e(),Vn===null)throw Error(Se(349));ol&30||O2(i,e,t)}r.memoizedState=t;var s={value:t,getSnapshot:e};return r.queue=s,FM(U2.bind(null,i,s,n),[n]),i.flags|=2048,jf(9,z2.bind(null,i,s,t,e),void 0,null),t},useId:function(){var n=is(),e=Vn.identifierPrefix;if(qt){var t=Os,i=Ns;t=(i&~(1<<32-kr(i)-1)).toString(32)+t,e=":"+e+"R"+t,t=Vf++,0")&&(l=l.replace("",n.displayName)),l}while(1<=o&&0<=a);break}}}finally{uy=!1,Error.prepareStackTrace=t}return(n=n?n.displayName||n.name:"")?of(n):""}function iD(n){switch(n.tag){case 5:return of(n.type);case 16:return of("Lazy");case 13:return of("Suspense");case 19:return of("SuspenseList");case 0:case 2:case 15:return n=fy(n.type,!1),n;case 11:return n=fy(n.type.render,!1),n;case 1:return n=fy(n.type,!0),n;default:return""}}function Xv(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 rc:return"Fragment";case ic:return"Portal";case Wv:return"Profiler";case e_:return"StrictMode";case jv:return"Suspense";case Jv:return"SuspenseList"}if(typeof n=="object")switch(n.$$typeof){case BT:return(n.displayName||"Context")+".Consumer";case PT:return(n._context.displayName||"Context")+".Provider";case t_:var e=n.render;return n=n.displayName,n||(n=e.displayName||e.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case n_:return e=n.displayName||null,e!==null?e:Xv(n.type)||"Memo";case Ao:e=n._payload,n=n._init;try{return Xv(n(e))}catch{}}return null}function rD(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 Xv(e);case 8:return e===e_?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Wo(n){switch(typeof n){case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function LT(n){var e=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function sD(n){var e=LT(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 Ud(n){n._valueTracker||(n._valueTracker=sD(n))}function IT(n){if(!n)return!1;var e=n._valueTracker;if(!e)return!0;var t=e.getValue(),i="";return n&&(i=LT(n)?n.checked?"true":"false":n.value),n=i,n!==t?(e.setValue(n),!0):!1}function _m(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 Yv(n,e){var t=e.checked;return an({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:t??n._wrapperState.initialChecked})}function ZS(n,e){var t=e.defaultValue==null?"":e.defaultValue,i=e.checked!=null?e.checked:e.defaultChecked;t=Wo(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 DT(n,e){e=e.checked,e!=null&&$1(n,"checked",e,!1)}function Kv(n,e){DT(n,e);var t=Wo(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")?Qv(n,e.type,t):e.hasOwnProperty("defaultValue")&&Qv(n,e.type,Wo(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(n.defaultChecked=!!e.defaultChecked)}function qS(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 Qv(n,e,t){(e!=="number"||_m(n.ownerDocument)!==n)&&(t==null?n.defaultValue=""+n._wrapperState.initialValue:n.defaultValue!==""+t&&(n.defaultValue=""+t))}var af=Array.isArray;function Sc(n,e,t,i){if(n=n.options,e){e={};for(var r=0;r"+e.valueOf().toString()+"",e=Gd.firstChild;n.firstChild;)n.removeChild(n.firstChild);for(;e.firstChild;)n.appendChild(e.firstChild)}});function Rf(n,e){if(e){var t=n.firstChild;if(t&&t===n.lastChild&&t.nodeType===3){t.nodeValue=e;return}}n.textContent=e}var hf={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},oD=["Webkit","ms","Moz","O"];Object.keys(hf).forEach(function(n){oD.forEach(function(e){e=e+n.charAt(0).toUpperCase()+n.substring(1),hf[e]=hf[n]})});function OT(n,e,t){return e==null||typeof e=="boolean"||e===""?"":t||typeof e!="number"||e===0||hf.hasOwnProperty(n)&&hf[n]?(""+e).trim():e+"px"}function zT(n,e){n=n.style;for(var t in e)if(e.hasOwnProperty(t)){var i=t.indexOf("--")===0,r=OT(t,e[t],i);t==="float"&&(t="cssFloat"),i?n.setProperty(t,r):n[t]=r}}var aD=an({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 $v(n,e){if(e){if(aD[n]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(Se(137,n));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(Se(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(Se(61))}if(e.style!=null&&typeof e.style!="object")throw Error(Se(62))}}function ex(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 tx=null;function i_(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var nx=null,Mc=null,Cc=null;function tM(n){if(n=hh(n)){if(typeof nx!="function")throw Error(Se(280));var e=n.stateNode;e&&(e=mg(e),nx(n.stateNode,n.type,e))}}function UT(n){Mc?Cc?Cc.push(n):Cc=[n]:Mc=n}function GT(){if(Mc){var n=Mc,e=Cc;if(Cc=Mc=null,tM(n),e)for(n=0;n>>=0,n===0?32:31-(vD(n)/xD|0)|0}var Hd=64,Vd=4194304;function lf(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 Mm(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=lf(a):(s&=o,s!==0&&(i=lf(s)))}else o=t&~r,o!==0?i=lf(o):s!==0&&(i=lf(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 uh(n,e,t){n.pendingLanes|=e,e!==536870912&&(n.suspendedLanes=0,n.pingedLanes=0),n=n.eventTimes,e=31-kr(e),n[e]=t}function SD(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=pf),uM=String.fromCharCode(32),fM=!1;function a2(n,e){switch(n){case"keyup":return ZD.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function l2(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var sc=!1;function $D(n,e){switch(n){case"compositionend":return l2(e);case"keypress":return e.which!==32?null:(fM=!0,uM);case"textInput":return n=e.data,n===uM&&fM?null:n;default:return null}}function eF(n,e){if(sc)return n==="compositionend"||!f_&&a2(n,e)?(n=s2(),em=l_=bo=null,sc=!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=mM(t)}}function h2(n,e){return n&&e?n===e?!0:n&&n.nodeType===3?!1:e&&e.nodeType===3?h2(n,e.parentNode):"contains"in n?n.contains(e):n.compareDocumentPosition?!!(n.compareDocumentPosition(e)&16):!1:!1}function d2(){for(var n=window,e=_m();e instanceof n.HTMLIFrameElement;){try{var t=typeof e.contentWindow.location.href=="string"}catch{t=!1}if(t)n=e.contentWindow;else break;e=_m(n.document)}return e}function h_(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 cF(n){var e=d2(),t=n.focusedElem,i=n.selectionRange;if(e!==t&&t&&t.ownerDocument&&h2(t.ownerDocument.documentElement,t)){if(i!==null&&h_(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=gM(t,s);var o=gM(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,oc=null,lx=null,gf=null,cx=!1;function yM(n,e,t){var i=t.window===t?t.document:t.nodeType===9?t:t.ownerDocument;cx||oc==null||oc!==_m(i)||(i=oc,"selectionStart"in i&&h_(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}),gf&&Nf(gf,i)||(gf=i,i=bm(lx,"onSelect"),0cc||(n.current=mx[cc],mx[cc]=null,cc--)}function Vt(n,e){cc++,mx[cc]=n.current,n.current=e}var jo={},ci=ta(jo),Pi=ta(!1),rl=jo;function Fc(n,e){var t=n.type.contextTypes;if(!t)return jo;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 Bi(n){return n=n.childContextTypes,n!=null}function Pm(){Xt(Pi),Xt(ci)}function MM(n,e,t){if(ci.current!==jo)throw Error(Se(168));Vt(ci,e),Vt(Pi,t)}function w2(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(Se(108,rD(n)||"Unknown",r));return an({},t,i)}function Bm(n){return n=(n=n.stateNode)&&n.__reactInternalMemoizedMergedChildContext||jo,rl=ci.current,Vt(ci,n),Vt(Pi,Pi.current),!0}function CM(n,e,t){var i=n.stateNode;if(!i)throw Error(Se(169));t?(n=w2(n,e,rl),i.__reactInternalMemoizedMergedChildContext=n,Xt(Pi),Xt(ci),Vt(ci,n)):Xt(Pi),Vt(Pi,t)}var Is=null,gg=!1,Cy=!1;function S2(n){Is===null?Is=[n]:Is.push(n)}function AF(n){gg=!0,S2(n)}function na(){if(!Cy&&Is!==null){Cy=!0;var n=0,e=Ot;try{var t=Is;for(Ot=1;n>=o,r-=o,Ns=1<<32-kr(e)+r|t<E?(B=R,R=null):B=R.sibling;var I=p(A,R,w[E],M);if(I===null){R===null&&(R=B);break}n&&R&&I.alternate===null&&e(A,R),_=s(I,_,E),P===null?b=I:P.sibling=I,P=I,R=B}if(E===w.length)return t(A,R),qt&&Ba(A,E),b;if(R===null){for(;EE?(B=R,R=null):B=R.sibling;var z=p(A,R,I.value,M);if(z===null){R===null&&(R=B);break}n&&R&&z.alternate===null&&e(A,R),_=s(z,_,E),P===null?b=z:P.sibling=z,P=z,R=B}if(I.done)return t(A,R),qt&&Ba(A,E),b;if(R===null){for(;!I.done;E++,I=w.next())I=d(A,I.value,M),I!==null&&(_=s(I,_,E),P===null?b=I:P.sibling=I,P=I);return qt&&Ba(A,E),b}for(R=i(A,R);!I.done;E++,I=w.next())I=m(R,A,E,I.value,M),I!==null&&(n&&I.alternate!==null&&R.delete(I.key===null?E:I.key),_=s(I,_,E),P===null?b=I:P.sibling=I,P=I);return n&&R.forEach(function(Z){return e(A,Z)}),qt&&Ba(A,E),b}function x(A,_,w,M){if(typeof w=="object"&&w!==null&&w.type===rc&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case zd:e:{for(var b=w.key,P=_;P!==null;){if(P.key===b){if(b=w.type,b===rc){if(P.tag===7){t(A,P.sibling),_=r(P,w.props.children),_.return=A,A=_;break e}}else if(P.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===Ao&&LM(b)===P.type){t(A,P.sibling),_=r(P,w.props),_.ref=Nu(A,P,w),_.return=A,A=_;break e}t(A,P);break}else e(A,P);P=P.sibling}w.type===rc?(_=Za(w.props.children,A.mode,M,w.key),_.return=A,A=_):(M=lm(w.type,w.key,w.props,null,A.mode,M),M.ref=Nu(A,_,w),M.return=A,A=M)}return o(A);case ic:e:{for(P=w.key;_!==null;){if(_.key===P)if(_.tag===4&&_.stateNode.containerInfo===w.containerInfo&&_.stateNode.implementation===w.implementation){t(A,_.sibling),_=r(_,w.children||[]),_.return=A,A=_;break e}else{t(A,_);break}else e(A,_);_=_.sibling}_=Iy(w,A.mode,M),_.return=A,A=_}return o(A);case Ao:return P=w._init,x(A,_,P(w._payload),M)}if(af(w))return y(A,_,w,M);if(Lu(w))return v(A,_,w,M);Qd(A,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,_!==null&&_.tag===6?(t(A,_.sibling),_=r(_,w),_.return=A,A=_):(t(A,_),_=Ly(w,A.mode,M),_.return=A,A=_),o(A)):t(A,_)}return x}var Nc=R2(!0),L2=R2(!1),dh={},ls=ta(dh),Gf=ta(dh),Hf=ta(dh);function Ga(n){if(n===dh)throw Error(Se(174));return n}function A_(n,e){switch(Vt(Hf,e),Vt(Gf,n),Vt(ls,dh),n=e.nodeType,n){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:qv(null,"");break;default:n=n===8?e.parentNode:e,e=n.namespaceURI||null,n=n.tagName,e=qv(e,n)}Xt(ls),Vt(ls,e)}function Oc(){Xt(ls),Xt(Gf),Xt(Hf)}function I2(n){Ga(Hf.current);var e=Ga(ls.current),t=qv(e,n.type);e!==t&&(Vt(Gf,n),Vt(ls,t))}function w_(n){Gf.current===n&&(Xt(ls),Xt(Gf))}var tn=ta(0);function km(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 Ey=[];function S_(){for(var n=0;nt?t:4,n(!0);var i=by.transition;by.transition={};try{n(!1),e()}finally{Ot=t,by.transition=i}}function K2(){return xr().memoizedState}function CF(n,e,t){var i=Oo(n);if(t={lane:i,action:t,hasEagerState:!1,eagerState:null,next:null},Q2(n))Z2(e,t);else if(t=b2(n,e,t,i),t!==null){var r=vi();Nr(t,n,i,r),q2(t,e,i)}}function EF(n,e,t){var i=Oo(n),r={lane:i,action:t,hasEagerState:!1,eagerState:null,next:null};if(Q2(n))Z2(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,Ur(a,o)){var l=e.interleaved;l===null?(r.next=r,x_(e)):(r.next=l.next,l.next=r),e.interleaved=r;return}}catch{}finally{}t=b2(n,e,r,i),t!==null&&(r=vi(),Nr(t,n,i,r),q2(t,e,i))}}function Q2(n){var e=n.alternate;return n===on||e!==null&&e===on}function Z2(n,e){yf=Nm=!0;var t=n.pending;t===null?e.next=e:(e.next=t.next,t.next=e),n.pending=e}function q2(n,e,t){if(t&4194240){var i=e.lanes;i&=n.pendingLanes,t|=i,e.lanes=t,s_(n,t)}}var Om={readContext:vr,useCallback:ii,useContext:ii,useEffect:ii,useImperativeHandle:ii,useInsertionEffect:ii,useLayoutEffect:ii,useMemo:ii,useReducer:ii,useRef:ii,useState:ii,useDebugValue:ii,useDeferredValue:ii,useTransition:ii,useMutableSource:ii,useSyncExternalStore:ii,useId:ii,unstable_isNewReconciler:!1},bF={readContext:vr,useCallback:function(n,e){return is().memoizedState=[n,e===void 0?null:e],n},useContext:vr,useEffect:DM,useImperativeHandle:function(n,e,t){return t=t!=null?t.concat([n]):null,rm(4194308,4,W2.bind(null,e,n),t)},useLayoutEffect:function(n,e){return rm(4194308,4,n,e)},useInsertionEffect:function(n,e){return rm(4,2,n,e)},useMemo:function(n,e){var t=is();return e=e===void 0?null:e,n=n(),t.memoizedState=[n,e],n},useReducer:function(n,e,t){var i=is();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=CF.bind(null,on,n),[i.memoizedState,n]},useRef:function(n){var e=is();return n={current:n},e.memoizedState=n},useState:IM,useDebugValue:T_,useDeferredValue:function(n){return is().memoizedState=n},useTransition:function(){var n=IM(!1),e=n[0];return n=MF.bind(null,n[1]),is().memoizedState=n,[e,n]},useMutableSource:function(){},useSyncExternalStore:function(n,e,t){var i=on,r=is();if(qt){if(t===void 0)throw Error(Se(407));t=t()}else{if(t=e(),Vn===null)throw Error(Se(349));ol&30||k2(i,e,t)}r.memoizedState=t;var s={value:t,getSnapshot:e};return r.queue=s,DM(O2.bind(null,i,s,n),[n]),i.flags|=2048,jf(9,N2.bind(null,i,s,t,e),void 0,null),t},useId:function(){var n=is(),e=Vn.identifierPrefix;if(qt){var t=Os,i=Ns;t=(i&~(1<<32-kr(i)-1)).toString(32)+t,e=":"+e+"R"+t,t=Vf++,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[os]=e,n[Uf]=i,c3(n,e,!1,!1),e.stateNode=n;e:{switch(o=tx(t,i),t){case"dialog":Wt("cancel",n),Wt("close",n),r=i;break;case"iframe":case"object":case"embed":Wt("load",n),r=i;break;case"video":case"audio":for(r=0;rUc&&(e.flags|=128,i=!0,Ou(s,!1),e.lanes=4194304)}else{if(!i)if(n=Nm(o),n!==null){if(e.flags|=128,i=!0,t=n.updateQueue,t!==null&&(e.updateQueue=t,e.flags|=4),Ou(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!qt)return ri(e),null}else 2*_n()-s.renderingStartTime>Uc&&t!==1073741824&&(e.flags|=128,i=!0,Ou(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=_n(),e.sibling=null,t=tn.current,Vt(tn,i?t&1|2:t&1),e):(ri(e),null);case 22:case 23:return F_(),i=e.memoizedState!==null,n!==null&&n.memoizedState!==null!==i&&(e.flags|=8192),i&&e.mode&1?Ui&1073741824&&(ri(e),e.subtreeFlags&6&&(e.flags|=8192)):ri(e),null;case 24:return null;case 25:return null}throw Error(Se(156,e.tag))}function zF(n,e){switch(m_(e),e.tag){case 1:return Bi(e.type)&&Bm(),n=e.flags,n&65536?(e.flags=n&-65537|128,e):null;case 3:return Oc(),Xt(Pi),Xt(ci),M_(),n=e.flags,n&65536&&!(n&128)?(e.flags=n&-65537|128,e):null;case 5:return S_(e),null;case 13:if(Xt(tn),n=e.memoizedState,n!==null&&n.dehydrated!==null){if(e.alternate===null)throw Error(Se(340));kc()}return n=e.flags,n&65536?(e.flags=n&-65537|128,e):null;case 19:return Xt(tn),null;case 4:return Oc(),null;case 10:return x_(e.type._context),null;case 22:case 23:return F_(),null;case 24:return null;default:return null}}var $d=!1,li=!1,UF=typeof WeakSet=="function"?WeakSet:Set,Ue=null;function dc(n,e){var t=n.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(i){pn(n,e,i)}else t.current=null}function Tx(n,e,t){try{t()}catch(i){pn(n,e,i)}}var WM=!1;function GF(n,e){if(fx=Em,n=m2(),d_(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,u=0,h=0,d=n,p=null;t:for(;;){for(var m;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),(m=d.firstChild)!==null;)p=d,d=m;for(;;){if(d===n)break t;if(p===t&&++u===r&&(a=o),p===s&&++h===i&&(l=o),(m=d.nextSibling)!==null)break;d=p,p=d.parentNode}d=m}t=a===-1||l===-1?null:{start:a,end:l}}else t=null}t=t||{start:0,end:0}}else t=null;for(hx={focusedElem:n,selectionRange:t},Em=!1,Ue=e;Ue!==null;)if(e=Ue,n=e.child,(e.subtreeFlags&1028)!==0&&n!==null)n.return=e,Ue=n;else for(;Ue!==null;){e=Ue;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 v=y.memoizedProps,x=y.memoizedState,A=e.stateNode,_=A.getSnapshotBeforeUpdate(e.elementType===e.type?v:Br(e.type,v),x);A.__reactInternalSnapshotBeforeUpdate=_}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(Se(163))}}catch(M){pn(e,e.return,M)}if(n=e.sibling,n!==null){n.return=e.return,Ue=n;break}Ue=e.return}return y=WM,WM=!1,y}function vf(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&&Tx(e,t,s)}r=r.next}while(r!==i)}}function _g(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 Px(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 h3(n){var e=n.alternate;e!==null&&(n.alternate=null,h3(e)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(e=n.stateNode,e!==null&&(delete e[os],delete e[Uf],delete e[mx],delete e[SF],delete e[MF])),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 d3(n){return n.tag===5||n.tag===3||n.tag===4}function jM(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||d3(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 Bx(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(Bx(n,e,t),n=n.sibling;n!==null;)Bx(n,e,t),n=n.sibling}function Rx(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(Rx(n,e,t),n=n.sibling;n!==null;)Rx(n,e,t),n=n.sibling}var Xn=null,Rr=!1;function uo(n,e,t){for(t=t.child;t!==null;)p3(n,e,t),t=t.sibling}function p3(n,e,t){if(as&&typeof as.onCommitFiberUnmount=="function")try{as.onCommitFiberUnmount(hg,t)}catch{}switch(t.tag){case 5:li||dc(t,e);case 6:var i=Xn,r=Rr;Xn=null,uo(n,e,t),Xn=i,Rr=r,Xn!==null&&(Rr?(n=Xn,t=t.stateNode,n.nodeType===8?n.parentNode.removeChild(t):n.removeChild(t)):Xn.removeChild(t.stateNode));break;case 18:Xn!==null&&(Rr?(n=Xn,t=t.stateNode,n.nodeType===8?Cy(n.parentNode,t):n.nodeType===1&&Cy(n,t),Ff(n)):Cy(Xn,t.stateNode));break;case 4:i=Xn,r=Rr,Xn=t.stateNode.containerInfo,Rr=!0,uo(n,e,t),Xn=i,Rr=r;break;case 0:case 11:case 14:case 15:if(!li&&(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)&&Tx(t,e,o),r=r.next}while(r!==i)}uo(n,e,t);break;case 1:if(!li&&(dc(t,e),i=t.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=t.memoizedProps,i.state=t.memoizedState,i.componentWillUnmount()}catch(a){pn(t,e,a)}uo(n,e,t);break;case 21:uo(n,e,t);break;case 22:t.mode&1?(li=(i=li)||t.memoizedState!==null,uo(n,e,t),li=i):uo(n,e,t);break;default:uo(n,e,t)}}function JM(n){var e=n.updateQueue;if(e!==null){n.updateQueue=null;var t=n.stateNode;t===null&&(t=n.stateNode=new UF),e.forEach(function(i){var r=QF.bind(null,n,i);t.has(i)||(t.add(i),i.then(r,r))})}}function Er(n,e){var t=e.deletions;if(t!==null)for(var i=0;ir&&(r=o),i&=~s}if(i=r,i=_n()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*VF(i/1960))-i,10n?16:n,To===null)var i=!1;else{if(n=To,To=null,Hm=0,Tt&6)throw Error(Se(331));var r=Tt;for(Tt|=4,Ue=n.current;Ue!==null;){var s=Ue,o=s.child;if(Ue.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l_n()-I_?Qa(n,0):L_|=t),Ri(n,e)}function w3(n,e){e===0&&(n.mode&1?(e=Wd,Wd<<=1,!(Wd&130023424)&&(Wd=4194304)):e=1);var t=vi();n=Ks(n,e),n!==null&&(fh(n,e,t),Ri(n,t))}function KF(n){var e=n.memoizedState,t=0;e!==null&&(t=e.retryLane),w3(n,t)}function QF(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(Se(314))}i!==null&&i.delete(e),w3(n,t)}var S3;S3=function(n,e,t){if(n!==null)if(n.memoizedProps!==e.pendingProps||Pi.current)Ti=!0;else{if(!(n.lanes&t)&&!(e.flags&128))return Ti=!1,NF(n,e,t);Ti=!!(n.flags&131072)}else Ti=!1,qt&&e.flags&1048576&&E2(e,Im,e.index);switch(e.lanes=0,e.tag){case 2:var i=e.type;om(n,e),n=e.pendingProps;var r=Fc(e,ci.current);bc(e,t),r=E_(null,e,i,n,r,t);var s=b_();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,Bi(i)?(s=!0,Rm(e)):s=!1,e.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,A_(e),r.updater=vg,e.stateNode=r,r._reactInternals=e,Ax(e,i,n,t),e=Mx(null,e,i,!0,s,t)):(e.tag=0,qt&&s&&p_(e),yi(null,e,r,t),e=e.child),e;case 16:i=e.elementType;e:{switch(om(n,e),n=e.pendingProps,r=i._init,i=r(i._payload),e.type=i,r=e.tag=qF(i),n=Br(i,n),r){case 0:e=Sx(null,e,i,n,t);break e;case 1:e=GM(null,e,i,n,t);break e;case 11:e=zM(null,e,i,n,t);break e;case 14:e=UM(null,e,i,Br(i.type,n),t);break e}throw Error(Se(306,i,""))}return e;case 0:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:Br(i,r),Sx(n,e,i,r,t);case 1:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:Br(i,r),GM(n,e,i,r,t);case 3:e:{if(o3(e),n===null)throw Error(Se(387));i=e.pendingProps,s=e.memoizedState,r=s.element,B2(n,e),km(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=zc(Error(Se(423)),e),e=HM(n,e,i,t,r);break e}else if(i!==r){r=zc(Error(Se(424)),e),e=HM(n,e,i,t,r);break e}else for(Hi=Fo(e.stateNode.containerInfo.firstChild),Wi=e,qt=!0,Ir=null,t=D2(e,null,i,t),e.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling;else{if(kc(),i===r){e=Qs(n,e,t);break e}yi(n,e,i,t)}e=e.child}return e;case 5:return F2(e),n===null&&vx(e),i=e.type,r=e.pendingProps,s=n!==null?n.memoizedProps:null,o=r.children,dx(i,r)?o=null:s!==null&&dx(i,s)&&(e.flags|=32),s3(n,e),yi(n,e,o,t),e.child;case 6:return n===null&&vx(e),null;case 13:return a3(n,e,t);case 4:return w_(e,e.stateNode.containerInfo),i=e.pendingProps,n===null?e.child=Nc(e,null,i,t):yi(n,e,i,t),e.child;case 11:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:Br(i,r),zM(n,e,i,r,t);case 7:return yi(n,e,e.pendingProps,t),e.child;case 8:return yi(n,e,e.pendingProps.children,t),e.child;case 12:return yi(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,Vt(Dm,i._currentValue),i._currentValue=o,s!==null)if(Ur(s.value,o)){if(s.children===r.children&&!Pi.current){e=Qs(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=Vs(-1,t&-t),l.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var h=u.pending;h===null?l.next=l:(l.next=h.next,h.next=l),u.pending=l}}s.lanes|=t,l=s.alternate,l!==null&&(l.lanes|=t),xx(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(Se(341));o.lanes|=t,a=o.alternate,a!==null&&(a.lanes|=t),xx(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}yi(n,e,r.children,t),e=e.child}return e;case 9:return r=e.type,i=e.pendingProps.children,bc(e,t),r=vr(r),i=i(r),e.flags|=1,yi(n,e,i,t),e.child;case 14:return i=e.type,r=Br(i,e.pendingProps),r=Br(i.type,r),UM(n,e,i,r,t);case 15:return i3(n,e,e.type,e.pendingProps,t);case 17:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:Br(i,r),om(n,e),e.tag=1,Bi(i)?(n=!0,Rm(e)):n=!1,bc(e,t),L2(e,i,r),Ax(e,i,r,t),Mx(null,e,i,!0,n,t);case 19:return l3(n,e,t);case 22:return r3(n,e,t)}throw Error(Se(156,e.tag))};function M3(n,e){return QT(n,e)}function ZF(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 pr(n,e,t,i){return new ZF(n,e,t,i)}function N_(n){return n=n.prototype,!(!n||!n.isReactComponent)}function qF(n){if(typeof n=="function")return N_(n)?1:0;if(n!=null){if(n=n.$$typeof,n===n_)return 11;if(n===i_)return 14}return 2}function zo(n,e){var t=n.alternate;return t===null?(t=pr(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 cm(n,e,t,i,r,s){var o=2;if(i=n,typeof n=="function")N_(n)&&(o=1);else if(typeof n=="string")o=5;else e:switch(n){case rc:return Za(t.children,r,s,e);case t_:o=8,r|=8;break;case jv:return n=pr(12,t,e,r|2),n.elementType=jv,n.lanes=s,n;case Jv:return n=pr(13,t,e,r),n.elementType=Jv,n.lanes=s,n;case Xv:return n=pr(19,t,e,r),n.elementType=Xv,n.lanes=s,n;case IT:return wg(t,r,s,e);default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case RT:o=10;break e;case LT:o=9;break e;case n_:o=11;break e;case i_:o=14;break e;case Ao:o=16,i=null;break e}throw Error(Se(130,n==null?n:typeof n,""))}return e=pr(o,t,e,r),e.elementType=n,e.type=i,e.lanes=s,e}function Za(n,e,t,i){return n=pr(7,n,i,e),n.lanes=t,n}function wg(n,e,t,i){return n=pr(22,n,i,e),n.elementType=IT,n.lanes=t,n.stateNode={isHidden:!1},n}function Iy(n,e,t){return n=pr(6,n,null,e),n.lanes=t,n}function Dy(n,e,t){return e=pr(4,n.children!==null?n.children:[],n.key,e),e.lanes=t,e.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},e}function $F(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=py(0),this.expirationTimes=py(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=py(0),this.identifierPrefix=i,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function O_(n,e,t,i,r,s,o,a,l){return n=new $F(n,e,t,a,l),e===1?(e=1,s===!0&&(e|=8)):e=0,s=pr(3,null,null,e),n.current=s,s.stateNode=n,s.memoizedState={element:i,isDehydrated:t,cache:null,transitions:null,pendingSuspenseBoundaries:null},A_(s),n}function ek(n,e,t){var i=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}e(),n.exports=Qi})(tD);const sk=X1(_m);/** +`+s.stack}return{value:n,source:e,stack:r,digest:null}}function By(n,e,t){return{value:n,source:null,stack:t??null,digest:e??null}}function Ax(n,e){try{console.error(e.value)}catch(t){setTimeout(function(){throw t})}}var BF=typeof WeakMap=="function"?WeakMap:Map;function $2(n,e,t){t=Vs(-1,t),t.tag=3,t.payload={element:null};var i=e.value;return t.callback=function(){Um||(Um=!0,Rx=i),Ax(n,e)},t}function e3(n,e,t){t=Vs(-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(){Ax(n,e)}}var s=n.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(t.callback=function(){Ax(n,e),typeof i!="function"&&(No===null?No=new Set([this]):No.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),t}function FM(n,e,t){var i=n.pingCache;if(i===null){i=n.pingCache=new BF;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=WF.bind(null,n,e,t),e.then(n,n))}function kM(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 NM(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=Vs(-1,1),e.tag=2,ko(t,e,1))),t.lanes|=1),n)}var RF=eo.ReactCurrentOwner,Ti=!1;function yi(n,e,t,i){e.child=n===null?L2(e,null,t,i):Nc(e,n.child,t,i)}function OM(n,e,t,i,r){t=t.render;var s=e.ref;return bc(e,r),i=C_(n,e,t,i,s,r),t=E_(),n!==null&&!Ti?(e.updateQueue=n.updateQueue,e.flags&=-2053,n.lanes&=~r,Qs(n,e,r)):(qt&&t&&d_(e),e.flags|=1,yi(n,e,i,r),e.child)}function zM(n,e,t,i,r){if(n===null){var s=t.type;return typeof s=="function"&&!k_(s)&&s.defaultProps===void 0&&t.compare===null&&t.defaultProps===void 0?(e.tag=15,e.type=s,t3(n,e,s,i,r)):(n=lm(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:Nf,t(o,i)&&n.ref===e.ref)return Qs(n,e,r)}return e.flags|=1,n=zo(s,i),n.ref=e.ref,n.return=e,e.child=n}function t3(n,e,t,i,r){if(n!==null){var s=n.memoizedProps;if(Nf(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,Qs(n,e,r)}return wx(n,e,t,i,r)}function n3(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},Vt(pc,Ui),Ui|=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,Vt(pc,Ui),Ui|=n,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=s!==null?s.baseLanes:t,Vt(pc,Ui),Ui|=i}else s!==null?(i=s.baseLanes|t,e.memoizedState=null):i=t,Vt(pc,Ui),Ui|=i;return yi(n,e,r,t),e.child}function i3(n,e){var t=e.ref;(n===null&&t!==null||n!==null&&n.ref!==t)&&(e.flags|=512,e.flags|=2097152)}function wx(n,e,t,i,r){var s=Bi(t)?rl:ci.current;return s=Fc(e,s),bc(e,r),t=C_(n,e,t,i,s,r),i=E_(),n!==null&&!Ti?(e.updateQueue=n.updateQueue,e.flags&=-2053,n.lanes&=~r,Qs(n,e,r)):(qt&&i&&d_(e),e.flags|=1,yi(n,e,t,r),e.child)}function UM(n,e,t,i,r){if(Bi(t)){var s=!0;Bm(e)}else s=!1;if(bc(e,r),e.stateNode===null)sm(n,e),B2(e,t,i),_x(e,t,i,r),i=!0;else if(n===null){var o=e.stateNode,a=e.memoizedProps;o.props=a;var l=o.context,u=t.contextType;typeof u=="object"&&u!==null?u=vr(u):(u=Bi(t)?rl:ci.current,u=Fc(e,u));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!==u)&&RM(e,o,i,u),wo=!1;var p=e.memoizedState;o.state=p,Fm(e,i,o,r),l=e.memoizedState,a!==i||p!==l||Pi.current||wo?(typeof h=="function"&&(xx(e,t,h,i),l=e.memoizedState),(a=wo||BM(e,t,a,i,p,l,u))?(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=u,i=a):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),i=!1)}else{o=e.stateNode,T2(n,e),a=e.memoizedProps,u=e.type===e.elementType?a:Br(e.type,a),o.props=u,d=e.pendingProps,p=o.context,l=t.contextType,typeof l=="object"&&l!==null?l=vr(l):(l=Bi(t)?rl:ci.current,l=Fc(e,l));var m=t.getDerivedStateFromProps;(h=typeof m=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==d||p!==l)&&RM(e,o,i,l),wo=!1,p=e.memoizedState,o.state=p,Fm(e,i,o,r);var y=e.memoizedState;a!==d||p!==y||Pi.current||wo?(typeof m=="function"&&(xx(e,t,m,i),y=e.memoizedState),(u=wo||BM(e,t,u,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=u):(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 Sx(n,e,t,i,s,r)}function Sx(n,e,t,i,r,s){i3(n,e);var o=(e.flags&128)!==0;if(!i&&!o)return r&&CM(e,t,!1),Qs(n,e,s);i=e.stateNode,RF.current=e;var a=o&&typeof t.getDerivedStateFromError!="function"?null:i.render();return e.flags|=1,n!==null&&o?(e.child=Nc(e,n.child,null,s),e.child=Nc(e,null,a,s)):yi(n,e,a,s),e.memoizedState=i.state,r&&CM(e,t,!0),e.child}function r3(n){var e=n.stateNode;e.pendingContext?MM(n,e.pendingContext,e.pendingContext!==e.context):e.context&&MM(n,e.context,!1),A_(n,e.containerInfo)}function GM(n,e,t,i,r){return kc(),m_(r),e.flags|=256,yi(n,e,t,i),e.child}var Mx={dehydrated:null,treeContext:null,retryLane:0};function Cx(n){return{baseLanes:n,cachePool:null,transitions:null}}function s3(n,e,t){var i=e.pendingProps,r=tn.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),Vt(tn,r&1),n===null)return yx(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=Ag(o,i,0,null),n=Za(n,i,t,null),s.return=e,n.return=e,s.sibling=n,e.child=s,e.child.memoizedState=Cx(t),e.memoizedState=Mx,n):P_(e,o));if(r=n.memoizedState,r!==null&&(a=r.dehydrated,a!==null))return LF(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=zo(r,l),i.subtreeFlags=r.subtreeFlags&14680064),a!==null?s=zo(a,s):(s=Za(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?Cx(t):{baseLanes:o.baseLanes|t,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=n.childLanes&~t,e.memoizedState=Mx,i}return s=n.child,n=s.sibling,i=zo(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 P_(n,e){return e=Ag({mode:"visible",children:e},n.mode,0,null),e.return=n,n.child=e}function Zd(n,e,t,i){return i!==null&&m_(i),Nc(e,n.child,null,t),n=P_(e,e.pendingProps.children),n.flags|=2,e.memoizedState=null,n}function LF(n,e,t,i,r,s,o){if(t)return e.flags&256?(e.flags&=-257,i=By(Error(Se(422))),Zd(n,e,o,i)):e.memoizedState!==null?(e.child=n.child,e.flags|=128,null):(s=i.fallback,r=e.mode,i=Ag({mode:"visible",children:i.children},r,0,null),s=Za(s,r,o,null),s.flags|=2,i.return=e,s.return=e,i.sibling=s,e.child=i,e.mode&1&&Nc(e,n.child,null,o),e.child.memoizedState=Cx(o),e.memoizedState=Mx,s);if(!(e.mode&1))return Zd(n,e,o,null);if(r.data==="$!"){if(i=r.nextSibling&&r.nextSibling.dataset,i)var a=i.dgst;return i=a,s=Error(Se(419)),i=By(s,i,void 0),Zd(n,e,o,i)}if(a=(o&n.childLanes)!==0,Ti||a){if(i=Vn,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,Ks(n,r),Nr(i,n,r,-1))}return F_(),i=By(Error(Se(421))),Zd(n,e,o,i)}return r.data==="$?"?(e.flags|=128,e.child=n.child,e=jF.bind(null,n),r._reactRetry=e,null):(n=s.treeContext,Hi=Fo(r.nextSibling),Wi=e,qt=!0,Ir=null,n!==null&&(fr[hr++]=Ns,fr[hr++]=Os,fr[hr++]=sl,Ns=n.id,Os=n.overflow,sl=e),e=P_(e,i.children),e.flags|=4096,e)}function HM(n,e,t){n.lanes|=e;var i=n.alternate;i!==null&&(i.lanes|=e),vx(n.return,e,t)}function Ry(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 o3(n,e,t){var i=e.pendingProps,r=i.revealOrder,s=i.tail;if(yi(n,e,i.children,t),i=tn.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&&HM(n,t,e);else if(n.tag===19)HM(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(Vt(tn,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&&km(n)===null&&(r=t),t=t.sibling;t=r,t===null?(r=e.child,e.child=null):(r=t.sibling,t.sibling=null),Ry(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&&km(n)===null){e.child=r;break}n=r.sibling,r.sibling=t,t=r,r=n}Ry(e,!0,t,null,s);break;case"together":Ry(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function sm(n,e){!(e.mode&1)&&n!==null&&(n.alternate=null,e.alternate=null,e.flags|=2)}function Qs(n,e,t){if(n!==null&&(e.dependencies=n.dependencies),al|=e.lanes,!(t&e.childLanes))return null;if(n!==null&&e.child!==n.child)throw Error(Se(153));if(e.child!==null){for(n=e.child,t=zo(n,n.pendingProps),e.child=t,t.return=e;n.sibling!==null;)n=n.sibling,t=t.sibling=zo(n,n.pendingProps),t.return=e;t.sibling=null}return e.child}function IF(n,e,t){switch(e.tag){case 3:r3(e),kc();break;case 5:I2(e);break;case 1:Bi(e.type)&&Bm(e);break;case 4:A_(e,e.stateNode.containerInfo);break;case 10:var i=e.type._context,r=e.memoizedProps.value;Vt(Im,i._currentValue),i._currentValue=r;break;case 13:if(i=e.memoizedState,i!==null)return i.dehydrated!==null?(Vt(tn,tn.current&1),e.flags|=128,null):t&e.child.childLanes?s3(n,e,t):(Vt(tn,tn.current&1),n=Qs(n,e,t),n!==null?n.sibling:null);Vt(tn,tn.current&1);break;case 19:if(i=(t&e.childLanes)!==0,n.flags&128){if(i)return o3(n,e,t);e.flags|=128}if(r=e.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),Vt(tn,tn.current),i)break;return null;case 22:case 23:return e.lanes=0,n3(n,e,t)}return Qs(n,e,t)}var a3,Ex,l3,c3;a3=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}};Ex=function(){};l3=function(n,e,t,i){var r=n.memoizedProps;if(r!==i){n=e.stateNode,Ga(ls.current);var s=null;switch(t){case"input":r=Yv(n,r),i=Yv(n,i),s=[];break;case"select":r=an({},r,{value:void 0}),i=an({},i,{value:void 0}),s=[];break;case"textarea":r=Zv(n,r),i=Zv(n,i),s=[];break;default:typeof r.onClick!="function"&&typeof i.onClick=="function"&&(n.onclick=Tm)}$v(t,i);var o;t=null;for(u in r)if(!i.hasOwnProperty(u)&&r.hasOwnProperty(u)&&r[u]!=null)if(u==="style"){var a=r[u];for(o in a)a.hasOwnProperty(o)&&(t||(t={}),t[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Bf.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in i){var l=i[u];if(a=r!=null?r[u]:void 0,i.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="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(u,t)),t=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(s=s||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Bf.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&Wt("scroll",n),s||a===l||(s=[])):(s=s||[]).push(u,l))}t&&(s=s||[]).push("style",t);var u=s;(e.updateQueue=u)&&(e.flags|=4)}};c3=function(n,e,t,i){t!==i&&(e.flags|=4)};function Ou(n,e){if(!qt)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 ri(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 DF(n,e,t){var i=e.pendingProps;switch(p_(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ri(e),null;case 1:return Bi(e.type)&&Pm(),ri(e),null;case 3:return i=e.stateNode,Oc(),Xt(Pi),Xt(ci),S_(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(n===null||n.child===null)&&(Kd(e)?e.flags|=4:n===null||n.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Ir!==null&&(Dx(Ir),Ir=null))),Ex(n,e),ri(e),null;case 5:w_(e);var r=Ga(Hf.current);if(t=e.type,n!==null&&e.stateNode!=null)l3(n,e,t,i,r),n.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!i){if(e.stateNode===null)throw Error(Se(166));return ri(e),null}if(n=Ga(ls.current),Kd(e)){i=e.stateNode,t=e.type;var s=e.memoizedProps;switch(i[os]=e,i[Uf]=s,n=(e.mode&1)!==0,t){case"dialog":Wt("cancel",i),Wt("close",i);break;case"iframe":case"object":case"embed":Wt("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[os]=e,n[Uf]=i,a3(n,e,!1,!1),e.stateNode=n;e:{switch(o=ex(t,i),t){case"dialog":Wt("cancel",n),Wt("close",n),r=i;break;case"iframe":case"object":case"embed":Wt("load",n),r=i;break;case"video":case"audio":for(r=0;rUc&&(e.flags|=128,i=!0,Ou(s,!1),e.lanes=4194304)}else{if(!i)if(n=km(o),n!==null){if(e.flags|=128,i=!0,t=n.updateQueue,t!==null&&(e.updateQueue=t,e.flags|=4),Ou(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!qt)return ri(e),null}else 2*_n()-s.renderingStartTime>Uc&&t!==1073741824&&(e.flags|=128,i=!0,Ou(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=_n(),e.sibling=null,t=tn.current,Vt(tn,i?t&1|2:t&1),e):(ri(e),null);case 22:case 23:return D_(),i=e.memoizedState!==null,n!==null&&n.memoizedState!==null!==i&&(e.flags|=8192),i&&e.mode&1?Ui&1073741824&&(ri(e),e.subtreeFlags&6&&(e.flags|=8192)):ri(e),null;case 24:return null;case 25:return null}throw Error(Se(156,e.tag))}function FF(n,e){switch(p_(e),e.tag){case 1:return Bi(e.type)&&Pm(),n=e.flags,n&65536?(e.flags=n&-65537|128,e):null;case 3:return Oc(),Xt(Pi),Xt(ci),S_(),n=e.flags,n&65536&&!(n&128)?(e.flags=n&-65537|128,e):null;case 5:return w_(e),null;case 13:if(Xt(tn),n=e.memoizedState,n!==null&&n.dehydrated!==null){if(e.alternate===null)throw Error(Se(340));kc()}return n=e.flags,n&65536?(e.flags=n&-65537|128,e):null;case 19:return Xt(tn),null;case 4:return Oc(),null;case 10:return v_(e.type._context),null;case 22:case 23:return D_(),null;case 24:return null;default:return null}}var qd=!1,li=!1,kF=typeof WeakSet=="function"?WeakSet:Set,Ue=null;function dc(n,e){var t=n.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(i){pn(n,e,i)}else t.current=null}function bx(n,e,t){try{t()}catch(i){pn(n,e,i)}}var VM=!1;function NF(n,e){if(ux=Cm,n=d2(),h_(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,u=0,h=0,d=n,p=null;t:for(;;){for(var m;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),(m=d.firstChild)!==null;)p=d,d=m;for(;;){if(d===n)break t;if(p===t&&++u===r&&(a=o),p===s&&++h===i&&(l=o),(m=d.nextSibling)!==null)break;d=p,p=d.parentNode}d=m}t=a===-1||l===-1?null:{start:a,end:l}}else t=null}t=t||{start:0,end:0}}else t=null;for(fx={focusedElem:n,selectionRange:t},Cm=!1,Ue=e;Ue!==null;)if(e=Ue,n=e.child,(e.subtreeFlags&1028)!==0&&n!==null)n.return=e,Ue=n;else for(;Ue!==null;){e=Ue;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 v=y.memoizedProps,x=y.memoizedState,A=e.stateNode,_=A.getSnapshotBeforeUpdate(e.elementType===e.type?v:Br(e.type,v),x);A.__reactInternalSnapshotBeforeUpdate=_}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(Se(163))}}catch(M){pn(e,e.return,M)}if(n=e.sibling,n!==null){n.return=e.return,Ue=n;break}Ue=e.return}return y=VM,VM=!1,y}function vf(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&&bx(e,t,s)}r=r.next}while(r!==i)}}function xg(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 Tx(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 u3(n){var e=n.alternate;e!==null&&(n.alternate=null,u3(e)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(e=n.stateNode,e!==null&&(delete e[os],delete e[Uf],delete e[px],delete e[xF],delete e[_F])),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 f3(n){return n.tag===5||n.tag===3||n.tag===4}function WM(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||f3(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 Px(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=Tm));else if(i!==4&&(n=n.child,n!==null))for(Px(n,e,t),n=n.sibling;n!==null;)Px(n,e,t),n=n.sibling}function Bx(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(Bx(n,e,t),n=n.sibling;n!==null;)Bx(n,e,t),n=n.sibling}var Xn=null,Rr=!1;function uo(n,e,t){for(t=t.child;t!==null;)h3(n,e,t),t=t.sibling}function h3(n,e,t){if(as&&typeof as.onCommitFiberUnmount=="function")try{as.onCommitFiberUnmount(fg,t)}catch{}switch(t.tag){case 5:li||dc(t,e);case 6:var i=Xn,r=Rr;Xn=null,uo(n,e,t),Xn=i,Rr=r,Xn!==null&&(Rr?(n=Xn,t=t.stateNode,n.nodeType===8?n.parentNode.removeChild(t):n.removeChild(t)):Xn.removeChild(t.stateNode));break;case 18:Xn!==null&&(Rr?(n=Xn,t=t.stateNode,n.nodeType===8?My(n.parentNode,t):n.nodeType===1&&My(n,t),Ff(n)):My(Xn,t.stateNode));break;case 4:i=Xn,r=Rr,Xn=t.stateNode.containerInfo,Rr=!0,uo(n,e,t),Xn=i,Rr=r;break;case 0:case 11:case 14:case 15:if(!li&&(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)&&bx(t,e,o),r=r.next}while(r!==i)}uo(n,e,t);break;case 1:if(!li&&(dc(t,e),i=t.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=t.memoizedProps,i.state=t.memoizedState,i.componentWillUnmount()}catch(a){pn(t,e,a)}uo(n,e,t);break;case 21:uo(n,e,t);break;case 22:t.mode&1?(li=(i=li)||t.memoizedState!==null,uo(n,e,t),li=i):uo(n,e,t);break;default:uo(n,e,t)}}function jM(n){var e=n.updateQueue;if(e!==null){n.updateQueue=null;var t=n.stateNode;t===null&&(t=n.stateNode=new kF),e.forEach(function(i){var r=JF.bind(null,n,i);t.has(i)||(t.add(i),i.then(r,r))})}}function Er(n,e){var t=e.deletions;if(t!==null)for(var i=0;ir&&(r=o),i&=~s}if(i=r,i=_n()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*zF(i/1960))-i,10n?16:n,To===null)var i=!1;else{if(n=To,To=null,Gm=0,Tt&6)throw Error(Se(331));var r=Tt;for(Tt|=4,Ue=n.current;Ue!==null;){var s=Ue,o=s.child;if(Ue.flags&16){var a=s.deletions;if(a!==null){for(var l=0;l_n()-L_?Qa(n,0):R_|=t),Ri(n,e)}function _3(n,e){e===0&&(n.mode&1?(e=Vd,Vd<<=1,!(Vd&130023424)&&(Vd=4194304)):e=1);var t=vi();n=Ks(n,e),n!==null&&(uh(n,e,t),Ri(n,t))}function jF(n){var e=n.memoizedState,t=0;e!==null&&(t=e.retryLane),_3(n,t)}function JF(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(Se(314))}i!==null&&i.delete(e),_3(n,t)}var A3;A3=function(n,e,t){if(n!==null)if(n.memoizedProps!==e.pendingProps||Pi.current)Ti=!0;else{if(!(n.lanes&t)&&!(e.flags&128))return Ti=!1,IF(n,e,t);Ti=!!(n.flags&131072)}else Ti=!1,qt&&e.flags&1048576&&M2(e,Lm,e.index);switch(e.lanes=0,e.tag){case 2:var i=e.type;sm(n,e),n=e.pendingProps;var r=Fc(e,ci.current);bc(e,t),r=C_(null,e,i,n,r,t);var s=E_();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,Bi(i)?(s=!0,Bm(e)):s=!1,e.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,__(e),r.updater=yg,e.stateNode=r,r._reactInternals=e,_x(e,i,n,t),e=Sx(null,e,i,!0,s,t)):(e.tag=0,qt&&s&&d_(e),yi(null,e,r,t),e=e.child),e;case 16:i=e.elementType;e:{switch(sm(n,e),n=e.pendingProps,r=i._init,i=r(i._payload),e.type=i,r=e.tag=YF(i),n=Br(i,n),r){case 0:e=wx(null,e,i,n,t);break e;case 1:e=UM(null,e,i,n,t);break e;case 11:e=OM(null,e,i,n,t);break e;case 14:e=zM(null,e,i,Br(i.type,n),t);break e}throw Error(Se(306,i,""))}return e;case 0:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:Br(i,r),wx(n,e,i,r,t);case 1:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:Br(i,r),UM(n,e,i,r,t);case 3:e:{if(r3(e),n===null)throw Error(Se(387));i=e.pendingProps,s=e.memoizedState,r=s.element,T2(n,e),Fm(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=zc(Error(Se(423)),e),e=GM(n,e,i,t,r);break e}else if(i!==r){r=zc(Error(Se(424)),e),e=GM(n,e,i,t,r);break e}else for(Hi=Fo(e.stateNode.containerInfo.firstChild),Wi=e,qt=!0,Ir=null,t=L2(e,null,i,t),e.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling;else{if(kc(),i===r){e=Qs(n,e,t);break e}yi(n,e,i,t)}e=e.child}return e;case 5:return I2(e),n===null&&yx(e),i=e.type,r=e.pendingProps,s=n!==null?n.memoizedProps:null,o=r.children,hx(i,r)?o=null:s!==null&&hx(i,s)&&(e.flags|=32),i3(n,e),yi(n,e,o,t),e.child;case 6:return n===null&&yx(e),null;case 13:return s3(n,e,t);case 4:return A_(e,e.stateNode.containerInfo),i=e.pendingProps,n===null?e.child=Nc(e,null,i,t):yi(n,e,i,t),e.child;case 11:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:Br(i,r),OM(n,e,i,r,t);case 7:return yi(n,e,e.pendingProps,t),e.child;case 8:return yi(n,e,e.pendingProps.children,t),e.child;case 12:return yi(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,Vt(Im,i._currentValue),i._currentValue=o,s!==null)if(Ur(s.value,o)){if(s.children===r.children&&!Pi.current){e=Qs(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=Vs(-1,t&-t),l.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var h=u.pending;h===null?l.next=l:(l.next=h.next,h.next=l),u.pending=l}}s.lanes|=t,l=s.alternate,l!==null&&(l.lanes|=t),vx(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(Se(341));o.lanes|=t,a=o.alternate,a!==null&&(a.lanes|=t),vx(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}yi(n,e,r.children,t),e=e.child}return e;case 9:return r=e.type,i=e.pendingProps.children,bc(e,t),r=vr(r),i=i(r),e.flags|=1,yi(n,e,i,t),e.child;case 14:return i=e.type,r=Br(i,e.pendingProps),r=Br(i.type,r),zM(n,e,i,r,t);case 15:return t3(n,e,e.type,e.pendingProps,t);case 17:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:Br(i,r),sm(n,e),e.tag=1,Bi(i)?(n=!0,Bm(e)):n=!1,bc(e,t),B2(e,i,r),_x(e,i,r,t),Sx(null,e,i,!0,n,t);case 19:return o3(n,e,t);case 22:return n3(n,e,t)}throw Error(Se(156,e.tag))};function w3(n,e){return YT(n,e)}function XF(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 pr(n,e,t,i){return new XF(n,e,t,i)}function k_(n){return n=n.prototype,!(!n||!n.isReactComponent)}function YF(n){if(typeof n=="function")return k_(n)?1:0;if(n!=null){if(n=n.$$typeof,n===t_)return 11;if(n===n_)return 14}return 2}function zo(n,e){var t=n.alternate;return t===null?(t=pr(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 lm(n,e,t,i,r,s){var o=2;if(i=n,typeof n=="function")k_(n)&&(o=1);else if(typeof n=="string")o=5;else e:switch(n){case rc:return Za(t.children,r,s,e);case e_:o=8,r|=8;break;case Wv:return n=pr(12,t,e,r|2),n.elementType=Wv,n.lanes=s,n;case jv:return n=pr(13,t,e,r),n.elementType=jv,n.lanes=s,n;case Jv:return n=pr(19,t,e,r),n.elementType=Jv,n.lanes=s,n;case RT:return Ag(t,r,s,e);default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case PT:o=10;break e;case BT:o=9;break e;case t_:o=11;break e;case n_:o=14;break e;case Ao:o=16,i=null;break e}throw Error(Se(130,n==null?n:typeof n,""))}return e=pr(o,t,e,r),e.elementType=n,e.type=i,e.lanes=s,e}function Za(n,e,t,i){return n=pr(7,n,i,e),n.lanes=t,n}function Ag(n,e,t,i){return n=pr(22,n,i,e),n.elementType=RT,n.lanes=t,n.stateNode={isHidden:!1},n}function Ly(n,e,t){return n=pr(6,n,null,e),n.lanes=t,n}function Iy(n,e,t){return e=pr(4,n.children!==null?n.children:[],n.key,e),e.lanes=t,e.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},e}function KF(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=dy(0),this.expirationTimes=dy(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=dy(0),this.identifierPrefix=i,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function N_(n,e,t,i,r,s,o,a,l){return n=new KF(n,e,t,a,l),e===1?(e=1,s===!0&&(e|=8)):e=0,s=pr(3,null,null,e),n.current=s,s.stateNode=n,s.memoizedState={element:i,isDehydrated:t,cache:null,transitions:null,pendingSuspenseBoundaries:null},__(s),n}function QF(n,e,t){var i=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}e(),n.exports=Qi})(ZI);const tk=J1(xm);/** * @remix-run/router v1.11.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 Xf(){return Xf=Object.assign?Object.assign.bind():function(n){for(var e=1;e"u")throw new Error(e)}function ak(){return Math.random().toString(36).substr(2,8)}function tC(n,e){return{usr:n.state,key:n.key,idx:e}}function kx(n,e,t,i){return t===void 0&&(t=null),Xf({pathname:typeof n=="string"?n:n.pathname,search:"",hash:""},typeof e=="string"?bg(e):e,{state:t,key:e&&e.key||i||ak()})}function jm(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 bg(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 lk(n,e,t,i){i===void 0&&(i={});let{window:r=document.defaultView,v5Compat:s=!1}=i,o=r.history,a=Ha.Pop,l=null,u=h();u==null&&(u=0,o.replaceState(Xf({},o.state,{idx:u}),""));function h(){return(o.state||{idx:null}).idx}function d(){a=Ha.Pop;let x=h(),A=x==null?null:x-u;u=x,l&&l({action:a,location:v.location,delta:A})}function p(x,A){a=Ha.Push;let _=kx(v.location,x,A);t&&t(_,x),u=h()+1;let w=tC(_,u),M=v.createHref(_);try{o.pushState(w,"",M)}catch(b){if(b instanceof DOMException&&b.name==="DataCloneError")throw b;r.location.assign(M)}s&&l&&l({action:a,location:v.location,delta:1})}function m(x,A){a=Ha.Replace;let _=kx(v.location,x,A);t&&t(_,x),u=h();let w=tC(_,u),M=v.createHref(_);o.replaceState(w,"",M),s&&l&&l({action:a,location:v.location,delta:0})}function y(x){let A=r.location.origin!=="null"?r.location.origin:r.location.href,_=typeof x=="string"?x:jm(x);return Or(A,"No window.location.(origin|href) available to create URL for href: "+_),new URL(_,A)}let v={get action(){return a},get location(){return n(r,o)},listen(x){if(l)throw new Error("A history only accepts one active listener");return r.addEventListener(eC,d),l=x,()=>{r.removeEventListener(eC,d),l=null}},createHref(x){return e(r,x)},createURL:y,encodeLocation(x){let A=y(x);return{pathname:A.pathname,search:A.search,hash:A.hash}},push:p,replace:m,go(x){return o.go(x)}};return v}var nC;(function(n){n.data="data",n.deferred="deferred",n.redirect="redirect",n.error="error"})(nC||(nC={}));function T3(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 ck(n,e){e===void 0&&(e="/");let{pathname:t,search:i="",hash:r=""}=typeof n=="string"?bg(n):n;return{pathname:t?t.startsWith("/")?t:uk(t,e):e,search:fk(i),hash:hk(r)}}function uk(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 Fy(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 P3(n){return n.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function B3(n,e,t,i){i===void 0&&(i=!1);let r;typeof n=="string"?r=bg(n):(r=Xf({},n),Or(!r.pathname||!r.pathname.includes("?"),Fy("?","pathname","search",r)),Or(!r.pathname||!r.pathname.includes("#"),Fy("#","pathname","hash",r)),Or(!r.search||!r.search.includes("#"),Fy("#","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=ck(r,a),u=o&&o!=="/"&&o.endsWith("/"),h=(s||o===".")&&t.endsWith("/");return!l.pathname.endsWith("/")&&(u||h)&&(l.pathname+="/"),l}const R3=n=>n.join("/").replace(/\/\/+/g,"/"),fk=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,hk=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n;/** + */function Xf(){return Xf=Object.assign?Object.assign.bind():function(n){for(var e=1;e"u")throw new Error(e)}function ik(){return Math.random().toString(36).substr(2,8)}function eC(n,e){return{usr:n.state,key:n.key,idx:e}}function Fx(n,e,t,i){return t===void 0&&(t=null),Xf({pathname:typeof n=="string"?n:n.pathname,search:"",hash:""},typeof e=="string"?Eg(e):e,{state:t,key:e&&e.key||i||ik()})}function Wm(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 Eg(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 rk(n,e,t,i){i===void 0&&(i={});let{window:r=document.defaultView,v5Compat:s=!1}=i,o=r.history,a=Ha.Pop,l=null,u=h();u==null&&(u=0,o.replaceState(Xf({},o.state,{idx:u}),""));function h(){return(o.state||{idx:null}).idx}function d(){a=Ha.Pop;let x=h(),A=x==null?null:x-u;u=x,l&&l({action:a,location:v.location,delta:A})}function p(x,A){a=Ha.Push;let _=Fx(v.location,x,A);t&&t(_,x),u=h()+1;let w=eC(_,u),M=v.createHref(_);try{o.pushState(w,"",M)}catch(b){if(b instanceof DOMException&&b.name==="DataCloneError")throw b;r.location.assign(M)}s&&l&&l({action:a,location:v.location,delta:1})}function m(x,A){a=Ha.Replace;let _=Fx(v.location,x,A);t&&t(_,x),u=h();let w=eC(_,u),M=v.createHref(_);o.replaceState(w,"",M),s&&l&&l({action:a,location:v.location,delta:0})}function y(x){let A=r.location.origin!=="null"?r.location.origin:r.location.href,_=typeof x=="string"?x:Wm(x);return Or(A,"No window.location.(origin|href) available to create URL for href: "+_),new URL(_,A)}let v={get action(){return a},get location(){return n(r,o)},listen(x){if(l)throw new Error("A history only accepts one active listener");return r.addEventListener($M,d),l=x,()=>{r.removeEventListener($M,d),l=null}},createHref(x){return e(r,x)},createURL:y,encodeLocation(x){let A=y(x);return{pathname:A.pathname,search:A.search,hash:A.hash}},push:p,replace:m,go(x){return o.go(x)}};return v}var tC;(function(n){n.data="data",n.deferred="deferred",n.redirect="redirect",n.error="error"})(tC||(tC={}));function E3(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 sk(n,e){e===void 0&&(e="/");let{pathname:t,search:i="",hash:r=""}=typeof n=="string"?Eg(n):n;return{pathname:t?t.startsWith("/")?t:ok(t,e):e,search:ak(i),hash:lk(r)}}function ok(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 Dy(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 b3(n){return n.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function T3(n,e,t,i){i===void 0&&(i=!1);let r;typeof n=="string"?r=Eg(n):(r=Xf({},n),Or(!r.pathname||!r.pathname.includes("?"),Dy("?","pathname","search",r)),Or(!r.pathname||!r.pathname.includes("#"),Dy("#","pathname","hash",r)),Or(!r.search||!r.search.includes("#"),Dy("#","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=sk(r,a),u=o&&o!=="/"&&o.endsWith("/"),h=(s||o===".")&&t.endsWith("/");return!l.pathname.endsWith("/")&&(u||h)&&(l.pathname+="/"),l}const P3=n=>n.join("/").replace(/\/\/+/g,"/"),ak=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,lk=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n;/** * React Router v6.18.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 Nx(){return Nx=Object.assign?Object.assign.bind():function(n){for(var e=1;el.pathnameBase)),o=U.useRef(!1);return I3(()=>{o.current=!0}),U.useCallback(function(l,u){if(u===void 0&&(u={}),!o.current)return;if(typeof l=="number"){t.go(l);return}let h=B3(l,JSON.parse(s),r,u.relative==="path");n==null&&e!=="/"&&(h.pathname=h.pathname==="/"?e:R3([e,h.pathname])),(u.replace?t.replace:t.push)(h,u.state,u)},[e,t,s,r,n])}function D3(n,e){let{relative:t}=e===void 0?{}:e,{matches:i}=U.useContext(Tg),{pathname:r}=V_(),s=JSON.stringify(P3(i).map(o=>o.pathnameBase));return U.useMemo(()=>B3(n,JSON.parse(s),r,t==="path"),[n,s,r,t])}var F3=function(n){return n.UseBlocker="useBlocker",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n}(F3||{}),k3=function(n){return n.UseBlocker="useBlocker",n.UseLoaderData="useLoaderData",n.UseActionData="useActionData",n.UseRouteError="useRouteError",n.UseNavigation="useNavigation",n.UseRouteLoaderData="useRouteLoaderData",n.UseMatches="useMatches",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n.UseRouteId="useRouteId",n}(k3||{});function gk(n){let e=U.useContext(L3);return e||Or(!1),e}function yk(n){let e=U.useContext(Tg);return e||Or(!1),e}function vk(n){let e=yk(),t=e.matches[e.matches.length-1];return t.route.id||Or(!1),t.route.id}function xk(){let{router:n}=gk(F3.UseNavigateStable),e=vk(k3.UseNavigateStable),t=U.useRef(!1);return I3(()=>{t.current=!0}),U.useCallback(function(r,s){s===void 0&&(s={}),t.current&&(typeof r=="number"?n.navigate(r):n.navigate(r,Nx({fromRouteId:e},s)))},[n,e])}function _k(n){let{basename:e="/",children:t=null,location:i,navigationType:r=Ha.Pop,navigator:s,static:o=!1}=n;Pg()&&Or(!1);let a=e.replace(/^\/*/,"/"),l=U.useMemo(()=>({basename:a,navigator:s,static:o}),[a,s,o]);typeof i=="string"&&(i=bg(i));let{pathname:u="/",search:h="",hash:d="",state:p=null,key:m="default"}=i,y=U.useMemo(()=>{let v=T3(u,a);return v==null?null:{location:{pathname:v,search:h,hash:d,state:p,key:m},navigationType:r}},[a,u,h,d,p,m,r]);return y==null?null:U.createElement(mh.Provider,{value:l},U.createElement(H_.Provider,{children:t,value:y}))}new Promise(()=>{});/** + */function kx(){return kx=Object.assign?Object.assign.bind():function(n){for(var e=1;el.pathnameBase)),o=U.useRef(!1);return R3(()=>{o.current=!0}),U.useCallback(function(l,u){if(u===void 0&&(u={}),!o.current)return;if(typeof l=="number"){t.go(l);return}let h=T3(l,JSON.parse(s),r,u.relative==="path");n==null&&e!=="/"&&(h.pathname=h.pathname==="/"?e:P3([e,h.pathname])),(u.replace?t.replace:t.push)(h,u.state,u)},[e,t,s,r,n])}function L3(n,e){let{relative:t}=e===void 0?{}:e,{matches:i}=U.useContext(bg),{pathname:r}=H_(),s=JSON.stringify(b3(i).map(o=>o.pathnameBase));return U.useMemo(()=>T3(n,JSON.parse(s),r,t==="path"),[n,s,r,t])}var I3=function(n){return n.UseBlocker="useBlocker",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n}(I3||{}),D3=function(n){return n.UseBlocker="useBlocker",n.UseLoaderData="useLoaderData",n.UseActionData="useActionData",n.UseRouteError="useRouteError",n.UseNavigation="useNavigation",n.UseRouteLoaderData="useRouteLoaderData",n.UseMatches="useMatches",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n.UseRouteId="useRouteId",n}(D3||{});function hk(n){let e=U.useContext(B3);return e||Or(!1),e}function dk(n){let e=U.useContext(bg);return e||Or(!1),e}function pk(n){let e=dk(),t=e.matches[e.matches.length-1];return t.route.id||Or(!1),t.route.id}function mk(){let{router:n}=hk(I3.UseNavigateStable),e=pk(D3.UseNavigateStable),t=U.useRef(!1);return R3(()=>{t.current=!0}),U.useCallback(function(r,s){s===void 0&&(s={}),t.current&&(typeof r=="number"?n.navigate(r):n.navigate(r,kx({fromRouteId:e},s)))},[n,e])}function gk(n){let{basename:e="/",children:t=null,location:i,navigationType:r=Ha.Pop,navigator:s,static:o=!1}=n;Tg()&&Or(!1);let a=e.replace(/^\/*/,"/"),l=U.useMemo(()=>({basename:a,navigator:s,static:o}),[a,s,o]);typeof i=="string"&&(i=Eg(i));let{pathname:u="/",search:h="",hash:d="",state:p=null,key:m="default"}=i,y=U.useMemo(()=>{let v=E3(u,a);return v==null?null:{location:{pathname:v,search:h,hash:d,state:p,key:m},navigationType:r}},[a,u,h,d,p,m,r]);return y==null?null:U.createElement(ph.Provider,{value:l},U.createElement(G_.Provider,{children:t,value:y}))}new Promise(()=>{});/** * React Router DOM v6.18.0 * * Copyright (c) Remix Software Inc. @@ -64,15 +64,15 @@ Error generating stack: `+s.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Ox(){return Ox=Object.assign?Object.assign.bind():function(n){for(var e=1;e=0)&&(t[r]=n[r]);return t}function wk(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function Sk(n,e){return n.button===0&&(!e||e==="_self")&&!wk(n)}const Mk=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],Ck="startTransition",iC=YI[Ck];function Ek(n){let{basename:e,children:t,future:i,window:r}=n,s=U.useRef();s.current==null&&(s.current=ok({window:r,v5Compat:!0}));let o=s.current,[a,l]=U.useState({action:o.action,location:o.location}),{v7_startTransition:u}=i||{},h=U.useCallback(d=>{u&&iC?iC(()=>l(d)):l(d)},[l,u]);return U.useLayoutEffect(()=>o.listen(h),[o,h]),U.createElement(_k,{basename:e,children:t,location:a.location,navigationType:a.action,navigator:o})}const bk=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Tk=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Pk=U.forwardRef(function(e,t){let{onClick:i,relative:r,reloadDocument:s,replace:o,state:a,target:l,to:u,preventScrollReset:h,unstable_viewTransition:d}=e,p=Ak(e,Mk),{basename:m}=U.useContext(mh),y,v=!1;if(typeof u=="string"&&Tk.test(u)&&(y=u,bk))try{let w=new URL(window.location.href),M=u.startsWith("//")?new URL(w.protocol+u):new URL(u),b=T3(M.pathname,m);M.origin===w.origin&&b!=null?u=b+M.search+M.hash:v=!0}catch{}let x=dk(u,{relative:r}),A=Bk(u,{replace:o,state:a,target:l,preventScrollReset:h,relative:r,unstable_viewTransition:d});function _(w){i&&i(w),w.defaultPrevented||A(w)}return U.createElement("a",Ox({},p,{href:y||x,onClick:v||s?i:_,ref:t,target:l}))});var rC;(function(n){n.UseScrollRestoration="useScrollRestoration",n.UseSubmit="useSubmit",n.UseSubmitFetcher="useSubmitFetcher",n.UseFetcher="useFetcher",n.useViewTransitionState="useViewTransitionState"})(rC||(rC={}));var sC;(function(n){n.UseFetcher="useFetcher",n.UseFetchers="useFetchers",n.UseScrollRestoration="useScrollRestoration"})(sC||(sC={}));function Bk(n,e){let{target:t,replace:i,state:r,preventScrollReset:s,relative:o,unstable_viewTransition:a}=e===void 0?{}:e,l=pk(),u=V_(),h=D3(n,{relative:o});return U.useCallback(d=>{if(Sk(d,t)){d.preventDefault();let p=i!==void 0?i:jm(u)===jm(h);l(n,{replace:p,state:r,preventScrollReset:s,relative:o,unstable_viewTransition:a})}},[u,l,h,i,r,t,n,s,o,a])}/** + */function Nx(){return Nx=Object.assign?Object.assign.bind():function(n){for(var e=1;e=0)&&(t[r]=n[r]);return t}function vk(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function xk(n,e){return n.button===0&&(!e||e==="_self")&&!vk(n)}const _k=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],Ak="startTransition",nC=WI[Ak];function wk(n){let{basename:e,children:t,future:i,window:r}=n,s=U.useRef();s.current==null&&(s.current=nk({window:r,v5Compat:!0}));let o=s.current,[a,l]=U.useState({action:o.action,location:o.location}),{v7_startTransition:u}=i||{},h=U.useCallback(d=>{u&&nC?nC(()=>l(d)):l(d)},[l,u]);return U.useLayoutEffect(()=>o.listen(h),[o,h]),U.createElement(gk,{basename:e,children:t,location:a.location,navigationType:a.action,navigator:o})}const Sk=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Mk=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ck=U.forwardRef(function(e,t){let{onClick:i,relative:r,reloadDocument:s,replace:o,state:a,target:l,to:u,preventScrollReset:h,unstable_viewTransition:d}=e,p=yk(e,_k),{basename:m}=U.useContext(ph),y,v=!1;if(typeof u=="string"&&Mk.test(u)&&(y=u,Sk))try{let w=new URL(window.location.href),M=u.startsWith("//")?new URL(w.protocol+u):new URL(u),b=E3(M.pathname,m);M.origin===w.origin&&b!=null?u=b+M.search+M.hash:v=!0}catch{}let x=ck(u,{relative:r}),A=Ek(u,{replace:o,state:a,target:l,preventScrollReset:h,relative:r,unstable_viewTransition:d});function _(w){i&&i(w),w.defaultPrevented||A(w)}return U.createElement("a",Nx({},p,{href:y||x,onClick:v||s?i:_,ref:t,target:l}))});var iC;(function(n){n.UseScrollRestoration="useScrollRestoration",n.UseSubmit="useSubmit",n.UseSubmitFetcher="useSubmitFetcher",n.UseFetcher="useFetcher",n.useViewTransitionState="useViewTransitionState"})(iC||(iC={}));var rC;(function(n){n.UseFetcher="useFetcher",n.UseFetchers="useFetchers",n.UseScrollRestoration="useScrollRestoration"})(rC||(rC={}));function Ek(n,e){let{target:t,replace:i,state:r,preventScrollReset:s,relative:o,unstable_viewTransition:a}=e===void 0?{}:e,l=uk(),u=H_(),h=L3(n,{relative:o});return U.useCallback(d=>{if(xk(d,t)){d.preventDefault();let p=i!==void 0?i:Wm(u)===Wm(h);l(n,{replace:p,state:r,preventScrollReset:s,relative:o,unstable_viewTransition:a})}},[u,l,h,i,r,t,n,s,o,a])}/** * @license * Copyright 2010-2023 Three.js Authors * SPDX-License-Identifier: MIT - */const nu="150",La={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},Ia={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},N3=0,zx=1,O3=2,Rk=3,z3=0,Bg=1,Af=2,Va=3,hs=0,Li=1,Fr=2,Lk=2,Ws=0,qa=1,Ux=2,Gx=3,Hx=4,U3=5,Na=100,G3=101,H3=102,Vx=103,Wx=104,V3=200,W3=201,j3=202,J3=203,W_=204,j_=205,X3=206,Y3=207,K3=208,Q3=209,Z3=210,q3=0,$3=1,eP=2,Jm=3,tP=4,nP=5,iP=6,rP=7,gh=0,sP=1,oP=2,zr=0,aP=1,lP=2,cP=3,J_=4,uP=5,Rg=300,Jo=301,Xo=302,Yf=303,Kf=304,iu=306,Yo=1e3,Yn=1001,Gc=1002,mn=1003,Qf=1004,Ik=1004,Pc=1005,Dk=1005,nn=1006,Lg=1007,Fk=1007,ds=1008,kk=1008,Zs=1009,fP=1010,hP=1011,X_=1012,dP=1013,Po=1014,zs=1015,Hc=1016,pP=1017,mP=1018,$a=1020,gP=1021,bi=1023,yP=1024,vP=1025,Uo=1026,cl=1027,xP=1028,_P=1029,AP=1030,wP=1031,SP=1033,um=33776,fm=33777,hm=33778,dm=33779,jx=35840,Jx=35841,Xx=35842,Yx=35843,MP=36196,Kx=37492,Qx=37496,Zx=37808,qx=37809,$x=37810,e1=37811,t1=37812,n1=37813,i1=37814,r1=37815,s1=37816,o1=37817,a1=37818,l1=37819,c1=37820,u1=37821,pm=36492,CP=36283,f1=36284,h1=36285,d1=36286,EP=2200,bP=2201,TP=2202,Vc=2300,ul=2301,mm=2302,Wa=2400,ja=2401,Zf=2402,Ig=2500,Y_=2501,PP=0,K_=1,Xm=2,Ko=3e3,Ht=3001,BP=3200,RP=3201,ia=0,LP=1,Nk="",Lr="srgb",Wc="srgb-linear",Q_="display-p3",Ok=0,gm=7680,zk=7681,Uk=7682,Gk=7683,Hk=34055,Vk=34056,Wk=5386,jk=512,Jk=513,Xk=514,Yk=515,Kk=516,Qk=517,Zk=518,IP=519,qf=35044,el=35048,qk=35040,$k=35045,eN=35049,tN=35041,nN=35046,iN=35050,rN=35042,sN="100",p1="300 es",Ym=1035;class ms{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]+si[n>>16&255]+si[n>>24&255]+"-"+si[e&255]+si[e>>8&255]+"-"+si[e>>16&15|64]+si[e>>24&255]+"-"+si[t&63|128]+si[t>>8&255]+"-"+si[t>>16&255]+si[t>>24&255]+si[i&255]+si[i>>8&255]+si[i>>16&255]+si[i>>24&255]).toLowerCase()}function An(n,e,t){return Math.max(e,Math.min(t,n))}function Z_(n,e){return(n%e+e)%e}function oN(n,e,t,i,r){return i+(n-e)*(r-i)/(t-e)}function aN(n,e,t){return n!==e?(t-n)/(e-n):0}function wf(n,e,t){return(1-t)*n+t*e}function lN(n,e,t,i){return wf(n,e,1-Math.exp(-t*i))}function cN(n,e=1){return e-Math.abs(Z_(n,e*2)-e)}function uN(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*(3-2*n))}function fN(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*n*(n*(n*6-15)+10))}function hN(n,e){return n+Math.floor(Math.random()*(e-n+1))}function dN(n,e){return n+Math.random()*(e-n)}function pN(n){return n*(.5-Math.random())}function mN(n){n!==void 0&&(oC=n);let e=oC+=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 gN(n){return n*tl}function yN(n){return n*$f}function m1(n){return(n&n-1)===0&&n!==0}function DP(n){return Math.pow(2,Math.ceil(Math.log(n)/Math.LN2))}function FP(n){return Math.pow(2,Math.floor(Math.log(n)/Math.LN2))}function vN(n,e,t,i,r){const s=Math.cos,o=Math.sin,a=s(t/2),l=o(t/2),u=s((e+i)/2),h=o((e+i)/2),d=s((e-i)/2),p=o((e-i)/2),m=s((i-e)/2),y=o((i-e)/2);switch(r){case"XYX":n.set(a*h,l*d,l*p,a*u);break;case"YZY":n.set(l*p,a*h,l*d,a*u);break;case"ZXZ":n.set(l*d,l*p,a*h,a*u);break;case"XZX":n.set(a*h,l*y,l*m,a*u);break;case"YXY":n.set(l*m,a*h,l*y,a*u);break;case"ZYZ":n.set(l*y,l*m,a*h,a*u);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}function Us(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 q_={DEG2RAD:tl,RAD2DEG:$f,generateUUID:ji,clamp:An,euclideanModulo:Z_,mapLinear:oN,inverseLerp:aN,lerp:wf,damp:lN,pingpong:cN,smoothstep:uN,smootherstep:fN,randInt:hN,randFloat:dN,randFloatSpread:pN,seededRandom:mN,degToRad:gN,radToDeg:yN,isPowerOfTwo:m1,ceilPowerOfTwo:DP,floorPowerOfTwo:FP,setQuaternionFromProperEuler:vN,normalize:Gt,denormalize:Us};class pe{constructor(e=0,t=0){pe.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}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 Kn{constructor(){Kn.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1]}set(e,t,i,r,s,o,a,l,u){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]=u,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],u=i[1],h=i[4],d=i[7],p=i[2],m=i[5],y=i[8],v=r[0],x=r[3],A=r[6],_=r[1],w=r[4],M=r[7],b=r[2],P=r[5],R=r[8];return s[0]=o*v+a*_+l*b,s[3]=o*x+a*w+l*P,s[6]=o*A+a*M+l*R,s[1]=u*v+h*_+d*b,s[4]=u*x+h*w+d*P,s[7]=u*A+h*M+d*R,s[2]=p*v+m*_+y*b,s[5]=p*x+m*w+y*P,s[8]=p*A+m*M+y*R,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],u=e[7],h=e[8];return t*o*h-t*a*u-i*s*h+i*a*l+r*s*u-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],u=e[7],h=e[8],d=h*o-a*u,p=a*l-h*s,m=u*s-o*l,y=t*d+i*p+r*m;if(y===0)return this.set(0,0,0,0,0,0,0,0,0);const v=1/y;return e[0]=d*v,e[1]=(r*u-h*i)*v,e[2]=(a*i-r*o)*v,e[3]=p*v,e[4]=(h*t-r*l)*v,e[5]=(r*s-a*t)*v,e[6]=m*v,e[7]=(i*l-u*t)*v,e[8]=(o*t-i*s)*v,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),u=Math.sin(s);return this.set(i*l,i*u,-i*(l*o+u*a)+o+e,-r*u,r*l,-r*(-u*o+l*a)+a+t,0,0,1),this}scale(e,t){return this.premultiply(ky.makeScale(e,t)),this}rotate(e){return this.premultiply(ky.makeRotation(-e)),this}translate(e,t){return this.premultiply(ky.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 ky=new Kn;function kP(n){for(let e=n.length-1;e>=0;--e)if(n[e]>=65535)return!0;return!1}const xN={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function mc(n,e){return new xN[n](e)}function eh(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}class Wn{constructor(e=0,t=0,i=0,r=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=i,this._w=r}static slerpFlat(e,t,i,r,s,o,a){let l=i[r+0],u=i[r+1],h=i[r+2],d=i[r+3];const p=s[o+0],m=s[o+1],y=s[o+2],v=s[o+3];if(a===0){e[t+0]=l,e[t+1]=u,e[t+2]=h,e[t+3]=d;return}if(a===1){e[t+0]=p,e[t+1]=m,e[t+2]=y,e[t+3]=v;return}if(d!==v||l!==p||u!==m||h!==y){let x=1-a;const A=l*p+u*m+h*y+d*v,_=A>=0?1:-1,w=1-A*A;if(w>Number.EPSILON){const b=Math.sqrt(w),P=Math.atan2(b,A*_);x=Math.sin(x*P)/b,a=Math.sin(a*P)/b}const M=a*_;if(l=l*x+p*M,u=u*x+m*M,h=h*x+y*M,d=d*x+v*M,x===1-a){const b=1/Math.sqrt(l*l+u*u+h*h+d*d);l*=b,u*=b,h*=b,d*=b}}e[t]=l,e[t+1]=u,e[t+2]=h,e[t+3]=d}static multiplyQuaternionsFlat(e,t,i,r,s,o){const a=i[r],l=i[r+1],u=i[r+2],h=i[r+3],d=s[o],p=s[o+1],m=s[o+2],y=s[o+3];return e[t]=a*y+h*d+l*m-u*p,e[t+1]=l*y+h*p+u*d-a*m,e[t+2]=u*y+h*m+a*p-l*d,e[t+3]=h*y-a*d-l*p-u*m,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,u=a(i/2),h=a(r/2),d=a(s/2),p=l(i/2),m=l(r/2),y=l(s/2);switch(o){case"XYZ":this._x=p*h*d+u*m*y,this._y=u*m*d-p*h*y,this._z=u*h*y+p*m*d,this._w=u*h*d-p*m*y;break;case"YXZ":this._x=p*h*d+u*m*y,this._y=u*m*d-p*h*y,this._z=u*h*y-p*m*d,this._w=u*h*d+p*m*y;break;case"ZXY":this._x=p*h*d-u*m*y,this._y=u*m*d+p*h*y,this._z=u*h*y+p*m*d,this._w=u*h*d-p*m*y;break;case"ZYX":this._x=p*h*d-u*m*y,this._y=u*m*d+p*h*y,this._z=u*h*y-p*m*d,this._w=u*h*d+p*m*y;break;case"YZX":this._x=p*h*d+u*m*y,this._y=u*m*d+p*h*y,this._z=u*h*y-p*m*d,this._w=u*h*d-p*m*y;break;case"XZY":this._x=p*h*d-u*m*y,this._y=u*m*d-p*h*y,this._z=u*h*y+p*m*d,this._w=u*h*d+p*m*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],u=t[2],h=t[6],d=t[10],p=i+a+d;if(p>0){const m=.5/Math.sqrt(p+1);this._w=.25/m,this._x=(h-l)*m,this._y=(s-u)*m,this._z=(o-r)*m}else if(i>a&&i>d){const m=2*Math.sqrt(1+i-a-d);this._w=(h-l)/m,this._x=.25*m,this._y=(r+o)/m,this._z=(s+u)/m}else if(a>d){const m=2*Math.sqrt(1+a-i-d);this._w=(s-u)/m,this._x=(r+o)/m,this._y=.25*m,this._z=(l+h)/m}else{const m=2*Math.sqrt(1+d-i-a);this._w=(o-r)/m,this._x=(s+u)/m,this._y=(l+h)/m,this._z=.25*m}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(An(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,u=t._z,h=t._w;return this._x=i*h+o*a+r*u-s*l,this._y=r*h+o*l+s*a-i*u,this._z=s*h+o*u+i*l-r*a,this._w=o*h-i*a-r*l-s*u,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 m=1-t;return this._w=m*o+t*this._w,this._x=m*i+t*this._x,this._y=m*r+t*this._y,this._z=m*s+t*this._z,this.normalize(),this._onChangeCallback(),this}const u=Math.sqrt(l),h=Math.atan2(u,a),d=Math.sin((1-t)*h)/u,p=Math.sin(t*h)/u;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}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class F{constructor(e=0,t=0,i=0){F.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(aC.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(aC.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,u=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=u*l+p*-s+h*-a-d*-o,this.y=h*l+p*-o+d*-s-u*-a,this.z=d*l+p*-a+u*-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 Ny.copy(this).projectOnVector(e),this.sub(Ny)}reflect(e){return this.sub(Ny.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(An(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}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 Ny=new F,aC=new Wn;function Bc(n){return n<.04045?n*.0773993808:Math.pow(n*.9478672986+.0521327014,2.4)}function Oy(n){return n<.0031308?n*12.92:1.055*Math.pow(n,.41666)-.055}const _N=new Kn().fromArray([.8224621,.0331941,.0170827,.177538,.9668058,.0723974,-1e-7,1e-7,.9105199]),AN=new Kn().fromArray([1.2249401,-.0420569,-.0196376,-.2249404,1.0420571,-.0786361,1e-7,0,1.0982735]),Bo=new F;function wN(n){return n.convertSRGBToLinear(),Bo.set(n.r,n.g,n.b).applyMatrix3(AN),n.setRGB(Bo.x,Bo.y,Bo.z)}function SN(n){return Bo.set(n.r,n.g,n.b).applyMatrix3(_N),n.setRGB(Bo.x,Bo.y,Bo.z).convertLinearToSRGB()}const MN={[Wc]:n=>n,[Lr]:n=>n.convertSRGBToLinear(),[Q_]:wN},CN={[Wc]:n=>n,[Lr]:n=>n.convertLinearToSRGB(),[Q_]:SN},ai={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 Wc},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=MN[e],r=CN[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 Nl;class $_{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{Nl===void 0&&(Nl=eh("canvas")),Nl.width=e.width,Nl.height=e.height;const i=Nl.getContext("2d");e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0,e.width,e.height),t=Nl}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=eh("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!==Rg)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case Yo:e.x=e.x-Math.floor(e.x);break;case Yn:e.x=e.x<0?0:1;break;case Gc: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 Yo:e.y=e.y-Math.floor(e.y);break;case Yn:e.y=e.y<0?0:1;break;case Gc: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)}}$t.DEFAULT_IMAGE=null;$t.DEFAULT_MAPPING=Rg;$t.DEFAULT_ANISOTROPY=1;class Nt{constructor(e=0,t=0,i=0,r=1){Nt.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,u=l[0],h=l[4],d=l[8],p=l[1],m=l[5],y=l[9],v=l[2],x=l[6],A=l[10];if(Math.abs(h-p)<.01&&Math.abs(d-v)<.01&&Math.abs(y-x)<.01){if(Math.abs(h+p)<.1&&Math.abs(d+v)<.1&&Math.abs(y+x)<.1&&Math.abs(u+m+A-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const w=(u+1)/2,M=(m+1)/2,b=(A+1)/2,P=(h+p)/4,R=(d+v)/4,E=(y+x)/4;return w>M&&w>b?w<.01?(i=0,r=.707106781,s=.707106781):(i=Math.sqrt(w),r=P/i,s=R/i):M>b?M<.01?(i=.707106781,r=0,s=.707106781):(r=Math.sqrt(M),i=P/r,s=E/r):b<.01?(i=.707106781,r=.707106781,s=0):(s=Math.sqrt(b),i=R/s,r=E/s),this.set(i,r,s,t),this}let _=Math.sqrt((x-y)*(x-y)+(d-v)*(d-v)+(p-h)*(p-h));return Math.abs(_)<.001&&(_=1),this.x=(x-y)/_,this.y=(d-v)/_,this.z=(p-h)/_,this.w=Math.acos((u+m+A-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 Gr extends ms{constructor(e=1,t=1,i={}){super(),this.isWebGLRenderTarget=!0,this.width=e,this.height=t,this.depth=1,this.scissor=new Nt(0,0,e,t),this.scissorTest=!1,this.viewport=new Nt(0,0,e,t);const r={width:e,height:t,depth:1};this.texture=new $t(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:nn,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 Ja(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 Dg extends $t{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=mn,this.minFilter=mn,this.wrapR=Yn,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class bN extends Gr{constructor(e=1,t=1,i=1){super(e,t),this.isWebGLArrayRenderTarget=!0,this.depth=i,this.texture=new Dg(null,e,t,i),this.texture.isRenderTargetTexture=!0}}class eA extends $t{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=mn,this.minFilter=mn,this.wrapR=Yn,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class TN extends Gr{constructor(e=1,t=1,i=1){super(e,t),this.isWebGL3DRenderTarget=!0,this.depth=i,this.texture=new eA(null,e,t,i),this.texture.isRenderTargetTexture=!0}}class PN extends Gr{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;os&&(s=h),d>o&&(o=d),p>a&&(a=p)}return this.min.set(t,i,r),this.max.set(s,o,a),this}setFromBufferAttribute(e){let t=1/0,i=1/0,r=1/0,s=-1/0,o=-1/0,a=-1/0;for(let l=0,u=e.count;ls&&(s=h),d>o&&(o=d),p>a&&(a=p)}return this.min.set(t,i,r),this.max.set(s,o,a),this}setFromPoints(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,xa),xa.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(Uu),np.subVectors(this.max,Uu),Ol.subVectors(e.a,Uu),zl.subVectors(e.b,Uu),Ul.subVectors(e.c,Uu),fo.subVectors(zl,Ol),ho.subVectors(Ul,zl),_a.subVectors(Ol,Ul);let t=[0,-fo.z,fo.y,0,-ho.z,ho.y,0,-_a.z,_a.y,fo.z,0,-fo.x,ho.z,0,-ho.x,_a.z,0,-_a.x,-fo.y,fo.x,0,-ho.y,ho.x,0,-_a.y,_a.x,0];return!Gy(t,Ol,zl,Ul,np)||(t=[1,0,0,0,1,0,0,0,1],!Gy(t,Ol,zl,Ul,np))?!1:(ip.crossVectors(fo,ho),t=[ip.x,ip.y,ip.z],Gy(t,Ol,zl,Ul,np))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,xa).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(xa).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:(Es[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Es[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Es[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Es[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Es[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Es[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Es[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Es[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Es),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 Es=[new F,new F,new F,new F,new F,new F,new F,new F],xa=new F,Uy=new ra,Ol=new F,zl=new F,Ul=new F,fo=new F,ho=new F,_a=new F,Uu=new F,np=new F,ip=new F,Aa=new F;function Gy(n,e,t,i,r){for(let s=0,o=n.length-3;s<=o;s+=3){Aa.fromArray(n,s);const a=r.x*Math.abs(Aa.x)+r.y*Math.abs(Aa.y)+r.z*Math.abs(Aa.z),l=e.dot(Aa),u=t.dot(Aa),h=i.dot(Aa);if(Math.max(-Math.max(l,u,h),Math.min(l,u,h))>a)return!1}return!0}const BN=new ra,Gu=new F,Hy=new F;class sa{constructor(e=new F,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):BN.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;Gu.subVectors(e,this.center);const t=Gu.lengthSq();if(t>this.radius*this.radius){const i=Math.sqrt(t),r=(i-this.radius)*.5;this.center.addScaledVector(Gu,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):(Hy.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Gu.copy(e.center).add(Hy)),this.expandByPoint(Gu.copy(e.center).sub(Hy))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const bs=new F,Vy=new F,rp=new F,po=new F,Wy=new F,sp=new F,jy=new F;class ru{constructor(e=new F,t=new F(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,bs)),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=bs.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(bs.copy(this.origin).addScaledVector(this.direction,t),bs.distanceToSquared(e))}distanceSqToSegment(e,t,i,r){Vy.copy(e).add(t).multiplyScalar(.5),rp.copy(t).sub(e).normalize(),po.copy(this.origin).sub(Vy);const s=e.distanceTo(t)*.5,o=-this.direction.dot(rp),a=po.dot(this.direction),l=-po.dot(rp),u=po.lengthSq(),h=Math.abs(1-o*o);let d,p,m,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 v=1/h;d*=v,p*=v,m=d*(d+o*p+2*a)+p*(o*d+p+2*l)+u}else p=s,d=Math.max(0,-(o*p+a)),m=-d*d+p*(p+2*l)+u;else p=-s,d=Math.max(0,-(o*p+a)),m=-d*d+p*(p+2*l)+u;else p<=-y?(d=Math.max(0,-(-o*s+a)),p=d>0?-s:Math.min(Math.max(-s,-l),s),m=-d*d+p*(p+2*l)+u):p<=y?(d=0,p=Math.min(Math.max(-s,-l),s),m=p*(p+2*l)+u):(d=Math.max(0,-(o*s+a)),p=d>0?s:Math.min(Math.max(-s,-l),s),m=-d*d+p*(p+2*l)+u);else p=o>0?-s:s,d=Math.max(0,-(o*p+a)),m=-d*d+p*(p+2*l)+u;return i&&i.copy(this.origin).addScaledVector(this.direction,d),r&&r.copy(Vy).addScaledVector(rp,p),m}intersectSphere(e,t){bs.subVectors(e.center,this.origin);const i=bs.dot(this.direction),r=bs.dot(bs)-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 u=1/this.direction.x,h=1/this.direction.y,d=1/this.direction.z,p=this.origin;return u>=0?(i=(e.min.x-p.x)*u,r=(e.max.x-p.x)*u):(i=(e.max.x-p.x)*u,r=(e.min.x-p.x)*u),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,bs)!==null}intersectTriangle(e,t,i,r,s){Wy.subVectors(t,e),sp.subVectors(i,e),jy.crossVectors(Wy,sp);let o=this.direction.dot(jy),a;if(o>0){if(r)return null;a=1}else if(o<0)a=-1,o=-o;else return null;po.subVectors(this.origin,e);const l=a*this.direction.dot(sp.crossVectors(po,sp));if(l<0)return null;const u=a*this.direction.dot(Wy.cross(po));if(u<0||l+u>o)return null;const h=-a*po.dot(jy);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,u,h,d,p,m,y,v,x){const A=this.elements;return A[0]=e,A[4]=t,A[8]=i,A[12]=r,A[1]=s,A[5]=o,A[9]=a,A[13]=l,A[2]=u,A[6]=h,A[10]=d,A[14]=p,A[3]=m,A[7]=y,A[11]=v,A[15]=x,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/Gl.setFromMatrixColumn(e,0).length(),s=1/Gl.setFromMatrixColumn(e,1).length(),o=1/Gl.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),u=Math.sin(r),h=Math.cos(s),d=Math.sin(s);if(e.order==="XYZ"){const p=o*h,m=o*d,y=a*h,v=a*d;t[0]=l*h,t[4]=-l*d,t[8]=u,t[1]=m+y*u,t[5]=p-v*u,t[9]=-a*l,t[2]=v-p*u,t[6]=y+m*u,t[10]=o*l}else if(e.order==="YXZ"){const p=l*h,m=l*d,y=u*h,v=u*d;t[0]=p+v*a,t[4]=y*a-m,t[8]=o*u,t[1]=o*d,t[5]=o*h,t[9]=-a,t[2]=m*a-y,t[6]=v+p*a,t[10]=o*l}else if(e.order==="ZXY"){const p=l*h,m=l*d,y=u*h,v=u*d;t[0]=p-v*a,t[4]=-o*d,t[8]=y+m*a,t[1]=m+y*a,t[5]=o*h,t[9]=v-p*a,t[2]=-o*u,t[6]=a,t[10]=o*l}else if(e.order==="ZYX"){const p=o*h,m=o*d,y=a*h,v=a*d;t[0]=l*h,t[4]=y*u-m,t[8]=p*u+v,t[1]=l*d,t[5]=v*u+p,t[9]=m*u-y,t[2]=-u,t[6]=a*l,t[10]=o*l}else if(e.order==="YZX"){const p=o*l,m=o*u,y=a*l,v=a*u;t[0]=l*h,t[4]=v-p*d,t[8]=y*d+m,t[1]=d,t[5]=o*h,t[9]=-a*h,t[2]=-u*h,t[6]=m*d+y,t[10]=p-v*d}else if(e.order==="XZY"){const p=o*l,m=o*u,y=a*l,v=a*u;t[0]=l*h,t[4]=-d,t[8]=u*h,t[1]=p*d+v,t[5]=o*h,t[9]=m*d-y,t[2]=y*d-m,t[6]=a*h,t[10]=v*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(RN,e,LN)}lookAt(e,t,i){const r=this.elements;return Oi.subVectors(e,t),Oi.lengthSq()===0&&(Oi.z=1),Oi.normalize(),mo.crossVectors(i,Oi),mo.lengthSq()===0&&(Math.abs(i.z)===1?Oi.x+=1e-4:Oi.z+=1e-4,Oi.normalize(),mo.crossVectors(i,Oi)),mo.normalize(),op.crossVectors(Oi,mo),r[0]=mo.x,r[4]=op.x,r[8]=Oi.x,r[1]=mo.y,r[5]=op.y,r[9]=Oi.y,r[2]=mo.z,r[6]=op.z,r[10]=Oi.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],u=i[12],h=i[1],d=i[5],p=i[9],m=i[13],y=i[2],v=i[6],x=i[10],A=i[14],_=i[3],w=i[7],M=i[11],b=i[15],P=r[0],R=r[4],E=r[8],B=r[12],I=r[1],z=r[5],Z=r[9],J=r[13],W=r[2],Q=r[6],re=r[10],ce=r[14],L=r[3],V=r[7],H=r[11],$=r[15];return s[0]=o*P+a*I+l*W+u*L,s[4]=o*R+a*z+l*Q+u*V,s[8]=o*E+a*Z+l*re+u*H,s[12]=o*B+a*J+l*ce+u*$,s[1]=h*P+d*I+p*W+m*L,s[5]=h*R+d*z+p*Q+m*V,s[9]=h*E+d*Z+p*re+m*H,s[13]=h*B+d*J+p*ce+m*$,s[2]=y*P+v*I+x*W+A*L,s[6]=y*R+v*z+x*Q+A*V,s[10]=y*E+v*Z+x*re+A*H,s[14]=y*B+v*J+x*ce+A*$,s[3]=_*P+w*I+M*W+b*L,s[7]=_*R+w*z+M*Q+b*V,s[11]=_*E+w*Z+M*re+b*H,s[15]=_*B+w*J+M*ce+b*$,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],u=e[13],h=e[2],d=e[6],p=e[10],m=e[14],y=e[3],v=e[7],x=e[11],A=e[15];return y*(+s*l*d-r*u*d-s*a*p+i*u*p+r*a*m-i*l*m)+v*(+t*l*m-t*u*p+s*o*p-r*o*m+r*u*h-s*l*h)+x*(+t*u*d-t*a*m-s*o*d+i*o*m+s*a*h-i*u*h)+A*(-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],u=e[7],h=e[8],d=e[9],p=e[10],m=e[11],y=e[12],v=e[13],x=e[14],A=e[15],_=d*x*u-v*p*u+v*l*m-a*x*m-d*l*A+a*p*A,w=y*p*u-h*x*u-y*l*m+o*x*m+h*l*A-o*p*A,M=h*v*u-y*d*u+y*a*m-o*v*m-h*a*A+o*d*A,b=y*d*l-h*v*l-y*a*p+o*v*p+h*a*x-o*d*x,P=t*_+i*w+r*M+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 R=1/P;return e[0]=_*R,e[1]=(v*p*s-d*x*s-v*r*m+i*x*m+d*r*A-i*p*A)*R,e[2]=(a*x*s-v*l*s+v*r*u-i*x*u-a*r*A+i*l*A)*R,e[3]=(d*l*s-a*p*s-d*r*u+i*p*u+a*r*m-i*l*m)*R,e[4]=w*R,e[5]=(h*x*s-y*p*s+y*r*m-t*x*m-h*r*A+t*p*A)*R,e[6]=(y*l*s-o*x*s-y*r*u+t*x*u+o*r*A-t*l*A)*R,e[7]=(o*p*s-h*l*s+h*r*u-t*p*u-o*r*m+t*l*m)*R,e[8]=M*R,e[9]=(y*d*s-h*v*s-y*i*m+t*v*m+h*i*A-t*d*A)*R,e[10]=(o*v*s-y*a*s+y*i*u-t*v*u-o*i*A+t*a*A)*R,e[11]=(h*a*s-o*d*s-h*i*u+t*d*u+o*i*m-t*a*m)*R,e[12]=b*R,e[13]=(h*v*r-y*d*r+y*i*p-t*v*p-h*i*x+t*d*x)*R,e[14]=(y*a*r-o*v*r-y*i*l+t*v*l+o*i*x-t*a*x)*R,e[15]=(o*d*r-h*a*r+h*i*l-t*d*l-o*i*p+t*a*p)*R,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,u=s*o,h=s*a;return this.set(u*o+i,u*a-r*l,u*l+r*a,0,u*a+r*l,h*a+i,h*l-r*o,0,u*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,u=s+s,h=o+o,d=a+a,p=s*u,m=s*h,y=s*d,v=o*h,x=o*d,A=a*d,_=l*u,w=l*h,M=l*d,b=i.x,P=i.y,R=i.z;return r[0]=(1-(v+A))*b,r[1]=(m+M)*b,r[2]=(y-w)*b,r[3]=0,r[4]=(m-M)*P,r[5]=(1-(p+A))*P,r[6]=(x+_)*P,r[7]=0,r[8]=(y+w)*R,r[9]=(x-_)*R,r[10]=(1-(p+v))*R,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=Gl.set(r[0],r[1],r[2]).length();const o=Gl.set(r[4],r[5],r[6]).length(),a=Gl.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],br.copy(this);const u=1/s,h=1/o,d=1/a;return br.elements[0]*=u,br.elements[1]*=u,br.elements[2]*=u,br.elements[4]*=h,br.elements[5]*=h,br.elements[6]*=h,br.elements[8]*=d,br.elements[9]*=d,br.elements[10]*=d,t.setFromRotationMatrix(br),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),u=2*s/(i-r),h=(t+e)/(t-e),d=(i+r)/(i-r),p=-(o+s)/(o-s),m=-2*o*s/(o-s);return a[0]=l,a[4]=0,a[8]=h,a[12]=0,a[1]=0,a[5]=u,a[9]=d,a[13]=0,a[2]=0,a[6]=0,a[10]=p,a[14]=m,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),u=1/(i-r),h=1/(o-s),d=(t+e)*l,p=(i+r)*u,m=(o+s)*h;return a[0]=2*l,a[4]=0,a[8]=0,a[12]=-d,a[1]=0,a[5]=2*u,a[9]=0,a[13]=-p,a[2]=0,a[6]=0,a[10]=-2*h,a[14]=-m,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 Gl=new F,br=new ot,RN=new F(0,0,0),LN=new F(1,1,1),mo=new F,op=new F,Oi=new F,lC=new ot,cC=new Wn;class ml{constructor(e=0,t=0,i=0,r=ml.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],u=r[5],h=r[9],d=r[2],p=r[6],m=r[10];switch(t){case"XYZ":this._y=Math.asin(An(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-h,m),this._z=Math.atan2(-o,s)):(this._x=Math.atan2(p,u),this._z=0);break;case"YXZ":this._x=Math.asin(-An(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(a,m),this._z=Math.atan2(l,u)):(this._y=Math.atan2(-d,s),this._z=0);break;case"ZXY":this._x=Math.asin(An(p,-1,1)),Math.abs(p)<.9999999?(this._y=Math.atan2(-d,m),this._z=Math.atan2(-o,u)):(this._y=0,this._z=Math.atan2(l,s));break;case"ZYX":this._y=Math.asin(-An(d,-1,1)),Math.abs(d)<.9999999?(this._x=Math.atan2(p,m),this._z=Math.atan2(l,s)):(this._x=0,this._z=Math.atan2(-o,u));break;case"YZX":this._z=Math.asin(An(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-h,u),this._y=Math.atan2(-d,s)):(this._x=0,this._y=Math.atan2(a,m));break;case"XZY":this._z=Math.asin(-An(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(p,u),this._y=Math.atan2(a,s)):(this._x=Math.atan2(-h,m),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 lC.makeRotationFromQuaternion(e),this.setFromRotationMatrix(lC,t,i)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return cC.setFromEuler(this),this.setFromQuaternion(cC,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}}ml.DEFAULT_ORDER="XYZ";class nl{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(Hu,e,DN),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Hu,FN,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(),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 u=0,h=l.length;u0){r.children=[];for(let a=0;a0){r.animations=[];for(let a=0;a0&&(i.geometries=a),l.length>0&&(i.materials=l),u.length>0&&(i.textures=u),h.length>0&&(i.images=h),d.length>0&&(i.shapes=d),p.length>0&&(i.skeletons=p),m.length>0&&(i.animations=m),y.length>0&&(i.nodes=y)}return i.object=r,i;function o(a){const l=[];for(const u in a){const h=a[u];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){Tr.subVectors(r,t),Ps.subVectors(i,t),Jy.subVectors(e,t);const o=Tr.dot(Tr),a=Tr.dot(Ps),l=Tr.dot(Jy),u=Ps.dot(Ps),h=Ps.dot(Jy),d=o*u-a*a;if(d===0)return s.set(-2,-1,-1);const p=1/d,m=(u*l-a*h)*p,y=(o*h-a*l)*p;return s.set(1-m-y,y,m)}static containsPoint(e,t,i,r){return this.getBarycoord(e,t,i,r,Bs),Bs.x>=0&&Bs.y>=0&&Bs.x+Bs.y<=1}static getUV(e,t,i,r,s,o,a,l){return this.getBarycoord(e,t,i,r,Bs),l.set(0,0),l.addScaledVector(s,Bs.x),l.addScaledVector(o,Bs.y),l.addScaledVector(a,Bs.z),l}static isFrontFacing(e,t,i,r){return Tr.subVectors(i,t),Ps.subVectors(e,t),Tr.cross(Ps).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 Tr.subVectors(this.c,this.b),Ps.subVectors(this.a,this.b),Tr.cross(Ps).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return dr.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return dr.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,i,r,s){return dr.getUV(e,this.a,this.b,this.c,t,i,r,s)}containsPoint(e){return dr.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return dr.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;Vl.subVectors(r,i),Wl.subVectors(s,i),Xy.subVectors(e,i);const l=Vl.dot(Xy),u=Wl.dot(Xy);if(l<=0&&u<=0)return t.copy(i);Yy.subVectors(e,r);const h=Vl.dot(Yy),d=Wl.dot(Yy);if(h>=0&&d<=h)return t.copy(r);const p=l*d-h*u;if(p<=0&&l>=0&&h<=0)return o=l/(l-h),t.copy(i).addScaledVector(Vl,o);Ky.subVectors(e,s);const m=Vl.dot(Ky),y=Wl.dot(Ky);if(y>=0&&m<=y)return t.copy(s);const v=m*u-l*y;if(v<=0&&u>=0&&y<=0)return a=u/(u-y),t.copy(i).addScaledVector(Wl,a);const x=h*y-m*d;if(x<=0&&d-h>=0&&m-y>=0)return mC.subVectors(s,r),a=(d-h)/(d-h+(m-y)),t.copy(r).addScaledVector(mC,a);const A=1/(x+v+p);return o=v*A,a=p*A,t.copy(i).addScaledVector(Vl,o).addScaledVector(Wl,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}let NN=0;class Pn extends ms{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:NN++}),this.uuid=ji(),this.name="",this.type="Material",this.blending=qa,this.side=hs,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.blendSrc=W_,this.blendDst=j_,this.blendEquation=Na,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=Jm,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=IP,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=gm,this.stencilZFail=gm,this.stencilZPass=gm,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: '"+t+"' parameter is undefined.");continue}const r=this[t];if(r===void 0){console.warn("THREE."+this.type+": '"+t+"' is not a property of this material.");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!==qa&&(i.blending=this.blending),this.side!==hs&&(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 NP={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},Pr={h:0,s:0,l:0},lp={h:0,s:0,l:0};function Qy(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 De{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=Lr){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,ai.toWorkingColorSpace(this,t),this}setRGB(e,t,i,r=ai.workingColorSpace){return this.r=e,this.g=t,this.b=i,ai.toWorkingColorSpace(this,r),this}setHSL(e,t,i,r=ai.workingColorSpace){if(e=Z_(e,1),t=An(t,0,1),i=An(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=Qy(o,s,e+1/3),this.g=Qy(o,s,e),this.b=Qy(o,s,e-1/3)}return ai.toWorkingColorSpace(this,r),this}setStyle(e,t=Lr){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,ai.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,ai.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,u=parseFloat(s[2])/100,h=parseFloat(s[3])/100;return i(s[4]),this.setHSL(l,u,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.r=parseInt(s.charAt(0)+s.charAt(0),16)/255,this.g=parseInt(s.charAt(1)+s.charAt(1),16)/255,this.b=parseInt(s.charAt(2)+s.charAt(2),16)/255,ai.toWorkingColorSpace(this,t),this;if(o===6)return this.r=parseInt(s.charAt(0)+s.charAt(1),16)/255,this.g=parseInt(s.charAt(2)+s.charAt(3),16)/255,this.b=parseInt(s.charAt(4)+s.charAt(5),16)/255,ai.toWorkingColorSpace(this,t),this;console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=Lr){const i=NP[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=Bc(e.r),this.g=Bc(e.g),this.b=Bc(e.b),this}copyLinearToSRGB(e){return this.r=Oy(e.r),this.g=Oy(e.g),this.b=Oy(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Lr){return ai.fromWorkingColorSpace(oi.copy(this),e),An(oi.r*255,0,255)<<16^An(oi.g*255,0,255)<<8^An(oi.b*255,0,255)<<0}getHexString(e=Lr){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=ai.workingColorSpace){ai.fromWorkingColorSpace(oi.copy(this),t);const i=oi.r,r=oi.g,s=oi.b,o=Math.max(i,r,s),a=Math.min(i,r,s);let l,u;const h=(a+o)/2;if(a===o)l=0,u=0;else{const d=o-a;switch(u=h<=.5?d/(o+a):d/(2-o-a),o){case i:l=(r-s)/d+(r0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const u in l)l[u]!==void 0&&(e[u]=l[u]);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 u=i[l];e.data.attributes[l]=u.toJSON(e.data)}const r={};let s=!1;for(const l in this.morphAttributes){const u=this.morphAttributes[l],h=[];for(let d=0,p=u.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 u in r){const h=r[u];this.setAttribute(u,h.clone(t))}const s=e.morphAttributes;for(const u in s){const h=[],d=s[u];for(let p=0,m=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))||(gC.copy(s).invert(),ns.copy(e.ray).applyMatrix4(gC),i.boundingBox!==null&&ns.intersectsBox(i.boundingBox)===!1))return;let o;const a=i.index,l=i.attributes.position,u=i.attributes.uv,h=i.attributes.uv2,d=i.groups,p=i.drawRange;if(a!==null)if(Array.isArray(r))for(let m=0,y=d.length;mt.far?null:{distance:u,point:mp.clone(),object:n}}function gp(n,e,t,i,r,s,o,a,l){n.getVertexPosition(o,Wu),n.getVertexPosition(a,ju),n.getVertexPosition(l,Ju);const u=JN(n,e,t,i,Wu,ju,Ju,$y);if(u){r&&(hp.fromBufferAttribute(r,o),dp.fromBufferAttribute(r,a),pp.fromBufferAttribute(r,l),u.uv=dr.getUV($y,Wu,ju,Ju,hp,dp,pp,new pe)),s&&(hp.fromBufferAttribute(s,o),dp.fromBufferAttribute(s,a),pp.fromBufferAttribute(s,l),u.uv2=dr.getUV($y,Wu,ju,Ju,hp,dp,pp,new pe));const h={a:o,b:a,c:l,normal:new F,materialIndex:0};dr.getNormal(Wu,ju,Ju,h.normal),u.face=h}return u}class oa extends ft{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=[],u=[],h=[],d=[];let p=0,m=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 Ve(u,3)),this.setAttribute("normal",new Ve(h,3)),this.setAttribute("uv",new Ve(d,2));function y(v,x,A,_,w,M,b,P,R,E,B){const I=M/R,z=b/E,Z=M/2,J=b/2,W=P/2,Q=R+1,re=E+1;let ce=0,L=0;const V=new F;for(let H=0;H0?1:-1,h.push(V.x,V.y,V.z),d.push(G/R),d.push(1-H/E),ce+=1}}for(let H=0;H>8&255]+si[n>>16&255]+si[n>>24&255]+"-"+si[e&255]+si[e>>8&255]+"-"+si[e>>16&15|64]+si[e>>24&255]+"-"+si[t&63|128]+si[t>>8&255]+"-"+si[t>>16&255]+si[t>>24&255]+si[i&255]+si[i>>8&255]+si[i>>16&255]+si[i>>24&255]).toLowerCase()}function An(n,e,t){return Math.max(e,Math.min(t,n))}function Q_(n,e){return(n%e+e)%e}function nN(n,e,t,i,r){return i+(n-e)*(r-i)/(t-e)}function iN(n,e,t){return n!==e?(t-n)/(e-n):0}function wf(n,e,t){return(1-t)*n+t*e}function rN(n,e,t,i){return wf(n,e,1-Math.exp(-t*i))}function sN(n,e=1){return e-Math.abs(Q_(n,e*2)-e)}function oN(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*(3-2*n))}function aN(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*n*(n*(n*6-15)+10))}function lN(n,e){return n+Math.floor(Math.random()*(e-n+1))}function cN(n,e){return n+Math.random()*(e-n)}function uN(n){return n*(.5-Math.random())}function fN(n){n!==void 0&&(sC=n);let e=sC+=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 hN(n){return n*tl}function dN(n){return n*$f}function p1(n){return(n&n-1)===0&&n!==0}function LP(n){return Math.pow(2,Math.ceil(Math.log(n)/Math.LN2))}function IP(n){return Math.pow(2,Math.floor(Math.log(n)/Math.LN2))}function pN(n,e,t,i,r){const s=Math.cos,o=Math.sin,a=s(t/2),l=o(t/2),u=s((e+i)/2),h=o((e+i)/2),d=s((e-i)/2),p=o((e-i)/2),m=s((i-e)/2),y=o((i-e)/2);switch(r){case"XYX":n.set(a*h,l*d,l*p,a*u);break;case"YZY":n.set(l*p,a*h,l*d,a*u);break;case"ZXZ":n.set(l*d,l*p,a*h,a*u);break;case"XZX":n.set(a*h,l*y,l*m,a*u);break;case"YXY":n.set(l*m,a*h,l*y,a*u);break;case"ZYZ":n.set(l*y,l*m,a*h,a*u);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}function Us(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 Z_={DEG2RAD:tl,RAD2DEG:$f,generateUUID:ji,clamp:An,euclideanModulo:Q_,mapLinear:nN,inverseLerp:iN,lerp:wf,damp:rN,pingpong:sN,smoothstep:oN,smootherstep:aN,randInt:lN,randFloat:cN,randFloatSpread:uN,seededRandom:fN,degToRad:hN,radToDeg:dN,isPowerOfTwo:p1,ceilPowerOfTwo:LP,floorPowerOfTwo:IP,setQuaternionFromProperEuler:pN,normalize:Gt,denormalize:Us};class pe{constructor(e=0,t=0){pe.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}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 Kn{constructor(){Kn.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1]}set(e,t,i,r,s,o,a,l,u){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]=u,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],u=i[1],h=i[4],d=i[7],p=i[2],m=i[5],y=i[8],v=r[0],x=r[3],A=r[6],_=r[1],w=r[4],M=r[7],b=r[2],P=r[5],R=r[8];return s[0]=o*v+a*_+l*b,s[3]=o*x+a*w+l*P,s[6]=o*A+a*M+l*R,s[1]=u*v+h*_+d*b,s[4]=u*x+h*w+d*P,s[7]=u*A+h*M+d*R,s[2]=p*v+m*_+y*b,s[5]=p*x+m*w+y*P,s[8]=p*A+m*M+y*R,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],u=e[7],h=e[8];return t*o*h-t*a*u-i*s*h+i*a*l+r*s*u-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],u=e[7],h=e[8],d=h*o-a*u,p=a*l-h*s,m=u*s-o*l,y=t*d+i*p+r*m;if(y===0)return this.set(0,0,0,0,0,0,0,0,0);const v=1/y;return e[0]=d*v,e[1]=(r*u-h*i)*v,e[2]=(a*i-r*o)*v,e[3]=p*v,e[4]=(h*t-r*l)*v,e[5]=(r*s-a*t)*v,e[6]=m*v,e[7]=(i*l-u*t)*v,e[8]=(o*t-i*s)*v,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),u=Math.sin(s);return this.set(i*l,i*u,-i*(l*o+u*a)+o+e,-r*u,r*l,-r*(-u*o+l*a)+a+t,0,0,1),this}scale(e,t){return this.premultiply(Fy.makeScale(e,t)),this}rotate(e){return this.premultiply(Fy.makeRotation(-e)),this}translate(e,t){return this.premultiply(Fy.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 Fy=new Kn;function DP(n){for(let e=n.length-1;e>=0;--e)if(n[e]>=65535)return!0;return!1}const mN={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function mc(n,e){return new mN[n](e)}function eh(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}class Wn{constructor(e=0,t=0,i=0,r=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=i,this._w=r}static slerpFlat(e,t,i,r,s,o,a){let l=i[r+0],u=i[r+1],h=i[r+2],d=i[r+3];const p=s[o+0],m=s[o+1],y=s[o+2],v=s[o+3];if(a===0){e[t+0]=l,e[t+1]=u,e[t+2]=h,e[t+3]=d;return}if(a===1){e[t+0]=p,e[t+1]=m,e[t+2]=y,e[t+3]=v;return}if(d!==v||l!==p||u!==m||h!==y){let x=1-a;const A=l*p+u*m+h*y+d*v,_=A>=0?1:-1,w=1-A*A;if(w>Number.EPSILON){const b=Math.sqrt(w),P=Math.atan2(b,A*_);x=Math.sin(x*P)/b,a=Math.sin(a*P)/b}const M=a*_;if(l=l*x+p*M,u=u*x+m*M,h=h*x+y*M,d=d*x+v*M,x===1-a){const b=1/Math.sqrt(l*l+u*u+h*h+d*d);l*=b,u*=b,h*=b,d*=b}}e[t]=l,e[t+1]=u,e[t+2]=h,e[t+3]=d}static multiplyQuaternionsFlat(e,t,i,r,s,o){const a=i[r],l=i[r+1],u=i[r+2],h=i[r+3],d=s[o],p=s[o+1],m=s[o+2],y=s[o+3];return e[t]=a*y+h*d+l*m-u*p,e[t+1]=l*y+h*p+u*d-a*m,e[t+2]=u*y+h*m+a*p-l*d,e[t+3]=h*y-a*d-l*p-u*m,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,u=a(i/2),h=a(r/2),d=a(s/2),p=l(i/2),m=l(r/2),y=l(s/2);switch(o){case"XYZ":this._x=p*h*d+u*m*y,this._y=u*m*d-p*h*y,this._z=u*h*y+p*m*d,this._w=u*h*d-p*m*y;break;case"YXZ":this._x=p*h*d+u*m*y,this._y=u*m*d-p*h*y,this._z=u*h*y-p*m*d,this._w=u*h*d+p*m*y;break;case"ZXY":this._x=p*h*d-u*m*y,this._y=u*m*d+p*h*y,this._z=u*h*y+p*m*d,this._w=u*h*d-p*m*y;break;case"ZYX":this._x=p*h*d-u*m*y,this._y=u*m*d+p*h*y,this._z=u*h*y-p*m*d,this._w=u*h*d+p*m*y;break;case"YZX":this._x=p*h*d+u*m*y,this._y=u*m*d+p*h*y,this._z=u*h*y-p*m*d,this._w=u*h*d-p*m*y;break;case"XZY":this._x=p*h*d-u*m*y,this._y=u*m*d-p*h*y,this._z=u*h*y+p*m*d,this._w=u*h*d+p*m*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],u=t[2],h=t[6],d=t[10],p=i+a+d;if(p>0){const m=.5/Math.sqrt(p+1);this._w=.25/m,this._x=(h-l)*m,this._y=(s-u)*m,this._z=(o-r)*m}else if(i>a&&i>d){const m=2*Math.sqrt(1+i-a-d);this._w=(h-l)/m,this._x=.25*m,this._y=(r+o)/m,this._z=(s+u)/m}else if(a>d){const m=2*Math.sqrt(1+a-i-d);this._w=(s-u)/m,this._x=(r+o)/m,this._y=.25*m,this._z=(l+h)/m}else{const m=2*Math.sqrt(1+d-i-a);this._w=(o-r)/m,this._x=(s+u)/m,this._y=(l+h)/m,this._z=.25*m}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(An(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,u=t._z,h=t._w;return this._x=i*h+o*a+r*u-s*l,this._y=r*h+o*l+s*a-i*u,this._z=s*h+o*u+i*l-r*a,this._w=o*h-i*a-r*l-s*u,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 m=1-t;return this._w=m*o+t*this._w,this._x=m*i+t*this._x,this._y=m*r+t*this._y,this._z=m*s+t*this._z,this.normalize(),this._onChangeCallback(),this}const u=Math.sqrt(l),h=Math.atan2(u,a),d=Math.sin((1-t)*h)/u,p=Math.sin(t*h)/u;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}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class F{constructor(e=0,t=0,i=0){F.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(oC.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(oC.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,u=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=u*l+p*-s+h*-a-d*-o,this.y=h*l+p*-o+d*-s-u*-a,this.z=d*l+p*-a+u*-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 ky.copy(this).projectOnVector(e),this.sub(ky)}reflect(e){return this.sub(ky.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(An(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}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 ky=new F,oC=new Wn;function Bc(n){return n<.04045?n*.0773993808:Math.pow(n*.9478672986+.0521327014,2.4)}function Ny(n){return n<.0031308?n*12.92:1.055*Math.pow(n,.41666)-.055}const gN=new Kn().fromArray([.8224621,.0331941,.0170827,.177538,.9668058,.0723974,-1e-7,1e-7,.9105199]),yN=new Kn().fromArray([1.2249401,-.0420569,-.0196376,-.2249404,1.0420571,-.0786361,1e-7,0,1.0982735]),Bo=new F;function vN(n){return n.convertSRGBToLinear(),Bo.set(n.r,n.g,n.b).applyMatrix3(yN),n.setRGB(Bo.x,Bo.y,Bo.z)}function xN(n){return Bo.set(n.r,n.g,n.b).applyMatrix3(gN),n.setRGB(Bo.x,Bo.y,Bo.z).convertLinearToSRGB()}const _N={[Wc]:n=>n,[Lr]:n=>n.convertSRGBToLinear(),[K_]:vN},AN={[Wc]:n=>n,[Lr]:n=>n.convertLinearToSRGB(),[K_]:xN},ai={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 Wc},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=_N[e],r=AN[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 Nl;class q_{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{Nl===void 0&&(Nl=eh("canvas")),Nl.width=e.width,Nl.height=e.height;const i=Nl.getContext("2d");e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0,e.width,e.height),t=Nl}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=eh("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!==Bg)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case Yo:e.x=e.x-Math.floor(e.x);break;case Yn:e.x=e.x<0?0:1;break;case Gc: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 Yo:e.y=e.y-Math.floor(e.y);break;case Yn:e.y=e.y<0?0:1;break;case Gc: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)}}$t.DEFAULT_IMAGE=null;$t.DEFAULT_MAPPING=Bg;$t.DEFAULT_ANISOTROPY=1;class Nt{constructor(e=0,t=0,i=0,r=1){Nt.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,u=l[0],h=l[4],d=l[8],p=l[1],m=l[5],y=l[9],v=l[2],x=l[6],A=l[10];if(Math.abs(h-p)<.01&&Math.abs(d-v)<.01&&Math.abs(y-x)<.01){if(Math.abs(h+p)<.1&&Math.abs(d+v)<.1&&Math.abs(y+x)<.1&&Math.abs(u+m+A-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const w=(u+1)/2,M=(m+1)/2,b=(A+1)/2,P=(h+p)/4,R=(d+v)/4,E=(y+x)/4;return w>M&&w>b?w<.01?(i=0,r=.707106781,s=.707106781):(i=Math.sqrt(w),r=P/i,s=R/i):M>b?M<.01?(i=.707106781,r=0,s=.707106781):(r=Math.sqrt(M),i=P/r,s=E/r):b<.01?(i=.707106781,r=.707106781,s=0):(s=Math.sqrt(b),i=R/s,r=E/s),this.set(i,r,s,t),this}let _=Math.sqrt((x-y)*(x-y)+(d-v)*(d-v)+(p-h)*(p-h));return Math.abs(_)<.001&&(_=1),this.x=(x-y)/_,this.y=(d-v)/_,this.z=(p-h)/_,this.w=Math.acos((u+m+A-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 Gr extends ms{constructor(e=1,t=1,i={}){super(),this.isWebGLRenderTarget=!0,this.width=e,this.height=t,this.depth=1,this.scissor=new Nt(0,0,e,t),this.scissorTest=!1,this.viewport=new Nt(0,0,e,t);const r={width:e,height:t,depth:1};this.texture=new $t(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:nn,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 Ja(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 Ig extends $t{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=mn,this.minFilter=mn,this.wrapR=Yn,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class SN extends Gr{constructor(e=1,t=1,i=1){super(e,t),this.isWebGLArrayRenderTarget=!0,this.depth=i,this.texture=new Ig(null,e,t,i),this.texture.isRenderTargetTexture=!0}}class $_ extends $t{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=mn,this.minFilter=mn,this.wrapR=Yn,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class MN extends Gr{constructor(e=1,t=1,i=1){super(e,t),this.isWebGL3DRenderTarget=!0,this.depth=i,this.texture=new $_(null,e,t,i),this.texture.isRenderTargetTexture=!0}}class CN extends Gr{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;os&&(s=h),d>o&&(o=d),p>a&&(a=p)}return this.min.set(t,i,r),this.max.set(s,o,a),this}setFromBufferAttribute(e){let t=1/0,i=1/0,r=1/0,s=-1/0,o=-1/0,a=-1/0;for(let l=0,u=e.count;ls&&(s=h),d>o&&(o=d),p>a&&(a=p)}return this.min.set(t,i,r),this.max.set(s,o,a),this}setFromPoints(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,xa),xa.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(Uu),tp.subVectors(this.max,Uu),Ol.subVectors(e.a,Uu),zl.subVectors(e.b,Uu),Ul.subVectors(e.c,Uu),fo.subVectors(zl,Ol),ho.subVectors(Ul,zl),_a.subVectors(Ol,Ul);let t=[0,-fo.z,fo.y,0,-ho.z,ho.y,0,-_a.z,_a.y,fo.z,0,-fo.x,ho.z,0,-ho.x,_a.z,0,-_a.x,-fo.y,fo.x,0,-ho.y,ho.x,0,-_a.y,_a.x,0];return!Uy(t,Ol,zl,Ul,tp)||(t=[1,0,0,0,1,0,0,0,1],!Uy(t,Ol,zl,Ul,tp))?!1:(np.crossVectors(fo,ho),t=[np.x,np.y,np.z],Uy(t,Ol,zl,Ul,tp))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,xa).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(xa).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:(Es[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Es[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Es[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Es[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Es[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Es[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Es[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Es[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Es),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 Es=[new F,new F,new F,new F,new F,new F,new F,new F],xa=new F,zy=new ra,Ol=new F,zl=new F,Ul=new F,fo=new F,ho=new F,_a=new F,Uu=new F,tp=new F,np=new F,Aa=new F;function Uy(n,e,t,i,r){for(let s=0,o=n.length-3;s<=o;s+=3){Aa.fromArray(n,s);const a=r.x*Math.abs(Aa.x)+r.y*Math.abs(Aa.y)+r.z*Math.abs(Aa.z),l=e.dot(Aa),u=t.dot(Aa),h=i.dot(Aa);if(Math.max(-Math.max(l,u,h),Math.min(l,u,h))>a)return!1}return!0}const EN=new ra,Gu=new F,Gy=new F;class sa{constructor(e=new F,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):EN.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;Gu.subVectors(e,this.center);const t=Gu.lengthSq();if(t>this.radius*this.radius){const i=Math.sqrt(t),r=(i-this.radius)*.5;this.center.addScaledVector(Gu,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):(Gy.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Gu.copy(e.center).add(Gy)),this.expandByPoint(Gu.copy(e.center).sub(Gy))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const bs=new F,Hy=new F,ip=new F,po=new F,Vy=new F,rp=new F,Wy=new F;class ru{constructor(e=new F,t=new F(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,bs)),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=bs.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(bs.copy(this.origin).addScaledVector(this.direction,t),bs.distanceToSquared(e))}distanceSqToSegment(e,t,i,r){Hy.copy(e).add(t).multiplyScalar(.5),ip.copy(t).sub(e).normalize(),po.copy(this.origin).sub(Hy);const s=e.distanceTo(t)*.5,o=-this.direction.dot(ip),a=po.dot(this.direction),l=-po.dot(ip),u=po.lengthSq(),h=Math.abs(1-o*o);let d,p,m,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 v=1/h;d*=v,p*=v,m=d*(d+o*p+2*a)+p*(o*d+p+2*l)+u}else p=s,d=Math.max(0,-(o*p+a)),m=-d*d+p*(p+2*l)+u;else p=-s,d=Math.max(0,-(o*p+a)),m=-d*d+p*(p+2*l)+u;else p<=-y?(d=Math.max(0,-(-o*s+a)),p=d>0?-s:Math.min(Math.max(-s,-l),s),m=-d*d+p*(p+2*l)+u):p<=y?(d=0,p=Math.min(Math.max(-s,-l),s),m=p*(p+2*l)+u):(d=Math.max(0,-(o*s+a)),p=d>0?s:Math.min(Math.max(-s,-l),s),m=-d*d+p*(p+2*l)+u);else p=o>0?-s:s,d=Math.max(0,-(o*p+a)),m=-d*d+p*(p+2*l)+u;return i&&i.copy(this.origin).addScaledVector(this.direction,d),r&&r.copy(Hy).addScaledVector(ip,p),m}intersectSphere(e,t){bs.subVectors(e.center,this.origin);const i=bs.dot(this.direction),r=bs.dot(bs)-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 u=1/this.direction.x,h=1/this.direction.y,d=1/this.direction.z,p=this.origin;return u>=0?(i=(e.min.x-p.x)*u,r=(e.max.x-p.x)*u):(i=(e.max.x-p.x)*u,r=(e.min.x-p.x)*u),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,bs)!==null}intersectTriangle(e,t,i,r,s){Vy.subVectors(t,e),rp.subVectors(i,e),Wy.crossVectors(Vy,rp);let o=this.direction.dot(Wy),a;if(o>0){if(r)return null;a=1}else if(o<0)a=-1,o=-o;else return null;po.subVectors(this.origin,e);const l=a*this.direction.dot(rp.crossVectors(po,rp));if(l<0)return null;const u=a*this.direction.dot(Vy.cross(po));if(u<0||l+u>o)return null;const h=-a*po.dot(Wy);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,u,h,d,p,m,y,v,x){const A=this.elements;return A[0]=e,A[4]=t,A[8]=i,A[12]=r,A[1]=s,A[5]=o,A[9]=a,A[13]=l,A[2]=u,A[6]=h,A[10]=d,A[14]=p,A[3]=m,A[7]=y,A[11]=v,A[15]=x,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/Gl.setFromMatrixColumn(e,0).length(),s=1/Gl.setFromMatrixColumn(e,1).length(),o=1/Gl.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),u=Math.sin(r),h=Math.cos(s),d=Math.sin(s);if(e.order==="XYZ"){const p=o*h,m=o*d,y=a*h,v=a*d;t[0]=l*h,t[4]=-l*d,t[8]=u,t[1]=m+y*u,t[5]=p-v*u,t[9]=-a*l,t[2]=v-p*u,t[6]=y+m*u,t[10]=o*l}else if(e.order==="YXZ"){const p=l*h,m=l*d,y=u*h,v=u*d;t[0]=p+v*a,t[4]=y*a-m,t[8]=o*u,t[1]=o*d,t[5]=o*h,t[9]=-a,t[2]=m*a-y,t[6]=v+p*a,t[10]=o*l}else if(e.order==="ZXY"){const p=l*h,m=l*d,y=u*h,v=u*d;t[0]=p-v*a,t[4]=-o*d,t[8]=y+m*a,t[1]=m+y*a,t[5]=o*h,t[9]=v-p*a,t[2]=-o*u,t[6]=a,t[10]=o*l}else if(e.order==="ZYX"){const p=o*h,m=o*d,y=a*h,v=a*d;t[0]=l*h,t[4]=y*u-m,t[8]=p*u+v,t[1]=l*d,t[5]=v*u+p,t[9]=m*u-y,t[2]=-u,t[6]=a*l,t[10]=o*l}else if(e.order==="YZX"){const p=o*l,m=o*u,y=a*l,v=a*u;t[0]=l*h,t[4]=v-p*d,t[8]=y*d+m,t[1]=d,t[5]=o*h,t[9]=-a*h,t[2]=-u*h,t[6]=m*d+y,t[10]=p-v*d}else if(e.order==="XZY"){const p=o*l,m=o*u,y=a*l,v=a*u;t[0]=l*h,t[4]=-d,t[8]=u*h,t[1]=p*d+v,t[5]=o*h,t[9]=m*d-y,t[2]=y*d-m,t[6]=a*h,t[10]=v*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(bN,e,TN)}lookAt(e,t,i){const r=this.elements;return Oi.subVectors(e,t),Oi.lengthSq()===0&&(Oi.z=1),Oi.normalize(),mo.crossVectors(i,Oi),mo.lengthSq()===0&&(Math.abs(i.z)===1?Oi.x+=1e-4:Oi.z+=1e-4,Oi.normalize(),mo.crossVectors(i,Oi)),mo.normalize(),sp.crossVectors(Oi,mo),r[0]=mo.x,r[4]=sp.x,r[8]=Oi.x,r[1]=mo.y,r[5]=sp.y,r[9]=Oi.y,r[2]=mo.z,r[6]=sp.z,r[10]=Oi.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],u=i[12],h=i[1],d=i[5],p=i[9],m=i[13],y=i[2],v=i[6],x=i[10],A=i[14],_=i[3],w=i[7],M=i[11],b=i[15],P=r[0],R=r[4],E=r[8],B=r[12],I=r[1],z=r[5],Z=r[9],J=r[13],W=r[2],Q=r[6],re=r[10],ce=r[14],L=r[3],V=r[7],H=r[11],$=r[15];return s[0]=o*P+a*I+l*W+u*L,s[4]=o*R+a*z+l*Q+u*V,s[8]=o*E+a*Z+l*re+u*H,s[12]=o*B+a*J+l*ce+u*$,s[1]=h*P+d*I+p*W+m*L,s[5]=h*R+d*z+p*Q+m*V,s[9]=h*E+d*Z+p*re+m*H,s[13]=h*B+d*J+p*ce+m*$,s[2]=y*P+v*I+x*W+A*L,s[6]=y*R+v*z+x*Q+A*V,s[10]=y*E+v*Z+x*re+A*H,s[14]=y*B+v*J+x*ce+A*$,s[3]=_*P+w*I+M*W+b*L,s[7]=_*R+w*z+M*Q+b*V,s[11]=_*E+w*Z+M*re+b*H,s[15]=_*B+w*J+M*ce+b*$,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],u=e[13],h=e[2],d=e[6],p=e[10],m=e[14],y=e[3],v=e[7],x=e[11],A=e[15];return y*(+s*l*d-r*u*d-s*a*p+i*u*p+r*a*m-i*l*m)+v*(+t*l*m-t*u*p+s*o*p-r*o*m+r*u*h-s*l*h)+x*(+t*u*d-t*a*m-s*o*d+i*o*m+s*a*h-i*u*h)+A*(-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],u=e[7],h=e[8],d=e[9],p=e[10],m=e[11],y=e[12],v=e[13],x=e[14],A=e[15],_=d*x*u-v*p*u+v*l*m-a*x*m-d*l*A+a*p*A,w=y*p*u-h*x*u-y*l*m+o*x*m+h*l*A-o*p*A,M=h*v*u-y*d*u+y*a*m-o*v*m-h*a*A+o*d*A,b=y*d*l-h*v*l-y*a*p+o*v*p+h*a*x-o*d*x,P=t*_+i*w+r*M+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 R=1/P;return e[0]=_*R,e[1]=(v*p*s-d*x*s-v*r*m+i*x*m+d*r*A-i*p*A)*R,e[2]=(a*x*s-v*l*s+v*r*u-i*x*u-a*r*A+i*l*A)*R,e[3]=(d*l*s-a*p*s-d*r*u+i*p*u+a*r*m-i*l*m)*R,e[4]=w*R,e[5]=(h*x*s-y*p*s+y*r*m-t*x*m-h*r*A+t*p*A)*R,e[6]=(y*l*s-o*x*s-y*r*u+t*x*u+o*r*A-t*l*A)*R,e[7]=(o*p*s-h*l*s+h*r*u-t*p*u-o*r*m+t*l*m)*R,e[8]=M*R,e[9]=(y*d*s-h*v*s-y*i*m+t*v*m+h*i*A-t*d*A)*R,e[10]=(o*v*s-y*a*s+y*i*u-t*v*u-o*i*A+t*a*A)*R,e[11]=(h*a*s-o*d*s-h*i*u+t*d*u+o*i*m-t*a*m)*R,e[12]=b*R,e[13]=(h*v*r-y*d*r+y*i*p-t*v*p-h*i*x+t*d*x)*R,e[14]=(y*a*r-o*v*r-y*i*l+t*v*l+o*i*x-t*a*x)*R,e[15]=(o*d*r-h*a*r+h*i*l-t*d*l-o*i*p+t*a*p)*R,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,u=s*o,h=s*a;return this.set(u*o+i,u*a-r*l,u*l+r*a,0,u*a+r*l,h*a+i,h*l-r*o,0,u*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,u=s+s,h=o+o,d=a+a,p=s*u,m=s*h,y=s*d,v=o*h,x=o*d,A=a*d,_=l*u,w=l*h,M=l*d,b=i.x,P=i.y,R=i.z;return r[0]=(1-(v+A))*b,r[1]=(m+M)*b,r[2]=(y-w)*b,r[3]=0,r[4]=(m-M)*P,r[5]=(1-(p+A))*P,r[6]=(x+_)*P,r[7]=0,r[8]=(y+w)*R,r[9]=(x-_)*R,r[10]=(1-(p+v))*R,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=Gl.set(r[0],r[1],r[2]).length();const o=Gl.set(r[4],r[5],r[6]).length(),a=Gl.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],br.copy(this);const u=1/s,h=1/o,d=1/a;return br.elements[0]*=u,br.elements[1]*=u,br.elements[2]*=u,br.elements[4]*=h,br.elements[5]*=h,br.elements[6]*=h,br.elements[8]*=d,br.elements[9]*=d,br.elements[10]*=d,t.setFromRotationMatrix(br),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),u=2*s/(i-r),h=(t+e)/(t-e),d=(i+r)/(i-r),p=-(o+s)/(o-s),m=-2*o*s/(o-s);return a[0]=l,a[4]=0,a[8]=h,a[12]=0,a[1]=0,a[5]=u,a[9]=d,a[13]=0,a[2]=0,a[6]=0,a[10]=p,a[14]=m,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),u=1/(i-r),h=1/(o-s),d=(t+e)*l,p=(i+r)*u,m=(o+s)*h;return a[0]=2*l,a[4]=0,a[8]=0,a[12]=-d,a[1]=0,a[5]=2*u,a[9]=0,a[13]=-p,a[2]=0,a[6]=0,a[10]=-2*h,a[14]=-m,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 Gl=new F,br=new ot,bN=new F(0,0,0),TN=new F(1,1,1),mo=new F,sp=new F,Oi=new F,aC=new ot,lC=new Wn;class ml{constructor(e=0,t=0,i=0,r=ml.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],u=r[5],h=r[9],d=r[2],p=r[6],m=r[10];switch(t){case"XYZ":this._y=Math.asin(An(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-h,m),this._z=Math.atan2(-o,s)):(this._x=Math.atan2(p,u),this._z=0);break;case"YXZ":this._x=Math.asin(-An(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(a,m),this._z=Math.atan2(l,u)):(this._y=Math.atan2(-d,s),this._z=0);break;case"ZXY":this._x=Math.asin(An(p,-1,1)),Math.abs(p)<.9999999?(this._y=Math.atan2(-d,m),this._z=Math.atan2(-o,u)):(this._y=0,this._z=Math.atan2(l,s));break;case"ZYX":this._y=Math.asin(-An(d,-1,1)),Math.abs(d)<.9999999?(this._x=Math.atan2(p,m),this._z=Math.atan2(l,s)):(this._x=0,this._z=Math.atan2(-o,u));break;case"YZX":this._z=Math.asin(An(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-h,u),this._y=Math.atan2(-d,s)):(this._x=0,this._y=Math.atan2(a,m));break;case"XZY":this._z=Math.asin(-An(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(p,u),this._y=Math.atan2(a,s)):(this._x=Math.atan2(-h,m),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 aC.makeRotationFromQuaternion(e),this.setFromRotationMatrix(aC,t,i)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return lC.setFromEuler(this),this.setFromQuaternion(lC,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}}ml.DEFAULT_ORDER="XYZ";class nl{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(Hu,e,BN),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Hu,RN,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(),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 u=0,h=l.length;u0){r.children=[];for(let a=0;a0){r.animations=[];for(let a=0;a0&&(i.geometries=a),l.length>0&&(i.materials=l),u.length>0&&(i.textures=u),h.length>0&&(i.images=h),d.length>0&&(i.shapes=d),p.length>0&&(i.skeletons=p),m.length>0&&(i.animations=m),y.length>0&&(i.nodes=y)}return i.object=r,i;function o(a){const l=[];for(const u in a){const h=a[u];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){Tr.subVectors(r,t),Ps.subVectors(i,t),jy.subVectors(e,t);const o=Tr.dot(Tr),a=Tr.dot(Ps),l=Tr.dot(jy),u=Ps.dot(Ps),h=Ps.dot(jy),d=o*u-a*a;if(d===0)return s.set(-2,-1,-1);const p=1/d,m=(u*l-a*h)*p,y=(o*h-a*l)*p;return s.set(1-m-y,y,m)}static containsPoint(e,t,i,r){return this.getBarycoord(e,t,i,r,Bs),Bs.x>=0&&Bs.y>=0&&Bs.x+Bs.y<=1}static getUV(e,t,i,r,s,o,a,l){return this.getBarycoord(e,t,i,r,Bs),l.set(0,0),l.addScaledVector(s,Bs.x),l.addScaledVector(o,Bs.y),l.addScaledVector(a,Bs.z),l}static isFrontFacing(e,t,i,r){return Tr.subVectors(i,t),Ps.subVectors(e,t),Tr.cross(Ps).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 Tr.subVectors(this.c,this.b),Ps.subVectors(this.a,this.b),Tr.cross(Ps).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return dr.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return dr.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,i,r,s){return dr.getUV(e,this.a,this.b,this.c,t,i,r,s)}containsPoint(e){return dr.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return dr.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;Vl.subVectors(r,i),Wl.subVectors(s,i),Jy.subVectors(e,i);const l=Vl.dot(Jy),u=Wl.dot(Jy);if(l<=0&&u<=0)return t.copy(i);Xy.subVectors(e,r);const h=Vl.dot(Xy),d=Wl.dot(Xy);if(h>=0&&d<=h)return t.copy(r);const p=l*d-h*u;if(p<=0&&l>=0&&h<=0)return o=l/(l-h),t.copy(i).addScaledVector(Vl,o);Yy.subVectors(e,s);const m=Vl.dot(Yy),y=Wl.dot(Yy);if(y>=0&&m<=y)return t.copy(s);const v=m*u-l*y;if(v<=0&&u>=0&&y<=0)return a=u/(u-y),t.copy(i).addScaledVector(Wl,a);const x=h*y-m*d;if(x<=0&&d-h>=0&&m-y>=0)return pC.subVectors(s,r),a=(d-h)/(d-h+(m-y)),t.copy(r).addScaledVector(pC,a);const A=1/(x+v+p);return o=v*A,a=p*A,t.copy(i).addScaledVector(Vl,o).addScaledVector(Wl,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}let IN=0;class Pn extends ms{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:IN++}),this.uuid=ji(),this.name="",this.type="Material",this.blending=qa,this.side=hs,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.blendSrc=V_,this.blendDst=W_,this.blendEquation=Na,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=jm,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=RP,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=mm,this.stencilZFail=mm,this.stencilZPass=mm,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: '"+t+"' parameter is undefined.");continue}const r=this[t];if(r===void 0){console.warn("THREE."+this.type+": '"+t+"' is not a property of this material.");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!==qa&&(i.blending=this.blending),this.side!==hs&&(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 FP={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},Pr={h:0,s:0,l:0},ap={h:0,s:0,l:0};function Ky(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 De{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=Lr){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,ai.toWorkingColorSpace(this,t),this}setRGB(e,t,i,r=ai.workingColorSpace){return this.r=e,this.g=t,this.b=i,ai.toWorkingColorSpace(this,r),this}setHSL(e,t,i,r=ai.workingColorSpace){if(e=Q_(e,1),t=An(t,0,1),i=An(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=Ky(o,s,e+1/3),this.g=Ky(o,s,e),this.b=Ky(o,s,e-1/3)}return ai.toWorkingColorSpace(this,r),this}setStyle(e,t=Lr){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,ai.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,ai.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,u=parseFloat(s[2])/100,h=parseFloat(s[3])/100;return i(s[4]),this.setHSL(l,u,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.r=parseInt(s.charAt(0)+s.charAt(0),16)/255,this.g=parseInt(s.charAt(1)+s.charAt(1),16)/255,this.b=parseInt(s.charAt(2)+s.charAt(2),16)/255,ai.toWorkingColorSpace(this,t),this;if(o===6)return this.r=parseInt(s.charAt(0)+s.charAt(1),16)/255,this.g=parseInt(s.charAt(2)+s.charAt(3),16)/255,this.b=parseInt(s.charAt(4)+s.charAt(5),16)/255,ai.toWorkingColorSpace(this,t),this;console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=Lr){const i=FP[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=Bc(e.r),this.g=Bc(e.g),this.b=Bc(e.b),this}copyLinearToSRGB(e){return this.r=Ny(e.r),this.g=Ny(e.g),this.b=Ny(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Lr){return ai.fromWorkingColorSpace(oi.copy(this),e),An(oi.r*255,0,255)<<16^An(oi.g*255,0,255)<<8^An(oi.b*255,0,255)<<0}getHexString(e=Lr){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=ai.workingColorSpace){ai.fromWorkingColorSpace(oi.copy(this),t);const i=oi.r,r=oi.g,s=oi.b,o=Math.max(i,r,s),a=Math.min(i,r,s);let l,u;const h=(a+o)/2;if(a===o)l=0,u=0;else{const d=o-a;switch(u=h<=.5?d/(o+a):d/(2-o-a),o){case i:l=(r-s)/d+(r0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const u in l)l[u]!==void 0&&(e[u]=l[u]);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 u=i[l];e.data.attributes[l]=u.toJSON(e.data)}const r={};let s=!1;for(const l in this.morphAttributes){const u=this.morphAttributes[l],h=[];for(let d=0,p=u.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 u in r){const h=r[u];this.setAttribute(u,h.clone(t))}const s=e.morphAttributes;for(const u in s){const h=[],d=s[u];for(let p=0,m=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))||(mC.copy(s).invert(),ns.copy(e.ray).applyMatrix4(mC),i.boundingBox!==null&&ns.intersectsBox(i.boundingBox)===!1))return;let o;const a=i.index,l=i.attributes.position,u=i.attributes.uv,h=i.attributes.uv2,d=i.groups,p=i.drawRange;if(a!==null)if(Array.isArray(r))for(let m=0,y=d.length;mt.far?null:{distance:u,point:pp.clone(),object:n}}function mp(n,e,t,i,r,s,o,a,l){n.getVertexPosition(o,Wu),n.getVertexPosition(a,ju),n.getVertexPosition(l,Ju);const u=HN(n,e,t,i,Wu,ju,Ju,qy);if(u){r&&(fp.fromBufferAttribute(r,o),hp.fromBufferAttribute(r,a),dp.fromBufferAttribute(r,l),u.uv=dr.getUV(qy,Wu,ju,Ju,fp,hp,dp,new pe)),s&&(fp.fromBufferAttribute(s,o),hp.fromBufferAttribute(s,a),dp.fromBufferAttribute(s,l),u.uv2=dr.getUV(qy,Wu,ju,Ju,fp,hp,dp,new pe));const h={a:o,b:a,c:l,normal:new F,materialIndex:0};dr.getNormal(Wu,ju,Ju,h.normal),u.face=h}return u}class oa extends ft{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=[],u=[],h=[],d=[];let p=0,m=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 Ve(u,3)),this.setAttribute("normal",new Ve(h,3)),this.setAttribute("uv",new Ve(d,2));function y(v,x,A,_,w,M,b,P,R,E,B){const I=M/R,z=b/E,Z=M/2,J=b/2,W=P/2,Q=R+1,re=E+1;let ce=0,L=0;const V=new F;for(let H=0;H0?1:-1,h.push(V.x,V.y,V.z),d.push(G/R),d.push(1-H/E),ce+=1}}for(let H=0;H0&&(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 yh extends Mt{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 Jt extends yh{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=$f*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(tl*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return $f*2*Math.atan(Math.tan(tl*.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(tl*.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,u=o.fullHeight;s+=o.offsetX*r/l,t-=o.offsetY*i/u,r*=o.width/l,i*=o.height/u}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 Jl=-90,Xl=1;class iA extends Mt{constructor(e,t,i){super(),this.type="CubeCamera",this.renderTarget=i;const r=new Jt(Jl,Xl,e,t);r.layers=this.layers,r.up.set(0,1,0),r.lookAt(1,0,0),this.add(r);const s=new Jt(Jl,Xl,e,t);s.layers=this.layers,s.up.set(0,1,0),s.lookAt(-1,0,0),this.add(s);const o=new Jt(Jl,Xl,e,t);o.layers=this.layers,o.up.set(0,0,-1),o.lookAt(0,1,0),this.add(o);const a=new Jt(Jl,Xl,e,t);a.layers=this.layers,a.up.set(0,0,1),a.lookAt(0,-1,0),this.add(a);const l=new Jt(Jl,Xl,e,t);l.layers=this.layers,l.up.set(0,1,0),l.lookAt(0,0,1),this.add(l);const u=new Jt(Jl,Xl,e,t);u.layers=this.layers,u.up.set(0,1,0),u.lookAt(0,0,-1),this.add(u)}update(e,t){this.parent===null&&this.updateMatrixWorld();const i=this.renderTarget,[r,s,o,a,l,u]=this.children,h=e.getRenderTarget(),d=e.toneMapping,p=e.xr.enabled;e.toneMapping=zr,e.xr.enabled=!1;const m=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=m,e.setRenderTarget(i,5),e.render(t,u),e.setRenderTarget(h),e.toneMapping=d,e.xr.enabled=p,i.texture.needsPMREMUpdate=!0}}class vh extends $t{constructor(e,t,i,r,s,o,a,l,u,h){e=e!==void 0?e:[],t=t!==void 0?t:Jo,super(e,t,i,r,s,o,a,l,u,h),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class rA extends Gr{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 vh(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:nn}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 ps extends Pn{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=WN,this.fragmentShader=jN,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,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=jc(e.uniforms),this.uniformsGroups=VN(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 gh extends Mt{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 Jt extends gh{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=$f*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(tl*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return $f*2*Math.atan(Math.tan(tl*.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(tl*.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,u=o.fullHeight;s+=o.offsetX*r/l,t-=o.offsetY*i/u,r*=o.width/l,i*=o.height/u}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 Jl=-90,Xl=1;class nA extends Mt{constructor(e,t,i){super(),this.type="CubeCamera",this.renderTarget=i;const r=new Jt(Jl,Xl,e,t);r.layers=this.layers,r.up.set(0,1,0),r.lookAt(1,0,0),this.add(r);const s=new Jt(Jl,Xl,e,t);s.layers=this.layers,s.up.set(0,1,0),s.lookAt(-1,0,0),this.add(s);const o=new Jt(Jl,Xl,e,t);o.layers=this.layers,o.up.set(0,0,-1),o.lookAt(0,1,0),this.add(o);const a=new Jt(Jl,Xl,e,t);a.layers=this.layers,a.up.set(0,0,1),a.lookAt(0,-1,0),this.add(a);const l=new Jt(Jl,Xl,e,t);l.layers=this.layers,l.up.set(0,1,0),l.lookAt(0,0,1),this.add(l);const u=new Jt(Jl,Xl,e,t);u.layers=this.layers,u.up.set(0,1,0),u.lookAt(0,0,-1),this.add(u)}update(e,t){this.parent===null&&this.updateMatrixWorld();const i=this.renderTarget,[r,s,o,a,l,u]=this.children,h=e.getRenderTarget(),d=e.toneMapping,p=e.xr.enabled;e.toneMapping=zr,e.xr.enabled=!1;const m=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=m,e.setRenderTarget(i,5),e.render(t,u),e.setRenderTarget(h),e.toneMapping=d,e.xr.enabled=p,i.texture.needsPMREMUpdate=!0}}class yh extends $t{constructor(e,t,i,r,s,o,a,l,u,h){e=e!==void 0?e:[],t=t!==void 0?t:Jo,super(e,t,i,r,s,o,a,l,u,h),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class iA extends Gr{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 yh(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:nn}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; @@ -107,28 +107,28 @@ Error generating stack: `+s.message+` gl_FragColor = texture2D( tEquirect, sampleUV ); } - `},r=new oa(5,5,5),s=new ps({name:"CubemapFromEquirect",uniforms:jc(i.uniforms),vertexShader:i.vertexShader,fragmentShader:i.fragmentShader,side:Li,blending:Ws});s.uniforms.tEquirect.value=t;const o=new In(r,s),a=t.minFilter;return t.minFilter===ds&&(t.minFilter=nn),new iA(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 ev=new F,QN=new F,ZN=new Kn;class Ds{constructor(e=new F(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=ev.subVectors(i,t).cross(QN.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(ev),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||ZN.getNormalMatrix(e),r=this.coplanarPoint(ev).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 Yl=new sa,yp=new F;class Fg{constructor(e=new Ds,t=new Ds,i=new Ds,r=new Ds,s=new Ds,o=new Ds){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],u=i[5],h=i[6],d=i[7],p=i[8],m=i[9],y=i[10],v=i[11],x=i[12],A=i[13],_=i[14],w=i[15];return t[0].setComponents(a-r,d-l,v-p,w-x).normalize(),t[1].setComponents(a+r,d+l,v+p,w+x).normalize(),t[2].setComponents(a+s,d+u,v+m,w+A).normalize(),t[3].setComponents(a-s,d-u,v-m,w-A).normalize(),t[4].setComponents(a-o,d-h,v-y,w-_).normalize(),t[5].setComponents(a+o,d+h,v+y,w+_).normalize(),this}intersectsObject(e){const t=e.geometry;return t.boundingSphere===null&&t.computeBoundingSphere(),Yl.copy(t.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(Yl)}intersectsSprite(e){return Yl.center.set(0,0,0),Yl.radius=.7071067811865476,Yl.applyMatrix4(e.matrixWorld),this.intersectsSphere(Yl)}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,yp.y=r.normal.y>0?e.max.y:e.min.y,yp.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(yp)<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 UP(){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 qN(n,e){const t=e.isWebGL2,i=new WeakMap;function r(u,h){const d=u.array,p=u.usage,m=n.createBuffer();n.bindBuffer(h,m),n.bufferData(h,d,p),u.onUploadCallback();let y;if(d instanceof Float32Array)y=5126;else if(d instanceof Uint16Array)if(u.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:m,type:y,bytesPerElement:d.BYTES_PER_ELEMENT,version:u.version}}function s(u,h,d){const p=h.array,m=h.updateRange;n.bindBuffer(d,u),m.count===-1?n.bufferSubData(d,0,p):(t?n.bufferSubData(d,m.offset*p.BYTES_PER_ELEMENT,p,m.offset,m.count):n.bufferSubData(d,m.offset*p.BYTES_PER_ELEMENT,p.subarray(m.offset,m.offset+m.count)),m.count=-1),h.onUploadCallback()}function o(u){return u.isInterleavedBufferAttribute&&(u=u.data),i.get(u)}function a(u){u.isInterleavedBufferAttribute&&(u=u.data);const h=i.get(u);h&&(n.deleteBuffer(h.buffer),i.delete(u))}function l(u,h){if(u.isGLBufferAttribute){const p=i.get(u);(!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||XN.getNormalMatrix(e),r=this.coplanarPoint($y).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 Yl=new sa,gp=new F;class Dg{constructor(e=new Ds,t=new Ds,i=new Ds,r=new Ds,s=new Ds,o=new Ds){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],u=i[5],h=i[6],d=i[7],p=i[8],m=i[9],y=i[10],v=i[11],x=i[12],A=i[13],_=i[14],w=i[15];return t[0].setComponents(a-r,d-l,v-p,w-x).normalize(),t[1].setComponents(a+r,d+l,v+p,w+x).normalize(),t[2].setComponents(a+s,d+u,v+m,w+A).normalize(),t[3].setComponents(a-s,d-u,v-m,w-A).normalize(),t[4].setComponents(a-o,d-h,v-y,w-_).normalize(),t[5].setComponents(a+o,d+h,v+y,w+_).normalize(),this}intersectsObject(e){const t=e.geometry;return t.boundingSphere===null&&t.computeBoundingSphere(),Yl.copy(t.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(Yl)}intersectsSprite(e){return Yl.center.set(0,0,0),Yl.radius=.7071067811865476,Yl.applyMatrix4(e.matrixWorld),this.intersectsSphere(Yl)}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,gp.y=r.normal.y>0?e.max.y:e.min.y,gp.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(gp)<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 OP(){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 YN(n,e){const t=e.isWebGL2,i=new WeakMap;function r(u,h){const d=u.array,p=u.usage,m=n.createBuffer();n.bindBuffer(h,m),n.bufferData(h,d,p),u.onUploadCallback();let y;if(d instanceof Float32Array)y=5126;else if(d instanceof Uint16Array)if(u.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:m,type:y,bytesPerElement:d.BYTES_PER_ELEMENT,version:u.version}}function s(u,h,d){const p=h.array,m=h.updateRange;n.bindBuffer(d,u),m.count===-1?n.bufferSubData(d,0,p):(t?n.bufferSubData(d,m.offset*p.BYTES_PER_ELEMENT,p,m.offset,m.count):n.bufferSubData(d,m.offset*p.BYTES_PER_ELEMENT,p.subarray(m.offset,m.offset+m.count)),m.count=-1),h.onUploadCallback()}function o(u){return u.isInterleavedBufferAttribute&&(u=u.data),i.get(u)}function a(u){u.isInterleavedBufferAttribute&&(u=u.data);const h=i.get(u);h&&(n.deleteBuffer(h.buffer),i.delete(u))}function l(u,h){if(u.isGLBufferAttribute){const p=i.get(u);(!p||p.version 0 +#endif`,oO=`#if NUM_CLIPPING_PLANES > 0 vec4 plane; #pragma unroll_loop_start for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { @@ -368,26 +368,26 @@ vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 no #pragma unroll_loop_end if ( clipped ) discard; #endif -#endif`,fO=`#if NUM_CLIPPING_PLANES > 0 +#endif`,aO=`#if NUM_CLIPPING_PLANES > 0 varying vec3 vClipPosition; uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; -#endif`,hO=`#if NUM_CLIPPING_PLANES > 0 +#endif`,lO=`#if NUM_CLIPPING_PLANES > 0 varying vec3 vClipPosition; -#endif`,dO=`#if NUM_CLIPPING_PLANES > 0 +#endif`,cO=`#if NUM_CLIPPING_PLANES > 0 vClipPosition = - mvPosition.xyz; -#endif`,pO=`#if defined( USE_COLOR_ALPHA ) +#endif`,uO=`#if defined( USE_COLOR_ALPHA ) diffuseColor *= vColor; #elif defined( USE_COLOR ) diffuseColor.rgb *= vColor; -#endif`,mO=`#if defined( USE_COLOR_ALPHA ) +#endif`,fO=`#if defined( USE_COLOR_ALPHA ) varying vec4 vColor; #elif defined( USE_COLOR ) varying vec3 vColor; -#endif`,gO=`#if defined( USE_COLOR_ALPHA ) +#endif`,hO=`#if defined( USE_COLOR_ALPHA ) varying vec4 vColor; #elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) varying vec3 vColor; -#endif`,yO=`#if defined( USE_COLOR_ALPHA ) +#endif`,dO=`#if defined( USE_COLOR_ALPHA ) vColor = vec4( 1.0 ); #elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) vColor = vec3( 1.0 ); @@ -397,7 +397,7 @@ vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 no #endif #ifdef USE_INSTANCING_COLOR vColor.xyz *= instanceColor.xyz; -#endif`,vO=`#define PI 3.141592653589793 +#endif`,pO=`#define PI 3.141592653589793 #define PI2 6.283185307179586 #define PI_HALF 1.5707963267948966 #define RECIPROCAL_PI 0.3183098861837907 @@ -469,7 +469,7 @@ vec2 equirectUv( in vec3 dir ) { float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5; float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5; return vec2( u, v ); -}`,xO=`#ifdef ENVMAP_TYPE_CUBE_UV +}`,mO=`#ifdef ENVMAP_TYPE_CUBE_UV #define cubeUV_minMipLevel 4.0 #define cubeUV_minTileSize 16.0 float getFace( vec3 direction ) { @@ -567,7 +567,7 @@ vec2 equirectUv( in vec3 dir ) { return vec4( mix( color0, color1, mipF ), 1.0 ); } } -#endif`,_O=`vec3 transformedNormal = objectNormal; +#endif`,gO=`vec3 transformedNormal = objectNormal; #ifdef USE_INSTANCING mat3 m = mat3( instanceMatrix ); transformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) ); @@ -582,23 +582,23 @@ transformedNormal = normalMatrix * transformedNormal; #ifdef FLIP_SIDED transformedTangent = - transformedTangent; #endif -#endif`,AO=`#ifdef USE_DISPLACEMENTMAP +#endif`,yO=`#ifdef USE_DISPLACEMENTMAP uniform sampler2D displacementMap; uniform float displacementScale; uniform float displacementBias; -#endif`,wO=`#ifdef USE_DISPLACEMENTMAP +#endif`,vO=`#ifdef USE_DISPLACEMENTMAP transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias ); -#endif`,SO=`#ifdef USE_EMISSIVEMAP +#endif`,xO=`#ifdef USE_EMISSIVEMAP vec4 emissiveColor = texture2D( emissiveMap, vUv ); totalEmissiveRadiance *= emissiveColor.rgb; -#endif`,MO=`#ifdef USE_EMISSIVEMAP +#endif`,_O=`#ifdef USE_EMISSIVEMAP uniform sampler2D emissiveMap; -#endif`,CO="gl_FragColor = linearToOutputTexel( gl_FragColor );",EO=`vec4 LinearToLinear( in vec4 value ) { +#endif`,AO="gl_FragColor = linearToOutputTexel( gl_FragColor );",wO=`vec4 LinearToLinear( in vec4 value ) { return value; } vec4 LinearTosRGB( in vec4 value ) { return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a ); -}`,bO=`#ifdef USE_ENVMAP +}`,SO=`#ifdef USE_ENVMAP #ifdef ENV_WORLDPOS vec3 cameraToFrag; if ( isOrthographic ) { @@ -627,7 +627,7 @@ vec4 LinearTosRGB( in vec4 value ) { #elif defined( ENVMAP_BLENDING_ADD ) outgoingLight += envColor.xyz * specularStrength * reflectivity; #endif -#endif`,TO=`#ifdef USE_ENVMAP +#endif`,MO=`#ifdef USE_ENVMAP uniform float envMapIntensity; uniform float flipEnvMap; #ifdef ENVMAP_TYPE_CUBE @@ -636,7 +636,7 @@ vec4 LinearTosRGB( in vec4 value ) { uniform sampler2D envMap; #endif -#endif`,PO=`#ifdef USE_ENVMAP +#endif`,CO=`#ifdef USE_ENVMAP uniform float reflectivity; #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) #define ENV_WORLDPOS @@ -647,7 +647,7 @@ vec4 LinearTosRGB( in vec4 value ) { #else varying vec3 vReflect; #endif -#endif`,BO=`#ifdef USE_ENVMAP +#endif`,EO=`#ifdef USE_ENVMAP #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) #define ENV_WORLDPOS #endif @@ -658,7 +658,7 @@ vec4 LinearTosRGB( in vec4 value ) { varying vec3 vReflect; uniform float refractionRatio; #endif -#endif`,RO=`#ifdef USE_ENVMAP +#endif`,bO=`#ifdef USE_ENVMAP #ifdef ENV_WORLDPOS vWorldPosition = worldPosition.xyz; #else @@ -675,18 +675,18 @@ vec4 LinearTosRGB( in vec4 value ) { vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); #endif #endif -#endif`,LO=`#ifdef USE_FOG +#endif`,TO=`#ifdef USE_FOG vFogDepth = - mvPosition.z; -#endif`,IO=`#ifdef USE_FOG +#endif`,PO=`#ifdef USE_FOG varying float vFogDepth; -#endif`,DO=`#ifdef USE_FOG +#endif`,BO=`#ifdef USE_FOG #ifdef FOG_EXP2 float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth ); #else float fogFactor = smoothstep( fogNear, fogFar, vFogDepth ); #endif gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); -#endif`,FO=`#ifdef USE_FOG +#endif`,RO=`#ifdef USE_FOG uniform vec3 fogColor; varying float vFogDepth; #ifdef FOG_EXP2 @@ -695,7 +695,7 @@ vec4 LinearTosRGB( in vec4 value ) { uniform float fogNear; uniform float fogFar; #endif -#endif`,kO=`#ifdef USE_GRADIENTMAP +#endif`,LO=`#ifdef USE_GRADIENTMAP uniform sampler2D gradientMap; #endif vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { @@ -707,16 +707,16 @@ vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { vec2 fw = fwidth( coord ) * 0.5; return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) ); #endif -}`,NO=`#ifdef USE_LIGHTMAP +}`,IO=`#ifdef USE_LIGHTMAP vec4 lightMapTexel = texture2D( lightMap, vUv2 ); vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; reflectedLight.indirectDiffuse += lightMapIrradiance; -#endif`,OO=`#ifdef USE_LIGHTMAP +#endif`,DO=`#ifdef USE_LIGHTMAP uniform sampler2D lightMap; uniform float lightMapIntensity; -#endif`,zO=`LambertMaterial material; +#endif`,FO=`LambertMaterial material; material.diffuseColor = diffuseColor.rgb; -material.specularStrength = specularStrength;`,UO=`varying vec3 vViewPosition; +material.specularStrength = specularStrength;`,kO=`varying vec3 vViewPosition; struct LambertMaterial { vec3 diffuseColor; float specularStrength; @@ -730,7 +730,7 @@ void RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in GeometricCon reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_Lambert -#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,GO=`uniform bool receiveShadow; +#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,NO=`uniform bool receiveShadow; uniform vec3 ambientLightColor; uniform vec3 lightProbe[ 9 ]; vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) { @@ -851,7 +851,7 @@ float getSpotAttenuation( const in float coneCosine, const in float penumbraCosi vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); return irradiance; } -#endif`,HO=`#if defined( USE_ENVMAP ) +#endif`,OO=`#if defined( USE_ENVMAP ) vec3 getIBLIrradiance( const in vec3 normal ) { #if defined( ENVMAP_TYPE_CUBE_UV ) vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); @@ -872,8 +872,8 @@ float getSpotAttenuation( const in float coneCosine, const in float penumbraCosi return vec3( 0.0 ); #endif } -#endif`,VO=`ToonMaterial material; -material.diffuseColor = diffuseColor.rgb;`,WO=`varying vec3 vViewPosition; +#endif`,zO=`ToonMaterial material; +material.diffuseColor = diffuseColor.rgb;`,UO=`varying vec3 vViewPosition; struct ToonMaterial { vec3 diffuseColor; }; @@ -885,11 +885,11 @@ void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContex reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_Toon -#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,jO=`BlinnPhongMaterial material; +#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,GO=`BlinnPhongMaterial material; material.diffuseColor = diffuseColor.rgb; material.specularColor = specular; material.specularShininess = shininess; -material.specularStrength = specularStrength;`,JO=`varying vec3 vViewPosition; +material.specularStrength = specularStrength;`,HO=`varying vec3 vViewPosition; struct BlinnPhongMaterial { vec3 diffuseColor; vec3 specularColor; @@ -906,7 +906,7 @@ void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in Geometric reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_BlinnPhong -#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,XO=`PhysicalMaterial material; +#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,VO=`PhysicalMaterial material; material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor ); vec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) ); float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); @@ -970,7 +970,7 @@ material.roughness = min( material.roughness, 1.0 ); #ifdef USE_SHEENROUGHNESSMAP material.sheenRoughness *= texture2D( sheenRoughnessMap, vUv ).a; #endif -#endif`,YO=`struct PhysicalMaterial { +#endif`,WO=`struct PhysicalMaterial { vec3 diffuseColor; float roughness; vec3 specularColor; @@ -1119,7 +1119,7 @@ void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradia #define RE_IndirectSpecular RE_IndirectSpecular_Physical float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); -}`,KO=` +}`,jO=` GeometricContext geometry; geometry.position = - vViewPosition; geometry.normal = normal; @@ -1232,7 +1232,7 @@ IncidentLight directLight; #if defined( RE_IndirectSpecular ) vec3 radiance = vec3( 0.0 ); vec3 clearcoatRadiance = vec3( 0.0 ); -#endif`,QO=`#if defined( RE_IndirectDiffuse ) +#endif`,JO=`#if defined( RE_IndirectDiffuse ) #ifdef USE_LIGHTMAP vec4 lightMapTexel = texture2D( lightMap, vUv2 ); vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; @@ -1247,25 +1247,25 @@ IncidentLight directLight; #ifdef USE_CLEARCOAT clearcoatRadiance += getIBLRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness ); #endif -#endif`,ZO=`#if defined( RE_IndirectDiffuse ) +#endif`,XO=`#if defined( RE_IndirectDiffuse ) RE_IndirectDiffuse( irradiance, geometry, material, reflectedLight ); #endif #if defined( RE_IndirectSpecular ) RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight ); -#endif`,qO=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) +#endif`,YO=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) gl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; -#endif`,$O=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) +#endif`,KO=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) uniform float logDepthBufFC; varying float vFragDepth; varying float vIsPerspective; -#endif`,e4=`#ifdef USE_LOGDEPTHBUF +#endif`,QO=`#ifdef USE_LOGDEPTHBUF #ifdef USE_LOGDEPTHBUF_EXT varying float vFragDepth; varying float vIsPerspective; #else uniform float logDepthBufFC; #endif -#endif`,t4=`#ifdef USE_LOGDEPTHBUF +#endif`,ZO=`#ifdef USE_LOGDEPTHBUF #ifdef USE_LOGDEPTHBUF_EXT vFragDepth = 1.0 + gl_Position.w; vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); @@ -1275,15 +1275,15 @@ IncidentLight directLight; gl_Position.z *= gl_Position.w; } #endif -#endif`,n4=`#ifdef USE_MAP +#endif`,qO=`#ifdef USE_MAP vec4 sampledDiffuseColor = texture2D( map, vUv ); #ifdef DECODE_VIDEO_TEXTURE sampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w ); #endif diffuseColor *= sampledDiffuseColor; -#endif`,i4=`#ifdef USE_MAP +#endif`,$O=`#ifdef USE_MAP uniform sampler2D map; -#endif`,r4=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) +#endif`,e4=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy; #endif #ifdef USE_MAP @@ -1291,7 +1291,7 @@ IncidentLight directLight; #endif #ifdef USE_ALPHAMAP diffuseColor.a *= texture2D( alphaMap, uv ).g; -#endif`,s4=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) +#endif`,t4=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) uniform mat3 uvTransform; #endif #ifdef USE_MAP @@ -1299,13 +1299,13 @@ IncidentLight directLight; #endif #ifdef USE_ALPHAMAP uniform sampler2D alphaMap; -#endif`,o4=`float metalnessFactor = metalness; +#endif`,n4=`float metalnessFactor = metalness; #ifdef USE_METALNESSMAP vec4 texelMetalness = texture2D( metalnessMap, vUv ); metalnessFactor *= texelMetalness.b; -#endif`,a4=`#ifdef USE_METALNESSMAP +#endif`,i4=`#ifdef USE_METALNESSMAP uniform sampler2D metalnessMap; -#endif`,l4=`#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE ) +#endif`,r4=`#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE ) vColor *= morphTargetBaseInfluence; for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { #if defined( USE_COLOR_ALPHA ) @@ -1314,7 +1314,7 @@ IncidentLight directLight; if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; #endif } -#endif`,c4=`#ifdef USE_MORPHNORMALS +#endif`,s4=`#ifdef USE_MORPHNORMALS objectNormal *= morphTargetBaseInfluence; #ifdef MORPHTARGETS_TEXTURE for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { @@ -1326,7 +1326,7 @@ IncidentLight directLight; objectNormal += morphNormal2 * morphTargetInfluences[ 2 ]; objectNormal += morphNormal3 * morphTargetInfluences[ 3 ]; #endif -#endif`,u4=`#ifdef USE_MORPHTARGETS +#endif`,o4=`#ifdef USE_MORPHTARGETS uniform float morphTargetBaseInfluence; #ifdef MORPHTARGETS_TEXTURE uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; @@ -1346,7 +1346,7 @@ IncidentLight directLight; uniform float morphTargetInfluences[ 4 ]; #endif #endif -#endif`,f4=`#ifdef USE_MORPHTARGETS +#endif`,a4=`#ifdef USE_MORPHTARGETS transformed *= morphTargetBaseInfluence; #ifdef MORPHTARGETS_TEXTURE for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { @@ -1364,7 +1364,7 @@ IncidentLight directLight; transformed += morphTarget7 * morphTargetInfluences[ 7 ]; #endif #endif -#endif`,h4=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; +#endif`,l4=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; #ifdef FLAT_SHADED vec3 fdx = dFdx( vViewPosition ); vec3 fdy = dFdy( vViewPosition ); @@ -1386,7 +1386,7 @@ IncidentLight directLight; #endif #endif #endif -vec3 geometryNormal = normal;`,d4=`#ifdef OBJECTSPACE_NORMALMAP +vec3 geometryNormal = normal;`,c4=`#ifdef OBJECTSPACE_NORMALMAP normal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0; #ifdef FLIP_SIDED normal = - normal; @@ -1405,25 +1405,25 @@ vec3 geometryNormal = normal;`,d4=`#ifdef OBJECTSPACE_NORMALMAP #endif #elif defined( USE_BUMPMAP ) normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); -#endif`,p4=`#ifndef FLAT_SHADED +#endif`,u4=`#ifndef FLAT_SHADED varying vec3 vNormal; #ifdef USE_TANGENT varying vec3 vTangent; varying vec3 vBitangent; #endif -#endif`,m4=`#ifndef FLAT_SHADED +#endif`,f4=`#ifndef FLAT_SHADED varying vec3 vNormal; #ifdef USE_TANGENT varying vec3 vTangent; varying vec3 vBitangent; #endif -#endif`,g4=`#ifndef FLAT_SHADED +#endif`,h4=`#ifndef FLAT_SHADED vNormal = normalize( transformedNormal ); #ifdef USE_TANGENT vTangent = normalize( transformedTangent ); vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); #endif -#endif`,y4=`#ifdef USE_NORMALMAP +#endif`,d4=`#ifdef USE_NORMALMAP uniform sampler2D normalMap; uniform vec2 normalScale; #endif @@ -1445,9 +1445,9 @@ vec3 geometryNormal = normal;`,d4=`#ifdef OBJECTSPACE_NORMALMAP float scale = ( det == 0.0 ) ? 0.0 : faceDirection * inversesqrt( det ); return normalize( T * ( mapN.x * scale ) + B * ( mapN.y * scale ) + N * mapN.z ); } -#endif`,v4=`#ifdef USE_CLEARCOAT +#endif`,p4=`#ifdef USE_CLEARCOAT vec3 clearcoatNormal = geometryNormal; -#endif`,x4=`#ifdef USE_CLEARCOAT_NORMALMAP +#endif`,m4=`#ifdef USE_CLEARCOAT_NORMALMAP vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0; clearcoatMapN.xy *= clearcoatNormalScale; #ifdef USE_TANGENT @@ -1455,7 +1455,7 @@ vec3 geometryNormal = normal;`,d4=`#ifdef OBJECTSPACE_NORMALMAP #else clearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN, faceDirection ); #endif -#endif`,_4=`#ifdef USE_CLEARCOATMAP +#endif`,g4=`#ifdef USE_CLEARCOATMAP uniform sampler2D clearcoatMap; #endif #ifdef USE_CLEARCOAT_ROUGHNESSMAP @@ -1464,18 +1464,18 @@ vec3 geometryNormal = normal;`,d4=`#ifdef OBJECTSPACE_NORMALMAP #ifdef USE_CLEARCOAT_NORMALMAP uniform sampler2D clearcoatNormalMap; uniform vec2 clearcoatNormalScale; -#endif`,A4=`#ifdef USE_IRIDESCENCEMAP +#endif`,y4=`#ifdef USE_IRIDESCENCEMAP uniform sampler2D iridescenceMap; #endif #ifdef USE_IRIDESCENCE_THICKNESSMAP uniform sampler2D iridescenceThicknessMap; -#endif`,w4=`#ifdef OPAQUE +#endif`,v4=`#ifdef OPAQUE diffuseColor.a = 1.0; #endif #ifdef USE_TRANSMISSION diffuseColor.a *= material.transmissionAlpha + 0.1; #endif -gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,S4=`vec3 packNormalToRGB( const in vec3 normal ) { +gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,x4=`vec3 packNormalToRGB( const in vec3 normal ) { return normalize( normal ) * 0.5 + 0.5; } vec3 unpackRGBToNormal( const in vec3 rgb ) { @@ -1516,29 +1516,29 @@ float viewZToPerspectiveDepth( const in float viewZ, const in float near, const } float perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) { return ( near * far ) / ( ( far - near ) * invClipZ - far ); -}`,M4=`#ifdef PREMULTIPLIED_ALPHA +}`,_4=`#ifdef PREMULTIPLIED_ALPHA gl_FragColor.rgb *= gl_FragColor.a; -#endif`,C4=`vec4 mvPosition = vec4( transformed, 1.0 ); +#endif`,A4=`vec4 mvPosition = vec4( transformed, 1.0 ); #ifdef USE_INSTANCING mvPosition = instanceMatrix * mvPosition; #endif mvPosition = modelViewMatrix * mvPosition; -gl_Position = projectionMatrix * mvPosition;`,E4=`#ifdef DITHERING +gl_Position = projectionMatrix * mvPosition;`,w4=`#ifdef DITHERING gl_FragColor.rgb = dithering( gl_FragColor.rgb ); -#endif`,b4=`#ifdef DITHERING +#endif`,S4=`#ifdef DITHERING vec3 dithering( vec3 color ) { float grid_position = rand( gl_FragCoord.xy ); vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 ); dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position ); return color + dither_shift_RGB; } -#endif`,T4=`float roughnessFactor = roughness; +#endif`,M4=`float roughnessFactor = roughness; #ifdef USE_ROUGHNESSMAP vec4 texelRoughness = texture2D( roughnessMap, vUv ); roughnessFactor *= texelRoughness.g; -#endif`,P4=`#ifdef USE_ROUGHNESSMAP +#endif`,C4=`#ifdef USE_ROUGHNESSMAP uniform sampler2D roughnessMap; -#endif`,B4=`#if NUM_SPOT_LIGHT_COORDS > 0 +#endif`,E4=`#if NUM_SPOT_LIGHT_COORDS > 0 varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; #endif #if NUM_SPOT_LIGHT_MAPS > 0 @@ -1715,7 +1715,7 @@ gl_Position = projectionMatrix * mvPosition;`,E4=`#ifdef DITHERING return texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ); #endif } -#endif`,R4=`#if NUM_SPOT_LIGHT_COORDS > 0 +#endif`,b4=`#if NUM_SPOT_LIGHT_COORDS > 0 uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; #endif @@ -1753,7 +1753,7 @@ gl_Position = projectionMatrix * mvPosition;`,E4=`#ifdef DITHERING }; uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; #endif -#endif`,L4=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) +#endif`,T4=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); vec4 shadowWorldPosition; #endif @@ -1785,7 +1785,7 @@ gl_Position = projectionMatrix * mvPosition;`,E4=`#ifdef DITHERING vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition; } #pragma unroll_loop_end -#endif`,I4=`float getShadowMask() { +#endif`,P4=`float getShadowMask() { float shadow = 1.0; #ifdef USE_SHADOWMAP #if NUM_DIR_LIGHT_SHADOWS > 0 @@ -1817,12 +1817,12 @@ gl_Position = projectionMatrix * mvPosition;`,E4=`#ifdef DITHERING #endif #endif return shadow; -}`,D4=`#ifdef USE_SKINNING +}`,B4=`#ifdef USE_SKINNING mat4 boneMatX = getBoneMatrix( skinIndex.x ); mat4 boneMatY = getBoneMatrix( skinIndex.y ); mat4 boneMatZ = getBoneMatrix( skinIndex.z ); mat4 boneMatW = getBoneMatrix( skinIndex.w ); -#endif`,F4=`#ifdef USE_SKINNING +#endif`,R4=`#ifdef USE_SKINNING uniform mat4 bindMatrix; uniform mat4 bindMatrixInverse; uniform highp sampler2D boneTexture; @@ -1841,7 +1841,7 @@ gl_Position = projectionMatrix * mvPosition;`,E4=`#ifdef DITHERING mat4 bone = mat4( v1, v2, v3, v4 ); return bone; } -#endif`,k4=`#ifdef USE_SKINNING +#endif`,L4=`#ifdef USE_SKINNING vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); vec4 skinned = vec4( 0.0 ); skinned += boneMatX * skinVertex * skinWeight.x; @@ -1849,7 +1849,7 @@ gl_Position = projectionMatrix * mvPosition;`,E4=`#ifdef DITHERING skinned += boneMatZ * skinVertex * skinWeight.z; skinned += boneMatW * skinVertex * skinWeight.w; transformed = ( bindMatrixInverse * skinned ).xyz; -#endif`,N4=`#ifdef USE_SKINNING +#endif`,I4=`#ifdef USE_SKINNING mat4 skinMatrix = mat4( 0.0 ); skinMatrix += skinWeight.x * boneMatX; skinMatrix += skinWeight.y * boneMatY; @@ -1860,17 +1860,17 @@ gl_Position = projectionMatrix * mvPosition;`,E4=`#ifdef DITHERING #ifdef USE_TANGENT objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; #endif -#endif`,O4=`float specularStrength; +#endif`,D4=`float specularStrength; #ifdef USE_SPECULARMAP vec4 texelSpecular = texture2D( specularMap, vUv ); specularStrength = texelSpecular.r; #else specularStrength = 1.0; -#endif`,z4=`#ifdef USE_SPECULARMAP +#endif`,F4=`#ifdef USE_SPECULARMAP uniform sampler2D specularMap; -#endif`,U4=`#if defined( TONE_MAPPING ) +#endif`,k4=`#if defined( TONE_MAPPING ) gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); -#endif`,G4=`#ifndef saturate +#endif`,N4=`#ifndef saturate #define saturate( a ) clamp( a, 0.0, 1.0 ) #endif uniform float toneMappingExposure; @@ -1906,7 +1906,7 @@ vec3 ACESFilmicToneMapping( vec3 color ) { color = ACESOutputMat * color; return saturate( color ); } -vec3 CustomToneMapping( vec3 color ) { return color; }`,H4=`#ifdef USE_TRANSMISSION +vec3 CustomToneMapping( vec3 color ) { return color; }`,O4=`#ifdef USE_TRANSMISSION material.transmission = transmission; material.transmissionAlpha = 1.0; material.thickness = thickness; @@ -1927,7 +1927,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,H4=`#ifdef USE_TRANSMISS material.attenuationColor, material.attenuationDistance ); material.transmissionAlpha = mix( material.transmissionAlpha, transmission.a, material.transmission ); totalDiffuse = mix( totalDiffuse, transmission.rgb, material.transmission ); -#endif`,V4=`#ifdef USE_TRANSMISSION +#endif`,z4=`#ifdef USE_TRANSMISSION uniform float transmission; uniform float thickness; uniform float attenuationDistance; @@ -2034,37 +2034,37 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,H4=`#ifdef USE_TRANSMISS vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness ); return vec4( ( 1.0 - F ) * attenuatedColor * diffuseColor, transmittedLight.a ); } -#endif`,W4=`#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) ) +#endif`,U4=`#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) ) varying vec2 vUv; -#endif`,j4=`#ifdef USE_UV +#endif`,G4=`#ifdef USE_UV #ifdef UVS_VERTEX_ONLY vec2 vUv; #else varying vec2 vUv; #endif uniform mat3 uvTransform; -#endif`,J4=`#ifdef USE_UV +#endif`,H4=`#ifdef USE_UV vUv = ( uvTransform * vec3( uv, 1 ) ).xy; -#endif`,X4=`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP ) +#endif`,V4=`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP ) varying vec2 vUv2; -#endif`,Y4=`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP ) +#endif`,W4=`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP ) attribute vec2 uv2; varying vec2 vUv2; uniform mat3 uv2Transform; -#endif`,K4=`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP ) +#endif`,j4=`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP ) vUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy; -#endif`,Q4=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 +#endif`,J4=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 vec4 worldPosition = vec4( transformed, 1.0 ); #ifdef USE_INSTANCING worldPosition = instanceMatrix * worldPosition; #endif worldPosition = modelMatrix * worldPosition; -#endif`;const Z4=`varying vec2 vUv; +#endif`;const X4=`varying vec2 vUv; uniform mat3 uvTransform; void main() { vUv = ( uvTransform * vec3( uv, 1 ) ).xy; gl_Position = vec4( position.xy, 1.0, 1.0 ); -}`,q4=`uniform sampler2D t2D; +}`,Y4=`uniform sampler2D t2D; uniform float backgroundIntensity; varying vec2 vUv; void main() { @@ -2076,14 +2076,14 @@ void main() { gl_FragColor = texColor; #include #include -}`,$4=`varying vec3 vWorldDirection; +}`,K4=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include gl_Position.z = gl_Position.w; -}`,ez=`#ifdef ENVMAP_TYPE_CUBE +}`,Q4=`#ifdef ENVMAP_TYPE_CUBE uniform samplerCube envMap; #elif defined( ENVMAP_TYPE_CUBE_UV ) uniform sampler2D envMap; @@ -2105,14 +2105,14 @@ void main() { gl_FragColor = texColor; #include #include -}`,tz=`varying vec3 vWorldDirection; +}`,Z4=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include gl_Position.z = gl_Position.w; -}`,nz=`uniform samplerCube tCube; +}`,q4=`uniform samplerCube tCube; uniform float tFlip; uniform float opacity; varying vec3 vWorldDirection; @@ -2122,7 +2122,7 @@ void main() { gl_FragColor.a *= opacity; #include #include -}`,iz=`#include +}`,$4=`#include #include #include #include @@ -2146,7 +2146,7 @@ void main() { #include #include vHighPrecisionZW = gl_Position.zw; -}`,rz=`#if DEPTH_PACKING == 3200 +}`,ez=`#if DEPTH_PACKING == 3200 uniform float opacity; #endif #include @@ -2174,7 +2174,7 @@ void main() { #elif DEPTH_PACKING == 3201 gl_FragColor = packDepthToRGBA( fragCoordZ ); #endif -}`,sz=`#define DISTANCE +}`,tz=`#define DISTANCE varying vec3 vWorldPosition; #include #include @@ -2198,7 +2198,7 @@ void main() { #include #include vWorldPosition = worldPosition.xyz; -}`,oz=`#define DISTANCE +}`,nz=`#define DISTANCE uniform vec3 referencePosition; uniform float nearDistance; uniform float farDistance; @@ -2220,13 +2220,13 @@ void main () { dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); dist = saturate( dist ); gl_FragColor = packDepthToRGBA( dist ); -}`,az=`varying vec3 vWorldDirection; +}`,iz=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include -}`,lz=`uniform sampler2D tEquirect; +}`,rz=`uniform sampler2D tEquirect; varying vec3 vWorldDirection; #include void main() { @@ -2235,7 +2235,7 @@ void main() { gl_FragColor = texture2D( tEquirect, sampleUV ); #include #include -}`,cz=`uniform float scale; +}`,sz=`uniform float scale; attribute float lineDistance; varying float vLineDistance; #include @@ -2254,7 +2254,7 @@ void main() { #include #include #include -}`,uz=`uniform vec3 diffuse; +}`,oz=`uniform vec3 diffuse; uniform float opacity; uniform float dashSize; uniform float totalSize; @@ -2279,7 +2279,7 @@ void main() { #include #include #include -}`,fz=`#include +}`,az=`#include #include #include #include @@ -2310,7 +2310,7 @@ void main() { #include #include #include -}`,hz=`uniform vec3 diffuse; +}`,lz=`uniform vec3 diffuse; uniform float opacity; #ifndef FLAT_SHADED varying vec3 vNormal; @@ -2357,7 +2357,7 @@ void main() { #include #include #include -}`,dz=`#define LAMBERT +}`,cz=`#define LAMBERT varying vec3 vViewPosition; #include #include @@ -2395,7 +2395,7 @@ void main() { #include #include #include -}`,pz=`#define LAMBERT +}`,uz=`#define LAMBERT uniform vec3 diffuse; uniform vec3 emissive; uniform float opacity; @@ -2451,7 +2451,7 @@ void main() { #include #include #include -}`,mz=`#define MATCAP +}`,fz=`#define MATCAP varying vec3 vViewPosition; #include #include @@ -2482,7 +2482,7 @@ void main() { #include #include vViewPosition = - mvPosition.xyz; -}`,gz=`#define MATCAP +}`,hz=`#define MATCAP uniform vec3 diffuse; uniform float opacity; uniform sampler2D matcap; @@ -2526,7 +2526,7 @@ void main() { #include #include #include -}`,yz=`#define NORMAL +}`,dz=`#define NORMAL #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP ) varying vec3 vViewPosition; #endif @@ -2556,7 +2556,7 @@ void main() { #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP ) vViewPosition = - mvPosition.xyz; #endif -}`,vz=`#define NORMAL +}`,pz=`#define NORMAL uniform float opacity; #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP ) varying vec3 vViewPosition; @@ -2577,7 +2577,7 @@ void main() { #ifdef OPAQUE gl_FragColor.a = 1.0; #endif -}`,xz=`#define PHONG +}`,mz=`#define PHONG varying vec3 vViewPosition; #include #include @@ -2615,7 +2615,7 @@ void main() { #include #include #include -}`,_z=`#define PHONG +}`,gz=`#define PHONG uniform vec3 diffuse; uniform vec3 emissive; uniform vec3 specular; @@ -2673,7 +2673,7 @@ void main() { #include #include #include -}`,Az=`#define STANDARD +}`,yz=`#define STANDARD varying vec3 vViewPosition; #ifdef USE_TRANSMISSION varying vec3 vWorldPosition; @@ -2715,7 +2715,7 @@ void main() { #ifdef USE_TRANSMISSION vWorldPosition = worldPosition.xyz; #endif -}`,wz=`#define STANDARD +}`,vz=`#define STANDARD #ifdef PHYSICAL #define IOR #define SPECULAR @@ -2831,7 +2831,7 @@ void main() { #include #include #include -}`,Sz=`#define TOON +}`,xz=`#define TOON varying vec3 vViewPosition; #include #include @@ -2867,7 +2867,7 @@ void main() { #include #include #include -}`,Mz=`#define TOON +}`,_z=`#define TOON uniform vec3 diffuse; uniform vec3 emissive; uniform float opacity; @@ -2919,7 +2919,7 @@ void main() { #include #include #include -}`,Cz=`uniform float size; +}`,Az=`uniform float size; uniform float scale; #include #include @@ -2942,7 +2942,7 @@ void main() { #include #include #include -}`,Ez=`uniform vec3 diffuse; +}`,wz=`uniform vec3 diffuse; uniform float opacity; #include #include @@ -2965,7 +2965,7 @@ void main() { #include #include #include -}`,bz=`#include +}`,Sz=`#include #include #include #include @@ -2985,7 +2985,7 @@ void main() { #include #include #include -}`,Tz=`uniform vec3 color; +}`,Mz=`uniform vec3 color; uniform float opacity; #include #include @@ -3001,7 +3001,7 @@ void main() { #include #include #include -}`,Pz=`uniform float rotation; +}`,Cz=`uniform float rotation; uniform vec2 center; #include #include @@ -3027,7 +3027,7 @@ void main() { #include #include #include -}`,Bz=`uniform vec3 diffuse; +}`,Ez=`uniform vec3 diffuse; uniform float opacity; #include #include @@ -3050,7 +3050,7 @@ void main() { #include #include #include -}`,pt={alphamap_fragment:$N,alphamap_pars_fragment:eO,alphatest_fragment:tO,alphatest_pars_fragment:nO,aomap_fragment:iO,aomap_pars_fragment:rO,begin_vertex:sO,beginnormal_vertex:oO,bsdfs:aO,iridescence_fragment:lO,bumpmap_pars_fragment:cO,clipping_planes_fragment:uO,clipping_planes_pars_fragment:fO,clipping_planes_pars_vertex:hO,clipping_planes_vertex:dO,color_fragment:pO,color_pars_fragment:mO,color_pars_vertex:gO,color_vertex:yO,common:vO,cube_uv_reflection_fragment:xO,defaultnormal_vertex:_O,displacementmap_pars_vertex:AO,displacementmap_vertex:wO,emissivemap_fragment:SO,emissivemap_pars_fragment:MO,encodings_fragment:CO,encodings_pars_fragment:EO,envmap_fragment:bO,envmap_common_pars_fragment:TO,envmap_pars_fragment:PO,envmap_pars_vertex:BO,envmap_physical_pars_fragment:HO,envmap_vertex:RO,fog_vertex:LO,fog_pars_vertex:IO,fog_fragment:DO,fog_pars_fragment:FO,gradientmap_pars_fragment:kO,lightmap_fragment:NO,lightmap_pars_fragment:OO,lights_lambert_fragment:zO,lights_lambert_pars_fragment:UO,lights_pars_begin:GO,lights_toon_fragment:VO,lights_toon_pars_fragment:WO,lights_phong_fragment:jO,lights_phong_pars_fragment:JO,lights_physical_fragment:XO,lights_physical_pars_fragment:YO,lights_fragment_begin:KO,lights_fragment_maps:QO,lights_fragment_end:ZO,logdepthbuf_fragment:qO,logdepthbuf_pars_fragment:$O,logdepthbuf_pars_vertex:e4,logdepthbuf_vertex:t4,map_fragment:n4,map_pars_fragment:i4,map_particle_fragment:r4,map_particle_pars_fragment:s4,metalnessmap_fragment:o4,metalnessmap_pars_fragment:a4,morphcolor_vertex:l4,morphnormal_vertex:c4,morphtarget_pars_vertex:u4,morphtarget_vertex:f4,normal_fragment_begin:h4,normal_fragment_maps:d4,normal_pars_fragment:p4,normal_pars_vertex:m4,normal_vertex:g4,normalmap_pars_fragment:y4,clearcoat_normal_fragment_begin:v4,clearcoat_normal_fragment_maps:x4,clearcoat_pars_fragment:_4,iridescence_pars_fragment:A4,output_fragment:w4,packing:S4,premultiplied_alpha_fragment:M4,project_vertex:C4,dithering_fragment:E4,dithering_pars_fragment:b4,roughnessmap_fragment:T4,roughnessmap_pars_fragment:P4,shadowmap_pars_fragment:B4,shadowmap_pars_vertex:R4,shadowmap_vertex:L4,shadowmask_pars_fragment:I4,skinbase_vertex:D4,skinning_pars_vertex:F4,skinning_vertex:k4,skinnormal_vertex:N4,specularmap_fragment:O4,specularmap_pars_fragment:z4,tonemapping_fragment:U4,tonemapping_pars_fragment:G4,transmission_fragment:H4,transmission_pars_fragment:V4,uv_pars_fragment:W4,uv_pars_vertex:j4,uv_vertex:J4,uv2_pars_fragment:X4,uv2_pars_vertex:Y4,uv2_vertex:K4,worldpos_vertex:Q4,background_vert:Z4,background_frag:q4,backgroundCube_vert:$4,backgroundCube_frag:ez,cube_vert:tz,cube_frag:nz,depth_vert:iz,depth_frag:rz,distanceRGBA_vert:sz,distanceRGBA_frag:oz,equirect_vert:az,equirect_frag:lz,linedashed_vert:cz,linedashed_frag:uz,meshbasic_vert:fz,meshbasic_frag:hz,meshlambert_vert:dz,meshlambert_frag:pz,meshmatcap_vert:mz,meshmatcap_frag:gz,meshnormal_vert:yz,meshnormal_frag:vz,meshphong_vert:xz,meshphong_frag:_z,meshphysical_vert:Az,meshphysical_frag:wz,meshtoon_vert:Sz,meshtoon_frag:Mz,points_vert:Cz,points_frag:Ez,shadow_vert:bz,shadow_frag:Tz,sprite_vert:Pz,sprite_frag:Bz},Re={common:{diffuse:{value:new De(16777215)},opacity:{value:1},map:{value:null},uvTransform:{value:new Kn},uv2Transform:{value:new Kn},alphaMap:{value:null},alphaTest:{value:0}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new pe(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new De(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 De(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new Kn}},sprite:{diffuse:{value:new De(16777215)},opacity:{value:1},center:{value:new pe(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new Kn}}},Dr={basic:{uniforms:mi([Re.common,Re.specularmap,Re.envmap,Re.aomap,Re.lightmap,Re.fog]),vertexShader:pt.meshbasic_vert,fragmentShader:pt.meshbasic_frag},lambert:{uniforms:mi([Re.common,Re.specularmap,Re.envmap,Re.aomap,Re.lightmap,Re.emissivemap,Re.bumpmap,Re.normalmap,Re.displacementmap,Re.fog,Re.lights,{emissive:{value:new De(0)}}]),vertexShader:pt.meshlambert_vert,fragmentShader:pt.meshlambert_frag},phong:{uniforms:mi([Re.common,Re.specularmap,Re.envmap,Re.aomap,Re.lightmap,Re.emissivemap,Re.bumpmap,Re.normalmap,Re.displacementmap,Re.fog,Re.lights,{emissive:{value:new De(0)},specular:{value:new De(1118481)},shininess:{value:30}}]),vertexShader:pt.meshphong_vert,fragmentShader:pt.meshphong_frag},standard:{uniforms:mi([Re.common,Re.envmap,Re.aomap,Re.lightmap,Re.emissivemap,Re.bumpmap,Re.normalmap,Re.displacementmap,Re.roughnessmap,Re.metalnessmap,Re.fog,Re.lights,{emissive:{value:new De(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:pt.meshphysical_vert,fragmentShader:pt.meshphysical_frag},toon:{uniforms:mi([Re.common,Re.aomap,Re.lightmap,Re.emissivemap,Re.bumpmap,Re.normalmap,Re.displacementmap,Re.gradientmap,Re.fog,Re.lights,{emissive:{value:new De(0)}}]),vertexShader:pt.meshtoon_vert,fragmentShader:pt.meshtoon_frag},matcap:{uniforms:mi([Re.common,Re.bumpmap,Re.normalmap,Re.displacementmap,Re.fog,{matcap:{value:null}}]),vertexShader:pt.meshmatcap_vert,fragmentShader:pt.meshmatcap_frag},points:{uniforms:mi([Re.points,Re.fog]),vertexShader:pt.points_vert,fragmentShader:pt.points_frag},dashed:{uniforms:mi([Re.common,Re.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:pt.linedashed_vert,fragmentShader:pt.linedashed_frag},depth:{uniforms:mi([Re.common,Re.displacementmap]),vertexShader:pt.depth_vert,fragmentShader:pt.depth_frag},normal:{uniforms:mi([Re.common,Re.bumpmap,Re.normalmap,Re.displacementmap,{opacity:{value:1}}]),vertexShader:pt.meshnormal_vert,fragmentShader:pt.meshnormal_frag},sprite:{uniforms:mi([Re.sprite,Re.fog]),vertexShader:pt.sprite_vert,fragmentShader:pt.sprite_frag},background:{uniforms:{uvTransform:{value:new Kn},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:pt.background_vert,fragmentShader:pt.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:pt.backgroundCube_vert,fragmentShader:pt.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:pt.cube_vert,fragmentShader:pt.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:pt.equirect_vert,fragmentShader:pt.equirect_frag},distanceRGBA:{uniforms:mi([Re.common,Re.displacementmap,{referencePosition:{value:new F},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:pt.distanceRGBA_vert,fragmentShader:pt.distanceRGBA_frag},shadow:{uniforms:mi([Re.lights,Re.fog,{color:{value:new De(0)},opacity:{value:1}}]),vertexShader:pt.shadow_vert,fragmentShader:pt.shadow_frag}};Dr.physical={uniforms:mi([Dr.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new pe(1,1)},clearcoatNormalMap:{value:null},iridescence:{value:0},iridescenceMap:{value:null},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},sheen:{value:0},sheenColor:{value:new De(0)},sheenColorMap:{value:null},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},transmission:{value:0},transmissionMap:{value:null},transmissionSamplerSize:{value:new pe},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},attenuationDistance:{value:0},attenuationColor:{value:new De(0)},specularIntensity:{value:1},specularIntensityMap:{value:null},specularColor:{value:new De(1,1,1)},specularColorMap:{value:null}}]),vertexShader:pt.meshphysical_vert,fragmentShader:pt.meshphysical_frag};const vp={r:0,b:0,g:0};function Rz(n,e,t,i,r,s,o){const a=new De(0);let l=s===!0?0:1,u,h,d=null,p=0,m=null;function y(x,A){let _=!1,w=A.isScene===!0?A.background:null;w&&w.isTexture&&(w=(A.backgroundBlurriness>0?t:e).get(w));const M=n.xr,b=M.getSession&&M.getSession();b&&b.environmentBlendMode==="additive"&&(w=null),w===null?v(a,l):w&&w.isColor&&(v(w,1),_=!0),(n.autoClear||_)&&n.clear(n.autoClearColor,n.autoClearDepth,n.autoClearStencil),w&&(w.isCubeTexture||w.mapping===iu)?(h===void 0&&(h=new In(new oa(1,1,1),new ps({name:"BackgroundCubeMaterial",uniforms:jc(Dr.backgroundCube.uniforms),vertexShader:Dr.backgroundCube.vertexShader,fragmentShader:Dr.backgroundCube.fragmentShader,side:Li,depthTest:!1,depthWrite:!1,fog:!1})),h.geometry.deleteAttribute("normal"),h.geometry.deleteAttribute("uv"),h.onBeforeRender=function(P,R,E){this.matrixWorld.copyPosition(E.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=A.backgroundBlurriness,h.material.uniforms.backgroundIntensity.value=A.backgroundIntensity,h.material.toneMapped=w.encoding!==Ht,(d!==w||p!==w.version||m!==n.toneMapping)&&(h.material.needsUpdate=!0,d=w,p=w.version,m=n.toneMapping),h.layers.enableAll(),x.unshift(h,h.geometry,h.material,0,0,null)):w&&w.isTexture&&(u===void 0&&(u=new In(new su(2,2),new ps({name:"BackgroundMaterial",uniforms:jc(Dr.background.uniforms),vertexShader:Dr.background.vertexShader,fragmentShader:Dr.background.fragmentShader,side:hs,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),Object.defineProperty(u.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(u)),u.material.uniforms.t2D.value=w,u.material.uniforms.backgroundIntensity.value=A.backgroundIntensity,u.material.toneMapped=w.encoding!==Ht,w.matrixAutoUpdate===!0&&w.updateMatrix(),u.material.uniforms.uvTransform.value.copy(w.matrix),(d!==w||p!==w.version||m!==n.toneMapping)&&(u.material.needsUpdate=!0,d=w,p=w.version,m=n.toneMapping),u.layers.enableAll(),x.unshift(u,u.geometry,u.material,0,0,null))}function v(x,A){x.getRGB(vp,OP(n)),i.buffers.color.setClear(vp.r,vp.g,vp.b,A,o)}return{getClearColor:function(){return a},setClearColor:function(x,A=1){a.set(x),l=A,v(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(x){l=x,v(a,l)},render:y}}function Lz(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=x(null);let u=l,h=!1;function d(W,Q,re,ce,L){let V=!1;if(o){const H=v(ce,re,Q);u!==H&&(u=H,m(u.object)),V=A(W,ce,re,L),V&&_(W,ce,re,L)}else{const H=Q.wireframe===!0;(u.geometry!==ce.id||u.program!==re.id||u.wireframe!==H)&&(u.geometry=ce.id,u.program=re.id,u.wireframe=H,V=!0)}L!==null&&t.update(L,34963),(V||h)&&(h=!1,E(W,Q,re,ce),L!==null&&n.bindBuffer(34963,t.get(L).buffer))}function p(){return i.isWebGL2?n.createVertexArray():s.createVertexArrayOES()}function m(W){return i.isWebGL2?n.bindVertexArray(W):s.bindVertexArrayOES(W)}function y(W){return i.isWebGL2?n.deleteVertexArray(W):s.deleteVertexArrayOES(W)}function v(W,Q,re){const ce=re.wireframe===!0;let L=a[W.id];L===void 0&&(L={},a[W.id]=L);let V=L[Q.id];V===void 0&&(V={},L[Q.id]=V);let H=V[ce];return H===void 0&&(H=x(p()),V[ce]=H),H}function x(W){const Q=[],re=[],ce=[];for(let L=0;L=0){const me=L[G];let Y=V[G];if(Y===void 0&&(G==="instanceMatrix"&&W.instanceMatrix&&(Y=W.instanceMatrix),G==="instanceColor"&&W.instanceColor&&(Y=W.instanceColor)),me===void 0||me.attribute!==Y||Y&&me.data!==Y.data)return!0;H++}return u.attributesNum!==H||u.index!==ce}function _(W,Q,re,ce){const L={},V=Q.attributes;let H=0;const $=re.getAttributes();for(const G in $)if($[G].location>=0){let me=V[G];me===void 0&&(G==="instanceMatrix"&&W.instanceMatrix&&(me=W.instanceMatrix),G==="instanceColor"&&W.instanceColor&&(me=W.instanceColor));const Y={};Y.attribute=me,me&&me.data&&(Y.data=me.data),L[G]=Y,H++}u.attributes=L,u.attributesNum=H,u.index=ce}function w(){const W=u.newAttributes;for(let Q=0,re=W.length;Q=0){let se=L[$];if(se===void 0&&($==="instanceMatrix"&&W.instanceMatrix&&(se=W.instanceMatrix),$==="instanceColor"&&W.instanceColor&&(se=W.instanceColor)),se!==void 0){const me=se.normalized,Y=se.itemSize,_e=t.get(se);if(_e===void 0)continue;const Ae=_e.buffer,Ie=_e.type,ke=_e.bytesPerElement;if(se.isInterleavedBufferAttribute){const Te=se.data,we=Te.stride,he=se.offset;if(Te.isInstancedInterleavedBuffer){for(let de=0;de0&&n.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";R="mediump"}return R==="mediump"&&n.getShaderPrecisionFormat(35633,36337).precision>0&&n.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}const o=typeof WebGL2RenderingContext<"u"&&n instanceof 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 u=o||e.has("WEBGL_draw_buffers"),h=t.logarithmicDepthBuffer===!0,d=n.getParameter(34930),p=n.getParameter(35660),m=n.getParameter(3379),y=n.getParameter(34076),v=n.getParameter(34921),x=n.getParameter(36347),A=n.getParameter(36348),_=n.getParameter(36349),w=p>0,M=o||e.has("OES_texture_float"),b=w&&M,P=o?n.getParameter(36183):0;return{isWebGL2:o,drawBuffers:u,getMaxAnisotropy:r,getMaxPrecision:s,precision:a,logarithmicDepthBuffer:h,maxTextures:d,maxVertexTextures:p,maxTextureSize:m,maxCubemapSize:y,maxAttributes:v,maxVertexUniforms:x,maxVaryings:A,maxFragmentUniforms:_,vertexTextures:w,floatFragmentTextures:M,floatVertexTextures:b,maxSamples:P}}function Fz(n){const e=this;let t=null,i=0,r=!1,s=!1;const o=new Ds,a=new Kn,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(d,p){const m=d.length!==0||p||i!==0||r;return r=p,i=d.length,m},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,m){const y=d.clippingPlanes,v=d.clipIntersection,x=d.clipShadows,A=n.get(d);if(!r||y===null||y.length===0||s&&!x)s?h(null):u();else{const _=s?0:i,w=_*4;let M=A.clippingState||null;l.value=M,M=h(y,p,w,m);for(let b=0;b!==w;++b)M[b]=t[b];A.clippingState=M,this.numIntersection=v?this.numPlanes:0,this.numPlanes+=_}};function u(){l.value!==t&&(l.value=t,l.needsUpdate=i>0),e.numPlanes=i,e.numIntersection=0}function h(d,p,m,y){const v=d!==null?d.length:0;let x=null;if(v!==0){if(x=l.value,y!==!0||x===null){const A=m+v*4,_=p.matrixWorldInverse;a.getNormalMatrix(_),(x===null||x.length0){const u=new rA(l.height/2);return u.fromEquirectangularTexture(n,o),e.set(o,u),o.addEventListener("dispose",r),t(u.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 mr extends yh{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 u=(this.right-this.left)/this.view.fullWidth/this.zoom,h=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=u*this.view.offsetX,o=s+u*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 gc=4,vC=[.125,.215,.35,.446,.526,.582],Oa=20,tv=new mr,xC=new De;let nv=null;const Da=(1+Math.sqrt(5))/2,Kl=1/Da,_C=[new F(1,1,1),new F(-1,1,1),new F(1,1,-1),new F(-1,1,-1),new F(0,Da,Kl),new F(0,Da,-Kl),new F(Kl,0,Da),new F(-Kl,0,Da),new F(Da,Kl,0),new F(-Da,Kl,0)];class g1{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){nv=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=SC(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=wC(),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),v&&h.render(y,a),h.render(e,a)}y.geometry.dispose(),y.material.dispose(),h.toneMapping=p,h.autoClear=d,e.background=x}_textureToCubeUV(e,t){const i=this._renderer,r=e.mapping===Jo||e.mapping===Xo;r?(this._cubemapMaterial===null&&(this._cubemapMaterial=SC()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=wC());const s=r?this._cubemapMaterial:this._equirectMaterial,o=new In(this._lodPlanes[0],s),a=s.uniforms;a.envMap.value=e;const l=this._cubeSize;xp(t,0,0,3*l,2*l),i.setRenderTarget(t),i.render(o,tv)}_applyPMREM(e){const t=this._renderer,i=t.autoClear;t.autoClear=!1;for(let r=1;rOa&&console.warn(`sigmaRadians, ${s}, is too large and will clip, as it requested ${x} samples when the maximum is set to ${Oa}`);const A=[];let _=0;for(let R=0;Rw-gc?r-w+gc:0),P=4*(this._cubeSize-M);xp(t,b,P,3*M,2*M),l.setRenderTarget(t),l.render(d,tv)}}function Nz(n){const e=[],t=[],i=[];let r=n;const s=n-gc+1+vC.length;for(let o=0;on-gc?l=vC[o-n+gc-1]:o===0&&(l=0),i.push(l);const u=1/(a-2),h=-u,d=1+u,p=[h,h,d,h,d,d,h,h,d,d,h,d],m=6,y=6,v=3,x=2,A=1,_=new Float32Array(v*y*m),w=new Float32Array(x*y*m),M=new Float32Array(A*y*m);for(let P=0;P2?0:-1,B=[R,E,0,R+2/3,E,0,R+2/3,E+1,0,R,E,0,R+2/3,E+1,0,R,E+1,0];_.set(B,v*y*P),w.set(p,x*y*P);const I=[P,P,P,P,P,P];M.set(I,A*y*P)}const b=new ft;b.setAttribute("position",new Lt(_,v)),b.setAttribute("uv",new Lt(w,x)),b.setAttribute("faceIndex",new Lt(M,A)),e.push(b),r>gc&&r--}return{lodPlanes:e,sizeLods:t,sigmas:i}}function AC(n,e,t){const i=new Gr(n,e,t);return i.texture.mapping=iu,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function xp(n,e,t,i,r){n.viewport.set(e,t,i,r),n.scissor.set(e,t,i,r)}function Oz(n,e,t){const i=new Float32Array(Oa),r=new F(0,1,0);return new ps({name:"SphericalGaussianBlur",defines:{n:Oa,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:sA(),fragmentShader:` +}`,pt={alphamap_fragment:KN,alphamap_pars_fragment:QN,alphatest_fragment:ZN,alphatest_pars_fragment:qN,aomap_fragment:$N,aomap_pars_fragment:eO,begin_vertex:tO,beginnormal_vertex:nO,bsdfs:iO,iridescence_fragment:rO,bumpmap_pars_fragment:sO,clipping_planes_fragment:oO,clipping_planes_pars_fragment:aO,clipping_planes_pars_vertex:lO,clipping_planes_vertex:cO,color_fragment:uO,color_pars_fragment:fO,color_pars_vertex:hO,color_vertex:dO,common:pO,cube_uv_reflection_fragment:mO,defaultnormal_vertex:gO,displacementmap_pars_vertex:yO,displacementmap_vertex:vO,emissivemap_fragment:xO,emissivemap_pars_fragment:_O,encodings_fragment:AO,encodings_pars_fragment:wO,envmap_fragment:SO,envmap_common_pars_fragment:MO,envmap_pars_fragment:CO,envmap_pars_vertex:EO,envmap_physical_pars_fragment:OO,envmap_vertex:bO,fog_vertex:TO,fog_pars_vertex:PO,fog_fragment:BO,fog_pars_fragment:RO,gradientmap_pars_fragment:LO,lightmap_fragment:IO,lightmap_pars_fragment:DO,lights_lambert_fragment:FO,lights_lambert_pars_fragment:kO,lights_pars_begin:NO,lights_toon_fragment:zO,lights_toon_pars_fragment:UO,lights_phong_fragment:GO,lights_phong_pars_fragment:HO,lights_physical_fragment:VO,lights_physical_pars_fragment:WO,lights_fragment_begin:jO,lights_fragment_maps:JO,lights_fragment_end:XO,logdepthbuf_fragment:YO,logdepthbuf_pars_fragment:KO,logdepthbuf_pars_vertex:QO,logdepthbuf_vertex:ZO,map_fragment:qO,map_pars_fragment:$O,map_particle_fragment:e4,map_particle_pars_fragment:t4,metalnessmap_fragment:n4,metalnessmap_pars_fragment:i4,morphcolor_vertex:r4,morphnormal_vertex:s4,morphtarget_pars_vertex:o4,morphtarget_vertex:a4,normal_fragment_begin:l4,normal_fragment_maps:c4,normal_pars_fragment:u4,normal_pars_vertex:f4,normal_vertex:h4,normalmap_pars_fragment:d4,clearcoat_normal_fragment_begin:p4,clearcoat_normal_fragment_maps:m4,clearcoat_pars_fragment:g4,iridescence_pars_fragment:y4,output_fragment:v4,packing:x4,premultiplied_alpha_fragment:_4,project_vertex:A4,dithering_fragment:w4,dithering_pars_fragment:S4,roughnessmap_fragment:M4,roughnessmap_pars_fragment:C4,shadowmap_pars_fragment:E4,shadowmap_pars_vertex:b4,shadowmap_vertex:T4,shadowmask_pars_fragment:P4,skinbase_vertex:B4,skinning_pars_vertex:R4,skinning_vertex:L4,skinnormal_vertex:I4,specularmap_fragment:D4,specularmap_pars_fragment:F4,tonemapping_fragment:k4,tonemapping_pars_fragment:N4,transmission_fragment:O4,transmission_pars_fragment:z4,uv_pars_fragment:U4,uv_pars_vertex:G4,uv_vertex:H4,uv2_pars_fragment:V4,uv2_pars_vertex:W4,uv2_vertex:j4,worldpos_vertex:J4,background_vert:X4,background_frag:Y4,backgroundCube_vert:K4,backgroundCube_frag:Q4,cube_vert:Z4,cube_frag:q4,depth_vert:$4,depth_frag:ez,distanceRGBA_vert:tz,distanceRGBA_frag:nz,equirect_vert:iz,equirect_frag:rz,linedashed_vert:sz,linedashed_frag:oz,meshbasic_vert:az,meshbasic_frag:lz,meshlambert_vert:cz,meshlambert_frag:uz,meshmatcap_vert:fz,meshmatcap_frag:hz,meshnormal_vert:dz,meshnormal_frag:pz,meshphong_vert:mz,meshphong_frag:gz,meshphysical_vert:yz,meshphysical_frag:vz,meshtoon_vert:xz,meshtoon_frag:_z,points_vert:Az,points_frag:wz,shadow_vert:Sz,shadow_frag:Mz,sprite_vert:Cz,sprite_frag:Ez},Re={common:{diffuse:{value:new De(16777215)},opacity:{value:1},map:{value:null},uvTransform:{value:new Kn},uv2Transform:{value:new Kn},alphaMap:{value:null},alphaTest:{value:0}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new pe(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new De(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 De(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new Kn}},sprite:{diffuse:{value:new De(16777215)},opacity:{value:1},center:{value:new pe(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new Kn}}},Dr={basic:{uniforms:mi([Re.common,Re.specularmap,Re.envmap,Re.aomap,Re.lightmap,Re.fog]),vertexShader:pt.meshbasic_vert,fragmentShader:pt.meshbasic_frag},lambert:{uniforms:mi([Re.common,Re.specularmap,Re.envmap,Re.aomap,Re.lightmap,Re.emissivemap,Re.bumpmap,Re.normalmap,Re.displacementmap,Re.fog,Re.lights,{emissive:{value:new De(0)}}]),vertexShader:pt.meshlambert_vert,fragmentShader:pt.meshlambert_frag},phong:{uniforms:mi([Re.common,Re.specularmap,Re.envmap,Re.aomap,Re.lightmap,Re.emissivemap,Re.bumpmap,Re.normalmap,Re.displacementmap,Re.fog,Re.lights,{emissive:{value:new De(0)},specular:{value:new De(1118481)},shininess:{value:30}}]),vertexShader:pt.meshphong_vert,fragmentShader:pt.meshphong_frag},standard:{uniforms:mi([Re.common,Re.envmap,Re.aomap,Re.lightmap,Re.emissivemap,Re.bumpmap,Re.normalmap,Re.displacementmap,Re.roughnessmap,Re.metalnessmap,Re.fog,Re.lights,{emissive:{value:new De(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:pt.meshphysical_vert,fragmentShader:pt.meshphysical_frag},toon:{uniforms:mi([Re.common,Re.aomap,Re.lightmap,Re.emissivemap,Re.bumpmap,Re.normalmap,Re.displacementmap,Re.gradientmap,Re.fog,Re.lights,{emissive:{value:new De(0)}}]),vertexShader:pt.meshtoon_vert,fragmentShader:pt.meshtoon_frag},matcap:{uniforms:mi([Re.common,Re.bumpmap,Re.normalmap,Re.displacementmap,Re.fog,{matcap:{value:null}}]),vertexShader:pt.meshmatcap_vert,fragmentShader:pt.meshmatcap_frag},points:{uniforms:mi([Re.points,Re.fog]),vertexShader:pt.points_vert,fragmentShader:pt.points_frag},dashed:{uniforms:mi([Re.common,Re.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:pt.linedashed_vert,fragmentShader:pt.linedashed_frag},depth:{uniforms:mi([Re.common,Re.displacementmap]),vertexShader:pt.depth_vert,fragmentShader:pt.depth_frag},normal:{uniforms:mi([Re.common,Re.bumpmap,Re.normalmap,Re.displacementmap,{opacity:{value:1}}]),vertexShader:pt.meshnormal_vert,fragmentShader:pt.meshnormal_frag},sprite:{uniforms:mi([Re.sprite,Re.fog]),vertexShader:pt.sprite_vert,fragmentShader:pt.sprite_frag},background:{uniforms:{uvTransform:{value:new Kn},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:pt.background_vert,fragmentShader:pt.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:pt.backgroundCube_vert,fragmentShader:pt.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:pt.cube_vert,fragmentShader:pt.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:pt.equirect_vert,fragmentShader:pt.equirect_frag},distanceRGBA:{uniforms:mi([Re.common,Re.displacementmap,{referencePosition:{value:new F},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:pt.distanceRGBA_vert,fragmentShader:pt.distanceRGBA_frag},shadow:{uniforms:mi([Re.lights,Re.fog,{color:{value:new De(0)},opacity:{value:1}}]),vertexShader:pt.shadow_vert,fragmentShader:pt.shadow_frag}};Dr.physical={uniforms:mi([Dr.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new pe(1,1)},clearcoatNormalMap:{value:null},iridescence:{value:0},iridescenceMap:{value:null},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},sheen:{value:0},sheenColor:{value:new De(0)},sheenColorMap:{value:null},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},transmission:{value:0},transmissionMap:{value:null},transmissionSamplerSize:{value:new pe},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},attenuationDistance:{value:0},attenuationColor:{value:new De(0)},specularIntensity:{value:1},specularIntensityMap:{value:null},specularColor:{value:new De(1,1,1)},specularColorMap:{value:null}}]),vertexShader:pt.meshphysical_vert,fragmentShader:pt.meshphysical_frag};const yp={r:0,b:0,g:0};function bz(n,e,t,i,r,s,o){const a=new De(0);let l=s===!0?0:1,u,h,d=null,p=0,m=null;function y(x,A){let _=!1,w=A.isScene===!0?A.background:null;w&&w.isTexture&&(w=(A.backgroundBlurriness>0?t:e).get(w));const M=n.xr,b=M.getSession&&M.getSession();b&&b.environmentBlendMode==="additive"&&(w=null),w===null?v(a,l):w&&w.isColor&&(v(w,1),_=!0),(n.autoClear||_)&&n.clear(n.autoClearColor,n.autoClearDepth,n.autoClearStencil),w&&(w.isCubeTexture||w.mapping===iu)?(h===void 0&&(h=new In(new oa(1,1,1),new ps({name:"BackgroundCubeMaterial",uniforms:jc(Dr.backgroundCube.uniforms),vertexShader:Dr.backgroundCube.vertexShader,fragmentShader:Dr.backgroundCube.fragmentShader,side:Li,depthTest:!1,depthWrite:!1,fog:!1})),h.geometry.deleteAttribute("normal"),h.geometry.deleteAttribute("uv"),h.onBeforeRender=function(P,R,E){this.matrixWorld.copyPosition(E.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=A.backgroundBlurriness,h.material.uniforms.backgroundIntensity.value=A.backgroundIntensity,h.material.toneMapped=w.encoding!==Ht,(d!==w||p!==w.version||m!==n.toneMapping)&&(h.material.needsUpdate=!0,d=w,p=w.version,m=n.toneMapping),h.layers.enableAll(),x.unshift(h,h.geometry,h.material,0,0,null)):w&&w.isTexture&&(u===void 0&&(u=new In(new su(2,2),new ps({name:"BackgroundMaterial",uniforms:jc(Dr.background.uniforms),vertexShader:Dr.background.vertexShader,fragmentShader:Dr.background.fragmentShader,side:hs,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),Object.defineProperty(u.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(u)),u.material.uniforms.t2D.value=w,u.material.uniforms.backgroundIntensity.value=A.backgroundIntensity,u.material.toneMapped=w.encoding!==Ht,w.matrixAutoUpdate===!0&&w.updateMatrix(),u.material.uniforms.uvTransform.value.copy(w.matrix),(d!==w||p!==w.version||m!==n.toneMapping)&&(u.material.needsUpdate=!0,d=w,p=w.version,m=n.toneMapping),u.layers.enableAll(),x.unshift(u,u.geometry,u.material,0,0,null))}function v(x,A){x.getRGB(yp,kP(n)),i.buffers.color.setClear(yp.r,yp.g,yp.b,A,o)}return{getClearColor:function(){return a},setClearColor:function(x,A=1){a.set(x),l=A,v(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(x){l=x,v(a,l)},render:y}}function Tz(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=x(null);let u=l,h=!1;function d(W,Q,re,ce,L){let V=!1;if(o){const H=v(ce,re,Q);u!==H&&(u=H,m(u.object)),V=A(W,ce,re,L),V&&_(W,ce,re,L)}else{const H=Q.wireframe===!0;(u.geometry!==ce.id||u.program!==re.id||u.wireframe!==H)&&(u.geometry=ce.id,u.program=re.id,u.wireframe=H,V=!0)}L!==null&&t.update(L,34963),(V||h)&&(h=!1,E(W,Q,re,ce),L!==null&&n.bindBuffer(34963,t.get(L).buffer))}function p(){return i.isWebGL2?n.createVertexArray():s.createVertexArrayOES()}function m(W){return i.isWebGL2?n.bindVertexArray(W):s.bindVertexArrayOES(W)}function y(W){return i.isWebGL2?n.deleteVertexArray(W):s.deleteVertexArrayOES(W)}function v(W,Q,re){const ce=re.wireframe===!0;let L=a[W.id];L===void 0&&(L={},a[W.id]=L);let V=L[Q.id];V===void 0&&(V={},L[Q.id]=V);let H=V[ce];return H===void 0&&(H=x(p()),V[ce]=H),H}function x(W){const Q=[],re=[],ce=[];for(let L=0;L=0){const me=L[G];let Y=V[G];if(Y===void 0&&(G==="instanceMatrix"&&W.instanceMatrix&&(Y=W.instanceMatrix),G==="instanceColor"&&W.instanceColor&&(Y=W.instanceColor)),me===void 0||me.attribute!==Y||Y&&me.data!==Y.data)return!0;H++}return u.attributesNum!==H||u.index!==ce}function _(W,Q,re,ce){const L={},V=Q.attributes;let H=0;const $=re.getAttributes();for(const G in $)if($[G].location>=0){let me=V[G];me===void 0&&(G==="instanceMatrix"&&W.instanceMatrix&&(me=W.instanceMatrix),G==="instanceColor"&&W.instanceColor&&(me=W.instanceColor));const Y={};Y.attribute=me,me&&me.data&&(Y.data=me.data),L[G]=Y,H++}u.attributes=L,u.attributesNum=H,u.index=ce}function w(){const W=u.newAttributes;for(let Q=0,re=W.length;Q=0){let se=L[$];if(se===void 0&&($==="instanceMatrix"&&W.instanceMatrix&&(se=W.instanceMatrix),$==="instanceColor"&&W.instanceColor&&(se=W.instanceColor)),se!==void 0){const me=se.normalized,Y=se.itemSize,_e=t.get(se);if(_e===void 0)continue;const Ae=_e.buffer,Ie=_e.type,ke=_e.bytesPerElement;if(se.isInterleavedBufferAttribute){const Te=se.data,we=Te.stride,he=se.offset;if(Te.isInstancedInterleavedBuffer){for(let de=0;de0&&n.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";R="mediump"}return R==="mediump"&&n.getShaderPrecisionFormat(35633,36337).precision>0&&n.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}const o=typeof WebGL2RenderingContext<"u"&&n instanceof 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 u=o||e.has("WEBGL_draw_buffers"),h=t.logarithmicDepthBuffer===!0,d=n.getParameter(34930),p=n.getParameter(35660),m=n.getParameter(3379),y=n.getParameter(34076),v=n.getParameter(34921),x=n.getParameter(36347),A=n.getParameter(36348),_=n.getParameter(36349),w=p>0,M=o||e.has("OES_texture_float"),b=w&&M,P=o?n.getParameter(36183):0;return{isWebGL2:o,drawBuffers:u,getMaxAnisotropy:r,getMaxPrecision:s,precision:a,logarithmicDepthBuffer:h,maxTextures:d,maxVertexTextures:p,maxTextureSize:m,maxCubemapSize:y,maxAttributes:v,maxVertexUniforms:x,maxVaryings:A,maxFragmentUniforms:_,vertexTextures:w,floatFragmentTextures:M,floatVertexTextures:b,maxSamples:P}}function Rz(n){const e=this;let t=null,i=0,r=!1,s=!1;const o=new Ds,a=new Kn,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(d,p){const m=d.length!==0||p||i!==0||r;return r=p,i=d.length,m},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,m){const y=d.clippingPlanes,v=d.clipIntersection,x=d.clipShadows,A=n.get(d);if(!r||y===null||y.length===0||s&&!x)s?h(null):u();else{const _=s?0:i,w=_*4;let M=A.clippingState||null;l.value=M,M=h(y,p,w,m);for(let b=0;b!==w;++b)M[b]=t[b];A.clippingState=M,this.numIntersection=v?this.numPlanes:0,this.numPlanes+=_}};function u(){l.value!==t&&(l.value=t,l.needsUpdate=i>0),e.numPlanes=i,e.numIntersection=0}function h(d,p,m,y){const v=d!==null?d.length:0;let x=null;if(v!==0){if(x=l.value,y!==!0||x===null){const A=m+v*4,_=p.matrixWorldInverse;a.getNormalMatrix(_),(x===null||x.length0){const u=new iA(l.height/2);return u.fromEquirectangularTexture(n,o),e.set(o,u),o.addEventListener("dispose",r),t(u.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 mr extends gh{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 u=(this.right-this.left)/this.view.fullWidth/this.zoom,h=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=u*this.view.offsetX,o=s+u*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 gc=4,yC=[.125,.215,.35,.446,.526,.582],Oa=20,ev=new mr,vC=new De;let tv=null;const Da=(1+Math.sqrt(5))/2,Kl=1/Da,xC=[new F(1,1,1),new F(-1,1,1),new F(1,1,-1),new F(-1,1,-1),new F(0,Da,Kl),new F(0,Da,-Kl),new F(Kl,0,Da),new F(-Kl,0,Da),new F(Da,Kl,0),new F(-Da,Kl,0)];class m1{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){tv=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=wC(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=AC(),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),v&&h.render(y,a),h.render(e,a)}y.geometry.dispose(),y.material.dispose(),h.toneMapping=p,h.autoClear=d,e.background=x}_textureToCubeUV(e,t){const i=this._renderer,r=e.mapping===Jo||e.mapping===Xo;r?(this._cubemapMaterial===null&&(this._cubemapMaterial=wC()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=AC());const s=r?this._cubemapMaterial:this._equirectMaterial,o=new In(this._lodPlanes[0],s),a=s.uniforms;a.envMap.value=e;const l=this._cubeSize;vp(t,0,0,3*l,2*l),i.setRenderTarget(t),i.render(o,ev)}_applyPMREM(e){const t=this._renderer,i=t.autoClear;t.autoClear=!1;for(let r=1;rOa&&console.warn(`sigmaRadians, ${s}, is too large and will clip, as it requested ${x} samples when the maximum is set to ${Oa}`);const A=[];let _=0;for(let R=0;Rw-gc?r-w+gc:0),P=4*(this._cubeSize-M);vp(t,b,P,3*M,2*M),l.setRenderTarget(t),l.render(d,ev)}}function Iz(n){const e=[],t=[],i=[];let r=n;const s=n-gc+1+yC.length;for(let o=0;on-gc?l=yC[o-n+gc-1]:o===0&&(l=0),i.push(l);const u=1/(a-2),h=-u,d=1+u,p=[h,h,d,h,d,d,h,h,d,d,h,d],m=6,y=6,v=3,x=2,A=1,_=new Float32Array(v*y*m),w=new Float32Array(x*y*m),M=new Float32Array(A*y*m);for(let P=0;P2?0:-1,B=[R,E,0,R+2/3,E,0,R+2/3,E+1,0,R,E,0,R+2/3,E+1,0,R,E+1,0];_.set(B,v*y*P),w.set(p,x*y*P);const I=[P,P,P,P,P,P];M.set(I,A*y*P)}const b=new ft;b.setAttribute("position",new Lt(_,v)),b.setAttribute("uv",new Lt(w,x)),b.setAttribute("faceIndex",new Lt(M,A)),e.push(b),r>gc&&r--}return{lodPlanes:e,sizeLods:t,sigmas:i}}function _C(n,e,t){const i=new Gr(n,e,t);return i.texture.mapping=iu,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function vp(n,e,t,i,r){n.viewport.set(e,t,i,r),n.scissor.set(e,t,i,r)}function Dz(n,e,t){const i=new Float32Array(Oa),r=new F(0,1,0);return new ps({name:"SphericalGaussianBlur",defines:{n:Oa,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:rA(),fragmentShader:` precision mediump float; precision mediump int; @@ -3110,7 +3110,7 @@ void main() { } } - `,blending:Ws,depthTest:!1,depthWrite:!1})}function wC(){return new ps({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:sA(),fragmentShader:` + `,blending:Ws,depthTest:!1,depthWrite:!1})}function AC(){return new ps({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:rA(),fragmentShader:` precision mediump float; precision mediump int; @@ -3129,7 +3129,7 @@ void main() { gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); } - `,blending:Ws,depthTest:!1,depthWrite:!1})}function SC(){return new ps({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:sA(),fragmentShader:` + `,blending:Ws,depthTest:!1,depthWrite:!1})}function wC(){return new ps({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:rA(),fragmentShader:` precision mediump float; precision mediump int; @@ -3145,7 +3145,7 @@ void main() { gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); } - `,blending:Ws,depthTest:!1,depthWrite:!1})}function sA(){return` + `,blending:Ws,depthTest:!1,depthWrite:!1})}function rA(){return` precision mediump float; precision mediump int; @@ -3200,39 +3200,39 @@ void main() { gl_Position = vec4( position, 1.0 ); } - `}function zz(n){let e=new WeakMap,t=null;function i(a){if(a&&a.isTexture){const l=a.mapping,u=l===Yf||l===Kf,h=l===Jo||l===Xo;if(u||h)if(a.isRenderTargetTexture&&a.needsPMREMUpdate===!0){a.needsPMREMUpdate=!1;let d=e.get(a);return t===null&&(t=new g1(n)),d=u?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(u&&d&&d.height>0||h&&d&&r(d)){t===null&&(t=new g1(n));const p=u?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 u=6;for(let h=0;he.maxTextureSize&&(z=Math.ceil(I/e.maxTextureSize),I=e.maxTextureSize);const Z=new Float32Array(I*z*4*v),J=new Dg(Z,I,z,v);J.type=zs,J.needsUpdate=!0;const W=B*4;for(let re=0;re0)return n;const r=e*t;let s=MC[r];if(s===void 0&&(s=new Float32Array(r),MC[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 Dn(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 m1(n));const p=u?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 u=6;for(let h=0;he.maxTextureSize&&(z=Math.ceil(I/e.maxTextureSize),I=e.maxTextureSize);const Z=new Float32Array(I*z*4*v),J=new Ig(Z,I,z,v);J.type=zs,J.needsUpdate=!0;const W=B*4;for(let re=0;re0)return n;const r=e*t;let s=SC[r];if(s===void 0&&(s=new Float32Array(r),SC[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 Dn(n,e){if(n.length!==e.length)return!1;for(let t=0,i=n.length;t":" "} ${a}: ${t[o]}`)}return i.join(` -`)}function U5(n){switch(n){case Ko:return["Linear","( value )"];case Ht:return["sRGB","( value )"];default:return console.warn("THREE.WebGLProgram: Unsupported encoding:",n),["Linear","( value )"]}}function RC(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()+` +`)}function k5(n){switch(n){case Ko:return["Linear","( value )"];case Ht:return["sRGB","( value )"];default:return console.warn("THREE.WebGLProgram: Unsupported encoding:",n),["Linear","( value )"]}}function BC(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()+` `+r+` -`+z5(n.getShaderSource(e),o)}else return r}function G5(n,e){const t=U5(e);return"vec4 "+n+"( vec4 value ) { return LinearTo"+t[0]+t[1]+"; }"}function H5(n,e){let t;switch(e){case aP:t="Linear";break;case lP:t="Reinhard";break;case cP:t="OptimizedCineon";break;case J_:t="ACESFilmic";break;case uP:t="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),t="Linear"}return"vec3 "+n+"( vec3 color ) { return "+t+"ToneMapping( color ); }"}function V5(n){return[n.extensionDerivatives||n.envMapCubeUVHeight||n.bumpMap||n.tangentSpaceNormalMap||n.clearcoatNormalMap||n.flatShading||n.shaderID==="physical"?"#extension GL_OES_standard_derivatives : enable":"",(n.extensionFragDepth||n.logarithmicDepthBuffer)&&n.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",n.extensionDrawBuffers&&n.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(n.extensionShaderTextureLOD||n.envMap||n.transmission)&&n.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(uf).join(` -`)}function W5(n){const e=[];for(const t in n){const i=n[t];i!==!1&&e.push("#define "+t+" "+i)}return e.join(` -`)}function j5(n,e){const t={},i=n.getProgramParameter(e,35721);for(let r=0;r/gm;function y1(n){return n.replace(J5,X5)}function X5(n,e){const t=pt[e];if(t===void 0)throw new Error("Can not resolve #include <"+e+">");return y1(t)}const Y5=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function DC(n){return n.replace(Y5,K5)}function K5(n,e,t,i){let r="";for(let s=parseInt(e);s/gm;function g1(n){return n.replace(H5,V5)}function V5(n,e){const t=pt[e];if(t===void 0)throw new Error("Can not resolve #include <"+e+">");return g1(t)}const W5=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function IC(n){return n.replace(W5,j5)}function j5(n,e,t,i){let r="";for(let s=parseInt(e);s0&&(x+=` `),A=[m,y].filter(uf).join(` `),A.length>0&&(A+=` -`)):(x=[FC(t),"#define SHADER_NAME "+t.shaderName,y,t.instancing?"#define USE_INSTANCING":"",t.instancingColor?"#define USE_INSTANCING_COLOR":"",t.supportsVertexTextures?"#define VERTEX_TEXTURES":"",t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+h:"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMap&&t.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",t.normalMap&&t.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.displacementMap&&t.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",t.specularColorMap?"#define USE_SPECULARCOLORMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.sheenColorMap?"#define USE_SHEENCOLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",t.vertexTangents?"#define USE_TANGENT":"",t.vertexColors?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUvs?"#define USE_UV":"",t.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",t.flatShading?"#define FLAT_SHADED":"",t.skinning?"#define USE_SKINNING":"",t.morphTargets?"#define USE_MORPHTARGETS":"",t.morphNormals&&t.flatShading===!1?"#define USE_MORPHNORMALS":"",t.morphColors&&t.isWebGL2?"#define USE_MORPHCOLORS":"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+t.morphTextureStride:"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_COUNT "+t.morphTargetsCount:"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+l:"",t.sizeAttenuation?"#define USE_SIZEATTENUATION":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` +`)):(x=[DC(t),"#define SHADER_NAME "+t.shaderName,y,t.instancing?"#define USE_INSTANCING":"",t.instancingColor?"#define USE_INSTANCING_COLOR":"",t.supportsVertexTextures?"#define VERTEX_TEXTURES":"",t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+h:"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMap&&t.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",t.normalMap&&t.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.displacementMap&&t.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",t.specularColorMap?"#define USE_SPECULARCOLORMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.sheenColorMap?"#define USE_SHEENCOLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",t.vertexTangents?"#define USE_TANGENT":"",t.vertexColors?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUvs?"#define USE_UV":"",t.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",t.flatShading?"#define FLAT_SHADED":"",t.skinning?"#define USE_SKINNING":"",t.morphTargets?"#define USE_MORPHTARGETS":"",t.morphNormals&&t.flatShading===!1?"#define USE_MORPHNORMALS":"",t.morphColors&&t.isWebGL2?"#define USE_MORPHCOLORS":"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+t.morphTextureStride:"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_COUNT "+t.morphTargetsCount:"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+l:"",t.sizeAttenuation?"#define USE_SIZEATTENUATION":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` `].filter(uf).join(` -`),A=[m,FC(t),"#define SHADER_NAME "+t.shaderName,y,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.matcap?"#define USE_MATCAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+u:"",t.envMap?"#define "+h:"",t.envMap?"#define "+d:"",p?"#define CUBEUV_TEXEL_WIDTH "+p.texelWidth:"",p?"#define CUBEUV_TEXEL_HEIGHT "+p.texelHeight:"",p?"#define CUBEUV_MAX_MIP "+p.maxMip+".0":"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMap&&t.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",t.normalMap&&t.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",t.clearcoat?"#define USE_CLEARCOAT":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescence?"#define USE_IRIDESCENCE":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",t.specularColorMap?"#define USE_SPECULARCOLORMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaTest?"#define USE_ALPHATEST":"",t.sheen?"#define USE_SHEEN":"",t.sheenColorMap?"#define USE_SHEENCOLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",t.vertexTangents?"#define USE_TANGENT":"",t.vertexColors||t.instancingColor?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUvs?"#define USE_UV":"",t.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",t.gradientMap?"#define USE_GRADIENTMAP":"",t.flatShading?"#define FLAT_SHADED":"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+l:"",t.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",t.useLegacyLights?"#define LEGACY_LIGHTS":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",t.toneMapping!==zr?"#define TONE_MAPPING":"",t.toneMapping!==zr?pt.tonemapping_pars_fragment:"",t.toneMapping!==zr?H5("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.opaque?"#define OPAQUE":"",pt.encodings_pars_fragment,G5("linearToOutputTexel",t.outputEncoding),t.useDepthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",` +`),A=[m,DC(t),"#define SHADER_NAME "+t.shaderName,y,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.matcap?"#define USE_MATCAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+u:"",t.envMap?"#define "+h:"",t.envMap?"#define "+d:"",p?"#define CUBEUV_TEXEL_WIDTH "+p.texelWidth:"",p?"#define CUBEUV_TEXEL_HEIGHT "+p.texelHeight:"",p?"#define CUBEUV_MAX_MIP "+p.maxMip+".0":"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMap&&t.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",t.normalMap&&t.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",t.clearcoat?"#define USE_CLEARCOAT":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescence?"#define USE_IRIDESCENCE":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",t.specularColorMap?"#define USE_SPECULARCOLORMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaTest?"#define USE_ALPHATEST":"",t.sheen?"#define USE_SHEEN":"",t.sheenColorMap?"#define USE_SHEENCOLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",t.vertexTangents?"#define USE_TANGENT":"",t.vertexColors||t.instancingColor?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUvs?"#define USE_UV":"",t.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",t.gradientMap?"#define USE_GRADIENTMAP":"",t.flatShading?"#define FLAT_SHADED":"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+l:"",t.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",t.useLegacyLights?"#define LEGACY_LIGHTS":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",t.toneMapping!==zr?"#define TONE_MAPPING":"",t.toneMapping!==zr?pt.tonemapping_pars_fragment:"",t.toneMapping!==zr?O5("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.opaque?"#define OPAQUE":"",pt.encodings_pars_fragment,N5("linearToOutputTexel",t.outputEncoding),t.useDepthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",` `].filter(uf).join(` -`)),o=y1(o),o=LC(o,t),o=IC(o,t),a=y1(a),a=LC(a,t),a=IC(a,t),o=DC(o),a=DC(a),t.isWebGL2&&t.isRawShaderMaterial!==!0&&(_=`#version 300 es +`)),o=g1(o),o=RC(o,t),o=LC(o,t),a=g1(a),a=RC(a,t),a=LC(a,t),o=IC(o),a=IC(a),t.isWebGL2&&t.isRawShaderMaterial!==!0&&(_=`#version 300 es `,x=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join(` `)+` -`+x,A=["#define varying in",t.glslVersion===p1?"":"layout(location = 0) out highp vec4 pc_fragColor;",t.glslVersion===p1?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(` +`+x,A=["#define varying in",t.glslVersion===d1?"":"layout(location = 0) out highp vec4 pc_fragColor;",t.glslVersion===d1?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(` `)+` -`+A);const w=_+x+o,M=_+A+a,b=BC(r,35633,w),P=BC(r,35632,M);if(r.attachShader(v,b),r.attachShader(v,P),t.index0AttributeName!==void 0?r.bindAttribLocation(v,0,t.index0AttributeName):t.morphTargets===!0&&r.bindAttribLocation(v,0,"position"),r.linkProgram(v),n.debug.checkShaderErrors){const B=r.getProgramInfoLog(v).trim(),I=r.getShaderInfoLog(b).trim(),z=r.getShaderInfoLog(P).trim();let Z=!0,J=!0;if(r.getProgramParameter(v,35714)===!1){Z=!1;const W=RC(r,b,"vertex"),Q=RC(r,P,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(v,35715)+` +`+A);const w=_+x+o,M=_+A+a,b=PC(r,35633,w),P=PC(r,35632,M);if(r.attachShader(v,b),r.attachShader(v,P),t.index0AttributeName!==void 0?r.bindAttribLocation(v,0,t.index0AttributeName):t.morphTargets===!0&&r.bindAttribLocation(v,0,"position"),r.linkProgram(v),n.debug.checkShaderErrors){const B=r.getProgramInfoLog(v).trim(),I=r.getShaderInfoLog(b).trim(),z=r.getShaderInfoLog(P).trim();let Z=!0,J=!0;if(r.getProgramParameter(v,35714)===!1){Z=!1;const W=BC(r,b,"vertex"),Q=BC(r,P,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(v,35715)+` Program Info Log: `+B+` `+W+` -`+Q)}else B!==""?console.warn("THREE.WebGLProgram: Program Info Log:",B):(I===""||z==="")&&(J=!1);J&&(this.diagnostics={runnable:Z,programLog:B,vertexShader:{log:I,prefix:x},fragmentShader:{log:z,prefix:A}})}r.deleteShader(b),r.deleteShader(P);let R;this.getUniforms=function(){return R===void 0&&(R=new ym(r,v)),R};let E;return this.getAttributes=function(){return E===void 0&&(E=j5(r,v)),E},this.destroy=function(){i.releaseStatesOfProgram(this),r.deleteProgram(v),this.program=void 0},this.name=t.shaderName,this.id=O5++,this.cacheKey=e,this.usedTimes=1,this.program=v,this.vertexShader=b,this.fragmentShader=P,this}let nU=0;class iU{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 rU(e),t.set(e,i)),i}}class rU{constructor(e){this.id=nU++,this.code=e,this.usedTimes=0}}function sU(n,e,t,i,r,s,o){const a=new nl,l=new iU,u=[],h=r.isWebGL2,d=r.logarithmicDepthBuffer,p=r.vertexTextures;let m=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 v(E,B,I,z,Z){const J=z.fog,W=Z.geometry,Q=E.isMeshStandardMaterial?z.environment:null,re=(E.isMeshStandardMaterial?t:e).get(E.envMap||Q),ce=re&&re.mapping===iu?re.image.height:null,L=y[E.type];E.precision!==null&&(m=r.getMaxPrecision(E.precision),m!==E.precision&&console.warn("THREE.WebGLProgram.getParameters:",E.precision,"not supported, using",m,"instead."));const V=W.morphAttributes.position||W.morphAttributes.normal||W.morphAttributes.color,H=V!==void 0?V.length:0;let $=0;W.morphAttributes.position!==void 0&&($=1),W.morphAttributes.normal!==void 0&&($=2),W.morphAttributes.color!==void 0&&($=3);let G,se,me,Y;if(L){const we=Dr[L];G=we.vertexShader,se=we.fragmentShader}else G=E.vertexShader,se=E.fragmentShader,l.update(E),me=l.getVertexShaderID(E),Y=l.getFragmentShaderID(E);const _e=n.getRenderTarget(),Ae=E.alphaTest>0,Ie=E.clearcoat>0,ke=E.iridescence>0;return{isWebGL2:h,shaderID:L,shaderName:E.type,vertexShader:G,fragmentShader:se,defines:E.defines,customVertexShaderID:me,customFragmentShaderID:Y,isRawShaderMaterial:E.isRawShaderMaterial===!0,glslVersion:E.glslVersion,precision:m,instancing:Z.isInstancedMesh===!0,instancingColor:Z.isInstancedMesh===!0&&Z.instanceColor!==null,supportsVertexTextures:p,outputEncoding:_e===null?n.outputEncoding:_e.isXRRenderTarget===!0?_e.texture.encoding:Ko,map:!!E.map,matcap:!!E.matcap,envMap:!!re,envMapMode:re&&re.mapping,envMapCubeUVHeight:ce,lightMap:!!E.lightMap,aoMap:!!E.aoMap,emissiveMap:!!E.emissiveMap,bumpMap:!!E.bumpMap,normalMap:!!E.normalMap,objectSpaceNormalMap:E.normalMapType===LP,tangentSpaceNormalMap:E.normalMapType===ia,decodeVideoTexture:!!E.map&&E.map.isVideoTexture===!0&&E.map.encoding===Ht,clearcoat:Ie,clearcoatMap:Ie&&!!E.clearcoatMap,clearcoatRoughnessMap:Ie&&!!E.clearcoatRoughnessMap,clearcoatNormalMap:Ie&&!!E.clearcoatNormalMap,iridescence:ke,iridescenceMap:ke&&!!E.iridescenceMap,iridescenceThicknessMap:ke&&!!E.iridescenceThicknessMap,displacementMap:!!E.displacementMap,roughnessMap:!!E.roughnessMap,metalnessMap:!!E.metalnessMap,specularMap:!!E.specularMap,specularIntensityMap:!!E.specularIntensityMap,specularColorMap:!!E.specularColorMap,opaque:E.transparent===!1&&E.blending===qa,alphaMap:!!E.alphaMap,alphaTest:Ae,gradientMap:!!E.gradientMap,sheen:E.sheen>0,sheenColorMap:!!E.sheenColorMap,sheenRoughnessMap:!!E.sheenRoughnessMap,transmission:E.transmission>0,transmissionMap:!!E.transmissionMap,thicknessMap:!!E.thicknessMap,combine:E.combine,vertexTangents:!!E.normalMap&&!!W.attributes.tangent,vertexColors:E.vertexColors,vertexAlphas:E.vertexColors===!0&&!!W.attributes.color&&W.attributes.color.itemSize===4,vertexUvs:!!E.map||!!E.bumpMap||!!E.normalMap||!!E.specularMap||!!E.alphaMap||!!E.emissiveMap||!!E.roughnessMap||!!E.metalnessMap||!!E.clearcoatMap||!!E.clearcoatRoughnessMap||!!E.clearcoatNormalMap||!!E.iridescenceMap||!!E.iridescenceThicknessMap||!!E.displacementMap||!!E.transmissionMap||!!E.thicknessMap||!!E.specularIntensityMap||!!E.specularColorMap||!!E.sheenColorMap||!!E.sheenRoughnessMap,uvsVertexOnly:!(E.map||E.bumpMap||E.normalMap||E.specularMap||E.alphaMap||E.emissiveMap||E.roughnessMap||E.metalnessMap||E.clearcoatNormalMap||E.iridescenceMap||E.iridescenceThicknessMap||E.transmission>0||E.transmissionMap||E.thicknessMap||E.specularIntensityMap||E.specularColorMap||E.sheen>0||E.sheenColorMap||E.sheenRoughnessMap)&&!!E.displacementMap,fog:!!J,useFog:E.fog===!0,fogExp2:J&&J.isFogExp2,flatShading:!!E.flatShading,sizeAttenuation:E.sizeAttenuation,logarithmicDepthBuffer:d,skinning:Z.isSkinnedMesh===!0,morphTargets:W.morphAttributes.position!==void 0,morphNormals:W.morphAttributes.normal!==void 0,morphColors:W.morphAttributes.color!==void 0,morphTargetsCount:H,morphTextureStride:$,numDirLights:B.directional.length,numPointLights:B.point.length,numSpotLights:B.spot.length,numSpotLightMaps:B.spotLightMap.length,numRectAreaLights:B.rectArea.length,numHemiLights:B.hemi.length,numDirLightShadows:B.directionalShadowMap.length,numPointLightShadows:B.pointShadowMap.length,numSpotLightShadows:B.spotShadowMap.length,numSpotLightShadowsWithMaps:B.numSpotLightShadowsWithMaps,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:E.dithering,shadowMapEnabled:n.shadowMap.enabled&&I.length>0,shadowMapType:n.shadowMap.type,toneMapping:E.toneMapped?n.toneMapping:zr,useLegacyLights:n.useLegacyLights,premultipliedAlpha:E.premultipliedAlpha,doubleSided:E.side===Fr,flipSided:E.side===Li,useDepthPacking:!!E.depthPacking,depthPacking:E.depthPacking||0,index0AttributeName:E.index0AttributeName,extensionDerivatives:E.extensions&&E.extensions.derivatives,extensionFragDepth:E.extensions&&E.extensions.fragDepth,extensionDrawBuffers:E.extensions&&E.extensions.drawBuffers,extensionShaderTextureLOD:E.extensions&&E.extensions.shaderTextureLOD,rendererExtensionFragDepth:h||i.has("EXT_frag_depth"),rendererExtensionDrawBuffers:h||i.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:h||i.has("EXT_shader_texture_lod"),customProgramCacheKey:E.customProgramCacheKey()}}function x(E){const B=[];if(E.shaderID?B.push(E.shaderID):(B.push(E.customVertexShaderID),B.push(E.customFragmentShaderID)),E.defines!==void 0)for(const I in E.defines)B.push(I),B.push(E.defines[I]);return E.isRawShaderMaterial===!1&&(A(B,E),_(B,E),B.push(n.outputEncoding)),B.push(E.customProgramCacheKey),B.join()}function A(E,B){E.push(B.precision),E.push(B.outputEncoding),E.push(B.envMapMode),E.push(B.envMapCubeUVHeight),E.push(B.combine),E.push(B.vertexUvs),E.push(B.fogExp2),E.push(B.sizeAttenuation),E.push(B.morphTargetsCount),E.push(B.morphAttributeCount),E.push(B.numDirLights),E.push(B.numPointLights),E.push(B.numSpotLights),E.push(B.numSpotLightMaps),E.push(B.numHemiLights),E.push(B.numRectAreaLights),E.push(B.numDirLightShadows),E.push(B.numPointLightShadows),E.push(B.numSpotLightShadows),E.push(B.numSpotLightShadowsWithMaps),E.push(B.shadowMapType),E.push(B.toneMapping),E.push(B.numClippingPlanes),E.push(B.numClipIntersection),E.push(B.depthPacking)}function _(E,B){a.disableAll(),B.isWebGL2&&a.enable(0),B.supportsVertexTextures&&a.enable(1),B.instancing&&a.enable(2),B.instancingColor&&a.enable(3),B.map&&a.enable(4),B.matcap&&a.enable(5),B.envMap&&a.enable(6),B.lightMap&&a.enable(7),B.aoMap&&a.enable(8),B.emissiveMap&&a.enable(9),B.bumpMap&&a.enable(10),B.normalMap&&a.enable(11),B.objectSpaceNormalMap&&a.enable(12),B.tangentSpaceNormalMap&&a.enable(13),B.clearcoat&&a.enable(14),B.clearcoatMap&&a.enable(15),B.clearcoatRoughnessMap&&a.enable(16),B.clearcoatNormalMap&&a.enable(17),B.iridescence&&a.enable(18),B.iridescenceMap&&a.enable(19),B.iridescenceThicknessMap&&a.enable(20),B.displacementMap&&a.enable(21),B.specularMap&&a.enable(22),B.roughnessMap&&a.enable(23),B.metalnessMap&&a.enable(24),B.gradientMap&&a.enable(25),B.alphaMap&&a.enable(26),B.alphaTest&&a.enable(27),B.vertexColors&&a.enable(28),B.vertexAlphas&&a.enable(29),B.vertexUvs&&a.enable(30),B.vertexTangents&&a.enable(31),B.uvsVertexOnly&&a.enable(32),E.push(a.mask),a.disableAll(),B.fog&&a.enable(0),B.useFog&&a.enable(1),B.flatShading&&a.enable(2),B.logarithmicDepthBuffer&&a.enable(3),B.skinning&&a.enable(4),B.morphTargets&&a.enable(5),B.morphNormals&&a.enable(6),B.morphColors&&a.enable(7),B.premultipliedAlpha&&a.enable(8),B.shadowMapEnabled&&a.enable(9),B.useLegacyLights&&a.enable(10),B.doubleSided&&a.enable(11),B.flipSided&&a.enable(12),B.useDepthPacking&&a.enable(13),B.dithering&&a.enable(14),B.specularIntensityMap&&a.enable(15),B.specularColorMap&&a.enable(16),B.transmission&&a.enable(17),B.transmissionMap&&a.enable(18),B.thicknessMap&&a.enable(19),B.sheen&&a.enable(20),B.sheenColorMap&&a.enable(21),B.sheenRoughnessMap&&a.enable(22),B.decodeVideoTexture&&a.enable(23),B.opaque&&a.enable(24),E.push(a.mask)}function w(E){const B=y[E.type];let I;if(B){const z=Dr[B];I=zP.clone(z.uniforms)}else I=E.uniforms;return I}function M(E,B){let I;for(let z=0,Z=u.length;z0?i.push(A):m.transparent===!0?r.push(A):t.push(A)}function l(d,p,m,y,v,x){const A=o(d,p,m,y,v,x);m.transmission>0?i.unshift(A):m.transparent===!0?r.unshift(A):t.unshift(A)}function u(d,p){t.length>1&&t.sort(d||aU),i.length>1&&i.sort(p||kC),r.length>1&&r.sort(p||kC)}function h(){for(let d=e,p=n.length;d=s.length?(o=new NC,s.push(o)):o=s[r],o}function t(){n=new WeakMap}return{get:e,dispose:t}}function cU(){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 F,color:new De};break;case"SpotLight":t={position:new F,direction:new F,color:new De,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new F,color:new De,distance:0,decay:0};break;case"HemisphereLight":t={direction:new F,skyColor:new De,groundColor:new De};break;case"RectAreaLight":t={color:new De,position:new F,halfWidth:new F,halfHeight:new F};break}return n[e.id]=t,t}}}function uU(){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 pe};break;case"SpotLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new pe};break;case"PointLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new pe,shadowCameraNear:1,shadowCameraFar:1e3};break}return n[e.id]=t,t}}}let fU=0;function hU(n,e){return(e.castShadow?2:0)-(n.castShadow?2:0)+(e.map?1:0)-(n.map?1:0)}function dU(n,e){const t=new cU,i=uU(),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 F);const s=new F,o=new ot,a=new ot;function l(h,d){let p=0,m=0,y=0;for(let z=0;z<9;z++)r.probe[z].set(0,0,0);let v=0,x=0,A=0,_=0,w=0,M=0,b=0,P=0,R=0,E=0;h.sort(hU);const B=d===!0?Math.PI:1;for(let z=0,Z=h.length;z0&&(e.isWebGL2||n.has("OES_texture_float_linear")===!0?(r.rectAreaLTC1=Re.LTC_FLOAT_1,r.rectAreaLTC2=Re.LTC_FLOAT_2):n.has("OES_texture_half_float_linear")===!0?(r.rectAreaLTC1=Re.LTC_HALF_1,r.rectAreaLTC2=Re.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),r.ambient[0]=p,r.ambient[1]=m,r.ambient[2]=y;const I=r.hash;(I.directionalLength!==v||I.pointLength!==x||I.spotLength!==A||I.rectAreaLength!==_||I.hemiLength!==w||I.numDirectionalShadows!==M||I.numPointShadows!==b||I.numSpotShadows!==P||I.numSpotMaps!==R)&&(r.directional.length=v,r.spot.length=A,r.rectArea.length=_,r.point.length=x,r.hemi.length=w,r.directionalShadow.length=M,r.directionalShadowMap.length=M,r.pointShadow.length=b,r.pointShadowMap.length=b,r.spotShadow.length=P,r.spotShadowMap.length=P,r.directionalShadowMatrix.length=M,r.pointShadowMatrix.length=b,r.spotLightMatrix.length=P+R-E,r.spotLightMap.length=R,r.numSpotLightShadowsWithMaps=E,I.directionalLength=v,I.pointLength=x,I.spotLength=A,I.rectAreaLength=_,I.hemiLength=w,I.numDirectionalShadows=M,I.numPointShadows=b,I.numSpotShadows=P,I.numSpotMaps=R,r.version=fU++)}function u(h,d){let p=0,m=0,y=0,v=0,x=0;const A=d.matrixWorldInverse;for(let _=0,w=h.length;_=a.length?(l=new OC(n,e),a.push(l)):l=a[o],l}function r(){t=new WeakMap}return{get:i,dispose:r}}class oA extends Pn{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=BP,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 aA extends Pn{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.referencePosition=new F,this.nearDistance=1,this.farDistance=1e3,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.referencePosition.copy(e.referencePosition),this.nearDistance=e.nearDistance,this.farDistance=e.farDistance,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}const mU=`void main() { +`+Q)}else B!==""?console.warn("THREE.WebGLProgram: Program Info Log:",B):(I===""||z==="")&&(J=!1);J&&(this.diagnostics={runnable:Z,programLog:B,vertexShader:{log:I,prefix:x},fragmentShader:{log:z,prefix:A}})}r.deleteShader(b),r.deleteShader(P);let R;this.getUniforms=function(){return R===void 0&&(R=new gm(r,v)),R};let E;return this.getAttributes=function(){return E===void 0&&(E=G5(r,v)),E},this.destroy=function(){i.releaseStatesOfProgram(this),r.deleteProgram(v),this.program=void 0},this.name=t.shaderName,this.id=D5++,this.cacheKey=e,this.usedTimes=1,this.program=v,this.vertexShader=b,this.fragmentShader=P,this}let q5=0;class $5{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 eU(e),t.set(e,i)),i}}class eU{constructor(e){this.id=q5++,this.code=e,this.usedTimes=0}}function tU(n,e,t,i,r,s,o){const a=new nl,l=new $5,u=[],h=r.isWebGL2,d=r.logarithmicDepthBuffer,p=r.vertexTextures;let m=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 v(E,B,I,z,Z){const J=z.fog,W=Z.geometry,Q=E.isMeshStandardMaterial?z.environment:null,re=(E.isMeshStandardMaterial?t:e).get(E.envMap||Q),ce=re&&re.mapping===iu?re.image.height:null,L=y[E.type];E.precision!==null&&(m=r.getMaxPrecision(E.precision),m!==E.precision&&console.warn("THREE.WebGLProgram.getParameters:",E.precision,"not supported, using",m,"instead."));const V=W.morphAttributes.position||W.morphAttributes.normal||W.morphAttributes.color,H=V!==void 0?V.length:0;let $=0;W.morphAttributes.position!==void 0&&($=1),W.morphAttributes.normal!==void 0&&($=2),W.morphAttributes.color!==void 0&&($=3);let G,se,me,Y;if(L){const we=Dr[L];G=we.vertexShader,se=we.fragmentShader}else G=E.vertexShader,se=E.fragmentShader,l.update(E),me=l.getVertexShaderID(E),Y=l.getFragmentShaderID(E);const _e=n.getRenderTarget(),Ae=E.alphaTest>0,Ie=E.clearcoat>0,ke=E.iridescence>0;return{isWebGL2:h,shaderID:L,shaderName:E.type,vertexShader:G,fragmentShader:se,defines:E.defines,customVertexShaderID:me,customFragmentShaderID:Y,isRawShaderMaterial:E.isRawShaderMaterial===!0,glslVersion:E.glslVersion,precision:m,instancing:Z.isInstancedMesh===!0,instancingColor:Z.isInstancedMesh===!0&&Z.instanceColor!==null,supportsVertexTextures:p,outputEncoding:_e===null?n.outputEncoding:_e.isXRRenderTarget===!0?_e.texture.encoding:Ko,map:!!E.map,matcap:!!E.matcap,envMap:!!re,envMapMode:re&&re.mapping,envMapCubeUVHeight:ce,lightMap:!!E.lightMap,aoMap:!!E.aoMap,emissiveMap:!!E.emissiveMap,bumpMap:!!E.bumpMap,normalMap:!!E.normalMap,objectSpaceNormalMap:E.normalMapType===BP,tangentSpaceNormalMap:E.normalMapType===ia,decodeVideoTexture:!!E.map&&E.map.isVideoTexture===!0&&E.map.encoding===Ht,clearcoat:Ie,clearcoatMap:Ie&&!!E.clearcoatMap,clearcoatRoughnessMap:Ie&&!!E.clearcoatRoughnessMap,clearcoatNormalMap:Ie&&!!E.clearcoatNormalMap,iridescence:ke,iridescenceMap:ke&&!!E.iridescenceMap,iridescenceThicknessMap:ke&&!!E.iridescenceThicknessMap,displacementMap:!!E.displacementMap,roughnessMap:!!E.roughnessMap,metalnessMap:!!E.metalnessMap,specularMap:!!E.specularMap,specularIntensityMap:!!E.specularIntensityMap,specularColorMap:!!E.specularColorMap,opaque:E.transparent===!1&&E.blending===qa,alphaMap:!!E.alphaMap,alphaTest:Ae,gradientMap:!!E.gradientMap,sheen:E.sheen>0,sheenColorMap:!!E.sheenColorMap,sheenRoughnessMap:!!E.sheenRoughnessMap,transmission:E.transmission>0,transmissionMap:!!E.transmissionMap,thicknessMap:!!E.thicknessMap,combine:E.combine,vertexTangents:!!E.normalMap&&!!W.attributes.tangent,vertexColors:E.vertexColors,vertexAlphas:E.vertexColors===!0&&!!W.attributes.color&&W.attributes.color.itemSize===4,vertexUvs:!!E.map||!!E.bumpMap||!!E.normalMap||!!E.specularMap||!!E.alphaMap||!!E.emissiveMap||!!E.roughnessMap||!!E.metalnessMap||!!E.clearcoatMap||!!E.clearcoatRoughnessMap||!!E.clearcoatNormalMap||!!E.iridescenceMap||!!E.iridescenceThicknessMap||!!E.displacementMap||!!E.transmissionMap||!!E.thicknessMap||!!E.specularIntensityMap||!!E.specularColorMap||!!E.sheenColorMap||!!E.sheenRoughnessMap,uvsVertexOnly:!(E.map||E.bumpMap||E.normalMap||E.specularMap||E.alphaMap||E.emissiveMap||E.roughnessMap||E.metalnessMap||E.clearcoatNormalMap||E.iridescenceMap||E.iridescenceThicknessMap||E.transmission>0||E.transmissionMap||E.thicknessMap||E.specularIntensityMap||E.specularColorMap||E.sheen>0||E.sheenColorMap||E.sheenRoughnessMap)&&!!E.displacementMap,fog:!!J,useFog:E.fog===!0,fogExp2:J&&J.isFogExp2,flatShading:!!E.flatShading,sizeAttenuation:E.sizeAttenuation,logarithmicDepthBuffer:d,skinning:Z.isSkinnedMesh===!0,morphTargets:W.morphAttributes.position!==void 0,morphNormals:W.morphAttributes.normal!==void 0,morphColors:W.morphAttributes.color!==void 0,morphTargetsCount:H,morphTextureStride:$,numDirLights:B.directional.length,numPointLights:B.point.length,numSpotLights:B.spot.length,numSpotLightMaps:B.spotLightMap.length,numRectAreaLights:B.rectArea.length,numHemiLights:B.hemi.length,numDirLightShadows:B.directionalShadowMap.length,numPointLightShadows:B.pointShadowMap.length,numSpotLightShadows:B.spotShadowMap.length,numSpotLightShadowsWithMaps:B.numSpotLightShadowsWithMaps,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:E.dithering,shadowMapEnabled:n.shadowMap.enabled&&I.length>0,shadowMapType:n.shadowMap.type,toneMapping:E.toneMapped?n.toneMapping:zr,useLegacyLights:n.useLegacyLights,premultipliedAlpha:E.premultipliedAlpha,doubleSided:E.side===Fr,flipSided:E.side===Li,useDepthPacking:!!E.depthPacking,depthPacking:E.depthPacking||0,index0AttributeName:E.index0AttributeName,extensionDerivatives:E.extensions&&E.extensions.derivatives,extensionFragDepth:E.extensions&&E.extensions.fragDepth,extensionDrawBuffers:E.extensions&&E.extensions.drawBuffers,extensionShaderTextureLOD:E.extensions&&E.extensions.shaderTextureLOD,rendererExtensionFragDepth:h||i.has("EXT_frag_depth"),rendererExtensionDrawBuffers:h||i.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:h||i.has("EXT_shader_texture_lod"),customProgramCacheKey:E.customProgramCacheKey()}}function x(E){const B=[];if(E.shaderID?B.push(E.shaderID):(B.push(E.customVertexShaderID),B.push(E.customFragmentShaderID)),E.defines!==void 0)for(const I in E.defines)B.push(I),B.push(E.defines[I]);return E.isRawShaderMaterial===!1&&(A(B,E),_(B,E),B.push(n.outputEncoding)),B.push(E.customProgramCacheKey),B.join()}function A(E,B){E.push(B.precision),E.push(B.outputEncoding),E.push(B.envMapMode),E.push(B.envMapCubeUVHeight),E.push(B.combine),E.push(B.vertexUvs),E.push(B.fogExp2),E.push(B.sizeAttenuation),E.push(B.morphTargetsCount),E.push(B.morphAttributeCount),E.push(B.numDirLights),E.push(B.numPointLights),E.push(B.numSpotLights),E.push(B.numSpotLightMaps),E.push(B.numHemiLights),E.push(B.numRectAreaLights),E.push(B.numDirLightShadows),E.push(B.numPointLightShadows),E.push(B.numSpotLightShadows),E.push(B.numSpotLightShadowsWithMaps),E.push(B.shadowMapType),E.push(B.toneMapping),E.push(B.numClippingPlanes),E.push(B.numClipIntersection),E.push(B.depthPacking)}function _(E,B){a.disableAll(),B.isWebGL2&&a.enable(0),B.supportsVertexTextures&&a.enable(1),B.instancing&&a.enable(2),B.instancingColor&&a.enable(3),B.map&&a.enable(4),B.matcap&&a.enable(5),B.envMap&&a.enable(6),B.lightMap&&a.enable(7),B.aoMap&&a.enable(8),B.emissiveMap&&a.enable(9),B.bumpMap&&a.enable(10),B.normalMap&&a.enable(11),B.objectSpaceNormalMap&&a.enable(12),B.tangentSpaceNormalMap&&a.enable(13),B.clearcoat&&a.enable(14),B.clearcoatMap&&a.enable(15),B.clearcoatRoughnessMap&&a.enable(16),B.clearcoatNormalMap&&a.enable(17),B.iridescence&&a.enable(18),B.iridescenceMap&&a.enable(19),B.iridescenceThicknessMap&&a.enable(20),B.displacementMap&&a.enable(21),B.specularMap&&a.enable(22),B.roughnessMap&&a.enable(23),B.metalnessMap&&a.enable(24),B.gradientMap&&a.enable(25),B.alphaMap&&a.enable(26),B.alphaTest&&a.enable(27),B.vertexColors&&a.enable(28),B.vertexAlphas&&a.enable(29),B.vertexUvs&&a.enable(30),B.vertexTangents&&a.enable(31),B.uvsVertexOnly&&a.enable(32),E.push(a.mask),a.disableAll(),B.fog&&a.enable(0),B.useFog&&a.enable(1),B.flatShading&&a.enable(2),B.logarithmicDepthBuffer&&a.enable(3),B.skinning&&a.enable(4),B.morphTargets&&a.enable(5),B.morphNormals&&a.enable(6),B.morphColors&&a.enable(7),B.premultipliedAlpha&&a.enable(8),B.shadowMapEnabled&&a.enable(9),B.useLegacyLights&&a.enable(10),B.doubleSided&&a.enable(11),B.flipSided&&a.enable(12),B.useDepthPacking&&a.enable(13),B.dithering&&a.enable(14),B.specularIntensityMap&&a.enable(15),B.specularColorMap&&a.enable(16),B.transmission&&a.enable(17),B.transmissionMap&&a.enable(18),B.thicknessMap&&a.enable(19),B.sheen&&a.enable(20),B.sheenColorMap&&a.enable(21),B.sheenRoughnessMap&&a.enable(22),B.decodeVideoTexture&&a.enable(23),B.opaque&&a.enable(24),E.push(a.mask)}function w(E){const B=y[E.type];let I;if(B){const z=Dr[B];I=NP.clone(z.uniforms)}else I=E.uniforms;return I}function M(E,B){let I;for(let z=0,Z=u.length;z0?i.push(A):m.transparent===!0?r.push(A):t.push(A)}function l(d,p,m,y,v,x){const A=o(d,p,m,y,v,x);m.transmission>0?i.unshift(A):m.transparent===!0?r.unshift(A):t.unshift(A)}function u(d,p){t.length>1&&t.sort(d||iU),i.length>1&&i.sort(p||FC),r.length>1&&r.sort(p||FC)}function h(){for(let d=e,p=n.length;d=s.length?(o=new kC,s.push(o)):o=s[r],o}function t(){n=new WeakMap}return{get:e,dispose:t}}function sU(){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 F,color:new De};break;case"SpotLight":t={position:new F,direction:new F,color:new De,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new F,color:new De,distance:0,decay:0};break;case"HemisphereLight":t={direction:new F,skyColor:new De,groundColor:new De};break;case"RectAreaLight":t={color:new De,position:new F,halfWidth:new F,halfHeight:new F};break}return n[e.id]=t,t}}}function oU(){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 pe};break;case"SpotLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new pe};break;case"PointLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new pe,shadowCameraNear:1,shadowCameraFar:1e3};break}return n[e.id]=t,t}}}let aU=0;function lU(n,e){return(e.castShadow?2:0)-(n.castShadow?2:0)+(e.map?1:0)-(n.map?1:0)}function cU(n,e){const t=new sU,i=oU(),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 F);const s=new F,o=new ot,a=new ot;function l(h,d){let p=0,m=0,y=0;for(let z=0;z<9;z++)r.probe[z].set(0,0,0);let v=0,x=0,A=0,_=0,w=0,M=0,b=0,P=0,R=0,E=0;h.sort(lU);const B=d===!0?Math.PI:1;for(let z=0,Z=h.length;z0&&(e.isWebGL2||n.has("OES_texture_float_linear")===!0?(r.rectAreaLTC1=Re.LTC_FLOAT_1,r.rectAreaLTC2=Re.LTC_FLOAT_2):n.has("OES_texture_half_float_linear")===!0?(r.rectAreaLTC1=Re.LTC_HALF_1,r.rectAreaLTC2=Re.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),r.ambient[0]=p,r.ambient[1]=m,r.ambient[2]=y;const I=r.hash;(I.directionalLength!==v||I.pointLength!==x||I.spotLength!==A||I.rectAreaLength!==_||I.hemiLength!==w||I.numDirectionalShadows!==M||I.numPointShadows!==b||I.numSpotShadows!==P||I.numSpotMaps!==R)&&(r.directional.length=v,r.spot.length=A,r.rectArea.length=_,r.point.length=x,r.hemi.length=w,r.directionalShadow.length=M,r.directionalShadowMap.length=M,r.pointShadow.length=b,r.pointShadowMap.length=b,r.spotShadow.length=P,r.spotShadowMap.length=P,r.directionalShadowMatrix.length=M,r.pointShadowMatrix.length=b,r.spotLightMatrix.length=P+R-E,r.spotLightMap.length=R,r.numSpotLightShadowsWithMaps=E,I.directionalLength=v,I.pointLength=x,I.spotLength=A,I.rectAreaLength=_,I.hemiLength=w,I.numDirectionalShadows=M,I.numPointShadows=b,I.numSpotShadows=P,I.numSpotMaps=R,r.version=aU++)}function u(h,d){let p=0,m=0,y=0,v=0,x=0;const A=d.matrixWorldInverse;for(let _=0,w=h.length;_=a.length?(l=new NC(n,e),a.push(l)):l=a[o],l}function r(){t=new WeakMap}return{get:i,dispose:r}}class sA extends Pn{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=TP,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 oA extends Pn{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.referencePosition=new F,this.nearDistance=1,this.farDistance=1e3,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.referencePosition.copy(e.referencePosition),this.nearDistance=e.nearDistance,this.farDistance=e.farDistance,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}const fU=`void main() { gl_Position = vec4( position, 1.0 ); -}`,gU=`uniform sampler2D shadow_pass; +}`,hU=`uniform sampler2D shadow_pass; uniform vec2 resolution; uniform float radius; #include @@ -3258,7 +3258,7 @@ void main() { squared_mean = squared_mean / samples; float std_dev = sqrt( squared_mean - mean * mean ); gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); -}`;function yU(n,e,t){let i=new Fg;const r=new pe,s=new pe,o=new Nt,a=new oA({depthPacking:RP}),l=new aA,u={},h=t.maxTextureSize,d={[hs]:Li,[Li]:hs,[Fr]:Fr},p=new ps({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new pe},radius:{value:4}},vertexShader:mU,fragmentShader:gU}),m=p.clone();m.defines.HORIZONTAL_PASS=1;const y=new ft;y.setAttribute("position",new Lt(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const v=new In(y,p),x=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=Bg,this.render=function(M,b,P){if(x.enabled===!1||x.autoUpdate===!1&&x.needsUpdate===!1||M.length===0)return;const R=n.getRenderTarget(),E=n.getActiveCubeFace(),B=n.getActiveMipmapLevel(),I=n.state;I.setBlending(Ws),I.buffers.color.setClear(1,1,1,1),I.buffers.depth.setTest(!0),I.setScissorTest(!1);for(let z=0,Z=M.length;zh||r.y>h)&&(r.x>h&&(s.x=Math.floor(h/Q.x),r.x=s.x*Q.x,W.mapSize.x=s.x),r.y>h&&(s.y=Math.floor(h/Q.y),r.y=s.y*Q.y,W.mapSize.y=s.y)),W.map===null){const ce=this.type!==Va?{minFilter:mn,magFilter:mn}:{};W.map=new Gr(r.x,r.y,ce),W.map.texture.name=J.name+".shadowMap",W.camera.updateProjectionMatrix()}n.setRenderTarget(W.map),n.clear();const re=W.getViewportCount();for(let ce=0;ce0||b.map&&b.alphaTest>0){const Z=I.uuid,J=b.uuid;let W=u[Z];W===void 0&&(W={},u[Z]=W);let Q=W[J];Q===void 0&&(Q=I.clone(),W[J]=Q),I=Q}return I.visible=b.visible,I.wireframe=b.wireframe,B===Va?I.side=b.shadowSide!==null?b.shadowSide:b.side:I.side=b.shadowSide!==null?b.shadowSide:d[b.side],I.alphaMap=b.alphaMap,I.alphaTest=b.alphaTest,I.map=b.map,I.clipShadows=b.clipShadows,I.clippingPlanes=b.clippingPlanes,I.clipIntersection=b.clipIntersection,I.displacementMap=b.displacementMap,I.displacementScale=b.displacementScale,I.displacementBias=b.displacementBias,I.wireframeLinewidth=b.wireframeLinewidth,I.linewidth=b.linewidth,P.isPointLight===!0&&I.isMeshDistanceMaterial===!0&&(I.referencePosition.setFromMatrixPosition(P.matrixWorld),I.nearDistance=R,I.farDistance=E),I}function w(M,b,P,R,E){if(M.visible===!1)return;if(M.layers.test(b.layers)&&(M.isMesh||M.isLine||M.isPoints)&&(M.castShadow||M.receiveShadow&&E===Va)&&(!M.frustumCulled||i.intersectsObject(M))){M.modelViewMatrix.multiplyMatrices(P.matrixWorldInverse,M.matrixWorld);const z=e.update(M),Z=M.material;if(Array.isArray(Z)){const J=z.groups;for(let W=0,Q=J.length;W=1):L.indexOf("OpenGL ES")!==-1&&(ce=parseFloat(/^OpenGL ES (\d)/.exec(L)[1]),re=ce>=2);let V=null,H={};const $=n.getParameter(3088),G=n.getParameter(2978),se=new Nt().fromArray($),me=new Nt().fromArray(G);function Y(j,oe,xe){const Le=new Uint8Array(4),We=n.createTexture();n.bindTexture(j,We),n.texParameteri(j,10241,9728),n.texParameteri(j,10240,9728);for(let It=0;It"u"?!1:/OculusBrowser/g.test(navigator.userAgent),y=new WeakMap;let v;const x=new WeakMap;let A=!1;try{A=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function _(N,D){return A?new OffscreenCanvas(N,D):eh("canvas")}function w(N,D,ae,Ce){let Ee=1;if((N.width>Ce||N.height>Ce)&&(Ee=Ce/Math.max(N.width,N.height)),Ee<1||D===!0)if(typeof HTMLImageElement<"u"&&N instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&N instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&N instanceof ImageBitmap){const Pe=D?FP:Math.floor,Ke=Pe(Ee*N.width),Oe=Pe(Ee*N.height);v===void 0&&(v=_(Ke,Oe));const ye=ae?_(Ke,Oe):v;return ye.width=Ke,ye.height=Oe,ye.getContext("2d").drawImage(N,0,0,Ke,Oe),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+N.width+"x"+N.height+") to ("+Ke+"x"+Oe+")."),ye}else return"data"in N&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+N.width+"x"+N.height+")."),N;return N}function M(N){return m1(N.width)&&m1(N.height)}function b(N){return a?!1:N.wrapS!==Yn||N.wrapT!==Yn||N.minFilter!==mn&&N.minFilter!==nn}function P(N,D){return N.generateMipmaps&&D&&N.minFilter!==mn&&N.minFilter!==nn}function R(N){n.generateMipmap(N)}function E(N,D,ae,Ce,Ee=!1){if(a===!1)return D;if(N!==null){if(n[N]!==void 0)return n[N];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+N+"'")}let Pe=D;return D===6403&&(ae===5126&&(Pe=33326),ae===5131&&(Pe=33325),ae===5121&&(Pe=33321)),D===33319&&(ae===5126&&(Pe=33328),ae===5131&&(Pe=33327),ae===5121&&(Pe=33323)),D===6408&&(ae===5126&&(Pe=34836),ae===5131&&(Pe=34842),ae===5121&&(Pe=Ce===Ht&&Ee===!1?35907:32856),ae===32819&&(Pe=32854),ae===32820&&(Pe=32855)),(Pe===33325||Pe===33326||Pe===33327||Pe===33328||Pe===34842||Pe===34836)&&e.get("EXT_color_buffer_float"),Pe}function B(N,D,ae){return P(N,ae)===!0||N.isFramebufferTexture&&N.minFilter!==mn&&N.minFilter!==nn?Math.log2(Math.max(D.width,D.height))+1:N.mipmaps!==void 0&&N.mipmaps.length>0?N.mipmaps.length:N.isCompressedTexture&&Array.isArray(N.image)?D.mipmaps.length:1}function I(N){return N===mn||N===Qf||N===Pc?9728:9729}function z(N){const D=N.target;D.removeEventListener("dispose",z),J(D),D.isVideoTexture&&y.delete(D)}function Z(N){const D=N.target;D.removeEventListener("dispose",Z),Q(D)}function J(N){const D=i.get(N);if(D.__webglInit===void 0)return;const ae=N.source,Ce=x.get(ae);if(Ce){const Ee=Ce[D.__cacheKey];Ee.usedTimes--,Ee.usedTimes===0&&W(N),Object.keys(Ce).length===0&&x.delete(ae)}i.remove(N)}function W(N){const D=i.get(N);n.deleteTexture(D.__webglTexture);const ae=N.source,Ce=x.get(ae);delete Ce[D.__cacheKey],o.memory.textures--}function Q(N){const D=N.texture,ae=i.get(N),Ce=i.get(D);if(Ce.__webglTexture!==void 0&&(n.deleteTexture(Ce.__webglTexture),o.memory.textures--),N.depthTexture&&N.depthTexture.dispose(),N.isWebGLCubeRenderTarget)for(let Ee=0;Ee<6;Ee++)n.deleteFramebuffer(ae.__webglFramebuffer[Ee]),ae.__webglDepthbuffer&&n.deleteRenderbuffer(ae.__webglDepthbuffer[Ee]);else{if(n.deleteFramebuffer(ae.__webglFramebuffer),ae.__webglDepthbuffer&&n.deleteRenderbuffer(ae.__webglDepthbuffer),ae.__webglMultisampledFramebuffer&&n.deleteFramebuffer(ae.__webglMultisampledFramebuffer),ae.__webglColorRenderbuffer)for(let Ee=0;Ee=l&&console.warn("THREE.WebGLTextures: Trying to use "+N+" texture units while this GPU supports only "+l),re+=1,N}function V(N){const D=[];return D.push(N.wrapS),D.push(N.wrapT),D.push(N.wrapR||0),D.push(N.magFilter),D.push(N.minFilter),D.push(N.anisotropy),D.push(N.internalFormat),D.push(N.format),D.push(N.type),D.push(N.generateMipmaps),D.push(N.premultiplyAlpha),D.push(N.flipY),D.push(N.unpackAlignment),D.push(N.encoding),D.join()}function H(N,D){const ae=i.get(N);if(N.isVideoTexture&&vt(N),N.isRenderTargetTexture===!1&&N.version>0&&ae.__version!==N.version){const Ce=N.image;if(Ce===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(Ce.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{Ie(ae,N,D);return}}t.bindTexture(3553,ae.__webglTexture,33984+D)}function $(N,D){const ae=i.get(N);if(N.version>0&&ae.__version!==N.version){Ie(ae,N,D);return}t.bindTexture(35866,ae.__webglTexture,33984+D)}function G(N,D){const ae=i.get(N);if(N.version>0&&ae.__version!==N.version){Ie(ae,N,D);return}t.bindTexture(32879,ae.__webglTexture,33984+D)}function se(N,D){const ae=i.get(N);if(N.version>0&&ae.__version!==N.version){ke(ae,N,D);return}t.bindTexture(34067,ae.__webglTexture,33984+D)}const me={[Yo]:10497,[Yn]:33071,[Gc]:33648},Y={[mn]:9728,[Qf]:9984,[Pc]:9986,[nn]:9729,[Lg]:9985,[ds]:9987};function _e(N,D,ae){if(ae?(n.texParameteri(N,10242,me[D.wrapS]),n.texParameteri(N,10243,me[D.wrapT]),(N===32879||N===35866)&&n.texParameteri(N,32882,me[D.wrapR]),n.texParameteri(N,10240,Y[D.magFilter]),n.texParameteri(N,10241,Y[D.minFilter])):(n.texParameteri(N,10242,33071),n.texParameteri(N,10243,33071),(N===32879||N===35866)&&n.texParameteri(N,32882,33071),(D.wrapS!==Yn||D.wrapT!==Yn)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),n.texParameteri(N,10240,I(D.magFilter)),n.texParameteri(N,10241,I(D.minFilter)),D.minFilter!==mn&&D.minFilter!==nn&&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 Ce=e.get("EXT_texture_filter_anisotropic");if(D.magFilter===mn||D.minFilter!==Pc&&D.minFilter!==ds||D.type===zs&&e.has("OES_texture_float_linear")===!1||a===!1&&D.type===Hc&&e.has("OES_texture_half_float_linear")===!1)return;(D.anisotropy>1||i.get(D).__currentAnisotropy)&&(n.texParameterf(N,Ce.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(D.anisotropy,r.getMaxAnisotropy())),i.get(D).__currentAnisotropy=D.anisotropy)}}function Ae(N,D){let ae=!1;N.__webglInit===void 0&&(N.__webglInit=!0,D.addEventListener("dispose",z));const Ce=D.source;let Ee=x.get(Ce);Ee===void 0&&(Ee={},x.set(Ce,Ee));const Pe=V(D);if(Pe!==N.__cacheKey){Ee[Pe]===void 0&&(Ee[Pe]={texture:n.createTexture(),usedTimes:0},o.memory.textures++,ae=!0),Ee[Pe].usedTimes++;const Ke=Ee[N.__cacheKey];Ke!==void 0&&(Ee[N.__cacheKey].usedTimes--,Ke.usedTimes===0&&W(D)),N.__cacheKey=Pe,N.__webglTexture=Ee[Pe].texture}return ae}function Ie(N,D,ae){let Ce=3553;(D.isDataArrayTexture||D.isCompressedArrayTexture)&&(Ce=35866),D.isData3DTexture&&(Ce=32879);const Ee=Ae(N,D),Pe=D.source;t.bindTexture(Ce,N.__webglTexture,33984+ae);const Ke=i.get(Pe);if(Pe.version!==Ke.__version||Ee===!0){t.activeTexture(33984+ae),n.pixelStorei(37440,D.flipY),n.pixelStorei(37441,D.premultiplyAlpha),n.pixelStorei(3317,D.unpackAlignment),n.pixelStorei(37443,0);const Oe=b(D)&&M(D.image)===!1;let ye=w(D.image,Oe,!1,h);ye=_t(D,ye);const $e=M(ye)||a,je=s.convert(D.format,D.encoding);let rt=s.convert(D.type),tt=E(D.internalFormat,je,rt,D.encoding,D.isVideoTexture);_e(Ce,D,$e);let Qe;const X=D.mipmaps,ve=a&&D.isVideoTexture!==!0,ze=Ke.__version===void 0||Ee===!0,j=B(D,ye,$e);if(D.isDepthTexture)tt=6402,a?D.type===zs?tt=36012:D.type===Po?tt=33190:D.type===$a?tt=35056:tt=33189:D.type===zs&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),D.format===Uo&&tt===6402&&D.type!==X_&&D.type!==Po&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),D.type=Po,rt=s.convert(D.type)),D.format===cl&&tt===6402&&(tt=34041,D.type!==$a&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),D.type=$a,rt=s.convert(D.type))),ze&&(ve?t.texStorage2D(3553,1,tt,ye.width,ye.height):t.texImage2D(3553,0,tt,ye.width,ye.height,0,je,rt,null));else if(D.isDataTexture)if(X.length>0&&$e){ve&&ze&&t.texStorage2D(3553,j,tt,X[0].width,X[0].height);for(let oe=0,xe=X.length;oe>=1,xe>>=1}}else if(X.length>0&&$e){ve&&ze&&t.texStorage2D(3553,j,tt,X[0].width,X[0].height);for(let oe=0,xe=X.length;oe0&&ze++,t.texStorage2D(34067,ze,Qe,ye[0].width,ye[0].height));for(let oe=0;oe<6;oe++)if(Oe){X?t.texSubImage2D(34069+oe,0,0,0,ye[oe].width,ye[oe].height,rt,tt,ye[oe].data):t.texImage2D(34069+oe,0,Qe,ye[oe].width,ye[oe].height,0,rt,tt,ye[oe].data);for(let xe=0;xe=34069&&Ee<=34074)&&n.framebufferTexture2D(36160,Ce,Ee,i.get(ae).__webglTexture,0),t.bindFramebuffer(36160,null)}function we(N,D,ae){if(n.bindRenderbuffer(36161,N),D.depthBuffer&&!D.stencilBuffer){let Ce=33189;if(ae||et(D)){const Ee=D.depthTexture;Ee&&Ee.isDepthTexture&&(Ee.type===zs?Ce=36012:Ee.type===Po&&(Ce=33190));const Pe=Je(D);et(D)?p.renderbufferStorageMultisampleEXT(36161,Pe,Ce,D.width,D.height):n.renderbufferStorageMultisample(36161,Pe,Ce,D.width,D.height)}else n.renderbufferStorage(36161,Ce,D.width,D.height);n.framebufferRenderbuffer(36160,36096,36161,N)}else if(D.depthBuffer&&D.stencilBuffer){const Ce=Je(D);ae&&et(D)===!1?n.renderbufferStorageMultisample(36161,Ce,35056,D.width,D.height):et(D)?p.renderbufferStorageMultisampleEXT(36161,Ce,35056,D.width,D.height):n.renderbufferStorage(36161,34041,D.width,D.height),n.framebufferRenderbuffer(36160,33306,36161,N)}else{const Ce=D.isWebGLMultipleRenderTargets===!0?D.texture:[D.texture];for(let Ee=0;Ee0&&et(N)===!1){const Oe=Pe?D:[D];ae.__webglMultisampledFramebuffer=n.createFramebuffer(),ae.__webglColorRenderbuffer=[],t.bindFramebuffer(36160,ae.__webglMultisampledFramebuffer);for(let ye=0;ye0&&et(N)===!1){const D=N.isWebGLMultipleRenderTargets?N.texture:[N.texture],ae=N.width,Ce=N.height;let Ee=16384;const Pe=[],Ke=N.stencilBuffer?33306:36096,Oe=i.get(N),ye=N.isWebGLMultipleRenderTargets===!0;if(ye)for(let $e=0;$e0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&D.__useRenderToTexture!==!1}function vt(N){const D=o.render.frame;y.get(N)!==D&&(y.set(N,D),N.update())}function _t(N,D){const ae=N.encoding,Ce=N.format,Ee=N.type;return N.isCompressedTexture===!0||N.isVideoTexture===!0||N.format===Ym||ae!==Ko&&(ae===Ht?a===!1?e.has("EXT_sRGB")===!0&&Ce===bi?(N.format=Ym,N.minFilter=nn,N.generateMipmaps=!1):D=$_.sRGBToLinear(D):(Ce!==bi||Ee!==Zs)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture encoding:",ae)),D}this.allocateTextureUnit=L,this.resetTextureUnits=ce,this.setTexture2D=H,this.setTexture2DArray=$,this.setTexture3D=G,this.setTextureCube=se,this.rebindTextures=Me,this.setupRenderTarget=Ge,this.updateRenderTargetMipmap=Be,this.updateMultisampleRenderTarget=Ye,this.setupDepthRenderbuffer=de,this.setupFrameBufferTexture=Te,this.useMultisampledRTT=et}function jP(n,e,t){const i=t.isWebGL2;function r(s,o=null){let a;if(s===Zs)return 5121;if(s===pP)return 32819;if(s===mP)return 32820;if(s===fP)return 5120;if(s===hP)return 5122;if(s===X_)return 5123;if(s===dP)return 5124;if(s===Po)return 5125;if(s===zs)return 5126;if(s===Hc)return i?5131:(a=e.get("OES_texture_half_float"),a!==null?a.HALF_FLOAT_OES:null);if(s===gP)return 6406;if(s===bi)return 6408;if(s===yP)return 6409;if(s===vP)return 6410;if(s===Uo)return 6402;if(s===cl)return 34041;if(s===Ym)return a=e.get("EXT_sRGB"),a!==null?a.SRGB_ALPHA_EXT:null;if(s===xP)return 6403;if(s===_P)return 36244;if(s===AP)return 33319;if(s===wP)return 33320;if(s===SP)return 36249;if(s===um||s===fm||s===hm||s===dm)if(o===Ht)if(a=e.get("WEBGL_compressed_texture_s3tc_srgb"),a!==null){if(s===um)return a.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(s===fm)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(s===hm)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(s===dm)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(a=e.get("WEBGL_compressed_texture_s3tc"),a!==null){if(s===um)return a.COMPRESSED_RGB_S3TC_DXT1_EXT;if(s===fm)return a.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(s===hm)return a.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(s===dm)return a.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(s===jx||s===Jx||s===Xx||s===Yx)if(a=e.get("WEBGL_compressed_texture_pvrtc"),a!==null){if(s===jx)return a.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(s===Jx)return a.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(s===Xx)return a.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(s===Yx)return a.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(s===MP)return a=e.get("WEBGL_compressed_texture_etc1"),a!==null?a.COMPRESSED_RGB_ETC1_WEBGL:null;if(s===Kx||s===Qx)if(a=e.get("WEBGL_compressed_texture_etc"),a!==null){if(s===Kx)return o===Ht?a.COMPRESSED_SRGB8_ETC2:a.COMPRESSED_RGB8_ETC2;if(s===Qx)return o===Ht?a.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:a.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(s===Zx||s===qx||s===$x||s===e1||s===t1||s===n1||s===i1||s===r1||s===s1||s===o1||s===a1||s===l1||s===c1||s===u1)if(a=e.get("WEBGL_compressed_texture_astc"),a!==null){if(s===Zx)return o===Ht?a.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:a.COMPRESSED_RGBA_ASTC_4x4_KHR;if(s===qx)return o===Ht?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:a.COMPRESSED_RGBA_ASTC_5x4_KHR;if(s===$x)return o===Ht?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:a.COMPRESSED_RGBA_ASTC_5x5_KHR;if(s===e1)return o===Ht?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:a.COMPRESSED_RGBA_ASTC_6x5_KHR;if(s===t1)return o===Ht?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:a.COMPRESSED_RGBA_ASTC_6x6_KHR;if(s===n1)return o===Ht?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:a.COMPRESSED_RGBA_ASTC_8x5_KHR;if(s===i1)return o===Ht?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:a.COMPRESSED_RGBA_ASTC_8x6_KHR;if(s===r1)return o===Ht?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:a.COMPRESSED_RGBA_ASTC_8x8_KHR;if(s===s1)return o===Ht?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:a.COMPRESSED_RGBA_ASTC_10x5_KHR;if(s===o1)return o===Ht?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:a.COMPRESSED_RGBA_ASTC_10x6_KHR;if(s===a1)return o===Ht?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:a.COMPRESSED_RGBA_ASTC_10x8_KHR;if(s===l1)return o===Ht?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:a.COMPRESSED_RGBA_ASTC_10x10_KHR;if(s===c1)return o===Ht?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:a.COMPRESSED_RGBA_ASTC_12x10_KHR;if(s===u1)return o===Ht?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:a.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(s===pm)if(a=e.get("EXT_texture_compression_bptc"),a!==null){if(s===pm)return o===Ht?a.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:a.COMPRESSED_RGBA_BPTC_UNORM_EXT}else return null;if(s===CP||s===f1||s===h1||s===d1)if(a=e.get("EXT_texture_compression_rgtc"),a!==null){if(s===pm)return a.COMPRESSED_RED_RGTC1_EXT;if(s===f1)return a.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(s===h1)return a.COMPRESSED_RED_GREEN_RGTC2_EXT;if(s===d1)return a.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return s===$a?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 JP extends Jt{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}class Gs extends Mt{constructor(){super(),this.isGroup=!0,this.type="Group"}}const _U={type:"move"};class rv{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Gs,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 Gs,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new F,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new F),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Gs,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new F,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new F),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,u=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(u&&e.hand){o=!0;for(const v of e.hand.values()){const x=t.getJointPose(v,i),A=this._getHandJoint(u,v);x!==null&&(A.matrix.fromArray(x.transform.matrix),A.matrix.decompose(A.position,A.rotation,A.scale),A.jointRadius=x.radius),A.visible=x!==null}const h=u.joints["index-finger-tip"],d=u.joints["thumb-tip"],p=h.position.distanceTo(d.position),m=.02,y=.005;u.inputState.pinching&&p>m+y?(u.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!u.inputState.pinching&&p<=m-y&&(u.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(_U)))}return a!==null&&(a.visible=r!==null),l!==null&&(l.visible=s!==null),u!==null&&(u.visible=o!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){const i=new Gs;i.matrixAutoUpdate=!1,i.visible=!1,e.joints[t.jointName]=i,e.add(i)}return e.joints[t.jointName]}}class XP extends $t{constructor(e,t,i,r,s,o,a,l,u,h){if(h=h!==void 0?h:Uo,h!==Uo&&h!==cl)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");i===void 0&&h===Uo&&(i=Po),i===void 0&&h===cl&&(i=$a),super(null,r,s,o,a,l,h,i,u),this.isDepthTexture=!0,this.image={width:e,height:t},this.magFilter=a!==void 0?a:mn,this.minFilter=l!==void 0?l:mn,this.flipY=!1,this.generateMipmaps=!1}}class AU extends ms{constructor(e,t){super();const i=this;let r=null,s=1,o=null,a="local-floor",l=1,u=null,h=null,d=null,p=null,m=null,y=null;const v=t.getContextAttributes();let x=null,A=null;const _=[],w=[],M=new Set,b=new Map,P=new Jt;P.layers.enable(1),P.viewport=new Nt;const R=new Jt;R.layers.enable(2),R.viewport=new Nt;const E=[P,R],B=new JP;B.layers.enable(1),B.layers.enable(2);let I=null,z=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(G){let se=_[G];return se===void 0&&(se=new rv,_[G]=se),se.getTargetRaySpace()},this.getControllerGrip=function(G){let se=_[G];return se===void 0&&(se=new rv,_[G]=se),se.getGripSpace()},this.getHand=function(G){let se=_[G];return se===void 0&&(se=new rv,_[G]=se),se.getHandSpace()};function Z(G){const se=w.indexOf(G.inputSource);if(se===-1)return;const me=_[se];me!==void 0&&me.dispatchEvent({type:G.type,data:G.inputSource})}function J(){r.removeEventListener("select",Z),r.removeEventListener("selectstart",Z),r.removeEventListener("selectend",Z),r.removeEventListener("squeeze",Z),r.removeEventListener("squeezestart",Z),r.removeEventListener("squeezeend",Z),r.removeEventListener("end",J),r.removeEventListener("inputsourceschange",W);for(let G=0;G<_.length;G++){const se=w[G];se!==null&&(w[G]=null,_[G].disconnect(se))}I=null,z=null,e.setRenderTarget(x),m=null,p=null,d=null,r=null,A=null,$.stop(),i.isPresenting=!1,i.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(G){s=G,i.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(G){a=G,i.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return u||o},this.setReferenceSpace=function(G){u=G},this.getBaseLayer=function(){return p!==null?p:m},this.getBinding=function(){return d},this.getFrame=function(){return y},this.getSession=function(){return r},this.setSession=async function(G){if(r=G,r!==null){if(x=e.getRenderTarget(),r.addEventListener("select",Z),r.addEventListener("selectstart",Z),r.addEventListener("selectend",Z),r.addEventListener("squeeze",Z),r.addEventListener("squeezestart",Z),r.addEventListener("squeezeend",Z),r.addEventListener("end",J),r.addEventListener("inputsourceschange",W),v.xrCompatible!==!0&&await t.makeXRCompatible(),r.renderState.layers===void 0||e.capabilities.isWebGL2===!1){const se={antialias:r.renderState.layers===void 0?v.antialias:!0,alpha:v.alpha,depth:v.depth,stencil:v.stencil,framebufferScaleFactor:s};m=new XRWebGLLayer(r,t,se),r.updateRenderState({baseLayer:m}),A=new Gr(m.framebufferWidth,m.framebufferHeight,{format:bi,type:Zs,encoding:e.outputEncoding,stencilBuffer:v.stencil})}else{let se=null,me=null,Y=null;v.depth&&(Y=v.stencil?35056:33190,se=v.stencil?cl:Uo,me=v.stencil?$a:Po);const _e={colorFormat:32856,depthFormat:Y,scaleFactor:s};d=new XRWebGLBinding(r,t),p=d.createProjectionLayer(_e),r.updateRenderState({layers:[p]}),A=new Gr(p.textureWidth,p.textureHeight,{format:bi,type:Zs,depthTexture:new XP(p.textureWidth,p.textureHeight,me,void 0,void 0,void 0,void 0,void 0,void 0,se),stencilBuffer:v.stencil,encoding:e.outputEncoding,samples:v.antialias?4:0});const Ae=e.properties.get(A);Ae.__ignoreDepthValues=p.ignoreDepthValues}A.isXRRenderTarget=!0,this.setFoveation(l),u=null,o=await r.requestReferenceSpace(a),$.setContext(r),$.start(),i.isPresenting=!0,i.dispatchEvent({type:"sessionstart"})}};function W(G){for(let se=0;se=0&&(w[Y]=null,_[Y].disconnect(me))}for(let se=0;se=w.length){w.push(me),Y=Ae;break}else if(w[Ae]===null){w[Ae]=me,Y=Ae;break}if(Y===-1)break}const _e=_[Y];_e&&_e.connect(me)}}const Q=new F,re=new F;function ce(G,se,me){Q.setFromMatrixPosition(se.matrixWorld),re.setFromMatrixPosition(me.matrixWorld);const Y=Q.distanceTo(re),_e=se.projectionMatrix.elements,Ae=me.projectionMatrix.elements,Ie=_e[14]/(_e[10]-1),ke=_e[14]/(_e[10]+1),Te=(_e[9]+1)/_e[5],we=(_e[9]-1)/_e[5],he=(_e[8]-1)/_e[0],de=(Ae[8]+1)/Ae[0],Me=Ie*he,Ge=Ie*de,Be=Y/(-he+de),Ye=Be*-he;se.matrixWorld.decompose(G.position,G.quaternion,G.scale),G.translateX(Ye),G.translateZ(Be),G.matrixWorld.compose(G.position,G.quaternion,G.scale),G.matrixWorldInverse.copy(G.matrixWorld).invert();const Je=Ie+Be,et=ke+Be,vt=Me-Ye,_t=Ge+(Y-Ye),N=Te*ke/et*Je,D=we*ke/et*Je;G.projectionMatrix.makePerspective(vt,_t,N,D,Je,et)}function L(G,se){se===null?G.matrixWorld.copy(G.matrix):G.matrixWorld.multiplyMatrices(se.matrixWorld,G.matrix),G.matrixWorldInverse.copy(G.matrixWorld).invert()}this.updateCamera=function(G){if(r===null)return;B.near=R.near=P.near=G.near,B.far=R.far=P.far=G.far,(I!==B.near||z!==B.far)&&(r.updateRenderState({depthNear:B.near,depthFar:B.far}),I=B.near,z=B.far);const se=G.parent,me=B.cameras;L(B,se);for(let _e=0;_e_e&&(b.set(Y,Y.lastChangedTime),i.dispatchEvent({type:"planechanged",data:Y}))}}y=null}const $=new UP;$.setAnimationLoop(H),this.setAnimationLoop=function(G){V=G},this.dispose=function(){}}}function wU(n,e){function t(v,x){x.color.getRGB(v.fogColor.value,OP(n)),x.isFog?(v.fogNear.value=x.near,v.fogFar.value=x.far):x.isFogExp2&&(v.fogDensity.value=x.density)}function i(v,x,A,_,w){x.isMeshBasicMaterial||x.isMeshLambertMaterial?r(v,x):x.isMeshToonMaterial?(r(v,x),h(v,x)):x.isMeshPhongMaterial?(r(v,x),u(v,x)):x.isMeshStandardMaterial?(r(v,x),d(v,x),x.isMeshPhysicalMaterial&&p(v,x,w)):x.isMeshMatcapMaterial?(r(v,x),m(v,x)):x.isMeshDepthMaterial?r(v,x):x.isMeshDistanceMaterial?(r(v,x),y(v,x)):x.isMeshNormalMaterial?r(v,x):x.isLineBasicMaterial?(s(v,x),x.isLineDashedMaterial&&o(v,x)):x.isPointsMaterial?a(v,x,A,_):x.isSpriteMaterial?l(v,x):x.isShadowMaterial?(v.color.value.copy(x.color),v.opacity.value=x.opacity):x.isShaderMaterial&&(x.uniformsNeedUpdate=!1)}function r(v,x){v.opacity.value=x.opacity,x.color&&v.diffuse.value.copy(x.color),x.emissive&&v.emissive.value.copy(x.emissive).multiplyScalar(x.emissiveIntensity),x.map&&(v.map.value=x.map),x.alphaMap&&(v.alphaMap.value=x.alphaMap),x.bumpMap&&(v.bumpMap.value=x.bumpMap,v.bumpScale.value=x.bumpScale,x.side===Li&&(v.bumpScale.value*=-1)),x.displacementMap&&(v.displacementMap.value=x.displacementMap,v.displacementScale.value=x.displacementScale,v.displacementBias.value=x.displacementBias),x.emissiveMap&&(v.emissiveMap.value=x.emissiveMap),x.normalMap&&(v.normalMap.value=x.normalMap,v.normalScale.value.copy(x.normalScale),x.side===Li&&v.normalScale.value.negate()),x.specularMap&&(v.specularMap.value=x.specularMap),x.alphaTest>0&&(v.alphaTest.value=x.alphaTest);const A=e.get(x).envMap;if(A&&(v.envMap.value=A,v.flipEnvMap.value=A.isCubeTexture&&A.isRenderTargetTexture===!1?-1:1,v.reflectivity.value=x.reflectivity,v.ior.value=x.ior,v.refractionRatio.value=x.refractionRatio),x.lightMap){v.lightMap.value=x.lightMap;const M=n.useLegacyLights===!0?Math.PI:1;v.lightMapIntensity.value=x.lightMapIntensity*M}x.aoMap&&(v.aoMap.value=x.aoMap,v.aoMapIntensity.value=x.aoMapIntensity);let _;x.map?_=x.map:x.specularMap?_=x.specularMap:x.displacementMap?_=x.displacementMap:x.normalMap?_=x.normalMap:x.bumpMap?_=x.bumpMap:x.roughnessMap?_=x.roughnessMap:x.metalnessMap?_=x.metalnessMap:x.alphaMap?_=x.alphaMap:x.emissiveMap?_=x.emissiveMap:x.clearcoatMap?_=x.clearcoatMap:x.clearcoatNormalMap?_=x.clearcoatNormalMap:x.clearcoatRoughnessMap?_=x.clearcoatRoughnessMap:x.iridescenceMap?_=x.iridescenceMap:x.iridescenceThicknessMap?_=x.iridescenceThicknessMap:x.specularIntensityMap?_=x.specularIntensityMap:x.specularColorMap?_=x.specularColorMap:x.transmissionMap?_=x.transmissionMap:x.thicknessMap?_=x.thicknessMap:x.sheenColorMap?_=x.sheenColorMap:x.sheenRoughnessMap&&(_=x.sheenRoughnessMap),_!==void 0&&(_.isWebGLRenderTarget&&(_=_.texture),_.matrixAutoUpdate===!0&&_.updateMatrix(),v.uvTransform.value.copy(_.matrix));let w;x.aoMap?w=x.aoMap:x.lightMap&&(w=x.lightMap),w!==void 0&&(w.isWebGLRenderTarget&&(w=w.texture),w.matrixAutoUpdate===!0&&w.updateMatrix(),v.uv2Transform.value.copy(w.matrix))}function s(v,x){v.diffuse.value.copy(x.color),v.opacity.value=x.opacity}function o(v,x){v.dashSize.value=x.dashSize,v.totalSize.value=x.dashSize+x.gapSize,v.scale.value=x.scale}function a(v,x,A,_){v.diffuse.value.copy(x.color),v.opacity.value=x.opacity,v.size.value=x.size*A,v.scale.value=_*.5,x.map&&(v.map.value=x.map),x.alphaMap&&(v.alphaMap.value=x.alphaMap),x.alphaTest>0&&(v.alphaTest.value=x.alphaTest);let w;x.map?w=x.map:x.alphaMap&&(w=x.alphaMap),w!==void 0&&(w.matrixAutoUpdate===!0&&w.updateMatrix(),v.uvTransform.value.copy(w.matrix))}function l(v,x){v.diffuse.value.copy(x.color),v.opacity.value=x.opacity,v.rotation.value=x.rotation,x.map&&(v.map.value=x.map),x.alphaMap&&(v.alphaMap.value=x.alphaMap),x.alphaTest>0&&(v.alphaTest.value=x.alphaTest);let A;x.map?A=x.map:x.alphaMap&&(A=x.alphaMap),A!==void 0&&(A.matrixAutoUpdate===!0&&A.updateMatrix(),v.uvTransform.value.copy(A.matrix))}function u(v,x){v.specular.value.copy(x.specular),v.shininess.value=Math.max(x.shininess,1e-4)}function h(v,x){x.gradientMap&&(v.gradientMap.value=x.gradientMap)}function d(v,x){v.roughness.value=x.roughness,v.metalness.value=x.metalness,x.roughnessMap&&(v.roughnessMap.value=x.roughnessMap),x.metalnessMap&&(v.metalnessMap.value=x.metalnessMap),e.get(x).envMap&&(v.envMapIntensity.value=x.envMapIntensity)}function p(v,x,A){v.ior.value=x.ior,x.sheen>0&&(v.sheenColor.value.copy(x.sheenColor).multiplyScalar(x.sheen),v.sheenRoughness.value=x.sheenRoughness,x.sheenColorMap&&(v.sheenColorMap.value=x.sheenColorMap),x.sheenRoughnessMap&&(v.sheenRoughnessMap.value=x.sheenRoughnessMap)),x.clearcoat>0&&(v.clearcoat.value=x.clearcoat,v.clearcoatRoughness.value=x.clearcoatRoughness,x.clearcoatMap&&(v.clearcoatMap.value=x.clearcoatMap),x.clearcoatRoughnessMap&&(v.clearcoatRoughnessMap.value=x.clearcoatRoughnessMap),x.clearcoatNormalMap&&(v.clearcoatNormalScale.value.copy(x.clearcoatNormalScale),v.clearcoatNormalMap.value=x.clearcoatNormalMap,x.side===Li&&v.clearcoatNormalScale.value.negate())),x.iridescence>0&&(v.iridescence.value=x.iridescence,v.iridescenceIOR.value=x.iridescenceIOR,v.iridescenceThicknessMinimum.value=x.iridescenceThicknessRange[0],v.iridescenceThicknessMaximum.value=x.iridescenceThicknessRange[1],x.iridescenceMap&&(v.iridescenceMap.value=x.iridescenceMap),x.iridescenceThicknessMap&&(v.iridescenceThicknessMap.value=x.iridescenceThicknessMap)),x.transmission>0&&(v.transmission.value=x.transmission,v.transmissionSamplerMap.value=A.texture,v.transmissionSamplerSize.value.set(A.width,A.height),x.transmissionMap&&(v.transmissionMap.value=x.transmissionMap),v.thickness.value=x.thickness,x.thicknessMap&&(v.thicknessMap.value=x.thicknessMap),v.attenuationDistance.value=x.attenuationDistance,v.attenuationColor.value.copy(x.attenuationColor)),v.specularIntensity.value=x.specularIntensity,v.specularColor.value.copy(x.specularColor),x.specularIntensityMap&&(v.specularIntensityMap.value=x.specularIntensityMap),x.specularColorMap&&(v.specularColorMap.value=x.specularColorMap)}function m(v,x){x.matcap&&(v.matcap.value=x.matcap)}function y(v,x){v.referencePosition.value.copy(x.referencePosition),v.nearDistance.value=x.nearDistance,v.farDistance.value=x.farDistance}return{refreshFogUniforms:t,refreshMaterialUniforms:i}}function SU(n,e,t,i){let r={},s={},o=[];const a=t.isWebGL2?n.getParameter(35375):0;function l(_,w){const M=w.program;i.uniformBlockBinding(_,M)}function u(_,w){let M=r[_.id];M===void 0&&(y(_),M=h(_),r[_.id]=M,_.addEventListener("dispose",x));const b=w.program;i.updateUBOMapping(_,b);const P=e.render.frame;s[_.id]!==P&&(p(_),s[_.id]=P)}function h(_){const w=d();_.__bindingPointIndex=w;const M=n.createBuffer(),b=_.__size,P=_.usage;return n.bindBuffer(35345,M),n.bufferData(35345,b,P),n.bindBuffer(35345,null),n.bindBufferBase(35345,w,M),M}function d(){for(let _=0;_0){P=M%b;const Z=b-P;P!==0&&Z-I.boundary<0&&(M+=b-P,B.__offset=M)}M+=I.storage}return P=M%b,P>0&&(M+=b-P),_.__size=M,_.__cache={},this}function v(_){const w={boundary:0,storage:0};return typeof _=="number"?(w.boundary=4,w.storage=4):_.isVector2?(w.boundary=8,w.storage=8):_.isVector3||_.isColor?(w.boundary=16,w.storage=12):_.isVector4?(w.boundary=16,w.storage=16):_.isMatrix3?(w.boundary=48,w.storage=48):_.isMatrix4?(w.boundary=64,w.storage=64):_.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",_),w}function x(_){const w=_.target;w.removeEventListener("dispose",x);const M=o.indexOf(w.__bindingPointIndex);o.splice(M,1),n.deleteBuffer(r[w.id]),delete r[w.id],delete s[w.id]}function A(){for(const _ in r)n.deleteBuffer(r[_]);o=[],r={},s={}}return{bind:l,update:u,dispose:A}}function MU(){const n=eh("canvas");return n.style.display="block",n}function Ng(n={}){this.isWebGLRenderer=!0;const e=n.canvas!==void 0?n.canvas:MU(),t=n.context!==void 0?n.context:null,i=n.depth!==void 0?n.depth:!0,r=n.stencil!==void 0?n.stencil:!0,s=n.antialias!==void 0?n.antialias:!1,o=n.premultipliedAlpha!==void 0?n.premultipliedAlpha:!0,a=n.preserveDrawingBuffer!==void 0?n.preserveDrawingBuffer:!1,l=n.powerPreference!==void 0?n.powerPreference:"default",u=n.failIfMajorPerformanceCaveat!==void 0?n.failIfMajorPerformanceCaveat:!1;let h;t!==null?h=t.getContextAttributes().alpha:h=n.alpha!==void 0?n.alpha:!1;let d=null,p=null;const m=[],y=[];this.domElement=e,this.debug={checkShaderErrors:!0},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.outputEncoding=Ko,this.useLegacyLights=!0,this.toneMapping=zr,this.toneMappingExposure=1;const v=this;let x=!1,A=0,_=0,w=null,M=-1,b=null;const P=new Nt,R=new Nt;let E=null,B=e.width,I=e.height,z=1,Z=null,J=null;const W=new Nt(0,0,B,I),Q=new Nt(0,0,B,I);let re=!1;const ce=new Fg;let L=!1,V=!1,H=null;const $=new ot,G=new F,se={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function me(){return w===null?z:1}let Y=t;function _e(k,ie){for(let fe=0;fe0?p=y[y.length-1]:p=null,m.pop(),m.length>0?d=m[m.length-1]:d=null};function It(k,ie,fe,te){if(k.visible===!1)return;if(k.layers.test(ie.layers)){if(k.isGroup)fe=k.renderOrder;else if(k.isLOD)k.autoUpdate===!0&&k.update(ie);else if(k.isLight)p.pushLight(k),k.castShadow&&p.pushShadow(k);else if(k.isSprite){if(!k.frustumCulled||ce.intersectsSprite(k)){te&&G.setFromMatrixPosition(k.matrixWorld).applyMatrix4($);const lt=Ye.update(k),ht=k.material;ht.visible&&d.push(k,lt,ht,fe,G.z,null)}}else if((k.isMesh||k.isLine||k.isPoints)&&(k.isSkinnedMesh&&k.skeleton.frame!==Te.render.frame&&(k.skeleton.update(),k.skeleton.frame=Te.render.frame),!k.frustumCulled||ce.intersectsObject(k))){te&&G.setFromMatrixPosition(k.matrixWorld).applyMatrix4($);const lt=Ye.update(k),ht=k.material;if(Array.isArray(ht)){const mt=lt.groups;for(let Ct=0,xt=mt.length;Ct0&&zt(ge,ie,fe),te&&ke.viewport(P.copy(te)),ge.length>0&&kn(ge,ie,fe),nt.length>0&&kn(nt,ie,fe),lt.length>0&&kn(lt,ie,fe),ke.buffers.depth.setTest(!0),ke.buffers.depth.setMask(!0),ke.buffers.color.setMask(!0),ke.setPolygonOffset(!1)}function zt(k,ie,fe){const te=Ie.isWebGL2;H===null&&(H=new Gr(1024,1024,{generateMipmaps:!0,type:Ae.has("EXT_color_buffer_half_float")?Hc:Zs,minFilter:ds,samples:te&&s===!0?4:0}));const ge=v.getRenderTarget();v.setRenderTarget(H),v.clear();const nt=v.toneMapping;v.toneMapping=zr,kn(k,ie,fe),v.toneMapping=nt,he.updateMultisampleRenderTarget(H),he.updateRenderTargetMipmap(H),v.setRenderTarget(ge)}function kn(k,ie,fe){const te=ie.isScene===!0?ie.overrideMaterial:null;for(let ge=0,nt=k.length;ge0&&he.useMultisampledRTT(k)===!1?ge=we.get(k).__webglMultisampledFramebuffer:ge=xt,P.copy(k.viewport),R.copy(k.scissor),E=k.scissorTest}else P.copy(W).multiplyScalar(z).floor(),R.copy(Q).multiplyScalar(z).floor(),E=re;if(ke.bindFramebuffer(36160,ge)&&Ie.drawBuffers&&te&&ke.drawBuffers(k,ge),ke.viewport(P),ke.scissor(R),ke.setScissorTest(E),nt){const mt=we.get(k.texture);Y.framebufferTexture2D(36160,36064,34069+ie,mt.__webglTexture,fe)}else if(lt){const mt=we.get(k.texture),Ct=ie||0;Y.framebufferTextureLayer(36160,36064,mt.__webglTexture,fe||0,Ct)}M=-1},this.readRenderTargetPixels=function(k,ie,fe,te,ge,nt,lt){if(!(k&&k.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let ht=we.get(k).__webglFramebuffer;if(k.isWebGLCubeRenderTarget&<!==void 0&&(ht=ht[lt]),ht){ke.bindFramebuffer(36160,ht);try{const mt=k.texture,Ct=mt.format,xt=mt.type;if(Ct!==bi&&Ke.convert(Ct)!==Y.getParameter(35739)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const At=xt===Hc&&(Ae.has("EXT_color_buffer_half_float")||Ie.isWebGL2&&Ae.has("EXT_color_buffer_float"));if(xt!==Zs&&Ke.convert(xt)!==Y.getParameter(35738)&&!(xt===zs&&(Ie.isWebGL2||Ae.has("OES_texture_float")||Ae.has("WEBGL_color_buffer_float")))&&!At){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}ie>=0&&ie<=k.width-te&&fe>=0&&fe<=k.height-ge&&Y.readPixels(ie,fe,te,ge,Ke.convert(Ct),Ke.convert(xt),nt)}finally{const mt=w!==null?we.get(w).__webglFramebuffer:null;ke.bindFramebuffer(36160,mt)}}},this.copyFramebufferToTexture=function(k,ie,fe=0){const te=Math.pow(2,-fe),ge=Math.floor(ie.image.width*te),nt=Math.floor(ie.image.height*te);he.setTexture2D(ie,0),Y.copyTexSubImage2D(3553,fe,0,0,k.x,k.y,ge,nt),ke.unbindTexture()},this.copyTextureToTexture=function(k,ie,fe,te=0){const ge=ie.image.width,nt=ie.image.height,lt=Ke.convert(fe.format),ht=Ke.convert(fe.type);he.setTexture2D(fe,0),Y.pixelStorei(37440,fe.flipY),Y.pixelStorei(37441,fe.premultiplyAlpha),Y.pixelStorei(3317,fe.unpackAlignment),ie.isDataTexture?Y.texSubImage2D(3553,te,k.x,k.y,ge,nt,lt,ht,ie.image.data):ie.isCompressedTexture?Y.compressedTexSubImage2D(3553,te,k.x,k.y,ie.mipmaps[0].width,ie.mipmaps[0].height,lt,ie.mipmaps[0].data):Y.texSubImage2D(3553,te,k.x,k.y,lt,ht,ie.image),te===0&&fe.generateMipmaps&&Y.generateMipmap(3553),ke.unbindTexture()},this.copyTextureToTexture3D=function(k,ie,fe,te,ge=0){if(v.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}const nt=k.max.x-k.min.x+1,lt=k.max.y-k.min.y+1,ht=k.max.z-k.min.z+1,mt=Ke.convert(te.format),Ct=Ke.convert(te.type);let xt;if(te.isData3DTexture)he.setTexture3D(te,0),xt=32879;else if(te.isDataArrayTexture)he.setTexture2DArray(te,0),xt=35866;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}Y.pixelStorei(37440,te.flipY),Y.pixelStorei(37441,te.premultiplyAlpha),Y.pixelStorei(3317,te.unpackAlignment);const At=Y.getParameter(3314),ln=Y.getParameter(32878),fi=Y.getParameter(3316),Ar=Y.getParameter(3315),ys=Y.getParameter(32877),cn=fe.isCompressedTexture?fe.mipmaps[0]:fe.image;Y.pixelStorei(3314,cn.width),Y.pixelStorei(32878,cn.height),Y.pixelStorei(3316,k.min.x),Y.pixelStorei(3315,k.min.y),Y.pixelStorei(32877,k.min.z),fe.isDataTexture||fe.isData3DTexture?Y.texSubImage3D(xt,ge,ie.x,ie.y,ie.z,nt,lt,ht,mt,Ct,cn.data):fe.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),Y.compressedTexSubImage3D(xt,ge,ie.x,ie.y,ie.z,nt,lt,ht,mt,cn.data)):Y.texSubImage3D(xt,ge,ie.x,ie.y,ie.z,nt,lt,ht,mt,Ct,cn),Y.pixelStorei(3314,At),Y.pixelStorei(32878,ln),Y.pixelStorei(3316,fi),Y.pixelStorei(3315,Ar),Y.pixelStorei(32877,ys),ge===0&&te.generateMipmaps&&Y.generateMipmap(xt),ke.unbindTexture()},this.initTexture=function(k){k.isCubeTexture?he.setTextureCube(k,0):k.isData3DTexture?he.setTexture3D(k,0):k.isDataArrayTexture||k.isCompressedArrayTexture?he.setTexture2DArray(k,0):he.setTexture2D(k,0),ke.unbindTexture()},this.resetState=function(){A=0,_=0,w=null,ke.reset(),Oe.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}Object.defineProperties(Ng.prototype,{physicallyCorrectLights:{get:function(){return console.warn("THREE.WebGLRenderer: the property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),!this.useLegacyLights},set:function(n){console.warn("THREE.WebGLRenderer: the property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),this.useLegacyLights=!n}}});class YP extends Ng{}YP.prototype.isWebGL1Renderer=!0;class Og{constructor(e,t=25e-5){this.isFogExp2=!0,this.name="",this.color=new De(e),this.density=t}clone(){return new Og(this.color,this.density)}toJSON(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}}class zg{constructor(e,t=1,i=1e3){this.isFog=!0,this.name="",this.color=new De(e),this.near=t,this.far=i}clone(){return new zg(this.color,this.near,this.far)}toJSON(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}}class Km extends Mt{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 xh{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=qf,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:Xu.clone(),uv:dr.getUV(Xu,_p,Ku,Ap,zC,sv,UC,new pe),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 wp(n,e,t,i,r,s){$l.subVectors(n,t).addScalar(.5).multiply(i),r!==void 0?(Yu.x=s*$l.x-r*$l.y,Yu.y=r*$l.x+s*$l.y):Yu.copy($l),n.copy(e),n.x+=Yu.x,n.y+=Yu.y,n.applyMatrix4(KP)}const Sp=new F,GC=new F;class ZP extends Mt{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){Sp.setFromMatrixPosition(this.matrixWorld);const r=e.ray.origin.distanceTo(Sp);this.getObjectForDistance(r).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){Sp.setFromMatrixPosition(e.matrixWorld),GC.setFromMatrixPosition(this.matrixWorld);const i=Sp.distanceTo(GC)/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 E=e.ray.origin.distanceTo(p);Ee.far||t.push({distance:E,point:d.clone().applyMatrix4(this.matrixWorld),index:w,face:null,faceIndex:null,object:this})}}else{const A=Math.max(0,o.start),_=Math.min(x.count,o.start+o.count);for(let w=A,M=_-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:u,distanceToRay:Math.sqrt(a),point:l,index:e,face:null,object:o})}}class TU extends $t{constructor(e,t,i,r,s,o,a,l,u){super(e,t,i,r,s,o,a,l,u),this.isVideoTexture=!0,this.minFilter=o!==void 0?o:nn,this.magFilter=s!==void 0?s:nn,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 PU extends $t{constructor(e,t,i){super({width:e,height:t}),this.isFramebufferTexture=!0,this.format=i,this.magFilter=mn,this.minFilter=mn,this.generateMipmaps=!1,this.needsUpdate=!0}}class dA extends $t{constructor(e,t,i,r,s,o,a,l,u,h,d,p){super(null,o,a,l,u,h,r,s,d,p),this.isCompressedTexture=!0,this.image={width:t,height:i},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class BU extends dA{constructor(e,t,i,r,s,o){super(e,t,i,s,o),this.isCompressedArrayTexture=!0,this.image.depth=r,this.wrapR=Yn}}class RU extends $t{constructor(e,t,i,r,s,o,a,l,u){super(e,t,i,r,s,o,a,l,u),this.isCanvasTexture=!0,this.needsUpdate=!0}}class Vr{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,u;for(;a<=l;)if(r=Math.floor(a+(l-a)/2),u=i[r]-o,u<0)a=r+1;else if(u>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,m=(o-h)/p;return(r+m)/(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 pe:new F);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 F,r=[],s=[],o=[],a=new F,l=new ot;for(let m=0;m<=e;m++){const y=m/e;r[m]=this.getTangentAt(y,new F)}s[0]=new F,o[0]=new F;let u=Number.MAX_VALUE;const h=Math.abs(r[0].x),d=Math.abs(r[0].y),p=Math.abs(r[0].z);h<=u&&(u=h,i.set(1,0,0)),d<=u&&(u=d,i.set(0,1,0)),p<=u&&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 m=1;m<=e;m++){if(s[m]=s[m-1].clone(),o[m]=o[m-1].clone(),a.crossVectors(r[m-1],r[m]),a.length()>Number.EPSILON){a.normalize();const y=Math.acos(An(r[m-1].dot(r[m]),-1,1));s[m].applyMatrix4(l.makeRotationAxis(a,y))}o[m].crossVectors(r[m],s[m])}if(t===!0){let m=Math.acos(An(s[0].dot(s[e]),-1,1));m/=e,r[0].dot(a.crossVectors(s[0],s[e]))>0&&(m=-m);for(let y=1;y<=e;y++)s[y].applyMatrix4(l.makeRotationAxis(r[y],m*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 Gg extends Vr{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 pe,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 u,h;this.closed||a>0?u=r[(a-1)%s]:(Tp.subVectors(r[0],r[1]).add(r[0]),u=Tp);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(nE(a,l.x,u.x,h.x,d.x),nE(a,l.y,u.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(),u=l===0?0:1-o/l;return a.getPointAt(u,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=u.getPoint(0);d.equals(this.currentPoint)||this.lineTo(d.x,d.y)}this.curves.push(u);const h=u.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 au extends ft{constructor(e=[new pe(0,-.5),new pe(.5,0),new pe(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=An(r,0,Math.PI*2);const s=[],o=[],a=[],l=[],u=[],h=1/t,d=new F,p=new pe,m=new F,y=new F,v=new F;let x=0,A=0;for(let _=0;_<=e.length-1;_++)switch(_){case 0:x=e[_+1].x-e[_].x,A=e[_+1].y-e[_].y,m.x=A*1,m.y=-x,m.z=A*0,v.copy(m),m.normalize(),l.push(m.x,m.y,m.z);break;case e.length-1:l.push(v.x,v.y,v.z);break;default:x=e[_+1].x-e[_].x,A=e[_+1].y-e[_].y,m.x=A*1,m.y=-x,m.z=A*0,y.copy(m),m.x+=v.x,m.y+=v.y,m.z+=v.z,m.normalize(),l.push(m.x,m.y,m.z),v.copy(y)}for(let _=0;_<=t;_++){const w=i+_*h*r,M=Math.sin(w),b=Math.cos(w);for(let P=0;P<=e.length-1;P++){d.x=e[P].x*M,d.y=e[P].y,d.z=e[P].x*b,o.push(d.x,d.y,d.z),p.x=_/t,p.y=P/(e.length-1),a.push(p.x,p.y);const R=l[3*P+0]*M,E=l[3*P+1],B=l[3*P+0]*b;u.push(R,E,B)}}for(let _=0;_0&&w(!0),t>0&&w(!1)),this.setIndex(h),this.setAttribute("position",new Ve(d,3)),this.setAttribute("normal",new Ve(p,3)),this.setAttribute("uv",new Ve(m,2));function _(){const M=new F,b=new F;let P=0;const R=(t-e)/i;for(let E=0;E<=s;E++){const B=[],I=E/s,z=I*(t-e)+e;for(let Z=0;Z<=r;Z++){const J=Z/r,W=J*l+a,Q=Math.sin(W),re=Math.cos(W);b.x=z*Q,b.y=-I*i+x,b.z=z*re,d.push(b.x,b.y,b.z),M.set(Q,R,re).normalize(),p.push(M.x,M.y,M.z),m.push(J,1-I),B.push(y++)}v.push(B)}for(let E=0;E.9&&R<.1&&(w<.2&&(o[_+0]+=1),M<.2&&(o[_+2]+=1),b<.2&&(o[_+4]+=1))}}function p(_){s.push(_.x,_.y,_.z)}function m(_,w){const M=_*3;w.x=e[M+0],w.y=e[M+1],w.z=e[M+2]}function y(){const _=new F,w=new F,M=new F,b=new F,P=new pe,R=new pe,E=new pe;for(let B=0,I=0;B80*t){a=u=n[0],l=h=n[1];for(let y=t;yu&&(u=d),p>h&&(h=p);m=Math.max(u-a,h-l),m=m!==0?32767/m:0}return nh(s,o,t,a,l,m,0),o}};function rB(n,e,t,i,r){let s,o;if(r===tG(n,e,t,i)>0)for(s=e;s=e;s-=i)o=iE(s,n[s],n[s+1],o);return o&&Vg(o,o.next)&&(rh(o),o=o.next),o}function fl(n,e){if(!n)return n;e||(e=n);let t=n,i;do if(i=!1,!t.steiner&&(Vg(t,t.next)||rn(t.prev,t,t.next)===0)){if(rh(t),t=e=t.prev,t===t.next)break;i=!0}else t=t.next;while(i||t!==e);return e}function nh(n,e,t,i,r,s,o){if(!n)return;!o&&s&&KU(n,i,r,s);let a=n,l,u;for(;n.prev!==n.next;){if(l=n.prev,u=n.next,s?GU(n,i,r,s):UU(n)){e.push(l.i/t|0),e.push(n.i/t|0),e.push(u.i/t|0),rh(n),n=u.next,a=u.next;continue}if(n=u,n===a){o?o===1?(n=HU(fl(n),e,t),nh(n,e,t,i,r,s,2)):o===2&&VU(n,e,t,i,r,s):nh(fl(n),e,t,i,r,s,1);break}}}function UU(n){const e=n.prev,t=n,i=n.next;if(rn(e,t,i)>=0)return!1;const r=e.x,s=t.x,o=i.x,a=e.y,l=t.y,u=i.y,h=rs?r>o?r:o:s>o?s:o,m=a>l?a>u?a:u:l>u?l:u;let y=i.next;for(;y!==e;){if(y.x>=h&&y.x<=p&&y.y>=d&&y.y<=m&&yc(r,a,s,l,o,u,y.x,y.y)&&rn(y.prev,y,y.next)>=0)return!1;y=y.next}return!0}function GU(n,e,t,i){const r=n.prev,s=n,o=n.next;if(rn(r,s,o)>=0)return!1;const a=r.x,l=s.x,u=o.x,h=r.y,d=s.y,p=o.y,m=al?a>u?a:u:l>u?l:u,x=h>d?h>p?h:p:d>p?d:p,A=x1(m,y,e,t,i),_=x1(v,x,e,t,i);let w=n.prevZ,M=n.nextZ;for(;w&&w.z>=A&&M&&M.z<=_;){if(w.x>=m&&w.x<=v&&w.y>=y&&w.y<=x&&w!==r&&w!==o&&yc(a,h,l,d,u,p,w.x,w.y)&&rn(w.prev,w,w.next)>=0||(w=w.prevZ,M.x>=m&&M.x<=v&&M.y>=y&&M.y<=x&&M!==r&&M!==o&&yc(a,h,l,d,u,p,M.x,M.y)&&rn(M.prev,M,M.next)>=0))return!1;M=M.nextZ}for(;w&&w.z>=A;){if(w.x>=m&&w.x<=v&&w.y>=y&&w.y<=x&&w!==r&&w!==o&&yc(a,h,l,d,u,p,w.x,w.y)&&rn(w.prev,w,w.next)>=0)return!1;w=w.prevZ}for(;M&&M.z<=_;){if(M.x>=m&&M.x<=v&&M.y>=y&&M.y<=x&&M!==r&&M!==o&&yc(a,h,l,d,u,p,M.x,M.y)&&rn(M.prev,M,M.next)>=0)return!1;M=M.nextZ}return!0}function HU(n,e,t){let i=n;do{const r=i.prev,s=i.next.next;!Vg(r,s)&&sB(r,i,i.next,s)&&ih(r,s)&&ih(s,r)&&(e.push(r.i/t|0),e.push(i.i/t|0),e.push(s.i/t|0),rh(i),rh(i.next),i=n=s),i=i.next}while(i!==n);return fl(i)}function VU(n,e,t,i,r,s){let o=n;do{let a=o.next.next;for(;a!==o.prev;){if(o.i!==a.i&&qU(o,a)){let l=oB(o,a);o=fl(o,o.next),l=fl(l,l.next),nh(o,e,t,i,r,s,0),nh(l,e,t,i,r,s,0);return}a=a.next}o=o.next}while(o!==n)}function WU(n,e,t,i){const r=[];let s,o,a,l,u;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&&yc(or.x||t.x===r.x&&YU(r,t)))&&(r=t,h=d)),t=t.next;while(t!==a);return r}function YU(n,e){return rn(n.prev,n,e.prev)<0&&rn(e.next,n,n.next)<0}function KU(n,e,t,i){let r=n;do r.z===0&&(r.z=x1(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,QU(r)}function QU(n){let e,t,i,r,s,o,a,l,u=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,u*=2}while(o>1);return n}function x1(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 ZU(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 qU(n,e){return n.next.i!==e.i&&n.prev.i!==e.i&&!$U(n,e)&&(ih(n,e)&&ih(e,n)&&eG(n,e)&&(rn(n.prev,n,e.prev)||rn(n,e.prev,e))||Vg(n,e)&&rn(n.prev,n,n.next)>0&&rn(e.prev,e,e.next)>0)}function rn(n,e,t){return(e.y-n.y)*(t.x-e.x)-(e.x-n.x)*(t.y-e.y)}function Vg(n,e){return n.x===e.x&&n.y===e.y}function sB(n,e,t,i){const r=Ip(rn(n,e,t)),s=Ip(rn(n,e,i)),o=Ip(rn(t,i,n)),a=Ip(rn(t,i,e));return!!(r!==s&&o!==a||r===0&&Lp(n,t,e)||s===0&&Lp(n,i,e)||o===0&&Lp(t,n,i)||a===0&&Lp(t,e,i))}function Lp(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 Ip(n){return n>0?1:n<0?-1:0}function $U(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&&sB(t,t.next,n,e))return!0;t=t.next}while(t!==n);return!1}function ih(n,e){return rn(n.prev,n,n.next)<0?rn(n,e,n.next)>=0&&rn(n,n.prev,e)>=0:rn(n,e,n.prev)<0||rn(n,n.next,e)<0}function eG(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 oB(n,e){const t=new _1(n.i,n.x,n.y),i=new _1(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 iE(n,e,t,i){const r=new _1(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 rh(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 _1(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 tG(n,e,t,i){let r=0;for(let s=e,o=t-i;s2&&n[e-1].equals(n[0])&&n.pop()}function sE(n,e){for(let t=0;tNumber.EPSILON){const ae=Math.sqrt(N),Ce=Math.sqrt(vt*vt+_t*_t),Ee=de.x-et/ae,Pe=de.y+Je/ae,Ke=Me.x-_t/Ce,Oe=Me.y+vt/Ce,ye=((Ke-Ee)*_t-(Oe-Pe)*vt)/(Je*_t-et*vt);Ge=Ee+Je*ye-he.x,Be=Pe+et*ye-he.y;const $e=Ge*Ge+Be*Be;if($e<=2)return new pe(Ge,Be);Ye=Math.sqrt($e/2)}else{let ae=!1;Je>Number.EPSILON?vt>Number.EPSILON&&(ae=!0):Je<-Number.EPSILON?vt<-Number.EPSILON&&(ae=!0):Math.sign(et)===Math.sign(_t)&&(ae=!0),ae?(Ge=-et,Be=Je,Ye=Math.sqrt(N)):(Ge=Je,Be=et,Ye=Math.sqrt(N/2))}return new pe(Ge/Ye,Be/Ye)}const V=[];for(let he=0,de=W.length,Me=de-1,Ge=he+1;he=0;he--){const de=he/x,Me=m*Math.cos(de*Math.PI/2),Ge=y*Math.sin(de*Math.PI/2)+v;for(let Be=0,Ye=W.length;Be=0;){const Ge=Me;let Be=Me-1;Be<0&&(Be=he.length-1);for(let Ye=0,Je=h+x*2;Ye0)&&m.push(w,M,P),(A!==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 uB extends Pn{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new De(16777215),this.specular=new De(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new De(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ia,this.normalScale=new pe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=gh,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 fB extends Pn{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new De(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new De(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ia,this.normalScale=new pe(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 hB extends Pn{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ia,this.normalScale=new pe(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 dB extends Pn{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new De(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new De(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ia,this.normalScale=new pe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=gh,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 pB extends Pn{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new De(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ia,this.normalScale=new pe(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 mB extends ui{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 ur(n,e,t){return _A(n)?new n.constructor(n.subarray(e,t!==void 0?t:n.length)):n.slice(e,t)}function Xa(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 _A(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function gB(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 A1(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 AA(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 sG(n,e,t,i,r=30){const s=n.clone();s.name=e;const o=[];for(let l=0;l=i)){d.push(u.times[m]);for(let v=0;vs.tracks[l].times[0]&&(a=s.tracks[l].times[0]);for(let l=0;l=a.times[y]){const A=y*d+h,_=A+d-h;v=ur(a.values,A,_)}else{const A=a.createInterpolant(),_=h,w=d-h;A.evaluate(s),v=ur(A.resultBuffer,_,w)}l==="quaternion"&&new Wn().fromArray(v).normalize().conjugate().toArray(v);const x=u.times.length;for(let A=0;A=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=ur(i,s,o),this.values=ur(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&&_A(r))for(let a=0,l=r.length;a!==l;++a){const u=r[a];if(isNaN(u)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,u),e=!1;break}}return e}optimize(){const e=ur(this.times),t=ur(this.values),i=this.getValueSize(),r=this.getInterpolation()===mm,s=e.length-1;let o=1;for(let a=1;a0){e[o]=e[s];for(let a=s*i,l=o*i,u=0;u!==i;++u)t[l+u]=t[a+u];++o}return o!==e.length?(this.times=ur(e,0,o),this.values=ur(t,0,o*i)):(this.times=e,this.values=t),this}clone(){const e=ur(this.times,0),t=ur(this.values,0),i=this.constructor,r=new i(this.name,e,t);return r.createInterpolant=this.createInterpolant,r}}Wr.prototype.TimeBufferType=Float32Array;Wr.prototype.ValueBufferType=Float32Array;Wr.prototype.DefaultInterpolation=ul;class yl extends Wr{}yl.prototype.ValueTypeName="bool";yl.prototype.ValueBufferType=Array;yl.prototype.DefaultInterpolation=Vc;yl.prototype.InterpolantFactoryMethodLinear=void 0;yl.prototype.InterpolantFactoryMethodSmooth=void 0;class SA extends Wr{}SA.prototype.ValueTypeName="color";class Xc extends Wr{}Xc.prototype.ValueTypeName="number";class xB extends uu{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 u=e*a;for(let h=u+a;u!==h;u+=4)Wn.slerpFlat(s,0,o,u-a,o,u,l);return s}}class Zo extends Wr{InterpolantFactoryMethodLinear(e){return new xB(this.times,this.values,this.getValueSize(),e)}}Zo.prototype.ValueTypeName="quaternion";Zo.prototype.DefaultInterpolation=ul;Zo.prototype.InterpolantFactoryMethodSmooth=void 0;class vl extends Wr{}vl.prototype.ValueTypeName="string";vl.prototype.ValueBufferType=Array;vl.prototype.DefaultInterpolation=Vc;vl.prototype.InterpolantFactoryMethodLinear=void 0;vl.prototype.InterpolantFactoryMethodSmooth=void 0;class Yc extends Wr{}Yc.prototype.ValueTypeName="vector";class Kc{constructor(e,t=-1,i,r=Ig){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(cG(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(Wr.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(u)}}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,m,y,v){if(m.length!==0){const x=[],A=[];AA(m,x,A,y),x.length!==0&&v.push(new d(p,x,A))}},r=[],s=e.name||"default",o=e.fps||30,a=e.blendMode;let l=e.length||-1;const u=e.hierarchy||[];for(let d=0;d{t&&t(s),this.manager.itemEnd(e)},0),s;if(Rs[e]!==void 0){Rs[e].push({onLoad:t,onProgress:i,onError:r});return}Rs[e]=[],Rs[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(u=>{if(u.status===200||u.status===0){if(u.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||u.body===void 0||u.body.getReader===void 0)return u;const h=Rs[e],d=u.body.getReader(),p=u.headers.get("Content-Length")||u.headers.get("X-File-Size"),m=p?parseInt(p):0,y=m!==0;let v=0;const x=new ReadableStream({start(A){_();function _(){d.read().then(({done:w,value:M})=>{if(w)A.close();else{v+=M.byteLength;const b=new ProgressEvent("progress",{lengthComputable:y,loaded:v,total:m});for(let P=0,R=h.length;P{switch(l){case"arraybuffer":return u.arrayBuffer();case"blob":return u.blob();case"document":return u.text().then(h=>new DOMParser().parseFromString(h,a));case"json":return u.json();default:if(a===void 0)return u.text();{const d=/charset="?([^;"\s]*)"?/i.exec(a),p=d&&d[1]?d[1].toLowerCase():void 0,m=new TextDecoder(p);return u.arrayBuffer().then(y=>m.decode(y))}}}).then(u=>{hl.add(e,u);const h=Rs[e];delete Rs[e];for(let d=0,p=h.length;d{const h=Rs[e];if(h===void 0)throw this.manager.itemError(e),u;delete Rs[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 fG extends Ai{constructor(e){super(e)}load(e,t,i,r){const s=this,o=new Xi(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 De().setHex(o.value);break;case"v2":r.uniforms[s].value=new pe().fromArray(o.value);break;case"v3":r.uniforms[s].value=new F().fromArray(o.value);break;case"v4":r.uniforms[s].value=new Nt().fromArray(o.value);break;case"m3":r.uniforms[s].value=new Kn().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 pe().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 pe().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:lB,SpriteMaterial:lA,RawShaderMaterial:cB,ShaderMaterial:ps,PointsMaterial:Ah,MeshPhysicalMaterial:gs,MeshStandardMaterial:Dh,MeshPhongMaterial:uB,MeshToonMaterial:fB,MeshNormalMaterial:hB,MeshLambertMaterial:dB,MeshDepthMaterial:oA,MeshDistanceMaterial:aA,MeshBasicMaterial:Vi,MeshMatcapMaterial:pB,LineDashedMaterial:mB,LineBasicMaterial:ui,Material:Pn};return new t[e]}}class us{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 MA(t);s=new sh(l),s.setCrossOrigin(this.crossOrigin);for(let u=0,h=e.length;u0){r=new sh(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=hl.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){hl.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 Dp;class PA{static getContext(){return Dp===void 0&&(Dp=new(window.AudioContext||window.webkitAudioContext)),Dp}static setContext(e){Dp=e}}class _G extends Ai{constructor(e){super(e)}load(e,t,i,r){const s=this,o=new Xi(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);PA.getContext().decodeAudioData(l,function(h){t(h)})}catch(l){r?r(l):console.error(l),s.manager.itemError(e)}},i,r)}}class AG extends Wg{constructor(e,t,i=1){super(void 0,i),this.isHemisphereLightProbe=!0;const r=new De().set(e),s=new De().set(t),o=new F(r.r,r.g,r.b),a=new F(s.r,s.g,s.b),l=Math.sqrt(Math.PI),u=l*Math.sqrt(.75);this.sh.coefficients[0].copy(o).add(a).multiplyScalar(l),this.sh.coefficients[1].copy(o).sub(a).multiplyScalar(u)}}class wG extends Wg{constructor(e,t=1){super(void 0,t),this.isAmbientLightProbe=!0;const i=new De().set(e);this.sh.coefficients[0].set(i.r,i.g,i.b).multiplyScalar(2*Math.sqrt(Math.PI))}}const dE=new ot,pE=new ot,wa=new ot;class SG{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Jt,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Jt,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,wa.copy(e.projectionMatrix);const r=t.eyeSep/2,s=r*t.near/t.focus,o=t.near*Math.tan(tl*t.fov*.5)/t.zoom;let a,l;pE.elements[12]=-r,dE.elements[12]=r,a=-o*t.aspect+s,l=o*t.aspect+s,wa.elements[0]=2*t.near/(l-a),wa.elements[8]=(l+a)/(l-a),this.cameraL.projectionMatrix.copy(wa),a=-o*t.aspect-s,l=o*t.aspect-s,wa.elements[0]=2*t.near/(l-a),wa.elements[8]=(l+a)/(l-a),this.cameraR.projectionMatrix.copy(wa)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(pE),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(dE)}}class BA{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=mE(),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=mE();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function mE(){return(typeof performance>"u"?Date:performance).now()}const Sa=new F,gE=new Wn,MG=new F,Ma=new F;class CG extends Mt{constructor(){super(),this.type="AudioListener",this.context=PA.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new BA}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(Sa,gE,MG),Ma.set(0,0,-1).applyQuaternion(gE),t.positionX){const r=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(Sa.x,r),t.positionY.linearRampToValueAtTime(Sa.y,r),t.positionZ.linearRampToValueAtTime(Sa.z,r),t.forwardX.linearRampToValueAtTime(Ma.x,r),t.forwardY.linearRampToValueAtTime(Ma.y,r),t.forwardZ.linearRampToValueAtTime(Ma.z,r),t.upX.linearRampToValueAtTime(i.x,r),t.upY.linearRampToValueAtTime(i.y,r),t.upZ.linearRampToValueAtTime(i.z,r)}else t.setPosition(Sa.x,Sa.y,Sa.z),t.setOrientation(Ma.x,Ma.y,Ma.z,i.x,i.y,i.z)}}class bB extends Mt{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,u=t+t;l!==u;++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){Wn.slerpFlat(e,t,e,t,e,i,r)}_slerpAdditive(e,t,i,r,s){const o=this._workIndex*s;Wn.multiplyQuaternionsFlat(e,o,e,t,e,i),Wn.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 RA="\\[\\]\\.:\\/",PG=new RegExp("["+RA+"]","g"),LA="[^"+RA+"]",BG="[^"+RA.replace("\\.","")+"]",RG=/((?:WC+[\/:])*)/.source.replace("WC",LA),LG=/(WCOD+)?/.source.replace("WCOD",BG),IG=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",LA),DG=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",LA),FG=new RegExp("^"+RG+LG+IG+DG+"$"),kG=["material","materials","bones","map"];class NG{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(PG,"")}static parseTrackName(e){const t=FG.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);kG.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[u]=d,e[d]=l;for(let m=0,y=r;m!==y;++m){const v=i[m],x=v[d],A=v[h];v[h]=x,v[d]=A}}}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 u=arguments[a],h=u.uuid,d=t[h];if(d!==void 0)if(delete t[h],d0&&(t[m.uuid]=d),e[d]=m,e.pop();for(let y=0,v=r;y!==v;++y){const x=i[y];x[d]=x[p],x.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,u=l.length,h=this.nCachedObjects_,d=new Array(u);r=s.length,i[e]=r,o.push(e),a.push(t),s.push(d);for(let p=h,m=l.length;p!==m;++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],u=e[a];t[u]=i,o[i]=l,o.pop(),s[i]=s[a],s.pop(),r[i]=r[a],r.pop()}}}class zG{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:Wa,endingEnd:Wa};for(let u=0;u!==o;++u){const h=s[u].createInterpolant(null);a[u]=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=bP,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,u=a.sampleValues;return l[0]=s,l[1]=s+i,u[0]=e/o,u[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,u=this._propertyBindings;switch(this.blendMode){case Y_:for(let h=0,d=l.length;h!==d;++h)l[h].evaluate(o),u[h].accumulateAdditive(a);break;case Ig:default:for(let h=0,d=l.length;h!==d;++h)l[h].evaluate(o),u[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===TP;if(e===0)return s===-1?r:o&&(s&1)===1?t-r:r;if(i===EP){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 u=e<0;this._setEndings(u,!u,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=ja,r.endingEnd=ja):(e?r.endingStart=this.zeroSlopeAtStart?ja:Wa:r.endingStart=Zf,t?r.endingEnd=this.zeroSlopeAtEnd?ja:Wa:r.endingEnd=Zf)}_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 UG=new Float32Array(1);class GG extends ms{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,u=this._bindingsByRootAndName;let h=u[l];h===void 0&&(h={},u[l]=h);for(let d=0;d!==s;++d){const p=r[d],m=p.name;let y=h[m];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,m));continue}const v=t&&t._propertyBindings[d].binding.parsedPath;y=new TB(Et.create(i,m,v),p.ValueTypeName,p.getValueSize()),++y.referenceCount,this._addInactiveBinding(y,l,m),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 u=0;u!==i;++u)t[u]._update(r,e,s,o);const a=this._bindings,l=this._nActiveBindings;for(let u=0;u!==l;++u)a[u].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,xE).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 _E=new F,Fp=new F;class YG{constructor(e=new F,t=new F){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){_E.subVectors(e,this.start),Fp.subVectors(this.end,this.start);const i=Fp.dot(Fp);let s=Fp.dot(_E)/i;return t&&(s=An(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 AE=new F;class KG extends Mt{constructor(e,t){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=t,this.type="SpotLightHelper";const i=new ft,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{EE.set(e.z,0,-e.x).normalize();const t=Math.acos(e.y);this.quaternion.setFromAxisAngle(EE,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 l9 extends Hr{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 ft;r.setAttribute("position",new Ve(t,3)),r.setAttribute("color",new Ve(i,3));const s=new ui({vertexColors:!0,toneMapped:!1});super(r,s),this.type="AxesHelper"}setColors(e,t,i){const r=new De,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 c9{constructor(){this.type="ShapePath",this.color=new De,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new th,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(A){const _=[];for(let w=0,M=A.length;wNumber.EPSILON){if(I<0&&(R=_[P],B=-B,E=_[b],I=-I),A.yE.y)continue;if(A.y===R.y){if(A.x===R.x)return!0}else{const z=I*(A.x-R.x)-B*(A.y-R.y);if(z===0)return!0;if(z<0)continue;M=!M}}else{if(A.y!==R.y)continue;if(E.x<=A.x&&A.x<=R.x||R.x<=A.x&&A.x<=E.x)return!0}}return M}const r=cs.isClockWise,s=this.subPaths;if(s.length===0)return[];let o,a,l;const u=[];if(s.length===1)return a=s[0],l=new il,l.curves=a.curves,u.push(l),u;let h=!r(s[0].getPoints());h=e?!h:h;const d=[],p=[];let m=[],y=0,v;p[y]=void 0,m[y]=[];for(let A=0,_=s.length;A<_;A++)a=s[A],v=a.getPoints(),o=r(v),o=e?!o:o,o?(!h&&p[y]&&y++,p[y]={s:new il,p:v},p[y].s.curves=a.curves,h&&y++,m[y]=[]):m[y].push({h:a,p:v[0]});if(!p[0])return t(s);if(p.length>1){let A=!1,_=0;for(let w=0,M=p.length;w0&&A===!1&&(m=d)}let x;for(let A=0,_=p.length;A<_;A++){l=p[A].s,u.push(l),x=m[A];for(let w=0,M=x.length;w>-u-14,i[l|256]=1024>>-u-14|32768,r[l]=-u-1,r[l|256]=-u-1):u<=15?(i[l]=u+15<<10,i[l|256]=u+15<<10|32768,r[l]=13,r[l|256]=13):u<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 u=l<<13,h=0;for(;!(u&8388608);)u<<=1,h-=8388608;u&=-8388609,h+=947912704,s[l]=u|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 f9(n){Math.abs(n)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),n=An(n,-65504,65504),ks.floatView[0]=n;const e=ks.uint32View[0],t=e>>23&511;return ks.baseTable[t]+((e&8388607)>>ks.shiftTable[t])}function h9(n){const e=n>>10;return ks.uint32View[0]=ks.mantissaTable[ks.offsetTable[e]+(n&1023)]+ks.exponentTable[e],ks.floatView[0]}const d9={toHalfFloat:f9,fromHalfFloat:h9};class p9 extends oa{constructor(e,t,i,r,s,o){console.warn("THREE.BoxBufferGeometry has been renamed to THREE.BoxGeometry."),super(e,t,i,r,s,o)}}class m9 extends wh{constructor(e,t,i,r){console.warn("THREE.CapsuleBufferGeometry has been renamed to THREE.CapsuleGeometry."),super(e,t,i,r)}}class g9 extends Sh{constructor(e,t,i,r){console.warn("THREE.CircleBufferGeometry has been renamed to THREE.CircleGeometry."),super(e,t,i,r)}}class y9 extends Mh{constructor(e,t,i,r,s,o,a){console.warn("THREE.ConeBufferGeometry has been renamed to THREE.ConeGeometry."),super(e,t,i,r,s,o,a)}}class v9 extends gl{constructor(e,t,i,r,s,o,a,l){console.warn("THREE.CylinderBufferGeometry has been renamed to THREE.CylinderGeometry."),super(e,t,i,r,s,o,a,l)}}class x9 extends Ch{constructor(e,t){console.warn("THREE.DodecahedronBufferGeometry has been renamed to THREE.DodecahedronGeometry."),super(e,t)}}class _9 extends Eh{constructor(e,t){console.warn("THREE.ExtrudeBufferGeometry has been renamed to THREE.ExtrudeGeometry."),super(e,t)}}class A9 extends bh{constructor(e,t){console.warn("THREE.IcosahedronBufferGeometry has been renamed to THREE.IcosahedronGeometry."),super(e,t)}}class w9 extends au{constructor(e,t,i,r){console.warn("THREE.LatheBufferGeometry has been renamed to THREE.LatheGeometry."),super(e,t,i,r)}}class S9 extends lu{constructor(e,t){console.warn("THREE.OctahedronBufferGeometry has been renamed to THREE.OctahedronGeometry."),super(e,t)}}class M9 extends su{constructor(e,t,i,r){console.warn("THREE.PlaneBufferGeometry has been renamed to THREE.PlaneGeometry."),super(e,t,i,r)}}class C9 extends to{constructor(e,t,i,r){console.warn("THREE.PolyhedronBufferGeometry has been renamed to THREE.PolyhedronGeometry."),super(e,t,i,r)}}class E9 extends Th{constructor(e,t,i,r,s,o){console.warn("THREE.RingBufferGeometry has been renamed to THREE.RingGeometry."),super(e,t,i,r,s,o)}}class b9 extends Ph{constructor(e,t){console.warn("THREE.ShapeBufferGeometry has been renamed to THREE.ShapeGeometry."),super(e,t)}}class T9 extends cu{constructor(e,t,i,r,s,o,a){console.warn("THREE.SphereBufferGeometry has been renamed to THREE.SphereGeometry."),super(e,t,i,r,s,o,a)}}class P9 extends Bh{constructor(e,t){console.warn("THREE.TetrahedronBufferGeometry has been renamed to THREE.TetrahedronGeometry."),super(e,t)}}class B9 extends Rh{constructor(e,t,i,r,s){console.warn("THREE.TorusBufferGeometry has been renamed to THREE.TorusGeometry."),super(e,t,i,r,s)}}class R9 extends Lh{constructor(e,t,i,r,s,o){console.warn("THREE.TorusKnotBufferGeometry has been renamed to THREE.TorusKnotGeometry."),super(e,t,i,r,s,o)}}class L9 extends Ih{constructor(e,t,i,r,s){console.warn("THREE.TubeBufferGeometry has been renamed to THREE.TubeGeometry."),super(e,t,i,r,s)}}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:nu}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=nu);const I9=Object.freeze(Object.defineProperty({__proto__:null,ACESFilmicToneMapping:J_,AddEquation:Na,AddOperation:oP,AdditiveAnimationBlendMode:Y_,AdditiveBlending:Ux,AlphaFormat:gP,AlwaysDepth:$3,AlwaysStencilFunc:IP,AmbientLight:AB,AmbientLightProbe:wG,AnimationClip:Kc,AnimationLoader:fG,AnimationMixer:GG,AnimationObjectGroup:OG,AnimationUtils:aG,ArcCurve:qP,ArrayCamera:JP,ArrowHelper:a9,Audio:bB,AudioAnalyser:TG,AudioContext:PA,AudioListener:CG,AudioLoader:_G,AxesHelper:l9,BackSide:Li,BasicDepthPacking:BP,BasicShadowMap:z3,Bone:Ug,BooleanKeyframeTrack:yl,Box2:XG,Box3:ra,Box3Helper:s9,BoxBufferGeometry:p9,BoxGeometry:oa,BoxHelper:r9,BufferAttribute:Lt,BufferGeometry:ft,BufferGeometryLoader:CB,ByteType:fP,Cache:hl,Camera:yh,CameraHelper:i9,CanvasTexture:RU,CapsuleBufferGeometry:m9,CapsuleGeometry:wh,CatmullRomCurve3:$P,CineonToneMapping:cP,CircleBufferGeometry:g9,CircleGeometry:Sh,ClampToEdgeWrapping:Yn,Clock:BA,Color:De,ColorKeyframeTrack:SA,ColorManagement:ai,CompressedArrayTexture:BU,CompressedTexture:dA,CompressedTextureLoader:hG,ConeBufferGeometry:y9,ConeGeometry:Mh,CubeCamera:iA,CubeReflectionMapping:Jo,CubeRefractionMapping:Xo,CubeTexture:vh,CubeTextureLoader:dG,CubeUVReflectionMapping:iu,CubicBezierCurve:mA,CubicBezierCurve3:eB,CubicInterpolant:yB,CullFaceBack:zx,CullFaceFront:O3,CullFaceFrontBack:Rk,CullFaceNone:N3,Curve:Vr,CurvePath:nB,CustomBlending:U3,CustomToneMapping:uP,CylinderBufferGeometry:v9,CylinderGeometry:gl,Cylindrical:JG,Data3DTexture:eA,DataArrayTexture:Dg,DataTexture:Rc,DataTextureLoader:pG,DataUtils:d9,DecrementStencilOp:Gk,DecrementWrapStencilOp:Vk,DefaultLoadingManager:vc,DepthFormat:Uo,DepthStencilFormat:cl,DepthTexture:XP,DirectionalLight:TA,DirectionalLightHelper:n9,DiscreteInterpolant:vB,DisplayP3ColorSpace:Q_,DodecahedronBufferGeometry:x9,DodecahedronGeometry:Ch,DoubleSide:Fr,DstAlphaFactor:X3,DstColorFactor:K3,DynamicCopyUsage:iN,DynamicDrawUsage:el,DynamicReadUsage:eN,EdgesGeometry:iB,EllipseCurve:Gg,EqualDepth:tP,EqualStencilFunc:Xk,EquirectangularReflectionMapping:Yf,EquirectangularRefractionMapping:Kf,Euler:ml,EventDispatcher:ms,ExtrudeBufferGeometry:_9,ExtrudeGeometry:Eh,FileLoader:Xi,Float16BufferAttribute:VN,Float32BufferAttribute:Ve,Float64BufferAttribute:WN,FloatType:zs,Fog:zg,FogExp2:Og,FramebufferTexture:PU,FrontSide:hs,Frustum:Fg,GLBufferAttribute:jG,GLSL1:sN,GLSL3:p1,GreaterDepth:iP,GreaterEqualDepth:nP,GreaterEqualStencilFunc:Zk,GreaterStencilFunc:Kk,GridHelper:e9,Group:Gs,HalfFloatType:Hc,HemisphereLight:_B,HemisphereLightHelper:$G,HemisphereLightProbe:AG,IcosahedronBufferGeometry:A9,IcosahedronGeometry:bh,ImageBitmapLoader:EB,ImageLoader:sh,ImageUtils:$_,IncrementStencilOp:Uk,IncrementWrapStencilOp:Hk,InstancedBufferAttribute:Jc,InstancedBufferGeometry:MB,InstancedInterleavedBuffer:WG,InstancedMesh:uA,Int16BufferAttribute:GN,Int32BufferAttribute:HN,Int8BufferAttribute:ON,IntType:dP,InterleavedBuffer:xh,InterleavedBufferAttribute:Qo,Interpolant:uu,InterpolateDiscrete:Vc,InterpolateLinear:ul,InterpolateSmooth:mm,InvertStencilOp:Wk,KeepStencilOp:gm,KeyframeTrack:Wr,LOD:ZP,LatheBufferGeometry:w9,LatheGeometry:au,Layers:nl,LessDepth:eP,LessEqualDepth:Jm,LessEqualStencilFunc:Yk,LessStencilFunc:Jk,Light:aa,LightProbe:Wg,Line:qs,Line3:YG,LineBasicMaterial:ui,LineCurve:Hg,LineCurve3:tB,LineDashedMaterial:mB,LineLoop:fA,LineSegments:Hr,LinearEncoding:Ko,LinearFilter:nn,LinearInterpolant:wA,LinearMipMapLinearFilter:kk,LinearMipMapNearestFilter:Fk,LinearMipmapLinearFilter:ds,LinearMipmapNearestFilter:Lg,LinearSRGBColorSpace:Wc,LinearToneMapping:aP,Loader:Ai,LoaderUtils:us,LoadingManager:MA,LoopOnce:EP,LoopPingPong:TP,LoopRepeat:bP,LuminanceAlphaFormat:vP,LuminanceFormat:yP,MOUSE:La,Material:Pn,MaterialLoader:jg,MathUtils:q_,Matrix3:Kn,Matrix4:ot,MaxEquation:Wx,Mesh:In,MeshBasicMaterial:Vi,MeshDepthMaterial:oA,MeshDistanceMaterial:aA,MeshLambertMaterial:dB,MeshMatcapMaterial:pB,MeshNormalMaterial:hB,MeshPhongMaterial:uB,MeshPhysicalMaterial:gs,MeshStandardMaterial:Dh,MeshToonMaterial:fB,MinEquation:Vx,MirroredRepeatWrapping:Gc,MixOperation:sP,MultiplyBlending:Hx,MultiplyOperation:gh,NearestFilter:mn,NearestMipMapLinearFilter:Dk,NearestMipMapNearestFilter:Ik,NearestMipmapLinearFilter:Pc,NearestMipmapNearestFilter:Qf,NeverDepth:q3,NeverStencilFunc:jk,NoBlending:Ws,NoColorSpace:Nk,NoToneMapping:zr,NormalAnimationBlendMode:Ig,NormalBlending:qa,NotEqualDepth:rP,NotEqualStencilFunc:Qk,NumberKeyframeTrack:Xc,Object3D:Mt,ObjectLoader:vG,ObjectSpaceNormalMap:LP,OctahedronBufferGeometry:S9,OctahedronGeometry:lu,OneFactor:W3,OneMinusDstAlphaFactor:Y3,OneMinusDstColorFactor:Q3,OneMinusSrcAlphaFactor:j_,OneMinusSrcColorFactor:J3,OrthographicCamera:mr,PCFShadowMap:Bg,PCFSoftShadowMap:Af,PMREMGenerator:g1,Path:th,PerspectiveCamera:Jt,Plane:Ds,PlaneBufferGeometry:M9,PlaneGeometry:su,PlaneHelper:o9,PointLight:bA,PointLightHelper:ZG,Points:hA,PointsMaterial:Ah,PolarGridHelper:t9,PolyhedronBufferGeometry:C9,PolyhedronGeometry:to,PositionalAudio:bG,PropertyBinding:Et,PropertyMixer:TB,QuadraticBezierCurve:gA,QuadraticBezierCurve3:yA,Quaternion:Wn,QuaternionKeyframeTrack:Zo,QuaternionLinearInterpolant:xB,RED_GREEN_RGTC2_Format:h1,RED_RGTC1_Format:CP,REVISION:nu,RGBADepthPacking:RP,RGBAFormat:bi,RGBAIntegerFormat:SP,RGBA_ASTC_10x10_Format:l1,RGBA_ASTC_10x5_Format:s1,RGBA_ASTC_10x6_Format:o1,RGBA_ASTC_10x8_Format:a1,RGBA_ASTC_12x10_Format:c1,RGBA_ASTC_12x12_Format:u1,RGBA_ASTC_4x4_Format:Zx,RGBA_ASTC_5x4_Format:qx,RGBA_ASTC_5x5_Format:$x,RGBA_ASTC_6x5_Format:e1,RGBA_ASTC_6x6_Format:t1,RGBA_ASTC_8x5_Format:n1,RGBA_ASTC_8x6_Format:i1,RGBA_ASTC_8x8_Format:r1,RGBA_BPTC_Format:pm,RGBA_ETC2_EAC_Format:Qx,RGBA_PVRTC_2BPPV1_Format:Yx,RGBA_PVRTC_4BPPV1_Format:Xx,RGBA_S3TC_DXT1_Format:fm,RGBA_S3TC_DXT3_Format:hm,RGBA_S3TC_DXT5_Format:dm,RGB_ETC1_Format:MP,RGB_ETC2_Format:Kx,RGB_PVRTC_2BPPV1_Format:Jx,RGB_PVRTC_4BPPV1_Format:jx,RGB_S3TC_DXT1_Format:um,RGFormat:AP,RGIntegerFormat:wP,RawShaderMaterial:cB,Ray:ru,Raycaster:PB,RectAreaLight:wB,RedFormat:xP,RedIntegerFormat:_P,ReinhardToneMapping:lP,RepeatWrapping:Yo,ReplaceStencilOp:zk,ReverseSubtractEquation:H3,RingBufferGeometry:E9,RingGeometry:Th,SIGNED_RED_GREEN_RGTC2_Format:d1,SIGNED_RED_RGTC1_Format:f1,SRGBColorSpace:Lr,Scene:Km,ShaderChunk:pt,ShaderLib:Dr,ShaderMaterial:ps,ShadowMaterial:lB,Shape:il,ShapeBufferGeometry:b9,ShapeGeometry:Ph,ShapePath:c9,ShapeUtils:cs,ShortType:hP,Skeleton:_h,SkeletonHelper:QG,SkinnedMesh:cA,Source:Ja,Sphere:sa,SphereBufferGeometry:T9,SphereGeometry:cu,Spherical:S1,SphericalHarmonics3:SB,SplineCurve:vA,SpotLight:EA,SpotLightHelper:KG,Sprite:QP,SpriteMaterial:lA,SrcAlphaFactor:W_,SrcAlphaSaturateFactor:Z3,SrcColorFactor:j3,StaticCopyUsage:nN,StaticDrawUsage:qf,StaticReadUsage:$k,StereoCamera:SG,StreamCopyUsage:rN,StreamDrawUsage:qk,StreamReadUsage:tN,StringKeyframeTrack:vl,SubtractEquation:G3,SubtractiveBlending:Gx,TOUCH:Ia,TangentSpaceNormalMap:ia,TetrahedronBufferGeometry:P9,TetrahedronGeometry:Bh,Texture:$t,TextureLoader:Fh,TorusBufferGeometry:B9,TorusGeometry:Rh,TorusKnotBufferGeometry:R9,TorusKnotGeometry:Lh,Triangle:dr,TriangleFanDrawMode:Xm,TriangleStripDrawMode:K_,TrianglesDrawMode:PP,TubeBufferGeometry:L9,TubeGeometry:Ih,TwoPassDoubleSide:Lk,UVMapping:Rg,Uint16BufferAttribute:tA,Uint32BufferAttribute:nA,Uint8BufferAttribute:zN,Uint8ClampedBufferAttribute:UN,Uniform:IA,UniformsGroup:VG,UniformsLib:Re,UniformsUtils:zP,UnsignedByteType:Zs,UnsignedInt248Type:$a,UnsignedIntType:Po,UnsignedShort4444Type:pP,UnsignedShort5551Type:mP,UnsignedShortType:X_,VSMShadowMap:Va,Vector2:pe,Vector3:F,Vector4:Nt,VectorKeyframeTrack:Yc,VideoTexture:TU,WebGL1Renderer:YP,WebGL3DRenderTarget:TN,WebGLArrayRenderTarget:bN,WebGLCubeRenderTarget:rA,WebGLMultipleRenderTargets:PN,WebGLRenderTarget:Gr,WebGLRenderer:Ng,WebGLUtils:jP,WireframeGeometry:aB,WrapAroundEnding:Zf,ZeroCurvatureEnding:Wa,ZeroFactor:V3,ZeroSlopeEnding:ja,ZeroStencilOp:Ok,_SRGBAFormat:Ym,sRGBEncoding:Ht},Symbol.toStringTag,{value:"Module"}));var Ro={},D9={get exports(){return Ro},set exports(n){Ro=n}},xl={};/** +}`;function dU(n,e,t){let i=new Dg;const r=new pe,s=new pe,o=new Nt,a=new sA({depthPacking:PP}),l=new oA,u={},h=t.maxTextureSize,d={[hs]:Li,[Li]:hs,[Fr]:Fr},p=new ps({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new pe},radius:{value:4}},vertexShader:fU,fragmentShader:hU}),m=p.clone();m.defines.HORIZONTAL_PASS=1;const y=new ft;y.setAttribute("position",new Lt(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const v=new In(y,p),x=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=Pg,this.render=function(M,b,P){if(x.enabled===!1||x.autoUpdate===!1&&x.needsUpdate===!1||M.length===0)return;const R=n.getRenderTarget(),E=n.getActiveCubeFace(),B=n.getActiveMipmapLevel(),I=n.state;I.setBlending(Ws),I.buffers.color.setClear(1,1,1,1),I.buffers.depth.setTest(!0),I.setScissorTest(!1);for(let z=0,Z=M.length;zh||r.y>h)&&(r.x>h&&(s.x=Math.floor(h/Q.x),r.x=s.x*Q.x,W.mapSize.x=s.x),r.y>h&&(s.y=Math.floor(h/Q.y),r.y=s.y*Q.y,W.mapSize.y=s.y)),W.map===null){const ce=this.type!==Va?{minFilter:mn,magFilter:mn}:{};W.map=new Gr(r.x,r.y,ce),W.map.texture.name=J.name+".shadowMap",W.camera.updateProjectionMatrix()}n.setRenderTarget(W.map),n.clear();const re=W.getViewportCount();for(let ce=0;ce0||b.map&&b.alphaTest>0){const Z=I.uuid,J=b.uuid;let W=u[Z];W===void 0&&(W={},u[Z]=W);let Q=W[J];Q===void 0&&(Q=I.clone(),W[J]=Q),I=Q}return I.visible=b.visible,I.wireframe=b.wireframe,B===Va?I.side=b.shadowSide!==null?b.shadowSide:b.side:I.side=b.shadowSide!==null?b.shadowSide:d[b.side],I.alphaMap=b.alphaMap,I.alphaTest=b.alphaTest,I.map=b.map,I.clipShadows=b.clipShadows,I.clippingPlanes=b.clippingPlanes,I.clipIntersection=b.clipIntersection,I.displacementMap=b.displacementMap,I.displacementScale=b.displacementScale,I.displacementBias=b.displacementBias,I.wireframeLinewidth=b.wireframeLinewidth,I.linewidth=b.linewidth,P.isPointLight===!0&&I.isMeshDistanceMaterial===!0&&(I.referencePosition.setFromMatrixPosition(P.matrixWorld),I.nearDistance=R,I.farDistance=E),I}function w(M,b,P,R,E){if(M.visible===!1)return;if(M.layers.test(b.layers)&&(M.isMesh||M.isLine||M.isPoints)&&(M.castShadow||M.receiveShadow&&E===Va)&&(!M.frustumCulled||i.intersectsObject(M))){M.modelViewMatrix.multiplyMatrices(P.matrixWorldInverse,M.matrixWorld);const z=e.update(M),Z=M.material;if(Array.isArray(Z)){const J=z.groups;for(let W=0,Q=J.length;W=1):L.indexOf("OpenGL ES")!==-1&&(ce=parseFloat(/^OpenGL ES (\d)/.exec(L)[1]),re=ce>=2);let V=null,H={};const $=n.getParameter(3088),G=n.getParameter(2978),se=new Nt().fromArray($),me=new Nt().fromArray(G);function Y(j,oe,xe){const Le=new Uint8Array(4),We=n.createTexture();n.bindTexture(j,We),n.texParameteri(j,10241,9728),n.texParameteri(j,10240,9728);for(let It=0;It"u"?!1:/OculusBrowser/g.test(navigator.userAgent),y=new WeakMap;let v;const x=new WeakMap;let A=!1;try{A=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function _(N,D){return A?new OffscreenCanvas(N,D):eh("canvas")}function w(N,D,ae,Ce){let Ee=1;if((N.width>Ce||N.height>Ce)&&(Ee=Ce/Math.max(N.width,N.height)),Ee<1||D===!0)if(typeof HTMLImageElement<"u"&&N instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&N instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&N instanceof ImageBitmap){const Pe=D?IP:Math.floor,Ke=Pe(Ee*N.width),Oe=Pe(Ee*N.height);v===void 0&&(v=_(Ke,Oe));const ye=ae?_(Ke,Oe):v;return ye.width=Ke,ye.height=Oe,ye.getContext("2d").drawImage(N,0,0,Ke,Oe),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+N.width+"x"+N.height+") to ("+Ke+"x"+Oe+")."),ye}else return"data"in N&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+N.width+"x"+N.height+")."),N;return N}function M(N){return p1(N.width)&&p1(N.height)}function b(N){return a?!1:N.wrapS!==Yn||N.wrapT!==Yn||N.minFilter!==mn&&N.minFilter!==nn}function P(N,D){return N.generateMipmaps&&D&&N.minFilter!==mn&&N.minFilter!==nn}function R(N){n.generateMipmap(N)}function E(N,D,ae,Ce,Ee=!1){if(a===!1)return D;if(N!==null){if(n[N]!==void 0)return n[N];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+N+"'")}let Pe=D;return D===6403&&(ae===5126&&(Pe=33326),ae===5131&&(Pe=33325),ae===5121&&(Pe=33321)),D===33319&&(ae===5126&&(Pe=33328),ae===5131&&(Pe=33327),ae===5121&&(Pe=33323)),D===6408&&(ae===5126&&(Pe=34836),ae===5131&&(Pe=34842),ae===5121&&(Pe=Ce===Ht&&Ee===!1?35907:32856),ae===32819&&(Pe=32854),ae===32820&&(Pe=32855)),(Pe===33325||Pe===33326||Pe===33327||Pe===33328||Pe===34842||Pe===34836)&&e.get("EXT_color_buffer_float"),Pe}function B(N,D,ae){return P(N,ae)===!0||N.isFramebufferTexture&&N.minFilter!==mn&&N.minFilter!==nn?Math.log2(Math.max(D.width,D.height))+1:N.mipmaps!==void 0&&N.mipmaps.length>0?N.mipmaps.length:N.isCompressedTexture&&Array.isArray(N.image)?D.mipmaps.length:1}function I(N){return N===mn||N===Qf||N===Pc?9728:9729}function z(N){const D=N.target;D.removeEventListener("dispose",z),J(D),D.isVideoTexture&&y.delete(D)}function Z(N){const D=N.target;D.removeEventListener("dispose",Z),Q(D)}function J(N){const D=i.get(N);if(D.__webglInit===void 0)return;const ae=N.source,Ce=x.get(ae);if(Ce){const Ee=Ce[D.__cacheKey];Ee.usedTimes--,Ee.usedTimes===0&&W(N),Object.keys(Ce).length===0&&x.delete(ae)}i.remove(N)}function W(N){const D=i.get(N);n.deleteTexture(D.__webglTexture);const ae=N.source,Ce=x.get(ae);delete Ce[D.__cacheKey],o.memory.textures--}function Q(N){const D=N.texture,ae=i.get(N),Ce=i.get(D);if(Ce.__webglTexture!==void 0&&(n.deleteTexture(Ce.__webglTexture),o.memory.textures--),N.depthTexture&&N.depthTexture.dispose(),N.isWebGLCubeRenderTarget)for(let Ee=0;Ee<6;Ee++)n.deleteFramebuffer(ae.__webglFramebuffer[Ee]),ae.__webglDepthbuffer&&n.deleteRenderbuffer(ae.__webglDepthbuffer[Ee]);else{if(n.deleteFramebuffer(ae.__webglFramebuffer),ae.__webglDepthbuffer&&n.deleteRenderbuffer(ae.__webglDepthbuffer),ae.__webglMultisampledFramebuffer&&n.deleteFramebuffer(ae.__webglMultisampledFramebuffer),ae.__webglColorRenderbuffer)for(let Ee=0;Ee=l&&console.warn("THREE.WebGLTextures: Trying to use "+N+" texture units while this GPU supports only "+l),re+=1,N}function V(N){const D=[];return D.push(N.wrapS),D.push(N.wrapT),D.push(N.wrapR||0),D.push(N.magFilter),D.push(N.minFilter),D.push(N.anisotropy),D.push(N.internalFormat),D.push(N.format),D.push(N.type),D.push(N.generateMipmaps),D.push(N.premultiplyAlpha),D.push(N.flipY),D.push(N.unpackAlignment),D.push(N.encoding),D.join()}function H(N,D){const ae=i.get(N);if(N.isVideoTexture&&vt(N),N.isRenderTargetTexture===!1&&N.version>0&&ae.__version!==N.version){const Ce=N.image;if(Ce===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(Ce.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{Ie(ae,N,D);return}}t.bindTexture(3553,ae.__webglTexture,33984+D)}function $(N,D){const ae=i.get(N);if(N.version>0&&ae.__version!==N.version){Ie(ae,N,D);return}t.bindTexture(35866,ae.__webglTexture,33984+D)}function G(N,D){const ae=i.get(N);if(N.version>0&&ae.__version!==N.version){Ie(ae,N,D);return}t.bindTexture(32879,ae.__webglTexture,33984+D)}function se(N,D){const ae=i.get(N);if(N.version>0&&ae.__version!==N.version){ke(ae,N,D);return}t.bindTexture(34067,ae.__webglTexture,33984+D)}const me={[Yo]:10497,[Yn]:33071,[Gc]:33648},Y={[mn]:9728,[Qf]:9984,[Pc]:9986,[nn]:9729,[Rg]:9985,[ds]:9987};function _e(N,D,ae){if(ae?(n.texParameteri(N,10242,me[D.wrapS]),n.texParameteri(N,10243,me[D.wrapT]),(N===32879||N===35866)&&n.texParameteri(N,32882,me[D.wrapR]),n.texParameteri(N,10240,Y[D.magFilter]),n.texParameteri(N,10241,Y[D.minFilter])):(n.texParameteri(N,10242,33071),n.texParameteri(N,10243,33071),(N===32879||N===35866)&&n.texParameteri(N,32882,33071),(D.wrapS!==Yn||D.wrapT!==Yn)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),n.texParameteri(N,10240,I(D.magFilter)),n.texParameteri(N,10241,I(D.minFilter)),D.minFilter!==mn&&D.minFilter!==nn&&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 Ce=e.get("EXT_texture_filter_anisotropic");if(D.magFilter===mn||D.minFilter!==Pc&&D.minFilter!==ds||D.type===zs&&e.has("OES_texture_float_linear")===!1||a===!1&&D.type===Hc&&e.has("OES_texture_half_float_linear")===!1)return;(D.anisotropy>1||i.get(D).__currentAnisotropy)&&(n.texParameterf(N,Ce.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(D.anisotropy,r.getMaxAnisotropy())),i.get(D).__currentAnisotropy=D.anisotropy)}}function Ae(N,D){let ae=!1;N.__webglInit===void 0&&(N.__webglInit=!0,D.addEventListener("dispose",z));const Ce=D.source;let Ee=x.get(Ce);Ee===void 0&&(Ee={},x.set(Ce,Ee));const Pe=V(D);if(Pe!==N.__cacheKey){Ee[Pe]===void 0&&(Ee[Pe]={texture:n.createTexture(),usedTimes:0},o.memory.textures++,ae=!0),Ee[Pe].usedTimes++;const Ke=Ee[N.__cacheKey];Ke!==void 0&&(Ee[N.__cacheKey].usedTimes--,Ke.usedTimes===0&&W(D)),N.__cacheKey=Pe,N.__webglTexture=Ee[Pe].texture}return ae}function Ie(N,D,ae){let Ce=3553;(D.isDataArrayTexture||D.isCompressedArrayTexture)&&(Ce=35866),D.isData3DTexture&&(Ce=32879);const Ee=Ae(N,D),Pe=D.source;t.bindTexture(Ce,N.__webglTexture,33984+ae);const Ke=i.get(Pe);if(Pe.version!==Ke.__version||Ee===!0){t.activeTexture(33984+ae),n.pixelStorei(37440,D.flipY),n.pixelStorei(37441,D.premultiplyAlpha),n.pixelStorei(3317,D.unpackAlignment),n.pixelStorei(37443,0);const Oe=b(D)&&M(D.image)===!1;let ye=w(D.image,Oe,!1,h);ye=_t(D,ye);const $e=M(ye)||a,je=s.convert(D.format,D.encoding);let rt=s.convert(D.type),tt=E(D.internalFormat,je,rt,D.encoding,D.isVideoTexture);_e(Ce,D,$e);let Qe;const X=D.mipmaps,ve=a&&D.isVideoTexture!==!0,ze=Ke.__version===void 0||Ee===!0,j=B(D,ye,$e);if(D.isDepthTexture)tt=6402,a?D.type===zs?tt=36012:D.type===Po?tt=33190:D.type===$a?tt=35056:tt=33189:D.type===zs&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),D.format===Uo&&tt===6402&&D.type!==J_&&D.type!==Po&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),D.type=Po,rt=s.convert(D.type)),D.format===cl&&tt===6402&&(tt=34041,D.type!==$a&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),D.type=$a,rt=s.convert(D.type))),ze&&(ve?t.texStorage2D(3553,1,tt,ye.width,ye.height):t.texImage2D(3553,0,tt,ye.width,ye.height,0,je,rt,null));else if(D.isDataTexture)if(X.length>0&&$e){ve&&ze&&t.texStorage2D(3553,j,tt,X[0].width,X[0].height);for(let oe=0,xe=X.length;oe>=1,xe>>=1}}else if(X.length>0&&$e){ve&&ze&&t.texStorage2D(3553,j,tt,X[0].width,X[0].height);for(let oe=0,xe=X.length;oe0&&ze++,t.texStorage2D(34067,ze,Qe,ye[0].width,ye[0].height));for(let oe=0;oe<6;oe++)if(Oe){X?t.texSubImage2D(34069+oe,0,0,0,ye[oe].width,ye[oe].height,rt,tt,ye[oe].data):t.texImage2D(34069+oe,0,Qe,ye[oe].width,ye[oe].height,0,rt,tt,ye[oe].data);for(let xe=0;xe=34069&&Ee<=34074)&&n.framebufferTexture2D(36160,Ce,Ee,i.get(ae).__webglTexture,0),t.bindFramebuffer(36160,null)}function we(N,D,ae){if(n.bindRenderbuffer(36161,N),D.depthBuffer&&!D.stencilBuffer){let Ce=33189;if(ae||et(D)){const Ee=D.depthTexture;Ee&&Ee.isDepthTexture&&(Ee.type===zs?Ce=36012:Ee.type===Po&&(Ce=33190));const Pe=Je(D);et(D)?p.renderbufferStorageMultisampleEXT(36161,Pe,Ce,D.width,D.height):n.renderbufferStorageMultisample(36161,Pe,Ce,D.width,D.height)}else n.renderbufferStorage(36161,Ce,D.width,D.height);n.framebufferRenderbuffer(36160,36096,36161,N)}else if(D.depthBuffer&&D.stencilBuffer){const Ce=Je(D);ae&&et(D)===!1?n.renderbufferStorageMultisample(36161,Ce,35056,D.width,D.height):et(D)?p.renderbufferStorageMultisampleEXT(36161,Ce,35056,D.width,D.height):n.renderbufferStorage(36161,34041,D.width,D.height),n.framebufferRenderbuffer(36160,33306,36161,N)}else{const Ce=D.isWebGLMultipleRenderTargets===!0?D.texture:[D.texture];for(let Ee=0;Ee0&&et(N)===!1){const Oe=Pe?D:[D];ae.__webglMultisampledFramebuffer=n.createFramebuffer(),ae.__webglColorRenderbuffer=[],t.bindFramebuffer(36160,ae.__webglMultisampledFramebuffer);for(let ye=0;ye0&&et(N)===!1){const D=N.isWebGLMultipleRenderTargets?N.texture:[N.texture],ae=N.width,Ce=N.height;let Ee=16384;const Pe=[],Ke=N.stencilBuffer?33306:36096,Oe=i.get(N),ye=N.isWebGLMultipleRenderTargets===!0;if(ye)for(let $e=0;$e0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&D.__useRenderToTexture!==!1}function vt(N){const D=o.render.frame;y.get(N)!==D&&(y.set(N,D),N.update())}function _t(N,D){const ae=N.encoding,Ce=N.format,Ee=N.type;return N.isCompressedTexture===!0||N.isVideoTexture===!0||N.format===Xm||ae!==Ko&&(ae===Ht?a===!1?e.has("EXT_sRGB")===!0&&Ce===bi?(N.format=Xm,N.minFilter=nn,N.generateMipmaps=!1):D=q_.sRGBToLinear(D):(Ce!==bi||Ee!==Zs)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture encoding:",ae)),D}this.allocateTextureUnit=L,this.resetTextureUnits=ce,this.setTexture2D=H,this.setTexture2DArray=$,this.setTexture3D=G,this.setTextureCube=se,this.rebindTextures=Me,this.setupRenderTarget=Ge,this.updateRenderTargetMipmap=Be,this.updateMultisampleRenderTarget=Ye,this.setupDepthRenderbuffer=de,this.setupFrameBufferTexture=Te,this.useMultisampledRTT=et}function VP(n,e,t){const i=t.isWebGL2;function r(s,o=null){let a;if(s===Zs)return 5121;if(s===hP)return 32819;if(s===dP)return 32820;if(s===cP)return 5120;if(s===uP)return 5122;if(s===J_)return 5123;if(s===fP)return 5124;if(s===Po)return 5125;if(s===zs)return 5126;if(s===Hc)return i?5131:(a=e.get("OES_texture_half_float"),a!==null?a.HALF_FLOAT_OES:null);if(s===pP)return 6406;if(s===bi)return 6408;if(s===mP)return 6409;if(s===gP)return 6410;if(s===Uo)return 6402;if(s===cl)return 34041;if(s===Xm)return a=e.get("EXT_sRGB"),a!==null?a.SRGB_ALPHA_EXT:null;if(s===yP)return 6403;if(s===vP)return 36244;if(s===xP)return 33319;if(s===_P)return 33320;if(s===AP)return 36249;if(s===cm||s===um||s===fm||s===hm)if(o===Ht)if(a=e.get("WEBGL_compressed_texture_s3tc_srgb"),a!==null){if(s===cm)return a.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(s===um)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(s===fm)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(s===hm)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(a=e.get("WEBGL_compressed_texture_s3tc"),a!==null){if(s===cm)return a.COMPRESSED_RGB_S3TC_DXT1_EXT;if(s===um)return a.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(s===fm)return a.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(s===hm)return a.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(s===Wx||s===jx||s===Jx||s===Xx)if(a=e.get("WEBGL_compressed_texture_pvrtc"),a!==null){if(s===Wx)return a.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(s===jx)return a.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(s===Jx)return a.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(s===Xx)return a.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(s===wP)return a=e.get("WEBGL_compressed_texture_etc1"),a!==null?a.COMPRESSED_RGB_ETC1_WEBGL:null;if(s===Yx||s===Kx)if(a=e.get("WEBGL_compressed_texture_etc"),a!==null){if(s===Yx)return o===Ht?a.COMPRESSED_SRGB8_ETC2:a.COMPRESSED_RGB8_ETC2;if(s===Kx)return o===Ht?a.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:a.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(s===Qx||s===Zx||s===qx||s===$x||s===e1||s===t1||s===n1||s===i1||s===r1||s===s1||s===o1||s===a1||s===l1||s===c1)if(a=e.get("WEBGL_compressed_texture_astc"),a!==null){if(s===Qx)return o===Ht?a.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:a.COMPRESSED_RGBA_ASTC_4x4_KHR;if(s===Zx)return o===Ht?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:a.COMPRESSED_RGBA_ASTC_5x4_KHR;if(s===qx)return o===Ht?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:a.COMPRESSED_RGBA_ASTC_5x5_KHR;if(s===$x)return o===Ht?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:a.COMPRESSED_RGBA_ASTC_6x5_KHR;if(s===e1)return o===Ht?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:a.COMPRESSED_RGBA_ASTC_6x6_KHR;if(s===t1)return o===Ht?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:a.COMPRESSED_RGBA_ASTC_8x5_KHR;if(s===n1)return o===Ht?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:a.COMPRESSED_RGBA_ASTC_8x6_KHR;if(s===i1)return o===Ht?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:a.COMPRESSED_RGBA_ASTC_8x8_KHR;if(s===r1)return o===Ht?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:a.COMPRESSED_RGBA_ASTC_10x5_KHR;if(s===s1)return o===Ht?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:a.COMPRESSED_RGBA_ASTC_10x6_KHR;if(s===o1)return o===Ht?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:a.COMPRESSED_RGBA_ASTC_10x8_KHR;if(s===a1)return o===Ht?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:a.COMPRESSED_RGBA_ASTC_10x10_KHR;if(s===l1)return o===Ht?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:a.COMPRESSED_RGBA_ASTC_12x10_KHR;if(s===c1)return o===Ht?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:a.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(s===dm)if(a=e.get("EXT_texture_compression_bptc"),a!==null){if(s===dm)return o===Ht?a.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:a.COMPRESSED_RGBA_BPTC_UNORM_EXT}else return null;if(s===SP||s===u1||s===f1||s===h1)if(a=e.get("EXT_texture_compression_rgtc"),a!==null){if(s===dm)return a.COMPRESSED_RED_RGTC1_EXT;if(s===u1)return a.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(s===f1)return a.COMPRESSED_RED_GREEN_RGTC2_EXT;if(s===h1)return a.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return s===$a?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 WP extends Jt{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}class Gs extends Mt{constructor(){super(),this.isGroup=!0,this.type="Group"}}const gU={type:"move"};class iv{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Gs,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 Gs,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new F,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new F),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Gs,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new F,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new F),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,u=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(u&&e.hand){o=!0;for(const v of e.hand.values()){const x=t.getJointPose(v,i),A=this._getHandJoint(u,v);x!==null&&(A.matrix.fromArray(x.transform.matrix),A.matrix.decompose(A.position,A.rotation,A.scale),A.jointRadius=x.radius),A.visible=x!==null}const h=u.joints["index-finger-tip"],d=u.joints["thumb-tip"],p=h.position.distanceTo(d.position),m=.02,y=.005;u.inputState.pinching&&p>m+y?(u.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!u.inputState.pinching&&p<=m-y&&(u.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(gU)))}return a!==null&&(a.visible=r!==null),l!==null&&(l.visible=s!==null),u!==null&&(u.visible=o!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){const i=new Gs;i.matrixAutoUpdate=!1,i.visible=!1,e.joints[t.jointName]=i,e.add(i)}return e.joints[t.jointName]}}class jP extends $t{constructor(e,t,i,r,s,o,a,l,u,h){if(h=h!==void 0?h:Uo,h!==Uo&&h!==cl)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");i===void 0&&h===Uo&&(i=Po),i===void 0&&h===cl&&(i=$a),super(null,r,s,o,a,l,h,i,u),this.isDepthTexture=!0,this.image={width:e,height:t},this.magFilter=a!==void 0?a:mn,this.minFilter=l!==void 0?l:mn,this.flipY=!1,this.generateMipmaps=!1}}class yU extends ms{constructor(e,t){super();const i=this;let r=null,s=1,o=null,a="local-floor",l=1,u=null,h=null,d=null,p=null,m=null,y=null;const v=t.getContextAttributes();let x=null,A=null;const _=[],w=[],M=new Set,b=new Map,P=new Jt;P.layers.enable(1),P.viewport=new Nt;const R=new Jt;R.layers.enable(2),R.viewport=new Nt;const E=[P,R],B=new WP;B.layers.enable(1),B.layers.enable(2);let I=null,z=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(G){let se=_[G];return se===void 0&&(se=new iv,_[G]=se),se.getTargetRaySpace()},this.getControllerGrip=function(G){let se=_[G];return se===void 0&&(se=new iv,_[G]=se),se.getGripSpace()},this.getHand=function(G){let se=_[G];return se===void 0&&(se=new iv,_[G]=se),se.getHandSpace()};function Z(G){const se=w.indexOf(G.inputSource);if(se===-1)return;const me=_[se];me!==void 0&&me.dispatchEvent({type:G.type,data:G.inputSource})}function J(){r.removeEventListener("select",Z),r.removeEventListener("selectstart",Z),r.removeEventListener("selectend",Z),r.removeEventListener("squeeze",Z),r.removeEventListener("squeezestart",Z),r.removeEventListener("squeezeend",Z),r.removeEventListener("end",J),r.removeEventListener("inputsourceschange",W);for(let G=0;G<_.length;G++){const se=w[G];se!==null&&(w[G]=null,_[G].disconnect(se))}I=null,z=null,e.setRenderTarget(x),m=null,p=null,d=null,r=null,A=null,$.stop(),i.isPresenting=!1,i.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(G){s=G,i.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(G){a=G,i.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return u||o},this.setReferenceSpace=function(G){u=G},this.getBaseLayer=function(){return p!==null?p:m},this.getBinding=function(){return d},this.getFrame=function(){return y},this.getSession=function(){return r},this.setSession=async function(G){if(r=G,r!==null){if(x=e.getRenderTarget(),r.addEventListener("select",Z),r.addEventListener("selectstart",Z),r.addEventListener("selectend",Z),r.addEventListener("squeeze",Z),r.addEventListener("squeezestart",Z),r.addEventListener("squeezeend",Z),r.addEventListener("end",J),r.addEventListener("inputsourceschange",W),v.xrCompatible!==!0&&await t.makeXRCompatible(),r.renderState.layers===void 0||e.capabilities.isWebGL2===!1){const se={antialias:r.renderState.layers===void 0?v.antialias:!0,alpha:v.alpha,depth:v.depth,stencil:v.stencil,framebufferScaleFactor:s};m=new XRWebGLLayer(r,t,se),r.updateRenderState({baseLayer:m}),A=new Gr(m.framebufferWidth,m.framebufferHeight,{format:bi,type:Zs,encoding:e.outputEncoding,stencilBuffer:v.stencil})}else{let se=null,me=null,Y=null;v.depth&&(Y=v.stencil?35056:33190,se=v.stencil?cl:Uo,me=v.stencil?$a:Po);const _e={colorFormat:32856,depthFormat:Y,scaleFactor:s};d=new XRWebGLBinding(r,t),p=d.createProjectionLayer(_e),r.updateRenderState({layers:[p]}),A=new Gr(p.textureWidth,p.textureHeight,{format:bi,type:Zs,depthTexture:new jP(p.textureWidth,p.textureHeight,me,void 0,void 0,void 0,void 0,void 0,void 0,se),stencilBuffer:v.stencil,encoding:e.outputEncoding,samples:v.antialias?4:0});const Ae=e.properties.get(A);Ae.__ignoreDepthValues=p.ignoreDepthValues}A.isXRRenderTarget=!0,this.setFoveation(l),u=null,o=await r.requestReferenceSpace(a),$.setContext(r),$.start(),i.isPresenting=!0,i.dispatchEvent({type:"sessionstart"})}};function W(G){for(let se=0;se=0&&(w[Y]=null,_[Y].disconnect(me))}for(let se=0;se=w.length){w.push(me),Y=Ae;break}else if(w[Ae]===null){w[Ae]=me,Y=Ae;break}if(Y===-1)break}const _e=_[Y];_e&&_e.connect(me)}}const Q=new F,re=new F;function ce(G,se,me){Q.setFromMatrixPosition(se.matrixWorld),re.setFromMatrixPosition(me.matrixWorld);const Y=Q.distanceTo(re),_e=se.projectionMatrix.elements,Ae=me.projectionMatrix.elements,Ie=_e[14]/(_e[10]-1),ke=_e[14]/(_e[10]+1),Te=(_e[9]+1)/_e[5],we=(_e[9]-1)/_e[5],he=(_e[8]-1)/_e[0],de=(Ae[8]+1)/Ae[0],Me=Ie*he,Ge=Ie*de,Be=Y/(-he+de),Ye=Be*-he;se.matrixWorld.decompose(G.position,G.quaternion,G.scale),G.translateX(Ye),G.translateZ(Be),G.matrixWorld.compose(G.position,G.quaternion,G.scale),G.matrixWorldInverse.copy(G.matrixWorld).invert();const Je=Ie+Be,et=ke+Be,vt=Me-Ye,_t=Ge+(Y-Ye),N=Te*ke/et*Je,D=we*ke/et*Je;G.projectionMatrix.makePerspective(vt,_t,N,D,Je,et)}function L(G,se){se===null?G.matrixWorld.copy(G.matrix):G.matrixWorld.multiplyMatrices(se.matrixWorld,G.matrix),G.matrixWorldInverse.copy(G.matrixWorld).invert()}this.updateCamera=function(G){if(r===null)return;B.near=R.near=P.near=G.near,B.far=R.far=P.far=G.far,(I!==B.near||z!==B.far)&&(r.updateRenderState({depthNear:B.near,depthFar:B.far}),I=B.near,z=B.far);const se=G.parent,me=B.cameras;L(B,se);for(let _e=0;_e_e&&(b.set(Y,Y.lastChangedTime),i.dispatchEvent({type:"planechanged",data:Y}))}}y=null}const $=new OP;$.setAnimationLoop(H),this.setAnimationLoop=function(G){V=G},this.dispose=function(){}}}function vU(n,e){function t(v,x){x.color.getRGB(v.fogColor.value,kP(n)),x.isFog?(v.fogNear.value=x.near,v.fogFar.value=x.far):x.isFogExp2&&(v.fogDensity.value=x.density)}function i(v,x,A,_,w){x.isMeshBasicMaterial||x.isMeshLambertMaterial?r(v,x):x.isMeshToonMaterial?(r(v,x),h(v,x)):x.isMeshPhongMaterial?(r(v,x),u(v,x)):x.isMeshStandardMaterial?(r(v,x),d(v,x),x.isMeshPhysicalMaterial&&p(v,x,w)):x.isMeshMatcapMaterial?(r(v,x),m(v,x)):x.isMeshDepthMaterial?r(v,x):x.isMeshDistanceMaterial?(r(v,x),y(v,x)):x.isMeshNormalMaterial?r(v,x):x.isLineBasicMaterial?(s(v,x),x.isLineDashedMaterial&&o(v,x)):x.isPointsMaterial?a(v,x,A,_):x.isSpriteMaterial?l(v,x):x.isShadowMaterial?(v.color.value.copy(x.color),v.opacity.value=x.opacity):x.isShaderMaterial&&(x.uniformsNeedUpdate=!1)}function r(v,x){v.opacity.value=x.opacity,x.color&&v.diffuse.value.copy(x.color),x.emissive&&v.emissive.value.copy(x.emissive).multiplyScalar(x.emissiveIntensity),x.map&&(v.map.value=x.map),x.alphaMap&&(v.alphaMap.value=x.alphaMap),x.bumpMap&&(v.bumpMap.value=x.bumpMap,v.bumpScale.value=x.bumpScale,x.side===Li&&(v.bumpScale.value*=-1)),x.displacementMap&&(v.displacementMap.value=x.displacementMap,v.displacementScale.value=x.displacementScale,v.displacementBias.value=x.displacementBias),x.emissiveMap&&(v.emissiveMap.value=x.emissiveMap),x.normalMap&&(v.normalMap.value=x.normalMap,v.normalScale.value.copy(x.normalScale),x.side===Li&&v.normalScale.value.negate()),x.specularMap&&(v.specularMap.value=x.specularMap),x.alphaTest>0&&(v.alphaTest.value=x.alphaTest);const A=e.get(x).envMap;if(A&&(v.envMap.value=A,v.flipEnvMap.value=A.isCubeTexture&&A.isRenderTargetTexture===!1?-1:1,v.reflectivity.value=x.reflectivity,v.ior.value=x.ior,v.refractionRatio.value=x.refractionRatio),x.lightMap){v.lightMap.value=x.lightMap;const M=n.useLegacyLights===!0?Math.PI:1;v.lightMapIntensity.value=x.lightMapIntensity*M}x.aoMap&&(v.aoMap.value=x.aoMap,v.aoMapIntensity.value=x.aoMapIntensity);let _;x.map?_=x.map:x.specularMap?_=x.specularMap:x.displacementMap?_=x.displacementMap:x.normalMap?_=x.normalMap:x.bumpMap?_=x.bumpMap:x.roughnessMap?_=x.roughnessMap:x.metalnessMap?_=x.metalnessMap:x.alphaMap?_=x.alphaMap:x.emissiveMap?_=x.emissiveMap:x.clearcoatMap?_=x.clearcoatMap:x.clearcoatNormalMap?_=x.clearcoatNormalMap:x.clearcoatRoughnessMap?_=x.clearcoatRoughnessMap:x.iridescenceMap?_=x.iridescenceMap:x.iridescenceThicknessMap?_=x.iridescenceThicknessMap:x.specularIntensityMap?_=x.specularIntensityMap:x.specularColorMap?_=x.specularColorMap:x.transmissionMap?_=x.transmissionMap:x.thicknessMap?_=x.thicknessMap:x.sheenColorMap?_=x.sheenColorMap:x.sheenRoughnessMap&&(_=x.sheenRoughnessMap),_!==void 0&&(_.isWebGLRenderTarget&&(_=_.texture),_.matrixAutoUpdate===!0&&_.updateMatrix(),v.uvTransform.value.copy(_.matrix));let w;x.aoMap?w=x.aoMap:x.lightMap&&(w=x.lightMap),w!==void 0&&(w.isWebGLRenderTarget&&(w=w.texture),w.matrixAutoUpdate===!0&&w.updateMatrix(),v.uv2Transform.value.copy(w.matrix))}function s(v,x){v.diffuse.value.copy(x.color),v.opacity.value=x.opacity}function o(v,x){v.dashSize.value=x.dashSize,v.totalSize.value=x.dashSize+x.gapSize,v.scale.value=x.scale}function a(v,x,A,_){v.diffuse.value.copy(x.color),v.opacity.value=x.opacity,v.size.value=x.size*A,v.scale.value=_*.5,x.map&&(v.map.value=x.map),x.alphaMap&&(v.alphaMap.value=x.alphaMap),x.alphaTest>0&&(v.alphaTest.value=x.alphaTest);let w;x.map?w=x.map:x.alphaMap&&(w=x.alphaMap),w!==void 0&&(w.matrixAutoUpdate===!0&&w.updateMatrix(),v.uvTransform.value.copy(w.matrix))}function l(v,x){v.diffuse.value.copy(x.color),v.opacity.value=x.opacity,v.rotation.value=x.rotation,x.map&&(v.map.value=x.map),x.alphaMap&&(v.alphaMap.value=x.alphaMap),x.alphaTest>0&&(v.alphaTest.value=x.alphaTest);let A;x.map?A=x.map:x.alphaMap&&(A=x.alphaMap),A!==void 0&&(A.matrixAutoUpdate===!0&&A.updateMatrix(),v.uvTransform.value.copy(A.matrix))}function u(v,x){v.specular.value.copy(x.specular),v.shininess.value=Math.max(x.shininess,1e-4)}function h(v,x){x.gradientMap&&(v.gradientMap.value=x.gradientMap)}function d(v,x){v.roughness.value=x.roughness,v.metalness.value=x.metalness,x.roughnessMap&&(v.roughnessMap.value=x.roughnessMap),x.metalnessMap&&(v.metalnessMap.value=x.metalnessMap),e.get(x).envMap&&(v.envMapIntensity.value=x.envMapIntensity)}function p(v,x,A){v.ior.value=x.ior,x.sheen>0&&(v.sheenColor.value.copy(x.sheenColor).multiplyScalar(x.sheen),v.sheenRoughness.value=x.sheenRoughness,x.sheenColorMap&&(v.sheenColorMap.value=x.sheenColorMap),x.sheenRoughnessMap&&(v.sheenRoughnessMap.value=x.sheenRoughnessMap)),x.clearcoat>0&&(v.clearcoat.value=x.clearcoat,v.clearcoatRoughness.value=x.clearcoatRoughness,x.clearcoatMap&&(v.clearcoatMap.value=x.clearcoatMap),x.clearcoatRoughnessMap&&(v.clearcoatRoughnessMap.value=x.clearcoatRoughnessMap),x.clearcoatNormalMap&&(v.clearcoatNormalScale.value.copy(x.clearcoatNormalScale),v.clearcoatNormalMap.value=x.clearcoatNormalMap,x.side===Li&&v.clearcoatNormalScale.value.negate())),x.iridescence>0&&(v.iridescence.value=x.iridescence,v.iridescenceIOR.value=x.iridescenceIOR,v.iridescenceThicknessMinimum.value=x.iridescenceThicknessRange[0],v.iridescenceThicknessMaximum.value=x.iridescenceThicknessRange[1],x.iridescenceMap&&(v.iridescenceMap.value=x.iridescenceMap),x.iridescenceThicknessMap&&(v.iridescenceThicknessMap.value=x.iridescenceThicknessMap)),x.transmission>0&&(v.transmission.value=x.transmission,v.transmissionSamplerMap.value=A.texture,v.transmissionSamplerSize.value.set(A.width,A.height),x.transmissionMap&&(v.transmissionMap.value=x.transmissionMap),v.thickness.value=x.thickness,x.thicknessMap&&(v.thicknessMap.value=x.thicknessMap),v.attenuationDistance.value=x.attenuationDistance,v.attenuationColor.value.copy(x.attenuationColor)),v.specularIntensity.value=x.specularIntensity,v.specularColor.value.copy(x.specularColor),x.specularIntensityMap&&(v.specularIntensityMap.value=x.specularIntensityMap),x.specularColorMap&&(v.specularColorMap.value=x.specularColorMap)}function m(v,x){x.matcap&&(v.matcap.value=x.matcap)}function y(v,x){v.referencePosition.value.copy(x.referencePosition),v.nearDistance.value=x.nearDistance,v.farDistance.value=x.farDistance}return{refreshFogUniforms:t,refreshMaterialUniforms:i}}function xU(n,e,t,i){let r={},s={},o=[];const a=t.isWebGL2?n.getParameter(35375):0;function l(_,w){const M=w.program;i.uniformBlockBinding(_,M)}function u(_,w){let M=r[_.id];M===void 0&&(y(_),M=h(_),r[_.id]=M,_.addEventListener("dispose",x));const b=w.program;i.updateUBOMapping(_,b);const P=e.render.frame;s[_.id]!==P&&(p(_),s[_.id]=P)}function h(_){const w=d();_.__bindingPointIndex=w;const M=n.createBuffer(),b=_.__size,P=_.usage;return n.bindBuffer(35345,M),n.bufferData(35345,b,P),n.bindBuffer(35345,null),n.bindBufferBase(35345,w,M),M}function d(){for(let _=0;_0){P=M%b;const Z=b-P;P!==0&&Z-I.boundary<0&&(M+=b-P,B.__offset=M)}M+=I.storage}return P=M%b,P>0&&(M+=b-P),_.__size=M,_.__cache={},this}function v(_){const w={boundary:0,storage:0};return typeof _=="number"?(w.boundary=4,w.storage=4):_.isVector2?(w.boundary=8,w.storage=8):_.isVector3||_.isColor?(w.boundary=16,w.storage=12):_.isVector4?(w.boundary=16,w.storage=16):_.isMatrix3?(w.boundary=48,w.storage=48):_.isMatrix4?(w.boundary=64,w.storage=64):_.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",_),w}function x(_){const w=_.target;w.removeEventListener("dispose",x);const M=o.indexOf(w.__bindingPointIndex);o.splice(M,1),n.deleteBuffer(r[w.id]),delete r[w.id],delete s[w.id]}function A(){for(const _ in r)n.deleteBuffer(r[_]);o=[],r={},s={}}return{bind:l,update:u,dispose:A}}function _U(){const n=eh("canvas");return n.style.display="block",n}function kg(n={}){this.isWebGLRenderer=!0;const e=n.canvas!==void 0?n.canvas:_U(),t=n.context!==void 0?n.context:null,i=n.depth!==void 0?n.depth:!0,r=n.stencil!==void 0?n.stencil:!0,s=n.antialias!==void 0?n.antialias:!1,o=n.premultipliedAlpha!==void 0?n.premultipliedAlpha:!0,a=n.preserveDrawingBuffer!==void 0?n.preserveDrawingBuffer:!1,l=n.powerPreference!==void 0?n.powerPreference:"default",u=n.failIfMajorPerformanceCaveat!==void 0?n.failIfMajorPerformanceCaveat:!1;let h;t!==null?h=t.getContextAttributes().alpha:h=n.alpha!==void 0?n.alpha:!1;let d=null,p=null;const m=[],y=[];this.domElement=e,this.debug={checkShaderErrors:!0},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.outputEncoding=Ko,this.useLegacyLights=!0,this.toneMapping=zr,this.toneMappingExposure=1;const v=this;let x=!1,A=0,_=0,w=null,M=-1,b=null;const P=new Nt,R=new Nt;let E=null,B=e.width,I=e.height,z=1,Z=null,J=null;const W=new Nt(0,0,B,I),Q=new Nt(0,0,B,I);let re=!1;const ce=new Dg;let L=!1,V=!1,H=null;const $=new ot,G=new F,se={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function me(){return w===null?z:1}let Y=t;function _e(k,ie){for(let fe=0;fe0?p=y[y.length-1]:p=null,m.pop(),m.length>0?d=m[m.length-1]:d=null};function It(k,ie,fe,te){if(k.visible===!1)return;if(k.layers.test(ie.layers)){if(k.isGroup)fe=k.renderOrder;else if(k.isLOD)k.autoUpdate===!0&&k.update(ie);else if(k.isLight)p.pushLight(k),k.castShadow&&p.pushShadow(k);else if(k.isSprite){if(!k.frustumCulled||ce.intersectsSprite(k)){te&&G.setFromMatrixPosition(k.matrixWorld).applyMatrix4($);const lt=Ye.update(k),ht=k.material;ht.visible&&d.push(k,lt,ht,fe,G.z,null)}}else if((k.isMesh||k.isLine||k.isPoints)&&(k.isSkinnedMesh&&k.skeleton.frame!==Te.render.frame&&(k.skeleton.update(),k.skeleton.frame=Te.render.frame),!k.frustumCulled||ce.intersectsObject(k))){te&&G.setFromMatrixPosition(k.matrixWorld).applyMatrix4($);const lt=Ye.update(k),ht=k.material;if(Array.isArray(ht)){const mt=lt.groups;for(let Ct=0,xt=mt.length;Ct0&&zt(ge,ie,fe),te&&ke.viewport(P.copy(te)),ge.length>0&&kn(ge,ie,fe),nt.length>0&&kn(nt,ie,fe),lt.length>0&&kn(lt,ie,fe),ke.buffers.depth.setTest(!0),ke.buffers.depth.setMask(!0),ke.buffers.color.setMask(!0),ke.setPolygonOffset(!1)}function zt(k,ie,fe){const te=Ie.isWebGL2;H===null&&(H=new Gr(1024,1024,{generateMipmaps:!0,type:Ae.has("EXT_color_buffer_half_float")?Hc:Zs,minFilter:ds,samples:te&&s===!0?4:0}));const ge=v.getRenderTarget();v.setRenderTarget(H),v.clear();const nt=v.toneMapping;v.toneMapping=zr,kn(k,ie,fe),v.toneMapping=nt,he.updateMultisampleRenderTarget(H),he.updateRenderTargetMipmap(H),v.setRenderTarget(ge)}function kn(k,ie,fe){const te=ie.isScene===!0?ie.overrideMaterial:null;for(let ge=0,nt=k.length;ge0&&he.useMultisampledRTT(k)===!1?ge=we.get(k).__webglMultisampledFramebuffer:ge=xt,P.copy(k.viewport),R.copy(k.scissor),E=k.scissorTest}else P.copy(W).multiplyScalar(z).floor(),R.copy(Q).multiplyScalar(z).floor(),E=re;if(ke.bindFramebuffer(36160,ge)&&Ie.drawBuffers&&te&&ke.drawBuffers(k,ge),ke.viewport(P),ke.scissor(R),ke.setScissorTest(E),nt){const mt=we.get(k.texture);Y.framebufferTexture2D(36160,36064,34069+ie,mt.__webglTexture,fe)}else if(lt){const mt=we.get(k.texture),Ct=ie||0;Y.framebufferTextureLayer(36160,36064,mt.__webglTexture,fe||0,Ct)}M=-1},this.readRenderTargetPixels=function(k,ie,fe,te,ge,nt,lt){if(!(k&&k.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let ht=we.get(k).__webglFramebuffer;if(k.isWebGLCubeRenderTarget&<!==void 0&&(ht=ht[lt]),ht){ke.bindFramebuffer(36160,ht);try{const mt=k.texture,Ct=mt.format,xt=mt.type;if(Ct!==bi&&Ke.convert(Ct)!==Y.getParameter(35739)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const At=xt===Hc&&(Ae.has("EXT_color_buffer_half_float")||Ie.isWebGL2&&Ae.has("EXT_color_buffer_float"));if(xt!==Zs&&Ke.convert(xt)!==Y.getParameter(35738)&&!(xt===zs&&(Ie.isWebGL2||Ae.has("OES_texture_float")||Ae.has("WEBGL_color_buffer_float")))&&!At){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}ie>=0&&ie<=k.width-te&&fe>=0&&fe<=k.height-ge&&Y.readPixels(ie,fe,te,ge,Ke.convert(Ct),Ke.convert(xt),nt)}finally{const mt=w!==null?we.get(w).__webglFramebuffer:null;ke.bindFramebuffer(36160,mt)}}},this.copyFramebufferToTexture=function(k,ie,fe=0){const te=Math.pow(2,-fe),ge=Math.floor(ie.image.width*te),nt=Math.floor(ie.image.height*te);he.setTexture2D(ie,0),Y.copyTexSubImage2D(3553,fe,0,0,k.x,k.y,ge,nt),ke.unbindTexture()},this.copyTextureToTexture=function(k,ie,fe,te=0){const ge=ie.image.width,nt=ie.image.height,lt=Ke.convert(fe.format),ht=Ke.convert(fe.type);he.setTexture2D(fe,0),Y.pixelStorei(37440,fe.flipY),Y.pixelStorei(37441,fe.premultiplyAlpha),Y.pixelStorei(3317,fe.unpackAlignment),ie.isDataTexture?Y.texSubImage2D(3553,te,k.x,k.y,ge,nt,lt,ht,ie.image.data):ie.isCompressedTexture?Y.compressedTexSubImage2D(3553,te,k.x,k.y,ie.mipmaps[0].width,ie.mipmaps[0].height,lt,ie.mipmaps[0].data):Y.texSubImage2D(3553,te,k.x,k.y,lt,ht,ie.image),te===0&&fe.generateMipmaps&&Y.generateMipmap(3553),ke.unbindTexture()},this.copyTextureToTexture3D=function(k,ie,fe,te,ge=0){if(v.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}const nt=k.max.x-k.min.x+1,lt=k.max.y-k.min.y+1,ht=k.max.z-k.min.z+1,mt=Ke.convert(te.format),Ct=Ke.convert(te.type);let xt;if(te.isData3DTexture)he.setTexture3D(te,0),xt=32879;else if(te.isDataArrayTexture)he.setTexture2DArray(te,0),xt=35866;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}Y.pixelStorei(37440,te.flipY),Y.pixelStorei(37441,te.premultiplyAlpha),Y.pixelStorei(3317,te.unpackAlignment);const At=Y.getParameter(3314),ln=Y.getParameter(32878),fi=Y.getParameter(3316),Ar=Y.getParameter(3315),ys=Y.getParameter(32877),cn=fe.isCompressedTexture?fe.mipmaps[0]:fe.image;Y.pixelStorei(3314,cn.width),Y.pixelStorei(32878,cn.height),Y.pixelStorei(3316,k.min.x),Y.pixelStorei(3315,k.min.y),Y.pixelStorei(32877,k.min.z),fe.isDataTexture||fe.isData3DTexture?Y.texSubImage3D(xt,ge,ie.x,ie.y,ie.z,nt,lt,ht,mt,Ct,cn.data):fe.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),Y.compressedTexSubImage3D(xt,ge,ie.x,ie.y,ie.z,nt,lt,ht,mt,cn.data)):Y.texSubImage3D(xt,ge,ie.x,ie.y,ie.z,nt,lt,ht,mt,Ct,cn),Y.pixelStorei(3314,At),Y.pixelStorei(32878,ln),Y.pixelStorei(3316,fi),Y.pixelStorei(3315,Ar),Y.pixelStorei(32877,ys),ge===0&&te.generateMipmaps&&Y.generateMipmap(xt),ke.unbindTexture()},this.initTexture=function(k){k.isCubeTexture?he.setTextureCube(k,0):k.isData3DTexture?he.setTexture3D(k,0):k.isDataArrayTexture||k.isCompressedArrayTexture?he.setTexture2DArray(k,0):he.setTexture2D(k,0),ke.unbindTexture()},this.resetState=function(){A=0,_=0,w=null,ke.reset(),Oe.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}Object.defineProperties(kg.prototype,{physicallyCorrectLights:{get:function(){return console.warn("THREE.WebGLRenderer: the property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),!this.useLegacyLights},set:function(n){console.warn("THREE.WebGLRenderer: the property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),this.useLegacyLights=!n}}});class JP extends kg{}JP.prototype.isWebGL1Renderer=!0;class Ng{constructor(e,t=25e-5){this.isFogExp2=!0,this.name="",this.color=new De(e),this.density=t}clone(){return new Ng(this.color,this.density)}toJSON(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}}class Og{constructor(e,t=1,i=1e3){this.isFog=!0,this.name="",this.color=new De(e),this.near=t,this.far=i}clone(){return new Og(this.color,this.near,this.far)}toJSON(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}}class Ym extends Mt{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 vh{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=qf,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:Xu.clone(),uv:dr.getUV(Xu,xp,Ku,_p,OC,rv,zC,new pe),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 Ap(n,e,t,i,r,s){$l.subVectors(n,t).addScalar(.5).multiply(i),r!==void 0?(Yu.x=s*$l.x-r*$l.y,Yu.y=r*$l.x+s*$l.y):Yu.copy($l),n.copy(e),n.x+=Yu.x,n.y+=Yu.y,n.applyMatrix4(XP)}const wp=new F,UC=new F;class KP extends Mt{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){wp.setFromMatrixPosition(this.matrixWorld);const r=e.ray.origin.distanceTo(wp);this.getObjectForDistance(r).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){wp.setFromMatrixPosition(e.matrixWorld),UC.setFromMatrixPosition(this.matrixWorld);const i=wp.distanceTo(UC)/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 E=e.ray.origin.distanceTo(p);Ee.far||t.push({distance:E,point:d.clone().applyMatrix4(this.matrixWorld),index:w,face:null,faceIndex:null,object:this})}}else{const A=Math.max(0,o.start),_=Math.min(x.count,o.start+o.count);for(let w=A,M=_-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:u,distanceToRay:Math.sqrt(a),point:l,index:e,face:null,object:o})}}class MU extends $t{constructor(e,t,i,r,s,o,a,l,u){super(e,t,i,r,s,o,a,l,u),this.isVideoTexture=!0,this.minFilter=o!==void 0?o:nn,this.magFilter=s!==void 0?s:nn,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 CU extends $t{constructor(e,t,i){super({width:e,height:t}),this.isFramebufferTexture=!0,this.format=i,this.magFilter=mn,this.minFilter=mn,this.generateMipmaps=!1,this.needsUpdate=!0}}class hA extends $t{constructor(e,t,i,r,s,o,a,l,u,h,d,p){super(null,o,a,l,u,h,r,s,d,p),this.isCompressedTexture=!0,this.image={width:t,height:i},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class EU extends hA{constructor(e,t,i,r,s,o){super(e,t,i,s,o),this.isCompressedArrayTexture=!0,this.image.depth=r,this.wrapR=Yn}}class bU extends $t{constructor(e,t,i,r,s,o,a,l,u){super(e,t,i,r,s,o,a,l,u),this.isCanvasTexture=!0,this.needsUpdate=!0}}class Vr{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,u;for(;a<=l;)if(r=Math.floor(a+(l-a)/2),u=i[r]-o,u<0)a=r+1;else if(u>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,m=(o-h)/p;return(r+m)/(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 pe:new F);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 F,r=[],s=[],o=[],a=new F,l=new ot;for(let m=0;m<=e;m++){const y=m/e;r[m]=this.getTangentAt(y,new F)}s[0]=new F,o[0]=new F;let u=Number.MAX_VALUE;const h=Math.abs(r[0].x),d=Math.abs(r[0].y),p=Math.abs(r[0].z);h<=u&&(u=h,i.set(1,0,0)),d<=u&&(u=d,i.set(0,1,0)),p<=u&&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 m=1;m<=e;m++){if(s[m]=s[m-1].clone(),o[m]=o[m-1].clone(),a.crossVectors(r[m-1],r[m]),a.length()>Number.EPSILON){a.normalize();const y=Math.acos(An(r[m-1].dot(r[m]),-1,1));s[m].applyMatrix4(l.makeRotationAxis(a,y))}o[m].crossVectors(r[m],s[m])}if(t===!0){let m=Math.acos(An(s[0].dot(s[e]),-1,1));m/=e,r[0].dot(a.crossVectors(s[0],s[e]))>0&&(m=-m);for(let y=1;y<=e;y++)s[y].applyMatrix4(l.makeRotationAxis(r[y],m*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 Ug extends Vr{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 pe,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 u,h;this.closed||a>0?u=r[(a-1)%s]:(bp.subVectors(r[0],r[1]).add(r[0]),u=bp);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(tE(a,l.x,u.x,h.x,d.x),tE(a,l.y,u.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(),u=l===0?0:1-o/l;return a.getPointAt(u,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=u.getPoint(0);d.equals(this.currentPoint)||this.lineTo(d.x,d.y)}this.curves.push(u);const h=u.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 au extends ft{constructor(e=[new pe(0,-.5),new pe(.5,0),new pe(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=An(r,0,Math.PI*2);const s=[],o=[],a=[],l=[],u=[],h=1/t,d=new F,p=new pe,m=new F,y=new F,v=new F;let x=0,A=0;for(let _=0;_<=e.length-1;_++)switch(_){case 0:x=e[_+1].x-e[_].x,A=e[_+1].y-e[_].y,m.x=A*1,m.y=-x,m.z=A*0,v.copy(m),m.normalize(),l.push(m.x,m.y,m.z);break;case e.length-1:l.push(v.x,v.y,v.z);break;default:x=e[_+1].x-e[_].x,A=e[_+1].y-e[_].y,m.x=A*1,m.y=-x,m.z=A*0,y.copy(m),m.x+=v.x,m.y+=v.y,m.z+=v.z,m.normalize(),l.push(m.x,m.y,m.z),v.copy(y)}for(let _=0;_<=t;_++){const w=i+_*h*r,M=Math.sin(w),b=Math.cos(w);for(let P=0;P<=e.length-1;P++){d.x=e[P].x*M,d.y=e[P].y,d.z=e[P].x*b,o.push(d.x,d.y,d.z),p.x=_/t,p.y=P/(e.length-1),a.push(p.x,p.y);const R=l[3*P+0]*M,E=l[3*P+1],B=l[3*P+0]*b;u.push(R,E,B)}}for(let _=0;_0&&w(!0),t>0&&w(!1)),this.setIndex(h),this.setAttribute("position",new Ve(d,3)),this.setAttribute("normal",new Ve(p,3)),this.setAttribute("uv",new Ve(m,2));function _(){const M=new F,b=new F;let P=0;const R=(t-e)/i;for(let E=0;E<=s;E++){const B=[],I=E/s,z=I*(t-e)+e;for(let Z=0;Z<=r;Z++){const J=Z/r,W=J*l+a,Q=Math.sin(W),re=Math.cos(W);b.x=z*Q,b.y=-I*i+x,b.z=z*re,d.push(b.x,b.y,b.z),M.set(Q,R,re).normalize(),p.push(M.x,M.y,M.z),m.push(J,1-I),B.push(y++)}v.push(B)}for(let E=0;E.9&&R<.1&&(w<.2&&(o[_+0]+=1),M<.2&&(o[_+2]+=1),b<.2&&(o[_+4]+=1))}}function p(_){s.push(_.x,_.y,_.z)}function m(_,w){const M=_*3;w.x=e[M+0],w.y=e[M+1],w.z=e[M+2]}function y(){const _=new F,w=new F,M=new F,b=new F,P=new pe,R=new pe,E=new pe;for(let B=0,I=0;B80*t){a=u=n[0],l=h=n[1];for(let y=t;yu&&(u=d),p>h&&(h=p);m=Math.max(u-a,h-l),m=m!==0?32767/m:0}return nh(s,o,t,a,l,m,0),o}};function nB(n,e,t,i,r){let s,o;if(r===ZU(n,e,t,i)>0)for(s=e;s=e;s-=i)o=nE(s,n[s],n[s+1],o);return o&&Hg(o,o.next)&&(rh(o),o=o.next),o}function fl(n,e){if(!n)return n;e||(e=n);let t=n,i;do if(i=!1,!t.steiner&&(Hg(t,t.next)||rn(t.prev,t,t.next)===0)){if(rh(t),t=e=t.prev,t===t.next)break;i=!0}else t=t.next;while(i||t!==e);return e}function nh(n,e,t,i,r,s,o){if(!n)return;!o&&s&&jU(n,i,r,s);let a=n,l,u;for(;n.prev!==n.next;){if(l=n.prev,u=n.next,s?NU(n,i,r,s):kU(n)){e.push(l.i/t|0),e.push(n.i/t|0),e.push(u.i/t|0),rh(n),n=u.next,a=u.next;continue}if(n=u,n===a){o?o===1?(n=OU(fl(n),e,t),nh(n,e,t,i,r,s,2)):o===2&&zU(n,e,t,i,r,s):nh(fl(n),e,t,i,r,s,1);break}}}function kU(n){const e=n.prev,t=n,i=n.next;if(rn(e,t,i)>=0)return!1;const r=e.x,s=t.x,o=i.x,a=e.y,l=t.y,u=i.y,h=rs?r>o?r:o:s>o?s:o,m=a>l?a>u?a:u:l>u?l:u;let y=i.next;for(;y!==e;){if(y.x>=h&&y.x<=p&&y.y>=d&&y.y<=m&&yc(r,a,s,l,o,u,y.x,y.y)&&rn(y.prev,y,y.next)>=0)return!1;y=y.next}return!0}function NU(n,e,t,i){const r=n.prev,s=n,o=n.next;if(rn(r,s,o)>=0)return!1;const a=r.x,l=s.x,u=o.x,h=r.y,d=s.y,p=o.y,m=al?a>u?a:u:l>u?l:u,x=h>d?h>p?h:p:d>p?d:p,A=v1(m,y,e,t,i),_=v1(v,x,e,t,i);let w=n.prevZ,M=n.nextZ;for(;w&&w.z>=A&&M&&M.z<=_;){if(w.x>=m&&w.x<=v&&w.y>=y&&w.y<=x&&w!==r&&w!==o&&yc(a,h,l,d,u,p,w.x,w.y)&&rn(w.prev,w,w.next)>=0||(w=w.prevZ,M.x>=m&&M.x<=v&&M.y>=y&&M.y<=x&&M!==r&&M!==o&&yc(a,h,l,d,u,p,M.x,M.y)&&rn(M.prev,M,M.next)>=0))return!1;M=M.nextZ}for(;w&&w.z>=A;){if(w.x>=m&&w.x<=v&&w.y>=y&&w.y<=x&&w!==r&&w!==o&&yc(a,h,l,d,u,p,w.x,w.y)&&rn(w.prev,w,w.next)>=0)return!1;w=w.prevZ}for(;M&&M.z<=_;){if(M.x>=m&&M.x<=v&&M.y>=y&&M.y<=x&&M!==r&&M!==o&&yc(a,h,l,d,u,p,M.x,M.y)&&rn(M.prev,M,M.next)>=0)return!1;M=M.nextZ}return!0}function OU(n,e,t){let i=n;do{const r=i.prev,s=i.next.next;!Hg(r,s)&&iB(r,i,i.next,s)&&ih(r,s)&&ih(s,r)&&(e.push(r.i/t|0),e.push(i.i/t|0),e.push(s.i/t|0),rh(i),rh(i.next),i=n=s),i=i.next}while(i!==n);return fl(i)}function zU(n,e,t,i,r,s){let o=n;do{let a=o.next.next;for(;a!==o.prev;){if(o.i!==a.i&&YU(o,a)){let l=rB(o,a);o=fl(o,o.next),l=fl(l,l.next),nh(o,e,t,i,r,s,0),nh(l,e,t,i,r,s,0);return}a=a.next}o=o.next}while(o!==n)}function UU(n,e,t,i){const r=[];let s,o,a,l,u;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&&yc(or.x||t.x===r.x&&WU(r,t)))&&(r=t,h=d)),t=t.next;while(t!==a);return r}function WU(n,e){return rn(n.prev,n,e.prev)<0&&rn(e.next,n,n.next)<0}function jU(n,e,t,i){let r=n;do r.z===0&&(r.z=v1(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,JU(r)}function JU(n){let e,t,i,r,s,o,a,l,u=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,u*=2}while(o>1);return n}function v1(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 XU(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 YU(n,e){return n.next.i!==e.i&&n.prev.i!==e.i&&!KU(n,e)&&(ih(n,e)&&ih(e,n)&&QU(n,e)&&(rn(n.prev,n,e.prev)||rn(n,e.prev,e))||Hg(n,e)&&rn(n.prev,n,n.next)>0&&rn(e.prev,e,e.next)>0)}function rn(n,e,t){return(e.y-n.y)*(t.x-e.x)-(e.x-n.x)*(t.y-e.y)}function Hg(n,e){return n.x===e.x&&n.y===e.y}function iB(n,e,t,i){const r=Lp(rn(n,e,t)),s=Lp(rn(n,e,i)),o=Lp(rn(t,i,n)),a=Lp(rn(t,i,e));return!!(r!==s&&o!==a||r===0&&Rp(n,t,e)||s===0&&Rp(n,i,e)||o===0&&Rp(t,n,i)||a===0&&Rp(t,e,i))}function Rp(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 Lp(n){return n>0?1:n<0?-1:0}function KU(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&&iB(t,t.next,n,e))return!0;t=t.next}while(t!==n);return!1}function ih(n,e){return rn(n.prev,n,n.next)<0?rn(n,e,n.next)>=0&&rn(n,n.prev,e)>=0:rn(n,e,n.prev)<0||rn(n,n.next,e)<0}function QU(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 rB(n,e){const t=new x1(n.i,n.x,n.y),i=new x1(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 nE(n,e,t,i){const r=new x1(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 rh(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 x1(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 ZU(n,e,t,i){let r=0;for(let s=e,o=t-i;s2&&n[e-1].equals(n[0])&&n.pop()}function rE(n,e){for(let t=0;tNumber.EPSILON){const ae=Math.sqrt(N),Ce=Math.sqrt(vt*vt+_t*_t),Ee=de.x-et/ae,Pe=de.y+Je/ae,Ke=Me.x-_t/Ce,Oe=Me.y+vt/Ce,ye=((Ke-Ee)*_t-(Oe-Pe)*vt)/(Je*_t-et*vt);Ge=Ee+Je*ye-he.x,Be=Pe+et*ye-he.y;const $e=Ge*Ge+Be*Be;if($e<=2)return new pe(Ge,Be);Ye=Math.sqrt($e/2)}else{let ae=!1;Je>Number.EPSILON?vt>Number.EPSILON&&(ae=!0):Je<-Number.EPSILON?vt<-Number.EPSILON&&(ae=!0):Math.sign(et)===Math.sign(_t)&&(ae=!0),ae?(Ge=-et,Be=Je,Ye=Math.sqrt(N)):(Ge=Je,Be=et,Ye=Math.sqrt(N/2))}return new pe(Ge/Ye,Be/Ye)}const V=[];for(let he=0,de=W.length,Me=de-1,Ge=he+1;he=0;he--){const de=he/x,Me=m*Math.cos(de*Math.PI/2),Ge=y*Math.sin(de*Math.PI/2)+v;for(let Be=0,Ye=W.length;Be=0;){const Ge=Me;let Be=Me-1;Be<0&&(Be=he.length-1);for(let Ye=0,Je=h+x*2;Ye0)&&m.push(w,M,P),(A!==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 lB extends Pn{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new De(16777215),this.specular=new De(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new De(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ia,this.normalScale=new pe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=mh,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 cB extends Pn{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new De(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new De(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ia,this.normalScale=new pe(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 uB extends Pn{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ia,this.normalScale=new pe(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 fB extends Pn{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new De(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new De(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ia,this.normalScale=new pe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=mh,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 hB extends Pn{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new De(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ia,this.normalScale=new pe(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 dB extends ui{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 ur(n,e,t){return xA(n)?new n.constructor(n.subarray(e,t!==void 0?t:n.length)):n.slice(e,t)}function Xa(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 xA(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function pB(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 _1(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 _A(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 tG(n,e,t,i,r=30){const s=n.clone();s.name=e;const o=[];for(let l=0;l=i)){d.push(u.times[m]);for(let v=0;vs.tracks[l].times[0]&&(a=s.tracks[l].times[0]);for(let l=0;l=a.times[y]){const A=y*d+h,_=A+d-h;v=ur(a.values,A,_)}else{const A=a.createInterpolant(),_=h,w=d-h;A.evaluate(s),v=ur(A.resultBuffer,_,w)}l==="quaternion"&&new Wn().fromArray(v).normalize().conjugate().toArray(v);const x=u.times.length;for(let A=0;A=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=ur(i,s,o),this.values=ur(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&&xA(r))for(let a=0,l=r.length;a!==l;++a){const u=r[a];if(isNaN(u)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,u),e=!1;break}}return e}optimize(){const e=ur(this.times),t=ur(this.values),i=this.getValueSize(),r=this.getInterpolation()===pm,s=e.length-1;let o=1;for(let a=1;a0){e[o]=e[s];for(let a=s*i,l=o*i,u=0;u!==i;++u)t[l+u]=t[a+u];++o}return o!==e.length?(this.times=ur(e,0,o),this.values=ur(t,0,o*i)):(this.times=e,this.values=t),this}clone(){const e=ur(this.times,0),t=ur(this.values,0),i=this.constructor,r=new i(this.name,e,t);return r.createInterpolant=this.createInterpolant,r}}Wr.prototype.TimeBufferType=Float32Array;Wr.prototype.ValueBufferType=Float32Array;Wr.prototype.DefaultInterpolation=ul;class yl extends Wr{}yl.prototype.ValueTypeName="bool";yl.prototype.ValueBufferType=Array;yl.prototype.DefaultInterpolation=Vc;yl.prototype.InterpolantFactoryMethodLinear=void 0;yl.prototype.InterpolantFactoryMethodSmooth=void 0;class wA extends Wr{}wA.prototype.ValueTypeName="color";class Xc extends Wr{}Xc.prototype.ValueTypeName="number";class yB extends uu{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 u=e*a;for(let h=u+a;u!==h;u+=4)Wn.slerpFlat(s,0,o,u-a,o,u,l);return s}}class Zo extends Wr{InterpolantFactoryMethodLinear(e){return new yB(this.times,this.values,this.getValueSize(),e)}}Zo.prototype.ValueTypeName="quaternion";Zo.prototype.DefaultInterpolation=ul;Zo.prototype.InterpolantFactoryMethodSmooth=void 0;class vl extends Wr{}vl.prototype.ValueTypeName="string";vl.prototype.ValueBufferType=Array;vl.prototype.DefaultInterpolation=Vc;vl.prototype.InterpolantFactoryMethodLinear=void 0;vl.prototype.InterpolantFactoryMethodSmooth=void 0;class Yc extends Wr{}Yc.prototype.ValueTypeName="vector";class Kc{constructor(e,t=-1,i,r=Lg){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(sG(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(Wr.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(u)}}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,m,y,v){if(m.length!==0){const x=[],A=[];_A(m,x,A,y),x.length!==0&&v.push(new d(p,x,A))}},r=[],s=e.name||"default",o=e.fps||30,a=e.blendMode;let l=e.length||-1;const u=e.hierarchy||[];for(let d=0;d{t&&t(s),this.manager.itemEnd(e)},0),s;if(Rs[e]!==void 0){Rs[e].push({onLoad:t,onProgress:i,onError:r});return}Rs[e]=[],Rs[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(u=>{if(u.status===200||u.status===0){if(u.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||u.body===void 0||u.body.getReader===void 0)return u;const h=Rs[e],d=u.body.getReader(),p=u.headers.get("Content-Length")||u.headers.get("X-File-Size"),m=p?parseInt(p):0,y=m!==0;let v=0;const x=new ReadableStream({start(A){_();function _(){d.read().then(({done:w,value:M})=>{if(w)A.close();else{v+=M.byteLength;const b=new ProgressEvent("progress",{lengthComputable:y,loaded:v,total:m});for(let P=0,R=h.length;P{switch(l){case"arraybuffer":return u.arrayBuffer();case"blob":return u.blob();case"document":return u.text().then(h=>new DOMParser().parseFromString(h,a));case"json":return u.json();default:if(a===void 0)return u.text();{const d=/charset="?([^;"\s]*)"?/i.exec(a),p=d&&d[1]?d[1].toLowerCase():void 0,m=new TextDecoder(p);return u.arrayBuffer().then(y=>m.decode(y))}}}).then(u=>{hl.add(e,u);const h=Rs[e];delete Rs[e];for(let d=0,p=h.length;d{const h=Rs[e];if(h===void 0)throw this.manager.itemError(e),u;delete Rs[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 aG extends Ai{constructor(e){super(e)}load(e,t,i,r){const s=this,o=new Xi(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 De().setHex(o.value);break;case"v2":r.uniforms[s].value=new pe().fromArray(o.value);break;case"v3":r.uniforms[s].value=new F().fromArray(o.value);break;case"v4":r.uniforms[s].value=new Nt().fromArray(o.value);break;case"m3":r.uniforms[s].value=new Kn().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 pe().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 pe().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:oB,SpriteMaterial:aA,RawShaderMaterial:aB,ShaderMaterial:ps,PointsMaterial:_h,MeshPhysicalMaterial:gs,MeshStandardMaterial:Ih,MeshPhongMaterial:lB,MeshToonMaterial:cB,MeshNormalMaterial:uB,MeshLambertMaterial:fB,MeshDepthMaterial:sA,MeshDistanceMaterial:oA,MeshBasicMaterial:Vi,MeshMatcapMaterial:hB,LineDashedMaterial:dB,LineBasicMaterial:ui,Material:Pn};return new t[e]}}class us{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 SA(t);s=new sh(l),s.setCrossOrigin(this.crossOrigin);for(let u=0,h=e.length;u0){r=new sh(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=hl.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){hl.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 Ip;class TA{static getContext(){return Ip===void 0&&(Ip=new(window.AudioContext||window.webkitAudioContext)),Ip}static setContext(e){Ip=e}}class gG extends Ai{constructor(e){super(e)}load(e,t,i,r){const s=this,o=new Xi(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);TA.getContext().decodeAudioData(l,function(h){t(h)})}catch(l){r?r(l):console.error(l),s.manager.itemError(e)}},i,r)}}class yG extends Vg{constructor(e,t,i=1){super(void 0,i),this.isHemisphereLightProbe=!0;const r=new De().set(e),s=new De().set(t),o=new F(r.r,r.g,r.b),a=new F(s.r,s.g,s.b),l=Math.sqrt(Math.PI),u=l*Math.sqrt(.75);this.sh.coefficients[0].copy(o).add(a).multiplyScalar(l),this.sh.coefficients[1].copy(o).sub(a).multiplyScalar(u)}}class vG extends Vg{constructor(e,t=1){super(void 0,t),this.isAmbientLightProbe=!0;const i=new De().set(e);this.sh.coefficients[0].set(i.r,i.g,i.b).multiplyScalar(2*Math.sqrt(Math.PI))}}const hE=new ot,dE=new ot,wa=new ot;class xG{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Jt,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Jt,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,wa.copy(e.projectionMatrix);const r=t.eyeSep/2,s=r*t.near/t.focus,o=t.near*Math.tan(tl*t.fov*.5)/t.zoom;let a,l;dE.elements[12]=-r,hE.elements[12]=r,a=-o*t.aspect+s,l=o*t.aspect+s,wa.elements[0]=2*t.near/(l-a),wa.elements[8]=(l+a)/(l-a),this.cameraL.projectionMatrix.copy(wa),a=-o*t.aspect-s,l=o*t.aspect-s,wa.elements[0]=2*t.near/(l-a),wa.elements[8]=(l+a)/(l-a),this.cameraR.projectionMatrix.copy(wa)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(dE),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(hE)}}class PA{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=pE(),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=pE();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function pE(){return(typeof performance>"u"?Date:performance).now()}const Sa=new F,mE=new Wn,_G=new F,Ma=new F;class AG extends Mt{constructor(){super(),this.type="AudioListener",this.context=TA.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new PA}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(Sa,mE,_G),Ma.set(0,0,-1).applyQuaternion(mE),t.positionX){const r=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(Sa.x,r),t.positionY.linearRampToValueAtTime(Sa.y,r),t.positionZ.linearRampToValueAtTime(Sa.z,r),t.forwardX.linearRampToValueAtTime(Ma.x,r),t.forwardY.linearRampToValueAtTime(Ma.y,r),t.forwardZ.linearRampToValueAtTime(Ma.z,r),t.upX.linearRampToValueAtTime(i.x,r),t.upY.linearRampToValueAtTime(i.y,r),t.upZ.linearRampToValueAtTime(i.z,r)}else t.setPosition(Sa.x,Sa.y,Sa.z),t.setOrientation(Ma.x,Ma.y,Ma.z,i.x,i.y,i.z)}}class CB extends Mt{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,u=t+t;l!==u;++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){Wn.slerpFlat(e,t,e,t,e,i,r)}_slerpAdditive(e,t,i,r,s){const o=this._workIndex*s;Wn.multiplyQuaternionsFlat(e,o,e,t,e,i),Wn.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 BA="\\[\\]\\.:\\/",CG=new RegExp("["+BA+"]","g"),RA="[^"+BA+"]",EG="[^"+BA.replace("\\.","")+"]",bG=/((?:WC+[\/:])*)/.source.replace("WC",RA),TG=/(WCOD+)?/.source.replace("WCOD",EG),PG=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",RA),BG=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",RA),RG=new RegExp("^"+bG+TG+PG+BG+"$"),LG=["material","materials","bones","map"];class IG{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(CG,"")}static parseTrackName(e){const t=RG.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);LG.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[u]=d,e[d]=l;for(let m=0,y=r;m!==y;++m){const v=i[m],x=v[d],A=v[h];v[h]=x,v[d]=A}}}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 u=arguments[a],h=u.uuid,d=t[h];if(d!==void 0)if(delete t[h],d0&&(t[m.uuid]=d),e[d]=m,e.pop();for(let y=0,v=r;y!==v;++y){const x=i[y];x[d]=x[p],x.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,u=l.length,h=this.nCachedObjects_,d=new Array(u);r=s.length,i[e]=r,o.push(e),a.push(t),s.push(d);for(let p=h,m=l.length;p!==m;++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],u=e[a];t[u]=i,o[i]=l,o.pop(),s[i]=s[a],s.pop(),r[i]=r[a],r.pop()}}}class FG{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:Wa,endingEnd:Wa};for(let u=0;u!==o;++u){const h=s[u].createInterpolant(null);a[u]=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=CP,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,u=a.sampleValues;return l[0]=s,l[1]=s+i,u[0]=e/o,u[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,u=this._propertyBindings;switch(this.blendMode){case X_:for(let h=0,d=l.length;h!==d;++h)l[h].evaluate(o),u[h].accumulateAdditive(a);break;case Lg:default:for(let h=0,d=l.length;h!==d;++h)l[h].evaluate(o),u[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===EP;if(e===0)return s===-1?r:o&&(s&1)===1?t-r:r;if(i===MP){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 u=e<0;this._setEndings(u,!u,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=ja,r.endingEnd=ja):(e?r.endingStart=this.zeroSlopeAtStart?ja:Wa:r.endingStart=Zf,t?r.endingEnd=this.zeroSlopeAtEnd?ja:Wa:r.endingEnd=Zf)}_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 kG=new Float32Array(1);class NG extends ms{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,u=this._bindingsByRootAndName;let h=u[l];h===void 0&&(h={},u[l]=h);for(let d=0;d!==s;++d){const p=r[d],m=p.name;let y=h[m];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,m));continue}const v=t&&t._propertyBindings[d].binding.parsedPath;y=new EB(Et.create(i,m,v),p.ValueTypeName,p.getValueSize()),++y.referenceCount,this._addInactiveBinding(y,l,m),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 u=0;u!==i;++u)t[u]._update(r,e,s,o);const a=this._bindings,l=this._nActiveBindings;for(let u=0;u!==l;++u)a[u].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,vE).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 xE=new F,Dp=new F;class WG{constructor(e=new F,t=new F){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){xE.subVectors(e,this.start),Dp.subVectors(this.end,this.start);const i=Dp.dot(Dp);let s=Dp.dot(xE)/i;return t&&(s=An(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 _E=new F;class jG extends Mt{constructor(e,t){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=t,this.type="SpotLightHelper";const i=new ft,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{CE.set(e.z,0,-e.x).normalize();const t=Math.acos(e.y);this.quaternion.setFromAxisAngle(CE,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 r9 extends Hr{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 ft;r.setAttribute("position",new Ve(t,3)),r.setAttribute("color",new Ve(i,3));const s=new ui({vertexColors:!0,toneMapped:!1});super(r,s),this.type="AxesHelper"}setColors(e,t,i){const r=new De,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 s9{constructor(){this.type="ShapePath",this.color=new De,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new th,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(A){const _=[];for(let w=0,M=A.length;wNumber.EPSILON){if(I<0&&(R=_[P],B=-B,E=_[b],I=-I),A.yE.y)continue;if(A.y===R.y){if(A.x===R.x)return!0}else{const z=I*(A.x-R.x)-B*(A.y-R.y);if(z===0)return!0;if(z<0)continue;M=!M}}else{if(A.y!==R.y)continue;if(E.x<=A.x&&A.x<=R.x||R.x<=A.x&&A.x<=E.x)return!0}}return M}const r=cs.isClockWise,s=this.subPaths;if(s.length===0)return[];let o,a,l;const u=[];if(s.length===1)return a=s[0],l=new il,l.curves=a.curves,u.push(l),u;let h=!r(s[0].getPoints());h=e?!h:h;const d=[],p=[];let m=[],y=0,v;p[y]=void 0,m[y]=[];for(let A=0,_=s.length;A<_;A++)a=s[A],v=a.getPoints(),o=r(v),o=e?!o:o,o?(!h&&p[y]&&y++,p[y]={s:new il,p:v},p[y].s.curves=a.curves,h&&y++,m[y]=[]):m[y].push({h:a,p:v[0]});if(!p[0])return t(s);if(p.length>1){let A=!1,_=0;for(let w=0,M=p.length;w0&&A===!1&&(m=d)}let x;for(let A=0,_=p.length;A<_;A++){l=p[A].s,u.push(l),x=m[A];for(let w=0,M=x.length;w>-u-14,i[l|256]=1024>>-u-14|32768,r[l]=-u-1,r[l|256]=-u-1):u<=15?(i[l]=u+15<<10,i[l|256]=u+15<<10|32768,r[l]=13,r[l|256]=13):u<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 u=l<<13,h=0;for(;!(u&8388608);)u<<=1,h-=8388608;u&=-8388609,h+=947912704,s[l]=u|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 a9(n){Math.abs(n)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),n=An(n,-65504,65504),ks.floatView[0]=n;const e=ks.uint32View[0],t=e>>23&511;return ks.baseTable[t]+((e&8388607)>>ks.shiftTable[t])}function l9(n){const e=n>>10;return ks.uint32View[0]=ks.mantissaTable[ks.offsetTable[e]+(n&1023)]+ks.exponentTable[e],ks.floatView[0]}const c9={toHalfFloat:a9,fromHalfFloat:l9};class u9 extends oa{constructor(e,t,i,r,s,o){console.warn("THREE.BoxBufferGeometry has been renamed to THREE.BoxGeometry."),super(e,t,i,r,s,o)}}class f9 extends Ah{constructor(e,t,i,r){console.warn("THREE.CapsuleBufferGeometry has been renamed to THREE.CapsuleGeometry."),super(e,t,i,r)}}class h9 extends wh{constructor(e,t,i,r){console.warn("THREE.CircleBufferGeometry has been renamed to THREE.CircleGeometry."),super(e,t,i,r)}}class d9 extends Sh{constructor(e,t,i,r,s,o,a){console.warn("THREE.ConeBufferGeometry has been renamed to THREE.ConeGeometry."),super(e,t,i,r,s,o,a)}}class p9 extends gl{constructor(e,t,i,r,s,o,a,l){console.warn("THREE.CylinderBufferGeometry has been renamed to THREE.CylinderGeometry."),super(e,t,i,r,s,o,a,l)}}class m9 extends Mh{constructor(e,t){console.warn("THREE.DodecahedronBufferGeometry has been renamed to THREE.DodecahedronGeometry."),super(e,t)}}class g9 extends Ch{constructor(e,t){console.warn("THREE.ExtrudeBufferGeometry has been renamed to THREE.ExtrudeGeometry."),super(e,t)}}class y9 extends Eh{constructor(e,t){console.warn("THREE.IcosahedronBufferGeometry has been renamed to THREE.IcosahedronGeometry."),super(e,t)}}class v9 extends au{constructor(e,t,i,r){console.warn("THREE.LatheBufferGeometry has been renamed to THREE.LatheGeometry."),super(e,t,i,r)}}class x9 extends lu{constructor(e,t){console.warn("THREE.OctahedronBufferGeometry has been renamed to THREE.OctahedronGeometry."),super(e,t)}}class _9 extends su{constructor(e,t,i,r){console.warn("THREE.PlaneBufferGeometry has been renamed to THREE.PlaneGeometry."),super(e,t,i,r)}}class A9 extends to{constructor(e,t,i,r){console.warn("THREE.PolyhedronBufferGeometry has been renamed to THREE.PolyhedronGeometry."),super(e,t,i,r)}}class w9 extends bh{constructor(e,t,i,r,s,o){console.warn("THREE.RingBufferGeometry has been renamed to THREE.RingGeometry."),super(e,t,i,r,s,o)}}class S9 extends Th{constructor(e,t){console.warn("THREE.ShapeBufferGeometry has been renamed to THREE.ShapeGeometry."),super(e,t)}}class M9 extends cu{constructor(e,t,i,r,s,o,a){console.warn("THREE.SphereBufferGeometry has been renamed to THREE.SphereGeometry."),super(e,t,i,r,s,o,a)}}class C9 extends Ph{constructor(e,t){console.warn("THREE.TetrahedronBufferGeometry has been renamed to THREE.TetrahedronGeometry."),super(e,t)}}class E9 extends Bh{constructor(e,t,i,r,s){console.warn("THREE.TorusBufferGeometry has been renamed to THREE.TorusGeometry."),super(e,t,i,r,s)}}class b9 extends Rh{constructor(e,t,i,r,s,o){console.warn("THREE.TorusKnotBufferGeometry has been renamed to THREE.TorusKnotGeometry."),super(e,t,i,r,s,o)}}class T9 extends Lh{constructor(e,t,i,r,s){console.warn("THREE.TubeBufferGeometry has been renamed to THREE.TubeGeometry."),super(e,t,i,r,s)}}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:nu}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=nu);const P9=Object.freeze(Object.defineProperty({__proto__:null,ACESFilmicToneMapping:j_,AddEquation:Na,AddOperation:rP,AdditiveAnimationBlendMode:X_,AdditiveBlending:zx,AlphaFormat:pP,AlwaysDepth:Z3,AlwaysStencilFunc:RP,AmbientLight:xB,AmbientLightProbe:vG,AnimationClip:Kc,AnimationLoader:aG,AnimationMixer:NG,AnimationObjectGroup:DG,AnimationUtils:iG,ArcCurve:QP,ArrayCamera:WP,ArrowHelper:i9,Audio:CB,AudioAnalyser:MG,AudioContext:TA,AudioListener:AG,AudioLoader:gG,AxesHelper:r9,BackSide:Li,BasicDepthPacking:TP,BasicShadowMap:N3,Bone:zg,BooleanKeyframeTrack:yl,Box2:VG,Box3:ra,Box3Helper:t9,BoxBufferGeometry:u9,BoxGeometry:oa,BoxHelper:e9,BufferAttribute:Lt,BufferGeometry:ft,BufferGeometryLoader:SB,ByteType:cP,Cache:hl,Camera:gh,CameraHelper:$G,CanvasTexture:bU,CapsuleBufferGeometry:f9,CapsuleGeometry:Ah,CatmullRomCurve3:ZP,CineonToneMapping:aP,CircleBufferGeometry:h9,CircleGeometry:wh,ClampToEdgeWrapping:Yn,Clock:PA,Color:De,ColorKeyframeTrack:wA,ColorManagement:ai,CompressedArrayTexture:EU,CompressedTexture:hA,CompressedTextureLoader:lG,ConeBufferGeometry:d9,ConeGeometry:Sh,CubeCamera:nA,CubeReflectionMapping:Jo,CubeRefractionMapping:Xo,CubeTexture:yh,CubeTextureLoader:cG,CubeUVReflectionMapping:iu,CubicBezierCurve:pA,CubicBezierCurve3:qP,CubicInterpolant:mB,CullFaceBack:Ox,CullFaceFront:k3,CullFaceFrontBack:bk,CullFaceNone:F3,Curve:Vr,CurvePath:eB,CustomBlending:O3,CustomToneMapping:lP,CylinderBufferGeometry:p9,CylinderGeometry:gl,Cylindrical:HG,Data3DTexture:$_,DataArrayTexture:Ig,DataTexture:Rc,DataTextureLoader:uG,DataUtils:c9,DecrementStencilOp:Nk,DecrementWrapStencilOp:zk,DefaultLoadingManager:vc,DepthFormat:Uo,DepthStencilFormat:cl,DepthTexture:jP,DirectionalLight:bA,DirectionalLightHelper:qG,DiscreteInterpolant:gB,DisplayP3ColorSpace:K_,DodecahedronBufferGeometry:m9,DodecahedronGeometry:Mh,DoubleSide:Fr,DstAlphaFactor:j3,DstColorFactor:X3,DynamicCopyUsage:$k,DynamicDrawUsage:el,DynamicReadUsage:Qk,EdgesGeometry:tB,EllipseCurve:Ug,EqualDepth:$3,EqualStencilFunc:Vk,EquirectangularReflectionMapping:Yf,EquirectangularRefractionMapping:Kf,Euler:ml,EventDispatcher:ms,ExtrudeBufferGeometry:g9,ExtrudeGeometry:Ch,FileLoader:Xi,Float16BufferAttribute:zN,Float32BufferAttribute:Ve,Float64BufferAttribute:UN,FloatType:zs,Fog:Og,FogExp2:Ng,FramebufferTexture:CU,FrontSide:hs,Frustum:Dg,GLBufferAttribute:GG,GLSL1:tN,GLSL3:d1,GreaterDepth:tP,GreaterEqualDepth:eP,GreaterEqualStencilFunc:Xk,GreaterStencilFunc:jk,GridHelper:QG,Group:Gs,HalfFloatType:Hc,HemisphereLight:vB,HemisphereLightHelper:KG,HemisphereLightProbe:yG,IcosahedronBufferGeometry:y9,IcosahedronGeometry:Eh,ImageBitmapLoader:MB,ImageLoader:sh,ImageUtils:q_,IncrementStencilOp:kk,IncrementWrapStencilOp:Ok,InstancedBufferAttribute:Jc,InstancedBufferGeometry:wB,InstancedInterleavedBuffer:UG,InstancedMesh:cA,Int16BufferAttribute:NN,Int32BufferAttribute:ON,Int8BufferAttribute:DN,IntType:fP,InterleavedBuffer:vh,InterleavedBufferAttribute:Qo,Interpolant:uu,InterpolateDiscrete:Vc,InterpolateLinear:ul,InterpolateSmooth:pm,InvertStencilOp:Uk,KeepStencilOp:mm,KeyframeTrack:Wr,LOD:KP,LatheBufferGeometry:v9,LatheGeometry:au,Layers:nl,LessDepth:q3,LessEqualDepth:jm,LessEqualStencilFunc:Wk,LessStencilFunc:Hk,Light:aa,LightProbe:Vg,Line:qs,Line3:WG,LineBasicMaterial:ui,LineCurve:Gg,LineCurve3:$P,LineDashedMaterial:dB,LineLoop:uA,LineSegments:Hr,LinearEncoding:Ko,LinearFilter:nn,LinearInterpolant:AA,LinearMipMapLinearFilter:Lk,LinearMipMapNearestFilter:Rk,LinearMipmapLinearFilter:ds,LinearMipmapNearestFilter:Rg,LinearSRGBColorSpace:Wc,LinearToneMapping:sP,Loader:Ai,LoaderUtils:us,LoadingManager:SA,LoopOnce:MP,LoopPingPong:EP,LoopRepeat:CP,LuminanceAlphaFormat:gP,LuminanceFormat:mP,MOUSE:La,Material:Pn,MaterialLoader:Wg,MathUtils:Z_,Matrix3:Kn,Matrix4:ot,MaxEquation:Vx,Mesh:In,MeshBasicMaterial:Vi,MeshDepthMaterial:sA,MeshDistanceMaterial:oA,MeshLambertMaterial:fB,MeshMatcapMaterial:hB,MeshNormalMaterial:uB,MeshPhongMaterial:lB,MeshPhysicalMaterial:gs,MeshStandardMaterial:Ih,MeshToonMaterial:cB,MinEquation:Hx,MirroredRepeatWrapping:Gc,MixOperation:iP,MultiplyBlending:Gx,MultiplyOperation:mh,NearestFilter:mn,NearestMipMapLinearFilter:Bk,NearestMipMapNearestFilter:Pk,NearestMipmapLinearFilter:Pc,NearestMipmapNearestFilter:Qf,NeverDepth:Q3,NeverStencilFunc:Gk,NoBlending:Ws,NoColorSpace:Ik,NoToneMapping:zr,NormalAnimationBlendMode:Lg,NormalBlending:qa,NotEqualDepth:nP,NotEqualStencilFunc:Jk,NumberKeyframeTrack:Xc,Object3D:Mt,ObjectLoader:pG,ObjectSpaceNormalMap:BP,OctahedronBufferGeometry:x9,OctahedronGeometry:lu,OneFactor:H3,OneMinusDstAlphaFactor:J3,OneMinusDstColorFactor:Y3,OneMinusSrcAlphaFactor:W_,OneMinusSrcColorFactor:W3,OrthographicCamera:mr,PCFShadowMap:Pg,PCFSoftShadowMap:Af,PMREMGenerator:m1,Path:th,PerspectiveCamera:Jt,Plane:Ds,PlaneBufferGeometry:_9,PlaneGeometry:su,PlaneHelper:n9,PointLight:EA,PointLightHelper:XG,Points:fA,PointsMaterial:_h,PolarGridHelper:ZG,PolyhedronBufferGeometry:A9,PolyhedronGeometry:to,PositionalAudio:SG,PropertyBinding:Et,PropertyMixer:EB,QuadraticBezierCurve:mA,QuadraticBezierCurve3:gA,Quaternion:Wn,QuaternionKeyframeTrack:Zo,QuaternionLinearInterpolant:yB,RED_GREEN_RGTC2_Format:f1,RED_RGTC1_Format:SP,REVISION:nu,RGBADepthPacking:PP,RGBAFormat:bi,RGBAIntegerFormat:AP,RGBA_ASTC_10x10_Format:a1,RGBA_ASTC_10x5_Format:r1,RGBA_ASTC_10x6_Format:s1,RGBA_ASTC_10x8_Format:o1,RGBA_ASTC_12x10_Format:l1,RGBA_ASTC_12x12_Format:c1,RGBA_ASTC_4x4_Format:Qx,RGBA_ASTC_5x4_Format:Zx,RGBA_ASTC_5x5_Format:qx,RGBA_ASTC_6x5_Format:$x,RGBA_ASTC_6x6_Format:e1,RGBA_ASTC_8x5_Format:t1,RGBA_ASTC_8x6_Format:n1,RGBA_ASTC_8x8_Format:i1,RGBA_BPTC_Format:dm,RGBA_ETC2_EAC_Format:Kx,RGBA_PVRTC_2BPPV1_Format:Xx,RGBA_PVRTC_4BPPV1_Format:Jx,RGBA_S3TC_DXT1_Format:um,RGBA_S3TC_DXT3_Format:fm,RGBA_S3TC_DXT5_Format:hm,RGB_ETC1_Format:wP,RGB_ETC2_Format:Yx,RGB_PVRTC_2BPPV1_Format:jx,RGB_PVRTC_4BPPV1_Format:Wx,RGB_S3TC_DXT1_Format:cm,RGFormat:xP,RGIntegerFormat:_P,RawShaderMaterial:aB,Ray:ru,Raycaster:bB,RectAreaLight:_B,RedFormat:yP,RedIntegerFormat:vP,ReinhardToneMapping:oP,RepeatWrapping:Yo,ReplaceStencilOp:Fk,ReverseSubtractEquation:U3,RingBufferGeometry:w9,RingGeometry:bh,SIGNED_RED_GREEN_RGTC2_Format:h1,SIGNED_RED_RGTC1_Format:u1,SRGBColorSpace:Lr,Scene:Ym,ShaderChunk:pt,ShaderLib:Dr,ShaderMaterial:ps,ShadowMaterial:oB,Shape:il,ShapeBufferGeometry:S9,ShapeGeometry:Th,ShapePath:s9,ShapeUtils:cs,ShortType:uP,Skeleton:xh,SkeletonHelper:JG,SkinnedMesh:lA,Source:Ja,Sphere:sa,SphereBufferGeometry:M9,SphereGeometry:cu,Spherical:w1,SphericalHarmonics3:AB,SplineCurve:yA,SpotLight:CA,SpotLightHelper:jG,Sprite:YP,SpriteMaterial:aA,SrcAlphaFactor:V_,SrcAlphaSaturateFactor:K3,SrcColorFactor:V3,StaticCopyUsage:qk,StaticDrawUsage:qf,StaticReadUsage:Kk,StereoCamera:xG,StreamCopyUsage:eN,StreamDrawUsage:Yk,StreamReadUsage:Zk,StringKeyframeTrack:vl,SubtractEquation:z3,SubtractiveBlending:Ux,TOUCH:Ia,TangentSpaceNormalMap:ia,TetrahedronBufferGeometry:C9,TetrahedronGeometry:Ph,Texture:$t,TextureLoader:Dh,TorusBufferGeometry:E9,TorusGeometry:Bh,TorusKnotBufferGeometry:b9,TorusKnotGeometry:Rh,Triangle:dr,TriangleFanDrawMode:Jm,TriangleStripDrawMode:Y_,TrianglesDrawMode:bP,TubeBufferGeometry:T9,TubeGeometry:Lh,TwoPassDoubleSide:Tk,UVMapping:Bg,Uint16BufferAttribute:eA,Uint32BufferAttribute:tA,Uint8BufferAttribute:FN,Uint8ClampedBufferAttribute:kN,Uniform:LA,UniformsGroup:zG,UniformsLib:Re,UniformsUtils:NP,UnsignedByteType:Zs,UnsignedInt248Type:$a,UnsignedIntType:Po,UnsignedShort4444Type:hP,UnsignedShort5551Type:dP,UnsignedShortType:J_,VSMShadowMap:Va,Vector2:pe,Vector3:F,Vector4:Nt,VectorKeyframeTrack:Yc,VideoTexture:MU,WebGL1Renderer:JP,WebGL3DRenderTarget:MN,WebGLArrayRenderTarget:SN,WebGLCubeRenderTarget:iA,WebGLMultipleRenderTargets:CN,WebGLRenderTarget:Gr,WebGLRenderer:kg,WebGLUtils:VP,WireframeGeometry:sB,WrapAroundEnding:Zf,ZeroCurvatureEnding:Wa,ZeroFactor:G3,ZeroSlopeEnding:ja,ZeroStencilOp:Dk,_SRGBAFormat:Xm,sRGBEncoding:Ht},Symbol.toStringTag,{value:"Module"}));var Ro={},B9={get exports(){return Ro},set exports(n){Ro=n}},xl={};/** * @license React * react-reconciler-constants.production.min.js * @@ -3266,7 +3266,7 @@ void main() { * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */xl.ConcurrentRoot=1;xl.ContinuousEventPriority=4;xl.DefaultEventPriority=16;xl.DiscreteEventPriority=1;xl.IdleEventPriority=536870912;xl.LegacyRoot=0;(function(n){n.exports=xl})(D9);function F9(n){let e;const t=new Set,i=(u,h)=>{const d=typeof u=="function"?u(e):u;if(d!==e){const p=e;e=h?d:Object.assign({},e,d),t.forEach(m=>m(e,p))}},r=()=>e,s=(u,h=r,d=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let p=h(e);function m(){const y=h(e);if(!d(p,y)){const v=p;u(p=y,v)}}return t.add(m),()=>t.delete(m)},l={setState:i,getState:r,subscribe:(u,h,d)=>h||d?s(u,h,d):(t.add(u),()=>t.delete(u)),destroy:()=>t.clear()};return e=n(i,r,l),l}const k9=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),bE=k9?U.useEffect:U.useLayoutEffect;function RB(n){const e=typeof n=="function"?F9(n):n,t=(i=e.getState,r=Object.is)=>{const[,s]=U.useReducer(x=>x+1,0),o=e.getState(),a=U.useRef(o),l=U.useRef(i),u=U.useRef(r),h=U.useRef(!1),d=U.useRef();d.current===void 0&&(d.current=i(o));let p,m=!1;(a.current!==o||l.current!==i||u.current!==r||h.current)&&(p=i(o),m=!r(d.current,p)),bE(()=>{m&&(d.current=p),a.current=o,l.current=i,u.current=r,h.current=!1});const y=U.useRef(o);bE(()=>{const x=()=>{try{const _=e.getState(),w=l.current(_);u.current(d.current,w)||(a.current=_,d.current=w,s())}catch{h.current=!0,s()}},A=e.subscribe(x);return e.getState()!==y.current&&x(),A},[]);const v=m?p:d.current;return U.useDebugValue(v),v};return Object.assign(t,e),t[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const i=[t,e];return{next(){const r=i.length<=0;return{value:i.shift(),done:r}}}},t}var M1={},N9={get exports(){return M1},set exports(n){M1=n}},Qm={},O9={get exports(){return Qm},set exports(n){Qm=n}},mv={};/** + */xl.ConcurrentRoot=1;xl.ContinuousEventPriority=4;xl.DefaultEventPriority=16;xl.DiscreteEventPriority=1;xl.IdleEventPriority=536870912;xl.LegacyRoot=0;(function(n){n.exports=xl})(B9);function R9(n){let e;const t=new Set,i=(u,h)=>{const d=typeof u=="function"?u(e):u;if(d!==e){const p=e;e=h?d:Object.assign({},e,d),t.forEach(m=>m(e,p))}},r=()=>e,s=(u,h=r,d=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let p=h(e);function m(){const y=h(e);if(!d(p,y)){const v=p;u(p=y,v)}}return t.add(m),()=>t.delete(m)},l={setState:i,getState:r,subscribe:(u,h,d)=>h||d?s(u,h,d):(t.add(u),()=>t.delete(u)),destroy:()=>t.clear()};return e=n(i,r,l),l}const L9=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),EE=L9?U.useEffect:U.useLayoutEffect;function PB(n){const e=typeof n=="function"?R9(n):n,t=(i=e.getState,r=Object.is)=>{const[,s]=U.useReducer(x=>x+1,0),o=e.getState(),a=U.useRef(o),l=U.useRef(i),u=U.useRef(r),h=U.useRef(!1),d=U.useRef();d.current===void 0&&(d.current=i(o));let p,m=!1;(a.current!==o||l.current!==i||u.current!==r||h.current)&&(p=i(o),m=!r(d.current,p)),EE(()=>{m&&(d.current=p),a.current=o,l.current=i,u.current=r,h.current=!1});const y=U.useRef(o);EE(()=>{const x=()=>{try{const _=e.getState(),w=l.current(_);u.current(d.current,w)||(a.current=_,d.current=w,s())}catch{h.current=!0,s()}},A=e.subscribe(x);return e.getState()!==y.current&&x(),A},[]);const v=m?p:d.current;return U.useDebugValue(v),v};return Object.assign(t,e),t[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const i=[t,e];return{next(){const r=i.length<=0;return{value:i.shift(),done:r}}}},t}var S1={},I9={get exports(){return S1},set exports(n){S1=n}},Km={},D9={get exports(){return Km},set exports(n){Km=n}},pv={};/** * @license React * scheduler.production.min.js * @@ -3274,7 +3274,7 @@ void main() { * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var TE;function z9(){return TE||(TE=1,function(n){function e(L,V){var H=L.length;L.push(V);e:for(;0>>1,G=L[$];if(0>>1;$r(Y,H))_er(Ae,Y)?(L[$]=Ae,L[_e]=H,$=_e):(L[$]=Y,L[me]=H,$=me);else if(_er(Ae,H))L[$]=Ae,L[_e]=H,$=_e;else break e}}return V}function r(L,V){var H=L.sortIndex-V.sortIndex;return H!==0?H:L.id-V.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=[],u=[],h=1,d=null,p=3,m=!1,y=!1,v=!1,x=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,_=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(L){for(var V=t(u);V!==null;){if(V.callback===null)i(u);else if(V.startTime<=L)i(u),V.sortIndex=V.expirationTime,e(l,V);else break;V=t(u)}}function M(L){if(v=!1,w(L),!y)if(t(l)!==null)y=!0,re(b);else{var V=t(u);V!==null&&ce(M,V.startTime-L)}}function b(L,V){y=!1,v&&(v=!1,A(E),E=-1),m=!0;var H=p;try{for(w(V),d=t(l);d!==null&&(!(d.expirationTime>V)||L&&!z());){var $=d.callback;if(typeof $=="function"){d.callback=null,p=d.priorityLevel;var G=$(d.expirationTime<=V);V=n.unstable_now(),typeof G=="function"?d.callback=G:d===t(l)&&i(l),w(V)}else i(l);d=t(l)}if(d!==null)var se=!0;else{var me=t(u);me!==null&&ce(M,me.startTime-V),se=!1}return se}finally{d=null,p=H,m=!1}}var P=!1,R=null,E=-1,B=5,I=-1;function z(){return!(n.unstable_now()-IL||125$?(L.sortIndex=H,e(u,L),t(l)===null&&L===t(u)&&(v?(A(E),E=-1):v=!0,ce(M,H-$))):(L.sortIndex=G,e(l,L),y||m||(y=!0,re(b))),L},n.unstable_shouldYield=z,n.unstable_wrapCallback=function(L){var V=p;return function(){var H=p;p=V;try{return L.apply(this,arguments)}finally{p=H}}}}(mv)),mv}var PE;function U9(){return PE||(PE=1,function(n){n.exports=z9()}(O9)),Qm}/** + */var bE;function F9(){return bE||(bE=1,function(n){function e(L,V){var H=L.length;L.push(V);e:for(;0>>1,G=L[$];if(0>>1;$r(Y,H))_er(Ae,Y)?(L[$]=Ae,L[_e]=H,$=_e):(L[$]=Y,L[me]=H,$=me);else if(_er(Ae,H))L[$]=Ae,L[_e]=H,$=_e;else break e}}return V}function r(L,V){var H=L.sortIndex-V.sortIndex;return H!==0?H:L.id-V.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=[],u=[],h=1,d=null,p=3,m=!1,y=!1,v=!1,x=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,_=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(L){for(var V=t(u);V!==null;){if(V.callback===null)i(u);else if(V.startTime<=L)i(u),V.sortIndex=V.expirationTime,e(l,V);else break;V=t(u)}}function M(L){if(v=!1,w(L),!y)if(t(l)!==null)y=!0,re(b);else{var V=t(u);V!==null&&ce(M,V.startTime-L)}}function b(L,V){y=!1,v&&(v=!1,A(E),E=-1),m=!0;var H=p;try{for(w(V),d=t(l);d!==null&&(!(d.expirationTime>V)||L&&!z());){var $=d.callback;if(typeof $=="function"){d.callback=null,p=d.priorityLevel;var G=$(d.expirationTime<=V);V=n.unstable_now(),typeof G=="function"?d.callback=G:d===t(l)&&i(l),w(V)}else i(l);d=t(l)}if(d!==null)var se=!0;else{var me=t(u);me!==null&&ce(M,me.startTime-V),se=!1}return se}finally{d=null,p=H,m=!1}}var P=!1,R=null,E=-1,B=5,I=-1;function z(){return!(n.unstable_now()-IL||125$?(L.sortIndex=H,e(u,L),t(l)===null&&L===t(u)&&(v?(A(E),E=-1):v=!0,ce(M,H-$))):(L.sortIndex=G,e(l,L),y||m||(y=!0,re(b))),L},n.unstable_shouldYield=z,n.unstable_wrapCallback=function(L){var V=p;return function(){var H=p;p=V;try{return L.apply(this,arguments)}finally{p=H}}}}(pv)),pv}var TE;function k9(){return TE||(TE=1,function(n){n.exports=F9()}(D9)),Km}/** * @license React * react-reconciler.production.min.js * @@ -3282,17 +3282,17 @@ void main() { * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var G9=function(e){var t={},i=U,r=U9(),s=Object.assign;function o(c){for(var f="https://reactjs.org/docs/error-decoder.html?invariant="+c,g=1;gK||C[O]!==T[K]){var ue=` -`+C[O].replace(" at new "," at ");return c.displayName&&ue.includes("")&&(ue=ue.replace("",c.displayName)),ue}while(1<=O&&0<=K);break}}}finally{un=!1,Error.prepareStackTrace=g}return(c=c?c.displayName||c.name:"")?vs(c):""}var Wh=Object.prototype.hasOwnProperty,xs=[],Jr=-1;function Kt(c){return{current:c}}function bt(c){0>Jr||(c.current=xs[Jr],xs[Jr]=null,Jr--)}function kt(c,f){Jr++,xs[Jr]=c.current,c.current=f}var fn={},Sn=Kt(fn),qn=Kt(!1),Xr=fn;function Sl(c,f){var g=c.type.contextTypes;if(!g)return fn;var S=c.stateNode;if(S&&S.__reactInternalMemoizedUnmaskedChildContext===f)return S.__reactInternalMemoizedMaskedChildContext;var C={},T;for(T in g)C[T]=f[T];return S&&(c=c.stateNode,c.__reactInternalMemoizedUnmaskedChildContext=f,c.__reactInternalMemoizedMaskedChildContext=C),C}function wi(c){return c=c.childContextTypes,c!=null}function jh(){bt(qn),bt(Sn)}function hw(c,f,g){if(Sn.current!==fn)throw Error(o(168));kt(Sn,f),kt(qn,g)}function dw(c,f,g){var S=c.stateNode;if(f=f.childContextTypes,typeof S.getChildContext!="function")return g;S=S.getChildContext();for(var C in S)if(!(C in f))throw Error(o(108,E(c)||"Unknown",C));return s({},g,S)}function Jh(c){return c=(c=c.stateNode)&&c.__reactInternalMemoizedMergedChildContext||fn,Xr=Sn.current,kt(Sn,c),kt(qn,qn.current),!0}function pw(c,f,g){var S=c.stateNode;if(!S)throw Error(o(169));g?(c=dw(c,f,Xr),S.__reactInternalMemoizedMergedChildContext=c,bt(qn),bt(Sn),kt(Sn,c)):bt(qn),kt(qn,g)}var Sr=Math.clz32?Math.clz32:UL,OL=Math.log,zL=Math.LN2;function UL(c){return c>>>=0,c===0?32:31-(OL(c)/zL|0)|0}var Xh=64,Yh=4194304;function du(c){switch(c&-c){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 c&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return c&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return c}}function Kh(c,f){var g=c.pendingLanes;if(g===0)return 0;var S=0,C=c.suspendedLanes,T=c.pingedLanes,O=g&268435455;if(O!==0){var K=O&~C;K!==0?S=du(K):(T&=O,T!==0&&(S=du(T)))}else O=g&~C,O!==0?S=du(O):T!==0&&(S=du(T));if(S===0)return 0;if(f!==0&&f!==S&&!(f&C)&&(C=S&-S,T=f&-f,C>=T||C===16&&(T&4194240)!==0))return f;if(S&4&&(S|=g&16),f=c.entangledLanes,f!==0)for(c=c.entanglements,f&=S;0g;g++)f.push(c);return f}function pu(c,f,g){c.pendingLanes|=f,f!==536870912&&(c.suspendedLanes=0,c.pingedLanes=0),c=c.eventTimes,f=31-Sr(f),c[f]=g}function VL(c,f){var g=c.pendingLanes&~f;c.pendingLanes=f,c.suspendedLanes=0,c.pingedLanes=0,c.expiredLanes&=f,c.mutableReadLanes&=f,c.entangledLanes&=f,f=c.entanglements;var S=c.eventTimes;for(c=c.expirationTimes;0>=O,C-=O,ws=1<<32-Sr(f)+C|g<Bt?(zn=ut,ut=null):zn=ut.sibling;var Rt=it(ne,ut,le[Bt],Ne);if(Rt===null){ut===null&&(ut=zn);break}c&&ut&&Rt.alternate===null&&f(ne,ut),q=T(Rt,q,Bt),dt===null?Ze=Rt:dt.sibling=Rt,dt=Rt,ut=zn}if(Bt===le.length)return g(ne,ut),Qt&&fa(ne,Bt),Ze;if(ut===null){for(;BtBt?(zn=ut,ut=null):zn=ut.sibling;var co=it(ne,ut,Rt.value,Ne);if(co===null){ut===null&&(ut=zn);break}c&&ut&&co.alternate===null&&f(ne,ut),q=T(co,q,Bt),dt===null?Ze=co:dt.sibling=co,dt=co,ut=zn}if(Rt.done)return g(ne,ut),Qt&&fa(ne,Bt),Ze;if(ut===null){for(;!Rt.done;Bt++,Rt=le.next())Rt=ct(ne,Rt.value,Ne),Rt!==null&&(q=T(Rt,q,Bt),dt===null?Ze=Rt:dt.sibling=Rt,dt=Rt);return Qt&&fa(ne,Bt),Ze}for(ut=S(ne,ut);!Rt.done;Bt++,Rt=le.next())Rt=Ut(ut,ne,Bt,Rt.value,Ne),Rt!==null&&(c&&Rt.alternate!==null&&ut.delete(Rt.key===null?Bt:Rt.key),q=T(Rt,q,Bt),dt===null?Ze=Rt:dt.sibling=Rt,dt=Rt);return c&&ut.forEach(function(TI){return f(ne,TI)}),Qt&&fa(ne,Bt),Ze}function sr(ne,q,le,Ne){if(typeof le=="object"&&le!==null&&le.type===h&&le.key===null&&(le=le.props.children),typeof le=="object"&&le!==null){switch(le.$$typeof){case l:e:{for(var Ze=le.key,dt=q;dt!==null;){if(dt.key===Ze){if(Ze=le.type,Ze===h){if(dt.tag===7){g(ne,dt.sibling),q=C(dt,le.props.children),q.return=ne,ne=q;break e}}else if(dt.elementType===Ze||typeof Ze=="object"&&Ze!==null&&Ze.$$typeof===w&&Bw(Ze)===dt.type){g(ne,dt.sibling),q=C(dt,le.props),q.ref=yu(ne,dt,le),q.return=ne,ne=q;break e}g(ne,dt);break}else f(ne,dt);dt=dt.sibling}le.type===h?(q=va(le.props.children,ne.mode,Ne,le.key),q.return=ne,ne=q):(Ne=Nd(le.type,le.key,le.props,null,ne.mode,Ne),Ne.ref=yu(ne,q,le),Ne.return=ne,ne=Ne)}return O(ne);case u:e:{for(dt=le.key;q!==null;){if(q.key===dt)if(q.tag===4&&q.stateNode.containerInfo===le.containerInfo&&q.stateNode.implementation===le.implementation){g(ne,q.sibling),q=C(q,le.children||[]),q.return=ne,ne=q;break e}else{g(ne,q);break}else f(ne,q);q=q.sibling}q=ay(le,ne.mode,Ne),q.return=ne,ne=q}return O(ne);case w:return dt=le._init,sr(ne,q,dt(le._payload),Ne)}if(Q(le))return qe(ne,q,le,Ne);if(P(le))return ni(ne,q,le,Ne);od(ne,le)}return typeof le=="string"&&le!==""||typeof le=="number"?(le=""+le,q!==null&&q.tag===6?(g(ne,q.sibling),q=C(q,le),q.return=ne,ne=q):(g(ne,q),q=oy(le,ne.mode,Ne),q.return=ne,ne=q),O(ne)):g(ne,q)}return sr}var Pl=Rw(!0),Lw=Rw(!1),vu={},tr=Kt(vu),xu=Kt(vu),Bl=Kt(vu);function qr(c){if(c===vu)throw Error(o(174));return c}function M0(c,f){kt(Bl,f),kt(xu,c),kt(tr,vu),c=ce(f),bt(tr),kt(tr,c)}function Rl(){bt(tr),bt(xu),bt(Bl)}function Iw(c){var f=qr(Bl.current),g=qr(tr.current);f=L(g,c.type,f),g!==f&&(kt(xu,c),kt(tr,f))}function C0(c){xu.current===c&&(bt(tr),bt(xu))}var en=Kt(0);function ad(c){for(var f=c;f!==null;){if(f.tag===13){var g=f.memoizedState;if(g!==null&&(g=g.dehydrated,g===null||Vh(g)||k(g)))return f}else if(f.tag===19&&f.memoizedProps.revealOrder!==void 0){if(f.flags&128)return f}else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===c)break;for(;f.sibling===null;){if(f.return===null||f.return===c)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}var E0=[];function b0(){for(var c=0;cg?g:4,c(!0);var S=nr.transition;nr.transition={};try{c(!1),f()}finally{Pt=g,nr.transition=S}}function Xw(){return $r().memoizedState}function tI(c,f,g){var S=oo(c);g={lane:S,action:g,hasEagerState:!1,eagerState:null,next:null},Yw(c)?Kw(f,g):(Qw(c,f,g),g=di(),c=ir(c,S,g),c!==null&&Zw(c,f,S))}function nI(c,f,g){var S=oo(c),C={lane:S,action:g,hasEagerState:!1,eagerState:null,next:null};if(Yw(c))Kw(f,C);else{Qw(c,f,C);var T=c.alternate;if(c.lanes===0&&(T===null||T.lanes===0)&&(T=f.lastRenderedReducer,T!==null))try{var O=f.lastRenderedState,K=T(O,g);if(C.hasEagerState=!0,C.eagerState=K,Kr(K,O))return}catch{}finally{}g=di(),c=ir(c,S,g),c!==null&&Zw(c,f,S)}}function Yw(c){var f=c.alternate;return c===hn||f!==null&&f===hn}function Kw(c,f){_u=cd=!0;var g=c.pending;g===null?f.next=f:(f.next=g.next,g.next=f),c.pending=f}function Qw(c,f,g){Mn!==null&&c.mode&1&&!(gt&2)?(c=f.interleaved,c===null?(g.next=g,Zr===null?Zr=[f]:Zr.push(f)):(g.next=c.next,c.next=g),f.interleaved=g):(c=f.pending,c===null?g.next=g:(g.next=c.next,c.next=g),f.pending=g)}function Zw(c,f,g){if(g&4194240){var S=f.lanes;S&=c.pendingLanes,g|=S,f.lanes=g,a0(c,g)}}var pd={readContext:qi,useCallback:ei,useContext:ei,useEffect:ei,useImperativeHandle:ei,useInsertionEffect:ei,useLayoutEffect:ei,useMemo:ei,useReducer:ei,useRef:ei,useState:ei,useDebugValue:ei,useDeferredValue:ei,useTransition:ei,useMutableSource:ei,useSyncExternalStore:ei,useId:ei,unstable_isNewReconciler:!1},iI={readContext:qi,useCallback:function(c,f){return Ms().memoizedState=[c,f===void 0?null:f],c},useContext:qi,useEffect:L0,useImperativeHandle:function(c,f,g){return g=g!=null?g.concat([c]):null,hd(4194308,4,Vw.bind(null,f,c),g)},useLayoutEffect:function(c,f){return hd(4194308,4,c,f)},useInsertionEffect:function(c,f){return hd(4,2,c,f)},useMemo:function(c,f){var g=Ms();return f=f===void 0?null:f,c=c(),g.memoizedState=[c,f],c},useReducer:function(c,f,g){var S=Ms();return f=g!==void 0?g(f):f,S.memoizedState=S.baseState=f,c={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:c,lastRenderedState:f},S.queue=c,c=c.dispatch=tI.bind(null,hn,c),[S.memoizedState,c]},useRef:function(c){var f=Ms();return c={current:c},f.memoizedState=c},useState:R0,useDebugValue:I0,useDeferredValue:function(c){var f=R0(c),g=f[0],S=f[1];return L0(function(){var C=nr.transition;nr.transition={};try{S(c)}finally{nr.transition=C}},[c]),g},useTransition:function(){var c=R0(!1),f=c[0];return c=eI.bind(null,c[1]),Ms().memoizedState=c,[f,c]},useMutableSource:function(){},useSyncExternalStore:function(c,f,g){var S=hn,C=Ms();if(Qt){if(g===void 0)throw Error(o(407));g=g()}else{if(g=f(),Mn===null)throw Error(o(349));Ll&30||kw(S,f,g)}C.memoizedState=g;var T={value:g,getSnapshot:f};return C.queue=T,L0(Ow.bind(null,S,T,c),[c]),S.flags|=2048,wu(9,Nw.bind(null,S,T,g,f),void 0,null),g},useId:function(){var c=Ms(),f=Mn.identifierPrefix;if(Qt){var g=Ss,S=ws;g=(S&~(1<<32-Sr(S)-1)).toString(32)+g,f=":"+f+"R"+g,g=Au++,0")&&(ue=ue.replace("",c.displayName)),ue}while(1<=O&&0<=K);break}}}finally{un=!1,Error.prepareStackTrace=g}return(c=c?c.displayName||c.name:"")?vs(c):""}var Vh=Object.prototype.hasOwnProperty,xs=[],Jr=-1;function Kt(c){return{current:c}}function bt(c){0>Jr||(c.current=xs[Jr],xs[Jr]=null,Jr--)}function kt(c,f){Jr++,xs[Jr]=c.current,c.current=f}var fn={},Sn=Kt(fn),qn=Kt(!1),Xr=fn;function Sl(c,f){var g=c.type.contextTypes;if(!g)return fn;var S=c.stateNode;if(S&&S.__reactInternalMemoizedUnmaskedChildContext===f)return S.__reactInternalMemoizedMaskedChildContext;var C={},T;for(T in g)C[T]=f[T];return S&&(c=c.stateNode,c.__reactInternalMemoizedUnmaskedChildContext=f,c.__reactInternalMemoizedMaskedChildContext=C),C}function wi(c){return c=c.childContextTypes,c!=null}function Wh(){bt(qn),bt(Sn)}function fw(c,f,g){if(Sn.current!==fn)throw Error(o(168));kt(Sn,f),kt(qn,g)}function hw(c,f,g){var S=c.stateNode;if(f=f.childContextTypes,typeof S.getChildContext!="function")return g;S=S.getChildContext();for(var C in S)if(!(C in f))throw Error(o(108,E(c)||"Unknown",C));return s({},g,S)}function jh(c){return c=(c=c.stateNode)&&c.__reactInternalMemoizedMergedChildContext||fn,Xr=Sn.current,kt(Sn,c),kt(qn,qn.current),!0}function dw(c,f,g){var S=c.stateNode;if(!S)throw Error(o(169));g?(c=hw(c,f,Xr),S.__reactInternalMemoizedMergedChildContext=c,bt(qn),bt(Sn),kt(Sn,c)):bt(qn),kt(qn,g)}var Sr=Math.clz32?Math.clz32:kL,DL=Math.log,FL=Math.LN2;function kL(c){return c>>>=0,c===0?32:31-(DL(c)/FL|0)|0}var Jh=64,Xh=4194304;function du(c){switch(c&-c){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 c&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return c&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return c}}function Yh(c,f){var g=c.pendingLanes;if(g===0)return 0;var S=0,C=c.suspendedLanes,T=c.pingedLanes,O=g&268435455;if(O!==0){var K=O&~C;K!==0?S=du(K):(T&=O,T!==0&&(S=du(T)))}else O=g&~C,O!==0?S=du(O):T!==0&&(S=du(T));if(S===0)return 0;if(f!==0&&f!==S&&!(f&C)&&(C=S&-S,T=f&-f,C>=T||C===16&&(T&4194240)!==0))return f;if(S&4&&(S|=g&16),f=c.entangledLanes,f!==0)for(c=c.entanglements,f&=S;0g;g++)f.push(c);return f}function pu(c,f,g){c.pendingLanes|=f,f!==536870912&&(c.suspendedLanes=0,c.pingedLanes=0),c=c.eventTimes,f=31-Sr(f),c[f]=g}function zL(c,f){var g=c.pendingLanes&~f;c.pendingLanes=f,c.suspendedLanes=0,c.pingedLanes=0,c.expiredLanes&=f,c.mutableReadLanes&=f,c.entangledLanes&=f,f=c.entanglements;var S=c.eventTimes;for(c=c.expirationTimes;0>=O,C-=O,ws=1<<32-Sr(f)+C|g<Bt?(zn=ut,ut=null):zn=ut.sibling;var Rt=it(ne,ut,le[Bt],Ne);if(Rt===null){ut===null&&(ut=zn);break}c&&ut&&Rt.alternate===null&&f(ne,ut),q=T(Rt,q,Bt),dt===null?Ze=Rt:dt.sibling=Rt,dt=Rt,ut=zn}if(Bt===le.length)return g(ne,ut),Qt&&fa(ne,Bt),Ze;if(ut===null){for(;BtBt?(zn=ut,ut=null):zn=ut.sibling;var co=it(ne,ut,Rt.value,Ne);if(co===null){ut===null&&(ut=zn);break}c&&ut&&co.alternate===null&&f(ne,ut),q=T(co,q,Bt),dt===null?Ze=co:dt.sibling=co,dt=co,ut=zn}if(Rt.done)return g(ne,ut),Qt&&fa(ne,Bt),Ze;if(ut===null){for(;!Rt.done;Bt++,Rt=le.next())Rt=ct(ne,Rt.value,Ne),Rt!==null&&(q=T(Rt,q,Bt),dt===null?Ze=Rt:dt.sibling=Rt,dt=Rt);return Qt&&fa(ne,Bt),Ze}for(ut=S(ne,ut);!Rt.done;Bt++,Rt=le.next())Rt=Ut(ut,ne,Bt,Rt.value,Ne),Rt!==null&&(c&&Rt.alternate!==null&&ut.delete(Rt.key===null?Bt:Rt.key),q=T(Rt,q,Bt),dt===null?Ze=Rt:dt.sibling=Rt,dt=Rt);return c&&ut.forEach(function(MI){return f(ne,MI)}),Qt&&fa(ne,Bt),Ze}function sr(ne,q,le,Ne){if(typeof le=="object"&&le!==null&&le.type===h&&le.key===null&&(le=le.props.children),typeof le=="object"&&le!==null){switch(le.$$typeof){case l:e:{for(var Ze=le.key,dt=q;dt!==null;){if(dt.key===Ze){if(Ze=le.type,Ze===h){if(dt.tag===7){g(ne,dt.sibling),q=C(dt,le.props.children),q.return=ne,ne=q;break e}}else if(dt.elementType===Ze||typeof Ze=="object"&&Ze!==null&&Ze.$$typeof===w&&Pw(Ze)===dt.type){g(ne,dt.sibling),q=C(dt,le.props),q.ref=yu(ne,dt,le),q.return=ne,ne=q;break e}g(ne,dt);break}else f(ne,dt);dt=dt.sibling}le.type===h?(q=va(le.props.children,ne.mode,Ne,le.key),q.return=ne,ne=q):(Ne=kd(le.type,le.key,le.props,null,ne.mode,Ne),Ne.ref=yu(ne,q,le),Ne.return=ne,ne=Ne)}return O(ne);case u:e:{for(dt=le.key;q!==null;){if(q.key===dt)if(q.tag===4&&q.stateNode.containerInfo===le.containerInfo&&q.stateNode.implementation===le.implementation){g(ne,q.sibling),q=C(q,le.children||[]),q.return=ne,ne=q;break e}else{g(ne,q);break}else f(ne,q);q=q.sibling}q=oy(le,ne.mode,Ne),q.return=ne,ne=q}return O(ne);case w:return dt=le._init,sr(ne,q,dt(le._payload),Ne)}if(Q(le))return qe(ne,q,le,Ne);if(P(le))return ni(ne,q,le,Ne);sd(ne,le)}return typeof le=="string"&&le!==""||typeof le=="number"?(le=""+le,q!==null&&q.tag===6?(g(ne,q.sibling),q=C(q,le),q.return=ne,ne=q):(g(ne,q),q=sy(le,ne.mode,Ne),q.return=ne,ne=q),O(ne)):g(ne,q)}return sr}var Pl=Bw(!0),Rw=Bw(!1),vu={},tr=Kt(vu),xu=Kt(vu),Bl=Kt(vu);function qr(c){if(c===vu)throw Error(o(174));return c}function S0(c,f){kt(Bl,f),kt(xu,c),kt(tr,vu),c=ce(f),bt(tr),kt(tr,c)}function Rl(){bt(tr),bt(xu),bt(Bl)}function Lw(c){var f=qr(Bl.current),g=qr(tr.current);f=L(g,c.type,f),g!==f&&(kt(xu,c),kt(tr,f))}function M0(c){xu.current===c&&(bt(tr),bt(xu))}var en=Kt(0);function od(c){for(var f=c;f!==null;){if(f.tag===13){var g=f.memoizedState;if(g!==null&&(g=g.dehydrated,g===null||Hh(g)||k(g)))return f}else if(f.tag===19&&f.memoizedProps.revealOrder!==void 0){if(f.flags&128)return f}else if(f.child!==null){f.child.return=f,f=f.child;continue}if(f===c)break;for(;f.sibling===null;){if(f.return===null||f.return===c)return null;f=f.return}f.sibling.return=f.return,f=f.sibling}return null}var C0=[];function E0(){for(var c=0;cg?g:4,c(!0);var S=nr.transition;nr.transition={};try{c(!1),f()}finally{Pt=g,nr.transition=S}}function Jw(){return $r().memoizedState}function ZL(c,f,g){var S=oo(c);g={lane:S,action:g,hasEagerState:!1,eagerState:null,next:null},Xw(c)?Yw(f,g):(Kw(c,f,g),g=di(),c=ir(c,S,g),c!==null&&Qw(c,f,S))}function qL(c,f,g){var S=oo(c),C={lane:S,action:g,hasEagerState:!1,eagerState:null,next:null};if(Xw(c))Yw(f,C);else{Kw(c,f,C);var T=c.alternate;if(c.lanes===0&&(T===null||T.lanes===0)&&(T=f.lastRenderedReducer,T!==null))try{var O=f.lastRenderedState,K=T(O,g);if(C.hasEagerState=!0,C.eagerState=K,Kr(K,O))return}catch{}finally{}g=di(),c=ir(c,S,g),c!==null&&Qw(c,f,S)}}function Xw(c){var f=c.alternate;return c===hn||f!==null&&f===hn}function Yw(c,f){_u=ld=!0;var g=c.pending;g===null?f.next=f:(f.next=g.next,g.next=f),c.pending=f}function Kw(c,f,g){Mn!==null&&c.mode&1&&!(gt&2)?(c=f.interleaved,c===null?(g.next=g,Zr===null?Zr=[f]:Zr.push(f)):(g.next=c.next,c.next=g),f.interleaved=g):(c=f.pending,c===null?g.next=g:(g.next=c.next,c.next=g),f.pending=g)}function Qw(c,f,g){if(g&4194240){var S=f.lanes;S&=c.pendingLanes,g|=S,f.lanes=g,o0(c,g)}}var dd={readContext:qi,useCallback:ei,useContext:ei,useEffect:ei,useImperativeHandle:ei,useInsertionEffect:ei,useLayoutEffect:ei,useMemo:ei,useReducer:ei,useRef:ei,useState:ei,useDebugValue:ei,useDeferredValue:ei,useTransition:ei,useMutableSource:ei,useSyncExternalStore:ei,useId:ei,unstable_isNewReconciler:!1},$L={readContext:qi,useCallback:function(c,f){return Ms().memoizedState=[c,f===void 0?null:f],c},useContext:qi,useEffect:R0,useImperativeHandle:function(c,f,g){return g=g!=null?g.concat([c]):null,fd(4194308,4,Hw.bind(null,f,c),g)},useLayoutEffect:function(c,f){return fd(4194308,4,c,f)},useInsertionEffect:function(c,f){return fd(4,2,c,f)},useMemo:function(c,f){var g=Ms();return f=f===void 0?null:f,c=c(),g.memoizedState=[c,f],c},useReducer:function(c,f,g){var S=Ms();return f=g!==void 0?g(f):f,S.memoizedState=S.baseState=f,c={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:c,lastRenderedState:f},S.queue=c,c=c.dispatch=ZL.bind(null,hn,c),[S.memoizedState,c]},useRef:function(c){var f=Ms();return c={current:c},f.memoizedState=c},useState:B0,useDebugValue:L0,useDeferredValue:function(c){var f=B0(c),g=f[0],S=f[1];return R0(function(){var C=nr.transition;nr.transition={};try{S(c)}finally{nr.transition=C}},[c]),g},useTransition:function(){var c=B0(!1),f=c[0];return c=QL.bind(null,c[1]),Ms().memoizedState=c,[f,c]},useMutableSource:function(){},useSyncExternalStore:function(c,f,g){var S=hn,C=Ms();if(Qt){if(g===void 0)throw Error(o(407));g=g()}else{if(g=f(),Mn===null)throw Error(o(349));Ll&30||Fw(S,f,g)}C.memoizedState=g;var T={value:g,getSnapshot:f};return C.queue=T,R0(Nw.bind(null,S,T,c),[c]),S.flags|=2048,wu(9,kw.bind(null,S,T,g,f),void 0,null),g},useId:function(){var c=Ms(),f=Mn.identifierPrefix;if(Qt){var g=Ss,S=ws;g=(S&~(1<<32-Sr(S)-1)).toString(32)+g,f=":"+f+"R"+g,g=Au++,0q0&&(f.flags|=128,S=!0,Eu(C,!1),f.lanes=4194304)}else{if(!S)if(c=ad(T),c!==null){if(f.flags|=128,S=!0,c=c.updateQueue,c!==null&&(f.updateQueue=c,f.flags|=4),Eu(C,!0),C.tail===null&&C.tailMode==="hidden"&&!T.alternate&&!Qt)return ti(f),null}else 2*Nn()-C.renderingStartTime>q0&&g!==1073741824&&(f.flags|=128,S=!0,Eu(C,!1),f.lanes=4194304);C.isBackwards?(T.sibling=f.child,f.child=T):(c=C.last,c!==null?c.sibling=T:f.child=T,C.last=T)}return C.tail!==null?(f=C.tail,C.rendering=f,C.tail=f.sibling,C.renderingStartTime=Nn(),f.sibling=null,c=en.current,kt(en,S?c&1|2:c&1),f):(ti(f),null);case 22:case 23:return iy(),S=f.memoizedState!==null,c!==null&&c.memoizedState!==null!==S&&(f.flags|=8192),S&&f.mode&1?Ni&1073741824&&(ti(f),we&&f.subtreeFlags&6&&(f.flags|=8192)):ti(f),null;case 24:return null;case 25:return null}throw Error(o(156,f.tag))}var lI=a.ReactCurrentOwner,ki=!1;function hi(c,f,g,S){f.child=c===null?Lw(f,null,g,S):Pl(f,c.child,g,S)}function sS(c,f,g,S,C){g=g.render;var T=f.ref;return Cl(f,C),S=P0(c,f,g,S,T,C),g=B0(),c!==null&&!ki?(f.updateQueue=c.updateQueue,f.flags&=-2053,c.lanes&=~C,Cs(c,f,C)):(Qt&&g&&x0(f),f.flags|=1,hi(c,f,S,C),f.child)}function oS(c,f,g,S,C){if(c===null){var T=g.type;return typeof T=="function"&&!sy(T)&&T.defaultProps===void 0&&g.compare===null&&g.defaultProps===void 0?(f.tag=15,f.type=T,aS(c,f,T,S,C)):(c=Nd(g.type,null,S,f,f.mode,C),c.ref=f.ref,c.return=f,f.child=c)}if(T=c.child,!(c.lanes&C)){var O=T.memoizedProps;if(g=g.compare,g=g!==null?g:qh,g(O,S)&&c.ref===f.ref)return Cs(c,f,C)}return f.flags|=1,c=lo(T,S),c.ref=f.ref,c.return=f,f.child=c}function aS(c,f,g,S,C){if(c!==null&&qh(c.memoizedProps,S)&&c.ref===f.ref)if(ki=!1,(c.lanes&C)!==0)c.flags&131072&&(ki=!0);else return f.lanes=c.lanes,Cs(c,f,C);return k0(c,f,g,S,C)}function lS(c,f,g){var S=f.pendingProps,C=S.children,T=c!==null?c.memoizedState:null;if(S.mode==="hidden")if(!(f.mode&1))f.memoizedState={baseLanes:0,cachePool:null},kt(Il,Ni),Ni|=g;else if(g&1073741824)f.memoizedState={baseLanes:0,cachePool:null},S=T!==null?T.baseLanes:g,kt(Il,Ni),Ni|=S;else return c=T!==null?T.baseLanes|g:g,f.lanes=f.childLanes=1073741824,f.memoizedState={baseLanes:c,cachePool:null},f.updateQueue=null,kt(Il,Ni),Ni|=c,null;else T!==null?(S=T.baseLanes|g,f.memoizedState=null):S=g,kt(Il,Ni),Ni|=S;return hi(c,f,C,g),f.child}function cS(c,f){var g=f.ref;(c===null&&g!==null||c!==null&&c.ref!==g)&&(f.flags|=512,f.flags|=2097152)}function k0(c,f,g,S,C){var T=wi(g)?Xr:Sn.current;return T=Sl(f,T),Cl(f,C),g=P0(c,f,g,S,T,C),S=B0(),c!==null&&!ki?(f.updateQueue=c.updateQueue,f.flags&=-2053,c.lanes&=~C,Cs(c,f,C)):(Qt&&S&&x0(f),f.flags|=1,hi(c,f,g,C),f.child)}function uS(c,f,g,S,C){if(wi(g)){var T=!0;Jh(f)}else T=!1;if(Cl(f,C),f.stateNode===null)c!==null&&(c.alternate=null,f.alternate=null,f.flags|=2),Mw(f,g,S),v0(f,g,S,C),S=!0;else if(c===null){var O=f.stateNode,K=f.memoizedProps;O.props=K;var ue=O.context,be=g.contextType;typeof be=="object"&&be!==null?be=qi(be):(be=wi(g)?Xr:Sn.current,be=Sl(f,be));var He=g.getDerivedStateFromProps,ct=typeof He=="function"||typeof O.getSnapshotBeforeUpdate=="function";ct||typeof O.UNSAFE_componentWillReceiveProps!="function"&&typeof O.componentWillReceiveProps!="function"||(K!==S||ue!==be)&&Cw(f,O,S,be),no=!1;var it=f.memoizedState;O.state=it,nd(f,S,O,C),ue=f.memoizedState,K!==S||it!==ue||qn.current||no?(typeof He=="function"&&(y0(f,g,He,S),ue=f.memoizedState),(K=no||Sw(f,g,K,S,it,ue,be))?(ct||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"&&(f.flags|=4194308)):(typeof O.componentDidMount=="function"&&(f.flags|=4194308),f.memoizedProps=S,f.memoizedState=ue),O.props=S,O.state=ue,O.context=be,S=K):(typeof O.componentDidMount=="function"&&(f.flags|=4194308),S=!1)}else{O=f.stateNode,xw(c,f),K=f.memoizedProps,be=f.type===f.elementType?K:Mr(f.type,K),O.props=be,ct=f.pendingProps,it=O.context,ue=g.contextType,typeof ue=="object"&&ue!==null?ue=qi(ue):(ue=wi(g)?Xr:Sn.current,ue=Sl(f,ue));var Ut=g.getDerivedStateFromProps;(He=typeof Ut=="function"||typeof O.getSnapshotBeforeUpdate=="function")||typeof O.UNSAFE_componentWillReceiveProps!="function"&&typeof O.componentWillReceiveProps!="function"||(K!==ct||it!==ue)&&Cw(f,O,S,ue),no=!1,it=f.memoizedState,O.state=it,nd(f,S,O,C);var qe=f.memoizedState;K!==ct||it!==qe||qn.current||no?(typeof Ut=="function"&&(y0(f,g,Ut,S),qe=f.memoizedState),(be=no||Sw(f,g,be,S,it,qe,ue)||!1)?(He||typeof O.UNSAFE_componentWillUpdate!="function"&&typeof O.componentWillUpdate!="function"||(typeof O.componentWillUpdate=="function"&&O.componentWillUpdate(S,qe,ue),typeof O.UNSAFE_componentWillUpdate=="function"&&O.UNSAFE_componentWillUpdate(S,qe,ue)),typeof O.componentDidUpdate=="function"&&(f.flags|=4),typeof O.getSnapshotBeforeUpdate=="function"&&(f.flags|=1024)):(typeof O.componentDidUpdate!="function"||K===c.memoizedProps&&it===c.memoizedState||(f.flags|=4),typeof O.getSnapshotBeforeUpdate!="function"||K===c.memoizedProps&&it===c.memoizedState||(f.flags|=1024),f.memoizedProps=S,f.memoizedState=qe),O.props=S,O.state=qe,O.context=ue,S=be):(typeof O.componentDidUpdate!="function"||K===c.memoizedProps&&it===c.memoizedState||(f.flags|=4),typeof O.getSnapshotBeforeUpdate!="function"||K===c.memoizedProps&&it===c.memoizedState||(f.flags|=1024),S=!1)}return N0(c,f,g,S,T,C)}function N0(c,f,g,S,C,T){cS(c,f);var O=(f.flags&128)!==0;if(!S&&!O)return C&&pw(f,g,!1),Cs(c,f,T);S=f.stateNode,lI.current=f;var K=O&&typeof g.getDerivedStateFromError!="function"?null:S.render();return f.flags|=1,c!==null&&O?(f.child=Pl(f,c.child,null,T),f.child=Pl(f,null,K,T)):hi(c,f,K,T),f.memoizedState=S.state,C&&pw(f,g,!0),f.child}function fS(c){var f=c.stateNode;f.pendingContext?hw(c,f.pendingContext,f.pendingContext!==f.context):f.context&&hw(c,f.context,!1),M0(c,f.containerInfo)}function hS(c,f,g,S,C){return Tl(),S0(C),f.flags|=256,hi(c,f,g,S),f.child}var yd={dehydrated:null,treeContext:null,retryLane:0};function vd(c){return{baseLanes:c,cachePool:null}}function dS(c,f,g){var S=f.pendingProps,C=en.current,T=!1,O=(f.flags&128)!==0,K;if((K=O)||(K=c!==null&&c.memoizedState===null?!1:(C&2)!==0),K?(T=!0,f.flags&=-129):(c===null||c.memoizedState!==null)&&(C|=1),kt(en,C&1),c===null)return w0(f),c=f.memoizedState,c!==null&&(c=c.dehydrated,c!==null)?(f.mode&1?k(c)?f.lanes=8:f.lanes=1073741824:f.lanes=1,null):(C=S.children,c=S.fallback,T?(S=f.mode,T=f.child,C={mode:"hidden",children:C},!(S&1)&&T!==null?(T.childLanes=0,T.pendingProps=C):T=Od(C,S,0,null),c=va(c,S,g,null),T.return=f,c.return=f,T.sibling=c,f.child=T,f.child.memoizedState=vd(g),f.memoizedState=yd,c):O0(f,C));if(C=c.memoizedState,C!==null){if(K=C.dehydrated,K!==null){if(O)return f.flags&256?(f.flags&=-257,xd(c,f,g,Error(o(422)))):f.memoizedState!==null?(f.child=c.child,f.flags|=128,null):(T=S.fallback,C=f.mode,S=Od({mode:"visible",children:S.children},C,0,null),T=va(T,C,g,null),T.flags|=2,S.return=f,T.return=f,S.sibling=T,f.child=S,f.mode&1&&Pl(f,c.child,null,g),f.child.memoizedState=vd(g),f.memoizedState=yd,T);if(!(f.mode&1))f=xd(c,f,g,null);else if(k(K))f=xd(c,f,g,Error(o(419)));else if(S=(g&c.childLanes)!==0,ki||S){if(S=Mn,S!==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}S=T&(S.suspendedLanes|g)?0:T,S!==0&&S!==C.retryLane&&(C.retryLane=S,ir(c,S,-1))}ry(),f=xd(c,f,g,Error(o(421)))}else Vh(K)?(f.flags|=128,f.child=c.child,f=AI.bind(null,c),ie(K,f),f=null):(g=C.treeContext,de&&(Fi=nt(K),Di=f,Qt=!0,Cr=null,mu=!1,g!==null&&($i[er++]=ws,$i[er++]=Ss,$i[er++]=ua,ws=g.id,Ss=g.overflow,ua=f)),f=O0(f,f.pendingProps.children),f.flags|=4096);return f}return T?(S=mS(c,f,S.children,S.fallback,g),T=f.child,C=c.child.memoizedState,T.memoizedState=C===null?vd(g):{baseLanes:C.baseLanes|g,cachePool:null},T.childLanes=c.childLanes&~g,f.memoizedState=yd,S):(g=pS(c,f,S.children,g),f.memoizedState=null,g)}return T?(S=mS(c,f,S.children,S.fallback,g),T=f.child,C=c.child.memoizedState,T.memoizedState=C===null?vd(g):{baseLanes:C.baseLanes|g,cachePool:null},T.childLanes=c.childLanes&~g,f.memoizedState=yd,S):(g=pS(c,f,S.children,g),f.memoizedState=null,g)}function O0(c,f){return f=Od({mode:"visible",children:f},c.mode,0,null),f.return=c,c.child=f}function pS(c,f,g,S){var C=c.child;return c=C.sibling,g=lo(C,{mode:"visible",children:g}),!(f.mode&1)&&(g.lanes=S),g.return=f,g.sibling=null,c!==null&&(S=f.deletions,S===null?(f.deletions=[c],f.flags|=16):S.push(c)),f.child=g}function mS(c,f,g,S,C){var T=f.mode;c=c.child;var O=c.sibling,K={mode:"hidden",children:g};return!(T&1)&&f.child!==c?(g=f.child,g.childLanes=0,g.pendingProps=K,f.deletions=null):(g=lo(c,K),g.subtreeFlags=c.subtreeFlags&14680064),O!==null?S=lo(O,S):(S=va(S,T,C,null),S.flags|=2),S.return=f,g.return=f,g.sibling=S,f.child=g,S}function xd(c,f,g,S){return S!==null&&S0(S),Pl(f,c.child,null,g),c=O0(f,f.pendingProps.children),c.flags|=2,f.memoizedState=null,c}function gS(c,f,g){c.lanes|=f;var S=c.alternate;S!==null&&(S.lanes|=f),m0(c.return,f,g)}function z0(c,f,g,S,C){var T=c.memoizedState;T===null?c.memoizedState={isBackwards:f,rendering:null,renderingStartTime:0,last:S,tail:g,tailMode:C}:(T.isBackwards=f,T.rendering=null,T.renderingStartTime=0,T.last=S,T.tail=g,T.tailMode=C)}function yS(c,f,g){var S=f.pendingProps,C=S.revealOrder,T=S.tail;if(hi(c,f,S.children,g),S=en.current,S&2)S=S&1|2,f.flags|=128;else{if(c!==null&&c.flags&128)e:for(c=f.child;c!==null;){if(c.tag===13)c.memoizedState!==null&&gS(c,g,f);else if(c.tag===19)gS(c,g,f);else if(c.child!==null){c.child.return=c,c=c.child;continue}if(c===f)break e;for(;c.sibling===null;){if(c.return===null||c.return===f)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}S&=1}if(kt(en,S),!(f.mode&1))f.memoizedState=null;else switch(C){case"forwards":for(g=f.child,C=null;g!==null;)c=g.alternate,c!==null&&ad(c)===null&&(C=g),g=g.sibling;g=C,g===null?(C=f.child,f.child=null):(C=g.sibling,g.sibling=null),z0(f,!1,C,g,T);break;case"backwards":for(g=null,C=f.child,f.child=null;C!==null;){if(c=C.alternate,c!==null&&ad(c)===null){f.child=C;break}c=C.sibling,C.sibling=g,g=C,C=c}z0(f,!0,g,null,T);break;case"together":z0(f,!1,null,null,void 0);break;default:f.memoizedState=null}return f.child}function Cs(c,f,g){if(c!==null&&(f.dependencies=c.dependencies),Dl|=f.lanes,!(g&f.childLanes))return null;if(c!==null&&f.child!==c.child)throw Error(o(153));if(f.child!==null){for(c=f.child,g=lo(c,c.pendingProps),f.child=g,g.return=f;c.sibling!==null;)c=c.sibling,g=g.sibling=lo(c,c.pendingProps),g.return=f;g.sibling=null}return f.child}function cI(c,f,g){switch(f.tag){case 3:fS(f),Tl();break;case 5:Iw(f);break;case 1:wi(f.type)&&Jh(f);break;case 4:M0(f,f.stateNode.containerInfo);break;case 10:vw(f,f.type._context,f.memoizedProps.value);break;case 13:var S=f.memoizedState;if(S!==null)return S.dehydrated!==null?(kt(en,en.current&1),f.flags|=128,null):g&f.child.childLanes?dS(c,f,g):(kt(en,en.current&1),c=Cs(c,f,g),c!==null?c.sibling:null);kt(en,en.current&1);break;case 19:if(S=(g&f.childLanes)!==0,c.flags&128){if(S)return yS(c,f,g);f.flags|=128}var C=f.memoizedState;if(C!==null&&(C.rendering=null,C.tail=null,C.lastEffect=null),kt(en,en.current),S)break;return null;case 22:case 23:return f.lanes=0,lS(c,f,g)}return Cs(c,f,g)}function uI(c,f){switch(_0(f),f.tag){case 1:return wi(f.type)&&jh(),c=f.flags,c&65536?(f.flags=c&-65537|128,f):null;case 3:return Rl(),bt(qn),bt(Sn),b0(),c=f.flags,c&65536&&!(c&128)?(f.flags=c&-65537|128,f):null;case 5:return C0(f),null;case 13:if(bt(en),c=f.memoizedState,c!==null&&c.dehydrated!==null){if(f.alternate===null)throw Error(o(340));Tl()}return c=f.flags,c&65536?(f.flags=c&-65537|128,f):null;case 19:return bt(en),null;case 4:return Rl(),null;case 10:return p0(f.type._context),null;case 22:case 23:return iy(),null;case 24:return null;default:return null}}var _d=!1,da=!1,fI=typeof WeakSet=="function"?WeakSet:Set,Fe=null;function Ad(c,f){var g=c.ref;if(g!==null)if(typeof g=="function")try{g(null)}catch(S){Ci(c,f,S)}else g.current=null}function U0(c,f,g){try{g()}catch(S){Ci(c,f,S)}}var vS=!1;function hI(c,f){for(V(c.containerInfo),Fe=f;Fe!==null;)if(c=Fe,f=c.child,(c.subtreeFlags&1028)!==0&&f!==null)f.return=c,Fe=f;else for(;Fe!==null;){c=Fe;try{var g=c.alternate;if(c.flags&1024)switch(c.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var S=g.memoizedProps,C=g.memoizedState,T=c.stateNode,O=T.getSnapshotBeforeUpdate(c.elementType===c.type?S:Mr(c.type,S),C);T.__reactInternalSnapshotBeforeUpdate=O}break;case 3:we&&Le(c.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch(K){Ci(c,c.return,K)}if(f=c.sibling,f!==null){f.return=c.return,Fe=f;break}Fe=c.return}return g=vS,vS=!1,g}function pa(c,f,g){var S=f.updateQueue;if(S=S!==null?S.lastEffect:null,S!==null){var C=S=S.next;do{if((C.tag&c)===c){var T=C.destroy;C.destroy=void 0,T!==void 0&&U0(f,g,T)}C=C.next}while(C!==S)}}function bu(c,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var g=f=f.next;do{if((g.tag&c)===c){var S=g.create;g.destroy=S()}g=g.next}while(g!==f)}}function G0(c){var f=c.ref;if(f!==null){var g=c.stateNode;switch(c.tag){case 5:c=re(g);break;default:c=g}typeof f=="function"?f(c):f.current=c}}function xS(c,f,g){if(Yr&&typeof Yr.onCommitFiberUnmount=="function")try{Yr.onCommitFiberUnmount(Qh,f)}catch{}switch(f.tag){case 0:case 11:case 14:case 15:if(c=f.updateQueue,c!==null&&(c=c.lastEffect,c!==null)){var S=c=c.next;do{var C=S,T=C.destroy;C=C.tag,T!==void 0&&(C&2||C&4)&&U0(f,g,T),S=S.next}while(S!==c)}break;case 1:if(Ad(f,g),c=f.stateNode,typeof c.componentWillUnmount=="function")try{c.props=f.memoizedProps,c.state=f.memoizedState,c.componentWillUnmount()}catch(O){Ci(f,g,O)}break;case 5:Ad(f,g);break;case 4:we?CS(c,f,g):he&&he&&(f=f.stateNode.containerInfo,g=It(f),kn(f,g))}}function _S(c,f,g){for(var S=f;;)if(xS(c,S,g),S.child===null||we&&S.tag===4){if(S===f)break;for(;S.sibling===null;){if(S.return===null||S.return===f)return;S=S.return}S.sibling.return=S.return,S=S.sibling}else S.child.return=S,S=S.child}function AS(c){var f=c.alternate;f!==null&&(c.alternate=null,AS(f)),c.child=null,c.deletions=null,c.sibling=null,c.tag===5&&(f=c.stateNode,f!==null&&Ye(f)),c.stateNode=null,c.return=null,c.dependencies=null,c.memoizedProps=null,c.memoizedState=null,c.pendingProps=null,c.stateNode=null,c.updateQueue=null}function wS(c){return c.tag===5||c.tag===3||c.tag===4}function SS(c){e:for(;;){for(;c.sibling===null;){if(c.return===null||wS(c.return))return null;c=c.return}for(c.sibling.return=c.return,c=c.sibling;c.tag!==5&&c.tag!==6&&c.tag!==18;){if(c.flags&2||c.child===null||c.tag===4)continue e;c.child.return=c,c=c.child}if(!(c.flags&2))return c.stateNode}}function MS(c){if(we){e:{for(var f=c.return;f!==null;){if(wS(f))break e;f=f.return}throw Error(o(160))}var g=f;switch(g.tag){case 5:f=g.stateNode,g.flags&32&&(ve(f),g.flags&=-33),g=SS(c),V0(c,g,f);break;case 3:case 4:f=g.stateNode.containerInfo,g=SS(c),H0(c,g,f);break;default:throw Error(o(161))}}}function H0(c,f,g){var S=c.tag;if(S===5||S===6)c=c.stateNode,f?tt(g,c,f):Oe(g,c);else if(S!==4&&(c=c.child,c!==null))for(H0(c,f,g),c=c.sibling;c!==null;)H0(c,f,g),c=c.sibling}function V0(c,f,g){var S=c.tag;if(S===5||S===6)c=c.stateNode,f?rt(g,c,f):Ke(g,c);else if(S!==4&&(c=c.child,c!==null))for(V0(c,f,g),c=c.sibling;c!==null;)V0(c,f,g),c=c.sibling}function CS(c,f,g){for(var S=f,C=!1,T,O;;){if(!C){C=S.return;e:for(;;){if(C===null)throw Error(o(160));switch(T=C.stateNode,C.tag){case 5:O=!1;break e;case 3:T=T.containerInfo,O=!0;break e;case 4:T=T.containerInfo,O=!0;break e}C=C.return}C=!0}if(S.tag===5||S.tag===6)_S(c,S,g),O?X(T,S.stateNode):Qe(T,S.stateNode);else if(S.tag===18)O?fi(T,S.stateNode):ln(T,S.stateNode);else if(S.tag===4){if(S.child!==null){T=S.stateNode.containerInfo,O=!0,S.child.return=S,S=S.child;continue}}else if(xS(c,S,g),S.child!==null){S.child.return=S,S=S.child;continue}if(S===f)break;for(;S.sibling===null;){if(S.return===null||S.return===f)return;S=S.return,S.tag===4&&(C=!1)}S.sibling.return=S.return,S=S.sibling}}function W0(c,f){if(we){switch(f.tag){case 0:case 11:case 14:case 15:pa(3,f,f.return),bu(3,f),pa(5,f,f.return);return;case 1:return;case 5:var g=f.stateNode;if(g!=null){var S=f.memoizedProps;c=c!==null?c.memoizedProps:S;var C=f.type,T=f.updateQueue;f.updateQueue=null,T!==null&&je(g,T,C,c,S,f)}return;case 6:if(f.stateNode===null)throw Error(o(162));g=f.memoizedProps,ye(f.stateNode,c!==null?c.memoizedProps:g,g);return;case 3:de&&c!==null&&c.memoizedState.isDehydrated&&xt(f.stateNode.containerInfo);return;case 12:return;case 13:wd(f);return;case 19:wd(f);return;case 17:return}throw Error(o(163))}switch(f.tag){case 0:case 11:case 14:case 15:pa(3,f,f.return),bu(3,f),pa(5,f,f.return);return;case 12:return;case 13:wd(f);return;case 19:wd(f);return;case 3:de&&c!==null&&c.memoizedState.isDehydrated&&xt(f.stateNode.containerInfo);break;case 22:case 23:return}e:if(he){switch(f.tag){case 1:case 5:case 6:break e;case 3:case 4:f=f.stateNode,kn(f.containerInfo,f.pendingChildren);break e}throw Error(o(163))}}function wd(c){var f=c.updateQueue;if(f!==null){c.updateQueue=null;var g=c.stateNode;g===null&&(g=c.stateNode=new fI),f.forEach(function(S){var C=wI.bind(null,c,S);g.has(S)||(g.add(S),S.then(C,C))})}}function dI(c,f){for(Fe=f;Fe!==null;){f=Fe;var g=f.deletions;if(g!==null)for(var S=0;S";case Md:return":has("+(X0(c)||"")+")";case Cd:return'[role="'+c.value+'"]';case bd:return'"'+c.value+'"';case Ed:return'[data-testname="'+c.value+'"]';default:throw Error(o(365))}}function BS(c,f){var g=[];c=[c,0];for(var S=0;SC&&(C=O),S&=~T}if(S=C,S=Nn()-S,S=(120>S?120:480>S?480:1080>S?1080:1920>S?1920:3e3>S?3e3:4320>S?4320:1960*mI(S/1960))-S,10c?16:c,so===null)var S=!1;else{if(c=so,so=null,Ld=0,gt&6)throw Error(o(331));var C=gt;for(gt|=4,Fe=c.current;Fe!==null;){var T=Fe,O=T.child;if(Fe.flags&16){var K=T.deletions;if(K!==null){for(var ue=0;ueNn()-Z0?ma(c,0):Q0|=g),Mi(c,f)}function zS(c,f){f===0&&(c.mode&1?(f=Yh,Yh<<=1,!(Yh&130023424)&&(Yh=4194304)):f=1);var g=di();c=Fd(c,f),c!==null&&(pu(c,f,g),Mi(c,g))}function AI(c){var f=c.memoizedState,g=0;f!==null&&(g=f.retryLane),zS(c,g)}function wI(c,f){var g=0;switch(c.tag){case 13:var S=c.stateNode,C=c.memoizedState;C!==null&&(g=C.retryLane);break;case 19:S=c.stateNode;break;default:throw Error(o(314))}S!==null&&S.delete(f),zS(c,g)}var US;US=function(c,f,g){if(c!==null)if(c.memoizedProps!==f.pendingProps||qn.current)ki=!0;else{if(!(c.lanes&g)&&!(f.flags&128))return ki=!1,cI(c,f,g);ki=!!(c.flags&131072)}else ki=!1,Qt&&f.flags&1048576&&Ew(f,sd,f.index);switch(f.lanes=0,f.tag){case 2:var S=f.type;c!==null&&(c.alternate=null,f.alternate=null,f.flags|=2),c=f.pendingProps;var C=Sl(f,Sn.current);Cl(f,g),C=P0(null,f,S,c,C,g);var T=B0();return f.flags|=1,typeof C=="object"&&C!==null&&typeof C.render=="function"&&C.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,wi(S)?(T=!0,Jh(f)):T=!1,f.memoizedState=C.state!==null&&C.state!==void 0?C.state:null,g0(f),C.updater=id,f.stateNode=C,C._reactInternals=f,v0(f,S,c,g),f=N0(null,f,S,!0,T,g)):(f.tag=0,Qt&&T&&x0(f),hi(null,f,C,g),f=f.child),f;case 16:S=f.elementType;e:{switch(c!==null&&(c.alternate=null,f.alternate=null,f.flags|=2),c=f.pendingProps,C=S._init,S=C(S._payload),f.type=S,C=f.tag=MI(S),c=Mr(S,c),C){case 0:f=k0(null,f,S,c,g);break e;case 1:f=uS(null,f,S,c,g);break e;case 11:f=sS(null,f,S,c,g);break e;case 14:f=oS(null,f,S,Mr(S.type,c),g);break e}throw Error(o(306,S,""))}return f;case 0:return S=f.type,C=f.pendingProps,C=f.elementType===S?C:Mr(S,C),k0(c,f,S,C,g);case 1:return S=f.type,C=f.pendingProps,C=f.elementType===S?C:Mr(S,C),uS(c,f,S,C,g);case 3:e:{if(fS(f),c===null)throw Error(o(387));S=f.pendingProps,T=f.memoizedState,C=T.element,xw(c,f),nd(f,S,null,g);var O=f.memoizedState;if(S=O.element,de&&T.isDehydrated)if(T={element:S,isDehydrated:!1,cache:O.cache,transitions:O.transitions},f.updateQueue.baseState=T,f.memoizedState=T,f.flags&256){C=Error(o(423)),f=hS(c,f,S,g,C);break e}else if(S!==C){C=Error(o(424)),f=hS(c,f,S,g,C);break e}else for(de&&(Fi=ge(f.stateNode.containerInfo),Di=f,Qt=!0,Cr=null,mu=!1),g=Lw(f,null,S,g),f.child=g;g;)g.flags=g.flags&-3|4096,g=g.sibling;else{if(Tl(),S===C){f=Cs(c,f,g);break e}hi(c,f,S,g)}f=f.child}return f;case 5:return Iw(f),c===null&&w0(f),S=f.type,C=f.pendingProps,T=c!==null?c.memoizedProps:null,O=C.children,Y(S,C)?O=null:T!==null&&Y(S,T)&&(f.flags|=32),cS(c,f),hi(c,f,O,g),f.child;case 6:return c===null&&w0(f),null;case 13:return dS(c,f,g);case 4:return M0(f,f.stateNode.containerInfo),S=f.pendingProps,c===null?f.child=Pl(f,null,S,g):hi(c,f,S,g),f.child;case 11:return S=f.type,C=f.pendingProps,C=f.elementType===S?C:Mr(S,C),sS(c,f,S,C,g);case 7:return hi(c,f,f.pendingProps,g),f.child;case 8:return hi(c,f,f.pendingProps.children,g),f.child;case 12:return hi(c,f,f.pendingProps.children,g),f.child;case 10:e:{if(S=f.type._context,C=f.pendingProps,T=f.memoizedProps,O=C.value,vw(f,S,O),T!==null)if(Kr(T.value,O)){if(T.children===C.children&&!qn.current){f=Cs(c,f,g);break e}}else for(T=f.child,T!==null&&(T.return=f);T!==null;){var K=T.dependencies;if(K!==null){O=T.child;for(var ue=K.firstContext;ue!==null;){if(ue.context===S){if(T.tag===1){ue=As(-1,g&-g),ue.tag=2;var be=T.updateQueue;if(be!==null){be=be.shared;var He=be.pending;He===null?ue.next=ue:(ue.next=He.next,He.next=ue),be.pending=ue}}T.lanes|=g,ue=T.alternate,ue!==null&&(ue.lanes|=g),m0(T.return,g,f),K.lanes|=g;break}ue=ue.next}}else if(T.tag===10)O=T.type===f.type?null:T.child;else if(T.tag===18){if(O=T.return,O===null)throw Error(o(341));O.lanes|=g,K=O.alternate,K!==null&&(K.lanes|=g),m0(O,g,f),O=T.sibling}else O=T.child;if(O!==null)O.return=T;else for(O=T;O!==null;){if(O===f){O=null;break}if(T=O.sibling,T!==null){T.return=O.return,O=T;break}O=O.return}T=O}hi(c,f,C.children,g),f=f.child}return f;case 9:return C=f.type,S=f.pendingProps.children,Cl(f,g),C=qi(C),S=S(C),f.flags|=1,hi(c,f,S,g),f.child;case 14:return S=f.type,C=Mr(S,f.pendingProps),C=Mr(S.type,C),oS(c,f,S,C,g);case 15:return aS(c,f,f.type,f.pendingProps,g);case 17:return S=f.type,C=f.pendingProps,C=f.elementType===S?C:Mr(S,C),c!==null&&(c.alternate=null,f.alternate=null,f.flags|=2),f.tag=1,wi(S)?(c=!0,Jh(f)):c=!1,Cl(f,g),Mw(f,S,C),v0(f,S,C,g),N0(null,f,S,!0,c,g);case 19:return yS(c,f,g);case 22:return lS(c,f,g)}throw Error(o(156,f.tag))};function GS(c,f){return l0(c,f)}function SI(c,f,g,S){this.tag=c,this.key=g,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=S,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function rr(c,f,g,S){return new SI(c,f,g,S)}function sy(c){return c=c.prototype,!(!c||!c.isReactComponent)}function MI(c){if(typeof c=="function")return sy(c)?1:0;if(c!=null){if(c=c.$$typeof,c===v)return 11;if(c===_)return 14}return 2}function lo(c,f){var g=c.alternate;return g===null?(g=rr(c.tag,f,c.key,c.mode),g.elementType=c.elementType,g.type=c.type,g.stateNode=c.stateNode,g.alternate=c,c.alternate=g):(g.pendingProps=f,g.type=c.type,g.flags=0,g.subtreeFlags=0,g.deletions=null),g.flags=c.flags&14680064,g.childLanes=c.childLanes,g.lanes=c.lanes,g.child=c.child,g.memoizedProps=c.memoizedProps,g.memoizedState=c.memoizedState,g.updateQueue=c.updateQueue,f=c.dependencies,g.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},g.sibling=c.sibling,g.index=c.index,g.ref=c.ref,g}function Nd(c,f,g,S,C,T){var O=2;if(S=c,typeof c=="function")sy(c)&&(O=1);else if(typeof c=="string")O=5;else e:switch(c){case h:return va(g.children,C,T,f);case d:O=8,C|=8;break;case p:return c=rr(12,g,f,C|2),c.elementType=p,c.lanes=T,c;case x:return c=rr(13,g,f,C),c.elementType=x,c.lanes=T,c;case A:return c=rr(19,g,f,C),c.elementType=A,c.lanes=T,c;case M:return Od(g,C,T,f);default:if(typeof c=="object"&&c!==null)switch(c.$$typeof){case m:O=10;break e;case y:O=9;break e;case v:O=11;break e;case _:O=14;break e;case w:O=16,S=null;break e}throw Error(o(130,c==null?c:typeof c,""))}return f=rr(O,g,f,C),f.elementType=c,f.type=S,f.lanes=T,f}function va(c,f,g,S){return c=rr(7,c,S,f),c.lanes=g,c}function Od(c,f,g,S){return c=rr(22,c,S,f),c.elementType=M,c.lanes=g,c.stateNode={},c}function oy(c,f,g){return c=rr(6,c,null,f),c.lanes=g,c}function ay(c,f,g){return f=rr(4,c.children!==null?c.children:[],c.key,f),f.lanes=g,f.stateNode={containerInfo:c.containerInfo,pendingChildren:null,implementation:c.implementation},f}function CI(c,f,g,S,C){this.tag=f,this.containerInfo=c,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=ke,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=o0(0),this.expirationTimes=o0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=o0(0),this.identifierPrefix=S,this.onRecoverableError=C,de&&(this.mutableSourceEagerHydrationData=null)}function HS(c,f,g,S,C,T,O,K,ue){return c=new CI(c,f,g,K,ue),f===1?(f=1,T===!0&&(f|=8)):f=0,T=rr(3,null,null,f),c.current=T,T.stateNode=c,T.memoizedState={element:S,isDehydrated:g,cache:null,transitions:null},g0(T),c}function VS(c){if(!c)return fn;c=c._reactInternals;e:{if(B(c)!==c||c.tag!==1)throw Error(o(170));var f=c;do{switch(f.tag){case 3:f=f.stateNode.context;break e;case 1:if(wi(f.type)){f=f.stateNode.__reactInternalMemoizedMergedChildContext;break e}}f=f.return}while(f!==null);throw Error(o(171))}if(c.tag===1){var g=c.type;if(wi(g))return dw(c,g,f)}return f}function WS(c){var f=c._reactInternals;if(f===void 0)throw typeof c.render=="function"?Error(o(188)):(c=Object.keys(c).join(","),Error(o(268,c)));return c=Z(f),c===null?null:c.stateNode}function jS(c,f){if(c=c.memoizedState,c!==null&&c.dehydrated!==null){var g=c.retryLane;c.retryLane=g!==0&&g=be&&T>=ct&&C<=He&&O<=it){c.splice(f,1);break}else if(S!==be||g.width!==ue.width||itO){if(!(T!==ct||g.height!==ue.height||HeC)){be>S&&(ue.width+=be-S,ue.x=S),HeT&&(ue.height+=ct-T,ue.y=T),itg&&(g=O)),OZ0&&(f.flags|=128,S=!0,Eu(C,!1),f.lanes=4194304)}else{if(!S)if(c=od(T),c!==null){if(f.flags|=128,S=!0,c=c.updateQueue,c!==null&&(f.updateQueue=c,f.flags|=4),Eu(C,!0),C.tail===null&&C.tailMode==="hidden"&&!T.alternate&&!Qt)return ti(f),null}else 2*Nn()-C.renderingStartTime>Z0&&g!==1073741824&&(f.flags|=128,S=!0,Eu(C,!1),f.lanes=4194304);C.isBackwards?(T.sibling=f.child,f.child=T):(c=C.last,c!==null?c.sibling=T:f.child=T,C.last=T)}return C.tail!==null?(f=C.tail,C.rendering=f,C.tail=f.sibling,C.renderingStartTime=Nn(),f.sibling=null,c=en.current,kt(en,S?c&1|2:c&1),f):(ti(f),null);case 22:case 23:return ny(),S=f.memoizedState!==null,c!==null&&c.memoizedState!==null!==S&&(f.flags|=8192),S&&f.mode&1?Ni&1073741824&&(ti(f),we&&f.subtreeFlags&6&&(f.flags|=8192)):ti(f),null;case 24:return null;case 25:return null}throw Error(o(156,f.tag))}var rI=a.ReactCurrentOwner,ki=!1;function hi(c,f,g,S){f.child=c===null?Rw(f,null,g,S):Pl(f,c.child,g,S)}function rS(c,f,g,S,C){g=g.render;var T=f.ref;return Cl(f,C),S=T0(c,f,g,S,T,C),g=P0(),c!==null&&!ki?(f.updateQueue=c.updateQueue,f.flags&=-2053,c.lanes&=~C,Cs(c,f,C)):(Qt&&g&&v0(f),f.flags|=1,hi(c,f,S,C),f.child)}function sS(c,f,g,S,C){if(c===null){var T=g.type;return typeof T=="function"&&!ry(T)&&T.defaultProps===void 0&&g.compare===null&&g.defaultProps===void 0?(f.tag=15,f.type=T,oS(c,f,T,S,C)):(c=kd(g.type,null,S,f,f.mode,C),c.ref=f.ref,c.return=f,f.child=c)}if(T=c.child,!(c.lanes&C)){var O=T.memoizedProps;if(g=g.compare,g=g!==null?g:Zh,g(O,S)&&c.ref===f.ref)return Cs(c,f,C)}return f.flags|=1,c=lo(T,S),c.ref=f.ref,c.return=f,f.child=c}function oS(c,f,g,S,C){if(c!==null&&Zh(c.memoizedProps,S)&&c.ref===f.ref)if(ki=!1,(c.lanes&C)!==0)c.flags&131072&&(ki=!0);else return f.lanes=c.lanes,Cs(c,f,C);return F0(c,f,g,S,C)}function aS(c,f,g){var S=f.pendingProps,C=S.children,T=c!==null?c.memoizedState:null;if(S.mode==="hidden")if(!(f.mode&1))f.memoizedState={baseLanes:0,cachePool:null},kt(Il,Ni),Ni|=g;else if(g&1073741824)f.memoizedState={baseLanes:0,cachePool:null},S=T!==null?T.baseLanes:g,kt(Il,Ni),Ni|=S;else return c=T!==null?T.baseLanes|g:g,f.lanes=f.childLanes=1073741824,f.memoizedState={baseLanes:c,cachePool:null},f.updateQueue=null,kt(Il,Ni),Ni|=c,null;else T!==null?(S=T.baseLanes|g,f.memoizedState=null):S=g,kt(Il,Ni),Ni|=S;return hi(c,f,C,g),f.child}function lS(c,f){var g=f.ref;(c===null&&g!==null||c!==null&&c.ref!==g)&&(f.flags|=512,f.flags|=2097152)}function F0(c,f,g,S,C){var T=wi(g)?Xr:Sn.current;return T=Sl(f,T),Cl(f,C),g=T0(c,f,g,S,T,C),S=P0(),c!==null&&!ki?(f.updateQueue=c.updateQueue,f.flags&=-2053,c.lanes&=~C,Cs(c,f,C)):(Qt&&S&&v0(f),f.flags|=1,hi(c,f,g,C),f.child)}function cS(c,f,g,S,C){if(wi(g)){var T=!0;jh(f)}else T=!1;if(Cl(f,C),f.stateNode===null)c!==null&&(c.alternate=null,f.alternate=null,f.flags|=2),Sw(f,g,S),y0(f,g,S,C),S=!0;else if(c===null){var O=f.stateNode,K=f.memoizedProps;O.props=K;var ue=O.context,be=g.contextType;typeof be=="object"&&be!==null?be=qi(be):(be=wi(g)?Xr:Sn.current,be=Sl(f,be));var He=g.getDerivedStateFromProps,ct=typeof He=="function"||typeof O.getSnapshotBeforeUpdate=="function";ct||typeof O.UNSAFE_componentWillReceiveProps!="function"&&typeof O.componentWillReceiveProps!="function"||(K!==S||ue!==be)&&Mw(f,O,S,be),no=!1;var it=f.memoizedState;O.state=it,td(f,S,O,C),ue=f.memoizedState,K!==S||it!==ue||qn.current||no?(typeof He=="function"&&(g0(f,g,He,S),ue=f.memoizedState),(K=no||ww(f,g,K,S,it,ue,be))?(ct||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"&&(f.flags|=4194308)):(typeof O.componentDidMount=="function"&&(f.flags|=4194308),f.memoizedProps=S,f.memoizedState=ue),O.props=S,O.state=ue,O.context=be,S=K):(typeof O.componentDidMount=="function"&&(f.flags|=4194308),S=!1)}else{O=f.stateNode,vw(c,f),K=f.memoizedProps,be=f.type===f.elementType?K:Mr(f.type,K),O.props=be,ct=f.pendingProps,it=O.context,ue=g.contextType,typeof ue=="object"&&ue!==null?ue=qi(ue):(ue=wi(g)?Xr:Sn.current,ue=Sl(f,ue));var Ut=g.getDerivedStateFromProps;(He=typeof Ut=="function"||typeof O.getSnapshotBeforeUpdate=="function")||typeof O.UNSAFE_componentWillReceiveProps!="function"&&typeof O.componentWillReceiveProps!="function"||(K!==ct||it!==ue)&&Mw(f,O,S,ue),no=!1,it=f.memoizedState,O.state=it,td(f,S,O,C);var qe=f.memoizedState;K!==ct||it!==qe||qn.current||no?(typeof Ut=="function"&&(g0(f,g,Ut,S),qe=f.memoizedState),(be=no||ww(f,g,be,S,it,qe,ue)||!1)?(He||typeof O.UNSAFE_componentWillUpdate!="function"&&typeof O.componentWillUpdate!="function"||(typeof O.componentWillUpdate=="function"&&O.componentWillUpdate(S,qe,ue),typeof O.UNSAFE_componentWillUpdate=="function"&&O.UNSAFE_componentWillUpdate(S,qe,ue)),typeof O.componentDidUpdate=="function"&&(f.flags|=4),typeof O.getSnapshotBeforeUpdate=="function"&&(f.flags|=1024)):(typeof O.componentDidUpdate!="function"||K===c.memoizedProps&&it===c.memoizedState||(f.flags|=4),typeof O.getSnapshotBeforeUpdate!="function"||K===c.memoizedProps&&it===c.memoizedState||(f.flags|=1024),f.memoizedProps=S,f.memoizedState=qe),O.props=S,O.state=qe,O.context=ue,S=be):(typeof O.componentDidUpdate!="function"||K===c.memoizedProps&&it===c.memoizedState||(f.flags|=4),typeof O.getSnapshotBeforeUpdate!="function"||K===c.memoizedProps&&it===c.memoizedState||(f.flags|=1024),S=!1)}return k0(c,f,g,S,T,C)}function k0(c,f,g,S,C,T){lS(c,f);var O=(f.flags&128)!==0;if(!S&&!O)return C&&dw(f,g,!1),Cs(c,f,T);S=f.stateNode,rI.current=f;var K=O&&typeof g.getDerivedStateFromError!="function"?null:S.render();return f.flags|=1,c!==null&&O?(f.child=Pl(f,c.child,null,T),f.child=Pl(f,null,K,T)):hi(c,f,K,T),f.memoizedState=S.state,C&&dw(f,g,!0),f.child}function uS(c){var f=c.stateNode;f.pendingContext?fw(c,f.pendingContext,f.pendingContext!==f.context):f.context&&fw(c,f.context,!1),S0(c,f.containerInfo)}function fS(c,f,g,S,C){return Tl(),w0(C),f.flags|=256,hi(c,f,g,S),f.child}var gd={dehydrated:null,treeContext:null,retryLane:0};function yd(c){return{baseLanes:c,cachePool:null}}function hS(c,f,g){var S=f.pendingProps,C=en.current,T=!1,O=(f.flags&128)!==0,K;if((K=O)||(K=c!==null&&c.memoizedState===null?!1:(C&2)!==0),K?(T=!0,f.flags&=-129):(c===null||c.memoizedState!==null)&&(C|=1),kt(en,C&1),c===null)return A0(f),c=f.memoizedState,c!==null&&(c=c.dehydrated,c!==null)?(f.mode&1?k(c)?f.lanes=8:f.lanes=1073741824:f.lanes=1,null):(C=S.children,c=S.fallback,T?(S=f.mode,T=f.child,C={mode:"hidden",children:C},!(S&1)&&T!==null?(T.childLanes=0,T.pendingProps=C):T=Nd(C,S,0,null),c=va(c,S,g,null),T.return=f,c.return=f,T.sibling=c,f.child=T,f.child.memoizedState=yd(g),f.memoizedState=gd,c):N0(f,C));if(C=c.memoizedState,C!==null){if(K=C.dehydrated,K!==null){if(O)return f.flags&256?(f.flags&=-257,vd(c,f,g,Error(o(422)))):f.memoizedState!==null?(f.child=c.child,f.flags|=128,null):(T=S.fallback,C=f.mode,S=Nd({mode:"visible",children:S.children},C,0,null),T=va(T,C,g,null),T.flags|=2,S.return=f,T.return=f,S.sibling=T,f.child=S,f.mode&1&&Pl(f,c.child,null,g),f.child.memoizedState=yd(g),f.memoizedState=gd,T);if(!(f.mode&1))f=vd(c,f,g,null);else if(k(K))f=vd(c,f,g,Error(o(419)));else if(S=(g&c.childLanes)!==0,ki||S){if(S=Mn,S!==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}S=T&(S.suspendedLanes|g)?0:T,S!==0&&S!==C.retryLane&&(C.retryLane=S,ir(c,S,-1))}iy(),f=vd(c,f,g,Error(o(421)))}else Hh(K)?(f.flags|=128,f.child=c.child,f=yI.bind(null,c),ie(K,f),f=null):(g=C.treeContext,de&&(Fi=nt(K),Di=f,Qt=!0,Cr=null,mu=!1,g!==null&&($i[er++]=ws,$i[er++]=Ss,$i[er++]=ua,ws=g.id,Ss=g.overflow,ua=f)),f=N0(f,f.pendingProps.children),f.flags|=4096);return f}return T?(S=pS(c,f,S.children,S.fallback,g),T=f.child,C=c.child.memoizedState,T.memoizedState=C===null?yd(g):{baseLanes:C.baseLanes|g,cachePool:null},T.childLanes=c.childLanes&~g,f.memoizedState=gd,S):(g=dS(c,f,S.children,g),f.memoizedState=null,g)}return T?(S=pS(c,f,S.children,S.fallback,g),T=f.child,C=c.child.memoizedState,T.memoizedState=C===null?yd(g):{baseLanes:C.baseLanes|g,cachePool:null},T.childLanes=c.childLanes&~g,f.memoizedState=gd,S):(g=dS(c,f,S.children,g),f.memoizedState=null,g)}function N0(c,f){return f=Nd({mode:"visible",children:f},c.mode,0,null),f.return=c,c.child=f}function dS(c,f,g,S){var C=c.child;return c=C.sibling,g=lo(C,{mode:"visible",children:g}),!(f.mode&1)&&(g.lanes=S),g.return=f,g.sibling=null,c!==null&&(S=f.deletions,S===null?(f.deletions=[c],f.flags|=16):S.push(c)),f.child=g}function pS(c,f,g,S,C){var T=f.mode;c=c.child;var O=c.sibling,K={mode:"hidden",children:g};return!(T&1)&&f.child!==c?(g=f.child,g.childLanes=0,g.pendingProps=K,f.deletions=null):(g=lo(c,K),g.subtreeFlags=c.subtreeFlags&14680064),O!==null?S=lo(O,S):(S=va(S,T,C,null),S.flags|=2),S.return=f,g.return=f,g.sibling=S,f.child=g,S}function vd(c,f,g,S){return S!==null&&w0(S),Pl(f,c.child,null,g),c=N0(f,f.pendingProps.children),c.flags|=2,f.memoizedState=null,c}function mS(c,f,g){c.lanes|=f;var S=c.alternate;S!==null&&(S.lanes|=f),p0(c.return,f,g)}function O0(c,f,g,S,C){var T=c.memoizedState;T===null?c.memoizedState={isBackwards:f,rendering:null,renderingStartTime:0,last:S,tail:g,tailMode:C}:(T.isBackwards=f,T.rendering=null,T.renderingStartTime=0,T.last=S,T.tail=g,T.tailMode=C)}function gS(c,f,g){var S=f.pendingProps,C=S.revealOrder,T=S.tail;if(hi(c,f,S.children,g),S=en.current,S&2)S=S&1|2,f.flags|=128;else{if(c!==null&&c.flags&128)e:for(c=f.child;c!==null;){if(c.tag===13)c.memoizedState!==null&&mS(c,g,f);else if(c.tag===19)mS(c,g,f);else if(c.child!==null){c.child.return=c,c=c.child;continue}if(c===f)break e;for(;c.sibling===null;){if(c.return===null||c.return===f)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}S&=1}if(kt(en,S),!(f.mode&1))f.memoizedState=null;else switch(C){case"forwards":for(g=f.child,C=null;g!==null;)c=g.alternate,c!==null&&od(c)===null&&(C=g),g=g.sibling;g=C,g===null?(C=f.child,f.child=null):(C=g.sibling,g.sibling=null),O0(f,!1,C,g,T);break;case"backwards":for(g=null,C=f.child,f.child=null;C!==null;){if(c=C.alternate,c!==null&&od(c)===null){f.child=C;break}c=C.sibling,C.sibling=g,g=C,C=c}O0(f,!0,g,null,T);break;case"together":O0(f,!1,null,null,void 0);break;default:f.memoizedState=null}return f.child}function Cs(c,f,g){if(c!==null&&(f.dependencies=c.dependencies),Dl|=f.lanes,!(g&f.childLanes))return null;if(c!==null&&f.child!==c.child)throw Error(o(153));if(f.child!==null){for(c=f.child,g=lo(c,c.pendingProps),f.child=g,g.return=f;c.sibling!==null;)c=c.sibling,g=g.sibling=lo(c,c.pendingProps),g.return=f;g.sibling=null}return f.child}function sI(c,f,g){switch(f.tag){case 3:uS(f),Tl();break;case 5:Lw(f);break;case 1:wi(f.type)&&jh(f);break;case 4:S0(f,f.stateNode.containerInfo);break;case 10:yw(f,f.type._context,f.memoizedProps.value);break;case 13:var S=f.memoizedState;if(S!==null)return S.dehydrated!==null?(kt(en,en.current&1),f.flags|=128,null):g&f.child.childLanes?hS(c,f,g):(kt(en,en.current&1),c=Cs(c,f,g),c!==null?c.sibling:null);kt(en,en.current&1);break;case 19:if(S=(g&f.childLanes)!==0,c.flags&128){if(S)return gS(c,f,g);f.flags|=128}var C=f.memoizedState;if(C!==null&&(C.rendering=null,C.tail=null,C.lastEffect=null),kt(en,en.current),S)break;return null;case 22:case 23:return f.lanes=0,aS(c,f,g)}return Cs(c,f,g)}function oI(c,f){switch(x0(f),f.tag){case 1:return wi(f.type)&&Wh(),c=f.flags,c&65536?(f.flags=c&-65537|128,f):null;case 3:return Rl(),bt(qn),bt(Sn),E0(),c=f.flags,c&65536&&!(c&128)?(f.flags=c&-65537|128,f):null;case 5:return M0(f),null;case 13:if(bt(en),c=f.memoizedState,c!==null&&c.dehydrated!==null){if(f.alternate===null)throw Error(o(340));Tl()}return c=f.flags,c&65536?(f.flags=c&-65537|128,f):null;case 19:return bt(en),null;case 4:return Rl(),null;case 10:return d0(f.type._context),null;case 22:case 23:return ny(),null;case 24:return null;default:return null}}var xd=!1,da=!1,aI=typeof WeakSet=="function"?WeakSet:Set,Fe=null;function _d(c,f){var g=c.ref;if(g!==null)if(typeof g=="function")try{g(null)}catch(S){Ci(c,f,S)}else g.current=null}function z0(c,f,g){try{g()}catch(S){Ci(c,f,S)}}var yS=!1;function lI(c,f){for(V(c.containerInfo),Fe=f;Fe!==null;)if(c=Fe,f=c.child,(c.subtreeFlags&1028)!==0&&f!==null)f.return=c,Fe=f;else for(;Fe!==null;){c=Fe;try{var g=c.alternate;if(c.flags&1024)switch(c.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var S=g.memoizedProps,C=g.memoizedState,T=c.stateNode,O=T.getSnapshotBeforeUpdate(c.elementType===c.type?S:Mr(c.type,S),C);T.__reactInternalSnapshotBeforeUpdate=O}break;case 3:we&&Le(c.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch(K){Ci(c,c.return,K)}if(f=c.sibling,f!==null){f.return=c.return,Fe=f;break}Fe=c.return}return g=yS,yS=!1,g}function pa(c,f,g){var S=f.updateQueue;if(S=S!==null?S.lastEffect:null,S!==null){var C=S=S.next;do{if((C.tag&c)===c){var T=C.destroy;C.destroy=void 0,T!==void 0&&z0(f,g,T)}C=C.next}while(C!==S)}}function bu(c,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var g=f=f.next;do{if((g.tag&c)===c){var S=g.create;g.destroy=S()}g=g.next}while(g!==f)}}function U0(c){var f=c.ref;if(f!==null){var g=c.stateNode;switch(c.tag){case 5:c=re(g);break;default:c=g}typeof f=="function"?f(c):f.current=c}}function vS(c,f,g){if(Yr&&typeof Yr.onCommitFiberUnmount=="function")try{Yr.onCommitFiberUnmount(Kh,f)}catch{}switch(f.tag){case 0:case 11:case 14:case 15:if(c=f.updateQueue,c!==null&&(c=c.lastEffect,c!==null)){var S=c=c.next;do{var C=S,T=C.destroy;C=C.tag,T!==void 0&&(C&2||C&4)&&z0(f,g,T),S=S.next}while(S!==c)}break;case 1:if(_d(f,g),c=f.stateNode,typeof c.componentWillUnmount=="function")try{c.props=f.memoizedProps,c.state=f.memoizedState,c.componentWillUnmount()}catch(O){Ci(f,g,O)}break;case 5:_d(f,g);break;case 4:we?MS(c,f,g):he&&he&&(f=f.stateNode.containerInfo,g=It(f),kn(f,g))}}function xS(c,f,g){for(var S=f;;)if(vS(c,S,g),S.child===null||we&&S.tag===4){if(S===f)break;for(;S.sibling===null;){if(S.return===null||S.return===f)return;S=S.return}S.sibling.return=S.return,S=S.sibling}else S.child.return=S,S=S.child}function _S(c){var f=c.alternate;f!==null&&(c.alternate=null,_S(f)),c.child=null,c.deletions=null,c.sibling=null,c.tag===5&&(f=c.stateNode,f!==null&&Ye(f)),c.stateNode=null,c.return=null,c.dependencies=null,c.memoizedProps=null,c.memoizedState=null,c.pendingProps=null,c.stateNode=null,c.updateQueue=null}function AS(c){return c.tag===5||c.tag===3||c.tag===4}function wS(c){e:for(;;){for(;c.sibling===null;){if(c.return===null||AS(c.return))return null;c=c.return}for(c.sibling.return=c.return,c=c.sibling;c.tag!==5&&c.tag!==6&&c.tag!==18;){if(c.flags&2||c.child===null||c.tag===4)continue e;c.child.return=c,c=c.child}if(!(c.flags&2))return c.stateNode}}function SS(c){if(we){e:{for(var f=c.return;f!==null;){if(AS(f))break e;f=f.return}throw Error(o(160))}var g=f;switch(g.tag){case 5:f=g.stateNode,g.flags&32&&(ve(f),g.flags&=-33),g=wS(c),H0(c,g,f);break;case 3:case 4:f=g.stateNode.containerInfo,g=wS(c),G0(c,g,f);break;default:throw Error(o(161))}}}function G0(c,f,g){var S=c.tag;if(S===5||S===6)c=c.stateNode,f?tt(g,c,f):Oe(g,c);else if(S!==4&&(c=c.child,c!==null))for(G0(c,f,g),c=c.sibling;c!==null;)G0(c,f,g),c=c.sibling}function H0(c,f,g){var S=c.tag;if(S===5||S===6)c=c.stateNode,f?rt(g,c,f):Ke(g,c);else if(S!==4&&(c=c.child,c!==null))for(H0(c,f,g),c=c.sibling;c!==null;)H0(c,f,g),c=c.sibling}function MS(c,f,g){for(var S=f,C=!1,T,O;;){if(!C){C=S.return;e:for(;;){if(C===null)throw Error(o(160));switch(T=C.stateNode,C.tag){case 5:O=!1;break e;case 3:T=T.containerInfo,O=!0;break e;case 4:T=T.containerInfo,O=!0;break e}C=C.return}C=!0}if(S.tag===5||S.tag===6)xS(c,S,g),O?X(T,S.stateNode):Qe(T,S.stateNode);else if(S.tag===18)O?fi(T,S.stateNode):ln(T,S.stateNode);else if(S.tag===4){if(S.child!==null){T=S.stateNode.containerInfo,O=!0,S.child.return=S,S=S.child;continue}}else if(vS(c,S,g),S.child!==null){S.child.return=S,S=S.child;continue}if(S===f)break;for(;S.sibling===null;){if(S.return===null||S.return===f)return;S=S.return,S.tag===4&&(C=!1)}S.sibling.return=S.return,S=S.sibling}}function V0(c,f){if(we){switch(f.tag){case 0:case 11:case 14:case 15:pa(3,f,f.return),bu(3,f),pa(5,f,f.return);return;case 1:return;case 5:var g=f.stateNode;if(g!=null){var S=f.memoizedProps;c=c!==null?c.memoizedProps:S;var C=f.type,T=f.updateQueue;f.updateQueue=null,T!==null&&je(g,T,C,c,S,f)}return;case 6:if(f.stateNode===null)throw Error(o(162));g=f.memoizedProps,ye(f.stateNode,c!==null?c.memoizedProps:g,g);return;case 3:de&&c!==null&&c.memoizedState.isDehydrated&&xt(f.stateNode.containerInfo);return;case 12:return;case 13:Ad(f);return;case 19:Ad(f);return;case 17:return}throw Error(o(163))}switch(f.tag){case 0:case 11:case 14:case 15:pa(3,f,f.return),bu(3,f),pa(5,f,f.return);return;case 12:return;case 13:Ad(f);return;case 19:Ad(f);return;case 3:de&&c!==null&&c.memoizedState.isDehydrated&&xt(f.stateNode.containerInfo);break;case 22:case 23:return}e:if(he){switch(f.tag){case 1:case 5:case 6:break e;case 3:case 4:f=f.stateNode,kn(f.containerInfo,f.pendingChildren);break e}throw Error(o(163))}}function Ad(c){var f=c.updateQueue;if(f!==null){c.updateQueue=null;var g=c.stateNode;g===null&&(g=c.stateNode=new aI),f.forEach(function(S){var C=vI.bind(null,c,S);g.has(S)||(g.add(S),S.then(C,C))})}}function cI(c,f){for(Fe=f;Fe!==null;){f=Fe;var g=f.deletions;if(g!==null)for(var S=0;S";case Sd:return":has("+(J0(c)||"")+")";case Md:return'[role="'+c.value+'"]';case Ed:return'"'+c.value+'"';case Cd:return'[data-testname="'+c.value+'"]';default:throw Error(o(365))}}function PS(c,f){var g=[];c=[c,0];for(var S=0;SC&&(C=O),S&=~T}if(S=C,S=Nn()-S,S=(120>S?120:480>S?480:1080>S?1080:1920>S?1920:3e3>S?3e3:4320>S?4320:1960*fI(S/1960))-S,10c?16:c,so===null)var S=!1;else{if(c=so,so=null,Rd=0,gt&6)throw Error(o(331));var C=gt;for(gt|=4,Fe=c.current;Fe!==null;){var T=Fe,O=T.child;if(Fe.flags&16){var K=T.deletions;if(K!==null){for(var ue=0;ueNn()-Q0?ma(c,0):K0|=g),Mi(c,f)}function OS(c,f){f===0&&(c.mode&1?(f=Xh,Xh<<=1,!(Xh&130023424)&&(Xh=4194304)):f=1);var g=di();c=Dd(c,f),c!==null&&(pu(c,f,g),Mi(c,g))}function yI(c){var f=c.memoizedState,g=0;f!==null&&(g=f.retryLane),OS(c,g)}function vI(c,f){var g=0;switch(c.tag){case 13:var S=c.stateNode,C=c.memoizedState;C!==null&&(g=C.retryLane);break;case 19:S=c.stateNode;break;default:throw Error(o(314))}S!==null&&S.delete(f),OS(c,g)}var zS;zS=function(c,f,g){if(c!==null)if(c.memoizedProps!==f.pendingProps||qn.current)ki=!0;else{if(!(c.lanes&g)&&!(f.flags&128))return ki=!1,sI(c,f,g);ki=!!(c.flags&131072)}else ki=!1,Qt&&f.flags&1048576&&Cw(f,rd,f.index);switch(f.lanes=0,f.tag){case 2:var S=f.type;c!==null&&(c.alternate=null,f.alternate=null,f.flags|=2),c=f.pendingProps;var C=Sl(f,Sn.current);Cl(f,g),C=T0(null,f,S,c,C,g);var T=P0();return f.flags|=1,typeof C=="object"&&C!==null&&typeof C.render=="function"&&C.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,wi(S)?(T=!0,jh(f)):T=!1,f.memoizedState=C.state!==null&&C.state!==void 0?C.state:null,m0(f),C.updater=nd,f.stateNode=C,C._reactInternals=f,y0(f,S,c,g),f=k0(null,f,S,!0,T,g)):(f.tag=0,Qt&&T&&v0(f),hi(null,f,C,g),f=f.child),f;case 16:S=f.elementType;e:{switch(c!==null&&(c.alternate=null,f.alternate=null,f.flags|=2),c=f.pendingProps,C=S._init,S=C(S._payload),f.type=S,C=f.tag=_I(S),c=Mr(S,c),C){case 0:f=F0(null,f,S,c,g);break e;case 1:f=cS(null,f,S,c,g);break e;case 11:f=rS(null,f,S,c,g);break e;case 14:f=sS(null,f,S,Mr(S.type,c),g);break e}throw Error(o(306,S,""))}return f;case 0:return S=f.type,C=f.pendingProps,C=f.elementType===S?C:Mr(S,C),F0(c,f,S,C,g);case 1:return S=f.type,C=f.pendingProps,C=f.elementType===S?C:Mr(S,C),cS(c,f,S,C,g);case 3:e:{if(uS(f),c===null)throw Error(o(387));S=f.pendingProps,T=f.memoizedState,C=T.element,vw(c,f),td(f,S,null,g);var O=f.memoizedState;if(S=O.element,de&&T.isDehydrated)if(T={element:S,isDehydrated:!1,cache:O.cache,transitions:O.transitions},f.updateQueue.baseState=T,f.memoizedState=T,f.flags&256){C=Error(o(423)),f=fS(c,f,S,g,C);break e}else if(S!==C){C=Error(o(424)),f=fS(c,f,S,g,C);break e}else for(de&&(Fi=ge(f.stateNode.containerInfo),Di=f,Qt=!0,Cr=null,mu=!1),g=Rw(f,null,S,g),f.child=g;g;)g.flags=g.flags&-3|4096,g=g.sibling;else{if(Tl(),S===C){f=Cs(c,f,g);break e}hi(c,f,S,g)}f=f.child}return f;case 5:return Lw(f),c===null&&A0(f),S=f.type,C=f.pendingProps,T=c!==null?c.memoizedProps:null,O=C.children,Y(S,C)?O=null:T!==null&&Y(S,T)&&(f.flags|=32),lS(c,f),hi(c,f,O,g),f.child;case 6:return c===null&&A0(f),null;case 13:return hS(c,f,g);case 4:return S0(f,f.stateNode.containerInfo),S=f.pendingProps,c===null?f.child=Pl(f,null,S,g):hi(c,f,S,g),f.child;case 11:return S=f.type,C=f.pendingProps,C=f.elementType===S?C:Mr(S,C),rS(c,f,S,C,g);case 7:return hi(c,f,f.pendingProps,g),f.child;case 8:return hi(c,f,f.pendingProps.children,g),f.child;case 12:return hi(c,f,f.pendingProps.children,g),f.child;case 10:e:{if(S=f.type._context,C=f.pendingProps,T=f.memoizedProps,O=C.value,yw(f,S,O),T!==null)if(Kr(T.value,O)){if(T.children===C.children&&!qn.current){f=Cs(c,f,g);break e}}else for(T=f.child,T!==null&&(T.return=f);T!==null;){var K=T.dependencies;if(K!==null){O=T.child;for(var ue=K.firstContext;ue!==null;){if(ue.context===S){if(T.tag===1){ue=As(-1,g&-g),ue.tag=2;var be=T.updateQueue;if(be!==null){be=be.shared;var He=be.pending;He===null?ue.next=ue:(ue.next=He.next,He.next=ue),be.pending=ue}}T.lanes|=g,ue=T.alternate,ue!==null&&(ue.lanes|=g),p0(T.return,g,f),K.lanes|=g;break}ue=ue.next}}else if(T.tag===10)O=T.type===f.type?null:T.child;else if(T.tag===18){if(O=T.return,O===null)throw Error(o(341));O.lanes|=g,K=O.alternate,K!==null&&(K.lanes|=g),p0(O,g,f),O=T.sibling}else O=T.child;if(O!==null)O.return=T;else for(O=T;O!==null;){if(O===f){O=null;break}if(T=O.sibling,T!==null){T.return=O.return,O=T;break}O=O.return}T=O}hi(c,f,C.children,g),f=f.child}return f;case 9:return C=f.type,S=f.pendingProps.children,Cl(f,g),C=qi(C),S=S(C),f.flags|=1,hi(c,f,S,g),f.child;case 14:return S=f.type,C=Mr(S,f.pendingProps),C=Mr(S.type,C),sS(c,f,S,C,g);case 15:return oS(c,f,f.type,f.pendingProps,g);case 17:return S=f.type,C=f.pendingProps,C=f.elementType===S?C:Mr(S,C),c!==null&&(c.alternate=null,f.alternate=null,f.flags|=2),f.tag=1,wi(S)?(c=!0,jh(f)):c=!1,Cl(f,g),Sw(f,S,C),y0(f,S,C,g),k0(null,f,S,!0,c,g);case 19:return gS(c,f,g);case 22:return aS(c,f,g)}throw Error(o(156,f.tag))};function US(c,f){return a0(c,f)}function xI(c,f,g,S){this.tag=c,this.key=g,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=S,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function rr(c,f,g,S){return new xI(c,f,g,S)}function ry(c){return c=c.prototype,!(!c||!c.isReactComponent)}function _I(c){if(typeof c=="function")return ry(c)?1:0;if(c!=null){if(c=c.$$typeof,c===v)return 11;if(c===_)return 14}return 2}function lo(c,f){var g=c.alternate;return g===null?(g=rr(c.tag,f,c.key,c.mode),g.elementType=c.elementType,g.type=c.type,g.stateNode=c.stateNode,g.alternate=c,c.alternate=g):(g.pendingProps=f,g.type=c.type,g.flags=0,g.subtreeFlags=0,g.deletions=null),g.flags=c.flags&14680064,g.childLanes=c.childLanes,g.lanes=c.lanes,g.child=c.child,g.memoizedProps=c.memoizedProps,g.memoizedState=c.memoizedState,g.updateQueue=c.updateQueue,f=c.dependencies,g.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},g.sibling=c.sibling,g.index=c.index,g.ref=c.ref,g}function kd(c,f,g,S,C,T){var O=2;if(S=c,typeof c=="function")ry(c)&&(O=1);else if(typeof c=="string")O=5;else e:switch(c){case h:return va(g.children,C,T,f);case d:O=8,C|=8;break;case p:return c=rr(12,g,f,C|2),c.elementType=p,c.lanes=T,c;case x:return c=rr(13,g,f,C),c.elementType=x,c.lanes=T,c;case A:return c=rr(19,g,f,C),c.elementType=A,c.lanes=T,c;case M:return Nd(g,C,T,f);default:if(typeof c=="object"&&c!==null)switch(c.$$typeof){case m:O=10;break e;case y:O=9;break e;case v:O=11;break e;case _:O=14;break e;case w:O=16,S=null;break e}throw Error(o(130,c==null?c:typeof c,""))}return f=rr(O,g,f,C),f.elementType=c,f.type=S,f.lanes=T,f}function va(c,f,g,S){return c=rr(7,c,S,f),c.lanes=g,c}function Nd(c,f,g,S){return c=rr(22,c,S,f),c.elementType=M,c.lanes=g,c.stateNode={},c}function sy(c,f,g){return c=rr(6,c,null,f),c.lanes=g,c}function oy(c,f,g){return f=rr(4,c.children!==null?c.children:[],c.key,f),f.lanes=g,f.stateNode={containerInfo:c.containerInfo,pendingChildren:null,implementation:c.implementation},f}function AI(c,f,g,S,C){this.tag=f,this.containerInfo=c,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=ke,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=s0(0),this.expirationTimes=s0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=s0(0),this.identifierPrefix=S,this.onRecoverableError=C,de&&(this.mutableSourceEagerHydrationData=null)}function GS(c,f,g,S,C,T,O,K,ue){return c=new AI(c,f,g,K,ue),f===1?(f=1,T===!0&&(f|=8)):f=0,T=rr(3,null,null,f),c.current=T,T.stateNode=c,T.memoizedState={element:S,isDehydrated:g,cache:null,transitions:null},m0(T),c}function HS(c){if(!c)return fn;c=c._reactInternals;e:{if(B(c)!==c||c.tag!==1)throw Error(o(170));var f=c;do{switch(f.tag){case 3:f=f.stateNode.context;break e;case 1:if(wi(f.type)){f=f.stateNode.__reactInternalMemoizedMergedChildContext;break e}}f=f.return}while(f!==null);throw Error(o(171))}if(c.tag===1){var g=c.type;if(wi(g))return hw(c,g,f)}return f}function VS(c){var f=c._reactInternals;if(f===void 0)throw typeof c.render=="function"?Error(o(188)):(c=Object.keys(c).join(","),Error(o(268,c)));return c=Z(f),c===null?null:c.stateNode}function WS(c,f){if(c=c.memoizedState,c!==null&&c.dehydrated!==null){var g=c.retryLane;c.retryLane=g!==0&&g=be&&T>=ct&&C<=He&&O<=it){c.splice(f,1);break}else if(S!==be||g.width!==ue.width||itO){if(!(T!==ct||g.height!==ue.height||HeC)){be>S&&(ue.width+=be-S,ue.x=S),HeT&&(ue.height+=ct-T,ue.y=T),itg&&(g=O)),O ")+` No matching component was found for: - `)+c.join(" > ")}return null},t.getPublicRootInstance=function(c){if(c=c.current,!c.child)return null;switch(c.child.tag){case 5:return re(c.child.stateNode);default:return c.child.stateNode}},t.injectIntoDevTools=function(c){if(c={bundleType:c.bundleType,version:c.version,rendererPackageName:c.rendererPackageName,rendererConfig:c.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:a.ReactCurrentDispatcher,findHostInstanceByFiber:EI,findFiberByHostInstance:c.findFiberByHostInstance||bI,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.0.0-fc46dba67-20220329"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")c=!1;else{var f=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(f.isDisabled||!f.supportsFiber)c=!0;else{try{Qh=f.inject(c),Yr=f}catch{}c=!!f.checkDCE}}return c},t.isAlreadyRendering=function(){return!1},t.observeVisibleRects=function(c,f,g,S){if(!vt)throw Error(o(363));c=Y0(c,f);var C=Pe(c,g,S).disconnect;return{disconnect:function(){C()}}},t.registerMutableSourceForHydration=function(c,f){var g=f._getVersion;g=g(f._source),c.mutableSourceEagerHydrationData==null?c.mutableSourceEagerHydrationData=[f,g]:c.mutableSourceEagerHydrationData.push(f,g)},t.runWithPriority=function(c,f){var g=Pt;try{return Pt=c,f()}finally{Pt=g}},t.shouldError=function(){return null},t.shouldSuspend=function(){return!1},t.updateContainer=function(c,f,g,S){var C=f.current,T=di(),O=oo(C);return g=VS(g),f.context===null?f.context=g:f.pendingContext=g,f=As(T,O),f.payload={element:c},S=S===void 0?null:S,S!==null&&(f.callback=S),io(C,f),c=ir(C,O,T),c!==null&&td(c,C,O),O},t};(function(n){n.exports=G9})(N9);const H9=X1(M1);var Zm={},V9={get exports(){return Zm},set exports(n){Zm=n}},LB={};/** + `)+c.join(" > ")}return null},t.getPublicRootInstance=function(c){if(c=c.current,!c.child)return null;switch(c.child.tag){case 5:return re(c.child.stateNode);default:return c.child.stateNode}},t.injectIntoDevTools=function(c){if(c={bundleType:c.bundleType,version:c.version,rendererPackageName:c.rendererPackageName,rendererConfig:c.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:a.ReactCurrentDispatcher,findHostInstanceByFiber:wI,findFiberByHostInstance:c.findFiberByHostInstance||SI,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.0.0-fc46dba67-20220329"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")c=!1;else{var f=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(f.isDisabled||!f.supportsFiber)c=!0;else{try{Kh=f.inject(c),Yr=f}catch{}c=!!f.checkDCE}}return c},t.isAlreadyRendering=function(){return!1},t.observeVisibleRects=function(c,f,g,S){if(!vt)throw Error(o(363));c=X0(c,f);var C=Pe(c,g,S).disconnect;return{disconnect:function(){C()}}},t.registerMutableSourceForHydration=function(c,f){var g=f._getVersion;g=g(f._source),c.mutableSourceEagerHydrationData==null?c.mutableSourceEagerHydrationData=[f,g]:c.mutableSourceEagerHydrationData.push(f,g)},t.runWithPriority=function(c,f){var g=Pt;try{return Pt=c,f()}finally{Pt=g}},t.shouldError=function(){return null},t.shouldSuspend=function(){return!1},t.updateContainer=function(c,f,g,S){var C=f.current,T=di(),O=oo(C);return g=HS(g),f.context===null?f.context=g:f.pendingContext=g,f=As(T,O),f.payload={element:c},S=S===void 0?null:S,S!==null&&(f.callback=S),io(C,f),c=ir(C,O,T),c!==null&&ed(c,C,O),O},t};(function(n){n.exports=N9})(I9);const O9=J1(S1);var Qm={},z9={get exports(){return Qm},set exports(n){Qm=n}},BB={};/** * @license React * scheduler.production.min.js * @@ -3300,7 +3300,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(L,V){var H=L.length;L.push(V);e:for(;0>>1,G=L[$];if(0>>1;$r(Y,H))_er(Ae,Y)?(L[$]=Ae,L[_e]=H,$=_e):(L[$]=Y,L[me]=H,$=me);else if(_er(Ae,H))L[$]=Ae,L[_e]=H,$=_e;else break e}}return V}function r(L,V){var H=L.sortIndex-V.sortIndex;return H!==0?H:L.id-V.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=[],u=[],h=1,d=null,p=3,m=!1,y=!1,v=!1,x=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,_=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(L){for(var V=t(u);V!==null;){if(V.callback===null)i(u);else if(V.startTime<=L)i(u),V.sortIndex=V.expirationTime,e(l,V);else break;V=t(u)}}function M(L){if(v=!1,w(L),!y)if(t(l)!==null)y=!0,re(b);else{var V=t(u);V!==null&&ce(M,V.startTime-L)}}function b(L,V){y=!1,v&&(v=!1,A(E),E=-1),m=!0;var H=p;try{for(w(V),d=t(l);d!==null&&(!(d.expirationTime>V)||L&&!z());){var $=d.callback;if(typeof $=="function"){d.callback=null,p=d.priorityLevel;var G=$(d.expirationTime<=V);V=n.unstable_now(),typeof G=="function"?d.callback=G:d===t(l)&&i(l),w(V)}else i(l);d=t(l)}if(d!==null)var se=!0;else{var me=t(u);me!==null&&ce(M,me.startTime-V),se=!1}return se}finally{d=null,p=H,m=!1}}var P=!1,R=null,E=-1,B=5,I=-1;function z(){return!(n.unstable_now()-IL||125$?(L.sortIndex=H,e(u,L),t(l)===null&&L===t(u)&&(v?(A(E),E=-1):v=!0,ce(M,H-$))):(L.sortIndex=G,e(l,L),y||m||(y=!0,re(b))),L},n.unstable_shouldYield=z,n.unstable_wrapCallback=function(L){var V=p;return function(){var H=p;p=V;try{return L.apply(this,arguments)}finally{p=H}}}})(LB);(function(n){n.exports=LB})(V9);const W9=n=>typeof n=="object"&&typeof n.then=="function",Ya=[];function IB(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;r0&&(s.timeout&&clearTimeout(s.timeout),s.timeout=setTimeout(s.remove,i.lifespan)),s.response;if(!t)throw s.promise}const r={keys:e,equal:i.equal,remove:()=>{const s=Ya.indexOf(r);s!==-1&&Ya.splice(s,1)},promise:(W9(n)?n:n(...e)).then(s=>{r.response=s,i.lifespan&&i.lifespan>0&&(r.timeout=setTimeout(r.remove,i.lifespan))}).catch(s=>r.error=s)};if(Ya.push(r),!t)throw r.promise}const j9=(n,e,t)=>DB(n,e,!1,t),J9=(n,e,t)=>void DB(n,e,!0,t),X9=n=>{if(n===void 0||n.length===0)Ya.splice(0,Ya.length);else{const e=Ya.find(t=>IB(n,t.keys,t.equal));e&&e.remove()}},DA={},Y9=n=>void Object.assign(DA,n);function K9(n,e){function t(h,{args:d=[],attach:p,...m},y){let v=`${h[0].toUpperCase()}${h.slice(1)}`,x;if(h==="primitive"){if(m.object===void 0)throw new Error("R3F: Primitives without 'object' are invalid!");const A=m.object;x=tc(A,{type:h,root:y,attach:p,primitive:!0})}else{const A=DA[v];if(!A)throw new Error(`R3F: ${v} 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!");x=tc(new A(...d),{type:h,root:y,attach:p,memoizedProps:{args:d}})}return x.__r3f.attach===void 0&&(x instanceof ft?x.__r3f.attach="geometry":x instanceof Pn&&(x.__r3f.attach="material")),v!=="inject"&&vv(x,m),x}function i(h,d){let p=!1;if(d){var m,y;(m=d.__r3f)!=null&&m.attach?yv(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||tc(d,{}),d.__r3f.parent=h,E1(d),nc(d)}}function r(h,d,p){let m=!1;if(d){var y,v;if((y=d.__r3f)!=null&&y.attach)yv(h,d,d.__r3f.attach);else if(d.isObject3D&&h.isObject3D){d.parent=h,d.dispatchEvent({type:"added"});const x=h.children.filter(_=>_!==d),A=x.indexOf(p);h.children=[...x.slice(0,A),d,...x.slice(A)],m=!0}m||(v=h.__r3f)==null||v.objects.push(d),d.__r3f||tc(d,{}),d.__r3f.parent=h,E1(d),nc(d)}}function s(h,d,p=!1){h&&[...h].forEach(m=>o(d,m,p))}function o(h,d,p){if(d){var m,y,v;if(d.__r3f&&(d.__r3f.parent=null),(m=h.__r3f)!=null&&m.objects&&(h.__r3f.objects=h.__r3f.objects.filter(M=>M!==d)),(y=d.__r3f)!=null&&y.attach)DE(h,d,d.__r3f.attach);else if(d.isObject3D&&h.isObject3D){var x;h.remove(d),(x=d.__r3f)!=null&&x.root&&rH(d.__r3f.root,d)}const _=(v=d.__r3f)==null?void 0:v.primitive,w=!_&&(p===void 0?d.dispose!==null:p);if(!_){var A;s((A=d.__r3f)==null?void 0:A.objects,d,w),s(d.children,d,w)}delete d.__r3f,w&&d.dispose&&d.type!=="Scene"&&Zm.unstable_scheduleCallback(Zm.unstable_IdlePriority,()=>{try{d.dispose()}catch{}}),nc(h)}}function a(h,d,p,m){var y;const v=(y=h.__r3f)==null?void 0:y.parent;if(!v)return;const x=t(d,p,h.__r3f.root);if(h.children){for(const A of h.children)A.__r3f&&i(x,A);h.children=h.children.filter(A=>!A.__r3f)}h.__r3f.objects.forEach(A=>i(x,A)),h.__r3f.objects=[],h.__r3f.autoRemovedBeforeAppend||o(v,h),x.parent&&(x.__r3f.autoRemovedBeforeAppend=!0),i(v,x),x.raycast&&x.__r3f.eventCount&&x.__r3f.root.getState().internal.interaction.push(x),[m,m.alternate].forEach(A=>{A!==null&&(A.stateNode=x,A.ref&&(typeof A.ref=="function"?A.ref(x):A.ref.current=x))})}const l=()=>console.warn("Text is not allowed in the R3F tree! This could be stray whitespace or characters.");return{reconciler:H9({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 m=h.getState().scene;m.__r3f&&r(m,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,m){var y;if(((y=h==null?void 0:h.__r3f)!=null?y:{}).primitive&&m.object&&m.object!==h)return[!0];{const{args:x=[],children:A,..._}=m,{args:w=[],children:M,...b}=p;if(!Array.isArray(x))throw new Error("R3F: the args prop must be an array!");if(x.some((R,E)=>R!==w[E]))return[!0];const P=GB(h,_,b,!0);return P.changes.length?[!1,P]:null}},commitUpdate(h,[d,p],m,y,v,x){d?a(h,m,v,x):vv(h,p)},commitMount(h,d,p,m){var y;const v=(y=h.__r3f)!=null?y:{};h.raycast&&v.handlers&&v.eventCount&&h.__r3f.root.getState().internal.interaction.push(h)},getPublicInstance:h=>h,prepareForCommit:()=>null,preparePortalMount:h=>tc(h.getState().scene),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance(h){var d;const{attach:p,parent:m}=(d=h.__r3f)!=null?d:{};p&&m&&DE(m,h,p),h.isObject3D&&(h.visible=!1),nc(h)},unhideInstance(h,d){var p;const{attach:m,parent:y}=(p=h.__r3f)!=null?p:{};m&&y&&yv(y,h,m),(h.isObject3D&&d.visible==null||d.visible)&&(h.visible=!0),nc(h)},createTextInstance:l,hideTextInstance:l,unhideTextInstance:l,getCurrentEventPriority:()=>e?e():Ro.DefaultEventPriority,beforeActiveInstanceBlur:()=>{},afterActiveInstanceBlur:()=>{},detachDeletedInstance:()=>{},now:typeof performance<"u"&&jt.fun(performance.now)?performance.now:jt.fun(Date.now)?Date.now:()=>0,scheduleTimeout:jt.fun(setTimeout)?setTimeout:void 0,cancelTimeout:jt.fun(clearTimeout)?clearTimeout:void 0}),applyProps:vv}}var BE,RE;const gv=n=>"colorSpace"in n||"outputColorSpace"in n,FB=()=>{var n;return(n=DA.ColorManagement)!=null?n:null},kB=n=>n&&n.isOrthographicCamera,Q9=n=>n&&n.hasOwnProperty("current"),kh=typeof window<"u"&&((BE=window.document)!=null&&BE.createElement||((RE=window.navigator)==null?void 0:RE.product)==="ReactNative")?U.useLayoutEffect:U.useEffect;function NB(n){const e=U.useRef(n);return kh(()=>void(e.current=n),[n]),e}function Z9({set:n}){return kh(()=>(n(new Promise(()=>null)),()=>n(!1)),[n]),null}class OB extends U.Component{constructor(...e){super(...e),this.state={error:!1}}componentDidCatch(e){this.props.set(e)}render(){return this.state.error?null:this.props.children}}OB.getDerivedStateFromError=()=>({error:!0});const zB="__default",LE=new Map,q9=n=>n&&!!n.memoized&&!!n.changes;function UB(n){var e;const t=typeof window<"u"?(e=window.devicePixelRatio)!=null?e:2:1;return Array.isArray(n)?Math.min(Math.max(n[0],t),n[1]):n}const qu=n=>{var e;return(e=n.__r3f)==null?void 0:e.root.getState()},jt={obj:n=>n===Object(n)&&!jt.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(jt.str(n)||jt.num(n))return n===e;const s=jt.obj(n);if(s&&i==="reference")return n===e;const o=jt.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;if(s&&t==="shallow"&&i==="shallow"){for(a in r?e:n)if(!jt.equ(n[a],e[a],{strict:r,objects:"reference"}))return!1}else for(a in r?e:n)if(n[a]!==e[a])return!1;if(jt.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 $9(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 eH(n){n.dispose&&n.type!=="Scene"&&n.dispose();for(const e in n)e.dispose==null||e.dispose(),delete n[e]}function tc(n,e){const t=n;return t.__r3f={type:"",root:null,previousAttach:null,memoizedProps:{},eventCount:0,handlers:{},objects:[],parent:null,...e},n}function C1(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 IE=/-\d+$/;function yv(n,e,t){if(jt.str(t)){if(IE.test(t)){const s=t.replace(IE,""),{target:o,key:a}=C1(n,s);Array.isArray(o[a])||(o[a]=[])}const{target:i,key:r}=C1(n,t);e.__r3f.previousAttach=i[r],i[r]=e}else e.__r3f.previousAttach=t(n,e)}function DE(n,e,t){var i,r;if(jt.str(t)){const{target:s,key:o}=C1(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 GB(n,{children:e,key:t,ref:i,...r},{children:s,key:o,ref:a,...l}={},u=!1){var h;const d=(h=n==null?void 0:n.__r3f)!=null?h:{},p=Object.entries(r),m=[];if(u){const v=Object.keys(l);for(let x=0;x{var A;if((A=n.__r3f)!=null&&A.primitive&&v==="object"||jt.equ(x,l[v]))return;if(/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/.test(v))return m.push([v,x,!0,[]]);let _=[];v.includes("-")&&(_=v.split("-")),m.push([v,x,!1,_]);for(const w in r){const M=r[w];w.startsWith(`${v}-`)&&m.push([w,M,!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:m}}const tH=typeof process<"u"&&!1;function vv(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:u}=q9(e)?e:GB(n,e),h=s.eventCount;n.__r3f&&(n.__r3f.memoizedProps=l);for(let p=0;pw[M],n),!(_&&_.set))){const[w,...M]=x.reverse();A=M.reverse().reduce((b,P)=>b[P],n),m=w}if(y===zB+"remove")if(A.constructor){let w=LE.get(A.constructor);w||(w=new A.constructor,LE.set(A.constructor,w)),y=w[m]}else y=0;if(v)y?s.handlers[m]=y:delete s.handlers[m],s.eventCount=Object.keys(s.handlers).length;else if(_&&_.set&&(_.copy||_ instanceof nl)){if(Array.isArray(y))_.fromArray?_.fromArray(y):_.set(...y);else if(_.copy&&y&&y.constructor&&(tH?_.constructor.name===y.constructor.name:_.constructor===y.constructor))_.copy(y);else if(y!==void 0){const w=_ instanceof De;!w&&_.setScalar?_.setScalar(y):_ instanceof nl&&y instanceof nl?_.mask=y.mask:_.set(y),!FB()&&!a.linear&&w&&_.convertSRGBToLinear()}}else if(A[m]=y,A[m]instanceof $t&&A[m].format===bi&&A[m].type===Zs){const w=A[m];gv(w)&&gv(a.gl)?w.colorSpace=a.gl.outputColorSpace:w.encoding=a.gl.outputEncoding}nc(n)}if(s.parent&&a.internal&&n.raycast&&h!==s.eventCount){const p=a.internal.interaction.indexOf(n);p>-1&&a.internal.interaction.splice(p,1),s.eventCount&&a.internal.interaction.push(n)}return!(u.length===1&&u[0][0]==="onUpdate")&&u.length&&(r=n.__r3f)!=null&&r.parent&&E1(n),n}function nc(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 E1(n){n.onUpdate==null||n.onUpdate(n)}function nH(n,e){n.manual||(kB(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 Gp(n){return(n.eventObject||n.object).uuid+"/"+n.index+n.instanceId}function iH(){var n;const e=typeof self<"u"&&self||typeof window<"u"&&window;if(!e)return Ro.DefaultEventPriority;switch((n=e.event)==null?void 0:n.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return Ro.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return Ro.ContinuousEventPriority;default:return Ro.DefaultEventPriority}}function HB(n,e,t,i){const r=t.get(e);r&&(t.delete(e),t.size===0&&(n.delete(i),r.target.releasePointerCapture(i)))}function rH(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)=>{HB(t.capturedMap,e,i,r)})}function sH(n){function e(l){const{internal:u}=n.getState(),h=l.offsetX-u.initialClick[0],d=l.offsetY-u.initialClick[1];return Math.round(Math.sqrt(h*h+d*d))}function t(l){return l.filter(u=>["Move","Over","Enter","Out","Leave"].some(h=>{var d;return(d=u.__r3f)==null?void 0:d.handlers["onPointer"+h]}))}function i(l,u){const h=n.getState(),d=new Set,p=[],m=u?u(h.internal.interaction):h.internal.interaction;for(let A=0;A{const w=qu(A.object),M=qu(_.object);return!w||!M?A.distance-_.distance:M.events.priority-w.events.priority||A.distance-_.distance}).filter(A=>{const _=Gp(A);return d.has(_)?!1:(d.add(_),!0)});h.events.filter&&(v=h.events.filter(v,h));for(const A of v){let _=A.object;for(;_;){var x;(x=_.__r3f)!=null&&x.eventCount&&p.push({...A,eventObject:_}),_=_.parent}}if("pointerId"in l&&h.internal.capturedMap.has(l.pointerId))for(let A of h.internal.capturedMap.get(l.pointerId).values())d.has(Gp(A.intersection))||p.push(A.intersection);return p}function r(l,u,h,d){const p=n.getState();if(l.length){const m={stopped:!1};for(const y of l){const v=qu(y.object)||p,{raycaster:x,pointer:A,camera:_,internal:w}=v,M=new F(A.x,A.y,0).unproject(_),b=I=>{var z,Z;return(z=(Z=w.capturedMap.get(I))==null?void 0:Z.has(y.eventObject))!=null?z:!1},P=I=>{const z={intersection:y,target:u.target};w.capturedMap.has(I)?w.capturedMap.get(I).set(y.eventObject,z):w.capturedMap.set(I,new Map([[y.eventObject,z]])),u.target.setPointerCapture(I)},R=I=>{const z=w.capturedMap.get(I);z&&HB(w.capturedMap,y.eventObject,z,I)};let E={};for(let I in u){let z=u[I];typeof z!="function"&&(E[I]=z)}let B={...y,...E,pointer:A,intersections:l,stopped:m.stopped,delta:h,unprojectedPoint:M,ray:x.ray,camera:_,stopPropagation(){const I="pointerId"in u&&w.capturedMap.get(u.pointerId);if((!I||I.has(y.eventObject))&&(B.stopped=m.stopped=!0,w.hovered.size&&Array.from(w.hovered.values()).find(z=>z.eventObject===y.eventObject))){const z=l.slice(0,l.indexOf(y));s([...z,y])}},target:{hasPointerCapture:b,setPointerCapture:P,releasePointerCapture:R},currentTarget:{hasPointerCapture:b,setPointerCapture:P,releasePointerCapture:R},nativeEvent:u};if(d(B),m.stopped===!0)break}}return l}function s(l){const{internal:u}=n.getState();for(const h of u.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,m=p==null?void 0:p.handlers;if(u.hovered.delete(Gp(h)),p!=null&&p.eventCount){const y={...h,intersections:l};m.onPointerOut==null||m.onPointerOut(y),m.onPointerLeave==null||m.onPointerLeave(y)}}}function o(l,u){for(let h=0;hs([]);case"onLostPointerCapture":return u=>{const{internal:h}=n.getState();"pointerId"in u&&h.capturedMap.has(u.pointerId)&&requestAnimationFrame(()=>{h.capturedMap.has(u.pointerId)&&(h.capturedMap.delete(u.pointerId),s([]))})}}return function(h){const{onPointerMissed:d,internal:p}=n.getState();p.lastEvent.current=h;const m=l==="onPointerMove",y=l==="onClick"||l==="onContextMenu"||l==="onDoubleClick",x=i(h,m?t:void 0),A=y?e(h):0;l==="onPointerDown"&&(p.initialClick=[h.offsetX,h.offsetY],p.initialHits=x.map(w=>w.eventObject)),y&&!x.length&&A<=2&&(o(h,p.interaction),d&&d(h)),m&&s(x);function _(w){const M=w.eventObject,b=M.__r3f,P=b==null?void 0:b.handlers;if(b!=null&&b.eventCount)if(m){if(P.onPointerOver||P.onPointerEnter||P.onPointerOut||P.onPointerLeave){const R=Gp(w),E=p.hovered.get(R);E?E.stopped&&w.stopPropagation():(p.hovered.set(R,w),P.onPointerOver==null||P.onPointerOver(w),P.onPointerEnter==null||P.onPointerEnter(w))}P.onPointerMove==null||P.onPointerMove(w)}else{const R=P[l];R?(!y||p.initialHits.includes(M))&&(o(h,p.interaction.filter(E=>!p.initialHits.includes(E))),R(w)):y&&p.initialHits.includes(M)&&o(h,p.interaction.filter(E=>!p.initialHits.includes(E)))}}r(x,h,A,_)}}return{handlePointer:a}}const VB=n=>!!(n!=null&&n.render),WB=U.createContext(null),oH=(n,e)=>{const t=RB((a,l)=>{const u=new F,h=new F,d=new F;function p(A=l().camera,_=h,w=l().size){const{width:M,height:b,top:P,left:R}=w,E=M/b;_ instanceof F?d.copy(_):d.set(..._);const B=A.getWorldPosition(u).distanceTo(d);if(kB(A))return{width:M/A.zoom,height:b/A.zoom,top:P,left:R,factor:1,distance:B,aspect:E};{const I=A.fov*Math.PI/180,z=2*Math.tan(I/2)*B,Z=z*(M/b);return{width:Z,height:z,top:P,left:R,factor:M/Z,distance:B,aspect:E}}}let m;const y=A=>a(_=>({performance:{..._.performance,current:A}})),v=new pe;return{set:a,get:l,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},xr:null,scene:null,invalidate:(A=1)=>n(l(),A),advance:(A,_)=>e(A,_,l()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new BA,pointer:v,mouse:v,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{const A=l();m&&clearTimeout(m),A.performance.current!==A.performance.min&&y(A.performance.min),m=setTimeout(()=>y(l().performance.max),A.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:A=>a(_=>({..._,events:{..._.events,...A}})),setSize:(A,_,w,M,b)=>{const P=l().camera,R={width:A,height:_,top:M||0,left:b||0,updateStyle:w};a(E=>({size:R,viewport:{...E.viewport,...p(P,h,R)}}))},setDpr:A=>a(_=>{const w=UB(A);return{viewport:{..._.viewport,dpr:w,initialDpr:_.viewport.initialDpr||w}}}),setFrameloop:(A="always")=>{const _=l().clock;_.stop(),_.elapsedTime=0,A!=="never"&&(_.start(),_.elapsedTime=0),a(()=>({frameloop:A}))},previousRoot:void 0,internal:{active:!1,priority:0,frames:0,lastEvent:U.createRef(),interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,subscribe:(A,_,w)=>{const M=l().internal;return M.priority=M.priority+(_>0?1:0),M.subscribers.push({ref:A,priority:_,store:w}),M.subscribers=M.subscribers.sort((b,P)=>b.priority-P.priority),()=>{const b=l().internal;b!=null&&b.subscribers&&(b.priority=b.priority-(_>0?1:0),b.subscribers=b.subscribers.filter(P=>P.ref!==A))}}}}}),i=t.getState();let r=i.size,s=i.viewport.dpr,o=i.camera;return t.subscribe(()=>{const{camera:a,size:l,viewport:u,gl:h,set:d}=t.getState();if(l.width!==r.width||l.height!==r.height||u.dpr!==s){var p;r=l,s=u.dpr,nH(a,l),h.setPixelRatio(u.dpr);const m=(p=l.updateStyle)!=null?p:typeof HTMLCanvasElement<"u"&&h.domElement instanceof HTMLCanvasElement;h.setSize(l.width,l.height,m)}a!==o&&(o=a,d(m=>({viewport:{...m.viewport,...m.viewport.getCurrentViewport(a)}})))}),t.subscribe(a=>n(a)),t};let Hp,aH=new Set,lH=new Set,cH=new Set;function xv(n,e){if(n.size)for(const{callback:t}of n.values())t(e)}function $u(n,e){switch(n){case"before":return xv(aH,e);case"after":return xv(lH,e);case"tail":return xv(cH,e)}}let _v,Av;function wv(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),_v=e.internal.subscribers,Hp=0;Hp<_v.length;Hp++)Av=_v[Hp],Av.ref.current(Av.store.getState(),i,t);return!e.internal.priority&&e.gl.render&&e.gl.render(e.scene,e.camera),e.internal.frames=Math.max(0,e.internal.frames-1),e.frameloop==="always"?1:e.internal.frames}function uH(n){let e=!1,t,i,r;function s(l){i=requestAnimationFrame(s),e=!0,t=0,$u("before",l);for(const h of n.values()){var u;r=h.store.getState(),r.internal.active&&(r.frameloop==="always"||r.internal.frames>0)&&!((u=r.gl.xr)!=null&&u.isPresenting)&&(t+=wv(l,r))}if($u("after",l),t===0)return $u("tail",l),e=!1,cancelAnimationFrame(i)}function o(l,u=1){var h;if(!l)return n.forEach(d=>o(d.store.getState()),u);(h=l.gl.xr)!=null&&h.isPresenting||!l.internal.active||l.frameloop==="never"||(l.internal.frames=Math.min(60,l.internal.frames+u),e||(e=!0,requestAnimationFrame(s)))}function a(l,u=!0,h,d){if(u&&$u("before",l),h)wv(l,h,d);else for(const p of n.values())wv(l,p.store.getState());u&&$u("after",l)}return{loop:s,invalidate:o,advance:a}}function jB(){const n=U.useContext(WB);if(!n)throw new Error("R3F: Hooks can only be used within the Canvas component!");return n}function Gi(n=t=>t,e){return jB()(n,e)}function fu(n,e=0){const t=jB(),i=t.getState().internal.subscribe,r=NB(n);return kh(()=>i(r,e,t),[e,i,t]),null}const FE=new WeakMap;function JB(n,e){return function(t,...i){let r=FE.get(t);return r||(r=new t,FE.set(t,r)),n&&n(r),Promise.all(i.map(s=>new Promise((o,a)=>r.load(s,l=>{l.scene&&Object.assign(l,$9(l.scene)),o(l)},e,l=>a(new Error(`Could not load ${s}: ${l==null?void 0:l.message}`)))))).finally(()=>r.dispose==null?void 0:r.dispose())}}function la(n,e,t,i){const r=Array.isArray(e)?e:[e],s=j9(JB(t,i),[n,...r],{equal:jt.equ});return Array.isArray(e)?s:s[0]}la.preload=function(n,e,t){const i=Array.isArray(e)?e:[e];return J9(JB(t),[n,...i])};la.clear=function(n,e){const t=Array.isArray(e)?e:[e];return X9([n,...t])};const Qc=new Map,{invalidate:kE,advance:NE}=uH(Qc),{reconciler:qm,applyProps:ss}=K9(Qc,iH),ec={objects:"shallow",strict:!1},fH=(n,e)=>{const t=typeof n=="function"?n(e):n;return VB(t)?t:new Ng({powerPreference:"high-performance",canvas:e,antialias:!0,alpha:!0,...n})};function hH(n,e){const t=typeof HTMLCanvasElement<"u"&&n instanceof HTMLCanvasElement;if(e){const{width:i,height:r,top:s,left:o,updateStyle:a=t}=e;return{width:i,height:r,top:s,left:o,updateStyle:a}}else if(typeof HTMLCanvasElement<"u"&&n instanceof HTMLCanvasElement&&n.parentElement){const{width:i,height:r,top:s,left:o}=n.parentElement.getBoundingClientRect();return{width:i,height:r,top:s,left:o,updateStyle:t}}else if(typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas)return{width:n.width,height:n.height,top:0,left:0,updateStyle:t};return{width:0,height:0,top:0,left:0}}function dH(n){const e=Qc.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||oH(kE,NE),o=t||qm.createContainer(s,Ro.ConcurrentRoot,null,!1,null,"",r,null);e||Qc.set(n,{fiber:o,store:s});let a,l=!1,u;return{configure(h={}){let{gl:d,size:p,scene:m,events:y,onCreated:v,shadows:x=!1,linear:A=!1,flat:_=!1,legacy:w=!1,orthographic:M=!1,frameloop:b="always",dpr:P=[1,2],performance:R,raycaster:E,camera:B,onPointerMissed:I}=h,z=s.getState(),Z=z.gl;z.gl||z.set({gl:Z=fH(d,n)});let J=z.raycaster;J||z.set({raycaster:J=new PB});const{params:W,...Q}=E||{};if(jt.equ(Q,J,ec)||ss(J,{...Q}),jt.equ(W,J.params,ec)||ss(J,{params:{...J.params,...W}}),!z.camera||z.camera===u&&!jt.equ(u,B,ec)){u=B;const G=B instanceof yh,se=G?B:M?new mr(0,0,0,0,.1,1e3):new Jt(75,0,.1,1e3);G||(se.position.z=5,B&&ss(se,B),!z.camera&&!(B!=null&&B.rotation)&&se.lookAt(0,0,0)),z.set({camera:se}),J.camera=se}if(!z.scene){let G;m instanceof Km?G=m:(G=new Km,m&&ss(G,m)),z.set({scene:tc(G)})}if(!z.xr){var re;const G=(Y,_e)=>{const Ae=s.getState();Ae.frameloop!=="never"&&NE(Y,!0,Ae,_e)},se=()=>{const Y=s.getState();Y.gl.xr.enabled=Y.gl.xr.isPresenting,Y.gl.xr.setAnimationLoop(Y.gl.xr.isPresenting?G:null),Y.gl.xr.isPresenting||kE(Y)},me={connect(){const Y=s.getState().gl;Y.xr.addEventListener("sessionstart",se),Y.xr.addEventListener("sessionend",se)},disconnect(){const Y=s.getState().gl;Y.xr.removeEventListener("sessionstart",se),Y.xr.removeEventListener("sessionend",se)}};typeof((re=Z.xr)==null?void 0:re.addEventListener)=="function"&&me.connect(),z.set({xr:me})}if(Z.shadowMap){const G=Z.shadowMap.enabled,se=Z.shadowMap.type;if(Z.shadowMap.enabled=!!x,jt.boo(x))Z.shadowMap.type=Af;else if(jt.str(x)){var ce;const me={basic:z3,percentage:Bg,soft:Af,variance:Va};Z.shadowMap.type=(ce=me[x])!=null?ce:Af}else jt.obj(x)&&Object.assign(Z.shadowMap,x);(G!==Z.shadowMap.enabled||se!==Z.shadowMap.type)&&(Z.shadowMap.needsUpdate=!0)}const L=FB();L&&("enabled"in L?L.enabled=!w:"legacyMode"in L&&(L.legacyMode=w)),ss(Z,{outputEncoding:A?3e3:3001,toneMapping:_?zr:J_}),z.legacy!==w&&z.set(()=>({legacy:w})),z.linear!==A&&z.set(()=>({linear:A})),z.flat!==_&&z.set(()=>({flat:_})),d&&!jt.fun(d)&&!VB(d)&&!jt.equ(d,Z,ec)&&ss(Z,d),y&&!z.events.handlers&&z.set({events:y(s)});const $=hH(n,p);return jt.equ($,z.size,ec)||z.setSize($.width,$.height,$.updateStyle,$.top,$.left),P&&z.viewport.dpr!==UB(P)&&z.setDpr(P),z.frameloop!==b&&z.setFrameloop(b),z.onPointerMissed||z.set({onPointerMissed:I}),R&&!jt.equ(R,z.performance,ec)&&z.set(G=>({performance:{...G.performance,...R}})),a=v,l=!0,this},render(h){return l||this.configure(),qm.updateContainer(U.createElement(pH,{store:s,children:h,onCreated:a,rootElement:n}),o,null,()=>{}),s},unmount(){XB(n)}}}function pH({store:n,children:e,onCreated:t,rootElement:i}){return kh(()=>{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)},[]),U.createElement(WB.Provider,{value:n},e)}function XB(n,e){const t=Qc.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),qm.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(),eH(r),Qc.delete(n),e&&e(n)}catch{}},500)})}}qm.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:U.version});function _r(){return _r=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 u=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 u.clear=function(){i&&(clearTimeout(i),i=null)},u.flush=function(){i&&(a=n.apply(s,r),s=r=null,clearTimeout(i),i=null)},u}b1.debounce=b1;var OE=b1;function mH(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]=U.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),l=U.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:o}),u=e?typeof e=="number"?e:e.scroll:null,h=e?typeof e=="number"?e:e.resize:null,d=U.useRef(!1);U.useEffect(()=>(d.current=!0,()=>void(d.current=!1)));const[p,m,y]=U.useMemo(()=>{const _=()=>{if(!l.current.element)return;const{left:w,top:M,width:b,height:P,bottom:R,right:E,x:B,y:I}=l.current.element.getBoundingClientRect(),z={left:w,top:M,width:b,height:P,bottom:R,right:E,x:B,y:I};l.current.element instanceof HTMLElement&&r&&(z.height=l.current.element.offsetHeight,z.width=l.current.element.offsetWidth),Object.freeze(z),d.current&&!xH(l.current.lastBounds,z)&&a(l.current.lastBounds=z)};return[_,h?OE(_,h):_,u?OE(_,u):_]},[a,r,u,h]);function v(){l.current.scrollContainers&&(l.current.scrollContainers.forEach(_=>_.removeEventListener("scroll",y,!0)),l.current.scrollContainers=null),l.current.resizeObserver&&(l.current.resizeObserver.disconnect(),l.current.resizeObserver=null)}function x(){l.current.element&&(l.current.resizeObserver=new s(y),l.current.resizeObserver.observe(l.current.element),t&&l.current.scrollContainers&&l.current.scrollContainers.forEach(_=>_.addEventListener("scroll",y,{capture:!0,passive:!0})))}const A=_=>{!_||_===l.current.element||(v(),l.current.element=_,l.current.scrollContainers=YB(_),x())};return yH(y,!!t),gH(m),U.useEffect(()=>{v(),x()},[t,y,m]),U.useEffect(()=>v,[]),[A,o,p]}function gH(n){U.useEffect(()=>{const e=n;return window.addEventListener("resize",e),()=>void window.removeEventListener("resize",e)},[n])}function yH(n,e){U.useEffect(()=>{if(e){const t=n;return window.addEventListener("scroll",t,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",t,!0)}},[n,e])}function YB(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,...YB(n.parentElement)]}const vH=["x","y","top","bottom","left","right","width","height"],xH=(n,e)=>vH.every(t=>n[t]===e[t]);var _H=Object.defineProperty,AH=Object.defineProperties,wH=Object.getOwnPropertyDescriptors,zE=Object.getOwnPropertySymbols,SH=Object.prototype.hasOwnProperty,MH=Object.prototype.propertyIsEnumerable,UE=(n,e,t)=>e in n?_H(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,GE=(n,e)=>{for(var t in e||(e={}))SH.call(e,t)&&UE(n,t,e[t]);if(zE)for(var t of zE(e))MH.call(e,t)&&UE(n,t,e[t]);return n},CH=(n,e)=>AH(n,wH(e));function KB(n,e,t){if(!n)return;if(t(n)===!0)return n;let i=e?n.return:n.child;for(;i;){const r=KB(i,e,t);if(r)return r;i=e?null:i.sibling}}function QB(n){try{return Object.defineProperties(n,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return n}}const FA=QB(U.createContext(null));class ZB extends U.Component{render(){return U.createElement(FA.Provider,{value:this._reactInternals},this.props.children)}}const{ReactCurrentOwner:HE,ReactCurrentDispatcher:VE}=U.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function EH(){const n=U.useContext(FA);if(n===null)throw new Error("its-fine: useFiber must be called within a !");const e=U.useId();return U.useMemo(()=>{var i;return(i=HE==null?void 0:HE.current)!=null?i:KB(n,!1,r=>{let s=r.memoizedState;for(;s;){if(s.memoizedState===e)return!0;s=s.next}})},[n,e])}function bH(){var n,e;const t=EH(),[i]=U.useState(()=>new Map);i.clear();let r=t;for(;r;){const s=(n=r.type)==null?void 0:n._context;s&&s!==FA&&!i.has(s)&&i.set(s,(e=VE==null?void 0:VE.current)==null?void 0:e.readContext(QB(s))),r=r.return}return i}function TH(){const n=bH();return U.useMemo(()=>Array.from(n.keys()).reduce((e,t)=>i=>U.createElement(e,null,U.createElement(t.Provider,CH(GE({},i),{value:n.get(t)}))),e=>U.createElement(ZB,GE({},e))),[n])}const Sv={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 PH(n){const{handlePointer:e}=sH(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(Sv).reduce((t,i)=>({...t,[i]:e(i)}),{}),update:()=>{var t;const{events:i,internal:r}=n.getState();(t=r.lastEvent)!=null&&t.current&&i.handlers&&i.handlers.onPointerMove(r.lastEvent.current)},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,u]=Sv[o];t.addEventListener(l,a,{passive:u})})},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]=Sv[s];i.connected.removeEventListener(a,o)}}),t(s=>({events:{...s.events,connected:void 0}}))}}}}const BH=U.forwardRef(function({children:e,fallback:t,resize:i,style:r,gl:s,events:o=PH,eventSource:a,eventPrefix:l,shadows:u,linear:h,flat:d,legacy:p,orthographic:m,frameloop:y,dpr:v,performance:x,raycaster:A,camera:_,scene:w,onPointerMissed:M,onCreated:b,...P},R){U.useMemo(()=>Y9(I9),[]);const E=TH(),[B,I]=mH({scroll:!0,debounce:{scroll:50,resize:0},...i}),z=U.useRef(null),Z=U.useRef(null);U.useImperativeHandle(R,()=>z.current);const J=NB(M),[W,Q]=U.useState(!1),[re,ce]=U.useState(!1);if(W)throw W;if(re)throw re;const L=U.useRef(null);kh(()=>{const H=z.current;I.width>0&&I.height>0&&H&&(L.current||(L.current=dH(H)),L.current.configure({gl:s,events:o,shadows:u,linear:h,flat:d,legacy:p,orthographic:m,frameloop:y,dpr:v,performance:x,raycaster:A,camera:_,scene:w,size:I,onPointerMissed:(...$)=>J.current==null?void 0:J.current(...$),onCreated:$=>{$.events.connect==null||$.events.connect(a?Q9(a)?a.current:a:Z.current),l&&$.setEvents({compute:(G,se)=>{const me=G[l+"X"],Y=G[l+"Y"];se.pointer.set(me/se.size.width*2-1,-(Y/se.size.height)*2+1),se.raycaster.setFromCamera(se.pointer,se.camera)}}),b==null||b($)}}),L.current.render(U.createElement(E,null,U.createElement(OB,{set:ce},U.createElement(U.Suspense,{fallback:U.createElement(Z9,{set:Q})},e)))))}),U.useEffect(()=>{const H=z.current;if(H)return()=>XB(H)},[]);const V=a?"none":"auto";return U.createElement("div",_r({ref:Z,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:V,...r}},P),U.createElement("div",{ref:B,style:{width:"100%",height:"100%"}},U.createElement("canvas",{ref:z,style:{display:"block"}},t)))}),Jg=U.forwardRef(function(e,t){return U.createElement(ZB,null,U.createElement(BH,_r({},e,{ref:t})))});var qB,WE=_m;qB=WE.createRoot,WE.hydrateRoot;const Nh=new F,kA=new F,RH=new F;function LH(n,e,t){const i=Nh.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 IH(n,e){const t=Nh.setFromMatrixPosition(n.matrixWorld),i=kA.setFromMatrixPosition(e.matrixWorld),r=t.sub(i),s=e.getWorldDirection(RH);return r.angleTo(s)>Math.PI/2}function DH(n,e,t,i){const r=Nh.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 $B(n,e,t=""){let i="matrix3d(";for(let r=0;r!==16;r++)i+=T1(e[r]*n.elements[r])+(r!==15?",":")");return t+i}const NH=(n=>e=>$B(e,n))([1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1]),OH=(n=>(e,t)=>$B(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 zH(n){return n&&typeof n=="object"&&"current"in n}const UH=U.forwardRef(({children:n,eps:e=.001,style:t,className:i,prepend:r,center:s,fullscreen:o,portal:a,distanceFactor:l,sprite:u=!1,transform:h=!1,occlude:d,onOcclude:p,castShadow:m,receiveShadow:y,material:v,geometry:x,zIndexRange:A=[16777271,0],calculatePosition:_=LH,as:w="div",wrapperClass:M,pointerEvents:b="auto",...P},R)=>{const{gl:E,camera:B,scene:I,size:z,raycaster:Z,events:J,viewport:W}=Gi(),[Q]=U.useState(()=>document.createElement(w)),re=U.useRef(),ce=U.useRef(null),L=U.useRef(0),V=U.useRef([0,0]),H=U.useRef(null),$=U.useRef(null),G=(a==null?void 0:a.current)||J.connected||E.domElement.parentNode,se=U.useRef(null),me=U.useRef(!1),Y=U.useMemo(()=>d&&d!=="blending"||Array.isArray(d)&&d.length&&zH(d[0]),[d]);U.useLayoutEffect(()=>{const Te=E.domElement;d&&d==="blending"?(Te.style.zIndex=`${Math.floor(A[0]/2)}`,Te.style.position="absolute",Te.style.pointerEvents="none"):(Te.style.zIndex=null,Te.style.position=null,Te.style.pointerEvents=null)},[d]),U.useLayoutEffect(()=>{if(ce.current){const Te=re.current=qB(Q);if(I.updateMatrixWorld(),h)Q.style.cssText="position:absolute;top:0;left:0;pointer-events:none;overflow:hidden;";else{const we=_(ce.current,B,z);Q.style.cssText=`position:absolute;top:0;left:0;transform:translate3d(${we[0]}px,${we[1]}px,0);transform-origin:0 0;`}return G&&(r?G.prepend(Q):G.appendChild(Q)),()=>{G&&G.removeChild(Q),Te.unmount()}}},[G,h]),U.useLayoutEffect(()=>{M&&(Q.className=M)},[M]);const _e=U.useMemo(()=>h?{position:"absolute",top:0,left:0,width:z.width,height:z.height,transformStyle:"preserve-3d",pointerEvents:"none"}:{position:"absolute",transform:s?"translate3d(-50%,-50%,0)":"none",...o&&{top:-z.height/2,left:-z.width/2,width:z.width,height:z.height},...t},[t,s,o,z,h]),Ae=U.useMemo(()=>({position:"absolute",pointerEvents:b}),[b]);U.useLayoutEffect(()=>{if(me.current=!1,h){var Te;(Te=re.current)==null||Te.render(U.createElement("div",{ref:H,style:_e},U.createElement("div",{ref:$,style:Ae},U.createElement("div",{ref:R,className:i,style:t,children:n}))))}else{var we;(we=re.current)==null||we.render(U.createElement("div",{ref:R,style:_e,className:i,children:n}))}});const Ie=U.useRef(!0);fu(Te=>{if(ce.current){B.updateMatrixWorld(),ce.current.updateWorldMatrix(!0,!1);const we=h?V.current:_(ce.current,B,z);if(h||Math.abs(L.current-B.zoom)>e||Math.abs(V.current[0]-we[0])>e||Math.abs(V.current[1]-we[1])>e){const he=IH(ce.current,B);let de=!1;Y&&(Array.isArray(d)?de=d.map(Ye=>Ye.current):d!=="blending"&&(de=[I]));const Me=Ie.current;if(de){const Ye=DH(ce.current,B,Z,de);Ie.current=Ye&&!he}else Ie.current=!he;Me!==Ie.current&&(p?p(!Ie.current):Q.style.display=Ie.current?"block":"none");const Ge=Math.floor(A[0]/2),Be=d?Y?[A[0],Ge]:[Ge-1,0]:A;if(Q.style.zIndex=`${kH(ce.current,B,Be)}`,h){const[Ye,Je]=[z.width/2,z.height/2],et=B.projectionMatrix.elements[5]*Je,{isOrthographicCamera:vt,top:_t,left:N,bottom:D,right:ae}=B,Ce=NH(B.matrixWorldInverse),Ee=vt?`scale(${et})translate(${T1(-(ae+N)/2)}px,${T1((_t+D)/2)}px)`:`translateZ(${et}px)`;let Pe=ce.current.matrixWorld;u&&(Pe=B.matrixWorldInverse.clone().transpose().copyPosition(Pe).scale(ce.current.scale),Pe.elements[3]=Pe.elements[7]=Pe.elements[11]=0,Pe.elements[15]=1),Q.style.width=z.width+"px",Q.style.height=z.height+"px",Q.style.perspective=vt?"":`${et}px`,H.current&&$.current&&(H.current.style.transform=`${Ee}${Ce}translate(${Ye}px,${Je}px)`,$.current.style.transform=OH(Pe,1/((l||10)/400)))}else{const Ye=l===void 0?1:FH(ce.current,B)*l;Q.style.transform=`translate3d(${we[0]}px,${we[1]}px,0) scale(${Ye})`}V.current=we,L.current=B.zoom}}if(!Y&&se.current&&!me.current)if(h){if(H.current){const we=H.current.children[0];if(we!=null&&we.clientWidth&&we!=null&&we.clientHeight){const{isOrthographicCamera:he}=B;if(he||x)P.scale&&(Array.isArray(P.scale)?P.scale instanceof F?se.current.scale.copy(P.scale.clone().divideScalar(1)):se.current.scale.set(1/P.scale[0],1/P.scale[1],1/P.scale[2]):se.current.scale.setScalar(1/P.scale));else{const de=(l||10)/400,Me=we.clientWidth*de,Ge=we.clientHeight*de;se.current.scale.set(Me,Ge,1)}me.current=!0}}}else{const we=Q.children[0];if(we!=null&&we.clientWidth&&we!=null&&we.clientHeight){const he=1/W.factor,de=we.clientWidth*he,Me=we.clientHeight*he;se.current.scale.set(de,Me,1),me.current=!0}se.current.lookAt(Te.camera.position)}});const ke=U.useMemo(()=>({vertexShader:h?void 0:` + */(function(n){function e(L,V){var H=L.length;L.push(V);e:for(;0>>1,G=L[$];if(0>>1;$r(Y,H))_er(Ae,Y)?(L[$]=Ae,L[_e]=H,$=_e):(L[$]=Y,L[me]=H,$=me);else if(_er(Ae,H))L[$]=Ae,L[_e]=H,$=_e;else break e}}return V}function r(L,V){var H=L.sortIndex-V.sortIndex;return H!==0?H:L.id-V.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=[],u=[],h=1,d=null,p=3,m=!1,y=!1,v=!1,x=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,_=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(L){for(var V=t(u);V!==null;){if(V.callback===null)i(u);else if(V.startTime<=L)i(u),V.sortIndex=V.expirationTime,e(l,V);else break;V=t(u)}}function M(L){if(v=!1,w(L),!y)if(t(l)!==null)y=!0,re(b);else{var V=t(u);V!==null&&ce(M,V.startTime-L)}}function b(L,V){y=!1,v&&(v=!1,A(E),E=-1),m=!0;var H=p;try{for(w(V),d=t(l);d!==null&&(!(d.expirationTime>V)||L&&!z());){var $=d.callback;if(typeof $=="function"){d.callback=null,p=d.priorityLevel;var G=$(d.expirationTime<=V);V=n.unstable_now(),typeof G=="function"?d.callback=G:d===t(l)&&i(l),w(V)}else i(l);d=t(l)}if(d!==null)var se=!0;else{var me=t(u);me!==null&&ce(M,me.startTime-V),se=!1}return se}finally{d=null,p=H,m=!1}}var P=!1,R=null,E=-1,B=5,I=-1;function z(){return!(n.unstable_now()-IL||125$?(L.sortIndex=H,e(u,L),t(l)===null&&L===t(u)&&(v?(A(E),E=-1):v=!0,ce(M,H-$))):(L.sortIndex=G,e(l,L),y||m||(y=!0,re(b))),L},n.unstable_shouldYield=z,n.unstable_wrapCallback=function(L){var V=p;return function(){var H=p;p=V;try{return L.apply(this,arguments)}finally{p=H}}}})(BB);(function(n){n.exports=BB})(z9);const U9=n=>typeof n=="object"&&typeof n.then=="function",Ya=[];function RB(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;r0&&(s.timeout&&clearTimeout(s.timeout),s.timeout=setTimeout(s.remove,i.lifespan)),s.response;if(!t)throw s.promise}const r={keys:e,equal:i.equal,remove:()=>{const s=Ya.indexOf(r);s!==-1&&Ya.splice(s,1)},promise:(U9(n)?n:n(...e)).then(s=>{r.response=s,i.lifespan&&i.lifespan>0&&(r.timeout=setTimeout(r.remove,i.lifespan))}).catch(s=>r.error=s)};if(Ya.push(r),!t)throw r.promise}const G9=(n,e,t)=>LB(n,e,!1,t),H9=(n,e,t)=>void LB(n,e,!0,t),V9=n=>{if(n===void 0||n.length===0)Ya.splice(0,Ya.length);else{const e=Ya.find(t=>RB(n,t.keys,t.equal));e&&e.remove()}},IA={},W9=n=>void Object.assign(IA,n);function j9(n,e){function t(h,{args:d=[],attach:p,...m},y){let v=`${h[0].toUpperCase()}${h.slice(1)}`,x;if(h==="primitive"){if(m.object===void 0)throw new Error("R3F: Primitives without 'object' are invalid!");const A=m.object;x=tc(A,{type:h,root:y,attach:p,primitive:!0})}else{const A=IA[v];if(!A)throw new Error(`R3F: ${v} 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!");x=tc(new A(...d),{type:h,root:y,attach:p,memoizedProps:{args:d}})}return x.__r3f.attach===void 0&&(x instanceof ft?x.__r3f.attach="geometry":x instanceof Pn&&(x.__r3f.attach="material")),v!=="inject"&&yv(x,m),x}function i(h,d){let p=!1;if(d){var m,y;(m=d.__r3f)!=null&&m.attach?gv(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||tc(d,{}),d.__r3f.parent=h,C1(d),nc(d)}}function r(h,d,p){let m=!1;if(d){var y,v;if((y=d.__r3f)!=null&&y.attach)gv(h,d,d.__r3f.attach);else if(d.isObject3D&&h.isObject3D){d.parent=h,d.dispatchEvent({type:"added"});const x=h.children.filter(_=>_!==d),A=x.indexOf(p);h.children=[...x.slice(0,A),d,...x.slice(A)],m=!0}m||(v=h.__r3f)==null||v.objects.push(d),d.__r3f||tc(d,{}),d.__r3f.parent=h,C1(d),nc(d)}}function s(h,d,p=!1){h&&[...h].forEach(m=>o(d,m,p))}function o(h,d,p){if(d){var m,y,v;if(d.__r3f&&(d.__r3f.parent=null),(m=h.__r3f)!=null&&m.objects&&(h.__r3f.objects=h.__r3f.objects.filter(M=>M!==d)),(y=d.__r3f)!=null&&y.attach)IE(h,d,d.__r3f.attach);else if(d.isObject3D&&h.isObject3D){var x;h.remove(d),(x=d.__r3f)!=null&&x.root&&eH(d.__r3f.root,d)}const _=(v=d.__r3f)==null?void 0:v.primitive,w=!_&&(p===void 0?d.dispose!==null:p);if(!_){var A;s((A=d.__r3f)==null?void 0:A.objects,d,w),s(d.children,d,w)}delete d.__r3f,w&&d.dispose&&d.type!=="Scene"&&Qm.unstable_scheduleCallback(Qm.unstable_IdlePriority,()=>{try{d.dispose()}catch{}}),nc(h)}}function a(h,d,p,m){var y;const v=(y=h.__r3f)==null?void 0:y.parent;if(!v)return;const x=t(d,p,h.__r3f.root);if(h.children){for(const A of h.children)A.__r3f&&i(x,A);h.children=h.children.filter(A=>!A.__r3f)}h.__r3f.objects.forEach(A=>i(x,A)),h.__r3f.objects=[],h.__r3f.autoRemovedBeforeAppend||o(v,h),x.parent&&(x.__r3f.autoRemovedBeforeAppend=!0),i(v,x),x.raycast&&x.__r3f.eventCount&&x.__r3f.root.getState().internal.interaction.push(x),[m,m.alternate].forEach(A=>{A!==null&&(A.stateNode=x,A.ref&&(typeof A.ref=="function"?A.ref(x):A.ref.current=x))})}const l=()=>console.warn("Text is not allowed in the R3F tree! This could be stray whitespace or characters.");return{reconciler:O9({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 m=h.getState().scene;m.__r3f&&r(m,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,m){var y;if(((y=h==null?void 0:h.__r3f)!=null?y:{}).primitive&&m.object&&m.object!==h)return[!0];{const{args:x=[],children:A,..._}=m,{args:w=[],children:M,...b}=p;if(!Array.isArray(x))throw new Error("R3F: the args prop must be an array!");if(x.some((R,E)=>R!==w[E]))return[!0];const P=zB(h,_,b,!0);return P.changes.length?[!1,P]:null}},commitUpdate(h,[d,p],m,y,v,x){d?a(h,m,v,x):yv(h,p)},commitMount(h,d,p,m){var y;const v=(y=h.__r3f)!=null?y:{};h.raycast&&v.handlers&&v.eventCount&&h.__r3f.root.getState().internal.interaction.push(h)},getPublicInstance:h=>h,prepareForCommit:()=>null,preparePortalMount:h=>tc(h.getState().scene),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance(h){var d;const{attach:p,parent:m}=(d=h.__r3f)!=null?d:{};p&&m&&IE(m,h,p),h.isObject3D&&(h.visible=!1),nc(h)},unhideInstance(h,d){var p;const{attach:m,parent:y}=(p=h.__r3f)!=null?p:{};m&&y&&gv(y,h,m),(h.isObject3D&&d.visible==null||d.visible)&&(h.visible=!0),nc(h)},createTextInstance:l,hideTextInstance:l,unhideTextInstance:l,getCurrentEventPriority:()=>e?e():Ro.DefaultEventPriority,beforeActiveInstanceBlur:()=>{},afterActiveInstanceBlur:()=>{},detachDeletedInstance:()=>{},now:typeof performance<"u"&&jt.fun(performance.now)?performance.now:jt.fun(Date.now)?Date.now:()=>0,scheduleTimeout:jt.fun(setTimeout)?setTimeout:void 0,cancelTimeout:jt.fun(clearTimeout)?clearTimeout:void 0}),applyProps:yv}}var PE,BE;const mv=n=>"colorSpace"in n||"outputColorSpace"in n,IB=()=>{var n;return(n=IA.ColorManagement)!=null?n:null},DB=n=>n&&n.isOrthographicCamera,J9=n=>n&&n.hasOwnProperty("current"),Fh=typeof window<"u"&&((PE=window.document)!=null&&PE.createElement||((BE=window.navigator)==null?void 0:BE.product)==="ReactNative")?U.useLayoutEffect:U.useEffect;function FB(n){const e=U.useRef(n);return Fh(()=>void(e.current=n),[n]),e}function X9({set:n}){return Fh(()=>(n(new Promise(()=>null)),()=>n(!1)),[n]),null}class kB extends U.Component{constructor(...e){super(...e),this.state={error:!1}}componentDidCatch(e){this.props.set(e)}render(){return this.state.error?null:this.props.children}}kB.getDerivedStateFromError=()=>({error:!0});const NB="__default",RE=new Map,Y9=n=>n&&!!n.memoized&&!!n.changes;function OB(n){var e;const t=typeof window<"u"?(e=window.devicePixelRatio)!=null?e:2:1;return Array.isArray(n)?Math.min(Math.max(n[0],t),n[1]):n}const qu=n=>{var e;return(e=n.__r3f)==null?void 0:e.root.getState()},jt={obj:n=>n===Object(n)&&!jt.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(jt.str(n)||jt.num(n))return n===e;const s=jt.obj(n);if(s&&i==="reference")return n===e;const o=jt.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;if(s&&t==="shallow"&&i==="shallow"){for(a in r?e:n)if(!jt.equ(n[a],e[a],{strict:r,objects:"reference"}))return!1}else for(a in r?e:n)if(n[a]!==e[a])return!1;if(jt.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 K9(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 Q9(n){n.dispose&&n.type!=="Scene"&&n.dispose();for(const e in n)e.dispose==null||e.dispose(),delete n[e]}function tc(n,e){const t=n;return t.__r3f={type:"",root:null,previousAttach:null,memoizedProps:{},eventCount:0,handlers:{},objects:[],parent:null,...e},n}function M1(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 LE=/-\d+$/;function gv(n,e,t){if(jt.str(t)){if(LE.test(t)){const s=t.replace(LE,""),{target:o,key:a}=M1(n,s);Array.isArray(o[a])||(o[a]=[])}const{target:i,key:r}=M1(n,t);e.__r3f.previousAttach=i[r],i[r]=e}else e.__r3f.previousAttach=t(n,e)}function IE(n,e,t){var i,r;if(jt.str(t)){const{target:s,key:o}=M1(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 zB(n,{children:e,key:t,ref:i,...r},{children:s,key:o,ref:a,...l}={},u=!1){var h;const d=(h=n==null?void 0:n.__r3f)!=null?h:{},p=Object.entries(r),m=[];if(u){const v=Object.keys(l);for(let x=0;x{var A;if((A=n.__r3f)!=null&&A.primitive&&v==="object"||jt.equ(x,l[v]))return;if(/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/.test(v))return m.push([v,x,!0,[]]);let _=[];v.includes("-")&&(_=v.split("-")),m.push([v,x,!1,_]);for(const w in r){const M=r[w];w.startsWith(`${v}-`)&&m.push([w,M,!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:m}}const Z9=typeof process<"u"&&!1;function yv(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:u}=Y9(e)?e:zB(n,e),h=s.eventCount;n.__r3f&&(n.__r3f.memoizedProps=l);for(let p=0;pw[M],n),!(_&&_.set))){const[w,...M]=x.reverse();A=M.reverse().reduce((b,P)=>b[P],n),m=w}if(y===NB+"remove")if(A.constructor){let w=RE.get(A.constructor);w||(w=new A.constructor,RE.set(A.constructor,w)),y=w[m]}else y=0;if(v)y?s.handlers[m]=y:delete s.handlers[m],s.eventCount=Object.keys(s.handlers).length;else if(_&&_.set&&(_.copy||_ instanceof nl)){if(Array.isArray(y))_.fromArray?_.fromArray(y):_.set(...y);else if(_.copy&&y&&y.constructor&&(Z9?_.constructor.name===y.constructor.name:_.constructor===y.constructor))_.copy(y);else if(y!==void 0){const w=_ instanceof De;!w&&_.setScalar?_.setScalar(y):_ instanceof nl&&y instanceof nl?_.mask=y.mask:_.set(y),!IB()&&!a.linear&&w&&_.convertSRGBToLinear()}}else if(A[m]=y,A[m]instanceof $t&&A[m].format===bi&&A[m].type===Zs){const w=A[m];mv(w)&&mv(a.gl)?w.colorSpace=a.gl.outputColorSpace:w.encoding=a.gl.outputEncoding}nc(n)}if(s.parent&&a.internal&&n.raycast&&h!==s.eventCount){const p=a.internal.interaction.indexOf(n);p>-1&&a.internal.interaction.splice(p,1),s.eventCount&&a.internal.interaction.push(n)}return!(u.length===1&&u[0][0]==="onUpdate")&&u.length&&(r=n.__r3f)!=null&&r.parent&&C1(n),n}function nc(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 C1(n){n.onUpdate==null||n.onUpdate(n)}function q9(n,e){n.manual||(DB(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 Up(n){return(n.eventObject||n.object).uuid+"/"+n.index+n.instanceId}function $9(){var n;const e=typeof self<"u"&&self||typeof window<"u"&&window;if(!e)return Ro.DefaultEventPriority;switch((n=e.event)==null?void 0:n.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return Ro.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return Ro.ContinuousEventPriority;default:return Ro.DefaultEventPriority}}function UB(n,e,t,i){const r=t.get(e);r&&(t.delete(e),t.size===0&&(n.delete(i),r.target.releasePointerCapture(i)))}function eH(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)=>{UB(t.capturedMap,e,i,r)})}function tH(n){function e(l){const{internal:u}=n.getState(),h=l.offsetX-u.initialClick[0],d=l.offsetY-u.initialClick[1];return Math.round(Math.sqrt(h*h+d*d))}function t(l){return l.filter(u=>["Move","Over","Enter","Out","Leave"].some(h=>{var d;return(d=u.__r3f)==null?void 0:d.handlers["onPointer"+h]}))}function i(l,u){const h=n.getState(),d=new Set,p=[],m=u?u(h.internal.interaction):h.internal.interaction;for(let A=0;A{const w=qu(A.object),M=qu(_.object);return!w||!M?A.distance-_.distance:M.events.priority-w.events.priority||A.distance-_.distance}).filter(A=>{const _=Up(A);return d.has(_)?!1:(d.add(_),!0)});h.events.filter&&(v=h.events.filter(v,h));for(const A of v){let _=A.object;for(;_;){var x;(x=_.__r3f)!=null&&x.eventCount&&p.push({...A,eventObject:_}),_=_.parent}}if("pointerId"in l&&h.internal.capturedMap.has(l.pointerId))for(let A of h.internal.capturedMap.get(l.pointerId).values())d.has(Up(A.intersection))||p.push(A.intersection);return p}function r(l,u,h,d){const p=n.getState();if(l.length){const m={stopped:!1};for(const y of l){const v=qu(y.object)||p,{raycaster:x,pointer:A,camera:_,internal:w}=v,M=new F(A.x,A.y,0).unproject(_),b=I=>{var z,Z;return(z=(Z=w.capturedMap.get(I))==null?void 0:Z.has(y.eventObject))!=null?z:!1},P=I=>{const z={intersection:y,target:u.target};w.capturedMap.has(I)?w.capturedMap.get(I).set(y.eventObject,z):w.capturedMap.set(I,new Map([[y.eventObject,z]])),u.target.setPointerCapture(I)},R=I=>{const z=w.capturedMap.get(I);z&&UB(w.capturedMap,y.eventObject,z,I)};let E={};for(let I in u){let z=u[I];typeof z!="function"&&(E[I]=z)}let B={...y,...E,pointer:A,intersections:l,stopped:m.stopped,delta:h,unprojectedPoint:M,ray:x.ray,camera:_,stopPropagation(){const I="pointerId"in u&&w.capturedMap.get(u.pointerId);if((!I||I.has(y.eventObject))&&(B.stopped=m.stopped=!0,w.hovered.size&&Array.from(w.hovered.values()).find(z=>z.eventObject===y.eventObject))){const z=l.slice(0,l.indexOf(y));s([...z,y])}},target:{hasPointerCapture:b,setPointerCapture:P,releasePointerCapture:R},currentTarget:{hasPointerCapture:b,setPointerCapture:P,releasePointerCapture:R},nativeEvent:u};if(d(B),m.stopped===!0)break}}return l}function s(l){const{internal:u}=n.getState();for(const h of u.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,m=p==null?void 0:p.handlers;if(u.hovered.delete(Up(h)),p!=null&&p.eventCount){const y={...h,intersections:l};m.onPointerOut==null||m.onPointerOut(y),m.onPointerLeave==null||m.onPointerLeave(y)}}}function o(l,u){for(let h=0;hs([]);case"onLostPointerCapture":return u=>{const{internal:h}=n.getState();"pointerId"in u&&h.capturedMap.has(u.pointerId)&&requestAnimationFrame(()=>{h.capturedMap.has(u.pointerId)&&(h.capturedMap.delete(u.pointerId),s([]))})}}return function(h){const{onPointerMissed:d,internal:p}=n.getState();p.lastEvent.current=h;const m=l==="onPointerMove",y=l==="onClick"||l==="onContextMenu"||l==="onDoubleClick",x=i(h,m?t:void 0),A=y?e(h):0;l==="onPointerDown"&&(p.initialClick=[h.offsetX,h.offsetY],p.initialHits=x.map(w=>w.eventObject)),y&&!x.length&&A<=2&&(o(h,p.interaction),d&&d(h)),m&&s(x);function _(w){const M=w.eventObject,b=M.__r3f,P=b==null?void 0:b.handlers;if(b!=null&&b.eventCount)if(m){if(P.onPointerOver||P.onPointerEnter||P.onPointerOut||P.onPointerLeave){const R=Up(w),E=p.hovered.get(R);E?E.stopped&&w.stopPropagation():(p.hovered.set(R,w),P.onPointerOver==null||P.onPointerOver(w),P.onPointerEnter==null||P.onPointerEnter(w))}P.onPointerMove==null||P.onPointerMove(w)}else{const R=P[l];R?(!y||p.initialHits.includes(M))&&(o(h,p.interaction.filter(E=>!p.initialHits.includes(E))),R(w)):y&&p.initialHits.includes(M)&&o(h,p.interaction.filter(E=>!p.initialHits.includes(E)))}}r(x,h,A,_)}}return{handlePointer:a}}const GB=n=>!!(n!=null&&n.render),HB=U.createContext(null),nH=(n,e)=>{const t=PB((a,l)=>{const u=new F,h=new F,d=new F;function p(A=l().camera,_=h,w=l().size){const{width:M,height:b,top:P,left:R}=w,E=M/b;_ instanceof F?d.copy(_):d.set(..._);const B=A.getWorldPosition(u).distanceTo(d);if(DB(A))return{width:M/A.zoom,height:b/A.zoom,top:P,left:R,factor:1,distance:B,aspect:E};{const I=A.fov*Math.PI/180,z=2*Math.tan(I/2)*B,Z=z*(M/b);return{width:Z,height:z,top:P,left:R,factor:M/Z,distance:B,aspect:E}}}let m;const y=A=>a(_=>({performance:{..._.performance,current:A}})),v=new pe;return{set:a,get:l,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},xr:null,scene:null,invalidate:(A=1)=>n(l(),A),advance:(A,_)=>e(A,_,l()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new PA,pointer:v,mouse:v,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{const A=l();m&&clearTimeout(m),A.performance.current!==A.performance.min&&y(A.performance.min),m=setTimeout(()=>y(l().performance.max),A.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:A=>a(_=>({..._,events:{..._.events,...A}})),setSize:(A,_,w,M,b)=>{const P=l().camera,R={width:A,height:_,top:M||0,left:b||0,updateStyle:w};a(E=>({size:R,viewport:{...E.viewport,...p(P,h,R)}}))},setDpr:A=>a(_=>{const w=OB(A);return{viewport:{..._.viewport,dpr:w,initialDpr:_.viewport.initialDpr||w}}}),setFrameloop:(A="always")=>{const _=l().clock;_.stop(),_.elapsedTime=0,A!=="never"&&(_.start(),_.elapsedTime=0),a(()=>({frameloop:A}))},previousRoot:void 0,internal:{active:!1,priority:0,frames:0,lastEvent:U.createRef(),interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,subscribe:(A,_,w)=>{const M=l().internal;return M.priority=M.priority+(_>0?1:0),M.subscribers.push({ref:A,priority:_,store:w}),M.subscribers=M.subscribers.sort((b,P)=>b.priority-P.priority),()=>{const b=l().internal;b!=null&&b.subscribers&&(b.priority=b.priority-(_>0?1:0),b.subscribers=b.subscribers.filter(P=>P.ref!==A))}}}}}),i=t.getState();let r=i.size,s=i.viewport.dpr,o=i.camera;return t.subscribe(()=>{const{camera:a,size:l,viewport:u,gl:h,set:d}=t.getState();if(l.width!==r.width||l.height!==r.height||u.dpr!==s){var p;r=l,s=u.dpr,q9(a,l),h.setPixelRatio(u.dpr);const m=(p=l.updateStyle)!=null?p:typeof HTMLCanvasElement<"u"&&h.domElement instanceof HTMLCanvasElement;h.setSize(l.width,l.height,m)}a!==o&&(o=a,d(m=>({viewport:{...m.viewport,...m.viewport.getCurrentViewport(a)}})))}),t.subscribe(a=>n(a)),t};let Gp,iH=new Set,rH=new Set,sH=new Set;function vv(n,e){if(n.size)for(const{callback:t}of n.values())t(e)}function $u(n,e){switch(n){case"before":return vv(iH,e);case"after":return vv(rH,e);case"tail":return vv(sH,e)}}let xv,_v;function Av(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),xv=e.internal.subscribers,Gp=0;Gp0)&&!((u=r.gl.xr)!=null&&u.isPresenting)&&(t+=Av(l,r))}if($u("after",l),t===0)return $u("tail",l),e=!1,cancelAnimationFrame(i)}function o(l,u=1){var h;if(!l)return n.forEach(d=>o(d.store.getState()),u);(h=l.gl.xr)!=null&&h.isPresenting||!l.internal.active||l.frameloop==="never"||(l.internal.frames=Math.min(60,l.internal.frames+u),e||(e=!0,requestAnimationFrame(s)))}function a(l,u=!0,h,d){if(u&&$u("before",l),h)Av(l,h,d);else for(const p of n.values())Av(l,p.store.getState());u&&$u("after",l)}return{loop:s,invalidate:o,advance:a}}function VB(){const n=U.useContext(HB);if(!n)throw new Error("R3F: Hooks can only be used within the Canvas component!");return n}function Gi(n=t=>t,e){return VB()(n,e)}function fu(n,e=0){const t=VB(),i=t.getState().internal.subscribe,r=FB(n);return Fh(()=>i(r,e,t),[e,i,t]),null}const DE=new WeakMap;function WB(n,e){return function(t,...i){let r=DE.get(t);return r||(r=new t,DE.set(t,r)),n&&n(r),Promise.all(i.map(s=>new Promise((o,a)=>r.load(s,l=>{l.scene&&Object.assign(l,K9(l.scene)),o(l)},e,l=>a(new Error(`Could not load ${s}: ${l==null?void 0:l.message}`)))))).finally(()=>r.dispose==null?void 0:r.dispose())}}function la(n,e,t,i){const r=Array.isArray(e)?e:[e],s=G9(WB(t,i),[n,...r],{equal:jt.equ});return Array.isArray(e)?s:s[0]}la.preload=function(n,e,t){const i=Array.isArray(e)?e:[e];return H9(WB(t),[n,...i])};la.clear=function(n,e){const t=Array.isArray(e)?e:[e];return V9([n,...t])};const Qc=new Map,{invalidate:FE,advance:kE}=oH(Qc),{reconciler:Zm,applyProps:ss}=j9(Qc,$9),ec={objects:"shallow",strict:!1},aH=(n,e)=>{const t=typeof n=="function"?n(e):n;return GB(t)?t:new kg({powerPreference:"high-performance",canvas:e,antialias:!0,alpha:!0,...n})};function lH(n,e){const t=typeof HTMLCanvasElement<"u"&&n instanceof HTMLCanvasElement;if(e){const{width:i,height:r,top:s,left:o,updateStyle:a=t}=e;return{width:i,height:r,top:s,left:o,updateStyle:a}}else if(typeof HTMLCanvasElement<"u"&&n instanceof HTMLCanvasElement&&n.parentElement){const{width:i,height:r,top:s,left:o}=n.parentElement.getBoundingClientRect();return{width:i,height:r,top:s,left:o,updateStyle:t}}else if(typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas)return{width:n.width,height:n.height,top:0,left:0,updateStyle:t};return{width:0,height:0,top:0,left:0}}function cH(n){const e=Qc.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||nH(FE,kE),o=t||Zm.createContainer(s,Ro.ConcurrentRoot,null,!1,null,"",r,null);e||Qc.set(n,{fiber:o,store:s});let a,l=!1,u;return{configure(h={}){let{gl:d,size:p,scene:m,events:y,onCreated:v,shadows:x=!1,linear:A=!1,flat:_=!1,legacy:w=!1,orthographic:M=!1,frameloop:b="always",dpr:P=[1,2],performance:R,raycaster:E,camera:B,onPointerMissed:I}=h,z=s.getState(),Z=z.gl;z.gl||z.set({gl:Z=aH(d,n)});let J=z.raycaster;J||z.set({raycaster:J=new bB});const{params:W,...Q}=E||{};if(jt.equ(Q,J,ec)||ss(J,{...Q}),jt.equ(W,J.params,ec)||ss(J,{params:{...J.params,...W}}),!z.camera||z.camera===u&&!jt.equ(u,B,ec)){u=B;const G=B instanceof gh,se=G?B:M?new mr(0,0,0,0,.1,1e3):new Jt(75,0,.1,1e3);G||(se.position.z=5,B&&ss(se,B),!z.camera&&!(B!=null&&B.rotation)&&se.lookAt(0,0,0)),z.set({camera:se}),J.camera=se}if(!z.scene){let G;m instanceof Ym?G=m:(G=new Ym,m&&ss(G,m)),z.set({scene:tc(G)})}if(!z.xr){var re;const G=(Y,_e)=>{const Ae=s.getState();Ae.frameloop!=="never"&&kE(Y,!0,Ae,_e)},se=()=>{const Y=s.getState();Y.gl.xr.enabled=Y.gl.xr.isPresenting,Y.gl.xr.setAnimationLoop(Y.gl.xr.isPresenting?G:null),Y.gl.xr.isPresenting||FE(Y)},me={connect(){const Y=s.getState().gl;Y.xr.addEventListener("sessionstart",se),Y.xr.addEventListener("sessionend",se)},disconnect(){const Y=s.getState().gl;Y.xr.removeEventListener("sessionstart",se),Y.xr.removeEventListener("sessionend",se)}};typeof((re=Z.xr)==null?void 0:re.addEventListener)=="function"&&me.connect(),z.set({xr:me})}if(Z.shadowMap){const G=Z.shadowMap.enabled,se=Z.shadowMap.type;if(Z.shadowMap.enabled=!!x,jt.boo(x))Z.shadowMap.type=Af;else if(jt.str(x)){var ce;const me={basic:N3,percentage:Pg,soft:Af,variance:Va};Z.shadowMap.type=(ce=me[x])!=null?ce:Af}else jt.obj(x)&&Object.assign(Z.shadowMap,x);(G!==Z.shadowMap.enabled||se!==Z.shadowMap.type)&&(Z.shadowMap.needsUpdate=!0)}const L=IB();L&&("enabled"in L?L.enabled=!w:"legacyMode"in L&&(L.legacyMode=w)),ss(Z,{outputEncoding:A?3e3:3001,toneMapping:_?zr:j_}),z.legacy!==w&&z.set(()=>({legacy:w})),z.linear!==A&&z.set(()=>({linear:A})),z.flat!==_&&z.set(()=>({flat:_})),d&&!jt.fun(d)&&!GB(d)&&!jt.equ(d,Z,ec)&&ss(Z,d),y&&!z.events.handlers&&z.set({events:y(s)});const $=lH(n,p);return jt.equ($,z.size,ec)||z.setSize($.width,$.height,$.updateStyle,$.top,$.left),P&&z.viewport.dpr!==OB(P)&&z.setDpr(P),z.frameloop!==b&&z.setFrameloop(b),z.onPointerMissed||z.set({onPointerMissed:I}),R&&!jt.equ(R,z.performance,ec)&&z.set(G=>({performance:{...G.performance,...R}})),a=v,l=!0,this},render(h){return l||this.configure(),Zm.updateContainer(U.createElement(uH,{store:s,children:h,onCreated:a,rootElement:n}),o,null,()=>{}),s},unmount(){jB(n)}}}function uH({store:n,children:e,onCreated:t,rootElement:i}){return Fh(()=>{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)},[]),U.createElement(HB.Provider,{value:n},e)}function jB(n,e){const t=Qc.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),Zm.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(),Q9(r),Qc.delete(n),e&&e(n)}catch{}},500)})}}Zm.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:U.version});function _r(){return _r=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 u=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 u.clear=function(){i&&(clearTimeout(i),i=null)},u.flush=function(){i&&(a=n.apply(s,r),s=r=null,clearTimeout(i),i=null)},u}E1.debounce=E1;var NE=E1;function fH(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]=U.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),l=U.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:o}),u=e?typeof e=="number"?e:e.scroll:null,h=e?typeof e=="number"?e:e.resize:null,d=U.useRef(!1);U.useEffect(()=>(d.current=!0,()=>void(d.current=!1)));const[p,m,y]=U.useMemo(()=>{const _=()=>{if(!l.current.element)return;const{left:w,top:M,width:b,height:P,bottom:R,right:E,x:B,y:I}=l.current.element.getBoundingClientRect(),z={left:w,top:M,width:b,height:P,bottom:R,right:E,x:B,y:I};l.current.element instanceof HTMLElement&&r&&(z.height=l.current.element.offsetHeight,z.width=l.current.element.offsetWidth),Object.freeze(z),d.current&&!mH(l.current.lastBounds,z)&&a(l.current.lastBounds=z)};return[_,h?NE(_,h):_,u?NE(_,u):_]},[a,r,u,h]);function v(){l.current.scrollContainers&&(l.current.scrollContainers.forEach(_=>_.removeEventListener("scroll",y,!0)),l.current.scrollContainers=null),l.current.resizeObserver&&(l.current.resizeObserver.disconnect(),l.current.resizeObserver=null)}function x(){l.current.element&&(l.current.resizeObserver=new s(y),l.current.resizeObserver.observe(l.current.element),t&&l.current.scrollContainers&&l.current.scrollContainers.forEach(_=>_.addEventListener("scroll",y,{capture:!0,passive:!0})))}const A=_=>{!_||_===l.current.element||(v(),l.current.element=_,l.current.scrollContainers=JB(_),x())};return dH(y,!!t),hH(m),U.useEffect(()=>{v(),x()},[t,y,m]),U.useEffect(()=>v,[]),[A,o,p]}function hH(n){U.useEffect(()=>{const e=n;return window.addEventListener("resize",e),()=>void window.removeEventListener("resize",e)},[n])}function dH(n,e){U.useEffect(()=>{if(e){const t=n;return window.addEventListener("scroll",t,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",t,!0)}},[n,e])}function JB(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,...JB(n.parentElement)]}const pH=["x","y","top","bottom","left","right","width","height"],mH=(n,e)=>pH.every(t=>n[t]===e[t]);var gH=Object.defineProperty,yH=Object.defineProperties,vH=Object.getOwnPropertyDescriptors,OE=Object.getOwnPropertySymbols,xH=Object.prototype.hasOwnProperty,_H=Object.prototype.propertyIsEnumerable,zE=(n,e,t)=>e in n?gH(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,UE=(n,e)=>{for(var t in e||(e={}))xH.call(e,t)&&zE(n,t,e[t]);if(OE)for(var t of OE(e))_H.call(e,t)&&zE(n,t,e[t]);return n},AH=(n,e)=>yH(n,vH(e));function XB(n,e,t){if(!n)return;if(t(n)===!0)return n;let i=e?n.return:n.child;for(;i;){const r=XB(i,e,t);if(r)return r;i=e?null:i.sibling}}function YB(n){try{return Object.defineProperties(n,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return n}}const DA=YB(U.createContext(null));class KB extends U.Component{render(){return U.createElement(DA.Provider,{value:this._reactInternals},this.props.children)}}const{ReactCurrentOwner:GE,ReactCurrentDispatcher:HE}=U.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function wH(){const n=U.useContext(DA);if(n===null)throw new Error("its-fine: useFiber must be called within a !");const e=U.useId();return U.useMemo(()=>{var i;return(i=GE==null?void 0:GE.current)!=null?i:XB(n,!1,r=>{let s=r.memoizedState;for(;s;){if(s.memoizedState===e)return!0;s=s.next}})},[n,e])}function SH(){var n,e;const t=wH(),[i]=U.useState(()=>new Map);i.clear();let r=t;for(;r;){const s=(n=r.type)==null?void 0:n._context;s&&s!==DA&&!i.has(s)&&i.set(s,(e=HE==null?void 0:HE.current)==null?void 0:e.readContext(YB(s))),r=r.return}return i}function MH(){const n=SH();return U.useMemo(()=>Array.from(n.keys()).reduce((e,t)=>i=>U.createElement(e,null,U.createElement(t.Provider,AH(UE({},i),{value:n.get(t)}))),e=>U.createElement(KB,UE({},e))),[n])}const wv={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 CH(n){const{handlePointer:e}=tH(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(wv).reduce((t,i)=>({...t,[i]:e(i)}),{}),update:()=>{var t;const{events:i,internal:r}=n.getState();(t=r.lastEvent)!=null&&t.current&&i.handlers&&i.handlers.onPointerMove(r.lastEvent.current)},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,u]=wv[o];t.addEventListener(l,a,{passive:u})})},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]=wv[s];i.connected.removeEventListener(a,o)}}),t(s=>({events:{...s.events,connected:void 0}}))}}}}const EH=U.forwardRef(function({children:e,fallback:t,resize:i,style:r,gl:s,events:o=CH,eventSource:a,eventPrefix:l,shadows:u,linear:h,flat:d,legacy:p,orthographic:m,frameloop:y,dpr:v,performance:x,raycaster:A,camera:_,scene:w,onPointerMissed:M,onCreated:b,...P},R){U.useMemo(()=>W9(P9),[]);const E=MH(),[B,I]=fH({scroll:!0,debounce:{scroll:50,resize:0},...i}),z=U.useRef(null),Z=U.useRef(null);U.useImperativeHandle(R,()=>z.current);const J=FB(M),[W,Q]=U.useState(!1),[re,ce]=U.useState(!1);if(W)throw W;if(re)throw re;const L=U.useRef(null);Fh(()=>{const H=z.current;I.width>0&&I.height>0&&H&&(L.current||(L.current=cH(H)),L.current.configure({gl:s,events:o,shadows:u,linear:h,flat:d,legacy:p,orthographic:m,frameloop:y,dpr:v,performance:x,raycaster:A,camera:_,scene:w,size:I,onPointerMissed:(...$)=>J.current==null?void 0:J.current(...$),onCreated:$=>{$.events.connect==null||$.events.connect(a?J9(a)?a.current:a:Z.current),l&&$.setEvents({compute:(G,se)=>{const me=G[l+"X"],Y=G[l+"Y"];se.pointer.set(me/se.size.width*2-1,-(Y/se.size.height)*2+1),se.raycaster.setFromCamera(se.pointer,se.camera)}}),b==null||b($)}}),L.current.render(U.createElement(E,null,U.createElement(kB,{set:ce},U.createElement(U.Suspense,{fallback:U.createElement(X9,{set:Q})},e)))))}),U.useEffect(()=>{const H=z.current;if(H)return()=>jB(H)},[]);const V=a?"none":"auto";return U.createElement("div",_r({ref:Z,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:V,...r}},P),U.createElement("div",{ref:B,style:{width:"100%",height:"100%"}},U.createElement("canvas",{ref:z,style:{display:"block"}},t)))}),jg=U.forwardRef(function(e,t){return U.createElement(KB,null,U.createElement(EH,_r({},e,{ref:t})))});var QB,VE=xm;QB=VE.createRoot,VE.hydrateRoot;const kh=new F,FA=new F,bH=new F;function TH(n,e,t){const i=kh.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 PH(n,e){const t=kh.setFromMatrixPosition(n.matrixWorld),i=FA.setFromMatrixPosition(e.matrixWorld),r=t.sub(i),s=e.getWorldDirection(bH);return r.angleTo(s)>Math.PI/2}function BH(n,e,t,i){const r=kh.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 ZB(n,e,t=""){let i="matrix3d(";for(let r=0;r!==16;r++)i+=b1(e[r]*n.elements[r])+(r!==15?",":")");return t+i}const IH=(n=>e=>ZB(e,n))([1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1]),DH=(n=>(e,t)=>ZB(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 FH(n){return n&&typeof n=="object"&&"current"in n}const kH=U.forwardRef(({children:n,eps:e=.001,style:t,className:i,prepend:r,center:s,fullscreen:o,portal:a,distanceFactor:l,sprite:u=!1,transform:h=!1,occlude:d,onOcclude:p,castShadow:m,receiveShadow:y,material:v,geometry:x,zIndexRange:A=[16777271,0],calculatePosition:_=TH,as:w="div",wrapperClass:M,pointerEvents:b="auto",...P},R)=>{const{gl:E,camera:B,scene:I,size:z,raycaster:Z,events:J,viewport:W}=Gi(),[Q]=U.useState(()=>document.createElement(w)),re=U.useRef(),ce=U.useRef(null),L=U.useRef(0),V=U.useRef([0,0]),H=U.useRef(null),$=U.useRef(null),G=(a==null?void 0:a.current)||J.connected||E.domElement.parentNode,se=U.useRef(null),me=U.useRef(!1),Y=U.useMemo(()=>d&&d!=="blending"||Array.isArray(d)&&d.length&&FH(d[0]),[d]);U.useLayoutEffect(()=>{const Te=E.domElement;d&&d==="blending"?(Te.style.zIndex=`${Math.floor(A[0]/2)}`,Te.style.position="absolute",Te.style.pointerEvents="none"):(Te.style.zIndex=null,Te.style.position=null,Te.style.pointerEvents=null)},[d]),U.useLayoutEffect(()=>{if(ce.current){const Te=re.current=QB(Q);if(I.updateMatrixWorld(),h)Q.style.cssText="position:absolute;top:0;left:0;pointer-events:none;overflow:hidden;";else{const we=_(ce.current,B,z);Q.style.cssText=`position:absolute;top:0;left:0;transform:translate3d(${we[0]}px,${we[1]}px,0);transform-origin:0 0;`}return G&&(r?G.prepend(Q):G.appendChild(Q)),()=>{G&&G.removeChild(Q),Te.unmount()}}},[G,h]),U.useLayoutEffect(()=>{M&&(Q.className=M)},[M]);const _e=U.useMemo(()=>h?{position:"absolute",top:0,left:0,width:z.width,height:z.height,transformStyle:"preserve-3d",pointerEvents:"none"}:{position:"absolute",transform:s?"translate3d(-50%,-50%,0)":"none",...o&&{top:-z.height/2,left:-z.width/2,width:z.width,height:z.height},...t},[t,s,o,z,h]),Ae=U.useMemo(()=>({position:"absolute",pointerEvents:b}),[b]);U.useLayoutEffect(()=>{if(me.current=!1,h){var Te;(Te=re.current)==null||Te.render(U.createElement("div",{ref:H,style:_e},U.createElement("div",{ref:$,style:Ae},U.createElement("div",{ref:R,className:i,style:t,children:n}))))}else{var we;(we=re.current)==null||we.render(U.createElement("div",{ref:R,style:_e,className:i,children:n}))}});const Ie=U.useRef(!0);fu(Te=>{if(ce.current){B.updateMatrixWorld(),ce.current.updateWorldMatrix(!0,!1);const we=h?V.current:_(ce.current,B,z);if(h||Math.abs(L.current-B.zoom)>e||Math.abs(V.current[0]-we[0])>e||Math.abs(V.current[1]-we[1])>e){const he=PH(ce.current,B);let de=!1;Y&&(Array.isArray(d)?de=d.map(Ye=>Ye.current):d!=="blending"&&(de=[I]));const Me=Ie.current;if(de){const Ye=BH(ce.current,B,Z,de);Ie.current=Ye&&!he}else Ie.current=!he;Me!==Ie.current&&(p?p(!Ie.current):Q.style.display=Ie.current?"block":"none");const Ge=Math.floor(A[0]/2),Be=d?Y?[A[0],Ge]:[Ge-1,0]:A;if(Q.style.zIndex=`${LH(ce.current,B,Be)}`,h){const[Ye,Je]=[z.width/2,z.height/2],et=B.projectionMatrix.elements[5]*Je,{isOrthographicCamera:vt,top:_t,left:N,bottom:D,right:ae}=B,Ce=IH(B.matrixWorldInverse),Ee=vt?`scale(${et})translate(${b1(-(ae+N)/2)}px,${b1((_t+D)/2)}px)`:`translateZ(${et}px)`;let Pe=ce.current.matrixWorld;u&&(Pe=B.matrixWorldInverse.clone().transpose().copyPosition(Pe).scale(ce.current.scale),Pe.elements[3]=Pe.elements[7]=Pe.elements[11]=0,Pe.elements[15]=1),Q.style.width=z.width+"px",Q.style.height=z.height+"px",Q.style.perspective=vt?"":`${et}px`,H.current&&$.current&&(H.current.style.transform=`${Ee}${Ce}translate(${Ye}px,${Je}px)`,$.current.style.transform=DH(Pe,1/((l||10)/400)))}else{const Ye=l===void 0?1:RH(ce.current,B)*l;Q.style.transform=`translate3d(${we[0]}px,${we[1]}px,0) scale(${Ye})`}V.current=we,L.current=B.zoom}}if(!Y&&se.current&&!me.current)if(h){if(H.current){const we=H.current.children[0];if(we!=null&&we.clientWidth&&we!=null&&we.clientHeight){const{isOrthographicCamera:he}=B;if(he||x)P.scale&&(Array.isArray(P.scale)?P.scale instanceof F?se.current.scale.copy(P.scale.clone().divideScalar(1)):se.current.scale.set(1/P.scale[0],1/P.scale[1],1/P.scale[2]):se.current.scale.setScalar(1/P.scale));else{const de=(l||10)/400,Me=we.clientWidth*de,Ge=we.clientHeight*de;se.current.scale.set(Me,Ge,1)}me.current=!0}}}else{const we=Q.children[0];if(we!=null&&we.clientWidth&&we!=null&&we.clientHeight){const he=1/W.factor,de=we.clientWidth*he,Me=we.clientHeight*he;se.current.scale.set(de,Me,1),me.current=!0}se.current.lookAt(Te.camera.position)}});const ke=U.useMemo(()=>({vertexShader:h?void 0:` /* This shader is from the THREE's SpriteMaterial. We need to turn the backing plane into a Sprite @@ -3337,19 +3337,19 @@ No matching component was found for: void main() { gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); } - `}),[h]);return U.createElement("group",_r({},P,{ref:ce}),d&&!Y&&U.createElement("mesh",{castShadow:m,receiveShadow:y,ref:se},x||U.createElement("planeGeometry",null),v||U.createElement("shaderMaterial",{side:Fr,vertexShader:ke.vertexShader,fragmentShader:ke.fragmentShader})))});let ef=0;const GH=RB(n=>(vc.onStart=(e,t,i)=>{n({active:!0,item:e,loaded:t,total:i,progress:(t-ef)/(i-ef)*100})},vc.onLoad=()=>{n({active:!1})},vc.onError=e=>n(t=>({errors:[...t.errors,e]})),vc.onProgress=(e,t,i)=>{t===i&&(ef=i),n({active:!0,item:e,loaded:t,total:i,progress:(t-ef)/(i-ef)*100||100})},{errors:[],active:!1,progress:0,item:"",loaded:0,total:0}));function NA(n){return function(e){n.forEach(function(t){typeof t=="function"?t(e):t!=null&&(t.current=e)})}}function jE(n,e){if(e===PP)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),n;if(e===Xm||e===K_){let t=n.getIndex();if(t===null){const o=[],a=n.getAttribute("position");if(a!==void 0){for(let l=0;le in n?VH(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,at=(n,e,t)=>(WH(n,typeof e!="symbol"?e+"":e,t),t);const Vp=new ru,JE=new Ds,jH=Math.cos(70*(Math.PI/180)),XE=(n,e)=>(n%e+e)%e;let JH=class extends ms{constructor(e,t){super(),at(this,"object"),at(this,"domElement"),at(this,"enabled",!0),at(this,"target",new F),at(this,"minDistance",0),at(this,"maxDistance",1/0),at(this,"minZoom",0),at(this,"maxZoom",1/0),at(this,"minPolarAngle",0),at(this,"maxPolarAngle",Math.PI),at(this,"minAzimuthAngle",-1/0),at(this,"maxAzimuthAngle",1/0),at(this,"enableDamping",!1),at(this,"dampingFactor",.05),at(this,"enableZoom",!0),at(this,"zoomSpeed",1),at(this,"enableRotate",!0),at(this,"rotateSpeed",1),at(this,"enablePan",!0),at(this,"panSpeed",1),at(this,"screenSpacePanning",!0),at(this,"keyPanSpeed",7),at(this,"zoomToCursor",!1),at(this,"autoRotate",!1),at(this,"autoRotateSpeed",2),at(this,"reverseOrbit",!1),at(this,"reverseHorizontalOrbit",!1),at(this,"reverseVerticalOrbit",!1),at(this,"keys",{LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"}),at(this,"mouseButtons",{LEFT:La.ROTATE,MIDDLE:La.DOLLY,RIGHT:La.PAN}),at(this,"touches",{ONE:Ia.ROTATE,TWO:Ia.DOLLY_PAN}),at(this,"target0"),at(this,"position0"),at(this,"zoom0"),at(this,"_domElementKeyEvents",null),at(this,"getPolarAngle"),at(this,"getAzimuthalAngle"),at(this,"setPolarAngle"),at(this,"setAzimuthalAngle"),at(this,"getDistance"),at(this,"listenToKeyEvents"),at(this,"stopListenToKeyEvents"),at(this,"saveState"),at(this,"reset"),at(this,"update"),at(this,"connect"),at(this,"dispose"),this.object=e,this.domElement=t,this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=()=>h.phi,this.getAzimuthalAngle=()=>h.theta,this.setPolarAngle=X=>{let ve=XE(X,2*Math.PI),ze=h.phi;ze<0&&(ze+=2*Math.PI),ve<0&&(ve+=2*Math.PI);let j=Math.abs(ve-ze);2*Math.PI-j{let ve=XE(X,2*Math.PI),ze=h.theta;ze<0&&(ze+=2*Math.PI),ve<0&&(ve+=2*Math.PI);let j=Math.abs(ve-ze);2*Math.PI-ji.object.position.distanceTo(i.target),this.listenToKeyEvents=X=>{X.addEventListener("keydown",Ke),this._domElementKeyEvents=X},this.stopListenToKeyEvents=()=>{this._domElementKeyEvents.removeEventListener("keydown",Ke),this._domElementKeyEvents=null},this.saveState=()=>{i.target0.copy(i.target),i.position0.copy(i.object.position),i.zoom0=i.object.zoom},this.reset=()=>{i.target.copy(i.target0),i.object.position.copy(i.position0),i.object.zoom=i.zoom0,i.object.updateProjectionMatrix(),i.dispatchEvent(r),i.update(),l=a.NONE},this.update=(()=>{const X=new F,ve=new F(0,1,0),ze=new Wn().setFromUnitVectors(e.up,ve),j=ze.clone().invert(),oe=new F,xe=new Wn,Le=2*Math.PI;return function(){const It=i.object.position;ze.setFromUnitVectors(e.up,ve),j.copy(ze).invert(),X.copy(It).sub(i.target),X.applyQuaternion(ze),h.setFromVector3(X),i.autoRotate&&l===a.NONE&&W(Z()),i.enableDamping?(h.theta+=d.theta*i.dampingFactor,h.phi+=d.phi*i.dampingFactor):(h.theta+=d.theta,h.phi+=d.phi);let Dt=i.minAzimuthAngle,zt=i.maxAzimuthAngle;isFinite(Dt)&&isFinite(zt)&&(Dt<-Math.PI?Dt+=Le:Dt>Math.PI&&(Dt-=Le),zt<-Math.PI?zt+=Le:zt>Math.PI&&(zt-=Le),Dt<=zt?h.theta=Math.max(Dt,Math.min(zt,h.theta)):h.theta=h.theta>(Dt+zt)/2?Math.max(Dt,h.theta):Math.min(zt,h.theta)),h.phi=Math.max(i.minPolarAngle,Math.min(i.maxPolarAngle,h.phi)),h.makeSafe(),i.enableDamping===!0?i.target.addScaledVector(m,i.dampingFactor):i.target.add(m),i.zoomToCursor&&B||i.object.isOrthographicCamera?h.radius=G(h.radius):h.radius=G(h.radius*p),X.setFromSpherical(h),X.applyQuaternion(j),It.copy(i.target).add(X),i.object.lookAt(i.target),i.enableDamping===!0?(d.theta*=1-i.dampingFactor,d.phi*=1-i.dampingFactor,m.multiplyScalar(1-i.dampingFactor)):(d.set(0,0,0),m.set(0,0,0));let kn=!1;if(i.zoomToCursor&&B){let Ft=null;if(i.object instanceof Jt&&i.object.isPerspectiveCamera){const yn=X.length();Ft=G(yn*p);const jn=yn-Ft;i.object.position.addScaledVector(R,jn),i.object.updateMatrixWorld()}else if(i.object.isOrthographicCamera){const yn=new F(E.x,E.y,0);yn.unproject(i.object),i.object.zoom=Math.max(i.minZoom,Math.min(i.maxZoom,i.object.zoom/p)),i.object.updateProjectionMatrix(),kn=!0;const jn=new F(E.x,E.y,0);jn.unproject(i.object),i.object.position.sub(jn).add(yn),i.object.updateMatrixWorld(),Ft=X.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),i.zoomToCursor=!1;Ft!==null&&(i.screenSpacePanning?i.target.set(0,0,-1).transformDirection(i.object.matrix).multiplyScalar(Ft).add(i.object.position):(Vp.origin.copy(i.object.position),Vp.direction.set(0,0,-1).transformDirection(i.object.matrix),Math.abs(i.object.up.dot(Vp.direction))u||8*(1-xe.dot(i.object.quaternion))>u?(i.dispatchEvent(r),oe.copy(i.object.position),xe.copy(i.object.quaternion),kn=!1,!0):!1}})(),this.connect=X=>{X===document&&console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'),i.domElement=X,i.domElement.style.touchAction="none",i.domElement.addEventListener("contextmenu",$e),i.domElement.addEventListener("pointerdown",_t),i.domElement.addEventListener("pointercancel",ae),i.domElement.addEventListener("wheel",Pe)},this.dispose=()=>{var X,ve,ze,j,oe,xe;(X=i.domElement)==null||X.removeEventListener("contextmenu",$e),(ve=i.domElement)==null||ve.removeEventListener("pointerdown",_t),(ze=i.domElement)==null||ze.removeEventListener("pointercancel",ae),(j=i.domElement)==null||j.removeEventListener("wheel",Pe),(oe=i.domElement)==null||oe.ownerDocument.removeEventListener("pointermove",N),(xe=i.domElement)==null||xe.ownerDocument.removeEventListener("pointerup",D),i._domElementKeyEvents!==null&&i._domElementKeyEvents.removeEventListener("keydown",Ke)};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 u=1e-6,h=new S1,d=new S1;let p=1;const m=new F,y=new pe,v=new pe,x=new pe,A=new pe,_=new pe,w=new pe,M=new pe,b=new pe,P=new pe,R=new F,E=new pe;let B=!1;const I=[],z={};function Z(){return 2*Math.PI/60/60*i.autoRotateSpeed}function J(){return Math.pow(.95,i.zoomSpeed)}function W(X){i.reverseOrbit||i.reverseHorizontalOrbit?d.theta+=X:d.theta-=X}function Q(X){i.reverseOrbit||i.reverseVerticalOrbit?d.phi+=X:d.phi-=X}const re=(()=>{const X=new F;return function(ze,j){X.setFromMatrixColumn(j,0),X.multiplyScalar(-ze),m.add(X)}})(),ce=(()=>{const X=new F;return function(ze,j){i.screenSpacePanning===!0?X.setFromMatrixColumn(j,1):(X.setFromMatrixColumn(j,0),X.crossVectors(i.object.up,X)),X.multiplyScalar(ze),m.add(X)}})(),L=(()=>{const X=new F;return function(ze,j){const oe=i.domElement;if(oe&&i.object instanceof Jt&&i.object.isPerspectiveCamera){const xe=i.object.position;X.copy(xe).sub(i.target);let Le=X.length();Le*=Math.tan(i.object.fov/2*Math.PI/180),re(2*ze*Le/oe.clientHeight,i.object.matrix),ce(2*j*Le/oe.clientHeight,i.object.matrix)}else oe&&i.object instanceof mr&&i.object.isOrthographicCamera?(re(ze*(i.object.right-i.object.left)/i.object.zoom/oe.clientWidth,i.object.matrix),ce(j*(i.object.top-i.object.bottom)/i.object.zoom/oe.clientHeight,i.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),i.enablePan=!1)}})();function V(X){i.object instanceof Jt&&i.object.isPerspectiveCamera||i.object instanceof mr&&i.object.isOrthographicCamera?p/=X:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),i.enableZoom=!1)}function H(X){i.object instanceof Jt&&i.object.isPerspectiveCamera||i.object instanceof mr&&i.object.isOrthographicCamera?p*=X:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),i.enableZoom=!1)}function $(X){if(!i.zoomToCursor||!i.domElement)return;B=!0;const ve=i.domElement.getBoundingClientRect(),ze=X.clientX-ve.left,j=X.clientY-ve.top,oe=ve.width,xe=ve.height;E.x=ze/oe*2-1,E.y=-(j/xe)*2+1,R.set(E.x,E.y,1).unproject(i.object).sub(i.object.position).normalize()}function G(X){return Math.max(i.minDistance,Math.min(i.maxDistance,X))}function se(X){y.set(X.clientX,X.clientY)}function me(X){$(X),M.set(X.clientX,X.clientY)}function Y(X){A.set(X.clientX,X.clientY)}function _e(X){v.set(X.clientX,X.clientY),x.subVectors(v,y).multiplyScalar(i.rotateSpeed);const ve=i.domElement;ve&&(W(2*Math.PI*x.x/ve.clientHeight),Q(2*Math.PI*x.y/ve.clientHeight)),y.copy(v),i.update()}function Ae(X){b.set(X.clientX,X.clientY),P.subVectors(b,M),P.y>0?V(J()):P.y<0&&H(J()),M.copy(b),i.update()}function Ie(X){_.set(X.clientX,X.clientY),w.subVectors(_,A).multiplyScalar(i.panSpeed),L(w.x,w.y),A.copy(_),i.update()}function ke(X){$(X),X.deltaY<0?H(J()):X.deltaY>0&&V(J()),i.update()}function Te(X){let ve=!1;switch(X.code){case i.keys.UP:L(0,i.keyPanSpeed),ve=!0;break;case i.keys.BOTTOM:L(0,-i.keyPanSpeed),ve=!0;break;case i.keys.LEFT:L(i.keyPanSpeed,0),ve=!0;break;case i.keys.RIGHT:L(-i.keyPanSpeed,0),ve=!0;break}ve&&(X.preventDefault(),i.update())}function we(){if(I.length==1)y.set(I[0].pageX,I[0].pageY);else{const X=.5*(I[0].pageX+I[1].pageX),ve=.5*(I[0].pageY+I[1].pageY);y.set(X,ve)}}function he(){if(I.length==1)A.set(I[0].pageX,I[0].pageY);else{const X=.5*(I[0].pageX+I[1].pageX),ve=.5*(I[0].pageY+I[1].pageY);A.set(X,ve)}}function de(){const X=I[0].pageX-I[1].pageX,ve=I[0].pageY-I[1].pageY,ze=Math.sqrt(X*X+ve*ve);M.set(0,ze)}function Me(){i.enableZoom&&de(),i.enablePan&&he()}function Ge(){i.enableZoom&&de(),i.enableRotate&&we()}function Be(X){if(I.length==1)v.set(X.pageX,X.pageY);else{const ze=Qe(X),j=.5*(X.pageX+ze.x),oe=.5*(X.pageY+ze.y);v.set(j,oe)}x.subVectors(v,y).multiplyScalar(i.rotateSpeed);const ve=i.domElement;ve&&(W(2*Math.PI*x.x/ve.clientHeight),Q(2*Math.PI*x.y/ve.clientHeight)),y.copy(v)}function Ye(X){if(I.length==1)_.set(X.pageX,X.pageY);else{const ve=Qe(X),ze=.5*(X.pageX+ve.x),j=.5*(X.pageY+ve.y);_.set(ze,j)}w.subVectors(_,A).multiplyScalar(i.panSpeed),L(w.x,w.y),A.copy(_)}function Je(X){const ve=Qe(X),ze=X.pageX-ve.x,j=X.pageY-ve.y,oe=Math.sqrt(ze*ze+j*j);b.set(0,oe),P.set(0,Math.pow(b.y/M.y,i.zoomSpeed)),V(P.y),M.copy(b)}function et(X){i.enableZoom&&Je(X),i.enablePan&&Ye(X)}function vt(X){i.enableZoom&&Je(X),i.enableRotate&&Be(X)}function _t(X){var ve,ze;i.enabled!==!1&&(I.length===0&&((ve=i.domElement)==null||ve.ownerDocument.addEventListener("pointermove",N),(ze=i.domElement)==null||ze.ownerDocument.addEventListener("pointerup",D)),je(X),X.pointerType==="touch"?Oe(X):Ce(X))}function N(X){i.enabled!==!1&&(X.pointerType==="touch"?ye(X):Ee(X))}function D(X){var ve,ze,j;rt(X),I.length===0&&((ve=i.domElement)==null||ve.releasePointerCapture(X.pointerId),(ze=i.domElement)==null||ze.ownerDocument.removeEventListener("pointermove",N),(j=i.domElement)==null||j.ownerDocument.removeEventListener("pointerup",D)),i.dispatchEvent(o),l=a.NONE}function ae(X){rt(X)}function Ce(X){let ve;switch(X.button){case 0:ve=i.mouseButtons.LEFT;break;case 1:ve=i.mouseButtons.MIDDLE;break;case 2:ve=i.mouseButtons.RIGHT;break;default:ve=-1}switch(ve){case La.DOLLY:if(i.enableZoom===!1)return;me(X),l=a.DOLLY;break;case La.ROTATE:if(X.ctrlKey||X.metaKey||X.shiftKey){if(i.enablePan===!1)return;Y(X),l=a.PAN}else{if(i.enableRotate===!1)return;se(X),l=a.ROTATE}break;case La.PAN:if(X.ctrlKey||X.metaKey||X.shiftKey){if(i.enableRotate===!1)return;se(X),l=a.ROTATE}else{if(i.enablePan===!1)return;Y(X),l=a.PAN}break;default:l=a.NONE}l!==a.NONE&&i.dispatchEvent(s)}function Ee(X){if(i.enabled!==!1)switch(l){case a.ROTATE:if(i.enableRotate===!1)return;_e(X);break;case a.DOLLY:if(i.enableZoom===!1)return;Ae(X);break;case a.PAN:if(i.enablePan===!1)return;Ie(X);break}}function Pe(X){i.enabled===!1||i.enableZoom===!1||l!==a.NONE&&l!==a.ROTATE||(X.preventDefault(),i.dispatchEvent(s),ke(X),i.dispatchEvent(o))}function Ke(X){i.enabled===!1||i.enablePan===!1||Te(X)}function Oe(X){switch(tt(X),I.length){case 1:switch(i.touches.ONE){case Ia.ROTATE:if(i.enableRotate===!1)return;we(),l=a.TOUCH_ROTATE;break;case Ia.PAN:if(i.enablePan===!1)return;he(),l=a.TOUCH_PAN;break;default:l=a.NONE}break;case 2:switch(i.touches.TWO){case Ia.DOLLY_PAN:if(i.enableZoom===!1&&i.enablePan===!1)return;Me(),l=a.TOUCH_DOLLY_PAN;break;case Ia.DOLLY_ROTATE:if(i.enableZoom===!1&&i.enableRotate===!1)return;Ge(),l=a.TOUCH_DOLLY_ROTATE;break;default:l=a.NONE}break;default:l=a.NONE}l!==a.NONE&&i.dispatchEvent(s)}function ye(X){switch(tt(X),l){case a.TOUCH_ROTATE:if(i.enableRotate===!1)return;Be(X),i.update();break;case a.TOUCH_PAN:if(i.enablePan===!1)return;Ye(X),i.update();break;case a.TOUCH_DOLLY_PAN:if(i.enableZoom===!1&&i.enablePan===!1)return;et(X),i.update();break;case a.TOUCH_DOLLY_ROTATE:if(i.enableZoom===!1&&i.enableRotate===!1)return;vt(X),i.update();break;default:l=a.NONE}}function $e(X){i.enabled!==!1&&X.preventDefault()}function je(X){I.push(X)}function rt(X){delete z[X.pointerId];for(let ve=0;ve=2.0 are supported."));return}const l=new S6(s,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});l.fileLoader.setRequestHeader(this.requestHeader);for(let u=0;u=0&&a[h]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+h+'".')}}l.setExtensions(o),l.setPlugins(a),l.parse(i,r)}parseAsync(e,t){const i=this;return new Promise(function(r,s){i.parse(e,t,r,s)})}}function XH(){let n={};return{get:function(e){return n[e]},add:function(e,t){n[e]=t},remove:function(e){delete n[e]},removeAll:function(){n={}}}}const St={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class YH{constructor(e){this.parser=e,this.name=St.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,t=this.parser.json.nodes||[];for(let i=0,r=t.length;i=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,s.source,o)}}class o6{constructor(e){this.parser=e,this.name=St.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const t=this.name,i=this.parser,r=i.json,s=r.textures[e];if(!s.extensions||!s.extensions[t])return null;const o=s.extensions[t],a=r.images[o.source];let l=i.textureLoader;if(a.uri){const u=i.options.manager.getHandler(a.uri);u!==null&&(l=u)}return this.detectSupport().then(function(u){if(u)return i.loadTextureImage(e,o.source,l);if(r.extensionsRequired&&r.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return i.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",t.onload=t.onerror=function(){e(t.height===1)}})),this.isSupported}}class a6{constructor(e){this.parser=e,this.name=St.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const t=this.name,i=this.parser,r=i.json,s=r.textures[e];if(!s.extensions||!s.extensions[t])return null;const o=s.extensions[t],a=r.images[o.source];let l=i.textureLoader;if(a.uri){const u=i.options.manager.getHandler(a.uri);u!==null&&(l=u)}return this.detectSupport().then(function(u){if(u)return i.loadTextureImage(e,o.source,l);if(r.extensionsRequired&&r.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return i.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",t.onload=t.onerror=function(){e(t.height===1)}})),this.isSupported}}class l6{constructor(e){this.name=St.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const t=this.parser.json,i=t.bufferViews[e];if(i.extensions&&i.extensions[this.name]){const r=i.extensions[this.name],s=this.parser.getDependency("buffer",r.buffer),o=this.parser.options.meshoptDecoder;if(!o||!o.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return s.then(function(a){const l=r.byteOffset||0,u=r.byteLength||0,h=r.count,d=r.byteStride,p=new Uint8Array(a,l,u);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(h,d,p,r.mode,r.filter).then(function(m){return m.buffer}):o.ready.then(function(){const m=new ArrayBuffer(h*d);return o.decodeGltfBuffer(new Uint8Array(m),h,d,p,r.mode,r.filter),m})})}else return null}}class c6{constructor(e){this.name=St.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const t=this.parser.json,i=t.nodes[e];if(!i.extensions||!i.extensions[this.name]||i.mesh===void 0)return null;const r=t.meshes[i.mesh];for(const u of r.primitives)if(u.mode!==cr.TRIANGLES&&u.mode!==cr.TRIANGLE_STRIP&&u.mode!==cr.TRIANGLE_FAN&&u.mode!==void 0)return null;const o=i.extensions[this.name].attributes,a=[],l={};for(const u in o)a.push(this.parser.getDependency("accessor",o[u]).then(h=>(l[u]=h,l[u])));return a.length<1?null:(a.push(this.parser.createNodeMesh(e)),Promise.all(a).then(u=>{const h=u.pop(),d=h.isGroup?h.children:[h],p=u[0].count,m=[];for(const y of d){const v=new ot,x=new F,A=new Wn,_=new F(1,1,1),w=new uA(y.geometry,y.material,p);for(let M=0;M=152?{TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3"}:{TEXCOORD_0:"uv",TEXCOORD_1:"uv2"},COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},yo={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},g6={CUBICSPLINE:void 0,LINEAR:ul,STEP:Vc},Cv={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function y6(n){return n.DefaultMaterial===void 0&&(n.DefaultMaterial=new Dh({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:hs})),n.DefaultMaterial}function ba(n,e,t){for(const i in t.extensions)n[i]===void 0&&(e.userData.gltfExtensions=e.userData.gltfExtensions||{},e.userData.gltfExtensions[i]=t.extensions[i])}function So(n,e){e.extras!==void 0&&(typeof e.extras=="object"?Object.assign(n.userData,e.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+e.extras))}function v6(n,e,t){let i=!1,r=!1,s=!1;for(let u=0,h=e.length;u0||n.search(/^data\:image\/jpeg/)===0?"image/jpeg":n.search(/\.webp($|\?)/i)>0||n.search(/^data\:image\/webp/)===0?"image/webp":"image/png"}const w6=new ot;class S6{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new XH,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let i=!1,r=!1,s=-1;typeof navigator<"u"&&typeof navigator.userAgent<"u"&&(i=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)===!0,r=navigator.userAgent.indexOf("Firefox")>-1,s=r?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),typeof createImageBitmap>"u"||i||r&&s<98?this.textureLoader=new Fh(this.options.manager):this.textureLoader=new EB(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new Xi(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){const i=this,r=this.json,s=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(o){return o._markDefs&&o._markDefs()}),Promise.all(this._invokeAll(function(o){return o.beforeRoot&&o.beforeRoot()})).then(function(){return Promise.all([i.getDependencies("scene"),i.getDependencies("animation"),i.getDependencies("camera")])}).then(function(o){const a={scene:o[0][r.scene||0],scenes:o[0],animations:o[1],cameras:o[2],asset:r.asset,parser:i,userData:{}};ba(s,a,r),So(a,r),Promise.all(i._invokeAll(function(l){return l.afterRoot&&l.afterRoot(a)})).then(function(){e(a)})}).catch(t)}_markDefs(){const e=this.json.nodes||[],t=this.json.skins||[],i=this.json.meshes||[];for(let r=0,s=t.length;r{const l=this.associations.get(o);l!=null&&this.associations.set(a,l);for(const[u,h]of o.children.entries())s(h,a.children[u])};return s(i,r),r.name+="_instance_"+e.uses[t]++,r}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let i=0;i=2&&x.setY(B,P[R*l+1]),l>=3&&x.setZ(B,P[R*l+2]),l>=4&&x.setW(B,P[R*l+3]),l>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return x})}loadTexture(e){const t=this.json,i=this.options,s=t.textures[e].source,o=t.images[s];let a=this.textureLoader;if(o.uri){const l=i.manager.getHandler(o.uri);l!==null&&(a=l)}return this.loadTextureImage(e,s,a)}loadTextureImage(e,t,i){const r=this,s=this.json,o=s.textures[e],a=s.images[t],l=(a.uri||a.bufferView)+":"+o.sampler;if(this.textureCache[l])return this.textureCache[l];const u=this.loadImageSource(t,i).then(function(h){h.flipY=!1,h.name=o.name||a.name||"",h.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(h.name=a.uri);const p=(s.samplers||{})[o.sampler]||{};return h.magFilter=KE[p.magFilter]||nn,h.minFilter=KE[p.minFilter]||ds,h.wrapS=QE[p.wrapS]||Yo,h.wrapT=QE[p.wrapT]||Yo,r.associations.set(h,{textures:e}),h}).catch(function(){return null});return this.textureCache[l]=u,u}loadImageSource(e,t){const i=this,r=this.json,s=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(d=>d.clone());const o=r.images[e],a=self.URL||self.webkitURL;let l=o.uri||"",u=!1;if(o.bufferView!==void 0)l=i.getDependency("bufferView",o.bufferView).then(function(d){u=!0;const p=new Blob([d],{type:o.mimeType});return l=a.createObjectURL(p),l});else if(o.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const h=Promise.resolve(l).then(function(d){return new Promise(function(p,m){let y=p;t.isImageBitmapLoader===!0&&(y=function(v){const x=new $t(v);x.needsUpdate=!0,p(x)}),t.load(us.resolveURL(d,s.path),y,void 0,m)})}).then(function(d){return u===!0&&a.revokeObjectURL(l),d.userData.mimeType=o.mimeType||A6(o.uri),d}).catch(function(d){throw console.error("THREE.GLTFLoader: Couldn't load texture",l),d});return this.sourceCache[e]=h,h}assignTexture(e,t,i,r){const s=this;return this.getDependency("texture",i.index).then(function(o){if(!o)return null;if(i.texCoord!==void 0&&i.texCoord>0&&(o=o.clone(),o.channel=i.texCoord),s.extensions[St.KHR_TEXTURE_TRANSFORM]){const a=i.extensions!==void 0?i.extensions[St.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const l=s.associations.get(o);o=s.extensions[St.KHR_TEXTURE_TRANSFORM].extendTexture(o,a),s.associations.set(o,l)}}return r!==void 0&&("colorSpace"in o?o.colorSpace=r===3001?"srgb":"srgb-linear":o.encoding=r),e[t]=o,o})}assignFinalMaterial(e){const t=e.geometry;let i=e.material;const r=t.attributes.tangent===void 0,s=t.attributes.color!==void 0,o=t.attributes.normal===void 0;if(e.isPoints){const a="PointsMaterial:"+i.uuid;let l=this.cache.get(a);l||(l=new Ah,Pn.prototype.copy.call(l,i),l.color.copy(i.color),l.map=i.map,l.sizeAttenuation=!1,this.cache.add(a,l)),i=l}else if(e.isLine){const a="LineBasicMaterial:"+i.uuid;let l=this.cache.get(a);l||(l=new ui,Pn.prototype.copy.call(l,i),l.color.copy(i.color),l.map=i.map,this.cache.add(a,l)),i=l}if(r||s||o){let a="ClonedMaterial:"+i.uuid+":";r&&(a+="derivative-tangents:"),s&&(a+="vertex-colors:"),o&&(a+="flat-shading:");let l=this.cache.get(a);l||(l=i.clone(),s&&(l.vertexColors=!0),o&&(l.flatShading=!0),r&&(l.normalScale&&(l.normalScale.y*=-1),l.clearcoatNormalScale&&(l.clearcoatNormalScale.y*=-1)),this.cache.add(a,l),this.associations.set(l,this.associations.get(i))),i=l}e.material=i}getMaterialType(){return Dh}loadMaterial(e){const t=this,i=this.json,r=this.extensions,s=i.materials[e];let o;const a={},l=s.extensions||{},u=[];if(l[St.KHR_MATERIALS_UNLIT]){const d=r[St.KHR_MATERIALS_UNLIT];o=d.getMaterialType(),u.push(d.extendParams(a,s,t))}else{const d=s.pbrMetallicRoughness||{};if(a.color=new De(1,1,1),a.opacity=1,Array.isArray(d.baseColorFactor)){const p=d.baseColorFactor;a.color.fromArray(p),a.opacity=p[3]}d.baseColorTexture!==void 0&&u.push(t.assignTexture(a,"map",d.baseColorTexture,3001)),a.metalness=d.metallicFactor!==void 0?d.metallicFactor:1,a.roughness=d.roughnessFactor!==void 0?d.roughnessFactor:1,d.metallicRoughnessTexture!==void 0&&(u.push(t.assignTexture(a,"metalnessMap",d.metallicRoughnessTexture)),u.push(t.assignTexture(a,"roughnessMap",d.metallicRoughnessTexture))),o=this._invokeOne(function(p){return p.getMaterialType&&p.getMaterialType(e)}),u.push(Promise.all(this._invokeAll(function(p){return p.extendMaterialParams&&p.extendMaterialParams(e,a)})))}s.doubleSided===!0&&(a.side=Fr);const h=s.alphaMode||Cv.OPAQUE;if(h===Cv.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,h===Cv.MASK&&(a.alphaTest=s.alphaCutoff!==void 0?s.alphaCutoff:.5)),s.normalTexture!==void 0&&o!==Vi&&(u.push(t.assignTexture(a,"normalMap",s.normalTexture)),a.normalScale=new pe(1,1),s.normalTexture.scale!==void 0)){const d=s.normalTexture.scale;a.normalScale.set(d,d)}return s.occlusionTexture!==void 0&&o!==Vi&&(u.push(t.assignTexture(a,"aoMap",s.occlusionTexture)),s.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=s.occlusionTexture.strength)),s.emissiveFactor!==void 0&&o!==Vi&&(a.emissive=new De().fromArray(s.emissiveFactor)),s.emissiveTexture!==void 0&&o!==Vi&&u.push(t.assignTexture(a,"emissiveMap",s.emissiveTexture,3001)),Promise.all(u).then(function(){const d=new o(a);return s.name&&(d.name=s.name),So(d,s),t.associations.set(d,{materials:e}),s.extensions&&ba(r,d,s),d})}createUniqueName(e){const t=Et.sanitizeNodeName(e||"");return t in this.nodeNamesUsed?t+"_"+ ++this.nodeNamesUsed[t]:(this.nodeNamesUsed[t]=0,t)}loadGeometries(e){const t=this,i=this.extensions,r=this.primitiveCache;function s(a){return i[St.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,t).then(function(l){return ZE(l,a,t)})}const o=[];for(let a=0,l=e.length;a0&&x6(A,s),A.name=t.createUniqueName(s.name||"mesh_"+e),So(A,s),x.extensions&&ba(r,A,x),t.assignFinalMaterial(A),d.push(A)}for(let m=0,y=d.length;m1?h=new Gs:u.length===1?h=u[0]:h=new Mt,h!==u[0])for(let d=0,p=u.length;d{const d=new Map;for(const[p,m]of r.associations)(p instanceof Pn||p instanceof $t)&&d.set(p,m);return h.traverse(p=>{const m=r.associations.get(p);m!=null&&d.set(p,m)}),d};return r.associations=u(s),s})}}function M6(n,e,t){const i=e.attributes,r=new ra;if(i.POSITION!==void 0){const a=t.json.accessors[i.POSITION],l=a.min,u=a.max;if(l!==void 0&&u!==void 0){if(r.set(new F(l[0],l[1],l[2]),new F(u[0],u[1],u[2])),a.normalized){const h=B1(Lc[a.componentType]);r.min.multiplyScalar(h),r.max.multiplyScalar(h)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;const s=e.targets;if(s!==void 0){const a=new F,l=new F;for(let u=0,h=s.length;u0,b=J>0,P=W>0,R=(M?1:0)+(b?1:0)+(P?1:0),R){case 0:{A.push(v[w]),A.push(v[w+1]),A.push(v[w+2]);break}case 1:{if(M&&(E=v[w+1],B=v[w+2],I=y(v[w],E,x,_),z=y(v[w],B,x,_)),b){E=v[w],B=v[w+2],I=y(v[w+1],E,x,_),z=y(v[w+1],B,x,_),A.push(I),A.push(B.clone()),A.push(E.clone()),A.push(B.clone()),A.push(I.clone()),A.push(z);break}P&&(E=v[w],B=v[w+1],I=y(v[w+2],E,x,_),z=y(v[w+2],B,x,_)),A.push(E.clone()),A.push(B.clone()),A.push(I),A.push(z),A.push(I.clone()),A.push(B.clone());break}case 2:{M||(E=v[w].clone(),B=y(E,v[w+1],x,_),I=y(E,v[w+2],x,_),A.push(E),A.push(B),A.push(I)),b||(E=v[w+1].clone(),B=y(E,v[w+2],x,_),I=y(E,v[w],x,_),A.push(E),A.push(B),A.push(I)),P||(E=v[w+2].clone(),B=y(E,v[w],x,_),I=y(E,v[w+1],x,_),A.push(E),A.push(B),A.push(I));break}}}return A}function y(v,x,A,_){const w=v.position.dot(A)-_,M=x.position.dot(A)-_,b=w/(w-M);return new qE(new F(v.position.x+b*(x.position.x-v.position.x),v.position.y+b*(x.position.y-v.position.y),v.position.z+b*(x.position.z-v.position.z)),new F(v.normal.x+b*(x.normal.x-v.normal.x),v.normal.y+b*(x.normal.y-v.normal.y),v.normal.z+b*(x.normal.z-v.normal.z)))}}}class qE{constructor(e,t){this.position=e,this.normal=t}clone(){return new this.constructor(this.position.clone(),this.normal.clone())}}const bv=new WeakMap;class E6 extends Ai{constructor(e){super(e),this.decoderPath="",this.decoderConfig={},this.decoderBinary=null,this.decoderPending=null,this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL="",this.defaultAttributeIDs={position:"POSITION",normal:"NORMAL",color:"COLOR",uv:"TEX_COORD"},this.defaultAttributeTypes={position:"Float32Array",normal:"Float32Array",color:"Float32Array",uv:"Float32Array"}}setDecoderPath(e){return this.decoderPath=e,this}setDecoderConfig(e){return this.decoderConfig=e,this}setWorkerLimit(e){return this.workerLimit=e,this}load(e,t,i,r){const s=new Xi(this.manager);s.setPath(this.path),s.setResponseType("arraybuffer"),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(e,o=>{const a={attributeIDs:this.defaultAttributeIDs,attributeTypes:this.defaultAttributeTypes,useUniqueIDs:!1};this.decodeGeometry(o,a).then(t).catch(r)},i,r)}decodeDracoFile(e,t,i,r){const s={attributeIDs:i||this.defaultAttributeIDs,attributeTypes:r||this.defaultAttributeTypes,useUniqueIDs:!!i};this.decodeGeometry(e,s).then(t)}decodeGeometry(e,t){for(const l in t.attributeTypes){const u=t.attributeTypes[l];u.BYTES_PER_ELEMENT!==void 0&&(t.attributeTypes[l]=u.name)}const i=JSON.stringify(t);if(bv.has(e)){const l=bv.get(e);if(l.key===i)return l.promise;if(e.byteLength===0)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}let r;const s=this.workerNextTaskID++,o=e.byteLength,a=this._getWorker(s,o).then(l=>(r=l,new Promise((u,h)=>{r._callbacks[s]={resolve:u,reject:h},r.postMessage({type:"decode",id:s,taskConfig:t,buffer:e},[e])}))).then(l=>this._createGeometry(l.geometry));return a.catch(()=>!0).then(()=>{r&&s&&this._releaseTask(r,s)}),bv.set(e,{key:i,promise:a}),a}_createGeometry(e){const t=new ft;e.index&&t.setIndex(new Lt(e.index.array,1));for(let i=0;i{i.load(e,r,void 0,s)})}preload(){return this._initDecoder(),this}_initDecoder(){if(this.decoderPending)return this.decoderPending;const e=typeof WebAssembly!="object"||this.decoderConfig.type==="js",t=[];return e?t.push(this._loadLibrary("draco_decoder.js","text")):(t.push(this._loadLibrary("draco_wasm_wrapper.js","text")),t.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(t).then(i=>{const r=i[0];e||(this.decoderConfig.wasmBinary=i[1]);const s=b6.toString(),o=["/* draco decoder */",r,"","/* worker */",s.substring(s.indexOf("{")+1,s.lastIndexOf("}"))].join(` -`);this.workerSourceURL=URL.createObjectURL(new Blob([o]))}),this.decoderPending}_getWorker(e,t){return this._initDecoder().then(()=>{if(this.workerPool.lengths._taskLoad?-1:1});const i=this.workerPool[this.workerPool.length-1];return i._taskCosts[e]=t,i._taskLoad+=t,i})}_releaseTask(e,t){e._taskLoad-=e._taskCosts[t],delete e._callbacks[t],delete e._taskCosts[t]}debug(){console.log("Task load: ",this.workerPool.map(e=>e._taskLoad))}dispose(){for(let e=0;e{const d=h.draco,p=new d.Decoder,m=new d.DecoderBuffer;m.Init(new Int8Array(l),l.byteLength);try{const y=t(d,p,m,u),v=y.attributes.map(x=>x.array.buffer);y.index&&v.push(y.index.array.buffer),self.postMessage({type:"decode",id:a.id,geometry:y},v)}catch(y){console.error(y),self.postMessage({type:"error",id:a.id,error:y.message})}finally{d.destroy(m),d.destroy(p)}});break}};function t(o,a,l,u){const h=u.attributeIDs,d=u.attributeTypes;let p,m;const y=a.GetEncodedGeometryType(l);if(y===o.TRIANGULAR_MESH)p=new o.Mesh,m=a.DecodeBufferToMesh(l,p);else if(y===o.POINT_CLOUD)p=new o.PointCloud,m=a.DecodeBufferToPointCloud(l,p);else throw new Error("THREE.DRACOLoader: Unexpected geometry type.");if(!m.ok()||p.ptr===0)throw new Error("THREE.DRACOLoader: Decoding failed: "+m.error_msg());const v={index:null,attributes:[]};for(const x in h){const A=self[d[x]];let _,w;if(u.useUniqueIDs)w=h[x],_=a.GetAttributeByUniqueId(p,w);else{if(w=a.GetAttributeId(p,o[h[x]]),w===-1)continue;_=a.GetAttribute(p,w)}v.attributes.push(r(o,a,p,x,A,_))}return y===o.TRIANGULAR_MESH&&(v.index=i(o,a,p)),o.destroy(p),v}function i(o,a,l){const h=l.num_faces()*3,d=h*4,p=o._malloc(d);a.GetTrianglesUInt32Array(l,d,p);const m=new Uint32Array(o.HEAPF32.buffer,p,h).slice();return o._free(p),{array:m,itemSize:1}}function r(o,a,l,u,h,d){const p=d.num_components(),y=l.num_points()*p,v=y*h.BYTES_PER_ELEMENT,x=s(o,h),A=o._malloc(v);a.GetAttributeDataArrayForAllPoints(l,d,x,v,A);const _=new h(o.HEAPF32.buffer,A,y).slice();return o._free(A),{name:u,array:_,itemSize:p}}function s(o,a){switch(a){case Float32Array:return o.DT_FLOAT32;case Int8Array:return o.DT_INT8;case Int16Array:return o.DT_INT16;case Int32Array:return o.DT_INT32;case Uint8Array:return o.DT_UINT8;case Uint16Array:return o.DT_UINT16;case Uint32Array:return o.DT_UINT32}}}let Wp;const Tv=()=>{if(Wp)return Wp;const n="B9h9z9tFBBBF8fL9gBB9gLaaaaaFa9gEaaaB9gFaFa9gEaaaFaEMcBFFFGGGEIIILF9wFFFLEFBFKNFaFCx/IFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBF8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBGy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBEn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBIi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBKI9z9iqlBOc+x8ycGBM/qQFTa8jUUUUBCU/EBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAGTkUUUBRNCUoBAG9uC/wgBZHKCUGAKCUG9JyRVAECFJRICBRcGXEXAcAF9PQFAVAFAclAcAVJAF9JyRMGXGXAG9FQBAMCbJHKC9wZRSAKCIrCEJCGrRQANCUGJRfCBRbAIRTEXGXAOATlAQ9PQBCBRISEMATAQJRIGXAS9FQBCBRtCBREEXGXAOAIlCi9PQBCBRISLMANCU/CBJAEJRKGXGXGXGXGXATAECKrJ2BBAtCKZrCEZfIBFGEBMAKhB83EBAKCNJhB83EBSEMAKAI2BIAI2BBHmCKrHYAYCE6HYy86BBAKCFJAICIJAYJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCGJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCEJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCIJAYAmJHY2BBAI2BFHmCKrHPAPCE6HPy86BBAKCLJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCKJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCOJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCNJAYAmJHY2BBAI2BGHmCKrHPAPCE6HPy86BBAKCVJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCcJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCMJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCSJAYAmJHm2BBAI2BEHICKrHYAYCE6HYy86BBAKCQJAmAYJHm2BBAICIrCEZHYAYCE6HYy86BBAKCfJAmAYJHm2BBAICGrCEZHYAYCE6HYy86BBAKCbJAmAYJHK2BBAICEZHIAICE6HIy86BBAKAIJRISGMAKAI2BNAI2BBHmCIrHYAYCb6HYy86BBAKCFJAICNJAYJHY2BBAmCbZHmAmCb6Hmy86BBAKCGJAYAmJHm2BBAI2BFHYCIrHPAPCb6HPy86BBAKCEJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCIJAmAYJHm2BBAI2BGHYCIrHPAPCb6HPy86BBAKCLJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCKJAmAYJHm2BBAI2BEHYCIrHPAPCb6HPy86BBAKCOJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCNJAmAYJHm2BBAI2BIHYCIrHPAPCb6HPy86BBAKCVJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCcJAmAYJHm2BBAI2BLHYCIrHPAPCb6HPy86BBAKCMJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCSJAmAYJHm2BBAI2BKHYCIrHPAPCb6HPy86BBAKCQJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCfJAmAYJHm2BBAI2BOHICIrHYAYCb6HYy86BBAKCbJAmAYJHK2BBAICbZHIAICb6HIy86BBAKAIJRISFMAKAI8pBB83BBAKCNJAICNJ8pBB83BBAICTJRIMAtCGJRtAECTJHEAS9JQBMMGXAIQBCBRISEMGXAM9FQBANAbJ2BBRtCBRKAfREEXAEANCU/CBJAKJ2BBHTCFrCBATCFZl9zAtJHt86BBAEAGJREAKCFJHKAM9HQBMMAfCFJRfAIRTAbCFJHbAG9HQBMMABAcAG9sJANCUGJAMAG9sTkUUUBpANANCUGJAMCaJAG9sJAGTkUUUBpMAMCBAIyAcJRcAIQBMC9+RKSFMCBC99AOAIlAGCAAGCA9Ly6yRKMALCU/EBJ8kUUUUBAKM+OmFTa8jUUUUBCoFlHL8kUUUUBC9+RKGXAFCE9uHOCtJAI9LQBCaRKAE2BBHNC/wFZC/gF9HQBANCbZHVCF9LQBALCoBJCgFCUFT+JUUUBpALC84Jha83EBALC8wJha83EBALC8oJha83EBALCAJha83EBALCiJha83EBALCTJha83EBALha83ENALha83EBAEAIJC9wJRcAECFJHNAOJRMGXAF9FQBCQCbAVCF6yRSABRECBRVCBRQCBRfCBRICBRKEXGXAMAcuQBC9+RKSEMGXGXAN2BBHOC/vF9LQBALCoBJAOCIrCa9zAKJCbZCEWJHb8oGIRTAb8oGBRtGXAOCbZHbAS9PQBALAOCa9zAIJCbZCGWJ8oGBAVAbyROAb9FRbGXGXAGCG9HQBABAt87FBABCIJAO87FBABCGJAT87FBSFMAEAtjGBAECNJAOjGBAECIJATjGBMAVAbJRVALCoBJAKCEWJHmAOjGBAmATjGIALAICGWJAOjGBALCoBJAKCFJCbZHKCEWJHTAtjGBATAOjGIAIAbJRIAKCFJRKSGMGXGXAbCb6QBAQAbJAbC989zJCFJRQSFMAM1BBHbCgFZROGXGXAbCa9MQBAMCFJRMSFMAM1BFHbCgBZCOWAOCgBZqROGXAbCa9MQBAMCGJRMSFMAM1BGHbCgBZCfWAOqROGXAbCa9MQBAMCEJRMSFMAM1BEHbCgBZCdWAOqROGXAbCa9MQBAMCIJRMSFMAM2BIC8cWAOqROAMCLJRMMAOCFrCBAOCFZl9zAQJRQMGXGXAGCG9HQBABAt87FBABCIJAQ87FBABCGJAT87FBSFMAEAtjGBAECNJAQjGBAECIJATjGBMALCoBJAKCEWJHOAQjGBAOATjGIALAICGWJAQjGBALCoBJAKCFJCbZHKCEWJHOAtjGBAOAQjGIAICFJRIAKCFJRKSFMGXAOCDF9LQBALAIAcAOCbZJ2BBHbCIrHTlCbZCGWJ8oGBAVCFJHtATyROALAIAblCbZCGWJ8oGBAtAT9FHmJHtAbCbZHTyRbAT9FRTGXGXAGCG9HQBABAV87FBABCIJAb87FBABCGJAO87FBSFMAEAVjGBAECNJAbjGBAECIJAOjGBMALAICGWJAVjGBALCoBJAKCEWJHYAOjGBAYAVjGIALAICFJHICbZCGWJAOjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAIAmJCbZHICGWJAbjGBALCoBJAKCGJCbZHKCEWJHOAVjGBAOAbjGIAKCFJRKAIATJRIAtATJRVSFMAVCBAM2BBHYyHTAOC/+F6HPJROAYCbZRtGXGXAYCIrHmQBAOCFJRbSFMAORbALAIAmlCbZCGWJ8oGBROMGXGXAtQBAbCFJRVSFMAbRVALAIAYlCbZCGWJ8oGBRbMGXGXAP9FQBAMCFJRYSFMAM1BFHYCgFZRTGXGXAYCa9MQBAMCGJRYSFMAM1BGHYCgBZCOWATCgBZqRTGXAYCa9MQBAMCEJRYSFMAM1BEHYCgBZCfWATqRTGXAYCa9MQBAMCIJRYSFMAM1BIHYCgBZCdWATqRTGXAYCa9MQBAMCLJRYSFMAMCKJRYAM2BLC8cWATqRTMATCFrCBATCFZl9zAQJHQRTMGXGXAmCb6QBAYRPSFMAY1BBHMCgFZROGXGXAMCa9MQBAYCFJRPSFMAY1BFHMCgBZCOWAOCgBZqROGXAMCa9MQBAYCGJRPSFMAY1BGHMCgBZCfWAOqROGXAMCa9MQBAYCEJRPSFMAY1BEHMCgBZCdWAOqROGXAMCa9MQBAYCIJRPSFMAYCLJRPAY2BIC8cWAOqROMAOCFrCBAOCFZl9zAQJHQROMGXGXAtCb6QBAPRMSFMAP1BBHMCgFZRbGXGXAMCa9MQBAPCFJRMSFMAP1BFHMCgBZCOWAbCgBZqRbGXAMCa9MQBAPCGJRMSFMAP1BGHMCgBZCfWAbqRbGXAMCa9MQBAPCEJRMSFMAP1BEHMCgBZCdWAbqRbGXAMCa9MQBAPCIJRMSFMAPCLJRMAP2BIC8cWAbqRbMAbCFrCBAbCFZl9zAQJHQRbMGXGXAGCG9HQBABAT87FBABCIJAb87FBABCGJAO87FBSFMAEATjGBAECNJAbjGBAECIJAOjGBMALCoBJAKCEWJHYAOjGBAYATjGIALAICGWJATjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAICFJHICbZCGWJAOjGBALCoBJAKCGJCbZCEWJHOATjGBAOAbjGIALAIAm9FAmCb6qJHICbZCGWJAbjGBAIAt9FAtCb6qJRIAKCEJRKMANCFJRNABCKJRBAECSJREAKCbZRKAICbZRIAfCEJHfAF9JQBMMCBC99AMAc6yRKMALCoFJ8kUUUUBAKM/tIFGa8jUUUUBCTlRLC9+RKGXAFCLJAI9LQBCaRKAE2BBC/+FZC/QF9HQBALhB83ENAECFJRKAEAIJC98JREGXAF9FQBGXAGCG6QBEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMALCNJAICFZCGWqHGAICGrCBAICFrCFZl9zAG8oGBJHIjGBABAIjGBABCIJRBAFCaJHFQBSGMMEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMABAICGrCBAICFrCFZl9zALCNJAICFZCGWqHI8oGBJHG87FBAIAGjGBABCGJRBAFCaJHFQBMMCBC99AKAE6yRKMAKM+lLKFaF99GaG99FaG99GXGXAGCI9HQBAF9FQFEXGXGX9DBBB8/9DBBB+/ABCGJHG1BB+yAB1BBHE+yHI+L+TABCFJHL1BBHK+yHO+L+THN9DBBBB9gHVyAN9DBB/+hANAN+U9DBBBBANAVyHcAc+MHMAECa3yAI+SHIAI+UAcAMAKCa3yAO+SHcAc+U+S+S+R+VHO+U+SHN+L9DBBB9P9d9FQBAN+oRESFMCUUUU94REMAGAE86BBGXGX9DBBB8/9DBBB+/Ac9DBBBB9gyAcAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMALAG86BBGXGX9DBBB8/9DBBB+/AI9DBBBB9gyAIAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMABAG86BBABCIJRBAFCaJHFQBSGMMAF9FQBEXGXGX9DBBB8/9DBBB+/ABCIJHG8uFB+yAB8uFBHE+yHI+L+TABCGJHL8uFBHK+yHO+L+THN9DBBBB9gHVyAN9DB/+g6ANAN+U9DBBBBANAVyHcAc+MHMAECa3yAI+SHIAI+UAcAMAKCa3yAO+SHcAc+U+S+S+R+VHO+U+SHN+L9DBBB9P9d9FQBAN+oRESFMCUUUU94REMAGAE87FBGXGX9DBBB8/9DBBB+/Ac9DBBBB9gyAcAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMALAG87FBGXGX9DBBB8/9DBBB+/AI9DBBBB9gyAIAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMABAG87FBABCNJRBAFCaJHFQBMMM/SEIEaE99EaF99GXAF9FQBCBREABRIEXGXGX9D/zI818/AICKJ8uFBHLCEq+y+VHKAI8uFB+y+UHO9DB/+g6+U9DBBB8/9DBBB+/AO9DBBBB9gy+SHN+L9DBBB9P9d9FQBAN+oRVSFMCUUUU94RVMAICIJ8uFBRcAICGJ8uFBRMABALCFJCEZAEqCFWJAV87FBGXGXAKAM+y+UHN9DB/+g6+U9DBBB8/9DBBB+/AN9DBBBB9gy+SHS+L9DBBB9P9d9FQBAS+oRMSFMCUUUU94RMMABALCGJCEZAEqCFWJAM87FBGXGXAKAc+y+UHK9DB/+g6+U9DBBB8/9DBBB+/AK9DBBBB9gy+SHS+L9DBBB9P9d9FQBAS+oRcSFMCUUUU94RcMABALCaJCEZAEqCFWJAc87FBGXGX9DBBU8/AOAO+U+TANAN+U+TAKAK+U+THO9DBBBBAO9DBBBB9gy+R9DB/+g6+U9DBBB8/+SHO+L9DBBB9P9d9FQBAO+oRcSFMCUUUU94RcMABALCEZAEqCFWJAc87FBAICNJRIAECIJREAFCaJHFQBMMM9JBGXAGCGrAF9sHF9FQBEXABAB8oGBHGCNWCN91+yAGCi91CnWCUUU/8EJ+++U84GBABCIJRBAFCaJHFQBMMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEM/lFFFaGXGXAFABqCEZ9FQBABRESFMGXGXAGCT9PQBABRESFMABREEXAEAF8oGBjGBAECIJAFCIJ8oGBjGBAECNJAFCNJ8oGBjGBAECSJAFCSJ8oGBjGBAECTJREAFCTJRFAGC9wJHGCb9LQBMMAGCI9JQBEXAEAF8oGBjGBAFCIJRFAECIJREAGC98JHGCE9LQBMMGXAG9FQBEXAEAF2BB86BBAECFJREAFCFJRFAGCaJHGQBMMABMoFFGaGXGXABCEZ9FQBABRESFMAFCgFZC+BwsN9sRIGXGXAGCT9PQBABRESFMABREEXAEAIjGBAECSJAIjGBAECNJAIjGBAECIJAIjGBAECTJREAGC9wJHGCb9LQBMMAGCI9JQBEXAEAIjGBAECIJREAGC98JHGCE9LQBMMGXAG9FQBEXAEAF86BBAECFJREAGCaJHGQBMMABMMMFBCUNMIT9kBB",e="B9h9z9tFBBBFiI9gBB9gLaaaaaFa9gEaaaB9gFaFaEMcBBFBFFGGGEILF9wFFFLEFBFKNFaFCx/aFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBG8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBIy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBKi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBOn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBNI9z9iqlBVc+N9IcIBTEM9+FLa8jUUUUBCTlRBCBRFEXCBRGCBREEXABCNJAGJAECUaAFAGrCFZHIy86BBAEAIJREAGCFJHGCN9HQBMAFCx+YUUBJAE86BBAFCEWCxkUUBJAB8pEN83EBAFCFJHFCUG9HQBMMk8lLbaE97F9+FaL978jUUUUBCU/KBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAG/8cBBCUoBAG9uC/wgBZHKCUGAKCUG9JyRNAECFJRKCBRVGXEXAVAF9PQFANAFAVlAVANJAF9JyRcGXGXAG9FQBAcCbJHIC9wZHMCE9sRSAMCFWRQAICIrCEJCGrRfCBRbEXAKRTCBRtGXEXGXAOATlAf9PQBCBRKSLMALCU/CBJAtAM9sJRmATAfJRKCBREGXAMCoB9JQBAOAKlC/gB9JQBCBRIEXAmAIJREGXGXGXGXGXATAICKrJ2BBHYCEZfIBFGEBMAECBDtDMIBSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMIBAKCTJRKMGXGXGXGXGXAYCGrCEZfIBFGEBMAECBDtDMITSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMITAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMITAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMITAKCTJRKMGXGXGXGXGXAYCIrCEZfIBFGEBMAECBDtDMIASEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIAAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIAAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMIAAKCTJRKMGXGXGXGXGXAYCKrfIBFGEBMAECBDtDMI8wSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHYCEWCxkUUBJDBEBAYCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHYCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMI8wAKCIJAeDeBJAYCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHYCEWCxkUUBJDBEBAYCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHYCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMI8wAKCNJAeDeBJAYCx+YUUBJ2BBJRKSFMAEAKDBBBDMI8wAKCTJRKMAICoBJREAICUFJAM9LQFAERIAOAKlC/fB9LQBMMGXAEAM9PQBAECErRIEXGXAOAKlCi9PQBCBRKSOMAmAEJRYGXGXGXGXGXATAECKrJ2BBAICKZrCEZfIBFGEBMAYCBDtDMIBSEMAYAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAYAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAYAKDBBBDMIBAKCTJRKMAICGJRIAECTJHEAM9JQBMMGXAK9FQBAKRTAtCFJHtCI6QGSFMMCBRKSEMGXAM9FQBALCUGJAbJREALAbJDBGBReCBRYEXAEALCU/CBJAYJHIDBIBHdCFD9tAdCFDbHPD9OD9hD9RHdAIAMJDBIBH8ZCFD9tA8ZAPD9OD9hD9RH8ZDQBTFtGmEYIPLdKeOnHpAIAQJDBIBHyCFD9tAyAPD9OD9hD9RHyAIASJDBIBH8cCFD9tA8cAPD9OD9hD9RH8cDQBTFtGmEYIPLdKeOnH8dDQBFTtGEmYILPdKOenHPAPDQBFGEBFGEBFGEBFGEAeD9uHeDyBjGBAEAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJHIAeApA8dDQNVi8ZcMpySQ8c8dfb8e8fHPAPDQBFGEBFGEBFGEBFGED9uHeDyBjGBAIAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJHIAeAdA8ZDQNiV8ZcpMyS8cQ8df8eb8fHdAyA8cDQNiV8ZcpMyS8cQ8df8eb8fH8ZDQBFTtGEmYILPdKOenHPAPDQBFGEBFGEBFGEBFGED9uHeDyBjGBAIAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJHIAeAdA8ZDQNVi8ZcMpySQ8c8dfb8e8fHPAPDQBFGEBFGEBFGEBFGED9uHeDyBjGBAIAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJREAYCTJHYAM9JQBMMAbCIJHbAG9JQBMMABAVAG9sJALCUGJAcAG9s/8cBBALALCUGJAcCaJAG9sJAG/8cBBMAcCBAKyAVJRVAKQBMC9+RKSFMCBC99AOAKlAGCAAGCA9Ly6yRKMALCU/KBJ8kUUUUBAKMNBT+BUUUBM+KmFTa8jUUUUBCoFlHL8kUUUUBC9+RKGXAFCE9uHOCtJAI9LQBCaRKAE2BBHNC/wFZC/gF9HQBANCbZHVCF9LQBALCoBJCgFCUF/8MBALC84Jha83EBALC8wJha83EBALC8oJha83EBALCAJha83EBALCiJha83EBALCTJha83EBALha83ENALha83EBAEAIJC9wJRcAECFJHNAOJRMGXAF9FQBCQCbAVCF6yRSABRECBRVCBRQCBRfCBRICBRKEXGXAMAcuQBC9+RKSEMGXGXAN2BBHOC/vF9LQBALCoBJAOCIrCa9zAKJCbZCEWJHb8oGIRTAb8oGBRtGXAOCbZHbAS9PQBALAOCa9zAIJCbZCGWJ8oGBAVAbyROAb9FRbGXGXAGCG9HQBABAt87FBABCIJAO87FBABCGJAT87FBSFMAEAtjGBAECNJAOjGBAECIJATjGBMAVAbJRVALCoBJAKCEWJHmAOjGBAmATjGIALAICGWJAOjGBALCoBJAKCFJCbZHKCEWJHTAtjGBATAOjGIAIAbJRIAKCFJRKSGMGXGXAbCb6QBAQAbJAbC989zJCFJRQSFMAM1BBHbCgFZROGXGXAbCa9MQBAMCFJRMSFMAM1BFHbCgBZCOWAOCgBZqROGXAbCa9MQBAMCGJRMSFMAM1BGHbCgBZCfWAOqROGXAbCa9MQBAMCEJRMSFMAM1BEHbCgBZCdWAOqROGXAbCa9MQBAMCIJRMSFMAM2BIC8cWAOqROAMCLJRMMAOCFrCBAOCFZl9zAQJRQMGXGXAGCG9HQBABAt87FBABCIJAQ87FBABCGJAT87FBSFMAEAtjGBAECNJAQjGBAECIJATjGBMALCoBJAKCEWJHOAQjGBAOATjGIALAICGWJAQjGBALCoBJAKCFJCbZHKCEWJHOAtjGBAOAQjGIAICFJRIAKCFJRKSFMGXAOCDF9LQBALAIAcAOCbZJ2BBHbCIrHTlCbZCGWJ8oGBAVCFJHtATyROALAIAblCbZCGWJ8oGBAtAT9FHmJHtAbCbZHTyRbAT9FRTGXGXAGCG9HQBABAV87FBABCIJAb87FBABCGJAO87FBSFMAEAVjGBAECNJAbjGBAECIJAOjGBMALAICGWJAVjGBALCoBJAKCEWJHYAOjGBAYAVjGIALAICFJHICbZCGWJAOjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAIAmJCbZHICGWJAbjGBALCoBJAKCGJCbZHKCEWJHOAVjGBAOAbjGIAKCFJRKAIATJRIAtATJRVSFMAVCBAM2BBHYyHTAOC/+F6HPJROAYCbZRtGXGXAYCIrHmQBAOCFJRbSFMAORbALAIAmlCbZCGWJ8oGBROMGXGXAtQBAbCFJRVSFMAbRVALAIAYlCbZCGWJ8oGBRbMGXGXAP9FQBAMCFJRYSFMAM1BFHYCgFZRTGXGXAYCa9MQBAMCGJRYSFMAM1BGHYCgBZCOWATCgBZqRTGXAYCa9MQBAMCEJRYSFMAM1BEHYCgBZCfWATqRTGXAYCa9MQBAMCIJRYSFMAM1BIHYCgBZCdWATqRTGXAYCa9MQBAMCLJRYSFMAMCKJRYAM2BLC8cWATqRTMATCFrCBATCFZl9zAQJHQRTMGXGXAmCb6QBAYRPSFMAY1BBHMCgFZROGXGXAMCa9MQBAYCFJRPSFMAY1BFHMCgBZCOWAOCgBZqROGXAMCa9MQBAYCGJRPSFMAY1BGHMCgBZCfWAOqROGXAMCa9MQBAYCEJRPSFMAY1BEHMCgBZCdWAOqROGXAMCa9MQBAYCIJRPSFMAYCLJRPAY2BIC8cWAOqROMAOCFrCBAOCFZl9zAQJHQROMGXGXAtCb6QBAPRMSFMAP1BBHMCgFZRbGXGXAMCa9MQBAPCFJRMSFMAP1BFHMCgBZCOWAbCgBZqRbGXAMCa9MQBAPCGJRMSFMAP1BGHMCgBZCfWAbqRbGXAMCa9MQBAPCEJRMSFMAP1BEHMCgBZCdWAbqRbGXAMCa9MQBAPCIJRMSFMAPCLJRMAP2BIC8cWAbqRbMAbCFrCBAbCFZl9zAQJHQRbMGXGXAGCG9HQBABAT87FBABCIJAb87FBABCGJAO87FBSFMAEATjGBAECNJAbjGBAECIJAOjGBMALCoBJAKCEWJHYAOjGBAYATjGIALAICGWJATjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAICFJHICbZCGWJAOjGBALCoBJAKCGJCbZCEWJHOATjGBAOAbjGIALAIAm9FAmCb6qJHICbZCGWJAbjGBAIAt9FAtCb6qJRIAKCEJRKMANCFJRNABCKJRBAECSJREAKCbZRKAICbZRIAfCEJHfAF9JQBMMCBC99AMAc6yRKMALCoFJ8kUUUUBAKM/tIFGa8jUUUUBCTlRLC9+RKGXAFCLJAI9LQBCaRKAE2BBC/+FZC/QF9HQBALhB83ENAECFJRKAEAIJC98JREGXAF9FQBGXAGCG6QBEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMALCNJAICFZCGWqHGAICGrCBAICFrCFZl9zAG8oGBJHIjGBABAIjGBABCIJRBAFCaJHFQBSGMMEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMABAICGrCBAICFrCFZl9zALCNJAICFZCGWqHI8oGBJHG87FBAIAGjGBABCGJRBAFCaJHFQBMMCBC99AKAE6yRKMAKM/dLEK97FaF97GXGXAGCI9HQBAF9FQFCBRGEXABABDBBBHECiD+rFCiD+sFD/6FHIAECND+rFCiD+sFD/6FAID/gFAECTD+rFCiD+sFD/6FHLD/gFD/kFD/lFHKCBDtD+2FHOAICUUUU94DtHND9OD9RD/kFHI9DBB/+hDYAIAID/mFAKAKD/mFALAOALAND9OD9RD/kFHIAID/mFD/kFD/kFD/jFD/nFHLD/mF9DBBX9LDYHOD/kFCgFDtD9OAECUUU94DtD9OD9QAIALD/mFAOD/kFCND+rFCU/+EDtD9OD9QAKALD/mFAOD/kFCTD+rFCUU/8ODtD9OD9QDMBBABCTJRBAGCIJHGAF9JQBSGMMAF9FQBCBRGEXABCTJHVAVDBBBHECBDtHOCUU98D8cFCUU98D8cEHND9OABDBBBHKAEDQILKOSQfbPden8c8d8e8fCggFDtD9OD/6FAKAEDQBFGENVcMTtmYi8ZpyHECTD+sFD/6FHID/gFAECTD+rFCTD+sFD/6FHLD/gFD/kFD/lFHE9DB/+g6DYALAEAOD+2FHOALCUUUU94DtHcD9OD9RD/kFHLALD/mFAEAED/mFAIAOAIAcD9OD9RD/kFHEAED/mFD/kFD/kFD/jFD/nFHID/mF9DBBX9LDYHOD/kFCTD+rFALAID/mFAOD/kFCggEDtD9OD9QHLAEAID/mFAOD/kFCaDbCBDnGCBDnECBDnKCBDnOCBDncCBDnMCBDnfCBDnbD9OHEDQNVi8ZcMpySQ8c8dfb8e8fD9QDMBBABAKAND9OALAEDQBFTtGEmYILPdKOenD9QDMBBABCAJRBAGCIJHGAF9JQBMMM/hEIGaF97FaL978jUUUUBCTlREGXAF9FQBCBRIEXAEABDBBBHLABCTJHKDBBBHODQILKOSQfbPden8c8d8e8fHNCTD+sFHVCID+rFDMIBAB9DBBU8/DY9D/zI818/DYAVCEDtD9QD/6FD/nFHVALAODQBFGENVcMTtmYi8ZpyHLCTD+rFCTD+sFD/6FD/mFHOAOD/mFAVALCTD+sFD/6FD/mFHcAcD/mFAVANCTD+rFCTD+sFD/6FD/mFHNAND/mFD/kFD/kFD/lFCBDtD+4FD/jF9DB/+g6DYHVD/mF9DBBX9LDYHLD/kFCggEDtHMD9OAcAVD/mFALD/kFCTD+rFD9QHcANAVD/mFALD/kFCTD+rFAOAVD/mFALD/kFAMD9OD9QHVDQBFTtGEmYILPdKOenHLD8dBAEDBIBDyB+t+J83EBABCNJALD8dFAEDBIBDyF+t+J83EBAKAcAVDQNVi8ZcMpySQ8c8dfb8e8fHVD8dBAEDBIBDyG+t+J83EBABCiJAVD8dFAEDBIBDyE+t+J83EBABCAJRBAICIJHIAF9JQBMMM9jFF97GXAGCGrAF9sHG9FQBCBRFEXABABDBBBHECND+rFCND+sFD/6FAECiD+sFCnD+rFCUUU/8EDtD+uFD/mFDMBBABCTJRBAFCIJHFAG9JQBMMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEMMMFBCUNMIT9tBB",t=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),i=new Uint8Array([32,0,65,253,3,1,2,34,4,106,6,5,11,8,7,20,13,33,12,16,128,9,116,64,19,113,127,15,10,21,22,14,255,66,24,54,136,107,18,23,192,26,114,118,132,17,77,101,130,144,27,87,131,44,45,74,156,154,70,167]);if(typeof WebAssembly!="object")return{supported:!1};let r=n;WebAssembly.validate(t)&&(r=e);let s;const o=WebAssembly.instantiate(a(r),{}).then(d=>{s=d.instance,s.exports.__wasm_call_ctors()});function a(d){const p=new Uint8Array(d.length);for(let y=0;y96?v-71:v>64?v-65:v>47?v+4:v>46?63:62}let m=0;for(let y=0;yn===Object(n)&&!Array.isArray(n)&&typeof n!="function";function zA(n,e){const t=Gi(r=>r.gl),i=la(Fh,$E(n)?Object.values(n):n);if(U.useLayoutEffect(()=>{e==null||e(i)},[e]),U.useEffect(()=>{"initTexture"in t&&(Array.isArray(i)?i:[i]).forEach(t.initTexture)},[t,i]),$E(n)){const r=Object.keys(n),s={};return r.forEach(o=>Object.assign(s,{[o]:i[r.indexOf(o)]})),s}else return i}zA.preload=n=>la.preload(Fh,n);zA.clear=n=>la.clear(Fh,n);const T6=()=>parseInt(nu.replace(/\D+/g,"")),nR=T6();function P6(n){return Array.isArray(n)}function Pv(n=[0,0,0]){return P6(n)?n:n instanceof F||n instanceof ml?[n.x,n.y,n.z]:[n,n,n]}const B6=U.forwardRef(function({debug:e,depthTest:t=!1,polygonOffsetFactor:i=-10,map:r,mesh:s,children:o,position:a,rotation:l,scale:u,...h},d){const p=U.useRef(null);U.useImperativeHandle(d,()=>p.current);const m=U.useRef(null);return U.useLayoutEffect(()=>{const y=(s==null?void 0:s.current)||p.current.parent,v=p.current;if(!(y instanceof In))throw new Error('Decal must have a Mesh as parent or specify its "mesh" prop');const x={position:new F,rotation:new ml,scale:new F(1,1,1)};if(y){ss(x,{position:a,scale:u});const A=y.matrixWorld.clone();if(y.matrixWorld.identity(),!l||typeof l=="number"){const _=new Mt;_.position.copy(x.position),_.lookAt(y.position),typeof l=="number"&&_.rotateZ(l),ss(x,{rotation:_.rotation})}else ss(x,{rotation:l});return v.geometry=new C6(y,x.position,x.rotation,x.scale),m.current&&(ss(m.current,x),m.current.traverse(_=>_.raycast=()=>null)),y.matrixWorld=A,()=>{v.geometry.dispose()}}},[s,...Pv(a),...Pv(u),...Pv(l)]),U.createElement("mesh",_r({ref:p,"material-transparent":!0,"material-polygonOffset":!0,"material-polygonOffsetFactor":i,"material-depthTest":t,"material-map":r},h),o,e&&U.createElement("mesh",{ref:m},U.createElement("boxGeometry",null),U.createElement("meshNormalMaterial",{wireframe:!0}),U.createElement("axesHelper",null)))});let jp=null,iR="https://www.gstatic.com/draco/versioned/decoders/1.5.5/";function rR(n,e,t){return i=>{t&&t(i),n&&(jp||(jp=new E6),jp.setDecoderPath(typeof n=="string"?n:iR),i.setDRACOLoader(jp)),e&&i.setMeshoptDecoder(typeof Tv=="function"?Tv():Tv)}}function Oh(n,e=!0,t=!0,i){return la(OA,n,rR(e,t,i))}Oh.preload=(n,e=!0,t=!0,i)=>la.preload(OA,n,rR(e,t,i));Oh.clear=n=>la.clear(OA,n);Oh.setDecoderPath=n=>{iR=n};const UA=U.forwardRef(({makeDefault:n,camera:e,regress:t,domElement:i,enableDamping:r=!0,keyEvents:s=!1,onChange:o,onStart:a,onEnd:l,...u},h)=>{const d=Gi(P=>P.invalidate),p=Gi(P=>P.camera),m=Gi(P=>P.gl),y=Gi(P=>P.events),v=Gi(P=>P.setEvents),x=Gi(P=>P.set),A=Gi(P=>P.get),_=Gi(P=>P.performance),w=e||p,M=i||y.connected||m.domElement,b=U.useMemo(()=>new JH(w),[w]);return fu(()=>{b.enabled&&b.update()},-1),U.useEffect(()=>(s&&b.connect(s===!0?M:s),b.connect(M),()=>void b.dispose()),[s,M,t,b,d]),U.useEffect(()=>{const P=B=>{d(),t&&_.regress(),o&&o(B)},R=B=>{a&&a(B)},E=B=>{l&&l(B)};return b.addEventListener("change",P),b.addEventListener("start",R),b.addEventListener("end",E),()=>{b.removeEventListener("start",R),b.removeEventListener("end",E),b.removeEventListener("change",P)}},[o,a,l,b,d,v]),U.useEffect(()=>{if(n){const P=A().controls;return x({controls:b}),()=>x({controls:P})}},[n,b]),U.createElement("primitive",_r({ref:h,object:b,enableDamping:r},u))}),Bv=nR>=154?"opaque_fragment":"output_fragment";class R6 extends Ah{constructor(e){super(e),this.onBeforeCompile=(t,i)=>{const{isWebGL2:r}=i.capabilities;t.fragmentShader=t.fragmentShader.replace(`#include <${Bv}>`,` - ${r?`#include <${Bv}>`:`#extension GL_OES_standard_derivatives : enable -#include <${Bv}>`} + `}),[h]);return U.createElement("group",_r({},P,{ref:ce}),d&&!Y&&U.createElement("mesh",{castShadow:m,receiveShadow:y,ref:se},x||U.createElement("planeGeometry",null),v||U.createElement("shaderMaterial",{side:Fr,vertexShader:ke.vertexShader,fragmentShader:ke.fragmentShader})))});let ef=0;const NH=PB(n=>(vc.onStart=(e,t,i)=>{n({active:!0,item:e,loaded:t,total:i,progress:(t-ef)/(i-ef)*100})},vc.onLoad=()=>{n({active:!1})},vc.onError=e=>n(t=>({errors:[...t.errors,e]})),vc.onProgress=(e,t,i)=>{t===i&&(ef=i),n({active:!0,item:e,loaded:t,total:i,progress:(t-ef)/(i-ef)*100||100})},{errors:[],active:!1,progress:0,item:"",loaded:0,total:0}));function kA(n){return function(e){n.forEach(function(t){typeof t=="function"?t(e):t!=null&&(t.current=e)})}}function WE(n,e){if(e===bP)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),n;if(e===Jm||e===Y_){let t=n.getIndex();if(t===null){const o=[],a=n.getAttribute("position");if(a!==void 0){for(let l=0;le in n?zH(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,at=(n,e,t)=>(UH(n,typeof e!="symbol"?e+"":e,t),t);const Hp=new ru,jE=new Ds,GH=Math.cos(70*(Math.PI/180)),JE=(n,e)=>(n%e+e)%e;let HH=class extends ms{constructor(e,t){super(),at(this,"object"),at(this,"domElement"),at(this,"enabled",!0),at(this,"target",new F),at(this,"minDistance",0),at(this,"maxDistance",1/0),at(this,"minZoom",0),at(this,"maxZoom",1/0),at(this,"minPolarAngle",0),at(this,"maxPolarAngle",Math.PI),at(this,"minAzimuthAngle",-1/0),at(this,"maxAzimuthAngle",1/0),at(this,"enableDamping",!1),at(this,"dampingFactor",.05),at(this,"enableZoom",!0),at(this,"zoomSpeed",1),at(this,"enableRotate",!0),at(this,"rotateSpeed",1),at(this,"enablePan",!0),at(this,"panSpeed",1),at(this,"screenSpacePanning",!0),at(this,"keyPanSpeed",7),at(this,"zoomToCursor",!1),at(this,"autoRotate",!1),at(this,"autoRotateSpeed",2),at(this,"reverseOrbit",!1),at(this,"reverseHorizontalOrbit",!1),at(this,"reverseVerticalOrbit",!1),at(this,"keys",{LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"}),at(this,"mouseButtons",{LEFT:La.ROTATE,MIDDLE:La.DOLLY,RIGHT:La.PAN}),at(this,"touches",{ONE:Ia.ROTATE,TWO:Ia.DOLLY_PAN}),at(this,"target0"),at(this,"position0"),at(this,"zoom0"),at(this,"_domElementKeyEvents",null),at(this,"getPolarAngle"),at(this,"getAzimuthalAngle"),at(this,"setPolarAngle"),at(this,"setAzimuthalAngle"),at(this,"getDistance"),at(this,"listenToKeyEvents"),at(this,"stopListenToKeyEvents"),at(this,"saveState"),at(this,"reset"),at(this,"update"),at(this,"connect"),at(this,"dispose"),this.object=e,this.domElement=t,this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=()=>h.phi,this.getAzimuthalAngle=()=>h.theta,this.setPolarAngle=X=>{let ve=JE(X,2*Math.PI),ze=h.phi;ze<0&&(ze+=2*Math.PI),ve<0&&(ve+=2*Math.PI);let j=Math.abs(ve-ze);2*Math.PI-j{let ve=JE(X,2*Math.PI),ze=h.theta;ze<0&&(ze+=2*Math.PI),ve<0&&(ve+=2*Math.PI);let j=Math.abs(ve-ze);2*Math.PI-ji.object.position.distanceTo(i.target),this.listenToKeyEvents=X=>{X.addEventListener("keydown",Ke),this._domElementKeyEvents=X},this.stopListenToKeyEvents=()=>{this._domElementKeyEvents.removeEventListener("keydown",Ke),this._domElementKeyEvents=null},this.saveState=()=>{i.target0.copy(i.target),i.position0.copy(i.object.position),i.zoom0=i.object.zoom},this.reset=()=>{i.target.copy(i.target0),i.object.position.copy(i.position0),i.object.zoom=i.zoom0,i.object.updateProjectionMatrix(),i.dispatchEvent(r),i.update(),l=a.NONE},this.update=(()=>{const X=new F,ve=new F(0,1,0),ze=new Wn().setFromUnitVectors(e.up,ve),j=ze.clone().invert(),oe=new F,xe=new Wn,Le=2*Math.PI;return function(){const It=i.object.position;ze.setFromUnitVectors(e.up,ve),j.copy(ze).invert(),X.copy(It).sub(i.target),X.applyQuaternion(ze),h.setFromVector3(X),i.autoRotate&&l===a.NONE&&W(Z()),i.enableDamping?(h.theta+=d.theta*i.dampingFactor,h.phi+=d.phi*i.dampingFactor):(h.theta+=d.theta,h.phi+=d.phi);let Dt=i.minAzimuthAngle,zt=i.maxAzimuthAngle;isFinite(Dt)&&isFinite(zt)&&(Dt<-Math.PI?Dt+=Le:Dt>Math.PI&&(Dt-=Le),zt<-Math.PI?zt+=Le:zt>Math.PI&&(zt-=Le),Dt<=zt?h.theta=Math.max(Dt,Math.min(zt,h.theta)):h.theta=h.theta>(Dt+zt)/2?Math.max(Dt,h.theta):Math.min(zt,h.theta)),h.phi=Math.max(i.minPolarAngle,Math.min(i.maxPolarAngle,h.phi)),h.makeSafe(),i.enableDamping===!0?i.target.addScaledVector(m,i.dampingFactor):i.target.add(m),i.zoomToCursor&&B||i.object.isOrthographicCamera?h.radius=G(h.radius):h.radius=G(h.radius*p),X.setFromSpherical(h),X.applyQuaternion(j),It.copy(i.target).add(X),i.object.lookAt(i.target),i.enableDamping===!0?(d.theta*=1-i.dampingFactor,d.phi*=1-i.dampingFactor,m.multiplyScalar(1-i.dampingFactor)):(d.set(0,0,0),m.set(0,0,0));let kn=!1;if(i.zoomToCursor&&B){let Ft=null;if(i.object instanceof Jt&&i.object.isPerspectiveCamera){const yn=X.length();Ft=G(yn*p);const jn=yn-Ft;i.object.position.addScaledVector(R,jn),i.object.updateMatrixWorld()}else if(i.object.isOrthographicCamera){const yn=new F(E.x,E.y,0);yn.unproject(i.object),i.object.zoom=Math.max(i.minZoom,Math.min(i.maxZoom,i.object.zoom/p)),i.object.updateProjectionMatrix(),kn=!0;const jn=new F(E.x,E.y,0);jn.unproject(i.object),i.object.position.sub(jn).add(yn),i.object.updateMatrixWorld(),Ft=X.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),i.zoomToCursor=!1;Ft!==null&&(i.screenSpacePanning?i.target.set(0,0,-1).transformDirection(i.object.matrix).multiplyScalar(Ft).add(i.object.position):(Hp.origin.copy(i.object.position),Hp.direction.set(0,0,-1).transformDirection(i.object.matrix),Math.abs(i.object.up.dot(Hp.direction))u||8*(1-xe.dot(i.object.quaternion))>u?(i.dispatchEvent(r),oe.copy(i.object.position),xe.copy(i.object.quaternion),kn=!1,!0):!1}})(),this.connect=X=>{X===document&&console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'),i.domElement=X,i.domElement.style.touchAction="none",i.domElement.addEventListener("contextmenu",$e),i.domElement.addEventListener("pointerdown",_t),i.domElement.addEventListener("pointercancel",ae),i.domElement.addEventListener("wheel",Pe)},this.dispose=()=>{var X,ve,ze,j,oe,xe;(X=i.domElement)==null||X.removeEventListener("contextmenu",$e),(ve=i.domElement)==null||ve.removeEventListener("pointerdown",_t),(ze=i.domElement)==null||ze.removeEventListener("pointercancel",ae),(j=i.domElement)==null||j.removeEventListener("wheel",Pe),(oe=i.domElement)==null||oe.ownerDocument.removeEventListener("pointermove",N),(xe=i.domElement)==null||xe.ownerDocument.removeEventListener("pointerup",D),i._domElementKeyEvents!==null&&i._domElementKeyEvents.removeEventListener("keydown",Ke)};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 u=1e-6,h=new w1,d=new w1;let p=1;const m=new F,y=new pe,v=new pe,x=new pe,A=new pe,_=new pe,w=new pe,M=new pe,b=new pe,P=new pe,R=new F,E=new pe;let B=!1;const I=[],z={};function Z(){return 2*Math.PI/60/60*i.autoRotateSpeed}function J(){return Math.pow(.95,i.zoomSpeed)}function W(X){i.reverseOrbit||i.reverseHorizontalOrbit?d.theta+=X:d.theta-=X}function Q(X){i.reverseOrbit||i.reverseVerticalOrbit?d.phi+=X:d.phi-=X}const re=(()=>{const X=new F;return function(ze,j){X.setFromMatrixColumn(j,0),X.multiplyScalar(-ze),m.add(X)}})(),ce=(()=>{const X=new F;return function(ze,j){i.screenSpacePanning===!0?X.setFromMatrixColumn(j,1):(X.setFromMatrixColumn(j,0),X.crossVectors(i.object.up,X)),X.multiplyScalar(ze),m.add(X)}})(),L=(()=>{const X=new F;return function(ze,j){const oe=i.domElement;if(oe&&i.object instanceof Jt&&i.object.isPerspectiveCamera){const xe=i.object.position;X.copy(xe).sub(i.target);let Le=X.length();Le*=Math.tan(i.object.fov/2*Math.PI/180),re(2*ze*Le/oe.clientHeight,i.object.matrix),ce(2*j*Le/oe.clientHeight,i.object.matrix)}else oe&&i.object instanceof mr&&i.object.isOrthographicCamera?(re(ze*(i.object.right-i.object.left)/i.object.zoom/oe.clientWidth,i.object.matrix),ce(j*(i.object.top-i.object.bottom)/i.object.zoom/oe.clientHeight,i.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),i.enablePan=!1)}})();function V(X){i.object instanceof Jt&&i.object.isPerspectiveCamera||i.object instanceof mr&&i.object.isOrthographicCamera?p/=X:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),i.enableZoom=!1)}function H(X){i.object instanceof Jt&&i.object.isPerspectiveCamera||i.object instanceof mr&&i.object.isOrthographicCamera?p*=X:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),i.enableZoom=!1)}function $(X){if(!i.zoomToCursor||!i.domElement)return;B=!0;const ve=i.domElement.getBoundingClientRect(),ze=X.clientX-ve.left,j=X.clientY-ve.top,oe=ve.width,xe=ve.height;E.x=ze/oe*2-1,E.y=-(j/xe)*2+1,R.set(E.x,E.y,1).unproject(i.object).sub(i.object.position).normalize()}function G(X){return Math.max(i.minDistance,Math.min(i.maxDistance,X))}function se(X){y.set(X.clientX,X.clientY)}function me(X){$(X),M.set(X.clientX,X.clientY)}function Y(X){A.set(X.clientX,X.clientY)}function _e(X){v.set(X.clientX,X.clientY),x.subVectors(v,y).multiplyScalar(i.rotateSpeed);const ve=i.domElement;ve&&(W(2*Math.PI*x.x/ve.clientHeight),Q(2*Math.PI*x.y/ve.clientHeight)),y.copy(v),i.update()}function Ae(X){b.set(X.clientX,X.clientY),P.subVectors(b,M),P.y>0?V(J()):P.y<0&&H(J()),M.copy(b),i.update()}function Ie(X){_.set(X.clientX,X.clientY),w.subVectors(_,A).multiplyScalar(i.panSpeed),L(w.x,w.y),A.copy(_),i.update()}function ke(X){$(X),X.deltaY<0?H(J()):X.deltaY>0&&V(J()),i.update()}function Te(X){let ve=!1;switch(X.code){case i.keys.UP:L(0,i.keyPanSpeed),ve=!0;break;case i.keys.BOTTOM:L(0,-i.keyPanSpeed),ve=!0;break;case i.keys.LEFT:L(i.keyPanSpeed,0),ve=!0;break;case i.keys.RIGHT:L(-i.keyPanSpeed,0),ve=!0;break}ve&&(X.preventDefault(),i.update())}function we(){if(I.length==1)y.set(I[0].pageX,I[0].pageY);else{const X=.5*(I[0].pageX+I[1].pageX),ve=.5*(I[0].pageY+I[1].pageY);y.set(X,ve)}}function he(){if(I.length==1)A.set(I[0].pageX,I[0].pageY);else{const X=.5*(I[0].pageX+I[1].pageX),ve=.5*(I[0].pageY+I[1].pageY);A.set(X,ve)}}function de(){const X=I[0].pageX-I[1].pageX,ve=I[0].pageY-I[1].pageY,ze=Math.sqrt(X*X+ve*ve);M.set(0,ze)}function Me(){i.enableZoom&&de(),i.enablePan&&he()}function Ge(){i.enableZoom&&de(),i.enableRotate&&we()}function Be(X){if(I.length==1)v.set(X.pageX,X.pageY);else{const ze=Qe(X),j=.5*(X.pageX+ze.x),oe=.5*(X.pageY+ze.y);v.set(j,oe)}x.subVectors(v,y).multiplyScalar(i.rotateSpeed);const ve=i.domElement;ve&&(W(2*Math.PI*x.x/ve.clientHeight),Q(2*Math.PI*x.y/ve.clientHeight)),y.copy(v)}function Ye(X){if(I.length==1)_.set(X.pageX,X.pageY);else{const ve=Qe(X),ze=.5*(X.pageX+ve.x),j=.5*(X.pageY+ve.y);_.set(ze,j)}w.subVectors(_,A).multiplyScalar(i.panSpeed),L(w.x,w.y),A.copy(_)}function Je(X){const ve=Qe(X),ze=X.pageX-ve.x,j=X.pageY-ve.y,oe=Math.sqrt(ze*ze+j*j);b.set(0,oe),P.set(0,Math.pow(b.y/M.y,i.zoomSpeed)),V(P.y),M.copy(b)}function et(X){i.enableZoom&&Je(X),i.enablePan&&Ye(X)}function vt(X){i.enableZoom&&Je(X),i.enableRotate&&Be(X)}function _t(X){var ve,ze;i.enabled!==!1&&(I.length===0&&((ve=i.domElement)==null||ve.ownerDocument.addEventListener("pointermove",N),(ze=i.domElement)==null||ze.ownerDocument.addEventListener("pointerup",D)),je(X),X.pointerType==="touch"?Oe(X):Ce(X))}function N(X){i.enabled!==!1&&(X.pointerType==="touch"?ye(X):Ee(X))}function D(X){var ve,ze,j;rt(X),I.length===0&&((ve=i.domElement)==null||ve.releasePointerCapture(X.pointerId),(ze=i.domElement)==null||ze.ownerDocument.removeEventListener("pointermove",N),(j=i.domElement)==null||j.ownerDocument.removeEventListener("pointerup",D)),i.dispatchEvent(o),l=a.NONE}function ae(X){rt(X)}function Ce(X){let ve;switch(X.button){case 0:ve=i.mouseButtons.LEFT;break;case 1:ve=i.mouseButtons.MIDDLE;break;case 2:ve=i.mouseButtons.RIGHT;break;default:ve=-1}switch(ve){case La.DOLLY:if(i.enableZoom===!1)return;me(X),l=a.DOLLY;break;case La.ROTATE:if(X.ctrlKey||X.metaKey||X.shiftKey){if(i.enablePan===!1)return;Y(X),l=a.PAN}else{if(i.enableRotate===!1)return;se(X),l=a.ROTATE}break;case La.PAN:if(X.ctrlKey||X.metaKey||X.shiftKey){if(i.enableRotate===!1)return;se(X),l=a.ROTATE}else{if(i.enablePan===!1)return;Y(X),l=a.PAN}break;default:l=a.NONE}l!==a.NONE&&i.dispatchEvent(s)}function Ee(X){if(i.enabled!==!1)switch(l){case a.ROTATE:if(i.enableRotate===!1)return;_e(X);break;case a.DOLLY:if(i.enableZoom===!1)return;Ae(X);break;case a.PAN:if(i.enablePan===!1)return;Ie(X);break}}function Pe(X){i.enabled===!1||i.enableZoom===!1||l!==a.NONE&&l!==a.ROTATE||(X.preventDefault(),i.dispatchEvent(s),ke(X),i.dispatchEvent(o))}function Ke(X){i.enabled===!1||i.enablePan===!1||Te(X)}function Oe(X){switch(tt(X),I.length){case 1:switch(i.touches.ONE){case Ia.ROTATE:if(i.enableRotate===!1)return;we(),l=a.TOUCH_ROTATE;break;case Ia.PAN:if(i.enablePan===!1)return;he(),l=a.TOUCH_PAN;break;default:l=a.NONE}break;case 2:switch(i.touches.TWO){case Ia.DOLLY_PAN:if(i.enableZoom===!1&&i.enablePan===!1)return;Me(),l=a.TOUCH_DOLLY_PAN;break;case Ia.DOLLY_ROTATE:if(i.enableZoom===!1&&i.enableRotate===!1)return;Ge(),l=a.TOUCH_DOLLY_ROTATE;break;default:l=a.NONE}break;default:l=a.NONE}l!==a.NONE&&i.dispatchEvent(s)}function ye(X){switch(tt(X),l){case a.TOUCH_ROTATE:if(i.enableRotate===!1)return;Be(X),i.update();break;case a.TOUCH_PAN:if(i.enablePan===!1)return;Ye(X),i.update();break;case a.TOUCH_DOLLY_PAN:if(i.enableZoom===!1&&i.enablePan===!1)return;et(X),i.update();break;case a.TOUCH_DOLLY_ROTATE:if(i.enableZoom===!1&&i.enableRotate===!1)return;vt(X),i.update();break;default:l=a.NONE}}function $e(X){i.enabled!==!1&&X.preventDefault()}function je(X){I.push(X)}function rt(X){delete z[X.pointerId];for(let ve=0;ve=2.0 are supported."));return}const l=new x6(s,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});l.fileLoader.setRequestHeader(this.requestHeader);for(let u=0;u=0&&a[h]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+h+'".')}}l.setExtensions(o),l.setPlugins(a),l.parse(i,r)}parseAsync(e,t){const i=this;return new Promise(function(r,s){i.parse(e,t,r,s)})}}function VH(){let n={};return{get:function(e){return n[e]},add:function(e,t){n[e]=t},remove:function(e){delete n[e]},removeAll:function(){n={}}}}const St={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class WH{constructor(e){this.parser=e,this.name=St.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,t=this.parser.json.nodes||[];for(let i=0,r=t.length;i=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,s.source,o)}}class n6{constructor(e){this.parser=e,this.name=St.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const t=this.name,i=this.parser,r=i.json,s=r.textures[e];if(!s.extensions||!s.extensions[t])return null;const o=s.extensions[t],a=r.images[o.source];let l=i.textureLoader;if(a.uri){const u=i.options.manager.getHandler(a.uri);u!==null&&(l=u)}return this.detectSupport().then(function(u){if(u)return i.loadTextureImage(e,o.source,l);if(r.extensionsRequired&&r.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return i.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",t.onload=t.onerror=function(){e(t.height===1)}})),this.isSupported}}class i6{constructor(e){this.parser=e,this.name=St.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const t=this.name,i=this.parser,r=i.json,s=r.textures[e];if(!s.extensions||!s.extensions[t])return null;const o=s.extensions[t],a=r.images[o.source];let l=i.textureLoader;if(a.uri){const u=i.options.manager.getHandler(a.uri);u!==null&&(l=u)}return this.detectSupport().then(function(u){if(u)return i.loadTextureImage(e,o.source,l);if(r.extensionsRequired&&r.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return i.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",t.onload=t.onerror=function(){e(t.height===1)}})),this.isSupported}}class r6{constructor(e){this.name=St.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const t=this.parser.json,i=t.bufferViews[e];if(i.extensions&&i.extensions[this.name]){const r=i.extensions[this.name],s=this.parser.getDependency("buffer",r.buffer),o=this.parser.options.meshoptDecoder;if(!o||!o.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return s.then(function(a){const l=r.byteOffset||0,u=r.byteLength||0,h=r.count,d=r.byteStride,p=new Uint8Array(a,l,u);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(h,d,p,r.mode,r.filter).then(function(m){return m.buffer}):o.ready.then(function(){const m=new ArrayBuffer(h*d);return o.decodeGltfBuffer(new Uint8Array(m),h,d,p,r.mode,r.filter),m})})}else return null}}class s6{constructor(e){this.name=St.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const t=this.parser.json,i=t.nodes[e];if(!i.extensions||!i.extensions[this.name]||i.mesh===void 0)return null;const r=t.meshes[i.mesh];for(const u of r.primitives)if(u.mode!==cr.TRIANGLES&&u.mode!==cr.TRIANGLE_STRIP&&u.mode!==cr.TRIANGLE_FAN&&u.mode!==void 0)return null;const o=i.extensions[this.name].attributes,a=[],l={};for(const u in o)a.push(this.parser.getDependency("accessor",o[u]).then(h=>(l[u]=h,l[u])));return a.length<1?null:(a.push(this.parser.createNodeMesh(e)),Promise.all(a).then(u=>{const h=u.pop(),d=h.isGroup?h.children:[h],p=u[0].count,m=[];for(const y of d){const v=new ot,x=new F,A=new Wn,_=new F(1,1,1),w=new cA(y.geometry,y.material,p);for(let M=0;M=152?{TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3"}:{TEXCOORD_0:"uv",TEXCOORD_1:"uv2"},COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},yo={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},h6={CUBICSPLINE:void 0,LINEAR:ul,STEP:Vc},Mv={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function d6(n){return n.DefaultMaterial===void 0&&(n.DefaultMaterial=new Ih({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:hs})),n.DefaultMaterial}function ba(n,e,t){for(const i in t.extensions)n[i]===void 0&&(e.userData.gltfExtensions=e.userData.gltfExtensions||{},e.userData.gltfExtensions[i]=t.extensions[i])}function So(n,e){e.extras!==void 0&&(typeof e.extras=="object"?Object.assign(n.userData,e.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+e.extras))}function p6(n,e,t){let i=!1,r=!1,s=!1;for(let u=0,h=e.length;u0||n.search(/^data\:image\/jpeg/)===0?"image/jpeg":n.search(/\.webp($|\?)/i)>0||n.search(/^data\:image\/webp/)===0?"image/webp":"image/png"}const v6=new ot;class x6{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new VH,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let i=!1,r=!1,s=-1;typeof navigator<"u"&&typeof navigator.userAgent<"u"&&(i=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)===!0,r=navigator.userAgent.indexOf("Firefox")>-1,s=r?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),typeof createImageBitmap>"u"||i||r&&s<98?this.textureLoader=new Dh(this.options.manager):this.textureLoader=new MB(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new Xi(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){const i=this,r=this.json,s=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(o){return o._markDefs&&o._markDefs()}),Promise.all(this._invokeAll(function(o){return o.beforeRoot&&o.beforeRoot()})).then(function(){return Promise.all([i.getDependencies("scene"),i.getDependencies("animation"),i.getDependencies("camera")])}).then(function(o){const a={scene:o[0][r.scene||0],scenes:o[0],animations:o[1],cameras:o[2],asset:r.asset,parser:i,userData:{}};ba(s,a,r),So(a,r),Promise.all(i._invokeAll(function(l){return l.afterRoot&&l.afterRoot(a)})).then(function(){e(a)})}).catch(t)}_markDefs(){const e=this.json.nodes||[],t=this.json.skins||[],i=this.json.meshes||[];for(let r=0,s=t.length;r{const l=this.associations.get(o);l!=null&&this.associations.set(a,l);for(const[u,h]of o.children.entries())s(h,a.children[u])};return s(i,r),r.name+="_instance_"+e.uses[t]++,r}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let i=0;i=2&&x.setY(B,P[R*l+1]),l>=3&&x.setZ(B,P[R*l+2]),l>=4&&x.setW(B,P[R*l+3]),l>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return x})}loadTexture(e){const t=this.json,i=this.options,s=t.textures[e].source,o=t.images[s];let a=this.textureLoader;if(o.uri){const l=i.manager.getHandler(o.uri);l!==null&&(a=l)}return this.loadTextureImage(e,s,a)}loadTextureImage(e,t,i){const r=this,s=this.json,o=s.textures[e],a=s.images[t],l=(a.uri||a.bufferView)+":"+o.sampler;if(this.textureCache[l])return this.textureCache[l];const u=this.loadImageSource(t,i).then(function(h){h.flipY=!1,h.name=o.name||a.name||"",h.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(h.name=a.uri);const p=(s.samplers||{})[o.sampler]||{};return h.magFilter=YE[p.magFilter]||nn,h.minFilter=YE[p.minFilter]||ds,h.wrapS=KE[p.wrapS]||Yo,h.wrapT=KE[p.wrapT]||Yo,r.associations.set(h,{textures:e}),h}).catch(function(){return null});return this.textureCache[l]=u,u}loadImageSource(e,t){const i=this,r=this.json,s=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(d=>d.clone());const o=r.images[e],a=self.URL||self.webkitURL;let l=o.uri||"",u=!1;if(o.bufferView!==void 0)l=i.getDependency("bufferView",o.bufferView).then(function(d){u=!0;const p=new Blob([d],{type:o.mimeType});return l=a.createObjectURL(p),l});else if(o.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const h=Promise.resolve(l).then(function(d){return new Promise(function(p,m){let y=p;t.isImageBitmapLoader===!0&&(y=function(v){const x=new $t(v);x.needsUpdate=!0,p(x)}),t.load(us.resolveURL(d,s.path),y,void 0,m)})}).then(function(d){return u===!0&&a.revokeObjectURL(l),d.userData.mimeType=o.mimeType||y6(o.uri),d}).catch(function(d){throw console.error("THREE.GLTFLoader: Couldn't load texture",l),d});return this.sourceCache[e]=h,h}assignTexture(e,t,i,r){const s=this;return this.getDependency("texture",i.index).then(function(o){if(!o)return null;if(i.texCoord!==void 0&&i.texCoord>0&&(o=o.clone(),o.channel=i.texCoord),s.extensions[St.KHR_TEXTURE_TRANSFORM]){const a=i.extensions!==void 0?i.extensions[St.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const l=s.associations.get(o);o=s.extensions[St.KHR_TEXTURE_TRANSFORM].extendTexture(o,a),s.associations.set(o,l)}}return r!==void 0&&("colorSpace"in o?o.colorSpace=r===3001?"srgb":"srgb-linear":o.encoding=r),e[t]=o,o})}assignFinalMaterial(e){const t=e.geometry;let i=e.material;const r=t.attributes.tangent===void 0,s=t.attributes.color!==void 0,o=t.attributes.normal===void 0;if(e.isPoints){const a="PointsMaterial:"+i.uuid;let l=this.cache.get(a);l||(l=new _h,Pn.prototype.copy.call(l,i),l.color.copy(i.color),l.map=i.map,l.sizeAttenuation=!1,this.cache.add(a,l)),i=l}else if(e.isLine){const a="LineBasicMaterial:"+i.uuid;let l=this.cache.get(a);l||(l=new ui,Pn.prototype.copy.call(l,i),l.color.copy(i.color),l.map=i.map,this.cache.add(a,l)),i=l}if(r||s||o){let a="ClonedMaterial:"+i.uuid+":";r&&(a+="derivative-tangents:"),s&&(a+="vertex-colors:"),o&&(a+="flat-shading:");let l=this.cache.get(a);l||(l=i.clone(),s&&(l.vertexColors=!0),o&&(l.flatShading=!0),r&&(l.normalScale&&(l.normalScale.y*=-1),l.clearcoatNormalScale&&(l.clearcoatNormalScale.y*=-1)),this.cache.add(a,l),this.associations.set(l,this.associations.get(i))),i=l}e.material=i}getMaterialType(){return Ih}loadMaterial(e){const t=this,i=this.json,r=this.extensions,s=i.materials[e];let o;const a={},l=s.extensions||{},u=[];if(l[St.KHR_MATERIALS_UNLIT]){const d=r[St.KHR_MATERIALS_UNLIT];o=d.getMaterialType(),u.push(d.extendParams(a,s,t))}else{const d=s.pbrMetallicRoughness||{};if(a.color=new De(1,1,1),a.opacity=1,Array.isArray(d.baseColorFactor)){const p=d.baseColorFactor;a.color.fromArray(p),a.opacity=p[3]}d.baseColorTexture!==void 0&&u.push(t.assignTexture(a,"map",d.baseColorTexture,3001)),a.metalness=d.metallicFactor!==void 0?d.metallicFactor:1,a.roughness=d.roughnessFactor!==void 0?d.roughnessFactor:1,d.metallicRoughnessTexture!==void 0&&(u.push(t.assignTexture(a,"metalnessMap",d.metallicRoughnessTexture)),u.push(t.assignTexture(a,"roughnessMap",d.metallicRoughnessTexture))),o=this._invokeOne(function(p){return p.getMaterialType&&p.getMaterialType(e)}),u.push(Promise.all(this._invokeAll(function(p){return p.extendMaterialParams&&p.extendMaterialParams(e,a)})))}s.doubleSided===!0&&(a.side=Fr);const h=s.alphaMode||Mv.OPAQUE;if(h===Mv.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,h===Mv.MASK&&(a.alphaTest=s.alphaCutoff!==void 0?s.alphaCutoff:.5)),s.normalTexture!==void 0&&o!==Vi&&(u.push(t.assignTexture(a,"normalMap",s.normalTexture)),a.normalScale=new pe(1,1),s.normalTexture.scale!==void 0)){const d=s.normalTexture.scale;a.normalScale.set(d,d)}return s.occlusionTexture!==void 0&&o!==Vi&&(u.push(t.assignTexture(a,"aoMap",s.occlusionTexture)),s.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=s.occlusionTexture.strength)),s.emissiveFactor!==void 0&&o!==Vi&&(a.emissive=new De().fromArray(s.emissiveFactor)),s.emissiveTexture!==void 0&&o!==Vi&&u.push(t.assignTexture(a,"emissiveMap",s.emissiveTexture,3001)),Promise.all(u).then(function(){const d=new o(a);return s.name&&(d.name=s.name),So(d,s),t.associations.set(d,{materials:e}),s.extensions&&ba(r,d,s),d})}createUniqueName(e){const t=Et.sanitizeNodeName(e||"");return t in this.nodeNamesUsed?t+"_"+ ++this.nodeNamesUsed[t]:(this.nodeNamesUsed[t]=0,t)}loadGeometries(e){const t=this,i=this.extensions,r=this.primitiveCache;function s(a){return i[St.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,t).then(function(l){return QE(l,a,t)})}const o=[];for(let a=0,l=e.length;a0&&m6(A,s),A.name=t.createUniqueName(s.name||"mesh_"+e),So(A,s),x.extensions&&ba(r,A,x),t.assignFinalMaterial(A),d.push(A)}for(let m=0,y=d.length;m1?h=new Gs:u.length===1?h=u[0]:h=new Mt,h!==u[0])for(let d=0,p=u.length;d{const d=new Map;for(const[p,m]of r.associations)(p instanceof Pn||p instanceof $t)&&d.set(p,m);return h.traverse(p=>{const m=r.associations.get(p);m!=null&&d.set(p,m)}),d};return r.associations=u(s),s})}}function _6(n,e,t){const i=e.attributes,r=new ra;if(i.POSITION!==void 0){const a=t.json.accessors[i.POSITION],l=a.min,u=a.max;if(l!==void 0&&u!==void 0){if(r.set(new F(l[0],l[1],l[2]),new F(u[0],u[1],u[2])),a.normalized){const h=P1(Lc[a.componentType]);r.min.multiplyScalar(h),r.max.multiplyScalar(h)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;const s=e.targets;if(s!==void 0){const a=new F,l=new F;for(let u=0,h=s.length;u0,b=J>0,P=W>0,R=(M?1:0)+(b?1:0)+(P?1:0),R){case 0:{A.push(v[w]),A.push(v[w+1]),A.push(v[w+2]);break}case 1:{if(M&&(E=v[w+1],B=v[w+2],I=y(v[w],E,x,_),z=y(v[w],B,x,_)),b){E=v[w],B=v[w+2],I=y(v[w+1],E,x,_),z=y(v[w+1],B,x,_),A.push(I),A.push(B.clone()),A.push(E.clone()),A.push(B.clone()),A.push(I.clone()),A.push(z);break}P&&(E=v[w],B=v[w+1],I=y(v[w+2],E,x,_),z=y(v[w+2],B,x,_)),A.push(E.clone()),A.push(B.clone()),A.push(I),A.push(z),A.push(I.clone()),A.push(B.clone());break}case 2:{M||(E=v[w].clone(),B=y(E,v[w+1],x,_),I=y(E,v[w+2],x,_),A.push(E),A.push(B),A.push(I)),b||(E=v[w+1].clone(),B=y(E,v[w+2],x,_),I=y(E,v[w],x,_),A.push(E),A.push(B),A.push(I)),P||(E=v[w+2].clone(),B=y(E,v[w],x,_),I=y(E,v[w+1],x,_),A.push(E),A.push(B),A.push(I));break}}}return A}function y(v,x,A,_){const w=v.position.dot(A)-_,M=x.position.dot(A)-_,b=w/(w-M);return new ZE(new F(v.position.x+b*(x.position.x-v.position.x),v.position.y+b*(x.position.y-v.position.y),v.position.z+b*(x.position.z-v.position.z)),new F(v.normal.x+b*(x.normal.x-v.normal.x),v.normal.y+b*(x.normal.y-v.normal.y),v.normal.z+b*(x.normal.z-v.normal.z)))}}}class ZE{constructor(e,t){this.position=e,this.normal=t}clone(){return new this.constructor(this.position.clone(),this.normal.clone())}}const Ev=new WeakMap;class w6 extends Ai{constructor(e){super(e),this.decoderPath="",this.decoderConfig={},this.decoderBinary=null,this.decoderPending=null,this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL="",this.defaultAttributeIDs={position:"POSITION",normal:"NORMAL",color:"COLOR",uv:"TEX_COORD"},this.defaultAttributeTypes={position:"Float32Array",normal:"Float32Array",color:"Float32Array",uv:"Float32Array"}}setDecoderPath(e){return this.decoderPath=e,this}setDecoderConfig(e){return this.decoderConfig=e,this}setWorkerLimit(e){return this.workerLimit=e,this}load(e,t,i,r){const s=new Xi(this.manager);s.setPath(this.path),s.setResponseType("arraybuffer"),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(e,o=>{const a={attributeIDs:this.defaultAttributeIDs,attributeTypes:this.defaultAttributeTypes,useUniqueIDs:!1};this.decodeGeometry(o,a).then(t).catch(r)},i,r)}decodeDracoFile(e,t,i,r){const s={attributeIDs:i||this.defaultAttributeIDs,attributeTypes:r||this.defaultAttributeTypes,useUniqueIDs:!!i};this.decodeGeometry(e,s).then(t)}decodeGeometry(e,t){for(const l in t.attributeTypes){const u=t.attributeTypes[l];u.BYTES_PER_ELEMENT!==void 0&&(t.attributeTypes[l]=u.name)}const i=JSON.stringify(t);if(Ev.has(e)){const l=Ev.get(e);if(l.key===i)return l.promise;if(e.byteLength===0)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}let r;const s=this.workerNextTaskID++,o=e.byteLength,a=this._getWorker(s,o).then(l=>(r=l,new Promise((u,h)=>{r._callbacks[s]={resolve:u,reject:h},r.postMessage({type:"decode",id:s,taskConfig:t,buffer:e},[e])}))).then(l=>this._createGeometry(l.geometry));return a.catch(()=>!0).then(()=>{r&&s&&this._releaseTask(r,s)}),Ev.set(e,{key:i,promise:a}),a}_createGeometry(e){const t=new ft;e.index&&t.setIndex(new Lt(e.index.array,1));for(let i=0;i{i.load(e,r,void 0,s)})}preload(){return this._initDecoder(),this}_initDecoder(){if(this.decoderPending)return this.decoderPending;const e=typeof WebAssembly!="object"||this.decoderConfig.type==="js",t=[];return e?t.push(this._loadLibrary("draco_decoder.js","text")):(t.push(this._loadLibrary("draco_wasm_wrapper.js","text")),t.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(t).then(i=>{const r=i[0];e||(this.decoderConfig.wasmBinary=i[1]);const s=S6.toString(),o=["/* draco decoder */",r,"","/* worker */",s.substring(s.indexOf("{")+1,s.lastIndexOf("}"))].join(` +`);this.workerSourceURL=URL.createObjectURL(new Blob([o]))}),this.decoderPending}_getWorker(e,t){return this._initDecoder().then(()=>{if(this.workerPool.lengths._taskLoad?-1:1});const i=this.workerPool[this.workerPool.length-1];return i._taskCosts[e]=t,i._taskLoad+=t,i})}_releaseTask(e,t){e._taskLoad-=e._taskCosts[t],delete e._callbacks[t],delete e._taskCosts[t]}debug(){console.log("Task load: ",this.workerPool.map(e=>e._taskLoad))}dispose(){for(let e=0;e{const d=h.draco,p=new d.Decoder,m=new d.DecoderBuffer;m.Init(new Int8Array(l),l.byteLength);try{const y=t(d,p,m,u),v=y.attributes.map(x=>x.array.buffer);y.index&&v.push(y.index.array.buffer),self.postMessage({type:"decode",id:a.id,geometry:y},v)}catch(y){console.error(y),self.postMessage({type:"error",id:a.id,error:y.message})}finally{d.destroy(m),d.destroy(p)}});break}};function t(o,a,l,u){const h=u.attributeIDs,d=u.attributeTypes;let p,m;const y=a.GetEncodedGeometryType(l);if(y===o.TRIANGULAR_MESH)p=new o.Mesh,m=a.DecodeBufferToMesh(l,p);else if(y===o.POINT_CLOUD)p=new o.PointCloud,m=a.DecodeBufferToPointCloud(l,p);else throw new Error("THREE.DRACOLoader: Unexpected geometry type.");if(!m.ok()||p.ptr===0)throw new Error("THREE.DRACOLoader: Decoding failed: "+m.error_msg());const v={index:null,attributes:[]};for(const x in h){const A=self[d[x]];let _,w;if(u.useUniqueIDs)w=h[x],_=a.GetAttributeByUniqueId(p,w);else{if(w=a.GetAttributeId(p,o[h[x]]),w===-1)continue;_=a.GetAttribute(p,w)}v.attributes.push(r(o,a,p,x,A,_))}return y===o.TRIANGULAR_MESH&&(v.index=i(o,a,p)),o.destroy(p),v}function i(o,a,l){const h=l.num_faces()*3,d=h*4,p=o._malloc(d);a.GetTrianglesUInt32Array(l,d,p);const m=new Uint32Array(o.HEAPF32.buffer,p,h).slice();return o._free(p),{array:m,itemSize:1}}function r(o,a,l,u,h,d){const p=d.num_components(),y=l.num_points()*p,v=y*h.BYTES_PER_ELEMENT,x=s(o,h),A=o._malloc(v);a.GetAttributeDataArrayForAllPoints(l,d,x,v,A);const _=new h(o.HEAPF32.buffer,A,y).slice();return o._free(A),{name:u,array:_,itemSize:p}}function s(o,a){switch(a){case Float32Array:return o.DT_FLOAT32;case Int8Array:return o.DT_INT8;case Int16Array:return o.DT_INT16;case Int32Array:return o.DT_INT32;case Uint8Array:return o.DT_UINT8;case Uint16Array:return o.DT_UINT16;case Uint32Array:return o.DT_UINT32}}}let Vp;const bv=()=>{if(Vp)return Vp;const n="B9h9z9tFBBBF8fL9gBB9gLaaaaaFa9gEaaaB9gFaFa9gEaaaFaEMcBFFFGGGEIIILF9wFFFLEFBFKNFaFCx/IFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBF8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBGy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBEn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBIi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBKI9z9iqlBOc+x8ycGBM/qQFTa8jUUUUBCU/EBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAGTkUUUBRNCUoBAG9uC/wgBZHKCUGAKCUG9JyRVAECFJRICBRcGXEXAcAF9PQFAVAFAclAcAVJAF9JyRMGXGXAG9FQBAMCbJHKC9wZRSAKCIrCEJCGrRQANCUGJRfCBRbAIRTEXGXAOATlAQ9PQBCBRISEMATAQJRIGXAS9FQBCBRtCBREEXGXAOAIlCi9PQBCBRISLMANCU/CBJAEJRKGXGXGXGXGXATAECKrJ2BBAtCKZrCEZfIBFGEBMAKhB83EBAKCNJhB83EBSEMAKAI2BIAI2BBHmCKrHYAYCE6HYy86BBAKCFJAICIJAYJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCGJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCEJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCIJAYAmJHY2BBAI2BFHmCKrHPAPCE6HPy86BBAKCLJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCKJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCOJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCNJAYAmJHY2BBAI2BGHmCKrHPAPCE6HPy86BBAKCVJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCcJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCMJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCSJAYAmJHm2BBAI2BEHICKrHYAYCE6HYy86BBAKCQJAmAYJHm2BBAICIrCEZHYAYCE6HYy86BBAKCfJAmAYJHm2BBAICGrCEZHYAYCE6HYy86BBAKCbJAmAYJHK2BBAICEZHIAICE6HIy86BBAKAIJRISGMAKAI2BNAI2BBHmCIrHYAYCb6HYy86BBAKCFJAICNJAYJHY2BBAmCbZHmAmCb6Hmy86BBAKCGJAYAmJHm2BBAI2BFHYCIrHPAPCb6HPy86BBAKCEJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCIJAmAYJHm2BBAI2BGHYCIrHPAPCb6HPy86BBAKCLJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCKJAmAYJHm2BBAI2BEHYCIrHPAPCb6HPy86BBAKCOJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCNJAmAYJHm2BBAI2BIHYCIrHPAPCb6HPy86BBAKCVJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCcJAmAYJHm2BBAI2BLHYCIrHPAPCb6HPy86BBAKCMJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCSJAmAYJHm2BBAI2BKHYCIrHPAPCb6HPy86BBAKCQJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCfJAmAYJHm2BBAI2BOHICIrHYAYCb6HYy86BBAKCbJAmAYJHK2BBAICbZHIAICb6HIy86BBAKAIJRISFMAKAI8pBB83BBAKCNJAICNJ8pBB83BBAICTJRIMAtCGJRtAECTJHEAS9JQBMMGXAIQBCBRISEMGXAM9FQBANAbJ2BBRtCBRKAfREEXAEANCU/CBJAKJ2BBHTCFrCBATCFZl9zAtJHt86BBAEAGJREAKCFJHKAM9HQBMMAfCFJRfAIRTAbCFJHbAG9HQBMMABAcAG9sJANCUGJAMAG9sTkUUUBpANANCUGJAMCaJAG9sJAGTkUUUBpMAMCBAIyAcJRcAIQBMC9+RKSFMCBC99AOAIlAGCAAGCA9Ly6yRKMALCU/EBJ8kUUUUBAKM+OmFTa8jUUUUBCoFlHL8kUUUUBC9+RKGXAFCE9uHOCtJAI9LQBCaRKAE2BBHNC/wFZC/gF9HQBANCbZHVCF9LQBALCoBJCgFCUFT+JUUUBpALC84Jha83EBALC8wJha83EBALC8oJha83EBALCAJha83EBALCiJha83EBALCTJha83EBALha83ENALha83EBAEAIJC9wJRcAECFJHNAOJRMGXAF9FQBCQCbAVCF6yRSABRECBRVCBRQCBRfCBRICBRKEXGXAMAcuQBC9+RKSEMGXGXAN2BBHOC/vF9LQBALCoBJAOCIrCa9zAKJCbZCEWJHb8oGIRTAb8oGBRtGXAOCbZHbAS9PQBALAOCa9zAIJCbZCGWJ8oGBAVAbyROAb9FRbGXGXAGCG9HQBABAt87FBABCIJAO87FBABCGJAT87FBSFMAEAtjGBAECNJAOjGBAECIJATjGBMAVAbJRVALCoBJAKCEWJHmAOjGBAmATjGIALAICGWJAOjGBALCoBJAKCFJCbZHKCEWJHTAtjGBATAOjGIAIAbJRIAKCFJRKSGMGXGXAbCb6QBAQAbJAbC989zJCFJRQSFMAM1BBHbCgFZROGXGXAbCa9MQBAMCFJRMSFMAM1BFHbCgBZCOWAOCgBZqROGXAbCa9MQBAMCGJRMSFMAM1BGHbCgBZCfWAOqROGXAbCa9MQBAMCEJRMSFMAM1BEHbCgBZCdWAOqROGXAbCa9MQBAMCIJRMSFMAM2BIC8cWAOqROAMCLJRMMAOCFrCBAOCFZl9zAQJRQMGXGXAGCG9HQBABAt87FBABCIJAQ87FBABCGJAT87FBSFMAEAtjGBAECNJAQjGBAECIJATjGBMALCoBJAKCEWJHOAQjGBAOATjGIALAICGWJAQjGBALCoBJAKCFJCbZHKCEWJHOAtjGBAOAQjGIAICFJRIAKCFJRKSFMGXAOCDF9LQBALAIAcAOCbZJ2BBHbCIrHTlCbZCGWJ8oGBAVCFJHtATyROALAIAblCbZCGWJ8oGBAtAT9FHmJHtAbCbZHTyRbAT9FRTGXGXAGCG9HQBABAV87FBABCIJAb87FBABCGJAO87FBSFMAEAVjGBAECNJAbjGBAECIJAOjGBMALAICGWJAVjGBALCoBJAKCEWJHYAOjGBAYAVjGIALAICFJHICbZCGWJAOjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAIAmJCbZHICGWJAbjGBALCoBJAKCGJCbZHKCEWJHOAVjGBAOAbjGIAKCFJRKAIATJRIAtATJRVSFMAVCBAM2BBHYyHTAOC/+F6HPJROAYCbZRtGXGXAYCIrHmQBAOCFJRbSFMAORbALAIAmlCbZCGWJ8oGBROMGXGXAtQBAbCFJRVSFMAbRVALAIAYlCbZCGWJ8oGBRbMGXGXAP9FQBAMCFJRYSFMAM1BFHYCgFZRTGXGXAYCa9MQBAMCGJRYSFMAM1BGHYCgBZCOWATCgBZqRTGXAYCa9MQBAMCEJRYSFMAM1BEHYCgBZCfWATqRTGXAYCa9MQBAMCIJRYSFMAM1BIHYCgBZCdWATqRTGXAYCa9MQBAMCLJRYSFMAMCKJRYAM2BLC8cWATqRTMATCFrCBATCFZl9zAQJHQRTMGXGXAmCb6QBAYRPSFMAY1BBHMCgFZROGXGXAMCa9MQBAYCFJRPSFMAY1BFHMCgBZCOWAOCgBZqROGXAMCa9MQBAYCGJRPSFMAY1BGHMCgBZCfWAOqROGXAMCa9MQBAYCEJRPSFMAY1BEHMCgBZCdWAOqROGXAMCa9MQBAYCIJRPSFMAYCLJRPAY2BIC8cWAOqROMAOCFrCBAOCFZl9zAQJHQROMGXGXAtCb6QBAPRMSFMAP1BBHMCgFZRbGXGXAMCa9MQBAPCFJRMSFMAP1BFHMCgBZCOWAbCgBZqRbGXAMCa9MQBAPCGJRMSFMAP1BGHMCgBZCfWAbqRbGXAMCa9MQBAPCEJRMSFMAP1BEHMCgBZCdWAbqRbGXAMCa9MQBAPCIJRMSFMAPCLJRMAP2BIC8cWAbqRbMAbCFrCBAbCFZl9zAQJHQRbMGXGXAGCG9HQBABAT87FBABCIJAb87FBABCGJAO87FBSFMAEATjGBAECNJAbjGBAECIJAOjGBMALCoBJAKCEWJHYAOjGBAYATjGIALAICGWJATjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAICFJHICbZCGWJAOjGBALCoBJAKCGJCbZCEWJHOATjGBAOAbjGIALAIAm9FAmCb6qJHICbZCGWJAbjGBAIAt9FAtCb6qJRIAKCEJRKMANCFJRNABCKJRBAECSJREAKCbZRKAICbZRIAfCEJHfAF9JQBMMCBC99AMAc6yRKMALCoFJ8kUUUUBAKM/tIFGa8jUUUUBCTlRLC9+RKGXAFCLJAI9LQBCaRKAE2BBC/+FZC/QF9HQBALhB83ENAECFJRKAEAIJC98JREGXAF9FQBGXAGCG6QBEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMALCNJAICFZCGWqHGAICGrCBAICFrCFZl9zAG8oGBJHIjGBABAIjGBABCIJRBAFCaJHFQBSGMMEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMABAICGrCBAICFrCFZl9zALCNJAICFZCGWqHI8oGBJHG87FBAIAGjGBABCGJRBAFCaJHFQBMMCBC99AKAE6yRKMAKM+lLKFaF99GaG99FaG99GXGXAGCI9HQBAF9FQFEXGXGX9DBBB8/9DBBB+/ABCGJHG1BB+yAB1BBHE+yHI+L+TABCFJHL1BBHK+yHO+L+THN9DBBBB9gHVyAN9DBB/+hANAN+U9DBBBBANAVyHcAc+MHMAECa3yAI+SHIAI+UAcAMAKCa3yAO+SHcAc+U+S+S+R+VHO+U+SHN+L9DBBB9P9d9FQBAN+oRESFMCUUUU94REMAGAE86BBGXGX9DBBB8/9DBBB+/Ac9DBBBB9gyAcAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMALAG86BBGXGX9DBBB8/9DBBB+/AI9DBBBB9gyAIAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMABAG86BBABCIJRBAFCaJHFQBSGMMAF9FQBEXGXGX9DBBB8/9DBBB+/ABCIJHG8uFB+yAB8uFBHE+yHI+L+TABCGJHL8uFBHK+yHO+L+THN9DBBBB9gHVyAN9DB/+g6ANAN+U9DBBBBANAVyHcAc+MHMAECa3yAI+SHIAI+UAcAMAKCa3yAO+SHcAc+U+S+S+R+VHO+U+SHN+L9DBBB9P9d9FQBAN+oRESFMCUUUU94REMAGAE87FBGXGX9DBBB8/9DBBB+/Ac9DBBBB9gyAcAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMALAG87FBGXGX9DBBB8/9DBBB+/AI9DBBBB9gyAIAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMABAG87FBABCNJRBAFCaJHFQBMMM/SEIEaE99EaF99GXAF9FQBCBREABRIEXGXGX9D/zI818/AICKJ8uFBHLCEq+y+VHKAI8uFB+y+UHO9DB/+g6+U9DBBB8/9DBBB+/AO9DBBBB9gy+SHN+L9DBBB9P9d9FQBAN+oRVSFMCUUUU94RVMAICIJ8uFBRcAICGJ8uFBRMABALCFJCEZAEqCFWJAV87FBGXGXAKAM+y+UHN9DB/+g6+U9DBBB8/9DBBB+/AN9DBBBB9gy+SHS+L9DBBB9P9d9FQBAS+oRMSFMCUUUU94RMMABALCGJCEZAEqCFWJAM87FBGXGXAKAc+y+UHK9DB/+g6+U9DBBB8/9DBBB+/AK9DBBBB9gy+SHS+L9DBBB9P9d9FQBAS+oRcSFMCUUUU94RcMABALCaJCEZAEqCFWJAc87FBGXGX9DBBU8/AOAO+U+TANAN+U+TAKAK+U+THO9DBBBBAO9DBBBB9gy+R9DB/+g6+U9DBBB8/+SHO+L9DBBB9P9d9FQBAO+oRcSFMCUUUU94RcMABALCEZAEqCFWJAc87FBAICNJRIAECIJREAFCaJHFQBMMM9JBGXAGCGrAF9sHF9FQBEXABAB8oGBHGCNWCN91+yAGCi91CnWCUUU/8EJ+++U84GBABCIJRBAFCaJHFQBMMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEM/lFFFaGXGXAFABqCEZ9FQBABRESFMGXGXAGCT9PQBABRESFMABREEXAEAF8oGBjGBAECIJAFCIJ8oGBjGBAECNJAFCNJ8oGBjGBAECSJAFCSJ8oGBjGBAECTJREAFCTJRFAGC9wJHGCb9LQBMMAGCI9JQBEXAEAF8oGBjGBAFCIJRFAECIJREAGC98JHGCE9LQBMMGXAG9FQBEXAEAF2BB86BBAECFJREAFCFJRFAGCaJHGQBMMABMoFFGaGXGXABCEZ9FQBABRESFMAFCgFZC+BwsN9sRIGXGXAGCT9PQBABRESFMABREEXAEAIjGBAECSJAIjGBAECNJAIjGBAECIJAIjGBAECTJREAGC9wJHGCb9LQBMMAGCI9JQBEXAEAIjGBAECIJREAGC98JHGCE9LQBMMGXAG9FQBEXAEAF86BBAECFJREAGCaJHGQBMMABMMMFBCUNMIT9kBB",e="B9h9z9tFBBBFiI9gBB9gLaaaaaFa9gEaaaB9gFaFaEMcBBFBFFGGGEILF9wFFFLEFBFKNFaFCx/aFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBG8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBIy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBKi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBOn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBNI9z9iqlBVc+N9IcIBTEM9+FLa8jUUUUBCTlRBCBRFEXCBRGCBREEXABCNJAGJAECUaAFAGrCFZHIy86BBAEAIJREAGCFJHGCN9HQBMAFCx+YUUBJAE86BBAFCEWCxkUUBJAB8pEN83EBAFCFJHFCUG9HQBMMk8lLbaE97F9+FaL978jUUUUBCU/KBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAG/8cBBCUoBAG9uC/wgBZHKCUGAKCUG9JyRNAECFJRKCBRVGXEXAVAF9PQFANAFAVlAVANJAF9JyRcGXGXAG9FQBAcCbJHIC9wZHMCE9sRSAMCFWRQAICIrCEJCGrRfCBRbEXAKRTCBRtGXEXGXAOATlAf9PQBCBRKSLMALCU/CBJAtAM9sJRmATAfJRKCBREGXAMCoB9JQBAOAKlC/gB9JQBCBRIEXAmAIJREGXGXGXGXGXATAICKrJ2BBHYCEZfIBFGEBMAECBDtDMIBSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMIBAKCTJRKMGXGXGXGXGXAYCGrCEZfIBFGEBMAECBDtDMITSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMITAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMITAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMITAKCTJRKMGXGXGXGXGXAYCIrCEZfIBFGEBMAECBDtDMIASEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIAAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIAAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMIAAKCTJRKMGXGXGXGXGXAYCKrfIBFGEBMAECBDtDMI8wSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHYCEWCxkUUBJDBEBAYCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHYCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMI8wAKCIJAeDeBJAYCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHYCEWCxkUUBJDBEBAYCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHYCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMI8wAKCNJAeDeBJAYCx+YUUBJ2BBJRKSFMAEAKDBBBDMI8wAKCTJRKMAICoBJREAICUFJAM9LQFAERIAOAKlC/fB9LQBMMGXAEAM9PQBAECErRIEXGXAOAKlCi9PQBCBRKSOMAmAEJRYGXGXGXGXGXATAECKrJ2BBAICKZrCEZfIBFGEBMAYCBDtDMIBSEMAYAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAYAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAYAKDBBBDMIBAKCTJRKMAICGJRIAECTJHEAM9JQBMMGXAK9FQBAKRTAtCFJHtCI6QGSFMMCBRKSEMGXAM9FQBALCUGJAbJREALAbJDBGBReCBRYEXAEALCU/CBJAYJHIDBIBHdCFD9tAdCFDbHPD9OD9hD9RHdAIAMJDBIBH8ZCFD9tA8ZAPD9OD9hD9RH8ZDQBTFtGmEYIPLdKeOnHpAIAQJDBIBHyCFD9tAyAPD9OD9hD9RHyAIASJDBIBH8cCFD9tA8cAPD9OD9hD9RH8cDQBTFtGmEYIPLdKeOnH8dDQBFTtGEmYILPdKOenHPAPDQBFGEBFGEBFGEBFGEAeD9uHeDyBjGBAEAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJHIAeApA8dDQNVi8ZcMpySQ8c8dfb8e8fHPAPDQBFGEBFGEBFGEBFGED9uHeDyBjGBAIAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJHIAeAdA8ZDQNiV8ZcpMyS8cQ8df8eb8fHdAyA8cDQNiV8ZcpMyS8cQ8df8eb8fH8ZDQBFTtGEmYILPdKOenHPAPDQBFGEBFGEBFGEBFGED9uHeDyBjGBAIAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJHIAeAdA8ZDQNVi8ZcMpySQ8c8dfb8e8fHPAPDQBFGEBFGEBFGEBFGED9uHeDyBjGBAIAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJREAYCTJHYAM9JQBMMAbCIJHbAG9JQBMMABAVAG9sJALCUGJAcAG9s/8cBBALALCUGJAcCaJAG9sJAG/8cBBMAcCBAKyAVJRVAKQBMC9+RKSFMCBC99AOAKlAGCAAGCA9Ly6yRKMALCU/KBJ8kUUUUBAKMNBT+BUUUBM+KmFTa8jUUUUBCoFlHL8kUUUUBC9+RKGXAFCE9uHOCtJAI9LQBCaRKAE2BBHNC/wFZC/gF9HQBANCbZHVCF9LQBALCoBJCgFCUF/8MBALC84Jha83EBALC8wJha83EBALC8oJha83EBALCAJha83EBALCiJha83EBALCTJha83EBALha83ENALha83EBAEAIJC9wJRcAECFJHNAOJRMGXAF9FQBCQCbAVCF6yRSABRECBRVCBRQCBRfCBRICBRKEXGXAMAcuQBC9+RKSEMGXGXAN2BBHOC/vF9LQBALCoBJAOCIrCa9zAKJCbZCEWJHb8oGIRTAb8oGBRtGXAOCbZHbAS9PQBALAOCa9zAIJCbZCGWJ8oGBAVAbyROAb9FRbGXGXAGCG9HQBABAt87FBABCIJAO87FBABCGJAT87FBSFMAEAtjGBAECNJAOjGBAECIJATjGBMAVAbJRVALCoBJAKCEWJHmAOjGBAmATjGIALAICGWJAOjGBALCoBJAKCFJCbZHKCEWJHTAtjGBATAOjGIAIAbJRIAKCFJRKSGMGXGXAbCb6QBAQAbJAbC989zJCFJRQSFMAM1BBHbCgFZROGXGXAbCa9MQBAMCFJRMSFMAM1BFHbCgBZCOWAOCgBZqROGXAbCa9MQBAMCGJRMSFMAM1BGHbCgBZCfWAOqROGXAbCa9MQBAMCEJRMSFMAM1BEHbCgBZCdWAOqROGXAbCa9MQBAMCIJRMSFMAM2BIC8cWAOqROAMCLJRMMAOCFrCBAOCFZl9zAQJRQMGXGXAGCG9HQBABAt87FBABCIJAQ87FBABCGJAT87FBSFMAEAtjGBAECNJAQjGBAECIJATjGBMALCoBJAKCEWJHOAQjGBAOATjGIALAICGWJAQjGBALCoBJAKCFJCbZHKCEWJHOAtjGBAOAQjGIAICFJRIAKCFJRKSFMGXAOCDF9LQBALAIAcAOCbZJ2BBHbCIrHTlCbZCGWJ8oGBAVCFJHtATyROALAIAblCbZCGWJ8oGBAtAT9FHmJHtAbCbZHTyRbAT9FRTGXGXAGCG9HQBABAV87FBABCIJAb87FBABCGJAO87FBSFMAEAVjGBAECNJAbjGBAECIJAOjGBMALAICGWJAVjGBALCoBJAKCEWJHYAOjGBAYAVjGIALAICFJHICbZCGWJAOjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAIAmJCbZHICGWJAbjGBALCoBJAKCGJCbZHKCEWJHOAVjGBAOAbjGIAKCFJRKAIATJRIAtATJRVSFMAVCBAM2BBHYyHTAOC/+F6HPJROAYCbZRtGXGXAYCIrHmQBAOCFJRbSFMAORbALAIAmlCbZCGWJ8oGBROMGXGXAtQBAbCFJRVSFMAbRVALAIAYlCbZCGWJ8oGBRbMGXGXAP9FQBAMCFJRYSFMAM1BFHYCgFZRTGXGXAYCa9MQBAMCGJRYSFMAM1BGHYCgBZCOWATCgBZqRTGXAYCa9MQBAMCEJRYSFMAM1BEHYCgBZCfWATqRTGXAYCa9MQBAMCIJRYSFMAM1BIHYCgBZCdWATqRTGXAYCa9MQBAMCLJRYSFMAMCKJRYAM2BLC8cWATqRTMATCFrCBATCFZl9zAQJHQRTMGXGXAmCb6QBAYRPSFMAY1BBHMCgFZROGXGXAMCa9MQBAYCFJRPSFMAY1BFHMCgBZCOWAOCgBZqROGXAMCa9MQBAYCGJRPSFMAY1BGHMCgBZCfWAOqROGXAMCa9MQBAYCEJRPSFMAY1BEHMCgBZCdWAOqROGXAMCa9MQBAYCIJRPSFMAYCLJRPAY2BIC8cWAOqROMAOCFrCBAOCFZl9zAQJHQROMGXGXAtCb6QBAPRMSFMAP1BBHMCgFZRbGXGXAMCa9MQBAPCFJRMSFMAP1BFHMCgBZCOWAbCgBZqRbGXAMCa9MQBAPCGJRMSFMAP1BGHMCgBZCfWAbqRbGXAMCa9MQBAPCEJRMSFMAP1BEHMCgBZCdWAbqRbGXAMCa9MQBAPCIJRMSFMAPCLJRMAP2BIC8cWAbqRbMAbCFrCBAbCFZl9zAQJHQRbMGXGXAGCG9HQBABAT87FBABCIJAb87FBABCGJAO87FBSFMAEATjGBAECNJAbjGBAECIJAOjGBMALCoBJAKCEWJHYAOjGBAYATjGIALAICGWJATjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAICFJHICbZCGWJAOjGBALCoBJAKCGJCbZCEWJHOATjGBAOAbjGIALAIAm9FAmCb6qJHICbZCGWJAbjGBAIAt9FAtCb6qJRIAKCEJRKMANCFJRNABCKJRBAECSJREAKCbZRKAICbZRIAfCEJHfAF9JQBMMCBC99AMAc6yRKMALCoFJ8kUUUUBAKM/tIFGa8jUUUUBCTlRLC9+RKGXAFCLJAI9LQBCaRKAE2BBC/+FZC/QF9HQBALhB83ENAECFJRKAEAIJC98JREGXAF9FQBGXAGCG6QBEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMALCNJAICFZCGWqHGAICGrCBAICFrCFZl9zAG8oGBJHIjGBABAIjGBABCIJRBAFCaJHFQBSGMMEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMABAICGrCBAICFrCFZl9zALCNJAICFZCGWqHI8oGBJHG87FBAIAGjGBABCGJRBAFCaJHFQBMMCBC99AKAE6yRKMAKM/dLEK97FaF97GXGXAGCI9HQBAF9FQFCBRGEXABABDBBBHECiD+rFCiD+sFD/6FHIAECND+rFCiD+sFD/6FAID/gFAECTD+rFCiD+sFD/6FHLD/gFD/kFD/lFHKCBDtD+2FHOAICUUUU94DtHND9OD9RD/kFHI9DBB/+hDYAIAID/mFAKAKD/mFALAOALAND9OD9RD/kFHIAID/mFD/kFD/kFD/jFD/nFHLD/mF9DBBX9LDYHOD/kFCgFDtD9OAECUUU94DtD9OD9QAIALD/mFAOD/kFCND+rFCU/+EDtD9OD9QAKALD/mFAOD/kFCTD+rFCUU/8ODtD9OD9QDMBBABCTJRBAGCIJHGAF9JQBSGMMAF9FQBCBRGEXABCTJHVAVDBBBHECBDtHOCUU98D8cFCUU98D8cEHND9OABDBBBHKAEDQILKOSQfbPden8c8d8e8fCggFDtD9OD/6FAKAEDQBFGENVcMTtmYi8ZpyHECTD+sFD/6FHID/gFAECTD+rFCTD+sFD/6FHLD/gFD/kFD/lFHE9DB/+g6DYALAEAOD+2FHOALCUUUU94DtHcD9OD9RD/kFHLALD/mFAEAED/mFAIAOAIAcD9OD9RD/kFHEAED/mFD/kFD/kFD/jFD/nFHID/mF9DBBX9LDYHOD/kFCTD+rFALAID/mFAOD/kFCggEDtD9OD9QHLAEAID/mFAOD/kFCaDbCBDnGCBDnECBDnKCBDnOCBDncCBDnMCBDnfCBDnbD9OHEDQNVi8ZcMpySQ8c8dfb8e8fD9QDMBBABAKAND9OALAEDQBFTtGEmYILPdKOenD9QDMBBABCAJRBAGCIJHGAF9JQBMMM/hEIGaF97FaL978jUUUUBCTlREGXAF9FQBCBRIEXAEABDBBBHLABCTJHKDBBBHODQILKOSQfbPden8c8d8e8fHNCTD+sFHVCID+rFDMIBAB9DBBU8/DY9D/zI818/DYAVCEDtD9QD/6FD/nFHVALAODQBFGENVcMTtmYi8ZpyHLCTD+rFCTD+sFD/6FD/mFHOAOD/mFAVALCTD+sFD/6FD/mFHcAcD/mFAVANCTD+rFCTD+sFD/6FD/mFHNAND/mFD/kFD/kFD/lFCBDtD+4FD/jF9DB/+g6DYHVD/mF9DBBX9LDYHLD/kFCggEDtHMD9OAcAVD/mFALD/kFCTD+rFD9QHcANAVD/mFALD/kFCTD+rFAOAVD/mFALD/kFAMD9OD9QHVDQBFTtGEmYILPdKOenHLD8dBAEDBIBDyB+t+J83EBABCNJALD8dFAEDBIBDyF+t+J83EBAKAcAVDQNVi8ZcMpySQ8c8dfb8e8fHVD8dBAEDBIBDyG+t+J83EBABCiJAVD8dFAEDBIBDyE+t+J83EBABCAJRBAICIJHIAF9JQBMMM9jFF97GXAGCGrAF9sHG9FQBCBRFEXABABDBBBHECND+rFCND+sFD/6FAECiD+sFCnD+rFCUUU/8EDtD+uFD/mFDMBBABCTJRBAFCIJHFAG9JQBMMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEMMMFBCUNMIT9tBB",t=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),i=new Uint8Array([32,0,65,253,3,1,2,34,4,106,6,5,11,8,7,20,13,33,12,16,128,9,116,64,19,113,127,15,10,21,22,14,255,66,24,54,136,107,18,23,192,26,114,118,132,17,77,101,130,144,27,87,131,44,45,74,156,154,70,167]);if(typeof WebAssembly!="object")return{supported:!1};let r=n;WebAssembly.validate(t)&&(r=e);let s;const o=WebAssembly.instantiate(a(r),{}).then(d=>{s=d.instance,s.exports.__wasm_call_ctors()});function a(d){const p=new Uint8Array(d.length);for(let y=0;y96?v-71:v>64?v-65:v>47?v+4:v>46?63:62}let m=0;for(let y=0;yn===Object(n)&&!Array.isArray(n)&&typeof n!="function";function OA(n,e){const t=Gi(r=>r.gl),i=la(Dh,qE(n)?Object.values(n):n);if(U.useLayoutEffect(()=>{e==null||e(i)},[e]),U.useEffect(()=>{"initTexture"in t&&(Array.isArray(i)?i:[i]).forEach(t.initTexture)},[t,i]),qE(n)){const r=Object.keys(n),s={};return r.forEach(o=>Object.assign(s,{[o]:i[r.indexOf(o)]})),s}else return i}OA.preload=n=>la.preload(Dh,n);OA.clear=n=>la.clear(Dh,n);const M6=()=>parseInt(nu.replace(/\D+/g,"")),eR=M6();function C6(n){return Array.isArray(n)}function Tv(n=[0,0,0]){return C6(n)?n:n instanceof F||n instanceof ml?[n.x,n.y,n.z]:[n,n,n]}const E6=U.forwardRef(function({debug:e,depthTest:t=!1,polygonOffsetFactor:i=-10,map:r,mesh:s,children:o,position:a,rotation:l,scale:u,...h},d){const p=U.useRef(null);U.useImperativeHandle(d,()=>p.current);const m=U.useRef(null);return U.useLayoutEffect(()=>{const y=(s==null?void 0:s.current)||p.current.parent,v=p.current;if(!(y instanceof In))throw new Error('Decal must have a Mesh as parent or specify its "mesh" prop');const x={position:new F,rotation:new ml,scale:new F(1,1,1)};if(y){ss(x,{position:a,scale:u});const A=y.matrixWorld.clone();if(y.matrixWorld.identity(),!l||typeof l=="number"){const _=new Mt;_.position.copy(x.position),_.lookAt(y.position),typeof l=="number"&&_.rotateZ(l),ss(x,{rotation:_.rotation})}else ss(x,{rotation:l});return v.geometry=new A6(y,x.position,x.rotation,x.scale),m.current&&(ss(m.current,x),m.current.traverse(_=>_.raycast=()=>null)),y.matrixWorld=A,()=>{v.geometry.dispose()}}},[s,...Tv(a),...Tv(u),...Tv(l)]),U.createElement("mesh",_r({ref:p,"material-transparent":!0,"material-polygonOffset":!0,"material-polygonOffsetFactor":i,"material-depthTest":t,"material-map":r},h),o,e&&U.createElement("mesh",{ref:m},U.createElement("boxGeometry",null),U.createElement("meshNormalMaterial",{wireframe:!0}),U.createElement("axesHelper",null)))});let Wp=null,tR="https://www.gstatic.com/draco/versioned/decoders/1.5.5/";function nR(n,e,t){return i=>{t&&t(i),n&&(Wp||(Wp=new w6),Wp.setDecoderPath(typeof n=="string"?n:tR),i.setDRACOLoader(Wp)),e&&i.setMeshoptDecoder(typeof bv=="function"?bv():bv)}}function Nh(n,e=!0,t=!0,i){return la(NA,n,nR(e,t,i))}Nh.preload=(n,e=!0,t=!0,i)=>la.preload(NA,n,nR(e,t,i));Nh.clear=n=>la.clear(NA,n);Nh.setDecoderPath=n=>{tR=n};const zA=U.forwardRef(({makeDefault:n,camera:e,regress:t,domElement:i,enableDamping:r=!0,keyEvents:s=!1,onChange:o,onStart:a,onEnd:l,...u},h)=>{const d=Gi(P=>P.invalidate),p=Gi(P=>P.camera),m=Gi(P=>P.gl),y=Gi(P=>P.events),v=Gi(P=>P.setEvents),x=Gi(P=>P.set),A=Gi(P=>P.get),_=Gi(P=>P.performance),w=e||p,M=i||y.connected||m.domElement,b=U.useMemo(()=>new HH(w),[w]);return fu(()=>{b.enabled&&b.update()},-1),U.useEffect(()=>(s&&b.connect(s===!0?M:s),b.connect(M),()=>void b.dispose()),[s,M,t,b,d]),U.useEffect(()=>{const P=B=>{d(),t&&_.regress(),o&&o(B)},R=B=>{a&&a(B)},E=B=>{l&&l(B)};return b.addEventListener("change",P),b.addEventListener("start",R),b.addEventListener("end",E),()=>{b.removeEventListener("start",R),b.removeEventListener("end",E),b.removeEventListener("change",P)}},[o,a,l,b,d,v]),U.useEffect(()=>{if(n){const P=A().controls;return x({controls:b}),()=>x({controls:P})}},[n,b]),U.createElement("primitive",_r({ref:h,object:b,enableDamping:r},u))}),Pv=eR>=154?"opaque_fragment":"output_fragment";class b6 extends _h{constructor(e){super(e),this.onBeforeCompile=(t,i)=>{const{isWebGL2:r}=i.capabilities;t.fragmentShader=t.fragmentShader.replace(`#include <${Pv}>`,` + ${r?`#include <${Pv}>`:`#extension GL_OES_standard_derivatives : enable +#include <${Pv}>`} vec2 cxy = 2.0 * gl_PointCoord - 1.0; float r = dot(cxy, cxy); float delta = fwidth(r); float mask = 1.0 - smoothstep(1.0 - delta, 1.0 + delta, r); gl_FragColor = vec4(gl_FragColor.rgb, mask * gl_FragColor.a ); #include - #include <${nR>=154?"colorspace_fragment":"encodings_fragment"}> - `)}}}const L6=U.forwardRef((n,e)=>{const[t]=U.useState(()=>new R6(null));return U.createElement("primitive",_r({},n,{object:t,ref:e,attach:"material"}))}),I6=U.forwardRef(({children:n,enabled:e=!0,speed:t=1,rotationIntensity:i=1,floatIntensity:r=1,floatingRange:s=[-.1,.1],...o},a)=>{const l=U.useRef(null),u=U.useRef(Math.random()*1e4);return fu(h=>{var d,p;if(!e||t===0)return;const m=u.current+h.clock.getElapsedTime();l.current.rotation.x=Math.cos(m/4*t)/8*i,l.current.rotation.y=Math.sin(m/4*t)/8*i,l.current.rotation.z=Math.sin(m/4*t)/20*i;let y=Math.sin(m/4*t)/10;y=q_.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()}),U.createElement("group",o,U.createElement("group",{ref:NA([l,a]),matrixAutoUpdate:!1},n))});let Ta,nf;const D6=U.createContext(null),eb=new ot,tb=new F,F6=U.forwardRef(({children:n,range:e,limit:t=1e3,...i},r)=>{const s=U.useRef(null),[o,a]=U.useState([]),[[l,u,h]]=U.useState(()=>[new Float32Array(t*3),Float32Array.from({length:t*3},()=>1),Float32Array.from({length:t},()=>1)]);U.useEffect(()=>{s.current.geometry.attributes.position.needsUpdate=!0}),fu(()=>{for(s.current.updateMatrix(),s.current.updateMatrixWorld(),eb.copy(s.current.matrixWorld).invert(),s.current.geometry.drawRange.count=Math.min(t,e!==void 0?e:t,o.length),Ta=0;Ta({getParent:()=>s,subscribe:p=>(a(m=>[...m,p]),()=>a(m=>m.filter(y=>y.current!==p.current)))}),[]);return U.createElement("points",_r({userData:{instances:o},matrixAutoUpdate:!1,ref:NA([r,s]),raycast:()=>null},i),U.createElement("bufferGeometry",null,U.createElement("bufferAttribute",{attach:"attributes-position",count:l.length/3,array:l,itemSize:3,usage:el}),U.createElement("bufferAttribute",{attach:"attributes-color",count:u.length/3,array:u,itemSize:3,usage:el}),U.createElement("bufferAttribute",{attach:"attributes-size",count:h.length,array:h,itemSize:1,usage:el})),U.createElement(D6.Provider,{value:d},n))}),k6=U.forwardRef(({children:n,positions:e,colors:t,sizes:i,stride:r=3,...s},o)=>{const a=U.useRef(null);return fu(()=>{const l=a.current.geometry.attributes;l.position.needsUpdate=!0,t&&(l.color.needsUpdate=!0),i&&(l.size.needsUpdate=!0)}),U.createElement("points",_r({ref:NA([o,a])},s),U.createElement("bufferGeometry",null,U.createElement("bufferAttribute",{attach:"attributes-position",count:e.length/r,array:e,itemSize:r,usage:el}),t&&U.createElement("bufferAttribute",{attach:"attributes-color",count:t.length/r,array:t,itemSize:3,usage:el}),i&&U.createElement("bufferAttribute",{attach:"attributes-size",count:i.length/r,array:i,itemSize:1,usage:el})),n)}),N6=U.forwardRef((n,e)=>n.positions instanceof Float32Array?U.createElement(k6,_r({},n,{ref:e})):U.createElement(F6,_r({},n,{ref:e})));var $m={},O6={get exports(){return $m},set exports(n){$m=n}},z6="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",U6=z6,G6=U6;function sR(){}function oR(){}oR.resetWarningCache=sR;var H6=function(){function n(i,r,s,o,a,l){if(l!==G6){var u=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 u.name="Invariant Violation",u}}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:oR,resetWarningCache:sR};return t.PropTypes=t,t};O6.exports=H6();function Xg({all:n,scene:e,camera:t}){const i=Gi(({gl:o})=>o),r=Gi(({camera:o})=>o),s=Gi(({scene:o})=>o);return U.useLayoutEffect(()=>{const o=[];n&&(e||s).traverse(u=>{u.visible===!1&&(o.push(u),u.visible=!0)}),i.compile(e||s,t||r);const a=new rA(128);new iA(.01,1e5,a).update(i,e||s),a.dispose(),o.forEach(u=>u.visible=!1)},[]),null}const GA=()=>{const{progress:n}=GH();return Xe(UH,{as:"div",center:!0,style:{display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column"},children:[ee("span",{className:"canvas-loader"}),Xe("p",{style:{fontSize:14,color:"#F1F1F1",fontWeight:800,marginTop:40},children:[n.toFixed(2),"%"]})]})},V6=()=>{const n=Oh("./planet/scene.gltf");return ee("primitive",{object:n.scene,scale:2,"position-y":0,"rotation-y":0})},W6=()=>ee(Jg,{shadows:!0,frameloop:"demand",dpr:[1,2],gl:{preserveDrawingBuffer:!0},camera:{fov:45,near:.1,far:200,position:[-4,3,6]},children:Xe(U.Suspense,{fallback:ee(GA,{}),children:[ee(UA,{autoRotate:!0,enableZoom:!1,maxPolarAngle:Math.PI/2,minPolarAngle:Math.PI/2}),ee(V6,{}),ee(Xg,{all:!0})]})}),j6=n=>{const[e]=zA([n.imgUrl]);return Xe(I6,{speed:1.75,rotationIntensity:1,floatIntensity:2,children:[ee("ambientLight",{intensity:.25}),ee("directionalLight",{position:[0,0,.05]}),Xe("mesh",{castShadow:!0,receiveShadow:!0,scale:2.75,children:[ee("icosahedronGeometry",{args:[1,1]}),ee("meshStandardMaterial",{color:"#fff8eb",polygonOffset:!0,polygonOffsetFactor:-5,flatShading:!0}),ee(B6,{position:[0,0,1],rotation:[2*Math.PI,0,6.25],scale:1,map:e,flatShading:!0})]})]})},J6=({icon:n})=>Xe(Jg,{frameloop:"demand",dpr:[1,2],gl:{preserveDrawingBuffer:!0},children:[Xe(U.Suspense,{fallback:ee(GA,{}),children:[ee(UA,{enableZoom:!1,maxPolarAngle:Math.PI/2,minPolarAngle:Math.PI/2}),ee(j6,{imgUrl:n})]}),ee(Xg,{all:!0})]}),X6=({isMobile:n})=>{const e=Oh("./desktop_pc/scene.gltf");return Xe("mesh",{children:[ee("hemisphereLight",{intensity:.1,groundColor:"black"}),ee("spotLight",{position:[-20,50,10],angle:.12,penumbra:1,intensity:1,castShadow:!0,"shadow-mapSize":1024}),ee("pointLight",{intensity:1}),ee("primitive",{object:e.scene,scale:n?.6:.7,position:n?[0,-3.5,-2.2]:[0,-4,-1.5],rotation:[-.01,-.2,-.1]})]})},Y6=()=>{const[n,e]=U.useState(!1);return U.useEffect(()=>{const t=window.matchMedia("(max-width: 640px)");e(t.matches);const i=r=>{e(r.matches)};return t.addEventListener("change",i),()=>{t.removeEventListener("change",i)}},[]),Xe(Jg,{frameloop:"demand",shadows:!0,dpr:[1,2],camera:{position:[20,3,5],fov:25},gl:{preserveDrawingBuffer:!0},children:[Xe(U.Suspense,{fallback:ee(GA,{}),children:[ee(UA,{enableZoom:!1,maxPolarAngle:Math.PI/2,minPolarAngle:Math.PI/2}),ee(X6,{isMobile:n})]}),ee(Xg,{all:!0})]})};function Ic(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function nb(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable})),t.push.apply(t,i)}return t}function ib(n){for(var e=1;e0&&e<1&&(e*=65536),e=Math.floor(e),e<256&&(e|=e<<8);for(var t=0;t<256;t++){var i;t&1?i=rb[t]^e&255:i=rb[t]^e>>8&255,sb[t]=sb[t+256]=i,ob[t]=ob[t+256]=K6[i%12]}};Q6(0);function Z6(n){if(typeof n=="number")n=Math.abs(n);else if(typeof n=="string"){var e=n;n=0;for(var t=0;t2&&arguments[2]!==void 0?arguments[2]:$6,i=ib(ib({},e8),e),r=i.radius,s=i.center,o=0;o{const e=U.useRef(),[t]=U.useState(()=>t8(new Float32Array(5001),{radius:1.2}));return fu((i,r)=>{e.current.rotation.x-=r/10,e.current.rotation.y-=r/15}),ee("group",{rotation:[0,0,Math.PI/4],children:ee(N6,{ref:e,positions:t,stride:3,frustumCulled:!0,...n,children:ee(L6,{transparent:!0,color:"#f272c8",size:.002,sizeAttenuation:!0,depthWrite:!1})})})},i8=()=>ee("div",{className:"w-full h-auto absolute inset-0 z-[-1]",children:Xe(Jg,{camera:{position:[0,0,1]},children:[ee(U.Suspense,{fallback:null,children:ee(n8,{})}),ee(Xg,{all:!0})]})}),lR=U.createContext({transformPagePoint:n=>n,isStatic:!1,reducedMotion:"never"}),Yg=U.createContext({}),HA=U.createContext(null),Kg=typeof document<"u",r8=Kg?U.useLayoutEffect:U.useEffect,cR=U.createContext({strict:!1});function s8(n,e,t,i){const{visualElement:r}=U.useContext(Yg),s=U.useContext(cR),o=U.useContext(HA),a=U.useContext(lR).reducedMotion,l=U.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 u=l.current;U.useInsertionEffect(()=>{u&&u.update(t,o)});const h=U.useRef(!!window.HandoffAppearAnimations);return r8(()=>{u&&(u.render(),h.current&&u.animationState&&u.animationState.animateChanges())}),U.useEffect(()=>{u&&(u.updateFeatures(),!h.current&&u.animationState&&u.animationState.animateChanges(),window.HandoffAppearAnimations=void 0,h.current=!1)}),u}function xc(n){return typeof n=="object"&&Object.prototype.hasOwnProperty.call(n,"current")}function o8(n,e,t){return U.useCallback(i=>{i&&n.mount&&n.mount(i),e&&(i?e.mount(i):e.unmount()),t&&(typeof t=="function"?t(i):xc(t)&&(t.current=i))},[e])}function oh(n){return typeof n=="string"||Array.isArray(n)}function Qg(n){return typeof n=="object"&&typeof n.start=="function"}const VA=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],WA=["initial",...VA];function Zg(n){return Qg(n.animate)||WA.some(e=>oh(n[e]))}function uR(n){return!!(Zg(n)||n.variants)}function a8(n,e){if(Zg(n)){const{initial:t,animate:i}=n;return{initial:t===!1||oh(t)?t:void 0,animate:oh(i)?i:void 0}}return n.inherit!==!1?e:{}}function l8(n){const{initial:e,animate:t}=a8(n,U.useContext(Yg));return U.useMemo(()=>({initial:e,animate:t}),[lb(e),lb(t)])}function lb(n){return Array.isArray(n)?n.join(" "):n}const cb={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"]},ah={};for(const n in cb)ah[n]={isEnabled:e=>cb[n].some(t=>!!e[t])};function c8(n){for(const e in n)ah[e]={...ah[e],...n[e]}}const fR=U.createContext({}),hR=U.createContext({}),u8=Symbol.for("motionComponentSymbol");function f8({preloadedFeatures:n,createVisualElement:e,useRender:t,useVisualState:i,Component:r}){n&&c8(n);function s(a,l){let u;const h={...U.useContext(lR),...a,layoutId:h8(a)},{isStatic:d}=h,p=l8(a),m=i(a,d);if(!d&&Kg){p.visualElement=s8(r,m,h,e);const y=U.useContext(hR),v=U.useContext(cR).strict;p.visualElement&&(u=p.visualElement.loadFeatures(h,v,n,y))}return U.createElement(Yg.Provider,{value:p},u&&p.visualElement?U.createElement(u,{visualElement:p.visualElement,...h}):null,t(r,a,o8(m,p.visualElement,l),m,d,p.visualElement))}const o=U.forwardRef(s);return o[u8]=r,o}function h8({layoutId:n}){const e=U.useContext(fR).id;return e&&n!==void 0?e+"-"+n:n}function d8(n){function e(i,r={}){return f8(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 p8=["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 jA(n){return typeof n!="string"||n.includes("-")?!1:!!(p8.indexOf(n)>-1||/[A-Z]/.test(n))}const eg={};function m8(n){Object.assign(eg,n)}const zh=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],_l=new Set(zh);function dR(n,{layout:e,layoutId:t}){return _l.has(n)||n.startsWith("origin")||(e||t!==void 0)&&(!!eg[n]||n==="opacity")}const Ii=n=>!!(n&&n.getVelocity),g8={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},y8=zh.length;function v8(n,{enableHardwareAcceleration:e=!0,allowTransformNone:t=!0},i,r){let s="";for(let o=0;oe=>typeof e=="string"&&e.startsWith(n),mR=pR("--"),R1=pR("var(--"),x8=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,_8=(n,e)=>e&&typeof n=="number"?e.transform(n):n,qo=(n,e,t)=>Math.min(Math.max(t,n),e),Al={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},Cf={...Al,transform:n=>qo(0,1,n)},Jp={...Al,default:1},Ef=n=>Math.round(n*1e5)/1e5,qg=/(-)?([\d]*\.?[\d])+/g,gR=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,A8=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Uh(n){return typeof n=="string"}const Gh=n=>({test:e=>Uh(e)&&e.endsWith(n)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${n}`}),_o=Gh("deg"),fs=Gh("%"),st=Gh("px"),w8=Gh("vh"),S8=Gh("vw"),ub={...fs,parse:n=>fs.parse(n)/100,transform:n=>fs.transform(n*100)},fb={...Al,transform:Math.round},yR={borderWidth:st,borderTopWidth:st,borderRightWidth:st,borderBottomWidth:st,borderLeftWidth:st,borderRadius:st,radius:st,borderTopLeftRadius:st,borderTopRightRadius:st,borderBottomRightRadius:st,borderBottomLeftRadius:st,width:st,maxWidth:st,height:st,maxHeight:st,size:st,top:st,right:st,bottom:st,left:st,padding:st,paddingTop:st,paddingRight:st,paddingBottom:st,paddingLeft:st,margin:st,marginTop:st,marginRight:st,marginBottom:st,marginLeft:st,rotate:_o,rotateX:_o,rotateY:_o,rotateZ:_o,scale:Jp,scaleX:Jp,scaleY:Jp,scaleZ:Jp,skew:_o,skewX:_o,skewY:_o,distance:st,translateX:st,translateY:st,translateZ:st,x:st,y:st,z:st,perspective:st,transformPerspective:st,opacity:Cf,originX:ub,originY:ub,originZ:st,zIndex:fb,fillOpacity:Cf,strokeOpacity:Cf,numOctaves:fb};function JA(n,e,t,i){const{style:r,vars:s,transform:o,transformOrigin:a}=n;let l=!1,u=!1,h=!0;for(const d in e){const p=e[d];if(mR(d)){s[d]=p;continue}const m=yR[d],y=_8(p,m);if(_l.has(d)){if(l=!0,o[d]=y,!h)continue;p!==(m.default||0)&&(h=!1)}else d.startsWith("origin")?(u=!0,a[d]=y):r[d]=y}if(e.transform||(l||i?r.transform=v8(n.transform,t,h,i):r.transform&&(r.transform="none")),u){const{originX:d="50%",originY:p="50%",originZ:m=0}=a;r.transformOrigin=`${d} ${p} ${m}`}}const XA=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function vR(n,e,t){for(const i in e)!Ii(e[i])&&!dR(i,t)&&(n[i]=e[i])}function M8({transformTemplate:n},e,t){return U.useMemo(()=>{const i=XA();return JA(i,e,{enableHardwareAcceleration:!t},n),Object.assign({},i.vars,i.style)},[e])}function C8(n,e,t){const i=n.style||{},r={};return vR(r,i,n),Object.assign(r,M8(n,e,t)),n.transformValues?n.transformValues(r):r}function E8(n,e,t){const i={},r=C8(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 b8=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 tg(n){return n.startsWith("while")||n.startsWith("drag")&&n!=="draggable"||n.startsWith("layout")||n.startsWith("onTap")||n.startsWith("onPan")||b8.has(n)}let xR=n=>!tg(n);function T8(n){n&&(xR=e=>e.startsWith("on")?!tg(e):n(e))}try{T8(require("@emotion/is-prop-valid").default)}catch{}function P8(n,e,t){const i={};for(const r in n)r==="values"&&typeof n.values=="object"||(xR(r)||t===!0&&tg(r)||!e&&!tg(r)||n.draggable&&r.startsWith("onDrag"))&&(i[r]=n[r]);return i}function hb(n,e,t){return typeof n=="string"?n:st.transform(e+t*n)}function B8(n,e,t){const i=hb(e,n.x,n.width),r=hb(t,n.y,n.height);return`${i} ${r}`}const R8={offset:"stroke-dashoffset",array:"stroke-dasharray"},L8={offset:"strokeDashoffset",array:"strokeDasharray"};function I8(n,e,t=1,i=0,r=!0){n.pathLength=1;const s=r?R8:L8;n[s.offset]=st.transform(-i);const o=st.transform(e),a=st.transform(t);n[s.array]=`${o} ${a}`}function YA(n,{attrX:e,attrY:t,attrScale:i,originX:r,originY:s,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},h,d,p){if(JA(n,u,h,p),d){n.style.viewBox&&(n.attrs.viewBox=n.style.viewBox);return}n.attrs=n.style,n.style={};const{attrs:m,style:y,dimensions:v}=n;m.transform&&(v&&(y.transform=m.transform),delete m.transform),v&&(r!==void 0||s!==void 0||y.transform)&&(y.transformOrigin=B8(v,r!==void 0?r:.5,s!==void 0?s:.5)),e!==void 0&&(m.x=e),t!==void 0&&(m.y=t),i!==void 0&&(m.scale=i),o!==void 0&&I8(m,o,a,l,!1)}const _R=()=>({...XA(),attrs:{}}),KA=n=>typeof n=="string"&&n.toLowerCase()==="svg";function D8(n,e,t,i){const r=U.useMemo(()=>{const s=_R();return YA(s,e,{enableHardwareAcceleration:!1},KA(i),n.transformTemplate),{...s.attrs,style:{...s.style}}},[e]);if(n.style){const s={};vR(s,n.style,n),r.style={...s,...r.style}}return r}function F8(n=!1){return(t,i,r,{latestValues:s},o)=>{const l=(jA(t)?D8:E8)(i,s,o,t),h={...P8(i,typeof t=="string",n),...l,ref:r},{children:d}=i,p=U.useMemo(()=>Ii(d)?d.get():d,[d]);return U.createElement(t,{...h,children:p})}}const QA=n=>n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function AR(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 wR=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function SR(n,e,t,i){AR(n,e,void 0,i);for(const r in e.attrs)n.setAttribute(wR.has(r)?r:QA(r),e.attrs[r])}function ZA(n,e){const{style:t}=n,i={};for(const r in t)(Ii(t[r])||e.style&&Ii(e.style[r])||dR(r,n))&&(i[r]=t[r]);return i}function MR(n,e){const t=ZA(n,e);for(const i in n)if(Ii(n[i])||Ii(e[i])){const r=zh.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;t[r]=n[i]}return t}function qA(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}function k8(n){const e=U.useRef(null);return e.current===null&&(e.current=n()),e.current}const ng=n=>Array.isArray(n),N8=n=>!!(n&&typeof n=="object"&&n.mix&&n.toValue),O8=n=>ng(n)?n[n.length-1]||0:n;function vm(n){const e=Ii(n)?n.get():n;return N8(e)?e.toValue():e}function z8({scrapeMotionValuesFromProps:n,createRenderState:e,onMount:t},i,r,s){const o={latestValues:U8(i,r,s,n),renderState:e()};return t&&(o.mount=a=>t(i,a,o)),o}const CR=n=>(e,t)=>{const i=U.useContext(Yg),r=U.useContext(HA),s=()=>z8(n,e,i,r);return t?s():k8(s)};function U8(n,e,t,i){const r={},s=i(n,{});for(const p in s)r[p]=vm(s[p]);let{initial:o,animate:a}=n;const l=Zg(n),u=uR(n);e&&u&&!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"&&!Qg(d)&&(Array.isArray(d)?d:[d]).forEach(m=>{const y=qA(n,m);if(!y)return;const{transitionEnd:v,transition:x,...A}=y;for(const _ in A){let w=A[_];if(Array.isArray(w)){const M=h?w.length-1:0;w=w[M]}w!==null&&(r[_]=w)}for(const _ in v)r[_]=v[_]}),r}const gn=n=>n;class db{constructor(){this.order=[],this.scheduled=new Set}add(e){if(!this.scheduled.has(e))return this.scheduled.add(e),this.order.push(e),!0}remove(e){const t=this.order.indexOf(e);t!==-1&&(this.order.splice(t,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}function G8(n){let e=new db,t=new db,i=0,r=!1,s=!1;const o=new WeakSet,a={schedule:(l,u=!1,h=!1)=>{const d=h&&r,p=d?e:t;return u&&o.add(l),p.add(l)&&d&&r&&(i=e.order.length),l},cancel:l=>{t.remove(l),o.delete(l)},process:l=>{if(r){s=!0;return}if(r=!0,[e,t]=[t,e],t.clear(),i=e.order.length,i)for(let u=0;u(d[p]=G8(()=>t=!0),d),{}),o=d=>s[d].process(r),a=()=>{const d=performance.now();t=!1,r.delta=i?1e3/60:Math.max(Math.min(d-r.timestamp,H8),1),r.timestamp=d,r.isProcessing=!0,Xp.forEach(o),r.isProcessing=!1,t&&e&&(i=!1,n(a))},l=()=>{t=!0,i=!0,r.isProcessing||n(a)};return{schedule:Xp.reduce((d,p)=>{const m=s[p];return d[p]=(y,v=!1,x=!1)=>(t||l(),m.schedule(y,v,x)),d},{}),cancel:d=>Xp.forEach(p=>s[p].cancel(d)),state:r,steps:s}}const{schedule:Yt,cancel:$s,state:Gn,steps:Rv}=V8(typeof requestAnimationFrame<"u"?requestAnimationFrame:gn,!0),W8={useVisualState:CR({scrapeMotionValuesFromProps:MR,createRenderState:_R,onMount:(n,e,{renderState:t,latestValues:i})=>{Yt.read(()=>{try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}),Yt.render(()=>{YA(t,i,{enableHardwareAcceleration:!1},KA(e.tagName),n.transformTemplate),SR(e,t)})}})},j8={useVisualState:CR({scrapeMotionValuesFromProps:ZA,createRenderState:XA})};function J8(n,{forwardMotionProps:e=!1},t,i){return{...jA(n)?W8:j8,preloadedFeatures:t,useRender:F8(e),createVisualElement:i,Component:n}}function Hs(n,e,t,i={passive:!0}){return n.addEventListener(e,t,i),()=>n.removeEventListener(e,t)}const ER=n=>n.pointerType==="mouse"?typeof n.button!="number"||n.button<=0:n.isPrimary!==!1;function $g(n,e="page"){return{point:{x:n[e+"X"],y:n[e+"Y"]}}}const X8=n=>e=>ER(e)&&n(e,$g(e));function js(n,e,t,i){return Hs(n,e,X8(t),i)}const Y8=(n,e)=>t=>e(n(t)),Go=(...n)=>n.reduce(Y8);function bR(n){let e=null;return()=>{const t=()=>{e=null};return e===null?(e=n,t):!1}}const pb=bR("dragHorizontal"),mb=bR("dragVertical");function TR(n){let e=!1;if(n==="y")e=mb();else if(n==="x")e=pb();else{const t=pb(),i=mb();t&&i?e=()=>{t(),i()}:(t&&t(),i&&i())}return e}function PR(){const n=TR(!0);return n?(n(),!1):!0}class ca{constructor(e){this.isMounted=!1,this.node=e}update(){}}function gb(n,e){const t="pointer"+(e?"enter":"leave"),i="onHover"+(e?"Start":"End"),r=(s,o)=>{if(s.type==="touch"||PR())return;const a=n.getProps();n.animationState&&a.whileHover&&n.animationState.setActive("whileHover",e),a[i]&&Yt.update(()=>a[i](s,o))};return js(n.current,t,r,{passive:!n.getProps()[i]})}class K8 extends ca{mount(){this.unmount=Go(gb(this.node,!0),gb(this.node,!1))}unmount(){}}class Q8 extends ca{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=Go(Hs(this.node.current,"focus",()=>this.onFocus()),Hs(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const BR=(n,e)=>e?n===e?!0:BR(n,e.parentElement):!1;function Lv(n,e){if(!e)return;const t=new PointerEvent("pointer"+n);e(t,$g(t))}class Z8 extends ca{constructor(){super(...arguments),this.removeStartListeners=gn,this.removeEndListeners=gn,this.removeAccessibleListeners=gn,this.startPointerPress=(e,t)=>{if(this.removeEndListeners(),this.isPressing)return;const i=this.node.getProps(),s=js(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:h}=this.node.getProps();Yt.update(()=>{BR(this.node.current,a.target)?u&&u(a,l):h&&h(a,l)})},{passive:!(i.onTap||i.onPointerUp)}),o=js(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(i.onTapCancel||i.onPointerCancel)});this.removeEndListeners=Go(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()||Lv("up",(l,u)=>{const{onTap:h}=this.node.getProps();h&&Yt.update(()=>h(l,u))})};this.removeEndListeners(),this.removeEndListeners=Hs(this.node.current,"keyup",o),Lv("down",(a,l)=>{this.startPress(a,l)})},t=Hs(this.node.current,"keydown",e),i=()=>{this.isPressing&&Lv("cancel",(s,o)=>this.cancelPress(s,o))},r=Hs(this.node.current,"blur",i);this.removeAccessibleListeners=Go(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&&Yt.update(()=>i(e,t))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!PR()}cancelPress(e,t){if(!this.checkPressEnd())return;const{onTapCancel:i}=this.node.getProps();i&&Yt.update(()=>i(e,t))}mount(){const e=this.node.getProps(),t=js(this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),i=Hs(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Go(t,i)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const L1=new WeakMap,Iv=new WeakMap,q8=n=>{const e=L1.get(n.target);e&&e(n)},$8=n=>{n.forEach(q8)};function eV({root:n,...e}){const t=n||document;Iv.has(t)||Iv.set(t,{});const i=Iv.get(t),r=JSON.stringify(e);return i[r]||(i[r]=new IntersectionObserver($8,{root:n,...e})),i[r]}function tV(n,e,t){const i=eV(e);return L1.set(n,t),i.observe(n),()=>{L1.delete(n),i.unobserve(n)}}const nV={some:0,all:1};class iV extends ca{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:nV[r]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:h,onViewportLeave:d}=this.node.getProps(),p=u?h:d;p&&p(l)};return tV(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(rV(e,t))&&this.startObserver()}unmount(){}}function rV({viewport:n={}},{viewport:e={}}={}){return t=>n[t]!==e[t]}const sV={inView:{Feature:iV},tap:{Feature:Z8},focus:{Feature:Q8},hover:{Feature:K8}};function RR(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 aV(n){const e={};return n.values.forEach((t,i)=>e[i]=t.getVelocity()),e}function e0(n,e,t){const i=n.getProps();return qA(i,e,t!==void 0?t:i.custom,oV(n),aV(n))}const lV="framerAppearId",cV="data-"+QA(lV);let uV=gn,$A=gn;const Ho=n=>n*1e3,Js=n=>n/1e3,fV={current:!1},LR=n=>Array.isArray(n)&&typeof n[0]=="number";function IR(n){return!!(!n||typeof n=="string"&&DR[n]||LR(n)||Array.isArray(n)&&n.every(IR))}const ff=([n,e,t,i])=>`cubic-bezier(${n}, ${e}, ${t}, ${i})`,DR={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ff([0,.65,.55,1]),circOut:ff([.55,0,1,.45]),backIn:ff([.31,.01,.66,-.59]),backOut:ff([.33,1.53,.69,.99])};function FR(n){if(n)return LR(n)?ff(n):Array.isArray(n)?n.map(FR):DR[n]}function hV(n,e,t,{delay:i=0,duration:r,repeat:s=0,repeatType:o="loop",ease:a,times:l}={}){const u={[e]:t};l&&(u.offset=l);const h=FR(a);return Array.isArray(h)&&(u.easing=h),n.animate(u,{delay:i,duration:r,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"})}function dV(n,{repeat:e,repeatType:t="loop"}){const i=e&&t!=="loop"&&e%2===1?0:n.length-1;return n[i]}const kR=(n,e,t)=>(((1-3*t+3*e)*n+(3*t-6*e))*n+3*e)*n,pV=1e-7,mV=12;function gV(n,e,t,i,r){let s,o,a=0;do o=e+(t-e)/2,s=kR(o,i,r)-n,s>0?t=o:e=o;while(Math.abs(s)>pV&&++agV(s,0,1,n,t);return s=>s===0||s===1?s:kR(r(s),e,i)}const yV=Hh(.42,0,1,1),vV=Hh(0,0,.58,1),NR=Hh(.42,0,.58,1),xV=n=>Array.isArray(n)&&typeof n[0]!="number",OR=n=>e=>e<=.5?n(2*e)/2:(2-n(2*(1-e)))/2,zR=n=>e=>1-n(1-e),UR=n=>1-Math.sin(Math.acos(n)),ew=zR(UR),_V=OR(ew),GR=Hh(.33,1.53,.69,.99),tw=zR(GR),AV=OR(tw),wV=n=>(n*=2)<1?.5*tw(n):.5*(2-Math.pow(2,-10*(n-1))),SV={linear:gn,easeIn:yV,easeInOut:NR,easeOut:vV,circIn:UR,circInOut:_V,circOut:ew,backIn:tw,backInOut:AV,backOut:GR,anticipate:wV},yb=n=>{if(Array.isArray(n)){$A(n.length===4);const[e,t,i,r]=n;return Hh(e,t,i,r)}else if(typeof n=="string")return SV[n];return n},nw=(n,e)=>t=>!!(Uh(t)&&A8.test(t)&&t.startsWith(n)||e&&Object.prototype.hasOwnProperty.call(t,e)),HR=(n,e,t)=>i=>{if(!Uh(i))return i;const[r,s,o,a]=i.match(qg);return{[n]:parseFloat(r),[e]:parseFloat(s),[t]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},MV=n=>qo(0,255,n),Dv={...Al,transform:n=>Math.round(MV(n))},Ka={test:nw("rgb","red"),parse:HR("red","green","blue"),transform:({red:n,green:e,blue:t,alpha:i=1})=>"rgba("+Dv.transform(n)+", "+Dv.transform(e)+", "+Dv.transform(t)+", "+Ef(Cf.transform(i))+")"};function CV(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 I1={test:nw("#"),parse:CV,transform:Ka.transform},_c={test:nw("hsl","hue"),parse:HR("hue","saturation","lightness"),transform:({hue:n,saturation:e,lightness:t,alpha:i=1})=>"hsla("+Math.round(n)+", "+fs.transform(Ef(e))+", "+fs.transform(Ef(t))+", "+Ef(Cf.transform(i))+")"},gi={test:n=>Ka.test(n)||I1.test(n)||_c.test(n),parse:n=>Ka.test(n)?Ka.parse(n):_c.test(n)?_c.parse(n):I1.parse(n),transform:n=>Uh(n)?n:n.hasOwnProperty("red")?Ka.transform(n):_c.transform(n)},sn=(n,e,t)=>-t*n+t*e+n;function Fv(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 EV({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=Fv(l,a,n+1/3),s=Fv(l,a,n),o=Fv(l,a,n-1/3)}return{red:Math.round(r*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:i}}const kv=(n,e,t)=>{const i=n*n;return Math.sqrt(Math.max(0,t*(e*e-i)+i))},bV=[I1,Ka,_c],TV=n=>bV.find(e=>e.test(n));function vb(n){const e=TV(n);let t=e.parse(n);return e===_c&&(t=EV(t)),t}const VR=(n,e)=>{const t=vb(n),i=vb(e),r={...t};return s=>(r.red=kv(t.red,i.red,s),r.green=kv(t.green,i.green,s),r.blue=kv(t.blue,i.blue,s),r.alpha=sn(t.alpha,i.alpha,s),Ka.transform(r))};function PV(n){var e,t;return isNaN(n)&&Uh(n)&&(((e=n.match(qg))===null||e===void 0?void 0:e.length)||0)+(((t=n.match(gR))===null||t===void 0?void 0:t.length)||0)>0}const WR={regex:x8,countKey:"Vars",token:"${v}",parse:gn},jR={regex:gR,countKey:"Colors",token:"${c}",parse:gi.parse},JR={regex:qg,countKey:"Numbers",token:"${n}",parse:Al.parse};function Nv(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 ig(n){const e=n.toString(),t={value:e,tokenised:e,values:[],numVars:0,numColors:0,numNumbers:0};return t.value.includes("var(--")&&Nv(t,WR),Nv(t,jR),Nv(t,JR),t}function XR(n){return ig(n).values}function YR(n){const{values:e,numColors:t,numVars:i,tokenised:r}=ig(n),s=e.length;return o=>{let a=r;for(let l=0;ltypeof n=="number"?0:n;function RV(n){const e=XR(n);return YR(n)(e.map(BV))}const $o={test:PV,parse:XR,createTransformer:YR,getAnimatableNone:RV},KR=(n,e)=>t=>`${t>0?e:n}`;function QR(n,e){return typeof n=="number"?t=>sn(n,e,t):gi.test(n)?VR(n,e):n.startsWith("var(")?KR(n,e):qR(n,e)}const ZR=(n,e)=>{const t=[...n],i=t.length,r=n.map((s,o)=>QR(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]=QR(n[r],e[r]));return r=>{for(const s in i)t[s]=i[s](r);return t}},qR=(n,e)=>{const t=$o.createTransformer(e),i=ig(n),r=ig(e);return i.numVars===r.numVars&&i.numColors===r.numColors&&i.numNumbers>=r.numNumbers?Go(ZR(i.values,r.values),t):KR(n,e)},lh=(n,e,t)=>{const i=e-n;return i===0?1:(t-n)/i},xb=(n,e)=>t=>sn(n,e,t);function IV(n){return typeof n=="number"?xb:typeof n=="string"?gi.test(n)?VR:qR:Array.isArray(n)?ZR:typeof n=="object"?LV:xb}function DV(n,e,t){const i=[],r=t||IV(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=DV(e,i,r),a=o.length,l=u=>{let h=0;if(a>1)for(;hl(qo(n[0],n[s-1],u)):l}function FV(n,e){const t=n[n.length-1];for(let i=1;i<=e;i++){const r=lh(0,e,i);n.push(sn(t,1,r))}}function kV(n){const e=[0];return FV(e,n.length-1),e}function NV(n,e){return n.map(t=>t*e)}function OV(n,e){return n.map(()=>e||NR).splice(0,n.length-1)}function rg({duration:n=300,keyframes:e,times:t,ease:i="easeInOut"}){const r=xV(i)?i.map(yb):yb(i),s={done:!1,value:e[0]},o=NV(t&&t.length===e.length?t:kV(e),n),a=$R(o,e,{ease:Array.isArray(r)?r:OV(e,r)});return{calculatedDuration:n,next:l=>(s.value=a(l),s.done=l>=n,s)}}function eL(n,e){return e?n*(1e3/e):0}const zV=5;function tL(n,e,t){const i=Math.max(e-zV,0);return eL(t-n(i),e-i)}const Ov=.001,UV=.01,_b=10,GV=.05,HV=1;function VV({duration:n=800,bounce:e=.25,velocity:t=0,mass:i=1}){let r,s;uV(n<=Ho(_b));let o=1-e;o=qo(GV,HV,o),n=qo(UV,_b,Js(n)),o<1?(r=u=>{const h=u*o,d=h*n,p=h-t,m=D1(u,o),y=Math.exp(-d);return Ov-p/m*y},s=u=>{const d=u*o*n,p=d*t+t,m=Math.pow(o,2)*Math.pow(u,2)*n,y=Math.exp(-d),v=D1(Math.pow(u,2),o);return(-r(u)+Ov>0?-1:1)*((p-m)*y)/v}):(r=u=>{const h=Math.exp(-u*n),d=(u-t)*n+1;return-Ov+h*d},s=u=>{const h=Math.exp(-u*n),d=(t-u)*(n*n);return h*d});const a=5/n,l=jV(r,s,a);if(n=Ho(n),isNaN(l))return{stiffness:100,damping:10,duration:n};{const u=Math.pow(l,2)*i;return{stiffness:u,damping:o*2*Math.sqrt(i*u),duration:n}}}const WV=12;function jV(n,e,t){let i=t;for(let r=1;rn[t]!==void 0)}function YV(n){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...n};if(!Ab(n,XV)&&Ab(n,JV)){const t=VV(n);e={...e,...t,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}function nL({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:u,velocity:h,duration:d,isResolvedFromDuration:p}=YV(i),m=h?-Js(h):0,y=l/(2*Math.sqrt(a*u)),v=s-r,x=Js(Math.sqrt(a/u)),A=Math.abs(v)<5;t||(t=A?.01:2),e||(e=A?.005:.5);let _;if(y<1){const w=D1(x,y);_=M=>{const b=Math.exp(-y*x*M);return s-b*((m+y*x*v)/w*Math.sin(w*M)+v*Math.cos(w*M))}}else if(y===1)_=w=>s-Math.exp(-x*w)*(v+(m+x*v)*w);else{const w=x*Math.sqrt(y*y-1);_=M=>{const b=Math.exp(-y*x*M),P=Math.min(w*M,300);return s-b*((m+y*x*v)*Math.sinh(P)+w*v*Math.cosh(P))/w}}return{calculatedDuration:p&&d||null,next:w=>{const M=_(w);if(p)o.done=w>=d;else{let b=m;w!==0&&(y<1?b=tL(_,w,M):b=0);const P=Math.abs(b)<=t,R=Math.abs(s-M)<=e;o.done=P&&R}return o.value=o.done?s:M,o}}}function wb({keyframes:n,velocity:e=0,power:t=.8,timeConstant:i=325,bounceDamping:r=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:h}){const d=n[0],p={done:!1,value:d},m=E=>a!==void 0&&El,y=E=>a===void 0?l:l===void 0||Math.abs(a-E)-v*Math.exp(-E/i),w=E=>A+_(E),M=E=>{const B=_(E),I=w(E);p.done=Math.abs(B)<=u,p.value=p.done?A:I};let b,P;const R=E=>{m(p.value)&&(b=E,P=nL({keyframes:[p.value,y(p.value)],velocity:tL(w,E,p.value),damping:r,stiffness:s,restDelta:u,restSpeed:h}))};return R(0),{calculatedDuration:null,next:E=>{let B=!1;return!P&&b===void 0&&(B=!0,M(E),R(E)),b!==void 0&&E>b?P.next(E-b):(!B&&M(E),p)}}}const KV=n=>{const e=({timestamp:t})=>n(t);return{start:()=>Yt.update(e,!0),stop:()=>$s(e),now:()=>Gn.isProcessing?Gn.timestamp:performance.now()}},Sb=2e4;function Mb(n){let e=0;const t=50;let i=n.next(e);for(;!i.done&&e=Sb?1/0:e}const QV={decay:wb,inertia:wb,tween:rg,keyframes:rg,spring:nL};function sg({autoplay:n=!0,delay:e=0,driver:t=KV,keyframes:i,type:r="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:a="loop",onPlay:l,onStop:u,onComplete:h,onUpdate:d,...p}){let m=1,y=!1,v,x;const A=()=>{x=new Promise($=>{v=$})};A();let _;const w=QV[r]||rg;let M;w!==rg&&typeof i[0]!="number"&&(M=$R([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 R="idle",E=null,B=null,I=null;b.calculatedDuration===null&&s&&(b.calculatedDuration=Mb(b));const{calculatedDuration:z}=b;let Z=1/0,J=1/0;z!==null&&(Z=z+o,J=Z*(s+1)-o);let W=0;const Q=$=>{if(B===null)return;m>0&&(B=Math.min(B,$)),m<0&&(B=Math.min($-J/m,B)),E!==null?W=E:W=Math.round($-B)*m;const G=W-e*(m>=0?1:-1),se=m>=0?G<0:G>J;W=Math.max(G,0),R==="finished"&&E===null&&(W=J);let me=W,Y=b;if(s){const ke=W/Z;let Te=Math.floor(ke),we=ke%1;!we&&ke>=1&&(we=1),we===1&&Te--,Te=Math.min(Te,s+1);const he=!!(Te%2);he&&(a==="reverse"?(we=1-we,o&&(we-=o/Z)):a==="mirror"&&(Y=P));let de=qo(0,1,we);W>J&&(de=a==="reverse"&&he?1:0),me=de*Z}const _e=se?{done:!1,value:i[0]}:Y.next(me);M&&(_e.value=M(_e.value));let{done:Ae}=_e;!se&&z!==null&&(Ae=m>=0?W>=J:W<=0);const Ie=E===null&&(R==="finished"||R==="running"&&Ae);return d&&d(_e.value),Ie&&L(),_e},re=()=>{_&&_.stop(),_=void 0},ce=()=>{R="idle",re(),v(),A(),B=I=null},L=()=>{R="finished",h&&h(),re(),v()},V=()=>{if(y)return;_||(_=t(Q));const $=_.now();l&&l(),E!==null?B=$-E:(!B||R==="finished")&&(B=$),R==="finished"&&A(),I=B,E=null,R="running",_.start()};n&&V();const H={then($,G){return x.then($,G)},get time(){return Js(W)},set time($){$=Ho($),W=$,E!==null||!_||m===0?E=$:B=_.now()-$/m},get duration(){const $=b.calculatedDuration===null?Mb(b):b.calculatedDuration;return Js($)},get speed(){return m},set speed($){$===m||!_||(m=$,H.time=Js(W))},get state(){return R},play:V,pause:()=>{R="paused",E=W},stop:()=>{y=!0,R!=="idle"&&(R="idle",u&&u(),ce())},cancel:()=>{I!==null&&Q(I),ce()},complete:()=>{R="finished"},sample:$=>(B=0,Q($))};return H}function ZV(n){let e;return()=>(e===void 0&&(e=n()),e)}const qV=ZV(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),$V=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),Yp=10,eW=2e4,tW=(n,e)=>e.type==="spring"||n==="backgroundColor"||!IR(e.ease);function nW(n,e,{onUpdate:t,onComplete:i,...r}){if(!(qV()&&$V.has(e)&&!r.repeatDelay&&r.repeatType!=="mirror"&&r.damping!==0&&r.type!=="inertia"))return!1;let o=!1,a,l;const u=()=>{l=new Promise(_=>{a=_})};u();let{keyframes:h,duration:d=300,ease:p,times:m}=r;if(tW(e,r)){const _=sg({...r,repeat:0,delay:0});let w={done:!1,value:h[0]};const M=[];let b=0;for(;!w.done&&by.cancel(),x=()=>{Yt.update(v),a(),u()};return y.onfinish=()=>{n.set(dV(h,r)),i&&i(),x()},{then(_,w){return l.then(_,w)},attachTimeline(_){return y.timeline=_,y.onfinish=null,gn},get time(){return Js(y.currentTime||0)},set time(_){y.currentTime=Ho(_)},get speed(){return y.playbackRate},set speed(_){y.playbackRate=_},get duration(){return Js(d)},play:()=>{o||(y.play(),$s(v))},pause:()=>y.pause(),stop:()=>{if(o=!0,y.playState==="idle")return;const{currentTime:_}=y;if(_){const w=sg({...r,autoplay:!1});n.setWithVelocity(w.sample(_-Yp).value,w.sample(_).value,Yp)}x()},complete:()=>y.finish(),cancel:x}}function iW({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:gn,pause:gn,stop:gn,then:s=>(s(),Promise.resolve()),cancel:gn,complete:gn});return e?sg({keyframes:[0,1],duration:0,delay:e,onComplete:r}):r()}const rW={type:"spring",stiffness:500,damping:25,restSpeed:10},sW=n=>({type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restSpeed:10}),oW={type:"keyframes",duration:.8},aW={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},lW=(n,{keyframes:e})=>e.length>2?oW:_l.has(n)?n.startsWith("scale")?sW(e[1]):rW:aW,F1=(n,e)=>n==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&($o.test(e)||e==="0")&&!e.startsWith("url(")),cW=new Set(["brightness","contrast","saturate","opacity"]);function uW(n){const[e,t]=n.slice(0,-1).split("(");if(e==="drop-shadow")return n;const[i]=t.match(qg)||[];if(!i)return n;const r=t.replace(i,"");let s=cW.has(e)?1:0;return i!==t&&(s*=100),e+"("+s+r+")"}const fW=/([a-z-]*)\(.*?\)/g,k1={...$o,getAnimatableNone:n=>{const e=n.match(fW);return e?e.map(uW).join(" "):n}},hW={...yR,color:gi,backgroundColor:gi,outlineColor:gi,fill:gi,stroke:gi,borderColor:gi,borderTopColor:gi,borderRightColor:gi,borderBottomColor:gi,borderLeftColor:gi,filter:k1,WebkitFilter:k1},iw=n=>hW[n];function iL(n,e){let t=iw(n);return t!==k1&&(t=$o),t.getAnimatableNone?t.getAnimatableNone(e):void 0}const rL=n=>/^0[^.\s]+$/.test(n);function dW(n){if(typeof n=="number")return n===0;if(n!==null)return n==="none"||n==="0"||rL(n)}function pW(n,e,t,i){const r=F1(e,t);let s;Array.isArray(t)?s=[...t]:s=[null,t];const o=i.from!==void 0?i.from:n.get();let a;const l=[];for(let u=0;ur=>{const s=sL(i,n)||{},o=s.delay||i.delay||0;let{elapsed:a=0}=i;a=a-Ho(o);const l=pW(e,n,t,s),u=l[0],h=l[l.length-1],d=F1(n,u),p=F1(n,h);let m={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(mW(s)||(m={...m,...lW(n,m)}),m.duration&&(m.duration=Ho(m.duration)),m.repeatDelay&&(m.repeatDelay=Ho(m.repeatDelay)),!d||!p||fV.current||s.type===!1)return iW(m);if(e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const y=nW(e,n,m);if(y)return y}return sg(m)};function og(n){return!!(Ii(n)&&n.add)}const oL=n=>/^\-?\d*\.?\d+$/.test(n);function sw(n,e){n.indexOf(e)===-1&&n.push(e)}function ow(n,e){const t=n.indexOf(e);t>-1&&n.splice(t,1)}class aw{constructor(){this.subscriptions=[]}add(e){return sw(this.subscriptions,e),()=>ow(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 yW{constructor(e,t={}){this.version="10.16.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}=Gn;this.lastUpdated!==o&&(this.timeDelta=s,this.lastUpdated=o,Yt.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=()=>Yt.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=gW(this.current),this.owner=t.owner}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new aw);const i=this.events[e].add(t);return e==="change"?()=>{i(),Yt.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?eL(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 Zc(n,e){return new yW(n,e)}const aL=n=>e=>e.test(n),vW={test:n=>n==="auto",parse:n=>n},lL=[Al,st,fs,_o,S8,w8,vW],rf=n=>lL.find(aL(n)),xW=[...lL,gi,$o],_W=n=>xW.find(aL(n));function AW(n,e,t){n.hasValue(e)?n.getValue(e).set(t):n.addValue(e,Zc(t))}function wW(n,e){const t=e0(n,e);let{transitionEnd:i={},transition:r={},...s}=t?n.makeTargetAnimatable(t,!1):{};s={...s,...i};for(const o in s){const a=O8(s[o]);AW(n,o,a)}}function SW(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))),u.push(v)}return o&&Promise.all(u).then(()=>{o&&wW(n,o)}),u}function N1(n,e,t={}){const i=e0(n,e,t.custom);let{transition:r=n.getDefaultTransition()||{}}=i||{};t.transitionOverride&&(r=t.transitionOverride);const s=i?()=>Promise.all(cL(n,i,t)):()=>Promise.resolve(),o=n.variantChildren&&n.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:h,staggerDirection:d}=r;return bW(n,e,u+l,h,d,t)}:()=>Promise.resolve(),{when:a}=r;if(a){const[l,u]=a==="beforeChildren"?[s,o]:[o,s];return l().then(()=>u())}else return Promise.all([s(),o(t.delay)])}function bW(n,e,t=0,i=0,r=1,s){const o=[],a=(n.variantChildren.size-1)*i,l=r===1?(u=0)=>u*i:(u=0)=>a-u*i;return Array.from(n.variantChildren).sort(TW).forEach((u,h)=>{u.notify("AnimationStart",e),o.push(N1(u,e,{...s,delay:t+l(h)}).then(()=>u.notify("AnimationComplete",e)))}),Promise.all(o)}function TW(n,e){return n.sortNodePosition(e)}function PW(n,e,t={}){n.notify("AnimationStart",e);let i;if(Array.isArray(e)){const r=e.map(s=>N1(n,s,t));i=Promise.all(r)}else if(typeof e=="string")i=N1(n,e,t);else{const r=typeof e=="function"?e0(n,e,t.custom):e;i=Promise.all(cL(n,r,t))}return i.then(()=>n.notify("AnimationComplete",e))}const BW=[...VA].reverse(),RW=VA.length;function LW(n){return e=>Promise.all(e.map(({animation:t,options:i})=>PW(n,t,i)))}function IW(n){let e=LW(n);const t=FW();let i=!0;const r=(l,u)=>{const h=e0(n,u);if(h){const{transition:d,transitionEnd:p,...m}=h;l={...l,...m,...p}}return l};function s(l){e=l(n)}function o(l,u){const h=n.getProps(),d=n.getVariantContext(!0)||{},p=[],m=new Set;let y={},v=1/0;for(let A=0;Av&&b;const I=Array.isArray(M)?M:[M];let z=I.reduce(r,{});P===!1&&(z={});const{prevResolvedValues:Z={}}=w,J={...Z,...z},W=Q=>{B=!0,m.delete(Q),w.needsAnimating[Q]=!0};for(const Q in J){const re=z[Q],ce=Z[Q];y.hasOwnProperty(Q)||(re!==ce?ng(re)&&ng(ce)?!RR(re,ce)||E?W(Q):w.protectedKeys[Q]=!0:re!==void 0?W(Q):m.add(Q):re!==void 0&&m.has(Q)?W(Q):w.protectedKeys[Q]=!0)}w.prevProp=M,w.prevResolvedValues=z,w.isActive&&(y={...y,...z}),i&&n.blockInitialAnimation&&(B=!1),B&&!R&&p.push(...I.map(Q=>({animation:Q,options:{type:_,...l}})))}if(m.size){const A={};m.forEach(_=>{const w=n.getBaseTarget(_);w!==void 0&&(A[_]=w)}),p.push({animation:A})}let x=!!p.length;return i&&h.initial===!1&&!n.manuallyAnimateOnMount&&(x=!1),i=!1,x?e(p):Promise.resolve()}function a(l,u,h){var d;if(t[l].isActive===u)return Promise.resolve();(d=n.variantChildren)===null||d===void 0||d.forEach(m=>{var y;return(y=m.animationState)===null||y===void 0?void 0:y.setActive(l,u)}),t[l].isActive=u;const p=o(h,l);for(const m in t)t[m].protectedKeys={};return p}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>t}}function DW(n,e){return typeof e=="string"?e!==n:Array.isArray(e)?!RR(e,n):!1}function Pa(n=!1){return{isActive:n,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function FW(){return{animate:Pa(!0),whileInView:Pa(),whileHover:Pa(),whileTap:Pa(),whileDrag:Pa(),whileFocus:Pa(),exit:Pa()}}class kW extends ca{constructor(e){super(e),e.animationState||(e.animationState=IW(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),Qg(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 NW=0;class OW extends ca{constructor(){super(...arguments),this.id=NW++}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 zW={animation:{Feature:kW},exit:{Feature:OW}},Cb=(n,e)=>Math.abs(n-e);function UW(n,e){const t=Cb(n.x,e.x),i=Cb(n.y,e.y);return Math.sqrt(t**2+i**2)}class uL{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 u=Uv(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,d=UW(u.offset,{x:0,y:0})>=3;if(!h&&!d)return;const{point:p}=u,{timestamp:m}=Gn;this.history.push({...p,timestamp:m});const{onStart:y,onMove:v}=this.handlers;h||(y&&y(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,u)},this.handlePointerMove=(u,h)=>{this.lastMoveEvent=u,this.lastMoveEventInfo=zv(h,this.transformPagePoint),Yt.update(this.updatePoint,!0)},this.handlePointerUp=(u,h)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:d,onSessionEnd:p}=this.handlers,m=Uv(u.type==="pointercancel"?this.lastMoveEventInfo:zv(h,this.transformPagePoint),this.history);this.startEvent&&d&&d(u,m),p&&p(u,m)},!ER(e))return;this.handlers=t,this.transformPagePoint=i;const r=$g(e),s=zv(r,this.transformPagePoint),{point:o}=s,{timestamp:a}=Gn;this.history=[{...o,timestamp:a}];const{onSessionStart:l}=t;l&&l(e,Uv(s,this.history)),this.removeListeners=Go(js(window,"pointermove",this.handlePointerMove),js(window,"pointerup",this.handlePointerUp),js(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),$s(this.updatePoint)}}function zv(n,e){return e?{point:e(n.point)}:n}function Eb(n,e){return{x:n.x-e.x,y:n.y-e.y}}function Uv({point:n},e){return{point:n,delta:Eb(n,fL(e)),offset:Eb(n,GW(e)),velocity:HW(e,.1)}}function GW(n){return n[0]}function fL(n){return n[n.length-1]}function HW(n,e){if(n.length<2)return{x:0,y:0};let t=n.length-1,i=null;const r=fL(n);for(;t>=0&&(i=n[t],!(r.timestamp-i.timestamp>Ho(e)));)t--;if(!i)return{x:0,y:0};const s=Js(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 O1(n,e=0,t=.01){return Math.abs(n-e)<=t}function bb(n,e,t,i=.5){n.origin=i,n.originPoint=sn(e.min,e.max,n.origin),n.scale=Yi(t)/Yi(e),(O1(n.scale,1,1e-4)||isNaN(n.scale))&&(n.scale=1),n.translate=sn(t.min,t.max,n.origin)-n.originPoint,(O1(n.translate)||isNaN(n.translate))&&(n.translate=0)}function bf(n,e,t,i){bb(n.x,e.x,t.x,i?i.originX:void 0),bb(n.y,e.y,t.y,i?i.originY:void 0)}function Tb(n,e,t){n.min=t.min+e.min,n.max=n.min+Yi(e)}function VW(n,e,t){Tb(n.x,e.x,t.x),Tb(n.y,e.y,t.y)}function Pb(n,e,t){n.min=e.min-t.min,n.max=n.min+Yi(e)}function Tf(n,e,t){Pb(n.x,e.x,t.x),Pb(n.y,e.y,t.y)}function WW(n,{min:e,max:t},i){return e!==void 0&&nt&&(n=i?sn(t,n,i.max):Math.min(n,t)),n}function Bb(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 jW(n,{top:e,left:t,bottom:i,right:r}){return{x:Bb(n.x,t,r),y:Bb(n.y,e,i)}}function Rb(n,e){let t=e.min-n.min,i=e.max-n.max;return e.max-e.mini?t=lh(e.min,e.max-i,n.min):i>r&&(t=lh(n.min,n.max-r,e.min)),qo(0,1,t)}function YW(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 z1=.35;function KW(n=z1){return n===!1?n=0:n===!0&&(n=z1),{x:Lb(n,"left","right"),y:Lb(n,"top","bottom")}}function Lb(n,e,t){return{min:Ib(n,e),max:Ib(n,t)}}function Ib(n,e){return typeof n=="number"?n:n[e]||0}const Db=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ac=()=>({x:Db(),y:Db()}),Fb=()=>({min:0,max:0}),bn=()=>({x:Fb(),y:Fb()});function rs(n){return[n("x"),n("y")]}function hL({top:n,left:e,right:t,bottom:i}){return{x:{min:e,max:t},y:{min:n,max:i}}}function QW({x:n,y:e}){return{top:e.min,right:n.max,bottom:e.max,left:n.min}}function ZW(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 Gv(n){return n===void 0||n===1}function U1({scale:n,scaleX:e,scaleY:t}){return!Gv(n)||!Gv(e)||!Gv(t)}function Fa(n){return U1(n)||dL(n)||n.z||n.rotate||n.rotateX||n.rotateY}function dL(n){return kb(n.x)||kb(n.y)}function kb(n){return n&&n!=="0%"}function ag(n,e,t){const i=n-t,r=e*i;return t+r}function Nb(n,e,t,i,r){return r!==void 0&&(n=ag(n,r,i)),ag(n,t,i)+e}function G1(n,e=0,t=1,i,r){n.min=Nb(n.min,e,t,i,r),n.max=Nb(n.max,e,t,i,r)}function pL(n,{x:e,y:t}){G1(n.x,e.translate,e.scale,e.originPoint),G1(n.y,t.translate,t.scale,t.originPoint)}function qW(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 Mo(n,e){n.min=n.min+e,n.max=n.max+e}function zb(n,e,[t,i,r]){const s=e[r]!==void 0?e[r]:.5,o=sn(n.min,n.max,s);G1(n,e[t],e[i],o,e.scale)}const $W=["x","scaleX","originX"],e7=["y","scaleY","originY"];function wc(n,e){zb(n.x,e,$W),zb(n.y,e,e7)}function mL(n,e){return hL(ZW(n.getBoundingClientRect(),e))}function t7(n,e,t){const i=mL(n,t),{scroll:r}=e;return r&&(Mo(i.x,r.offset.x),Mo(i.y,r.offset.y)),i}const n7=new WeakMap;class i7{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=bn(),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($g(l,"page").point)},s=(l,u)=>{const{drag:h,dragPropagation:d,onDragStart:p}=this.getProps();if(h&&!d&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=TR(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),rs(y=>{let v=this.getAxisMotionValue(y).get()||0;if(fs.test(v)){const{projection:x}=this.visualElement;if(x&&x.layout){const A=x.layout.layoutBox[y];A&&(v=Yi(A)*(parseFloat(v)/100))}}this.originPoint[y]=v}),p&&Yt.update(()=>p(l,u),!1,!0);const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},o=(l,u)=>{const{dragPropagation:h,dragDirectionLock:d,onDirectionLock:p,onDrag:m}=this.getProps();if(!h&&!this.openGlobalLock)return;const{offset:y}=u;if(d&&this.currentDirection===null){this.currentDirection=r7(y),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",u.point,y),this.updateAxis("y",u.point,y),this.visualElement.render(),m&&m(l,u)},a=(l,u)=>this.stop(l,u);this.panSession=new uL(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&&Yt.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||!Kp(e,r,this.currentDirection))return;const s=this.getAxisMotionValue(e);let o=this.originPoint[e]+i[e];this.constraints&&this.constraints[e]&&(o=WW(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&&xc(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&i?this.constraints=jW(i.layoutBox,e):this.constraints=!1,this.elastic=KW(t),r!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&rs(s=>{this.getAxisMotionValue(s)&&(this.constraints[s]=YW(i.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!xc(e))return!1;const i=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const s=t7(i,r.root,this.visualElement.getTransformPagePoint());let o=JW(r.layout.layoutBox,s);if(t){const a=t(QW(o));this.hasMutatedConstraints=!!a,a&&(o=hL(a))}return o}startAnimation(e){const{drag:t,dragMomentum:i,dragElastic:r,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=rs(h=>{if(!Kp(h,t,this.currentDirection))return;let d=l&&l[h]||{};o&&(d={min:0,max:0});const p=r?200:1e6,m=r?40:1e7,y={type:"inertia",velocity:i?e[h]:0,bounceStiffness:p,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(h,y)});return Promise.all(u).then(a)}startAxisValueAnimation(e,t){const i=this.getAxisMotionValue(e);return i.start(rw(e,i,0,t))}stopAnimation(){rs(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){rs(t=>{const{drag:i}=this.getProps();if(!Kp(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]-sn(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:i}=this.visualElement;if(!xc(t)||!i||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};rs(o=>{const a=this.getAxisMotionValue(o);if(a){const l=a.get();r[o]=XW({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(),rs(o=>{if(!Kp(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(sn(l,u,r[o]))})}addListeners(){if(!this.visualElement.current)return;n7.set(this.visualElement,this);const e=this.visualElement.current,t=js(e,"pointerdown",l=>{const{drag:u,dragListener:h=!0}=this.getProps();u&&h&&this.start(l)}),i=()=>{const{dragConstraints:l}=this.getProps();xc(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=Hs(window,"resize",()=>this.scalePositionWithinConstraints()),a=r.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(rs(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=z1,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:i,dragPropagation:r,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function Kp(n,e,t){return(e===!0||e===n)&&(t===null||t===n)}function r7(n,e=10){let t=null;return Math.abs(n.y)>e?t="y":Math.abs(n.x)>e&&(t="x"),t}class s7 extends ca{constructor(e){super(e),this.removeGroupControls=gn,this.removeListeners=gn,this.controls=new i7(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||gn}unmount(){this.removeGroupControls(),this.removeListeners()}}const Ub=n=>(e,t)=>{n&&Yt.update(()=>n(e,t))};class o7 extends ca{constructor(){super(...arguments),this.removePointerDownListener=gn}onPointerDown(e){this.session=new uL(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:i,onPanEnd:r}=this.node.getProps();return{onSessionStart:Ub(e),onStart:Ub(t),onMove:i,onEnd:(s,o)=>{delete this.session,r&&Yt.update(()=>r(s,o))}}}mount(){this.removePointerDownListener=js(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 a7(){const n=U.useContext(HA);if(n===null)return[!0,null];const{isPresent:e,onExitComplete:t,register:i}=n,r=U.useId();return U.useEffect(()=>i(r),[]),!e&&t?[!1,()=>t&&t(r)]:[!0]}const xm={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Gb(n,e){return e.max===e.min?0:n/(e.max-e.min)*100}const sf={correct:(n,e)=>{if(!e.target)return n;if(typeof n=="string")if(st.test(n))n=parseFloat(n);else return n;const t=Gb(n,e.target.x),i=Gb(n,e.target.y);return`${t}% ${i}%`}},l7={correct:(n,{treeScale:e,projectionDelta:t})=>{const i=n,r=$o.parse(n);if(r.length>5)return i;const s=$o.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 u=sn(a,l,.5);return typeof r[2+o]=="number"&&(r[2+o]/=u),typeof r[3+o]=="number"&&(r[3+o]/=u),s(r)}};class c7 extends gr.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:i,layoutId:r}=this.props,{projection:s}=e;m8(u7),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()})),xm.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()||Yt.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),queueMicrotask(()=>{!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 gL(n){const[e,t]=a7(),i=U.useContext(fR);return gr.createElement(c7,{...n,layoutGroup:i,switchLayoutGroup:U.useContext(hR),isPresent:e,safeToRemove:t})}const u7={borderRadius:{...sf,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:sf,borderTopRightRadius:sf,borderBottomLeftRadius:sf,borderBottomRightRadius:sf,boxShadow:l7},yL=["TopLeft","TopRight","BottomLeft","BottomRight"],f7=yL.length,Hb=n=>typeof n=="string"?parseFloat(n):n,Vb=n=>typeof n=="number"||st.test(n);function h7(n,e,t,i,r,s){r?(n.opacity=sn(0,t.opacity!==void 0?t.opacity:1,d7(i)),n.opacityExit=sn(e.opacity!==void 0?e.opacity:1,0,p7(i))):s&&(n.opacity=sn(e.opacity!==void 0?e.opacity:1,t.opacity!==void 0?t.opacity:1,i));for(let o=0;oie?1:t(lh(n,e,i))}function jb(n,e){n.min=e.min,n.max=e.max}function lr(n,e){jb(n.x,e.x),jb(n.y,e.y)}function Jb(n,e,t,i,r){return n-=e,n=ag(n,1/t,i),r!==void 0&&(n=ag(n,1/r,i)),n}function m7(n,e=0,t=1,i=.5,r,s=n,o=n){if(fs.test(e)&&(e=parseFloat(e),e=sn(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=sn(s.min,s.max,i);n===s&&(a-=e),n.min=Jb(n.min,e,t,a,r),n.max=Jb(n.max,e,t,a,r)}function Xb(n,e,[t,i,r],s,o){m7(n,e[t],e[i],e[r],e.scale,s,o)}const g7=["x","scaleX","originX"],y7=["y","scaleY","originY"];function Yb(n,e,t,i){Xb(n.x,e,g7,t?t.x:void 0,i?i.x:void 0),Xb(n.y,e,y7,t?t.y:void 0,i?i.y:void 0)}function Kb(n){return n.translate===0&&n.scale===1}function xL(n){return Kb(n.x)&&Kb(n.y)}function v7(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 _L(n,e){return Math.round(n.x.min)===Math.round(e.x.min)&&Math.round(n.x.max)===Math.round(e.x.max)&&Math.round(n.y.min)===Math.round(e.y.min)&&Math.round(n.y.max)===Math.round(e.y.max)}function Qb(n){return Yi(n.x)/Yi(n.y)}class x7{constructor(){this.members=[]}add(e){sw(this.members,e),e.scheduleRender()}remove(e){if(ow(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 Zb(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:u,rotateY:h}=t;l&&(i+=`rotate(${l}deg) `),u&&(i+=`rotateX(${u}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 _7=(n,e)=>n.depth-e.depth;class A7{constructor(){this.children=[],this.isDirty=!1}add(e){sw(this.children,e),this.isDirty=!0}remove(e){ow(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(_7),this.isDirty=!1,this.children.forEach(e)}}function w7(n,e){const t=performance.now(),i=({timestamp:r})=>{const s=r-t;s>=e&&($s(i),n(s-e))};return Yt.read(i,!0),()=>$s(i)}function S7(n){window.MotionDebug&&window.MotionDebug.record(n)}function M7(n){return n instanceof SVGElement&&n.tagName!=="svg"}function C7(n,e,t){const i=Ii(n)?n:Zc(n);return i.start(rw("",i,e,t)),i.animation}const qb=["","X","Y","Z"],$b=1e3;let E7=0;const ka={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function AL({attachResizeListener:n,defaultParent:e,measureScroll:t,checkIsScrollRoot:i,resetTransform:r}){return class{constructor(o={},a=e==null?void 0:e()){this.id=E7++,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.hasTreeAnimated=!1,this.updateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{ka.totalNodes=ka.resolvedTargetDeltas=ka.recalculatedProjection=0,this.nodes.forEach(P7),this.nodes.forEach(D7),this.nodes.forEach(F7),this.nodes.forEach(B7),S7(ka)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;lthis.root.updateBlockedByResize=!1;n(o,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=w7(p,250),xm.hasAnimatedSinceResize&&(xm.hasAnimatedSinceResize=!1,this.nodes.forEach(tT))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&h&&(l||u)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:p,hasRelativeTargetChanged:m,layout:y})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||h.getDefaultTransition()||U7,{onLayoutAnimationStart:x,onLayoutAnimationComplete:A}=h.getProps(),_=!this.targetLayout||!_L(this.targetLayout,y)||m,w=!p&&m;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||w||p&&(_||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,w);const M={...sL(v,"layout"),onPlay:x,onComplete:A};(h.shouldReduceMotion||this.options.layoutRoot)&&(M.delay=0,M.type=!1),this.startAnimation(M)}else p||tT(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,$s(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(k7),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let h=0;hthis.update()))}clearAllSnapshots(){this.nodes.forEach(R7),this.sharedNodes.forEach(N7)}scheduleUpdateProjection(){Yt.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){Yt.postRender(()=>{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=M/1e3;nT(d.x,o.x,b),nT(d.y,o.y,b),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Tf(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),O7(this.relativeTarget,this.relativeTargetOrigin,p,b),w&&v7(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=bn()),lr(w,this.relativeTarget)),v&&(this.animationValues=h,h7(h,u,this.latestValues,b,_,A)),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&&($s(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Yt.update(()=>{xm.hasAnimatedSinceResize=!0,this.currentAnimation=C7(0,$b,{...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($b),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:h}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&wL(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||bn();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}lr(a,l),wc(a,h),bf(this.projectionDeltaWithTransform,this.layoutCorrected,a,h)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new x7),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.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 u=this.getStack();u&&u.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 u={};for(let h=0;h{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(eT),this.root.sharedNodes.clear()}}}function b7(n){n.updateLayout()}function T7(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"?rs(d=>{const p=o?t.measuredBox[d]:t.layoutBox[d],m=Yi(p);p.min=i[d].min,p.max=p.min+m}):wL(s,t.layoutBox,i)&&rs(d=>{const p=o?t.measuredBox[d]:t.layoutBox[d],m=Yi(i[d]);p.max=p.min+m,n.relativeTarget&&!n.currentAnimation&&(n.isProjectionDirty=!0,n.relativeTarget[d].max=n.relativeTarget[d].min+m)});const a=Ac();bf(a,i,t.layoutBox);const l=Ac();o?bf(l,n.applyTransform(r,!0),t.measuredBox):bf(l,i,t.layoutBox);const u=!xL(a);let h=!1;if(!n.resumeFrom){const d=n.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:p,layout:m}=d;if(p&&m){const y=bn();Tf(y,t.layoutBox,p.layoutBox);const v=bn();Tf(v,i,m.layoutBox),_L(y,v)||(h=!0),d.options.layoutRoot&&(n.relativeTarget=v,n.relativeTargetOrigin=y,n.relativeParent=d)}}}n.notifyListeners("didUpdate",{layout:i,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeTargetChanged:h})}else if(n.isLead()){const{onExitComplete:i}=n.options;i&&i()}n.options.transition=void 0}function P7(n){ka.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 B7(n){n.isProjectionDirty=n.isSharedProjectionDirty=n.isTransformDirty=!1}function R7(n){n.clearSnapshot()}function eT(n){n.clearMeasurements()}function L7(n){n.isLayoutDirty=!1}function I7(n){const{visualElement:e}=n.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),n.resetTransform()}function tT(n){n.finishAnimation(),n.targetDelta=n.relativeTarget=n.target=void 0,n.isProjectionDirty=!0}function D7(n){n.resolveTargetDelta()}function F7(n){n.calcProjection()}function k7(n){n.resetRotation()}function N7(n){n.removeLeadSnapshot()}function nT(n,e,t){n.translate=sn(e.translate,0,t),n.scale=sn(e.scale,1,t),n.origin=e.origin,n.originPoint=e.originPoint}function iT(n,e,t,i){n.min=sn(e.min,t.min,i),n.max=sn(e.max,t.max,i)}function O7(n,e,t,i){iT(n.x,e.x,t.x,i),iT(n.y,e.y,t.y,i)}function z7(n){return n.animationValues&&n.animationValues.opacityExit!==void 0}const U7={duration:.45,ease:[.4,0,.1,1]},rT=n=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(n),sT=rT("applewebkit/")&&!rT("chrome/")?Math.round:gn;function oT(n){n.min=sT(n.min),n.max=sT(n.max)}function G7(n){oT(n.x),oT(n.y)}function wL(n,e,t){return n==="position"||n==="preserve-aspect"&&!O1(Qb(e),Qb(t),.2)}const H7=AL({attachResizeListener:(n,e)=>Hs(n,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Hv={current:void 0},SL=AL({measureScroll:n=>({x:n.scrollLeft,y:n.scrollTop}),defaultParent:()=>{if(!Hv.current){const n=new H7({});n.mount(window),n.setOptions({layoutScroll:!0}),Hv.current=n}return Hv.current},resetTransform:(n,e)=>{n.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:n=>window.getComputedStyle(n).position==="fixed"}),V7={pan:{Feature:o7},drag:{Feature:s7,ProjectionNode:SL,MeasureLayout:gL}},W7=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function j7(n){const e=W7.exec(n);if(!e)return[,];const[,t,i]=e;return[t,i]}function H1(n,e,t=1){const[i,r]=j7(n);if(!i)return;const s=window.getComputedStyle(e).getPropertyValue(i);if(s){const o=s.trim();return oL(o)?parseFloat(o):o}else return R1(r)?H1(r,e,t+1):r}function J7(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(!R1(s))return;const o=H1(s,i);o&&r.set(o)});for(const r in e){const s=e[r];if(!R1(s))continue;const o=H1(s,i);o&&(e[r]=o,t||(t={}),t[r]===void 0&&(t[r]=s))}return{target:e,transitionEnd:t}}const X7=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),ML=n=>X7.has(n),Y7=n=>Object.keys(n).some(ML),aT=n=>n===Al||n===st,lT=(n,e)=>parseFloat(n.split(", ")[e]),cT=(n,e)=>(t,{transform:i})=>{if(i==="none"||!i)return 0;const r=i.match(/^matrix3d\((.+)\)$/);if(r)return lT(r[1],e);{const s=i.match(/^matrix\((.+)\)$/);return s?lT(s[1],n):0}},K7=new Set(["x","y","z"]),Q7=zh.filter(n=>!K7.has(n));function Z7(n){const e=[];return Q7.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 qc={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:cT(4,13),y:cT(5,14)};qc.translateX=qc.x;qc.translateY=qc.y;const q7=(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(u=>{a[u]=qc[u](i,s)}),e.render();const l=e.measureViewportBox();return t.forEach(u=>{const h=e.getValue(u);h&&h.jump(a[u]),n[u]=qc[u](l,s)}),n},$7=(n,e,t={},i={})=>{e={...e},i={...i};const r=Object.keys(e).filter(ML);let s=[],o=!1;const a=[];if(r.forEach(l=>{const u=n.getValue(l);if(!n.hasValue(l))return;let h=t[l],d=rf(h);const p=e[l];let m;if(ng(p)){const y=p.length,v=p[0]===null?1:0;h=p[v],d=rf(h);for(let x=v;x=0?window.pageYOffset:null,u=q7(e,n,a);return s.length&&s.forEach(([h,d])=>{n.getValue(h).set(d)}),n.render(),Kg&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:i}}else return{target:e,transitionEnd:i}};function ej(n,e,t,i){return Y7(e)?$7(n,e,t,i):{target:e,transitionEnd:i}}const tj=(n,e,t,i)=>{const r=J7(n,e,i);return e=r.target,i=r.transitionEnd,ej(n,e,t,i)},V1={current:null},CL={current:!1};function nj(){if(CL.current=!0,!!Kg)if(window.matchMedia){const n=window.matchMedia("(prefers-reduced-motion)"),e=()=>V1.current=n.matches;n.addListener(e),e()}else V1.current=!1}function ij(n,e,t){const{willChange:i}=e;for(const r in e){const s=e[r],o=t[r];if(Ii(s))n.addValue(r,s),og(i)&&i.add(r);else if(Ii(o))n.addValue(r,Zc(s,{owner:n})),og(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,Zc(a!==void 0?a:s,{owner:n}))}}for(const r in t)e[r]===void 0&&n.removeValue(r);return e}const uT=new WeakMap,EL=Object.keys(ah),rj=EL.length,fT=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],sj=WA.length;class oj{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=()=>Yt.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=Zg(t),this.isVariantNode=uR(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...h}=this.scrapeMotionValuesFromProps(t,{});for(const d in h){const p=h[d];a[d]!==void 0&&Ii(p)&&(p.set(a[d],!1),og(u)&&u.add(d))}}scrapeMotionValuesFromProps(e,t){return{}}mount(e){this.current=e,uT.set(e,this),this.projection&&!this.projection.instance&&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)),CL.current||nj(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:V1.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){uT.delete(this.current),this.projection&&this.projection.unmount(),$s(this.notifyUpdate),$s(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=_l.has(e),r=t.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&Yt.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){let o,a;for(let l=0;lthis.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:s,layoutScroll:p,layoutRoot:m})}return a}updateFeatures(){for(const e in this.features){const t=this.features[e];t.isMounted?t.update():(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):bn()}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=Zc(t,{owner:this}),this.addValue(e,i)),i}readValue(e){var t;return this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(t=this.getBaseTargetFromProps(this.props,e))!==null&&t!==void 0?t: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=qA(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&&!Ii(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 aw),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class bL extends oj{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=CW(i,e||{},this);if(r&&(t&&(t=r(t)),i&&(i=r(i)),o&&(o=r(o))),s){SW(this,i,o);const a=tj(this,i,o,t);t=a.transitionEnd,i=a.target}return{transition:e,transitionEnd:t,...i}}}function aj(n){return window.getComputedStyle(n)}class lj extends bL{readValueFromInstance(e,t){if(_l.has(t)){const i=iw(t);return i&&i.default||0}else{const i=aj(e),r=(mR(t)?i.getPropertyValue(t):i[t])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return mL(e,t)}build(e,t,i,r){JA(e,t,i,r.transformTemplate)}scrapeMotionValuesFromProps(e,t){return ZA(e,t)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Ii(e)&&(this.childSubscription=e.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}renderInstance(e,t,i,r){AR(e,t,i,r)}}class cj extends bL{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(_l.has(t)){const i=iw(t);return i&&i.default||0}return t=wR.has(t)?t:QA(t),e.getAttribute(t)}measureInstanceViewportBox(){return bn()}scrapeMotionValuesFromProps(e,t){return MR(e,t)}build(e,t,i,r){YA(e,t,i,this.isSVGTag,r.transformTemplate)}renderInstance(e,t,i,r){SR(e,t,i,r)}mount(e){this.isSVGTag=KA(e.tagName),super.mount(e)}}const uj=(n,e)=>jA(n)?new cj(e,{enableHardwareAcceleration:!1}):new lj(e,{enableHardwareAcceleration:!0}),fj={layout:{ProjectionNode:SL,MeasureLayout:gL}},hj={...zW,...sV,...V7,...fj},Ki=d8((n,e)=>J8(n,e,hj,uj)),wn={paddingX:"sm:px-4 px-6",paddingY:"sm:py-16 py-6",padding:"sm:px-16 px-6 sm:py-16 py-10",heroHeadText:"font-black text-white lg:text-[80px] sm:text-[50px] xs:text-[40px] text-[40px] mt-2",heroSubText:"text-[#dfd9ff] font-medium lg:text-[30px] sm:text-[26px] xs:text-[20px] text-[16px]",sectionHeadText:"text-white font-black md:text-[60px] sm:text-[50px] xs:text-[40px] text-[30px]",sectionSubText:"sm:text-[18px] text-[14px] text-secondary uppercase tracking-wider"},dj=({strings:n=["Put your strings here...","and Enjoy!"],typeSpeed:e=100,backSpeed:t=50,backDelay:i=500,startDelay:r=500,cursorChar:s="|",placeholder:o=!1,showCursor:a=!0,disableBackTyping:l=!1,onFinished:u=function(){},loop:h=!0})=>({strings:n,typeSpeed:e,backSpeed:t,cursorChar:s,backDelay:i,placeholder:o,startDelay:r,showCursor:a,loop:h,disableBackTyping:l,onFinished:u}),pj=(n,e)=>{let t=0,i,r;const s=(p,m)=>{t===i&&m.loop&&(t=0),setTimeout(()=>{o(p[t],m)},m.startDelay)},o=(p,m)=>{let y=0,v=p.length,x=setInterval(()=>{if(m.placeholder?n.placeholder+=p[y]:n.textContent+=p[y],++y===v)return a(x,m)},m.typeSpeed)},a=(p,m)=>{if(clearInterval(p),m.disableBackTyping&&t===i-1||!m.loop&&t===i-1)return m.onFinished();setTimeout(()=>l(m),m.backDelay)},l=p=>{let m=p.placeholder?n.placeholder:n.textContent,y=m.length,v=setInterval(()=>{if(p.placeholder?n.placeholder=n.placeholder.substr(0,--y):n.textContent=m.substr(0,--y),y===0)return u(v,p)},p.backSpeed)},u=(p,m)=>{clearInterval(p),++t,s(r,m)},h=(p,m)=>{let y=document.createElement("span");y.classList.add("ityped-cursor"),y.textContent="|",y.textContent=m.cursorChar,p.insertAdjacentElement("afterend",y)};return(p=>{let m=dj(p||{}),y=m.strings;r=y,i=y.length,typeof n=="string"&&(n=document.querySelector(n)),m.showCursor&&h(n,m),s(y,m)})(e)};var TL={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},hT=gr.createContext&&gr.createContext(TL),Vo=globalThis&&globalThis.__assign||function(){return Vo=Object.assign||function(n){for(var e,t=1,i=arguments.length;t{const n=U.useRef();return U.useEffect(()=>{pj(n.current,{showCursor:!0,strings:[" SDE at BNY Mellon ","Regional Level TT Player "," Mentor "," Content Writer ","Software Developer "," Tech Enthusiast "]})},[]),Xe("section",{className:"relative w-full h-screen mx-auto",children:[Xe("div",{className:"flex",children:[Xe("div",{className:`head1 absolute max-w-7xl mx-auto ${wn.paddingX} flex flex-row items-start gap-5`,children:[Xe("div",{className:"flex flex-col justify-center items-center mt-5",children:[ee("div",{className:"w-5 h-5 rounded-full bg-[#915EFF]"}),ee("div",{className:"w-1 sm:h-80 h-40 violet-gradient"})]}),Xe("div",{className:"head2",children:[Xe("h1",{className:`${wn.heroHeadText} text-white`,children:["Hii there, I'm ",ee("p",{className:"name text-[#915EFF]",children:"Aarti Rathi"})]}),ee("h3",{children:ee("span",{ref:n,className:`${wn.heroSubText} mt-2 green-text-gradient`})}),Xe("div",{className:"absolute link1",children:[ee("a",{href:"https://github.com/shinchancode",target:"_blank",children:ee(vj,{})}),ee("a",{href:"https://www.linkedin.com/in/aarti-rathi-a6031814b/",target:"_blank",children:ee(Aj,{})}),ee("a",{href:"https://www.instagram.com/aarti.rathiii",target:"_blank",children:ee(_j,{})}),ee("a",{href:"https://linktr.ee/rathi17",target:"_blank",children:ee(Sj,{})})]})]})]}),ee("div",{className:"imgcontainer1 absolute violet-gradient",children:ee("img",{src:Cj,alt:"",className:"object-contain"})})]}),ee(Y6,{}),ee("div",{className:"absolute xs:bottom-10 bottom-32 w-10 flex justify-end items-center",children:ee("a",{href:"#education",children:ee("div",{className:"w-[35px] h-[64px] rounded-3xl border-4 border-secondary flex justify-center items-start p-2",children:ee(Ki.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-1"})})})})]})};const sJ=()=>{const[n,e]=U.useState(""),[t,i]=U.useState(!1);return U.useEffect(()=>{const r=()=>{window.scrollY>100?i(!0):i(!1)};return window.addEventListener("scroll",r),()=>window.removeEventListener("scroll",r)},[]),ee("nav",{className:`${wn.paddingX} w-full flex items-center py-3 fixed top-0 z-20 ${t?"bg-primary":"bg-transparent"}`,children:Xe("div",{className:"w-full flex justify-between items-center max-w-7xl mx-auto",children:[Xe(Pk,{to:"/",className:"flex items-center gap-2",onClick:()=>{e(""),window.scrollTo(0,0)},children:[ee("img",{src:Mj,alt:"logo",className:"w-9 h-9 object-contain logo"}),ee("p",{className:"sm:block text-white text-[18px] font-bold cursor-pointer flex ",children:"aarti.rathi"})]}),ee("div",{className:"sm:flex gap-5",children:ee("div",{className:"top2 text-secondary hover:text-white text-[15px] font-medium cursor-pointer",children:ee("a",{href:"https://drive.google.com/drive/folders/13YGuvdkXQdyFzfuJd3YdUaG99dhCPz22?pli=1",target:"_blank",children:"Resume"})})})]})})},hu=n=>({hidden:{y:-50,opacity:0},show:{y:0,opacity:1,transition:{type:"spring",duration:1.25,delay:n}}}),lw=(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"}}}),pT=(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"}}}),oJ=(n,e)=>({hidden:{},show:{transition:{staggerChildren:n,delayChildren:e||0}}}),wl=(n,e)=>function(){return Xe(Ki.section,{variants:oJ(),initial:"hidden",whileInView:"show",viewport:{once:!0,amount:.25},className:`${wn.padding} max-w-7xl mx-auto relative z-0`,children:[ee("span",{className:"hash-span",id:e,children:" "}),ee(n,{})]})},aJ=[{link:"https://auth.geeksforgeeks.org/user/aarti_rathi",icon:"https://img.icons8.com/color/344/GeeksforGeeks.png"},{link:"https://www.coursera.org/account/accomplishments/specialization/7V2SFZ9YWWRL",icon:"https://img.icons8.com/fluency/344/google-cloud.png"},{link:"https://www.qwiklabs.com/public_profiles/48dcd029-03b4-437b-9dd3-ef7d65958eb0",icon:"https://img.icons8.com/external-tal-revivo-color-tal-revivo/344/external-qwiklabs-provides-real-cloud-environments-that-help-developers-logo-color-tal-revivo.png"},{link:"https://www.hackerrank.com/_shinchancode",icon:"https://img.icons8.com/external-tal-revivo-color-tal-revivo/344/external-hackerrank-is-a-technology-company-that-focuses-on-competitive-programming-logo-color-tal-revivo.png"},{link:"https://dev.to/shinchancode",icon:BL},{link:"https://www.holopin.io/@shinchancode#badges",icon:Nj}],lJ=[{title:"8th Position : Selected for the final round of 12th CSI InApp International Student Project awards 2023."},{title:"Twice State level Table-Tennis Winner (2021 and 2022)"},{title:"1st Position : Consecutive four times Winner of UdChalo Scholarship (2019 - 2023)"},{title:"Branch Head of Information Technology Department (2021 - 2022)"},{title:"Selected in top 100 candidates for Google Cloud Training among 20k Students."},{title:"Got Education Scholarship Scheme for Army Personnel(ESSA) Scholarship (2015 - 2023)"},{title:"Played Nationals in Throwball for U-14 category. (2015)"}],cJ=[{name:"HTML 5",icon:Bj},{name:"CSS 3",icon:Tj},{name:"JavaScript",icon:Rj},{name:"Bootstrap",icon:"https://img.icons8.com/color/480/000000/bootstrap.png"},{name:"Google Cloud",icon:"https://img.icons8.com/color/480/000000/google-cloud.png"},{name:"C++ tool",icon:"https://img.icons8.com/color/480/000000/c-plus-plus-logo.png"},{name:"React JS",icon:Dj},{name:"Tailwind CSS",icon:Fj},{name:"Node JS",icon:Ij},{name:"MongoDB",icon:Lj},{name:"Three JS",icon:kj},{name:"git",icon:Pj},{name:"MySql",icon:"https://img.icons8.com/color/480/000000/mysql-logo.png"}],uJ=[{id:"java",title:"Java"},{id:"c++",title:"C++"},{id:"web",title:"Web Dev"},{id:"other",title:"Other"}],fJ=[{name:"Cryptography",description:"The project is based on a cryptography technique that uses Double layer encryption and decryption using Armstrong numbers and RGB color-based mappings for various types of file format. The idea is inspired from a research paper.",tags:[{name:"cryptography",color:"blue-text-gradient"},{name:"security",color:"green-text-gradient"},{name:"java",color:"pink-text-gradient"}],image:Uj,source_link:"https://github.com/shinchancode/Cryptography",source_code_link:"https://github.com/shinchancode/Cryptography"},{name:"Snake Yaml",description:"Created a simple Maven project, a YAML file and write student data in it. As the request is made, crud should be performed in real time . (Hint: Used SnakeYAML library and add dependency in pom)",tags:[{name:"yaml",color:"blue-text-gradient"},{name:"springboot",color:"green-text-gradient"},{name:"postman",color:"pink-text-gradient"}],image:jj,source_link:"https://github.com/shinchancode/Snake-Yaml-Project",source_code_link:"https://github.com/shinchancode/Snake-Yaml-Project"},{name:"CRUD operations",description:"Built a java based application to allow user to create, read, update and delete Entities. Spring Boot provides an interface called CrudRepository that contains methods for CRUD operations.",tags:[{name:"java",color:"blue-text-gradient"},{name:"springboot",color:"green-text-gradient"},{name:"crud",color:"pink-text-gradient"}],image:Hj,source_link:"https://github.com/shinchancode/CRUD-Operation",source_code_link:"https://github.com/shinchancode/CRUD-Operation"},{name:"Byte-Array-to-File",description:"Built a java project where we input a file using byte array, store it on local system. In order to convert a byte array to a file, we will be using a method named the getBytes() method of String class.",tags:[{name:"java",color:"blue-text-gradient"},{name:"byteArray",color:"green-text-gradient"},{name:"file",color:"pink-text-gradient"}],image:Vj,source_link:"https://github.com/shinchancode/byte-array-to-file",source_code_link:"https://github.com/shinchancode/byte-array-to-file"},{name:"Spring Boot One To Many",description:"Implemented Spring Boot One-To-Many mapping with Hibernate in a Spring Boot CRUD using @OnetoMany annotation. Mapping between two entities and used a MySQL database to store and retrieve the data.",tags:[{name:"onetomany",color:"blue-text-gradient"},{name:"springbott",color:"green-text-gradient"},{name:"crud",color:"pink-text-gradient"}],image:Wj,source_link:"https://github.com/shinchancode/oneTomany-springboot",source_code_link:"https://github.com/shinchancode/oneTomany-springboot"},{name:"OOP Lab",description:"These projects contain object oriented programming primary concepts and its code in Java language. Topics like : Inheritence, Constructor, Virtual function, Interface, Exception Handling, Generic Programming and File Handling etc.",tags:[{name:"java",color:"blue-text-gradient"},{name:"oop",color:"green-text-gradient"},{name:"coding",color:"pink-text-gradient"}],image:Gj,source_link:"https://github.com/shinchancode/Object-Oriented-Programming-Lab",source_code_link:"https://github.com/shinchancode/Object-Oriented-Programming-Lab"}],mT=[{name:"Spell Checker",description:"Trie data structure implementation used as a dictionary, where customer details are checked, searched, inserted and removed. Using Trie, search complexities can be brought to optimal limit (key length)",tags:[{name:"C++",color:"blue-text-gradient"},{name:"trie",color:"green-text-gradient"},{name:"dictionary",color:"pink-text-gradient"}],image:Jj,source_link:"https://github.com/shinchancode/Trie-Data-structure",source_code_link:"https://github.com/shinchancode/Trie-Data-structure"},{name:"DSA Lab",description:"These projects contain data structure and algorithms primary concepts and its code in C++ language. Topics like : Linked List, Stack, Queue, Circular Queue, Binary Tree, Binary Search Tree, Expression Tree, Threaded Binary Tree, and Heap Sort etc.",tags:[{name:"DSA",color:"blue-text-gradient"},{name:"C++",color:"green-text-gradient"},{name:"semester",color:"pink-text-gradient"}],image:Xj,source_link:"https://github.com/shinchancode/Data-Structure-Algorithms",source_code_link:"https://github.com/shinchancode/Data-Structure-Algorithms/"},{name:"Computer Graphics Lab",description:"These projects contain computer graphics topics like : Line Drawing Algorithm (DDA and Bresenham), Bresenham circle drawing, Polygon filling, 2D transformation, Cohen Sutherland polygon clipping and Bezier curve.",tags:[{name:"computergraphics",color:"blue-text-gradient"},{name:"C++",color:"green-text-gradient"},{name:"semester",color:"pink-text-gradient"}],image:Yj,source_link:"https://github.com/shinchancode/Computer-Graphics",source_code_link:"https://github.com/shinchancode/Computer-Graphics"}],hJ=[{name:"3D React Portfolio",description:"Created an impressive website made using React with 3D graphics and animations to bring their content to life. Responsive webpage is made with user friendly interface",tags:[{name:"TailwindCSS",color:"blue-text-gradient"},{name:"ThreeJS",color:"green-text-gradient"},{name:"3d_react",color:"pink-text-gradient"}],image:Kj,source_link:"https://shinchancode.github.io/3d-react-portfolio/",source_code_link:"https://github.com/shinchancode/3d-react-portfolio"},{name:"React portfolio",description:"Website made using React in the FrontEnd, Nodejs and Express in the BackEnd. Responsive webpage is made with user friendly interface",tags:[{name:"nodejs",color:"blue-text-gradient"},{name:"React",color:"green-text-gradient"},{name:"html css",color:"pink-text-gradient"}],image:$j,source_link:"https://shinchancode.github.io/React-Portfolio/",source_code_link:"https://github.com/shinchancode/React-Portfolio"},{name:"30 Days of JavaScript",description:"Website made using Nodejs and Express in the BackEnd. A 30 Days Of JavaScript challenge to learn JavaScript by making 30 different projects using some famous JavaScript libraries.",tags:[{name:"JavaScript",color:"blue-text-gradient"},{name:"30dayschallenge",color:"green-text-gradient"},{name:"css",color:"pink-text-gradient"}],image:Qj,source_link:"https://rathi-30-days-of-javascript.onrender.com/",source_code_link:"https://github.com/shinchancode/30-Days-of-Javascript"},{name:"Chit Chat Application",description:"Real-Time, event based communication in Nodejs and browser-based Chat application. Uses Socket.io for implementation for WebSockets protocol. This application built using Node.js, Express, Socket.io and Render (Hosting)",tags:[{name:"Chatting",color:"blue-text-gradient"},{name:"socket.io",color:"green-text-gradient"},{name:"JavaScript",color:"pink-text-gradient"}],image:qj,source_link:"https://chit-chat-app.onrender.com/",source_code_link:"https://github.com/shinchancode/Chit-Chat-Real_time_chat_app"},{name:"Notes Application",description:"A web-based notes app made by using javaScript, This web-based notes app having functionalities like Drag and drop, Search notes etc.",tags:[{name:"notes",color:"blue-text-gradient"},{name:"bootstrap",color:"green-text-gradient"},{name:"css",color:"pink-text-gradient"}],image:Zj,source_link:"https://shinchancode.github.io/Notes-App/",source_code_link:"https://github.com/shinchancode/Notes-App"}],dJ=[{name:"Multilingual Multiple Choice Question Generation",description:"Final Year Project : Its a low level and high level model where we automate the process of creating objective question assessment using LSTM(at low level) and Transformer(at high level) models for multiple languages.",tags:[{name:"machine learning",color:"blue-text-gradient"},{name:"multilingual",color:"green-text-gradient"},{name:"BE_Project",color:"pink-text-gradient"}],image:eJ,source_link:"https://drive.google.com/drive/folders/1LECu5ENk_zsowbPeRN_R1V8Rf2Gp7N6l",source_code_link:"https://github.com/shinchancode/Final-Year-Project"},{name:"DBMS Lab",description:"Semester 4 : DBMS Lab. Topics included: ER/EER Diagram, DDL statements, primary key and foreign key constraint., SQL queries with different functions, Views, PL/SQL, Trigger (Row level and statement level) and cursor.",tags:[{name:"MySql",color:"blue-text-gradient"},{name:"dbms",color:"green-text-gradient"},{name:"semester",color:"pink-text-gradient"}],image:tJ,source_link:"https://github.com/shinchancode/DBMS-SQL-Lab",source_code_link:"https://github.com/shinchancode/DBMS-SQL-Lab"},{name:"SQL : Library Management System",description:"Semester 4 : DBMS Mini Project. Created a library management system using SQL and different functionalities.",tags:[{name:"sql",color:"blue-text-gradient"},{name:"management",color:"green-text-gradient"},{name:"miniproject",color:"pink-text-gradient"}],image:nJ,source_link:"https://github.com/shinchancode/Mini-Project-SQL-LibraryManagement",source_code_link:"https://github.com/shinchancode/Mini-Project-SQL-LibraryManagement"},{name:"Pyhton : Snake and Ladder",description:"Snake and Ladder game using python language. A simple command line interface snake and ladder game",tags:[{name:"snake and ladder",color:"blue-text-gradient"},{name:"python",color:"green-text-gradient"},{name:"CLI",color:"pink-text-gradient"}],image:iJ,source_link:"https://github.com/shinchancode/MINI_PROJECT-Snake-and-Ladder",source_code_link:"https://github.com/shinchancode/MINI_PROJECT-Snake-and-Ladder"}],pJ=[{title:"Software Devloper",company_name:"Bank of New York Mellon",icon:Oj,iconBg:"#383E56",date:"Aug 2023 - Present",link:"",points:["Software build is now used internally in the company and by the company’s clients for operating Netx360 and Netx360+.","Resolved more than 50+ Software Composition Analysis (SCA) and vulnerabilities issues.","Adapted Agile methodologies, CI/CD, and Test-Driven Programming to uphold strong programming practices.","Using technologies like Java, SpringBoot, C#, .NET and AngularJS."],link:"https://drive.google.com/drive/folders/13FK-YewFDv8ALmzKglPBmb6Z3oenuYoP"},{title:"Research Intern",company_name:"National Security Council Secretriat",icon:"https://img.icons8.com/external-flaticons-lineal-color-flat-icons/64/null/external-national-security-agency-crowdfunding-flaticons-lineal-color-flat-icons-2.png",iconBg:"#383E56",date:"Mar 2022 - Oct 2023",link:"",points:["Creating a system for secure fine-grained next-generation access control and authorization of digital assets and operations using policy based cryptosystem.","Collaborating with cross-functional technologies like spring boot, react etc. to integrate high-quality products.","Participating in code reviews and providing constructive feedback to other developers."],link:"https://github.com/codewithrathi"},{title:"DSA Mentor",company_name:"GeeksforGeeks (Intern)",icon:"https://img.icons8.com/color/344/GeeksforGeeks.png",iconBg:"#E6DEDD",date:"May 2022 - Apr 2023",link:"",points:["Teaching Assistant : Teaching Assistant for online batches of Data Structures, Algorithms, and Competitive programming with an average rating of 4.9*.","Responsible for reviewing and writing articles based on Data Structures and Algorithms."],link:"https://drive.google.com/drive/folders/1efpnfKpRTvtujtSgHwRIJdrMFiWrBFHt"},{title:"Technical Content Writer",company_name:"GeeksforGeeks",icon:"https://img.icons8.com/color/344/GeeksforGeeks.png",iconBg:"#383E56",date:"Dec 2020 - July 2022",link:"",points:["Creative and experienced content writer with 2+ years of experience.","Attracted over 10000+ visitors to the company website with powerful educational content.","Wrote 100+ articles and improved 300+ articles on topics like Data Structures, Algorithms, Mathematics and related engineering topics"],link:"https://auth.geeksforgeeks.org/user/_shinchancode"},{title:"Google Cloud Training",company_name:"Google Cloud",icon:"https://img.icons8.com/fluency/344/google-cloud.png",iconBg:"#E6DEDD",date:"Jan 2021 - Apr 2021",link:"",points:["Introduction to GCP and more functionalities with free access to quests, skill badges.","Collaborating with cross-functional technologies.","Got introduced to Computing, Application Development, Big Data and Machine Learning using Google Cloud's on training platform Qwiklabs","Additional self-paced labs were provided to practice on Qwiklabs a platform by Google"],link:"https://www.cloudskillsboost.google/public_profiles/48dcd029-03b4-437b-9dd3-ef7d65958eb0"},{title:"Hacktoberfest",company_name:"GitHub",icon:BL,iconBg:"#E6DEDD",date:"Oct (2020 - 2022)",link:"",points:["Hacktoberfest is an annual worldwide event held during the month of October. The event encourages open source developers to contribute to repositories through pull requests (PR).","GitHub hosts many open source repositories that contribute to this event."],link:"https://dev.to/shinchancode"}],mJ=[{degree:"Bachelor of Engineering",branch:"Information Technology",marks:"CGPA : 9.42 / 10",name:"Army Institute of Technology Dighi, Pune",year:"(2019 - 2023)",image:zj},{degree:"12th Grade",branch:"Science",marks:"Percentage : 89.88 %",name:"Kendriya Vidyalaya RHE Khadki Pune",year:"2018",image:dT},{degree:"10th Grade",branch:"SSC",marks:"Percentage : 95 %",name:"Kendriya Vidyalaya RHE Khadki Pune",year:"2016",image:dT}],gJ=()=>Xe(fg,{children:[ee(Ki.div,{id:"tech",variants:hu(),children:ee("h2",{className:`${wn.sectionHeadText} text-center`,children:"Tools"})}),ee("div",{className:"flex flex-row flex-wrap justify-center gap-10",children:cJ.map(n=>ee("div",{style:{height:"5rem",width:"5rem"},children:ee(J6,{icon:n.icon})},n.name))})]}),yJ=wl(gJ,"");var t0={},lg={},vJ={get exports(){return lg},set exports(n){lg=n}};/*! + #include <${eR>=154?"colorspace_fragment":"encodings_fragment"}> + `)}}}const T6=U.forwardRef((n,e)=>{const[t]=U.useState(()=>new b6(null));return U.createElement("primitive",_r({},n,{object:t,ref:e,attach:"material"}))}),P6=U.forwardRef(({children:n,enabled:e=!0,speed:t=1,rotationIntensity:i=1,floatIntensity:r=1,floatingRange:s=[-.1,.1],...o},a)=>{const l=U.useRef(null),u=U.useRef(Math.random()*1e4);return fu(h=>{var d,p;if(!e||t===0)return;const m=u.current+h.clock.getElapsedTime();l.current.rotation.x=Math.cos(m/4*t)/8*i,l.current.rotation.y=Math.sin(m/4*t)/8*i,l.current.rotation.z=Math.sin(m/4*t)/20*i;let y=Math.sin(m/4*t)/10;y=Z_.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()}),U.createElement("group",o,U.createElement("group",{ref:kA([l,a]),matrixAutoUpdate:!1},n))});let Ta,nf;const B6=U.createContext(null),$E=new ot,eb=new F,R6=U.forwardRef(({children:n,range:e,limit:t=1e3,...i},r)=>{const s=U.useRef(null),[o,a]=U.useState([]),[[l,u,h]]=U.useState(()=>[new Float32Array(t*3),Float32Array.from({length:t*3},()=>1),Float32Array.from({length:t},()=>1)]);U.useEffect(()=>{s.current.geometry.attributes.position.needsUpdate=!0}),fu(()=>{for(s.current.updateMatrix(),s.current.updateMatrixWorld(),$E.copy(s.current.matrixWorld).invert(),s.current.geometry.drawRange.count=Math.min(t,e!==void 0?e:t,o.length),Ta=0;Ta({getParent:()=>s,subscribe:p=>(a(m=>[...m,p]),()=>a(m=>m.filter(y=>y.current!==p.current)))}),[]);return U.createElement("points",_r({userData:{instances:o},matrixAutoUpdate:!1,ref:kA([r,s]),raycast:()=>null},i),U.createElement("bufferGeometry",null,U.createElement("bufferAttribute",{attach:"attributes-position",count:l.length/3,array:l,itemSize:3,usage:el}),U.createElement("bufferAttribute",{attach:"attributes-color",count:u.length/3,array:u,itemSize:3,usage:el}),U.createElement("bufferAttribute",{attach:"attributes-size",count:h.length,array:h,itemSize:1,usage:el})),U.createElement(B6.Provider,{value:d},n))}),L6=U.forwardRef(({children:n,positions:e,colors:t,sizes:i,stride:r=3,...s},o)=>{const a=U.useRef(null);return fu(()=>{const l=a.current.geometry.attributes;l.position.needsUpdate=!0,t&&(l.color.needsUpdate=!0),i&&(l.size.needsUpdate=!0)}),U.createElement("points",_r({ref:kA([o,a])},s),U.createElement("bufferGeometry",null,U.createElement("bufferAttribute",{attach:"attributes-position",count:e.length/r,array:e,itemSize:r,usage:el}),t&&U.createElement("bufferAttribute",{attach:"attributes-color",count:t.length/r,array:t,itemSize:3,usage:el}),i&&U.createElement("bufferAttribute",{attach:"attributes-size",count:i.length/r,array:i,itemSize:1,usage:el})),n)}),I6=U.forwardRef((n,e)=>n.positions instanceof Float32Array?U.createElement(L6,_r({},n,{ref:e})):U.createElement(R6,_r({},n,{ref:e})));var qm={},D6={get exports(){return qm},set exports(n){qm=n}},F6="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",k6=F6,N6=k6;function iR(){}function rR(){}rR.resetWarningCache=iR;var O6=function(){function n(i,r,s,o,a,l){if(l!==N6){var u=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 u.name="Invariant Violation",u}}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:rR,resetWarningCache:iR};return t.PropTypes=t,t};D6.exports=O6();function Jg({all:n,scene:e,camera:t}){const i=Gi(({gl:o})=>o),r=Gi(({camera:o})=>o),s=Gi(({scene:o})=>o);return U.useLayoutEffect(()=>{const o=[];n&&(e||s).traverse(u=>{u.visible===!1&&(o.push(u),u.visible=!0)}),i.compile(e||s,t||r);const a=new iA(128);new nA(.01,1e5,a).update(i,e||s),a.dispose(),o.forEach(u=>u.visible=!1)},[]),null}const UA=()=>{const{progress:n}=NH();return Xe(kH,{as:"div",center:!0,style:{display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column"},children:[ee("span",{className:"canvas-loader"}),Xe("p",{style:{fontSize:14,color:"#F1F1F1",fontWeight:800,marginTop:40},children:[n.toFixed(2),"%"]})]})},z6=()=>{const n=Nh("./planet/scene.gltf");return ee("primitive",{object:n.scene,scale:2,"position-y":0,"rotation-y":0})},U6=()=>ee(jg,{shadows:!0,frameloop:"demand",dpr:[1,2],gl:{preserveDrawingBuffer:!0},camera:{fov:45,near:.1,far:200,position:[-4,3,6]},children:Xe(U.Suspense,{fallback:ee(UA,{}),children:[ee(zA,{autoRotate:!0,enableZoom:!1,maxPolarAngle:Math.PI/2,minPolarAngle:Math.PI/2}),ee(z6,{}),ee(Jg,{all:!0})]})}),G6=n=>{const[e]=OA([n.imgUrl]);return Xe(P6,{speed:1.75,rotationIntensity:1,floatIntensity:2,children:[ee("ambientLight",{intensity:.25}),ee("directionalLight",{position:[0,0,.05]}),Xe("mesh",{castShadow:!0,receiveShadow:!0,scale:2.75,children:[ee("icosahedronGeometry",{args:[1,1]}),ee("meshStandardMaterial",{color:"#fff8eb",polygonOffset:!0,polygonOffsetFactor:-5,flatShading:!0}),ee(E6,{position:[0,0,1],rotation:[2*Math.PI,0,6.25],scale:1,map:e,flatShading:!0})]})]})},H6=({icon:n})=>Xe(jg,{frameloop:"demand",dpr:[1,2],gl:{preserveDrawingBuffer:!0},children:[Xe(U.Suspense,{fallback:ee(UA,{}),children:[ee(zA,{enableZoom:!1,maxPolarAngle:Math.PI/2,minPolarAngle:Math.PI/2}),ee(G6,{imgUrl:n})]}),ee(Jg,{all:!0})]}),V6=({isMobile:n})=>{const e=Nh("./desktop_pc/scene.gltf");return Xe("mesh",{children:[ee("hemisphereLight",{intensity:.1,groundColor:"black"}),ee("spotLight",{position:[-20,50,10],angle:.12,penumbra:1,intensity:1,castShadow:!0,"shadow-mapSize":1024}),ee("pointLight",{intensity:1}),ee("primitive",{object:e.scene,scale:n?.6:.7,position:n?[0,-4.5,-2.2]:[0,-4.5,-3.5],rotation:[-.01,-.2,-.1]})]})},W6=()=>{const[n,e]=U.useState(!1);return U.useEffect(()=>{const t=window.matchMedia("(max-width: 640px)");e(t.matches);const i=r=>{e(r.matches)};return t.addEventListener("change",i),()=>{t.removeEventListener("change",i)}},[]),Xe(jg,{frameloop:"demand",shadows:!0,dpr:[1,2],camera:{position:[20,3,5],fov:25},gl:{preserveDrawingBuffer:!0},children:[Xe(U.Suspense,{fallback:ee(UA,{}),children:[ee(zA,{enableZoom:!1,maxPolarAngle:Math.PI/2,minPolarAngle:Math.PI/2}),ee(V6,{isMobile:n})]}),ee(Jg,{all:!0})]})};function Ic(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function tb(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable})),t.push.apply(t,i)}return t}function nb(n){for(var e=1;e0&&e<1&&(e*=65536),e=Math.floor(e),e<256&&(e|=e<<8);for(var t=0;t<256;t++){var i;t&1?i=ib[t]^e&255:i=ib[t]^e>>8&255,rb[t]=rb[t+256]=i,sb[t]=sb[t+256]=j6[i%12]}};J6(0);function X6(n){if(typeof n=="number")n=Math.abs(n);else if(typeof n=="string"){var e=n;n=0;for(var t=0;t2&&arguments[2]!==void 0?arguments[2]:K6,i=nb(nb({},Q6),e),r=i.radius,s=i.center,o=0;o{const e=U.useRef(),[t]=U.useState(()=>Z6(new Float32Array(5001),{radius:1.2}));return fu((i,r)=>{e.current.rotation.x-=r/10,e.current.rotation.y-=r/15}),ee("group",{rotation:[0,0,Math.PI/4],children:ee(I6,{ref:e,positions:t,stride:3,frustumCulled:!0,...n,children:ee(T6,{transparent:!0,color:"#f272c8",size:.002,sizeAttenuation:!0,depthWrite:!1})})})},$6=()=>ee("div",{className:"w-full h-auto absolute inset-0 z-[-1]",children:Xe(jg,{camera:{position:[0,0,1]},children:[ee(U.Suspense,{fallback:null,children:ee(q6,{})}),ee(Jg,{all:!0})]})}),oR=U.createContext({transformPagePoint:n=>n,isStatic:!1,reducedMotion:"never"}),Xg=U.createContext({}),GA=U.createContext(null),Yg=typeof document<"u",e8=Yg?U.useLayoutEffect:U.useEffect,aR=U.createContext({strict:!1});function t8(n,e,t,i){const{visualElement:r}=U.useContext(Xg),s=U.useContext(aR),o=U.useContext(GA),a=U.useContext(oR).reducedMotion,l=U.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 u=l.current;U.useInsertionEffect(()=>{u&&u.update(t,o)});const h=U.useRef(!!window.HandoffAppearAnimations);return e8(()=>{u&&(u.render(),h.current&&u.animationState&&u.animationState.animateChanges())}),U.useEffect(()=>{u&&(u.updateFeatures(),!h.current&&u.animationState&&u.animationState.animateChanges(),window.HandoffAppearAnimations=void 0,h.current=!1)}),u}function xc(n){return typeof n=="object"&&Object.prototype.hasOwnProperty.call(n,"current")}function n8(n,e,t){return U.useCallback(i=>{i&&n.mount&&n.mount(i),e&&(i?e.mount(i):e.unmount()),t&&(typeof t=="function"?t(i):xc(t)&&(t.current=i))},[e])}function oh(n){return typeof n=="string"||Array.isArray(n)}function Kg(n){return typeof n=="object"&&typeof n.start=="function"}const HA=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],VA=["initial",...HA];function Qg(n){return Kg(n.animate)||VA.some(e=>oh(n[e]))}function lR(n){return!!(Qg(n)||n.variants)}function i8(n,e){if(Qg(n)){const{initial:t,animate:i}=n;return{initial:t===!1||oh(t)?t:void 0,animate:oh(i)?i:void 0}}return n.inherit!==!1?e:{}}function r8(n){const{initial:e,animate:t}=i8(n,U.useContext(Xg));return U.useMemo(()=>({initial:e,animate:t}),[ab(e),ab(t)])}function ab(n){return Array.isArray(n)?n.join(" "):n}const lb={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"]},ah={};for(const n in lb)ah[n]={isEnabled:e=>lb[n].some(t=>!!e[t])};function s8(n){for(const e in n)ah[e]={...ah[e],...n[e]}}const cR=U.createContext({}),uR=U.createContext({}),o8=Symbol.for("motionComponentSymbol");function a8({preloadedFeatures:n,createVisualElement:e,useRender:t,useVisualState:i,Component:r}){n&&s8(n);function s(a,l){let u;const h={...U.useContext(oR),...a,layoutId:l8(a)},{isStatic:d}=h,p=r8(a),m=i(a,d);if(!d&&Yg){p.visualElement=t8(r,m,h,e);const y=U.useContext(uR),v=U.useContext(aR).strict;p.visualElement&&(u=p.visualElement.loadFeatures(h,v,n,y))}return U.createElement(Xg.Provider,{value:p},u&&p.visualElement?U.createElement(u,{visualElement:p.visualElement,...h}):null,t(r,a,n8(m,p.visualElement,l),m,d,p.visualElement))}const o=U.forwardRef(s);return o[o8]=r,o}function l8({layoutId:n}){const e=U.useContext(cR).id;return e&&n!==void 0?e+"-"+n:n}function c8(n){function e(i,r={}){return a8(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 u8=["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 WA(n){return typeof n!="string"||n.includes("-")?!1:!!(u8.indexOf(n)>-1||/[A-Z]/.test(n))}const $m={};function f8(n){Object.assign($m,n)}const Oh=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],_l=new Set(Oh);function fR(n,{layout:e,layoutId:t}){return _l.has(n)||n.startsWith("origin")||(e||t!==void 0)&&(!!$m[n]||n==="opacity")}const Ii=n=>!!(n&&n.getVelocity),h8={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},d8=Oh.length;function p8(n,{enableHardwareAcceleration:e=!0,allowTransformNone:t=!0},i,r){let s="";for(let o=0;oe=>typeof e=="string"&&e.startsWith(n),dR=hR("--"),B1=hR("var(--"),m8=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,g8=(n,e)=>e&&typeof n=="number"?e.transform(n):n,qo=(n,e,t)=>Math.min(Math.max(t,n),e),Al={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},Cf={...Al,transform:n=>qo(0,1,n)},jp={...Al,default:1},Ef=n=>Math.round(n*1e5)/1e5,Zg=/(-)?([\d]*\.?[\d])+/g,pR=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,y8=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function zh(n){return typeof n=="string"}const Uh=n=>({test:e=>zh(e)&&e.endsWith(n)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${n}`}),_o=Uh("deg"),fs=Uh("%"),st=Uh("px"),v8=Uh("vh"),x8=Uh("vw"),cb={...fs,parse:n=>fs.parse(n)/100,transform:n=>fs.transform(n*100)},ub={...Al,transform:Math.round},mR={borderWidth:st,borderTopWidth:st,borderRightWidth:st,borderBottomWidth:st,borderLeftWidth:st,borderRadius:st,radius:st,borderTopLeftRadius:st,borderTopRightRadius:st,borderBottomRightRadius:st,borderBottomLeftRadius:st,width:st,maxWidth:st,height:st,maxHeight:st,size:st,top:st,right:st,bottom:st,left:st,padding:st,paddingTop:st,paddingRight:st,paddingBottom:st,paddingLeft:st,margin:st,marginTop:st,marginRight:st,marginBottom:st,marginLeft:st,rotate:_o,rotateX:_o,rotateY:_o,rotateZ:_o,scale:jp,scaleX:jp,scaleY:jp,scaleZ:jp,skew:_o,skewX:_o,skewY:_o,distance:st,translateX:st,translateY:st,translateZ:st,x:st,y:st,z:st,perspective:st,transformPerspective:st,opacity:Cf,originX:cb,originY:cb,originZ:st,zIndex:ub,fillOpacity:Cf,strokeOpacity:Cf,numOctaves:ub};function jA(n,e,t,i){const{style:r,vars:s,transform:o,transformOrigin:a}=n;let l=!1,u=!1,h=!0;for(const d in e){const p=e[d];if(dR(d)){s[d]=p;continue}const m=mR[d],y=g8(p,m);if(_l.has(d)){if(l=!0,o[d]=y,!h)continue;p!==(m.default||0)&&(h=!1)}else d.startsWith("origin")?(u=!0,a[d]=y):r[d]=y}if(e.transform||(l||i?r.transform=p8(n.transform,t,h,i):r.transform&&(r.transform="none")),u){const{originX:d="50%",originY:p="50%",originZ:m=0}=a;r.transformOrigin=`${d} ${p} ${m}`}}const JA=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function gR(n,e,t){for(const i in e)!Ii(e[i])&&!fR(i,t)&&(n[i]=e[i])}function _8({transformTemplate:n},e,t){return U.useMemo(()=>{const i=JA();return jA(i,e,{enableHardwareAcceleration:!t},n),Object.assign({},i.vars,i.style)},[e])}function A8(n,e,t){const i=n.style||{},r={};return gR(r,i,n),Object.assign(r,_8(n,e,t)),n.transformValues?n.transformValues(r):r}function w8(n,e,t){const i={},r=A8(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 S8=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 eg(n){return n.startsWith("while")||n.startsWith("drag")&&n!=="draggable"||n.startsWith("layout")||n.startsWith("onTap")||n.startsWith("onPan")||S8.has(n)}let yR=n=>!eg(n);function M8(n){n&&(yR=e=>e.startsWith("on")?!eg(e):n(e))}try{M8(require("@emotion/is-prop-valid").default)}catch{}function C8(n,e,t){const i={};for(const r in n)r==="values"&&typeof n.values=="object"||(yR(r)||t===!0&&eg(r)||!e&&!eg(r)||n.draggable&&r.startsWith("onDrag"))&&(i[r]=n[r]);return i}function fb(n,e,t){return typeof n=="string"?n:st.transform(e+t*n)}function E8(n,e,t){const i=fb(e,n.x,n.width),r=fb(t,n.y,n.height);return`${i} ${r}`}const b8={offset:"stroke-dashoffset",array:"stroke-dasharray"},T8={offset:"strokeDashoffset",array:"strokeDasharray"};function P8(n,e,t=1,i=0,r=!0){n.pathLength=1;const s=r?b8:T8;n[s.offset]=st.transform(-i);const o=st.transform(e),a=st.transform(t);n[s.array]=`${o} ${a}`}function XA(n,{attrX:e,attrY:t,attrScale:i,originX:r,originY:s,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...u},h,d,p){if(jA(n,u,h,p),d){n.style.viewBox&&(n.attrs.viewBox=n.style.viewBox);return}n.attrs=n.style,n.style={};const{attrs:m,style:y,dimensions:v}=n;m.transform&&(v&&(y.transform=m.transform),delete m.transform),v&&(r!==void 0||s!==void 0||y.transform)&&(y.transformOrigin=E8(v,r!==void 0?r:.5,s!==void 0?s:.5)),e!==void 0&&(m.x=e),t!==void 0&&(m.y=t),i!==void 0&&(m.scale=i),o!==void 0&&P8(m,o,a,l,!1)}const vR=()=>({...JA(),attrs:{}}),YA=n=>typeof n=="string"&&n.toLowerCase()==="svg";function B8(n,e,t,i){const r=U.useMemo(()=>{const s=vR();return XA(s,e,{enableHardwareAcceleration:!1},YA(i),n.transformTemplate),{...s.attrs,style:{...s.style}}},[e]);if(n.style){const s={};gR(s,n.style,n),r.style={...s,...r.style}}return r}function R8(n=!1){return(t,i,r,{latestValues:s},o)=>{const l=(WA(t)?B8:w8)(i,s,o,t),h={...C8(i,typeof t=="string",n),...l,ref:r},{children:d}=i,p=U.useMemo(()=>Ii(d)?d.get():d,[d]);return U.createElement(t,{...h,children:p})}}const KA=n=>n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function xR(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 _R=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 AR(n,e,t,i){xR(n,e,void 0,i);for(const r in e.attrs)n.setAttribute(_R.has(r)?r:KA(r),e.attrs[r])}function QA(n,e){const{style:t}=n,i={};for(const r in t)(Ii(t[r])||e.style&&Ii(e.style[r])||fR(r,n))&&(i[r]=t[r]);return i}function wR(n,e){const t=QA(n,e);for(const i in n)if(Ii(n[i])||Ii(e[i])){const r=Oh.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;t[r]=n[i]}return t}function ZA(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}function L8(n){const e=U.useRef(null);return e.current===null&&(e.current=n()),e.current}const tg=n=>Array.isArray(n),I8=n=>!!(n&&typeof n=="object"&&n.mix&&n.toValue),D8=n=>tg(n)?n[n.length-1]||0:n;function ym(n){const e=Ii(n)?n.get():n;return I8(e)?e.toValue():e}function F8({scrapeMotionValuesFromProps:n,createRenderState:e,onMount:t},i,r,s){const o={latestValues:k8(i,r,s,n),renderState:e()};return t&&(o.mount=a=>t(i,a,o)),o}const SR=n=>(e,t)=>{const i=U.useContext(Xg),r=U.useContext(GA),s=()=>F8(n,e,i,r);return t?s():L8(s)};function k8(n,e,t,i){const r={},s=i(n,{});for(const p in s)r[p]=ym(s[p]);let{initial:o,animate:a}=n;const l=Qg(n),u=lR(n);e&&u&&!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"&&!Kg(d)&&(Array.isArray(d)?d:[d]).forEach(m=>{const y=ZA(n,m);if(!y)return;const{transitionEnd:v,transition:x,...A}=y;for(const _ in A){let w=A[_];if(Array.isArray(w)){const M=h?w.length-1:0;w=w[M]}w!==null&&(r[_]=w)}for(const _ in v)r[_]=v[_]}),r}const gn=n=>n;class hb{constructor(){this.order=[],this.scheduled=new Set}add(e){if(!this.scheduled.has(e))return this.scheduled.add(e),this.order.push(e),!0}remove(e){const t=this.order.indexOf(e);t!==-1&&(this.order.splice(t,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}function N8(n){let e=new hb,t=new hb,i=0,r=!1,s=!1;const o=new WeakSet,a={schedule:(l,u=!1,h=!1)=>{const d=h&&r,p=d?e:t;return u&&o.add(l),p.add(l)&&d&&r&&(i=e.order.length),l},cancel:l=>{t.remove(l),o.delete(l)},process:l=>{if(r){s=!0;return}if(r=!0,[e,t]=[t,e],t.clear(),i=e.order.length,i)for(let u=0;u(d[p]=N8(()=>t=!0),d),{}),o=d=>s[d].process(r),a=()=>{const d=performance.now();t=!1,r.delta=i?1e3/60:Math.max(Math.min(d-r.timestamp,O8),1),r.timestamp=d,r.isProcessing=!0,Jp.forEach(o),r.isProcessing=!1,t&&e&&(i=!1,n(a))},l=()=>{t=!0,i=!0,r.isProcessing||n(a)};return{schedule:Jp.reduce((d,p)=>{const m=s[p];return d[p]=(y,v=!1,x=!1)=>(t||l(),m.schedule(y,v,x)),d},{}),cancel:d=>Jp.forEach(p=>s[p].cancel(d)),state:r,steps:s}}const{schedule:Yt,cancel:$s,state:Gn,steps:Bv}=z8(typeof requestAnimationFrame<"u"?requestAnimationFrame:gn,!0),U8={useVisualState:SR({scrapeMotionValuesFromProps:wR,createRenderState:vR,onMount:(n,e,{renderState:t,latestValues:i})=>{Yt.read(()=>{try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}),Yt.render(()=>{XA(t,i,{enableHardwareAcceleration:!1},YA(e.tagName),n.transformTemplate),AR(e,t)})}})},G8={useVisualState:SR({scrapeMotionValuesFromProps:QA,createRenderState:JA})};function H8(n,{forwardMotionProps:e=!1},t,i){return{...WA(n)?U8:G8,preloadedFeatures:t,useRender:R8(e),createVisualElement:i,Component:n}}function Hs(n,e,t,i={passive:!0}){return n.addEventListener(e,t,i),()=>n.removeEventListener(e,t)}const MR=n=>n.pointerType==="mouse"?typeof n.button!="number"||n.button<=0:n.isPrimary!==!1;function qg(n,e="page"){return{point:{x:n[e+"X"],y:n[e+"Y"]}}}const V8=n=>e=>MR(e)&&n(e,qg(e));function js(n,e,t,i){return Hs(n,e,V8(t),i)}const W8=(n,e)=>t=>e(n(t)),Go=(...n)=>n.reduce(W8);function CR(n){let e=null;return()=>{const t=()=>{e=null};return e===null?(e=n,t):!1}}const db=CR("dragHorizontal"),pb=CR("dragVertical");function ER(n){let e=!1;if(n==="y")e=pb();else if(n==="x")e=db();else{const t=db(),i=pb();t&&i?e=()=>{t(),i()}:(t&&t(),i&&i())}return e}function bR(){const n=ER(!0);return n?(n(),!1):!0}class ca{constructor(e){this.isMounted=!1,this.node=e}update(){}}function mb(n,e){const t="pointer"+(e?"enter":"leave"),i="onHover"+(e?"Start":"End"),r=(s,o)=>{if(s.type==="touch"||bR())return;const a=n.getProps();n.animationState&&a.whileHover&&n.animationState.setActive("whileHover",e),a[i]&&Yt.update(()=>a[i](s,o))};return js(n.current,t,r,{passive:!n.getProps()[i]})}class j8 extends ca{mount(){this.unmount=Go(mb(this.node,!0),mb(this.node,!1))}unmount(){}}class J8 extends ca{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=Go(Hs(this.node.current,"focus",()=>this.onFocus()),Hs(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const TR=(n,e)=>e?n===e?!0:TR(n,e.parentElement):!1;function Rv(n,e){if(!e)return;const t=new PointerEvent("pointer"+n);e(t,qg(t))}class X8 extends ca{constructor(){super(...arguments),this.removeStartListeners=gn,this.removeEndListeners=gn,this.removeAccessibleListeners=gn,this.startPointerPress=(e,t)=>{if(this.removeEndListeners(),this.isPressing)return;const i=this.node.getProps(),s=js(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:h}=this.node.getProps();Yt.update(()=>{TR(this.node.current,a.target)?u&&u(a,l):h&&h(a,l)})},{passive:!(i.onTap||i.onPointerUp)}),o=js(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(i.onTapCancel||i.onPointerCancel)});this.removeEndListeners=Go(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()||Rv("up",(l,u)=>{const{onTap:h}=this.node.getProps();h&&Yt.update(()=>h(l,u))})};this.removeEndListeners(),this.removeEndListeners=Hs(this.node.current,"keyup",o),Rv("down",(a,l)=>{this.startPress(a,l)})},t=Hs(this.node.current,"keydown",e),i=()=>{this.isPressing&&Rv("cancel",(s,o)=>this.cancelPress(s,o))},r=Hs(this.node.current,"blur",i);this.removeAccessibleListeners=Go(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&&Yt.update(()=>i(e,t))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!bR()}cancelPress(e,t){if(!this.checkPressEnd())return;const{onTapCancel:i}=this.node.getProps();i&&Yt.update(()=>i(e,t))}mount(){const e=this.node.getProps(),t=js(this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),i=Hs(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Go(t,i)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const R1=new WeakMap,Lv=new WeakMap,Y8=n=>{const e=R1.get(n.target);e&&e(n)},K8=n=>{n.forEach(Y8)};function Q8({root:n,...e}){const t=n||document;Lv.has(t)||Lv.set(t,{});const i=Lv.get(t),r=JSON.stringify(e);return i[r]||(i[r]=new IntersectionObserver(K8,{root:n,...e})),i[r]}function Z8(n,e,t){const i=Q8(e);return R1.set(n,t),i.observe(n),()=>{R1.delete(n),i.unobserve(n)}}const q8={some:0,all:1};class $8 extends ca{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:q8[r]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:h,onViewportLeave:d}=this.node.getProps(),p=u?h:d;p&&p(l)};return Z8(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(eV(e,t))&&this.startObserver()}unmount(){}}function eV({viewport:n={}},{viewport:e={}}={}){return t=>n[t]!==e[t]}const tV={inView:{Feature:$8},tap:{Feature:X8},focus:{Feature:J8},hover:{Feature:j8}};function PR(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 iV(n){const e={};return n.values.forEach((t,i)=>e[i]=t.getVelocity()),e}function $g(n,e,t){const i=n.getProps();return ZA(i,e,t!==void 0?t:i.custom,nV(n),iV(n))}const rV="framerAppearId",sV="data-"+KA(rV);let oV=gn,qA=gn;const Ho=n=>n*1e3,Js=n=>n/1e3,aV={current:!1},BR=n=>Array.isArray(n)&&typeof n[0]=="number";function RR(n){return!!(!n||typeof n=="string"&&LR[n]||BR(n)||Array.isArray(n)&&n.every(RR))}const ff=([n,e,t,i])=>`cubic-bezier(${n}, ${e}, ${t}, ${i})`,LR={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ff([0,.65,.55,1]),circOut:ff([.55,0,1,.45]),backIn:ff([.31,.01,.66,-.59]),backOut:ff([.33,1.53,.69,.99])};function IR(n){if(n)return BR(n)?ff(n):Array.isArray(n)?n.map(IR):LR[n]}function lV(n,e,t,{delay:i=0,duration:r,repeat:s=0,repeatType:o="loop",ease:a,times:l}={}){const u={[e]:t};l&&(u.offset=l);const h=IR(a);return Array.isArray(h)&&(u.easing=h),n.animate(u,{delay:i,duration:r,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"})}function cV(n,{repeat:e,repeatType:t="loop"}){const i=e&&t!=="loop"&&e%2===1?0:n.length-1;return n[i]}const DR=(n,e,t)=>(((1-3*t+3*e)*n+(3*t-6*e))*n+3*e)*n,uV=1e-7,fV=12;function hV(n,e,t,i,r){let s,o,a=0;do o=e+(t-e)/2,s=DR(o,i,r)-n,s>0?t=o:e=o;while(Math.abs(s)>uV&&++ahV(s,0,1,n,t);return s=>s===0||s===1?s:DR(r(s),e,i)}const dV=Gh(.42,0,1,1),pV=Gh(0,0,.58,1),FR=Gh(.42,0,.58,1),mV=n=>Array.isArray(n)&&typeof n[0]!="number",kR=n=>e=>e<=.5?n(2*e)/2:(2-n(2*(1-e)))/2,NR=n=>e=>1-n(1-e),OR=n=>1-Math.sin(Math.acos(n)),$A=NR(OR),gV=kR($A),zR=Gh(.33,1.53,.69,.99),ew=NR(zR),yV=kR(ew),vV=n=>(n*=2)<1?.5*ew(n):.5*(2-Math.pow(2,-10*(n-1))),xV={linear:gn,easeIn:dV,easeInOut:FR,easeOut:pV,circIn:OR,circInOut:gV,circOut:$A,backIn:ew,backInOut:yV,backOut:zR,anticipate:vV},gb=n=>{if(Array.isArray(n)){qA(n.length===4);const[e,t,i,r]=n;return Gh(e,t,i,r)}else if(typeof n=="string")return xV[n];return n},tw=(n,e)=>t=>!!(zh(t)&&y8.test(t)&&t.startsWith(n)||e&&Object.prototype.hasOwnProperty.call(t,e)),UR=(n,e,t)=>i=>{if(!zh(i))return i;const[r,s,o,a]=i.match(Zg);return{[n]:parseFloat(r),[e]:parseFloat(s),[t]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},_V=n=>qo(0,255,n),Iv={...Al,transform:n=>Math.round(_V(n))},Ka={test:tw("rgb","red"),parse:UR("red","green","blue"),transform:({red:n,green:e,blue:t,alpha:i=1})=>"rgba("+Iv.transform(n)+", "+Iv.transform(e)+", "+Iv.transform(t)+", "+Ef(Cf.transform(i))+")"};function AV(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 L1={test:tw("#"),parse:AV,transform:Ka.transform},_c={test:tw("hsl","hue"),parse:UR("hue","saturation","lightness"),transform:({hue:n,saturation:e,lightness:t,alpha:i=1})=>"hsla("+Math.round(n)+", "+fs.transform(Ef(e))+", "+fs.transform(Ef(t))+", "+Ef(Cf.transform(i))+")"},gi={test:n=>Ka.test(n)||L1.test(n)||_c.test(n),parse:n=>Ka.test(n)?Ka.parse(n):_c.test(n)?_c.parse(n):L1.parse(n),transform:n=>zh(n)?n:n.hasOwnProperty("red")?Ka.transform(n):_c.transform(n)},sn=(n,e,t)=>-t*n+t*e+n;function Dv(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 wV({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=Dv(l,a,n+1/3),s=Dv(l,a,n),o=Dv(l,a,n-1/3)}return{red:Math.round(r*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:i}}const Fv=(n,e,t)=>{const i=n*n;return Math.sqrt(Math.max(0,t*(e*e-i)+i))},SV=[L1,Ka,_c],MV=n=>SV.find(e=>e.test(n));function yb(n){const e=MV(n);let t=e.parse(n);return e===_c&&(t=wV(t)),t}const GR=(n,e)=>{const t=yb(n),i=yb(e),r={...t};return s=>(r.red=Fv(t.red,i.red,s),r.green=Fv(t.green,i.green,s),r.blue=Fv(t.blue,i.blue,s),r.alpha=sn(t.alpha,i.alpha,s),Ka.transform(r))};function CV(n){var e,t;return isNaN(n)&&zh(n)&&(((e=n.match(Zg))===null||e===void 0?void 0:e.length)||0)+(((t=n.match(pR))===null||t===void 0?void 0:t.length)||0)>0}const HR={regex:m8,countKey:"Vars",token:"${v}",parse:gn},VR={regex:pR,countKey:"Colors",token:"${c}",parse:gi.parse},WR={regex:Zg,countKey:"Numbers",token:"${n}",parse:Al.parse};function kv(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 ng(n){const e=n.toString(),t={value:e,tokenised:e,values:[],numVars:0,numColors:0,numNumbers:0};return t.value.includes("var(--")&&kv(t,HR),kv(t,VR),kv(t,WR),t}function jR(n){return ng(n).values}function JR(n){const{values:e,numColors:t,numVars:i,tokenised:r}=ng(n),s=e.length;return o=>{let a=r;for(let l=0;ltypeof n=="number"?0:n;function bV(n){const e=jR(n);return JR(n)(e.map(EV))}const $o={test:CV,parse:jR,createTransformer:JR,getAnimatableNone:bV},XR=(n,e)=>t=>`${t>0?e:n}`;function YR(n,e){return typeof n=="number"?t=>sn(n,e,t):gi.test(n)?GR(n,e):n.startsWith("var(")?XR(n,e):QR(n,e)}const KR=(n,e)=>{const t=[...n],i=t.length,r=n.map((s,o)=>YR(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]=YR(n[r],e[r]));return r=>{for(const s in i)t[s]=i[s](r);return t}},QR=(n,e)=>{const t=$o.createTransformer(e),i=ng(n),r=ng(e);return i.numVars===r.numVars&&i.numColors===r.numColors&&i.numNumbers>=r.numNumbers?Go(KR(i.values,r.values),t):XR(n,e)},lh=(n,e,t)=>{const i=e-n;return i===0?1:(t-n)/i},vb=(n,e)=>t=>sn(n,e,t);function PV(n){return typeof n=="number"?vb:typeof n=="string"?gi.test(n)?GR:QR:Array.isArray(n)?KR:typeof n=="object"?TV:vb}function BV(n,e,t){const i=[],r=t||PV(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=BV(e,i,r),a=o.length,l=u=>{let h=0;if(a>1)for(;hl(qo(n[0],n[s-1],u)):l}function RV(n,e){const t=n[n.length-1];for(let i=1;i<=e;i++){const r=lh(0,e,i);n.push(sn(t,1,r))}}function LV(n){const e=[0];return RV(e,n.length-1),e}function IV(n,e){return n.map(t=>t*e)}function DV(n,e){return n.map(()=>e||FR).splice(0,n.length-1)}function ig({duration:n=300,keyframes:e,times:t,ease:i="easeInOut"}){const r=mV(i)?i.map(gb):gb(i),s={done:!1,value:e[0]},o=IV(t&&t.length===e.length?t:LV(e),n),a=ZR(o,e,{ease:Array.isArray(r)?r:DV(e,r)});return{calculatedDuration:n,next:l=>(s.value=a(l),s.done=l>=n,s)}}function qR(n,e){return e?n*(1e3/e):0}const FV=5;function $R(n,e,t){const i=Math.max(e-FV,0);return qR(t-n(i),e-i)}const Nv=.001,kV=.01,xb=10,NV=.05,OV=1;function zV({duration:n=800,bounce:e=.25,velocity:t=0,mass:i=1}){let r,s;oV(n<=Ho(xb));let o=1-e;o=qo(NV,OV,o),n=qo(kV,xb,Js(n)),o<1?(r=u=>{const h=u*o,d=h*n,p=h-t,m=I1(u,o),y=Math.exp(-d);return Nv-p/m*y},s=u=>{const d=u*o*n,p=d*t+t,m=Math.pow(o,2)*Math.pow(u,2)*n,y=Math.exp(-d),v=I1(Math.pow(u,2),o);return(-r(u)+Nv>0?-1:1)*((p-m)*y)/v}):(r=u=>{const h=Math.exp(-u*n),d=(u-t)*n+1;return-Nv+h*d},s=u=>{const h=Math.exp(-u*n),d=(t-u)*(n*n);return h*d});const a=5/n,l=GV(r,s,a);if(n=Ho(n),isNaN(l))return{stiffness:100,damping:10,duration:n};{const u=Math.pow(l,2)*i;return{stiffness:u,damping:o*2*Math.sqrt(i*u),duration:n}}}const UV=12;function GV(n,e,t){let i=t;for(let r=1;rn[t]!==void 0)}function WV(n){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...n};if(!_b(n,VV)&&_b(n,HV)){const t=zV(n);e={...e,...t,velocity:0,mass:1},e.isResolvedFromDuration=!0}return e}function eL({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:u,velocity:h,duration:d,isResolvedFromDuration:p}=WV(i),m=h?-Js(h):0,y=l/(2*Math.sqrt(a*u)),v=s-r,x=Js(Math.sqrt(a/u)),A=Math.abs(v)<5;t||(t=A?.01:2),e||(e=A?.005:.5);let _;if(y<1){const w=I1(x,y);_=M=>{const b=Math.exp(-y*x*M);return s-b*((m+y*x*v)/w*Math.sin(w*M)+v*Math.cos(w*M))}}else if(y===1)_=w=>s-Math.exp(-x*w)*(v+(m+x*v)*w);else{const w=x*Math.sqrt(y*y-1);_=M=>{const b=Math.exp(-y*x*M),P=Math.min(w*M,300);return s-b*((m+y*x*v)*Math.sinh(P)+w*v*Math.cosh(P))/w}}return{calculatedDuration:p&&d||null,next:w=>{const M=_(w);if(p)o.done=w>=d;else{let b=m;w!==0&&(y<1?b=$R(_,w,M):b=0);const P=Math.abs(b)<=t,R=Math.abs(s-M)<=e;o.done=P&&R}return o.value=o.done?s:M,o}}}function Ab({keyframes:n,velocity:e=0,power:t=.8,timeConstant:i=325,bounceDamping:r=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:u=.5,restSpeed:h}){const d=n[0],p={done:!1,value:d},m=E=>a!==void 0&&El,y=E=>a===void 0?l:l===void 0||Math.abs(a-E)-v*Math.exp(-E/i),w=E=>A+_(E),M=E=>{const B=_(E),I=w(E);p.done=Math.abs(B)<=u,p.value=p.done?A:I};let b,P;const R=E=>{m(p.value)&&(b=E,P=eL({keyframes:[p.value,y(p.value)],velocity:$R(w,E,p.value),damping:r,stiffness:s,restDelta:u,restSpeed:h}))};return R(0),{calculatedDuration:null,next:E=>{let B=!1;return!P&&b===void 0&&(B=!0,M(E),R(E)),b!==void 0&&E>b?P.next(E-b):(!B&&M(E),p)}}}const jV=n=>{const e=({timestamp:t})=>n(t);return{start:()=>Yt.update(e,!0),stop:()=>$s(e),now:()=>Gn.isProcessing?Gn.timestamp:performance.now()}},wb=2e4;function Sb(n){let e=0;const t=50;let i=n.next(e);for(;!i.done&&e=wb?1/0:e}const JV={decay:Ab,inertia:Ab,tween:ig,keyframes:ig,spring:eL};function rg({autoplay:n=!0,delay:e=0,driver:t=jV,keyframes:i,type:r="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:a="loop",onPlay:l,onStop:u,onComplete:h,onUpdate:d,...p}){let m=1,y=!1,v,x;const A=()=>{x=new Promise($=>{v=$})};A();let _;const w=JV[r]||ig;let M;w!==ig&&typeof i[0]!="number"&&(M=ZR([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 R="idle",E=null,B=null,I=null;b.calculatedDuration===null&&s&&(b.calculatedDuration=Sb(b));const{calculatedDuration:z}=b;let Z=1/0,J=1/0;z!==null&&(Z=z+o,J=Z*(s+1)-o);let W=0;const Q=$=>{if(B===null)return;m>0&&(B=Math.min(B,$)),m<0&&(B=Math.min($-J/m,B)),E!==null?W=E:W=Math.round($-B)*m;const G=W-e*(m>=0?1:-1),se=m>=0?G<0:G>J;W=Math.max(G,0),R==="finished"&&E===null&&(W=J);let me=W,Y=b;if(s){const ke=W/Z;let Te=Math.floor(ke),we=ke%1;!we&&ke>=1&&(we=1),we===1&&Te--,Te=Math.min(Te,s+1);const he=!!(Te%2);he&&(a==="reverse"?(we=1-we,o&&(we-=o/Z)):a==="mirror"&&(Y=P));let de=qo(0,1,we);W>J&&(de=a==="reverse"&&he?1:0),me=de*Z}const _e=se?{done:!1,value:i[0]}:Y.next(me);M&&(_e.value=M(_e.value));let{done:Ae}=_e;!se&&z!==null&&(Ae=m>=0?W>=J:W<=0);const Ie=E===null&&(R==="finished"||R==="running"&&Ae);return d&&d(_e.value),Ie&&L(),_e},re=()=>{_&&_.stop(),_=void 0},ce=()=>{R="idle",re(),v(),A(),B=I=null},L=()=>{R="finished",h&&h(),re(),v()},V=()=>{if(y)return;_||(_=t(Q));const $=_.now();l&&l(),E!==null?B=$-E:(!B||R==="finished")&&(B=$),R==="finished"&&A(),I=B,E=null,R="running",_.start()};n&&V();const H={then($,G){return x.then($,G)},get time(){return Js(W)},set time($){$=Ho($),W=$,E!==null||!_||m===0?E=$:B=_.now()-$/m},get duration(){const $=b.calculatedDuration===null?Sb(b):b.calculatedDuration;return Js($)},get speed(){return m},set speed($){$===m||!_||(m=$,H.time=Js(W))},get state(){return R},play:V,pause:()=>{R="paused",E=W},stop:()=>{y=!0,R!=="idle"&&(R="idle",u&&u(),ce())},cancel:()=>{I!==null&&Q(I),ce()},complete:()=>{R="finished"},sample:$=>(B=0,Q($))};return H}function XV(n){let e;return()=>(e===void 0&&(e=n()),e)}const YV=XV(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),KV=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),Xp=10,QV=2e4,ZV=(n,e)=>e.type==="spring"||n==="backgroundColor"||!RR(e.ease);function qV(n,e,{onUpdate:t,onComplete:i,...r}){if(!(YV()&&KV.has(e)&&!r.repeatDelay&&r.repeatType!=="mirror"&&r.damping!==0&&r.type!=="inertia"))return!1;let o=!1,a,l;const u=()=>{l=new Promise(_=>{a=_})};u();let{keyframes:h,duration:d=300,ease:p,times:m}=r;if(ZV(e,r)){const _=rg({...r,repeat:0,delay:0});let w={done:!1,value:h[0]};const M=[];let b=0;for(;!w.done&&by.cancel(),x=()=>{Yt.update(v),a(),u()};return y.onfinish=()=>{n.set(cV(h,r)),i&&i(),x()},{then(_,w){return l.then(_,w)},attachTimeline(_){return y.timeline=_,y.onfinish=null,gn},get time(){return Js(y.currentTime||0)},set time(_){y.currentTime=Ho(_)},get speed(){return y.playbackRate},set speed(_){y.playbackRate=_},get duration(){return Js(d)},play:()=>{o||(y.play(),$s(v))},pause:()=>y.pause(),stop:()=>{if(o=!0,y.playState==="idle")return;const{currentTime:_}=y;if(_){const w=rg({...r,autoplay:!1});n.setWithVelocity(w.sample(_-Xp).value,w.sample(_).value,Xp)}x()},complete:()=>y.finish(),cancel:x}}function $V({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:gn,pause:gn,stop:gn,then:s=>(s(),Promise.resolve()),cancel:gn,complete:gn});return e?rg({keyframes:[0,1],duration:0,delay:e,onComplete:r}):r()}const eW={type:"spring",stiffness:500,damping:25,restSpeed:10},tW=n=>({type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restSpeed:10}),nW={type:"keyframes",duration:.8},iW={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},rW=(n,{keyframes:e})=>e.length>2?nW:_l.has(n)?n.startsWith("scale")?tW(e[1]):eW:iW,D1=(n,e)=>n==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&($o.test(e)||e==="0")&&!e.startsWith("url(")),sW=new Set(["brightness","contrast","saturate","opacity"]);function oW(n){const[e,t]=n.slice(0,-1).split("(");if(e==="drop-shadow")return n;const[i]=t.match(Zg)||[];if(!i)return n;const r=t.replace(i,"");let s=sW.has(e)?1:0;return i!==t&&(s*=100),e+"("+s+r+")"}const aW=/([a-z-]*)\(.*?\)/g,F1={...$o,getAnimatableNone:n=>{const e=n.match(aW);return e?e.map(oW).join(" "):n}},lW={...mR,color:gi,backgroundColor:gi,outlineColor:gi,fill:gi,stroke:gi,borderColor:gi,borderTopColor:gi,borderRightColor:gi,borderBottomColor:gi,borderLeftColor:gi,filter:F1,WebkitFilter:F1},nw=n=>lW[n];function tL(n,e){let t=nw(n);return t!==F1&&(t=$o),t.getAnimatableNone?t.getAnimatableNone(e):void 0}const nL=n=>/^0[^.\s]+$/.test(n);function cW(n){if(typeof n=="number")return n===0;if(n!==null)return n==="none"||n==="0"||nL(n)}function uW(n,e,t,i){const r=D1(e,t);let s;Array.isArray(t)?s=[...t]:s=[null,t];const o=i.from!==void 0?i.from:n.get();let a;const l=[];for(let u=0;ur=>{const s=iL(i,n)||{},o=s.delay||i.delay||0;let{elapsed:a=0}=i;a=a-Ho(o);const l=uW(e,n,t,s),u=l[0],h=l[l.length-1],d=D1(n,u),p=D1(n,h);let m={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(fW(s)||(m={...m,...rW(n,m)}),m.duration&&(m.duration=Ho(m.duration)),m.repeatDelay&&(m.repeatDelay=Ho(m.repeatDelay)),!d||!p||aV.current||s.type===!1)return $V(m);if(e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const y=qV(e,n,m);if(y)return y}return rg(m)};function sg(n){return!!(Ii(n)&&n.add)}const rL=n=>/^\-?\d*\.?\d+$/.test(n);function rw(n,e){n.indexOf(e)===-1&&n.push(e)}function sw(n,e){const t=n.indexOf(e);t>-1&&n.splice(t,1)}class ow{constructor(){this.subscriptions=[]}add(e){return rw(this.subscriptions,e),()=>sw(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 dW{constructor(e,t={}){this.version="10.16.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}=Gn;this.lastUpdated!==o&&(this.timeDelta=s,this.lastUpdated=o,Yt.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=()=>Yt.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=hW(this.current),this.owner=t.owner}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new ow);const i=this.events[e].add(t);return e==="change"?()=>{i(),Yt.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?qR(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 Zc(n,e){return new dW(n,e)}const sL=n=>e=>e.test(n),pW={test:n=>n==="auto",parse:n=>n},oL=[Al,st,fs,_o,x8,v8,pW],rf=n=>oL.find(sL(n)),mW=[...oL,gi,$o],gW=n=>mW.find(sL(n));function yW(n,e,t){n.hasValue(e)?n.getValue(e).set(t):n.addValue(e,Zc(t))}function vW(n,e){const t=$g(n,e);let{transitionEnd:i={},transition:r={},...s}=t?n.makeTargetAnimatable(t,!1):{};s={...s,...i};for(const o in s){const a=D8(s[o]);yW(n,o,a)}}function xW(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))),u.push(v)}return o&&Promise.all(u).then(()=>{o&&vW(n,o)}),u}function k1(n,e,t={}){const i=$g(n,e,t.custom);let{transition:r=n.getDefaultTransition()||{}}=i||{};t.transitionOverride&&(r=t.transitionOverride);const s=i?()=>Promise.all(aL(n,i,t)):()=>Promise.resolve(),o=n.variantChildren&&n.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:h,staggerDirection:d}=r;return SW(n,e,u+l,h,d,t)}:()=>Promise.resolve(),{when:a}=r;if(a){const[l,u]=a==="beforeChildren"?[s,o]:[o,s];return l().then(()=>u())}else return Promise.all([s(),o(t.delay)])}function SW(n,e,t=0,i=0,r=1,s){const o=[],a=(n.variantChildren.size-1)*i,l=r===1?(u=0)=>u*i:(u=0)=>a-u*i;return Array.from(n.variantChildren).sort(MW).forEach((u,h)=>{u.notify("AnimationStart",e),o.push(k1(u,e,{...s,delay:t+l(h)}).then(()=>u.notify("AnimationComplete",e)))}),Promise.all(o)}function MW(n,e){return n.sortNodePosition(e)}function CW(n,e,t={}){n.notify("AnimationStart",e);let i;if(Array.isArray(e)){const r=e.map(s=>k1(n,s,t));i=Promise.all(r)}else if(typeof e=="string")i=k1(n,e,t);else{const r=typeof e=="function"?$g(n,e,t.custom):e;i=Promise.all(aL(n,r,t))}return i.then(()=>n.notify("AnimationComplete",e))}const EW=[...HA].reverse(),bW=HA.length;function TW(n){return e=>Promise.all(e.map(({animation:t,options:i})=>CW(n,t,i)))}function PW(n){let e=TW(n);const t=RW();let i=!0;const r=(l,u)=>{const h=$g(n,u);if(h){const{transition:d,transitionEnd:p,...m}=h;l={...l,...m,...p}}return l};function s(l){e=l(n)}function o(l,u){const h=n.getProps(),d=n.getVariantContext(!0)||{},p=[],m=new Set;let y={},v=1/0;for(let A=0;Av&&b;const I=Array.isArray(M)?M:[M];let z=I.reduce(r,{});P===!1&&(z={});const{prevResolvedValues:Z={}}=w,J={...Z,...z},W=Q=>{B=!0,m.delete(Q),w.needsAnimating[Q]=!0};for(const Q in J){const re=z[Q],ce=Z[Q];y.hasOwnProperty(Q)||(re!==ce?tg(re)&&tg(ce)?!PR(re,ce)||E?W(Q):w.protectedKeys[Q]=!0:re!==void 0?W(Q):m.add(Q):re!==void 0&&m.has(Q)?W(Q):w.protectedKeys[Q]=!0)}w.prevProp=M,w.prevResolvedValues=z,w.isActive&&(y={...y,...z}),i&&n.blockInitialAnimation&&(B=!1),B&&!R&&p.push(...I.map(Q=>({animation:Q,options:{type:_,...l}})))}if(m.size){const A={};m.forEach(_=>{const w=n.getBaseTarget(_);w!==void 0&&(A[_]=w)}),p.push({animation:A})}let x=!!p.length;return i&&h.initial===!1&&!n.manuallyAnimateOnMount&&(x=!1),i=!1,x?e(p):Promise.resolve()}function a(l,u,h){var d;if(t[l].isActive===u)return Promise.resolve();(d=n.variantChildren)===null||d===void 0||d.forEach(m=>{var y;return(y=m.animationState)===null||y===void 0?void 0:y.setActive(l,u)}),t[l].isActive=u;const p=o(h,l);for(const m in t)t[m].protectedKeys={};return p}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>t}}function BW(n,e){return typeof e=="string"?e!==n:Array.isArray(e)?!PR(e,n):!1}function Pa(n=!1){return{isActive:n,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function RW(){return{animate:Pa(!0),whileInView:Pa(),whileHover:Pa(),whileTap:Pa(),whileDrag:Pa(),whileFocus:Pa(),exit:Pa()}}class LW extends ca{constructor(e){super(e),e.animationState||(e.animationState=PW(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),Kg(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 IW=0;class DW extends ca{constructor(){super(...arguments),this.id=IW++}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 FW={animation:{Feature:LW},exit:{Feature:DW}},Mb=(n,e)=>Math.abs(n-e);function kW(n,e){const t=Mb(n.x,e.x),i=Mb(n.y,e.y);return Math.sqrt(t**2+i**2)}class lL{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 u=zv(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,d=kW(u.offset,{x:0,y:0})>=3;if(!h&&!d)return;const{point:p}=u,{timestamp:m}=Gn;this.history.push({...p,timestamp:m});const{onStart:y,onMove:v}=this.handlers;h||(y&&y(this.lastMoveEvent,u),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,u)},this.handlePointerMove=(u,h)=>{this.lastMoveEvent=u,this.lastMoveEventInfo=Ov(h,this.transformPagePoint),Yt.update(this.updatePoint,!0)},this.handlePointerUp=(u,h)=>{if(this.end(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const{onEnd:d,onSessionEnd:p}=this.handlers,m=zv(u.type==="pointercancel"?this.lastMoveEventInfo:Ov(h,this.transformPagePoint),this.history);this.startEvent&&d&&d(u,m),p&&p(u,m)},!MR(e))return;this.handlers=t,this.transformPagePoint=i;const r=qg(e),s=Ov(r,this.transformPagePoint),{point:o}=s,{timestamp:a}=Gn;this.history=[{...o,timestamp:a}];const{onSessionStart:l}=t;l&&l(e,zv(s,this.history)),this.removeListeners=Go(js(window,"pointermove",this.handlePointerMove),js(window,"pointerup",this.handlePointerUp),js(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),$s(this.updatePoint)}}function Ov(n,e){return e?{point:e(n.point)}:n}function Cb(n,e){return{x:n.x-e.x,y:n.y-e.y}}function zv({point:n},e){return{point:n,delta:Cb(n,cL(e)),offset:Cb(n,NW(e)),velocity:OW(e,.1)}}function NW(n){return n[0]}function cL(n){return n[n.length-1]}function OW(n,e){if(n.length<2)return{x:0,y:0};let t=n.length-1,i=null;const r=cL(n);for(;t>=0&&(i=n[t],!(r.timestamp-i.timestamp>Ho(e)));)t--;if(!i)return{x:0,y:0};const s=Js(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 N1(n,e=0,t=.01){return Math.abs(n-e)<=t}function Eb(n,e,t,i=.5){n.origin=i,n.originPoint=sn(e.min,e.max,n.origin),n.scale=Yi(t)/Yi(e),(N1(n.scale,1,1e-4)||isNaN(n.scale))&&(n.scale=1),n.translate=sn(t.min,t.max,n.origin)-n.originPoint,(N1(n.translate)||isNaN(n.translate))&&(n.translate=0)}function bf(n,e,t,i){Eb(n.x,e.x,t.x,i?i.originX:void 0),Eb(n.y,e.y,t.y,i?i.originY:void 0)}function bb(n,e,t){n.min=t.min+e.min,n.max=n.min+Yi(e)}function zW(n,e,t){bb(n.x,e.x,t.x),bb(n.y,e.y,t.y)}function Tb(n,e,t){n.min=e.min-t.min,n.max=n.min+Yi(e)}function Tf(n,e,t){Tb(n.x,e.x,t.x),Tb(n.y,e.y,t.y)}function UW(n,{min:e,max:t},i){return e!==void 0&&nt&&(n=i?sn(t,n,i.max):Math.min(n,t)),n}function Pb(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 GW(n,{top:e,left:t,bottom:i,right:r}){return{x:Pb(n.x,t,r),y:Pb(n.y,e,i)}}function Bb(n,e){let t=e.min-n.min,i=e.max-n.max;return e.max-e.mini?t=lh(e.min,e.max-i,n.min):i>r&&(t=lh(n.min,n.max-r,e.min)),qo(0,1,t)}function WW(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 O1=.35;function jW(n=O1){return n===!1?n=0:n===!0&&(n=O1),{x:Rb(n,"left","right"),y:Rb(n,"top","bottom")}}function Rb(n,e,t){return{min:Lb(n,e),max:Lb(n,t)}}function Lb(n,e){return typeof n=="number"?n:n[e]||0}const Ib=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ac=()=>({x:Ib(),y:Ib()}),Db=()=>({min:0,max:0}),bn=()=>({x:Db(),y:Db()});function rs(n){return[n("x"),n("y")]}function uL({top:n,left:e,right:t,bottom:i}){return{x:{min:e,max:t},y:{min:n,max:i}}}function JW({x:n,y:e}){return{top:e.min,right:n.max,bottom:e.max,left:n.min}}function XW(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 Uv(n){return n===void 0||n===1}function z1({scale:n,scaleX:e,scaleY:t}){return!Uv(n)||!Uv(e)||!Uv(t)}function Fa(n){return z1(n)||fL(n)||n.z||n.rotate||n.rotateX||n.rotateY}function fL(n){return Fb(n.x)||Fb(n.y)}function Fb(n){return n&&n!=="0%"}function og(n,e,t){const i=n-t,r=e*i;return t+r}function kb(n,e,t,i,r){return r!==void 0&&(n=og(n,r,i)),og(n,t,i)+e}function U1(n,e=0,t=1,i,r){n.min=kb(n.min,e,t,i,r),n.max=kb(n.max,e,t,i,r)}function hL(n,{x:e,y:t}){U1(n.x,e.translate,e.scale,e.originPoint),U1(n.y,t.translate,t.scale,t.originPoint)}function YW(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 Mo(n,e){n.min=n.min+e,n.max=n.max+e}function Ob(n,e,[t,i,r]){const s=e[r]!==void 0?e[r]:.5,o=sn(n.min,n.max,s);U1(n,e[t],e[i],o,e.scale)}const KW=["x","scaleX","originX"],QW=["y","scaleY","originY"];function wc(n,e){Ob(n.x,e,KW),Ob(n.y,e,QW)}function dL(n,e){return uL(XW(n.getBoundingClientRect(),e))}function ZW(n,e,t){const i=dL(n,t),{scroll:r}=e;return r&&(Mo(i.x,r.offset.x),Mo(i.y,r.offset.y)),i}const qW=new WeakMap;class $W{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=bn(),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(qg(l,"page").point)},s=(l,u)=>{const{drag:h,dragPropagation:d,onDragStart:p}=this.getProps();if(h&&!d&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=ER(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),rs(y=>{let v=this.getAxisMotionValue(y).get()||0;if(fs.test(v)){const{projection:x}=this.visualElement;if(x&&x.layout){const A=x.layout.layoutBox[y];A&&(v=Yi(A)*(parseFloat(v)/100))}}this.originPoint[y]=v}),p&&Yt.update(()=>p(l,u),!1,!0);const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},o=(l,u)=>{const{dragPropagation:h,dragDirectionLock:d,onDirectionLock:p,onDrag:m}=this.getProps();if(!h&&!this.openGlobalLock)return;const{offset:y}=u;if(d&&this.currentDirection===null){this.currentDirection=e7(y),this.currentDirection!==null&&p&&p(this.currentDirection);return}this.updateAxis("x",u.point,y),this.updateAxis("y",u.point,y),this.visualElement.render(),m&&m(l,u)},a=(l,u)=>this.stop(l,u);this.panSession=new lL(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&&Yt.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||!Yp(e,r,this.currentDirection))return;const s=this.getAxisMotionValue(e);let o=this.originPoint[e]+i[e];this.constraints&&this.constraints[e]&&(o=UW(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&&xc(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&i?this.constraints=GW(i.layoutBox,e):this.constraints=!1,this.elastic=jW(t),r!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&rs(s=>{this.getAxisMotionValue(s)&&(this.constraints[s]=WW(i.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!xc(e))return!1;const i=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const s=ZW(i,r.root,this.visualElement.getTransformPagePoint());let o=HW(r.layout.layoutBox,s);if(t){const a=t(JW(o));this.hasMutatedConstraints=!!a,a&&(o=uL(a))}return o}startAnimation(e){const{drag:t,dragMomentum:i,dragElastic:r,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=rs(h=>{if(!Yp(h,t,this.currentDirection))return;let d=l&&l[h]||{};o&&(d={min:0,max:0});const p=r?200:1e6,m=r?40:1e7,y={type:"inertia",velocity:i?e[h]:0,bounceStiffness:p,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(h,y)});return Promise.all(u).then(a)}startAxisValueAnimation(e,t){const i=this.getAxisMotionValue(e);return i.start(iw(e,i,0,t))}stopAnimation(){rs(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){rs(t=>{const{drag:i}=this.getProps();if(!Yp(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]-sn(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:i}=this.visualElement;if(!xc(t)||!i||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};rs(o=>{const a=this.getAxisMotionValue(o);if(a){const l=a.get();r[o]=VW({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(),rs(o=>{if(!Yp(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:u}=this.constraints[o];a.set(sn(l,u,r[o]))})}addListeners(){if(!this.visualElement.current)return;qW.set(this.visualElement,this);const e=this.visualElement.current,t=js(e,"pointerdown",l=>{const{drag:u,dragListener:h=!0}=this.getProps();u&&h&&this.start(l)}),i=()=>{const{dragConstraints:l}=this.getProps();xc(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=Hs(window,"resize",()=>this.scalePositionWithinConstraints()),a=r.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(rs(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=O1,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:i,dragPropagation:r,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function Yp(n,e,t){return(e===!0||e===n)&&(t===null||t===n)}function e7(n,e=10){let t=null;return Math.abs(n.y)>e?t="y":Math.abs(n.x)>e&&(t="x"),t}class t7 extends ca{constructor(e){super(e),this.removeGroupControls=gn,this.removeListeners=gn,this.controls=new $W(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||gn}unmount(){this.removeGroupControls(),this.removeListeners()}}const zb=n=>(e,t)=>{n&&Yt.update(()=>n(e,t))};class n7 extends ca{constructor(){super(...arguments),this.removePointerDownListener=gn}onPointerDown(e){this.session=new lL(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:i,onPanEnd:r}=this.node.getProps();return{onSessionStart:zb(e),onStart:zb(t),onMove:i,onEnd:(s,o)=>{delete this.session,r&&Yt.update(()=>r(s,o))}}}mount(){this.removePointerDownListener=js(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 i7(){const n=U.useContext(GA);if(n===null)return[!0,null];const{isPresent:e,onExitComplete:t,register:i}=n,r=U.useId();return U.useEffect(()=>i(r),[]),!e&&t?[!1,()=>t&&t(r)]:[!0]}const vm={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Ub(n,e){return e.max===e.min?0:n/(e.max-e.min)*100}const sf={correct:(n,e)=>{if(!e.target)return n;if(typeof n=="string")if(st.test(n))n=parseFloat(n);else return n;const t=Ub(n,e.target.x),i=Ub(n,e.target.y);return`${t}% ${i}%`}},r7={correct:(n,{treeScale:e,projectionDelta:t})=>{const i=n,r=$o.parse(n);if(r.length>5)return i;const s=$o.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 u=sn(a,l,.5);return typeof r[2+o]=="number"&&(r[2+o]/=u),typeof r[3+o]=="number"&&(r[3+o]/=u),s(r)}};class s7 extends gr.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:i,layoutId:r}=this.props,{projection:s}=e;f8(o7),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()})),vm.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()||Yt.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),queueMicrotask(()=>{!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 pL(n){const[e,t]=i7(),i=U.useContext(cR);return gr.createElement(s7,{...n,layoutGroup:i,switchLayoutGroup:U.useContext(uR),isPresent:e,safeToRemove:t})}const o7={borderRadius:{...sf,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:sf,borderTopRightRadius:sf,borderBottomLeftRadius:sf,borderBottomRightRadius:sf,boxShadow:r7},mL=["TopLeft","TopRight","BottomLeft","BottomRight"],a7=mL.length,Gb=n=>typeof n=="string"?parseFloat(n):n,Hb=n=>typeof n=="number"||st.test(n);function l7(n,e,t,i,r,s){r?(n.opacity=sn(0,t.opacity!==void 0?t.opacity:1,c7(i)),n.opacityExit=sn(e.opacity!==void 0?e.opacity:1,0,u7(i))):s&&(n.opacity=sn(e.opacity!==void 0?e.opacity:1,t.opacity!==void 0?t.opacity:1,i));for(let o=0;oie?1:t(lh(n,e,i))}function Wb(n,e){n.min=e.min,n.max=e.max}function lr(n,e){Wb(n.x,e.x),Wb(n.y,e.y)}function jb(n,e,t,i,r){return n-=e,n=og(n,1/t,i),r!==void 0&&(n=og(n,1/r,i)),n}function f7(n,e=0,t=1,i=.5,r,s=n,o=n){if(fs.test(e)&&(e=parseFloat(e),e=sn(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=sn(s.min,s.max,i);n===s&&(a-=e),n.min=jb(n.min,e,t,a,r),n.max=jb(n.max,e,t,a,r)}function Jb(n,e,[t,i,r],s,o){f7(n,e[t],e[i],e[r],e.scale,s,o)}const h7=["x","scaleX","originX"],d7=["y","scaleY","originY"];function Xb(n,e,t,i){Jb(n.x,e,h7,t?t.x:void 0,i?i.x:void 0),Jb(n.y,e,d7,t?t.y:void 0,i?i.y:void 0)}function Yb(n){return n.translate===0&&n.scale===1}function yL(n){return Yb(n.x)&&Yb(n.y)}function p7(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 vL(n,e){return Math.round(n.x.min)===Math.round(e.x.min)&&Math.round(n.x.max)===Math.round(e.x.max)&&Math.round(n.y.min)===Math.round(e.y.min)&&Math.round(n.y.max)===Math.round(e.y.max)}function Kb(n){return Yi(n.x)/Yi(n.y)}class m7{constructor(){this.members=[]}add(e){rw(this.members,e),e.scheduleRender()}remove(e){if(sw(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 Qb(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:u,rotateY:h}=t;l&&(i+=`rotate(${l}deg) `),u&&(i+=`rotateX(${u}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 g7=(n,e)=>n.depth-e.depth;class y7{constructor(){this.children=[],this.isDirty=!1}add(e){rw(this.children,e),this.isDirty=!0}remove(e){sw(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(g7),this.isDirty=!1,this.children.forEach(e)}}function v7(n,e){const t=performance.now(),i=({timestamp:r})=>{const s=r-t;s>=e&&($s(i),n(s-e))};return Yt.read(i,!0),()=>$s(i)}function x7(n){window.MotionDebug&&window.MotionDebug.record(n)}function _7(n){return n instanceof SVGElement&&n.tagName!=="svg"}function A7(n,e,t){const i=Ii(n)?n:Zc(n);return i.start(iw("",i,e,t)),i.animation}const Zb=["","X","Y","Z"],qb=1e3;let w7=0;const ka={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function xL({attachResizeListener:n,defaultParent:e,measureScroll:t,checkIsScrollRoot:i,resetTransform:r}){return class{constructor(o={},a=e==null?void 0:e()){this.id=w7++,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.hasTreeAnimated=!1,this.updateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{ka.totalNodes=ka.resolvedTargetDeltas=ka.recalculatedProjection=0,this.nodes.forEach(C7),this.nodes.forEach(B7),this.nodes.forEach(R7),this.nodes.forEach(E7),x7(ka)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;lthis.root.updateBlockedByResize=!1;n(o,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=v7(p,250),vm.hasAnimatedSinceResize&&(vm.hasAnimatedSinceResize=!1,this.nodes.forEach(eT))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&h&&(l||u)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:p,hasRelativeTargetChanged:m,layout:y})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||h.getDefaultTransition()||k7,{onLayoutAnimationStart:x,onLayoutAnimationComplete:A}=h.getProps(),_=!this.targetLayout||!vL(this.targetLayout,y)||m,w=!p&&m;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||w||p&&(_||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,w);const M={...iL(v,"layout"),onPlay:x,onComplete:A};(h.shouldReduceMotion||this.options.layoutRoot)&&(M.delay=0,M.type=!1),this.startAnimation(M)}else p||eT(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,$s(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(L7),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let h=0;hthis.update()))}clearAllSnapshots(){this.nodes.forEach(b7),this.sharedNodes.forEach(I7)}scheduleUpdateProjection(){Yt.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){Yt.postRender(()=>{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=M/1e3;tT(d.x,o.x,b),tT(d.y,o.y,b),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Tf(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),D7(this.relativeTarget,this.relativeTargetOrigin,p,b),w&&p7(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=bn()),lr(w,this.relativeTarget)),v&&(this.animationValues=h,l7(h,u,this.latestValues,b,_,A)),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&&($s(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Yt.update(()=>{vm.hasAnimatedSinceResize=!0,this.currentAnimation=A7(0,qb,{...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(qb),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:h}=o;if(!(!a||!l||!u)){if(this!==o&&this.layout&&u&&_L(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||bn();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}lr(a,l),wc(a,h),bf(this.projectionDeltaWithTransform,this.layoutCorrected,a,h)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new m7),this.sharedNodes.get(o).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.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 u=this.getStack();u&&u.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 u={};for(let h=0;h{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach($b),this.root.sharedNodes.clear()}}}function S7(n){n.updateLayout()}function M7(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"?rs(d=>{const p=o?t.measuredBox[d]:t.layoutBox[d],m=Yi(p);p.min=i[d].min,p.max=p.min+m}):_L(s,t.layoutBox,i)&&rs(d=>{const p=o?t.measuredBox[d]:t.layoutBox[d],m=Yi(i[d]);p.max=p.min+m,n.relativeTarget&&!n.currentAnimation&&(n.isProjectionDirty=!0,n.relativeTarget[d].max=n.relativeTarget[d].min+m)});const a=Ac();bf(a,i,t.layoutBox);const l=Ac();o?bf(l,n.applyTransform(r,!0),t.measuredBox):bf(l,i,t.layoutBox);const u=!yL(a);let h=!1;if(!n.resumeFrom){const d=n.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:p,layout:m}=d;if(p&&m){const y=bn();Tf(y,t.layoutBox,p.layoutBox);const v=bn();Tf(v,i,m.layoutBox),vL(y,v)||(h=!0),d.options.layoutRoot&&(n.relativeTarget=v,n.relativeTargetOrigin=y,n.relativeParent=d)}}}n.notifyListeners("didUpdate",{layout:i,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeTargetChanged:h})}else if(n.isLead()){const{onExitComplete:i}=n.options;i&&i()}n.options.transition=void 0}function C7(n){ka.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 E7(n){n.isProjectionDirty=n.isSharedProjectionDirty=n.isTransformDirty=!1}function b7(n){n.clearSnapshot()}function $b(n){n.clearMeasurements()}function T7(n){n.isLayoutDirty=!1}function P7(n){const{visualElement:e}=n.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),n.resetTransform()}function eT(n){n.finishAnimation(),n.targetDelta=n.relativeTarget=n.target=void 0,n.isProjectionDirty=!0}function B7(n){n.resolveTargetDelta()}function R7(n){n.calcProjection()}function L7(n){n.resetRotation()}function I7(n){n.removeLeadSnapshot()}function tT(n,e,t){n.translate=sn(e.translate,0,t),n.scale=sn(e.scale,1,t),n.origin=e.origin,n.originPoint=e.originPoint}function nT(n,e,t,i){n.min=sn(e.min,t.min,i),n.max=sn(e.max,t.max,i)}function D7(n,e,t,i){nT(n.x,e.x,t.x,i),nT(n.y,e.y,t.y,i)}function F7(n){return n.animationValues&&n.animationValues.opacityExit!==void 0}const k7={duration:.45,ease:[.4,0,.1,1]},iT=n=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(n),rT=iT("applewebkit/")&&!iT("chrome/")?Math.round:gn;function sT(n){n.min=rT(n.min),n.max=rT(n.max)}function N7(n){sT(n.x),sT(n.y)}function _L(n,e,t){return n==="position"||n==="preserve-aspect"&&!N1(Kb(e),Kb(t),.2)}const O7=xL({attachResizeListener:(n,e)=>Hs(n,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Gv={current:void 0},AL=xL({measureScroll:n=>({x:n.scrollLeft,y:n.scrollTop}),defaultParent:()=>{if(!Gv.current){const n=new O7({});n.mount(window),n.setOptions({layoutScroll:!0}),Gv.current=n}return Gv.current},resetTransform:(n,e)=>{n.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:n=>window.getComputedStyle(n).position==="fixed"}),z7={pan:{Feature:n7},drag:{Feature:t7,ProjectionNode:AL,MeasureLayout:pL}},U7=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function G7(n){const e=U7.exec(n);if(!e)return[,];const[,t,i]=e;return[t,i]}function G1(n,e,t=1){const[i,r]=G7(n);if(!i)return;const s=window.getComputedStyle(e).getPropertyValue(i);if(s){const o=s.trim();return rL(o)?parseFloat(o):o}else return B1(r)?G1(r,e,t+1):r}function H7(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(!B1(s))return;const o=G1(s,i);o&&r.set(o)});for(const r in e){const s=e[r];if(!B1(s))continue;const o=G1(s,i);o&&(e[r]=o,t||(t={}),t[r]===void 0&&(t[r]=s))}return{target:e,transitionEnd:t}}const V7=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),wL=n=>V7.has(n),W7=n=>Object.keys(n).some(wL),oT=n=>n===Al||n===st,aT=(n,e)=>parseFloat(n.split(", ")[e]),lT=(n,e)=>(t,{transform:i})=>{if(i==="none"||!i)return 0;const r=i.match(/^matrix3d\((.+)\)$/);if(r)return aT(r[1],e);{const s=i.match(/^matrix\((.+)\)$/);return s?aT(s[1],n):0}},j7=new Set(["x","y","z"]),J7=Oh.filter(n=>!j7.has(n));function X7(n){const e=[];return J7.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 qc={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:lT(4,13),y:lT(5,14)};qc.translateX=qc.x;qc.translateY=qc.y;const Y7=(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(u=>{a[u]=qc[u](i,s)}),e.render();const l=e.measureViewportBox();return t.forEach(u=>{const h=e.getValue(u);h&&h.jump(a[u]),n[u]=qc[u](l,s)}),n},K7=(n,e,t={},i={})=>{e={...e},i={...i};const r=Object.keys(e).filter(wL);let s=[],o=!1;const a=[];if(r.forEach(l=>{const u=n.getValue(l);if(!n.hasValue(l))return;let h=t[l],d=rf(h);const p=e[l];let m;if(tg(p)){const y=p.length,v=p[0]===null?1:0;h=p[v],d=rf(h);for(let x=v;x=0?window.pageYOffset:null,u=Y7(e,n,a);return s.length&&s.forEach(([h,d])=>{n.getValue(h).set(d)}),n.render(),Yg&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:i}}else return{target:e,transitionEnd:i}};function Q7(n,e,t,i){return W7(e)?K7(n,e,t,i):{target:e,transitionEnd:i}}const Z7=(n,e,t,i)=>{const r=H7(n,e,i);return e=r.target,i=r.transitionEnd,Q7(n,e,t,i)},H1={current:null},SL={current:!1};function q7(){if(SL.current=!0,!!Yg)if(window.matchMedia){const n=window.matchMedia("(prefers-reduced-motion)"),e=()=>H1.current=n.matches;n.addListener(e),e()}else H1.current=!1}function $7(n,e,t){const{willChange:i}=e;for(const r in e){const s=e[r],o=t[r];if(Ii(s))n.addValue(r,s),sg(i)&&i.add(r);else if(Ii(o))n.addValue(r,Zc(s,{owner:n})),sg(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,Zc(a!==void 0?a:s,{owner:n}))}}for(const r in t)e[r]===void 0&&n.removeValue(r);return e}const cT=new WeakMap,ML=Object.keys(ah),ej=ML.length,uT=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],tj=VA.length;class nj{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=()=>Yt.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=Qg(t),this.isVariantNode=lR(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...h}=this.scrapeMotionValuesFromProps(t,{});for(const d in h){const p=h[d];a[d]!==void 0&&Ii(p)&&(p.set(a[d],!1),sg(u)&&u.add(d))}}scrapeMotionValuesFromProps(e,t){return{}}mount(e){this.current=e,cT.set(e,this),this.projection&&!this.projection.instance&&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)),SL.current||q7(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:H1.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){cT.delete(this.current),this.projection&&this.projection.unmount(),$s(this.notifyUpdate),$s(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=_l.has(e),r=t.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&Yt.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){let o,a;for(let l=0;lthis.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:s,layoutScroll:p,layoutRoot:m})}return a}updateFeatures(){for(const e in this.features){const t=this.features[e];t.isMounted?t.update():(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):bn()}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=Zc(t,{owner:this}),this.addValue(e,i)),i}readValue(e){var t;return this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(t=this.getBaseTargetFromProps(this.props,e))!==null&&t!==void 0?t: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=ZA(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&&!Ii(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 ow),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class CL extends nj{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=AW(i,e||{},this);if(r&&(t&&(t=r(t)),i&&(i=r(i)),o&&(o=r(o))),s){xW(this,i,o);const a=Z7(this,i,o,t);t=a.transitionEnd,i=a.target}return{transition:e,transitionEnd:t,...i}}}function ij(n){return window.getComputedStyle(n)}class rj extends CL{readValueFromInstance(e,t){if(_l.has(t)){const i=nw(t);return i&&i.default||0}else{const i=ij(e),r=(dR(t)?i.getPropertyValue(t):i[t])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return dL(e,t)}build(e,t,i,r){jA(e,t,i,r.transformTemplate)}scrapeMotionValuesFromProps(e,t){return QA(e,t)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Ii(e)&&(this.childSubscription=e.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}renderInstance(e,t,i,r){xR(e,t,i,r)}}class sj extends CL{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(_l.has(t)){const i=nw(t);return i&&i.default||0}return t=_R.has(t)?t:KA(t),e.getAttribute(t)}measureInstanceViewportBox(){return bn()}scrapeMotionValuesFromProps(e,t){return wR(e,t)}build(e,t,i,r){XA(e,t,i,this.isSVGTag,r.transformTemplate)}renderInstance(e,t,i,r){AR(e,t,i,r)}mount(e){this.isSVGTag=YA(e.tagName),super.mount(e)}}const oj=(n,e)=>WA(n)?new sj(e,{enableHardwareAcceleration:!1}):new rj(e,{enableHardwareAcceleration:!0}),aj={layout:{ProjectionNode:AL,MeasureLayout:pL}},lj={...FW,...tV,...z7,...aj},Ki=c8((n,e)=>H8(n,e,lj,oj)),wn={paddingX:"sm:px-4 px-6",paddingY:"sm:py-16 py-6",padding:"sm:px-16 px-6 sm:py-16 py-10",heroHeadText:"font-black text-white lg:text-[80px] sm:text-[50px] xs:text-[40px] text-[40px] mt-2",heroSubText:"text-[#dfd9ff] font-medium lg:text-[30px] sm:text-[26px] xs:text-[20px] text-[16px]",sectionHeadText:"text-white font-black md:text-[60px] sm:text-[50px] xs:text-[40px] text-[30px]",sectionSubText:"sm:text-[18px] text-[14px] text-secondary uppercase tracking-wider"},cj=({strings:n=["Put your strings here...","and Enjoy!"],typeSpeed:e=100,backSpeed:t=50,backDelay:i=500,startDelay:r=500,cursorChar:s="|",placeholder:o=!1,showCursor:a=!0,disableBackTyping:l=!1,onFinished:u=function(){},loop:h=!0})=>({strings:n,typeSpeed:e,backSpeed:t,cursorChar:s,backDelay:i,placeholder:o,startDelay:r,showCursor:a,loop:h,disableBackTyping:l,onFinished:u}),uj=(n,e)=>{let t=0,i,r;const s=(p,m)=>{t===i&&m.loop&&(t=0),setTimeout(()=>{o(p[t],m)},m.startDelay)},o=(p,m)=>{let y=0,v=p.length,x=setInterval(()=>{if(m.placeholder?n.placeholder+=p[y]:n.textContent+=p[y],++y===v)return a(x,m)},m.typeSpeed)},a=(p,m)=>{if(clearInterval(p),m.disableBackTyping&&t===i-1||!m.loop&&t===i-1)return m.onFinished();setTimeout(()=>l(m),m.backDelay)},l=p=>{let m=p.placeholder?n.placeholder:n.textContent,y=m.length,v=setInterval(()=>{if(p.placeholder?n.placeholder=n.placeholder.substr(0,--y):n.textContent=m.substr(0,--y),y===0)return u(v,p)},p.backSpeed)},u=(p,m)=>{clearInterval(p),++t,s(r,m)},h=(p,m)=>{let y=document.createElement("span");y.classList.add("ityped-cursor"),y.textContent="|",y.textContent=m.cursorChar,p.insertAdjacentElement("afterend",y)};return(p=>{let m=cj(p||{}),y=m.strings;r=y,i=y.length,typeof n=="string"&&(n=document.querySelector(n)),m.showCursor&&h(n,m),s(y,m)})(e)};var EL={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},fT=gr.createContext&&gr.createContext(EL),Vo=globalThis&&globalThis.__assign||function(){return Vo=Object.assign||function(n){for(var e,t=1,i=arguments.length;t{const n=U.useRef();return U.useEffect(()=>{uj(n.current,{showCursor:!0,strings:[" SDE at BNY ","Zonal Level TT Player "," Mentor "," Content Writer ","Software Developer "," Tech Enthusiast "]})},[]),Xe("section",{className:"relative w-full h-screen mx-auto",children:[Xe("div",{className:"flex",children:[Xe("div",{className:`head1 absolute max-w-7xl mx-auto ${wn.paddingX} flex flex-row items-start gap-5`,children:[Xe("div",{className:"flex flex-col justify-center items-center mt-5",children:[ee("div",{className:"w-5 h-5 rounded-full bg-[#915EFF]"}),ee("div",{className:"w-1 sm:h-90 h-40 violet-gradient"})]}),Xe("div",{className:"head2",children:[Xe("h1",{className:`${wn.heroHeadText} text-white`,children:["Hii there, I'm ",ee("p",{className:"name text-[#915EFF]",children:"Aarti Rathi"})]}),ee("h3",{children:ee("span",{ref:n,className:`${wn.heroSubText} mt-2 green-text-gradient`})}),Xe("div",{className:"absolute link1",children:[ee("a",{href:"https://github.com/shinchancode",target:"_blank",children:ee(pj,{})}),ee("a",{href:"https://www.linkedin.com/in/aarti-rathi-a6031814b/",target:"_blank",children:ee(yj,{})}),ee("a",{href:"https://www.instagram.com/aarti.rathiii",target:"_blank",children:ee(gj,{})}),ee("a",{href:"https://linktr.ee/rathi17",target:"_blank",children:ee(xj,{})})]})]})]}),ee("div",{className:"imgcontainer1 absolute violet-gradient",children:ee("img",{src:Aj,alt:"",className:"object-contain"})})]}),ee(W6,{}),ee("div",{className:"absolute xs:bottom-2 bottom-6 w-10 flex justify-end items-center",children:ee("a",{href:"#education",children:ee("div",{className:"w-[35px] h-[64px] rounded-3xl border-4 border-secondary flex justify-center items-start p-2",children:ee(Ki.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-1"})})})})]})};const eJ=()=>{const[n,e]=U.useState(""),[t,i]=U.useState(!1);return U.useEffect(()=>{const r=()=>{window.scrollY>100?i(!0):i(!1)};return window.addEventListener("scroll",r),()=>window.removeEventListener("scroll",r)},[]),ee("nav",{className:`${wn.paddingX} w-full flex items-center py-3 fixed top-0 z-20 ${t?"bg-primary":"bg-transparent"}`,children:Xe("div",{className:"w-full flex justify-between items-center max-w-7xl mx-auto",children:[Xe(Ck,{to:"/",className:"flex items-center gap-2",onClick:()=>{e(""),window.scrollTo(0,0)},children:[ee("img",{src:_j,alt:"logo",className:"w-9 h-9 object-contain logo"}),ee("p",{className:"sm:block text-white text-[18px] font-bold cursor-pointer flex ",children:"aarti.rathi"})]}),ee("div",{className:"sm:flex gap-5",children:ee("div",{className:"top2 text-secondary hover:text-white text-[15px] font-medium cursor-pointer",children:ee("a",{href:"https://drive.google.com/drive/folders/13YGuvdkXQdyFzfuJd3YdUaG99dhCPz22?pli=1",target:"_blank",children:"Resume"})})})]})})},hu=n=>({show:{y:0,opacity:1,transition:{type:"spring",duration:1.25,delay:n}}}),aw=(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"}}}),dT=(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"}}}),tJ=(n,e)=>({hidden:{},show:{transition:{staggerChildren:n,delayChildren:e||0}}}),wl=(n,e)=>function(){return Xe(Ki.section,{variants:tJ(),initial:"hidden",whileInView:"show",viewport:{once:!0,amount:.25},className:`${wn.padding} max-w-7xl mx-auto relative z-0`,children:[ee("span",{className:"hash-span",id:e,children:" "}),ee(n,{})]})},nJ=[{link:"https://auth.geeksforgeeks.org/user/aarti_rathi",icon:"https://img.icons8.com/color/344/GeeksforGeeks.png"},{link:"https://www.coursera.org/account/accomplishments/specialization/7V2SFZ9YWWRL",icon:"https://img.icons8.com/fluency/344/google-cloud.png"},{link:"https://www.qwiklabs.com/public_profiles/48dcd029-03b4-437b-9dd3-ef7d65958eb0",icon:"https://img.icons8.com/external-tal-revivo-color-tal-revivo/344/external-qwiklabs-provides-real-cloud-environments-that-help-developers-logo-color-tal-revivo.png"},{link:"https://www.hackerrank.com/_shinchancode",icon:"https://img.icons8.com/external-tal-revivo-color-tal-revivo/344/external-hackerrank-is-a-technology-company-that-focuses-on-competitive-programming-logo-color-tal-revivo.png"},{link:"https://dev.to/shinchancode",icon:TL},{link:"https://www.holopin.io/@shinchancode#badges",icon:Lj}],iJ=[{title:"Table Tennis winner at BNY : Secured first position for Singles, Women doubles and Mixed doubles (2024)."},{title:"8th Position : Selected for the final round of 12th CSI InApp International Student Project awards 2023."},{title:"State level Table-Tennis Winner (2021 and 2022)."},{title:"1st Position : Consecutive four times Winner of UdChalo Scholarship (2019 - 2023)."},{title:"Branch Head of Information Technology Department (2021 - 2022)."},{title:"Selected in top 100 candidates for Google Cloud Training among 20k Students (2021)."},{title:"Got Education Scholarship Scheme for Army Personnel(ESSA) Scholarship for securing 90+ % (2015 - 2023)."},{title:"Played Nationals in Throwball for U-14 category. (2015)."}],rJ=[{name:"HTML 5",icon:Ej},{name:"CSS 3",icon:Mj},{name:"JavaScript",icon:bj},{name:"Bootstrap",icon:"https://img.icons8.com/color/480/000000/bootstrap.png"},{name:"Google Cloud",icon:"https://img.icons8.com/color/480/000000/google-cloud.png"},{name:"C++ tool",icon:"https://img.icons8.com/color/480/000000/c-plus-plus-logo.png"},{name:"React JS",icon:Bj},{name:"Tailwind CSS",icon:Rj},{name:"Node JS",icon:Pj},{name:"MongoDB",icon:Tj},{name:"git",icon:Cj},{name:"MySql",icon:"https://img.icons8.com/color/480/000000/mysql-logo.png"}],sJ=[{id:"java",title:"Java"},{id:"c++",title:"C++"},{id:"web",title:"Web Dev"},{id:"other",title:"Other"}],oJ=[{name:"Cryptography",description:"The project is based on a cryptography technique that uses Double layer encryption and decryption using Armstrong numbers and RGB color-based mappings for various types of file format. The idea is inspired from a research paper.",tags:[{name:"cryptography",color:"blue-text-gradient"},{name:"security",color:"green-text-gradient"},{name:"java",color:"pink-text-gradient"}],image:Fj,source_link:"https://github.com/shinchancode/Cryptography",source_code_link:"https://github.com/shinchancode/Cryptography"},{name:"Snake Yaml",description:"Created a simple Maven project, a YAML file and write student data in it. As the request is made, crud should be performed in real time . (Hint: Used SnakeYAML library and add dependency in pom)",tags:[{name:"yaml",color:"blue-text-gradient"},{name:"springboot",color:"green-text-gradient"},{name:"postman",color:"pink-text-gradient"}],image:Uj,source_link:"https://github.com/shinchancode/Snake-Yaml-Project",source_code_link:"https://github.com/shinchancode/Snake-Yaml-Project"},{name:"CRUD operations",description:"Built a java based application to allow user to create, read, update and delete Entities. Spring Boot provides an interface called CrudRepository that contains methods for CRUD operations.",tags:[{name:"java",color:"blue-text-gradient"},{name:"springboot",color:"green-text-gradient"},{name:"crud",color:"pink-text-gradient"}],image:Nj,source_link:"https://github.com/shinchancode/CRUD-Operation",source_code_link:"https://github.com/shinchancode/CRUD-Operation"},{name:"Byte-Array-to-File",description:"Built a java project where we input a file using byte array, store it on local system. In order to convert a byte array to a file, we will be using a method named the getBytes() method of String class.",tags:[{name:"java",color:"blue-text-gradient"},{name:"byteArray",color:"green-text-gradient"},{name:"file",color:"pink-text-gradient"}],image:Oj,source_link:"https://github.com/shinchancode/byte-array-to-file",source_code_link:"https://github.com/shinchancode/byte-array-to-file"},{name:"Spring Boot One To Many",description:"Implemented Spring Boot One-To-Many mapping with Hibernate in a Spring Boot CRUD using @OnetoMany annotation. Mapping between two entities and used a MySQL database to store and retrieve the data.",tags:[{name:"onetomany",color:"blue-text-gradient"},{name:"springbott",color:"green-text-gradient"},{name:"crud",color:"pink-text-gradient"}],image:zj,source_link:"https://github.com/shinchancode/oneTomany-springboot",source_code_link:"https://github.com/shinchancode/oneTomany-springboot"},{name:"OOP Lab",description:"These projects contain object oriented programming primary concepts and its code in Java language. Topics like : Inheritence, Constructor, Virtual function, Interface, Exception Handling, Generic Programming and File Handling etc.",tags:[{name:"java",color:"blue-text-gradient"},{name:"oop",color:"green-text-gradient"},{name:"coding",color:"pink-text-gradient"}],image:kj,source_link:"https://github.com/shinchancode/Object-Oriented-Programming-Lab",source_code_link:"https://github.com/shinchancode/Object-Oriented-Programming-Lab"}],pT=[{name:"Spell Checker",description:"Trie data structure implementation used as a dictionary, where customer details are checked, searched, inserted and removed. Using Trie, search complexities can be brought to optimal limit (key length)",tags:[{name:"C++",color:"blue-text-gradient"},{name:"trie",color:"green-text-gradient"},{name:"dictionary",color:"pink-text-gradient"}],image:Gj,source_link:"https://github.com/shinchancode/Trie-Data-structure",source_code_link:"https://github.com/shinchancode/Trie-Data-structure"},{name:"DSA Lab",description:"These projects contain data structure and algorithms primary concepts and its code in C++ language. Topics like : Linked List, Stack, Queue, Circular Queue, Binary Tree, Binary Search Tree, Expression Tree, Threaded Binary Tree, and Heap Sort etc.",tags:[{name:"DSA",color:"blue-text-gradient"},{name:"C++",color:"green-text-gradient"},{name:"semester",color:"pink-text-gradient"}],image:Hj,source_link:"https://github.com/shinchancode/Data-Structure-Algorithms",source_code_link:"https://github.com/shinchancode/Data-Structure-Algorithms/"},{name:"Computer Graphics Lab",description:"These projects contain computer graphics topics like : Line Drawing Algorithm (DDA and Bresenham), Bresenham circle drawing, Polygon filling, 2D transformation, Cohen Sutherland polygon clipping and Bezier curve.",tags:[{name:"computergraphics",color:"blue-text-gradient"},{name:"C++",color:"green-text-gradient"},{name:"semester",color:"pink-text-gradient"}],image:Vj,source_link:"https://github.com/shinchancode/Computer-Graphics",source_code_link:"https://github.com/shinchancode/Computer-Graphics"}],aJ=[{name:"3D React Portfolio",description:"Created an impressive website made using React with 3D graphics and animations to bring their content to life. Responsive webpage is made with user friendly interface",tags:[{name:"TailwindCSS",color:"blue-text-gradient"},{name:"ThreeJS",color:"green-text-gradient"},{name:"3d_react",color:"pink-text-gradient"}],image:Wj,source_link:"https://shinchancode.github.io/3d-react-portfolio/",source_code_link:"https://github.com/shinchancode/3d-react-portfolio"},{name:"React portfolio",description:"Website made using React in the FrontEnd, Nodejs and Express in the BackEnd. Responsive webpage is made with user friendly interface",tags:[{name:"nodejs",color:"blue-text-gradient"},{name:"React",color:"green-text-gradient"},{name:"html css",color:"pink-text-gradient"}],image:Yj,source_link:"https://shinchancode.github.io/React-Portfolio/",source_code_link:"https://github.com/shinchancode/React-Portfolio"},{name:"30 Days of JavaScript",description:"Website made using Nodejs and Express in the BackEnd. A 30 Days Of JavaScript challenge to learn JavaScript by making 30 different projects using some famous JavaScript libraries.",tags:[{name:"JavaScript",color:"blue-text-gradient"},{name:"30dayschallenge",color:"green-text-gradient"},{name:"css",color:"pink-text-gradient"}],image:jj,source_link:"https://rathi-30-days-of-javascript.onrender.com/",source_code_link:"https://github.com/shinchancode/30-Days-of-Javascript"},{name:"Chit Chat Application",description:"Real-Time, event based communication in Nodejs and browser-based Chat application. Uses Socket.io for implementation for WebSockets protocol. This application built using Node.js, Express, Socket.io and Render (Hosting)",tags:[{name:"Chatting",color:"blue-text-gradient"},{name:"socket.io",color:"green-text-gradient"},{name:"JavaScript",color:"pink-text-gradient"}],image:Xj,source_link:"https://chit-chat-app.onrender.com/",source_code_link:"https://github.com/shinchancode/Chit-Chat-Real_time_chat_app"},{name:"Notes Application",description:"A web-based notes app made by using javaScript, This web-based notes app having functionalities like Drag and drop, Search notes etc.",tags:[{name:"notes",color:"blue-text-gradient"},{name:"bootstrap",color:"green-text-gradient"},{name:"css",color:"pink-text-gradient"}],image:Jj,source_link:"https://shinchancode.github.io/Notes-App/",source_code_link:"https://github.com/shinchancode/Notes-App"}],lJ=[{name:"Multilingual Multiple Choice Question Generation",description:"Final Year Project : Its a low level and high level model where we automate the process of creating objective question assessment using LSTM(at low level) and Transformer(at high level) models for multiple languages.",tags:[{name:"machine learning",color:"blue-text-gradient"},{name:"multilingual",color:"green-text-gradient"},{name:"BE_Project",color:"pink-text-gradient"}],image:Kj,source_link:"https://drive.google.com/drive/folders/1LECu5ENk_zsowbPeRN_R1V8Rf2Gp7N6l",source_code_link:"https://github.com/shinchancode/Final-Year-Project"},{name:"DBMS Lab",description:"Semester 4 : DBMS Lab. Topics included: ER/EER Diagram, DDL statements, primary key and foreign key constraint., SQL queries with different functions, Views, PL/SQL, Trigger (Row level and statement level) and cursor.",tags:[{name:"MySql",color:"blue-text-gradient"},{name:"dbms",color:"green-text-gradient"},{name:"semester",color:"pink-text-gradient"}],image:Qj,source_link:"https://github.com/shinchancode/DBMS-SQL-Lab",source_code_link:"https://github.com/shinchancode/DBMS-SQL-Lab"},{name:"SQL : Library Management System",description:"Semester 4 : DBMS Mini Project. Created a library management system using SQL and different functionalities.",tags:[{name:"sql",color:"blue-text-gradient"},{name:"management",color:"green-text-gradient"},{name:"miniproject",color:"pink-text-gradient"}],image:Zj,source_link:"https://github.com/shinchancode/Mini-Project-SQL-LibraryManagement",source_code_link:"https://github.com/shinchancode/Mini-Project-SQL-LibraryManagement"},{name:"Pyhton : Snake and Ladder",description:"Snake and Ladder game using python language. A simple command line interface snake and ladder game",tags:[{name:"snake and ladder",color:"blue-text-gradient"},{name:"python",color:"green-text-gradient"},{name:"CLI",color:"pink-text-gradient"}],image:qj,source_link:"https://github.com/shinchancode/MINI_PROJECT-Snake-and-Ladder",source_code_link:"https://github.com/shinchancode/MINI_PROJECT-Snake-and-Ladder"}],cJ=[{title:"Software Devloper",company_name:"Bank of New York Mellon",icon:Ij,iconBg:"#383E56",date:"Aug 2023 - Present",link:"",points:["Software build is now used internally in the company and by the company’s clients for operating Netx360 and Netx360+.","Resolved more than 50+ Software Composition Analysis (SCA) and vulnerabilities issues.","Adapted Agile methodologies, CI/CD, and Test-Driven Programming to uphold strong programming practices.","Using technologies like Java, SpringBoot, C#, .NET and AngularJS."],link:"https://drive.google.com/drive/folders/13FK-YewFDv8ALmzKglPBmb6Z3oenuYoP"},{title:"Research Intern",company_name:"National Security Council Secretriat",icon:"https://img.icons8.com/external-flaticons-lineal-color-flat-icons/64/null/external-national-security-agency-crowdfunding-flaticons-lineal-color-flat-icons-2.png",iconBg:"#383E56",date:"Mar 2022 - Oct 2023",link:"",points:["Creating a system for secure fine-grained next-generation access control and authorization of digital assets and operations using policy based cryptosystem.","Collaborating with cross-functional technologies like spring boot, react etc. to integrate high-quality products.","Participating in code reviews and providing constructive feedback to other developers."],link:"https://github.com/codewithrathi"},{title:"DSA Mentor",company_name:"GeeksforGeeks (Intern)",icon:"https://img.icons8.com/color/344/GeeksforGeeks.png",iconBg:"#E6DEDD",date:"May 2022 - Apr 2023",link:"",points:["Teaching Assistant : Teaching Assistant for online batches of Data Structures, Algorithms, and Competitive programming with an average rating of 4.9*.","Responsible for reviewing and writing articles based on Data Structures and Algorithms."],link:"https://drive.google.com/drive/folders/1efpnfKpRTvtujtSgHwRIJdrMFiWrBFHt"},{title:"Technical Content Writer",company_name:"GeeksforGeeks",icon:"https://img.icons8.com/color/344/GeeksforGeeks.png",iconBg:"#383E56",date:"Dec 2020 - July 2022",link:"",points:["Creative and experienced content writer with 2+ years of experience.","Attracted over 10000+ visitors to the company website with powerful educational content.","Wrote 100+ articles and improved 300+ articles on topics like Data Structures, Algorithms, Mathematics and related engineering topics"],link:"https://auth.geeksforgeeks.org/user/_shinchancode"},{title:"Google Cloud Training",company_name:"Google Cloud",icon:"https://img.icons8.com/fluency/344/google-cloud.png",iconBg:"#E6DEDD",date:"Jan 2021 - Apr 2021",link:"",points:["Introduction to GCP and more functionalities with free access to quests, skill badges.","Collaborating with cross-functional technologies.","Got introduced to Computing, Application Development, Big Data and Machine Learning using Google Cloud's on training platform Qwiklabs","Additional self-paced labs were provided to practice on Qwiklabs a platform by Google"],link:"https://www.cloudskillsboost.google/public_profiles/48dcd029-03b4-437b-9dd3-ef7d65958eb0"},{title:"Hacktoberfest",company_name:"GitHub",icon:TL,iconBg:"#E6DEDD",date:"Oct (2020 - 2022)",link:"",points:["Hacktoberfest is an annual worldwide event held during the month of October. The event encourages open source developers to contribute to repositories through pull requests (PR).","GitHub hosts many open source repositories that contribute to this event."],link:"https://dev.to/shinchancode"}],uJ=[{degree:"Bachelor of Engineering",branch:"Information Technology",marks:"CGPA : 9.42 / 10",name:"Army Institute of Technology Dighi, Pune",year:"(2019 - 2023)",image:Dj},{degree:"12th Grade",branch:"Science",marks:"Percentage : 89.88 %",name:"Kendriya Vidyalaya RHE Khadki Pune",year:"2018",image:hT},{degree:"10th Grade",branch:"SSC",marks:"Percentage : 95 %",name:"Kendriya Vidyalaya RHE Khadki Pune",year:"2016",image:hT}],fJ=()=>Xe(ug,{children:[ee(Ki.div,{id:"tech",variants:hu(),children:ee("h2",{className:`${wn.sectionHeadText} text-center`,children:"Tools"})}),ee("div",{className:"flex flex-row flex-wrap justify-center gap-4",children:rJ.map(n=>ee("div",{style:{height:"5rem",width:"5rem"},children:ee(H6,{icon:n.icon})},n.name))})]}),hJ=wl(fJ,"");var e0={},ag={},dJ={get exports(){return ag},set exports(n){ag=n}};/*! 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),xJ.default.createElement("div",{className:(0,_J.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));RL.propTypes={children:vo.default.oneOfType([vo.default.arrayOf(vo.default.node),vo.default.node]).isRequired,className:vo.default.string,animate:vo.default.bool,layout:vo.default.oneOf(["1-column-left","1-column","2-columns","1-column-right"]),lineColor:vo.default.string};var AJ=RL;t0.default=AJ;var n0={};function W1(){return W1=Object.assign||function(n){for(var e=1;e=0)&&(t[r]=n[r]);return t}var J1=new Map,Qp=new WeakMap,gT=0,LL=void 0;function MJ(n){LL=n}function CJ(n){return n?(Qp.has(n)||(gT+=1,Qp.set(n,gT.toString())),Qp.get(n)):"0"}function EJ(n){return Object.keys(n).sort().filter(function(e){return n[e]!==void 0}).map(function(e){return e+"_"+(e==="root"?CJ(n.root):n[e])}).toString()}function bJ(n){var e=EJ(n),t=J1.get(e);if(!t){var i=new Map,r,s=new IntersectionObserver(function(o){o.forEach(function(a){var l,u=a.isIntersecting&&r.some(function(h){return a.intersectionRatio>=h});n.trackVisibility&&typeof a.isVisible>"u"&&(a.isVisible=u),(l=i.get(a.target))==null||l.forEach(function(h){h(u,a)})})},n);r=s.thresholds||(Array.isArray(n.threshold)?n.threshold:[n.threshold||0]),t={id:e,observer:s,elements:i},J1.set(e,t)}return t}function uw(n,e,t,i){if(t===void 0&&(t={}),i===void 0&&(i=LL),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=bJ(t),o=s.id,a=s.observer,l=s.elements,u=l.get(n)||[];return l.has(n)||l.set(n,u),u.push(e),a.observe(n),function(){u.splice(u.indexOf(e),1),u.length===0&&(l.delete(n),a.unobserve(n)),l.size===0&&(a.disconnect(),J1.delete(o))}}var TJ=["children","as","triggerOnce","threshold","root","rootMargin","onChange","skip","trackVisibility","delay","initialInView","fallbackInView"];function yT(n){return typeof n.children!="function"}var cg=function(n){wJ(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(),yT(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,u=r.delay,h=r.fallbackInView;this._unobserveCb=uw(this.node,this.handleChange,{threshold:s,root:o,rootMargin:a,trackVisibility:l,delay:u},h)}},t.unobserve=function(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)},t.render=function(){if(!yT(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,u=a.as,h=SJ(a,TJ);return U.createElement(u||"div",W1({ref:this.handleNode},h),l)},e}(U.Component);cg.displayName="InView";cg.defaultProps={threshold:0,triggerOnce:!1,initialInView:!1};function PJ(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,u=e.initialInView,h=e.fallbackInView,d=U.useRef(),p=U.useState({inView:!!u}),m=p[0],y=p[1],v=U.useCallback(function(A){d.current!==void 0&&(d.current(),d.current=void 0),!l&&A&&(d.current=uw(A,function(_,w){y({inView:_,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]);U.useEffect(function(){!d.current&&m.entry&&!a&&!l&&y({inView:!!u})});var x=[v,m.inView,m.entry];return x.ref=x[0],x.inView=x[1],x.entry=x[2],x}const BJ=Object.freeze(Object.defineProperty({__proto__:null,InView:cg,default:cg,defaultFallbackInView:MJ,observe:uw,useInView:PJ},Symbol.toStringTag,{value:"Module"})),RJ=BI(BJ);n0.__esModule=!0;n0.default=void 0;var xo=fw(U),Zt=fw($m),Zp=fw(lg),LJ=RJ;function fw(n){return n&&n.__esModule?n:{default:n}}const IL=({children:n="",className:e="",contentArrowStyle:t=null,contentStyle:i=null,date:r="",dateClassName:s="",icon:o=null,iconClassName:a="",iconOnClick:l=null,onTimelineElementClick:u=null,iconStyle:h=null,id:d="",position:p="",style:m=null,textClassName:y="",intersectionObserverProps:v={rootMargin:"0px 0px -40px 0px",triggerOnce:!0},visible:x=!1})=>xo.default.createElement(LJ.InView,v,({inView:A,ref:_})=>xo.default.createElement("div",{ref:_,id:d,className:(0,Zp.default)(e,"vertical-timeline-element",{"vertical-timeline-element--left":p==="left","vertical-timeline-element--right":p==="right","vertical-timeline-element--no-children":n===""}),style:m},xo.default.createElement(xo.default.Fragment,null,xo.default.createElement("span",{style:h,onClick:l,className:(0,Zp.default)(a,"vertical-timeline-element-icon",{"bounce-in":A||x,"is-hidden":!(A||x)})},o),xo.default.createElement("div",{style:i,onClick:u,className:(0,Zp.default)(y,"vertical-timeline-element-content",{"bounce-in":A||x,"is-hidden":!(A||x)})},xo.default.createElement("div",{style:t,className:"vertical-timeline-element-content-arrow"}),n,xo.default.createElement("span",{className:(0,Zp.default)(s,"vertical-timeline-element-date")},r)))));IL.propTypes={children:Zt.default.oneOfType([Zt.default.arrayOf(Zt.default.node),Zt.default.node]),className:Zt.default.string,contentArrowStyle:Zt.default.shape({}),contentStyle:Zt.default.shape({}),date:Zt.default.node,dateClassName:Zt.default.string,icon:Zt.default.element,iconClassName:Zt.default.string,iconStyle:Zt.default.shape({}),iconOnClick:Zt.default.func,onTimelineElementClick:Zt.default.func,id:Zt.default.string,position:Zt.default.string,style:Zt.default.shape({}),textClassName:Zt.default.string,visible:Zt.default.bool,intersectionObserverProps:Zt.default.shape({root:Zt.default.object,rootMargin:Zt.default.string,threshold:Zt.default.number,triggerOnce:Zt.default.bool})};var IJ=IL;n0.default=IJ;var DL={VerticalTimeline:t0.default,VerticalTimelineElement:n0.default};const DJ=({experience:n})=>Xe(DL.VerticalTimelineElement,{contentStyle:{background:"#1d1836",color:"#fff"},contentArrowStyle:{borderRight:"7px solid #232631"},date:n.date,iconStyle:{background:n.iconBg},icon:ee("div",{className:"flex justify-center items-center w-full h-full",children:ee("img",{src:n.icon,alt:n.company_name,className:"w-[60%] h-[60%] object-contain"})}),children:[Xe("div",{children:[ee("h3",{className:"text-white text-[24px] font-bold",children:n.title}),ee("p",{className:"text-secondary text-[16px] font-semibold",style:{margin:0},children:n.company_name})]}),Xe("ul",{className:"mt-5 list-disc ml-5 space-y-2",children:[n.points.map((e,t)=>ee("li",{className:"text-white-100 text-[14px] pl-1 tracking-wider",children:e},`experience-point-${t}`)),ee("a",{href:n.link,className:"align-center flex justify-center blue-text-gradient",target:"_blank",children:"LINK"})]})]}),FJ=()=>Xe(fg,{children:[Xe(Ki.div,{id:"experience",variants:hu(),children:[ee("p",{className:`${wn.sectionSubText} text-center`,children:"What I have done so far"}),ee("h2",{className:`${wn.sectionHeadText} text-center`,children:"Work Experience."})]}),ee("div",{className:"mt-20 flex flex-col",children:ee(DL.VerticalTimeline,{children:pJ.map((n,e)=>ee(DJ,{experience:n},`experience-${e}`))})})]}),kJ=wl(FJ,"work");function NJ(n,e,t,i){return new(t||(t=Promise))(function(r,s){function o(u){try{l(i.next(u))}catch(h){s(h)}}function a(u){try{l(i.throw(u))}catch(h){s(h)}}function l(u){var h;u.done?r(u.value):(h=u.value,h instanceof t?h:new t(function(d){d(h)})).then(o,a)}l((i=i.apply(n,e||[])).next())})}const vT=(n,e,t,i)=>{n.style.transition=`${e} ${t}ms ${i}`},Fs=(n,e,t)=>Math.min(Math.max(n,e),t);class OJ{constructor(e,t){this.glareAngle=0,this.glareOpacity=0,this.calculateGlareSize=o=>{const{width:a,height:l}=o,u=Math.sqrt(Math.pow(a,2)+Math.pow(l,2));return{width:u,height:u}},this.setSize=o=>{const a=this.calculateGlareSize(o);this.glareEl.style.width=`${a.width}px`,this.glareEl.style.height=`${a.height}px`},this.update=(o,a,l,u)=>{this.updateAngle(o,a.glareReverse),this.updateOpacity(o,a,l,u)},this.updateAngle=(o,a)=>{const{xPercentage:l,yPercentage:u}=o,h=180/Math.PI,d=l?Math.atan2(u,-l)*h:0;this.glareAngle=d-(a?180:0)},this.updateOpacity=(o,a,l,u)=>{const{xPercentage:h,yPercentage:d}=o,{glarePosition:p,glareReverse:m,glareMaxOpacity:y}=a,v=l?-1:1,x=u?-1:1,A=m?-1:1;let _=0;switch(p){case"top":_=-h*v*A;break;case"right":_=d*x*A;break;case"bottom":case void 0:_=h*v*A;break;case"left":_=-d*x*A;break;case"all":_=Math.hypot(h,d)}const w=Fs(_,0,100);this.glareOpacity=w*y/100},this.render=o=>{const{glareColor:a}=o;this.glareEl.style.transform=`rotate(${this.glareAngle}deg) translate(-50%, -50%)`,this.glareEl.style.opacity=this.glareOpacity.toString(),this.glareEl.style.background=`linear-gradient(0deg, rgba(255,255,255,0) 0%, ${a} 100%)`},this.glareWrapperEl=document.createElement("div"),this.glareEl=document.createElement("div"),this.glareWrapperEl.appendChild(this.glareEl),this.glareWrapperEl.className="glare-wrapper",this.glareEl.className="glare";const i={position:"absolute",top:"0",left:"0",width:"100%",height:"100%",overflow:"hidden",borderRadius:t,WebkitMaskImage:"-webkit-radial-gradient(white, black)",pointerEvents:"none"},r=this.calculateGlareSize(e),s={position:"absolute",top:"50%",left:"50%",transformOrigin:"0% 0%",pointerEvents:"none",width:`${r.width}px`,height:`${r.height}px`};Object.assign(this.glareWrapperEl.style,i),Object.assign(this.glareEl.style,s)}}class zJ{constructor(){this.glareAngle=0,this.glareOpacity=0,this.tiltAngleX=0,this.tiltAngleY=0,this.tiltAngleXPercentage=0,this.tiltAngleYPercentage=0,this.update=(e,t)=>{this.updateTilt(e,t),this.updateTiltManualInput(e,t),this.updateTiltReverse(t),this.updateTiltLimits(t)},this.updateTilt=(e,t)=>{const{xPercentage:i,yPercentage:r}=e,{tiltMaxAngleX:s,tiltMaxAngleY:o}=t;this.tiltAngleX=i*s/100,this.tiltAngleY=r*o/100*-1},this.updateTiltManualInput=(e,t)=>{const{tiltAngleXManual:i,tiltAngleYManual:r,tiltMaxAngleX:s,tiltMaxAngleY:o}=t;(i!==null||r!==null)&&(this.tiltAngleX=i!==null?i:0,this.tiltAngleY=r!==null?r:0,e.xPercentage=100*this.tiltAngleX/s,e.yPercentage=100*this.tiltAngleY/o)},this.updateTiltReverse=e=>{const t=e.tiltReverse?-1:1;this.tiltAngleX=t*this.tiltAngleX,this.tiltAngleY=t*this.tiltAngleY},this.updateTiltLimits=e=>{const{tiltAxis:t}=e;this.tiltAngleX=Fs(this.tiltAngleX,-90,90),this.tiltAngleY=Fs(this.tiltAngleY,-90,90),t&&(this.tiltAngleX=t==="x"?this.tiltAngleX:0,this.tiltAngleY=t==="y"?this.tiltAngleY:0)},this.updateTiltAnglesPercentage=e=>{const{tiltMaxAngleX:t,tiltMaxAngleY:i}=e;this.tiltAngleXPercentage=this.tiltAngleX/t*100,this.tiltAngleYPercentage=this.tiltAngleY/i*100},this.render=e=>{e.style.transform+=`rotateX(${this.tiltAngleX}deg) rotateY(${this.tiltAngleY}deg) `}}}const UJ=Object.assign(Object.assign({scale:1,perspective:1e3,flipVertically:!1,flipHorizontally:!1,reset:!0,transitionEasing:"cubic-bezier(.03,.98,.52,.99)",transitionSpeed:400,trackOnWindow:!1,gyroscope:!1},{tiltEnable:!0,tiltReverse:!1,tiltAngleXInitial:0,tiltAngleYInitial:0,tiltMaxAngleX:20,tiltMaxAngleY:20,tiltAxis:void 0,tiltAngleXManual:null,tiltAngleYManual:null}),{glareEnable:!1,glareMaxOpacity:.7,glareColor:"#ffffff",glarePosition:"bottom",glareReverse:!1,glareBorderRadius:"0"});class FL extends U.PureComponent{constructor(){super(...arguments),this.wrapperEl={node:null,size:{width:0,height:0,left:0,top:0},clientPosition:{x:null,y:null,xPercentage:0,yPercentage:0},updateAnimationId:null,scale:1},this.tilt=null,this.glare=null,this.addDeviceOrientationEventListener=()=>NJ(this,void 0,void 0,function*(){if(!window.DeviceOrientationEvent)return;const e=DeviceOrientationEvent.requestPermission;typeof e=="function"?(yield e())==="granted"&&window.addEventListener("deviceorientation",this.onMove):window.addEventListener("deviceorientation",this.onMove)}),this.setSize=()=>{this.setWrapperElSize(),this.glare&&this.glare.setSize(this.wrapperEl.size)},this.mainLoop=e=>{this.wrapperEl.updateAnimationId!==null&&cancelAnimationFrame(this.wrapperEl.updateAnimationId),this.processInput(e),this.update(e.type),this.wrapperEl.updateAnimationId=requestAnimationFrame(this.renderFrame)},this.onEnter=e=>{const{onEnter:t}=this.props;this.setSize(),this.wrapperEl.node.style.willChange="transform",this.setTransitions(),t&&t(e.type)},this.onMove=e=>{this.mainLoop(e),this.emitOnMove(e)},this.onLeave=e=>{const{onLeave:t}=this.props;if(this.setTransitions(),t&&t(e.type),this.props.reset){const i=new CustomEvent("autoreset");this.onMove(i)}},this.processInput=e=>{const{scale:t}=this.props;switch(e.type){case"mousemove":this.wrapperEl.clientPosition.x=e.pageX,this.wrapperEl.clientPosition.y=e.pageY,this.wrapperEl.scale=t;break;case"touchmove":this.wrapperEl.clientPosition.x=e.touches[0].pageX,this.wrapperEl.clientPosition.y=e.touches[0].pageY,this.wrapperEl.scale=t;break;case"deviceorientation":this.processInputDeviceOrientation(e),this.wrapperEl.scale=t;break;case"autoreset":const{tiltAngleXInitial:i,tiltAngleYInitial:r,tiltMaxAngleX:s,tiltMaxAngleY:o}=this.props,a=r/o*100;this.wrapperEl.clientPosition.xPercentage=Fs(i/s*100,-100,100),this.wrapperEl.clientPosition.yPercentage=Fs(a,-100,100),this.wrapperEl.scale=1}},this.processInputDeviceOrientation=e=>{if(!e.gamma||!e.beta||!this.props.gyroscope)return;const{tiltMaxAngleX:t,tiltMaxAngleY:i}=this.props,r=e.gamma;this.wrapperEl.clientPosition.xPercentage=e.beta/t*100,this.wrapperEl.clientPosition.yPercentage=r/i*100,this.wrapperEl.clientPosition.xPercentage=Fs(this.wrapperEl.clientPosition.xPercentage,-100,100),this.wrapperEl.clientPosition.yPercentage=Fs(this.wrapperEl.clientPosition.yPercentage,-100,100)},this.update=e=>{const{tiltEnable:t,flipVertically:i,flipHorizontally:r}=this.props;e!=="autoreset"&&e!=="deviceorientation"&&e!=="propChange"&&this.updateClientInput(),t&&this.tilt.update(this.wrapperEl.clientPosition,this.props),this.updateFlip(),this.tilt.updateTiltAnglesPercentage(this.props),this.glare&&this.glare.update(this.wrapperEl.clientPosition,this.props,i,r)},this.updateClientInput=()=>{const{trackOnWindow:e}=this.props;let t,i;if(e){const{x:r,y:s}=this.wrapperEl.clientPosition;t=s/window.innerHeight*200-100,i=r/window.innerWidth*200-100}else{const{size:{width:r,height:s,left:o,top:a},clientPosition:{x:l,y:u}}=this.wrapperEl;t=(u-a)/s*200-100,i=(l-o)/r*200-100}this.wrapperEl.clientPosition.xPercentage=Fs(t,-100,100),this.wrapperEl.clientPosition.yPercentage=Fs(i,-100,100)},this.updateFlip=()=>{const{flipVertically:e,flipHorizontally:t}=this.props;e&&(this.tilt.tiltAngleX+=180,this.tilt.tiltAngleY*=-1),t&&(this.tilt.tiltAngleY+=180)},this.renderFrame=()=>{this.resetWrapperElTransform(),this.renderPerspective(),this.tilt.render(this.wrapperEl.node),this.renderScale(),this.glare&&this.glare.render(this.props)}}componentDidMount(){if(this.tilt=new zJ,this.initGlare(),this.addEventListeners(),typeof CustomEvent>"u")return;const e=new CustomEvent("autoreset");this.mainLoop(e);const t=new CustomEvent("initial");this.emitOnMove(t)}componentWillUnmount(){this.wrapperEl.updateAnimationId!==null&&cancelAnimationFrame(this.wrapperEl.updateAnimationId),this.removeEventListeners()}componentDidUpdate(){const e=new CustomEvent("propChange");this.mainLoop(e),this.emitOnMove(e)}addEventListeners(){const{trackOnWindow:e,gyroscope:t}=this.props;window.addEventListener("resize",this.setSize),e&&(window.addEventListener("mouseenter",this.onEnter),window.addEventListener("mousemove",this.onMove),window.addEventListener("mouseout",this.onLeave),window.addEventListener("touchstart",this.onEnter),window.addEventListener("touchmove",this.onMove),window.addEventListener("touchend",this.onLeave)),t&&this.addDeviceOrientationEventListener()}removeEventListeners(){const{trackOnWindow:e,gyroscope:t}=this.props;window.removeEventListener("resize",this.setSize),e&&(window.removeEventListener("mouseenter",this.onEnter),window.removeEventListener("mousemove",this.onMove),window.removeEventListener("mouseout",this.onLeave),window.removeEventListener("touchstart",this.onEnter),window.removeEventListener("touchmove",this.onMove),window.removeEventListener("touchend",this.onLeave)),t&&window.DeviceOrientationEvent&&window.removeEventListener("deviceorientation",this.onMove)}setWrapperElSize(){const e=this.wrapperEl.node.getBoundingClientRect();this.wrapperEl.size.width=this.wrapperEl.node.offsetWidth,this.wrapperEl.size.height=this.wrapperEl.node.offsetHeight,this.wrapperEl.size.left=e.left+window.scrollX,this.wrapperEl.size.top=e.top+window.scrollY}initGlare(){const{glareEnable:e,glareBorderRadius:t}=this.props;e&&(this.glare=new OJ(this.wrapperEl.size,t),this.wrapperEl.node.appendChild(this.glare.glareWrapperEl))}emitOnMove(e){const{onMove:t}=this.props;if(!t)return;let i=0,r=0;this.glare&&(i=this.glare.glareAngle,r=this.glare.glareOpacity),t({tiltAngleX:this.tilt.tiltAngleX,tiltAngleY:this.tilt.tiltAngleY,tiltAngleXPercentage:this.tilt.tiltAngleXPercentage,tiltAngleYPercentage:this.tilt.tiltAngleYPercentage,glareAngle:i,glareOpacity:r,eventType:e.type})}resetWrapperElTransform(){this.wrapperEl.node.style.transform=""}renderPerspective(){const{perspective:e}=this.props;this.wrapperEl.node.style.transform+=`perspective(${e}px) `}renderScale(){const{scale:e}=this.wrapperEl;this.wrapperEl.node.style.transform+=`scale3d(${e},${e},${e})`}setTransitions(){const{transitionSpeed:e,transitionEasing:t}=this.props;vT(this.wrapperEl.node,"all",e,t),this.glare&&vT(this.glare.glareEl,"opacity",e,t)}render(){const{children:e,className:t,style:i}=this.props;return gr.createElement("div",{ref:r=>this.wrapperEl.node=r,onMouseEnter:this.onEnter,onMouseMove:this.onMove,onMouseLeave:this.onLeave,onTouchStart:this.onEnter,onTouchMove:this.onMove,onTouchEnd:this.onLeave,className:t,style:i},e)}}FL.defaultProps=UJ;function GJ({title:n,active:e,setSelected:t,id:i}){return ee("li",{className:e?"portfoliolist active":"portfoliolist",id:"portfoliolist",onClick:()=>t(i),children:n})}const HJ=({index:n,name:e,description:t,tags:i,image:r,source_code_link:s,source_link:o})=>ee(Ki.div,{whileInView:{opacity:1,transform:"none"},variants:lw("up","spring",n*.5,.75),children:Xe(FL,{options:{max:45,scale:1,speed:450},className:"project-box bg-tertiary p-5 rounded-2xl sm:w-[330px] w-full",children:[Xe("div",{className:"Box1 relative w-full h-[180px]",children:[ee("img",{src:r,alt:"project_image",className:"image w-full h-full object-cover rounded-2xl"}),ee("div",{className:"absolute inset-0 flex justify-center card-img_hover",style:{alignItems:"center"},children:ee("h3",{className:"text-black font-bold text-[16px]",children:e})}),Xe("div",{className:"title absolute inset-0 flex justify-end card-img_hover",children:[ee("div",{onClick:()=>window.open(o,"_blank"),className:"black-gradient w-10 h-10 m-2 rounded-full flex justify-center items-center cursor-pointer",children:ee("img",{src:bj,alt:"source code",className:"w-1/2 h-1/2 object-contain"})}),ee("div",{onClick:()=>window.open(s,"_blank"),className:"black-gradient w-10 h-10 m-2 rounded-full flex justify-center items-center cursor-pointer",children:ee("img",{src:Ej,alt:"source code",className:"w-1/2 h-1/2 object-contain"})})]})]}),ee("div",{className:"content mt-5",children:ee("p",{className:"mt-2 text-secondary text-[14px]",style:{textAlign:"justify"},children:t})}),ee("div",{className:"content mt-4 flex flex-wrap gap-2",children:i.map(a=>Xe("p",{className:`text-[14px] ${a.color}`,children:["#",a.name]},`${e}-${a.name}`))})]})}),VJ=()=>{const[n,e]=U.useState("java"),[t,i]=U.useState([]);return U.useEffect(()=>{switch(n){case"java":i(fJ);break;case"c++":i(mT);break;case"web":i(hJ);break;case"other":i(dJ);break;default:i(mT)}},[n]),Xe(fg,{children:[Xe(Ki.div,{whileInView:{opacity:1,transform:"none"},variants:hu(),children:[ee("p",{className:`${wn.sectionSubText} `,children:"My work"}),ee("h2",{className:`${wn.sectionHeadText}`,children:"Projects."})]}),ee("div",{className:"project w-full flex",children:Xe(Ki.p,{whileInView:{opacity:1,transform:"none"},variants:lw("","",.1,1),className:"mt-3 text-secondary text-[17px] leading-[30px]",children:[ee("ul",{children:uJ.map(r=>ee(GJ,{title:r.title,active:n===r.id,setSelected:e,id:r.id}))}),ee("div",{className:"box mt-20 flex flex-wrap justify-center",children:t.map((r,s)=>ee("div",{children:ee(HJ,{index:s,...r},`project-${s}`)}))})]})})]})},WJ=wl(VJ,"project"),ch={_origin:"https://api.emailjs.com"},jJ=(n,e="https://api.emailjs.com")=>{ch._userID=n,ch._origin=e},kL=(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 xT{constructor(e){this.status=e?e.status:0,this.text=e?e.responseText:"Network Error"}}const NL=(n,e,t={})=>new Promise((i,r)=>{const s=new XMLHttpRequest;s.addEventListener("load",({target:o})=>{const a=new xT(o);a.status===200||a.text==="OK"?i(a):r(a)}),s.addEventListener("error",({target:o})=>{r(new xT(o))}),s.open("POST",ch._origin+n,!0),Object.keys(t).forEach(o=>{s.setRequestHeader(o,t[o])}),s.send(e)}),JJ=(n,e,t,i)=>{const r=i||ch._userID;return kL(r,n,e),NL("/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"})},XJ=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},YJ=(n,e,t,i)=>{const r=i||ch._userID,s=XJ(t);kL(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),NL("/api/v1.0/email/send-form",o)},KJ={init:jJ,send:JJ,sendForm:YJ};function QJ(n){return jr({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"}}]})(n)}function ZJ(n){return jr({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-2 12H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z"}}]})(n)}function qJ(n){return jr({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M4 16s-1 0-1-1 1-4 5-4 5 3 5 4-1 1-1 1H4Zm4-5.95a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z"}},{tag:"path",attr:{d:"M2 1a2 2 0 0 0-2 2v9.5A1.5 1.5 0 0 0 1.5 14h.653a5.373 5.373 0 0 1 1.066-2H1V3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v9h-2.219c.554.654.89 1.373 1.066 2h.653a1.5 1.5 0 0 0 1.5-1.5V3a2 2 0 0 0-2-2H2Z"}}]})(n)}function $J(n){return jr({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M13.601 2.326A7.854 7.854 0 0 0 7.994 0C3.627 0 .068 3.558.064 7.926c0 1.399.366 2.76 1.057 3.965L0 16l4.204-1.102a7.933 7.933 0 0 0 3.79.965h.004c4.368 0 7.926-3.558 7.93-7.93A7.898 7.898 0 0 0 13.6 2.326zM7.994 14.521a6.573 6.573 0 0 1-3.356-.92l-.24-.144-2.494.654.666-2.433-.156-.251a6.56 6.56 0 0 1-1.007-3.505c0-3.626 2.957-6.584 6.591-6.584a6.56 6.56 0 0 1 4.66 1.931 6.557 6.557 0 0 1 1.928 4.66c-.004 3.639-2.961 6.592-6.592 6.592zm3.615-4.934c-.197-.099-1.17-.578-1.353-.646-.182-.065-.315-.099-.445.099-.133.197-.513.646-.627.775-.114.133-.232.148-.43.05-.197-.1-.836-.308-1.592-.985-.59-.525-.985-1.175-1.103-1.372-.114-.198-.011-.304.088-.403.087-.088.197-.232.296-.346.1-.114.133-.198.198-.33.065-.134.034-.248-.015-.347-.05-.099-.445-1.076-.612-1.47-.16-.389-.323-.335-.445-.34-.114-.007-.247-.007-.38-.007a.729.729 0 0 0-.529.247c-.182.198-.691.677-.691 1.654 0 .977.71 1.916.81 2.049.098.133 1.394 2.132 3.383 2.992.47.205.84.326 1.129.418.475.152.904.129 1.246.08.38-.058 1.171-.48 1.338-.943.164-.464.164-.86.114-.943-.049-.084-.182-.133-.38-.232z"}}]})(n)}const eX=()=>{const n=U.useRef(),[e,t]=U.useState({name:"",email:"",message:""}),[i,r]=U.useState(!1),s=a=>{const{target:l}=a,{name:u,value:h}=l;t({...e,[u]:h})},o=a=>{a.preventDefault(),r(!0),KJ.send("service_6y5vft7","template_5g175sf",{from_name:e.name,to_name:"Aarti Rathi",from_email:e.email,to_email:"aarti.rathi1710@gmail.com",message:e.message},"FMQ4a1hK5NSAkumfj").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 Xe("div",{className:"xl:mt-12 flex xl:flex-row flex-col gap-10 overflow-hidden",children:[ee(Ki.div,{variants:pT("left","tween",.2,1),className:"xl:flex-1 xl:h-auto md:h-[550px] h-[350px]",children:ee(W6,{})}),Xe(Ki.div,{whileInView:{opacity:1,transform:"none"},variants:pT("right","tween",.2,1),className:"flex-[0.75] bg-black-100 p-8 rounded-2xl",children:[ee("p",{className:wn.sectionSubText,children:"Get in touch"}),ee("h3",{className:wn.sectionHeadText,children:"Contact."}),Xe("form",{ref:n,onSubmit:o,className:"mt-3 flex flex-col gap-8",children:[Xe("label",{className:"flex flex-col",children:[ee("span",{className:"text-white font-medium mb-3",children:"Your Name"}),ee("input",{type:"text",name:"name",value:e.name,onChange:s,placeholder:"What's your good name?",className:"bg-tertiary py-3 px-3 placeholder:text-secondary text-white rounded-lg border-none font-medium"})]}),Xe("label",{className:"flex flex-col",children:[ee("span",{className:"text-white font-medium mb-3",children:"Your email"}),ee("input",{type:"email",name:"email",value:e.email,onChange:s,placeholder:"What's your web address?",className:"bg-tertiary py-3 px-3 placeholder:text-secondary text-white rounded-lg border-none font-medium"})]}),Xe("label",{className:"flex flex-col",children:[ee("span",{className:"text-white font-medium mb-3",children:"Your Message"}),ee("textarea",{rows:7,name:"message",value:e.message,onChange:s,placeholder:"What you want to say?",className:"bg-tertiary py-3 px-3 placeholder:text-secondary text-white rounded-lg border-none font-medium"})]}),ee("button",{type:"submit",className:"bg-tertiary py-3 px-5 rounded-xl outline-none w-fit text-white font-bold shadow-md shadow-primary",children:i?"Sending...":"Send"})]}),Xe("div",{className:"mt-5 contact__options",children:[Xe("article",{className:"contact__option",children:[ee(QJ,{}),ee("a",{href:"mailto:aarti.rathi1710@gmail.com",target:"_blank",className:"blue-text-gradient",children:"aarti.rathi1710@gmail.com"})]}),Xe("article",{className:"contact__option",children:[ee($J,{}),ee("a",{href:"https://api.whatsapp.com/send/?phone=917040031669&text&app_absent=0&lang=en",target:"_blank",className:"blue-text-gradient",children:"+91 7040031669"})]})]})]})]})},tX=wl(eX,"contact");const nX=()=>{const[n,e]=U.useState("#");return Xe("div",{className:"nav",children:[ee("a",{href:"#",onClick:()=>e("#"),className:n==="#"?"active":"",children:ee(xj,{})}),ee("a",{href:"#education",onClick:()=>e("#education"),className:n==="#education"?"active":"",children:ee(wj,{})}),ee("a",{href:"#project",onClick:()=>e("#project"),className:n==="#project"?"active":"",children:ee(yj,{})}),ee("a",{href:"#experience",onClick:()=>e("#experience"),className:n==="#experience"?"active":"",children:ee(qJ,{})}),ee("a",{href:"#contact",onClick:()=>e("#contact"),className:n==="#contact"?"active":"",children:ee(ZJ,{})})]})};const iX=()=>Xe(fg,{children:[ee(Ki.div,{id:"tech",variants:hu(),children:ee("h2",{className:`${wn.sectionHeadText} text-center`,children:"Profile Section"})}),ee("div",{className:"my-skills",children:aJ.map(n=>ee("div",{className:"skill","data-aos":"fade-up","data-aos-delay":"200",children:ee("div",{className:"icon-container",children:ee("a",{href:n.link,target:"_blank",children:ee("img",{src:n.icon})})})}))})]}),rX=wl(iX,"");const sX=()=>Xe("div",{className:"mt-12 bg-black-100 rounded-[20px]",children:[ee("div",{className:`bg-tertiary rounded-2xl ${wn.padding}`,children:Xe(Ki.div,{variants:hu(),children:[ee("p",{className:wn.sectionSubText,children:"Some Glimpses on..."}),ee("h2",{className:wn.sectionHeadText,children:"Achievements."})]})}),ee("div",{className:`-mt-20 justify-center p-6 ${wn.paddingX} gap-7`,children:ee("ul",{className:"mt-5 list-disc ml-5 space-y-2",children:lJ.map(n=>ee("li",{className:"text-white-100 text-[15px] pl-1",children:n.title}))})})]}),oX=wl(sX,"");const aX=({index:n,branch:e,marks:t,name:i,degree:r,year:s,image:o})=>Xe(Ki.div,{variants:lw("","spring",n*.5,.75),className:"Box2 p-5 rounded-3xl xs:w-[320px] w-full",children:[Xe("div",{className:"mt-7 flex flex-col justify-between items-center gap-1",children:[ee("img",{src:o,alt:`feedback_by-${i}`,width:"80",height:"80",className:"rounded-full object-cover"}),Xe("div",{className:"mt-3 flex-1 flex flex-col",children:[ee("p",{className:"text-center text-white font-medium text-[16px]",children:ee("span",{className:"text-center blue-text-gradient",children:i})}),ee("p",{className:"text-center mt-1 text-secondary text-[12px]",children:s})]})]}),ee("p",{className:"text-white font-black text-[48px]",children:'"'}),Xe("div",{className:"mt-1",children:[ee("p",{className:"text-center text-white tracking-wider text-[18px]",children:r}),ee("p",{className:"mt-3 text-center pink-text-gradient",children:e}),ee("p",{className:"mt-3 text-center green-text-gradient",children:t})]})]}),lX=()=>Xe("div",{className:"mt-12 bg-black-100 rounded-[20px]",children:[ee("div",{className:`bg-tertiary rounded-2xl ${wn.padding} min-h-[300px]`,children:Xe(Ki.div,{variants:hu(),children:[ee("p",{className:wn.sectionSubText,children:"Education Details..."}),ee("h2",{className:wn.sectionHeadText,children:"Education."})]})}),ee("div",{className:`-mt-20 justify-center pb-14 ${wn.paddingX} flex flex-wrap gap-7`,children:mJ.map((n,e)=>ee(aX,{index:e,...n},n.name))})]}),cX=wl(lX,"education");const uX=()=>Xe("div",{className:"footer text-center",children:[Xe("p",{children:[" with ❤️ by",Xe("a",{href:"https://shinchancode.github.io/3d-react-portfolio/",target:"_blank",children:[" ","Aarti Rathi"]}),"😎"]}),Xe("p",{className:"pink-text-gradient",children:["No. of Visitors | ",ee("img",{className:"visitcounter",src:"https://hitwebcounter.com/counter/counter.php?page=9795911&style=0025&nbdigits=5&type=page&initCount=459",title:"Counter Widget",Alt:"Visit counter For Websites",border:"0"})]})]}),fX=()=>ee("div",{children:ee(Ek,{children:Xe("div",{className:"relative z-0 bg-primary",children:[Xe("div",{className:"bg-hero-pattern bg-cover bg-no-repeat bg-center",children:[ee(sJ,{}),ee(rJ,{})]}),ee(nX,{}),ee(cX,{}),ee(WJ,{}),ee(kJ,{}),ee(oX,{}),ee(rX,{}),ee(yJ,{}),Xe("div",{className:"relative z-0",children:[ee(tX,{}),ee(i8,{})]}),ee(uX,{})]})})});sk.render(ee(gr.StrictMode,{children:ee(fX,{})}),document.getElementById("root")); +*/(function(n){(function(){var e={}.hasOwnProperty;function t(){for(var i=[],r=0;r(typeof window=="object"&&document.documentElement.style.setProperty("--line-color",i),pJ.default.createElement("div",{className:(0,mJ.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));PL.propTypes={children:vo.default.oneOfType([vo.default.arrayOf(vo.default.node),vo.default.node]).isRequired,className:vo.default.string,animate:vo.default.bool,layout:vo.default.oneOf(["1-column-left","1-column","2-columns","1-column-right"]),lineColor:vo.default.string};var gJ=PL;e0.default=gJ;var t0={};function V1(){return V1=Object.assign||function(n){for(var e=1;e=0)&&(t[r]=n[r]);return t}var j1=new Map,Kp=new WeakMap,mT=0,BL=void 0;function xJ(n){BL=n}function _J(n){return n?(Kp.has(n)||(mT+=1,Kp.set(n,mT.toString())),Kp.get(n)):"0"}function AJ(n){return Object.keys(n).sort().filter(function(e){return n[e]!==void 0}).map(function(e){return e+"_"+(e==="root"?_J(n.root):n[e])}).toString()}function wJ(n){var e=AJ(n),t=j1.get(e);if(!t){var i=new Map,r,s=new IntersectionObserver(function(o){o.forEach(function(a){var l,u=a.isIntersecting&&r.some(function(h){return a.intersectionRatio>=h});n.trackVisibility&&typeof a.isVisible>"u"&&(a.isVisible=u),(l=i.get(a.target))==null||l.forEach(function(h){h(u,a)})})},n);r=s.thresholds||(Array.isArray(n.threshold)?n.threshold:[n.threshold||0]),t={id:e,observer:s,elements:i},j1.set(e,t)}return t}function cw(n,e,t,i){if(t===void 0&&(t={}),i===void 0&&(i=BL),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=wJ(t),o=s.id,a=s.observer,l=s.elements,u=l.get(n)||[];return l.has(n)||l.set(n,u),u.push(e),a.observe(n),function(){u.splice(u.indexOf(e),1),u.length===0&&(l.delete(n),a.unobserve(n)),l.size===0&&(a.disconnect(),j1.delete(o))}}var SJ=["children","as","triggerOnce","threshold","root","rootMargin","onChange","skip","trackVisibility","delay","initialInView","fallbackInView"];function gT(n){return typeof n.children!="function"}var lg=function(n){yJ(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(),gT(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,u=r.delay,h=r.fallbackInView;this._unobserveCb=cw(this.node,this.handleChange,{threshold:s,root:o,rootMargin:a,trackVisibility:l,delay:u},h)}},t.unobserve=function(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)},t.render=function(){if(!gT(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,u=a.as,h=vJ(a,SJ);return U.createElement(u||"div",V1({ref:this.handleNode},h),l)},e}(U.Component);lg.displayName="InView";lg.defaultProps={threshold:0,triggerOnce:!1,initialInView:!1};function MJ(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,u=e.initialInView,h=e.fallbackInView,d=U.useRef(),p=U.useState({inView:!!u}),m=p[0],y=p[1],v=U.useCallback(function(A){d.current!==void 0&&(d.current(),d.current=void 0),!l&&A&&(d.current=cw(A,function(_,w){y({inView:_,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]);U.useEffect(function(){!d.current&&m.entry&&!a&&!l&&y({inView:!!u})});var x=[v,m.inView,m.entry];return x.ref=x[0],x.inView=x[1],x.entry=x[2],x}const CJ=Object.freeze(Object.defineProperty({__proto__:null,InView:lg,default:lg,defaultFallbackInView:xJ,observe:cw,useInView:MJ},Symbol.toStringTag,{value:"Module"})),EJ=EI(CJ);t0.__esModule=!0;t0.default=void 0;var xo=uw(U),Zt=uw(qm),Qp=uw(ag),bJ=EJ;function uw(n){return n&&n.__esModule?n:{default:n}}const RL=({children:n="",className:e="",contentArrowStyle:t=null,contentStyle:i=null,date:r="",dateClassName:s="",icon:o=null,iconClassName:a="",iconOnClick:l=null,onTimelineElementClick:u=null,iconStyle:h=null,id:d="",position:p="",style:m=null,textClassName:y="",intersectionObserverProps:v={rootMargin:"0px 0px -40px 0px",triggerOnce:!0},visible:x=!1})=>xo.default.createElement(bJ.InView,v,({inView:A,ref:_})=>xo.default.createElement("div",{ref:_,id:d,className:(0,Qp.default)(e,"vertical-timeline-element",{"vertical-timeline-element--left":p==="left","vertical-timeline-element--right":p==="right","vertical-timeline-element--no-children":n===""}),style:m},xo.default.createElement(xo.default.Fragment,null,xo.default.createElement("span",{style:h,onClick:l,className:(0,Qp.default)(a,"vertical-timeline-element-icon",{"bounce-in":A||x,"is-hidden":!(A||x)})},o),xo.default.createElement("div",{style:i,onClick:u,className:(0,Qp.default)(y,"vertical-timeline-element-content",{"bounce-in":A||x,"is-hidden":!(A||x)})},xo.default.createElement("div",{style:t,className:"vertical-timeline-element-content-arrow"}),n,xo.default.createElement("span",{className:(0,Qp.default)(s,"vertical-timeline-element-date")},r)))));RL.propTypes={children:Zt.default.oneOfType([Zt.default.arrayOf(Zt.default.node),Zt.default.node]),className:Zt.default.string,contentArrowStyle:Zt.default.shape({}),contentStyle:Zt.default.shape({}),date:Zt.default.node,dateClassName:Zt.default.string,icon:Zt.default.element,iconClassName:Zt.default.string,iconStyle:Zt.default.shape({}),iconOnClick:Zt.default.func,onTimelineElementClick:Zt.default.func,id:Zt.default.string,position:Zt.default.string,style:Zt.default.shape({}),textClassName:Zt.default.string,visible:Zt.default.bool,intersectionObserverProps:Zt.default.shape({root:Zt.default.object,rootMargin:Zt.default.string,threshold:Zt.default.number,triggerOnce:Zt.default.bool})};var TJ=RL;t0.default=TJ;var LL={VerticalTimeline:e0.default,VerticalTimelineElement:t0.default};const PJ=({experience:n})=>Xe(LL.VerticalTimelineElement,{contentStyle:{background:"#1d1836",color:"#fff"},contentArrowStyle:{borderRight:"7px solid #232631"},date:n.date,iconStyle:{background:n.iconBg},icon:ee("div",{className:"flex justify-center items-center w-full h-full",children:ee("img",{src:n.icon,alt:n.company_name,className:"w-[60%] h-[60%] object-contain"})}),children:[Xe("div",{children:[ee("h3",{className:"text-white text-[24px] font-bold",children:n.title}),ee("p",{className:"text-secondary text-[16px] font-semibold",style:{margin:0},children:n.company_name})]}),Xe("ul",{className:"mt-5 list-disc ml-5 space-y-2",children:[n.points.map((e,t)=>ee("li",{className:"text-white-100 text-[14px] pl-1 tracking-wider",children:e},`experience-point-${t}`)),ee("a",{href:n.link,className:"align-center flex justify-center blue-text-gradient",target:"_blank",children:"LINK"})]})]}),BJ=()=>Xe(ug,{children:[Xe(Ki.div,{id:"experience",variants:hu(),children:[ee("p",{className:`${wn.sectionSubText}`,children:"What I have done so far"}),ee("h2",{className:`${wn.sectionHeadText}`,children:"Work Experience."})]}),ee("div",{className:"mt-20 flex flex-col",children:ee(LL.VerticalTimeline,{children:cJ.map((n,e)=>ee(PJ,{experience:n},`experience-${e}`))})})]}),RJ=wl(BJ,"work");function LJ(n,e,t,i){return new(t||(t=Promise))(function(r,s){function o(u){try{l(i.next(u))}catch(h){s(h)}}function a(u){try{l(i.throw(u))}catch(h){s(h)}}function l(u){var h;u.done?r(u.value):(h=u.value,h instanceof t?h:new t(function(d){d(h)})).then(o,a)}l((i=i.apply(n,e||[])).next())})}const yT=(n,e,t,i)=>{n.style.transition=`${e} ${t}ms ${i}`},Fs=(n,e,t)=>Math.min(Math.max(n,e),t);class IJ{constructor(e,t){this.glareAngle=0,this.glareOpacity=0,this.calculateGlareSize=o=>{const{width:a,height:l}=o,u=Math.sqrt(Math.pow(a,2)+Math.pow(l,2));return{width:u,height:u}},this.setSize=o=>{const a=this.calculateGlareSize(o);this.glareEl.style.width=`${a.width}px`,this.glareEl.style.height=`${a.height}px`},this.update=(o,a,l,u)=>{this.updateAngle(o,a.glareReverse),this.updateOpacity(o,a,l,u)},this.updateAngle=(o,a)=>{const{xPercentage:l,yPercentage:u}=o,h=180/Math.PI,d=l?Math.atan2(u,-l)*h:0;this.glareAngle=d-(a?180:0)},this.updateOpacity=(o,a,l,u)=>{const{xPercentage:h,yPercentage:d}=o,{glarePosition:p,glareReverse:m,glareMaxOpacity:y}=a,v=l?-1:1,x=u?-1:1,A=m?-1:1;let _=0;switch(p){case"top":_=-h*v*A;break;case"right":_=d*x*A;break;case"bottom":case void 0:_=h*v*A;break;case"left":_=-d*x*A;break;case"all":_=Math.hypot(h,d)}const w=Fs(_,0,100);this.glareOpacity=w*y/100},this.render=o=>{const{glareColor:a}=o;this.glareEl.style.transform=`rotate(${this.glareAngle}deg) translate(-50%, -50%)`,this.glareEl.style.opacity=this.glareOpacity.toString(),this.glareEl.style.background=`linear-gradient(0deg, rgba(255,255,255,0) 0%, ${a} 100%)`},this.glareWrapperEl=document.createElement("div"),this.glareEl=document.createElement("div"),this.glareWrapperEl.appendChild(this.glareEl),this.glareWrapperEl.className="glare-wrapper",this.glareEl.className="glare";const i={position:"absolute",top:"0",left:"0",width:"100%",height:"100%",overflow:"hidden",borderRadius:t,WebkitMaskImage:"-webkit-radial-gradient(white, black)",pointerEvents:"none"},r=this.calculateGlareSize(e),s={position:"absolute",top:"50%",left:"50%",transformOrigin:"0% 0%",pointerEvents:"none",width:`${r.width}px`,height:`${r.height}px`};Object.assign(this.glareWrapperEl.style,i),Object.assign(this.glareEl.style,s)}}class DJ{constructor(){this.glareAngle=0,this.glareOpacity=0,this.tiltAngleX=0,this.tiltAngleY=0,this.tiltAngleXPercentage=0,this.tiltAngleYPercentage=0,this.update=(e,t)=>{this.updateTilt(e,t),this.updateTiltManualInput(e,t),this.updateTiltReverse(t),this.updateTiltLimits(t)},this.updateTilt=(e,t)=>{const{xPercentage:i,yPercentage:r}=e,{tiltMaxAngleX:s,tiltMaxAngleY:o}=t;this.tiltAngleX=i*s/100,this.tiltAngleY=r*o/100*-1},this.updateTiltManualInput=(e,t)=>{const{tiltAngleXManual:i,tiltAngleYManual:r,tiltMaxAngleX:s,tiltMaxAngleY:o}=t;(i!==null||r!==null)&&(this.tiltAngleX=i!==null?i:0,this.tiltAngleY=r!==null?r:0,e.xPercentage=100*this.tiltAngleX/s,e.yPercentage=100*this.tiltAngleY/o)},this.updateTiltReverse=e=>{const t=e.tiltReverse?-1:1;this.tiltAngleX=t*this.tiltAngleX,this.tiltAngleY=t*this.tiltAngleY},this.updateTiltLimits=e=>{const{tiltAxis:t}=e;this.tiltAngleX=Fs(this.tiltAngleX,-90,90),this.tiltAngleY=Fs(this.tiltAngleY,-90,90),t&&(this.tiltAngleX=t==="x"?this.tiltAngleX:0,this.tiltAngleY=t==="y"?this.tiltAngleY:0)},this.updateTiltAnglesPercentage=e=>{const{tiltMaxAngleX:t,tiltMaxAngleY:i}=e;this.tiltAngleXPercentage=this.tiltAngleX/t*100,this.tiltAngleYPercentage=this.tiltAngleY/i*100},this.render=e=>{e.style.transform+=`rotateX(${this.tiltAngleX}deg) rotateY(${this.tiltAngleY}deg) `}}}const FJ=Object.assign(Object.assign({scale:1,perspective:1e3,flipVertically:!1,flipHorizontally:!1,reset:!0,transitionEasing:"cubic-bezier(.03,.98,.52,.99)",transitionSpeed:400,trackOnWindow:!1,gyroscope:!1},{tiltEnable:!0,tiltReverse:!1,tiltAngleXInitial:0,tiltAngleYInitial:0,tiltMaxAngleX:20,tiltMaxAngleY:20,tiltAxis:void 0,tiltAngleXManual:null,tiltAngleYManual:null}),{glareEnable:!1,glareMaxOpacity:.7,glareColor:"#ffffff",glarePosition:"bottom",glareReverse:!1,glareBorderRadius:"0"});class IL extends U.PureComponent{constructor(){super(...arguments),this.wrapperEl={node:null,size:{width:0,height:0,left:0,top:0},clientPosition:{x:null,y:null,xPercentage:0,yPercentage:0},updateAnimationId:null,scale:1},this.tilt=null,this.glare=null,this.addDeviceOrientationEventListener=()=>LJ(this,void 0,void 0,function*(){if(!window.DeviceOrientationEvent)return;const e=DeviceOrientationEvent.requestPermission;typeof e=="function"?(yield e())==="granted"&&window.addEventListener("deviceorientation",this.onMove):window.addEventListener("deviceorientation",this.onMove)}),this.setSize=()=>{this.setWrapperElSize(),this.glare&&this.glare.setSize(this.wrapperEl.size)},this.mainLoop=e=>{this.wrapperEl.updateAnimationId!==null&&cancelAnimationFrame(this.wrapperEl.updateAnimationId),this.processInput(e),this.update(e.type),this.wrapperEl.updateAnimationId=requestAnimationFrame(this.renderFrame)},this.onEnter=e=>{const{onEnter:t}=this.props;this.setSize(),this.wrapperEl.node.style.willChange="transform",this.setTransitions(),t&&t(e.type)},this.onMove=e=>{this.mainLoop(e),this.emitOnMove(e)},this.onLeave=e=>{const{onLeave:t}=this.props;if(this.setTransitions(),t&&t(e.type),this.props.reset){const i=new CustomEvent("autoreset");this.onMove(i)}},this.processInput=e=>{const{scale:t}=this.props;switch(e.type){case"mousemove":this.wrapperEl.clientPosition.x=e.pageX,this.wrapperEl.clientPosition.y=e.pageY,this.wrapperEl.scale=t;break;case"touchmove":this.wrapperEl.clientPosition.x=e.touches[0].pageX,this.wrapperEl.clientPosition.y=e.touches[0].pageY,this.wrapperEl.scale=t;break;case"deviceorientation":this.processInputDeviceOrientation(e),this.wrapperEl.scale=t;break;case"autoreset":const{tiltAngleXInitial:i,tiltAngleYInitial:r,tiltMaxAngleX:s,tiltMaxAngleY:o}=this.props,a=r/o*100;this.wrapperEl.clientPosition.xPercentage=Fs(i/s*100,-100,100),this.wrapperEl.clientPosition.yPercentage=Fs(a,-100,100),this.wrapperEl.scale=1}},this.processInputDeviceOrientation=e=>{if(!e.gamma||!e.beta||!this.props.gyroscope)return;const{tiltMaxAngleX:t,tiltMaxAngleY:i}=this.props,r=e.gamma;this.wrapperEl.clientPosition.xPercentage=e.beta/t*100,this.wrapperEl.clientPosition.yPercentage=r/i*100,this.wrapperEl.clientPosition.xPercentage=Fs(this.wrapperEl.clientPosition.xPercentage,-100,100),this.wrapperEl.clientPosition.yPercentage=Fs(this.wrapperEl.clientPosition.yPercentage,-100,100)},this.update=e=>{const{tiltEnable:t,flipVertically:i,flipHorizontally:r}=this.props;e!=="autoreset"&&e!=="deviceorientation"&&e!=="propChange"&&this.updateClientInput(),t&&this.tilt.update(this.wrapperEl.clientPosition,this.props),this.updateFlip(),this.tilt.updateTiltAnglesPercentage(this.props),this.glare&&this.glare.update(this.wrapperEl.clientPosition,this.props,i,r)},this.updateClientInput=()=>{const{trackOnWindow:e}=this.props;let t,i;if(e){const{x:r,y:s}=this.wrapperEl.clientPosition;t=s/window.innerHeight*200-100,i=r/window.innerWidth*200-100}else{const{size:{width:r,height:s,left:o,top:a},clientPosition:{x:l,y:u}}=this.wrapperEl;t=(u-a)/s*200-100,i=(l-o)/r*200-100}this.wrapperEl.clientPosition.xPercentage=Fs(t,-100,100),this.wrapperEl.clientPosition.yPercentage=Fs(i,-100,100)},this.updateFlip=()=>{const{flipVertically:e,flipHorizontally:t}=this.props;e&&(this.tilt.tiltAngleX+=180,this.tilt.tiltAngleY*=-1),t&&(this.tilt.tiltAngleY+=180)},this.renderFrame=()=>{this.resetWrapperElTransform(),this.renderPerspective(),this.tilt.render(this.wrapperEl.node),this.renderScale(),this.glare&&this.glare.render(this.props)}}componentDidMount(){if(this.tilt=new DJ,this.initGlare(),this.addEventListeners(),typeof CustomEvent>"u")return;const e=new CustomEvent("autoreset");this.mainLoop(e);const t=new CustomEvent("initial");this.emitOnMove(t)}componentWillUnmount(){this.wrapperEl.updateAnimationId!==null&&cancelAnimationFrame(this.wrapperEl.updateAnimationId),this.removeEventListeners()}componentDidUpdate(){const e=new CustomEvent("propChange");this.mainLoop(e),this.emitOnMove(e)}addEventListeners(){const{trackOnWindow:e,gyroscope:t}=this.props;window.addEventListener("resize",this.setSize),e&&(window.addEventListener("mouseenter",this.onEnter),window.addEventListener("mousemove",this.onMove),window.addEventListener("mouseout",this.onLeave),window.addEventListener("touchstart",this.onEnter),window.addEventListener("touchmove",this.onMove),window.addEventListener("touchend",this.onLeave)),t&&this.addDeviceOrientationEventListener()}removeEventListeners(){const{trackOnWindow:e,gyroscope:t}=this.props;window.removeEventListener("resize",this.setSize),e&&(window.removeEventListener("mouseenter",this.onEnter),window.removeEventListener("mousemove",this.onMove),window.removeEventListener("mouseout",this.onLeave),window.removeEventListener("touchstart",this.onEnter),window.removeEventListener("touchmove",this.onMove),window.removeEventListener("touchend",this.onLeave)),t&&window.DeviceOrientationEvent&&window.removeEventListener("deviceorientation",this.onMove)}setWrapperElSize(){const e=this.wrapperEl.node.getBoundingClientRect();this.wrapperEl.size.width=this.wrapperEl.node.offsetWidth,this.wrapperEl.size.height=this.wrapperEl.node.offsetHeight,this.wrapperEl.size.left=e.left+window.scrollX,this.wrapperEl.size.top=e.top+window.scrollY}initGlare(){const{glareEnable:e,glareBorderRadius:t}=this.props;e&&(this.glare=new IJ(this.wrapperEl.size,t),this.wrapperEl.node.appendChild(this.glare.glareWrapperEl))}emitOnMove(e){const{onMove:t}=this.props;if(!t)return;let i=0,r=0;this.glare&&(i=this.glare.glareAngle,r=this.glare.glareOpacity),t({tiltAngleX:this.tilt.tiltAngleX,tiltAngleY:this.tilt.tiltAngleY,tiltAngleXPercentage:this.tilt.tiltAngleXPercentage,tiltAngleYPercentage:this.tilt.tiltAngleYPercentage,glareAngle:i,glareOpacity:r,eventType:e.type})}resetWrapperElTransform(){this.wrapperEl.node.style.transform=""}renderPerspective(){const{perspective:e}=this.props;this.wrapperEl.node.style.transform+=`perspective(${e}px) `}renderScale(){const{scale:e}=this.wrapperEl;this.wrapperEl.node.style.transform+=`scale3d(${e},${e},${e})`}setTransitions(){const{transitionSpeed:e,transitionEasing:t}=this.props;yT(this.wrapperEl.node,"all",e,t),this.glare&&yT(this.glare.glareEl,"opacity",e,t)}render(){const{children:e,className:t,style:i}=this.props;return gr.createElement("div",{ref:r=>this.wrapperEl.node=r,onMouseEnter:this.onEnter,onMouseMove:this.onMove,onMouseLeave:this.onLeave,onTouchStart:this.onEnter,onTouchMove:this.onMove,onTouchEnd:this.onLeave,className:t,style:i},e)}}IL.defaultProps=FJ;function kJ({title:n,active:e,setSelected:t,id:i}){return ee("li",{className:e?"portfoliolist active":"portfoliolist",id:"portfoliolist",onClick:()=>t(i),children:n})}const NJ=({index:n,name:e,description:t,tags:i,image:r,source_code_link:s,source_link:o})=>ee(Ki.div,{whileInView:{opacity:1,transform:"none"},variants:aw("up","spring",n*.5,.75),children:Xe(IL,{options:{max:45,scale:1,speed:450},className:"project-box bg-tertiary p-5 rounded-2xl sm:w-[330px] w-full",children:[Xe("div",{className:"Box1 relative w-full h-[180px]",children:[ee("img",{src:r,alt:"project_image",className:"image w-full h-full object-cover rounded-2xl"}),ee("div",{className:"absolute inset-0 flex justify-center card-img_hover",style:{alignItems:"center"},children:ee("h3",{className:"text-black font-bold text-[16px]",children:e})}),Xe("div",{className:"title absolute inset-0 flex justify-end card-img_hover",children:[ee("div",{onClick:()=>window.open(o,"_blank"),className:"black-gradient w-10 h-10 m-2 rounded-full flex justify-center items-center cursor-pointer",children:ee("img",{src:Sj,alt:"source code",className:"w-1/2 h-1/2 object-contain"})}),ee("div",{onClick:()=>window.open(s,"_blank"),className:"black-gradient w-10 h-10 m-2 rounded-full flex justify-center items-center cursor-pointer",children:ee("img",{src:wj,alt:"source code",className:"w-1/2 h-1/2 object-contain"})})]})]}),ee("div",{className:"content mt-5",children:ee("p",{className:"mt-2 text-secondary text-[14px]",style:{textAlign:"justify"},children:t})}),ee("div",{className:"content mt-4 flex flex-wrap gap-2",children:i.map(a=>Xe("p",{className:`text-[14px] ${a.color}`,children:["#",a.name]},`${e}-${a.name}`))})]})}),OJ=()=>{const[n,e]=U.useState("java"),[t,i]=U.useState([]);return U.useEffect(()=>{switch(n){case"java":i(oJ);break;case"c++":i(pT);break;case"web":i(aJ);break;case"other":i(lJ);break;default:i(pT)}},[n]),Xe(ug,{children:[Xe(Ki.div,{whileInView:{opacity:1,transform:"none"},variants:hu(),children:[ee("p",{className:`${wn.sectionSubText} `,children:"My work"}),ee("h2",{className:`${wn.sectionHeadText}`,children:"Projects."})]}),ee("div",{className:"project w-full flex",children:Xe(Ki.p,{whileInView:{opacity:1,transform:"none"},variants:aw("","",.1,1),className:"mt-3 text-secondary text-[17px] leading-[30px]",children:[ee("ul",{children:sJ.map(r=>ee(kJ,{title:r.title,active:n===r.id,setSelected:e,id:r.id}))}),ee("div",{className:"box mt-20 flex flex-wrap justify-center",children:t.map((r,s)=>ee("div",{children:ee(NJ,{index:s,...r},`project-${s}`)}))})]})})]})},zJ=wl(OJ,"project");function UJ(n){return jr({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"}}]})(n)}function GJ(n){return jr({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"}},{tag:"path",attr:{d:"M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-2 12H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z"}}]})(n)}function HJ(n){return jr({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M4 16s-1 0-1-1 1-4 5-4 5 3 5 4-1 1-1 1H4Zm4-5.95a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5Z"}},{tag:"path",attr:{d:"M2 1a2 2 0 0 0-2 2v9.5A1.5 1.5 0 0 0 1.5 14h.653a5.373 5.373 0 0 1 1.066-2H1V3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v9h-2.219c.554.654.89 1.373 1.066 2h.653a1.5 1.5 0 0 0 1.5-1.5V3a2 2 0 0 0-2-2H2Z"}}]})(n)}function VJ(n){return jr({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M13.601 2.326A7.854 7.854 0 0 0 7.994 0C3.627 0 .068 3.558.064 7.926c0 1.399.366 2.76 1.057 3.965L0 16l4.204-1.102a7.933 7.933 0 0 0 3.79.965h.004c4.368 0 7.926-3.558 7.93-7.93A7.898 7.898 0 0 0 13.6 2.326zM7.994 14.521a6.573 6.573 0 0 1-3.356-.92l-.24-.144-2.494.654.666-2.433-.156-.251a6.56 6.56 0 0 1-1.007-3.505c0-3.626 2.957-6.584 6.591-6.584a6.56 6.56 0 0 1 4.66 1.931 6.557 6.557 0 0 1 1.928 4.66c-.004 3.639-2.961 6.592-6.592 6.592zm3.615-4.934c-.197-.099-1.17-.578-1.353-.646-.182-.065-.315-.099-.445.099-.133.197-.513.646-.627.775-.114.133-.232.148-.43.05-.197-.1-.836-.308-1.592-.985-.59-.525-.985-1.175-1.103-1.372-.114-.198-.011-.304.088-.403.087-.088.197-.232.296-.346.1-.114.133-.198.198-.33.065-.134.034-.248-.015-.347-.05-.099-.445-1.076-.612-1.47-.16-.389-.323-.335-.445-.34-.114-.007-.247-.007-.38-.007a.729.729 0 0 0-.529.247c-.182.198-.691.677-.691 1.654 0 .977.71 1.916.81 2.049.098.133 1.394 2.132 3.383 2.992.47.205.84.326 1.129.418.475.152.904.129 1.246.08.38-.058 1.171-.48 1.338-.943.164-.464.164-.86.114-.943-.049-.084-.182-.133-.38-.232z"}}]})(n)}const WJ=()=>{const n=U.useRef(),[e,t]=U.useState({name:"",email:"",message:""}),[i,r]=U.useState(!1),s=a=>{const{target:l}=a,{name:u,value:h}=l;t({...e,[u]:h})},o=async a=>{a.preventDefault();const l=new FormData(a.target);r(!0),l.append("access_key","5f5b91cf-2fc6-4dc3-9cd2-dc8838e33f09");const u=Object.fromEntries(l),h=JSON.stringify(u),d=await fetch("https://api.web3forms.com/submit",{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:h}).then(()=>{r(!1),alert("Thank you. I will get back to you as soon as possible."),t({name:"",email:"",message:""})},p=>{r(!1),console.error(p),alert("Ahh, something went wrong. Please try again.")});d.success&&console.log("Success",d)};return Xe("div",{className:"xl:mt-12 flex gap-2 overflow-hidden contact",children:[ee(Ki.div,{variants:dT("left","tween",.2,1),className:"flex-[0.5] xl:h-auto md:h-[600px] h-[400px] earth",children:ee(U6,{})}),Xe(Ki.div,{variants:dT("right","tween",.2,1),className:"flex-[0.5] bg-black-100 p-8 rounded-2xl earth",children:[ee("p",{className:wn.sectionSubText,children:"Get in touch"}),ee("h3",{className:wn.sectionHeadText,children:"Contact."}),Xe("form",{ref:n,onSubmit:o,className:"mt-3 flex flex-col gap-8 form1",children:[Xe("label",{className:"flex flex-col",children:[ee("span",{className:"text-white font-medium mb-3",children:"Your Name"}),ee("input",{type:"text",name:"name",value:e.name,onChange:s,placeholder:"What's your good name?",className:"bg-tertiary py-3 px-3 placeholder:text-secondary text-white rounded-lg border-none font-medium"})]}),Xe("label",{className:"flex flex-col",children:[ee("span",{className:"text-white font-medium mb-3",children:"Your email"}),ee("input",{type:"email",name:"email",value:e.email,onChange:s,placeholder:"What's your web address?",className:"bg-tertiary py-3 px-3 placeholder:text-secondary text-white rounded-lg border-none font-medium"})]}),Xe("label",{className:"flex flex-col",children:[ee("span",{className:"text-white font-medium mb-2",children:"Your Message"}),ee("textarea",{rows:7,name:"message",value:e.message,onChange:s,placeholder:"What you want to say?",className:"bg-tertiary py-3 px-3 placeholder:text-secondary text-white rounded-lg border-none font-medium"})]}),ee("button",{type:"submit",className:"bg-tertiary py-3 px-5 rounded-xl outline-none w-fit text-white font-bold shadow-md shadow-primary",children:i?"Sending...":"Send"})]}),Xe("div",{className:"mt-5 contact__options",children:[Xe("article",{className:"contact__option",children:[ee(UJ,{}),ee("a",{href:"mailto:aarti.rathi1710@gmail.com",target:"_blank",className:"blue-text-gradient",children:"aarti.rathi1710@gmail.com"})]}),Xe("article",{className:"contact__option",children:[ee(VJ,{}),ee("a",{href:"https://api.whatsapp.com/send/?phone=917040031669&text&app_absent=0&lang=en",target:"_blank",className:"blue-text-gradient",children:"+91 7040031669"})]})]})]})]})},jJ=wl(WJ,"contact");const JJ=()=>{const[n,e]=U.useState("#");return Xe("div",{className:"nav",children:[ee("a",{href:"#",onClick:()=>e("#"),className:n==="#"?"active":"",children:ee(mj,{})}),ee("a",{href:"#education",onClick:()=>e("#education"),className:n==="#education"?"active":"",children:ee(vj,{})}),ee("a",{href:"#project",onClick:()=>e("#project"),className:n==="#project"?"active":"",children:ee(dj,{})}),ee("a",{href:"#experience",onClick:()=>e("#experience"),className:n==="#experience"?"active":"",children:ee(HJ,{})}),ee("a",{href:"#contact",onClick:()=>e("#contact"),className:n==="#contact"?"active":"",children:ee(GJ,{})})]})};const XJ=()=>Xe(ug,{children:[ee(Ki.div,{id:"tech",variants:hu(),children:ee("h2",{className:`${wn.sectionHeadText} text-center`,children:"Profile Section"})}),ee("div",{className:"my-skills",children:nJ.map(n=>ee("div",{className:"skill","data-aos":"fade-up","data-aos-delay":"200",children:ee("div",{className:"icon-container",children:ee("a",{href:n.link,target:"_blank",children:ee("img",{src:n.icon})})})}))})]}),YJ=wl(XJ,"");const KJ=()=>Xe("div",{className:"mt-12 bg-black-100 rounded-[20px]",children:[ee("div",{className:`bg-tertiary rounded-2xl ${wn.padding}`,children:Xe(Ki.div,{variants:hu(),children:[ee("p",{className:wn.sectionSubText,children:"Some Glimpses on..."}),ee("h2",{className:wn.sectionHeadText,children:"Achievements."})]})}),ee("div",{className:`-mt-20 justify-center p-6 ${wn.paddingX} gap-7`,children:ee("ul",{className:"mt-5 list-disc ml-5 space-y-2",children:iJ.map(n=>ee("li",{className:"text-white-100 text-[15px] pl-1",children:n.title}))})})]}),QJ=wl(KJ,"");const ZJ=({index:n,branch:e,marks:t,name:i,degree:r,year:s,image:o})=>Xe(Ki.div,{variants:aw("","spring",n*.5,.75),className:"Box2 p-5 rounded-3xl xs:w-[320px] w-full",children:[Xe("div",{className:"mt-7 flex flex-col justify-between items-center gap-1",children:[ee("img",{src:o,alt:`feedback_by-${i}`,width:"80",height:"80",className:"rounded-full object-cover"}),Xe("div",{className:"mt-3 flex-1 flex flex-col",children:[ee("p",{className:"text-center text-white font-medium text-[16px]",children:ee("span",{className:"text-center blue-text-gradient",children:i})}),ee("p",{className:"text-center mt-1 text-secondary text-[12px]",children:s})]})]}),ee("p",{className:"text-white font-black text-[48px]",children:'"'}),Xe("div",{className:"mt-1",children:[ee("p",{className:"text-center text-white tracking-wider text-[18px]",children:r}),ee("p",{className:"mt-3 text-center pink-text-gradient",children:e}),ee("p",{className:"mt-3 text-center green-text-gradient",children:t})]})]}),qJ=()=>Xe("div",{className:"mt-12 bg-black-100 rounded-[20px]",children:[ee("div",{className:`bg-tertiary rounded-2xl ${wn.padding} min-h-[300px]`,children:Xe(Ki.div,{variants:hu(),children:[ee("p",{className:wn.sectionSubText,children:"Education Details..."}),ee("h2",{className:wn.sectionHeadText,children:"Education."})]})}),ee("div",{className:`-mt-20 justify-center pb-14 ${wn.paddingX} flex flex-wrap gap-7`,children:uJ.map((n,e)=>ee(ZJ,{index:e,...n},n.name))})]}),$J=wl(qJ,"education");const eX=()=>Xe("div",{className:"footer text-center",children:[Xe("p",{children:[" with ❤️ by",Xe("a",{href:"https://shinchancode.github.io/3d-react-portfolio/",target:"_blank",children:[" ","Aarti Rathi"]}),"😎"]}),Xe("p",{className:"pink-text-gradient",children:["No. of Visitors | ",ee("img",{className:"visitcounter",src:"https://hitwebcounter.com/counter/counter.php?page=9795911&style=0025&nbdigits=5&type=page&initCount=459",title:"Counter Widget",Alt:"Visit counter For Websites",border:"0"})]})]}),tX=()=>ee("div",{children:ee(wk,{children:Xe("div",{className:"relative z-0 bg-primary",children:[Xe("div",{className:"bg-hero-pattern bg-cover bg-no-repeat bg-center",children:[ee(eJ,{}),ee($j,{})]}),ee(JJ,{}),ee($J,{}),ee(zJ,{}),ee(RJ,{}),ee(QJ,{}),ee(YJ,{}),ee(hJ,{}),Xe("div",{className:"relative z-0",children:[ee(jJ,{}),ee($6,{})]}),ee(eX,{})]})})});tk.render(ee(gr.StrictMode,{children:ee(tX,{})}),document.getElementById("root")); diff --git a/assets/index-f4f97f5b.css b/assets/index-f4f97f5b.css deleted file mode 100644 index a7ab52e..0000000 --- a/assets/index-f4f97f5b.css +++ /dev/null @@ -1 +0,0 @@ -@import"https://fonts.googleapis.com/css2?family=Kalam:wght@700&display=swap";@import"https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800;900&display=swap";.ityped-cursor{animation:blink 2s infinite}@keyframes blink{50%{opacity:1}to{opacity:0}}.head1{top:80px}.head1 .head2{line-height:95px}@media (max-width: 1024px){.head1 .head2{line-height:70px}}.head1 .head2 .link1{line-height:40px;background:rgba(0,0,0,.3);width:-moz-max-content;width:max-content;display:block;display:flex;z-index:2;gap:.8rem;border-radius:3rem}.head1 .head2 .link1 a{background:transparent;padding:.9rem;border-radius:50%;display:flex;color:var(--color-light);font-size:2rem}.head1 .name{font-family:Kalam,cursive;font-weight:900}.imgcontainer1{right:4rem;top:6rem;width:300px;height:300px;border-radius:40%;display:flex;align-items:center;justify-content:center}@media (max-width: 830px){.imgcontainer1{width:200px;height:200px;right:5px}}@media (max-width: 540px){.imgcontainer1{display:none}}.imgcontainer1 img{height:90%;border-radius:45%}.top2{text-decoration:underline}.logo{border-radius:50%}.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(even):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(even):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(even):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(even):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(even):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)}}.portfoliolist{font-size:14px;margin:0 23px;padding:7px;font-weight:700;border-radius:10px;cursor:pointer;overflow:hidden}.portfoliolist li{justify-content:center;align-items:center}@media (max-width: 480px){.portfoliolist{margin:auto}}.portfoliolist.active{background-color:#398485;color:#fff}.project{display:flex;flex-direction:column;align-items:center}.project .project-box{height:500px}.project ul{margin:10px;padding:0;list-style:none;display:flex;justify-content:center}.project ul li{border:solid 2px #00e9ff;border-radius:10px}.project .Box1{cursor:pointer}.project .Box1 .image{z-index:1}.project .Box1 h3,.project .Box1 .title{opacity:0}.project .Box1:hover{background-color:#030325}.project .Box1:hover .image{opacity:.2;z-index:0}.project .Box1:hover h3{opacity:1;z-index:1;color:#fff}.project .Box1:hover .title{opacity:1;z-index:1}.project .box{gap:1.75rem}.contact__options{display:flex;flex-direction:column;gap:1.2rem}.contact__option{display:flex;flex-direction:row;padding:.6rem;border-radius:1.2rem;text-align:center;align-items:center;border:1px solid white;gap:.8rem}.contact__option:hover{text-decoration:underline}button{border:2px solid #49a891}.nav{background:rgba(0,0,0,.3);width:-moz-max-content;width:max-content;display:block;padding:.7rem 1.7rem;z-index:2;position:fixed;transform:translate(-50%);left:50%;bottom:1rem;display:flex;gap:.8rem;border-radius:3rem;-webkit-backdrop-filter:blur(15px);backdrop-filter:blur(15px)}.nav a{background:transparent;padding:.9rem;border-radius:50%;display:flex;color:var(--color-light);font-size:1.1rem}.nav a:hover{background:rgba(0,0,0,.3)}.nav a:active{background:var(--color-bg);color:var(--color-white)}.my-skills{margin-top:30px;display:flex;flex-wrap:wrap;align-items:center;justify-content:center;text-align:center}.my-skills .skill{margin:0 15px;display:flex;flex-direction:column;justify-content:center;align-items:center}.my-skills .skill .icon-container{width:70px;height:70px;margin-bottom:2rem;display:flex;transition:all 1s ease}.my-skills .skill .icon-container a{overflow:hidden}.my-skills .skill .icon-container a img,.my-skills .skill .icon-container img{width:70px;height:70px}.my-skills .skill .icon-container:hover{transform:scale(1.1)}.Box2{--tw-bg-opacity: 1;background-color:rgb(9 3 17/var(--tw-bg-opacity))}.footer{position:relative;bottom:2rem;padding-bottom:4rem}@media (max-width: 480px){.footer{font-size:12px}}.footer p a,.footer p h1{text-decoration:none;color:#6e6ef0}.footer .visitcounter{display:inline}*,: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-feature-settings:inherit;font-variation-settings: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}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0px}.bottom-32{bottom:8rem}.top-0{top:0px}.z-0{z-index:0}.z-20{z-index:20}.z-\[-1\]{z-index:-1}.m-2{margin:.5rem}.mx-auto{margin-left:auto;margin-right:auto}.-mt-20{margin-top:-5rem}.mb-1{margin-bottom:.25rem}.mb-3{margin-bottom:.75rem}.ml-5{margin-left:1.25rem}.mt-1{margin-top:.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}.mt-7{margin-top:1.75rem}.flex{display:flex}.hidden{display:none}.h-1\/2{height:50%}.h-10{height:2.5rem}.h-3{height:.75rem}.h-40{height:10rem}.h-5{height:1.25rem}.h-9{height:2.25rem}.h-\[180px\]{height:180px}.h-\[350px\]{height:350px}.h-\[60\%\]{height:60%}.h-\[64px\]{height:64px}.h-auto{height:auto}.h-full{height:100%}.h-screen{height:100vh}.min-h-\[300px\]{min-height:300px}.w-1{width:.25rem}.w-1\/2{width:50%}.w-10{width:2.5rem}.w-3{width:.75rem}.w-5{width:1.25rem}.w-9{width:2.25rem}.w-\[35px\]{width:35px}.w-\[60\%\]{width:60%}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.max-w-7xl{max-width:80rem}.flex-1{flex:1 1 0%}.flex-\[0\.75\]{flex:.75}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-pointer{cursor:pointer}.list-disc{list-style-type:disc}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.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}.gap-1{gap:.25rem}.gap-10{gap:2.5rem}.gap-2{gap:.5rem}.gap-5{gap:1.25rem}.gap-7{gap:1.75rem}.gap-8{gap:2rem}.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{border-width:1px}.border-4{border-width:4px}.border-none{border-style:none}.border-secondary{--tw-border-opacity: 1;border-color:rgb(170 166 195 / var(--tw-border-opacity))}.bg-\[\#915EFF\]{--tw-bg-opacity: 1;background-color:rgb(145 94 255 / var(--tw-bg-opacity))}.bg-black-100{--tw-bg-opacity: 1;background-color:rgb(16 13 37 / var(--tw-bg-opacity))}.bg-primary{--tw-bg-opacity: 1;background-color:rgb(5 8 22 / var(--tw-bg-opacity))}.bg-secondary{--tw-bg-opacity: 1;background-color:rgb(170 166 195 / var(--tw-bg-opacity))}.bg-tertiary{--tw-bg-opacity: 1;background-color:rgb(21 16 48 / var(--tw-bg-opacity))}.bg-transparent{background-color:transparent}.bg-hero-pattern{background-image:url(/3d-react-portfolio/assets/herobg-ecbfddc8.png)}.bg-cover{background-size:cover}.bg-center{background-position:center}.bg-no-repeat{background-repeat:no-repeat}.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}.px-3{padding-left:.75rem;padding-right:.75rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.pb-14{padding-bottom:3.5rem}.pl-1{padding-left:.25rem}.text-center{text-align:center}.text-\[12px\]{font-size:12px}.text-\[14px\]{font-size:14px}.text-\[15px\]{font-size:15px}.text-\[16px\]{font-size:16px}.text-\[17px\]{font-size:17px}.text-\[18px\]{font-size:18px}.text-\[24px\]{font-size:24px}.text-\[30px\]{font-size:30px}.text-\[40px\]{font-size:40px}.text-\[48px\]{font-size:48px}.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-\[\#915EFF\]{--tw-text-opacity: 1;color:rgb(145 94 255 / var(--tw-text-opacity))}.text-\[\#dfd9ff\]{--tw-text-opacity: 1;color:rgb(223 217 255 / var(--tw-text-opacity))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-secondary{--tw-text-opacity: 1;color:rgb(170 166 195 / 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))}.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-primary{--tw-shadow-color: #050816;--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.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;color-scheme:dark}.hash-span{margin-top:-100px;padding-bottom:50px;display:block}.black-gradient{background:#000000;background:linear-gradient(to right,#434343,#000000)}.violet-gradient{background:#804dee;background:linear-gradient(-90deg,#804dee 0%,rgba(60,51,80,0) 100%);background:-webkit-linear-gradient(-90deg,#804dee 0%,rgba(60,51,80,0) 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}}.placeholder\:text-secondary::-moz-placeholder{--tw-text-opacity: 1;color:rgb(170 166 195 / var(--tw-text-opacity))}.placeholder\:text-secondary::placeholder{--tw-text-opacity: 1;color:rgb(170 166 195 / var(--tw-text-opacity))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}@media (min-width: 450px){.xs\:bottom-10{bottom:2.5rem}.xs\:w-\[320px\]{width:320px}.xs\:text-\[20px\]{font-size:20px}.xs\:text-\[40px\]{font-size:40px}}@media (min-width: 640px){.sm\:block{display:block}.sm\:flex{display:flex}.sm\:h-80{height:20rem}.sm\:w-\[330px\]{width:330px}.sm\:px-16{padding-left:4rem;padding-right:4rem}.sm\:px-4{padding-left:1rem;padding-right:1rem}.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}}@media (min-width: 768px){.md\:h-\[550px\]{height:550px}.md\:text-\[60px\]{font-size:60px}}@media (min-width: 1024px){.lg\:text-\[30px\]{font-size:30px}.lg\:text-\[80px\]{font-size:80px}}@media (min-width: 1280px){.xl\:mt-12{margin-top:3rem}.xl\:h-auto{height:auto}.xl\:flex-1{flex:1 1 0%}.xl\:flex-row{flex-direction:row}} diff --git a/index.html b/index.html index cdea790..645d822 100644 --- a/index.html +++ b/index.html @@ -11,8 +11,8 @@ Aarti Rathi - - + +