PageSourceSearch

https://christmas2-challenge.vercel.app/assets/index-Bto6XQFO.js

js christmas2-challenge.vercel.app collected 2026-10-03 05:15:44 UTC 508,069 bytes, 83 lines download raw bytes

vendor: 5,794 bytes, lines 1-9
1function tx(f,t){for(var e=0;e<t.length;e++){const i=t[e];if(typeof i!="string"&&!Array.isArray(i)){for(const s in i)if(s!=="default"&&!(s in f)){const o=Object.getOwnPropertyDescriptor(i,s);o&&Object.defineProperty(f,s,o.get?o:{enumerable:!0,get:()=>i[s]})}}}return Object.freeze(Object.defineProperty(f,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&i(l)}).observe(document,{childList:!0,subtree:!0});function e(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function i(s){if(s.ep)return;s.ep=!0;const o=e(s);fetch(s.href,o)}})();function ex(f){return f&&f.__esModule&&Object.prototype.hasOwnProperty.call(f,"default")?f.default:f}var Ih={exports:{}},Xr={},Eh={exports:{}},Mt={};/**
2 * @license React
3 * react.production.min.js
4 *
5 * Copyright (c) Facebook, Inc. and its affiliates.
6 *
7 * This source code is licensed under the MIT license found in the
8 * LICENSE file in the root directory of this source tree.
9 */var Jp;function nx(){if(Jp)return Mt;Jp=1;var f=Symbol.for("react.element"),t=Symbol.for("react.portal"),e=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),y=Symbol.iterator;function x(P){return P===null||typeof P!="object"?null:(P=y&&P[y]||P["@@iterator"],typeof P=="function"?P:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,S={};function _(P,V,dt){this.props=P,this.context=V,this.refs=S,this.updater=dt||v}_.prototype.isReactComponent={},_.prototype.setState=function(P,V){if(typeof P!="object"&&typeof P!="function"&&P!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,P,V,"setState")},_.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function b(){}b.prototype=_.prototype;function A(P,V,dt){this.props=P,this.context=V,this.refs=S,this.updater=dt||v}var C=A.prototype=new b;C.constructor=A,w(C,_.prototype),C.isPureReactComponent=!0;var k=Array.isArray,N=Object.prototype.hasOwnProperty,B={current:null},D={key:!0,ref:!0,__self:!0,__source:!0};function L(P,V,dt){var vt,bt={},Tt=null,At=null;if(V!=null)for(vt in V.ref!==void 0&&(At=V.ref),V.key!==void 0&&(Tt=""+V.key),V)N.call(V,vt)&&!D.hasOwnProperty(vt)&&(bt[vt]=V[vt]);var zt=arguments.length-2;if(zt===1)bt.children=dt;else if(1<zt){for(var Ot=Array(zt),Gt=0;Gt<zt;Gt++)Ot[Gt]=arguments[Gt+2];bt.children=Ot}if(P&&P.defaultProps)for(vt in zt=P.defaultProps,zt)bt[vt]===void 0&&(bt[vt]=zt[vt]);return{$$typeof:f,type:P,key:Tt,ref:At,props:bt,_owner:B.current}}function q(P,V){return{$$typeof:f,type:P.type,key:V,ref:P.ref,props:P.props,_owner:P._owner}}function J(P){return typeof P=="object"&&P!==null&&P.$$typeof===f}function it(P){var V={"=":"=0",":":"=2"};return"$"+P.replace(/[=:]/g,function(dt){return V[dt]})}var ct=/\/+/g;function ht(P,V){return typeof P=="object"&&P!==null&&P.key!=null?it(""+P.key):V.toString(36)}function mt(P,V,dt,vt,bt){var Tt=typeof P;(Tt==="undefined"||Tt==="boolean")&&(P=null);var At=!1;if(P===null)At=!0;else switch(Tt){case"string":case"number":At=!0;break;case"object":switch(P.$$typeof){case f:case t:At=!0}}if(At)return At=P,bt=bt(At),P=vt===""?"."+ht(At,0):vt,k(bt)?(dt="",P!=null&&(dt=P.replace(ct,"$&/")+"/"),mt(bt,V,dt,"",function(Gt){return Gt})):bt!=null&&(J(bt)&&(bt=q(bt,dt+(!bt.key||At&&At.key===bt.key?"":(""+bt.key).replace(ct,"$&/")+"/")+P)),V.push(bt)),1;if(At=0,vt=vt===""?".":vt+":",k(P))for(var zt=0;zt<P.length;zt++){Tt=P[zt];var Ot=vt+ht(Tt,zt);At+=mt(Tt,V,dt,Ot,bt)}else if(Ot=x(P),typeof Ot=="function")for(P=Ot.call(P),zt=0;!(Tt=P.next()).done;)Tt=Tt.value,Ot=vt+ht(Tt,zt++),At+=mt(Tt,V,dt,Ot,bt);else if(Tt==="object")throw V=String(P),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(P).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.");return At}function kt(P,V,dt){if(P==null)return P;var vt=[],bt=0;return mt(P,vt,"","",function(Tt){return V.call(dt,Tt,bt++)}),vt}function _t(P){if(P._status===-1){var V=P._result;V=V(),V.then(function(dt){(P._status===0||P._status===-1)&&(P._status=1,P._result=dt)},function(dt){(P._status===0||P._status===-1)&&(P._status=2,P._result=dt)}),P._status===-1&&(P._status=0,P._result=V)}if(P._status===1)return P._result.default;throw P._result}var Ct={current:null},Z={transition:null},j={ReactCurrentDispatcher:Ct,ReactCurrentBatchConfig:Z,ReactCurrentOwner:B};function Y(){throw Error("act(...) is not supported in production builds of React.")}return Mt.Children={map:kt,forEach:function(P,V,dt){kt(P,function(){V.apply(this,arguments)},dt)},count:function(P){var V=0;return kt(P,function(){V++}),V},toArray:function(P){return kt(P,function(V){return V})||[]},only:function(P){if(!J(P))throw Error("React.Children.only expected to receive a single React element child.");return P}},Mt.Component=_,Mt.Fragment=e,Mt.Profiler=s,Mt.PureComponent=A,Mt.StrictMode=i,Mt.Suspense=h,Mt.__SECRET_INT
vendor: 4,185 bytes, lines 9-25
9ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=j,Mt.act=Y,Mt.cloneElement=function(P,V,dt){if(P==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+P+".");var vt=w({},P.props),bt=P.key,Tt=P.ref,At=P._owner;if(V!=null){if(V.ref!==void 0&&(Tt=V.ref,At=B.current),V.key!==void 0&&(bt=""+V.key),P.type&&P.type.defaultProps)var zt=P.type.defaultProps;for(Ot in V)N.call(V,Ot)&&!D.hasOwnProperty(Ot)&&(vt[Ot]=V[Ot]===void 0&&zt!==void 0?zt[Ot]:V[Ot])}var Ot=arguments.length-2;if(Ot===1)vt.children=dt;else if(1<Ot){zt=Array(Ot);for(var Gt=0;Gt<Ot;Gt++)zt[Gt]=arguments[Gt+2];vt.children=zt}return{$$typeof:f,type:P.type,key:bt,ref:Tt,props:vt,_owner:At}},Mt.createContext=function(P){return P={$$typeof:l,_currentValue:P,_currentValue2:P,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},P.Provider={$$typeof:o,_context:P},P.Consumer=P},Mt.createElement=L,Mt.createFactory=function(P){var V=L.bind(null,P);return V.type=P,V},Mt.createRef=function(){return{current:null}},Mt.forwardRef=function(P){return{$$typeof:u,render:P}},Mt.isValidElement=J,Mt.lazy=function(P){return{$$typeof:m,_payload:{_status:-1,_result:P},_init:_t}},Mt.memo=function(P,V){return{$$typeof:d,type:P,compare:V===void 0?null:V}},Mt.startTransition=function(P){var V=Z.transition;Z.transition={};try{P()}finally{Z.transition=V}},Mt.unstable_act=Y,Mt.useCallback=function(P,V){return Ct.current.useCallback(P,V)},Mt.useContext=function(P){return Ct.current.useContext(P)},Mt.useDebugValue=function(){},Mt.useDeferredValue=function(P){return Ct.current.useDeferredValue(P)},Mt.useEffect=function(P,V){return Ct.current.useEffect(P,V)},Mt.useId=function(){return Ct.current.useId()},Mt.useImperativeHandle=function(P,V,dt){return Ct.current.useImperativeHandle(P,V,dt)},Mt.useInsertionEffect=function(P,V){return Ct.current.useInsertionEffect(P,V)},Mt.useLayoutEffect=function(P,V){return Ct.current.useLayoutEffect(P,V)},Mt.useMemo=function(P,V){return Ct.current.useMemo(P,V)},Mt.useReducer=function(P,V,dt){return Ct.current.useReducer(P,V,dt)},Mt.useRef=function(P){return Ct.current.useRef(P)},Mt.useState=function(P){return Ct.current.useState(P)},Mt.useSyncExternalStore=function(P,V,dt){return Ct.current.useSyncExternalStore(P,V,dt)},Mt.useTransition=function(){return Ct.current.useTransition()},Mt.version="18.3.1",Mt}var $p;function kc(){return $p||($p=1,Eh.exports=nx()),Eh.exports}/**
10 * @license React
11 * react-jsx-runtime.production.min.js
12 *
13 * Copyright (c) Facebook, Inc. and its affiliates.
14 *
15 * This source code is licensed under the MIT license found in the
16 * LICENSE file in the root directory of this source tree.
17 */var jp;function ix(){if(jp)return Xr;jp=1;var f=kc(),t=Symbol.for("react.element"),e=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,s=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function l(u,h,d){var m,y={},x=null,v=null;d!==void 0&&(x=""+d),h.key!==void 0&&(x=""+h.key),h.ref!==void 0&&(v=h.ref);for(m in h)i.call(h,m)&&!o.hasOwnProperty(m)&&(y[m]=h[m]);if(u&&u.defaultProps)for(m in h=u.defaultProps,h)y[m]===void 0&&(y[m]=h[m]);return{$$typeof:t,type:u,key:x,ref:v,props:y,_owner:s.current}}return Xr.Fragment=e,Xr.jsx=l,Xr.jsxs=l,Xr}var Qp;function sx(){return Qp||(Qp=1,Ih.exports=ix()),Ih.exports}var Gn=sx(),El=kc();const gl=ex(El),wM=tx({__proto__:null,default:gl},[El]);var ka={},Ph={exports:{}},Pe={},Fh={exports:{}},Rh={};/**
18 * @license React
19 * scheduler.production.min.js
20 *
21 * Copyright (c) Facebook, Inc. and its affiliates.
22 *
23 * This source code is licensed under the MIT license found in the
24 * LICENSE file in the root directory of this source tree.
25 */var Kp;function rx(){return Kp||(Kp=1,function(f){function t(Z,j){var Y=Z.length;Z.push(j);t:for(;0<Y;){var P=Y-1>>>1,V=Z[P];if(0<s(V,j))Z[P]=j,Z[Y]=V,Y=P;else break t}}function e(Z){return Z.length===0?null:Z[0]}function i(Z){if(Z.length===0)return null;var j=Z[0],Y=Z.pop();if(Y!==j){Z[0]=Y;t:for(var P=0,V=Z.length,dt=V>>>1;P<dt;){var vt=2*(P+1)-1,bt=Z[vt],Tt=vt+1,At=Z[Tt];if(0>s(bt,Y))Tt<V&&0>s(At,bt)?(Z[P]=At,Z[Tt]=Y,P=Tt):(Z[P]=bt,Z[vt]=Y,P=vt);
vendor: 5,116 bytes, lines 25-33
25else if(Tt<V&&0>s(At,Y))Z[P]=At,Z[Tt]=Y,P=Tt;else break t}}return j}function s(Z,j){var Y=Z.sortIndex-j.sortIndex;return Y!==0?Y:Z.id-j.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;f.unstable_now=function(){return o.now()}}else{var l=Date,u=l.now();f.unstable_now=function(){return l.now()-u}}var h=[],d=[],m=1,y=null,x=3,v=!1,w=!1,S=!1,_=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function C(Z){for(var j=e(d);j!==null;){if(j.callback===null)i(d);else if(j.startTime<=Z)i(d),j.sortIndex=j.expirationTime,t(h,j);else break;j=e(d)}}function k(Z){if(S=!1,C(Z),!w)if(e(h)!==null)w=!0,_t(N);else{var j=e(d);j!==null&&Ct(k,j.startTime-Z)}}function N(Z,j){w=!1,S&&(S=!1,b(L),L=-1),v=!0;var Y=x;try{for(C(j),y=e(h);y!==null&&(!(y.expirationTime>j)||Z&&!it());){var P=y.callback;if(typeof P=="function"){y.callback=null,x=y.priorityLevel;var V=P(y.expirationTime<=j);j=f.unstable_now(),typeof V=="function"?y.callback=V:y===e(h)&&i(h),C(j)}else i(h);y=e(h)}if(y!==null)var dt=!0;else{var vt=e(d);vt!==null&&Ct(k,vt.startTime-j),dt=!1}return dt}finally{y=null,x=Y,v=!1}}var B=!1,D=null,L=-1,q=5,J=-1;function it(){return!(f.unstable_now()-J<q)}function ct(){if(D!==null){var Z=f.unstable_now();J=Z;var j=!0;try{j=D(!0,Z)}finally{j?ht():(B=!1,D=null)}}else B=!1}var ht;if(typeof A=="function")ht=function(){A(ct)};else if(typeof MessageChannel<"u"){var mt=new MessageChannel,kt=mt.port2;mt.port1.onmessage=ct,ht=function(){kt.postMessage(null)}}else ht=function(){_(ct,0)};function _t(Z){D=Z,B||(B=!0,ht())}function Ct(Z,j){L=_(function(){Z(f.unstable_now())},j)}f.unstable_IdlePriority=5,f.unstable_ImmediatePriority=1,f.unstable_LowPriority=4,f.unstable_NormalPriority=3,f.unstable_Profiling=null,f.unstable_UserBlockingPriority=2,f.unstable_cancelCallback=function(Z){Z.callback=null},f.unstable_continueExecution=function(){w||v||(w=!0,_t(N))},f.unstable_forceFrameRate=function(Z){0>Z||125<Z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):q=0<Z?Math.floor(1e3/Z):5},f.unstable_getCurrentPriorityLevel=function(){return x},f.unstable_getFirstCallbackNode=function(){return e(h)},f.unstable_next=function(Z){switch(x){case 1:case 2:case 3:var j=3;break;default:j=x}var Y=x;x=j;try{return Z()}finally{x=Y}},f.unstable_pauseExecution=function(){},f.unstable_requestPaint=function(){},f.unstable_runWithPriority=function(Z,j){switch(Z){case 1:case 2:case 3:case 4:case 5:break;default:Z=3}var Y=x;x=Z;try{return j()}finally{x=Y}},f.unstable_scheduleCallback=function(Z,j,Y){var P=f.unstable_now();switch(typeof Y=="object"&&Y!==null?(Y=Y.delay,Y=typeof Y=="number"&&0<Y?P+Y:P):Y=P,Z){case 1:var V=-1;break;case 2:V=250;break;case 5:V=1073741823;break;case 4:V=1e4;break;default:V=5e3}return V=Y+V,Z={id:m++,callback:j,priorityLevel:Z,startTime:Y,expirationTime:V,sortIndex:-1},Y>P?(Z.sortIndex=Y,t(d,Z),e(h)===null&&Z===e(d)&&(S?(b(L),L=-1):S=!0,Ct(k,Y-P))):(Z.sortIndex=V,t(h,Z),w||v||(w=!0,_t(N))),Z},f.unstable_shouldYield=it,f.unstable_wrapCallback=function(Z){var j=x;return function(){var Y=x;x=j;try{return Z.apply(this,arguments)}finally{x=Y}}}}(Rh)),Rh}var tm;function ox(){return tm||(tm=1,Fh.exports=rx()),Fh.exports}/**
26 * @license React
27 * react-dom.production.min.js
28 *
29 * Copyright (c) Facebook, Inc. and its affiliates.
30 *
31 * This source code is licensed under the MIT license found in the
32 * LICENSE file in the root directory of this source tree.
33 */var em;function ax(){if(em)return Pe;em=1;var f=kc(),t=ox();function e(n){for(var r="https://reactjs.org/docs/error-decoder.html?invariant="+n,a=1;a<arguments.length;a++)r+="&args[]="+encodeURIComponent(arguments[a]);return"Minified React error #"+n+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i=new Set,s={};function o(n,r){l(n,r),l(n+"Capture",r)}function l(n,r){for(s[n]=r,n=0;n<r.length;n++)i.add(r[n])}var u=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),h=Object.prototype.hasOwnProperty,d=/^[: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]*$/,m={},y={};function x(n){return h.call(y,n)?!0:h.call(m,n)?!1:d.test(n)?y[n]=!0:(m[n]=!0,!1)}function v(n,r,a,c){if(a!==null&&a.type===0)return!1;switch(typeof r){case"function":case"symbol":return!0;case"boolean":return c?!1:a!==null?!a.acceptsBooleans:(n=n.toLowerCase().slice(0,5),n!=="data-"&&n!=="aria-");default:return!1}}function w(n,r,a,c){if(r===null||typeof r>"u"||v(n,r,a,c))return!0;
vendor: 8,949 bytes, lines 33-37
33if(c)return!1;if(a!==null)switch(a.type){case 3:return!r;case 4:return r===!1;case 5:return isNaN(r);case 6:return isNaN(r)||1>r}return!1}function S(n,r,a,c,p,g,M){this.acceptsBooleans=r===2||r===3||r===4,this.attributeName=c,this.attributeNamespace=p,this.mustUseProperty=a,this.propertyName=n,this.type=r,this.sanitizeURL=g,this.removeEmptyString=M}var _={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(n){_[n]=new S(n,0,!1,n,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(n){var r=n[0];_[r]=new S(r,1,!1,n[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(n){_[n]=new S(n,2,!1,n.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(n){_[n]=new S(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){_[n]=new S(n,3,!1,n.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(n){_[n]=new S(n,3,!0,n,null,!1,!1)}),["capture","download"].forEach(function(n){_[n]=new S(n,4,!1,n,null,!1,!1)}),["cols","rows","size","span"].forEach(function(n){_[n]=new S(n,6,!1,n,null,!1,!1)}),["rowSpan","start"].forEach(function(n){_[n]=new S(n,5,!1,n.toLowerCase(),null,!1,!1)});var b=/[\-:]([a-z])/g;function A(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 r=n.replace(b,A);_[r]=new S(r,1,!1,n,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(n){var r=n.replace(b,A);_[r]=new S(r,1,!1,n,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(n){var r=n.replace(b,A);_[r]=new S(r,1,!1,n,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(n){_[n]=new S(n,1,!1,n.toLowerCase(),null,!1,!1)}),_.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(n){_[n]=new S(n,1,!1,n.toLowerCase(),null,!0,!0)});function C(n,r,a,c){var p=_.hasOwnProperty(r)?_[r]:null;(p!==null?p.type!==0:c||!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(w(r,a,p,c)&&(a=null),c||p===null?x(r)&&(a===null?n.removeAttribute(r):n.setAttribute(r,""+a)):p.mustUseProperty?n[p.propertyName]=a===null?p.type===3?!1:"":a:(r=p.attributeName,c=p.attributeNamespace,a===null?n.removeAttribute(r):(p=p.type,a=p===3||p===4&&a===!0?"":""+a,c?n.setAttributeNS(c,r,a):n.setAttribute(r,a))))}var k=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,N=Symbol.for("react.element"),B=Symbol.for("react.portal"),D=Symbol.for("react.fragment"),L=Symbol.for("react.strict_mode"),q=Symbol.for("react.profiler"),J=Symbol.for("react.provider"),it=Symbol.for("react.context"),ct=Symbol.for("react.forward_ref"),ht=Symbol.for("react.suspense"),mt=Symbol.for("react.suspense_list"),kt=Symbol.for("react.memo"),_t=Symbol.for("react.lazy"),Ct=Symbol.for("react.offscreen"),Z=Symbol.iterator;function j(n){return n===null||typeof n!="object"?null:(n=Z&&n[Z]||n["@@iterator"],typeof n=="function"?n:null)}var Y=Object.assign,P;function V(n){if(P===void 0)try{throw Error()}catch(a){var r=a.stack.trim().match(/\n( *(at )?)/);P=r&&r[1]||""}return`
34`+P+n}var dt=!1;function vt(n,r){if(!n||dt)return"";dt=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(r)if(r=function(){throw Error()},Object.defineProperty(r.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(r,[])}catch(O){var c=O}Reflect.construct(n,[],r)}else{try{r.call()}catch(O){c=O}n.call(r.prototype)}else{try{throw Error()}catch(O){c=O}n()}}catch(O){if(O&&c&&typeof O.stack=="string"){for(var p=O.stack.split(`
35`),g=c.stack.split(`
36`),M=p.length-1,T=g.length-1;1<=M&&0<=T&&p[M]!==g[T];)T--;for(;1<=M&&0<=T;M--,T--)if(p[M]!==g[T]){if(M!==1||T!==1)do if(M--,T--,0>T||p[M]!==g[T]){var I=`
37`+p[M].replace(" at new "," at ");return n.displayName&&I.includes("<anonymous>")&&(I=I.replace("<anonymous>",n.displayName)),I}while(1<=M&&0<=T);break}}}finally{dt=!1,Error.prepareStackTrace=a}return(n=n?n.displayName||n.name:"")?V(n):""}function bt(n){switch(n.tag){case 5:return V(n.type);case 16:return V("Lazy");case 13:return V("Suspense");case 19:return V("SuspenseList");case 0:case 2:case 15:return n=vt(n.type,!1),n;case 11:return n=vt(n.type.render,!1),n;case 1:return n=vt(n.type,!0),n;default:return""}}function Tt(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 D:return"Fragment";case B:return"Portal";case q:return"Profiler";case L:return"StrictMode";case ht:return"Suspense";case mt:return"SuspenseList"}if(typeof n=="object")switch(n.$$typeof){case it:return(n.displayName||"Context")+".Consumer";case J:return(n._context.displayName||"Context")+".Provider";case ct:var r=n.render;return n=n.displayName,n||(n=r.displayName||r.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case kt:return r=n.displayName||null,r!==null?r:Tt(n.type)||"Memo";case _t:r=n._payload,n=n._init;try{return Tt(n(r))}catch{}}return null}function At(n){var r=n.type;switch(n.tag){case 24:return"Cache";case 9:return(r.displayName||"Context")+".Consumer";case 10:return(r._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return n=r.render,n=n.displayName||n.name||"",r.displayName||(n!==""?"ForwardRef("+n+")":"ForwardRef");case 7:return"Fragment";case 5:return r;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Tt(r);case 8:return r===L?"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 r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r}return null}function zt(n){switch(typeof n){case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Ot(n){var r=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function Gt(n){var r=Ot(n)?"checked":"value",a=Object.getOwnPropertyDescriptor(n.constructor.prototype,r),c=""+n[r];if(!n.hasOwnProperty(r)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var p=a.get,g=a.set;return Object.defineProperty(n,r,{configurable:!0,get:function(){return p.call(this)},set:function(M){c=""+M,g.call(this,M)}}),Object.defineProperty(n,r,{enumerable:a.enumerable}),{getValue:function(){return c},setValue:function(M){c=""+M},stopTracking:function(){n._valueTracker=null,delete n[r]}}}}function Ce(n){n._valueTracker||(n._valueTracker=Gt(n))}function $(n){if(!n)return!1;var r=n._valueTracker;if(!r)return!0;var a=r.getValue(),c="";return n&&(c=Ot(n)?n.checked?"true":"false":n.value),n=c,n!==a?(r.setValue(n),!0):!1}function K(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 tt(n,r){var a=r.checked;return Y({},r,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:a??n._wrapperState.initialChecked})}function ft(n,r){var a=r.defaultValue==null?"":r.defaultValue,c=r.checked!=null?r.checked:r.defaultChecked;a=zt(r.value!=null?r.value:a),n._wrapperState={initialChecked:c,initialValue:a,controlled:r.type==="checkbox"||r.type==="radio"?r.checked!=null:r.value!=null}}
vendor: 4,647 bytes, line 37
37function rt(n,r){r=r.checked,r!=null&&C(n,"checked",r,!1)}function It(n,r){rt(n,r);var a=zt(r.value),c=r.type;if(a!=null)c==="number"?(a===0&&n.value===""||n.value!=a)&&(n.value=""+a):n.value!==""+a&&(n.value=""+a);else if(c==="submit"||c==="reset"){n.removeAttribute("value");return}r.hasOwnProperty("value")?Lt(n,r.type,a):r.hasOwnProperty("defaultValue")&&Lt(n,r.type,zt(r.defaultValue)),r.checked==null&&r.defaultChecked!=null&&(n.defaultChecked=!!r.defaultChecked)}function Pt(n,r,a){if(r.hasOwnProperty("value")||r.hasOwnProperty("defaultValue")){var c=r.type;if(!(c!=="submit"&&c!=="reset"||r.value!==void 0&&r.value!==null))return;r=""+n._wrapperState.initialValue,a||r===n.value||(n.value=r),n.defaultValue=r}a=n.name,a!==""&&(n.name=""),n.defaultChecked=!!n._wrapperState.initialChecked,a!==""&&(n.name=a)}function Lt(n,r,a){(r!=="number"||K(n.ownerDocument)!==n)&&(a==null?n.defaultValue=""+n._wrapperState.initialValue:n.defaultValue!==""+a&&(n.defaultValue=""+a))}var jt=Array.isArray;function Wt(n,r,a,c){if(n=n.options,r){r={};for(var p=0;p<a.length;p++)r["$"+a[p]]=!0;for(a=0;a<n.length;a++)p=r.hasOwnProperty("$"+n[a].value),n[a].selected!==p&&(n[a].selected=p),p&&c&&(n[a].defaultSelected=!0)}else{for(a=""+zt(a),r=null,p=0;p<n.length;p++){if(n[p].value===a){n[p].selected=!0,c&&(n[p].defaultSelected=!0);return}r!==null||n[p].disabled||(r=n[p])}r!==null&&(r.selected=!0)}}function kn(n,r){if(r.dangerouslySetInnerHTML!=null)throw Error(e(91));return Y({},r,{value:void 0,defaultValue:void 0,children:""+n._wrapperState.initialValue})}function is(n,r){var a=r.value;if(a==null){if(a=r.children,r=r.defaultValue,a!=null){if(r!=null)throw Error(e(92));if(jt(a)){if(1<a.length)throw Error(e(93));a=a[0]}r=a}r==null&&(r=""),a=r}n._wrapperState={initialValue:zt(a)}}function Ze(n,r){var a=zt(r.value),c=zt(r.defaultValue);a!=null&&(a=""+a,a!==n.value&&(n.value=a),r.defaultValue==null&&n.defaultValue!==a&&(n.defaultValue=a)),c!=null&&(n.defaultValue=""+c)}function lr(n){var r=n.textContent;r===n._wrapperState.initialValue&&r!==""&&r!==null&&(n.value=r)}function ur(n){switch(n){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ss(n,r){return n==null||n==="http://www.w3.org/1999/xhtml"?ur(r):n==="http://www.w3.org/2000/svg"&&r==="foreignObject"?"http://www.w3.org/1999/xhtml":n}var rs,wo=function(n){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(r,a,c,p){MSApp.execUnsafeLocalFunction(function(){return n(r,a,c,p)})}:n}(function(n,r){if(n.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in n)n.innerHTML=r;else{for(rs=rs||document.createElement("div"),rs.innerHTML="<svg>"+r.valueOf().toString()+"</svg>",r=rs.firstChild;n.firstChild;)n.removeChild(n.firstChild);for(;r.firstChild;)n.appendChild(r.firstChild)}});function Jn(n,r){if(r){var a=n.firstChild;if(a&&a===n.lastChild&&a.nodeType===3){a.nodeValue=r;return}}n.textContent=r}var $n={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},r0=["Webkit","ms","Moz","O"];Object.keys($n).forEach(function(n){r0.forEach(function(r){r=r+n.charAt(0).toUpperCase()+n.substring(1),$n[r]=$n[n]})});function ud(n,r,a){return r==null||typeof r=="boolean"||r===""?"":a||typeof r!="number"||r===0||$n.hasOwnProperty(n)&&$n[n]?(""+r).trim():r+"px"}function hd(n,r){n=n.style;for(var a in r)if(r.hasOwnProperty(a)){var c=a.indexOf("--")===0,p=ud(a,r[a],c);a==="float"&&(a="cssFloat"),c?n.setProperty(a,p):n[a]=p}}var o0=Y({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 Wl(n,r){if(r){if(o0[n]&&(r.children!=null||r.dangerouslySetInnerHTML!=null))throw Error(e(137,n));if(r.dangerouslySetInnerHTML!=null){if(r.children!=null)throw Error(e(60));if(typeof r.dangerouslySetInnerHTML!="object"||!("__html"in r.dangerouslySetInnerHTML))throw Error(e(61))}if(r.style!=null&&typeof r.style!="object")throw Error(e(62))}}function Hl(n,r){if(n.indexOf("-")===-1)return typeof r.is=="str
37ing";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 Gl=null;function ql(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var Xl=null,os=null,as=null;function cd(n){if(n=Er(n)){if(typeof Xl!="function")throw Error(e(280));var r=n.stateNode;r&&(r=Ho(r),Xl(n.stateNode,n.type,r))}}function dd(n){os?as?as.push(n):as=[n]:os=n}function fd(){if(os){var n=os,r=as;if(as=os=null,cd(n),r)for(n=0;n<r.length;n++)cd(r[n])}}function pd(n,r){return n(r)}function md(){}var Yl=!1;function yd(n,r,a){if(Yl)return n(r,a);Yl=!0;try{return pd(n,r,a)}finally{Yl=!1,(os!==null||as!==null)&&(md(),fd())}}function hr(n,r){var a=n.stateNode;if(a===null)return null;var c=Ho(a);if(c===null)return null;a=c[r];t:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(n=n.type,c=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!c;break t;default:n=!1}if(n)return null;if(a&&typeof a!="function")throw Error(e(231,r,typeof a));return a}var Zl=!1;if(u)try{var cr={};Object.defineProperty(cr,"passive",{get:function(){Zl=!0}}),window.addEventListener("test",cr,cr),window.removeEventListener("test",cr,cr)}catch{Zl=!1}function a0(n,r,a,c,p,g,M,T,I){var O=Array.prototype.slice.call(arguments,3);try{r.apply(a,O)}catch(W){this.onError(W)}}var dr=!1,Mo=null,So=!1,Jl=null,l0={onError:function(n){dr=!0,Mo=n}};function u0(n,r,a,c,p,g,M,T,I){dr=!1,Mo=null,a0.apply(l0,arguments)}function h0(n,r,a,c,p,g,M,T,I){if(u0.apply(this,arguments),dr){if(dr){var O=Mo;dr=!1,Mo=null}else throw Error(e(198));So||(So=!0,Jl=O)}}function Ti(n){var r=n,a=n;if(n.alternate)for(;r.return;)r=r.return;else{n=r;do r=n,r.flags&4098&&(a=r.return),n=r.return;while(n)}return r.tag===3?a:null}function gd(n){if(n.tag===13){var r=n.memoizedState;if(r===null&&(n=n.alternate,n!==null&&(r=n.memoizedState)),r!==null)return r.dehydrated}return null}function xd(n){if(Ti(n)!==n)throw Error(e(188))}function c0(n){var r=n.alternate;if(!r){if(r=Ti(n),r===null)throw Error(e(188));return r!==n?null:n}for(var a=n,c=r;;){var p=a.return;if(p===null)break;var g=p.alternate;if(g===null){if(c=p.return,c!==null){a=c;continue}break}if(p.child===g.child){for(g=p.child;g;){if(g===a)return xd(p),n;if(g===c)return xd(p),r;g=g.sibling}throw Error(e(188))}if(a.return!==c.return)a=p,c=g;else{for(var M=!1,T=p.child;T;){if(T===a){M=!0,a=p,c=g;break}if(T===c){M=!0,c=p,a=g;break}T=T.sibling}if(!M){for(T=g.child;T;){if(T===a){M=!0,a=g,c=p;break}if(T===c){M=!0,c=g,a=p;break}T=T.sibling}if(!M)throw Error(e(189))}}if(a.alternate!==c)throw Error(e(190))}if(a.tag!==3)throw Error(e(188));return a.stateNode.current===a?n:r}function vd(n){return n=c0(n),n!==null?wd(n):null}function wd(n){if(n.tag===5||n.tag===6)return n;for(n=n.child;n!==null;){var r=wd(n);if(r!==null)return r;n=n.sibling}return null}var Md=t.unstable_scheduleCallback,Sd=t.unstable_cancelCallback,d0=t.unstable_shouldYield,f0=t.unstable_requestPaint,Qt=t.unstable_now,p0=t.unstable_getCurrentPriorityLevel,$l=t.unstable_ImmediatePriority,_d=t.unstable_UserBlockingPriority,_o=t.unstable_NormalPriority,m0=t.unstable_LowPriority,bd=t.unstable_IdlePriority,bo=null,xn=null;function y0(n){if(xn&&typeof xn.onCommitFiberRoot=="function")try{xn.onCommitFiberRoot(bo,n,void 0,(n.current.flags&128)===128)}catch{}}var on=Math.clz32?Math.clz32:v0,g0=Math.log,x0=Math.LN2;function v0(n){return n>>>=0,n===0?32:31-(g0(n)/x0|0)|0}var Ao=64,Co=4194304;function fr(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 To(n,r){var a=n.pendingLanes;if(a===0)return 0;var c=0,p=n.suspendedLanes,g=n.pingedLanes,M=a&268435455;if(M!==0){var T=M&~p;T!==0?c=fr(T):(g&=M,g!==0&&(c=fr(g)))}else M=a&~p,M!==0?c=fr(M):g!==0&&(c=fr(g));if(c===0)return 0;if(r!==0&&r!==c&&!(r&p)&&(p=c&-c,g=r&-r,p>=g||p===16&&(g&4194240)!==0))return r;if(c&4&&(c|=a&16),r=n.entangledLanes,r!==0)for(n=n.entanglements,r&=c;0<r;)a=31-on(r),p=1<<a,c|=n[a],r&=~p;return c}function w0(n,r){switch(n){case 1:case 2:case 4:return r+250;case 8:case 16:case 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 r+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function M0(n,r){for(var a=n.suspendedLanes,c=n.pingedLanes,p=n.expirationTimes,g=n.pendingLanes;0<g;){var M=31-on(g),T=1<<M,I=p[M];I===-1?(!(T&a)||T&c)&&(p[M]=w0(T,r)):I<=r&&(n.expiredLanes|=T),g&=~T}}function jl(n){return n=n.pendingLanes&-1073741825,n!==0?n:n&1073741824?1073741824:0}function Ad(){var n=Ao;return Ao<<=1,!(Ao&4194240)&&(Ao=64),n}function Ql(n){for(var r=[],a=0;31>a;a++)r.push(n);return r}function pr(n,r,a){n.pendingLanes|=r,r!==536870912&&(n.suspendedLanes=0,n.pingedLanes=0),n=n.eventTimes,r=31-on(r),n[r]=a}function S0(n,r){var a=n.pendingLanes&~r;n.pendingLanes=r,n.suspendedLanes=0,n.pingedLanes=0,n.expiredLanes&=r,n.mutableReadLanes&=r,n.entangledLanes&=r,r=n.entanglements;var c=n.eventTimes;for(n=n.expirationTimes;0<a;){var p=31-on(a),g=1<<p;r[p]=0,c[p]=-1,n[p]=-1,a&=~g}}function Kl(n,r){var a=n.entangledLanes|=r;for(n=n.entanglements;a;){var c=31-on(a),p=1<<c;p&r|n[c]&r&&(n[c]|=r),a&=~p}}var Nt=0;function Cd(n){return n&=-n,1<n?4<n?n&268435455?16:536870912:4:1}var Td,tu,kd,zd,Id,eu=!1,ko=[],jn=null,Qn=null,Kn=null,mr=new Map,yr=new Map,ti=[],_0="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Ed(n,r){switch(n){case"focusin":case"focusout":jn=null;break;case"dragenter":case"dragleave":Qn=null;break;case"mouseover":case"mouseout":Kn=null;break;case"pointerover":case"pointerout":mr.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":yr.delete(r.pointerId)}}function gr(n,r,a,c,p,g){return n===null||n.nativeEvent!==g?(n={blockedOn:r,domEventName:a,eventSystemFlags:c,nativeEvent:g,targetContainers:[p]},r!==null&&(r=Er(r),r!==null&&tu(r)),n):(n.eventSystemFlags|=c,r=n.targetContainers,p!==null&&r.indexOf(p)===-1&&r.push(p),n)}function b0(n,r,a,c,p){switch(r){case"focusin":return jn=gr(jn,n,r,a,c,p),!0;case"dragenter":return Qn=gr(Qn,n,r,a,c,p),!0;case"mouseover":return Kn=gr(Kn,n,r,a,c,p),!0;case"pointerover":var g=p.pointerId;
vendor: 17,118 bytes, line 37
37return mr.set(g,gr(mr.get(g)||null,n,r,a,c,p)),!0;case"gotpointercapture":return g=p.pointerId,yr.set(g,gr(yr.get(g)||null,n,r,a,c,p)),!0}return!1}function Pd(n){var r=ki(n.target);if(r!==null){var a=Ti(r);if(a!==null){if(r=a.tag,r===13){if(r=gd(a),r!==null){n.blockedOn=r,Id(n.priority,function(){kd(a)});return}}else if(r===3&&a.stateNode.current.memoizedState.isDehydrated){n.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}n.blockedOn=null}function zo(n){if(n.blockedOn!==null)return!1;for(var r=n.targetContainers;0<r.length;){var a=iu(n.domEventName,n.eventSystemFlags,r[0],n.nativeEvent);if(a===null){a=n.nativeEvent;var c=new a.constructor(a.type,a);Gl=c,a.target.dispatchEvent(c),Gl=null}else return r=Er(a),r!==null&&tu(r),n.blockedOn=a,!1;r.shift()}return!0}function Fd(n,r,a){zo(n)&&a.delete(r)}function A0(){eu=!1,jn!==null&&zo(jn)&&(jn=null),Qn!==null&&zo(Qn)&&(Qn=null),Kn!==null&&zo(Kn)&&(Kn=null),mr.forEach(Fd),yr.forEach(Fd)}function xr(n,r){n.blockedOn===r&&(n.blockedOn=null,eu||(eu=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,A0)))}function vr(n){function r(p){return xr(p,n)}if(0<ko.length){xr(ko[0],n);for(var a=1;a<ko.length;a++){var c=ko[a];c.blockedOn===n&&(c.blockedOn=null)}}for(jn!==null&&xr(jn,n),Qn!==null&&xr(Qn,n),Kn!==null&&xr(Kn,n),mr.forEach(r),yr.forEach(r),a=0;a<ti.length;a++)c=ti[a],c.blockedOn===n&&(c.blockedOn=null);for(;0<ti.length&&(a=ti[0],a.blockedOn===null);)Pd(a),a.blockedOn===null&&ti.shift()}var ls=k.ReactCurrentBatchConfig,Io=!0;function C0(n,r,a,c){var p=Nt,g=ls.transition;ls.transition=null;try{Nt=1,nu(n,r,a,c)}finally{Nt=p,ls.transition=g}}function T0(n,r,a,c){var p=Nt,g=ls.transition;ls.transition=null;try{Nt=4,nu(n,r,a,c)}finally{Nt=p,ls.transition=g}}function nu(n,r,a,c){if(Io){var p=iu(n,r,a,c);if(p===null)wu(n,r,c,Eo,a),Ed(n,c);else if(b0(p,n,r,a,c))c.stopPropagation();else if(Ed(n,c),r&4&&-1<_0.indexOf(n)){for(;p!==null;){var g=Er(p);if(g!==null&&Td(g),g=iu(n,r,a,c),g===null&&wu(n,r,c,Eo,a),g===p)break;p=g}p!==null&&c.stopPropagation()}else wu(n,r,c,null,a)}}var Eo=null;function iu(n,r,a,c){if(Eo=null,n=ql(c),n=ki(n),n!==null)if(r=Ti(n),r===null)n=null;else if(a=r.tag,a===13){if(n=gd(r),n!==null)return n;n=null}else if(a===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;n=null}else r!==n&&(n=null);return Eo=n,null}function Rd(n){switch(n){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(p0()){case $l:return 1;case _d:return 4;case _o:case m0:return 16;case bd:return 536870912;default:return 16}default:return 16}}var ei=null,su=null,Po=null;function Bd(){if(Po)return Po;var n,r=su,a=r.length,c,p="value"in ei?ei.value:ei.textContent,g=p.length;for(n=0;n<a&&r[n]===p[n];n++);var M=a-n;for(c=1;c<=M&&r[a-c]===p[g-c];c++);return Po=p.slice(n,1<c?1-c:void 0)}function Fo(n){var r=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&r===13&&(n=13)):n=r,n===10&&(n=13),32<=n||n===13?n:0}function Ro(){return!0}function Nd(){return!1}function Oe(n){function r(a,c,p,g,M){this._reactName=a,this._targetInst=p,this.type=c,this.nativeEvent=g,this.target=M,this.currentTarget=null;for(var T in n)n.hasOwnProperty(T)&&(a=n[T],this[T]=a?a(g):g[T]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?Ro:Nd,this.isPropagationStopped=Nd,this}return Y(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Ro)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Ro)},persist:function(){},isPersistent:Ro}),r}var us={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ru=Oe(us),wr=Y({},us,{view:0,detail:0}),k0=Oe(wr),ou,au,Mr,Bo=Y({},wr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:uu,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==Mr&&(Mr&&n.type==="mousemove"?(ou=n.screenX-Mr.screenX,au=n.screenY-Mr.screenY):au=ou=0,Mr=n),ou)},movementY:function(n){return"movementY"in n?n.movementY:au}}),Od=Oe(Bo),z0=Y({},Bo,{dataTransfer:0}),I0=Oe(z0),E0=Y({},wr,{relatedTarget:0}),lu=Oe(E0),P0=Y({},us,{animationName:0,elapsedTime:0,pseudoElement:0}),F0=Oe(P0),R0=Y({},us,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),B0=Oe(R0),N0=Y({},us,{data:0}),Ld=Oe(N0),O0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},L0={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},D0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function V0(n){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(n):(n=D0[n])?!!r[n]:!1}function uu(){return V0}var U0=Y({},wr,{key:function(n){if(n.key){var r=O0[n.key]||n.key;if(r!=="Unidentified")return r}return n.type==="keypress"?(n=Fo(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?L0[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:uu,charCode:function(n){return n.type==="keypress"?Fo(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?Fo(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),W0=Oe(U0),H0=Y({},Bo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Dd=Oe(H0),G0=Y({},wr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:uu}),q0=Oe(G0),X0=Y({},us,{propertyName:0,elapsedTime:0,pseudoElement:0}),Y0=Oe(X0),Z0=Y({},Bo,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),J0=Oe(Z0),$0=[9,13,27,32],hu=u&&"CompositionEvent"in window,Sr=null;u&&"documentMode"in document&&(Sr=document.documentMode);var j0=u&&"TextEvent"in window&&!Sr,Vd=u&&(!hu||Sr&&8<Sr&&11>=Sr),Ud=" ",Wd=!1;function Hd(n,r){switch(n){case"keyup":return $0.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Gd(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var hs=!1;function Q0(n,r){switch(n){case"compositionend":return Gd(r);case"keypress":return r.which!==32?null:(Wd=!0,Ud);case"textInput":return n=r.data,n===Ud&&Wd?null:n;default:return null}}function K0(n,r){if(hs)return n==="compositionend"||!hu&&Hd(n,r)?(n=Bd(),Po=su=ei=null,hs=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return Vd&&r.locale!=="ko"?null:r.data;default:return null}}var tg={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function qd(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r==="input"?!!tg[n.type]:r==="textarea"}function Xd(n,r,a,c){dd(c),r=Vo(r,"onChange"),0<r.length&&(a=new ru("onChange","change",null,a,c),n.push({event:a,listeners:r}))}var _r=null,br=null;function eg(n){cf(n,0)}function No(n){var r=ms(n);if($(r))return n}function ng(n,r){if(n==="change")return r}var Yd=!1;if(u){var cu;if(u){var du="oninput"in document;if(!du){var Zd=document.createElement("div");Zd.setAttribute("oninput","return;"),du=typeof Zd.oninput=="function"}cu=du}else cu=!1;Yd=cu&&(!document.documentMode||9<document.documentMode)}function Jd(){_r&&(_r.detachEvent("onpropertychange",$d),br=_r=null)}function $d(n){if(n.propertyName==="value"&&No(br)){var r=[];Xd(r,br,n,ql(n)),yd(eg,r)}}function ig(n,r,a){n==="focusin"?(Jd(),_r=r,br=a,_r.attachEvent("onpropertychange",$d)):n==="focusout"&&Jd()}function sg(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return No(br)}function rg(n,r){if(n==="click")return No(r)}function og(n,r){if(n==="input"||n==="change")return No(r)}function ag(n,r){return n===r&&(n!==0||1/n===1/r)||n!==n&&r!==r}var an=typeof Object.is=="function"?Object.is:ag;function Ar(n,r){if(an(n,r))return!0;if(typeof n!="object"||n===null||typeof r!="object"||r===null)return!1;var a=Object.keys(n),c=Object.keys(r);if(a.length!==c.length)return!1;for(c=0;c<a.length;c++){var p=a[c];if(!h.call(r,p)||!an(n[p],r[p]))return!1}return!0}function jd(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function Qd(n,r){var a=jd(n);n=0;for(var c;a;){if(a.nodeType===3){if(c=n+a.textContent.length,n<=r&&c>=r)return{node:a,offset:r-n};n=c}t:{for(;a;){if(a.nextSibling){a=a.nextSibling;break t}a=a.parentNode}a=void 0}a=jd(a)}}function Kd(n,r){return n&&r?n===r?!0:n&&n.nodeType===3?!1:r&&r.nodeType===3?Kd(n,r.parentNode):"contains"in n?n.contains(r):n.compareDocumentPosition?!!(n.compareDocumentPosition(r)&16):!1:!1}function tf(){for(var n=window,r=K();r instanceof n.HTMLIFrameElement;){try{var a=typeof r.contentWindow.location.href=="string"}catch{a=!1}if(a)n=r.contentWindow;else break;r=K(n.document)}return r}function fu(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r&&(r==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||r==="textarea"||n.contentEditable==="true")}function lg(n){var r=tf(),a=n.focusedElem,c=n.selectionRange;if(r!==a&&a&&a.ownerDocument&&Kd(a.ownerDocument.documentElement,a)){if(c!==null&&fu(a)){if(r=c.start,n=c.end,n===void 0&&(n=r),"selectionStart"in a)a.selectionStart=r,a.selectionEnd=Math.min(n,a.value.length);else if(n=(r=a.ownerDocument||document)&&r.defaultView||window,n.getSelection){n=n.getSelection();var p=a.textContent.length,g=Math.min(c.start,p);c=c.end===void 0?g:Math.min(c.end,p),!n.extend&&g>c&&(p=c,c=g,g=p),p=Qd(a,g);var M=Qd(a,c);p&&M&&(n.rangeCount!==1||n.anchorNode!==p.node||n.anchorOffset!==p.offset||n.focusNode!==M.node||n.focusOffset!==M.offset)&&(r=r.createRange(),r.setStart(p.node,p.offset),n.removeAllRanges(),g>c?(n.addRange(r),n.extend(M.node,M.offset)):(r.setEnd(M.node,M.offset),n.addRange(r)))}}for(r=[],n=a;n=n.parentNode;)n.nodeType===1&&r.push({element:n,left:n.scrollLeft,top:n.scrollTop});for(typeof a.focus=="function"&&a.focus(),a=0;a<r.length;a++)n=r[a],n.element.scrollLeft=n.left,n.element.scrollTop=n.top}}var ug=u&&"documentMode"in document&&11>=document.documentMode,cs=null,pu=null,Cr=null,mu=!1;function ef(n,r,a){var c=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;mu||cs==null||cs!==K(c)||(c=cs,"selectionStart"in c&&fu(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),Cr&&Ar(Cr,c)||(Cr=c,c=Vo(pu,"onSelect"),0<c.length&&(r=new ru("onSelect","select",null,r,a),n.push({event:r,listeners:c}),r.target=cs)))}function Oo(n,r){var a={};return a[n.toLowerCase()]=r.toLowerCase(),a["Webkit"+n]="webkit"+r,a["Moz"+n]="moz"+r,a}var ds={animationend:Oo("Animation","AnimationEnd"),animationiteration:Oo("Animation","AnimationIteration"),animationstart:Oo("Animation","AnimationStart"),transitionend:Oo("Transition","TransitionEnd")},yu={},nf={};u&&(nf=document.createElement("div").style,"AnimationEvent"in window||(delete ds.animationend.animation,delete ds.animationiteration.animation,delete ds.animationstart.animation),"TransitionEvent"in window||delete ds.transitionend.transition);function Lo(n){if(yu[n])return yu[n];if(!ds[n])return n;var r=ds[n],a;for(a in r)if(r.hasOwnProperty(a)&&a in nf)return yu[n]=r[a];return n}var sf=Lo("animationend"),rf=Lo("animationiteration"),of=Lo("animationstart"),af=Lo("transitionend"),lf=new Map,uf="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function ni(n,r){lf.set(n,r),o(r,[n])}for(var gu=0;gu<uf.length;gu++){var xu=uf[gu],hg=xu.toLowerCase(),cg=xu[0].toUpperCase()+xu.slice(1);ni(hg,"on"+cg)}ni(sf,"onAnimationEnd"),ni(rf,"onAnimationIteration"),ni(of,"onAnimationStart"),ni("dblclick","onDoubleClick"),ni("focusin","onFocus"),ni("focusout","onBlur"),ni(af,"onTransitionEnd"),l("onMouseEnter",["mouseout","mouseover"]),l("onMouseLeave",["mouseout","mouseover"]),l("onPointerEnter",["pointerout","pointerover"]),l("onPointerLeave",["pointerout","pointerover"]),o("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),o("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),o("onBeforeInput",["compositionend","keypress","textInput","paste"]),o("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),o("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Tr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),dg=new Set("cancel close invalid load scroll toggle".split(" ").concat(Tr));function hf(n,r,a){var c=n.type||"unknown-event";n.currentTarget=a,h0(c,r,void 0,n),n.currentTarget=null}function cf(n,r){r=(r&4)!==0;for(var a=0;a<n.length;a++){var c=n[a],p=c.event;c=c.listeners;t:{var g=void 0;if(r)for(var M=c.length-1;0<=M;M--){var T=c[M],I=T.instance,O=T.currentTarget;if(T=T.listener,I!==g&&p.isPropagationStopped())break t;hf(p,T,O),g=I}else for(M=0;M<c.length;M++){if(T=c[M],I=T.instance,O=T.currentTarget,T=T.listener,I!==g&&p.isPropagationStopped())break t;hf(p,T,O),g=I}}}if(So)throw n=Jl,So=!1,Jl=null,n}function Vt(n,r){var a=r[Cu];a===void 0&&(a=r[Cu]=new Set);var c=n+"__bubble";a.has(c)||(df(r,n,2,!1),a.add(c))}function vu(n,r,a){var c=0;r&&(c|=4),df(a,n,c,r)}var Do="_reactListening"+Math.random().toString(36).slice(2);function kr(n){if(!n[Do]){n[Do]=!0,i.forEach(function(a){a!=="selectionchange"&&(dg.has(a)||vu(a,!1,n),vu(a,!0,n))});var r=n.nodeType===9?n:n.ownerDocument;r===null||r[Do]||(r[Do]=!0,vu("selectionchange",!1,r))}}function df(n,r,a,c){switch(Rd(r)){case 1:var p=C0;break;case 4:p=T0;break;default:p=nu}a=p.bind(null,r,a,n),p=void 0,!Zl||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(p=!0),c?p!==void 0?n.addEventListener(r,a,{capture:!0,passive:p}):n.addEventListener(r,a,!0):p!==void 0?n.addEventListener(r,a,{passive:p}):n.addEventListener(r,a,!1)}function wu(n,r,a,c,p){var g=c;
vendor: 20,788 bytes, lines 37-38
37if(!(r&1)&&!(r&2)&&c!==null)t:for(;;){if(c===null)return;var M=c.tag;if(M===3||M===4){var T=c.stateNode.containerInfo;if(T===p||T.nodeType===8&&T.parentNode===p)break;if(M===4)for(M=c.return;M!==null;){var I=M.tag;if((I===3||I===4)&&(I=M.stateNode.containerInfo,I===p||I.nodeType===8&&I.parentNode===p))return;M=M.return}for(;T!==null;){if(M=ki(T),M===null)return;if(I=M.tag,I===5||I===6){c=g=M;continue t}T=T.parentNode}}c=c.return}yd(function(){var O=g,W=ql(a),H=[];t:{var U=lf.get(n);if(U!==void 0){var Q=ru,nt=n;switch(n){case"keypress":if(Fo(a)===0)break t;case"keydown":case"keyup":Q=W0;break;case"focusin":nt="focus",Q=lu;break;case"focusout":nt="blur",Q=lu;break;case"beforeblur":case"afterblur":Q=lu;break;case"click":if(a.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Q=Od;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Q=I0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Q=q0;break;case sf:case rf:case of:Q=F0;break;case af:Q=Y0;break;case"scroll":Q=k0;break;case"wheel":Q=J0;break;case"copy":case"cut":case"paste":Q=B0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Q=Dd}var st=(r&4)!==0,Kt=!st&&n==="scroll",F=st?U!==null?U+"Capture":null:U;st=[];for(var E=O,R;E!==null;){R=E;var X=R.stateNode;if(R.tag===5&&X!==null&&(R=X,F!==null&&(X=hr(E,F),X!=null&&st.push(zr(E,X,R)))),Kt)break;E=E.return}0<st.length&&(U=new Q(U,nt,null,a,W),H.push({event:U,listeners:st}))}}if(!(r&7)){t:{if(U=n==="mouseover"||n==="pointerover",Q=n==="mouseout"||n==="pointerout",U&&a!==Gl&&(nt=a.relatedTarget||a.fromElement)&&(ki(nt)||nt[zn]))break t;if((Q||U)&&(U=W.window===W?W:(U=W.ownerDocument)?U.defaultView||U.parentWindow:window,Q?(nt=a.relatedTarget||a.toElement,Q=O,nt=nt?ki(nt):null,nt!==null&&(Kt=Ti(nt),nt!==Kt||nt.tag!==5&&nt.tag!==6)&&(nt=null)):(Q=null,nt=O),Q!==nt)){if(st=Od,X="onMouseLeave",F="onMouseEnter",E="mouse",(n==="pointerout"||n==="pointerover")&&(st=Dd,X="onPointerLeave",F="onPointerEnter",E="pointer"),Kt=Q==null?U:ms(Q),R=nt==null?U:ms(nt),U=new st(X,E+"leave",Q,a,W),U.target=Kt,U.relatedTarget=R,X=null,ki(W)===O&&(st=new st(F,E+"enter",nt,a,W),st.target=R,st.relatedTarget=Kt,X=st),Kt=X,Q&&nt)e:{for(st=Q,F=nt,E=0,R=st;R;R=fs(R))E++;for(R=0,X=F;X;X=fs(X))R++;for(;0<E-R;)st=fs(st),E--;for(;0<R-E;)F=fs(F),R--;for(;E--;){if(st===F||F!==null&&st===F.alternate)break e;st=fs(st),F=fs(F)}st=null}else st=null;Q!==null&&ff(H,U,Q,st,!1),nt!==null&&Kt!==null&&ff(H,Kt,nt,st,!0)}}t:{if(U=O?ms(O):window,Q=U.nodeName&&U.nodeName.toLowerCase(),Q==="select"||Q==="input"&&U.type==="file")var ot=ng;else if(qd(U))if(Yd)ot=og;else{ot=sg;var lt=ig}else(Q=U.nodeName)&&Q.toLowerCase()==="input"&&(U.type==="checkbox"||U.type==="radio")&&(ot=rg);if(ot&&(ot=ot(n,O))){Xd(H,ot,a,W);break t}lt&&lt(n,U,O),n==="focusout"&&(lt=U._wrapperState)&&lt.controlled&&U.type==="number"&&Lt(U,"number",U.value)}switch(lt=O?ms(O):window,n){case"focusin":(qd(lt)||lt.contentEditable==="true")&&(cs=lt,pu=O,Cr=null);break;case"focusout":Cr=pu=cs=null;break;case"mousedown":mu=!0;break;case"contextmenu":case"mouseup":case"dragend":mu=!1,ef(H,a,W);break;case"selectionchange":if(ug)break;case"keydown":case"keyup":ef(H,a,W)}var ut;if(hu)t:{switch(n){case"compositionstart":var pt="onCompositionStart";break t;case"compositionend":pt="onCompositionEnd";break t;case"compositionupdate":pt="onCompositionUpdate";break t}pt=void 0}else hs?Hd(n,a)&&(pt="onCompositionEnd"):n==="keydown"&&a.keyCode===229&&(pt="onCompositionStart");pt&&(Vd&&a.locale!=="ko"&&(hs||pt!=="onCompositionStart"?pt==="onCompositionEnd"&&hs&&(ut=Bd()):(ei=W,su="value"in ei?ei.value:ei.textContent,hs=!0)),lt=Vo(O,pt),0<lt.length&&(pt=new Ld(pt,n,null,a,W),H.push({event:pt,listeners:lt}),ut?pt.data=ut:(ut=Gd(a),ut!==null&&(pt.data=ut)))),(ut=j0?Q0(n,a):K0(n,a))&&(O=Vo(O,"onBeforeInput"),0<O.length&&(W=new Ld("onBeforeInput","beforeinput",null,a,W),H.push({event:W,listeners:O}),W.data=ut))}cf(H,r)})}function zr(n,r,a){return{instance:n,listener:r,currentTarget:a}}function Vo(n,r){for(var a=r+"Capture",c=[];n!==null;){var p=n,g=p.stateNode;p.tag===5&&g!==null&&(p=g,g=hr(n,a),g!=null&&c.unshift(zr(n,g,p)),g=hr(n,r),g!=null&&c.push(zr(n,g,p))),n=n.return}return c}function fs(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5);return n||null}function ff(n,r,a,c,p){for(var g=r._reactName,M=[];a!==null&&a!==c;){var T=a,I=T.alternate,O=T.stateNode;if(I!==null&&I===c)break;T.tag===5&&O!==null&&(T=O,p?(I=hr(a,g),I!=null&&M.unshift(zr(a,I,T))):p||(I=hr(a,g),I!=null&&M.push(zr(a,I,T)))),a=a.return}M.length!==0&&n.push({event:r,listeners:M})}var fg=/\r\n?/g,pg=/\u0000|\uFFFD/g;function pf(n){return(typeof n=="string"?n:""+n).replace(fg,`
38`).replace(pg,"")}function Uo(n,r,a){if(r=pf(r),pf(n)!==r&&a)throw Error(e(425))}function Wo(){}var Mu=null,Su=null;function _u(n,r){return n==="textarea"||n==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var bu=typeof setTimeout=="function"?setTimeout:void 0,mg=typeof clearTimeout=="function"?clearTimeout:void 0,mf=typeof Promise=="function"?Promise:void 0,yg=typeof queueMicrotask=="function"?queueMicrotask:typeof mf<"u"?function(n){return mf.resolve(null).then(n).catch(gg)}:bu;function gg(n){setTimeout(function(){throw n})}function Au(n,r){var a=r,c=0;do{var p=a.nextSibling;if(n.removeChild(a),p&&p.nodeType===8)if(a=p.data,a==="/$"){if(c===0){n.removeChild(p),vr(r);return}c--}else a!=="$"&&a!=="$?"&&a!=="$!"||c++;a=p}while(a);vr(r)}function ii(n){for(;n!=null;n=n.nextSibling){var r=n.nodeType;if(r===1||r===3)break;if(r===8){if(r=n.data,r==="$"||r==="$!"||r==="$?")break;if(r==="/$")return null}}return n}function yf(n){n=n.previousSibling;for(var r=0;n;){if(n.nodeType===8){var a=n.data;if(a==="$"||a==="$!"||a==="$?"){if(r===0)return n;r--}else a==="/$"&&r++}n=n.previousSibling}return null}var ps=Math.random().toString(36).slice(2),vn="__reactFiber$"+ps,Ir="__reactProps$"+ps,zn="__reactContainer$"+ps,Cu="__reactEvents$"+ps,xg="__reactListeners$"+ps,vg="__reactHandles$"+ps;function ki(n){var r=n[vn];if(r)return r;for(var a=n.parentNode;a;){if(r=a[zn]||a[vn]){if(a=r.alternate,r.child!==null||a!==null&&a.child!==null)for(n=yf(n);n!==null;){if(a=n[vn])return a;n=yf(n)}return r}n=a,a=n.parentNode}return null}function Er(n){return n=n[vn]||n[zn],!n||n.tag!==5&&n.tag!==6&&n.tag!==13&&n.tag!==3?null:n}function ms(n){if(n.tag===5||n.tag===6)return n.stateNode;throw Error(e(33))}function Ho(n){return n[Ir]||null}var Tu=[],ys=-1;function si(n){return{current:n}}function Ut(n){0>ys||(n.current=Tu[ys],Tu[ys]=null,ys--)}function Dt(n,r){ys++,Tu[ys]=n.current,n.current=r}var ri={},fe=si(ri),Te=si(!1),zi=ri;function gs(n,r){var a=n.type.contextTypes;if(!a)return ri;var c=n.stateNode;if(c&&c.__reactInternalMemoizedUnmaskedChildContext===r)return c.__reactInternalMemoizedMaskedChildContext;var p={},g;for(g in a)p[g]=r[g];return c&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=r,n.__reactInternalMemoizedMaskedChildContext=p),p}function ke(n){return n=n.childContextTypes,n!=null}function Go(){Ut(Te),Ut(fe)}function gf(n,r,a){if(fe.current!==ri)throw Error(e(168));Dt(fe,r),Dt(Te,a)}function xf(n,r,a){var c=n.stateNode;if(r=r.childContextTypes,typeof c.getChildContext!="function")return a;c=c.getChildContext();for(var p in c)if(!(p in r))throw Error(e(108,At(n)||"Unknown",p));return Y({},a,c)}function qo(n){return n=(n=n.stateNode)&&n.__reactInternalMemoizedMergedChildContext||ri,zi=fe.current,Dt(fe,n),Dt(Te,Te.current),!0}function vf(n,r,a){var c=n.stateNode;if(!c)throw Error(e(169));a?(n=xf(n,r,zi),c.__reactInternalMemoizedMergedChildContext=n,Ut(Te),Ut(fe),Dt(fe,n)):Ut(Te),Dt(Te,a)}var In=null,Xo=!1,ku=!1;function wf(n){In===null?In=[n]:In.push(n)}function wg(n){Xo=!0,wf(n)}function oi(){if(!ku&&In!==null){ku=!0;var n=0,r=Nt;try{var a=In;for(Nt=1;n<a.length;n++){var c=a[n];do c=c(!0);while(c!==null)}In=null,Xo=!1}catch(p){throw In!==null&&(In=In.slice(n+1)),Md($l,oi),p}finally{Nt=r,ku=!1}}return null}var xs=[],vs=0,Yo=null,Zo=0,Je=[],$e=0,Ii=null,En=1,Pn="";function Ei(n,r){xs[vs++]=Zo,xs[vs++]=Yo,Yo=n,Zo=r}function Mf(n,r,a){Je[$e++]=En,Je[$e++]=Pn,Je[$e++]=Ii,Ii=n;var c=En;n=Pn;var p=32-on(c)-1;c&=~(1<<p),a+=1;var g=32-on(r)+p;if(30<g){var M=p-p%5;g=(c&(1<<M)-1).toString(32),c>>=M,p-=M,En=1<<32-on(r)+p|a<<p|c,Pn=g+n}else En=1<<g|a<<p|c,Pn=n}function zu(n){n.return!==null&&(Ei(n,1),Mf(n,1,0))}function Iu(n){for(;n===Yo;)Yo=xs[--vs],xs[vs]=null,Zo=xs[--vs],xs[vs]=null;for(;n===Ii;)Ii=Je[--$e],Je[$e]=null,Pn=Je[--$e],Je[$e]=null,En=Je[--$e],Je[$e]=null}var Le=null,De=null,Ht=!1,ln=null;function Sf(n,r){var a=tn(5,null,null,0);a.elementType="DELETED",a.stateNode=r,a.return=n,r=n.deletions,r===null?(n.deletions=[a],n.flags|=16):r.push(a)}function _f(n,r){switch(n.tag){case 5:var a=n.type;return r=r.nodeType!==1||a.toLowerCase()!==r.nodeName.toLowerCase()?null:r,r!==null?(n.stateNode=r,Le=n,De=ii(r.firstChild),!0):!1;case 6:return r=n.pendingProps===""||r.nodeType!==3?null:r,r!==null?(n.stateNode=r,Le=n,De=null,!0):!1;case 13:return r=r.nodeType!==8?null:r,r!==null?(a=Ii!==null?{id:En,overflow:Pn}:null,n.memoizedState={dehydrated:r,treeContext:a,retryLane:1073741824},a=tn(18,null,null,0),a.stateNode=r,a.return=n,n.child=a,Le=n,De=null,!0):!1;default:return!1}}function Eu(n){return(n.mode&1)!==0&&(n.flags&128)===0}function Pu(n){if(Ht){var r=De;if(r){var a=r;if(!_f(n,r)){if(Eu(n))throw Error(e(418));r=ii(a.nextSibling);var c=Le;r&&_f(n,r)?Sf(c,a):(n.flags=n.flags&-4097|2,Ht=!1,Le=n)}}else{if(Eu(n))throw Error(e(418));n.flags=n.flags&-4097|2,Ht=!1,Le=n}}}function bf(n){for(n=n.return;n!==null&&n.tag!==5&&n.tag!==3&&n.tag!==13;)n=n.return;Le=n}function Jo(n){if(n!==Le)return!1;if(!Ht)return bf(n),Ht=!0,!1;var r;if((r=n.tag!==3)&&!(r=n.tag!==5)&&(r=n.type,r=r!=="head"&&r!=="body"&&!_u(n.type,n.memoizedProps)),r&&(r=De)){if(Eu(n))throw Af(),Error(e(418));for(;r;)Sf(n,r),r=ii(r.nextSibling)}if(bf(n),n.tag===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(e(317));t:{for(n=n.nextSibling,r=0;n;){if(n.nodeType===8){var a=n.data;if(a==="/$"){if(r===0){De=ii(n.nextSibling);break t}r--}else a!=="$"&&a!=="$!"&&a!=="$?"||r++}n=n.nextSibling}De=null}}else De=Le?ii(n.stateNode.nextSibling):null;return!0}function Af(){for(var n=De;n;)n=ii(n.nextSibling)}function ws(){De=Le=null,Ht=!1}function Fu(n){ln===null?ln=[n]:ln.push(n)}var Mg=k.ReactCurrentBatchConfig;function Pr(n,r,a){if(n=a.ref,n!==null&&typeof n!="function"&&typeof n!="object"){if(a._owner){if(a=a._owner,a){if(a.tag!==1)throw Error(e(309));var c=a.stateNode}if(!c)throw Error(e(147,n));var p=c,g=""+n;return r!==null&&r.ref!==null&&typeof r.ref=="function"&&r.ref._stringRef===g?r.ref:(r=function(M){var T=p.refs;M===null?delete T[g]:T[g]=M},r._stringRef=g,r)}if(typeof n!="string")throw Error(e(284));if(!a._owner)throw Error(e(290,n))}return n}function $o(n,r){throw n=Object.prototype.toString.call(r),Error(e(31,n==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":n))}function Cf(n){var r=n._init;return r(n._payload)}function Tf(n){function r(F,E){if(n){var R=F.deletions;R===null?(F.deletions=[E],F.flags|=16):R.push(E)}}function a(F,E){if(!n)return null;for(;E!==null;)r(F,E),E=E.sibling;return null}function c(F,E){for(F=new Map;E!==null;)E.key!==null?F.set(E.key,E):F.set(E.index,E),E=E.sibling;return F}function p(F,E){return F=pi(F,E),F.index=0,F.sibling=null,F}function g(F,E,R){return F.index=R,n?(R=F.alternate,R!==null?(R=R.index,R<E?(F.flags|=2,E):R):(F.flags|=2,E)):(F.flags|=1048576,E)}function M(F){return n&&F.alternate===null&&(F.flags|=2),F}function T(F,E,R,X){return E===null||E.tag!==6?(E=bh(R,F.mode,X),E.return=F,E):(E=p(E,R),E.return=F,E)}function I(F,E,R,X){var ot=R.type;return ot===D?W(F,E,R.props.children,X,R.key):E!==null&&(E.elementType===ot||typeof ot=="object"&&ot!==null&&ot.$$typeof===_t&&Cf(ot)===E.type)?(X=p(E,R.props),X.ref=Pr(F,E,R),X.return=F,X):(X=wa(R.type,R.key,R.props,null,F.mode,X),X.ref=Pr(F,E,R),X.return=F,X)}function O(F,E,R,X){return E===null||E.tag!==4||E.stateNode.containerInfo!==R.containerInfo||E.stateNode.implementation!==R.implementation?(E=Ah(R,F.mode,X),E.return=F,E):(E=p(E,R.children||[]),E.return=F,E)}function W(F,E,R,X,ot){return E===null||E.tag!==7?(E=Di(R,F.mode,X,ot),E.return=F,E):(E=p(E,R),E.return=F,E)}function H(F,E,R){if(typeof E=="string"&&E!==""||typeof E=="number")return E=bh(""+E,F.mode,R),E.return=F,E;if(typeof E=="object"&&E!==null){switch(E.$$typeof){case N:return R=wa(E.type,E.key,E.props,null,F.mode,R),R.ref=Pr(F,null,E),R.return=F,R;case B:return E=Ah(E,F.mode,R),E.return=F,E;case _t:var X=E._init;return H(F,X(E._payload),R)}if(jt(E)||j(E))return E=Di(E,F.mode,R,null),E.return=F,E;$o(F,E)}return null}function U(F,E,R,X){var ot=E!==null?E.key:null;if(typeof R=="string"&&R!==""||typeof R=="number")return ot!==null?null:T(F,E,""+R,X);if(typeof R=="object"&&R!==null){switch(R.$$typeof){case N:return R.key===ot?I(F,E,R,X):null;case B:return R.key===ot?O(F,E,R,X):null;case _t:return ot=R._init,U(F,E,ot(R._payload),X)}if(jt(R)||j(R))return ot!==null?null:W(F,E,R,X,null);$o(F,R)}return null}function Q(F,E,R,X,ot){if(typeof X=="string"&&X!==""||typeof X=="number")return F=F.get(R)||null,T(E,F,""+X,ot);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case N:return F=F.get(X.key===null?R:X.key)||null,I(E,F,X,ot);case B:return F=F.get(X.key===null?R:X.key)||null,O(E,F,X,ot);case _t:var lt=X._init;return Q(F,E,R,lt(X._payload),ot)}if(jt(X)||j(X))return F=F.get(R)||null,W(E,F,X,ot,null);$o(E,X)}return null}function nt(F,E,R,X){for(var ot=null,lt=null,ut=E,pt=E=0,le=null;ut!==null&&pt<R.length;pt++){ut.index>pt?(le=ut,ut=null):le=ut.sibling;var Ft=U(F,ut,R[pt],X);if(Ft===null){ut===null&&(ut=le);break}n&&ut&&Ft.alternate===null&&r(F,ut),E=g(Ft,E,pt),lt===null?ot=Ft:lt.sibling=Ft,lt=Ft,ut=le}if(pt===R.length)return a(F,ut),Ht&&Ei(F,pt),ot;if(ut===null){for(;pt<R.length;pt++)ut=H(F,R[pt],X),ut!==null&&(E=g(ut,E,pt),lt===null?ot=ut:lt.sibling=ut,lt=ut);return Ht&&Ei(F,pt),ot}for(ut=c(F,ut);pt<R.length;pt++)le=Q(ut,F,pt,R[pt],X),le!==null&&(n&&le.alternate!==null&&ut.delete(le.key===null?pt:le.key),E=g(le,E,pt),lt===null?ot=le:lt.sibling=le,lt=le);return n&&ut.forEach(function(mi){return r(F,mi)}),Ht&&Ei(F,pt),ot}function st(F,E,R,X){var ot=j(R);if(typeof ot!="function")throw Error(e(150));if(R=ot.call(R),R==null)throw Error(e(151));for(var lt=ot=null,ut=E,pt=E=0,le=null,Ft=R.next();ut!==null&&!Ft.done;pt++,Ft=R.next()){ut.index>pt?(le=ut,ut=null):le=ut.sibling;var mi=U(F,ut,Ft.value,X);if(mi===null){ut===null&&(ut=le);break}n&&ut&&mi.alternate===null&&r(F,ut),E=g(mi,E,pt),lt===null?ot=mi:lt.sibling=mi,lt=mi,ut=le}if(Ft.done)return a(F,ut),Ht&&Ei(F,pt),ot;if(ut===null){for(;!Ft.done;pt++,Ft=R.next())Ft=H(F,Ft.value,X),Ft!==null&&(E=g(Ft,E,pt),lt===null?ot=Ft:lt.sibling=Ft,lt=Ft);return Ht&&Ei(F,pt),ot}for(ut=c(F,ut);!Ft.done;pt++,Ft=R.next())Ft=Q(ut,F,pt,Ft.value,X),Ft!==null&&(n&&Ft.alternate!==null&&ut.delete(Ft.key===null?pt:Ft.key),E=g(Ft,E,pt),lt===null?ot=Ft:lt.sibling=Ft,lt=Ft);return n&&ut.forEach(function(Kg){return r(F,Kg)}),Ht&&Ei(F,pt),ot}function Kt(F,E,R,X){if(typeof R=="object"&&R!==null&&R.type===D&&R.key===null&&(R=R.props.children),typeof R=="object"&&R!==null){switch(R.$$typeof){case N:t:{for(var ot=R.key,lt=E;lt!==null;){if(lt.key===ot){if(ot=R.type,ot===D){if(lt.tag===7){a(F,lt.sibling),E=p(lt,R.props.children),E.return=F,F=E;break t}}else if(lt.elementType===ot||typeof ot=="object"&&ot!==null&&ot.$$typeof===_t&&Cf(ot)===lt.type){a(F,lt.sibling),E=p(lt,R.props),E.ref=Pr(F,lt,R),E.return=F,F=E;break t}a(F,lt);break}else r(F,lt);lt=lt.sibling}R.type===D?(E=Di(R.props.children,F.mode,X,R.key),E.return=F,F=E):(X=wa(R.type,R.key,R.props,null,F.mode,X),X.ref=Pr(F,E,R),X.return=F,F=X)}return M(F);case B:t:{for(lt=R.key;E!==null;){if(E.key===lt)if(E.tag===4&&E.stateNode.containerInfo===R.containerInfo&&E.stateNode.implementation===R.implementation){a(F,E.sibling),E=p(E,R.children||[]),E.return=F,F=E;break t}else{a(F,E);break}else r(F,E);E=E.sibling}E=Ah(R,F.mode,X),E.return=F,F=E}return M(F);case _t:return lt=R._init,Kt(F,E,lt(R._payload),X)}if(jt(R))return nt(F,E,R,X);if(j(R))return st(F,E,R,X);$o(F,R)}return typeof R=="string"&&R!==""||typeof R=="number"?(R=""+R,E!==null&&E.tag===6?(a(F,E.sibling),E=p(E,R),E.return=F,F=E):(a(F,E),E=bh(R,F.mode,X),E.return=F,F=E),M(F)):a(F,E)}return Kt}var Ms=Tf(!0),kf=Tf(!1),jo=si(null),Qo=null,Ss=null,Ru=null;function Bu(){Ru=Ss=Qo=null}function Nu(n){var r=jo.current;Ut(jo),n._currentValue=r}function Ou(n,r,a){for(;n!==null;){var c=n.alternate;if((n.childLanes&r)!==r?(n.childLanes|=r,c!==null&&(c.childLanes|=r)):c!==null&&(c.childLanes&r)!==r&&(c.childLanes|=r),n===a)break;n=n.return}}function _s(n,r){Qo=n,Ru=Ss=null,n=n.dependencies,n!==null&&n.firstContext!==null&&(n.lanes&r&&(ze=!0),n.firstContext=null)}function je(n){var r=n._currentValue;if(Ru!==n)if(n={context:n,memoizedValue:r,next:null},Ss===null){if(Qo===null)throw Error(e(308));Ss=n,Qo.dependencies={lanes:0,firstContext:n}}else Ss=Ss.next=n;return r}var Pi=null;function Lu(n){Pi===null?Pi=[n]:Pi.push(n)}function zf(n,r,a,c){var p=r.interleaved;return p===null?(a.next=a,Lu(r)):(a.next=p.next,p.next=a),r.interleaved=a,Fn(n,c)}function Fn(n,r){n.lanes|=r;var a=n.alternate;for(a!==null&&(a.lanes|=r),a=n,n=n.return;n!==null;)n.childLanes|=r,a=n.alternate,a!==null&&(a.childLanes|=r),a=n,n=n.return;return a.tag===3?a.stateNode:null}var ai=!1;function Du(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function If(n,r){n=n.updateQueue,r.updateQueue===n&&(r.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,effects:n.effects})}function Rn(n,r){return{eventTime:n,lane:r,tag:0,payload:null,callback:null,next:null}}function li(n,r,a){var c=n.updateQueue;if(c===null)return null;if(c=c.shared,Et&2){var p=c.pending;return p===null?r.next=r:(r.next=p.next,p.next=r),c.pending=r,Fn(n,a)}return p=c.interleaved,p===null?(r.next=r,Lu(c)):(r.next=p.next,p.next=r),c.interleaved=r,Fn(n,a)}function Ko(n,r,a){if(r=r.updateQueue,r!==null&&(r=r.shared,(a&4194240)!==0)){var c=r.lanes;c&=n.pendingLanes,a|=c,r.lanes=a,Kl(n,a)}}function Ef(n,r){var a=n.updateQueue,c=n.alternate;if(c!==null&&(c=c.updateQueue,a===c)){var p=null,g=null;if(a=a.firstBaseUpdate,a!==null){do{var M={eventTime:a.eventTime,lane:a.lane,tag:a.tag,payload:a.payload,callback:a.callback,next:null};g===null?p=g=M:g=g.next=M,a=a.next}while(a!==null);g===null?p=g=r:g=g.next=r}else p=g=r;a={baseState:c.baseState,firstBaseUpdate:p,lastBaseUpdate:g,shared:c.shared,effects:c.effects},n.updateQueue=a;return}n=a.lastBaseUpdate,n===null?a.firstBaseUpdate=r:n.next=r,a.lastBaseUpdate=r}function ta(n,r,a,c){var p=n.updateQueue;ai=!1;var g=p.firstBaseUpdate,M=p.lastBaseUpdate,T=p.shared.pending;if(T!==null){p.shared.pending=null;var I=T,O=I.next;I.next=null,M===null?g=O:M.next=O,M=I;var W=n.alternate;W!==null&&(W=W.updateQueue,T=W.lastBaseUpdate,T!==M&&(T===null?W.firstBaseUpdate=O:T.next=O,W.lastBaseUpdate=I))}if(g!==null){var H=p.baseState;M=0,W=O=I=null,T=g;do{var U=T.lane,Q=T.eventTime;if((c&U)===U){W!==null&&(W=W.next={eventTime:Q,lane:0,tag:T.tag,payload:T.payload,callback:T.callback,next:null});t:{var nt=n,st=T;switch(U=r,Q=a,st.tag){case 1:if(nt=st.payload,typeof nt=="function"){H=nt.call(Q,H,U);break t}H=nt;break t;case 3:nt.flags=nt.flags&-65537|128;case 0:if(nt=st.payload,U=typeof nt=="function"?nt.call(Q,H,U):nt,U==null)break t;H=Y({},H,U);break t;case 2:ai=!0}}T.callback!==null&&T.lane!==0&&(n.flags|=64,U=p.effects,U===null?p.effects=[T]:U.push(T))}else Q={eventTime:Q,lane:U,tag:T.tag,payload:T.payload,callback:T.callback,next:null},W===null?(O=W=Q,I=H):W=W.next=Q,M|=U;if(T=T.next,T===null){if(T=p.shared.pending,T===null)break;U=T,T=U.next,U.next=null,p.lastBaseUpdate=U,p.shared.pending=null}}while(!0);if(W===null&&(I=H),p.baseState=I,p.firstBaseUpdate=O,p.lastBaseUpdate=W,r=p.shared.interleaved,r!==null){p=r;do M|=p.lane,p=p.next;while(p!==r)}else g===null&&(p.shared.lanes=0);Bi|=M,n.lanes=M,n.memoizedState=H}}function Pf(n,r,a){if(n=r.effects,r.effects=null,n!==null)for(r=0;r<n.length;r++){var c=n[r],p=c.callback;if(p!==null){if(c.callback=null,c=a,typeof p!="function")throw Error(e(191,p));p.call(c)}}}var Fr={},wn=si(Fr),Rr=si(Fr),Br=si(Fr);function Fi(n){if(n===Fr)throw Error(e(174));return n}
vendor: 4,472 bytes, line 38
38function Vu(n,r){switch(Dt(Br,r),Dt(Rr,n),Dt(wn,Fr),n=r.nodeType,n){case 9:case 11:r=(r=r.documentElement)?r.namespaceURI:ss(null,"");break;default:n=n===8?r.parentNode:r,r=n.namespaceURI||null,n=n.tagName,r=ss(r,n)}Ut(wn),Dt(wn,r)}function bs(){Ut(wn),Ut(Rr),Ut(Br)}function Ff(n){Fi(Br.current);var r=Fi(wn.current),a=ss(r,n.type);r!==a&&(Dt(Rr,n),Dt(wn,a))}function Uu(n){Rr.current===n&&(Ut(wn),Ut(Rr))}var qt=si(0);function ea(n){for(var r=n;r!==null;){if(r.tag===13){var a=r.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||a.data==="$!"))return r}else if(r.tag===19&&r.memoizedProps.revealOrder!==void 0){if(r.flags&128)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var Wu=[];function Hu(){for(var n=0;n<Wu.length;n++)Wu[n]._workInProgressVersionPrimary=null;Wu.length=0}var na=k.ReactCurrentDispatcher,Gu=k.ReactCurrentBatchConfig,Ri=0,Xt=null,ie=null,oe=null,ia=!1,Nr=!1,Or=0,Sg=0;function pe(){throw Error(e(321))}function qu(n,r){if(r===null)return!1;for(var a=0;a<r.length&&a<n.length;a++)if(!an(n[a],r[a]))return!1;return!0}function Xu(n,r,a,c,p,g){if(Ri=g,Xt=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,na.current=n===null||n.memoizedState===null?Cg:Tg,n=a(c,p),Nr){g=0;do{if(Nr=!1,Or=0,25<=g)throw Error(e(301));g+=1,oe=ie=null,r.updateQueue=null,na.current=kg,n=a(c,p)}while(Nr)}if(na.current=oa,r=ie!==null&&ie.next!==null,Ri=0,oe=ie=Xt=null,ia=!1,r)throw Error(e(300));return n}function Yu(){var n=Or!==0;return Or=0,n}function Mn(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return oe===null?Xt.memoizedState=oe=n:oe=oe.next=n,oe}function Qe(){if(ie===null){var n=Xt.alternate;n=n!==null?n.memoizedState:null}else n=ie.next;var r=oe===null?Xt.memoizedState:oe.next;if(r!==null)oe=r,ie=n;else{if(n===null)throw Error(e(310));ie=n,n={memoizedState:ie.memoizedState,baseState:ie.baseState,baseQueue:ie.baseQueue,queue:ie.queue,next:null},oe===null?Xt.memoizedState=oe=n:oe=oe.next=n}return oe}function Lr(n,r){return typeof r=="function"?r(n):r}function Zu(n){var r=Qe(),a=r.queue;if(a===null)throw Error(e(311));a.lastRenderedReducer=n;var c=ie,p=c.baseQueue,g=a.pending;if(g!==null){if(p!==null){var M=p.next;p.next=g.next,g.next=M}c.baseQueue=p=g,a.pending=null}if(p!==null){g=p.next,c=c.baseState;var T=M=null,I=null,O=g;do{var W=O.lane;if((Ri&W)===W)I!==null&&(I=I.next={lane:0,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null}),c=O.hasEagerState?O.eagerState:n(c,O.action);else{var H={lane:W,action:O.action,hasEagerState:O.hasEagerState,eagerState:O.eagerState,next:null};I===null?(T=I=H,M=c):I=I.next=H,Xt.lanes|=W,Bi|=W}O=O.next}while(O!==null&&O!==g);I===null?M=c:I.next=T,an(c,r.memoizedState)||(ze=!0),r.memoizedState=c,r.baseState=M,r.baseQueue=I,a.lastRenderedState=c}if(n=a.interleaved,n!==null){p=n;do g=p.lane,Xt.lanes|=g,Bi|=g,p=p.next;while(p!==n)}else p===null&&(a.lanes=0);return[r.memoizedState,a.dispatch]}function Ju(n){var r=Qe(),a=r.queue;if(a===null)throw Error(e(311));a.lastRenderedReducer=n;var c=a.dispatch,p=a.pending,g=r.memoizedState;if(p!==null){a.pending=null;var M=p=p.next;do g=n(g,M.action),M=M.next;while(M!==p);an(g,r.memoizedState)||(ze=!0),r.memoizedState=g,r.baseQueue===null&&(r.baseState=g),a.lastRenderedState=g}return[g,c]}function Rf(){}function Bf(n,r){var a=Xt,c=Qe(),p=r(),g=!an(c.memoizedState,p);if(g&&(c.memoizedState=p,ze=!0),c=c.queue,$u(Lf.bind(null,a,c,n),[n]),c.getSnapshot!==r||g||oe!==null&&oe.memoizedState.tag&1){if(a.flags|=2048,Dr(9,Of.bind(null,a,c,p,r),void 0,null),ae===null)throw Error(e(349));Ri&30||Nf(a,r,p)}return p}function Nf(n,r,a){n.flags|=16384,n={getSnapshot:r,value:a},r=Xt.updateQueue,r===null?(r={lastEffect:null,stores:null},Xt.updateQueue=r,r.stores=[n]):(a=r.stores,a===null?r.stores=[n]:a.push(n))}function Of(n,r,a,c){r.value=a,r.getSnapshot=c,Df(r)&&Vf(n)}function Lf(n,r,a){return a(function(){Df(r)&&Vf(n)})}function Df(n){var r=n.getSnapshot;n=n.value;try{var a=r();return!an(n,a)}catch{return!0}}function Vf(n){var r=Fn(n,1);r!==null&&dn(r,n,1,-1)}function Uf(n){var r=Mn();return typeof n=="function"&&(n=n()),r.memoizedState=r.baseState=n,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Lr,lastRenderedState:n},r.queue=n,n=n.dispatch=Ag.bind(null,Xt,n),[r.memoizedState,n]}
vendor: 10,229 bytes, lines 38-40
38function Dr(n,r,a,c){return n={tag:n,create:r,destroy:a,deps:c,next:null},r=Xt.updateQueue,r===null?(r={lastEffect:null,stores:null},Xt.updateQueue=r,r.lastEffect=n.next=n):(a=r.lastEffect,a===null?r.lastEffect=n.next=n:(c=a.next,a.next=n,n.next=c,r.lastEffect=n)),n}function Wf(){return Qe().memoizedState}function sa(n,r,a,c){var p=Mn();Xt.flags|=n,p.memoizedState=Dr(1|r,a,void 0,c===void 0?null:c)}function ra(n,r,a,c){var p=Qe();c=c===void 0?null:c;var g=void 0;if(ie!==null){var M=ie.memoizedState;if(g=M.destroy,c!==null&&qu(c,M.deps)){p.memoizedState=Dr(r,a,g,c);return}}Xt.flags|=n,p.memoizedState=Dr(1|r,a,g,c)}function Hf(n,r){return sa(8390656,8,n,r)}function $u(n,r){return ra(2048,8,n,r)}function Gf(n,r){return ra(4,2,n,r)}function qf(n,r){return ra(4,4,n,r)}function Xf(n,r){if(typeof r=="function")return n=n(),r(n),function(){r(null)};if(r!=null)return n=n(),r.current=n,function(){r.current=null}}function Yf(n,r,a){return a=a!=null?a.concat([n]):null,ra(4,4,Xf.bind(null,r,n),a)}function ju(){}function Zf(n,r){var a=Qe();r=r===void 0?null:r;var c=a.memoizedState;return c!==null&&r!==null&&qu(r,c[1])?c[0]:(a.memoizedState=[n,r],n)}function Jf(n,r){var a=Qe();r=r===void 0?null:r;var c=a.memoizedState;return c!==null&&r!==null&&qu(r,c[1])?c[0]:(n=n(),a.memoizedState=[n,r],n)}function $f(n,r,a){return Ri&21?(an(a,r)||(a=Ad(),Xt.lanes|=a,Bi|=a,n.baseState=!0),r):(n.baseState&&(n.baseState=!1,ze=!0),n.memoizedState=a)}function _g(n,r){var a=Nt;Nt=a!==0&&4>a?a:4,n(!0);var c=Gu.transition;Gu.transition={};try{n(!1),r()}finally{Nt=a,Gu.transition=c}}function jf(){return Qe().memoizedState}function bg(n,r,a){var c=di(n);if(a={lane:c,action:a,hasEagerState:!1,eagerState:null,next:null},Qf(n))Kf(r,a);else if(a=zf(n,r,a,c),a!==null){var p=Me();dn(a,n,c,p),tp(a,r,c)}}function Ag(n,r,a){var c=di(n),p={lane:c,action:a,hasEagerState:!1,eagerState:null,next:null};if(Qf(n))Kf(r,p);else{var g=n.alternate;if(n.lanes===0&&(g===null||g.lanes===0)&&(g=r.lastRenderedReducer,g!==null))try{var M=r.lastRenderedState,T=g(M,a);if(p.hasEagerState=!0,p.eagerState=T,an(T,M)){var I=r.interleaved;I===null?(p.next=p,Lu(r)):(p.next=I.next,I.next=p),r.interleaved=p;return}}catch{}finally{}a=zf(n,r,p,c),a!==null&&(p=Me(),dn(a,n,c,p),tp(a,r,c))}}function Qf(n){var r=n.alternate;return n===Xt||r!==null&&r===Xt}function Kf(n,r){Nr=ia=!0;var a=n.pending;a===null?r.next=r:(r.next=a.next,a.next=r),n.pending=r}function tp(n,r,a){if(a&4194240){var c=r.lanes;c&=n.pendingLanes,a|=c,r.lanes=a,Kl(n,a)}}var oa={readContext:je,useCallback:pe,useContext:pe,useEffect:pe,useImperativeHandle:pe,useInsertionEffect:pe,useLayoutEffect:pe,useMemo:pe,useReducer:pe,useRef:pe,useState:pe,useDebugValue:pe,useDeferredValue:pe,useTransition:pe,useMutableSource:pe,useSyncExternalStore:pe,useId:pe,unstable_isNewReconciler:!1},Cg={readContext:je,useCallback:function(n,r){return Mn().memoizedState=[n,r===void 0?null:r],n},useContext:je,useEffect:Hf,useImperativeHandle:function(n,r,a){return a=a!=null?a.concat([n]):null,sa(4194308,4,Xf.bind(null,r,n),a)},useLayoutEffect:function(n,r){return sa(4194308,4,n,r)},useInsertionEffect:function(n,r){return sa(4,2,n,r)},useMemo:function(n,r){var a=Mn();return r=r===void 0?null:r,n=n(),a.memoizedState=[n,r],n},useReducer:function(n,r,a){var c=Mn();return r=a!==void 0?a(r):r,c.memoizedState=c.baseState=r,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:r},c.queue=n,n=n.dispatch=bg.bind(null,Xt,n),[c.memoizedState,n]},useRef:function(n){var r=Mn();return n={current:n},r.memoizedState=n},useState:Uf,useDebugValue:ju,useDeferredValue:function(n){return Mn().memoizedState=n},useTransition:function(){var n=Uf(!1),r=n[0];return n=_g.bind(null,n[1]),Mn().memoizedState=n,[r,n]},useMutableSource:function(){},useSyncExternalStore:function(n,r,a){var c=Xt,p=Mn();if(Ht){if(a===void 0)throw Error(e(407));a=a()}else{if(a=r(),ae===null)throw Error(e(349));Ri&30||Nf(c,r,a)}p.memoizedState=a;var g={value:a,getSnapshot:r};return p.queue=g,Hf(Lf.bind(null,c,g,n),[n]),c.flags|=2048,Dr(9,Of.bind(null,c,g,a,r),void 0,null),a},useId:function(){var n=Mn(),r=ae.identifierPrefix;if(Ht){var a=Pn,c=En;a=(c&~(1<<32-on(c)-1)).toString(32)+a,r=":"+r+"R"+a,a=Or++,0<a&&(r+="H"+a.toString(32)),r+=":"}else a=Sg++,r=":"+r+"r"+a.toString(32)+":";return n.memoizedState=r},unstable_isNewReconciler:!1},Tg={readContext:je,useCallback:Zf,useContext:je,useEffect:$u,useImperativeHandle:Yf,useInsertionEffect:Gf,useLayoutEffect:qf,useMemo:Jf,useReducer:Zu,useRef:Wf,useState:function(){return Zu(Lr)},useDebugValue:ju,useDeferredValue:function(n){var r=Qe();return $f(r,ie.memoizedState,n)},useTransition:function(){var n=Zu(Lr)[0],r=Qe().memoizedState;return[n,r]},useMutableSource:Rf,useSyncExternalStore:Bf,useId:jf,unstable_isNewReconciler:!1},kg={readContext:je,useCallback:Zf,useContext:je,useEffect:$u,useImperativeHandle:Yf,useInsertionEffect:Gf,useLayoutEffect:qf,useMemo:Jf,useReducer:Ju,useRef:Wf,useState:function(){return Ju(Lr)},useDebugValue:ju,useDeferredValue:function(n){var r=Qe();return ie===null?r.memoizedState=n:$f(r,ie.memoizedState,n)},useTransition:function(){var n=Ju(Lr)[0],r=Qe().memoizedState;return[n,r]},useMutableSource:Rf,useSyncExternalStore:Bf,useId:jf,unstable_isNewReconciler:!1};function un(n,r){if(n&&n.defaultProps){r=Y({},r),n=n.defaultProps;for(var a in n)r[a]===void 0&&(r[a]=n[a]);return r}return r}function Qu(n,r,a,c){r=n.memoizedState,a=a(c,r),a=a==null?r:Y({},r,a),n.memoizedState=a,n.lanes===0&&(n.updateQueue.baseState=a)}var aa={isMounted:function(n){return(n=n._reactInternals)?Ti(n)===n:!1},enqueueSetState:function(n,r,a){n=n._reactInternals;var c=Me(),p=di(n),g=Rn(c,p);g.payload=r,a!=null&&(g.callback=a),r=li(n,g,p),r!==null&&(dn(r,n,p,c),Ko(r,n,p))},enqueueReplaceState:function(n,r,a){n=n._reactInternals;var c=Me(),p=di(n),g=Rn(c,p);g.tag=1,g.payload=r,a!=null&&(g.callback=a),r=li(n,g,p),r!==null&&(dn(r,n,p,c),Ko(r,n,p))},enqueueForceUpdate:function(n,r){n=n._reactInternals;var a=Me(),c=di(n),p=Rn(a,c);p.tag=2,r!=null&&(p.callback=r),r=li(n,p,c),r!==null&&(dn(r,n,c,a),Ko(r,n,c))}};function ep(n,r,a,c,p,g,M){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(c,g,M):r.prototype&&r.prototype.isPureReactComponent?!Ar(a,c)||!Ar(p,g):!0}function np(n,r,a){var c=!1,p=ri,g=r.contextType;return typeof g=="object"&&g!==null?g=je(g):(p=ke(r)?zi:fe.current,c=r.contextTypes,g=(c=c!=null)?gs(n,p):ri),r=new r(a,g),n.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,r.updater=aa,n.stateNode=r,r._reactInternals=n,c&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=p,n.__reactInternalMemoizedMaskedChildContext=g),r}function ip(n,r,a,c){n=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(a,c),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(a,c),r.state!==n&&aa.enqueueReplaceState(r,r.state,null)}function Ku(n,r,a,c){var p=n.stateNode;p.props=a,p.state=n.memoizedState,p.refs={},Du(n);var g=r.contextType;typeof g=="object"&&g!==null?p.context=je(g):(g=ke(r)?zi:fe.current,p.context=gs(n,g)),p.state=n.memoizedState,g=r.getDerivedStateFromProps,typeof g=="function"&&(Qu(n,r,g,a),p.state=n.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(r=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),r!==p.state&&aa.enqueueReplaceState(p,p.state,null),ta(n,a,p,c),p.state=n.memoizedState),typeof p.componentDidMount=="function"&&(n.flags|=4194308)}function As(n,r){try{var a="",c=r;do a+=bt(c),c=c.return;while(c);var p=a}catch(g){p=`
39Error generating stack: `+g.message+`
40`+g.stack}return{value:n,source:r,stack:p,digest:null}}function th(n,r,a){return{value:n,source:null,stack:a??null,digest:r??null}}function eh(n,r){try{console.error(r.value)}catch(a){setTimeout(function(){throw a})}}var zg=typeof WeakMap=="function"?WeakMap:Map;function sp(n,r,a){a=Rn(-1,a),a.tag=3,a.payload={element:null};var c=r.value;return a.callback=function(){pa||(pa=!0,yh=c),eh(n,r)},a}function rp(n,r,a){a=Rn(-1,a),a.tag=3;var c=n.type.getDerivedStateFromError;if(typeof c=="function"){var p=r.value;a.payload=function(){return c(p)},a.callback=function(){eh(n,r)}}var g=n.stateNode;return g!==null&&typeof g.componentDidCatch=="function"&&(a.callback=function(){eh(n,r),typeof c!="function"&&(hi===null?hi=new Set([this]):hi.add(this));var M=r.stack;this.componentDidCatch(r.value,{componentStack:M!==null?M:""})}),a}function op(n,r,a){var c=n.pingCache;if(c===null){c=n.pingCache=new zg;var p=new Set;c.set(r,p)}else p=c.get(r),p===void 0&&(p=new Set,c.set(r,p));p.has(a)||(p.add(a),n=Hg.bind(null,n,r,a),r.then(n,n))}function ap(n){do{var r;if((r=n.tag===13)&&(r=n.memoizedState,r=r!==null?r.dehydrated!==null:!0),r)return n;n=n.return}while(n!==null);return null}function lp(n,r,a,c,p){return n.mode&1?(n.flags|=65536,n.lanes=p,n):(n===r?n.flags|=65536:(n.flags|=128,a.flags|=131072,a.flags&=-52805,a.tag===1&&(a.alternate===null?a.tag=17:(r=Rn(-1,1),r.tag=2,li(a,r,1))),a.lanes|=1),n)}var Ig=k.ReactCurrentOwner,ze=!1;function we(n,r,a,c){r.child=n===null?kf(r,null,a,c):Ms(r,n.child,a,c)}function up(n,r,a,c,p){a=a.render;var g=r.ref;return _s(r,p),c=Xu(n,r,a,c,g,p),a=Yu(),n!==null&&!ze?(r.updateQueue=n.updateQueue,r.flags&=-2053,n.lanes&=~p,Bn(n,r,p)):(Ht&&a&&zu(r),r.flags|=1,we(n,r,c,p),r.child)}function hp(n,r,a,c,p){if(n===null){var g=a.type;return typeof g=="function"&&!_h(g)&&g.defaultProps===void 0&&a.compare===null&&a.defaultProps===void 0?(r.tag=15,r.type=g,cp(n,r,g,c,p)):(n=wa(a.type,null,c,r,r.mode,p),n.ref=r.ref,n.return=r,r.child=n)}if(g=n.child,!(n.lanes&p)){var M=g.memoizedProps;if(a=a.compare,a=a!==null?a:Ar,a(M,c)&&n.ref===r.ref)return Bn(n,r,p)}return r.flags|=1,n=pi(g,c),n.ref=r.ref,n.return=r,r.child=n}function cp(n,r,a,c,p){if(n!==null){var g=n.memoizedProps;if(Ar(g,c)&&n.ref===r.ref)if(ze=!1,r.pendingProps=c=g,(n.lanes&p)!==0)n.flags&131072&&(ze=!0);else return r.lanes=n.lanes,Bn(n,r,p)}return nh(n,r,a,c,p)}
vendor: 44,948 bytes, line 40
40function dp(n,r,a){var c=r.pendingProps,p=c.children,g=n!==null?n.memoizedState:null;if(c.mode==="hidden")if(!(r.mode&1))r.memoizedState={baseLanes:0,cachePool:null,transitions:null},Dt(Ts,Ve),Ve|=a;else{if(!(a&1073741824))return n=g!==null?g.baseLanes|a:a,r.lanes=r.childLanes=1073741824,r.memoizedState={baseLanes:n,cachePool:null,transitions:null},r.updateQueue=null,Dt(Ts,Ve),Ve|=n,null;r.memoizedState={baseLanes:0,cachePool:null,transitions:null},c=g!==null?g.baseLanes:a,Dt(Ts,Ve),Ve|=c}else g!==null?(c=g.baseLanes|a,r.memoizedState=null):c=a,Dt(Ts,Ve),Ve|=c;return we(n,r,p,a),r.child}function fp(n,r){var a=r.ref;(n===null&&a!==null||n!==null&&n.ref!==a)&&(r.flags|=512,r.flags|=2097152)}function nh(n,r,a,c,p){var g=ke(a)?zi:fe.current;return g=gs(r,g),_s(r,p),a=Xu(n,r,a,c,g,p),c=Yu(),n!==null&&!ze?(r.updateQueue=n.updateQueue,r.flags&=-2053,n.lanes&=~p,Bn(n,r,p)):(Ht&&c&&zu(r),r.flags|=1,we(n,r,a,p),r.child)}function pp(n,r,a,c,p){if(ke(a)){var g=!0;qo(r)}else g=!1;if(_s(r,p),r.stateNode===null)ua(n,r),np(r,a,c),Ku(r,a,c,p),c=!0;else if(n===null){var M=r.stateNode,T=r.memoizedProps;M.props=T;var I=M.context,O=a.contextType;typeof O=="object"&&O!==null?O=je(O):(O=ke(a)?zi:fe.current,O=gs(r,O));var W=a.getDerivedStateFromProps,H=typeof W=="function"||typeof M.getSnapshotBeforeUpdate=="function";H||typeof M.UNSAFE_componentWillReceiveProps!="function"&&typeof M.componentWillReceiveProps!="function"||(T!==c||I!==O)&&ip(r,M,c,O),ai=!1;var U=r.memoizedState;M.state=U,ta(r,c,M,p),I=r.memoizedState,T!==c||U!==I||Te.current||ai?(typeof W=="function"&&(Qu(r,a,W,c),I=r.memoizedState),(T=ai||ep(r,a,T,c,U,I,O))?(H||typeof M.UNSAFE_componentWillMount!="function"&&typeof M.componentWillMount!="function"||(typeof M.componentWillMount=="function"&&M.componentWillMount(),typeof M.UNSAFE_componentWillMount=="function"&&M.UNSAFE_componentWillMount()),typeof M.componentDidMount=="function"&&(r.flags|=4194308)):(typeof M.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=c,r.memoizedState=I),M.props=c,M.state=I,M.context=O,c=T):(typeof M.componentDidMount=="function"&&(r.flags|=4194308),c=!1)}else{M=r.stateNode,If(n,r),T=r.memoizedProps,O=r.type===r.elementType?T:un(r.type,T),M.props=O,H=r.pendingProps,U=M.context,I=a.contextType,typeof I=="object"&&I!==null?I=je(I):(I=ke(a)?zi:fe.current,I=gs(r,I));var Q=a.getDerivedStateFromProps;(W=typeof Q=="function"||typeof M.getSnapshotBeforeUpdate=="function")||typeof M.UNSAFE_componentWillReceiveProps!="function"&&typeof M.componentWillReceiveProps!="function"||(T!==H||U!==I)&&ip(r,M,c,I),ai=!1,U=r.memoizedState,M.state=U,ta(r,c,M,p);var nt=r.memoizedState;T!==H||U!==nt||Te.current||ai?(typeof Q=="function"&&(Qu(r,a,Q,c),nt=r.memoizedState),(O=ai||ep(r,a,O,c,U,nt,I)||!1)?(W||typeof M.UNSAFE_componentWillUpdate!="function"&&typeof M.componentWillUpdate!="function"||(typeof M.componentWillUpdate=="function"&&M.componentWillUpdate(c,nt,I),typeof M.UNSAFE_componentWillUpdate=="function"&&M.UNSAFE_componentWillUpdate(c,nt,I)),typeof M.componentDidUpdate=="function"&&(r.flags|=4),typeof M.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof M.componentDidUpdate!="function"||T===n.memoizedProps&&U===n.memoizedState||(r.flags|=4),typeof M.getSnapshotBeforeUpdate!="function"||T===n.memoizedProps&&U===n.memoizedState||(r.flags|=1024),r.memoizedProps=c,r.memoizedState=nt),M.props=c,M.state=nt,M.context=I,c=O):(typeof M.componentDidUpdate!="function"||T===n.memoizedProps&&U===n.memoizedState||(r.flags|=4),typeof M.getSnapshotBeforeUpdate!="function"||T===n.memoizedProps&&U===n.memoizedState||(r.flags|=1024),c=!1)}return ih(n,r,a,c,g,p)}function ih(n,r,a,c,p,g){fp(n,r);var M=(r.flags&128)!==0;if(!c&&!M)return p&&vf(r,a,!1),Bn(n,r,g);c=r.stateNode,Ig.current=r;var T=M&&typeof a.getDerivedStateFromError!="function"?null:c.render();return r.flags|=1,n!==null&&M?(r.child=Ms(r,n.child,null,g),r.child=Ms(r,null,T,g)):we(n,r,T,g),r.memoizedState=c.state,p&&vf(r,a,!0),r.child}function mp(n){var r=n.stateNode;r.pendingContext?gf(n,r.pendingContext,r.pendingContext!==r.context):r.context&&gf(n,r.context,!1),Vu(n,r.containerInfo)}function yp(n,r,a,c,p){return ws(),Fu(p),r.flags|=256,we(n,r,a,c),r.child}var sh={dehydrated:null,treeContext:null,retryLane:0};function rh(n){return{baseLanes:n,cachePool:null,transitions:null}}function gp(n,r,a){var c=r.pendingProps,p=qt.current,g=!1,M=(r.flags&128)!==0,T;if((T=M)||(T=n!==null&&n.memoizedState===null?!1:(p&2)!==0),T?(g=!0,r.flags&=-129):(n===null||n.memoizedState!==null)&&(p|=1),Dt(qt,p&1),n===null)return Pu(r),n=r.memoizedState,n!==null&&(n=n.dehydrated,n!==null)?(r.mode&1?n.data==="$!"?r.lanes=8:r.lanes=1073741824:r.lanes=1,null):(M=c.children,n=c.fallback,g?(c=r.mode,g=r.child,M={mode:"hidden",children:M},!(c&1)&&g!==null?(g.childLanes=0,g.pendingProps=M):g=Ma(M,c,0,null),n=Di(n,c,a,null),g.return=r,n.return=r,g.sibling=n,r.child=g,r.child.memoizedState=rh(a),r.memoizedState=sh,n):oh(r,M));if(p=n.memoizedState,p!==null&&(T=p.dehydrated,T!==null))return Eg(n,r,M,c,T,p,a);if(g){g=c.fallback,M=r.mode,p=n.child,T=p.sibling;var I={mode:"hidden",children:c.children};return!(M&1)&&r.child!==p?(c=r.child,c.childLanes=0,c.pendingProps=I,r.deletions=null):(c=pi(p,I),c.subtreeFlags=p.subtreeFlags&14680064),T!==null?g=pi(T,g):(g=Di(g,M,a,null),g.flags|=2),g.return=r,c.return=r,c.sibling=g,r.child=c,c=g,g=r.child,M=n.child.memoizedState,M=M===null?rh(a):{baseLanes:M.baseLanes|a,cachePool:null,transitions:M.transitions},g.memoizedState=M,g.childLanes=n.childLanes&~a,r.memoizedState=sh,c}return g=n.child,n=g.sibling,c=pi(g,{mode:"visible",children:c.children}),!(r.mode&1)&&(c.lanes=a),c.return=r,c.sibling=null,n!==null&&(a=r.deletions,a===null?(r.deletions=[n],r.flags|=16):a.push(n)),r.child=c,r.memoizedState=null,c}function oh(n,r){return r=Ma({mode:"visible",children:r},n.mode,0,null),r.return=n,n.child=r}function la(n,r,a,c){return c!==null&&Fu(c),Ms(r,n.child,null,a),n=oh(r,r.pendingProps.children),n.flags|=2,r.memoizedState=null,n}function Eg(n,r,a,c,p,g,M){if(a)return r.flags&256?(r.flags&=-257,c=th(Error(e(422))),la(n,r,M,c)):r.memoizedState!==null?(r.child=n.child,r.flags|=128,null):(g=c.fallback,p=r.mode,c=Ma({mode:"visible",children:c.children},p,0,null),g=Di(g,p,M,null),g.flags|=2,c.return=r,g.return=r,c.sibling=g,r.child=c,r.mode&1&&Ms(r,n.child,null,M),r.child.memoizedState=rh(M),r.memoizedState=sh,g);if(!(r.mode&1))return la(n,r,M,null);if(p.data==="$!"){if(c=p.nextSibling&&p.nextSibling.dataset,c)var T=c.dgst;return c=T,g=Error(e(419)),c=th(g,c,void 0),la(n,r,M,c)}if(T=(M&n.childLanes)!==0,ze||T){if(c=ae,c!==null){switch(M&-M){case 4:p=2;break;case 16:p=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:p=32;break;case 536870912:p=268435456;break;default:p=0}p=p&(c.suspendedLanes|M)?0:p,p!==0&&p!==g.retryLane&&(g.retryLane=p,Fn(n,p),dn(c,n,p,-1))}return Sh(),c=th(Error(e(421))),la(n,r,M,c)}return p.data==="$?"?(r.flags|=128,r.child=n.child,r=Gg.bind(null,n),p._reactRetry=r,null):(n=g.treeContext,De=ii(p.nextSibling),Le=r,Ht=!0,ln=null,n!==null&&(Je[$e++]=En,Je[$e++]=Pn,Je[$e++]=Ii,En=n.id,Pn=n.overflow,Ii=r),r=oh(r,c.children),r.flags|=4096,r)}function xp(n,r,a){n.lanes|=r;var c=n.alternate;c!==null&&(c.lanes|=r),Ou(n.return,r,a)}function ah(n,r,a,c,p){var g=n.memoizedState;g===null?n.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:c,tail:a,tailMode:p}:(g.isBackwards=r,g.rendering=null,g.renderingStartTime=0,g.last=c,g.tail=a,g.tailMode=p)}function vp(n,r,a){var c=r.pendingProps,p=c.revealOrder,g=c.tail;if(we(n,r,c.children,a),c=qt.current,c&2)c=c&1|2,r.flags|=128;else{if(n!==null&&n.flags&128)t:for(n=r.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&xp(n,a,r);else if(n.tag===19)xp(n,a,r);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===r)break t;for(;n.sibling===null;){if(n.return===null||n.return===r)break t;n=n.return}n.sibling.return=n.return,n=n.sibling}c&=1}if(Dt(qt,c),!(r.mode&1))r.memoizedState=null;else switch(p){case"forwards":for(a=r.child,p=null;a!==null;)n=a.alternate,n!==null&&ea(n)===null&&(p=a),a=a.sibling;a=p,a===null?(p=r.child,r.child=null):(p=a.sibling,a.sibling=null),ah(r,!1,p,a,g);break;case"backwards":for(a=null,p=r.child,r.child=null;p!==null;){if(n=p.alternate,n!==null&&ea(n)===null){r.child=p;break}n=p.sibling,p.sibling=a,a=p,p=n}ah(r,!0,a,null,g);break;case"together":ah(r,!1,null,null,void 0);break;default:r.memoizedState=null}return r.child}function ua(n,r){!(r.mode&1)&&n!==null&&(n.alternate=null,r.alternate=null,r.flags|=2)}function Bn(n,r,a){if(n!==null&&(r.dependencies=n.dependencies),Bi|=r.lanes,!(a&r.childLanes))return null;if(n!==null&&r.child!==n.child)throw Error(e(153));if(r.child!==null){for(n=r.child,a=pi(n,n.pendingProps),r.child=a,a.return=r;n.sibling!==null;)n=n.sibling,a=a.sibling=pi(n,n.pendingProps),a.return=r;a.sibling=null}return r.child}function Pg(n,r,a){switch(r.tag){case 3:mp(r),ws();break;case 5:Ff(r);break;case 1:ke(r.type)&&qo(r);break;case 4:Vu(r,r.stateNode.containerInfo);break;case 10:var c=r.type._context,p=r.memoizedProps.value;Dt(jo,c._currentValue),c._currentValue=p;break;case 13:if(c=r.memoizedState,c!==null)return c.dehydrated!==null?(Dt(qt,qt.current&1),r.flags|=128,null):a&r.child.childLanes?gp(n,r,a):(Dt(qt,qt.current&1),n=Bn(n,r,a),n!==null?n.sibling:null);Dt(qt,qt.current&1);break;case 19:if(c=(a&r.childLanes)!==0,n.flags&128){if(c)return vp(n,r,a);r.flags|=128}if(p=r.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),Dt(qt,qt.current),c)break;return null;case 22:case 23:return r.lanes=0,dp(n,r,a)}return Bn(n,r,a)}var wp,lh,Mp,Sp;wp=function(n,r){for(var a=r.child;a!==null;){if(a.tag===5||a.tag===6)n.appendChild(a.stateNode);else if(a.tag!==4&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===r)break;for(;a.sibling===null;){if(a.return===null||a.return===r)return;a=a.return}a.sibling.return=a.return,a=a.sibling}},lh=function(){},Mp=function(n,r,a,c){var p=n.memoizedProps;if(p!==c){n=r.stateNode,Fi(wn.current);var g=null;switch(a){case"input":p=tt(n,p),c=tt(n,c),g=[];break;case"select":p=Y({},p,{value:void 0}),c=Y({},c,{value:void 0}),g=[];break;case"textarea":p=kn(n,p),c=kn(n,c),g=[];break;default:typeof p.onClick!="function"&&typeof c.onClick=="function"&&(n.onclick=Wo)}Wl(a,c);var M;a=null;for(O in p)if(!c.hasOwnProperty(O)&&p.hasOwnProperty(O)&&p[O]!=null)if(O==="style"){var T=p[O];for(M in T)T.hasOwnProperty(M)&&(a||(a={}),a[M]="")}else O!=="dangerouslySetInnerHTML"&&O!=="children"&&O!=="suppressContentEditableWarning"&&O!=="suppressHydrationWarning"&&O!=="autoFocus"&&(s.hasOwnProperty(O)?g||(g=[]):(g=g||[]).push(O,null));for(O in c){var I=c[O];if(T=p!=null?p[O]:void 0,c.hasOwnProperty(O)&&I!==T&&(I!=null||T!=null))if(O==="style")if(T){for(M in T)!T.hasOwnProperty(M)||I&&I.hasOwnProperty(M)||(a||(a={}),a[M]="");for(M in I)I.hasOwnProperty(M)&&T[M]!==I[M]&&(a||(a={}),a[M]=I[M])}else a||(g||(g=[]),g.push(O,a)),a=I;else O==="dangerouslySetInnerHTML"?(I=I?I.__html:void 0,T=T?T.__html:void 0,I!=null&&T!==I&&(g=g||[]).push(O,I)):O==="children"?typeof I!="string"&&typeof I!="number"||(g=g||[]).push(O,""+I):O!=="suppressContentEditableWarning"&&O!=="suppressHydrationWarning"&&(s.hasOwnProperty(O)?(I!=null&&O==="onScroll"&&Vt("scroll",n),g||T===I||(g=[])):(g=g||[]).push(O,I))}a&&(g=g||[]).push("style",a);var O=g;(r.updateQueue=O)&&(r.flags|=4)}},Sp=function(n,r,a,c){a!==c&&(r.flags|=4)};function Vr(n,r){if(!Ht)switch(n.tailMode){case"hidden":r=n.tail;for(var a=null;r!==null;)r.alternate!==null&&(a=r),r=r.sibling;a===null?n.tail=null:a.sibling=null;break;case"collapsed":a=n.tail;for(var c=null;a!==null;)a.alternate!==null&&(c=a),a=a.sibling;c===null?r||n.tail===null?n.tail=null:n.tail.sibling=null:c.sibling=null}}function me(n){var r=n.alternate!==null&&n.alternate.child===n.child,a=0,c=0;if(r)for(var p=n.child;p!==null;)a|=p.lanes|p.childLanes,c|=p.subtreeFlags&14680064,c|=p.flags&14680064,p.return=n,p=p.sibling;else for(p=n.child;p!==null;)a|=p.lanes|p.childLanes,c|=p.subtreeFlags,c|=p.flags,p.return=n,p=p.sibling;return n.subtreeFlags|=c,n.childLanes=a,r}function Fg(n,r,a){var c=r.pendingProps;switch(Iu(r),r.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return me(r),null;case 1:return ke(r.type)&&Go(),me(r),null;case 3:return c=r.stateNode,bs(),Ut(Te),Ut(fe),Hu(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(n===null||n.child===null)&&(Jo(r)?r.flags|=4:n===null||n.memoizedState.isDehydrated&&!(r.flags&256)||(r.flags|=1024,ln!==null&&(vh(ln),ln=null))),lh(n,r),me(r),null;case 5:Uu(r);var p=Fi(Br.current);if(a=r.type,n!==null&&r.stateNode!=null)Mp(n,r,a,c,p),n.ref!==r.ref&&(r.flags|=512,r.flags|=2097152);else{if(!c){if(r.stateNode===null)throw Error(e(166));return me(r),null}if(n=Fi(wn.current),Jo(r)){c=r.stateNode,a=r.type;var g=r.memoizedProps;switch(c[vn]=r,c[Ir]=g,n=(r.mode&1)!==0,a){case"dialog":Vt("cancel",c),Vt("close",c);break;case"iframe":case"object":case"embed":Vt("load",c);break;case"video":case"audio":for(p=0;p<Tr.length;p++)Vt(Tr[p],c);break;case"source":Vt("error",c);break;case"img":case"image":case"link":Vt("error",c),Vt("load",c);break;case"details":Vt("toggle",c);break;case"input":ft(c,g),Vt("invalid",c);break;case"select":c._wrapperState={wasMultiple:!!g.multiple},Vt("invalid",c);break;case"textarea":is(c,g),Vt("invalid",c)}Wl(a,g),p=null;for(var M in g)if(g.hasOwnProperty(M)){var T=g[M];M==="children"?typeof T=="string"?c.textContent!==T&&(g.suppressHydrationWarning!==!0&&Uo(c.textContent,T,n),p=["children",T]):typeof T=="number"&&c.textContent!==""+T&&(g.suppressHydrationWarning!==!0&&Uo(c.textContent,T,n),p=["children",""+T]):s.hasOwnProperty(M)&&T!=null&&M==="onScroll"&&Vt("scroll",c)}switch(a){case"input":Ce(c),Pt(c,g,!0);break;case"textarea":Ce(c),lr(c);break;case"select":case"option":break;default:typeof g.onClick=="function"&&(c.onclick=Wo)}c=p,r.updateQueue=c,c!==null&&(r.flags|=4)}else{M=p.nodeType===9?p:p.ownerDocument,n==="http://www.w3.org/1999/xhtml"&&(n=ur(a)),n==="http://www.w3.org/1999/xhtml"?a==="script"?(n=M.createElement("div"),n.innerHTML="<script><\/script>",n=n.removeChild(n.firstChild)):typeof c.is=="string"?n=M.createElement(a,{is:c.is}):(n=M.createElement(a),a==="select"&&(M=n,c.multiple?M.multiple=!0:c.size&&(M.size=c.size))):n=M.createElementNS(n,a),n[vn]=r,n[Ir]=c,wp(n,r,!1,!1),r.stateNode=n;t:{switch(M=Hl(a,c),a){case"dialog":Vt("cancel",n),Vt("close",n),p=c;break;case"iframe":case"object":case"embed":Vt("load",n),p=c;break;case"video":case"audio":for(p=0;p<Tr.length;p++)Vt(Tr[p],n);p=c;break;case"source":Vt("error",n),p=c;break;case"img":case"image":case"link":Vt("error",n),Vt("load",n),p=c;break;case"details":Vt("toggle",n),p=c;break;case"input":ft(n,c),p=tt(n,c),Vt("invalid",n);break;case"option":p=c;break;case"select":n._wrapperState={wasMultiple:!!c.multiple},p=Y({},c,{value:void 0}),Vt("invalid",n);break;case"textarea":is(n,c),p=kn(n,c),Vt("invalid",n);break;default:p=c}Wl(a,p),T=p;for(g in T)if(T.hasOwnProperty(g)){var I=T[g];g==="style"?hd(n,I):g==="dangerouslySetInnerHTML"?(I=I?I.__html:void 0,I!=null&&wo(n,I)):g==="children"?typeof I=="string"?(a!=="textarea"||I!=="")&&Jn(n,I):typeof I=="number"&&Jn(n,""+I):g!=="suppressContentEditableWarning"&&g!=="suppressHydrationWarning"&&g!=="autoFocus"&&(s.hasOwnProperty(g)?I!=null&&g==="onScroll"&&Vt("scroll",n):I!=null&&C(n,g,I,M))}switch(a){case"input":Ce(n),Pt(n,c,!1);break;case"textarea":Ce(n),lr(n);break;case"option":c.value!=null&&n.setAttribute("value",""+zt(c.value));break;case"select":n.multiple=!!c.multiple,g=c.value,g!=null?Wt(n,!!c.multiple,g,!1):c.defaultValue!=null&&Wt(n,!!c.multiple,c.defaultValue,!0);break;default:typeof p.onClick=="function"&&(n.onclick=Wo)}switch(a){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break t;case"img":c=!0;break t;default:c=!1}}c&&(r.flags|=4)}r.ref!==null&&(r.flags|=512,r.flags|=2097152)}return me(r),null;case 6:if(n&&r.stateNode!=null)Sp(n,r,n.memoizedProps,c);else{if(typeof c!="string"&&r.stateNode===null)throw Error(e(166));if(a=Fi(Br.current),Fi(wn.current),Jo(r)){if(c=r.stateNode,a=r.memoizedProps,c[vn]=r,(g=c.nodeValue!==a)&&(n=Le,n!==null))switch(n.tag){case 3:Uo(c.nodeValue,a,(n.mode&1)!==0);break;case 5:n.memoizedProps.suppressHydrationWarning!==!0&&Uo(c.nodeValue,a,(n.mode&1)!==0)}g&&(r.flags|=4)}else c=(a.nodeType===9?a:a.ownerDocument).createTextNode(c),c[vn]=r,r.stateNode=c}return me(r),null;case 13:if(Ut(qt),c=r.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(Ht&&De!==null&&r.mode&1&&!(r.flags&128))Af(),ws(),r.flags|=98560,g=!1;else if(g=Jo(r),c!==null&&c.dehydrated!==null){if(n===null){if(!g)throw Error(e(318));if(g=r.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error(e(317));g[vn]=r}else ws(),!(r.flags&128)&&(r.memoizedState=null),r.flags|=4;me(r),g=!1}else ln!==null&&(vh(ln),ln=null),g=!0;if(!g)return r.flags&65536?r:null}return r.flags&128?(r.lanes=a,r):(c=c!==null,c!==(n!==null&&n.memoizedState!==null)&&c&&(r.child.flags|=8192,r.mode&1&&(n===null||qt.current&1?se===0&&(se=3):Sh())),r.updateQueue!==null&&(r.flags|=4),me(r),null);case 4:return bs(),lh(n,r),n===null&&kr(r.stateNode.containerInfo),me(r),null;case 10:return Nu(r.type._context),me(r),null;case 17:return ke(r.type)&&Go(),me(r),null;case 19:if(Ut(qt),g=r.memoizedState,g===null)return me(r),null;if(c=(r.flags&128)!==0,M=g.rendering,M===null)if(c)Vr(g,!1);else{if(se!==0||n!==null&&n.flags&128)for(n=r.child;n!==null;){if(M=ea(n),M!==null){for(r.flags|=128,Vr(g,!1),c=M.updateQueue,c!==null&&(r.updateQueue=c,r.flags|=4),r.subtreeFlags=0,c=a,a=r.child;a!==null;)g=a,n=c,g.flags&=14680066,M=g.alternate,M===null?(g.childLanes=0,g.lanes=n,g.child=null,g.subtreeFlags=0,g.memoizedProps=null,g.memoizedState=null,g.updateQueue=null,g.dependencies=null,g.stateNode=null):(g.childLanes=M.childLanes,g.lanes=M.lanes,g.child=M.child,g.subtreeFlags=0,g.deletions=null,g.memoizedProps=M.memoizedProps,g.memoizedState=M.memoizedState,g.updateQueue=M.updateQueue,g.type=M.type,n=M.dependencies,g.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),a=a.sibling;return Dt(qt,qt.current&1|2),r.child}n=n.sibling}g.tail!==null&&Qt()>ks&&(r.flags|=128,c=!0,Vr(g,!1),r.lanes=4194304)}else{if(!c)if(n=ea(M),n!==null){if(r.flags|=128,c=!0,a=n.updateQueue,a!==null&&(r.updateQueue=a,r.flags|=4),Vr(g,!0),g.tail===null&&g.tailMode==="hidden"&&!M.alternate&&!Ht)return me(r),null}else 2*Qt()-g.renderingStartTime>ks&&a!==1073741824&&(r.flags|=128,c=!0,Vr(g,!1),r.lanes=4194304);g.isBackwards?(M.sibling=r.child,r.child=M):(a=g.last,a!==null?a.sibling=M:r.child=M,g.last=M)}return g.tail!==null?(r=g.tail,g.rendering=r,g.tail=r.sibling,g.renderingStartTime=Qt(),r.sibling=null,a=qt.current,Dt(qt,c?a&1|2:a&1),r):(me(r),null);case 22:case 23:return Mh(),c=r.memoizedState!==null,n!==null&&n.memoizedState!==null!==c&&(r.flags|=8192),c&&r.mode&1?Ve&1073741824&&(me(r),r.subtreeFlags&6&&(r.flags|=8192)):me(r),null;case 24:return null;case 25:return null}throw Error(e(156,r.tag))}function Rg(n,r){switch(Iu(r),r.tag){case 1:return ke(r.type)&&Go(),n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 3:return bs(),Ut(Te),Ut(fe),Hu(),n=r.flags,n&65536&&!(n&128)?(r.flags=n&-65537|128,r):null;case 5:return Uu(r),null;case 13:if(Ut(qt),n=r.memoizedState,n!==null&&n.dehydrated!==null){if(r.alternate===null)throw Error(e(340));ws()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 19:return Ut(qt),null;case 4:return bs(),null;case 10:return Nu(r.type._context),null;case 22:case 23:return Mh(),null;case 24:return null;default:return null}}var ha=!1,ye=!1,Bg=typeof WeakSet=="function"?WeakSet:Set,et=null;function Cs(n,r){var a=n.ref;if(a!==null)if(typeof a=="function")try{a(null)}catch(c){Jt(n,r,c)}else a.current=null}function uh(n,r,a){try{a()}catch(c){Jt(n,r,c)}}var _p=!1;function Ng(n,r){if(Mu=Io,n=tf(),fu(n)){if("selectionStart"in n)var a={start:n.selectionStart,end:n.selectionEnd};else t:{a=(a=n.ownerDocument)&&a.defaultView||window;var c=a.getSelection&&a.getSelection();if(c&&c.rangeCount!==0){a=c.anchorNode;var p=c.anchorOffset,g=c.focusNode;c=c.focusOffset;try{a.nodeType,g.nodeType}catch{a=null;break t}var M=0,T=-1,I=-1,O=0,W=0,H=n,U=null;e:for(;;){for(var Q;H!==a||p!==0&&H.nodeType!==3||(T=M+p),H!==g||c!==0&&H.nodeType!==3||(I=M+c),H.nodeType===3&&(M+=H.nodeValue.length),(Q=H.firstChild)!==null;)U=H,H=Q;for(;;){if(H===n)break e;if(U===a&&++O===p&&(T=M),U===g&&++W===c&&(I=M),(Q=H.nextSibling)!==null)break;H=U,U=H.parentNode}H=Q}a=T===-1||I===-1?null:{start:T,end:I}}else a=null}a=a||{start:0,end:0}}else a=null;for(Su={focusedElem:n,selectionRange:a},Io=!1,et=r;et!==null;)if(r=et,n=r.child,(r.subtreeFlags&1028)!==0&&n!==null)n.return=r,et=n;else for(;et!==null;){r=et;try{var nt=r.alternate;if(r.flags&1024)switch(r.tag){case 0:case 11:case 15:break;case 1:if(nt!==null){var st=nt.memoizedProps,Kt=nt.memoizedState,F=r.stateNode,E=F.getSnapshotBeforeUpdate(r.elementType===r.type?st:un(r.type,st),Kt);F.__reactInternalSnapshotBeforeUpdate=E}break;case 3:var R=r.stateNode.containerInfo;R.nodeType===1?R.textContent="":R.nodeType===9&&R.documentElement&&R.removeChild(R.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(e(163))}}catch(X){Jt(r,r.return,X)}if(n=r.sibling,n!==null){n.return=r.return,et=n;break}et=r.return}return nt=_p,_p=!1,nt}function Ur(n,r,a){var c=r.updateQueue;if(c=c!==null?c.lastEffect:null,c!==null){var p=c=c.next;do{if((p.tag&n)===n){var g=p.destroy;p.destroy=void 0,g!==void 0&&uh(r,a,g)}p=p.next}while(p!==c)}}function ca(n,r){if(r=r.updateQueue,r=r!==null?r.lastEffect:null,r!==null){var a=r=r.next;do{if((a.tag&n)===n){var c=a.create;a.destroy=c()}a=a.next}while(a!==r)}}function hh(n){var r=n.ref;if(r!==null){var a=n.stateNode;switch(n.tag){case 5:n=a;break;default:n=a}typeof r=="function"?r(n):r.current=n}}function bp(n){var r=n.alternate;r!==null&&(n.alternate=null,bp(r)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(r=n.stateNode,r!==null&&(delete r[vn],delete r[Ir],delete r[Cu],delete r[xg],delete r[vg])),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 Ap(n){return n.tag===5||n.tag===3||n.tag===4}function Cp(n){t:for(;;){for(;n.sibling===null;){if(n.return===null||Ap(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 t;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function ch(n,r,a){var c=n.tag;if(c===5||c===6)n=n.stateNode,r?a.nodeType===8?a.parentNode.insertBefore(n,r):a.insertBefore(n,r):(a.nodeType===8?(r=a.parentNode,r.insertBefore(n,a)):(r=a,r.appendChild(n)),a=a._reactRootContainer,a!=null||r.onclick!==null||(r.onclick=Wo));else if(c!==4&&(n=n.child,n!==null))for(ch(n,r,a),n=n.sibling;n!==null;)ch(n,r,a),n=n.sibling}function dh(n,r,a){var c=n.tag;if(c===5||c===6)n=n.stateNode,r?a.insertBefore(n,r):a.appendChild(n);else if(c!==4&&(n=n.child,n!==null))for(dh(n,r,a),n=n.sibling;n!==null;)dh(n,r,a),n=n.sibling}var ce=null,hn=!1;function ui(n,r,a){for(a=a.child;a!==null;)Tp(n,r,a),a=a.sibling}function Tp(n,r,a){if(xn&&typeof xn.onCommitFiberUnmount=="function")try{xn.onCommitFiberUnmount(bo,a)}catch{}switch(a.tag){case 5:ye||Cs(a,r);case 6:var c=ce,p=hn;ce=null,ui(n,r,a),ce=c,hn=p,ce!==null&&(hn?(n=ce,a=a.stateNode,n.nodeType===8?n.parentNode.removeChild(a):n.removeChild(a)):ce.removeChild(a.stateNode));break;case 18:ce!==null&&(hn?(n=ce,a=a.stateNode,n.nodeType===8?Au(n.parentNode,a):n.nodeType===1&&Au(n,a),vr(n)):Au(ce,a.stateNode));break;case 4:c=ce,p=hn,ce=a.stateNode.containerInfo,hn=!0,ui(n,r,a),ce=c,hn=p;break;case 0:case 11:case 14:case 15:if(!ye&&(c=a.updateQueue,c!==null&&(c=c.lastEffect,c!==null))){p=c=c.next;do{var g=p,M=g.destroy;g=g.tag,M!==void 0&&(g&2||g&4)&&uh(a,r,M),p=p.next}while(p!==c)}ui(n,r,a);break;case 1:if(!ye&&(Cs(a,r),c=a.stateNode,typeof c.componentWillUnmount=="function"))try{c.props=a.memoizedProps,c.state=a.memoizedState,c.componentWillUnmount()}catch(T){Jt(a,r,T)}ui(n,r,a);break;case 21:ui(n,r,a);break;case 22:a.mode&1?(ye=(c=ye)||a.memoizedState!==null,ui(n,r,a),ye=c):ui(n,r,a);break;default:ui(n,r,a)}}function kp(n){var r=n.updateQueue;if(r!==null){n.updateQueue=null;var a=n.stateNode;a===null&&(a=n.stateNode=new Bg),r.forEach(function(c){var p=qg.bind(null,n,c);a.has(c)||(a.add(c),c.then(p,p))})}}function cn(n,r){var a=r.deletions;if(a!==null)for(var c=0;c<a.length;c++){var p=a[c];try{var g=n,M=r,T=M;t:for(;T!==null;){switch(T.tag){case 5:ce=T.stateNode,hn=!1;break t;case 3:ce=T.stateNode.containerInfo,hn=!0;break t;case 4:ce=T.stateNode.containerInfo,hn=!0;break t}T=T.return}if(ce===null)throw Error(e(160));Tp(g,M,p),ce=null,hn=!1;var I=p.alternate;I!==null&&(I.return=null),p.return=null}catch(O){Jt(p,r,O)}}if(r.subtreeFlags&12854)for(r=r.child;r!==null;)zp(r,n),r=r.sibling}function zp(n,r){var a=n.alternate,c=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:if(cn(r,n),Sn(n),c&4){try{Ur(3,n,n.return),ca(3,n)}catch(st){Jt(n,n.return,st)}try{Ur(5,n,n.return)}catch(st){Jt(n,n.return,st)}}break;case 1:cn(r,n),Sn(n),c&512&&a!==null&&Cs(a,a.return);break;case 5:if(cn(r,n),Sn(n),c&512&&a!==null&&Cs(a,a.return),n.flags&32){var p=n.stateNode;try{Jn(p,"")}catch(st){Jt(n,n.return,st)}}if(c&4&&(p=n.stateNode,p!=null)){var g=n.memoizedProps,M=a!==null?a.memoizedProps:g,T=n.type,I=n.updateQueue;if(n.updateQueue=null,I!==null)try{T==="input"&&g.type==="radio"&&g.name!=null&&rt(p,g),Hl(T,M);var O=Hl(T,g);for(M=0;M<I.length;M+=2){var W=I[M],H=I[M+1];W==="style"?hd(p,H):W==="dangerouslySetInnerHTML"?wo(p,H):W==="children"?Jn(p,H):C(p,W,H,O)}switch(T){case"input":It(p,g);break;case"textarea":Ze(p,g);break;case"select":var U=p._wrapperState.wasMultiple;p._wrapperState.wasMultiple=!!g.multiple;var Q=g.value;Q!=null?Wt(p,!!g.multiple,Q,!1):U!==!!g.multiple&&(g.defaultValue!=null?Wt(p,!!g.multiple,g.defaultValue,!0):Wt(p,!!g.multiple,g.multiple?[]:"",!1))}p[Ir]=g}catch(st){Jt(n,n.return,st)}}break;case 6:if(cn(r,n),Sn(n),c&4){if(n.stateNode===null)throw Error(e(162));p=n.stateNode,g=n.memoizedProps;try{p.nodeValue=g}catch(st){Jt(n,n.return,st)}}break;case 3:if(cn(r,n),Sn(n),c&4&&a!==null&&a.memoizedState.isDehydrated)try{vr(r.containerInfo)}catch(st){Jt(n,n.return,st)}break;case 4:cn(r,n),Sn(n);break;case 13:cn(r,n),Sn(n),p=n.child,p.flags&8192&&(g=p.memoizedState!==null,p.stateNode.isHidden=g,!g||p.alternate!==null&&p.alternate.memoizedState!==null||(mh=Qt())),c&4&&kp(n);break;case 22:if(W=a!==null&&a.memoizedState!==null,n.mode&1?(ye=(O=ye)||W,cn(r,n),ye=O):cn(r,n),Sn(n),c&8192){if(O=n.memoizedState!==null,(n.stateNode.isHidden=O)&&!W&&n.mode&1)for(et=n,W=n.child;W!==null;){for(H=et=W;et!==null;){switch(U=et,Q=U.child,U.tag){case 0:case 11:case 14:case 15:Ur(4,U,U.return);break;case 1:Cs(U,U.return);var nt=U.stateNode;if(typeof nt.componentWillUnmount=="function"){c=U,a=U.return;try{r=c,nt.props=r.memoizedProps,nt.state=r.memoizedState,nt.componentWillUnmount()}catch(st){Jt(c,a,st)}}break;case 5:Cs(U,U.return);break;case 22:if(U.memoizedState!==null){Pp(H);continue}}Q!==null?(Q.return=U,et=Q):Pp(H)}W=W.sibling}t:for(W=null,H=n;;){if(H.tag===5){if(W===null){W=H;try{p=H.stateNode,O?(g=p.style,typeof g.setProperty=="function"?g.setProperty("display","none","important"):g.display="none"):(T=H.stateNode,I=H.memoizedProps.style,M=I!=null&&I.hasOwnProperty("display")?I.display:null,T.style.display=ud("display",M))}catch(st){Jt(n,n.return,st)}}}else if(H.tag===6){if(W===null)try{H.stateNode.nodeValue=O?"":H.memoizedProps}catch(st){Jt(n,n.return,st)}}else if((H.tag!==22&&H.tag!==23||H.memoizedState===null||H===n)&&H.child!==null){H.child.return=H,H=H.child;continue}if(H===n)break t;for(;H.sibling===null;){if(H.return===null||H.return===n)break t;W===H&&(W=null),H=H.return}W===H&&(W=null),H.sibling.return=H.return,H=H.sibling}}break;case 19:cn(r,n),Sn(n),c&4&&kp(n);break;case 21:break;default:cn(r,n),Sn(n)}}function Sn(n){var r=n.flags;if(r&2){try{t:{for(var a=n.return;a!==null;){if(Ap(a)){var c=a;break t}a=a.return}throw Error(e(160))}switch(c.tag){case 5:var p=c.stateNode;c.flags&32&&(Jn(p,""),c.flags&=-33);var g=Cp(n);dh(n,g,p);break;case 3:case 4:var M=c.stateNode.containerInfo,T=Cp(n);ch(n,T,M);break;default:throw Error(e(161))}}catch(I){Jt(n,n.return,I)}n.flags&=-3}r&4096&&(n.flags&=-4097)}function Og(n,r,a){et=n,Ip(n)}function Ip(n,r,a){for(var c=(n.mode&1)!==0;et!==null;){var p=et,g=p.child;if(p.tag===22&&c){var M=p.memoizedState!==null||ha;if(!M){var T=p.alternate,I=T!==null&&T.memoizedState!==null||ye;T=ha;var O=ye;if(ha=M,(ye=I)&&!O)for(et=p;et!==null;)M=et,I=M.child,M.tag===22&&M.memoizedState!==null?Fp(p):I!==null?(I.return=M,et=I):Fp(p);for(;g!==null;)et=g,Ip(g),g=g.sibling;et=p,ha=T,ye=O}Ep(n)}else p.subtreeFlags&8772&&g!==null?(g.return=p,et=g):Ep(n)}}function Ep(n){for(;et!==null;){var r=et;if(r.flags&8772){var a=r.alternate;try{if(r.flags&8772)switch(r.tag){case 0:case 11:case 15:ye||ca(5,r);break;case 1:var c=r.stateNode;if(r.flags&4&&!ye)if(a===null)c.componentDidMount();else{var p=r.elementType===r.type?a.memoizedProps:un(r.type,a.memoizedProps);c.componentDidUpdate(p,a.memoizedState,c.__reactInternalSnapshotBeforeUpdate)}var g=r.updateQueue;g!==null&&Pf(r,g,c);break;case 3:var M=r.updateQueue;if(M!==null){if(a=null,r.child!==null)switch(r.child.tag){case 5:a=r.child.stateNode;break;case 1:a=r.child.stateNode}Pf(r,M,a)}break;case 5:var T=r.stateNode;if(a===null&&r.flags&4){a=T;var I=r.memoizedProps;switch(r.type){case"button":case"input":case"select":case"textarea":I.autoFocus&&a.focus();break;case"img":I.src&&(a.src=I.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(r.memoizedState===null){var O=r.alternate;if(O!==null){var W=O.memoizedState;if(W!==null){var H=W.dehydrated;H!==null&&vr(H)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(e(163))}ye||r.flags&512&&hh(r)}catch(U){Jt(r,r.return,U)}}if(r===n){et=null;break}if(a=r.sibling,a!==null){a.return=r.return,et=a;break}et=r.return}}function Pp(n){for(;et!==null;){var r=et;if(r===n){et=null;break}var a=r.sibling;if(a!==null){a.return=r.return,et=a;break}et=r.return}}function Fp(n){for(;et!==null;){var r=et;try{switch(r.tag){case 0:case 11:case 15:var a=r.return;try{ca(4,r)}catch(I){Jt(r,a,I)}break;case 1:var c=r.stateNode;if(typeof c.componentDidMount=="function"){var p=r.return;try{c.componentDidMount()}catch(I){Jt(r,p,I)}}var g=r.return;try{hh(r)}catch(I){Jt(r,g,I)}break;case 5:var M=r.return;try{hh(r)}catch(I){Jt(r,M,I)}}}catch(I){Jt(r,r.return,I)}if(r===n){et=null;break}var T=r.sibling;if(T!==null){T.return=r.return,et=T;break}et=r.return}}var Lg=Math.ceil,da=k.ReactCurrentDispatcher,fh=k.ReactCurrentOwner,Ke=k.ReactCurrentBatchConfig,Et=0,ae=null,ee=null,de=0,Ve=0,Ts=si(0),se=0,Wr=null,Bi=0,fa=0,ph=0,Hr=null,Ie=null,mh=0,ks=1/0,Nn=null,pa=!1,yh=null,hi=null,ma=!1,ci=null,ya=0,Gr=0,gh=null,ga=-1,xa=0;function Me(){return Et&6?Qt():ga!==-1?ga:ga=Qt()}function di(n){return n.mode&1?Et&2&&de!==0?de&-de:Mg.transition!==null?(xa===0&&(xa=Ad()),xa):(n=Nt,n!==0||(n=window.event,n=n===void 0?16:Rd(n.type)),n):1}function dn(n,r,a,c){if(50<Gr)throw Gr=0,gh=null,Error(e(185));pr(n,a,c),(!(Et&2)||n!==ae)&&(n===ae&&(!(Et&2)&&(fa|=a),se===4&&fi(n,de)),Ee(n,c),a===1&&Et===0&&!(r.mode&1)&&(ks=Qt()+500,Xo&&oi()))}function Ee(n,r){var a=n.callbackNode;M0(n,r);var c=To(n,n===ae?de:0);if(c===0)a!==null&&Sd(a),n.callbackNode=null,n.callbackPriority=0;else if(r=c&-c,n.callbackPriority!==r){if(a!=null&&Sd(a),r===1)n.tag===0?wg(Bp.bind(null,n)):wf(Bp.bind(null,n)),yg(function(){!(Et&6)&&oi()}),a=null;else{switch(Cd(c)){case 1:a=$l;break;case 4:a=_d;break;case 16:a=_o;break;case 536870912:a=bd;break;default:a=_o}a=Hp(a,Rp.bind(null,n))}n.callbackPriority=r,n.callbackNode=a}}function Rp(n,r){if(ga=-1,xa=0,Et&6)throw Error(e(327));var a=n.callbackNode;if(zs()&&n.callbackNode!==a)return null;var c=To(n,n===ae?de:0);if(c===0)return null;if(c&30||c&n.expiredLanes||r)r=va(n,c);else{r=c;var p=Et;Et|=2;var g=Op();(ae!==n||de!==r)&&(Nn=null,ks=Qt()+500,Oi(n,r));do try{Ug();break}catch(T){Np(n,T)}while(!0);Bu(),da.current=g,Et=p,ee!==null?r=0:(ae=null,de=0,r=se)}if(r!==0){if(r===2&&(p=jl(n),p!==0&&(c=p,r=xh(n,p))),r===1)throw a=Wr,Oi(n,0),fi(n,c),Ee(n,Qt()),a;if(r===6)fi(n,c);else{if(p=n.current.alternate,!(c&30)&&!Dg(p)&&(r=va(n,c),r===2&&(g=jl(n),g!==0&&(c=g,r=xh(n,g))),r===1))throw a=Wr,Oi(n,0),fi(n,c),Ee(n,Qt()),a;switch(n.finishedWork=p,n.finishedLanes=c,r){case 0:case 1:throw Error(e(345));case 2:Li(n,Ie,Nn);break;case 3:if(fi(n,c),(c&130023424)===c&&(r=mh+500-Qt(),10<r)){if(To(n,0)!==0)break;if(p=n.suspendedLanes,(p&c)!==c){Me(),n.pingedLanes|=n.suspendedLanes&p;break}n.timeoutHandle=bu(Li.bind(null,n,Ie,Nn),r);break}Li(n,Ie,Nn);break;case 4:if(fi(n,c),(c&4194240)===c)break;for(r=n.eventTimes,p=-1;0<c;){var M=31-on(c);g=1<<M,M=r[M],M>p&&(p=M),c&=~g}if(c=p,c=Qt()-c,c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3e3>c?3e3:4320>c?4320:1960*Lg(c/1960))-c,10<c){n.timeoutHandle=bu(Li.bind(null,n,Ie,Nn),c);break}Li(n,Ie,Nn);break;case 5:Li(n,Ie,Nn);break;default:throw Error(e(329))}}}return Ee(n,Qt()),n.callbackNode===a?Rp.bind(null,n):null}function xh(n,r){var a=Hr;return n.current.memoizedState.isDehydrated&&(Oi(n,r).flags|=256),n=va(n,r),n!==2&&(r=Ie,Ie=a,r!==null&&vh(r)),n}function vh(n){Ie===null?Ie=n:Ie.push.apply(Ie,n)}function Dg(n){for(var r=n;;){if(r.flags&16384){var a=r.updateQueue;if(a!==null&&(a=a.stores,a!==null))for(var c=0;c<a.length;c++){var p=a[c],g=p.getSnapshot;p=p.value;try{if(!an(g(),p))return!1}catch{return!1}}}if(a=r.child,r.subtreeFlags&16384&&a!==null)a.return=r,r=a;else{if(r===n)break;for(;r.sibling===null;){if(r.return===null||r.return===n)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function fi(n,r){for(r&=~ph,r&=~fa,n.suspendedLanes|=r,n.pingedLanes&=~r,n=n.expirationTimes;0<r;){var a=31-on(r),c=1<<a;n[a]=-1,r&=~c}}function Bp(n){if(Et&6)throw Error(e(327));zs();var r=To(n,0);if(!(r&1))return Ee(n,Qt()),null;var a=va(n,r);if(n.tag!==0&&a===2){var c=jl(n);c!==0&&(r=c,a=xh(n,c))}if(a===1)throw a=Wr,Oi(n,0),fi(n,r),Ee(n,Qt()),a;if(a===6)throw Error(e(345));return n.finishedWork=n.current.alternate,n.finishedLanes=r,Li(n,Ie,Nn),Ee(n,Qt()),null}function wh(n,r){var a=Et;Et|=1;try{return n(r)}finally{Et=a,Et===0&&(ks=Qt()+500,Xo&&oi())}}function Ni(n){ci!==null&&ci.tag===0&&!(Et&6)&&zs();var r=Et;Et|=1;var a=Ke.transition,c=Nt;try{if(Ke.transition=null,Nt=1,n)return n()}finally{Nt=c,Ke.transition=a,Et=r,!(Et&6)&&oi()}}function Mh(){Ve=Ts.current,Ut(Ts)}function Oi(n,r){n.finishedWork=null,n.finishedLanes=0;var a=n.timeoutHandle;if(a!==-1&&(n.timeoutHandle=-1,mg(a)),ee!==null)for(a=ee.return;a!==null;){var c=a;switch(Iu(c),c.tag){case 1:c=c.type.childContextTypes,c!=null&&Go();break;case 3:bs(),Ut(Te),Ut(fe),Hu();break;case 5:Uu(c);break;case 4:bs();break;case 13:Ut(qt);break;case 19:Ut(qt);break;case 10:Nu(c.type._context);break;case 22:case 23:Mh()}a=a.return}if(ae=n,ee=n=pi(n.current,null),de=Ve=r,se=0,Wr=null,ph=fa=Bi=0,Ie=Hr=null,Pi!==null){for(r=0;r<Pi.length;r++)if(a=Pi[r],c=a.interleaved,c!==null){a.interleaved=null;var p=c.next,g=a.pending;if(g!==null){var M=g.next;g.next=p,c.next=M}a.pending=c}Pi=null}return n}function Np(n,r){do{var a=ee;try{if(Bu(),na.current=oa,ia){for(var c=Xt.memoizedState;c!==null;){var p=c.queue;p!==null&&(p.pending=null),c=c.next}ia=!1}if(Ri=0,oe=ie=Xt=null,Nr=!1,Or=0,fh.current=null,a===null||a.return===null){se=1,Wr=r,ee=null;break}t:{var g=n,M=a.return,T=a,I=r;if(r=de,T.flags|=32768,I!==null&&typeof I=="object"&&typeof I.then=="function"){var O=I,W=T,H=W.tag;if(!(W.mode&1)&&(H===0||H===11||H===15)){var U=W.alternate;U?(W.updateQueue=U.updateQueue,W.memoizedState=U.memoizedState,W.lanes=U.lanes):(W.updateQueue=null,W.memoizedState=null)}var Q=ap(M);if(Q!==null){Q.flags&=-257,lp(Q,M,T,g,r),Q.mode&1&&op(g,O,r),r=Q,I=O;var nt=r.updateQueue;if(nt===null){var st=new Set;st.add(I),r.updateQueue=st}else nt.add(I);break t}else{if(!(r&1)){op(g,O,r),Sh();break t}I=Error(e(426))}}else if(Ht&&T.mode&1){var Kt=ap(M);if(Kt!==null){!(Kt.flags&65536)&&(Kt.flags|=256),lp(Kt,M,T,g,r),Fu(As(I,T));break t}}g=I=As(I,T),se!==4&&(se=2),Hr===null?Hr=[g]:Hr.push(g),g=M;do{switch(g.tag){case 3:g.flags|=65536,r&=-r,g.lanes|=r;var F=sp(g,I,r);Ef(g,F);break t;case 1:T=I;var E=g.type,R=g.stateNode;if(!(g.flags&128)&&(typeof E.getDerivedStateFromError=="function"||R!==null&&typeof R.componentDidCatch=="function"&&(hi===null||!hi.has(R)))){g.flags|=65536,r&=-r,g.lanes|=r;var X=rp(g,T,r);Ef(g,X);break t}}g=g.return}while(g!==null)}Dp(a)}catch(ot){r=ot,ee===a&&a!==null&&(ee=a=a.return);continue}break}while(!0)}function Op(){var n=da.current;return da.current=oa,n===null?oa:n}function Sh(){(se===0||se===3||se===2)&&(se=4),ae===null||!(Bi&268435455)&&!(fa&268435455)||fi(ae,de)}function va(n,r){var a=Et;Et|=2;var c=Op();(ae!==n||de!==r)&&(Nn=null,Oi(n,r));do try{Vg();break}catch(p){Np(n,p)}while(!0);if(Bu(),Et=a,da.current=c,ee!==null)throw Error(e(261));return ae=null,de=0,se}function Vg(){for(;ee!==null;)Lp(ee)}function Ug(){for(;ee!==null&&!d0();)Lp(ee)}function Lp(n){var r=Wp(n.alternate,n,Ve);n.memoizedProps=n.pendingProps,r===null?Dp(n):ee=r,fh.current=null}function Dp(n){var r=n;do{var a=r.alternate;if(n=r.return,r.flags&32768){if(a=Rg(a,r),a!==null){a.flags&=32767,ee=a;return}if(n!==null)n.flags|=32768,n.subtreeFlags=0,n.deletions=null;else{se=6,ee=null;return}}else if(a=Fg(a,r,Ve),a!==null){ee=a;return}if(r=r.sibling,r!==null){ee=r;return}ee=r=n}while(r!==null);se===0&&(se=5)}function Li(n,r,a){var c=Nt,p=Ke.transition;try{Ke.transition=null,Nt=1,Wg(n,r,a,c)}finally{Ke.transition=p,Nt=c}return null}function Wg(n,r,a,c){do zs();while(ci!==null);if(Et&6)throw Error(e(327));a=n.finishedWork;var p=n.finishedLanes;if(a===null)return null;if(n.finishedWork=null,n.finishedLanes=0,a===n.current)throw Error(e(177));n.callbackNode=null,n.callbackPriority=0;var g=a.lanes|a.childLanes;if(S0(n,g),n===ae&&(ee=ae=null,de=0),!(a.subtreeFlags&2064)&&!(a.flags&2064)||ma||(ma=!0,Hp(_o,function(){return zs(),null})),g=(a.flags&15990)!==0,a.subtreeFlags&15990||g){g=Ke.transition,Ke.transition=null;var M=Nt;Nt=1;var T=Et;Et|=4,fh.current=null,Ng(n,a),zp(a,n),lg(Su),Io=!!Mu,Su=Mu=null,n.current=a,Og(a),f0(),Et=T,Nt=M,Ke.transition=g}else n.current=a;if(ma&&(ma=!1,ci=n,ya=p),g=n.pendingLanes,g===0&&(hi=null),y0(a.stateNode),Ee(n,Qt()),r!==null)for(c=n.onRecoverableError,a=0;a<r.length;a++)p=r[a],c(p.value,{componentStack:p.stack,digest:p.digest});if(pa)throw pa=!1,n=yh,yh=null,n;return ya&1&&n.tag!==0&&zs(),g=n.pendingLanes,g&1?n===gh?Gr++:(Gr=0,gh=n):Gr=0,oi(),null}function zs(){if(ci!==null){var n=Cd(ya),r=Ke.transition,a=Nt;try{if(Ke.transition=null,Nt=16>n?16:n,ci===null)var c=!1;else{if(n=ci,ci=null,ya=0,Et&6)throw Error(e(331));var p=Et;for(Et|=4,et=n.current;et!==null;){var g=et,M=g.child;if(et.flags&16){var T=g.deletions;if(T!==null){for(var I=0;I<T.length;I++){var O=T[I];for(et=O;et!==null;){var W=et;switch(W.tag){case 0:case 11:case 15:Ur(8,W,g)}var H=W.child;if(H!==null)H.return=W,et=H;else for(;et!==null;){W=et;var U=W.sibling,Q=W.return;if(bp(W),W===O){et=null;break}if(U!==null){U.return=Q,et=U;break}et=Q}}}var nt=g.alternate;if(nt!==null){var st=nt.child;if(st!==null){nt.child=null;do{var Kt=st.sibling;st.sibling=null,st=Kt}while(st!==null)}}et=g}}if(g.subtreeFlags&2064&&M!==null)M.return=g,et=M;else t:for(;et!==null;){if(g=et,g.flags&2048)switch(g.tag){case 0:case 11:case 15:Ur(9,g,g.return)}var F=g.sibling;if(F!==null){F.return=g.return,et=F;break t}et=g.return}}var E=n.current;for(et=E;et!==null;){M=et;var R=M.child;if(M.subtreeFlags&2064&&R!==null)R.return=M,et=R;else t:for(M=E;et!==null;){if(T=et,T.flags&2048)try{switch(T.tag){case 0:case 11:case 15:ca(9,T)}}catch(ot){Jt(T,T.return,ot)}if(T===M){et=null;break t}var X=T.sibling;if(X!==null){X.return=T.return,et=X;break t}et=T.return}}if(Et=p,oi(),xn&&typeof xn.onPostCommitFiberRoot=="function")try{xn.onPostCommitFiberRoot(bo,n)}catch{}c=!0}return c}finally{Nt=a,Ke.transition=r}}return!1}function Vp(n,r,a){r=As(a,r),r=sp(n,r,1),n=li(n,r,1),r=Me(),n!==null&&(pr(n,1,r),Ee(n,r))}function Jt(n,r,a){if(n.tag===3)Vp(n,n,a);else for(;r!==null;){if(r.tag===3){Vp(r,n,a);break}else if(r.tag===1){var c=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(hi===null||!hi.has(c))){n=As(a,n),n=rp(r,n,1),r=li(r,n,1),n=Me(),r!==null&&(pr(r,1,n),Ee(r,n));break}}r=r.return}}function Hg(n,r,a){var c=n.pingCache;c!==null&&c.delete(r),r=Me(),n.pingedLanes|=n.suspendedLanes&a,ae===n&&(de&a)===a&&(se===4||se===3&&(de&130023424)===de&&500>Qt()-mh?Oi(n,0):ph|=a),Ee(n,r)}function Up(n,r){r===0&&(n.mode&1?(r=Co,Co<<=1,!(Co&130023424)&&(Co=4194304)):r=1);var a=Me();n=Fn(n,r),n!==null&&(pr(n,r,a),Ee(n,a))}function Gg(n){var r=n.memoizedState,a=0;r!==null&&(a=r.retryLane),Up(n,a)}function qg(n,r){var a=0;switch(n.tag){case 13:var c=n.stateNode,p=n.memoizedState;p!==null&&(a=p.retryLane);break;case 19:c=n.stateNode;break;default:throw Error(e(314))}c!==null&&c.delete(r),Up(n,a)}var Wp;Wp=function(n,r,a){if(n!==null)if(n.memoizedProps!==r.pendingProps||Te.current)ze=!0;else{if(!(n.lanes&a)&&!(r.flags&128))return ze=!1,Pg(n,r,a);ze=!!(n.flags&131072)}else ze=!1,Ht&&r.flags&1048576&&Mf(r,Zo,r.index);switch(r.lanes=0,r.tag){case 2:var c=r.type;ua(n,r),n=r.pendingProps;var p=gs(r,fe.current);_s(r,a),p=Xu(null,r,c,n,p,a);var g=Yu();return r.flags|=1,typeof p=="object"&&p!==null&&typeof p.render=="function"&&p.$$typeof===void 0?(r.tag=1,r.memoizedState=null,r.updateQueue=null,ke(c)?(g=!0,qo(r)):g=!1,r.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,Du(r),p.updater=aa,r.stateNode=p,p._reactInternals=r,Ku(r,c,n,a),r=ih(null,r,c,!0,g,a)):(r.tag=0,Ht&&g&&zu(r),we(null,r,p,a),r=r.child),r;case 16:c=r.elementType;t:{switch(ua(n,r),n=r.pendingProps,p=c._init,c=p(c._payload),r.type=c,p=r.tag=Yg(c),n=un(c,n),p){case 0:r=nh(null,r,c,n,a);break t;case 1:r=pp(null,r,c,n,a);break t;case 11:r=up(null,r,c,n,a);break t;case 14:r=hp(null,r,c,un(c.type,n),a);break t}throw Error(e(306,c,""))}return r;case 0:return c=r.type,p=r.pendingProps,p=r.elementType===c?p:un(c,p),nh(n,r,c,p,a);case 1:return c=r.type,p=r.pendingProps,p=r.elementType===c?p:un(c,p),pp(n,r,c,p,a);case 3:t:{if(mp(r),n===null)throw Error(e(387));c=r.pendingProps,g=r.memoizedState,p=g.element,If(n,r),ta(r,c,null,a);var M=r.memoizedState;if(c=M.element,g.isDehydrated)if(g={element:c,isDehydrated:!1,cache:M.cache,pendingSuspenseBoundaries:M.pendingSuspenseBoundaries,transitions:M.transitions},r.updateQueue.baseState=g,r.memoizedState=g,r.flags&256){p=As(Error(e(423)),r),r=yp(n,r,c,a,p);break t}else if(c!==p){p=As(Error(e(424)),r),r=yp(n,r,c,a,p);break t}else for(De=ii(r.stateNode.containerInfo.firstChild),Le=r,Ht=!0,ln=null,a=kf(r,null,c,a),r.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(ws(),c===p){r=Bn(n,r,a);break t}we(n,r,c,a)}r=r.child}return r;case 5:return Ff(r),n===null&&Pu(r),c=r.type,p=r.pendingProps,g=n!==null?n.memoizedProps:null,M=p.children,_u(c,p)?M=null:g!==null&&_u(c,g)&&(r.flags|=32),fp(n,r),we(n,r,M,a),r.child;case 6:return n===null&&Pu(r),null;case 13:return gp(n,r,a);case 4:return Vu(r,r.stateNode.containerInfo),c=r.pendingProps,n===null?r.child=Ms(r,null,c,a):we(n,r,c,a),r.child;case 11:return c=r.type,p=r.pendingProps,p=r.elementType===c?p:un(c,p),up(n,r,c,p,a);case 7:return we(n,r,r.pendingProps,a),r.child;case 8:return we(n,r,r.pendingProps.children,a),r.child;case 12:return we(n,r,r.pendingProps.children,a),r.child;case 10:t:{if(c=r.type._context,p=r.pendingProps,g=r.memoizedProps,M=p.value,Dt(jo,c._currentValue),c._currentValue=M,g!==null)if(an(g.value,M)){if(g.children===p.children&&!Te.current){r=Bn(n,r,a);break t}}else for(g=r.child,g!==null&&(g.return=r);g!==null;){var T=g.dependencies;if(T!==null){M=g.child;for(var I=T.firstContext;I!==null;){if(I.context===c){if(g.tag===1){I=Rn(-1,a&-a),I.tag=2;var O=g.updateQueue;if(O!==null){O=O.shared;var W=O.pending;W===null?I.next=I:(I.next=W.next,W.next=I),O.pending=I}}g.lanes|=a,I=g.alternate,I!==null&&(I.lanes|=a),Ou(g.return,a,r),T.lanes|=a;break}I=I.next}}else if(g.tag===10)M=g.type===r.type?null:g.child;else if(g.tag===18){if(M=g.return,M===null)throw Error(e(341));M.lanes|=a,T=M.alternate,T!==null&&(T.lanes|=a),Ou(M,a,r),M=g.sibling}else M=g.child;if(M!==null)M.return=g;else for(M=g;M!==null;){if(M===r){M=null;break}if(g=M.sibling,g!==null){g.return=M.return,M=g;break}M=M.return}g=M}we(n,r,p.children,a),r=r.child}return r;case 9:return p=r.type,c=r.pendingProps.children,_s(r,a),p=je(p),c=c(p),r.flags|=1,we(n,r,c,a),r.child;
vendor: 4,142 bytes, line 40
40case 14:return c=r.type,p=un(c,r.pendingProps),p=un(c.type,p),hp(n,r,c,p,a);case 15:return cp(n,r,r.type,r.pendingProps,a);case 17:return c=r.type,p=r.pendingProps,p=r.elementType===c?p:un(c,p),ua(n,r),r.tag=1,ke(c)?(n=!0,qo(r)):n=!1,_s(r,a),np(r,c,p),Ku(r,c,p,a),ih(null,r,c,!0,n,a);case 19:return vp(n,r,a);case 22:return dp(n,r,a)}throw Error(e(156,r.tag))};function Hp(n,r){return Md(n,r)}function Xg(n,r,a,c){this.tag=n,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function tn(n,r,a,c){return new Xg(n,r,a,c)}function _h(n){return n=n.prototype,!(!n||!n.isReactComponent)}function Yg(n){if(typeof n=="function")return _h(n)?1:0;if(n!=null){if(n=n.$$typeof,n===ct)return 11;if(n===kt)return 14}return 2}function pi(n,r){var a=n.alternate;return a===null?(a=tn(n.tag,r,n.key,n.mode),a.elementType=n.elementType,a.type=n.type,a.stateNode=n.stateNode,a.alternate=n,n.alternate=a):(a.pendingProps=r,a.type=n.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=n.flags&14680064,a.childLanes=n.childLanes,a.lanes=n.lanes,a.child=n.child,a.memoizedProps=n.memoizedProps,a.memoizedState=n.memoizedState,a.updateQueue=n.updateQueue,r=n.dependencies,a.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},a.sibling=n.sibling,a.index=n.index,a.ref=n.ref,a}function wa(n,r,a,c,p,g){var M=2;if(c=n,typeof n=="function")_h(n)&&(M=1);else if(typeof n=="string")M=5;else t:switch(n){case D:return Di(a.children,p,g,r);case L:M=8,p|=8;break;case q:return n=tn(12,a,r,p|2),n.elementType=q,n.lanes=g,n;case ht:return n=tn(13,a,r,p),n.elementType=ht,n.lanes=g,n;case mt:return n=tn(19,a,r,p),n.elementType=mt,n.lanes=g,n;case Ct:return Ma(a,p,g,r);default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case J:M=10;break t;case it:M=9;break t;case ct:M=11;break t;case kt:M=14;break t;case _t:M=16,c=null;break t}throw Error(e(130,n==null?n:typeof n,""))}return r=tn(M,a,r,p),r.elementType=n,r.type=c,r.lanes=g,r}function Di(n,r,a,c){return n=tn(7,n,c,r),n.lanes=a,n}function Ma(n,r,a,c){return n=tn(22,n,c,r),n.elementType=Ct,n.lanes=a,n.stateNode={isHidden:!1},n}function bh(n,r,a){return n=tn(6,n,null,r),n.lanes=a,n}function Ah(n,r,a){return r=tn(4,n.children!==null?n.children:[],n.key,r),r.lanes=a,r.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},r}function Zg(n,r,a,c,p){this.tag=r,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=Ql(0),this.expirationTimes=Ql(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ql(0),this.identifierPrefix=c,this.onRecoverableError=p,this.mutableSourceEagerHydrationData=null}function Ch(n,r,a,c,p,g,M,T,I){return n=new Zg(n,r,a,T,I),r===1?(r=1,g===!0&&(r|=8)):r=0,g=tn(3,null,null,r),n.current=g,g.stateNode=n,g.memoizedState={element:c,isDehydrated:a,cache:null,transitions:null,pendingSuspenseBoundaries:null},Du(g),n}function Jg(n,r,a){var c=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:B,key:c==null?null:""+c,children:n,containerInfo:r,implementation:a}}function Gp(n){if(!n)return ri;n=n._reactInternals;t:{if(Ti(n)!==n||n.tag!==1)throw Error(e(170));var r=n;do{switch(r.tag){case 3:r=r.stateNode.context;break t;case 1:if(ke(r.type)){r=r.stateNode.__reactInternalMemoizedMergedChildContext;break t}}r=r.return}while(r!==null);throw Error(e(171))}if(n.tag===1){var a=n.type;if(ke(a))return xf(n,a,r)}return r}function qp(n,r,a,c,p,g,M,T,I){return n=Ch(a,c,!0,n,p,g,M,T,I),n.context=Gp(null),a=n.current,c=Me(),p=di(a),g=Rn(c,p),g.callback=r??null,li(a,g,p),n.current.lanes=p,pr(n,p,c),Ee(n,c),n}function Sa(n,r,a,c){var p=r.current,g=Me(),M=di(p);
vendor: 5,283 bytes, line 40
40return a=Gp(a),r.context===null?r.context=a:r.pendingContext=a,r=Rn(g,M),r.payload={element:n},c=c===void 0?null:c,c!==null&&(r.callback=c),n=li(p,r,M),n!==null&&(dn(n,p,M,g),Ko(n,p,M)),M}function _a(n){if(n=n.current,!n.child)return null;switch(n.child.tag){case 5:return n.child.stateNode;default:return n.child.stateNode}}function Xp(n,r){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var a=n.retryLane;n.retryLane=a!==0&&a<r?a:r}}function Th(n,r){Xp(n,r),(n=n.alternate)&&Xp(n,r)}var Yp=typeof reportError=="function"?reportError:function(n){console.error(n)};function kh(n){this._internalRoot=n}ba.prototype.render=kh.prototype.render=function(n){var r=this._internalRoot;if(r===null)throw Error(e(409));Sa(n,r,null,null)},ba.prototype.unmount=kh.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var r=n.containerInfo;Ni(function(){Sa(null,n,null,null)}),r[zn]=null}};function ba(n){this._internalRoot=n}ba.prototype.unstable_scheduleHydration=function(n){if(n){var r=zd();n={blockedOn:null,target:n,priority:r};for(var a=0;a<ti.length&&r!==0&&r<ti[a].priority;a++);ti.splice(a,0,n),a===0&&Pd(n)}};function zh(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function Aa(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11&&(n.nodeType!==8||n.nodeValue!==" react-mount-point-unstable "))}function Zp(){}function $g(n,r,a,c,p){if(p){if(typeof c=="function"){var g=c;c=function(){var O=_a(M);g.call(O)}}var M=qp(r,c,n,0,null,!1,!1,"",Zp);return n._reactRootContainer=M,n[zn]=M.current,kr(n.nodeType===8?n.parentNode:n),Ni(),M}for(;p=n.lastChild;)n.removeChild(p);if(typeof c=="function"){var T=c;c=function(){var O=_a(I);T.call(O)}}var I=Ch(n,0,!1,null,null,!1,!1,"",Zp);return n._reactRootContainer=I,n[zn]=I.current,kr(n.nodeType===8?n.parentNode:n),Ni(function(){Sa(r,I,a,c)}),I}function Ca(n,r,a,c,p){var g=a._reactRootContainer;if(g){var M=g;if(typeof p=="function"){var T=p;p=function(){var I=_a(M);T.call(I)}}Sa(r,M,n,p)}else M=$g(a,r,n,p,c);return _a(M)}Td=function(n){switch(n.tag){case 3:var r=n.stateNode;if(r.current.memoizedState.isDehydrated){var a=fr(r.pendingLanes);a!==0&&(Kl(r,a|1),Ee(r,Qt()),!(Et&6)&&(ks=Qt()+500,oi()))}break;case 13:Ni(function(){var c=Fn(n,1);if(c!==null){var p=Me();dn(c,n,1,p)}}),Th(n,1)}},tu=function(n){if(n.tag===13){var r=Fn(n,134217728);if(r!==null){var a=Me();dn(r,n,134217728,a)}Th(n,134217728)}},kd=function(n){if(n.tag===13){var r=di(n),a=Fn(n,r);if(a!==null){var c=Me();dn(a,n,r,c)}Th(n,r)}},zd=function(){return Nt},Id=function(n,r){var a=Nt;try{return Nt=n,r()}finally{Nt=a}},Xl=function(n,r,a){switch(r){case"input":if(It(n,a),r=a.name,a.type==="radio"&&r!=null){for(a=n;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll("input[name="+JSON.stringify(""+r)+'][type="radio"]'),r=0;r<a.length;r++){var c=a[r];if(c!==n&&c.form===n.form){var p=Ho(c);if(!p)throw Error(e(90));$(c),It(c,p)}}}break;case"textarea":Ze(n,a);break;case"select":r=a.value,r!=null&&Wt(n,!!a.multiple,r,!1)}},pd=wh,md=Ni;var jg={usingClientEntryPoint:!1,Events:[Er,ms,Ho,dd,fd,wh]},qr={findFiberByHostInstance:ki,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Qg={bundleType:qr.bundleType,version:qr.version,rendererPackageName:qr.rendererPackageName,rendererConfig:qr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:k.ReactCurrentDispatcher,findHostInstanceByFiber:function(n){return n=vd(n),n===null?null:n.stateNode},findFiberByHostInstance:qr.findFiberByHostInstance,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ta=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ta.isDisabled&&Ta.supportsFiber)try{bo=Ta.inject(Qg),xn=Ta}catch{}}return Pe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=jg,Pe.createPortal=function(n,r){var a=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!zh(r))throw Error(e(200));return Jg(n,r,null,a)},Pe.createRoot=function(n,r){if(!zh(n))throw Error(e(299));var a=!1,c="",p=Yp;return r!=null&&(r.unstable_strictMode===!0&&(a=!0),r.identifierPrefix!==void 0&&(c=r.identifierPrefix),r.onRecoverableError!==void 0&&(p=r.onRecoverableError)),r=Ch(n,1,!1,null,null,a,!1,c,p),n[zn]=r.current,kr(n.nodeType===8?n.parentNode:n),new kh(r)},Pe.findDOMNode=function(n){if(n==null)return null;if(n.nodeType===1)return n;var r=n._reactInternals;if(r===void 0)throw typeof n.render=="function"?Error(e(188)):(n=Object.keys(n).join(","),Error(e(268,n)));return n=vd(r),n=n===null?null:n.stateNode,n},Pe.flushSync=function(n){return Ni(n)},Pe.hydrate=function(n,r,a){if(!Aa(r))throw Error(e(200));return Ca(null,n,r,!0,a)},Pe.hydrateRoot=function(n,r,a){if(!zh(n))throw Error(e(405));var c=a!=null&&a.hydratedSources||null,p=!1,g="",M=Yp;if(a!=null&&(a.unstable_strictMode===!0&&(p=!0),a.identifierPrefix!==void 0&&(g=a.identifierPrefix),a.onRecoverableError!==void 0&&(M=a.onRecoverableError)),r=qp(r,null,n,1,a??null,p,!1,g,M),n[zn]=r.current,kr(n),c
40)for(n=0;n<c.length;n++)a=c[n],p=a._getVersion,p=p(a._source),r.mutableSourceEagerHydrationData==null?r.mutableSourceEagerHydrationData=[a,p]:r.mutableSourceEagerHydrationData.push(a,p);return new ba(r)},Pe.render=function(n,r,a){if(!Aa(r))throw Error(e(200));return Ca(null,n,r,!1,a)},Pe.unmountComponentAtNode=function(n){if(!Aa(n))throw Error(e(40));return n._reactRootContainer?(Ni(function(){Ca(null,null,n,!1,function(){n._reactRootContainer=null,n[zn]=null})}),!0):!1},Pe.unstable_batchedUpdates=wh,Pe.unstable_renderSubtreeIntoContainer=function(n,r,a,c){if(!Aa(a))throw Error(e(200));if(n==null||n._reactInternals===void 0)throw Error(e(38));return Ca(n,r,a,!1,c)},Pe.version="18.3.1-next-f1338f8080-20240426",Pe}var nm;function lx(){if(nm)return Ph.exports;nm=1;function f(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(f)}catch(t){console.error(t)}}return f(),Ph.exports=ax(),Ph.exports}var im;function ux(){if(im)return ka;im=1;var f=lx();return ka.createRoot=f.createRoot,ka.hydrateRoot=f.hydrateRoot,ka}var hx=ux();const cx="modulepreload",dx=function(f){return"/"+f},sm={},fx=function(t,e,i){let s=Promise.resolve();if(e&&e.length>0){document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),u=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));s=Promise.allSettled(e.map(h=>{if(h=dx(h),h in sm)return;sm[h]=!0;const d=h.endsWith(".css"),m=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${m}`))return;const y=document.createElement("link");if(y.rel=d?"stylesheet":cx,d||(y.as="script"),y.crossOrigin="",y.href=h,u&&y.setAttribute("nonce",u),document.head.appendChild(y),d)return new Promise((x,v)=>{y.addEventListener("load",x),y.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${h}`)))})}))}function o(l){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=l,window.dispatchEvent(u),!u.defaultPrevented)throw l}return s.then(l=>{for(const u of l||[])u.status==="rejected"&&o(u.reason);return t().catch(o)})};/**
41 * @license
42 * Copyright 2010-2024 Three.js Authors
43 * SPDX-License-Identifier: MIT
44 */const Cy="171",MM={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},SM={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},_M=0,bM=1,AM=2,CM=3,TM=0,kM=1,zM=2,IM=3,vc=0,Ty=1,EM=2,px=0,rm=1,PM=2,FM=3,RM=4,BM=5,om=100,NM=101,OM=102,LM=103,DM=104,VM=200,UM=201,WM=202,HM=203,am=204,lm=205,GM=206,qM=207,XM=208,YM=209,ZM=210,JM=211,$M=212,jM=213,QM=214,KM=0,tS=1,eS=2,um=3,nS=4,iS=5,sS=6,rS=7,zc=0,oS=1,aS=2,lS=0,uS=1,hS=2,cS=3,dS=4,fS=5,pS=6,mS=7,hm="attached",mx="detached",Ic=300,Ec=301,yx=302,gx=303,xx=304,vx=306,wc=1e3,_n=1001,Mc=1002,yn=1003,wx=1004,yS=1004,Mx=1005,gS=1005,rn=1006,Sx=1007,xS=1007,Pl=1008,vS=1008,ky=1009,_x=1010,bx=1011,Ax=1012,Cx=1013,Pc=1014,nr=1015,Tx=1016,kx=1017,zx=1018,Ix=1020,Ex=35902,Px=1021,Fx=1022,co=1023,Rx=1024,Bx=1025,Bh=1026,cm=1027,zy=1028,Iy=1029,Nx=1030,Ox=1031,wS=1032,Lx=1033,Dx=33776,Vx=33777,Ux=33778,Wx=33779,Hx=35840,Gx=35841,qx=35842,Xx=35843,Yx=36196,Zx=37492,Jx=37496,$x=37808,jx=37809,Qx=37810,Kx=37811,t1=37812,e1=37813,n1=37814,i1=37815,s1=37816,r1=37817,o1=37818,a1=37819,l1=37820,u1=37821,h1=36492,c1=36494,d1=36495,f1=36283,p1=36284,m1=36285,y1=36286,g1=2200,x1=2201,v1=2202,xl=2300,Sc=2301,Nh=2302,Js=2400,$s=2401,vl=2402,Fc=2500,Ey=2501,MS=0,SS=1,_S=2,w1=3200,bS=3201,AS=3202,CS=3203,sr=0,TS=1,Py="",nn="srgb",dm="srgb-linear",fm="linear",Oh="srgb",kS=0,Is=7680,zS=7681,IS=7682,ES=7683,PS=34055,FS=34056,RS=5386,BS=512,NS=513,OS=514,LS=515,DS=516,VS=517,US=518,pm=519,WS=512,HS=513,GS=514,qS=515,XS=516,YS=517,ZS=518,JS=519,wl=35044,$S=35048,jS=35040,QS=35045,KS=35049,t_=35041,e_=35046,n_=35050,i_=35042,s_="100",r_="300 es",_i=2e3,Ml=2001;class Ci{addEventListener(t,e){this._listeners===void 0&&(this._listeners={});const i=this._listeners;i[t]===void 0&&(i[t]=[]),i[t].indexOf(e)===-1&&i[t].push(e)}hasEventListener(t,e){if(this._listeners===void 0)return!1;const i=this._listeners;return i[t]!==void 0&&i[t].indexOf(e)!==-1}removeEventListener(t,e){if(this._listeners===void 0)return;const s=this._listeners[t];if(s!==void 0){const o=s.indexOf(e);o!==-1&&s.splice(o,1)}}dispatchEvent(t){if(this._listeners===void 0)return;const i=this._listeners[t.type];if(i!==void 0){t.target=this;const s=i.slice(0);for(let o=0,l=s.length;o<l;o++)s[o].call(this,t);t.target=null}}}const ge=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","5
445","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];let mm=1234567;const Qi=Math.PI/180,fo=180/Math.PI;function qe(){const f=Math.random()*4294967295|0,t=Math.random()*4294967295|0,e=Math.random()*4294967295|0,i=Math.random()*4294967295|0;return(ge[f&255]+ge[f>>8&255]+ge[f>>16&255]+ge[f>>24&255]+"-"+ge[t&255]+ge[t>>8&255]+"-"+ge[t>>16&15|64]+ge[t>>24&255]+"-"+ge[e&63|128]+ge[e>>8&255]+"-"+ge[e>>16&255]+ge[e>>24&255]+ge[i&255]+ge[i>>8&255]+ge[i>>16&255]+ge[i>>24&255]).toLowerCase()}function yt(f,t,e){return Math.max(t,Math.min(e,f))}function Rc(f,t){return(f%t+t)%t}function M1(f,t,e,i,s){return i+(f-t)*(s-i)/(e-t)}function S1(f,t,e){return f!==t?(e-f)/(t-f):0}function lo(f,t,e){return(1-e)*f+e*t}function _1(f,t,e,i){return lo(f,t,1-Math.exp(-e*i))}function b1(f,t=1){return t-Math.abs(Rc(f,t*2)-t)}function A1(f,t,e){return f<=t?0:f>=e?1:(f=(f-t)/(e-t),f*f*(3-2*f))}function C1(f,t,e){return f<=t?0:f>=e?1:(f=(f-t)/(e-t),f*f*f*(f*(f*6-15)+10))}function T1(f,t){return f+Math.floor(Math.random()*(t-f+1))}function k1(f,t){return f+Math.random()*(t-f)}function z1(f){return f*(.5-Math.random())}function I1(f){f!==void 0&&(mm=f);let t=mm+=1831565813;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}function E1(f){return f*Qi}function P1(f){return f*fo}function F1(f){return(f&f-1)===0&&f!==0}function R1(f){return Math.pow(2,Math.ceil(Math.log(f)/Math.LN2))}function B1(f){return Math.pow(2,Math.floor(Math.log(f)/Math.LN2))}function N1(f,t,e,i,s){const o=Math.cos,l=Math.sin,u=o(e/2),h=l(e/2),d=o((t+i)/2),m=l((t+i)/2),y=o((t-i)/2),x=l((t-i)/2),v=o((i-t)/2),w=l((i-t)/2);switch(s){case"XYX":f.set(u*m,h*y,h*x,u*d);break;case"YZY":f.set(h*x,u*m,h*y,u*d);break;case"ZXZ":f.set(h*y,h*x,u*m,u*d);break;case"XZX":f.set(u*m,h*w,h*v,u*d);break;case"YXY":f.set(h*v,u*m,h*w,u*d);break;case"ZYZ":f.set(h*w,h*v,u*m,u*d);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+s)}}function _e(f,t){switch(t.constructor){case Float32Array:return f;case Uint32Array:return f/4294967295;case Uint16Array:return f/65535;case Uint8Array:return f/255;case Int32Array:return Math.max(f/2147483647,-1);case Int16Array:return Math.max(f/32767,-1);case Int8Array:return Math.max(f/127,-1);default:throw new Error("Invalid component type.")}}function xt(f,t){switch(t.constructor){case Float32Array:return f;case Uint32Array:return Math.round(f*4294967295);case Uint16Array:return Math.round(f*65535);case Uint8Array:return Math.round(f*255);case Int32Array:return Math.round(f*2147483647);case Int16Array:return Math.round(f*32767);case Int8Array:return Math.round(f*127);default:throw new Error("Invalid component type.")}}const o_={DEG2RAD:Qi,RAD2DEG:fo,generateUUID:qe,clamp:yt,euclideanModulo:Rc,mapLinear:M1,inverseLerp:S1,lerp:lo,damp:_1,pingpong:b1,smoothstep:A1,smootherstep:C1,randInt:T1,randFloat:k1,randFloatSpread:z1,seededRandom:I1,degToRad:E1,radToDeg:P1,isPowerOfTwo:F1,ceilPowerOfTwo:R1,floorPowerOfTwo:B1,setQuaternionFromProperEuler:N1,normalize:xt,denormalize:_e};class G{constructor(t=0,e=0){G.prototype.isVector2=!0,this.x=t,this.y=e}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t,e){return this.x=t,this.y=e,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){const e=this.x,i=this.y,s=t.elements;return this.x=s[0]*e+s[3]*i+s[6],this.y=s[1]*e+s[4]*i+s[7],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,e){return this.x=yt(this.x,t.x,e.x),this.y=yt(this.y,t.y,e.y),this}clampScalar(t,e){return this.x=yt(this.x,t,e),this.y=yt(this.y,t,e),this}clampLength(t,e){const i=this.length();return this.divideScalar(i||1).multiplyScalar(yt(i,t,e))}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}
vendor: 11,415 bytes, line 44
44round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(e===0)return Math.PI/2;const i=this.dot(t)/e;return Math.acos(yt(i,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,i=this.y-t.y;return e*e+i*i}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,i){return this.x=t.x+(e.x-t.x)*i,this.y=t.y+(e.y-t.y)*i,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this}rotateAround(t,e){const i=Math.cos(e),s=Math.sin(e),o=this.x-t.x,l=this.y-t.y;return this.x=o*i-l*s+t.x,this.y=o*s+l*i+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class An{constructor(t,e,i,s,o,l,u,h,d){An.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],t!==void 0&&this.set(t,e,i,s,o,l,u,h,d)}set(t,e,i,s,o,l,u,h,d){const m=this.elements;return m[0]=t,m[1]=s,m[2]=u,m[3]=e,m[4]=o,m[5]=h,m[6]=i,m[7]=l,m[8]=d,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){const e=this.elements,i=t.elements;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this}extractBasis(t,e,i){return t.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(t){const e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const i=t.elements,s=e.elements,o=this.elements,l=i[0],u=i[3],h=i[6],d=i[1],m=i[4],y=i[7],x=i[2],v=i[5],w=i[8],S=s[0],_=s[3],b=s[6],A=s[1],C=s[4],k=s[7],N=s[2],B=s[5],D=s[8];return o[0]=l*S+u*A+h*N,o[3]=l*_+u*C+h*B,o[6]=l*b+u*k+h*D,o[1]=d*S+m*A+y*N,o[4]=d*_+m*C+y*B,o[7]=d*b+m*k+y*D,o[2]=x*S+v*A+w*N,o[5]=x*_+v*C+w*B,o[8]=x*b+v*k+w*D,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this}determinant(){const t=this.elements,e=t[0],i=t[1],s=t[2],o=t[3],l=t[4],u=t[5],h=t[6],d=t[7],m=t[8];return e*l*m-e*u*d-i*o*m+i*u*h+s*o*d-s*l*h}invert(){const t=this.elements,e=t[0],i=t[1],s=t[2],o=t[3],l=t[4],u=t[5],h=t[6],d=t[7],m=t[8],y=m*l-u*d,x=u*h-m*o,v=d*o-l*h,w=e*y+i*x+s*v;if(w===0)return this.set(0,0,0,0,0,0,0,0,0);const S=1/w;return t[0]=y*S,t[1]=(s*d-m*i)*S,t[2]=(u*i-s*l)*S,t[3]=x*S,t[4]=(m*e-s*h)*S,t[5]=(s*o-u*e)*S,t[6]=v*S,t[7]=(i*h-d*e)*S,t[8]=(l*e-i*o)*S,this}transpose(){let t;const e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){const e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this}setUvTransform(t,e,i,s,o,l,u){const h=Math.cos(o),d=Math.sin(o);return this.set(i*h,i*d,-i*(h*l+d*u)+l+t,-s*d,s*h,-s*(-d*l+h*u)+u+e,0,0,1),this}scale(t,e){return this.premultiply(Lh.makeScale(t,e)),this}rotate(t){return this.premultiply(Lh.makeRotation(-t)),this}translate(t,e){return this.premultiply(Lh.makeTranslation(t,e)),this}makeTranslation(t,e){return t.isVector2?this.set(1,0,t.x,0,1,t.y,0,0,1):this.set(1,0,t,0,1,e,0,0,1),this}makeRotation(t){const e=Math.cos(t),i=Math.sin(t);return this.set(e,-i,0,i,e,0,0,0,1),this}makeScale(t,e){return this.set(t,0,0,0,e,0,0,0,1),this}equals(t){const e=this.elements,i=t.elements;for(let s=0;s<9;s++)if(e[s]!==i[s])return!1;return!0}fromArray(t,e=0){for(let i=0;i<9;i++)this.elements[i]=t[i+e];return this}toArray(t=[],e=0){const i=this.elements;return t[e]=i[0],t[e+1]=i[1],t[e+2]=i[2],t[e+3]=i[3],t[e+4]=i[4],t[e+5]=i[5],t[e+6]=i[6],t[e+7]=i[7],t[e+8]=i[8],t}clone(){return new this.constructor().fromArray(this.elements)}}const Lh=new An;function O1(f){for(let t=f.length-1;t>=0;--t)if(f[t]>=65535)return!0;return!1}const L1={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function js(f,t){return new L1[f](t)}function Sl(f){return document.createElementNS("http://www.w3.org/1999/xhtml",f)}function a_(){const f=Sl("canvas");return f.style.display="block",f}const ym={};function l_(f){f in ym||(ym[f]=!0,console.warn(f))}function u_(f,t,e){return new Promise(function(i,s){function o(){switch(f.clientWaitSync(t,f.SYNC_FLUSH_COMMANDS_BIT,0)){case f.WAIT_FAILED:s();break;case f.TIMEOUT_EXPIRED:setTimeout(o,e);break;default:i()}}setTimeout(o,e)})}function h_(f){const t=f.elements;t[2]=.5*t[2]+.5*t[3],t[6]=.5*t[6]+.5*t[7],t[10]=.5*t[10]+.5*t[11],t[14]=.5*t[14]+.5*t[15]}function c_(f){const t=f.elements;t[11]===-1?(t[10]=-t[10]-1,t[14]=-t[14]):(t[10]=-t[10],t[14]=-t[14]+1)}const gm=new An().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),xm=new An().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function D1(){const f={enabled:!0,workingColorSpace:dm,spaces:{},convert:function(s,o,l){return this.enabled===!1||o===l||!o||!l||(this.spaces[o].transfer===Oh&&(s.r=qn(s.r),s.g=qn(s.g),s.b=qn(s.b)),this.spaces[o].primaries!==this.spaces[l].primaries&&(s.applyMatrix3(this.spaces[o].toXYZ),s.applyMatrix3(this.spaces[l].fromXYZ)),this.spaces[l].transfer===Oh&&(s.r=tr(s.r),s.g=tr(s.g),s.b=tr(s.b))),s},fromWorkingColorSpace:function(s,o){return this.convert(s,this.workingColorSpace,o)},toWorkingColorSpace:function(s,o){return this.convert(s,o,this.workingColorSpace)},getPrimaries:function(s){return this.spaces[s].primaries},getTransfer:function(s){return s===Py?fm:this.spaces[s].transfer},getLuminanceCoefficients:function(s,o=this.workingColorSpace){return s.fromArray(this.spaces[o].luminanceCoefficients)},define:function(s){Object.assign(this.spaces,s)},_getMatrix:function(s,o,l){return s.copy(this.spaces[o].toXYZ).multiply(this.spaces[l].fromXYZ)},_getDrawingBufferColorSpace:function(s){return this.spaces[s].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(s=this.workingColorSpace){return this.spaces[s].workingColorSpaceConfig.unpackColorSpace}},t=[.64,.33,.3,.6,.15,.06],e=[.2126,.7152,.0722],i=[.3127,.329];return f.define({[dm]:{primaries:t,whitePoint:i,transfer:fm,toXYZ:gm,fromXYZ:xm,luminanceCoefficients:e,workingColorSpaceConfig:{unpackColorSpace:nn},outputColorSpaceConfig:{drawingBufferColorSpace:nn}},[nn]:{primaries:t,whitePoint:i,transfer:Oh,toXYZ:gm,fromXYZ:xm,luminanceCoefficients:e,outputColorSpaceConfig:{drawingBufferColorSpace:nn}}}),f}const He=D1();function qn(f){return f<.04045?f*.0773993808:Math.pow(f*.9478672986+.0521327014,2.4)}function tr(f){return f<.0031308?f*12.92:1.055*Math.pow(f,.41666)-.055}let Es;class V1{static getDataURL(t){if(/^data:/i.test(t.src)||typeof HTMLCanvasElement>"u")return t.src;let e;if(t instanceof HTMLCanvasElement)e=t;else{Es===void 0&&(Es=Sl("canvas")),Es.width=t.width,Es.height=t.height;const i=Es.getContext("2d");t instanceof ImageData?i.putImageData(t,0,0):i.drawImage(t,0,0,t.width,t.height),e=Es}return e.width>2048||e.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",t),e.toDataURL("image/jpeg",.6)):e.toDataURL("image/png")}static sRGBToLinear(t){if(typeof HTMLImageElement<"u"&&t instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&t instanceof ImageBitmap){const e=Sl("canvas");e.width=t.width,e.height=t.height;const i=e.getContext("2d");i.drawImage(t,0,0,t.width,t.height);const s=i.getImageData(0,0,t.width,t.height),o=s.data;for(let l=0;l<o.length;l++)o[l]=qn(o[l]/255)*255;return i.putImageData(s,0,0),e}else if(t.data){const e=t.data.slice(0);for(let i=0;i<e.length;i++)e instanceof Uint8Array||e instanceof Uint8ClampedArray?e[i]=Math.floor(qn(e[i]/255)*255):e[i]=qn(e[i]);return{data:e,width:t.width,height:t.height}}else return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),t}}let U1=0;class Qs{constructor(t=null){this.isSource=!0,Object.defineProperty(this,"id",{value:U1++}),this.uuid=qe(),this.data=t,this.dataReady=!0,this.version=0}set needsUpdate(t){t===!0&&this.version++}toJSON(t){const e=t===void 0||typeof t=="string";if(!e&&t.images[this.uuid]!==void 0)return t.images[this.uuid];const i={uuid:this.uuid,url:""},s=this.data;if(s!==null){let o;if(Array.isArray(s)){o=[];for(let l=0,u=s.length;l<u;l++)s[l].isDataTexture?o.push(Dh(s[l].image)):o.push(Dh(s[l]))}else o=Dh(s);i.url=o}return e||(t.images[this.uuid]=i),i}}function Dh(f){return typeof HTMLImageElement<"u"&&f instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&f instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&f instanceof ImageBitmap?V1.getDataURL(f):f.data?{data:Array.from(f.data),width:f.width,height:f.height,type:f.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}let W1=0;class re extends Ci{constructor(t=re.DEFAULT_IMAGE,e=re.DEFAULT_MAPPING,i=_n,s=_n,o=rn,l=Pl,u=co,h=ky,d=re.DEFAULT_ANISOTROPY,m=Py){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:W1++}),this.uuid=qe(),this.name="",this.source=new Qs(t),this.mipmaps=[],this.mapping=e,this.channel=0,this.wrapS=i,this.wrapT=s,this.magFilter=o,this.minFilter=l,this.anisotropy=d,this.format=u,this.internalFormat=null,this.type=h,this.offset=new G(0,0),this.repeat=new G(1,1),this.center=new G(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new An,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=m,this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1,this.pmremVersion=0}get image(){return this.source.data}set image(t=null){this.source.data=t}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return new this.constructor().copy(this)}copy(t){return this.name=t.name,this.source=t.source,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.channel=t.channel,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.internalFormat=t.internalFormat,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.colorSpace
vendor: 5,538 bytes, line 44
44=t.colorSpace,this.userData=JSON.parse(JSON.stringify(t.userData)),this.needsUpdate=!0,this}toJSON(t){const e=t===void 0||typeof t=="string";if(!e&&t.textures[this.uuid]!==void 0)return t.textures[this.uuid];const i={metadata:{version:4.6,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(t).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(i.userData=this.userData),e||(t.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(this.mapping!==Ic)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case wc:t.x=t.x-Math.floor(t.x);break;case _n:t.x=t.x<0?0:1;break;case Mc:Math.abs(Math.floor(t.x)%2)===1?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x);break}if(t.y<0||t.y>1)switch(this.wrapT){case wc:t.y=t.y-Math.floor(t.y);break;case _n:t.y=t.y<0?0:1;break;case Mc:Math.abs(Math.floor(t.y)%2)===1?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y);break}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){t===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(t){t===!0&&this.pmremVersion++}}re.DEFAULT_IMAGE=null;re.DEFAULT_MAPPING=Ic;re.DEFAULT_ANISOTROPY=1;class he{constructor(t=0,e=0,i=0,s=1){he.prototype.isVector4=!0,this.x=t,this.y=e,this.z=i,this.w=s}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t,e,i,s){return this.x=t,this.y=e,this.z=i,this.w=s,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){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: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w!==void 0?t.w:1,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){const e=this.x,i=this.y,s=this.z,o=this.w,l=t.elements;return this.x=l[0]*e+l[4]*i+l[8]*s+l[12]*o,this.y=l[1]*e+l[5]*i+l[9]*s+l[13]*o,this.z=l[2]*e+l[6]*i+l[10]*s+l[14]*o,this.w=l[3]*e+l[7]*i+l[11]*s+l[15]*o,this}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this.w/=t.w,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromQuaternion(t){this.w=2*Math.acos(t.w);const e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this}setAxisAngleFromRotationMatrix(t){let e,i,s,o;const h=t.elements,d=h[0],m=h[4],y=h[8],x=h[1],v=h[5],w=h[9],S=h[2],_=h[6],b=h[10];if(Math.abs(m-x)<.01&&Math.abs(y-S)<.01&&Math.abs(w-_)<.01){if(Math.abs(m+x)<.1&&Math.abs(y+S)<.1&&Math.abs(w+_)<.1&&Math.abs(d+v+b-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;const C=(d+1)/2,k=(v+1)/2,N=(b+1)/2,B=(m+x)/4,D=(y+S)/4,L=(w+_)/4;return C>k&&C>N?C<.01?(i=0,s=.707106781,o=.707106781):(i=Math.sqrt(C),s=B/i,o=D/i):k>N?k<.01?(i=.707106781,s=0,o=.707106781):(s=Math.sqrt(k),i=B/s,o=L/s):N<.01?(i=.707106781,s=.707106781,o=0):(o=Math.sqrt(N),i=D/o,s=L/o),this.set(i,s,o,e),this}let A=Math.sqrt((_-w)*(_-w)+(y-S)*(y-S)+(x-m)*(x-m));return Math.abs(A)<.001&&(A=1),this.x=(_-w)/A,this.y=(y-S)/A,this.z=(x-m)/A,this.w=Math.acos((d+v+b-1)/2),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this.w=e[15],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this}clamp(t,e){return this.x=yt(this.x,t.x,e.x),this.y=yt(this.y,t.y,e.y),this.z=yt(this.z,t.z,e.z),this.w=yt(this.w,t.w,e.w),this}clampScalar(t,e){return this.x=yt(this.x,t,e),this.y=yt(this.y,t,e),this.z=yt(this.z,t,e),this.w=yt(this.w,t,e),this}clampLength(t,e){const i=this.length();return this.divideScalar(i||1).multiplyScalar(yt(i,t,e))}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}
vendor: 10,309 bytes, line 44
44round(){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=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.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(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this}lerpVectors(t,e,i){return this.x=t.x+(e.x-t.x)*i,this.y=t.y+(e.y-t.y)*i,this.z=t.z+(e.z-t.z)*i,this.w=t.w+(e.w-t.w)*i,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),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 H1 extends Ci{constructor(t=1,e=1,i={}){super(),this.isRenderTarget=!0,this.width=t,this.height=e,this.depth=1,this.scissor=new he(0,0,t,e),this.scissorTest=!1,this.viewport=new he(0,0,t,e);const s={width:t,height:e,depth:1};i=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:rn,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},i);const o=new re(s,i.mapping,i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.colorSpace);o.flipY=!1,o.generateMipmaps=i.generateMipmaps,o.internalFormat=i.internalFormat,this.textures=[];const l=i.count;for(let u=0;u<l;u++)this.textures[u]=o.clone(),this.textures[u].isRenderTargetTexture=!0;this.depthBuffer=i.depthBuffer,this.stencilBuffer=i.stencilBuffer,this.resolveDepthBuffer=i.resolveDepthBuffer,this.resolveStencilBuffer=i.resolveStencilBuffer,this.depthTexture=i.depthTexture,this.samples=i.samples}get texture(){return this.textures[0]}set texture(t){this.textures[0]=t}setSize(t,e,i=1){if(this.width!==t||this.height!==e||this.depth!==i){this.width=t,this.height=e,this.depth=i;for(let s=0,o=this.textures.length;s<o;s++)this.textures[s].image.width=t,this.textures[s].image.height=e,this.textures[s].image.depth=i;this.dispose()}this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)}clone(){return new this.constructor().copy(this)}copy(t){this.width=t.width,this.height=t.height,this.depth=t.depth,this.scissor.copy(t.scissor),this.scissorTest=t.scissorTest,this.viewport.copy(t.viewport),this.textures.length=0;for(let i=0,s=t.textures.length;i<s;i++)this.textures[i]=t.textures[i].clone(),this.textures[i].isRenderTargetTexture=!0;const e=Object.assign({},t.texture.image);return this.texture.source=new Qs(e),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.resolveDepthBuffer=t.resolveDepthBuffer,this.resolveStencilBuffer=t.resolveStencilBuffer,t.depthTexture!==null&&(this.depthTexture=t.depthTexture.clone()),this.samples=t.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class Fl extends H1{constructor(t=1,e=1,i={}){super(t,e,i),this.isWebGLRenderTarget=!0}}class G1 extends re{constructor(t=null,e=1,i=1,s=1){super(null),this.isDataArrayTexture=!0,this.image={data:t,width:e,height:i,depth:s},this.magFilter=yn,this.minFilter=yn,this.wrapR=_n,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(t){this.layerUpdates.add(t)}clearLayerUpdates(){this.layerUpdates.clear()}}class d_ extends Fl{constructor(t=1,e=1,i=1,s={}){super(t,e,s),this.isWebGLArrayRenderTarget=!0,this.depth=i,this.texture=new G1(null,t,e,i),this.texture.isRenderTargetTexture=!0}}class q1 extends re{constructor(t=null,e=1,i=1,s=1){super(null),this.isData3DTexture=!0,this.image={data:t,width:e,height:i,depth:s},this.magFilter=yn,this.minFilter=yn,this.wrapR=_n,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class f_ extends Fl{constructor(t=1,e=1,i=1,s={}){super(t,e,s),this.isWebGL3DRenderTarget=!0,this.depth=i,this.texture=new q1(null,t,e,i),this.texture.isRenderTargetTexture=!0}}class Xe{constructor(t=0,e=0,i=0,s=1){this.isQuaternion=!0,this._x=t,this._y=e,this._z=i,this._w=s}static slerpFlat(t,e,i,s,o,l,u){let h=i[s+0],d=i[s+1],m=i[s+2],y=i[s+3];const x=o[l+0],v=o[l+1],w=o[l+2],S=o[l+3];if(u===0){t[e+0]=h,t[e+1]=d,t[e+2]=m,t[e+3]=y;return}if(u===1){t[e+0]=x,t[e+1]=v,t[e+2]=w,t[e+3]=S;return}if(y!==S||h!==x||d!==v||m!==w){let _=1-u;const b=h*x+d*v+m*w+y*S,A=b>=0?1:-1,C=1-b*b;if(C>Number.EPSILON){const N=Math.sqrt(C),B=Math.atan2(N,b*A);_=Math.sin(_*B)/N,u=Math.sin(u*B)/N}const k=u*A;if(h=h*_+x*k,d=d*_+v*k,m=m*_+w*k,y=y*_+S*k,_===1-u){const N=1/Math.sqrt(h*h+d*d+m*m+y*y);h*=N,d*=N,m*=N,y*=N}}t[e]=h,t[e+1]=d,t[e+2]=m,t[e+3]=y}static multiplyQuaternionsFlat(t,e,i,s,o,l){const u=i[s],h=i[s+1],d=i[s+2],m=i[s+3],y=o[l],x=o[l+1],v=o[l+2],w=o[l+3];return t[e]=u*w+m*y+h*v-d*x,t[e+1]=h*w+m*x+d*y-u*v,t[e+2]=d*w+m*v+u*x-h*y,t[e+3]=m*w-u*y-h*x-d*v,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,e,i,s){return this._x=t,this._y=e,this._z=i,this._w=s,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,e=!0){const i=t._x,s=t._y,o=t._z,l=t._order,u=Math.cos,h=Math.sin,d=u(i/2),m=u(s/2),y=u(o/2),x=h(i/2),v=h(s/2),w=h(o/2);switch(l){case"XYZ":this._x=x*m*y+d*v*w,this._y=d*v*y-x*m*w,this._z=d*m*w+x*v*y,this._w=d*m*y-x*v*w;break;case"YXZ":this._x=x*m*y+d*v*w,this._y=d*v*y-x*m*w,this._z=d*m*w-x*v*y,this._w=d*m*y+x*v*w;break;case"ZXY":this._x=x*m*y-d*v*w,this._y=d*v*y+x*m*w,this._z=d*m*w+x*v*y,this._w=d*m*y-x*v*w;break;case"ZYX":this._x=x*m*y-d*v*w,this._y=d*v*y+x*m*w,this._z=d*m*w-x*v*y,this._w=d*m*y+x*v*w;break;case"YZX":this._x=x*m*y+d*v*w,this._y=d*v*y+x*m*w,this._z=d*m*w-x*v*y,this._w=d*m*y-x*v*w;break;case"XZY":this._x=x*m*y-d*v*w,this._y=d*v*y-x*m*w,this._z=d*m*w+x*v*y,this._w=d*m*y+x*v*w;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+l)}return e===!0&&this._onChangeCallback(),this}setFromAxisAngle(t,e){const i=e/2,s=Math.sin(i);return this._x=t.x*s,this._y=t.y*s,this._z=t.z*s,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(t){const e=t.elements,i=e[0],s=e[4],o=e[8],l=e[1],u=e[5],h=e[9],d=e[2],m=e[6],y=e[10],x=i+u+y;if(x>0){const v=.5/Math.sqrt(x+1);this._w=.25/v,this._x=(m-h)*v,this._y=(o-d)*v,this._z=(l-s)*v}else if(i>u&&i>y){const v=2*Math.sqrt(1+i-u-y);this._w=(m-h)/v,this._x=.25*v,this._y=(s+l)/v,this._z=(o+d)/v}else if(u>y){const v=2*Math.sqrt(1+u-i-y);this._w=(o-d)/v,this._x=(s+l)/v,this._y=.25*v,this._z=(h+m)/v}else{const v=2*Math.sqrt(1+y-i-u);this._w=(l-s)/v,this._x=(o+d)/v,this._y=(h+m)/v,this._z=.25*v}return this._onChangeCallback(),this}setFromUnitVectors(t,e){let i=t.dot(e)+1;return i<Number.EPSILON?(i=0,Math.abs(t.x)>Math.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=i):(this._x=0,this._y=-t.z,this._z=t.y,this._w=i)):(this._x=t.y*e.z-t.z*e.y,this._y=t.z*e.x-t.x*e.z,this._z=t.x*e.y-t.y*e.x,this._w=i),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(yt(this.dot(t),-1,1)))}rotateTowards(t,e){const i=this.angleTo(t);if(i===0)return this;const s=Math.min(1,e/i);return this.slerp(t,s),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(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._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 t=this.length();return t===0?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,e){const i=t._x,s=t._y,o=t._z,l=t._w,u=e._x,h=e._y,d=e._z,m=e._w;return this._x=i*m+l*u+s*d-o*h,this._y=s*m+l*h+o*u-i*d,this._z=o*m+l*d+i*h-s*u,this._w=l*m-i*u-s*h-o*d,this._onChangeCallback(),this}slerp(t,e){if(e===0)return this;if(e===1)return this.copy(t);const i=this._x,s=this._y,o=this._z,l=this._w;let u=l*t._w+i*t._x+s*t._y+o*t._z;if(u<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,u=-u):this.copy(t),u>=1)return this._w=l,this._x=i,this._y=s,this._z=o,this;const h=1-u*u;if(h<=Number.EPSILON){const v=1-e;return this._w=v*l+e*this._w,this._x=v*i+e*this._x,this._y=v*s+e*this._y,this._z=v*o+e*this._z,this.normalize(),this}const d=Math.sqrt(h),m=Math.atan2(d,u),y=Math.sin((1-e)*m)/d,x=Math.sin(e*m)/d;return this._w=l*y+this._w*x,this._x=i*y+this._x*x,this._y=s*y+this._y*x,this._z=o*y+this._z*x,this._onChangeCallback(),this}slerpQuaternions(t,e,i){return this.copy(t).slerp(e,i)}random(){const t=2*Math.PI*Math.random(),e=2*Math.PI*Math.random(),i=Math.random(),s=Math.sqrt(1-i),o=Math.sqrt(i);return this.set(s*Math.sin(t),s*Math.cos(t),o*Math.sin(e),o*Math.cos(e))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,e=0){return this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t}fromBufferAttribute(t,e){return this._x=t.getX(e),this._y=t.getY(e),this._z=t.getZ(e),this._w=t.getW(e),this._onChangeCallback(),this}toJSON(){return this.toArray()}
vendor: 10,011 bytes, line 44
44_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class z{constructor(t=0,e=0,i=0){z.prototype.isVector3=!0,this.x=t,this.y=e,this.z=i}set(t,e,i){return i===void 0&&(i=this.z),this.x=t,this.y=e,this.z=i,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}applyEuler(t){return this.applyQuaternion(vm.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(vm.setFromAxisAngle(t,e))}applyMatrix3(t){const e=this.x,i=this.y,s=this.z,o=t.elements;return this.x=o[0]*e+o[3]*i+o[6]*s,this.y=o[1]*e+o[4]*i+o[7]*s,this.z=o[2]*e+o[5]*i+o[8]*s,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const e=this.x,i=this.y,s=this.z,o=t.elements,l=1/(o[3]*e+o[7]*i+o[11]*s+o[15]);return this.x=(o[0]*e+o[4]*i+o[8]*s+o[12])*l,this.y=(o[1]*e+o[5]*i+o[9]*s+o[13])*l,this.z=(o[2]*e+o[6]*i+o[10]*s+o[14])*l,this}applyQuaternion(t){const e=this.x,i=this.y,s=this.z,o=t.x,l=t.y,u=t.z,h=t.w,d=2*(l*s-u*i),m=2*(u*e-o*s),y=2*(o*i-l*e);return this.x=e+h*d+l*y-u*m,this.y=i+h*m+u*d-o*y,this.z=s+h*y+o*m-l*d,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){const e=this.x,i=this.y,s=this.z,o=t.elements;return this.x=o[0]*e+o[4]*i+o[8]*s,this.y=o[1]*e+o[5]*i+o[9]*s,this.z=o[2]*e+o[6]*i+o[10]*s,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,e){return this.x=yt(this.x,t.x,e.x),this.y=yt(this.y,t.y,e.y),this.z=yt(this.z,t.z,e.z),this}clampScalar(t,e){return this.x=yt(this.x,t,e),this.y=yt(this.y,t,e),this.z=yt(this.z,t,e),this}clampLength(t,e){const i=this.length();return this.divideScalar(i||1).multiplyScalar(yt(i,t,e))}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=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.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(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this}lerpVectors(t,e,i){return this.x=t.x+(e.x-t.x)*i,this.y=t.y+(e.y-t.y)*i,this.z=t.z+(e.z-t.z)*i,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,e){const i=t.x,s=t.y,o=t.z,l=e.x,u=e.y,h=e.z;return this.x=s*h-o*u,this.y=o*l-i*h,this.z=i*u-s*l,this}projectOnVector(t){const e=t.lengthSq();if(e===0)return this.set(0,0,0);const i=t.dot(this)/e;return this.copy(t).multiplyScalar(i)}projectOnPlane(t){return Vh.copy(this).projectOnVector(t),this.sub(Vh)}reflect(t){return this.sub(Vh.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(e===0)return Math.PI/2;const i=this.dot(t)/e;return Math.acos(yt(i,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,i=this.y-t.y,s=this.z-t.z;return e*e+i*i+s*s}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,e,i){const s=Math.sin(e)*t;return this.x=s*Math.sin(i),this.y=Math.cos(e)*t,this.z=s*Math.cos(i),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,e,i){return this.x=t*Math.sin(e),this.y=i,this.z=t*Math.cos(e),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this}setFromMatrixScale(t){const e=this.setFromMatrixColumn(t,0).length(),i=this.setFromMatrixColumn(t,1).length(),s=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=i,this.z=s,this}setFromMatrixColumn(t,e){return this.fromArray(t.elements,e*4)}setFromMatrix3Column(t,e){return this.fromArray(t.elements,e*3)}setFromEuler(t){return this.x=t._x,this.y=t._y,this.z=t._z,this}setFromColor(t){return this.x=t.r,this.y=t.g,this.z=t.b,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const t=Math.random()*Math.PI*2,e=Math.random()*2-1,i=Math.sqrt(1-e*e);return this.x=i*Math.cos(t),this.y=e,this.z=i*Math.sin(t),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const Vh=new z,vm=new Xe;class Be{constructor(t=new z(1/0,1/0,1/0),e=new z(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=t,this.max=e}set(t,e){return this.min.copy(t),this.max.copy(e),this}setFromArray(t){this.makeEmpty();for(let e=0,i=t.length;e<i;e+=3)this.expandByPoint(fn.fromArray(t,e));return this}setFromBufferAttribute(t){this.makeEmpty();for(let e=0,i=t.count;e<i;e++)this.expandByPoint(fn.fromBufferAttribute(t,e));return this}setFromPoints(t){this.makeEmpty();for(let e=0,i=t.length;e<i;e++)this.expandByPoint(t[e]);return this}setFromCenterAndSize(t,e){const i=fn.copy(e).multiplyScalar(.5);return this.min.copy(t).sub(i),this.max.copy(t).add(i),this}setFromObject(t,e=!1){return this.makeEmpty(),this.expandByObject(t,e)}clone(){return new this.constructor().copy(this)}copy(t){return this.min.copy(t.min),this.max.copy(t.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(t){return this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(t){return this.isEmpty()?t.set(0,0,0):t.subVectors(this.max,this.min)}expandByPoint(t){return this.min.min(t),this.max.max(t),this}expandByVector(t){return this.min.sub(t),this.max.add(t),this}expandByScalar(t){return this.min.addScalar(-t),this.max.addScalar(t),this}expandByObject(t,e=!1){t.updateWorldMatrix(!1,!1);const i=t.geometry;if(i!==void 0){const o=i.getAttribute("position");if(e===!0&&o!==void 0&&t.isInstancedMesh!==!0)for(let l=0,u=o.count;l<u;l++)t.isMesh===!0?t.getVertexPosition(l,fn):fn.fromBufferAttribute(o,l),fn.applyMatrix4(t.matrixWorld),this.expandByPoint(fn);else t.boundingBox!==void 0?(t.boundingBox===null&&t.computeBoundingBox(),za.copy(t.boundingBox)):(i.boundingBox===null&&i.computeBoundingBox(),za.copy(i.boundingBox)),za.applyMatrix4(t.matrixWorld),this.union(za)}const s=t.children;for(let o=0,l=s.length;o<l;o++)this.expandByObject(s[o],e);return this}containsPoint(t){return t.x>=this.min.x&&t.x<=this.max.x&&t.y>=this.min.y&&t.y<=this.max.y&&t.z>=this.min.z&&t.z<=this.max.z}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z}getParameter(t,e){return e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(t){return t.max.x>=this.min.x&&t.min.x<=this.max.x&&t.max.y>=this.min.y&&t.min.y<=this.max.y&&t.max.z>=this.min.z&&t.min.z<=this.max.z}intersectsSphere(t){return this.clampPoint(t.center,fn),fn.distanceToSquared(t.center)<=t.radius*t.radius}intersectsPlane(t){let e,i;return t.normal.x>0?(e=t.normal.x*this.min.x,i=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,i=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,i+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,i+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,i+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,i+=t.normal.z*this.min.z),e<=-t.constant&&i>=-t.constant}intersectsTriangle(t){if(this.isEmpty())return!1;this.getCenter(Yr),Ia.subVectors(this.max,Yr),Ps.subVectors(t.a,Yr),Fs.subVectors(t.b,Yr),Rs.subVectors(t.c,Yr),yi.subVectors(Fs,Ps),gi.subVectors(Rs,Fs),Vi.subVectors(Ps,Rs);let e=[0,-yi.z,yi.y,0,-gi.z,gi.y,0,-Vi.z,Vi.y,yi.z,0,-yi.x,gi.z,0,-gi.x,Vi.z,0,-Vi.x,-yi.y,yi.x,0,-gi.y,gi.x,0,-Vi.y,Vi.x,0];
vendor: 19,238 bytes, line 44
44return!Uh(e,Ps,Fs,Rs,Ia)||(e=[1,0,0,0,1,0,0,0,1],!Uh(e,Ps,Fs,Rs,Ia))?!1:(Ea.crossVectors(yi,gi),e=[Ea.x,Ea.y,Ea.z],Uh(e,Ps,Fs,Rs,Ia))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,fn).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=this.getSize(fn).length()*.5),t}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}applyMatrix4(t){return this.isEmpty()?this:(On[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),On[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),On[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),On[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),On[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),On[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),On[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),On[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(On),this)}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}const On=[new z,new z,new z,new z,new z,new z,new z,new z],fn=new z,za=new Be,Ps=new z,Fs=new z,Rs=new z,yi=new z,gi=new z,Vi=new z,Yr=new z,Ia=new z,Ea=new z,Ui=new z;function Uh(f,t,e,i,s){for(let o=0,l=f.length-3;o<=l;o+=3){Ui.fromArray(f,o);const u=s.x*Math.abs(Ui.x)+s.y*Math.abs(Ui.y)+s.z*Math.abs(Ui.z),h=t.dot(Ui),d=e.dot(Ui),m=i.dot(Ui);if(Math.max(-Math.max(h,d,m),Math.min(h,d,m))>u)return!1}return!0}const X1=new Be,Zr=new z,Wh=new z;class be{constructor(t=new z,e=-1){this.isSphere=!0,this.center=t,this.radius=e}set(t,e){return this.center.copy(t),this.radius=e,this}setFromPoints(t,e){const i=this.center;e!==void 0?i.copy(e):X1.setFromPoints(t).getCenter(i);let s=0;for(let o=0,l=t.length;o<l;o++)s=Math.max(s,i.distanceToSquared(t[o]));return this.radius=Math.sqrt(s),this}copy(t){return this.center.copy(t.center),this.radius=t.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(t){return t.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(t){return t.distanceTo(this.center)-this.radius}intersectsSphere(t){const e=this.radius+t.radius;return t.center.distanceToSquared(this.center)<=e*e}intersectsBox(t){return t.intersectsSphere(this)}intersectsPlane(t){return Math.abs(t.distanceToPoint(this.center))<=this.radius}clampPoint(t,e){const i=this.center.distanceToSquared(t);return e.copy(t),i>this.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e}getBoundingBox(t){return this.isEmpty()?(t.makeEmpty(),t):(t.set(this.center,this.center),t.expandByScalar(this.radius),t)}applyMatrix4(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this}translate(t){return this.center.add(t),this}expandByPoint(t){if(this.isEmpty())return this.center.copy(t),this.radius=0,this;Zr.subVectors(t,this.center);const e=Zr.lengthSq();if(e>this.radius*this.radius){const i=Math.sqrt(e),s=(i-this.radius)*.5;this.center.addScaledVector(Zr,s/i),this.radius+=s}return this}union(t){return t.isEmpty()?this:this.isEmpty()?(this.copy(t),this):(this.center.equals(t.center)===!0?this.radius=Math.max(this.radius,t.radius):(Wh.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(Zr.copy(t.center).add(Wh)),this.expandByPoint(Zr.copy(t.center).sub(Wh))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return new this.constructor().copy(this)}}const Ln=new z,Hh=new z,Pa=new z,xi=new z,Gh=new z,Fa=new z,qh=new z;class xo{constructor(t=new z,e=new z(0,0,-1)){this.origin=t,this.direction=e}set(t,e){return this.origin.copy(t),this.direction.copy(e),this}copy(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this}at(t,e){return e.copy(this.origin).addScaledVector(this.direction,t)}lookAt(t){return this.direction.copy(t).sub(this.origin).normalize(),this}recast(t){return this.origin.copy(this.at(t,Ln)),this}closestPointToPoint(t,e){e.subVectors(t,this.origin);const i=e.dot(this.direction);return i<0?e.copy(this.origin):e.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(t){return Math.sqrt(this.distanceSqToPoint(t))}distanceSqToPoint(t){const e=Ln.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(Ln.copy(this.origin).addScaledVector(this.direction,e),Ln.distanceToSquared(t))}distanceSqToSegment(t,e,i,s){Hh.copy(t).add(e).multiplyScalar(.5),Pa.copy(e).sub(t).normalize(),xi.copy(this.origin).sub(Hh);const o=t.distanceTo(e)*.5,l=-this.direction.dot(Pa),u=xi.dot(this.direction),h=-xi.dot(Pa),d=xi.lengthSq(),m=Math.abs(1-l*l);let y,x,v,w;if(m>0)if(y=l*h-u,x=l*u-h,w=o*m,y>=0)if(x>=-w)if(x<=w){const S=1/m;y*=S,x*=S,v=y*(y+l*x+2*u)+x*(l*y+x+2*h)+d}else x=o,y=Math.max(0,-(l*x+u)),v=-y*y+x*(x+2*h)+d;else x=-o,y=Math.max(0,-(l*x+u)),v=-y*y+x*(x+2*h)+d;else x<=-w?(y=Math.max(0,-(-l*o+u)),x=y>0?-o:Math.min(Math.max(-o,-h),o),v=-y*y+x*(x+2*h)+d):x<=w?(y=0,x=Math.min(Math.max(-o,-h),o),v=x*(x+2*h)+d):(y=Math.max(0,-(l*o+u)),x=y>0?o:Math.min(Math.max(-o,-h),o),v=-y*y+x*(x+2*h)+d);else x=l>0?-o:o,y=Math.max(0,-(l*x+u)),v=-y*y+x*(x+2*h)+d;return i&&i.copy(this.origin).addScaledVector(this.direction,y),s&&s.copy(Hh).addScaledVector(Pa,x),v}intersectSphere(t,e){Ln.subVectors(t.center,this.origin);const i=Ln.dot(this.direction),s=Ln.dot(Ln)-i*i,o=t.radius*t.radius;if(s>o)return null;const l=Math.sqrt(o-s),u=i-l,h=i+l;return h<0?null:u<0?this.at(h,e):this.at(u,e)}intersectsSphere(t){return this.distanceSqToPoint(t.center)<=t.radius*t.radius}distanceToPlane(t){const e=t.normal.dot(this.direction);if(e===0)return t.distanceToPoint(this.origin)===0?0:null;const i=-(this.origin.dot(t.normal)+t.constant)/e;return i>=0?i:null}intersectPlane(t,e){const i=this.distanceToPlane(t);return i===null?null:this.at(i,e)}intersectsPlane(t){const e=t.distanceToPoint(this.origin);return e===0||t.normal.dot(this.direction)*e<0}intersectBox(t,e){let i,s,o,l,u,h;const d=1/this.direction.x,m=1/this.direction.y,y=1/this.direction.z,x=this.origin;return d>=0?(i=(t.min.x-x.x)*d,s=(t.max.x-x.x)*d):(i=(t.max.x-x.x)*d,s=(t.min.x-x.x)*d),m>=0?(o=(t.min.y-x.y)*m,l=(t.max.y-x.y)*m):(o=(t.max.y-x.y)*m,l=(t.min.y-x.y)*m),i>l||o>s||((o>i||isNaN(i))&&(i=o),(l<s||isNaN(s))&&(s=l),y>=0?(u=(t.min.z-x.z)*y,h=(t.max.z-x.z)*y):(u=(t.max.z-x.z)*y,h=(t.min.z-x.z)*y),i>h||u>s)||((u>i||i!==i)&&(i=u),(h<s||s!==s)&&(s=h),s<0)?null:this.at(i>=0?i:s,e)}intersectsBox(t){return this.intersectBox(t,Ln)!==null}intersectTriangle(t,e,i,s,o){Gh.subVectors(e,t),Fa.subVectors(i,t),qh.crossVectors(Gh,Fa);let l=this.direction.dot(qh),u;if(l>0){if(s)return null;u=1}else if(l<0)u=-1,l=-l;else return null;xi.subVectors(this.origin,t);const h=u*this.direction.dot(Fa.crossVectors(xi,Fa));if(h<0)return null;const d=u*this.direction.dot(Gh.cross(xi));if(d<0||h+d>l)return null;const m=-u*xi.dot(qh);return m<0?null:this.at(m/l,o)}applyMatrix4(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this}equals(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class wt{constructor(t,e,i,s,o,l,u,h,d,m,y,x,v,w,S,_){wt.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],t!==void 0&&this.set(t,e,i,s,o,l,u,h,d,m,y,x,v,w,S,_)}set(t,e,i,s,o,l,u,h,d,m,y,x,v,w,S,_){const b=this.elements;return b[0]=t,b[4]=e,b[8]=i,b[12]=s,b[1]=o,b[5]=l,b[9]=u,b[13]=h,b[2]=d,b[6]=m,b[10]=y,b[14]=x,b[3]=v,b[7]=w,b[11]=S,b[15]=_,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 wt().fromArray(this.elements)}copy(t){const e=this.elements,i=t.elements;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],e[9]=i[9],e[10]=i[10],e[11]=i[11],e[12]=i[12],e[13]=i[13],e[14]=i[14],e[15]=i[15],this}copyPosition(t){const e=this.elements,i=t.elements;return e[12]=i[12],e[13]=i[13],e[14]=i[14],this}setFromMatrix3(t){const e=t.elements;return this.set(e[0],e[3],e[6],0,e[1],e[4],e[7],0,e[2],e[5],e[8],0,0,0,0,1),this}extractBasis(t,e,i){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(t,e,i){return this.set(t.x,e.x,i.x,0,t.y,e.y,i.y,0,t.z,e.z,i.z,0,0,0,0,1),this}extractRotation(t){const e=this.elements,i=t.elements,s=1/Bs.setFromMatrixColumn(t,0).length(),o=1/Bs.setFromMatrixColumn(t,1).length(),l=1/Bs.setFromMatrixColumn(t,2).length();return e[0]=i[0]*s,e[1]=i[1]*s,e[2]=i[2]*s,e[3]=0,e[4]=i[4]*o,e[5]=i[5]*o,e[6]=i[6]*o,e[7]=0,e[8]=i[8]*l,e[9]=i[9]*l,e[10]=i[10]*l,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromEuler(t){const e=this.elements,i=t.x,s=t.y,o=t.z,l=Math.cos(i),u=Math.sin(i),h=Math.cos(s),d=Math.sin(s),m=Math.cos(o),y=Math.sin(o);if(t.order==="XYZ"){const x=l*m,v=l*y,w=u*m,S=u*y;e[0]=h*m,e[4]=-h*y,e[8]=d,e[1]=v+w*d,e[5]=x-S*d,e[9]=-u*h,e[2]=S-x*d,e[6]=w+v*d,e[10]=l*h}else if(t.order==="YXZ"){const x=h*m,v=h*y,w=d*m,S=d*y;e[0]=x+S*u,e[4]=w*u-v,e[8]=l*d,e[1]=l*y,e[5]=l*m,e[9]=-u,e[2]=v*u-w,e[6]=S+x*u,e[10]=l*h}else if(t.order==="ZXY"){const x=h*m,v=h*y,w=d*m,S=d*y;e[0]=x-S*u,e[4]=-l*y,e[8]=w+v*u,e[1]=v+w*u,e[5]=l*m,e[9]=S-x*u,e[2]=-l*d,e[6]=u,e[10]=l*h}else if(t.order==="ZYX"){const x=l*m,v=l*y,w=u*m,S=u*y;e[0]=h*m,e[4]=w*d-v,e[8]=x*d+S,e[1]=h*y,e[5]=S*d+x,e[9]=v*d-w,e[2]=-d,e[6]=u*h,e[10]=l*h}else if(t.order==="YZX"){const x=l*h,v=l*d,w=u*h,S=u*d;e[0]=h*m,e[4]=S-x*y,e[8]=w*y+v,e[1]=y,e[5]=l*m,e[9]=-u*m,e[2]=-d*m,e[6]=v*y+w,e[10]=x-S*y}else if(t.order==="XZY"){const x=l*h,v=l*d,w=u*h,S=u*d;e[0]=h*m,e[4]=-y,e[8]=d*m,e[1]=x*y+S,e[5]=l*m,e[9]=v*y-w,e[2]=w*y-v,e[6]=u*m,e[10]=S*y+x}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromQuaternion(t){return this.compose(Y1,t,Z1)}lookAt(t,e,i){const s=this.elements;return Ue.subVectors(t,e),Ue.lengthSq()===0&&(Ue.z=1),Ue.normalize(),vi.crossVectors(i,Ue),vi.lengthSq()===0&&(Math.abs(i.z)===1?Ue.x+=1e-4:Ue.z+=1e-4,Ue.normalize(),vi.crossVectors(i,Ue)),vi.normalize(),Ra.crossVectors(Ue,vi),s[0]=vi.x,s[4]=Ra.x,s[8]=Ue.x,s[1]=vi.y,s[5]=Ra.y,s[9]=Ue.y,s[2]=vi.z,s[6]=Ra.z,s[10]=Ue.z,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const i=t.elements,s=e.elements,o=this.elements,l=i[0],u=i[4],h=i[8],d=i[12],m=i[1],y=i[5],x=i[9],v=i[13],w=i[2],S=i[6],_=i[10],b=i[14],A=i[3],C=i[7],k=i[11],N=i[15],B=s[0],D=s[4],L=s[8],q=s[12],J=s[1],it=s[5],ct=s[9],ht=s[13],mt=s[2],kt=s[6],_t=s[10],Ct=s[14],Z=s[3],j=s[7],Y=s[11],P=s[15];return o[0]=l*B+u*J+h*mt+d*Z,o[4]=l*D+u*it+h*kt+d*j,o[8]=l*L+u*ct+h*_t+d*Y,o[12]=l*q+u*ht+h*Ct+d*P,o[1]=m*B+y*J+x*mt+v*Z,o[5]=m*D+y*it+x*kt+v*j,o[9]=m*L+y*ct+x*_t+v*Y,o[13]=m*q+y*ht+x*Ct+v*P,o[2]=w*B+S*J+_*mt+b*Z,o[6]=w*D+S*it+_*kt+b*j,o[10]=w*L+S*ct+_*_t+b*Y,o[14]=w*q+S*ht+_*Ct+b*P,o[3]=A*B+C*J+k*mt+N*Z,o[7]=A*D+C*it+k*kt+N*j,o[11]=A*L+C*ct+k*_t+N*Y,o[15]=A*q+C*ht+k*Ct+N*P,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this}determinant(){const t=this.elements,e=t[0],i=t[4],s=t[8],o=t[12],l=t[1],u=t[5],h=t[9],d=t[13],m=t[2],y=t[6],x=t[10],v=t[14],w=t[3],S=t[7],_=t[11],b=t[15];return w*(+o*h*y-s*d*y-o*u*x+i*d*x+s*u*v-i*h*v)+S*(+e*h*v-e*d*x+o*l*x-s*l*v+s*d*m-o*h*m)+_*(+e*d*y-e*u*v-o*l*y+i*l*v+o*u*m-i*d*m)+b*(-s*u*m-e*h*y+e*u*x+s*l*y-i*l*x+i*h*m)}transpose(){const t=this.elements;let e;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}setPosition(t,e,i){const s=this.elements;return t.isVector3?(s[12]=t.x,s[13]=t.y,s[14]=t.z):(s[12]=t,s[13]=e,s[14]=i),this}invert(){const t=this.elements,e=t[0],i=t[1],s=t[2],o=t[3],l=t[4],u=t[5],h=t[6],d=t[7],m=t[8],y=t[9],x=t[10],v=t[11],w=t[12],S=t[13],_=t[14],b=t[15],A=y*_*d-S*x*d+S*h*v-u*_*v-y*h*b+u*x*b,C=w*x*d-m*_*d-w*h*v+l*_*v+m*h*b-l*x*b,k=m*S*d-w*y*d+w*u*v-l*S*v-m*u*b+l*y*b,N=w*y*h-m*S*h-w*u*x+l*S*x+m*u*_-l*y*_,B=e*A+i*C+s*k+o*N;if(B===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const D=1/B;return t[0]=A*D,t[1]=(S*x*o-y*_*o-S*s*v+i*_*v+y*s*b-i*x*b)*D,t[2]=(u*_*o-S*h*o+S*s*d-i*_*d-u*s*b+i*h*b)*D,t[3]=(y*h*o-u*x*o-y*s*d+i*x*d+u*s*v-i*h*v)*D,t[4]=C*D,t[5]=(m*_*o-w*x*o+w*s*v-e*_*v-m*s*b+e*x*b)*D,t[6]=(w*h*o-l*_*o-w*s*d+e*_*d+l*s*b-e*h*b)*D,t[7]=(l*x*o-m*h*o+m*s*d-e*x*d-l*s*v+e*h*v)*D,t[8]=k*D,t[9]=(w*y*o-m*S*o-w*i*v+e*S*v+m*i*b-e*y*b)*D,t[10]=(l*S*o-w*u*o+w*i*d-e*S*d-l*i*b+e*u*b)*D,t[11]=(m*u*o-l*y*o-m*i*d+e*y*d+l*i*v-e*u*v)*D,t[12]=N*D,t[13]=(m*S*s-w*y*s+w*i*x-e*S*x-m*i*_+e*y*_)*D,t[14]=(w*u*s-l*S*s-w*i*h+e*S*h+l*i*_-e*u*_)*D,t[15]=(l*y*s-m*u*s+m*i*h-e*y*h-l*i*x+e*u*x)*D,this}scale(t){const e=this.elements,i=t.x,s=t.y,o=t.z;return e[0]*=i,e[4]*=s,e[8]*=o,e[1]*=i,e[5]*=s,e[9]*=o,e[2]*=i,e[6]*=s,e[10]*=o,e[3]*=i,e[7]*=s,e[11]*=o,this}getMaxScaleOnAxis(){const t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],i=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],s=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,i,s))}makeTranslation(t,e,i){return t.isVector3?this.set(1,0,0,t.x,0,1,0,t.y,0,0,1,t.z,0,0,0,1):this.set(1,0,0,t,0,1,0,e,0,0,1,i,0,0,0,1),this}makeRotationX(t){const e=Math.cos(t),i=Math.sin(t);return this.set(1,0,0,0,0,e,-i,0,0,i,e,0,0,0,0,1),this}makeRotationY(t){const e=Math.cos(t),i=Math.sin(t);return this.set(e,0,i,0,0,1,0,0,-i,0,e,0,0,0,0,1),this}makeRotationZ(t){const e=Math.cos(t),i=Math.sin(t);return this.set(e,-i,0,0,i,e,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,e){const i=Math.cos(e),s=Math.sin(e),o=1-i,l=t.x,u=t.y,h=t.z,d=o*l,m=o*u;return this.set(d*l+i,d*u-s*h,d*h+s*u,0,d*u+s*h,m*u+i,m*h-s*l,0,d*h-s*u,m*h+s*l,o*h*h+i,0,0,0,0,1),this}makeScale(t,e,i){return this.set(t,0,0,0,0,e,0,0,0,0,i,0,0,0,0,1),this}makeShear(t,e,i,s,o,l){return this.set(1,i,o,0,t,1,l,0,e,s,1,0,0,0,0,1),this}compose(t,e,i){const s=this.elements,o=e._x,l=e._y,u=e._z,h=e._w,d=o+o,m=l+l,y=u+u,x=o*d,v=o*m,w=o*y,S=l*m,_=l*y,b=u*y,A=h*d,C=h*m,k=h*y,N=i.x,B=i.y,D=i.z;return s[0]=(1-(S+b))*N,s[1]=(v+k)*N,s[2]=(w-C)*N,s[3]=0,s[4]=(v-k)*B,s[5]=(1-(x+b))*B,s[6]=(_+A)*B,s[7]=0,s[8]=(w+C)*D,s[9]=(_-A)*D,s[10]=(1-(x+S))*D,s[11]=0,s[12]=t.x,s[13]=t.y,s[14]=t.z,s[15]=1,this}decompose(t,e,i){const s=this.elements;let o=Bs.set(s[0],s[1],s[2]).length();const l=Bs.set(s[4],s[5],s[6]).length(),u=Bs.set(s[8],s[9],s[10]).length();this.determinant()<0&&(o=-o),t.x=s[12],t.y=s[13],t.z=s[14],pn.copy(this);const d=1/o,m=1/l,y=1/u;return pn.elements[0]*=d,pn.elements[1]*=d,pn.elements[2]*=d,pn.elements[4]*=m,pn.elements[5]*=m,pn.elements[6]*=m,pn.elements[8]*=y,pn.elements[9]*=y,pn.elements[10]*=y,e.setFromRotationMatrix(pn),i.x=o,i.y=l,i.z=u,this}makePerspective(t,e,i,s,o,l,u=_i){const h=this.elements,d=2*o/(e-t),m=2*o/(i-s),y=(e+t)/(e-t),x=(i+s)/(i-s);let v,w;if(u===_i)v=-(l+o)/(l-o),w=-2*l*o/(l-o);else if(u===Ml)v=-l/(l-o),w=-l*o/(l-o);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+u);return h[0]=d,h[4]=0,h[8]=y,h[12]=0,h[1]=0,h[5]=m,h[9]=x,h[13]=0,h[2]=0,h[6]=0,h[10]=v,h[14]=w,h[3]=0,h[7]=0,h[11]=-1,h[15]=0,this}makeOrthographic(t,e,i,s,o,l,u=_i){const h=this.elements,d=1/(e-t),m=1/(i-s),y=1/(l-o),x=(e+t)*d,v=(i+s)*m;let w,S;if(u===_i)w=(l+o)*y,S=-2*y;else if(u===Ml)w=o*y,S=-1*y;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+u);return h[0]=2*d,h[4]=0,h[8]=0,h[12]=-x,h[1]=0,h[5]=2*m,h[9]=0,h[13]=-v,h[2]=0,h[6]=0,h[10]=S,h[14]=-w,h[3]=0,h[7]=0,h[11]=0,h[15]=1,this}equals(t){const e=this.elements,i=t.elements;for(let s=0;s<16;s++)if(e[s]!==i[s])return!1;return!0}fromArray(t,e=0){for(let i=0;i<16;i++)this.elements[i]=t[i+e];return this}toArray(t=[],e=0){const i=this.elements;return t[e]=i[0],t[e+1]=i[1],t[e+2]=i[2],t[e+3]=i[3],t[e+4]=i[4],t[e+5]=i[5],t[e+6]=i[6],t[e+7]=i[7],t[e+8]=i[8],t[e+9]=i[9],t[e+10]=i[10],t[e+11]=i[11],t[e+12]=i[12],t[e+13]=i[13],t[e+14]=i[14],t[e+15]=i[15],t}}const Bs=new z,pn=new wt,Y1=new z(0,0,0),Z1=new z(1,1,1),vi=new z,Ra=new z,Ue=new z,wm=new wt,Mm=new Xe;class bn{constructor(t=0,e=0,i=0,s=bn.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=e,this._z=i,this._order=s}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,e,i,s=this._order){return this._x=t,this._y=e,this._z=i,this._order=s,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,e=this._order,i=!0){const s=t.elements,o=s[0],l=s[4],u=s[8],h=s[1],d=s[5],m=s[9],y=s[2],x=s[6],v=s[10];switch(e){case"XYZ":this._y=Math.asin(yt(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(-m,v),this._z=Math.atan2(-l,o)):(this._x=Math.atan2(x,d),this._z=0);break;case"YXZ":this._x=Math.asin(-yt(m,-1,1)),Math.abs(m)<.9999999?(this._y=Math.atan2(u,v),this._z=Math.atan2(h,d)):(this._y=Math.atan2(-y,o),this._z=0);break;case"ZXY":this._x=Math.asin(yt(x,-1,1)),Math.abs(x)<.9999999?(this._y=Math.atan2(-y,v),this._z=Math.atan2(-l,d)):(this._y=0,this._z=Math.atan2(h,o));break;case"ZYX":this._y=Math.asin(-yt(y,-1,1)),Math.abs(y)<.9999999?(this._x=Math.atan2(x,v),this._z=Math.atan2(h,o)):(this._x=0,this._z=Math.atan2(-l,d));break;case"YZX":this._z=Math.asin(yt(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(-m,d),this._y=Math.atan2(-y,o)):(this._x=0,this._y=Math.atan2(u,v));break;case"XZY":this._z=Math.asin(-yt(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(x,d),this._y=Math.atan2(u,o)):(this._x=Math.atan2(-m,v),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+e)}return this._order=e,i===!0&&this._onChangeCallback(),this}setFromQuaternion(t,e,i){return wm.makeRotationFromQuaternion(t),this.setFromRotationMatrix(wm,e,i)}setFromVector3(t,e=this._order){return this.set(t.x,t.y,t.z,e)}reorder(t){return Mm.setFromEuler(this),this.setFromQuaternion(Mm,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],t[3]!==void 0&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}bn.DEFAULT_ORDER="XYZ";class Fy{constructor(){this.mask=1}set(t){this.mask=(1<<t|0)>>>0}enable(t){this.mask|=1<<t|0}enableAll(){this.mask=-1}toggle(t){this.mask^=1<<t|0}disable(t){this.mask&=~(1<<t|0)}disableAll(){this.mask=0}test(t){return(this.mask&t.mask)!==0}isEnabled(t){return(this.mask&(1<<t|0))!==0}}let J1=0;const Sm=new z,Ns=new Xe,Dn=new wt,Ba=new z,Jr=new z,$1=new z,j1=new Xe,_m=new z(1,0,0),bm=ne
vendor: 5,428 bytes, line 44
44w z(0,1,0),Am=new z(0,0,1),Cm={type:"added"},Q1={type:"removed"},Os={type:"childadded",child:null},Xh={type:"childremoved",child:null};class Bt extends Ci{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:J1++}),this.uuid=qe(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Bt.DEFAULT_UP.clone();const t=new z,e=new bn,i=new Xe,s=new z(1,1,1);function o(){i.setFromEuler(e,!1)}function l(){e.setFromQuaternion(i,void 0,!1)}e._onChange(o),i._onChange(l),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:e},quaternion:{configurable:!0,enumerable:!0,value:i},scale:{configurable:!0,enumerable:!0,value:s},modelViewMatrix:{value:new wt},normalMatrix:{value:new An}}),this.matrix=new wt,this.matrixWorld=new wt,this.matrixAutoUpdate=Bt.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=Bt.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new Fy,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(t){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(t),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(t){return this.quaternion.premultiply(t),this}setRotationFromAxisAngle(t,e){this.quaternion.setFromAxisAngle(t,e)}setRotationFromEuler(t){this.quaternion.setFromEuler(t,!0)}setRotationFromMatrix(t){this.quaternion.setFromRotationMatrix(t)}setRotationFromQuaternion(t){this.quaternion.copy(t)}rotateOnAxis(t,e){return Ns.setFromAxisAngle(t,e),this.quaternion.multiply(Ns),this}rotateOnWorldAxis(t,e){return Ns.setFromAxisAngle(t,e),this.quaternion.premultiply(Ns),this}rotateX(t){return this.rotateOnAxis(_m,t)}rotateY(t){return this.rotateOnAxis(bm,t)}rotateZ(t){return this.rotateOnAxis(Am,t)}translateOnAxis(t,e){return Sm.copy(t).applyQuaternion(this.quaternion),this.position.add(Sm.multiplyScalar(e)),this}translateX(t){return this.translateOnAxis(_m,t)}translateY(t){return this.translateOnAxis(bm,t)}translateZ(t){return this.translateOnAxis(Am,t)}localToWorld(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(Dn.copy(this.matrixWorld).invert())}lookAt(t,e,i){t.isVector3?Ba.copy(t):Ba.set(t,e,i);const s=this.parent;this.updateWorldMatrix(!0,!1),Jr.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?Dn.lookAt(Jr,Ba,this.up):Dn.lookAt(Ba,Jr,this.up),this.quaternion.setFromRotationMatrix(Dn),s&&(Dn.extractRotation(s.matrixWorld),Ns.setFromRotationMatrix(Dn),this.quaternion.premultiply(Ns.invert()))}add(t){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return t===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(t.removeFromParent(),t.parent=this,this.children.push(t),t.dispatchEvent(Cm),Os.child=t,this.dispatchEvent(Os),Os.child=null):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)}remove(t){if(arguments.length>1){for(let i=0;i<arguments.length;i++)this.remove(arguments[i]);return this}const e=this.children.indexOf(t);return e!==-1&&(t.parent=null,this.children.splice(e,1),t.dispatchEvent(Q1),Xh.child=t,this.dispatchEvent(Xh),Xh.child=null),this}removeFromParent(){const t=this.parent;return t!==null&&t.remove(this),this}clear(){return this.remove(...this.children)}attach(t){return this.updateWorldMatrix(!0,!1),Dn.copy(this.matrixWorld).invert(),t.parent!==null&&(t.parent.updateWorldMatrix(!0,!1),Dn.multiply(t.parent.matrixWorld)),t.applyMatrix4(Dn),t.removeFromParent(),t.parent=this,this.children.push(t),t.updateWorldMatrix(!1,!0),t.dispatchEvent(Cm),Os.child=t,this.dispatchEvent(Os),Os.child=null,this}getObjectById(t){return this.getObjectByProperty("id",t)}getObjectByName(t){return this.getObjectByProperty("name",t)}getObjectByProperty(t,e){if(this[t]===e)return this;for(let i=0,s=this.children.length;i<s;i++){const l=this.children[i].getObjectByProperty(t,e);if(l!==void 0)return l}}getObjectsByProperty(t,e,i=[]){this[t]===e&&i.push(this);const s=this.children;for(let o=0,l=s.length;o<l;o++)s[o].getObjectsByProperty(t,e,i);return i}getWorldPosition(t){return this.updateWorldMatrix(!0,!1),t.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Jr,t,$1),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Jr,j1,t),t}getWorldDirection(t){this.updateWorldMatrix(!0,!1);const e=this.matrixWorld.elements;return t.set(e[8],e[9],e[10]).normalize()}raycast(){}traverse(t){t(this);const e=this.children;for(let i=0,s=e.length;i<s;i++)e[i].traverse(t)}traverseVisible(t){if(this.visible===!1)return;t(this);const e=this.children;for(let i=0,s=e.length;i<s;i++)e[i].traverseVisible(t)}traverseAncestors(t){const e=this.parent;e!==null&&(t(e),e.traverseAncestors(t))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix
vendor: 5,939 bytes, line 44
44):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,t=!0);const e=this.children;for(let i=0,s=e.length;i<s;i++)e[i].updateMatrixWorld(t)}updateWorldMatrix(t,e){const i=this.parent;if(t===!0&&i!==null&&i.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),e===!0){const s=this.children;for(let o=0,l=s.length;o<l;o++)s[o].updateWorldMatrix(!1,!0)}}toJSON(t){const e=t===void 0||typeof t=="string",i={};e&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},i.metadata={version:4.6,type:"Object",generator:"Object3D.toJSON"});const s={};s.uuid=this.uuid,s.type=this.type,this.name!==""&&(s.name=this.name),this.castShadow===!0&&(s.castShadow=!0),this.receiveShadow===!0&&(s.receiveShadow=!0),this.visible===!1&&(s.visible=!1),this.frustumCulled===!1&&(s.frustumCulled=!1),this.renderOrder!==0&&(s.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(s.userData=this.userData),s.layers=this.layers.mask,s.matrix=this.matrix.toArray(),s.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(s.matrixAutoUpdate=!1),this.isInstancedMesh&&(s.type="InstancedMesh",s.count=this.count,s.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(s.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(s.type="BatchedMesh",s.perObjectFrustumCulled=this.perObjectFrustumCulled,s.sortObjects=this.sortObjects,s.drawRanges=this._drawRanges,s.reservedRanges=this._reservedRanges,s.visibility=this._visibility,s.active=this._active,s.bounds=this._bounds.map(u=>({boxInitialized:u.boxInitialized,boxMin:u.box.min.toArray(),boxMax:u.box.max.toArray(),sphereInitialized:u.sphereInitialized,sphereRadius:u.sphere.radius,sphereCenter:u.sphere.center.toArray()})),s.maxInstanceCount=this._maxInstanceCount,s.maxVertexCount=this._maxVertexCount,s.maxIndexCount=this._maxIndexCount,s.geometryInitialized=this._geometryInitialized,s.geometryCount=this._geometryCount,s.matricesTexture=this._matricesTexture.toJSON(t),this._colorsTexture!==null&&(s.colorsTexture=this._colorsTexture.toJSON(t)),this.boundingSphere!==null&&(s.boundingSphere={center:s.boundingSphere.center.toArray(),radius:s.boundingSphere.radius}),this.boundingBox!==null&&(s.boundingBox={min:s.boundingBox.min.toArray(),max:s.boundingBox.max.toArray()}));function o(u,h){return u[h.uuid]===void 0&&(u[h.uuid]=h.toJSON(t)),h.uuid}if(this.isScene)this.background&&(this.background.isColor?s.background=this.background.toJSON():this.background.isTexture&&(s.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(s.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){s.geometry=o(t.geometries,this.geometry);const u=this.geometry.parameters;if(u!==void 0&&u.shapes!==void 0){const h=u.shapes;if(Array.isArray(h))for(let d=0,m=h.length;d<m;d++){const y=h[d];o(t.shapes,y)}else o(t.shapes,h)}}if(this.isSkinnedMesh&&(s.bindMode=this.bindMode,s.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(o(t.skeletons,this.skeleton),s.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){const u=[];for(let h=0,d=this.material.length;h<d;h++)u.push(o(t.materials,this.material[h]));s.material=u}else s.material=o(t.materials,this.material);if(this.children.length>0){s.children=[];for(let u=0;u<this.children.length;u++)s.children.push(this.children[u].toJSON(t).object)}if(this.animations.length>0){s.animations=[];for(let u=0;u<this.animations.length;u++){const h=this.animations[u];s.animations.push(o(t.animations,h))}}if(e){const u=l(t.geometries),h=l(t.materials),d=l(t.textures),m=l(t.images),y=l(t.shapes),x=l(t.skeletons),v=l(t.animations),w=l(t.nodes);u.length>0&&(i.geometries=u),h.length>0&&(i.materials=h),d.length>0&&(i.textures=d),m.length>0&&(i.images=m),y.length>0&&(i.shapes=y),x.length>0&&(i.skeletons=x),v.length>0&&(i.animations=v),w.length>0&&(i.nodes=w)}return i.object=s,i;function l(u){const h=[];for(const d in u){const m=u[d];delete m.metadata,h.push(m)}return h}}clone(t){return new this.constructor().copy(this,t)}copy(t,e=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),e===!0)for(let i=0;i<t.children.length;i++){const s=t.children[i];this.add(s.clone())}return this}}Bt.DEFAULT_UP=new z(0,1,0);Bt.DEFAULT_MATRIX_AUTO_UPDATE=!0;Bt.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;const mn=new z,Vn=new z,Yh=new z,Un=new z,Ls=new z,Ds=new z,Tm=new z,Zh=new z,Jh=new z,$h=new z,jh=new he,Qh=new he,Kh=new he;class Ge{constructor(t=new z,e=new z,i=new z){this.a=t,this.b=e,this.c=i}static getNormal(t,e,i,s){s.subVectors(i,e),mn.subVectors(t,e),s.cross(mn);const o=s.lengthSq();return o>0?s.multiplyScalar(1/Math.sqrt(o)):s.set(0,0,0)}static getBarycoord(t,e,i,s,o){mn.subVectors(s,e),Vn.subVectors(i,e),Yh.subVectors(t,e);const l=mn.dot(mn),u=mn.dot(Vn),h=mn.dot(Yh),d=Vn.dot(Vn),m=Vn.dot(Yh),y=l*d-u*u;if(y===0)return o.set(0,0,0),null;const x=1/y,v=(d*h-u*m)*x,w=(l*m-u*h)*x;return o.set(1-v-w,w,v)}static containsPoint(t,e,i,s){return this.getBarycoord(t,e,i,s,Un)===null?!1:Un.x>=0&&Un.y>=0&&Un.x+Un.y<=1}
vendor: 5,568 bytes, line 44
44static getInterpolation(t,e,i,s,o,l,u,h){return this.getBarycoord(t,e,i,s,Un)===null?(h.x=0,h.y=0,"z"in h&&(h.z=0),"w"in h&&(h.w=0),null):(h.setScalar(0),h.addScaledVector(o,Un.x),h.addScaledVector(l,Un.y),h.addScaledVector(u,Un.z),h)}static getInterpolatedAttribute(t,e,i,s,o,l){return jh.setScalar(0),Qh.setScalar(0),Kh.setScalar(0),jh.fromBufferAttribute(t,e),Qh.fromBufferAttribute(t,i),Kh.fromBufferAttribute(t,s),l.setScalar(0),l.addScaledVector(jh,o.x),l.addScaledVector(Qh,o.y),l.addScaledVector(Kh,o.z),l}static isFrontFacing(t,e,i,s){return mn.subVectors(i,e),Vn.subVectors(t,e),mn.cross(Vn).dot(s)<0}set(t,e,i){return this.a.copy(t),this.b.copy(e),this.c.copy(i),this}setFromPointsAndIndices(t,e,i,s){return this.a.copy(t[e]),this.b.copy(t[i]),this.c.copy(t[s]),this}setFromAttributeAndIndices(t,e,i,s){return this.a.fromBufferAttribute(t,e),this.b.fromBufferAttribute(t,i),this.c.fromBufferAttribute(t,s),this}clone(){return new this.constructor().copy(this)}copy(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this}getArea(){return mn.subVectors(this.c,this.b),Vn.subVectors(this.a,this.b),mn.cross(Vn).length()*.5}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return Ge.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return Ge.getBarycoord(t,this.a,this.b,this.c,e)}getInterpolation(t,e,i,s,o){return Ge.getInterpolation(t,this.a,this.b,this.c,e,i,s,o)}containsPoint(t){return Ge.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return Ge.isFrontFacing(this.a,this.b,this.c,t)}intersectsBox(t){return t.intersectsTriangle(this)}closestPointToPoint(t,e){const i=this.a,s=this.b,o=this.c;let l,u;Ls.subVectors(s,i),Ds.subVectors(o,i),Zh.subVectors(t,i);const h=Ls.dot(Zh),d=Ds.dot(Zh);if(h<=0&&d<=0)return e.copy(i);Jh.subVectors(t,s);const m=Ls.dot(Jh),y=Ds.dot(Jh);if(m>=0&&y<=m)return e.copy(s);const x=h*y-m*d;if(x<=0&&h>=0&&m<=0)return l=h/(h-m),e.copy(i).addScaledVector(Ls,l);$h.subVectors(t,o);const v=Ls.dot($h),w=Ds.dot($h);if(w>=0&&v<=w)return e.copy(o);const S=v*d-h*w;if(S<=0&&d>=0&&w<=0)return u=d/(d-w),e.copy(i).addScaledVector(Ds,u);const _=m*w-v*y;if(_<=0&&y-m>=0&&v-w>=0)return Tm.subVectors(o,s),u=(y-m)/(y-m+(v-w)),e.copy(s).addScaledVector(Tm,u);const b=1/(_+S+x);return l=S*b,u=x*b,e.copy(i).addScaledVector(Ls,l).addScaledVector(Ds,u)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}const Ry={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},wi={h:0,s:0,l:0},Na={h:0,s:0,l:0};function tc(f,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?f+(t-f)*6*e:e<1/2?t:e<2/3?f+(t-f)*6*(2/3-e):f}class gt{constructor(t,e,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(t,e,i)}set(t,e,i){if(e===void 0&&i===void 0){const s=t;s&&s.isColor?this.copy(s):typeof s=="number"?this.setHex(s):typeof s=="string"&&this.setStyle(s)}
vendor: 6,527 bytes, line 44
44else this.setRGB(t,e,i);return this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}setHex(t,e=nn){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(t&255)/255,He.toWorkingColorSpace(this,e),this}setRGB(t,e,i,s=He.workingColorSpace){return this.r=t,this.g=e,this.b=i,He.toWorkingColorSpace(this,s),this}setHSL(t,e,i,s=He.workingColorSpace){if(t=Rc(t,1),e=yt(e,0,1),i=yt(i,0,1),e===0)this.r=this.g=this.b=i;else{const o=i<=.5?i*(1+e):i+e-i*e,l=2*i-o;this.r=tc(l,o,t+1/3),this.g=tc(l,o,t),this.b=tc(l,o,t-1/3)}return He.toWorkingColorSpace(this,s),this}setStyle(t,e=nn){function i(o){o!==void 0&&parseFloat(o)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}let s;if(s=/^(\w+)\(([^\)]*)\)/.exec(t)){let o;const l=s[1],u=s[2];switch(l){case"rgb":case"rgba":if(o=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(u))return i(o[4]),this.setRGB(Math.min(255,parseInt(o[1],10))/255,Math.min(255,parseInt(o[2],10))/255,Math.min(255,parseInt(o[3],10))/255,e);if(o=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(u))return i(o[4]),this.setRGB(Math.min(100,parseInt(o[1],10))/100,Math.min(100,parseInt(o[2],10))/100,Math.min(100,parseInt(o[3],10))/100,e);break;case"hsl":case"hsla":if(o=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(u))return i(o[4]),this.setHSL(parseFloat(o[1])/360,parseFloat(o[2])/100,parseFloat(o[3])/100,e);break;default:console.warn("THREE.Color: Unknown color model "+t)}}else if(s=/^\#([A-Fa-f\d]+)$/.exec(t)){const o=s[1],l=o.length;if(l===3)return this.setRGB(parseInt(o.charAt(0),16)/15,parseInt(o.charAt(1),16)/15,parseInt(o.charAt(2),16)/15,e);if(l===6)return this.setHex(parseInt(o,16),e);console.warn("THREE.Color: Invalid hex color "+t)}else if(t&&t.length>0)return this.setColorName(t,e);return this}setColorName(t,e=nn){const i=Ry[t.toLowerCase()];return i!==void 0?this.setHex(i,e):console.warn("THREE.Color: Unknown color "+t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}copySRGBToLinear(t){return this.r=qn(t.r),this.g=qn(t.g),this.b=qn(t.b),this}copyLinearToSRGB(t){return this.r=tr(t.r),this.g=tr(t.g),this.b=tr(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=nn){return He.fromWorkingColorSpace(xe.copy(this),t),Math.round(yt(xe.r*255,0,255))*65536+Math.round(yt(xe.g*255,0,255))*256+Math.round(yt(xe.b*255,0,255))}getHexString(t=nn){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=He.workingColorSpace){He.fromWorkingColorSpace(xe.copy(this),e);const i=xe.r,s=xe.g,o=xe.b,l=Math.max(i,s,o),u=Math.min(i,s,o);let h,d;const m=(u+l)/2;if(u===l)h=0,d=0;else{const y=l-u;switch(d=m<=.5?y/(l+u):y/(2-l-u),l){case i:h=(s-o)/y+(s<o?6:0);break;case s:h=(o-i)/y+2;break;case o:h=(i-s)/y+4;break}h/=6}return t.h=h,t.s=d,t.l=m,t}getRGB(t,e=He.workingColorSpace){return He.fromWorkingColorSpace(xe.copy(this),e),t.r=xe.r,t.g=xe.g,t.b=xe.b,t}getStyle(t=nn){He.fromWorkingColorSpace(xe.copy(this),t);const e=xe.r,i=xe.g,s=xe.b;return t!==nn?`color(${t} ${e.toFixed(3)} ${i.toFixed(3)} ${s.toFixed(3)})`:`rgb(${Math.round(e*255)},${Math.round(i*255)},${Math.round(s*255)})`}offsetHSL(t,e,i){return this.getHSL(wi),this.setHSL(wi.h+t,wi.s+e,wi.l+i)}add(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this}addColors(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this}addScalar(t){return this.r+=t,this.g+=t,this.b+=t,this}sub(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),this}multiply(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this}multiplyScalar(t){return this.r*=t,this.g*=t,this.b*=t,this}lerp(t,e){return this.r+=(t.r-this.r)*e,this.g+=(t.g-this.g)*e,this.b+=(t.b-this.b)*e,this}lerpColors(t,e,i){return this.r=t.r+(e.r-t.r)*i,this.g=t.g+(e.g-t.g)*i,this.b=t.b+(e.b-t.b)*i,this}lerpHSL(t,e){this.getHSL(wi),t.getHSL(Na);const i=lo(wi.h,Na.h,e),s=lo(wi.s,Na.s,e),o=lo(wi.l,Na.l,e);return this.setHSL(i,s,o),this}setFromVector3(t){return this.r=t.x,this.g=t.y,this.b=t.z,this}applyMatrix3(t){const e=this.r,i=this.g,s=this.b,o=t.elements;return this.r=o[0]*e+o[3]*i+o[6]*s,this.g=o[1]*e+o[4]*i+o[7]*s,this.b=o[2]*e+o[5]*i+o[8]*s,this}equals(t){return t.r===this.r&&t.g===this.g&&t.b===this.b}fromArray(t,e=0){return this.r=t[e],this.g=t[e+1],this.b=t[e+2],this}toArray(t=[],e=0){return t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t}fromBufferAttribute(t,e){return this.r=t.getX(e),this.g=t.getY(e),this.b=t.getZ(e),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const xe=new gt;gt.NAMES=Ry;let K1=0;class Ae extends Ci{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:K1++}),this.uuid=qe(),this.name="",this.type="Material",this.blending=rm,this.side=vc,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=am,this.blendDst=lm,this.blendEquation=om,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new gt(0,0,0),this.blendAlpha=0,this.depthFunc=um,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=pm,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=Is,this.stencilZFail=Is,this.stencilZPass=Is,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(t){this._alphaTest>0!=t>0&&this.version++,this._alphaTest=t}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(t){if(t!==void 0)for(const e in t){const i=t[e];if(i===void 0){console.warn(`THREE.Material: parameter '${e}' has value of undefined.`);continue}const s=this[e];if(s===void 0){console.warn(`THREE.Material: '${e}' is not a property of THREE.${this.type}.`);continue}s&&s.isColor?s.set(i):s&&s.isVector3&&i&&i.isVector3?s.copy(i):this[e]=i}}toJSON(t){const e=t===void 0||typeof t=="string";e&&(t={textures:{},images:{}});const i={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};
vendor: 12,790 bytes, line 44
44i.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!==void 0&&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(t).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(t).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(t).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.dispersion!==void 0&&(i.dispersion=this.dispersion),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(t).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(t).uuid),this.anisotropy!==void 0&&(i.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(i.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(i.anisotropyMap=this.anisotropyMap.toJSON(t).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(t).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(t).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(t).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(t).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(t).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(t).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(t).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(t).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(t).uuid,this.combine!==void 0&&(i.combine=this.combine)),this.envMapRotation!==void 0&&(i.envMapRotation=this.envMapRotation.toArray()),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(t).uuid),this.transmission!==void 0&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(t).uuid),this.thickness!==void 0&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(t).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!==rm&&(i.blending=this.blending),this.side!==vc&&(i.side=this.side),this.vertexColors===!0&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),this.transparent===!0&&(i.transparent=!0),this.blendSrc!==am&&(i.blendSrc=this.blendSrc),this.blendDst!==lm&&(i.blendDst=this.blendDst),this.blendEquation!==om&&(i.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(i.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(i.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(i.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(i.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(i.blendAlpha=this.blendAlpha),this.depthFunc!==um&&(i.depthFunc=this.depthFunc),this.depthTest===!1&&(i.depthTest=this.depthTest),this.depthWrite===!1&&(i.depthWrite=this.depthWrite),this.colorWrite===!1&&(i.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(i.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==pm&&(i.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(i.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Is&&(i.stencilFail=this.stencilFail),this.stencilZFail!==Is&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==Is&&(i.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(i.stencilWrite=this.stencilWrite),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.alphaHash===!0&&(i.alphaHash=!0),this.alphaToCoverage===!0&&(i.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(i.premultipliedAlpha=!0),this.forceSinglePass===!0&&(i.forceSinglePass=!0),this.wireframe===!0&&(i.wireframe=!0),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=!0),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 s(o){const l=[];for(const u in o){const h=o[u];delete h.metadata,l.push(h)}return l}if(e){const o=s(t.textures),l=s(t.images);o.length>0&&(i.textures=o),l.length>0&&(i.images=l)}return i}clone(){return new this.constructor().copy(this)}copy(t){this.name=t.name,this.blending=t.blending,this.side=t.side,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.blendColor.copy(t.blendColor),this.blendAlpha=t.blendAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.stencilWriteMask=t.stencilWriteMask,this.stencilFunc=t.stencilFunc,this.stencilRef=t.stencilRef,this.stencilFuncMask=t.stencilFuncMask,this.stencilFail=t.stencilFail,this.stencilZFail=t.stencilZFail,this.stencilZPass=t.stencilZPass,this.stencilWrite=t.stencilWrite;const e=t.clippingPlanes;let i=null;if(e!==null){const s=e.length;i=new Array(s);for(let o=0;o!==s;++o)i[o]=e[o].clone()}return this.clippingPlanes=i,this.clipIntersection=t.clipIntersection,this.clipShadows=t.clipShadows,this.shadowSide=t.shadowSide,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.alphaHash=t.alphaHash,this.alphaToCoverage=t.alphaToCoverage,this.premultipliedAlpha=t.premultipliedAlpha,this.forceSinglePass=t.forceSinglePass,this.visible=t.visible,this.toneMapped=t.toneMapped,this.userData=JSON.parse(JSON.stringify(t.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(t){t===!0&&this.version++}onBuild(){console.warn("Material: onBuild() has been removed.")}}class rr extends Ae{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new gt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new bn,this.combine=zc,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapRotation.copy(t.envMapRotation),this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.fog=t.fog,this}}const Hn=tv();function tv(){const f=new ArrayBuffer(4),t=new Float32Array(f),e=new Uint32Array(f),i=new Uint32Array(512),s=new Uint32Array(512);for(let h=0;h<256;++h){const d=h-127;d<-27?(i[h]=0,i[h|256]=32768,s[h]=24,s[h|256]=24):d<-14?(i[h]=1024>>-d-14,i[h|256]=1024>>-d-14|32768,s[h]=-d-1,s[h|256]=-d-1):d<=15?(i[h]=d+15<<10,i[h|256]=d+15<<10|32768,s[h]=13,s[h|256]=13):d<128?(i[h]=31744,i[h|256]=64512,s[h]=24,s[h|256]=24):(i[h]=31744,i[h|256]=64512,s[h]=13,s[h|256]=13)}const o=new Uint32Array(2048),l=new Uint32Array(64),u=new Uint32Array(64);for(let h=1;h<1024;++h){let d=h<<13,m=0;for(;!(d&8388608);)d<<=1,m-=8388608;d&=-8388609,m+=947912704,o[h]=d|m}for(let h=1024;h<2048;++h)o[h]=939524096+(h-1024<<13);for(let h=1;h<31;++h)l[h]=h<<23;l[31]=1199570944,l[32]=2147483648;for(let h=33;h<63;++h)l[h]=2147483648+(h-32<<23);l[63]=3347054592;for(let h=1;h<64;++h)h!==32&&(u[h]=1024);return{floatView:t,uint32View:e,baseTable:i,shiftTable:s,mantissaTable:o,exponentTable:l,offsetTable:u}}function Re(f){Math.abs(f)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),f=yt(f,-65504,65504),Hn.floatView[0]=f;const t=Hn.uint32View[0],e=t>>23&511;return Hn.baseTable[e]+((t&8388607)>>Hn.shiftTable[e])}function oo(f){const t=f>>10;return Hn.uint32View[0]=Hn.mantissaTable[Hn.offsetTable[t]+(f&1023)]+Hn.exponentTable[t],Hn.floatView[0]}const p_={toHalfFloat:Re,fromHalfFloat:oo},ne=new z,Oa=new G;class Zt{constructor(t,e,i=!1){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=t,this.itemSize=e,this.count=t!==void 0?t.length/e:0,this.normalized=i,this.usage=wl,this.updateRanges=[],this.gpuType=nr,this.version=0}onUploadCallback(){}set needsUpdate(t){t===!0&&this.version++}setUsage(t){return this.usage=t,this}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}copy(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.usage=t.usage,this.gpuType=t.gpuType,this}copyAt(t,e,i){t*=this.itemSize,i*=e.itemSize;
vendor: 4,190 bytes, line 44
44for(let s=0,o=this.itemSize;s<o;s++)this.array[t+s]=e.array[i+s];return this}copyArray(t){return this.array.set(t),this}applyMatrix3(t){if(this.itemSize===2)for(let e=0,i=this.count;e<i;e++)Oa.fromBufferAttribute(this,e),Oa.applyMatrix3(t),this.setXY(e,Oa.x,Oa.y);else if(this.itemSize===3)for(let e=0,i=this.count;e<i;e++)ne.fromBufferAttribute(this,e),ne.applyMatrix3(t),this.setXYZ(e,ne.x,ne.y,ne.z);return this}applyMatrix4(t){for(let e=0,i=this.count;e<i;e++)ne.fromBufferAttribute(this,e),ne.applyMatrix4(t),this.setXYZ(e,ne.x,ne.y,ne.z);return this}applyNormalMatrix(t){for(let e=0,i=this.count;e<i;e++)ne.fromBufferAttribute(this,e),ne.applyNormalMatrix(t),this.setXYZ(e,ne.x,ne.y,ne.z);return this}transformDirection(t){for(let e=0,i=this.count;e<i;e++)ne.fromBufferAttribute(this,e),ne.transformDirection(t),this.setXYZ(e,ne.x,ne.y,ne.z);return this}set(t,e=0){return this.array.set(t,e),this}getComponent(t,e){let i=this.array[t*this.itemSize+e];return this.normalized&&(i=_e(i,this.array)),i}setComponent(t,e,i){return this.normalized&&(i=xt(i,this.array)),this.array[t*this.itemSize+e]=i,this}getX(t){let e=this.array[t*this.itemSize];return this.normalized&&(e=_e(e,this.array)),e}setX(t,e){return this.normalized&&(e=xt(e,this.array)),this.array[t*this.itemSize]=e,this}getY(t){let e=this.array[t*this.itemSize+1];return this.normalized&&(e=_e(e,this.array)),e}setY(t,e){return this.normalized&&(e=xt(e,this.array)),this.array[t*this.itemSize+1]=e,this}getZ(t){let e=this.array[t*this.itemSize+2];return this.normalized&&(e=_e(e,this.array)),e}setZ(t,e){return this.normalized&&(e=xt(e,this.array)),this.array[t*this.itemSize+2]=e,this}getW(t){let e=this.array[t*this.itemSize+3];return this.normalized&&(e=_e(e,this.array)),e}setW(t,e){return this.normalized&&(e=xt(e,this.array)),this.array[t*this.itemSize+3]=e,this}setXY(t,e,i){return t*=this.itemSize,this.normalized&&(e=xt(e,this.array),i=xt(i,this.array)),this.array[t+0]=e,this.array[t+1]=i,this}setXYZ(t,e,i,s){return t*=this.itemSize,this.normalized&&(e=xt(e,this.array),i=xt(i,this.array),s=xt(s,this.array)),this.array[t+0]=e,this.array[t+1]=i,this.array[t+2]=s,this}setXYZW(t,e,i,s,o){return t*=this.itemSize,this.normalized&&(e=xt(e,this.array),i=xt(i,this.array),s=xt(s,this.array),o=xt(o,this.array)),this.array[t+0]=e,this.array[t+1]=i,this.array[t+2]=s,this.array[t+3]=o,this}onUpload(t){return this.onUploadCallback=t,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const t={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==""&&(t.name=this.name),this.usage!==wl&&(t.usage=this.usage),t}}class m_ extends Zt{constructor(t,e,i){super(new Int8Array(t),e,i)}}class y_ extends Zt{constructor(t,e,i){super(new Uint8Array(t),e,i)}}class g_ extends Zt{constructor(t,e,i){super(new Uint8ClampedArray(t),e,i)}}class x_ extends Zt{constructor(t,e,i){super(new Int16Array(t),e,i)}}class ev extends Zt{constructor(t,e,i){super(new Uint16Array(t),e,i)}}class v_ extends Zt{constructor(t,e,i){super(new Int32Array(t),e,i)}}class nv extends Zt{constructor(t,e,i){super(new Uint32Array(t),e,i)}}class w_ extends Zt{constructor(t,e,i){super(new Uint16Array(t),e,i),this.isFloat16BufferAttribute=!0}getX(t){let e=oo(this.array[t*this.itemSize]);return this.normalized&&(e=_e(e,this.array)),e}setX(t,e){return this.normalized&&(e=xt(e,this.array)),this.array[t*this.itemSize]=Re(e),this}getY(t){let e=oo(this.array[t*this.itemSize+1]);return this.normalized&&(e=_e(e,this.array)),e}setY(t,e){return this.normalized&&(e=xt(e,this.array)),this.array[t*this.itemSize+1]=Re(e),this}getZ(t){let e=oo(this.array[t*this.itemSize+2]);return this.normalized&&(e=_e(e,this.array)),e}setZ(t,e){return this.normalized&&(e=xt(e,this.array)),this.array[t*this.itemSize+2]=Re(e),this}getW(t){let e=oo(this.array[t*this.itemSize+3]);return this.normalized&&(e=_e(e,this.array)),e}setW(t,e){return this.normalized&&(e=xt(e,this.array)),this.array[t*this.itemSize+3]=Re(e),this}setXY(t,e,i){return t*=this.itemSize,this.normalized&&(e=xt(e,this.array),i=xt(i,this.array)),this.array[t+0]=Re(e),this.array[t+1]=Re(i),this}
vendor: 7,174 bytes, line 44
44setXYZ(t,e,i,s){return t*=this.itemSize,this.normalized&&(e=xt(e,this.array),i=xt(i,this.array),s=xt(s,this.array)),this.array[t+0]=Re(e),this.array[t+1]=Re(i),this.array[t+2]=Re(s),this}setXYZW(t,e,i,s,o){return t*=this.itemSize,this.normalized&&(e=xt(e,this.array),i=xt(i,this.array),s=xt(s,this.array),o=xt(o,this.array)),this.array[t+0]=Re(e),this.array[t+1]=Re(i),this.array[t+2]=Re(s),this.array[t+3]=Re(o),this}}class at extends Zt{constructor(t,e,i){super(new Float32Array(t),e,i)}}let iv=0;const en=new wt,ec=new Bt,Vs=new z,We=new Be,$r=new Be,ue=new z;class St extends Ci{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:iv++}),this.uuid=qe(),this.name="",this.type="BufferGeometry",this.index=null,this.indirect=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(t){return Array.isArray(t)?this.index=new(O1(t)?nv:ev)(t,1):this.index=t,this}setIndirect(t){return this.indirect=t,this}getIndirect(){return this.indirect}getAttribute(t){return this.attributes[t]}setAttribute(t,e){return this.attributes[t]=e,this}deleteAttribute(t){return delete this.attributes[t],this}hasAttribute(t){return this.attributes[t]!==void 0}addGroup(t,e,i=0){this.groups.push({start:t,count:e,materialIndex:i})}clearGroups(){this.groups=[]}setDrawRange(t,e){this.drawRange.start=t,this.drawRange.count=e}applyMatrix4(t){const e=this.attributes.position;e!==void 0&&(e.applyMatrix4(t),e.needsUpdate=!0);const i=this.attributes.normal;if(i!==void 0){const o=new An().getNormalMatrix(t);i.applyNormalMatrix(o),i.needsUpdate=!0}const s=this.attributes.tangent;return s!==void 0&&(s.transformDirection(t),s.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(t){return en.makeRotationFromQuaternion(t),this.applyMatrix4(en),this}rotateX(t){return en.makeRotationX(t),this.applyMatrix4(en),this}rotateY(t){return en.makeRotationY(t),this.applyMatrix4(en),this}rotateZ(t){return en.makeRotationZ(t),this.applyMatrix4(en),this}translate(t,e,i){return en.makeTranslation(t,e,i),this.applyMatrix4(en),this}scale(t,e,i){return en.makeScale(t,e,i),this.applyMatrix4(en),this}lookAt(t){return ec.lookAt(t),ec.updateMatrix(),this.applyMatrix4(ec.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Vs).negate(),this.translate(Vs.x,Vs.y,Vs.z),this}setFromPoints(t){const e=this.getAttribute("position");if(e===void 0){const i=[];for(let s=0,o=t.length;s<o;s++){const l=t[s];i.push(l.x,l.y,l.z||0)}this.setAttribute("position",new at(i,3))}else{const i=Math.min(t.length,e.count);for(let s=0;s<i;s++){const o=t[s];e.setXYZ(s,o.x,o.y,o.z||0)}t.length>e.count&&console.warn("THREE.BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),e.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Be);const t=this.attributes.position,e=this.morphAttributes.position;if(t&&t.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new z(-1/0,-1/0,-1/0),new z(1/0,1/0,1/0));return}if(t!==void 0){if(this.boundingBox.setFromBufferAttribute(t),e)for(let i=0,s=e.length;i<s;i++){const o=e[i];We.setFromBufferAttribute(o),this.morphTargetsRelative?(ue.addVectors(this.boundingBox.min,We.min),this.boundingBox.expandByPoint(ue),ue.addVectors(this.boundingBox.max,We.max),this.boundingBox.expandByPoint(ue)):(this.boundingBox.expandByPoint(We.min),this.boundingBox.expandByPoint(We.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new be);const t=this.attributes.position,e=this.morphAttributes.position;if(t&&t.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new z,1/0);return}if(t){const i=this.boundingSphere.center;if(We.setFromBufferAttribute(t),e)for(let o=0,l=e.length;o<l;o++){const u=e[o];$r.setFromBufferAttribute(u),this.morphTargetsRelative?(ue.addVectors(We.min,$r.min),We.expandByPoint(ue),ue.addVectors(We.max,$r.max),We.expandByPoint(ue)):(We.expandByPoint($r.min),We.expandByPoint($r.max))}We.getCenter(i);let s=0;for(let o=0,l=t.count;o<l;o++)ue.fromBufferAttribute(t,o),s=Math.max(s,i.distanceToSquared(ue));if(e)for(let o=0,l=e.length;o<l;o++){const u=e[o],h=this.morphTargetsRelative;for(let d=0,m=u.count;d<m;d++)ue.fromBufferAttribute(u,d),h&&(Vs.fromBufferAttribute(t,d),ue.add(Vs)),s=Math.max(s,i.distanceToSquared(ue))}this.boundingSphere.radius=Math.sqrt(s),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){const t=this.index,e=this.attributes;if(t===null||e.position===void 0||e.normal===void 0||e.uv===void 0){console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}const i=e.position,s=e.normal,o=e.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new Zt(new Float32Array(4*i.count),4));const l=this.getAttribute("tangent"),u=[],h=[];for(let L=0;L<i.count;L++)u[L]=new z,h[L]=new z;const d=new z,m=new z,y=new z,x=new G,v=new G,w=new G,S=new z,_=new z;function b(L,q,J){d.fromBufferAttribute(i,L),m.fromBufferAttribute(i,q),y.fromBufferAttribute(i,J),x.fromBufferAttribute(o,L),v.fromBufferAttribute(o,q),w.fromBufferAttribute(o,J),m.sub(d),y.sub(d),v.sub(x),w.sub(x);const it=1/(v.x*w.y-w.x*v.y);isFinite(it)&&(S.copy(m).multiplyScalar(w.y).addScaledVector(y,-v.y).multiplyScalar(it),_.copy(y).multiplyScalar(v.x).addScaledVector(m,-w.x).multiplyScalar(it),u[L].add(S),u[q].add(S),u[J].add(S),h[L].add(_),h[q].add(_),h[J].add(_))}let A=this.groups;A.length===0&&(A=[{start:0,count:t.count}]);for(let L=0,q=A.length;L<q;++L){const J=A[L],it=J.start,ct=J.count;for(let ht=it,mt=it+ct;ht<mt;ht+=3)b(t.getX(ht+0),t.getX(ht+1),t.getX(ht+2))}const C=new z,k=new z,N=new z,B=new z;function D(L){N.fromBufferAttribute(s,L),B.copy(N);const q=u[L];C.copy(q),C.sub(N.multiplyScalar(N.dot(q))).normalize(),k.crossVectors(B,q);const it=k.dot(h[L])<0?-1:1;l.setXYZW(L,C.x,C.y,C.z,it)}for(let L=0,q=A.length;L<q;++L){const J=A[L],it=J.start,ct=J.count;for(let ht=it,mt=it+ct;ht<mt;ht+=3)D(t.getX(ht+0)),D(t.getX(ht+1)),D(t.getX(ht+2))}}computeVertexNormals(){const t=this.index,e=this.getAttribute("position");if(e!==void 0){let i=this.getAttribute("normal");if(i===void 0)i=new Zt(new Float32Array(e.count*3),3),this.setAttribute("normal",i);else for(let x=0,v=i.count;x<v;x++)i.setXYZ(x,0,0,0);
vendor: 13,243 bytes, lines 44-48
44const s=new z,o=new z,l=new z,u=new z,h=new z,d=new z,m=new z,y=new z;if(t)for(let x=0,v=t.count;x<v;x+=3){const w=t.getX(x+0),S=t.getX(x+1),_=t.getX(x+2);s.fromBufferAttribute(e,w),o.fromBufferAttribute(e,S),l.fromBufferAttribute(e,_),m.subVectors(l,o),y.subVectors(s,o),m.cross(y),u.fromBufferAttribute(i,w),h.fromBufferAttribute(i,S),d.fromBufferAttribute(i,_),u.add(m),h.add(m),d.add(m),i.setXYZ(w,u.x,u.y,u.z),i.setXYZ(S,h.x,h.y,h.z),i.setXYZ(_,d.x,d.y,d.z)}else for(let x=0,v=e.count;x<v;x+=3)s.fromBufferAttribute(e,x+0),o.fromBufferAttribute(e,x+1),l.fromBufferAttribute(e,x+2),m.subVectors(l,o),y.subVectors(s,o),m.cross(y),i.setXYZ(x+0,m.x,m.y,m.z),i.setXYZ(x+1,m.x,m.y,m.z),i.setXYZ(x+2,m.x,m.y,m.z);this.normalizeNormals(),i.needsUpdate=!0}}normalizeNormals(){const t=this.attributes.normal;for(let e=0,i=t.count;e<i;e++)ue.fromBufferAttribute(t,e),ue.normalize(),t.setXYZ(e,ue.x,ue.y,ue.z)}toNonIndexed(){function t(u,h){const d=u.array,m=u.itemSize,y=u.normalized,x=new d.constructor(h.length*m);let v=0,w=0;for(let S=0,_=h.length;S<_;S++){u.isInterleavedBufferAttribute?v=h[S]*u.data.stride+u.offset:v=h[S]*m;for(let b=0;b<m;b++)x[w++]=d[v++]}return new Zt(x,m,y)}if(this.index===null)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const e=new St,i=this.index.array,s=this.attributes;for(const u in s){const h=s[u],d=t(h,i);e.setAttribute(u,d)}const o=this.morphAttributes;for(const u in o){const h=[],d=o[u];for(let m=0,y=d.length;m<y;m++){const x=d[m],v=t(x,i);h.push(v)}e.morphAttributes[u]=h}e.morphTargetsRelative=this.morphTargetsRelative;const l=this.groups;for(let u=0,h=l.length;u<h;u++){const d=l[u];e.addGroup(d.start,d.count,d.materialIndex)}return e}toJSON(){const t={metadata:{version:4.6,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,this.name!==""&&(t.name=this.name),Object.keys(this.userData).length>0&&(t.userData=this.userData),this.parameters!==void 0){const h=this.parameters;for(const d in h)h[d]!==void 0&&(t[d]=h[d]);return t}t.data={attributes:{}};const e=this.index;e!==null&&(t.data.index={type:e.array.constructor.name,array:Array.prototype.slice.call(e.array)});const i=this.attributes;for(const h in i){const d=i[h];t.data.attributes[h]=d.toJSON(t.data)}const s={};let o=!1;for(const h in this.morphAttributes){const d=this.morphAttributes[h],m=[];for(let y=0,x=d.length;y<x;y++){const v=d[y];m.push(v.toJSON(t.data))}m.length>0&&(s[h]=m,o=!0)}o&&(t.data.morphAttributes=s,t.data.morphTargetsRelative=this.morphTargetsRelative);const l=this.groups;l.length>0&&(t.data.groups=JSON.parse(JSON.stringify(l)));const u=this.boundingSphere;return u!==null&&(t.data.boundingSphere={center:u.center.toArray(),radius:u.radius}),t}clone(){return new this.constructor().copy(this)}copy(t){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const e={};this.name=t.name;const i=t.index;i!==null&&this.setIndex(i.clone(e));const s=t.attributes;for(const d in s){const m=s[d];this.setAttribute(d,m.clone(e))}const o=t.morphAttributes;for(const d in o){const m=[],y=o[d];for(let x=0,v=y.length;x<v;x++)m.push(y[x].clone(e));this.morphAttributes[d]=m}this.morphTargetsRelative=t.morphTargetsRelative;const l=t.groups;for(let d=0,m=l.length;d<m;d++){const y=l[d];this.addGroup(y.start,y.count,y.materialIndex)}const u=t.boundingBox;u!==null&&(this.boundingBox=u.clone());const h=t.boundingSphere;return h!==null&&(this.boundingSphere=h.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this.userData=t.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}const km=new wt,Wi=new xo,La=new be,zm=new z,Da=new z,Va=new z,Ua=new z,nc=new z,Wa=new z,Im=new z,Ha=new z;class gn extends Bt{constructor(t=new St,e=new rr){super(),this.isMesh=!0,this.type="Mesh",this.geometry=t,this.material=e,this.updateMorphTargets()}copy(t,e){return super.copy(t,e),t.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),t.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this.material=Array.isArray(t.material)?t.material.slice():t.material,this.geometry=t.geometry,this}updateMorphTargets(){const e=this.geometry.morphAttributes,i=Object.keys(e);if(i.length>0){const s=e[i[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,l=s.length;o<l;o++){const u=s[o].name||String(o);this.morphTargetInfluences.push(0),this.morphTargetDictionary[u]=o}}}}getVertexPosition(t,e){const i=this.geometry,s=i.attributes.position,o=i.morphAttributes.position,l=i.morphTargetsRelative;e.fromBufferAttribute(s,t);const u=this.morphTargetInfluences;if(o&&u){Wa.set(0,0,0);for(let h=0,d=o.length;h<d;h++){const m=u[h],y=o[h];m!==0&&(nc.fromBufferAttribute(y,t),l?Wa.addScaledVector(nc,m):Wa.addScaledVector(nc.sub(e),m))}e.add(Wa)}return e}raycast(t,e){const i=this.geometry,s=this.material,o=this.matrixWorld;s!==void 0&&(i.boundingSphere===null&&i.computeBoundingSphere(),La.copy(i.boundingSphere),La.applyMatrix4(o),Wi.copy(t.ray).recast(t.near),!(La.containsPoint(Wi.origin)===!1&&(Wi.intersectSphere(La,zm)===null||Wi.origin.distanceToSquared(zm)>(t.far-t.near)**2))&&(km.copy(o).invert(),Wi.copy(t.ray).applyMatrix4(km),!(i.boundingBox!==null&&Wi.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(t,e,Wi)))}_computeIntersections(t,e,i){let s;const o=this.geometry,l=this.material,u=o.index,h=o.attributes.position,d=o.attributes.uv,m=o.attributes.uv1,y=o.attributes.normal,x=o.groups,v=o.drawRange;if(u!==null)if(Array.isArray(l))for(let w=0,S=x.length;w<S;w++){const _=x[w],b=l[_.materialIndex],A=Math.max(_.start,v.start),C=Math.min(u.count,Math.min(_.start+_.count,v.start+v.count));for(let k=A,N=C;k<N;k+=3){const B=u.getX(k),D=u.getX(k+1),L=u.getX(k+2);s=Ga(this,b,t,i,d,m,y,B,D,L),s&&(s.faceIndex=Math.floor(k/3),s.face.materialIndex=_.materialIndex,e.push(s))}}else{const w=Math.max(0,v.start),S=Math.min(u.count,v.start+v.count);for(let _=w,b=S;_<b;_+=3){const A=u.getX(_),C=u.getX(_+1),k=u.getX(_+2);s=Ga(this,l,t,i,d,m,y,A,C,k),s&&(s.faceIndex=Math.floor(_/3),e.push(s))}}else if(h!==void 0)if(Array.isArray(l))for(let w=0,S=x.length;w<S;w++){const _=x[w],b=l[_.materialIndex],A=Math.max(_.start,v.start),C=Math.min(h.count,Math.min(_.start+_.count,v.start+v.count));for(let k=A,N=C;k<N;k+=3){const B=k,D=k+1,L=k+2;s=Ga(this,b,t,i,d,m,y,B,D,L),s&&(s.faceIndex=Math.floor(k/3),s.face.materialIndex=_.materialIndex,e.push(s))}}else{const w=Math.max(0,v.start),S=Math.min(h.count,v.start+v.count);for(let _=w,b=S;_<b;_+=3){const A=_,C=_+1,k=_+2;s=Ga(this,l,t,i,d,m,y,A,C,k),s&&(s.faceIndex=Math.floor(_/3),e.push(s))}}}}function sv(f,t,e,i,s,o,l,u){let h;if(t.side===Ty?h=i.intersectTriangle(l,o,s,!0,u):h=i.intersectTriangle(s,o,l,t.side===vc,u),h===null)return null;Ha.copy(u),Ha.applyMatrix4(f.matrixWorld);const d=e.ray.origin.distanceTo(Ha);return d<e.near||d>e.far?null:{distance:d,point:Ha.clone(),object:f}}function Ga(f,t,e,i,s,o,l,u,h,d){f.getVertexPosition(u,Da),f.getVertexPosition(h,Va),f.getVertexPosition(d,Ua);const m=sv(f,t,e,i,Da,Va,Ua,Im);if(m){const y=new z;Ge.getBarycoord(Im,Da,Va,Ua,y),s&&(m.uv=Ge.getInterpolatedAttribute(s,u,h,d,y,new G)),o&&(m.uv1=Ge.getInterpolatedAttribute(o,u,h,d,y,new G)),l&&(m.normal=Ge.getInterpolatedAttribute(l,u,h,d,y,new z),m.normal.dot(i.direction)>0&&m.normal.multiplyScalar(-1));const x={a:u,b:h,c:d,normal:new z,materialIndex:0};Ge.getNormal(Da,Va,Ua,x.normal),m.face=x,m.barycoord=y}return m}class Rl extends St{constructor(t=1,e=1,i=1,s=1,o=1,l=1){super(),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:i,widthSegments:s,heightSegments:o,depthSegments:l};const u=this;s=Math.floor(s),o=Math.floor(o),l=Math.floor(l);const h=[],d=[],m=[],y=[];let x=0,v=0;w("z","y","x",-1,-1,i,e,t,l,o,0),w("z","y","x",1,-1,i,e,-t,l,o,1),w("x","z","y",1,1,t,i,e,s,l,2),w("x","z","y",1,-1,t,i,-e,s,l,3),w("x","y","z",1,-1,t,e,i,s,o,4),w("x","y","z",-1,-1,t,e,-i,s,o,5),this.setIndex(h),this.setAttribute("position",new at(d,3)),this.setAttribute("normal",new at(m,3)),this.setAttribute("uv",new at(y,2));function w(S,_,b,A,C,k,N,B,D,L,q){const J=k/D,it=N/L,ct=k/2,ht=N/2,mt=B/2,kt=D+1,_t=L+1;let Ct=0,Z=0;const j=new z;for(let Y=0;Y<_t;Y++){const P=Y*it-ht;for(let V=0;V<kt;V++){const dt=V*J-ct;j[S]=dt*A,j[_]=P*C,j[b]=mt,d.push(j.x,j.y,j.z),j[S]=0,j[_]=0,j[b]=B>0?1:-1,m.push(j.x,j.y,j.z),y.push(V/D),y.push(1-Y/L),Ct+=1}}for(let Y=0;Y<L;Y++)for(let P=0;P<D;P++){const V=x+P+kt*Y,dt=x+P+kt*(Y+1),vt=x+(P+1)+kt*(Y+1),bt=x+(P+1)+kt*Y;h.push(V,dt,bt),h.push(dt,vt,bt),Z+=6}u.addGroup(v,Z,q),v+=Z,x+=Ct}}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new Rl(t.width,t.height,t.depth,t.widthSegments,t.heightSegments,t.depthSegments)}}function Bl(f){const t={};for(const e in f){t[e]={};for(const i in f[e]){const s=f[e][i];s&&(s.isColor||s.isMatrix3||s.isMatrix4||s.isVector2||s.isVector3||s.isVector4||s.isTexture||s.isQuaternion)?s.isRenderTargetTexture?(console.warn("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),t[e][i]=null):t[e][i]=s.clone():Array.isArray(s)?t[e][i]=s.slice():t[e][i]=s}}return t}function rv(f){const t={};for(let e=0;e<f.length;e++){const i=Bl(f[e]);for(const s in i)t[s]=i[s]}return t}function ov(f){const t=[];for(let e=0;e<f.length;e++)t.push(f[e].clone());return t}function M_(f){const t=f.getRenderTarget();return t===null?f.outputColorSpace:t.isXRRenderTarget===!0?t.texture.colorSpace:He.workingColorSpace}const S_={clone:Bl,merge:rv};var av=`void main() {
45	gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
46}`,lv=`void main() {
47	gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );
48}`;class Bc extends Ae{constructor(t){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=av,this.fragmentShader=lv,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={clipCullDistance:!1,multiDraw:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,t!==void 0&&this.setValues(t)}copy(t){return super.copy(t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=Bl(t.uniforms),this.uniformsGroups=ov(t.uniformsGroups),this.defines=Object.assign({},t.defines),this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.fog=t.fog,this.lights=t.lights,this.clipping=t.clipping,this.extensions=Object.assign({},t.extensions),this.glslVersion=t.glslVersion,this}toJSON(t){const e=super.toJSON(t);e.glslVersion=this.glslVersion,e.uniforms={};for(const s in this.uniforms){const l=this.uniforms[s].value;l&&l.isTexture?e.uniforms[s]={type:"t",value:l.toJSON(t).uuid}:l&&l.isColor?e.uniforms[s]={type:"c",value:l.getHex()}:l&&l.isVector2?e.uniforms[s]={type:"v2",value:l.toArray()}:l&&l.isVector3?e.uniforms[s]={type:"v3",value:l.toArray()}:l&&l.isVector4?e.uniforms[s]={type:"v4",value:l.toArray()}:l&&l.isMatrix3?e.uniforms[s]={type:"m3",value:l.toArray()}:l&&l.isMatrix4?e.uniforms[s]={type:"m4",value:l.toArray()}:e.uniforms[s]={value:l}}Object.keys(this.defines).length>0&&(e.defines=this.defines),e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader,e.lights=this.lights,e.clipping=this.clipping;const i={};for(const s in this.extensions)this.extensions[s]===!0&&(i[s]=!0);return Object.keys(i).length>0&&(e.extensions=i),e}}class Nc extends Bt{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new wt,this.projectionMatrix=new wt,this.projectionMatrixInverse=new wt,this.coordinateSystem=_i}copy(t,e){return super.copy(t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this.coordinateSystem=t.coordinateSystem,this}getWorldDirection(t){return super.getWorldDirection(t).negate()}updateMatrixWorld(t){super.updateMatrixWorld(t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(t,e){super.updateWorldMatrix(t,e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}const Mi=new z,Em=new G,Pm=new G;class sn extends Nc{constructor(t=50,e=1,i=.1,s=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=t,this.zoom=1,this.near=i,this.far=s,this.focus=10,this.aspect=e,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=t.view===null?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this}setFocalLength(t){const e=.5*this.getFilmHeight()/t;this.fov=fo*2*Math.atan(e),this.updateProjectionMatrix()}getFocalLength(){const t=Math.tan(Qi*.5*this.fov);return .5*this.getFilmHeight()/t}
vendor: 19,191 bytes, lines 48-83
48getEffectiveFOV(){return fo*2*Math.atan(Math.tan(Qi*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(t,e,i){Mi.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),e.set(Mi.x,Mi.y).multiplyScalar(-t/Mi.z),Mi.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),i.set(Mi.x,Mi.y).multiplyScalar(-t/Mi.z)}getViewSize(t,e){return this.getViewBounds(t,Em,Pm),e.subVectors(Pm,Em)}setViewOffset(t,e,i,s,o,l){this.aspect=t/e,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=t,this.view.fullHeight=e,this.view.offsetX=i,this.view.offsetY=s,this.view.width=o,this.view.height=l,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const t=this.near;let e=t*Math.tan(Qi*.5*this.fov)/this.zoom,i=2*e,s=this.aspect*i,o=-.5*s;const l=this.view;if(this.view!==null&&this.view.enabled){const h=l.fullWidth,d=l.fullHeight;o+=l.offsetX*s/h,e-=l.offsetY*i/d,s*=l.width/h,i*=l.height/d}const u=this.filmOffset;u!==0&&(o+=t*u/this.getFilmWidth()),this.projectionMatrix.makePerspective(o,o+s,e,e-i,t,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){const e=super.toJSON(t);return e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,this.view!==null&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}}const Us=-90,Ws=1;class uv extends Bt{constructor(t,e,i){super(),this.type="CubeCamera",this.renderTarget=i,this.coordinateSystem=null,this.activeMipmapLevel=0;const s=new sn(Us,Ws,t,e);s.layers=this.layers,this.add(s);const o=new sn(Us,Ws,t,e);o.layers=this.layers,this.add(o);const l=new sn(Us,Ws,t,e);l.layers=this.layers,this.add(l);const u=new sn(Us,Ws,t,e);u.layers=this.layers,this.add(u);const h=new sn(Us,Ws,t,e);h.layers=this.layers,this.add(h);const d=new sn(Us,Ws,t,e);d.layers=this.layers,this.add(d)}updateCoordinateSystem(){const t=this.coordinateSystem,e=this.children.concat(),[i,s,o,l,u,h]=e;for(const d of e)this.remove(d);if(t===_i)i.up.set(0,1,0),i.lookAt(1,0,0),s.up.set(0,1,0),s.lookAt(-1,0,0),o.up.set(0,0,-1),o.lookAt(0,1,0),l.up.set(0,0,1),l.lookAt(0,-1,0),u.up.set(0,1,0),u.lookAt(0,0,1),h.up.set(0,1,0),h.lookAt(0,0,-1);else if(t===Ml)i.up.set(0,-1,0),i.lookAt(-1,0,0),s.up.set(0,-1,0),s.lookAt(1,0,0),o.up.set(0,0,1),o.lookAt(0,1,0),l.up.set(0,0,-1),l.lookAt(0,-1,0),u.up.set(0,-1,0),u.lookAt(0,0,1),h.up.set(0,-1,0),h.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+t);for(const d of e)this.add(d),d.updateMatrixWorld()}update(t,e){this.parent===null&&this.updateMatrixWorld();const{renderTarget:i,activeMipmapLevel:s}=this;this.coordinateSystem!==t.coordinateSystem&&(this.coordinateSystem=t.coordinateSystem,this.updateCoordinateSystem());const[o,l,u,h,d,m]=this.children,y=t.getRenderTarget(),x=t.getActiveCubeFace(),v=t.getActiveMipmapLevel(),w=t.xr.enabled;t.xr.enabled=!1;const S=i.texture.generateMipmaps;i.texture.generateMipmaps=!1,t.setRenderTarget(i,0,s),t.render(e,o),t.setRenderTarget(i,1,s),t.render(e,l),t.setRenderTarget(i,2,s),t.render(e,u),t.setRenderTarget(i,3,s),t.render(e,h),t.setRenderTarget(i,4,s),t.render(e,d),i.texture.generateMipmaps=S,t.setRenderTarget(i,5,s),t.render(e,m),t.setRenderTarget(y,x,v),t.xr.enabled=w,i.texture.needsPMREMUpdate=!0}}class Oc extends re{constructor(t,e,i,s,o,l,u,h,d,m){t=t!==void 0?t:[],e=e!==void 0?e:Ec,super(t,e,i,s,o,l,u,h,d,m),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(t){this.image=t}}class __ extends Fl{constructor(t=1,e={}){super(t,t,e),this.isWebGLCubeRenderTarget=!0;const i={width:t,height:t,depth:1},s=[i,i,i,i,i,i];this.texture=new Oc(s,e.mapping,e.wrapS,e.wrapT,e.magFilter,e.minFilter,e.format,e.type,e.anisotropy,e.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=e.generateMipmaps!==void 0?e.generateMipmaps:!1,this.texture.minFilter=e.minFilter!==void 0?e.minFilter:rn}fromEquirectangularTexture(t,e){this.texture.type=e.type,this.texture.colorSpace=e.colorSpace,this.texture.generateMipmaps=e.generateMipmaps,this.texture.minFilter=e.minFilter,this.texture.magFilter=e.magFilter;const i={uniforms:{tEquirect:{value:null}},vertexShader:`
49
50				varying vec3 vWorldDirection;
51
52				vec3 transformDirection( in vec3 dir, in mat4 matrix ) {
53
54					return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );
55
56				}
57
58				void main() {
59
60					vWorldDirection = transformDirection( position, modelMatrix );
61
62					#include <begin_vertex>
63					#include <project_vertex>
64
65				}
66			`,fragmentShader:`
67
68				uniform sampler2D tEquirect;
69
70				varying vec3 vWorldDirection;
71
72				#include <common>
73
74				void main() {
75
76					vec3 direction = normalize( vWorldDirection );
77
78					vec2 sampleUV = equirectUv( direction );
79
80					gl_FragColor = texture2D( tEquirect, sampleUV );
81
82				}
83			`},s=new Rl(5,5,5),o=new Bc({name:"CubemapFromEquirect",uniforms:Bl(i.uniforms),vertexShader:i.vertexShader,fragmentShader:i.fragmentShader,side:Ty,blending:px});o.uniforms.tEquirect.value=e;const l=new gn(s,o),u=e.minFilter;return e.minFilter===Pl&&(e.minFilter=rn),new uv(1,10,this).update(t,l),e.minFilter=u,l.geometry.dispose(),l.material.dispose(),this}clear(t,e,i,s){const o=t.getRenderTarget();for(let l=0;l<6;l++)t.setRenderTarget(this,l),t.clear(e,i,s);t.setRenderTarget(o)}}class Lc{constructor(t,e=25e-5){this.isFogExp2=!0,this.name="",this.color=new gt(t),this.density=e}clone(){return new Lc(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class Dc{constructor(t,e=1,i=1e3){this.isFog=!0,this.name="",this.color=new gt(t),this.near=e,this.far=i}clone(){return new Dc(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class hv extends Bt{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new bn,this.environmentIntensity=1,this.environmentRotation=new bn,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(t,e){return super.copy(t,e),t.background!==null&&(this.background=t.background.clone()),t.environment!==null&&(this.environment=t.environment.clone()),t.fog!==null&&(this.fog=t.fog.clone()),this.backgroundBlurriness=t.backgroundBlurriness,this.backgroundIntensity=t.backgroundIntensity,this.backgroundRotation.copy(t.backgroundRotation),this.environmentIntensity=t.environmentIntensity,this.environmentRotation.copy(t.environmentRotation),t.overrideMaterial!==null&&(this.overrideMaterial=t.overrideMaterial.clone()),this.matrixAutoUpdate=t.matrixAutoUpdate,this}toJSON(t){const e=super.toJSON(t);return this.fog!==null&&(e.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(e.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(e.object.backgroundIntensity=this.backgroundIntensity),e.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(e.object.environmentIntensity=this.environmentIntensity),e.object.environmentRotation=this.environmentRotation.toArray(),e}}class Vc{constructor(t,e){this.isInterleavedBuffer=!0,this.array=t,this.stride=e,this.count=t!==void 0?t.length/e:0,this.usage=wl,this.updateRanges=[],this.version=0,this.uuid=qe()}onUploadCallback(){}set needsUpdate(t){t===!0&&this.version++}setUsage(t){return this.usage=t,this}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}copy(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.usage=t.usage,this}copyAt(t,e,i){t*=this.stride,i*=e.stride;for(let s=0,o=this.stride;s<o;s++)this.array[t+s]=e.array[i+s];return this}set(t,e=0){return this.array.set(t,e),this}clone(t){t.arrayBuffers===void 0&&(t.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=qe()),t.arrayBuffers[this.array.buffer._uuid]===void 0&&(t.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const e=new this.array.constructor(t.arrayBuffers[this.array.buffer._uuid]),i=new this.constructor(e,this.stride);return i.setUsage(this.usage),i}onUpload(t){return this.onUploadCallback=t,this}toJSON(t){return t.arrayBuffers===void 0&&(t.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=qe()),t.arrayBuffers[this.array.buffer._uuid]===void 0&&(t.arrayBuffers[this.array.buffer._uuid]=Array.from(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}const Se=new z;class ir{constructor(t,e,i,s=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=t,this.itemSize=e,this.offset=i,this.normalized=s}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(t){this.data.needsUpdate=t}applyMatrix4(t){for(let e=0,i=this.data.count;e<i;e++)Se.fromBufferAttribute(this,e),Se.applyMatrix4(t),this.setXYZ(e,Se.x,Se.y,Se.z);return this}applyNormalMatrix(t){for(let e=0,i=this.count;e<i;e++)Se.fromBufferAttribute(this,e),Se.applyNormalMatrix(t),this.setXYZ(e,Se.x,Se.y,Se.z);return this}transformDirection(t){for(let e=0,i=this.count;e<i;e++)Se.fromBufferAttribute(this,e),Se.transformDirection(t),this.setXYZ(e,Se.x,Se.y,Se.z);return this}getComponent(t,e){let i=this.array[t*this.data.stride+this.offset+e];return this.normalized&&(i=_e(i,this.array)),i}setComponent(t,e,i){return this.normalized&&(i=xt(i,this.array)),this.data.array[t*this.data.stride+this.offset+e]=i,this}setX(t,e){return this.normalized&&(e=xt(e,this.array)),this.data.array[t*this.data.stride+this.offset]=e,this}setY(t,e){return this.normalized&&(e=xt(e,this.array)),this.data.array[t*this.data.stride+this.offset+1]=e,this}setZ(t,e){return this.normalized&&(e=xt(e,this.array)),this.data.array[t*this.data.stride+this.offset+2]=e,this}setW(t,e){return this.normalized&&(e=xt(e,this.array)),this.data.array[t*this.data.stride+this.offset+3]=e,this}getX(t){let e=this.data.array[t*this.data.stride+this.offset];return this.normalized&&(e=_e(e,this.array)),e}getY(t){let e=this.data.array[t*this.data.stride+this.offset+1];return this.normalized&&(e=_e(e,this.array)),e}getZ(t){let e=this.data.array[t*this.data.stride+this.offset+2];return this.normalized&&(e=_e(e,this.array)),e}getW(t){let e=this.data.array[t*this.data.stride+this.offset+3];return this.normalized&&(e=_e(e,this.array)),e}setXY(t,e,i){return t=t*this.data.stride+this.offset,this.normalized&&(e=xt(e,this.array),i=xt(i,this.array)),this.data.array[t+0]=e,this.data.array[t+1]=i,this}setXYZ(t,e,i,s){return t=t*this.data.stride+this.offset,this.normalized&&(e=xt(e,this.array),i=xt(i,this.array),s=xt(s,this.array)),this.data.array[t+0]=e,this.data.array[t+1]=i,this.data.array[t+2]=s,this}setXYZW(t,e,i,s,o){return t=t*this.data.stride+this.offset,this.normalized&&(e=xt(e,this.array),i=xt(i,this.array),s=xt(s,this.array),o=xt(o,this.array)),this.data.array[t+0]=e,this.data.array[t+1]=i,this.data.array[t+2]=s,this.data.array[t+3]=o,this}clone(t){if(t===void 0){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");const e=[];for(let i=0;i<this.count;i++){const s=i*this.data.stride+this.offset;for(let o=0;o<this.itemSize;o++)e.push(this.data.array[s+o])}return new Zt(new this.array.constructor(e),this.itemSize,this.normalized)}else return t.interleavedBuffers===void 0&&(t.interleavedBuffers={}),t.interleavedBuffers[this.data.uuid]===void 0&&(t.interleavedBuffers[this.data.uuid]=this.data.clone(t)),new ir(t.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(t){if(t===void 0){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");const e=[];for(let i=0;i<this.count;i++){const s=i*this.data.stride+this.offset;for(let o=0;o<this.itemSize;o++)e.push(this.data.array[s+o])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:e,normalized:this.normalized}}else return t.interleavedBuffers===void 0&&(t.interleavedBuffers={}),t.interleavedBuffers[this.data.uuid]===void 0&&(t.interleavedBuffers[this.data.uuid]=this.data.toJSON(t)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}class By extends Ae{constructor(t){super(),this.isSpriteMaterial=!0,this.type="SpriteMaterial",this.color=new gt(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.alphaMap=t.alphaMap,this.rotation=t.rotation,this.sizeAttenuation=t.sizeAttenuation,this.fog=t.fog,this}}let Hs;const jr=new z,Gs=new z,qs=new z,Xs=new G,Qr=new G,Ny=new wt,qa=new z,Kr=new z,Xa=new z,Fm=new G,ic=new G,Rm=new G;class cv extends Bt{constructor(t=new By){if(super(),this.isSprite=!0,this.type="Sprite",Hs===void 0){Hs=new St;const e=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),i=new Vc(e,5);Hs.setIndex([0,1,2,0,2,3]),Hs.setAttribute("position",new ir(i,3,0,!1)),Hs.setAttribute("uv",new ir(i,2,3,!1))}this.geometry=Hs,this.material=t,this.center=new G(.5,.5)}raycast(t,e){t.camera===null&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),Gs.setFromMatrixScale(this.matrixWorld),Ny.copy(t.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(t.camera.matrixWorldInverse,this.matrixWorld),qs.setFromMatrixPosition(this.modelViewMatrix),t.camera.isPerspectiveCamera&&this.material.sizeAttenuation===!1&&Gs.multiplyScalar(-qs.z);const i=this.material.rotation;let s,o;i!==0&&(o=Math.cos(i),s=Math.sin(i));const l=this.center;Ya(qa.set(-.5,-.5,0),qs,l,Gs,s,o),Ya(Kr.set(.5,-.5,0),qs,l,Gs,s,o),Ya(Xa.set(.5,.5,0),qs,l,Gs,s,o),Fm.set(0,0),ic.set(1,0),Rm.set(1,1);let u=t.ray.intersectTriangle(qa,Kr,Xa,!1,jr);if(u===null&&(Ya(Kr.set(-.5,.5,0),qs,l,Gs,s,o),ic.set(0,1),u=t.ray.intersectTriangle(qa,Xa,Kr,!1,jr),u===null))return;const h=t.ray.origin.distanceTo(jr);h<t.near||h>t.far||e.push({distance:h,point:jr.clone(),uv:Ge.getInterpolation(jr,qa,Kr,Xa,Fm,ic,Rm,new G),face:null,object:this})}copy(t,e){return super.copy(t,e),t.center!==void 0&&this.center.copy(t.center),this.material=t.material,this}}function Ya(f,t,e,i,s,o){Xs.subVectors(f,e).addScalar(.5).multiply(i),s!==void 0?(Qr.x=o*Xs.x-s*Xs.y,Qr.y=s*Xs.x+o*Xs.y):Qr.copy(Xs),f.copy(t),f.x+=Qr.x,f.y+=Qr.y,f.applyMatrix4(Ny)}const Za=new z,Bm=new z;class dv extends Bt{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(t){super.copy(t,!1);const e=t.levels;for(let i=0,s=e.length;i<s;i++){const o=e[i];this.addLevel(o.object.clone(),o.distance,o.hysteresis)}return this.autoUpdate=t.autoUpdate,this}addLevel(t,e=0,i=0){e=Math.abs(e);const s=this.levels;let o;for(o=0;o<s.length&&!(e<s[o].distance);o++);return s.splice(o,0,{distance:e,hysteresis:i,object:t}),this.add(t),this}removeLevel(t){const e=this.levels;for(let i=0;i<e.length;i++)if(e[i].distance===t){const s=e.splice(i,1);return this.remove(s[0].object),!0}return!1}getCurrentLevel(){return this._currentLevel}getObjectForDistance(t){const e=this.levels;if(e.length>0){let i,s;for(i=1,s=e.length;i<s;i++){let o=e[i].distance;if(e[i].object.visible&&(o-=o*e[i].hysteresis),t<o)break}return e[i-1].object}return null}raycast(t,e){if(this.levels.length>0){Za.setFromMatrixPosition(this.matrixWorld);const s=t.ray.origin.distanceTo(Za);this.getObjectForDistance(s).raycast(t,e)}}update(t){const e=this.levels;if(e.length>1){Za.setFromMatrixPosition(t.matrixWorld),Bm.setFromMatrixPosition(this.matrixWorld);const i=Za.distanceTo(Bm)/t.zoom;e[0].object.visible=!0;let s,o;for(s=1,o=e.length;s<o;s++){let l=e[s].distance;if(e[s].object.visible&&(l-=l*e[s].hysteresis),i>=l)e[s-1].object.visible=!1,e[s].object.visible=!0;else break}for(this._currentLevel=s-1;s<o;s++)e[s].object.visible=!1}}toJSON(t){const e=super.toJSON(t);this.autoUpdate===!1&&(e.object.autoUpdate=!1),e.object.levels=[];const i=this.levels;for(let s=0,o=i.length;s<o;s++){const l=i[s];e.object.levels.push({object:l.object.uuid,distance:l.distance,hysteresis:l.hysteresis})}return e}}const Nm=new z,Om=new he,Lm=new he,fv=new z,Dm=new wt,Ja=new z,sc=new be,Vm=new wt,rc=new xo;class pv extends gn{constructor(t,e){super(t,e),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode=hm,this.bindMatrix=new wt,this.bindMatrixInverse=new wt,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){const t=this.geometry;this.boundingBox===null&&(this.boundingBox=new Be),this.boundingBox.makeEmpty();const e=t.getAttribute("position");for(let i=0;i<e.count;i++)this.getVertexPosition(i,Ja),this.boundingBox.expandByPoint(Ja)}computeBoundingSphere(){const t=this.geometry;this.boundingSphere===null&&(this.boundingSphere=new be),this.boundingSphere.makeEmpty();const e=t.getAttribute("position");for(let i=0;i<e.count;i++)this.getVertexPosition(i,Ja),this.boundingSphere.expandByPoint(Ja)}copy(t,e){return super.copy(t,e),this.bindMode=t.bindMode,this.bindMatrix.copy(t.bindMatrix),this.bindMatrixInverse.copy(t.bindMatrixInverse),this.skeleton=t.skeleton,t.boundingBox!==null&&(this.boundingBox=t.boundingBox.clone()),t.boundingSphere!==null&&(this.boundingSphere=t.boundingSphere.clone()),this}raycast(t,e){const i=this.material,s=this.matrixWorld;i!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),sc.copy(this.boundingSphere),sc.applyMatrix4(s),t.ray.intersectsSphere(sc)!==!1&&(Vm.copy(s).invert(),rc.copy(t.ray).applyMatrix4(Vm),!(this.boundingBox!==null&&rc.intersectsBox(this.boundingBox)===!1)&&this._computeIntersections(t,e,rc)))}getVertexPosition(t,e){return super.getVertexPosition(t,e),this.applyBoneTransform(t,e),e}bind(t,e){this.skeleton=t,e===void 0&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),e=this.matrixWorld),this.bindMatrix.copy(e),this.bindMatrixInverse.copy(e).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const t=new he,e=this.geometry.attributes.skinWeight;for(let i=0,s=e.count;i<s;i++){t.fromBufferAttribute(e,i);const o=1/t.manhattanLength();o!==1/0?t.multiplyScalar(o):t.set(1,0,0,0),e.setXYZW(i,t.x,t.y,t.z,t.w)}}updateMatrixWorld(t){super.updateMatrixWorld(t),this.bindMode===hm?this.bindMatrixInverse.copy(this.matrixWorld).invert():this.bindMode===mx?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}
vendor: 7,300 bytes, line 83
83applyBoneTransform(t,e){const i=this.skeleton,s=this.geometry;Om.fromBufferAttribute(s.attributes.skinIndex,t),Lm.fromBufferAttribute(s.attributes.skinWeight,t),Nm.copy(e).applyMatrix4(this.bindMatrix),e.set(0,0,0);for(let o=0;o<4;o++){const l=Lm.getComponent(o);if(l!==0){const u=Om.getComponent(o);Dm.multiplyMatrices(i.bones[u].matrixWorld,i.boneInverses[u]),e.addScaledVector(fv.copy(Nm).applyMatrix4(Dm),l)}}return e.applyMatrix4(this.bindMatrixInverse)}}class Oy extends Bt{constructor(){super(),this.isBone=!0,this.type="Bone"}}class Xn extends re{constructor(t=null,e=1,i=1,s,o,l,u,h,d=yn,m=yn,y,x){super(null,l,u,h,d,m,s,o,y,x),this.isDataTexture=!0,this.image={data:t,width:e,height:i},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}const Um=new wt,mv=new wt;class Uc{constructor(t=[],e=[]){this.uuid=qe(),this.bones=t.slice(0),this.boneInverses=e,this.boneMatrices=null,this.boneTexture=null,this.init()}init(){const t=this.bones,e=this.boneInverses;if(this.boneMatrices=new Float32Array(t.length*16),e.length===0)this.calculateInverses();else if(t.length!==e.length){console.warn("THREE.Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let i=0,s=this.bones.length;i<s;i++)this.boneInverses.push(new wt)}}calculateInverses(){this.boneInverses.length=0;for(let t=0,e=this.bones.length;t<e;t++){const i=new wt;this.bones[t]&&i.copy(this.bones[t].matrixWorld).invert(),this.boneInverses.push(i)}}pose(){for(let t=0,e=this.bones.length;t<e;t++){const i=this.bones[t];i&&i.matrixWorld.copy(this.boneInverses[t]).invert()}for(let t=0,e=this.bones.length;t<e;t++){const i=this.bones[t];i&&(i.parent&&i.parent.isBone?(i.matrix.copy(i.parent.matrixWorld).invert(),i.matrix.multiply(i.matrixWorld)):i.matrix.copy(i.matrixWorld),i.matrix.decompose(i.position,i.quaternion,i.scale))}}update(){const t=this.bones,e=this.boneInverses,i=this.boneMatrices,s=this.boneTexture;for(let o=0,l=t.length;o<l;o++){const u=t[o]?t[o].matrixWorld:mv;Um.multiplyMatrices(u,e[o]),Um.toArray(i,o*16)}s!==null&&(s.needsUpdate=!0)}clone(){return new Uc(this.bones,this.boneInverses)}computeBoneTexture(){let t=Math.sqrt(this.bones.length*4);t=Math.ceil(t/4)*4,t=Math.max(t,4);const e=new Float32Array(t*t*4);e.set(this.boneMatrices);const i=new Xn(e,t,t,co,nr);return i.needsUpdate=!0,this.boneMatrices=e,this.boneTexture=i,this}getBoneByName(t){for(let e=0,i=this.bones.length;e<i;e++){const s=this.bones[e];if(s.name===t)return s}}dispose(){this.boneTexture!==null&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(t,e){this.uuid=t.uuid;for(let i=0,s=t.bones.length;i<s;i++){const o=t.bones[i];let l=e[o];l===void 0&&(console.warn("THREE.Skeleton: No bone found with UUID:",o),l=new Oy),this.bones.push(l),this.boneInverses.push(new wt().fromArray(t.boneInverses[i]))}return this.init(),this}toJSON(){const t={metadata:{version:4.6,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};t.uuid=this.uuid;const e=this.bones,i=this.boneInverses;for(let s=0,o=e.length;s<o;s++){const l=e[s];t.bones.push(l.uuid);const u=i[s];t.boneInverses.push(u.toArray())}return t}}class po extends Zt{constructor(t,e,i,s=1){super(t,e,i),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=s}copy(t){return super.copy(t),this.meshPerAttribute=t.meshPerAttribute,this}toJSON(){const t=super.toJSON();return t.meshPerAttribute=this.meshPerAttribute,t.isInstancedBufferAttribute=!0,t}}const Ys=new wt,Wm=new wt,$a=[],Hm=new Be,yv=new wt,to=new gn,eo=new be;class gv extends gn{constructor(t,e,i){super(t,e),this.isInstancedMesh=!0,this.instanceMatrix=new po(new Float32Array(i*16),16),this.instanceColor=null,this.morphTexture=null,this.count=i,this.boundingBox=null,this.boundingSphere=null;for(let s=0;s<i;s++)this.setMatrixAt(s,yv)}computeBoundingBox(){const t=this.geometry,e=this.count;this.boundingBox===null&&(this.boundingBox=new Be),t.boundingBox===null&&t.computeBoundingBox(),this.boundingBox.makeEmpty();for(let i=0;i<e;i++)this.getMatrixAt(i,Ys),Hm.copy(t.boundingBox).applyMatrix4(Ys),this.boundingBox.union(Hm)}computeBoundingSphere(){const t=this.geometry,e=this.count;this.boundingSphere===null&&(this.boundingSphere=new be),t.boundingSphere===null&&t.computeBoundingSphere(),this.boundingSphere.makeEmpty();for(let i=0;i<e;i++)this.getMatrixAt(i,Ys),eo.copy(t.boundingSphere).applyMatrix4(Ys),this.boundingSphere.union(eo)}copy(t,e){return super.copy(t,e),this.instanceMatrix.copy(t.instanceMatrix),t.morphTexture!==null&&(this.morphTexture=t.morphTexture.clone()),t.instanceColor!==null&&(this.instanceColor=t.instanceColor.clone()),this.count=t.count,t.boundingBox!==null&&(this.boundingBox=t.boundingBox.clone()),t.boundingSphere!==null&&(this.boundingSphere=t.boundingSphere.clone()),this}getColorAt(t,e){e.fromArray(this.instanceColor.array,t*3)}getMatrixAt(t,e){e.fromArray(this.instanceMatrix.array,t*16)}getMorphAt(t,e){const i=e.morphTargetInfluences,s=this.morphTexture.source.data.data,o=i.length+1,l=t*o+1;for(let u=0;u<i.length;u++)i[u]=s[l+u]}raycast(t,e){const i=this.matrixWorld,s=this.count;if(to.geometry=this.geometry,to.material=this.material,to.material!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),eo.copy(this.boundingSphere),eo.applyMatrix4(i),t.ray.intersectsSphere(eo)!==!1))for(let o=0;o<s;o++){this.getMatrixAt(o,Ys),Wm.multiplyMatrices(i,Ys),to.matrixWorld=Wm,to.raycast(t,$a);for(let l=0,u=$a.length;l<u;l++){const h=$a[l];h.instanceId=o,h.object=this,e.push(h)}$a.length=0}}setColorAt(t,e){this.instanceColor===null&&(this.instanceColor=new po(new Float32Array(this.instanceMatrix.count*3).fill(1),3)),e.toArray(this.instanceColor.array,t*3)}setMatrixAt(t,e){e.toArray(this.instanceMatrix.array,t*16)}setMorphAt(t,e){const i=e.morphTargetInfluences,s=i.length+1;this.morphTexture===null&&(this.morphTexture=new Xn(new Float32Array(s*this.count),s,this.count,zy,nr));const o=this.morphTexture.source.data.data;let l=0;for(let d=0;d<i.length;d++)l+=i[d];const u=this.geometry.morphTargetsRelative?1:1-l,h=s*t;o[h]=u,o.set(i,h+1)}updateMorphTargets(){}dispose(){return this.dispatchEvent({type:"dispose"}),this.morphTexture!==null&&(this.morphTexture.dispose(),this.morphTexture=null),this}}const oc=new z,xv=new z,vv=new An;class Zs{constructor(t=new z(1,0,0),e=0){this.isPlane=!0,this.normal=t,this.constant=e}set(t,e){return this.normal.copy(t),this.constant=e,this}setComponents(t,e,i,s){return this.normal.set(t,e,i),this.constant=s,this}setFromNormalAndCoplanarPoint(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this}setFromCoplanarPoints(t,e,i){const s=oc.subVectors(i,e).cross(xv.subVectors(t,e)).normalize();return this.setFromNormalAndCoplanarPoint(s,t),this}copy(t){return this.normal.copy(t.normal),this.constant=t.constant,this}normalize(){const t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(t){return this.normal.dot(t)+this.constant}distanceToSphere(t){return this.distanceToPoint(t.center)-t.radius}projectPoint(t,e){return e.copy(t).addScaledVector(this.normal,-this.distanceToPoint(t))}intersectLine(t,e){const i=t.delta(oc),s=this.normal.dot(i);if(s===0)return this.distanceToPoint(t.start)===0?e.copy(t.start):null;
vendor: 1,907 bytes, line 83
83const o=-(t.start.dot(this.normal)+this.constant)/s;return o<0||o>1?null:e.copy(t.start).addScaledVector(i,o)}intersectsLine(t){const e=this.distanceToPoint(t.start),i=this.distanceToPoint(t.end);return e<0&&i>0||i<0&&e>0}intersectsBox(t){return t.intersectsPlane(this)}intersectsSphere(t){return t.intersectsPlane(this)}coplanarPoint(t){return t.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(t,e){const i=e||vv.getNormalMatrix(t),s=this.coplanarPoint(oc).applyMatrix4(t),o=this.normal.applyMatrix3(i).normalize();return this.constant=-s.dot(o),this}translate(t){return this.constant-=t.dot(this.normal),this}equals(t){return t.normal.equals(this.normal)&&t.constant===this.constant}clone(){return new this.constructor().copy(this)}}const Hi=new be,ja=new z;class Ly{constructor(t=new Zs,e=new Zs,i=new Zs,s=new Zs,o=new Zs,l=new Zs){this.planes=[t,e,i,s,o,l]}set(t,e,i,s,o,l){const u=this.planes;return u[0].copy(t),u[1].copy(e),u[2].copy(i),u[3].copy(s),u[4].copy(o),u[5].copy(l),this}copy(t){const e=this.planes;for(let i=0;i<6;i++)e[i].copy(t.planes[i]);return this}setFromProjectionMatrix(t,e=_i){const i=this.planes,s=t.elements,o=s[0],l=s[1],u=s[2],h=s[3],d=s[4],m=s[5],y=s[6],x=s[7],v=s[8],w=s[9],S=s[10],_=s[11],b=s[12],A=s[13],C=s[14],k=s[15];if(i[0].setComponents(h-o,x-d,_-v,k-b).normalize(),i[1].setComponents(h+o,x+d,_+v,k+b).normalize(),i[2].setComponents(h+l,x+m,_+w,k+A).normalize(),i[3].setComponents(h-l,x-m,_-w,k-A).normalize(),i[4].setComponents(h-u,x-y,_-S,k-C).normalize(),e===_i)i[5].setComponents(h+u,x+y,_+S,k+C).normalize();else if(e===Ml)i[5].setComponents(u,y,S,C).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+e);return this}intersectsObject(t){if(t.boundingSphere!==void 0)t.boundingSphere===null&&t.computeBoundingSphere(),Hi.copy(t.boundingSphere).applyMatrix4(t.matrixWorld);else{const e=t.geometry;
vendor: 3,257 bytes, line 83
83e.boundingSphere===null&&e.computeBoundingSphere(),Hi.copy(e.boundingSphere).applyMatrix4(t.matrixWorld)}return this.intersectsSphere(Hi)}intersectsSprite(t){return Hi.center.set(0,0,0),Hi.radius=.7071067811865476,Hi.applyMatrix4(t.matrixWorld),this.intersectsSphere(Hi)}intersectsSphere(t){const e=this.planes,i=t.center,s=-t.radius;for(let o=0;o<6;o++)if(e[o].distanceToPoint(i)<s)return!1;return!0}intersectsBox(t){const e=this.planes;for(let i=0;i<6;i++){const s=e[i];if(ja.x=s.normal.x>0?t.max.x:t.min.x,ja.y=s.normal.y>0?t.max.y:t.min.y,ja.z=s.normal.z>0?t.max.z:t.min.z,s.distanceToPoint(ja)<0)return!1}return!0}containsPoint(t){const e=this.planes;for(let i=0;i<6;i++)if(e[i].distanceToPoint(t)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function ac(f,t){return f-t}function wv(f,t){return f.z-t.z}function Mv(f,t){return t.z-f.z}class Sv{constructor(){this.index=0,this.pool=[],this.list=[]}push(t,e,i,s){const o=this.pool,l=this.list;this.index>=o.length&&o.push({start:-1,count:-1,z:-1,index:-1});const u=o[this.index];l.push(u),this.index++,u.start=t,u.count=e,u.z=i,u.index=s}reset(){this.list.length=0,this.index=0}}const Fe=new wt,_v=new gt(1,1,1),lc=new Ly,Qa=new Be,Gi=new be,no=new z,Gm=new z,bv=new z,uc=new Sv,ve=new gn,Ka=[];function Av(f,t,e=0){const i=t.itemSize;if(f.isInterleavedBufferAttribute||f.array.constructor!==t.array.constructor){const s=f.count;for(let o=0;o<s;o++)for(let l=0;l<i;l++)t.setComponent(o+e,l,f.getComponent(o,l))}else t.array.set(f.array,e*i);t.needsUpdate=!0}function qi(f,t){if(f.constructor!==t.constructor){const e=Math.min(f.length,t.length);for(let i=0;i<e;i++)t[i]=f[i]}else{const e=Math.min(f.length,t.length);t.set(new f.constructor(f.buffer,0,e))}}class Cv extends gn{get maxInstanceCount(){return this._maxInstanceCount}get instanceCount(){return this._instanceInfo.length-this._availableInstanceIds.length}get unusedVertexCount(){return this._maxVertexCount-this._nextVertexStart}get unusedIndexCount(){return this._maxIndexCount-this._nextIndexStart}constructor(t,e,i=e*2,s){super(new St,s),this.isBatchedMesh=!0,this.perObjectFrustumCulled=!0,this.sortObjects=!0,this.boundingBox=null,this.boundingSphere=null,this.customSort=null,this._instanceInfo=[],this._geometryInfo=[],this._availableInstanceIds=[],this._availableGeometryIds=[],this._nextIndexStart=0,this._nextVertexStart=0,this._geometryCount=0,this._visibilityChanged=!0,this._geometryInitialized=!1,this._maxInstanceCount=t,this._maxVertexCount=e,this._maxIndexCount=i,this._multiDrawCounts=new Int32Array(t),this._multiDrawStarts=new Int32Array(t),this._multiDrawCount=0,this._multiDrawInstances=null,this._matricesTexture=null,this._indirectTexture=null,this._colorsTexture=null,this._initMatricesTexture(),this._initIndirectTexture()}_initMatricesTexture(){let t=Math.sqrt(this._maxInstanceCount*4);t=Math.ceil(t/4)*4,t=Math.max(t,4);const e=new Float32Array(t*t*4),i=new Xn(e,t,t,co,nr);this._matricesTexture=i}_initIndirectTexture(){let t=Math.sqrt(this._maxInstanceCount);t=Math.ceil(t);const e=new Uint32Array(t*t),i=new Xn(e,t,t,Iy,Pc);this._indirectTexture=i}_initColorsTexture(){let t=Math.sqrt(this._maxInstanceCount);t=Math.ceil(t);const e=new Float32Array(t*t*4).fill(1),i=new Xn(e,t,t,co,nr);
83i.colorSpace=He.workingColorSpace,this._colorsTexture=i}_initializeGeometry(t){const e=this.geometry,i=this._maxVertexCount,s=this._maxIndexCount;if(this._geometryInitialized===!1){for(const o in t.attributes){const l=t.getAttribute(o),{array:u,itemSize:h,normalized:d}=l,m=new u.constructor(i*h),y=new Zt(m,h,d);e.setAttribute(o,y)}if(t.getIndex()!==null){const o=i>65535?new Uint32Array(s):new Uint16Array(s);e.setIndex(new Zt(o,1))}this._geometryInitialized=!0}}_validateGeometry(t){const e=this.geometry;if(!!t.getIndex()!=!!e.getIndex())throw new Error('THREE.BatchedMesh: All geometries must consistently have "index".');for(const i in e.attributes){if(!t.hasAttribute(i))throw new Error(`THREE.BatchedMesh: Added geometry missing "${i}". All geometries must have consistent attributes.`);const s=t.getAttribute(i),o=e.getAttribute(i);if(s.itemSize!==o.itemSize||s.normalized!==o.normalized)throw new Error("THREE.BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}validateInstanceId(t){const e=this._instanceInfo;if(t<0||t>=e.length||e[t].active===!1)throw new Error(`THREE.BatchedMesh: Invalid instanceId ${t}. Instance is either out of range or has been deleted.`)}validateGeometryId(t){const e=this._geometryInfo;if(t<0||t>=e.length||e[t].active===!1)throw new Error(`THREE.BatchedMesh: Invalid geometryId ${t}. Geometry is either out of range or has been deleted.`)}setCustomSort(t){return this.customSort=t,this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Be);const t=this.boundingBox,e=this._instanceInfo;t.makeEmpty();for(let i=0,s=e.length;i<s;i++){if(e[i].active===!1)continue;const o=e[i].geometryIndex;this.getMatrixAt(i,Fe),this.getBoundingBoxAt(o,Qa).applyMatrix4(Fe),t.union(Qa)}}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new be);const t=this.boundingSphere,e=this._instanceInfo;t.makeEmpty();for(let i=0,s=e.length;i<s;i++){if(e[i].active===!1)continue;const o=e[i].geometryIndex;this.getMatrixAt(i,Fe),this.getBoundingSphereAt(o,Gi).applyMatrix4(Fe),t.union(Gi)}}addInstance(t){if(this._instanceInfo.length>=this.maxInstanceCount&&this._availableInstanceIds.length===0)throw new Error("THREE.BatchedMesh: Maximum item count reached.");const i={visible:!0,active:!0,geometryIndex:t};let s=null;this._availableInstanceIds.length>0?(this._availableInstanceIds.sort(ac),s=this._availableInstanceIds.shift(),this._instanceInfo[s]=i):(s=this._instanceInfo.length,this._instanceInfo.push(i));const o=this._matricesTexture;Fe.identity().toArray(o.image.data,s*16),o.needsUpdate=!0;const l=this._colorsTexture;return l&&(_v.toArray(l.image.data,s*4),l.needsUpdate=!0),this._visibilityChanged=!0,s}addGeometry(t,e=-1,i=-1){this._initializeGeometry(t),this._validateGeometry(t);const s={vertexStart:-1,vertexCount:-1,reservedVertexCount:-1,indexStart:-1,indexCount:-1,reservedIndexCount:-1,start:-1,count:-1,boundingBox:null,boundingSphere:null,active:!0},o=this._geometryInfo;s.vertexStart=this._nextVertexStart,s.reservedVertexCount=e===-1?t.getAttribute("position").count:e;const l=t.getIndex();if(l!==null&&(s.indexStart=this._nextIndexStart,s.reservedIndexCount=i===-1?l.count:i),s.indexStart!==-1&&s.indexStart+s.reservedIndexCount>this._maxIndexCount||s.vertexStart+s.reservedVertexCount>this._maxVertexCount)throw new Error("THREE.BatchedMesh: Reserved space request exceeds the maximum buffer size.");let h;return this._availableGeometryIds.length>0?(this._availableGeometryIds.sort(ac),h=this._availableGeometryIds.shift(),o[h]=s):(h=this._geometryCount,this._geometryCount++,o.push(s)),this.setGeometryAt(h,t),this._nextIndexStart=s.indexStart+s.reservedIndexCount,this._nextVertexStart=s.vertexStart+s.reservedVertexCount,h}setGeometryAt(t,e){if(t>=this._geometryCount)throw new Error("THREE.BatchedMesh: Maximum geometry count reached.");this._validateGeometry(e);const i=this.geometry,s=i.getIndex()!==null,o=i.getIndex(),l=e.getIndex(),u=this._geometryInfo[t];if(s&&l.count>u.reservedIndexCount||e.attributes.position.count>u.reservedVertexCount)throw new Error("THREE.BatchedMesh: Reserved space not large enough for provided geometry.");const h=u.vertexStart,d=u.reservedVertexCount;u.vertexCount=e.getAttribute("position").count;for(const m in i.attributes){const y=e.getAttribute(m),x=i.getAttribute(m);Av(y,x,h);const v=y.itemSize;
vendor: 8,395 bytes, line 83
83for(let w=y.count,S=d;w<S;w++){const _=h+w;for(let b=0;b<v;b++)x.setComponent(_,b,0)}x.needsUpdate=!0,x.addUpdateRange(h*v,d*v)}if(s){const m=u.indexStart,y=u.reservedIndexCount;u.indexCount=e.getIndex().count;for(let x=0;x<l.count;x++)o.setX(m+x,h+l.getX(x));for(let x=l.count,v=y;x<v;x++)o.setX(m+x,h);o.needsUpdate=!0,o.addUpdateRange(m,u.reservedIndexCount)}return u.start=s?u.indexStart:u.vertexStart,u.count=s?u.indexCount:u.vertexCount,u.boundingBox=null,e.boundingBox!==null&&(u.boundingBox=e.boundingBox.clone()),u.boundingSphere=null,e.boundingSphere!==null&&(u.boundingSphere=e.boundingSphere.clone()),this._visibilityChanged=!0,t}deleteGeometry(t){const e=this._geometryInfo;if(t>=e.length||e[t].active===!1)return this;const i=this._instanceInfo;for(let s=0,o=i.length;s<o;s++)i[s].geometryIndex===t&&this.deleteInstance(s);return e[t].active=!1,this._availableGeometryIds.push(t),this._visibilityChanged=!0,this}deleteInstance(t){return this.validateInstanceId(t),this._instanceInfo[t].active=!1,this._availableInstanceIds.push(t),this._visibilityChanged=!0,this}optimize(){let t=0,e=0;const i=this._geometryInfo,s=i.map((l,u)=>u).sort((l,u)=>i[l].vertexStart-i[u].vertexStart),o=this.geometry;for(let l=0,u=i.length;l<u;l++){const h=s[l],d=i[h];if(d.active!==!1){if(o.index!==null){if(d.indexStart!==e){const{indexStart:m,vertexStart:y,reservedIndexCount:x}=d,v=o.index,w=v.array,S=t-y;for(let _=m;_<m+x;_++)w[_]=w[_]+S;v.array.copyWithin(e,m,m+x),v.addUpdateRange(e,x),d.indexStart=e}e+=d.reservedIndexCount}if(d.vertexStart!==t){const{vertexStart:m,reservedVertexCount:y}=d,x=o.attributes;for(const v in x){const w=x[v],{array:S,itemSize:_}=w;S.copyWithin(t*_,m*_,(m+y)*_),w.addUpdateRange(t*_,y*_)}d.vertexStart=t}t+=d.reservedVertexCount,d.start=o.index?d.indexStart:d.vertexStart,this._nextIndexStart=o.index?d.indexStart+d.reservedIndexCount:0,this._nextVertexStart=d.vertexStart+d.reservedVertexCount}}return this}getBoundingBoxAt(t,e){if(t>=this._geometryCount)return null;const i=this.geometry,s=this._geometryInfo[t];if(s.boundingBox===null){const o=new Be,l=i.index,u=i.attributes.position;for(let h=s.start,d=s.start+s.count;h<d;h++){let m=h;l&&(m=l.getX(m)),o.expandByPoint(no.fromBufferAttribute(u,m))}s.boundingBox=o}return e.copy(s.boundingBox),e}getBoundingSphereAt(t,e){if(t>=this._geometryCount)return null;const i=this.geometry,s=this._geometryInfo[t];if(s.boundingSphere===null){const o=new be;this.getBoundingBoxAt(t,Qa),Qa.getCenter(o.center);const l=i.index,u=i.attributes.position;let h=0;for(let d=s.start,m=s.start+s.count;d<m;d++){let y=d;l&&(y=l.getX(y)),no.fromBufferAttribute(u,y),h=Math.max(h,o.center.distanceToSquared(no))}o.radius=Math.sqrt(h),s.boundingSphere=o}return e.copy(s.boundingSphere),e}setMatrixAt(t,e){this.validateInstanceId(t);const i=this._matricesTexture,s=this._matricesTexture.image.data;return e.toArray(s,t*16),i.needsUpdate=!0,this}getMatrixAt(t,e){return this.validateInstanceId(t),e.fromArray(this._matricesTexture.image.data,t*16)}setColorAt(t,e){return this.validateInstanceId(t),this._colorsTexture===null&&this._initColorsTexture(),e.toArray(this._colorsTexture.image.data,t*4),this._colorsTexture.needsUpdate=!0,this}getColorAt(t,e){return this.validateInstanceId(t),e.fromArray(this._colorsTexture.image.data,t*4)}setVisibleAt(t,e){return this.validateInstanceId(t),this._instanceInfo[t].visible===e?this:(this._instanceInfo[t].visible=e,this._visibilityChanged=!0,this)}getVisibleAt(t){return this.validateInstanceId(t),this._instanceInfo[t].visible}setGeometryIdAt(t,e){return this.validateInstanceId(t),this.validateGeometryId(e),this._instanceInfo[t].geometryIndex=e,this}getGeometryIdAt(t){return this.validateInstanceId(t),this._instanceInfo[t].geometryIndex}getGeometryRangeAt(t,e={}){this.validateGeometryId(t);const i=this._geometryInfo[t];return e.vertexStart=i.vertexStart,e.vertexCount=i.vertexCount,e.reservedVertexCount=i.reservedVertexCount,e.indexStart=i.indexStart,e.indexCount=i.indexCount,e.reservedIndexCount=i.reservedIndexCount,e.start=i.start,e.count=i.count,e}setInstanceCount(t){const e=this._availableInstanceIds,i=this._instanceInfo;for(e.sort(ac);e[e.length-1]===i.length;)i.pop(),e.pop();if(t<i.length)throw new Error(`BatchedMesh: Instance ids outside the range ${t} are being used. Cannot shrink instance count.`);const s=new Int32Array(t),o=new Int32Array(t);qi(this._multiDrawCounts,s),qi(this._multiDrawStarts,o),this._multiDrawCounts=s,this._multiDrawStarts=o,this._maxInstanceCount=t;const l=this._indirectTexture,u=this._matricesTexture,h=this._colorsTexture;l.dispose(),this._initIndirectTexture(),qi(l.image.data,this._indirectTexture.image.data),u.dispose(),this._initMatricesTexture(),qi(u.image.data,this._matricesTexture.image.data),h&&(h.dispose(),this._initColorsTexture(),qi(h.image.data,this._colorsTexture.image.data))}setGeometrySize(t,e){const i=[...this._geometryInfo].filter(u=>u.active);if(Math.max(...i.map(u=>u.vertexStart+u.reservedVertexCount))>t)throw new Error(`BatchedMesh: Geometry vertex values are being used outside the range ${e}. Cannot shrink further.`);if(this.geometry.index&&Math.max(...i.map(h=>h.indexStart+h.reservedIndexCount))>e)throw new Error(`BatchedMesh: Geometry index values are being used outside the range ${e}. Cannot shrink further.`);const o=this.geometry;o.dispose(),this._maxVertexCount=t,this._maxIndexCount=e,this._geometryInitialized&&(this._geometryInitialized=!1,this.geometry=new St,this._initializeGeometry(o));const l=this.geometry;o.index&&qi(o.index.array,l.index.array);for(const u in o.attributes)qi(o.attributes[u].array,l.attributes[u].array)}raycast(t,e){const i=this._instanceInfo,s=this._geometryInfo,o=this.matrixWorld,l=this.geometry;ve.material=this.material,ve.geometry.index=l.index,ve.geometry.attributes=l.attributes,ve.geometry.boundingBox===null&&(ve.geometry.boundingBox=new Be),ve.geometry.boundingSphere===null&&(ve.geometry.boundingSphere=new be);for(let u=0,h=i.length;u<h;u++){if(!i[u].visible||!i[u].active)continue;const d=i[u].geometryIndex,m=s[d];ve.geometry.setDrawRange(m.start,m.count),this.getMatrixAt(u,ve.matrixWorld).premultiply(o),this.getBoundingBoxAt(d,ve.geometry.boundingBox),this.getBoundingSphereAt(d,ve.geometry.boundingSphere),ve.raycast(t,Ka);for(let y=0,x=Ka.length;y<x;y++){const v=Ka[y];v.object=this,v.batchId=u,e.push(v)}Ka.length=0}ve.material=null,ve.geometry.index=null,ve.geometry.attributes={},ve.geometry.setDrawRange(0,1/0)}copy(t){return super.copy(t),this.geometry=t.geometry.clone(),this.perObjectFrustumCulled=t.perObjectFrustumCulled,this.sortObjects=t.sortObjects,this.boundingBox=t.boundingBox!==null?t.boundingBox.clone():null,this.boundingSphere=t.boundingSphere!==null?t.boundingSphere.clone():null,this._geometryInfo=t._geometryInfo.map(e=>({...e,boundingBox:e.boundingBox!==null?e.boundingBox.clone():null,boundingSphere:e.boundingSphere!==null?e.boundingSphere.clone():null})),this._instanceInfo=t._instanceInfo.map(e=>({...e})),this._maxInstanceCount=t._maxInstanceCount,this._maxVertexCount=t._maxVertexCount,this._maxIndexCount=t._maxIndexCount,this._geometryInitialized=t._geometryInitialized,this._geometryCount=t._geometryCount,this._multiDrawCounts=t._multiDrawCounts.slice(),this._multiDrawStarts=t._multiDrawStarts.slice(),this._matricesTexture=t._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.data.slice(),this._colorsTexture!==null&&(this._colorsTexture=t._colorsTexture.clone(),this._colorsTexture.image.data=this._colorsTexture.image.data.slice()),this}dispose(){return this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this._indirectTexture.dispose(),this._indirectTexture=null,this._colorsTexture!==null&&(this._colorsTexture.dispose(),this._colorsTexture=null),this}onBeforeRender(t,e,i,s,o){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;const l=s.getIndex(),u=l===null?1:l.array.BYTES_PER_ELEMENT,h=this._instanceInfo,d=this._multiDrawStarts,m=this._multiDrawCounts,y=this._geometryInfo,x=this.perObjectFrustumCulled,v=this._indirectTexture,w=v.image.data;x&&(Fe.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse).multiply(this.matrixWorld),lc.setFromProjectionMatrix(Fe,t.coordinateSystem));let S=0;if(this.sortObjects){Fe.copy(this.matrixWorld).invert(),no.setFromMatrixPosition(i.matrixWorld).applyMatrix4(Fe),Gm.
83set(0,0,-1).transformDirection(i.matrixWorld).transformDirection(Fe);for(let A=0,C=h.length;A<C;A++)if(h[A].visible&&h[A].active){const k=h[A].geometryIndex;this.getMatrixAt(A,Fe),this.getBoundingSphereAt(k,Gi).applyMatrix4(Fe);let N=!1;if(x&&(N=!lc.intersectsSphere(Gi)),!N){const B=y[k],D=bv.subVectors(Gi.center,no).dot(Gm);uc.push(B.start,B.count,D,A)}}const _=uc.list,b=this.customSort;b===null?_.sort(o.transparent?Mv:wv):b.call(this,_,i);for(let A=0,C=_.length;A<C;A++){const k=_[A];d[S]=k.start*u,m[S]=k.count,w[S]=k.index,S++}uc.reset()}else for(let _=0,b=h.length;_<b;_++)if(h[_].visible&&h[_].active){const A=h[_].geometryIndex;let C=!1;if(x&&(this.getMatrixAt(_,Fe),this.getBoundingSphereAt(A,Gi).applyMatrix4(Fe),C=!lc.intersectsSphere(Gi)),!C){const k=y[A];d[S]=k.start*u,m[S]=k.count,w[S]=_,S++}}v.needsUpdate=!0,this._multiDrawCount=S,this._visibilityChanged=!1}onBeforeShadow(t,e,i,s,o,l){this.onBeforeRender(t,null,s,o,l)}}class Ne extends Ae{constructor(t){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new gt(16777215),this.map=null,this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this.fog=t.fog,this}}const _l=new z,bl=new z,qm=new wt,io=new xo,tl=new be,hc=new z,Xm=new z;class Ki extends Bt{constructor(t=new St,e=new Ne){super(),this.isLine=!0,this.type="Line",this.geometry=t,this.material=e,this.updateMorphTargets()}copy(t,e){return super.copy(t,e),this.material=Array.isArray(t.material)?t.material.slice():t.material,this.geometry=t.geometry,this}computeLineDistances(){const t=this.geometry;if(t.index===null){const e=t.attributes.position,i=[0];for(let s=1,o=e.count;s<o;s++)_l.fromBufferAttribute(e,s-1),bl.fromBufferAttribute(e,s),i[s]=i[s-1],i[s]+=_l.distanceTo(bl);t.setAttribute("lineDistance",new at(i,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(t,e){const i=this.geometry,s=this.matrixWorld,o=t.params.Line.threshold,l=i.drawRange;if(i.boundingSphere===null&&i.computeBoundingSphere(),tl.copy(i.boundingSphere),tl.applyMatrix4(s),tl.radius+=o,t.ray.intersectsSphere(tl)===!1)return;qm.copy(s).invert(),io.copy(t.ray).applyMatrix4(qm);const u=o/((this.scale.x+this.scale.y+this.scale.z)/3),h=u*u,d=this.isLineSegments?2:1,m=i.index,x=i.attributes.position;if(m!==null){const v=Math.max(0,l.start),w=Math.min(m.count,l.start+l.count);for(let S=v,_=w-1;S<_;S+=d){const b=m.getX(S),A=m.getX(S+1),C=el(this,t,io,h,b,A);C&&e.push(C)}if(this.isLineLoop){const S=m.getX(w-1),_=m.getX(v),b=el(this,t,io,h,S,_);b&&e.push(b)}}else{const v=Math.max(0,l.start),w=Math.min(x.count,l.start+l.count);for(let S=v,_=w-1;S<_;S+=d){const b=el(this,t,io,h,S,S+1);b&&e.push(b)}if(this.isLineLoop){const S=el(this,t,io,h,w-1,v);S&&e.push(S)}}}updateMorphTargets(){const e=this.geometry.morphAttributes,i=Object.keys(e);if(i.length>0){const s=e[i[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,l=s.length;o<l;o++){const u=s[o].name||String(o);this.morphTargetInfluences.push(0),this.morphTargetDictionary[u]=o}}}}}function el(f,t,e,i,s,o){const l=f.geometry.attributes.position;if(_l.fromBufferAttribute(l,s),bl.fromBufferAttribute(l,o),e.distanceSqToSegment(_l,bl,hc,Xm)>i)return;hc.applyMatrix4(f.matrixWorld);const h=t.ray.origin.distanceTo(hc);if(!(h<t.near||h>t.far))return{distance:h,point:Xm.clone().applyMatrix4(f.matrixWorld),index:s,face:null,faceIndex:null,barycoord:null,object:f}}const Ym=new z,Zm=new z;class Zn extends Ki{constructor(t,e){super(t,e),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const t=this.geometry;if(t.index===null){const e=t.attributes.position,i=[];for(let s=0,o=e.count;s<o;s+=2)Ym.fromBufferAttribute(e,s),Zm.fromBufferAttribute(e,s+1),i[s]=s===0?0:i[s-1],i[s+1]=i[s]+Ym.distanceTo(Zm);t.setAttribute("lineDistance",new at(i,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class Tv extends Ki{constructor(t,e){super(t,e),this.isLineLoop=!0,this.type="LineLoop"}}class Dy extends Ae{constructor(t){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new gt(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.alphaMap=t.alphaMap,this.size=t.size,this.sizeAttenuation=t.sizeAttenuation,this.fog=t.fog,this}}const Jm=new wt,_c=new xo,nl=new be,il=new z;class kv extends Bt{constructor(t=new St,e=new Dy){super(),this.isPoints=!0,this.type="Points",this.geometry=t,this.material=e,this.updateMorphTargets()}copy(t,e){return super.copy(t,e),this.material=Array.isArray(t.material)?t.material.slice():t.material,this.geometry=t.geometry,this}raycast(t,e){const i=this.geometry,s=this.matrixWorld,o=t.params.Points.threshold,l=i.drawRange;if(i.boundingSphere===null&&i.computeBoundingSphere(),nl.copy(i.boundingSphere),nl.applyM
vendor: 12,954 bytes, line 83
83atrix4(s),nl.radius+=o,t.ray.intersectsSphere(nl)===!1)return;Jm.copy(s).invert(),_c.copy(t.ray).applyMatrix4(Jm);const u=o/((this.scale.x+this.scale.y+this.scale.z)/3),h=u*u,d=i.index,y=i.attributes.position;if(d!==null){const x=Math.max(0,l.start),v=Math.min(d.count,l.start+l.count);for(let w=x,S=v;w<S;w++){const _=d.getX(w);il.fromBufferAttribute(y,_),$m(il,_,h,s,t,e,this)}}else{const x=Math.max(0,l.start),v=Math.min(y.count,l.start+l.count);for(let w=x,S=v;w<S;w++)il.fromBufferAttribute(y,w),$m(il,w,h,s,t,e,this)}}updateMorphTargets(){const e=this.geometry.morphAttributes,i=Object.keys(e);if(i.length>0){const s=e[i[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,l=s.length;o<l;o++){const u=s[o].name||String(o);this.morphTargetInfluences.push(0),this.morphTargetDictionary[u]=o}}}}}function $m(f,t,e,i,s,o,l){const u=_c.distanceSqToPoint(f);if(u<e){const h=new z;_c.closestPointToPoint(f,h),h.applyMatrix4(i);const d=s.ray.origin.distanceTo(h);if(d<s.near||d>s.far)return;o.push({distance:d,distanceToRay:Math.sqrt(u),point:h,index:t,face:null,faceIndex:null,barycoord:null,object:l})}}class zv extends Bt{constructor(){super(),this.isGroup=!0,this.type="Group"}}class b_ extends re{constructor(t,e,i,s,o,l,u,h,d){super(t,e,i,s,o,l,u,h,d),this.isVideoTexture=!0,this.minFilter=l!==void 0?l:rn,this.magFilter=o!==void 0?o:rn,this.generateMipmaps=!1;const m=this;function y(){m.needsUpdate=!0,t.requestVideoFrameCallback(y)}"requestVideoFrameCallback"in t&&t.requestVideoFrameCallback(y)}clone(){return new this.constructor(this.image).copy(this)}update(){const t=this.image;"requestVideoFrameCallback"in t===!1&&t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class A_ extends re{constructor(t,e){super({width:t,height:e}),this.isFramebufferTexture=!0,this.magFilter=yn,this.minFilter=yn,this.generateMipmaps=!1,this.needsUpdate=!0}}class Wc extends re{constructor(t,e,i,s,o,l,u,h,d,m,y,x){super(null,l,u,h,d,m,s,o,y,x),this.isCompressedTexture=!0,this.image={width:e,height:i},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1}}class C_ extends Wc{constructor(t,e,i,s,o,l){super(t,e,i,o,l),this.isCompressedArrayTexture=!0,this.image.depth=s,this.wrapR=_n,this.layerUpdates=new Set}addLayerUpdate(t){this.layerUpdates.add(t)}clearLayerUpdates(){this.layerUpdates.clear()}}class T_ extends Wc{constructor(t,e,i){super(void 0,t[0].width,t[0].height,e,i,Ec),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=t}}class k_ extends re{constructor(t,e,i,s,o,l,u,h,d){super(t,e,i,s,o,l,u,h,d),this.isCanvasTexture=!0,this.needsUpdate=!0}}class z_ extends re{constructor(t,e,i,s,o,l,u,h,d,m=Bh){if(m!==Bh&&m!==cm)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");i===void 0&&m===Bh&&(i=Pc),i===void 0&&m===cm&&(i=Ix),super(null,s,o,l,u,h,m,i,d),this.isDepthTexture=!0,this.image={width:t,height:e},this.magFilter=u!==void 0?u:yn,this.minFilter=h!==void 0?h:yn,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(t){return super.copy(t),this.compareFunction=t.compareFunction,this}toJSON(t){const e=super.toJSON(t);return this.compareFunction!==null&&(e.compareFunction=this.compareFunction),e}}class Cn{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(t,e){const i=this.getUtoTmapping(t);return this.getPoint(i,e)}getPoints(t=5){const e=[];for(let i=0;i<=t;i++)e.push(this.getPoint(i/t));return e}getSpacedPoints(t=5){const e=[];for(let i=0;i<=t;i++)e.push(this.getPointAt(i/t));return e}getLength(){const t=this.getLengths();return t[t.length-1]}getLengths(t=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const e=[];let i,s=this.getPoint(0),o=0;e.push(0);for(let l=1;l<=t;l++)i=this.getPoint(l/t),o+=i.distanceTo(s),e.push(o),s=i;return this.cacheArcLengths=e,e}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(t,e){const i=this.getLengths();let s=0;const o=i.length;let l;e?l=e:l=t*i[o-1];let u=0,h=o-1,d;for(;u<=h;)if(s=Math.floor(u+(h-u)/2),d=i[s]-l,d<0)u=s+1;else if(d>0)h=s-1;else{h=s;break}if(s=h,i[s]===l)return s/(o-1);const m=i[s],x=i[s+1]-m,v=(l-m)/x;return(s+v)/(o-1)}getTangent(t,e){let s=t-1e-4,o=t+1e-4;s<0&&(s=0),o>1&&(o=1);const l=this.getPoint(s),u=this.getPoint(o),h=e||(l.isVector2?new G:new z);return h.copy(u).sub(l).normalize(),h}getTangentAt(t,e){const i=this.getUtoTmapping(t);return this.getTangent(i,e)}computeFrenetFrames(t,e){const i=new z,s=[],o=[],l=[],u=new z,h=new wt;for(let v=0;v<=t;v++){const w=v/t;s[v]=this.getTangentAt(w,new z)}o[0]=new z,l[0]=new z;let d=Number.MAX_VALUE;const m=Math.abs(s[0].x),y=Math.abs(s[0].y),x=Math.abs(s[0].z);m<=d&&(d=m,i.set(1,0,0)),y<=d&&(d=y,i.set(0,1,0)),x<=d&&i.set(0,0,1),u.crossVectors(s[0],i).normalize(),o[0].crossVectors(s[0],u),l[0].crossVectors(s[0],o[0]);for(let v=1;v<=t;v++){if(o[v]=o[v-1].clone(),l[v]=l[v-1].clone(),u.crossVectors(s[v-1],s[v]),u.length()>Number.EPSILON){u.normalize();const w=Math.acos(yt(s[v-1].dot(s[v]),-1,1));o[v].applyMatrix4(h.makeRotationAxis(u,w))}l[v].crossVectors(s[v],o[v])}if(e===!0){let v=Math.acos(yt(o[0].dot(o[t]),-1,1));v/=t,s[0].dot(u.crossVectors(o[0],o[t]))>0&&(v=-v);for(let w=1;w<=t;w++)o[w].applyMatrix4(h.makeRotationAxis(s[w],v*w)),l[w].crossVectors(s[w],o[w])}return{tangents:s,normals:o,binormals:l}}clone(){return new this.constructor().copy(this)}copy(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}toJSON(){const t={metadata:{version:4.6,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t}fromJSON(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}}class Hc extends Cn{constructor(t=0,e=0,i=1,s=1,o=0,l=Math.PI*2,u=!1,h=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=t,this.aY=e,this.xRadius=i,this.yRadius=s,this.aStartAngle=o,this.aEndAngle=l,this.aClockwise=u,this.aRotation=h}getPoint(t,e=new G){const i=e,s=Math.PI*2;let o=this.aEndAngle-this.aStartAngle;const l=Math.abs(o)<Number.EPSILON;for(;o<0;)o+=s;for(;o>s;)o-=s;o<Number.EPSILON&&(l?o=0:o=s),this.aClockwise===!0&&!l&&(o===s?o=-s:o=o-s);const u=this.aStartAngle+t*o;let h=this.aX+this.xRadius*Math.cos(u),d=this.aY+this.yRadius*Math.sin(u);if(this.aRotation!==0){const m=Math.cos(this.aRotation),y=Math.sin(this.aRotation),x=h-this.aX,v=d-this.aY;h=x*m-v*y+this.aX,d=x*y+v*m+this.aY}return i.set(h,d)}copy(t){return super.copy(t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this}toJSON(){const t=super.toJSON();return t.aX=this.aX,t.aY=this.aY,t.xRadius=this.xRadius,t.yRadius=this.yRadius,t.aStartAngle=this.aStartAngle,t.aEndAngle=this.aEndAngle,t.aClockwise=this.aClockwise,t.aRotation=this.aRotation,t}fromJSON(t){return super.fromJSON(t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this}}class Iv extends Hc{constructor(t,e,i,s,o,l){super(t,e,i,i,s,o,l),this.isArcCurve=!0,this.type="ArcCurve"}}function Gc(){let f=0,t=0,e=0,i=0;function s(o,l,u,h){f=o,t=u,e=-3*o+3*l-2*u-h,i=2*o-2*l+u+h}return{initCatmullRom:function(o,l,u,h,d){s(l,u,d*(u-o),d*(h-l))},initNonuniformCatmullRom:function(o,l,u,h,d,m,y){let x=(l-o)/d-(u-o)/(d+m)+(u-l)/m,v=(u-l)/m-(h-l)/(m+y)+(h-u)/y;x*=m,v*=m,s(l,u,x,v)},calc:function(o){const l=o*o,u=l*o;return f+t*o+e*l+i*u}}}const sl=new z,cc=new Gc,dc=new Gc,fc=new Gc;class Ev extends Cn{constructor(t=[],e=!1,i="centripetal",s=.5){super(),this.isCatmullRomCurve3=!0,this.type="CatmullRomCurve3",this.points=t,this.closed=e,this.curveType=i,this.tension=s}getPoint(t,e=new z){const i=e,s=this.points,o=s.length,l=(o-(this.closed?0:1))*t;let u=Math.floor(l),h=l-u;this.closed?u+=u>0?0:(Math.floor(Math.abs(u)/o)+1)*o:h===0&&u===o-1&&(u=o-2,h=1);let d,m;this.closed||u>0?d=s[(u-1)%o]:(sl.subVectors(s[0],s[1]).add(s[0]),d=sl);const y=s[u%o],x=s[(u+1)%o];if(this.closed||u+2<o?m=s[(u+2)%o]:(sl.subVectors(s[o-1],s[o-2]).add(s[o-1]),m=sl),this.curveType==="centripetal"||this.curveType==="chordal"){const v=this.curveType==="chordal"?.5:.25;let w=Math.pow(d.distanceToSquared(y),v),S=Math.pow(y.distanceToSquared(x),v),_=Math.pow(x.distanceToSquared(m),v);S<1e-4&&(S=1),w<1e-4&&(w=S),_<1e-4&&(_=S),cc.initNonuniformCatmullRom(d.x,y.x,x.x,m.x,w,S,_),dc.initNonuniformCatmullRom(d.y,y.y,x.y,m.y,w,S,_),fc.initNonuniformCatmullRom(d.z,y.z,x.z,m.z,w,S,_)}else this.curveType==="catmullrom"&&(cc.initCatmullRom(d.x,y.x,x.x,m.x,this.tension),dc.initCatmullRom(d.y,y.y,x.y,m.y,this.tension),fc.initCatmullRom(d.z,y.z,x.z,m.z,this.tension));return i.set(cc.calc(h),dc.calc(h),fc.calc(h)),i}copy(t){super.copy(t),this.points=[];for(let e=0,i=t.points.length;e<i;e++){const s=t.points[e];this.points.push(s.clone())}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this}toJSON(){const t=super.toJSON();t.points=[];for(let e=0,i=this.points.length;e<i;e++){const s=this.points[e];t.points.push(s.toArray())}return t.closed=this.closed,t.curveType=this.curveType,t.tension=this.tension,t}fromJSON(t){super.fromJSON(t),this.points=[];for(let e=0,i=t.points.length;e<i;e++){const s=t.points[e];this.points.push(new z().fromArray(s))}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this}}function jm(f,t,e,i,s){const o=(i-t)*.5,l=(s-e)*.5,u=f*f,h=f*u;return(2*e-2*i+o+l)*h+(-3*e+3*i-2*o-l)*u+o*f+e}function Pv(f,t){const e=1-f;return e*e*t}function Fv(f,t){return 2*(1-f)*f*t}function Rv(f,t){return f*f*t}function uo(f,t,e,i){return Pv(f,t)+Fv(f,e)+Rv(f,i)}function Bv(f,t){const e=1-f;return e*e*e*t}function Nv(f,t){const e=1-f;return 3*e*e*f*t}function Ov(f,t){return 3*(1-f)*f*f*t}function Lv(f,t){return f*f*f*t}function ho(f,t,e,i,s){return Bv(f,t)+Nv(f,e)+Ov(f,i)+Lv(f,s)}class Vy extends Cn{constructor(t=new G,e=new G,i=new G,s=new G){super(),this.isCubicBezierCurve=!0,this.type="CubicBezierCurve",this.v0=t,this.v1=e,this.v2=i,this.v3=s}getPoint(t,e=new G){const i=e,s=this.v0,o=this.v1,l=this.v2,u=this.v3;return i.set(ho(t,s.x,o.x,l.x,u.x),ho(t,s.y,o.y,l.y,u.y)),i}copy(t){return super.copy(t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this}toJSON(){const t=super.toJSON();return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this}}class Dv extends Cn{constructor(t=new z,e=new z,i=new z,s=new z){super(),this.isCubicBezierCurve3=!0,this.type="CubicBezierCurve3",this.v0=t,this.v1=e,this.v2=i,this.v3=s}getPoint(t,e=new z){const i=e,s=this.v0,o=this.v1,l=this.v2,u=this.v3;return i.set(ho(t,s.x,o.x,l.x,u.x),ho(t,s.y,o.y,l.y,u.y),ho(t,s.z,o.z,l.z,u.z)),i}copy(t){return super.copy(t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this}toJSON(){const t=super.toJSON();return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this}}class Uy extends Cn{constructor(t=new G,e=new G){super(),this.isLineCurve=!0,this.type="LineCurve",this.v1=t,this.v2=e}getPoint(t,e=new G){const i=e;return t===1?i.copy(this.v2):(i.copy(this.v2).sub(this.v1),i.multiplyScalar(t).add(this.v1)),i}getPointAt(t,e){return this.getPoint(t,e)}getTangent(t,e=new G){return e.subVectors(this.v2,this.v1).normalize()}getTangentAt(t,e){return this.getTangent(t,e)}copy(t){return super.copy(t),this.v1.copy(t.v1),this.v2.copy(t.v2),this}toJSON(){const t=super.toJSON();return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this}}class Vv extends Cn{constructor(t=new z,e=new z){super(),this.isLineCurve3=!0,this.type="LineCurve3",this.v1=t,this.v2=e}getPoint(t,e=new z){const i=e;return t===1?i.copy(this.v2):(i.copy(this.v2).sub(this.v1),i.multiplyScalar(t).add(this.v1)),i}getPointAt(t,e){return this.getPoint(t,e)}getTangent(t,e=new z){return e.subVectors(this.v2,this.v1).normalize()}getTangentAt(t,e){return this.getTangent(t,e)}copy(t){return super.copy(t),this.v1.copy(t.v1),this.v2.copy(t.v2),this}toJSON(){const t=super.toJSON();return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this}}class Wy extends Cn{constructor(t=new G,e=new G,i=new G){super(),this.isQuadraticBezierCurve=!0,this.type="QuadraticBezierCurve",this.v0=t,this.v1=e,this.v2=i}
vendor: 5,097 bytes, line 83
83getPoint(t,e=new G){const i=e,s=this.v0,o=this.v1,l=this.v2;return i.set(uo(t,s.x,o.x,l.x),uo(t,s.y,o.y,l.y)),i}copy(t){return super.copy(t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this}toJSON(){const t=super.toJSON();return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this}}class Hy extends Cn{constructor(t=new z,e=new z,i=new z){super(),this.isQuadraticBezierCurve3=!0,this.type="QuadraticBezierCurve3",this.v0=t,this.v1=e,this.v2=i}getPoint(t,e=new z){const i=e,s=this.v0,o=this.v1,l=this.v2;return i.set(uo(t,s.x,o.x,l.x),uo(t,s.y,o.y,l.y),uo(t,s.z,o.z,l.z)),i}copy(t){return super.copy(t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this}toJSON(){const t=super.toJSON();return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this}}class Gy extends Cn{constructor(t=[]){super(),this.isSplineCurve=!0,this.type="SplineCurve",this.points=t}getPoint(t,e=new G){const i=e,s=this.points,o=(s.length-1)*t,l=Math.floor(o),u=o-l,h=s[l===0?l:l-1],d=s[l],m=s[l>s.length-2?s.length-1:l+1],y=s[l>s.length-3?s.length-1:l+2];return i.set(jm(u,h.x,d.x,m.x,y.x),jm(u,h.y,d.y,m.y,y.y)),i}copy(t){super.copy(t),this.points=[];for(let e=0,i=t.points.length;e<i;e++){const s=t.points[e];this.points.push(s.clone())}return this}toJSON(){const t=super.toJSON();t.points=[];for(let e=0,i=this.points.length;e<i;e++){const s=this.points[e];t.points.push(s.toArray())}return t}fromJSON(t){super.fromJSON(t),this.points=[];for(let e=0,i=t.points.length;e<i;e++){const s=t.points[e];this.points.push(new G().fromArray(s))}return this}}var Al=Object.freeze({__proto__:null,ArcCurve:Iv,CatmullRomCurve3:Ev,CubicBezierCurve:Vy,CubicBezierCurve3:Dv,EllipseCurve:Hc,LineCurve:Uy,LineCurve3:Vv,QuadraticBezierCurve:Wy,QuadraticBezierCurve3:Hy,SplineCurve:Gy});class Uv extends Cn{constructor(){super(),this.type="CurvePath",this.curves=[],this.autoClose=!1}add(t){this.curves.push(t)}closePath(){const t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);if(!t.equals(e)){const i=t.isVector2===!0?"LineCurve":"LineCurve3";this.curves.push(new Al[i](e,t))}return this}getPoint(t,e){const i=t*this.getLength(),s=this.getCurveLengths();let o=0;for(;o<s.length;){if(s[o]>=i){const l=s[o]-i,u=this.curves[o],h=u.getLength(),d=h===0?0:1-l/h;return u.getPointAt(d,e)}o++}return null}getLength(){const t=this.getCurveLengths();return t[t.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 t=[];let e=0;for(let i=0,s=this.curves.length;i<s;i++)e+=this.curves[i].getLength(),t.push(e);return this.cacheLengths=t,t}getSpacedPoints(t=40){const e=[];for(let i=0;i<=t;i++)e.push(this.getPoint(i/t));return this.autoClose&&e.push(e[0]),e}getPoints(t=12){const e=[];let i;for(let s=0,o=this.curves;s<o.length;s++){const l=o[s],u=l.isEllipseCurve?t*2:l.isLineCurve||l.isLineCurve3?1:l.isSplineCurve?t*l.points.length:t,h=l.getPoints(u);for(let d=0;d<h.length;d++){const m=h[d];i&&i.equals(m)||(e.push(m),i=m)}}return this.autoClose&&e.length>1&&!e[e.length-1].equals(e[0])&&e.push(e[0]),e}copy(t){super.copy(t),this.curves=[];for(let e=0,i=t.curves.length;e<i;e++){const s=t.curves[e];this.curves.push(s.clone())}return this.autoClose=t.autoClose,this}toJSON(){const t=super.toJSON();t.autoClose=this.autoClose,t.curves=[];for(let e=0,i=this.curves.length;e<i;e++){const s=this.curves[e];t.curves.push(s.toJSON())}return t}fromJSON(t){super.fromJSON(t),this.autoClose=t.autoClose,this.curves=[];for(let e=0,i=t.curves.length;e<i;e++){const s=t.curves[e];this.curves.push(new Al[s.type]().fromJSON(s))}return this}}class Cl extends Uv{constructor(t){super(),this.type="Path",this.currentPoint=new G,t&&this.setFromPoints(t)}setFromPoints(t){this.moveTo(t[0].x,t[0].y);for(let e=1,i=t.length;e<i;e++)this.lineTo(t[e].x,t[e].y);return this}moveTo(t,e){return this.currentPoint.set(t,e),this}lineTo(t,e){const i=new Uy(this.currentPoint.clone(),new G(t,e));return this.curves.push(i),this.currentPoint.set(t,e),this}quadraticCurveTo(t,e,i,s){const o=new Wy(this.currentPoint.clone(),new G(t,e),new G(i,s));return this.curves.push(o),this.currentPoint.set(i,s),this}bezierCurveTo(t,e,i,s,o,l){const u=new Vy(this.currentPoint.clone(),new G(t,e),new G(i,s),new G(o,l));return this.curves.push(u),this.currentPoint.set(o,l),this}splineThru(t){const e=[this.currentPoint.clone()].concat(t),i=new Gy(e);return this.curves.push(i),this.currentPoint.copy(t[t.length-1]),this}arc(t,e,i,s,o,l){const u=this.currentPoint.x,h=this.currentPoint.y;return this.absarc(t+u,e+h,i,s,o,l),this}absarc(t,e,i,s,o,l){return this.absellipse(t,e,i,i,s,o,l),this}ellipse(t,e,i,s,o,l,u,h){const d=this.currentPoint.x,m=this.currentPoint.y;return this.absellipse(t+d,e+m,i,s,o,l,u,h),this}
vendor: 72,237 bytes, line 83
83absellipse(t,e,i,s,o,l,u,h){const d=new Hc(t,e,i,s,o,l,u,h);if(this.curves.length>0){const y=d.getPoint(0);y.equals(this.currentPoint)||this.lineTo(y.x,y.y)}this.curves.push(d);const m=d.getPoint(1);return this.currentPoint.copy(m),this}copy(t){return super.copy(t),this.currentPoint.copy(t.currentPoint),this}toJSON(){const t=super.toJSON();return t.currentPoint=this.currentPoint.toArray(),t}fromJSON(t){return super.fromJSON(t),this.currentPoint.fromArray(t.currentPoint),this}}class Nl extends St{constructor(t=[new G(0,-.5),new G(.5,0),new G(0,.5)],e=12,i=0,s=Math.PI*2){super(),this.type="LatheGeometry",this.parameters={points:t,segments:e,phiStart:i,phiLength:s},e=Math.floor(e),s=yt(s,0,Math.PI*2);const o=[],l=[],u=[],h=[],d=[],m=1/e,y=new z,x=new G,v=new z,w=new z,S=new z;let _=0,b=0;for(let A=0;A<=t.length-1;A++)switch(A){case 0:_=t[A+1].x-t[A].x,b=t[A+1].y-t[A].y,v.x=b*1,v.y=-_,v.z=b*0,S.copy(v),v.normalize(),h.push(v.x,v.y,v.z);break;case t.length-1:h.push(S.x,S.y,S.z);break;default:_=t[A+1].x-t[A].x,b=t[A+1].y-t[A].y,v.x=b*1,v.y=-_,v.z=b*0,w.copy(v),v.x+=S.x,v.y+=S.y,v.z+=S.z,v.normalize(),h.push(v.x,v.y,v.z),S.copy(w)}for(let A=0;A<=e;A++){const C=i+A*m*s,k=Math.sin(C),N=Math.cos(C);for(let B=0;B<=t.length-1;B++){y.x=t[B].x*k,y.y=t[B].y,y.z=t[B].x*N,l.push(y.x,y.y,y.z),x.x=A/e,x.y=B/(t.length-1),u.push(x.x,x.y);const D=h[3*B+0]*k,L=h[3*B+1],q=h[3*B+0]*N;d.push(D,L,q)}}for(let A=0;A<e;A++)for(let C=0;C<t.length-1;C++){const k=C+A*t.length,N=k,B=k+t.length,D=k+t.length+1,L=k+1;o.push(N,B,L),o.push(D,L,B)}this.setIndex(o),this.setAttribute("position",new at(l,3)),this.setAttribute("uv",new at(u,2)),this.setAttribute("normal",new at(d,3))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new Nl(t.points,t.segments,t.phiStart,t.phiLength)}}class qc extends Nl{constructor(t=1,e=1,i=4,s=8){const o=new Cl;o.absarc(0,-e/2,t,Math.PI*1.5,0),o.absarc(0,e/2,t,0,Math.PI*.5),super(o.getPoints(i),s),this.type="CapsuleGeometry",this.parameters={radius:t,length:e,capSegments:i,radialSegments:s}}static fromJSON(t){return new qc(t.radius,t.length,t.capSegments,t.radialSegments)}}class Xc extends St{constructor(t=1,e=32,i=0,s=Math.PI*2){super(),this.type="CircleGeometry",this.parameters={radius:t,segments:e,thetaStart:i,thetaLength:s},e=Math.max(3,e);const o=[],l=[],u=[],h=[],d=new z,m=new G;l.push(0,0,0),u.push(0,0,1),h.push(.5,.5);for(let y=0,x=3;y<=e;y++,x+=3){const v=i+y/e*s;d.x=t*Math.cos(v),d.y=t*Math.sin(v),l.push(d.x,d.y,d.z),u.push(0,0,1),m.x=(l[x]/t+1)/2,m.y=(l[x+1]/t+1)/2,h.push(m.x,m.y)}for(let y=1;y<=e;y++)o.push(y,y+1,0);this.setIndex(o),this.setAttribute("position",new at(l,3)),this.setAttribute("normal",new at(u,3)),this.setAttribute("uv",new at(h,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new Xc(t.radius,t.segments,t.thetaStart,t.thetaLength)}}class vo extends St{constructor(t=1,e=1,i=1,s=32,o=1,l=!1,u=0,h=Math.PI*2){super(),this.type="CylinderGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:i,radialSegments:s,heightSegments:o,openEnded:l,thetaStart:u,thetaLength:h};const d=this;s=Math.floor(s),o=Math.floor(o);const m=[],y=[],x=[],v=[];let w=0;const S=[],_=i/2;let b=0;A(),l===!1&&(t>0&&C(!0),e>0&&C(!1)),this.setIndex(m),this.setAttribute("position",new at(y,3)),this.setAttribute("normal",new at(x,3)),this.setAttribute("uv",new at(v,2));function A(){const k=new z,N=new z;let B=0;const D=(e-t)/i;for(let L=0;L<=o;L++){const q=[],J=L/o,it=J*(e-t)+t;for(let ct=0;ct<=s;ct++){const ht=ct/s,mt=ht*h+u,kt=Math.sin(mt),_t=Math.cos(mt);N.x=it*kt,N.y=-J*i+_,N.z=it*_t,y.push(N.x,N.y,N.z),k.set(kt,D,_t).normalize(),x.push(k.x,k.y,k.z),v.push(ht,1-J),q.push(w++)}S.push(q)}for(let L=0;L<s;L++)for(let q=0;q<o;q++){const J=S[q][L],it=S[q+1][L],ct=S[q+1][L+1],ht=S[q][L+1];(t>0||q!==0)&&(m.push(J,it,ht),B+=3),(e>0||q!==o-1)&&(m.push(it,ct,ht),B+=3)}d.addGroup(b,B,0),b+=B}function C(k){const N=w,B=new G,D=new z;let L=0;const q=k===!0?t:e,J=k===!0?1:-1;for(let ct=1;ct<=s;ct++)y.push(0,_*J,0),x.push(0,J,0),v.push(.5,.5),w++;const it=w;for(let ct=0;ct<=s;ct++){const mt=ct/s*h+u,kt=Math.cos(mt),_t=Math.sin(mt);D.x=q*_t,D.y=_*J,D.z=q*kt,y.push(D.x,D.y,D.z),x.push(0,J,0),B.x=kt*.5+.5,B.y=_t*.5*J+.5,v.push(B.x,B.y),w++}for(let ct=0;ct<s;ct++){const ht=N+ct,mt=it+ct;k===!0?m.push(mt,mt+1,ht):m.push(mt+1,mt,ht),L+=3}d.addGroup(b,L,k===!0?1:2),b+=L}}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new vo(t.radiusTop,t.radiusBottom,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class Yc extends vo{constructor(t=1,e=1,i=32,s=1,o=!1,l=0,u=Math.PI*2){super(0,t,e,i,s,o,l,u),this.type="ConeGeometry",this.parameters={radius:t,height:e,radialSegments:i,heightSegments:s,openEnded:o,thetaStart:l,thetaLength:u}}static fromJSON(t){return new Yc(t.radius,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class es extends St{constructor(t=[],e=[],i=1,s=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:t,indices:e,radius:i,detail:s};const o=[],l=[];u(s),d(i),m(),this.setAttribute("position",new at(o,3)),this.setAttribute("normal",new at(o.slice(),3)),this.setAttribute("uv",new at(l,2)),s===0?this.computeVertexNormals():this.normalizeNormals();function u(A){const C=new z,k=new z,N=new z;for(let B=0;B<e.length;B+=3)v(e[B+0],C),v(e[B+1],k),v(e[B+2],N),h(C,k,N,A)}function h(A,C,k,N){const B=N+1,D=[];for(let L=0;L<=B;L++){D[L]=[];const q=A.clone().lerp(k,L/B),J=C.clone().lerp(k,L/B),it=B-L;for(let ct=0;ct<=it;ct++)ct===0&&L===B?D[L][ct]=q:D[L][ct]=q.clone().lerp(J,ct/it)}for(let L=0;L<B;L++)for(let q=0;q<2*(B-L)-1;q++){const J=Math.floor(q/2);q%2===0?(x(D[L][J+1]),x(D[L+1][J]),x(D[L][J])):(x(D[L][J+1]),x(D[L+1][J+1]),x(D[L+1][J]))}}function d(A){const C=new z;for(let k=0;k<o.length;k+=3)C.x=o[k+0],C.y=o[k+1],C.z=o[k+2],C.normalize().multiplyScalar(A),o[k+0]=C.x,o[k+1]=C.y,o[k+2]=C.z}function m(){const A=new z;for(let C=0;C<o.length;C+=3){A.x=o[C+0],A.y=o[C+1],A.z=o[C+2];const k=_(A)/2/Math.PI+.5,N=b(A)/Math.PI+.5;l.push(k,1-N)}w(),y()}function y(){for(let A=0;A<l.length;A+=6){const C=l[A+0],k=l[A+2],N=l[A+4],B=Math.max(C,k,N),D=Math.min(C,k,N);B>.9&&D<.1&&(C<.2&&(l[A+0]+=1),k<.2&&(l[A+2]+=1),N<.2&&(l[A+4]+=1))}}function x(A){o.push(A.x,A.y,A.z)}function v(A,C){const k=A*3;C.x=t[k+0],C.y=t[k+1],C.z=t[k+2]}function w(){const A=new z,C=new z,k=new z,N=new z,B=new G,D=new G,L=new G;for(let q=0,J=0;q<o.length;q+=9,J+=6){A.set(o[q+0],o[q+1],o[q+2]),C.set(o[q+3],o[q+4],o[q+5]),k.set(o[q+6],o[q+7],o[q+8]),B.set(l[J+0],l[J+1]),D.set(l[J+2],l[J+3]),L.set(l[J+4],l[J+5]),N.copy(A).add(C).add(k).divideScalar(3);const it=_(N);S(B,J+0,A,it),S(D,J+2,C,it),S(L,J+4,k,it)}}function S(A,C,k,N){N<0&&A.x===1&&(l[C]=A.x-1),k.x===0&&k.z===0&&(l[C]=N/2/Math.PI+.5)}function _(A){return Math.atan2(A.z,-A.x)}function b(A){return Math.atan2(-A.y,Math.sqrt(A.x*A.x+A.z*A.z))}}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new es(t.vertices,t.indices,t.radius,t.details)}}class Zc extends es{constructor(t=1,e=0){const i=(1+Math.sqrt(5))/2,s=1/i,o=[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-s,-i,0,-s,i,0,s,-i,0,s,i,-s,-i,0,-s,i,0,s,-i,0,s,i,0,-i,0,-s,i,0,-s,-i,0,s,i,0,s],l=[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9];super(o,l,t,e),this.type="DodecahedronGeometry",this.parameters={radius:t,detail:e}}static fromJSON(t){return new Zc(t.radius,t.detail)}}const rl=new z,ol=new z,pc=new z,al=new Ge;class Wv extends St{constructor(t=null,e=1){if(super(),this.type="EdgesGeometry",this.parameters={geometry:t,thresholdAngle:e},t!==null){const s=Math.pow(10,4),o=Math.cos(Qi*e),l=t.getIndex(),u=t.getAttribute("position"),h=l?l.count:u.count,d=[0,0,0],m=["a","b","c"],y=new Array(3),x={},v=[];for(let w=0;w<h;w+=3){l?(d[0]=l.getX(w),d[1]=l.getX(w+1),d[2]=l.getX(w+2)):(d[0]=w,d[1]=w+1,d[2]=w+2);const{a:S,b:_,c:b}=al;if(S.fromBufferAttribute(u,d[0]),_.fromBufferAttribute(u,d[1]),b.fromBufferAttribute(u,d[2]),al.getNormal(pc),y[0]=`${Math.round(S.x*s)},${Math.round(S.y*s)},${Math.round(S.z*s)}`,y[1]=`${Math.round(_.x*s)},${Math.round(_.y*s)},${Math.round(_.z*s)}`,y[2]=`${Math.round(b.x*s)},${Math.round(b.y*s)},${Math.round(b.z*s)}`,!(y[0]===y[1]||y[1]===y[2]||y[2]===y[0]))for(let A=0;A<3;A++){const C=(A+1)%3,k=y[A],N=y[C],B=al[m[A]],D=al[m[C]],L=`${k}_${N}`,q=`${N}_${k}`;q in x&&x[q]?(pc.dot(x[q].normal)<=o&&(v.push(B.x,B.y,B.z),v.push(D.x,D.y,D.z)),x[q]=null):L in x||(x[L]={index0:d[A],index1:d[C],normal:pc.clone()})}}for(const w in x)if(x[w]){const{index0:S,index1:_}=x[w];rl.fromBufferAttribute(u,S),ol.fromBufferAttribute(u,_),v.push(rl.x,rl.y,rl.z),v.push(ol.x,ol.y,ol.z)}this.setAttribute("position",new at(v,3))}}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}}class er extends Cl{constructor(t){super(t),this.uuid=qe(),this.type="Shape",this.holes=[]}getPointsHoles(t){const e=[];for(let i=0,s=this.holes.length;i<s;i++)e[i]=this.holes[i].getPoints(t);return e}extractPoints(t){return{shape:this.getPoints(t),holes:this.getPointsHoles(t)}}copy(t){super.copy(t),this.holes=[];for(let e=0,i=t.holes.length;e<i;e++){const s=t.holes[e];this.holes.push(s.clone())}return this}toJSON(){const t=super.toJSON();t.uuid=this.uuid,t.holes=[];for(let e=0,i=this.holes.length;e<i;e++){const s=this.holes[e];t.holes.push(s.toJSON())}return t}fromJSON(t){super.fromJSON(t),this.uuid=t.uuid,this.holes=[];for(let e=0,i=t.holes.length;e<i;e++){const s=t.holes[e];this.holes.push(new Cl().fromJSON(s))}return this}}const Hv={triangulate:function(f,t,e=2){const i=t&&t.length,s=i?t[0]*e:f.length;let o=qy(f,0,s,e,!0);const l=[];if(!o||o.next===o.prev)return l;let u,h,d,m,y,x,v;if(i&&(o=Zv(f,t,o,e)),f.length>80*e){u=d=f[0],h=m=f[1];for(let w=e;w<s;w+=e)y=f[w],x=f[w+1],y<u&&(u=y),x<h&&(h=x),y>d&&(d=y),x>m&&(m=x);v=Math.max(d-u,m-h),v=v!==0?32767/v:0}return mo(o,l,e,u,h,v,0),l}};function qy(f,t,e,i,s){let o,l;if(s===rw(f,t,e,i)>0)for(o=t;o<e;o+=i)l=Qm(o,f[o],f[o+1],l);else for(o=e-i;o>=t;o-=i)l=Qm(o,f[o],f[o+1],l);return l&&Ol(l,l.next)&&(go(l),l=l.next),l}function ts(f,t){if(!f)return f;t||(t=f);let e=f,i;do if(i=!1,!e.steiner&&(Ol(e,e.next)||Yt(e.prev,e,e.next)===0)){if(go(e),e=t=e.prev,e===e.next)break;i=!0}else e=e.next;while(i||e!==t);return t}function mo(f,t,e,i,s,o,l){if(!f)return;!l&&o&&Kv(f,i,s,o);let u=f,h,d;for(;f.prev!==f.next;){if(h=f.prev,d=f.next,o?qv(f,i,s,o):Gv(f)){t.push(h.i/e|0),t.push(f.i/e|0),t.push(d.i/e|0),go(f),f=d.next,u=d.next;continue}if(f=d,f===u){l?l===1?(f=Xv(ts(f),t,e),mo(f,t,e,i,s,o,2)):l===2&&Yv(f,t,e,i,s,o):mo(ts(f),t,e,i,s,o,1);break}}}function Gv(f){const t=f.prev,e=f,i=f.next;if(Yt(t,e,i)>=0)return!1;const s=t.x,o=e.x,l=i.x,u=t.y,h=e.y,d=i.y,m=s<o?s<l?s:l:o<l?o:l,y=u<h?u<d?u:d:h<d?h:d,x=s>o?s>l?s:l:o>l?o:l,v=u>h?u>d?u:d:h>d?h:d;let w=i.next;for(;w!==t;){if(w.x>=m&&w.x<=x&&w.y>=y&&w.y<=v&&Ks(s,u,o,h,l,d,w.x,w.y)&&Yt(w.prev,w,w.next)>=0)return!1;w=w.next}return!0}function qv(f,t,e,i){const s=f.prev,o=f,l=f.next;if(Yt(s,o,l)>=0)return!1;const u=s.x,h=o.x,d=l.x,m=s.y,y=o.y,x=l.y,v=u<h?u<d?u:d:h<d?h:d,w=m<y?m<x?m:x:y<x?y:x,S=u>h?u>d?u:d:h>d?h:d,_=m>y?m>x?m:x:y>x?y:x,b=bc(v,w,t,e,i),A=bc(S,_,t,e,i);let C=f.prevZ,k=f.nextZ;for(;C&&C.z>=b&&k&&k.z<=A;){if(C.x>=v&&C.x<=S&&C.y>=w&&C.y<=_&&C!==s&&C!==l&&Ks(u,m,h,y,d,x,C.x,C.y)&&Yt(C.prev,C,C.next)>=0||(C=C.prevZ,k.x>=v&&k.x<=S&&k.y>=w&&k.y<=_&&k!==s&&k!==l&&Ks(u,m,h,y,d,x,k.x,k.y)&&Yt(k.prev,k,k.next)>=0))return!1;k=k.nextZ}for(;C&&C.z>=b;){if(C.x>=v&&C.x<=S&&C.y>=w&&C.y<=_&&C!==s&&C!==l&&Ks(u,m,h,y,d,x,C.x,C.y)&&Yt(C.prev,C,C.next)>=0)return!1;C=C.prevZ}for(;k&&k.z<=A;){if(k.x>=v&&k.x<=S&&k.y>=w&&k.y<=_&&k!==s&&k!==l&&Ks(u,m,h,y,d,x,k.x,k.y)&&Yt(k.prev,k,k.next)>=0)return!1;k=k.nextZ}return!0}function Xv(f,t,e){let i=f;do{const s=i.prev,o=i.next.next;!Ol(s,o)&&Xy(s,i,i.next,o)&&yo(s,o)&&yo(o,s)&&(t.push(s.i/e|0),t.push(i.i/e|0),t.push(o.i/e|0),go(i),go(i.next),i=f=o),i=i.next}while(i!==f);return ts(i)}function Yv(f,t,e,i,s,o){let l=f;do{let u=l.next.next;for(;u!==l.prev;){if(l.i!==u.i&&nw(l,u)){let h=Yy(l,u);l=ts(l,l.next),h=ts(h,h.next),mo(l,t,e,i,s,o,0),mo(h,t,e,i,s,o,0);return}u=u.next}l=l.next}while(l!==f)}function Zv(f,t,e,i){const s=[];let o,l,u,h,d;for(o=0,l=t.length;o<l;o++)u=t[o]*i,h=o<l-1?t[o+1]*i:f.length,d=qy(f,u,h,i,!1),d===d.next&&(d.steiner=!0),s.push(ew(d));for(s.sort(Jv),o=0;o<s.length;o++)e=$v(s[o],e);return e}function Jv(f,t){return f.x-t.x}function $v(f,t){const e=jv(f,t);if(!e)return t;const i=Yy(e,f);return ts(i,i.next),ts(e,e.next)}function jv(f,t){let e=t,i=-1/0,s;const o=f.x,l=f.y;do{if(l<=e.y&&l>=e.next.y&&e.next.y!==e.y){const x=e.x+(l-e.y)*(e.next.x-e.x)/(e.next.y-e.y);if(x<=o&&x>i&&(i=x,s=e.x<e.next.x?e:e.next,x===o))return s}e=e.next}while(e!==t);if(!s)return null;const u=s,h=s.x,d=s.y;let m=1/0,y;e=s;do o>=e.x&&e.x>=h&&o!==e.x&&Ks(l<d?o:i,l,h,d,l<d?i:o,l,e.x,e.y)&&(y=Math.abs(l-e.y)/(o-e.x),yo(e,f)&&(y<m||y===m&&(e.x>s.x||e.x===s.x&&Qv(s,e)))&&(s=e,m=y)),e=e.next;while(e!==u);return s}function Qv(f,t){return Yt(f.prev,f,t.prev)<0&&Yt(t.next,f,f.next)<0}function Kv(f,t,e,i){let s=f;do s.z===0&&(s.z=bc(s.x,s.y,t,e,i)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next;while(s!==f);s.prevZ.nextZ=null,s.prevZ=null,tw(s)}function tw(f){let t,e,i,s,o,l,u,h,d=1;do{for(e=f,f=null,o=null,l=0;e;){for(l++,i=e,u=0,t=0;t<d&&(u++,i=i.nextZ,!!i);t++);for(h=d;u>0||h>0&&i;)u!==0&&(h===0||!i||e.z<=i.z)?(s=e,e=e.nextZ,u--):(s=i,i=i.nextZ,h--),o?o.nextZ=s:f=s,s.prevZ=o,o=s;e=i}o.nextZ=null,d*=2}while(l>1);return f}function bc(f,t,e,i,s){return f=(f-e)*s|0,t=(t-i)*s|0,f=(f|f<<8)&16711935,f=(f|f<<4)&252645135,f=(f|f<<2)&858993459,f=(f|f<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,f|t<<1}function ew(f){let t=f,e=f;do(t.x<e.x||t.x===e.x&&t.y<e.y)&&(e=t),t=t.next;while(t!==f);return e}function Ks(f,t,e,i,s,o,l,u){return(s-l)*(t-u)>=(f-l)*(o-u)&&(f-l)*(i-u)>=(e-l)*(t-u)&&(e-l)*(o-u)>=(s-l)*(i-u)}function nw(f,t){return f.next.i!==t.i&&f.prev.i!==t.i&&!iw(f,t)&&(yo(f,t)&&yo(t,f)&&sw(f,t)&&(Yt(f.prev,f,t.prev)||Yt(f,t.prev,t))||Ol(f,t)&&Yt(f.prev,f,f.next)>0&&Yt(t.prev,t,t.next)>0)}function Yt(f,t,e){return(t.y-f.y)*(e.x-t.x)-(t.x-f.x)*(e.y-t.y)}function Ol(f,t){return f.x===t.x&&f.y===t.y}function Xy(f,t,e,i){const s=ul(Yt(f,t,e)),o=ul(Yt(f,t,i)),l=ul(Yt(e,i,f)),u=ul(Yt(e,i,t));return!!(s!==o&&l!==u||s===0&&ll(f,e,t)||o===0&&ll(f,i,t)||l===0&&ll(e,f,i)||u===0&&ll(e,t,i))}function ll(f,t,e){return t.x<=Math.max(f.x,e.x)&&t.x>=Math.min(f.x,e.x)&&t.y<=Math.max(f.y,e.y)&&t.y>=Math.min(f.y,e.y)}function ul(f){return f>0?1:f<0?-1:0}function iw(f,t){let e=f;do{if(e.i!==f.i&&e.next.i!==f.i&&e.i!==t.i&&e.next.i!==t.i&&Xy(e,e.next,f,t))return!0;e=e.next}while(e!==f);return!1}function yo(f,t){return Yt(f.prev,f,f.next)<0?Yt(f,t,f.next)>=0&&Yt(f,f.prev,t)>=0:Yt(f,t,f.prev)<0||Yt(f,f.next,t)<0}function sw(f,t){let e=f,i=!1;const s=(f.x+t.x)/2,o=(f.y+t.y)/2;do e.y>o!=e.next.y>o&&e.next.y!==e.y&&s<(e.next.x-e.x)*(o-e.y)/(e.next.y-e.y)+e.x&&(i=!i),e=e.next;while(e!==f);return i}function Yy(f,t){const e=new Ac(f.i,f.x,f.y),i=new Ac(t.i,t.x,t.y),s=f.next,o=t.prev;return f.next=t,t.prev=f,e.next=s,s.prev=e,i.next=e,e.prev=i,o.next=i,i.prev=o,i}function Qm(f,t,e,i){const s=new Ac(f,t,e);return i?(s.next=i.next,s.prev=i,i.next.prev=s,i.next=s):(s.prev=s,s.next=s),s}function go(f){f.next.prev=f.prev,f.prev.next=f.next,f.prevZ&&(f.prevZ.nextZ=f.nextZ),f.nextZ&&(f.nextZ.prevZ=f.prevZ)}function Ac(f,t,e){this.i=f,this.x=t,this.y=e,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function rw(f,t,e,i){let s=0;for(let o=t,l=e-i;o<e;o+=i)s+=(f[l]-f[o])*(f[o+1]+f[l+1]),l=o;return s}class Yn{static area(t){const e=t.length;let i=0;for(let s=e-1,o=0;o<e;s=o++)i+=t[s].x*t[o].y-t[o].x*t[s].y;return i*.5}static isClockWise(t){return Yn.area(t)<0}static triangulateShape(t,e){const i=[],s=[],o=[];Km(t),ty(i,t);let l=t.length;e.forEach(Km);for(let h=0;h<e.length;h++)s.push(l),l+=e[h].length,ty(i,e[h]);const u=Hv.triangulate(i,s);for(let h=0;h<u.length;h+=3)o.push(u.slice(h,h+3));return o}}function Km(f){const t=f.length;t>2&&f[t-1].equals(f[0])&&f.pop()}function ty(f,t){for(let e=0;e<t.length;e++)f.push(t[e].x),f.push(t[e].y)}class Jc extends St{constructor(t=new er([new G(.5,.5),new G(-.5,.5),new G(-.5,-.5),new G(.5,-.5)]),e={}){super(),this.type="ExtrudeGeometry",this.parameters={shapes:t,options:e},t=Array.isArray(t)?t:[t];const i=this,s=[],o=[];for(let u=0,h=t.length;u<h;u++){const d=t[u];l(d)}this.setAttribute("position",new at(s,3)),this.setAttribute("uv",new at(o,2)),this.computeVertexNormals();function l(u){const h=[],d=e.curveSegments!==void 0?e.curveSegments:12,m=e.steps!==void 0?e.steps:1,y=e.depth!==void 0?e.depth:1;let x=e.bevelEnabled!==void 0?e.bevelEnabled:!0,v=e.bevelThickness!==void 0?e.bevelThickness:.2,w=e.bevelSize!==void 0?e.bevelSize:v-.1,S=e.bevelOffset!==void 0?e.bevelOffset:0,_=e.bevelSegments!==void 0?e.bevelSegments:3;const b=e.extrudePath,A=e.UVGenerator!==void 0?e.UVGenerator:ow;let C,k=!1,N,B,D,L;b&&(C=b.getSpacedPoints(m),k=!0,x=!1,N=b.computeFrenetFrames(m,!1),B=new z,D=new z,L=new z),x||(_=0,v=0,w=0,S=0);const q=u.extractPoints(d);let J=q.shape;const it=q.holes;if(!Yn.isClockWise(J)){J=J.reverse();for(let $=0,K=it.length;$<K;$++){const tt=it[$];Yn.isClockWise(tt)&&(it[$]=tt.reverse())}}const ht=Yn.triangulateShape(J,it),mt=J;for(let $=0,K=it.length;$<K;$++){const tt=it[$];J=J.concat(tt)}function kt($,K,tt){return K||console.error("THREE.ExtrudeGeometry: vec does not exist"),$.clone().addScaledVector(K,tt)}const _t=J.length,Ct=ht.length;function Z($,K,tt){let ft,rt,It;const Pt=$.x-K.x,Lt=$.y-K.y,jt=tt.x-$.x,Wt=tt.y-$.y,kn=Pt*Pt+Lt*Lt,is=Pt*Wt-Lt*jt;if(Math.abs(is)>Number.EPSILON){const Ze=Math.sqrt(kn),lr=Math.sqrt(jt*jt+Wt*Wt),ur=K.x-Lt/Ze,ss=K.y+Pt/Ze,rs=tt.x-Wt/lr,wo=tt.y+jt/lr,Jn=((rs-ur)*Wt-(wo-ss)*jt)/(Pt*Wt-Lt*jt);ft=ur+Pt*Jn-$.x,rt=ss+Lt*Jn-$.y;const $n=ft*ft+rt*rt;if($n<=2)return new G(ft,rt);It=Math.sqrt($n/2)}else{let Ze=!1;Pt>Number.EPSILON?jt>Number.EPSILON&&(Ze=!0):Pt<-Number.EPSILON?jt<-Number.EPSILON&&(Ze=!0):Math.sign(Lt)===Math.sign(Wt)&&(Ze=!0),Ze?(ft=-Lt,rt=Pt,It=Math.sqrt(kn)):(ft=Pt,rt=Lt,It=Math.sqrt(kn/2))}return new G(ft/It,rt/It)}const j=[];for(let $=0,K=mt.length,tt=K-1,ft=$+1;$<K;$++,tt++,ft++)tt===K&&(tt=0),ft===K&&(ft=0),j[$]=Z(mt[$],mt[tt],mt[ft]);const Y=[];let P,V=j.concat();for(let $=0,K=it.length;$<K;$++){const tt=it[$];P=[];for(let ft=0,rt=tt.length,It=rt-1,Pt=ft+1;ft<rt;ft++,It++,Pt++)It===rt&&(It=0),Pt===rt&&(Pt=0),P[ft]=Z(tt[ft],tt[It],tt[Pt]);Y.push(P),V=V.concat(P)}for(let $=0;$<_;$++){const K=$/_,tt=v*Math.cos(K*Math.PI/2),ft=w*Math.sin(K*Math.PI/2)+S;for(let rt=0,It=mt.length;rt<It;rt++){const Pt=kt(mt[rt],j[rt],ft);At(Pt.x,Pt.y,-tt)}for(let rt=0,It=it.length;rt<It;rt++){const Pt=it[rt];P=Y[rt];for(let Lt=0,jt=Pt.length;Lt<jt;Lt++){const Wt=kt(Pt[Lt],P[Lt],ft);At(Wt.x,Wt.y,-tt)}}}const dt=w+S;for(let $=0;$<_t;$++){const K=x?kt(J[$],V[$],dt):J[$];k?(D.copy(N.normals[0]).multiplyScalar(K.x),B.copy(N.binormals[0]).multiplyScalar(K.y),L.copy(C[0]).add(D).add(B),At(L.x,L.y,L.z)):At(K.x,K.y,0)}for(let $=1;$<=m;$++)for(let K=0;K<_t;K++){const tt=x?kt(J[K],V[K],dt):J[K];k?(D.copy(N.normals[$]).multiplyScalar(tt.x),B.copy(N.binormals[$]).multiplyScalar(tt.y),L.copy(C[$]).add(D).add(B),At(L.x,L.y,L.z)):At(tt.x,tt.y,y/m*$)}for(let $=_-1;$>=0;$--){const K=$/_,tt=v*Math.cos(K*Math.PI/2),ft=w*Math.sin(K*Math.PI/2)+S;for(let rt=0,It=mt.length;rt<It;rt++){const Pt=kt(mt[rt],j[rt],ft);At(Pt.x,Pt.y,y+tt)}for(let rt=0,It=it.length;rt<It;rt++){const Pt=it[rt];P=Y[rt];for(let Lt=0,jt=Pt.length;Lt<jt;Lt++){const Wt=kt(Pt[Lt],P[Lt],ft);k?At(Wt.x,Wt.y+C[m-1].y,C[m-1].x+tt):At(Wt.x,Wt.y,y+tt)}}}vt(),bt();function vt(){const $=s.length/3;if(x){let K=0,tt=_t*K;for(let ft=0;ft<Ct;ft++){const rt=ht[ft];zt(rt[2]+tt,rt[1]+tt,rt[0]+tt)}K=m+_*2,tt=_t*K;for(let ft=0;ft<Ct;ft++){const rt=ht[ft];zt(rt[0]+tt,rt[1]+tt,rt[2]+tt)}}else{for(let K=0;K<Ct;K++){const tt=ht[K];zt(tt[2],tt[1],tt[0])}for(let K=0;K<Ct;K++){const tt=ht[K];zt(tt[0]+_t*m,tt[1]+_t*m,tt[2]+_t*m)}}i.addGroup($,s.length/3-$,0)}function bt(){const $=s.length/3;let K=0;Tt(mt,K),K+=mt.length;for(let tt=0,ft=it.length;tt<ft;tt++){const rt=it[tt];Tt(rt,K),K+=rt.length}i.addGroup($,s.length/3-$,1)}function Tt($,K){let tt=$.length;for(;--tt>=0;){const ft=tt;let rt=tt-1;rt<0&&(rt=$.length-1);for(let It=0,Pt=m+_*2;It<Pt;It++){const Lt=_t*It,jt=_t*(It+1),Wt=K+ft+Lt,kn=K+rt+Lt,is=K+rt+jt,Ze=K+ft+jt;Ot(Wt,kn,is,Ze)}}}function At($,K,tt){h.push($),h.push(K),h.push(tt)}function zt($,K,tt){Gt($),Gt(K),Gt(tt);const ft=s.length/3,rt=A.generateTopUV(i,s,ft-3,ft-2,ft-1);Ce(rt[0]),Ce(rt[1]),Ce(rt[2])}function Ot($,K,tt,ft){Gt($),Gt(K),Gt(ft),Gt(K),Gt(tt),Gt(ft);const rt=s.length/3,It=A.generateSideWallUV(i,s,rt-6,rt-3,rt-2,rt-1);Ce(It[0]),Ce(It[1]),Ce(It[3]),Ce(It[1]),Ce(It[2]),Ce(It[3])}function Gt($){s.push(h[$*3+0]),s.push(h[$*3+1]),s.push(h[$*3+2])}function Ce($){o.push($.x),o.push($.y)}}}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}toJSON(){const t=super.toJSON(),e=this.parameters.shapes,i=this.parameters.options;return aw(e,i,t)}static fromJSON(t,e){const i=[];for(let o=0,l=t.shapes.length;o<l;o++){const u=e[t.shapes[o]];i.push(u)}const s=t.options.extrudePath;return s!==void 0&&(t.options.extrudePath=new Al[s.type]().fromJSON(s)),new Jc(i,t.options)}}const ow={generateTopUV:function(f,t,e,i,s){const o=t[e*3],l=t[e*3+1],u=t[i*3],h=t[i*3+1],d=t[s*3],m=t[s*3+1];return[new G(o,l),new G(u,h),new G(d,m)]},generateSideWallUV:function(f,t,e,i,s,o){const l=t[e*3],u=t[e*3+1],h=t[e*3+2],d=t[i*3],m=t[i*3+1],y=t[i*3+2],x=t[s*3],v=t[s*3+1],w=t[s*3+2],S=t[o*3],_=t[o*3+1],b=t[o*3+2];return Math.abs(u-m)<Math.abs(l-d)?[new G(l,1-h),new G(d,1-y),new G(x,1-w),new G(S,1-b)]:[new G(u,1-h),new G(m,1-y),new G(v,1-w),new G(_,1-b)]}};function aw(f,t,e){if(e.shapes=[],Array.isArray(f))for(let i=0,s=f.length;i<s;i++){const o=f[i];e.shapes.push(o.uuid)}else e.shapes.push(f.uuid);return e.options=Object.assign({},t),t.extrudePath!==void 0&&(e.options.extrudePath=t.extrudePath.toJSON()),e}class $c extends es{constructor(t=1,e=0){const i=(1+Math.sqrt(5))/2,s=[-1,i,0,1,i,0,-1,-i,0,1,-i,0,0,-1,i,0,1,i,0,-1,-i,0,1,-i,i,0,-1,i,0,1,-i,0,-1,-i,0,1],o=[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1];super(s,o,t,e),this.type="IcosahedronGeometry",this.parameters={radius:t,detail:e}}static fromJSON(t){return new $c(t.radius,t.detail)}}class Ll extends es{constructor(t=1,e=0){const i=[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],s=[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2];super(i,s,t,e),this.type="OctahedronGeometry",this.parameters={radius:t,detail:e}}static fromJSON(t){return new Ll(t.radius,t.detail)}}class jc extends St{constructor(t=1,e=1,i=1,s=1){super(),this.type="PlaneGeometry",this.parameters={width:t,height:e,widthSegments:i,heightSegments:s};const o=t/2,l=e/2,u=Math.floor(i),h=Math.floor(s),d=u+1,m=h+1,y=t/u,x=e/h,v=[],w=[],S=[],_=[];for(let b=0;b<m;b++){const A=b*x-l;for(let C=0;C<d;C++){const k=C*y-o;w.push(k,-A,0),S.push(0,0,1),_.push(C/u),_.push(1-b/h)}}for(let b=0;b<h;b++)for(let A=0;A<u;A++){const C=A+d*b,k=A+d*(b+1),N=A+1+d*(b+1),B=A+1+d*b;v.push(C,k,B),v.push(k,N,B)}this.setIndex(v),this.setAttribute("position",new at(w,3)),this.setAttribute("normal",new at(S,3)),this.setAttribute("uv",new at(_,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new jc(t.width,t.height,t.widthSegments,t.heightSegments)}}class Qc extends St{constructor(t=.5,e=1,i=32,s=1,o=0,l=Math.PI*2){super(),this.type="RingGeometry",this.parameters={innerRadius:t,outerRadius:e,thetaSegments:i,phiSegments:s,thetaStart:o,thetaLength:l},i=Math.max(3,i),s=Math.max(1,s);const u=[],h=[],d=[],m=[];let y=t;const x=(e-t)/s,v=new z,w=new G;for(let S=0;S<=s;S++){for(let _=0;_<=i;_++){const b=o+_/i*l;v.x=y*Math.cos(b),v.y=y*Math.sin(b),h.push(v.x,v.y,v.z),d.push(0,0,1),w.x=(v.x/e+1)/2,w.y=(v.y/e+1)/2,m.push(w.x,w.y)}y+=x}for(let S=0;S<s;S++){const _=S*(i+1);for(let b=0;b<i;b++){const A=b+_,C=A,k=A+i+1,N=A+i+2,B=A+1;u.push(C,k,B),u.push(k,N,B)}}this.setIndex(u),this.setAttribute("position",new at(h,3)),this.setAttribute("normal",new at(d,3)),this.setAttribute("uv",new at(m,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new Qc(t.innerRadius,t.outerRadius,t.thetaSegments,t.phiSegments,t.thetaStart,t.thetaLength)}}class Kc extends St{constructor(t=new er([new G(0,.5),new G(-.5,-.5),new G(.5,-.5)]),e=12){super(),this.type="ShapeGeometry",this.parameters={shapes:t,curveSegments:e};const i=[],s=[],o=[],l=[];let u=0,h=0;if(Array.isArray(t)===!1)d(t);else for(let m=0;m<t.length;m++)d(t[m]),this.addGroup(u,h,m),u+=h,h=0;this.setIndex(i),this.setAttribute("position",new at(s,3)),this.setAttribute("normal",new at(o,3)),this.setAttribute("uv",new at(l,2));function d(m){const y=s.length/3,x=m.extractPoints(e);let v=x.shape;const w=x.holes;Yn.isClockWise(v)===!1&&(v=v.reverse());for(let _=0,b=w.length;_<b;_++){const A=w[_];Yn.isClockWise(A)===!0&&(w[_]=A.reverse())}const S=Yn.triangulateShape(v,w);for(let _=0,b=w.length;_<b;_++){const A=w[_];v=v.concat(A)}for(let _=0,b=v.length;_<b;_++){const A=v[_];s.push(A.x,A.y,0),o.push(0,0,1),l.push(A.x,A.y)}for(let _=0,b=S.length;_<b;_++){const A=S[_],C=A[0]+y,k=A[1]+y,N=A[2]+y;i.push(C,k,N),h+=3}}}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}toJSON(){const t=super.toJSON(),e=this.parameters.shapes;return lw(e,t)}static fromJSON(t,e){const i=[];for(let s=0,o=t.shapes.length;s<o;s++){const l=e[t.shapes[s]];i.push(l)}return new Kc(i,t.curveSegments)}}function lw(f,t){if(t.shapes=[],Array.isArray(f))for(let e=0,i=f.length;e<i;e++){const s=f[e];t.shapes.push(s.uuid)}else t.shapes.push(f.uuid);return t}class Dl extends St{constructor(t=1,e=32,i=16,s=0,o=Math.PI*2,l=0,u=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:i,phiStart:s,phiLength:o,thetaStart:l,thetaLength:u},e=Math.max(3,Math.floor(e)),i=Math.max(2,Math.floor(i));const h=Math.min(l+u,Math.PI);let d=0;const m=[],y=new z,x=new z,v=[],w=[],S=[],_=[];for(let b=0;b<=i;b++){const A=[],C=b/i;let k=0;b===0&&l===0?k=.5/e:b===i&&h===Math.PI&&(k=-.5/e);for(let N=0;N<=e;N++){const B=N/e;y.x=-t*Math.cos(s+B*o)*Math.sin(l+C*u),y.y=t*Math.cos(l+C*u),y.z=t*Math.sin(s+B*o)*Math.sin(l+C*u),w.push(y.x,y.y,y.z),x.copy(y).normalize(),S.push(x.x,x.y,x.z),_.push(B+k,1-C),A.push(d++)}m.push(A)}for(let b=0;b<i;b++)for(let A=0;A<e;A++){const C=m[b][A+1],k=m[b][A],N=m[b+1][A],B=m[b+1][A+1];(b!==0||l>0)&&v.push(C,k,B),(b!==i-1||h<Math.PI)&&v.push(k,N,B)}this.setIndex(v),this.setAttribute("position",new at(w,3)),this.setAttribute("normal",new at(S,3)),this.setAttribute("uv",new at(_,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new Dl(t.radius,t.widthSegments,t.heightSegments,t.phiStart,t.phiLength,t.thetaStart,t.thetaLength)}}class td extends es{constructor(t=1,e=0){const i=[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],s=[2,1,0,0,3,2,1,3,0,2,3,1];super(i,s,t,e),this.type="TetrahedronGeometry",this.parameters={radius:t,detail:e}}static fromJSON(t){return new td(t.radius,t.detail)}}class ed extends St{constructor(t=1,e=.4,i=12,s=48,o=Math.PI*2){super(),this.type="TorusGeometry",this.parameters={radius:t,tube:e,radialSegments:i,tubularSegments:s,arc:o},i=Math.floor(i),s=Math.floor(s);const l=[],u=[],h=[],d=[],m=new z,y=new z,x=new z;for(let v=0;v<=i;v++)for(let w=0;w<=s;w++){const S=w/s*o,_=v/i*Math.PI*2;y.x=(t+e*Math.cos(_))*Math.cos(S),y.y=(t+e*Math.cos(_))*Math.sin(S),y.z=e*Math.sin(_),u.push(y.x,y.y,y.z),m.x=t*Math.cos(S),m.y=t*Math.sin(S),x.subVectors(y,m).normalize(),h.push(x.x,x.y,x.z),d.push(w/s),d.push(v/i)}for(let v=1;v<=i;v++)for(let w=1;w<=s;w++){const S=(s+1)*v+w-1,_=(s+1)*(v-1)+w-1,b=(s+1)*(v-1)+w,A=(s+1)*v+w;l.push(S,_,A),l.push(_,b,A)}this.setIndex(l),this.setAttribute("position",new at(u,3)),this.setAttribute("normal",new at(h,3)),this.setAttribute("uv",new at(d,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new ed(t.radius,t.tube,t.radialSegments,t.tubularSegments,t.arc)}}class nd extends St{constructor(t=1,e=.4,i=64,s=8,o=2,l=3){super(),this.type="TorusKnotGeometry",this.parameters={radius:t,tube:e,tubularSegments:i,radialSegments:s,p:o,q:l},i=Math.floor(i),s=Math.floor(s);const u=[],h=[],d=[],m=[],y=new z,x=new z,v=new z,w=new z,S=new z,_=new z,b=new z;for(let C=0;C<=i;++C){const k=C/i*o*Math.PI*2;A(k,o,l,t,v),A(k+.01,o,l,t,w),_.subVectors(w,v),b.addVectors(w,v),S.crossVectors(_,b),b.crossVectors(S,_),S.normalize(),b.normalize();for(let N=0;N<=s;++N){const B=N/s*Math.PI*2,D=-e*Math.cos(B),L=e*Math.sin(B);y.x=v.x+(D*b.x+L*S.x),y.y=v.y+(D*b.y+L*S.y),y.z=v.z+(D*b.z+L*S.z),h.push(y.x,y.y,y.z),x.subVectors(y,v).normalize(),d.push(x.x,x.y,x.z),m.push(C/i),m.push(N/s)}}for(let C=1;C<=i;C++)for(let k=1;k<=s;k++){const N=(s+1)*(C-1)+(k-1),B=(s+1)*C+(k-1),D=(s+1)*C+k,L=(s+1)*(C-1)+k;u.push(N,B,L),u.push(B,D,L)}this.setIndex(u),this.setAttribute("position",new at(h,3)),this.setAttribute("normal",new at(d,3)),this.setAttribute("uv",new at(m,2));function A(C,k,N,B,D){const L=Math.cos(C),q=Math.sin(C),J=N/k*C,it=Math.cos(J);D.x=B*(2+it)*.5*L,D.y=B*(2+it)*q*.5,D.z=B*Math.sin(J)*.5}}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new nd(t.radius,t.tube,t.tubularSegments,t.radialSegments,t.p,t.q)}}class id extends St{constructor(t=new Hy(new z(-1,-1,0),new z(-1,1,0),new z(1,1,0)),e=64,i=1,s=8,o=!1){super(),this.type="TubeGeometry",this.parameters={path:t,tubularSegments:e,radius:i,radialSegments:s,closed:o};const l=t.computeFrenetFrames(e,o);this.tangents=l.tangents,this.normals=l.normals,this.binormals=l.binormals;const u=new z,h=new z,d=new G;let m=new z;const y=[],x=[],v=[],w=[];S(),this.setIndex(w),this.setAttribute("position",new at(y,3)),this.setAttribute("normal",new at(x,3)),this.setAttribute("uv",new at(v,2));function S(){for(let C=0;C<e;C++)_(C);_(o===!1?e:0),A(),b()}function _(C){m=t.getPointAt(C/e,m);const k=l.normals[C],N=l.binormals[C];for(let B=0;B<=s;B++){const D=B/s*Math.PI*2,L=Math.sin(D),q=-Math.cos(D);h.x=q*k.x+L*N.x,h.y=q*k.y+L*N.y,h.z=q*k.z+L*N.z,h.normalize(),x.push(h.x,h.y,h.z),u.x=m.x+i*h.x,u.y=m.y+i*h.y,u.z=m.z+i*h.z,y.push(u.x,u.y,u.z)}}function b(){for(let C=1;C<=e;C++)for(let k=1;k<=s;k++){const N=(s+1)*(C-1)+(k-1),B=(s+1)*C+(k-1),D=(s+1)*C+k,L=(s+1)*(C-1)+k;w.push(N,B,L),w.push(B,D,L)}}function A(){for(let C=0;C<=e;C++)for(let k=0;k<=s;k++)d.x=C/e,d.y=k/s,v.push(d.x,d.y)}}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}toJSON(){const t=super.toJSON();return t.path=this.parameters.path.toJSON(),t}static fromJSON(t){return new id(new Al[t.path.type]().fromJSON(t.path),t.tubularSegments,t.radius,t.radialSegments,t.closed)}}class uw extends St{constructor(t=null){if(super(),this.type="WireframeGeometry",this.parameters={geometry:t},t!==null){const e=[],i=new Set,s=new z,o=new z;if(t.index!==null){const l=t.attributes.position,u=t.index;let h=t.groups;h.length===0&&(h=[{start:0,count:u.count,materialIndex:0}]);for(let d=0,m=h.length;d<m;++d){const y=h[d],x=y.start,v=y.count;for(let w=x,S=x+v;w<S;w+=3)for(let _=0;_<3;_++){const b=u.getX(w+_),A=u.getX(w+(_+1)%3);s.fromBufferAttribute(l,b),o.fromBufferAttribute(l,A),ey(s,o,i)===!0&&(e.push(s.x,s.y,s.z),e.push(o.x,o.y,o.z))}}}else{const l=t.attributes.position;for(let u=0,h=l.count/3;u<h;u++)for(let d=0;d<3;d++){const m=3*u+d,y=3*u+(d+1)%3;s.fromBufferAttribute(l,m),o.fromBufferAttribute(l,y),ey(s,o,i)===!0&&(e.push(s.x,s.y,s.z),e.push(o.x,o.y,o.z))}}this.setAttribute("position",new at(e,3))}}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}}function ey(f,t,e){const i=`${f.x},${f.y},${f.z}-${t.x},${t.y},${t.z}`,s=`${t.x},${t.y},${t.z}-${f.x},${f.y},${f.z}`;return e.has(i)===!0||e.has(s)===!0?!1:(e.add(i),e.add(s),!0)}var ny=Object.freeze({__proto__:null,BoxGeometry:Rl,CapsuleGeometry:qc,CircleGeometry:Xc,ConeGeometry:Yc,CylinderGeometry:vo,DodecahedronGeometry:Zc,EdgesGeometry:Wv,ExtrudeGeometry:Jc,IcosahedronGeometry:$c,LatheGeometry:Nl,OctahedronGeometry:Ll,PlaneGeometry:jc,PolyhedronGeometry:es,RingGeometry:Qc,ShapeGeometry:Kc,SphereGeometry:Dl,TetrahedronGeometry:td,TorusGeometry:ed,TorusKnotGeometry:nd,TubeGeometry:id,WireframeGeometry:uw});class hw extends Ae{constructor(t){super(),this.isShadowMaterial=!0,this.type="ShadowMaterial",this.color=new gt(0),this.transparent=!0,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.fog=t.fog,this}}class cw extends Bc{constructor(t){super(t),this.isRawShaderMaterial=!0,this.type="RawShaderMaterial"}}class Zy extends Ae{constructor(t){super(),this.isMeshStandardMaterial=!0,this.type="MeshStandardMaterial",this.defines={STANDARD:""},this.color=new gt(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=sr,this.normalScale=new G(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new bn,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.defines={STANDARD:""},this.color.copy(t.color),this.roughness=t.roughness,this.metalness=t.metalness,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.roughnessMap=t.roughnessMap,this.metalnessMap=t.metalnessMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapRotation.copy(t.envMapRotation),this.envMapIntensity=t.envMapIntensity,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.flatShading=t.flatShading,this.fog=t.fog,this}}class dw extends Zy{constructor(t){super(),this.isMeshPhysicalMaterial=!0,this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.anisotropyRotation=0,this.anisotropyMap=null,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new G(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return yt(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(e){this.ior=(1+.4*e)/(1-.4*e)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new gt(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=1/0,this.attenuationColor=new gt(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new gt(1,1,1),this.specularColorMap=null,this._anisotropy=0,this._clearcoat=0,this._dispersion=0,this._iridescence=0,this._sheen=0,this._transmission=0,this.setValues(t)}get anisotropy(){return this._anisotropy}set anisotropy(t){this._anisotropy>0!=t>0&&this.version++,this._anisotropy=t}get clearcoat(){return this._clearcoat}set clearcoat(t){this._clearcoat>0!=t>0&&this.version++,this._clearcoat=t}get iridescence(){return this._iridescence}set iridescence(t){this._iridescence>0!=t>0&&this.version++,this._iridescence=t}get dispersion(){return this._dispersion}set dispersion(t){this._dispersion>0!=t>0&&this.version++,this._dispersion=t}get sheen(){return this._sheen}set sheen(t){this._sheen>0!=t>0&&this.version++,this._sheen=t}get transmission(){return this._transmission}set transmission(t){this._transmission>0!=t>0&&this.version++,this._transmission=t}copy(t){return super.copy(t),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=t.anisotropy,this.anisotropyRotation=t.anisotropyRotation,this.anisotropyMap=t.anisotropyMap,this.clearcoat=t.clearcoat,this.clearcoatMap=t.clearcoatMap,this.clearcoatRoughness=t.clearcoatRoughness,this.clearcoatRoughnessMap=t.clearcoatRoughnessMap,this.clearcoatNormalMap=t.clearcoatNormalMap,this.clearcoatNormalScale.copy(t.clearcoatNormalScale),this.dispersion=t.dispersion,this.ior=t.ior,this.iridescence=t.iridescence,this.iridescenceMap=t.iridescenceMap,this.iridescenceIOR=t.iridescenceIOR,this.iridescenceThicknessRange=[...t.iridescenceThicknessRange],this.iridescenceThicknessMap=t.iridescenceThicknessMap,this.sheen=t.sheen,this.sheenColor.copy(t.sheenColor),this.sheenColorMap=t.sheenColorMap,this.sheenRoughness=t.sheenRoughness,this.sheenRoughnessMap=t.sheenRoughnessMap,this.transmission=t.transmission,this.transmissionMap=t.transmissionMap,this.thickness=t.thickness,this.thicknessMap=t.thicknessMap,this.attenuationDistance=t.attenuationDistance,this.attenuationColor.copy(t.attenuationColor),this.specularIntensity=t.specularIntensity,this.specularIntensityMap=t.specularIntensityMap,this.specularColor.copy(t.specularColor),this.specularColorMap=t.specularColorMap,this}}class fw extends Ae{constructor(t){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new gt(16777215),this.specular=new gt(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=sr,this.normalScale=new G(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new bn,this.combine=zc,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(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.specular.copy(t.specular),this.shininess=t.shininess,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapRotation.copy(t.envMapRotation),this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.flatShading=t.flatShading,this.fog=t.fog,this}}class pw extends Ae{constructor(t){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new gt(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=sr,this.normalScale=new G(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(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.gradientMap=t.gradientMap,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.alphaMap=t.alphaMap,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.fog=t.fog,this}}class mw extends Ae{constructor(t){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=sr,this.normalScale=new G(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(t)}copy(t){return super.copy(t),this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.flatShading=t.flatShading,this}}class yw extends Ae{constructor(t){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new gt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new gt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=sr,this.normalScale=new G(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new bn,this.combine=zc,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(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapRotation.copy(t.envMapRotation),this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.flatShading=t.flatShading,this.fog=t.fog,this}}class gw extends Ae{constructor(t){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=w1,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(t)}copy(t){return super.copy(t),this.depthPacking=t.depthPacking,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this}}class xw extends Ae{constructor(t){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(t)}copy(t){return super.copy(t),this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this}}class vw extends Ae{constructor(t){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new gt(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=sr,this.normalScale=new G(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.defines={MATCAP:""},this.color.copy(t.color),this.matcap=t.matcap,this.map=t.map,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.alphaMap=t.alphaMap,this.flatShading=t.flatShading,this.fog=t.fog,this}}class ww extends Ne{constructor(t){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(t)}copy(t){return super.copy(t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this}}function ji(f,t,e){return!f||!e&&f.constructor===t?f:typeof t.BYTES_PER_ELEMENT=="number"?new t(f):Array.prototype.slice.call(f)}function Jy(f){return ArrayBuffer.isView(f)&&!(f instanceof DataView)}function $y(f){function t(s,o){return f[s]-f[o]}const e=f.length,i=new Array(e);for(let s=0;s!==e;++s)i[s]=s;return i.sort(t),i}function Cc(f,t,e){const i=f.length,s=new f.constructor(i);for(let o=0,l=0;l!==i;++o){const u=e[o]*t;for(let h=0;h!==t;++h)s[l++]=f[u+h]}return s}function sd(f,t,e,i){let s=1,o=f[0];for(;o!==void 0&&o[i]===void 0;)o=f[s++];if(o===void 0)return;let l=o[i];if(l!==void 0)if(Array.isArray(l))do l=o[i],l!==void 0&&(t.push(o.time),e.push.apply(e,l)),o=f[s++];while(o!==void 0);else if(l.toArray!==void 0)do l=o[i],l!==void 0&&(t.push(o.time),l.toArray(e,e.length)),o=f[s++];while(o!==void 0);else do l=o[i],l!==void 0&&(t.push(o.time),e.push(l)),o=f[s++];while(o!==void 0)}function Mw(f,t,e,i,s=30){const o=f.clone();o.name=t;const l=[];for(let h=0;h<o.tracks.length;++h){const d=o.tracks[h],m=d.getValueSize(),y=[],x=[];for(let v=0;v<d.times.length;++v){const w=d.times[v]*s;if(!(w<e||w>=i)){y.push(d.times[v]);for(let S=0;S<m;++S)x.push(d.values[v*m+S])}}y.length!==0&&(d.times=ji(y,d.times.constructor),d.values=ji(x,d.values.constructor),l.push(d))}o.tracks=l;let u=1/0;for(let h=0;h<o.tracks.length;++h)u>o.tracks[h].times[0]&&(u=o.tracks[h].times[0]);for(let h=0;h<o.tracks.length;++h)o.tracks[h].shift(-1*u);return o.resetDuration(),o}function Sw(f,t=0,e=f,i=30){i<=0&&(i=30);const s=e.tracks.length,o=t/i;for(let l=0;l<s;++l){const u=e.tracks[l],h=u.ValueTypeName;if(h==="bool"||h==="string")continue;const d=f.tracks.find(function(b){return b.name===u.name&&b.ValueTypeName===h});if(d===void 0)continue;let m=0;const y=u.getValueSize();u.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(m=y/3);let x=0;const v=d.getValueSize();d.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(x=v/3);const w=u.times.length-1;let S;if(o<=u.times[0]){const b=m,A=y-m;S=u.values.slice(b,A)}else if(o>=u.times[w]){const b=w*y+m,A=b+y-m;S=u.values.slice(b,A)}else{const b=u.createInterpolant(),A=m,C=y-m;b.evaluate(o),S=b.resultBuffer.slice(A,C)}h==="quaternion"&&new Xe().fromArray(S).normalize().conjugate().toArray(S);const _=d.times.length;for(let b=0;b<_;++b){const A=b*v+x;if(h==="quaternion")Xe.multiplyQuaternionsFlat(d.values,A,S,0,d.values,A);else{const C=v-x*2;for(let k=0;k<C;++k)d.values[A+k]-=S[k]}}}return f.blendMode=Ey,f}const I_={convertArray:ji,isTypedArray:Jy,getKeyframeOrder:$y,sortedArray:Cc,flattenJSON:sd,subclip:Mw,makeClipAdditive:Sw};class Vl{constructor(t,e,i,s){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=s!==void 0?s:new e.constructor(i),this.sampleValues=e,this.valueSize=i,this.settings=null,this.DefaultSettings_={}}evaluate(t){const e=this.parameterPositions;let i=this._cachedIndex,s=e[i],o=e[i-1];t:{e:{let l;n:{i:if(!(t<s)){for(let u=i+2;;){if(s===void 0){if(t<o)break i;return i=e.length,this._cachedIndex=i,this.copySampleValue_(i-1)}if(i===u)break;if(o=s,s=e[++i],t<s)break e}l=e.length;break n}if(!(t>=o)){const u=e[1];t<u&&(i=2,o=u);for(let h=i-2;;){if(o===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(i===h)break;if(s=o,o=e[--i-1],t>=o)break e}l=i,i=0;break n}break t}for(;i<l;){const u=i+l>>>1;t<e[u]?l=u:i=u+1}if(s=e[i],o=e[i-1],o===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(s===void 0)return i=e.length,this._cachedIndex=i,this.copySampleValue_(i-1)}this._cachedIndex=i,this.intervalChanged_(i,o,s)}return this.interpolate_(i,o,t,s)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(t){const e=this.resultBuffer,i=this.sampleValues,s=this.valueSize,o=t*s;for(let l=0;l!==s;++l)e[l]=i[o+l];return e}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}class _w extends Vl{constructor(t,e,i,s){super(t,e,i,s),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:Js,endingEnd:Js}}intervalChanged_(t,e,i){const s=this.parameterPositions;let o=t-2,l=t+1,u=s[o],h=s[l];if(u===void 0)switch(this.getSettings_().endingStart){case $s:o=t,u=2*e-i;break;case vl:o=s.length-2,u=e+s[o]-s[o+1];break;default:o=t,u=i}if(h===void 0)switch(this.getSettings_().endingEnd){case $s:l=t,h=2*i-e;break;case vl:l=1,h=i+s[1]-s[0];break;default:l=t-1,h=e}const d=(i-e)*.5,m=this.valueSize;this._weightPrev=d/(e-u),this._weightNext=d/(h-i),this._offsetPrev=o*m,this._offsetNext=l*m}interpolate_(t,e,i,s){const o=this.resultBuffer,l=this.sampleValues,u=this.valueSize,h=t*u,d=h-u,m=this._offsetPrev,y=this._offsetNext,x=this._weightPrev,v=this._weightNext,w=(i-e)/(s-e),S=w*w,_=S*w,b=-x*_+2*x*S-x*w,A=(1+x)*_+(-1.5-2*x)*S+(-.5+x)*w+1,C=(-1-v)*_+(1.5+v)*S+.5*w,k=v*_-v*S;for(let N=0;N!==u;++N)o[N]=b*l[m+N]+A*l[d+N]+C*l[h+N]+k*l[y+N];return o}}class jy extends Vl{constructor(t,e,i,s){super(t,e,i,s)}interpolate_(t,e,i,s){const o=this.resultBuffer,l=this.sampleValues,u=this.valueSize,h=t*u,d=h-u,m=(i-e)/(s-e),y=1-m;for(let x=0;x!==u;++x)o[x]=l[d+x]*y+l[h+x]*m;return o}}class bw extends Vl{constructor(t,e,i,s){super(t,e,i,s)}interpolate_(t){return this.copySampleValue_(t-1)}}class Tn{constructor(t,e,i,s){if(t===void 0)throw new Error("THREE.KeyframeTrack: track name is undefined");if(e===void 0||e.length===0)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+t);this.name=t,this.times=ji(e,this.TimeBufferType),this.values=ji(i,this.ValueBufferType),this.setInterpolation(s||this.DefaultInterpolation)}static toJSON(t){const e=t.constructor;let i;if(e.toJSON!==this.toJSON)i=e.toJSON(t);else{i={name:t.name,times:ji(t.times,Array),values:ji(t.values,Array)};const s=t.getInterpolation();s!==t.DefaultInterpolation&&(i.interpolation=s)}return i.type=t.ValueTypeName,i}InterpolantFactoryMethodDiscrete(t){return new bw(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodLinear(t){return new jy(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodSmooth(t){return new _w(this.times,this.values,this.getValueSize(),t)}setInterpolation(t){let e;switch(t){case xl:e=this.InterpolantFactoryMethodDiscrete;break;case Sc:e=this.InterpolantFactoryMethodLinear;break;case Nh:e=this.InterpolantFactoryMethodSmooth;break}if(e===void 0){const i="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(this.createInterpolant===void 0)if(t!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw new Error(i);return console.warn("THREE.KeyframeTrack:",i),this}return this.createInterpolant=e,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return xl;case this.InterpolantFactoryMethodLinear:return Sc;case this.InterpolantFactoryMethodSmooth:return Nh}}getValueSize(){return this.values.length/this.times.length}shift(t){if(t!==0){const e=this.times;for(let i=0,s=e.length;i!==s;++i)e[i]+=t}return this}scale(t){if(t!==1){const e=this.times;for(let i=0,s=e.length;i!==s;++i)e[i]*=t}return this}trim(t,e){const i=this.times,s=i.length;let o=0,l=s-1;for(;o!==s&&i[o]<t;)++o;for(;l!==-1&&i[l]>e;)--l;if(++l,o!==0||l!==s){o>=l&&(l=Math.max(l,1),o=l-1);const u=this.getValueSize();this.times=i.slice(o,l),this.values=this.values.slice(o*u,l*u)}return this}validate(){let t=!0;const e=this.getValueSize();e-Math.floor(e)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);const i=this.times,s=this.values,o=i.length;o===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);let l=null;for(let u=0;u!==o;u++){const h=i[u];if(typeof h=="number"&&isNaN(h)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,u,h),t=!1;break}if(l!==null&&l>h){console.error("THREE.KeyframeTrack: Out of order keys.",this,u,h,l),t=!1;break}l=h}if(s!==void 0&&Jy(s))for(let u=0,h=s.length;u!==h;++u){const d=s[u];if(isNaN(d)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,u,d),t=!1;break}}return t}optimize(){const t=this.times.slice(),e=this.values.slice(),i=this.getValueSize(),s=this.getInterpolation()===Nh,o=t.length-1;let l=1;for(let u=1;u<o;++u){let h=!1;const d=t[u],m=t[u+1];if(d!==m&&(u!==1||d!==t[0]))if(s)h=!0;else{const y=u*i,x=y-i,v=y+i;for(let w=0;w!==i;++w){const S=e[y+w];if(S!==e[x+w]||S!==e[v+w]){h=!0;break}}}if(h){if(u!==l){t[l]=t[u];const y=u*i,x=l*i;for(let v=0;v!==i;++v)e[x+v]=e[y+v]}++l}}if(o>0){t[l]=t[o];for(let u=o*i,h=l*i,d=0;d!==i;++d)e[h+d]=e[u+d];++l}return l!==t.length?(this.times=t.slice(0,l),this.values=e.slice(0,l*i)):(this.times=t,this.values=e),this}clone(){const t=this.times.slice(),e=this.values.slice(),i=this.constructor,s=new i(this.name,t,e);return s.createInterpolant=this.createInterpolant,s}}Tn.prototype.TimeBufferType=Float32Array;Tn.prototype.ValueBufferType=Float32Array;Tn.prototype.DefaultInterpolation=Sc;class or extends Tn{constructor(t,e,i){super(t,e,i)}}or.prototype.ValueTypeName="bool";or.prototype.ValueBufferType=Array;or.prototype.DefaultInterpolation=xl;or.prototype.InterpolantFactoryMethodLinear=void 0;or.prototype.InterpolantFactoryMethodSmooth=void 0;class Qy extends Tn{}Qy.prototype.ValueTypeName="color";class Tl extends Tn{}Tl.prototype.ValueTypeName="number";class Aw extends Vl{constructor(t,e,i,s){super(t,e,i,s)}interpolate_(t,e,i,s){const o=this.resultBuffer,l=this.sampleValues,u=this.valueSize,h=(i-e)/(s-e);let d=t*u;for(let m=d+u;d!==m;d+=4)Xe.slerpFlat(o,0,l,d-u,l,d,h);return o}}class Ul extends Tn{InterpolantFactoryMethodLinear(t){return new Aw(this.times,this.values,this.getValueSize(),t)}}Ul.prototype.ValueTypeName="quaternion";Ul.prototype.InterpolantFactoryMethodSmooth=void 0;class ar extends Tn{constructor(t,e,i){super(t,e,i)}}ar.prototype.ValueTypeName="string";ar.prototype.ValueBufferType=Array;ar.prototype.DefaultInterpolation=xl;ar.prototype.InterpolantFactoryMethodLinear=void 0;ar.prototype.InterpolantFactoryMethodSmooth=void 0;class kl extends Tn{}kl.prototype.ValueTypeName="vector";class zl{constructor(t="",e=-1,i=[],s=Fc){this.name=t,this.tracks=i,this.duration=e,this.blendMode=s,this.uuid=qe(),this.duration<0&&this.resetDuration()}static parse(t){const e=[],i=t.tracks,s=1/(t.fps||1);for(let l=0,u=i.length;l!==u;++l)e.push(Tw(i[l]).scale(s));const o=new this(t.name,t.duration,e,t.blendMode);return o.uuid=t.uuid,o}static toJSON(t){const e=[],i=t.tracks,s={name:t.name,duration:t.duration,tracks:e,uuid:t.uuid,blendMode:t.blendMode};for(let o=0,l=i.length;o!==l;++o)e.push(Tn.toJSON(i[o]));return s}static CreateFromMorphTargetSequence(t,e,i,s){const o=e.length,l=[];for(let u=0;u<o;u++){let h=[],d=[];h.push((u+o-1)%o,u,(u+1)%o),d.push(0,1,0);const m=$y(h);h=Cc(h,1,m),d=Cc(d,1,m),!s&&h[0]===0&&(h.push(o),d.push(d[0])),l.push(new Tl(".morphTargetInfluences["+e[u].name+"]",h,d).scale(1/i))}return new this(t,-1,l)}static findByName(t,e){let i=t;if(!Array.isArray(t)){const s=t;i=s.geometry&&s.geometry.animations||s.animations}for(let s=0;s<i.length;s++)if(i[s].name===e)return i[s];return null}static CreateClipsFromMorphTargetSequences(t,e,i){const s={},o=/^([\w-]*?)([\d]+)$/;for(let u=0,h=t.length;u<h;u++){const d=t[u],m=d.name.match(o);if(m&&m.length>1){const y=m[1];let x=s[y];x||(s[y]=x=[]),x.push(d)}}const l=[];for(const u in s)l.push(this.CreateFromMorphTargetSequence(u,s[u],e,i));return l}static parseAnimation(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const i=function(y,x,v,w,S){if(v.length!==0){const _=[],b=[];sd(v,_,b,w),_.length!==0&&S.push(new y(x,_,b))}},s=[],o=t.name||"default",l=t.fps||30,u=t.blendMode;let h=t.length||-1;const d=t.hierarchy||[];for(let y=0;y<d.length;y++){const x=d[y].keys;if(!(!x||x.length===0))if(x[0].morphTargets){const v={};let w;for(w=0;w<x.length;w++)if(x[w].morphTargets)for(let S=0;S<x[w].morphTargets.length;S++)v[x[w].morphTargets[S]]=-1;for(const S in v){const _=[],b=[];for(let A=0;A!==x[w].morphTargets.length;++A){const C=x[w];_.push(C.time),b.push(C.morphTarget===S?1:0)}s.push(new Tl(".morphTargetInfluence["+S+"]",_,b))}h=v.length*l}else{const v=".bones["+e[y].name+"]";i(kl,v+".position",x,"pos",s),i(Ul,v+".quaternion",x,"rot",s),i(kl,v+".scale",x,"scl",s)}}return s.length===0?null:new this(o,h,s,u)}resetDuration(){const t=this.tracks;let e=0;for(let i=0,s=t.length;i!==s;++i){const o=this.tracks[i];e=Math.max(e,o.times[o.times.length-1])}return this.duration=e,this}trim(){for(let t=0;t<this.tracks.length;t++)this.tracks[t].trim(0,this.duration);return this}validate(){let t=!0;for(let e=0;e<this.tracks.length;e++)t=t&&this.tracks[e].validate();return t}optimize(){for(let t=0;t<this.tracks.length;t++)this.tracks[t].optimize();return this}clone(){const t=[];for(let e=0;e<this.tracks.length;e++)t.push(this.tracks[e].clone());return new this.constructor(this.name,this.duration,t,this.blendMode)}toJSON(){return this.constructor.toJSON(this)}}function Cw(f){switch(f.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return Tl;case"vector":case"vector2":case"vector3":case"vector4":return kl;case"color":return Qy;case"quaternion":return Ul;case"bool":case"boolean":return or;case"string":return ar}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+f)}function Tw(f){if(f.type===void 0)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const t=Cw(f.type);if(f.times===void 0){const e=[],i=[];sd(f.keys,e,i,"value"),f.times=e,f.values=i}return t.parse!==void 0?t.parse(f):new t(f.name,f.times,f.values,f.interpolation)}const bi={enabled:!1,files:{},add:function(f,t){this.enabled!==!1&&(this.files[f]=t)},get:function(f){if(this.enabled!==!1)return this.files[f]},remove:function(f){delete this.files[f]},clear:function(){this.files={}}};class Ky{constructor(t,e,i){const s=this;let o=!1,l=0,u=0,h;const d=[];this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=i,this.itemStart=function(m){u++,o===!1&&s.onStart!==void 0&&s.onStart(m,l,u),o=!0},this.itemEnd=function(m){l++,s.onProgress!==void 0&&s.onProgress(m,l,u),l===u&&(o=!1,s.onLoad!==void 0&&s.onLoad())},this.itemError=function(m){s.onError!==void 0&&s.onError(m)},this.resolveURL=function(m){return h?h(m):m},this.setURLModifier=function(m){return h=m,this},this.addHandler=function(m,y){return d.push(m,y),this},this.removeHandler=function(m){const y=d.indexOf(m);return y!==-1&&d.splice(y,2),this},this.getHandler=function(m){for(let y=0,x=d.length;y<x;y+=2){const v=d[y],w=d[y+1];if(v.global&&(v.lastIndex=0),v.test(m))return w}return null}}}const ao=new Ky;class Ye{constructor(t){this.manager=t!==void 0?t:ao,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(t,e){const i=this;return new Promise(function(s,o){i.load(t,s,e,o)})}parse(){}setCrossOrigin(t){return this.crossOrigin=t,this}setWithCredentials(t){return this.withCredentials=t,this}setPath(t){return this.path=t,this}setResourcePath(t){return this.resourcePath=t,this}setRequestHeader(t){return this.requestHeader=t,this}}Ye.DEFAULT_MATERIAL_NAME="__DEFAULT";const Wn={};class kw extends Error{constructor(t,e){super(t),this.response=e}}class Ai extends Ye{constructor(t){super(t)}load(t,e,i,s){t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);const o=bi.get(t);if(o!==void 0)return this.manager.itemStart(t),setTimeout(()=>{e&&e(o),this.manager.itemEnd(t)},0),o;if(Wn[t]!==void 0){Wn[t].push({onLoad:e,onProgress:i,onError:s});return}Wn[t]=[],Wn[t].push({onLoad:e,onProgress:i,onError:s});const l=new Request(t,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),u=this.mimeType,h=this.responseType;fetch(l).then(d=>{if(d.status===200||d.status===0){if(d.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||d.body===void 0||d.body.getReader===void 0)return d;const m=Wn[t],y=d.body.getReader(),x=d.headers.get("X-File-Size")||d.headers.get("Content-Length"),v=x?parseInt(x):0,w=v!==0;let S=0;const _=new ReadableStream({start(b){A();function A(){y.read().then(({done:C,value:k})=>{if(C)b.close();else{S+=k.byteLength;const N=new ProgressEvent("progress",{lengthComputable:w,loaded:S,total:v});for(let B=0,D=m.length;B<D;B++){const L=m[B];L.onProgress&&L.onProgress(N)}b.enqueue(k),A()}},C=>{b.error(C)})}}});return new Response(_)}else throw new kw(`fetch for "${d.url}" responded with ${d.status}: ${d.statusText}`,d)}).then(d=>{switch(h){case"arraybuffer":return d.arrayBuffer();case"blob":return d.blob();case"document":return d.text().then(m=>new DOMParser().parseFromString(m,u));case"json":return d.json();default:if(u===void 0)return d.text();{const y=/charset="?([^;"\s]*)"?/i.exec(u),x=y&&y[1]?y[1].toLowerCase():void 0,v=new TextDecoder(x);return d.arrayBuffer().then(w=>v.decode(w))}}}).then(d=>{bi.add(t,d);const m=Wn[t];delete Wn[t];for(let y=0,x=m.length;y<x;y++){const v=m[y];v.onLoad&&v.onLoad(d)}}).catch(d=>{const m=Wn[t];if(m===void 0)throw this.manager.itemError(t),d;delete Wn[t];for(let y=0,x=m.length;y<x;y++){const v=m[y];v.onError&&v.onError(d)}this.manager.itemError(t)}).finally(()=>{this.manager.itemEnd(t)}),this.manager.itemStart(t)}setResponseType(t){return this.responseType=t,this}setMimeType(t){return this.mimeType=t,this}}class E_ extends Ye{constructor(t){super(t)}load(t,e,i,s){const o=this,l=new Ai(this.manager);l.setPath(this.path),l.setRequestHeader(this.requestHeader),l.setWithCredentials(this.withCredentials),l.load(t,function(u){try{e(o.parse(JSON.parse(u)))}catch(h){s?s(h):console.error(h),o.manager.itemError(t)}},i,s)}parse(t){const e=[];for(let i=0;i<t.length;i++){const s=zl.parse(t[i]);e.push(s)}return e}}class P_ extends Ye{constructor(t){super(t)}load(t,e,i,s){const o=this,l=[],u=new Wc,h=new Ai(this.manager);h.setPath(this.path),h.setResponseType("arraybuffer"),h.setRequestHeader(this.requestHeader),h.setWithCredentials(o.withCredentials);let d=0;function m(y){h.load(t[y],function(x){const v=o.parse(x,!0);l[y]={width:v.width,height:v.height,format:v.format,mipmaps:v.mipmaps},d+=1,d===6&&(v.mipmapCount===1&&(u.minFilter=rn),u.image=l,u.format=v.format,u.needsUpdate=!0,e&&e(u))},i,s)}if(Array.isArray(t))for(let y=0,x=t.length;y<x;++y)m(y);else h.load(t,function(y){const x=o.parse(y,!0);if(x.isCubemap){const v=x.mipmaps.length/x.mipmapCount;for(let w=0;w<v;w++){l[w]={mipmaps:[]};for(let S=0;S<x.mipmapCount;S++)l[w].mipmaps.push(x.mipmaps[w*x.mipmapCount+S]),l[w].format=x.format,l[w].width=x.width,l[w].height=x.height}u.image=l}else u.image.width=x.width,u.image.height=x.height,u.mipmaps=x.mipmaps;x.mipmapCount===1&&(u.minFilter=rn),u.format=x.format,u.needsUpdate=!0,e&&e(u)},i,s);return u}}class Il extends Ye{constructor(t){super(t)}load(t,e,i,s){this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);const o=this,l=bi.get(t);if(l!==void 0)return o.manager.itemStart(t),setTimeout(function(){e&&e(l),o.manager.itemEnd(t)},0),l;const u=Sl("img");function h(){m(),bi.add(t,this),e&&e(this),o.manager.itemEnd(t)}function d(y){m(),s&&s(y),o.manager.itemError(t),o.manager.itemEnd(t)}function m(){u.removeEventListener("load",h,!1),u.removeEventListener("error",d,!1)}return u.addEventListener("load",h,!1),u.addEventListener("error",d,!1),t.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(u.crossOrigin=this.crossOrigin),o.manager.itemStart(t),u.src=t,u}}class F_ extends Ye{constructor(t){super(t)}load(t,e,i,s){const o=new Oc;o.colorSpace=nn;const l=new Il(this.manager);l.setCrossOrigin(this.crossOrigin),l.setPath(this.path);let u=0;function h(d){l.load(t[d],function(m){o.images[d]=m,u++,u===6&&(o.needsUpdate=!0,e&&e(o))},void 0,s)}for(let d=0;d<t.length;++d)h(d);return o}}class R_ extends Ye{constructor(t){super(t)}load(t,e,i,s){const o=this,l=new Xn,u=new Ai(this.manager);return u.setResponseType("arraybuffer"),u.setRequestHeader(this.requestHeader),u.setPath(this.path),u.setWithCredentials(o.withCredentials),u.load(t,function(h){let d;try{d=o.parse(h)}catch(m){if(s!==void 0)s(m);else{console.error(m);return}}d.image!==void 0?l.image=d.image:d.data!==void 0&&(l.image.width=d.width,l.image.height=d.height,l.image.data=d.data),l.wrapS=d.wrapS!==void 0?d.wrapS:_n,l.wrapT=d.wrapT!==void 0?d.wrapT:_n,l.magFilter=d.magFilter!==void 0?d.magFilter:rn,l.minFilter=d.minFilter!==void 0?d.minFilter:rn,l.anisotropy=d.anisotropy!==void 0?d.anisotropy:1,d.colorSpace!==void 0&&(l.colorSpace=d.colorSpace),d.flipY!==void 0&&(l.flipY=d.flipY),d.format!==void 0&&(l.format=d.format),d.type!==void 0&&(l.type=d.type),d.mipmaps!==void 0&&(l.mipmaps=d.mipmaps,l.minFilter=Pl),d.mipmapCount===1&&(l.minFilter=rn),d.generateMipmaps!==void 0&&(l.generateMipmaps=d.generateMipmaps),l.needsUpdate=!0,e&&e(l,d)},i,s),l}}class B_ extends Ye{constructor(t){super(t)}load(t,e,i,s){const o=new re,l=new Il(this.manager);return l.setCrossOrigin(this.crossOrigin),l.setPath(this.path),l.load(t,function(u){o.image=u,o.needsUpdate=!0,e!==void 0&&e(o)},i,s),o}}class ns extends Bt{constructor(t,e=1){super(),this.isLight=!0,this.type="Light",this.color=new gt(t),this.intensity=e}dispose(){}copy(t,e){return super.copy(t,e),this.color.copy(t.color),this.intensity=t.intensity,this}toJSON(t){const e=super.toJSON(t);return e.object.color=this.color.getHex(),e.object.intensity=this.intensity,this.groundColor!==void 0&&(e.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(e.object.distance=this.distance),this.angle!==void 0&&(e.object.angle=this.angle),this.decay!==void 0&&(e.object.decay=this.decay),this.penumbra!==void 0&&(e.object.penumbra=this.penumbra),this.shadow!==void 0&&(e.object.shadow=this.shadow.toJSON()),this.target!==void 0&&(e.object.target=this.target.uuid),e}}class zw extends ns{constructor(t,e,i){super(t,i),this.isHemisphereLight=!0,this.type="HemisphereLight",this.position.copy(Bt.DEFAULT_UP),this.updateMatrix(),this.groundColor=new gt(e)}copy(t,e){return super.copy(t,e),this.groundColor.copy(t.groundColor),this}}const mc=new wt,iy=new z,sy=new z;class rd{constructor(t){this.camera=t,this.intensity=1,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new G(512,512),this.map=null,this.mapPass=null,this.matrix=new wt,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new Ly,this._frameExtents=new G(1,1),this._viewportCount=1,this._viewports=[new he(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(t){const e=this.camera,i=this.matrix;iy.setFromMatrixPosition(t.matrixWorld),e.position.copy(iy),sy.setFromMatrixPosition(t.target.matrixWorld),e.lookAt(sy),e.updateMatrixWorld(),mc.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),this._frustum.setFromProjectionMatrix(mc),i.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),i.multiply(mc)}getViewport(t){return this._viewports[t]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(t){return this.camera=t.camera.clone(),this.intensity=t.intensity,this.bias=t.bias,this.radius=t.radius,this.mapSize.copy(t.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){const t={};return this.intensity!==1&&(t.intensity=this.intensity),this.bias!==0&&(t.bias=this.bias),this.normalBias!==0&&(t.normalBias=this.normalBias),this.radius!==1&&(t.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}}class Iw extends rd{constructor(){super(new sn(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(t){const e=this.camera,i=fo*2*t.angle*this.focus,s=this.mapSize.width/this.mapSize.height,o=t.distance||e.far;(i!==e.fov||s!==e.aspect||o!==e.far)&&(e.fov=i,e.aspect=s,e.far=o,e.updateProjectionMatrix()),super.updateMatrices(t)}copy(t){return super.copy(t),this.focus=t.focus,this}}class Ew extends ns{constructor(t,e,i=0,s=Math.PI/3,o=0,l=2){super(t,e),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(Bt.DEFAULT_UP),this.updateMatrix(),this.target=new Bt,this.distance=i,this.angle=s,this.penumbra=o,this.decay=l,this.map=null,this.shadow=new Iw}get power(){return this.intensity*Math.PI}set power(t){this.intensity=t/Math.PI}dispose(){this.shadow.dispose()}copy(t,e){return super.copy(t,e),this.distance=t.distance,this.angle=t.angle,this.penumbra=t.penumbra,this.decay=t.decay,this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}const ry=new wt,so=new z,yc=new z;class Pw extends rd{constructor(){super(new sn(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new G(4,2),this._viewportCount=6,this._viewports=[new he(2,1,1,1),new he(0,1,1,1),new he(3,1,1,1),new he(1,1,1,1),new he(3,0,1,1),new he(1,0,1,1)],this._cubeDirections=[new z(1,0,0),new z(-1,0,0),new z(0,0,1),new z(0,0,-1),new z(0,1,0),new z(0,-1,0)],this._cubeUps=[new z(0,1,0),new z(0,1,0),new z(0,1,0),new z(0,1,0),new z(0,0,1),new z(0,0,-1)]}updateMatrices(t,e=0){const i=this.camera,s=this.matrix,o=t.distance||i.far;o!==i.far&&(i.far=o,i.updateProjectionMatrix()),so.setFromMatrixPosition(t.matrixWorld),i.position.copy(so),yc.copy(i.position),yc.add(this._cubeDirections[e]),i.up.copy(this._cubeUps[e]),i.lookAt(yc),i.updateMatrixWorld(),s.makeTranslation(-so.x,-so.y,-so.z),ry.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse),this._frustum.setFromProjectionMatrix(ry)}}class Fw extends ns{constructor(t,e,i=0,s=2){super(t,e),this.isPointLight=!0,this.type="PointLight",this.distance=i,this.decay=s,this.shadow=new Pw}get power(){return this.intensity*4*Math.PI}set power(t){this.intensity=t/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(t,e){return super.copy(t,e),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}}class t0 extends Nc{constructor(t=-1,e=1,i=1,s=-1,o=.1,l=2e3){super(),this.isOrthographicCamera=!0,this.type="Orthogra
83phicCamera",this.zoom=1,this.view=null,this.left=t,this.right=e,this.top=i,this.bottom=s,this.near=o,this.far=l,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=t.view===null?null:Object.assign({},t.view),this}setViewOffset(t,e,i,s,o,l){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=t,this.view.fullHeight=e,this.view.offsetX=i,this.view.offsetY=s,this.view.width=o,this.view.height=l,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,s=(this.top+this.bottom)/2;let o=i-t,l=i+t,u=s+e,h=s-e;if(this.view!==null&&this.view.enabled){const d=(this.right-this.left)/this.view.fullWidth/this.zoom,m=(this.top-this.bottom)/this.view.fullHeight/this.zoom;o+=d*this.view.offsetX,l=o+d*this.view.width,u-=m*this.view.offsetY,h=u-m*this.view.height}this.projectionMatrix.makeOrthographic(o,l,u,h,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){const e=super.toJSON(t);return e.object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,this.view!==null&&(e.object.view=Object.assign({},this.view)),e}}class Rw extends rd{constructor(){super(new t0(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class Bw extends ns{constructor(t,e){super(t,e),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Bt.DEFAULT_UP),this.updateMatrix(),this.target=new Bt,this.shadow=new Rw}dispose(){this.shadow.dispose()}copy(t){return super.copy(t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}class Nw extends ns{constructor(t,e){super(t,e),this.isAmbientLight=!0,this.type="AmbientLight"}}class Ow extends ns{constructor(t,e,i=10,s=10){super(t,e),this.isRectAreaLight=!0,this.type="RectAreaLight",this.width=i,this.height=s}get power(){return this.intensity*this.width*this.height*Math.PI}set power(t){this.intensity=t/(this.width*this.height*Math.PI)}copy(t){return super.copy(t),this.width=t.width,this.height=t.height,this}toJSON(t){const e=super.toJSON(t);return e.object.width=this.width,e.object.height=this.height,e}}class Lw{constructor(){this.isSphericalHarmonics3=!0,this.coefficients=[];for(let t=0;t<9;t++)this.coefficients.push(new z)}set(t){for(let e=0;e<9;e++)this.coefficients[e].copy(t[e]);return this}zero(){for(let t=0;t<9;t++)this.coefficients[t].set(0,0,0);return this}getAt(t,e){const i=t.x,s=t.y,o=t.z,l=this.coefficients;return e.copy(l[0]).multiplyScalar(.282095),e.addScaledVector(l[1],.488603*s),e.addScaledVector(l[2],.488603*o),e.addScaledVector(l[3],.488603*i),e.addScaledVector(l[4],1.092548*(i*s)),e.addScaledVector(l[5],1.092548*(s*o)),e.addScaledVector(l[6],.315392*(3*o*o-1)),e.addScaledVector(l[7],1.092548*(i*o)),e.addScaledVector(l[8],.546274*(i*i-s*s)),e}getIrradianceAt(t,e){const i=t.x,s=t.y,o=t.z,l=this.coefficients;return e.copy(l[0]).multiplyScalar(.886227),e.addScaledVector(l[1],2*.511664*s),e.addScaledVector(l[2],2*.511664*o),e.addScaledVector(l[3],2*.511664*i),e.addScaledVector(l[4],2*.429043*i*s),e.addScaledVector(l[5],2*.429043*s*o),e.addScaledVector(l[6],.743125*o*o-.247708),e.addScaledVector(l[7],2*.429043*i*o),e.addScaledVector(l[8],.429043*(i*i-s*s)),e}add(t){for(let e=0;e<9;e++)this.coefficients[e].add(t.coefficients[e]);return this}addScaledSH(t,e){for(let i=0;i<9;i++)this.coefficients[i].addScaledVector(t.coefficients[i],e);return this}scale(t){for(let e=0;e<9;e++)this.coefficients[e].multiplyScalar(t);return this}lerp(t,e){for(let i=0;i<9;i++)this.coefficients[i].lerp(t.coefficients[i],e);return this}equals(t){for(let e=0;e<9;e++)if(!this.coefficients[e].equals(t.coefficients[e]))return!1;return!0}copy(t){return this.set(t.coefficients)}clone(){return new this.constructor().copy(this)}fromArray(t,e=0){const i=this.coefficients;for(let s=0;s<9;s++)i[s].fromArray(t,e+s*3);return this}toArray(t=[],e=0){const i=this.coefficients;for(let s=0;s<9;s++)i[s].toArray(t,e+s*3);return t}static getBasisAt(t,e){const i=t.x,s=t.y,o=t.z;e[0]=.282095,e[1]=.488603*s,e[2]=.488603*o,e[3]=.488603*i,e[4]=1.092548*i*s,e[5]=1.092548*s*o,e[6]=.315392*(3*o*o-1),e[7]=1.092548*i*o,e[8]=.546274*(i*i-s*s)}}class Dw extends ns{constructor(t=new Lw,e=1){super(void 0,e),this.isLightProbe=!0,this.sh=t}copy(t){return super.copy(t),this.sh.copy(t.sh),this}fromJSON(t){return this.intensity=t.intensity,this.sh.fromArray(t.sh),this}toJSON(t){const e=super.toJSON(t);return e.object.sh=this.sh.toArray(),e}}class od extends Ye{constructor(t){super(t),this.textures={}}load(t,e,i,s){const o=this,l=new Ai(o.manager);l.setPath(o.path),l.setRequestHeader(o.requestHeader),l.setWithCredentials(o.withCredentials),l.load(t,function(u){try{e(o.parse(JSON.parse(u)))}catch(h){s?s(h):console.error(h),o.manager.itemError(t)}},i,s)}parse(t){const e=this.textures;function i(o){return e[o]===void 0&&console.warn("THREE.MaterialLoader: Undefined texture",o),e[o]}const s=this.createMaterialFromType(t.type);if(t.uuid!==void 0&&(s.uuid=t.uuid),t.name!==void 0&&(s.name=t.name),t.color!==void 0&&s.color!==void 0&&s.color.setHex(t.color),t.roughness!==void 0&&(s.roughness=t.roughness),t.metalness!==void 0&&(s.metalness=t.metalness),t.sheen!==void 0&&(s.sheen=t.sheen),t.sheenColor!==void 0&&(s.sheenColor=new gt().setHex(t.sheenColor)),t.sheenRoughness!==void 0&&(s.sheenRoughness=t.sheenRoughness),t.emissive!==void 0&&s.emissive!==void 0&&s.emissive.setHex(t.emissive),t.specular!==void 0&&s.specular!==void 0&&s.specular.setHex(t.specular),t.specularIntensity!==void 0&&(s.specularIntensity=t.specularIntensity),t.specularColor!==void 0&&s.specularColor!==void 0&&s.specularColor.setHex(t.specularColor),t.shininess!==void 0&&(s.shininess=t.shininess),t.clearcoat!==void 0&&(s.clearcoat=t.clearcoat),t.clearcoatRoughness!==void 0&&(s.clearcoatRoughness=t.clearcoatRoughness),t.dispersion!==void 0&&(s.dispersion=t.dispersion),t.iridescence!==void 0&&(s.iridescence=t.iridescence),t.iridescenceIOR!==void 0&&(s.iridescenceIOR=t.iridescenceIOR),t.iridescenceThicknessRange!==void 0&&(s.iridescenceThicknessRange=t.iridescenceThicknessRange),t.transmission!==void 0&&(s.transmission=t.transmission),t.thickness!==void 0&&(s.thickness=t.thickness),t.attenuationDistance!==void 0&&(s.attenuationDistance=t.attenuationDistance),t.attenuationColor!==void 0&&s.attenuationColor!==void 0&&s.attenuationColor.setHex(t.attenuationColor),t.anisotropy!==void 0&&(s.anisotropy=t.anisotropy),t.anisotropyRotation!==void 0&&(s.anisotropyRotation=t.anisotropyRotation),t.fog!==void 0&&(s.fog=t.fog),t.flatShading!==void 0&&(s.flatShading=t.flatShading),t.blending!==void 0&&(s.blending=t.blending),t.combine!==void 0&&(s.combine=t.combine),t.side!==void 0&&(s.side=t.side),t.shadowSide!==void 0&&(s.shadowSide=t.shadowSide),t.opacity!==void 0&&(s.op
vendor: 60,582 bytes, line 83
83acity=t.opacity),t.transparent!==void 0&&(s.transparent=t.transparent),t.alphaTest!==void 0&&(s.alphaTest=t.alphaTest),t.alphaHash!==void 0&&(s.alphaHash=t.alphaHash),t.depthFunc!==void 0&&(s.depthFunc=t.depthFunc),t.depthTest!==void 0&&(s.depthTest=t.depthTest),t.depthWrite!==void 0&&(s.depthWrite=t.depthWrite),t.colorWrite!==void 0&&(s.colorWrite=t.colorWrite),t.blendSrc!==void 0&&(s.blendSrc=t.blendSrc),t.blendDst!==void 0&&(s.blendDst=t.blendDst),t.blendEquation!==void 0&&(s.blendEquation=t.blendEquation),t.blendSrcAlpha!==void 0&&(s.blendSrcAlpha=t.blendSrcAlpha),t.blendDstAlpha!==void 0&&(s.blendDstAlpha=t.blendDstAlpha),t.blendEquationAlpha!==void 0&&(s.blendEquationAlpha=t.blendEquationAlpha),t.blendColor!==void 0&&s.blendColor!==void 0&&s.blendColor.setHex(t.blendColor),t.blendAlpha!==void 0&&(s.blendAlpha=t.blendAlpha),t.stencilWriteMask!==void 0&&(s.stencilWriteMask=t.stencilWriteMask),t.stencilFunc!==void 0&&(s.stencilFunc=t.stencilFunc),t.stencilRef!==void 0&&(s.stencilRef=t.stencilRef),t.stencilFuncMask!==void 0&&(s.stencilFuncMask=t.stencilFuncMask),t.stencilFail!==void 0&&(s.stencilFail=t.stencilFail),t.stencilZFail!==void 0&&(s.stencilZFail=t.stencilZFail),t.stencilZPass!==void 0&&(s.stencilZPass=t.stencilZPass),t.stencilWrite!==void 0&&(s.stencilWrite=t.stencilWrite),t.wireframe!==void 0&&(s.wireframe=t.wireframe),t.wireframeLinewidth!==void 0&&(s.wireframeLinewidth=t.wireframeLinewidth),t.wireframeLinecap!==void 0&&(s.wireframeLinecap=t.wireframeLinecap),t.wireframeLinejoin!==void 0&&(s.wireframeLinejoin=t.wireframeLinejoin),t.rotation!==void 0&&(s.rotation=t.rotation),t.linewidth!==void 0&&(s.linewidth=t.linewidth),t.dashSize!==void 0&&(s.dashSize=t.dashSize),t.gapSize!==void 0&&(s.gapSize=t.gapSize),t.scale!==void 0&&(s.scale=t.scale),t.polygonOffset!==void 0&&(s.polygonOffset=t.polygonOffset),t.polygonOffsetFactor!==void 0&&(s.polygonOffsetFactor=t.polygonOffsetFactor),t.polygonOffsetUnits!==void 0&&(s.polygonOffsetUnits=t.polygonOffsetUnits),t.dithering!==void 0&&(s.dithering=t.dithering),t.alphaToCoverage!==void 0&&(s.alphaToCoverage=t.alphaToCoverage),t.premultipliedAlpha!==void 0&&(s.premultipliedAlpha=t.premultipliedAlpha),t.forceSinglePass!==void 0&&(s.forceSinglePass=t.forceSinglePass),t.visible!==void 0&&(s.visible=t.visible),t.toneMapped!==void 0&&(s.toneMapped=t.toneMapped),t.userData!==void 0&&(s.userData=t.userData),t.vertexColors!==void 0&&(typeof t.vertexColors=="number"?s.vertexColors=t.vertexColors>0:s.vertexColors=t.vertexColors),t.uniforms!==void 0)for(const o in t.uniforms){const l=t.uniforms[o];switch(s.uniforms[o]={},l.type){case"t":s.uniforms[o].value=i(l.value);break;case"c":s.uniforms[o].value=new gt().setHex(l.value);break;case"v2":s.uniforms[o].value=new G().fromArray(l.value);break;case"v3":s.uniforms[o].value=new z().fromArray(l.value);break;case"v4":s.uniforms[o].value=new he().fromArray(l.value);break;case"m3":s.uniforms[o].value=new An().fromArray(l.value);break;case"m4":s.uniforms[o].value=new wt().fromArray(l.value);break;default:s.uniforms[o].value=l.value}}if(t.defines!==void 0&&(s.defines=t.defines),t.vertexShader!==void 0&&(s.vertexShader=t.vertexShader),t.fragmentShader!==void 0&&(s.fragmentShader=t.fragmentShader),t.glslVersion!==void 0&&(s.glslVersion=t.glslVersion),t.extensions!==void 0)for(const o in t.extensions)s.extensions[o]=t.extensions[o];if(t.lights!==void 0&&(s.lights=t.lights),t.clipping!==void 0&&(s.clipping=t.clipping),t.size!==void 0&&(s.size=t.size),t.sizeAttenuation!==void 0&&(s.sizeAttenuation=t.sizeAttenuation),t.map!==void 0&&(s.map=i(t.map)),t.matcap!==void 0&&(s.matcap=i(t.matcap)),t.alphaMap!==void 0&&(s.alphaMap=i(t.alphaMap)),t.bumpMap!==void 0&&(s.bumpMap=i(t.bumpMap)),t.bumpScale!==void 0&&(s.bumpScale=t.bumpScale),t.normalMap!==void 0&&(s.normalMap=i(t.normalMap)),t.normalMapType!==void 0&&(s.normalMapType=t.normalMapType),t.normalScale!==void 0){let o=t.normalScale;Array.isArray(o)===!1&&(o=[o,o]),s.normalScale=new G().fromArray(o)}return t.displacementMap!==void 0&&(s.displacementMap=i(t.displacementMap)),t.displacementScale!==void 0&&(s.displacementScale=t.displacementScale),t.displacementBias!==void 0&&(s.displacementBias=t.displacementBias),t.roughnessMap!==void 0&&(s.roughnessMap=i(t.roughnessMap)),t.metalnessMap!==void 0&&(s.metalnessMap=i(t.metalnessMap)),t.emissiveMap!==void 0&&(s.emissiveMap=i(t.emissiveMap)),t.emissiveIntensity!==void 0&&(s.emissiveIntensity=t.emissiveIntensity),t.specularMap!==void 0&&(s.specularMap=i(t.specularMap)),t.specularIntensityMap!==void 0&&(s.specularIntensityMap=i(t.specularIntensityMap)),t.specularColorMap!==void 0&&(s.specularColorMap=i(t.specularColorMap)),t.envMap!==void 0&&(s.envMap=i(t.envMap)),t.envMapRotation!==void 0&&s.envMapRotation.fromArray(t.envMapRotation),t.envMapIntensity!==void 0&&(s.envMapIntensity=t.envMapIntensity),t.reflectivity!==void 0&&(s.reflectivity=t.reflectivity),t.refractionRatio!==void 0&&(s.refractionRatio=t.refractionRatio),t.lightMap!==void 0&&(s.lightMap=i(t.lightMap)),t.lightMapIntensity!==void 0&&(s.lightMapIntensity=t.lightMapIntensity),t.aoMap!==void 0&&(s.aoMap=i(t.aoMap)),t.aoMapIntensity!==void 0&&(s.aoMapIntensity=t.aoMapIntensity),t.gradientMap!==void 0&&(s.gradientMap=i(t.gradientMap)),t.clearcoatMap!==void 0&&(s.clearcoatMap=i(t.clearcoatMap)),t.clearcoatRoughnessMap!==void 0&&(s.clearcoatRoughnessMap=i(t.clearcoatRoughnessMap)),t.clearcoatNormalMap!==void 0&&(s.clearcoatNormalMap=i(t.clearcoatNormalMap)),t.clearcoatNormalScale!==void 0&&(s.clearcoatNormalScale=new G().fromArray(t.clearcoatNormalScale)),t.iridescenceMap!==void 0&&(s.iridescenceMap=i(t.iridescenceMap)),t.iridescenceThicknessMap!==void 0&&(s.iridescenceThicknessMap=i(t.iridescenceThicknessMap)),t.transmissionMap!==void 0&&(s.transmissionMap=i(t.transmissionMap)),t.thicknessMap!==void 0&&(s.thicknessMap=i(t.thicknessMap)),t.anisotropyMap!==void 0&&(s.anisotropyMap=i(t.anisotropyMap)),t.sheenColorMap!==void 0&&(s.sheenColorMap=i(t.sheenColorMap)),t.sheenRoughnessMap!==void 0&&(s.sheenRoughnessMap=i(t.sheenRoughnessMap)),s}setTextures(t){return this.textures=t,this}createMaterialFromType(t){return od.createMaterialFromType(t)}static createMaterialFromType(t){const e={ShadowMaterial:hw,SpriteMaterial:By,RawShaderMaterial:cw,ShaderMaterial:Bc,PointsMaterial:Dy,MeshPhysicalMaterial:dw,MeshStandardMaterial:Zy,MeshPhongMaterial:fw,MeshToonMaterial:pw,MeshNormalMaterial:mw,MeshLambertMaterial:yw,MeshDepthMaterial:gw,MeshDistanceMaterial:xw,MeshBasicMaterial:rr,MeshMatcapMaterial:vw,LineDashedMaterial:ww,LineBasicMaterial:Ne,Material:Ae};return new e[t]}}class oy{static decodeText(t){if(console.warn("THREE.LoaderUtils: decodeText() has been deprecated with r165 and will be removed with r175. Use TextDecoder instead."),typeof TextDecoder<"u")return new TextDecoder().decode(t);let e="";for(let i=0,s=t.length;i<s;i++)e+=String.fromCharCode(t[i]);try{return decodeURIComponent(escape(e))}catch{return e}}static extractUrlBase(t){const e=t.lastIndexOf("/");return e===-1?"./":t.slice(0,e+1)}static resolveURL(t,e){return typeof t!="string"||t===""?"":(/^https?:\/\//i.test(e)&&/^\//.test(t)&&(e=e.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(t)||/^data:.*,.*$/i.test(t)||/^blob:.*$/i.test(t)?t:e+t)}}class Vw extends St{constructor(){super(),this.isInstancedBufferGeometry=!0,this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(t){return super.copy(t),this.instanceCount=t.instanceCount,this}toJSON(){const t=super.toJSON();return t.instanceCount=this.instanceCount,t.isInstancedBufferGeometry=!0,t}}class Uw extends Ye{constructor(t){super(t)}load(t,e,i,s){const o=this,l=new Ai(o.manager);l.setPath(o.path),l.setRequestHeader(o.requestHeader),l.setWithCredentials(o.withCredentials),l.load(t,function(u){try{e(o.parse(JSON.parse(u)))}catch(h){s?s(h):console.error(h),o.manager.itemError(t)}},i,s)}parse(t){const e={},i={};function s(v,w){if(e[w]!==void 0)return e[w];const _=v.interleavedBuffers[w],b=o(v,_.buffer),A=js(_.type,b),C=new Vc(A,_.stride);return C.uuid=_.uuid,e[w]=C,C}function o(v,w){if(i[w]!==void 0)return i[w];const _=v.arrayBuffers[w],b=new Uint32Array(_).buffer;return i[w]=b,b}const l=t.isInstancedBufferGeometry?new Vw:new St,u=t.data.index;if(u!==void 0){const v=js(u.type,u.array);l.setIndex(new Zt(v,1))}const h=t.data.attributes;for(const v in h){const w=h[v];let S;if(w.isInterleavedBufferAttribute){const _=s(t.data,w.data);S=new ir(_,w.itemSize,w.offset,w.normalized)}else{const _=js(w.type,w.array),b=w.isInstancedBufferAttribute?po:Zt;S=new b(_,w.itemSize,w.normalized)}w.name!==void 0&&(S.name=w.name),w.usage!==void 0&&S.setUsage(w.usage),l.setAttribute(v,S)}const d=t.data.morphAttributes;if(d)for(const v in d){const w=d[v],S=[];for(let _=0,b=w.length;_<b;_++){const A=w[_];let C;if(A.isInterleavedBufferAttribute){const k=s(t.data,A.data);C=new ir(k,A.itemSize,A.offset,A.normalized)}else{const k=js(A.type,A.array);C=new Zt(k,A.itemSize,A.normalized)}A.name!==void 0&&(C.name=A.name),S.push(C)}l.morphAttributes[v]=S}t.data.morphTargetsRelative&&(l.morphTargetsRelative=!0);const y=t.data.groups||t.data.drawcalls||t.data.offsets;if(y!==void 0)for(let v=0,w=y.length;v!==w;++v){const S=y[v];l.addGroup(S.start,S.count,S.materialIndex)}const x=t.data.boundingSphere;if(x!==void 0){const v=new z;x.center!==void 0&&v.fromArray(x.center),l.boundingSphere=new be(v,x.radius)}return t.name&&(l.name=t.name),t.userData&&(l.userData=t.userData),l}}class N_ extends Ye{constructor(t){super(t)}load(t,e,i,s){const o=this,l=this.path===""?oy.extractUrlBase(t):this.path;this.resourcePath=this.resourcePath||l;const u=new Ai(this.manager);u.setPath(this.path),u.setRequestHeader(this.requestHeader),u.setWithCredentials(this.withCredentials),u.load(t,function(h){let d=null;try{d=JSON.parse(h)}catch(y){s!==void 0&&s(y),console.error("THREE:ObjectLoader: Can't parse "+t+".",y.message);return}const m=d.metadata;if(m===void 0||m.type===void 0||m.type.toLowerCase()==="geometry"){s!==void 0&&s(new Error("THREE.ObjectLoader: Can't load "+t)),console.error("THREE.ObjectLoader: Can't load "+t);return}o.parse(d,e)},i,s)}async loadAsync(t,e){const i=this,s=this.path===""?oy.extractUrlBase(t):this.path;this.resourcePath=this.resourcePath||s;const o=new Ai(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials);const l=await o.loadAsync(t,e),u=JSON.parse(l),h=u.metadata;if(h===void 0||h.type===void 0||h.type.toLowerCase()==="geometry")throw new Error("THREE.ObjectLoader: Can't load "+t);return await i.parseAsync(u)}parse(t,e){const i=this.parseAnimations(t.animations),s=this.parseShapes(t.shapes),o=this.parseGeometries(t.geometries,s),l=this.parseImages(t.images,function(){e!==void 0&&e(d)}),u=this.parseTextures(t.textures,l),h=this.parseMaterials(t.materials,u),d=this.parseObject(t.object,o,h,u,i),m=this.parseSkeletons(t.skeletons,d);if(this.bindSkeletons(d,m),this.bindLightTargets(d),e!==void 0){let y=!1;for(const x in l)if(l[x].data instanceof HTMLImageElement){y=!0;break}y===!1&&e(d)}return d}async parseAsync(t){const e=this.parseAnimations(t.animations),i=this.parseShapes(t.shapes),s=this.parseGeometries(t.geometries,i),o=await this.parseImagesAsync(t.images),l=this.parseTextures(t.textures,o),u=this.parseMaterials(t.materials,l),h=this.parseObject(t.object,s,u,l,e),d=this.parseSkeletons(t.skeletons,h);return this.bindSkeletons(h,d),this.bindLightTargets(h),h}parseShapes(t){const e={};if(t!==void 0)for(let i=0,s=t.length;i<s;i++){const o=new er().fromJSON(t[i]);e[o.uuid]=o}return e}parseSkeletons(t,e){const i={},s={};if(e.traverse(function(o){o.isBone&&(s[o.uuid]=o)}),t!==void 0)for(let o=0,l=t.length;o<l;o++){const u=new Uc().fromJSON(t[o],s);i[u.uuid]=u}return i}parseGeometries(t,e){const i={};if(t!==void 0){const s=new Uw;for(let o=0,l=t.length;o<l;o++){let u;const h=t[o];switch(h.type){case"BufferGeometry":case"InstancedBufferGeometry":u=s.parse(h);break;default:h.type in ny?u=ny[h.type].fromJSON(h,e):console.warn(`THREE.ObjectLoader: Unsupported geometry type "${h.type}"`)}u.uuid=h.uuid,h.name!==void 0&&(u.name=h.name),h.userData!==void 0&&(u.userData=h.userData),i[h.uuid]=u}}return i}parseMaterials(t,e){const i={},s={};if(t!==void 0){const o=new od;o.setTextures(e);for(let l=0,u=t.length;l<u;l++){const h=t[l];i[h.uuid]===void 0&&(i[h.uuid]=o.parse(h)),s[h.uuid]=i[h.uuid]}}return s}parseAnimations(t){const e={};if(t!==void 0)for(let i=0;i<t.length;i++){const s=t[i],o=zl.parse(s);e[o.uuid]=o}return e}parseImages(t,e){const i=this,s={};let o;function l(h){return i.manager.itemStart(h),o.load(h,function(){i.manager.itemEnd(h)},void 0,function(){i.manager.itemError(h),i.manager.itemEnd(h)})}function u(h){if(typeof h=="string"){const d=h,m=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(d)?d:i.resourcePath+d;return l(m)}else return h.data?{data:js(h.type,h.data),width:h.width,height:h.height}:null}if(t!==void 0&&t.length>0){const h=new Ky(e);o=new Il(h),o.setCrossOrigin(this.crossOrigin);for(let d=0,m=t.length;d<m;d++){const y=t[d],x=y.url;if(Array.isArray(x)){const v=[];for(let w=0,S=x.length;w<S;w++){const _=x[w],b=u(_);b!==null&&(b instanceof HTMLImageElement?v.push(b):v.push(new Xn(b.data,b.width,b.height)))}s[y.uuid]=new Qs(v)}else{const v=u(y.url);s[y.uuid]=new Qs(v)}}}return s}async parseImagesAsync(t){const e=this,i={};let s;async function o(l){if(typeof l=="string"){const u=l,h=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(u)?u:e.resourcePath+u;return await s.loadAsync(h)}else return l.data?{data:js(l.type,l.data),width:l.width,height:l.height}:null}if(t!==void 0&&t.length>0){s=new Il(this.manager),s.setCrossOrigin(this.crossOrigin);for(let l=0,u=t.length;l<u;l++){const h=t[l],d=h.url;if(Array.isArray(d)){const m=[];for(let y=0,x=d.length;y<x;y++){const v=d[y],w=await o(v);w!==null&&(w instanceof HTMLImageElement?m.push(w):m.push(new Xn(w.data,w.width,w.height)))}i[h.uuid]=new Qs(m)}else{const m=await o(h.url);i[h.uuid]=new Qs(m)}}}return i}parseTextures(t,e){function i(o,l){return typeof o=="number"?o:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",o),l[o])}const s={};if(t!==void 0)for(let o=0,l=t.length;o<l;o++){const u=t[o];u.image===void 0&&console.warn('THREE.ObjectLoader: No "image" specified for',u.uuid),e[u.image]===void 0&&console.warn("THREE.ObjectLoader: Undefined image",u.image);const h=e[u.image],d=h.data;let m;Array.isArray(d)?(m=new Oc,d.length===6&&(m.needsUpdate=!0)):(d&&d.data?m=new Xn:m=new re,d&&(m.needsUpdate=!0)),m.source=h,m.uuid=u.uuid,u.name!==void 0&&(m.name=u.name),u.mapping!==void 0&&(m.mapping=i(u.mapping,Ww)),u.channel!==void 0&&(m.channel=u.channel),u.offset!==void 0&&m.offset.fromArray(u.offset),u.repeat!==void 0&&m.repeat.fromArray(u.repeat),u.center!==void 0&&m.center.fromArray(u.center),u.rotation!==void 0&&(m.rotation=u.rotation),u.wrap!==void 0&&(m.wrapS=i(u.wrap[0],ay),m.wrapT=i(u.wrap[1],ay)),u.format!==void 0&&(m.format=u.format),u.internalFormat!==void 0&&(m.internalFormat=u.internalFormat),u.type!==void 0&&(m.type=u.type),u.colorSpace!==void 0&&(m.colorSpace=u.colorSpace),u.minFilter!==void 0&&(m.minFilter=i(u.minFilter,ly)),u.magFilter!==void 0&&(m.magFilter=i(u.magFilter,ly)),u.anisotropy!==void 0&&(m.anisotropy=u.anisotropy),u.flipY!==void 0&&(m.flipY=u.flipY),u.generateMipmaps!==void 0&&(m.generateMipmaps=u.generateMipmaps),u.premultiplyAlpha!==void 0&&(m.premultiplyAlpha=u.premultiplyAlpha),u.unpackAlignment!==void 0&&(m.unpackAlignment=u.unpackAlignment),u.compareFunction!==void 0&&(m.compareFunction=u.compareFunction),u.userData!==void 0&&(m.userData=u.userData),s[u.uuid]=m}return s}parseObject(t,e,i,s,o){let l;function u(x){return e[x]===void 0&&console.warn("THREE.ObjectLoader: Undefined geometry",x),e[x]}function h(x){if(x!==void 0){if(Array.isArray(x)){const v=[];for(let w=0,S=x.length;w<S;w++){const _=x[w];i[_]===void 0&&console.warn("THREE.ObjectLoader: Undefined material",_),v.push(i[_])}return v}return i[x]===void 0&&console.warn("THREE.ObjectLoader: Undefined material",x),i[x]}}function d(x){return s[x]===void 0&&console.warn("THREE.ObjectLoader: Undefined texture",x),s[x]}let m,y;switch(t.type){case"Scene":l=new hv,t.background!==void 0&&(Number.isInteger(t.background)?l.background=new gt(t.background):l.background=d(t.background)),t.environment!==void 0&&(l.environment=d(t.environment)),t.fog!==void 0&&(t.fog.type==="Fog"?l.fog=new Dc(t.fog.color,t.fog.near,t.fog.far):t.fog.type==="FogExp2"&&(l.fog=new Lc(t.fog.color,t.fog.density)),t.fog.name!==""&&(l.fog.name=t.fog.name)),t.backgroundBlurriness!==void 0&&(l.backgroundBlurriness=t.backgroundBlurriness),t.backgroundIntensity!==void 0&&(l.backgroundIntensity=t.backgroundIntensity),t.backgroundRotation!==void 0&&l.backgroundRotation.fromArray(t.backgroundRotation),t.environmentIntensity!==void 0&&(l.environmentIntensity=t.environmentIntensity),t.environmentRotation!==void 0&&l.environmentRotation.fromArray(t.environmentRotation);break;case"PerspectiveCamera":l=new sn(t.fov,t.aspect,t.near,t.far),t.focus!==void 0&&(l.focus=t.focus),t.zoom!==void 0&&(l.zoom=t.zoom),t.filmGauge!==void 0&&(l.filmGauge=t.filmGauge),t.filmOffset!==void 0&&(l.filmOffset=t.filmOffset),t.view!==void 0&&(l.view=Object.assign({},t.view));break;case"OrthographicCamera":l=new t0(t.left,t.right,t.top,t.bottom,t.near,t.far),t.zoom!==void 0&&(l.zoom=t.zoom),t.view!==void 0&&(l.view=Object.assign({},t.view));break;case"AmbientLight":l=new Nw(t.color,t.intensity);break;case"DirectionalLight":l=new Bw(t.color,t.intensity),l.target=t.target||"";break;case"PointLight":l=new Fw(t.color,t.intensity,t.distance,t.decay);break;case"RectAreaLight":l=new Ow(t.color,t.intensity,t.width,t.height);break;case"SpotLight":l=new Ew(t.color,t.intensity,t.distance,t.angle,t.penumbra,t.decay),l.target=t.target||"";break;case"HemisphereLight":l=new zw(t.color,t.groundColor,t.intensity);break;case"LightProbe":l=new Dw().fromJSON(t);break;case"SkinnedMesh":m=u(t.geometry),y=h(t.material),l=new pv(m,y),t.bindMode!==void 0&&(l.bindMode=t.bindMode),t.bindMatrix!==void 0&&l.bindMatrix.fromArray(t.bindMatrix),t.skeleton!==void 0&&(l.skeleton=t.skeleton);break;case"Mesh":m=u(t.geometry),y=h(t.material),l=new gn(m,y);break;case"InstancedMesh":m=u(t.geometry),y=h(t.material);const x=t.count,v=t.instanceMatrix,w=t.instanceColor;l=new gv(m,y,x),l.instanceMatrix=new po(new Float32Array(v.array),16),w!==void 0&&(l.instanceColor=new po(new Float32Array(w.array),w.itemSize));break;case"BatchedMesh":m=u(t.geometry),y=h(t.material),l=new Cv(t.maxInstanceCount,t.maxVertexCount,t.maxIndexCount,y),l.geometry=m,l.perObjectFrustumCulled=t.perObjectFrustumCulled,l.sortObjects=t.sortObjects,l._drawRanges=t.drawRanges,l._reservedRanges=t.reservedRanges,l._visibility=t.visibility,l._active=t.active,l._bounds=t.bounds.map(S=>{const _=new Be;_.min.fromArray(S.boxMin),_.max.fromArray(S.boxMax);const b=new be;return b.radius=S.sphereRadius,b.center.fromArray(S.sphereCenter),{boxInitialized:S.boxInitialized,box:_,sphereInitialized:S.sphereInitialized,sphere:b}}),l._maxInstanceCount=t.maxInstanceCount,l._maxVertexCount=t.maxVertexCount,l._maxIndexCount=t.maxIndexCount,l._geometryInitialized=t.geometryInitialized,l._geometryCount=t.geometryCount,l._matricesTexture=d(t.matricesTexture.uuid),t.colorsTexture!==void 0&&(l._colorsTexture=d(t.colorsTexture.uuid));break;case"LOD":l=new dv;break;case"Line":l=new Ki(u(t.geometry),h(t.material));break;case"LineLoop":l=new Tv(u(t.geometry),h(t.material));break;case"LineSegments":l=new Zn(u(t.geometry),h(t.material));break;case"PointCloud":case"Points":l=new kv(u(t.geometry),h(t.material));break;case"Sprite":l=new cv(h(t.material));break;case"Group":l=new zv;break;case"Bone":l=new Oy;break;default:l=new Bt}if(l.uuid=t.uuid,t.name!==void 0&&(l.name=t.name),t.matrix!==void 0?(l.matrix.fromArray(t.matrix),t.matrixAutoUpdate!==void 0&&(l.matrixAutoUpdate=t.matrixAutoUpdate),l.matrixAutoUpdate&&l.matrix.decompose(l.position,l.quaternion,l.scale)):(t.position!==void 0&&l.position.fromArray(t.position),t.rotation!==void 0&&l.rotation.fromArray(t.rotation),t.quaternion!==void 0&&l.quaternion.fromArray(t.quaternion),t.scale!==void 0&&l.scale.fromArray(t.scale)),t.up!==void 0&&l.up.fromArray(t.up),t.castShadow!==void 0&&(l.castShadow=t.castShadow),t.receiveShadow!==void 0&&(l.receiveShadow=t.receiveShadow),t.shadow&&(t.shadow.intensity!==void 0&&(l.shadow.intensity=t.shadow.intensity),t.shadow.bias!==void 0&&(l.shadow.bias=t.shadow.bias),t.shadow.normalBias!==void 0&&(l.shadow.normalBias=t.shadow.normalBias),t.shadow.radius!==void 0&&(l.shadow.radius=t.shadow.radius),t.shadow.mapSize!==void 0&&l.shadow.mapSize.fromArray(t.shadow.mapSize),t.shadow.camera!==void 0&&(l.shadow.camera=this.parseObject(t.shadow.camera))),t.visible!==void 0&&(l.visible=t.visible),t.frustumCulled!==void 0&&(l.frustumCulled=t.frustumCulled),t.renderOrder!==void 0&&(l.renderOrder=t.renderOrder),t.userData!==void 0&&(l.userData=t.userData),t.layers!==void 0&&(l.layers.mask=t.layers),t.children!==void 0){const x=t.children;for(let v=0;v<x.length;v++)l.add(this.parseObject(x[v],e,i,s,o))}if(t.animations!==void 0){const x=t.animations;for(let v=0;v<x.length;v++){const w=x[v];l.animations.push(o[w])}}if(t.type==="LOD"){t.autoUpdate!==void 0&&(l.autoUpdate=t.autoUpdate);const x=t.levels;for(let v=0;v<x.length;v++){const w=x[v],S=l.getObjectByProperty("uuid",w.object);S!==void 0&&l.addLevel(S,w.distance,w.hysteresis)}}return l}bindSkeletons(t,e){Object.keys(e).length!==0&&t.traverse(function(i){if(i.isSkinnedMesh===!0&&i.skeleton!==void 0){const s=e[i.skeleton];s===void 0?console.warn("THREE.ObjectLoader: No skeleton found with UUID:",i.skeleton):i.bind(s,i.bindMatrix)}})}bindLightTargets(t){t.traverse(function(e){if(e.isDirectionalLight||e.isSpotLight){const i=e.target,s=t.getObjectByProperty("uuid",i);s!==void 0?e.target=s:e.target=new Bt}})}}const Ww={UVMapping:Ic,CubeReflectionMapping:Ec,CubeRefractionMapping:yx,EquirectangularReflectionMapping:gx,EquirectangularRefractionMapping:xx,CubeUVReflectionMapping:vx},ay={RepeatWrapping:wc,ClampToEdgeWrapping:_n,MirroredRepeatWrapping:Mc},ly={NearestFilter:yn,NearestMipmapNearestFilter:wx,NearestMipmapLinearFilter:Mx,LinearFilter:rn,LinearMipmapNearestFilter:Sx,LinearMipmapLinearFilter:Pl};class O_ extends Ye{constructor(t){super(t),this.isImageBitmapLoader=!0,typeof createImageBitmap>"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(t){return this.options=t,this}load(t,e,i,s){t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);const o=this,l=bi.get(t);if(l!==void 0){if(o.manager.itemStart(t),l.then){l.then(d=>{e&&e(d),o.manager.itemEnd(t)}).catch(d=>{s&&s(d)});return}return setTimeout(function(){e&&e(l),o.manager.itemEnd(t)},0),l}const u={};u.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",u.headers=this.requestHeader;const h=fetch(t,u).then(function(d){return d.blob()}).then(function(d){return createImageBitmap(d,Object.assign(o.options,{colorSpaceConversion:"none"}))}).then(function(d){return bi.add(t,d),e&&e(d),o.manager.itemEnd(t),d}).catch(function(d){s&&s(d),bi.remove(t),o.manager.itemError(t),o.manager.itemEnd(t)});bi.add(t,h),o.manager.itemStart(t)}}let hl;class e0{static getContext(){return hl===void 0&&(hl=new(window.AudioContext||window.webkitAudioContext)),hl}static setContext(t){hl=t}}class L_ extends Ye{constructor(t){super(t)}load(t,e,i,s){const o=this,l=new Ai(this.manager);l.setResponseType("arraybuffer"),l.setPath(this.path),l.setRequestHeader(this.requestHeader),l.setWithCredentials(this.withCredentials),l.load(t,function(h){try{const d=h.slice(0);e0.getContext().decodeAudioData(d,function(y){e(y)}).catch(u)}catch(d){u(d)}},i,s);function u(h){s?s(h):console.error(h),o.manager.itemError(t)}}}const uy=new wt,hy=new wt,Xi=new wt;class D_{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new sn,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new sn,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(t){const e=this._cache;if(e.focus!==t.focus||e.fov!==t.fov||e.aspect!==t.aspect*this.aspect||e.near!==t.near||e.far!==t.far||e.zoom!==t.zoom||e.eyeSep!==this.eyeSep){e.focus=t.focus,e.fov=t.fov,e.aspect=t.aspect*this.aspect,e.near=t.near,e.far=t.far,e.zoom=t.zoom,e.eyeSep=this.eyeSep,Xi.copy(t.projectionMatrix);const s=e.eyeSep/2,o=s*e.near/e.focus,l=e.near*Math.tan(Qi*e.fov*.5)/e.zoom;let u,h;hy.elements[12]=-s,uy.elements[12]=s,u=-l*e.aspect+o,h=l*e.aspect+o,Xi.elements[0]=2*e.near/(h-u),Xi.elements[8]=(h+u)/(h-u),this.cameraL.projectionMatrix.copy(Xi),u=-l*e.aspect-o,h=l*e.aspect-o,Xi.elements[0]=2*e.near/(h-u),Xi.elements[8]=(h+u)/(h-u),this.cameraR.projectionMatrix.copy(Xi)}this.cameraL.matrixWorld.copy(t.matrixWorld).multiply(hy),this.cameraR.matrixWorld.copy(t.matrixWorld).multiply(uy)}}class V_ extends sn{constructor(t=[]){super(),this.isArrayCamera=!0,this.cameras=t}}class Hw{constructor(t=!0){this.autoStart=t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=cy(),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 t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const e=cy();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}function cy(){return performance.now()}const Yi=new z,dy=new Xe,Gw=new z,Zi=new z;class U_ extends Bt{constructor(){super(),this.type="AudioListener",this.context=e0.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new Hw}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(t){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=t,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}updateMatrixWorld(t){super.updateMatrixWorld(t);const e=this.context.listener,i=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(Yi,dy,Gw),Zi.set(0,0,-1).applyQuaternion(dy),e.positionX){const s=this.context.currentTime+this.timeDelta;e.positionX.linearRampToValueAtTime(Yi.x,s),e.positionY.linearRampToValueAtTime(Yi.y,s),e.positionZ.linearRampToValueAtTime(Yi.z,s),e.forwardX.linearRampToValueAtTime(Zi.x,s),e.forwardY.linearRampToValueAtTime(Zi.y,s),e.forwardZ.linearRampToValueAtTime(Zi.z,s),e.upX.linearRampToValueAtTime(i.x,s),e.upY.linearRampToValueAtTime(i.y,s),e.upZ.linearRampToValueAtTime(i.z,s)}else e.setPosition(Yi.x,Yi.y,Yi.z),e.setOrientation(Zi.x,Zi.y,Zi.z,i.x,i.y,i.z)}}class qw extends Bt{constructor(t){super(),this.type="Audio",this.listener=t,this.context=t.context,this.gain=this.context.createGain(),this.gain.connect(t.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(t){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=t,this.connect(),this}setMediaElementSource(t){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(t),this.connect(),this}setMediaStreamSource(t){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(t),this.connect(),this}setBuffer(t){return this.buffer=t,this.sourceType="buffer",this.autoplay&&this.play(),this}play(t=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+t;const e=this.context.createBufferSource();return e.buffer=this.buffer,e.loop=this.loop,e.loopStart=this.loopStart,e.loopEnd=this.loopEnd,e.onended=this.onEnded.bind(this),e.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=e,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(t=0){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.context.currentTime+t),this.source.onended=null),this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let t=1,e=this.filters.length;t<e;t++)this.filters[t-1].connect(this.filters[t]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this._connected=!0,this}disconnect(){if(this._connected!==!1){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(let t=1,e=this.filters.length;t<e;t++)this.filters[t-1].disconnect(this.filters[t]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this._connected=!1,this}}getFilters(){return this.filters}setFilters(t){return t||(t=[]),this._connected===!0?(this.disconnect(),this.filters=t.slice(),this.connect()):this.filters=t.slice(),this}setDetune(t){return this.detune=t,this.isPlaying===!0&&this.source.detune!==void 0&&this.source.detune.setTargetAtTime(this.detune,this.context.currentTime,.01),this}getDetune(){return this.detune}getFilter(){return this.getFilters()[0]}setFilter(t){return this.setFilters(t?[t]:[])}setPlaybackRate(t){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.playbackRate=t,this.isPlaying===!0&&this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,.01),this}getPlaybackRate(){return this.playbackRate}onEnded(){this.isPlaying=!1,this._progress=0}getLoop(){return this.hasPlaybackControl===!1?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop}setLoop(t){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.loop=t,this.isPlaying===!0&&(this.source.loop=this.loop),this}setLoopStart(t){return this.loopStart=t,this}setLoopEnd(t){return this.loopEnd=t,this}getVolume(){return this.gain.gain.value}setVolume(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}copy(t,e){return super.copy(t,e),t.sourceType!=="buffer"?(console.warn("THREE.Audio: Audio source type cannot be copied."),this):(this.autoplay=t.autoplay,this.buffer=t.buffer,this.detune=t.detune,this.loop=t.loop,this.loopStart=t.loopStart,this.loopEnd=t.loopEnd,this.offset=t.offset,this.duration=t.duration,this.playbackRate=t.playbackRate,this.hasPlaybackControl=t.hasPlaybackControl,this.sourceType=t.sourceType,this.filters=t.filters.slice(),this)}clone(t){return new this.constructor(this.listener).copy(this,t)}}const Ji=new z,fy=new Xe,Xw=new z,$i=new z;class W_ extends qw{constructor(t){super(t),this.panner=this.context.createPanner(),this.panner.panningModel="HRTF",this.panner.connect(this.gain)}connect(){super.connect(),this.panner.connect(this.gain)}disconnect(){super.disconnect(),this.panner.disconnect(this.gain)}getOutput(){return this.panner}getRefDistance(){return this.panner.refDistance}setRefDistance(t){return this.panner.refDistance=t,this}getRolloffFactor(){return this.panner.rolloffFactor}setRolloffFactor(t){return this.panner.rolloffFactor=t,this}getDistanceModel(){return this.panner.distanceModel}setDistanceModel(t){return this.panner.distanceModel=t,this}getMaxDistance(){return this.panner.maxDistance}setMaxDistance(t){return this.panner.maxDistance=t,this}setDirectionalCone(t,e,i){return this.panner.coneInnerAngle=t,this.panner.coneOuterAngle=e,this.panner.coneOuterGain=i,this}updateMatrixWorld(t){if(super.updateMatrixWorld(t),this.hasPlaybackControl===!0&&this.isPlaying===!1)return;this.matrixWorld.decompose(Ji,fy,Xw),$i.set(0,0,1).applyQuaternion(fy);const e=this.panner;if(e.positionX){const i=this.context.currentTime+this.listener.timeDelta;e.positionX.linearRampToValueAtTime(Ji.x,i),e.positionY.linearRampToValueAtTime(Ji.y,i),e.positionZ.linearRampToValueAtTime(Ji.z,i),e.orientationX.linearRampToValueAtTime($i.x,i),e.orientationY.linearRampToValueAtTime($i.y,i),e.orientationZ.linearRampToValueAtTime($i.z,i)}else e.setPosition(Ji.x,Ji.y,Ji.z),e.setOrientation($i.x,$i.y,$i.z)}}class H_{constructor(t,e=2048){this.analyser=t.context.createAnalyser(),this.analyser.fftSize=e,this.data=new Uint8Array(this.analyser.frequencyBinCount),t.getOutput().connect(this.analyser)}getFrequencyData(){return this.analyser.getByteFrequencyData(this.data),this.data}getAverageFrequency(){let t=0;const e=this.getFrequencyData();for(let i=0;i<e.length;i++)t+=e[i];return t/e.length}}class Yw{constructor(t,e,i){this.binding=t,this.valueSize=i;let s,o,l;switch(e){case"quaternion":s=this._slerp,o=this._slerpAdditive,l=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(i*6),this._workIndex=5;break;case"string":case"bool":s=this._select,o=this._select,l=this._setAdditiveIdentityOther,this.buffer=new Array(i*5);break;default:s=this._lerp,o=this._lerpAdditive,l=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(i*5)}this._mixBufferRegion=s,this._mixBufferRegionAdditive=o,this._setIdentity=l,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}accumulate(t,e){const i=this.buffer,s=this.valueSize,o=t*s+s;let l=this.cumulativeWeight;if(l===0){for(let u=0;u!==s;++u)i[o+u]=i[u];l=e}else{l+=e;const u=e/l;this._mixBufferRegion(i,o,0,u,s)}this.cumulativeWeight=l}accumulateAdditive(t){const e=this.buffer,i=this.valueSize,s=i*this._addIndex;this.cumulativeWeightAdditive===0&&this._setIdentity(),this._mixBufferRegionAdditive(e,s,0,t,i),this.cumulativeWeightAdditive+=t}apply(t){const e=this.valueSize,i=this.buffer,s=t*e+e,o=this.cumulativeWeight,l=this.cumulativeWeightAdditive,u=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,o<1){const h=e*this._origIndex;this._mixBufferRegion(i,s,h,1-o,e)}l>0&&this._mixBufferRegionAdditive(i,s,this._addIndex*e,1,e);for(let h=e,d=e+e;h!==d;++h)if(i[h]!==i[h+e]){u.setValue(i,s);break}}saveOriginalState(){const t=this.binding,e=this.buffer,i=this.valueSize,s=i*this._origIndex;t.getValue(e,s);for(let o=i,l=s;o!==l;++o)e[o]=e[s+o%i];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const t=this.valueSize*3;this.binding.setValue(this.buffer,t)}_setAdditiveIdentityNumeric(){const t=this._addIndex*this.valueSize,e=t+this.valueSize;for(let i=t;i<e;i++)this.buffer[i]=0}_setAdditiveIdentityQuaternion(){this._setAdditiveIdentityNumeric(),this.buffer[this._addIndex*this.valueSize+3]=1}_setAdditiveIdentityOther(){const t=this._origIndex*this.valueSize,e=this._addIndex*this.valueSize;for(let i=0;i<this.valueSize;i++)this.buffer[e+i]=this.buffer[t+i]}_select(t,e,i,s,o){if(s>=.5)for(let l=0;l!==o;++l)t[e+l]=t[i+l]}_slerp(t,e,i,s){Xe.slerpFlat(t,e,t,e,t,i,s)}_slerpAdditive(t,e,i,s,o){const l=this._workIndex*o;Xe.multiplyQuaternionsFlat(t,l,t,e,t,i),Xe.slerpFlat(t,e,t,e,t,l,s)}_lerp(t,e,i,s,o){const l=1-s;for(let u=0;u!==o;++u){const h=e+u;t[h]=t[h]*l+t[i+u]*s}}_lerpAdditive(t,e,i,s,o){for(let l=0;l!==o;++l){const u=e+l;t[u]=t[u]+t[i+l]*s}}}const ad="\\[\\]\\.:\\/",Zw=new RegExp("["+ad+"]","g"),ld="[^"+ad+"]",Jw="[^"+ad.replace("\\.","")+"]",$w=/((?:WC+[\/:])*)/.source.replace("WC",ld),jw=/(WCOD+)?/.source.replace("WCOD",Jw),Qw=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",ld),Kw=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",ld),tM=new RegExp("^"+$w+jw+Qw+Kw+"$"),eM=["material","materials","bones","map"];class nM{constructor(t,e,i){const s=i||Rt.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,s)}getValue(t,e){this.bind();const i=this._targetGroup.nCachedObjects_,s=this._bindings[i];s!==void 0&&s.getValue(t,e)}setValue(t,e){const i=this._bindings;for(let s=this._targetGroup.nCachedObjects_,o=i.length;s!==o;++s)i[s].setValue(t,e)}bind(){const t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,i=t.length;e!==i;++e)t[e].bind()}unbind(){const t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,i=t.length;e!==i;++e)t[e].unbind()}}class Rt{constructor(t,e,i){this.path=e,this.parsedPath=i||Rt.parseTrackName(e),this.node=Rt.findNode(t,this.parsedPath.nodeName),this.rootNode=t,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(t,e,i){return t&&t.isAnimationObjectGroup?new Rt.Composite(t,e,i):new Rt(t,e,i)}static sanitizeNodeName(t){return t.replace(/\s/g,"_").replace(Zw,"")}static parseTrackName(t){const e=tM.exec(t);if(e===null)throw new Error("PropertyBinding: Cannot parse trackName: "+t);const i={nodeName:e[2],objectName:e[3],objectIndex:e[4],propertyName:e[5],propertyIndex:e[6]},s=i.nodeName&&i.nodeName.lastIndexOf(".");if(s!==void 0&&s!==-1){const o=i.nodeName.substring(s+1);eM.indexOf(o)!==-1&&(i.nodeName=i.nodeName.substring(0,s),i.objectName=o)}if(i.propertyName===null||i.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return i}static findNode(t,e){if(e===void 0||e===""||e==="."||e===-1||e===t.name||e===t.uuid)return t;if(t.skeleton){const i=t.skeleton.getBoneByName(e);if(i!==void 0)return i}if(t.children){const i=function(o){for(let l=0;l<o.length;l++){const u=o[l];if(u.name===e||u.uuid===e)return u;const h=i(u.children);if(h)return h}return null},s=i(t.children);if(s)return s}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(t,e){t[e]=this.targetObject[this.propertyName]}_getValue_array(t,e){const i=this.resolvedProperty;for(let s=0,o=i.length;s!==o;++s)t[e++]=i[s]}_getValue_arrayElement(t,e){t[e]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(t,e){this.resolvedProperty.toArray(t,e)}_setValue_direct(t,e){this.targetObject[this.propertyName]=t[e]}_setValue_direct_setNeedsUpdate(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(t,e){const i=this.resolvedProperty;for(let s=0,o=i.length;s!==o;++s)i[s]=t[e++]}_setValue_array_setNeedsUpdate(t,e){const i=this.resolvedProperty;for(let s=0,o=i.length;s!==o;++s)i[s]=t[e++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(t,e){const i=this.resolvedProperty;for(let s=0,o=i.length;s!==o;++s)i[s]=t[e++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(t,e){this.resolvedProperty[this.propertyIndex]=t[e]}_setValue_arrayElement_setNeedsUpdate(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(t,e){this.resolvedProperty.fromArray(t,e)}_setValue_fromArray_setNeedsUpdate(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(t,e){this.bind(),this.getValue(t,e)}_setValue_unbound(t,e){this.bind(),this.setValue(t,e)}bind(){let t=this.node;const e=this.parsedPath,i=e.objectName,s=e.propertyName;let o=e.propertyIndex;if(t||(t=Rt.findNode(this.rootNode,e.nodeName),this.node=t),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!t){console.warn("THREE.PropertyBinding: No target node found for track: "+this.path+".");return}if(i){let d=e.objectIndex;switch(i){case"materials":if(!t.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!t.material.materials){console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);return}t=t.material.materials;break;case"bones":if(!t.skeleton){console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);return}t=t.skeleton.bones;for(let m=0;m<t.length;m++)if(t[m].name===d){d=m;break}break;case"map":if("map"in t){t=t.map;break}if(!t.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!t.material.map){console.error("THREE.PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);return}t=t.material.map;break;default:if(t[i]===void 0){console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);return}t=t[i]}if(d!==void 0){if(t[d]===void 0){console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);return}t=t[d]}}const l=t[s];if(l===void 0){const d=e.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+d+"."+s+" but it wasn't found.",t);return}let u=this.Versioning.None;this.targetObject=t,t.needsUpdate!==void 0?u=this.Versioning.NeedsUpdate:t.matrixWorldNeedsUpdate!==void 0&&(u=this.Versioning.MatrixWorldNeedsUpdate);let h=this.BindingType.Direct;if(o!==void 0){if(s==="morphTargetInfluences"){if(!t.geometry){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);return}if(!t.geometry.morphAttributes){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);return}t.morphTargetDictionary[o]!==void 0&&(o=t.morphTargetDictionary[o])}h=this.BindingType.ArrayElement,this.resolvedProperty=l,this.propertyIndex=o}else l.fromArray!==void 0&&l.toArray!==void 0?(h=this.BindingType.HasFromToArray,this.resolvedProperty=l):Array.isArray(l)?(h=this.BindingType.EntireArray,this.resolvedProperty=l):this.propertyName=s;this.getValue=this.GetterByBindingType[h],this.setValue=this.SetterByBindingTypeAndVersioning[h][u]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}Rt.Composite=nM;Rt.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3};Rt.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2};Rt.prototype.GetterByBindingType=[Rt.prototype._getValue_direct,Rt.prototype._getValue_array,Rt.prototype._getValue_arrayElement,Rt.prototype._getValue_toArray];Rt.prototype.SetterByBindingTypeAndVersioning=[[Rt.prototype._setValue_direct,Rt.prototype._setValue_direct_setNeedsUpdate,Rt.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[Rt.prototype._setValue_array,Rt.prototype._setValue_array_setNeedsUpdate,Rt.prototype._setValue_array_setMatrixWorldNeedsUpdate],[Rt.prototype._setValue_arrayElement,Rt.prototype._setValue_arrayElement_setNeedsUpdate,Rt.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[Rt.prototype._setValue_fromArray,Rt.prototype._setValue_fromArray_setNeedsUpdate,Rt.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];class G_{constructor(){this.isAnimationObjectGroup=!0,this.uuid=qe(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;const t={};this._indicesByUUID=t;for(let i=0,s=arguments.length;i!==s;++i)t[arguments[i].uuid]=i;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};const e=this;this.stats={objects:{get total(){return e._objects.length},get inUse(){return this.total-e.nCachedObjects_}},get bindingsPerObject(){return e._bindings.length}}}add(){const t=this._objects,e=this._indicesByUUID,i=this._paths,s=this._parsedPaths,o=this._bindings,l=o.length;let u,h=t.length,d=this.nCachedObjects_;for(let m=0,y=arguments.length;m!==y;++m){const x=arguments[m],v=x.uuid;let w=e[v];if(w===void 0){w=h++,e[v]=w,t.push(x);for(let S=0,_=l;S!==_;++S)o[S].push(new Rt(x,i[S],s[S]))}else if(w<d){u=t[w];const S=--d,_=t[S];e[_.uuid]=w,t[w]=_,e[v]=S,t[S]=x;for(let b=0,A=l;b!==A;++b){const C=o[b],k=C[S];let N=C[w];C[w]=k,N===void 0&&(N=new Rt(x,i[b],s[b])),C[S]=N}}else t[w]!==u&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=d}remove(){const t=this._objects,e=this._indicesByUUID,i=this._bindings,s=i.length;let o=this.nCachedObjects_;for(let l=0,u=arguments.length;l!==u;++l){const h=arguments[l],d=h.uuid,m=e[d];if(m!==void 0&&m>=o){const y=o++,x=t[y];e[x.uuid]=m,t[m]=x,e[d]=y,t[y]=h;for(let v=0,w=s;v!==w;++v){const S=i[v],_=S[y],b=S[m];S[m]=_,S[y]=b}}}this.nCachedObjects_=o}uncache(){const t=this._objects,e=this._indicesByUUID,i=this._bindings,s=i.length;let o=this.nCachedObjects_,l=t.length;for(let u=0,h=arguments.length;u!==h;++u){const d=arguments[u],m=d.uuid,y=e[m];if(y!==void 0)if(delete e[m],y<o){const x=--o,v=t[x],w=--l,S=t[w];e[v.uuid]=y,t[y]=v,e[S.uuid]=x,t[x]=S,t.pop();for(let _=0,b=s;_!==b;++_){const A=i[_],C=A[x],k=A[w];A[y]=C,A[x]=k,A.pop()}}else{const x=--l,v=t[x];x>0&&(e[v.uuid]=y),t[y]=v,t.pop();for(let w=0,S=s;w!==S;++w){const _=i[w];_[y]=_[x],_.pop()}}}this.nCachedObjects_=o}subscribe_(t,e){const i=this._bindingsIndicesByPath;let s=i[t];const o=this._bindings;if(s!==void 0)return o[s];const l=this._paths,u=this._parsedPaths,h=this._objects,d=h.length,m=this.nCachedObjects_,y=new Array(d);s=o.length,i[t]=s,l.push(t),u.push(e),o.push(y);for(let x=m,v=h.length;x!==v;++x){const w=h[x];y[x]=new Rt(w,t,e)}return y}unsubscribe_(t){const e=this._bindingsIndicesByPath,i=e[t];if(i!==void 0){const s=this._paths,o=this._parsedPaths,l=this._bindings,u=l.length-1,h=l[u],d=t[u];e[d]=i,l[i]=h,l.pop(),o[i]=o[u],o.pop(),s[i]=s[u],s.pop()}}}class iM{constructor(t,e,i=null,s=e.blendMode){this._mixer=t,this._clip=e,this._localRoot=i,this.blendMode=s;const o=e.tracks,l=o.length,u=new Array(l),h={endingStart:Js,endingEnd:Js};for(let d=0;d!==l;++d){const m=o[d].createInterpolant(null);u[d]=m,m.settings=h}this._interpolantSettings=h,this._interpolants=u,this._propertyBindings=new Array(l),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=x1,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(t){return this._startTime=t,this}setLoop(t,e){return this.loop=t,this.repetitions=e,this}setEffectiveWeight(t){return this.weight=t,this._effectiveWeight=this.enabled?t:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(t){return this._scheduleFading(t,0,1)}fadeOut(t){return this._scheduleFading(t,1,0)}crossFadeFrom(t,e,i){if(t.fadeOut(e),this.fadeIn(e),i){const s=this._clip.duration,o=t._clip.duration,l=o/s,u=s/o;t.warp(1,l,e),this.warp(u,1,e)}return this}crossFadeTo(t,e,i){return t.crossFadeFrom(this,e,i)}stopFading(){const t=this._weightInterpolant;return t!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this}setEffectiveTimeScale(t){return this.timeScale=t,this._effectiveTimeScale=this.paused?0:t,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(t){return this.timeScale=this._clip.duration/t,this.stopWarping()}syncWith(t){return this.time=t.time,this.timeScale=t.timeScale,this.stopWarping()}halt(t){return this.warp(this._effectiveTimeScale,0,t)}warp(t,e,i){const s=this._mixer,o=s.time,l=this.timeScale;let u=this._timeScaleInterpolant;u===null&&(u=s._lendControlInterpolant(),this._timeScaleInterpolant=u);const h=u.parameterPositions,d=u.sampleValues;return h[0]=o,h[1]=o+i,d[0]=t/l,d[1]=e/l,this}stopWarping(){const t=this._timeScaleInterpolant;return t!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(t,e,i,s){if(!this.enabled){this._updateWeight(t);return}const o=this._startTime;if(o!==null){const h=(t-o)*i;h<0||i===0?e=0:(this._startTime=null,e=i*h)}e*=this._updateTimeScale(t);const l=this._updateTime(e),u=this._updateWeight(t);if(u>0){const h=this._interpolants,d=this._propertyBindings;switch(this.blendMode){case Ey:for(let m=0,y=h.length;m!==y;++m)h[m].evaluate(l),d[m].accumulateAdditive(u);break;case Fc:default:for(let m=0,y=h.length;m!==y;++m)h[m].evaluate(l),d[m].accumulate(s,u)}}}_updateWeight(t){let e=0;if(this.enabled){e=this.weight;const i=this._weightInterpolant;if(i!==null){const s=i.evaluate(t)[0];e*=s,t>i.parameterPositions[1]&&(this.stopFading(),s===0&&(this.enabled=!1))}}return this._effectiveWeight=e,e}_updateTimeScale(t){let e=0;if(!this.paused){e=this.timeScale;const i=this._timeScaleInterpolant;if(i!==null){const s=i.evaluate(t)[0];e*=s,t>i.parameterPositions[1]&&(this.stopWarping(),e===0?this.paused=!0:this.timeScale=e)}}return this._effectiveTimeScale=e,e}_updateTime(t){const e=this._clip.duration,i=this.loop;let s=this.time+t,o=this._loopCount;const l=i===v1;if(t===0)return o===-1?s:l&&(o&1)===1?e-s:s;if(i===g1){o===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));t:{if(s>=e)s=e;else if(s<0)s=0;else{this.time=s;break t}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=s,this._mixer.dispatchEvent({type:"finished",action:this,direction:t<0?-1:1})}}else{if(o===-1&&(t>=0?(o=0,this._setEndings(!0,this.repetitions===0,l)):this._setEndings(this.repetitions===0,!0,l)),s>=e||s<0){const u=Math.floor(s/e);s-=e*u,o+=Math.abs(u);const h=this.repetitions-o;if(h<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,s=t>0?e:0,this.time=s,this._mixer.dispatchEvent({type:"finished",action:this,direction:t>0?1:-1});else{if(h===1){const d=t<0;this._setEndings(d,!d,l)}else this._setEndings(!1,!1,l);this._loopCount=o,this.time=s,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:u})}}else this.time=s;if(l&&(o&1)===1)return e-s}return s}_setEndings(t,e,i){const s=this._interpolantSettings;i?(s.endingStart=$s,s.endingEnd=$s):(t?s.endingStart=this.zeroSlopeAtStart?$s:Js:s.endingStart=vl,e?s.endingEnd=this.zeroSlopeAtEnd?$s:Js:s.endingEnd=vl)}_scheduleFading(t,e,i){const s=this._mixer,o=s.time;let l=this._weightInterpolant;l===null&&(l=s._lendControlInterpolant(),this._weightInterpolant=l);const u=l.parameterPositions,h=l.sampleValues;return u[0]=o,h[0]=e,u[1]=o+t,h[1]=i,this}}const sM=new Float32Array(1);class q_ extends Ci{constructor(t){super(),this._root=t,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(t,e){const i=t._localRoot||this._root,s=t._clip.tracks,o=s.length,l=t._propertyBindings,u=t._interpolants,h=i.uuid,d=this._bindingsByRootAndName;let m=d[h];m===void 0&&(m={},d[h]=m);for(let y=0;y!==o;++y){const x=s[y],v=x.name;let w=m[v];if(w!==void 0)++w.referenceCount,l[y]=w;else{if(w=l[y],w!==void 0){w._cacheIndex===null&&(++w.referenceCount,this._addInactiveBinding(w,h,v));continue}const S=e&&e._propertyBindings[y].binding.parsedPath;w=new Yw(Rt.create(i,v,S),x.ValueTypeName,x.getValueSize()),++w.referenceCount,this._addInactiveBinding(w,h,v),l[y]=w}u[y].resultBuffer=w.buffer}}_activateAction(t){if(!this._isActiveAction(t)){if(t._cacheIndex===null){const i=(t._localRoot||this._root).uuid,s=t._clip.uuid,o=this._actionsByClip[s];this._bindAction(t,o&&o.knownActions[0]),this._addInactiveAction(t,s,i)}const e=t._propertyBindings;for(let i=0,s=e.length;i!==s;++i){const o=e[i];o.useCount++===0&&(this._lendBinding(o),o.saveOriginalState())}this._lendAction(t)}}_deactivateAction(t){if(this._isActiveAction(t)){const e=t._propertyBindings;for(let i=0,s=e.length;i!==s;++i){const o=e[i];--o.useCount===0&&(o.restoreOriginalState(),this._takeBackBinding(o))}this._takeBackAction(t)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}}_isActiveAction(t){const e=t._cacheIndex;return e!==null&&e<this._nActiveActions}_addInactiveAction(t,e,i){const s=this._actions,o=this._actionsByClip;let l=o[e];if(l===void 0)l={knownActions:[t],actionByRoot:{}},t._byClipCacheIndex=0,o[e]=l;else{const u=l.knownActions;t._byClipCacheIndex=u.length,u.push(t)}t._cacheIndex=s.length,s.push(t),l.actionByRoot[i]=t}_removeInactiveAction(t){const e=this._actions,i=e[e.length-1],s=t._cacheIndex;i._cacheIndex=s,e[s]=i,e.pop(),t._cacheIndex=null;const o=t._clip.uuid,l=this._actionsByClip,u=l[o],h=u.knownActions,d=h[h.length-1],m=t._byClipCacheIndex;d._byClipCacheIndex=m,h[m]=d,h.pop(),t._byClipCacheIndex=null;const y=u.actionByRoot,x=(t._localRoot||this._root).uuid;delete y[x],h.length===0&&delete l[o],this._removeInactiveBindingsForAction(t)}_removeInactiveBindingsForAction(t){const e=t._propertyBindings;for(let i=0,s=e.length;i!==s;++i){const o=e[i];--o.referenceCount===0&&this._removeInactiveBinding(o)}}_lendAction(t){const e=this._actions,i=t._cacheIndex,s=this._nActiveActions++,o=e[s];t._cacheIndex=s,e[s]=t,o._cacheIndex=i,e[i]=o}_takeBackAction(t){const e=this._actions,i=t._cacheIndex,s=--this._nActiveActions,o=e[s];t._cacheIndex=s,e[s]=t,o._cacheIndex=i,e[i]=o}_addInactiveBinding(t,e,i){const s=this._bindingsByRootAndName,o=this._bindings;let l=s[e];l===void 0&&(l={},s[e]=l),l[i]=t,t._cacheIndex=o.length,o.push(t)}_removeInactiveBinding(t){const e=this._bindings,i=t.binding,s=i.rootNode.uuid,o=i.path,l=this._bindingsByRootAndName,u=l[s],h=e[e.length-1],d=t._cacheIndex;h._cacheIndex=d,e[d]=h,e.pop(),delete u[o],Object.keys(u).length===0&&delete l[s]}_lendBinding(t){const e=this._bindings,i=t._cacheIndex,s=this._nActiveBindings++,o=e[s];t._cacheIndex=s,e[s]=t,o._cacheIndex=i,e[i]=o}_takeBackBinding(t){const e=this._bindings,i=t._cacheIndex,s=--this._nActiveBindings,o=e[s];t._cacheIndex=s,e[s]=t,o._cacheIndex=i,e[i]=o}_lendControlInterpolant(){const t=this._controlInterpolants,e=this._nActiveControlInterpolants++;let i=t[e];return i===void 0&&(i=new jy(new Float32Array(2),new Float32Array(2),1,sM),i.__cacheIndex=e,t[e]=i),i}_takeBackControlInterpolant(t){const e=this._controlInterpolants,i=t.__cacheIndex,s=--this._nActiveControlInterpolants,o=e[s];t.__cacheIndex=s,e[s]=t,o.__cacheIndex=i,e[i]=o}clipAction(t,e,i){const s=e||this._root,o=s.uuid;let l=typeof t=="string"?zl.findByName(s,t):t;const u=l!==null?l.uuid:t,h=this._actionsByClip[u];let d=null;if(i===void 0&&(l!==null?i=l.blendMode:i=Fc),h!==void 0){const y=h.actionByRoot[o];if(y!==void 0&&y.blendMode===i)return y;d=h.knownActions[0],l===null&&(l=d._clip)}if(l===null)return null;const m=new iM(this,l,e,i);return this._bindAction(m,d),this._addInactiveAction(m,u,o),m}existingAction(t,e){const i=e||this._root,s=i.uuid,o=typeof t=="string"?zl.findByName(i,t):t,l=o?o.uuid:t,u=this._actionsByClip[l];return u!==void 0&&u.actionByRoot[s]||null}stopAllAction(){const t=this._actions,e=this._nActiveActions;for(let i=e-1;i>=0;--i)t[i].stop();return this}update(t){t*=this.timeScale;const e=this._actions,i=this._nActiveActions,s=this.time+=t,o=Math.sign(t),l=this._accuIndex^=1;for(let d=0;d!==i;++d)e[d]._update(s,t,o,l);const u=this._bindings,h=this._nActiveBindings;for(let d=0;d!==h;++d)u[d].apply(l);return this}setTime(t){this.time=0;for(let e=0;e<this._actions.length;e++)this._actions[e].time=0;return this.update(t)}getRoot(){return this._root}uncacheClip(t){const e=this._actions,i=t.uuid,s=this._actionsByClip,o=s[i];if(o!==void 0){const l=o.knownActions;for(let u=0,h=l.length;u!==h;++u){const d=l[u];this._deactivateAction(d);const m=d._cacheIndex,y=e[e.length-1];d._cacheIndex=null,d._byClipCacheIndex=null,y._cacheIndex=m,e[m]=y,e.pop(),this._removeInactiveBindingsForAction(d)}delete s[i]}}uncacheRoot(t){const e=t.uuid,i=this._actionsByClip;for(const l in i){const u=i[l].actionByRoot,h=u[e];h!==void 0&&(this._deactivateAction(h),this._removeInactiveAction(h))}const s=this._bindingsByRootAndName,o=s[e];if(o!==void 0)for(const l in o){const u=o[l];u.restoreOriginalState(),this._removeInactiveBinding(u)}}uncacheAction(t,e){const i=this.existingAction(t,e);i!==null&&(this._deactivateAction(i),this._removeInactiveAction(i))}}class n0{constructor(t){this.value=t}clone(){return new n0(this.value.clone===void 0?this.value:this.value.clone())}}let rM=0;class X_ extends Ci{constructor(){super(),this.isUniformsGroup=!0,Object.defineProperty(this,"id",{value:rM++}),this.name="",this.usage=wl,this.uniforms=[]}add(t){return this.uniforms.push(t),this}remove(t){const e=this.uniforms.indexOf(t);return e!==-1&&this.uniforms.splice(e,1),this}setName(t){return this.name=t,this}setUsage(t){return this.usage=t,this}dispose(){return this.dispatchEvent({type:"dispose"}),this}copy(t){this.name=t.name,this.usage=t.usage;const e=t.uniforms;this.uniforms.length=0;for(let i=0,s=e.length;i<s;i++){const o=Array.isArray(e[i])?e[i]:[e[i]];for(let l=0;l<o.length;l++)this.uniforms.push(o[l].clone())}return this}clone(){return new this.constructor().copy(this)}}class Y_ extends Vc{constructor(t,e,i=1){super(t,e),this.isInstancedInterleavedBuffer=!0,this.meshPerAttribute=i}copy(t){return super.copy(t),this.meshPerAttribute=t.meshPerAttribute,this}clone(t){const e=super.clone(t);return e.meshPerAttribute=this.meshPerAttribute,e}toJSON(t){const e=super.toJSON(t);return e.isInstancedInterleavedBuffer=!0,e.meshPerAttribute=this.meshPerAttribute,e}}class Z_{constructor(t,e,i,s,o){this.isGLBufferAttribute=!0,this.name="",this.buffer=t,this.type=e,this.itemSize=i,this.elementSize=s,this.count=o,this.version=0}set needsUpdate(t){t===!0&&this.version++}setBuffer(t){return this.buffer=t,this}setType(t,e){return this.type=t,this.elementSize=e,this}setItemSize(t){return this.itemSize=t,this}setCount(t){return this.count=t,this}}const py=new wt;class J_{constructor(t,e,i=0,s=1/0){this.ray=new xo(t,e),this.near=i,this.far=s,this.camera=null,this.layers=new Fy,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(t,e){this.ray.set(t,e)}setFromCamera(t,e){e.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(t.x,t.y,.5).unproject(e).sub(this.ray.origin).normalize(),this.camera=e):e.isOrthographicCamera?(this.ray.origin.set(t.x,t.y,(e.near+e.far)/(e.near-e.far)).unproject(e),this.ray.direction.set(0,0,-1).transformDirection(e.matrixWorld),this.camera=e):console.error("THREE.Raycaster: 
83Unsupported camera type: "+e.type)}setFromXRController(t){return py.identity().extractRotation(t.matrixWorld),this.ray.origin.setFromMatrixPosition(t.matrixWorld),this.ray.direction.set(0,0,-1).applyMatrix4(py),this}intersectObject(t,e=!0,i=[]){return Tc(t,this,i,e),i.sort(my),i}intersectObjects(t,e=!0,i=[]){for(let s=0,o=t.length;s<o;s++)Tc(t[s],this,i,e);return i.sort(my),i}}function my(f,t){return f.distance-t.distance}function Tc(f,t,e,i){let s=!0;if(f.layers.test(t.layers)&&f.raycast(t,e)===!1&&(s=!1),s===!0&&i===!0){const o=f.children;for(let l=0,u=o.length;l<u;l++)Tc(o[l],t,e,!0)}}class $_{constructor(t=1,e=0,i=0){return this.radius=t,this.phi=e,this.theta=i,this}set(t,e,i){return this.radius=t,this.phi=e,this.theta=i,this}copy(t){return this.radius=t.radius,this.phi=t.phi,this.theta=t.theta,this}makeSafe(){return this.phi=yt(this.phi,1e-6,Math.PI-1e-6),this}setFromVector3(t){return this.setFromCartesianCoords(t.x,t.y,t.z)}setFromCartesianCoords(t,e,i){return this.radius=Math.sqrt(t*t+e*e+i*i),this.radius===0?(this.theta=0,this.phi=0):(this.theta=Math.atan2(t,i),this.phi=Math.acos(yt(e/this.radius,-1,1))),this}clone(){return new this.constructor().copy(this)}}class j_{constructor(t=1,e=0,i=0){return this.radius=t,this.theta=e,this.y=i,this}set(t,e,i){return this.radius=t,this.theta=e,this.y=i,this}copy(t){return this.radius=t.radius,this.theta=t.theta,this.y=t.y,this}setFromVector3(t){return this.setFromCartesianCoords(t.x,t.y,t.z)}setFromCartesianCoords(t,e,i){return this.radius=Math.sqrt(t*t+i*i),this.theta=Math.atan2(t,i),this.y=e,this}clone(){return new this.constructor().copy(this)}}class i0{constructor(t,e,i,s){i0.prototype.isMatrix2=!0,this.elements=[1,0,0,1],t!==void 0&&this.set(t,e,i,s)}identity(){return this.set(1,0,0,1),this}fromArray(t,e=0){for(let i=0;i<4;i++)this.elements[i]=t[i+e];return this}set(t,e,i,s){const o=this.elements;return o[0]=t,o[2]=e,o[1]=i,o[3]=s,this}}const yy=new G;class Q_{constructor(t=new G(1/0,1/0),e=new G(-1/0,-1/0)){this.isBox2=!0,this.min=t,this.max=e}set(t,e){return this.min.copy(t),this.max.copy(e),this}setFromPoints(t){this.makeEmpty();for(let e=0,i=t.length;e<i;e++)this.expandByPoint(t[e]);return this}setFromCenterAndSize(t,e){const i=yy.copy(e).multiplyScalar(.5);return this.min.copy(t).sub(i),this.max.copy(t).add(i),this}clone(){return new this.constructor().copy(this)}copy(t){return this.min.copy(t.min),this.max.copy(t.max),this}makeEmpty(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y}getCenter(t){return this.isEmpty()?t.set(0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(t){return this.isEmpty()?t.set(0,0):t.subVectors(this.max,this.min)}expandByPoint(t){return this.min.min(t),this.max.max(t),this}expandByVector(t){return this.min.sub(t),this.max.add(t),this}expandByScalar(t){return this.min.addScalar(-t),this.max.addScalar(t),this}containsPoint(t){return t.x>=this.min.x&&t.x<=this.max.x&&t.y>=this.min.y&&t.y<=this.max.y}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y}getParameter(t,e){return e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(t){return t.max.x>=this.min.x&&t.min.x<=this.max.x&&t.max.y>=this.min.y&&t.min.y<=this.max.y}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,yy).distanceTo(t)}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}const gy=new z,cl=new z;class K_{constructor(t=new z,e=new z){this.start=t,this.end=e}set(t,e){return this.start.copy(t),this.end.copy(e),this}copy(t){return this.start.copy(t.start),this.end.copy(t.end),this}getCenter(t){return t.addVectors(this.start,this.end).multiplyScalar(.5)}delta(t){return t.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(t,e){return this.delta(e).multiplyScalar(t).add(this.start)}closestPointToPointParameter(t,e){gy.subVectors(t,this.start),cl.subVectors(this.end,this.start);const i=cl.dot(cl);let o=cl.dot(gy)/i;return e&&(o=yt(o,0,1)),o}closestPointToPoint(t,e,i){const s=this.closestPointToPointParameter(t,e);return this.delta(i).multiplyScalar(s).add(this.start)}
vendor: 10,138 bytes, line 83
83applyMatrix4(t){return this.start.applyMatrix4(t),this.end.applyMatrix4(t),this}equals(t){return t.start.equals(this.start)&&t.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}const xy=new z;class tb extends Bt{constructor(t,e){super(),this.light=t,this.matrixAutoUpdate=!1,this.color=e,this.type="SpotLightHelper";const i=new St,s=[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 l=0,u=1,h=32;l<h;l++,u++){const d=l/h*Math.PI*2,m=u/h*Math.PI*2;s.push(Math.cos(d),Math.sin(d),1,Math.cos(m),Math.sin(m),1)}i.setAttribute("position",new at(s,3));const o=new Ne({fog:!1,toneMapped:!1});this.cone=new Zn(i,o),this.add(this.cone),this.update()}dispose(){this.cone.geometry.dispose(),this.cone.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),this.light.target.updateWorldMatrix(!0,!1),this.parent?(this.parent.updateWorldMatrix(!0),this.matrix.copy(this.parent.matrixWorld).invert().multiply(this.light.matrixWorld)):this.matrix.copy(this.light.matrixWorld),this.matrixWorld.copy(this.light.matrixWorld);const t=this.light.distance?this.light.distance:1e3,e=t*Math.tan(this.light.angle);this.cone.scale.set(e,e,t),xy.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(xy),this.color!==void 0?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}const Si=new z,dl=new wt,gc=new wt;class eb extends Zn{constructor(t){const e=s0(t),i=new St,s=[],o=[],l=new gt(0,0,1),u=new gt(0,1,0);for(let d=0;d<e.length;d++){const m=e[d];m.parent&&m.parent.isBone&&(s.push(0,0,0),s.push(0,0,0),o.push(l.r,l.g,l.b),o.push(u.r,u.g,u.b))}i.setAttribute("position",new at(s,3)),i.setAttribute("color",new at(o,3));const h=new Ne({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0});super(i,h),this.isSkeletonHelper=!0,this.type="SkeletonHelper",this.root=t,this.bones=e,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1}updateMatrixWorld(t){const e=this.bones,i=this.geometry,s=i.getAttribute("position");gc.copy(this.root.matrixWorld).invert();for(let o=0,l=0;o<e.length;o++){const u=e[o];u.parent&&u.parent.isBone&&(dl.multiplyMatrices(gc,u.matrixWorld),Si.setFromMatrixPosition(dl),s.setXYZ(l,Si.x,Si.y,Si.z),dl.multiplyMatrices(gc,u.parent.matrixWorld),Si.setFromMatrixPosition(dl),s.setXYZ(l+1,Si.x,Si.y,Si.z),l+=2)}i.getAttribute("position").needsUpdate=!0,super.updateMatrixWorld(t)}dispose(){this.geometry.dispose(),this.material.dispose()}}function s0(f){const t=[];f.isBone===!0&&t.push(f);for(let e=0;e<f.children.length;e++)t.push.apply(t,s0(f.children[e]));return t}class nb extends gn{constructor(t,e,i){const s=new Dl(e,4,2),o=new rr({wireframe:!0,fog:!1,toneMapped:!1});super(s,o),this.light=t,this.color=i,this.type="PointLightHelper",this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}dispose(){this.geometry.dispose(),this.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),this.color!==void 0?this.material.color.set(this.color):this.material.color.copy(this.light.color)}}const oM=new z,vy=new gt,wy=new gt;class ib extends Bt{constructor(t,e,i){super(),this.light=t,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=i,this.type="HemisphereLightHelper";const s=new Ll(e);s.rotateY(Math.PI*.5),this.material=new rr({wireframe:!0,fog:!1,toneMapped:!1}),this.color===void 0&&(this.material.vertexColors=!0);const o=s.getAttribute("position"),l=new Float32Array(o.count*3);s.setAttribute("color",new Zt(l,3)),this.add(new gn(s,this.material)),this.update()}dispose(){this.children[0].geometry.dispose(),this.children[0].material.dispose()}update(){const t=this.children[0];if(this.color!==void 0)this.material.color.set(this.color);else{const e=t.geometry.getAttribute("color");vy.copy(this.light.color),wy.copy(this.light.groundColor);for(let i=0,s=e.count;i<s;i++){const o=i<s/2?vy:wy;e.setXYZ(i,o.r,o.g,o.b)}e.needsUpdate=!0}this.light.updateWorldMatrix(!0,!1),t.lookAt(oM.setFromMatrixPosition(this.light.matrixWorld).negate())}}class sb extends Zn{constructor(t=10,e=10,i=4473924,s=8947848){i=new gt(i),s=new gt(s);const o=e/2,l=t/e,u=t/2,h=[],d=[];for(let x=0,v=0,w=-u;x<=e;x++,w+=l){h.push(-u,0,w,u,0,w),h.push(w,0,-u,w,0,u);const S=x===o?i:s;S.toArray(d,v),v+=3,S.toArray(d,v),v+=3,S.toArray(d,v),v+=3,S.toArray(d,v),v+=3}const m=new St;m.setAttribute("position",new at(h,3)),m.setAttribute("color",new at(d,3));const y=new Ne({vertexColors:!0,toneMapped:!1});super(m,y),this.type="GridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}}class rb extends Zn{constructor(t=10,e=16,i=8,s=64,o=4473924,l=8947848){o=new gt(o),l=new gt(l);const u=[],h=[];if(e>1)for(let y=0;y<e;y++){const x=y/e*(Math.PI*2),v=Math.sin(x)*t,w=Math.cos(x)*t;u.push(0,0,0),u.push(v,0,w);const S=y&1?o:l;h.push(S.r,S.g,S.b),h.push(S.r,S.g,S.b)}for(let y=0;y<i;y++){const x=y&1?o:l,v=t-t/i*y;for(let w=0;w<s;w++){let S=w/s*(Math.PI*2),_=Math.sin(S)*v,b=Math.cos(S)*v;u.push(_,0,b),h.push(x.r,x.g,x.b),S=(w+1)/s*(Math.PI*2),_=Math.sin(S)*v,b=Math.cos(S)*v,u.push(_,0,b),h.push(x.r,x.g,x.b)}}const d=new St;d.setAttribute("position",new at(u,3)),d.setAttribute("color",new at(h,3));const m=new Ne({vertexColors:!0,toneMapped:!1});super(d,m),this.type="PolarGridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}}const My=new z,fl=new z,Sy=new z;class ob extends Bt{constructor(t,e,i){super(),this.light=t,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=i,this.type="DirectionalLightHelper",e===void 0&&(e=1);let s=new St;s.setAttribute("position",new at([-e,e,0,e,e,0,e,-e,0,-e,-e,0,-e,e,0],3));const o=new Ne({fog:!1,toneMapped:!1});this.lightPlane=new Ki(s,o),this.add(this.lightPlane),s=new St,s.setAttribute("position",new at([0,0,0,0,0,1],3)),this.targetLine=new Ki(s,o),this.add(this.targetLine),this.update()}dispose(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),this.light.target.updateWorldMatrix(!0,!1),My.setFromMatrixPosition(this.light.matrixWorld),fl.setFromMatrixPosition(this.light.target.matrixWorld),Sy.subVectors(fl,My),this.lightPlane.lookAt(fl),this.color!==void 0?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(fl),this.targetLine.scale.z=Sy.length()}}const pl=new z,$t=new Nc;class ab extends Zn{constructor(t){const e=new St,i=new Ne({color:16777215,vertexColors:!0,toneMapped:!1}),s=[],o=[],l={};u("n1","n2"),u("n2","n4"),u("n4","n3"),u("n3","n1"),u("f1","f2"),u("f2","f4"),u("f4","f3"),u("f3","f1"),u("n1","f1"),u("n2","f2"),u("n3","f3"),u("n4","f4"),u("p","n1"),u("p","n2"),u("p","n3"),u("p","n4"),u("u1","u2"),u("u2","u3"),u("u3","u1"),u("c","t"),u("p","c"),u("cn1","cn2"),u("cn3","cn4"),u("cf1","cf2"),u("cf3","cf4");function u(w,S){h(w),h(S)}function h(w){s.push(0,0,0),o.push(0,0,0),l[w]===void 0&&(l[w]=[]),l[w].push(s.length/3-1)}e.setAttribute("position",new at(s,3)),e.setAttribute("color",new at(o,3)),super(e,i),this.type="CameraHelper",this.camera=t,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=l,this.update();const d=new gt(16755200),m=new gt(16711680),y=new gt(43775),x=new gt(16777215),v=new gt(3355443);this.setColors(d,m,y,x,v)}setColors(t,e,i,s,o){const u=this.geometry.getAttribute("color");u.setXYZ(0,t.r,t.g,t.b),u.setXYZ(1,t.r,t.g,t.b),u.setXYZ(2,t.r,t.g,t.b),u.setXYZ(3,t.r,t.g,t.b),u.setXYZ(4,t.r,t.g,t.b),u.setXYZ(5,t.r,t.g,t.b),u.setXYZ(6,t.r,t.g,t.b),u.setXYZ(7,t.r,t.g,t.b),u.setXYZ(8,t.r,t.g,t.b),u.setXYZ(9,t.r,t.g,t.b),u.setXYZ(10,t.r,t.g,t.b),u.setXYZ(11,t.r,t.g,t.b),u.setXYZ(12,t.r,t.g,t.b),u.setXYZ(13,t.r,t.g,t.b),u.setXYZ(14,t.r,t.g,t.b),u.setXYZ(15,t.r,t.g,t.b),u.setXYZ(16,t.r,t.g,t.b),u.setXYZ(17,t.r,t.g,t.b),u.setXYZ(18,t.r,t.g,t.b),u.setXYZ(19,t.r,t.g,t.b),u.setXYZ(20,t.r,t.g,t.b),u.setXYZ(21,t.r,t.g,t.b),u.setXYZ(22,t.r,t.g,t.b),u.setXYZ(23,t.r,t.g,t.b),u.setXYZ(24,e.r,e.g,e.b),u.setXYZ(25,e.r,e.g,e.b),u.setXYZ(26,e.r,e.g,e.b),u.setXYZ(27,e.r,e.g,e.b),u.setXYZ(28,e.r,e.g,e.b),u.setXYZ(29,e.r,e.g,e.b),u.setXYZ(30,e.r,e.g,e.b),u.setXYZ(31,e.r,e.g,e.b),u.setXYZ(32,i.r,i.g,i.b),u.setXYZ(33,i.r,i.g,i.b),u.setXYZ(34,i.r,i.g,i.b),u.setXYZ(35,i.r,i.g,i.b),u.setXYZ(36,i.r,i.g,i.b),u.setXYZ(37,i.r,i.g,i.b),u.setXYZ(38,s.r,s.g,s.b),u.setXYZ(39,s.r,s.g,s.b),u.setXYZ(40,o.r,o.g,o.b),u.setXYZ(41,o.r,o.g,o.b),u.setXYZ(42,o.r,o.g,o.b),u.setXYZ(43,o.r,o.g,o.b),u.setXYZ(44,o.r,o.g,o.b),u.setXYZ(45,o.r,o.g,o.b),u.setXYZ(46,o.r,o.g,o.b),u.setXYZ(47,o.r,o.g,o.b),u.setXYZ(48,o.r,o.g,o.b),u.setXYZ(49,o.r,o.g,o.b),u.needsUpdate=!0}update(){const t=this.geometry,e=this.pointMap,i=1,s=1;$t.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse),te("c",e,t,$t,0,0,-1),te("t",e,t,$t,0,0,1),te("n1",e,t,$t,-i,-s,-1),te("n2",e,t,$t,i,-s,-1),te("n3",e,t,$t,-i,s,-1),te("n4",e,t,$t,i,s,-1),te("f1",e,t,$t,-i,-s,1),te("f2",e,t,$t,i,-s,1),te("f3",e,t,$t,-i,s,1),te("f4",e,t,$t,i,s,1),te("u1",e,t,$t,i*.7,s*1.1,-1),te("u2",e,t,$t,-i*.7,s*1.1,-1),te("u3",e,t,$t,0,s*2,-1),te("cf1",e,t,$t,-i,0,1),te("cf2",e,t,$t,i,0,1),te("cf3",e,t,$t,0,-s,1),te("cf4",e,t,$t,0,s,1),te("cn1",e,t,$t,-i,0,-1),te("cn2",e,t,$t,i,0,-1),te("cn3",e,t,$t,0,-s,-1),te("cn4",e,t,$t,0,s,-1),t.getAttribute("position").needsUpdate=!0}dispose(){this.geometry.dispose(),this.material.dispose()}}function te(f,t,e,i,s,o,l){pl.set(s,o,l).unproject(i);const u=t[f];if(u!==void 0){const h=e.getAttribute("position");for(let d=0,m=u.length;d<m;d++)h.setXYZ(u[d],pl.x,pl.y,pl.z)}}const ml=new Be;class lb extends Zn{constructor(t,e=16776960){const i=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),s=new Float32Array(8*3),o=new St;o.setIndex(new Zt(i,1)),o.setAttribute("position",new Zt(s,3)),super(o,new Ne({color:e,toneMapped:!1})),this.object=t,this.type="BoxHelper",this.matrixAutoUpdate=!1,this.update()}update(t){if(t!==void 0&&console.warn("THREE.BoxHelper: .update(
83) has no longer arguments."),this.object!==void 0&&ml.setFromObject(this.object),ml.isEmpty())return;const e=ml.min,i=ml.max,s=this.geometry.attributes.position,o=s.array;o[0]=i.x,o[1]=i.y,o[2]=i.z,o[3]=e.x,o[4]=i.y,o[5]=i.z,o[6]=e.x,o[7]=e.y,o[8]=i.z,o[9]=i.x,o[10]=e.y,o[11]=i.z,o[12]=i.x,o[13]=i.y,o[14]=e.z,o[15]=e.x,o[16]=i.y,o[17]=e.z,o[18]=e.x,o[19]=e.y,o[20]=e.z,o[21]=i.x,o[22]=e.y,o[23]=e.z,s.needsUpdate=!0,this.geometry.computeBoundingSphere()}setFromObject(t){return this.object=t,this.update(),this}copy(t,e){return super.copy(t,e),this.object=t.object,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class ub extends Zn{constructor(t,e=16776960){const i=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),s=[1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],o=new St;o.setIndex(new Zt(i,1)),o.setAttribute("position",new at(s,3)),super(o,new Ne({color:e,toneMapped:!1})),this.box=t,this.type="Box3Helper",this.geometry.computeBoundingSphere()}updateMatrixWorld(t){const e=this.box;e.isEmpty()||(e.getCenter(this.position),e.getSize(this.scale),this.scale.multiplyScalar(.5),super.updateMatrixWorld(t))}dispose(){this.geometry.dispose(),this.material.dispose()}}class hb extends Ki{constructor(t,e=1,i=16776960){const s=i,o=[1,-1,0,-1,1,0,-1,-1,0,1,1,0,-1,1,0,-1,-1,0,1,-1,0,1,1,0],l=new St;l.setAttribute("position",new at(o,3)),l.computeBoundingSphere(),super(l,new Ne({color:s,toneMapped:!1})),this.type="PlaneHelper",this.plane=t,this.size=e;const u=[1,1,0,-1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,-1,0],h=new St;h.setAttribute("position",new at(u,3)),h.computeBoundingSphere(),this.add(new gn(h,new rr({color:s,opacity:.2,transparent:!0,depthWrite:!1,toneMapped:!1})))}updateMatrixWorld(t){this.position.set(0,0,0),this.scale.set(.5*this.size,.5*this.size,1),this.lookAt(this.plane.normal),this.translateZ(-this.plane.constant),super.updateMatrixWorld(t)}dispose(){this.geometry.dispose(),this.material.dispose(),this.children[0].geometry.dispose(),this.children[0].material.dispose()}}const _y=new z;let yl,xc;class cb extends Bt{constructor(t=new z(0,0,1),e=new z(0,0,0),i=1,s=16776960,o=i*.2,l=o*.2){super(),this.type="ArrowHelper",yl===void 0&&(yl=new St,yl.setAttribute("position",new at([0,0,0,0,1,0],3)),xc=new vo(0,.5,1,5,1),xc.translate(0,-.5,0)),this.position.copy(e),this.line=new Ki(yl,new Ne({color:s,toneMapped:!1})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new gn(xc,new rr({color:s,toneMapped:!1})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(t),this.setLength(i,o,l)}setDirection(t){if(t.y>.99999)this.quaternion.set(0,0,0,1);else if(t.y<-.99999)this.quaternion.set(1,0,0,0);else{_y.set(t.z,0,-t.x).normalize();const e=Math.acos(t.y);this.quaternion.setFromAxisAngle(_y,e)}}setLength(t,e=t*.2,i=e*.2){this.line.scale.set(1,Math.max(1e-4,t-e),1),this.line.updateMatrix(),this.cone.scale.set(i,e,i),this.cone.position.y=t,this.cone.updateMatrix()}setColor(t){this.line.material.color.set(t),this.cone.material.color.set(t)}copy(t){return super.copy(t,!1),this.line.copy(t.line),this.cone.copy(t.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class db extends Zn{constructor(t=1){const e=[0,0,0,t,0,0,0,0,0,0,t,0,0,0,0,0,0,t],i=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],s=new St;s.setAttribute("position",new at(e,3)),s.setAttribute("color",new at(i,3));const o=new Ne({vertexColors:!0,toneMapped:!1});super(s,o),this.type="AxesHelper"}setColors(t,e,i){const s=new gt,o=this.geometry.attributes.color.array;return s.set(t),s.toArray(o,0),s.toArray(o,3),s.set(e),s.toArray(o,6),s.toArray(o,9),s.set(i),s.toArray(o,12),s.toArray(o,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class fb{constructor(){this.type="ShapePath",this.color=new gt,this.subPaths=[],this.currentPath=null}moveTo(t,e){return this.currentPath=new Cl,this.subPaths.push(this.currentPath),this.currentPath.moveTo(t,e),this}lineTo(t,e){return this.currentPath.lineTo(t,e),this}quadraticCurveTo(t,e,i,s){return this.currentPath.quadraticCurveTo(t,e,i,s),this}bezierCurveTo(t,e,i,s,o,l){return this.currentPath.bezierCurveTo(t,e,i,s,o,l),this}splineThru(t){return this.currentPath.splineThru(t),this}toShapes(t){function e(b){const A=[];for(let C=0,k=b.length;C<k;C++){const N=b[C],B=new er;B.curves=N.curves,A.push(B)}return A}function i(b,A){const C=A.length;let k=!1;for(let N=C-1,B=0;B<C;N=B++){let D=A[N],L=A[B],q=L.x-D.x,J=L.y-D.y;if(Math.abs(J)>Number.EPSILON){if(J<0&&(D=A[B],q=-q,L=A[N],J=-J),b.y<D.y||b.y>L.y)continue;
vendor: 4,332 bytes, line 83
83if(b.y===D.y){if(b.x===D.x)return!0}else{const it=J*(b.x-D.x)-q*(b.y-D.y);if(it===0)return!0;if(it<0)continue;k=!k}}else{if(b.y!==D.y)continue;if(L.x<=b.x&&b.x<=D.x||D.x<=b.x&&b.x<=L.x)return!0}}return k}const s=Yn.isClockWise,o=this.subPaths;if(o.length===0)return[];let l,u,h;const d=[];if(o.length===1)return u=o[0],h=new er,h.curves=u.curves,d.push(h),d;let m=!s(o[0].getPoints());m=t?!m:m;const y=[],x=[];let v=[],w=0,S;x[w]=void 0,v[w]=[];for(let b=0,A=o.length;b<A;b++)u=o[b],S=u.getPoints(),l=s(S),l=t?!l:l,l?(!m&&x[w]&&w++,x[w]={s:new er,p:S},x[w].s.curves=u.curves,m&&w++,v[w]=[]):v[w].push({h:u,p:S[0]});if(!x[0])return e(o);if(x.length>1){let b=!1,A=0;for(let C=0,k=x.length;C<k;C++)y[C]=[];for(let C=0,k=x.length;C<k;C++){const N=v[C];for(let B=0;B<N.length;B++){const D=N[B];let L=!0;for(let q=0;q<x.length;q++)i(D.p,x[q].p)&&(C!==q&&A++,L?(L=!1,y[q].push(D)):b=!0);L&&y[C].push(D)}}A>0&&b===!1&&(v=y)}let _;for(let b=0,A=x.length;b<A;b++){h=x[b].s,d.push(h),_=v[b];for(let C=0,k=_.length;C<k;C++)h.holes.push(_[C].h)}return d}}class pb extends Ci{constructor(t,e=null){super(),this.object=t,this.domElement=e,this.enabled=!0,this.state=-1,this.keys={},this.mouseButtons={LEFT:null,MIDDLE:null,RIGHT:null},this.touches={ONE:null,TWO:null}}connect(){}disconnect(){}dispose(){}update(){}}function aM(f,t){const e=f.image&&f.image.width?f.image.width/f.image.height:1;return e>t?(f.repeat.x=1,f.repeat.y=e/t,f.offset.x=0,f.offset.y=(1-f.repeat.y)/2):(f.repeat.x=t/e,f.repeat.y=1,f.offset.x=(1-f.repeat.x)/2,f.offset.y=0),f}function lM(f,t){const e=f.image&&f.image.width?f.image.width/f.image.height:1;return e>t?(f.repeat.x=t/e,f.repeat.y=1,f.offset.x=(1-f.repeat.x)/2,f.offset.y=0):(f.repeat.x=1,f.repeat.y=e/t,f.offset.x=0,f.offset.y=(1-f.repeat.y)/2),f}function uM(f){return f.repeat.x=1,f.repeat.y=1,f.offset.x=0,f.offset.y=0,f}function hM(f,t,e,i){const s=cM(i);switch(e){case Px:return f*t;case Rx:return f*t;case Bx:return f*t*2;case zy:return f*t/s.components*s.byteLength;case Iy:return f*t/s.components*s.byteLength;case Nx:return f*t*2/s.components*s.byteLength;case Ox:return f*t*2/s.components*s.byteLength;case Fx:return f*t*3/s.components*s.byteLength;case co:return f*t*4/s.components*s.byteLength;case Lx:return f*t*4/s.components*s.byteLength;case Dx:case Vx:return Math.floor((f+3)/4)*Math.floor((t+3)/4)*8;case Ux:case Wx:return Math.floor((f+3)/4)*Math.floor((t+3)/4)*16;case Gx:case Xx:return Math.max(f,16)*Math.max(t,8)/4;case Hx:case qx:return Math.max(f,8)*Math.max(t,8)/2;case Yx:case Zx:return Math.floor((f+3)/4)*Math.floor((t+3)/4)*8;case Jx:return Math.floor((f+3)/4)*Math.floor((t+3)/4)*16;case $x:return Math.floor((f+3)/4)*Math.floor((t+3)/4)*16;case jx:return Math.floor((f+4)/5)*Math.floor((t+3)/4)*16;case Qx:return Math.floor((f+4)/5)*Math.floor((t+4)/5)*16;case Kx:return Math.floor((f+5)/6)*Math.floor((t+4)/5)*16;case t1:return Math.floor((f+5)/6)*Math.floor((t+5)/6)*16;case e1:return Math.floor((f+7)/8)*Math.floor((t+4)/5)*16;case n1:return Math.floor((f+7)/8)*Math.floor((t+5)/6)*16;case i1:return Math.floor((f+7)/8)*Math.floor((t+7)/8)*16;case s1:return Math.floor((f+9)/10)*Math.floor((t+4)/5)*16;case r1:return Math.floor((f+9)/10)*Math.floor((t+5)/6)*16;case o1:return Math.floor((f+9)/10)*Math.floor((t+7)/8)*16;case a1:return Math.floor((f+9)/10)*Math.floor((t+9)/10)*16;case l1:return Math.floor((f+11)/12)*Math.floor((t+9)/10)*16;case u1:return Math.floor((f+11)/12)*Math.floor((t+11)/12)*16;case h1:case c1:case d1:return Math.ceil(f/4)*Math.ceil(t/4)*16;case f1:case p1:return Math.ceil(f/4)*Math.ceil(t/4)*8;case m1:case y1:return Math.ceil(f/4)*Math.ceil(t/4)*16}throw new Error(`Unable to determine texture byte length for ${e} format.`)}function cM(f){switch(f){case ky:case _x:return{byteLength:1,components:1};case Ax:case bx:case Tx:return{byteLength:2,components:1};case kx:case zx:return{byteLength:2,components:4};case Pc:case Cx:case nr:return{byteLength:4,components:1};case Ex:return{byteLength:4,components:3}}throw new Error(`Unknown texture type ${f}.`)}const mb={contain:aM,cover:lM,fill:uM,getByteLength:hM};class yb extends Fl{constructor(t=1,e=1,i=1,s={}){console.warn('THREE.WebGLMultipleRenderTargets has been deprecated and will be removed in r172. Use THREE.WebGLRenderTarget and set the "count" parameter to enable MRT.'),super(t,e,{...s,c
83ount:i}),this.isWebGLMultipleRenderTargets=!0}get texture(){return this.textures}}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:Cy}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=Cy);const by=f=>{let t;const e=new Set,i=(d,m)=>{const y=typeof d=="function"?d(t):d;if(!Object.is(y,t)){const x=t;t=m??(typeof y!="object"||y===null)?y:Object.assign({},t,y),e.forEach(v=>v(t,x))}},s=()=>t,u={setState:i,getState:s,getInitialState:()=>h,subscribe:d=>(e.add(d),()=>e.delete(d))},h=t=f(i,s,u);return u},dM=f=>f?by(f):by,fM=f=>f;function pM(f,t=fM){const e=gl.useSyncExternalStore(f.subscribe,()=>t(f.getState()),()=>t(f.getInitialState()));return gl.useDebugValue(e),e}const Ay=f=>{const t=dM(f),e=i=>pM(t,i);return Object.assign(e,t),e},mM=f=>f?Ay(f):Ay;let ro=0;const yM=mM(f=>(ao.onStart=(t,e,i)=>{f({active:!0,item:t,loaded:e,total:i,progress:(e-ro)/(i-ro)*100})},ao.onLoad=()=>{f({active:!1})},ao.onError=t=>f(e=>({errors:[...e.errors,t]})),ao.onProgress=(t,e,i)=>{e===i&&(ro=i),f({active:!0,item:t,loaded:e,total:i,progress:(e-ro)/(i-ro)*100||100})},{errors:[],active:!1,progress:0,item:"",loaded:0,total:0})),gM=()=>{const{progress:f}=yM();return Gn.jsxs("div",{className:"flex flex-col items-center justify-center w-screen h-screen",children:[Gn.jsx("div",{className:"h-full bg-blue-500 transition-all duration-300 absolute",style:{width:`${f}%`}}),Gn.jsxs("p",{className:"text-white text-lg font-medium z-10",children:["Loading... ",Math.floor(f),"%"]})]})},xM=gl.lazy(()=>fx(()=>import("./Experience-DhLS9D7y.js"),[]));function vM(){return Gn.jsx("div",{className:"w-screen h-screen bg-slate-950",children:Gn.jsx(El.Suspense,{fallback:Gn.jsx(gM,{}),children:Gn.jsx(xM,{})})})}hx.createRoot(document.getElementById("root")).render(Gn.jsx(El.StrictMode,{children:Gn.jsx(vM,{})}));export{zy as $,bx as A,Ty as B,gt as C,EM as D,Ax as E,Ly as F,Pc as G,Tx as H,Cx as I,nr as J,Px as K,Pl as L,An as M,lS as N,t0 as O,sn as P,Fx as Q,Cy as R,Bc as S,co as T,ky as U,G as V,Fl as W,Rx as X,Bx as Y,Bh as Z,cm as _,z as a,HM as a$,Iy as a0,Nx as a1,Ox as a2,Lx as a3,Dx as a4,Vx as a5,Ux as a6,Wx as a7,Oh as a8,Hx as a9,y1 as aA,Ix as aB,Py as aC,Ci as aD,V_ as aE,z_ as aF,fo as aG,dm as aH,Zs as aI,rn as aJ,gw as aK,bS as aL,xw as aM,kM as aN,IM as aO,yn as aP,um as aQ,om as aR,NM as aS,OM as aT,VM as aU,UM as aV,WM as aW,am as aX,ZM as aY,XM as aZ,GM as a_,Gx as aa,qx as ab,Xx as ac,Yx as ad,Zx as ae,Jx as af,$x as ag,jx as ah,Qx as ai,Kx as aj,t1 as ak,e1 as al,n1 as am,i1 as an,s1 as ao,r1 as ap,o1 as aq,a1 as ar,l1 as as,u1 as at,h1 as au,c1 as av,d1 as aw,f1 as ax,p1 as ay,m1 as az,Ec as b,hS as b$,lm as b0,YM as b1,qM as b2,JM as b3,$M as b4,jM as b5,QM as b6,wc as b7,_n as b8,Mc as b9,PM as bA,_M as bB,bM as bC,AM as bD,hM as bE,re as bF,bn as bG,O1 as bH,nv as bI,ev as bJ,r_ as bK,Fy as bL,rS as bM,sS as bN,iS as bO,nS as bP,eS as bQ,tS as bR,KM as bS,LM as bT,DM as bU,fm as bV,fS as bW,mS as bX,pS as bY,dS as bZ,cS as b_,wx as ba,Mx as bb,Sx as bc,WS as bd,JS as be,HS as bf,qS as bg,GS as bh,ZS as bi,XS as bj,YS as bk,zv as bl,Bl as bm,jc as bn,M_ as bo,gx as bp,xx as bq,__ as br,G1 as bs,TS as bt,sr as bu,rm as bv,S_ as bw,BM as bx,RM as by,FM as bz,yx as c,p_ as c$,uS as c0,zM as c1,Sl as c2,q1 as c3,Oc as c4,aS as c5,oS as c6,zc as c7,Ey as c8,pm as c9,bi as cA,Nc as cB,ab as cC,k_ as cD,qc as cE,Ev as cF,Xc as cG,Hw as cH,Qy as cI,C_ as cJ,T_ as cK,Wc as cL,P_ as cM,Yc as cN,pb as cO,uv as cP,F_ as cQ,Vy as cR,Dv as cS,_w as cT,CM as cU,Cn as cV,Uv as cW,vo as cX,j_ as cY,Xn as cZ,R_ as c_,Nw as ca,iM as cb,zl as cc,E_ as cd,q_ as ce,G_ as cf,I_ as cg,Iv as ch,cb as ci,hm as cj,qw as ck,H_ as cl,e0 as cm,U_ as cn,L_ as co,db as cp,w1 as cq,TM as cr,Cv as cs,Oy as ct,or as cu,Q_ as cv,Be as cw,ub as cx,lb as cy,Uw as cz,gn as d,Tv as d$,ES as d0,FS as d1,ao as d2,mx as d3,Bw as d4,ob as d5,bw as d6,Zc as d7,n_ as d8,$S as d9,Vw as dA,Y_ as dB,gv as dC,x_ as dD,v_ as dE,m_ as dF,Vc as dG,ir as dH,Vl as dI,xl as dJ,Sc as dK,Nh as dL,RS as dM,Is as dN,Tn as dO,dv as dP,Nl as dQ,LS as dR,NS as dS,ns as dT,Dw as dU,Ki as dV,K_ as dW,Ne as dX,Uy as dY,Vv as dZ,ww as d_,KS as da,Wv as db,Hc as dc,OS as dd,Jc as de,Ai as df,w_ as dg,at as dh,Dc as di,Lc as dj,A_ as dk,Z_ as dl,s_ as dm,US as dn,DS as dp,sb as dq,zw as dr,ib as ds,$c as dt,O_ as du,Il as dv,V1 as dw,IS as dx,PS as dy,po as dz,rr as e,Uc as e$,Zn as e0,jy as e1,vS as e2,xS as e3,Ye as e4,oy as e5,Ky as e6,g1 as e7,v1 as e8,x1 as e9,Dy as eA,rb as eB,es as eC,W_ as eD,Rt as eE,Yw as eF,Wy as eG,Hy as eH,Xe as eI,Ul as eJ,Aw as eK,AS as eL,wS as eM,CS as eN,cw as eO,xo as eP,J_ as eQ,Ow as eR,H1 as eS,zS as eT,Qc as eU,hv as eV,hw as eW,er as eX,Kc as eY,fb as eZ,Yn as e_,MM as ea,Ae as eb,od as ec,o_ as ed,i0 as ee,yw as ef,vw as eg,mw as eh,fw as ei,dw as ej,Zy as ek,pw as el,gS as em,yS as en,BS as eo,Fc as ep,VS as eq,Tl as er,Bt as es,N_ as et,Ll as eu,Cl as ev,hb as ew,Fw as ex,nb as ey,kv as ez,Rl as f,eb as f0,pv as f1,Qs as f2,be as f3,Dl as f4,$_ as f5,Lw as f6,Gy as f7,Ew as f8,tb as f9,kl as fA,b_ as fB,f_ as fC,d_ as fD,yb as fE,Ml as fF,uw as fG,vl as fH,Js as fI,$s as fJ,kS as fK,El as fL,kc as fM,ex as fN,Gn as fO,hx as fP,gl as fQ,lx as fR,wM as fS,cv as fa,By as fb,e_ as fc,wl as fd,QS as fe,D_ as ff,i_ as fg,jS as fh,t_ as fi,ar as fj,SM as fk,td as fl,B_ as fm,mb as fn,ed as fo,nd as fp,Ge as fq,_S as fr,SS as fs,MS as ft,id as fu,Ic as fv,y_ as fw,g_ as fx,n0 as fy,X_ as fz,St as g,Zt as h,vx as i,px as j,a_ as k,nn as l,rv as m,he as n,wt as o,He as p,vc as q,c_ as r,u_ as s,h_ as t,_i as u,kx as v,l_ as w,zx as x,Ex as y,_x as z};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.