PageSourceSearch

https://www.aplusia.com/assets/index-Bbm6Ce8V.js

js aplusia.com collected 2026-10-05 02:50:39 UTC 1,256,927 bytes, 4,307 lines download raw bytes

vendor: 4,820 bytes, lines 1-17
1(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const o of a)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&n(c)}).observe(document,{childList:!0,subtree:!0});function t(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?o.credentials="include":a.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(a){if(a.ep)return;a.ep=!0;const o=t(a);fetch(a.href,o)}})();function tb(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var nx={exports:{}},sm={};/**
2 * @license React
3 * react-jsx-runtime.production.js
4 *
5 * Copyright (c) Meta Platforms, Inc. and 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 lM;function RR(){if(lM)return sm;lM=1;var s=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function t(n,a,o){var c=null;if(o!==void 0&&(c=""+o),a.key!==void 0&&(c=""+a.key),"key"in a){o={};for(var h in a)h!=="key"&&(o[h]=a[h])}else o=a;return a=o.ref,{$$typeof:s,type:n,key:c,ref:a!==void 0?a:null,props:o}}return sm.Fragment=e,sm.jsx=t,sm.jsxs=t,sm}var cM;function CR(){return cM||(cM=1,nx.exports=RR()),nx.exports}var Z=CR(),ix={exports:{}},sn={};/**
10 * @license React
11 * react.production.js
12 *
13 * Copyright (c) Meta Platforms, Inc. and 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 uM;function NR(){if(uM)return sn;uM=1;var s=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),c=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),_=Symbol.iterator;function b(W){return W===null||typeof W!="object"?null:(W=_&&W[_]||W["@@iterator"],typeof W=="function"?W:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},R=Object.assign,A={};function M(W,fe,Ce){this.props=W,this.context=fe,this.refs=A,this.updater=Ce||T}M.prototype.isReactComponent={},M.prototype.setState=function(W,fe){if(typeof W!="object"&&typeof W!="function"&&W!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,W,fe,"setState")},M.prototype.forceUpdate=function(W){this.updater.enqueueForceUpdate(this,W,"forceUpdate")};function C(){}C.prototype=M.prototype;function D(W,fe,Ce){this.props=W,this.context=fe,this.refs=A,this.updater=Ce||T}var U=D.prototype=new C;U.constructor=D,R(U,M.prototype),U.isPureReactComponent=!0;var H=Array.isArray;function F(){}var G={H:null,A:null,T:null,S:null},V=Object.prototype.hasOwnProperty;function O(W,fe,Ce){var Le=Ce.ref;return{$$typeof:s,type:W,key:fe,ref:Le!==void 0?Le:null,props:Ce}}function z(W,fe){return O(W.type,fe,W.props)}function Y(W){return typeof W=="object"&&W!==null&&W.$$typeof===s}function se(W){var fe={"=":"=0",":":"=2"};return"$"+W.replace(/[=:]/g,function(Ce){return fe[Ce]})}var ce=/\/+/g;function he(W,fe){return typeof W=="object"&&W!==null&&W.key!=null?se(""+W.key):fe.toString(36)}function me(W){switch(W.status){case"fulfilled":return W.value;case"rejected":throw W.reason;default:switch(typeof W.status=="string"?W.then(F,F):(W.status="pending",W.then(function(fe){W.status==="pending"&&(W.status="fulfilled",W.value=fe)},function(fe){W.status==="pending"&&(W.status="rejected",W.reason=fe)})),W.status){case"fulfilled":return W.value;case"rejected":throw W.reason}}throw W}function P(W,fe,Ce,Le,nt){var ve=typeof W;(ve==="undefined"||ve==="boolean")&&(W=null);var De=!1;if(W===null)De=!0;else switch(ve){case"bigint":case"string":case"number":De=!0;break;case"object":switch(W.$$typeof){case s:case e:De=!0;break;case v:return De=W._init,P(De(W._payload),fe,Ce,Le,nt)}}if(De)return nt=nt(W),De=Le===""?"."+he(W,0):Le,H(nt)?(Ce="",De!=null&&(Ce=De.replace(ce,"$&/")+"/"),P(nt,fe,Ce,"",function(Et){return Et})):nt!=null&&(Y(nt)&&(nt=z(nt,Ce+(nt.key==null||W&&W.key===nt.key?"":(""+nt.key).replace(ce,"$&/")+"/")+De)),fe.push(nt)),1;De=0;var ot=Le===""?".":Le+":";if(H(W))for(var gt=0;gt<W.length;gt++)Le=W[gt],ve=ot+he(Le,gt),De+=P(Le,fe,Ce,ve,nt);else if(gt=b(W),typeof gt=="function")for(W=gt.call(W),gt=0;
vendor: 13,688 bytes, lines 17-41
17!(Le=W.next()).done;)Le=Le.value,ve=ot+he(Le,gt++),De+=P(Le,fe,Ce,ve,nt);else if(ve==="object"){if(typeof W.then=="function")return P(me(W),fe,Ce,Le,nt);throw fe=String(W),Error("Objects are not valid as a React child (found: "+(fe==="[object Object]"?"object with keys {"+Object.keys(W).join(", ")+"}":fe)+"). If you meant to render a collection of children, use an array instead.")}return De}function Q(W,fe,Ce){if(W==null)return W;var Le=[],nt=0;return P(W,Le,"","",function(ve){return fe.call(Ce,ve,nt++)}),Le}function ee(W){if(W._status===-1){var fe=W._result;fe=fe(),fe.then(function(Ce){(W._status===0||W._status===-1)&&(W._status=1,W._result=Ce)},function(Ce){(W._status===0||W._status===-1)&&(W._status=2,W._result=Ce)}),W._status===-1&&(W._status=0,W._result=fe)}if(W._status===1)return W._result.default;throw W._result}var ge=typeof reportError=="function"?reportError:function(W){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var fe=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof W=="object"&&W!==null&&typeof W.message=="string"?String(W.message):String(W),error:W});if(!window.dispatchEvent(fe))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",W);return}console.error(W)},Se={map:Q,forEach:function(W,fe,Ce){Q(W,function(){fe.apply(this,arguments)},Ce)},count:function(W){var fe=0;return Q(W,function(){fe++}),fe},toArray:function(W){return Q(W,function(fe){return fe})||[]},only:function(W){if(!Y(W))throw Error("React.Children.only expected to receive a single React element child.");return W}};return sn.Activity=y,sn.Children=Se,sn.Component=M,sn.Fragment=t,sn.Profiler=a,sn.PureComponent=D,sn.StrictMode=n,sn.Suspense=d,sn.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=G,sn.__COMPILER_RUNTIME={__proto__:null,c:function(W){return G.H.useMemoCache(W)}},sn.cache=function(W){return function(){return W.apply(null,arguments)}},sn.cacheSignal=function(){return null},sn.cloneElement=function(W,fe,Ce){if(W==null)throw Error("The argument must be a React element, but you passed "+W+".");var Le=R({},W.props),nt=W.key;if(fe!=null)for(ve in fe.key!==void 0&&(nt=""+fe.key),fe)!V.call(fe,ve)||ve==="key"||ve==="__self"||ve==="__source"||ve==="ref"&&fe.ref===void 0||(Le[ve]=fe[ve]);var ve=arguments.length-2;if(ve===1)Le.children=Ce;else if(1<ve){for(var De=Array(ve),ot=0;ot<ve;ot++)De[ot]=arguments[ot+2];Le.children=De}return O(W.type,nt,Le)},sn.createContext=function(W){return W={$$typeof:c,_currentValue:W,_currentValue2:W,_threadCount:0,Provider:null,Consumer:null},W.Provider=W,W.Consumer={$$typeof:o,_context:W},W},sn.createElement=function(W,fe,Ce){var Le,nt={},ve=null;if(fe!=null)for(Le in fe.key!==void 0&&(ve=""+fe.key),fe)V.call(fe,Le)&&Le!=="key"&&Le!=="__self"&&Le!=="__source"&&(nt[Le]=fe[Le]);var De=arguments.length-2;if(De===1)nt.children=Ce;else if(1<De){for(var ot=Array(De),gt=0;gt<De;gt++)ot[gt]=arguments[gt+2];nt.children=ot}if(W&&W.defaultProps)for(Le in De=W.defaultProps,De)nt[Le]===void 0&&(nt[Le]=De[Le]);return O(W,ve,nt)},sn.createRef=function(){return{current:null}},sn.forwardRef=function(W){return{$$typeof:h,render:W}},sn.isValidElement=Y,sn.lazy=function(W){return{$$typeof:v,_payload:{_status:-1,_result:W},_init:ee}},sn.memo=function(W,fe){return{$$typeof:p,type:W,compare:fe===void 0?null:fe}},sn.startTransition=function(W){var fe=G.T,Ce={};G.T=Ce;try{var Le=W(),nt=G.S;nt!==null&&nt(Ce,Le),typeof Le=="object"&&Le!==null&&typeof Le.then=="function"&&Le.then(F,ge)}catch(ve){ge(ve)}finally{fe!==null&&Ce.types!==null&&(fe.types=Ce.types),G.T=fe}},sn.unstable_useCacheRefresh=function(){return G.H.useCacheRefresh()},sn.use=function(W){return G.H.use(W)},sn.useActionState=function(W,fe,Ce){return G.H.useActionState(W,fe,Ce)},sn.useCallback=function(W,fe){return G.H.useCallback(W,fe)},sn.useContext=function(W){return G.H.useContext(W)},sn.useDebugValue=function(){},sn.useDeferredValue=function(W,fe){return G.H.useDeferredValue(W,fe)},sn.useEffect=function(W,fe){return G.H.useEffect(W,fe)},sn.useEffectEvent=function(W){return G.H.useEffectEvent(W)},sn.useId=function(){return G.H.useId()},sn.useImperativeHandle=function(W,fe,Ce){return G.H.useImperativeHandle(W,fe,Ce)},sn.useInsertionEffect=function(W,fe){return G.H.useInsertionEffect(W,fe)},sn.useLayoutEffect=function(W,fe){return G.H.useLayoutEffect(W,fe)},sn.useMemo=function(W,fe){return G.H.useMemo(W,fe)},sn.useOptimistic=function(W,fe){return G.H.useOptimistic(W,fe)},sn.useReducer=function(W,fe,Ce){return G.H.useReducer(W,fe,Ce)},sn.useRef=function(W){return G.H.useRef(W)},sn.useState=function(W){return G.H.useState(W)},sn.useSyncExternalStore=function(W,fe,Ce){return G.H.useSyncExternalStore(W,fe,Ce)},sn.useTransition=function(){return G.H.useTransition()},sn.version="19.2.0",sn}var fM;function Ad(){return fM||(fM=1,ix.exports=NR()),ix.exports}var le=Ad();const ES=tb(le);var ax={exports:{}},rm={},sx={exports:{}},rx={};/**
18 * @license React
19 * scheduler.production.js
20 *
21 * Copyright (c) Meta Platforms, Inc. and 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 hM;function DR(){return hM||(hM=1,(function(s){function e(P,Q){var ee=P.length;P.push(Q);e:for(;0<ee;){var ge=ee-1>>>1,Se=P[ge];if(0<a(Se,Q))P[ge]=Q,P[ee]=Se,ee=ge;else break e}}function t(P){return P.length===0?null:P[0]}function n(P){if(P.length===0)return null;var Q=P[0],ee=P.pop();if(ee!==Q){P[0]=ee;e:for(var ge=0,Se=P.length,W=Se>>>1;ge<W;){var fe=2*(ge+1)-1,Ce=P[fe],Le=fe+1,nt=P[Le];if(0>a(Ce,ee))Le<Se&&0>a(nt,Ce)?(P[ge]=nt,P[Le]=ee,ge=Le):(P[ge]=Ce,P[fe]=ee,ge=fe);else if(Le<Se&&0>a(nt,ee))P[ge]=nt,P[Le]=ee,ge=Le;else break e}}return Q}function a(P,Q){var ee=P.sortIndex-Q.sortIndex;return ee!==0?ee:P.id-Q.id}if(s.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;s.unstable_now=function(){return o.now()}}else{var c=Date,h=c.now();s.unstable_now=function(){return c.now()-h}}var d=[],p=[],v=1,y=null,_=3,b=!1,T=!1,R=!1,A=!1,M=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,D=typeof setImmediate<"u"?setImmediate:null;function U(P){for(var Q=t(p);Q!==null;){if(Q.callback===null)n(p);else if(Q.startTime<=P)n(p),Q.sortIndex=Q.expirationTime,e(d,Q);else break;Q=t(p)}}function H(P){if(R=!1,U(P),!T)if(t(d)!==null)T=!0,F||(F=!0,se());else{var Q=t(p);Q!==null&&me(H,Q.startTime-P)}}var F=!1,G=-1,V=5,O=-1;function z(){return A?!0:!(s.unstable_now()-O<V)}function Y(){if(A=!1,F){var P=s.unstable_now();O=P;var Q=!0;try{e:{T=!1,R&&(R=!1,C(G),G=-1),b=!0;var ee=_;try{t:{for(U(P),y=t(d);y!==null&&!(y.expirationTime>P&&z());){var ge=y.callback;if(typeof ge=="function"){y.callback=null,_=y.priorityLevel;var Se=ge(y.expirationTime<=P);if(P=s.unstable_now(),typeof Se=="function"){y.callback=Se,U(P),Q=!0;break t}y===t(d)&&n(d),U(P)}else n(d);y=t(d)}if(y!==null)Q=!0;else{var W=t(p);W!==null&&me(H,W.startTime-P),Q=!1}}break e}finally{y=null,_=ee,b=!1}Q=void 0}}finally{Q?se():F=!1}}}var se;if(typeof D=="function")se=function(){D(Y)};else if(typeof MessageChannel<"u"){var ce=new MessageChannel,he=ce.port2;ce.port1.onmessage=Y,se=function(){he.postMessage(null)}}else se=function(){M(Y,0)};function me(P,Q){G=M(function(){P(s.unstable_now())},Q)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(P){P.callback=null},s.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):V=0<P?Math.floor(1e3/P):5},s.unstable_getCurrentPriorityLevel=function(){return _},s.unstable_next=function(P){switch(_){case 1:case 2:case 3:var Q=3;break;default:Q=_}var ee=_;_=Q;try{return P()}finally{_=ee}},s.unstable_requestPaint=function(){A=!0},s.unstable_runWithPriority=function(P,Q){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var ee=_;_=P;try{return Q()}finally{_=ee}},s.unstable_scheduleCallback=function(P,Q,ee){var ge=s.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?ge+ee:ge):ee=ge,P){case 1:var Se=-1;break;case 2:Se=250;break;case 5:Se=1073741823;break;case 4:Se=1e4;break;default:Se=5e3}return Se=ee+Se,P={id:v++,callback:Q,priorityLevel:P,startTime:ee,expirationTime:Se,sortIndex:-1},ee>ge?(P.sortIndex=ee,e(p,P),t(d)===null&&P===t(p)&&(R?(C(G),G=-1):R=!0,me(H,ee-ge))):(P.sortIndex=Se,e(d,P),T||b||(T=!0,F||(F=!0,se()))),P},s.unstable_shouldYield=z,s.unstable_wrapCallback=function(P){var Q=_;return function(){var ee=_;_=Q;try{return P.apply(this,arguments)}finally{_=ee}}}})(rx)),rx}var dM;function UR(){return dM||(dM=1,sx.exports=DR()),sx.exports}var ox={exports:{}},qa={};/**
26 * @license React
27 * react-dom.production.js
28 *
29 * Copyright (c) Meta Platforms, Inc. and 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 pM;function LR(){if(pM)return qa;pM=1;var s=Ad();function e(d){var p="https://react.dev/errors/"+d;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)p+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+d+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function t(){}var n={d:{f:t,r:function(){throw Error(e(522))},D:t,C:t,L:t,m:t,X:t,S:t,M:t},p:0,findDOMNode:null},a=Symbol.for("react.portal");function o(d,p,v){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:y==null?null:""+y,children:d,containerInfo:p,implementation:v}}var c=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(d,p){if(d==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return qa.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,qa.createPortal=function(d,p){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(e(299));return o(d,p,null,v)},qa.flushSync=function(d){var p=c.T,v=n.p;try{if(c.T=null,n.p=2,d)return d()}finally{c.T=p,n.p=v,n.d.f()}},qa.preconnect=function(d,p){typeof d=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,n.d.C(d,p))},qa.prefetchDNS=function(d){typeof d=="string"&&n.d.D(d)},qa.preinit=function(d,p){if(typeof d=="string"&&p&&typeof p.as=="string"){var v=p.as,y=h(v,p.crossOrigin),_=typeof p.integrity=="string"?p.integrity:void 0,b=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;v==="style"?n.d.S(d,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:y,integrity:_,fetchPriority:b}):v==="script"&&n.d.X(d,{crossOrigin:y,integrity:_,fetchPriority:b,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},qa.preinitModule=function(d,p){if(typeof d=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var v=h(p.as,p.crossOrigin);n.d.M(d,{crossOrigin:v,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&n.d.M(d)},qa.preload=function(d,p){if(typeof d=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var v=p.as,y=h(v,p.crossOrigin);n.d.L(d,v,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},qa.preloadModule=function(d,p){if(typeof d=="string")if(p){var v=h(p.as,p.crossOrigin);n.d.m(d,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:v,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else n.d.m(d)},qa.requestFormReset=function(d){n.d.r(d)},qa.unstable_batchedUpdates=function(d,p){return d(p)},qa.useFormState=function(d,p,v){return c.H.useFormState(d,p,v)},qa.useFormStatus=function(){return c.H.useHostTransitionStatus()},qa.version="19.2.0",qa}var mM;function OR(){if(mM)return ox.exports;mM=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(e){console.error(e)}}return s(),ox.exports=LR(),ox.exports}/**
34 * @license React
35 * react-dom-client.production.js
36 *
37 * Copyright (c) Meta Platforms, Inc. and affiliates.
38 *
39 * This source code is licensed under the MIT license found in the
40 * LICENSE file in the root directory of this source tree.
41 */var gM;function zR(){if(gM)return rm;gM=1;var s=UR(),e=Ad(),t=OR();function n(i){var r="https://react.dev/errors/"+i;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var f=2;f<arguments.length;f++)r+="&args[]="+encodeURIComponent(arguments[f])}return"Minified React error #"+i+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function o(i){var r=i,f=i;if(i.alternate)for(;r.return;)r=r.return;else{i=r;do r=i,(r.flags&4098)!==0&&(f=r.return),i=r.return;while(i)}return r.tag===3?f:null}
vendor: 14,385 bytes, lines 41-48
41function c(i){if(i.tag===13){var r=i.memoizedState;if(r===null&&(i=i.alternate,i!==null&&(r=i.memoizedState)),r!==null)return r.dehydrated}return null}function h(i){if(i.tag===31){var r=i.memoizedState;if(r===null&&(i=i.alternate,i!==null&&(r=i.memoizedState)),r!==null)return r.dehydrated}return null}function d(i){if(o(i)!==i)throw Error(n(188))}function p(i){var r=i.alternate;if(!r){if(r=o(i),r===null)throw Error(n(188));return r!==i?null:i}for(var f=i,m=r;;){var x=f.return;if(x===null)break;var E=x.alternate;if(E===null){if(m=x.return,m!==null){f=m;continue}break}if(x.child===E.child){for(E=x.child;E;){if(E===f)return d(x),i;if(E===m)return d(x),r;E=E.sibling}throw Error(n(188))}if(f.return!==m.return)f=x,m=E;else{for(var L=!1,X=x.child;X;){if(X===f){L=!0,f=x,m=E;break}if(X===m){L=!0,m=x,f=E;break}X=X.sibling}if(!L){for(X=E.child;X;){if(X===f){L=!0,f=E,m=x;break}if(X===m){L=!0,m=E,f=x;break}X=X.sibling}if(!L)throw Error(n(189))}}if(f.alternate!==m)throw Error(n(190))}if(f.tag!==3)throw Error(n(188));return f.stateNode.current===f?i:r}function v(i){var r=i.tag;if(r===5||r===26||r===27||r===6)return i;for(i=i.child;i!==null;){if(r=v(i),r!==null)return r;i=i.sibling}return null}var y=Object.assign,_=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),T=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),D=Symbol.for("react.context"),U=Symbol.for("react.forward_ref"),H=Symbol.for("react.suspense"),F=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),V=Symbol.for("react.lazy"),O=Symbol.for("react.activity"),z=Symbol.for("react.memo_cache_sentinel"),Y=Symbol.iterator;function se(i){return i===null||typeof i!="object"?null:(i=Y&&i[Y]||i["@@iterator"],typeof i=="function"?i:null)}var ce=Symbol.for("react.client.reference");function he(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===ce?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case R:return"Fragment";case M:return"Profiler";case A:return"StrictMode";case H:return"Suspense";case F:return"SuspenseList";case O:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case T:return"Portal";case D:return i.displayName||"Context";case C:return(i._context.displayName||"Context")+".Consumer";case U:var r=i.render;return i=i.displayName,i||(i=r.displayName||r.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case G:return r=i.displayName||null,r!==null?r:he(i.type)||"Memo";case V:r=i._payload,i=i._init;try{return he(i(r))}catch{}}return null}var me=Array.isArray,P=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},ge=[],Se=-1;function W(i){return{current:i}}function fe(i){0>Se||(i.current=ge[Se],ge[Se]=null,Se--)}function Ce(i,r){Se++,ge[Se]=i.current,i.current=r}var Le=W(null),nt=W(null),ve=W(null),De=W(null);function ot(i,r){switch(Ce(ve,r),Ce(nt,i),Ce(Le,null),r.nodeType){case 9:case 11:i=(i=r.documentElement)&&(i=i.namespaceURI)?D1(i):0;break;default:if(i=r.tagName,r=r.namespaceURI)r=D1(r),i=U1(r,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}fe(Le),Ce(Le,i)}function gt(){fe(Le),fe(nt),fe(ve)}function Et(i){i.memoizedState!==null&&Ce(De,i);var r=Le.current,f=U1(r,i.type);r!==f&&(Ce(nt,i),Ce(Le,f))}function Zt(i){nt.current===i&&(fe(Le),fe(nt)),De.current===i&&(fe(De),tm._currentValue=ee)}var _n,ie;function Ze(i){if(_n===void 0)try{throw Error()}catch(f){var r=f.stack.trim().match(/\n( *(at )?)/);_n=r&&r[1]||"",ie=-1<f.stack.indexOf(`
42    at`)?" (<anonymous>)":-1<f.stack.indexOf("@")?"@unknown:0:0":""}return`
43`+_n+i+ie}var je=!1;function ke(i,r){if(!i||je)return"";je=!0;var f=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var m={DetermineComponentFrameRoot:function(){try{if(r){var Ke=function(){throw Error()};if(Object.defineProperty(Ke.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ke,[])}catch(Oe){var Re=Oe}Reflect.construct(i,[],Ke)}else{try{Ke.call()}catch(Oe){Re=Oe}i.call(Ke.prototype)}}else{try{throw Error()}catch(Oe){Re=Oe}(Ke=i())&&typeof Ke.catch=="function"&&Ke.catch(function(){})}}catch(Oe){if(Oe&&Re&&typeof Oe.stack=="string")return[Oe.stack,Re.stack]}return[null,null]}};m.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var x=Object.getOwnPropertyDescriptor(m.DetermineComponentFrameRoot,"name");x&&x.configurable&&Object.defineProperty(m.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var E=m.DetermineComponentFrameRoot(),L=E[0],X=E[1];if(L&&X){var oe=L.split(`
44`),Te=X.split(`
45`);for(x=m=0;m<oe.length&&!oe[m].includes("DetermineComponentFrameRoot");)m++;for(;x<Te.length&&!Te[x].includes("DetermineComponentFrameRoot");)x++;if(m===oe.length||x===Te.length)for(m=oe.length-1,x=Te.length-1;1<=m&&0<=x&&oe[m]!==Te[x];)x--;for(;1<=m&&0<=x;m--,x--)if(oe[m]!==Te[x]){if(m!==1||x!==1)do if(m--,x--,0>x||oe[m]!==Te[x]){var Ve=`
46`+oe[m].replace(" at new "," at ");return i.displayName&&Ve.includes("<anonymous>")&&(Ve=Ve.replace("<anonymous>",i.displayName)),Ve}while(1<=m&&0<=x);break}}}finally{je=!1,Error.prepareStackTrace=f}return(f=i?i.displayName||i.name:"")?Ze(f):""}function Fe(i,r){switch(i.tag){case 26:case 27:case 5:return Ze(i.type);case 16:return Ze("Lazy");case 13:return i.child!==r&&r!==null?Ze("Suspense Fallback"):Ze("Suspense");case 19:return Ze("SuspenseList");case 0:case 15:return ke(i.type,!1);case 11:return ke(i.type.render,!1);case 1:return ke(i.type,!0);case 31:return Ze("Activity");default:return""}}function dt(i){try{var r="",f=null;do r+=Fe(i,f),f=i,i=i.return;while(i);return r}catch(m){return`
47Error generating stack: `+m.message+`
48`+m.stack}}var it=Object.prototype.hasOwnProperty,lt=s.unstable_scheduleCallback,Vt=s.unstable_cancelCallback,qt=s.unstable_shouldYield,J=s.unstable_requestPaint,k=s.unstable_now,be=s.unstable_getCurrentPriorityLevel,ze=s.unstable_ImmediatePriority,$e=s.unstable_UserBlockingPriority,Pe=s.unstable_NormalPriority,At=s.unstable_LowPriority,ft=s.unstable_IdlePriority,Rt=s.log,Ct=s.unstable_setDisableYieldValue,Qe=null,et=null;function Dt(i){if(typeof Rt=="function"&&Ct(i),et&&typeof et.setStrictMode=="function")try{et.setStrictMode(Qe,i)}catch{}}var vt=Math.clz32?Math.clz32:pe,ut=Math.log,Ut=Math.LN2;function pe(i){return i>>>=0,i===0?32:31-(ut(i)/Ut|0)|0}var Me=256,ct=262144,bt=4194304;function tt(i){var r=i&42;if(r!==0)return r;switch(i&-i){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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function We(i,r,f){var m=i.pendingLanes;if(m===0)return 0;var x=0,E=i.suspendedLanes,L=i.pingedLanes;i=i.warmLanes;var X=m&134217727;return X!==0?(m=X&~E,m!==0?x=tt(m):(L&=X,L!==0?x=tt(L):f||(f=X&~i,f!==0&&(x=tt(f))))):(X=m&~E,X!==0?x=tt(X):L!==0?x=tt(L):f||(f=m&~i,f!==0&&(x=tt(f)))),x===0?0:r!==0&&r!==x&&(r&E)===0&&(E=x&-x,f=r&-r,E>=f||E===32&&(f&4194048)!==0)?r:x}function Tt(i,r){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&r)===0}function Xt(i,r){switch(i){case 1:case 2:case 4:case 8:case 64:return r+250;case 16:case 32: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:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Mn(){var i=bt;return bt<<=1,(bt&62914560)===0&&(bt=4194304),i}function hn(i){for(var r=[],f=0;31>f;f++)r.push(i);return r}function Xi(i,r){i.pendingLanes|=r,r!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function ba(i,r,f,m,x,E){var L=i.pendingLanes;i.pendingLanes=f,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=f,i.entangledLanes&=f,i.errorRecoveryDisabledLanes&=f,i.shellSuspendCounter=0;var X=i.entanglements,oe=i.expirationTimes,Te=i.hiddenUpdates;for(f=L&~f;0<f;){var Ve=31-vt(f),Ke=1<<Ve;X[Ve]=0,oe[Ve]=-1;var Re=Te[Ve];if(Re!==null)for(Te[Ve]=null,Ve=0;Ve<Re.length;Ve++){var Oe=Re[Ve];Oe!==null&&(Oe.lane&=-536870913)}f&=~Ke}m!==0&&oo(i,m,0),E!==0&&x===0&&i.tag!==0&&(i.suspendedLanes|=E&~(L&~r))}function oo(i,r,f){i.pendingLanes|=r,i.suspendedLanes&=~r;var m=31-vt(r);i.entangledLanes|=r,i.entanglements[m]=i.entanglements[m]|1073741824|f&261930}function Oa(i,r){var f=i.entangledLanes|=r;for(i=i.entanglements;f;){var m=31-vt(f),x=1<<m;x&r|i[m]&r&&(i[m]|=r),f&=~x}}function es(i,r){var f=r&-r;return f=(f&42)!==0?1:Ma(f),(f&(i.suspendedLanes|r))!==0?0:f}function Ma(i){switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=16;break;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:i=128;break;case 268435456:i=134217728;break;default:i=0}return i}function ts(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function Di(){var i=Q.p;return i!==0?i:(i=window.event,i===void 0?32:tM(i.type))}function Yt(i,r){var f=Q.p;try{return Q.p=i,r()}finally{Q.p=f}}var Bi=Math.random().toString(36).slice(2),nn="__reactFiber$"+Bi,I="__reactProps$"+Bi,q="__reactContainer$"+Bi,ue="__reactEvents$"+Bi,we="__reactListeners$"+Bi,He="__reactHandles$"+Bi,Ie="__reactResources$"+Bi,at="__reactMarker$"+Bi;function B(i){delete i[nn],delete i[I],delete i[ue],delete i[we],delete i[He]}function $(i){var r=i[nn];if(r)return r;for(var f=i.parentNode;f;){if(r=f[q]||f[nn]){if(f=r.alternate,r.child!==null||f!==null&&f.child!==null)for(i=H1(i);i!==null;){if(f=i[nn])return f;i=H1(i)}return r}i=f,f=i.parentNode}return null}function ne(i){if(i=i[nn]||i[q]){var r=i.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return i}return null}function ae(i){var r=i.tag;if(r===5||r===26||r===27||r===6)return i.stateNode;throw Error(n(33))}function te(i){var r=i[Ie];return r||(r=i[Ie]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function Be(i){i[at]=!0}var Ue=new Set,Ge={};function qe(i,r){st(i,r),st(i+"Capture",r)}function st(i,r){for(Ge[i]=r,i=0;i<r.length;i++)Ue.add(r[i])}var yt=RegExp("^[: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]*$"),pt={},zt={};function Jt(i){return it.call(zt,i)?!0:it.call(pt,i)?!1:yt.test(i)?zt[i]=!0:(pt[i]=!0,!1)}function Ft(i,r,f){if(Jt(r))if(f===null)i.removeAttribute(r);else{switch(typeof f){case"undefined":case"function":case"symbol":i.removeAttribute(r);return;case"boolean":var m=r.toLowerCase().slice(0,5);if(m!=="data-"&&m!=="aria-"){i.removeAttribute(r);return}}i.setAttribute(r,""+f)}}function an(i,r,f){if(f===null)i.removeAttribute(r);else{switch(typeof f){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(r);return}i.setAttribute(r,""+f)}}function Nt(i,r,f,m){if(m===null)i.removeAttribute(f);else{switch(typeof m){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(f);return}i.setAttributeNS(r,f,""+m)}}function mt(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function xn(i){var r=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function rn(i,r,f){var m=Object.getOwnPropertyDescriptor(i.constructor.prototype,r);if(!i.hasOwnProperty(r)&&typeof m<"u"&&typeof m.get=="function"&&typeof m.set=="function"){var x=m.get,E=m.set;return Object.defineProperty(i,r,{configurable:!0,get:function(){return x.call(this)},set:function(L){f=""+L,E.call(this,L)}}),Object.defineProperty(i,r,{enumerable:m.enumerable}),{getValue:function(){return f},setValue:function(L){f=""+L},stopTracking:function(){i._valueTracker=null,delete i[r]}}}}function Fn(i){if(!i._valueTracker){var r=xn(i)?"checked":"value";i._valueTracker=rn(i,r,""+i[r])}}function gn(i){if(!i)return!1;var r=i._valueTracker;if(!r)return!0;var f=r.getValue(),m="";return i&&(m=xn(i)?i.checked?"true":"false":i.value),i=m,i!==f?(r.setValue(i),!0):!1}function yn(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var Un=/[\n"\\]/g;function wt(i){return i.replace(Un,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function kn(i,r,f,m,x,E,L,X){i.name="",L!=null&&typeof L!="function"&&typeof L!="symbol"&&typeof L!="boolean"?i.type=L:i.removeAttribute("type"),r!=null?L==="number"?(r===0&&i.value===""||i.value!=r)&&(i.value=""+mt(r)):i.value!==""+mt(r)&&(i.value=""+mt(r)):L!=="submit"&&L!=="reset"||i.removeAttribute("value"),r!=null?Rn(i,L,mt(r)):f!=null?Rn(i,L,mt(f)):m!=null&&i.removeAttribute("value"),x==null&&E!=null&&(i.defaultChecked=!!E),x!=null&&(i.checked=x&&typeof x!="function"&&typeof x!="symbol"),X!=null&&typeof X!="function"&&typeof X!="symbol"&&typeof X!="boolean"?i.name=""+mt(X):i.removeAttribute("name")}function fi(i,r,f,m,x,E,L,X){if(E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"&&(i.type=E),r!=null||f!=null){if(!(E!=="submit"&&E!=="reset"||r!=null)){Fn(i);return}f=f!=null?""+mt(f):"",r=r!=null?""+mt(r):f,X||r===i.value||(i.value=r),i.defaultValue=r}m=m??x,m=typeof m!="function"&&typeof m!="symbol"&&!!m,i.checked=X?i.checked:!!m,i.defaultChecked=!!m,L!=null&&typeof L!="function"&&typeof L!="symbol"&&typeof L!="boolean"&&(i.name=L),Fn(i)}function Rn(i,r,f){r==="number"&&yn(i.ownerDocument)===i||i.defaultValue===""+f||(i.defaultValue=""+f)}
vendor: 4,967 bytes, line 48
48function Xn(i,r,f,m){if(i=i.options,r){r={};for(var x=0;x<f.length;x++)r["$"+f[x]]=!0;for(f=0;f<i.length;f++)x=r.hasOwnProperty("$"+i[f].value),i[f].selected!==x&&(i[f].selected=x),x&&m&&(i[f].defaultSelected=!0)}else{for(f=""+mt(f),r=null,x=0;x<i.length;x++){if(i[x].value===f){i[x].selected=!0,m&&(i[x].defaultSelected=!0);return}r!==null||i[x].disabled||(r=i[x])}r!==null&&(r.selected=!0)}}function Jo(i,r,f){if(r!=null&&(r=""+mt(r),r!==i.value&&(i.value=r),f==null)){i.defaultValue!==r&&(i.defaultValue=r);return}i.defaultValue=f!=null?""+mt(f):""}function Ea(i,r,f,m){if(r==null){if(m!=null){if(f!=null)throw Error(n(92));if(me(m)){if(1<m.length)throw Error(n(93));m=m[0]}f=m}f==null&&(f=""),r=f}f=mt(r),i.defaultValue=f,m=i.textContent,m===f&&m!==""&&m!==null&&(i.value=m),Fn(i)}function $o(i,r){if(r){var f=i.firstChild;if(f&&f===i.lastChild&&f.nodeType===3){f.nodeValue=r;return}}i.textContent=r}var Rf=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Qc(i,r,f){var m=r.indexOf("--")===0;f==null||typeof f=="boolean"||f===""?m?i.setProperty(r,""):r==="float"?i.cssFloat="":i[r]="":m?i.setProperty(r,f):typeof f!="number"||f===0||Rf.has(r)?r==="float"?i.cssFloat=f:i[r]=(""+f).trim():i[r]=f+"px"}function zd(i,r,f){if(r!=null&&typeof r!="object")throw Error(n(62));if(i=i.style,f!=null){for(var m in f)!f.hasOwnProperty(m)||r!=null&&r.hasOwnProperty(m)||(m.indexOf("--")===0?i.setProperty(m,""):m==="float"?i.cssFloat="":i[m]="");for(var x in r)m=r[x],r.hasOwnProperty(x)&&f[x]!==m&&Qc(i,x,m)}else for(var E in r)r.hasOwnProperty(E)&&Qc(i,E,r[E])}function Jc(i){if(i.indexOf("-")===-1)return!1;switch(i){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 vg=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode
48-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),yg=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function $c(i){return yg.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function nr(){}var eu=null;function Cf(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var el=null,lo=null;function Id(i){var r=ne(i);if(r&&(i=r.stateNode)){var f=i[I]||null;e:switch(i=r.stateNode,r.type){case"input":if(kn(i,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name),r=f.name,f.type==="radio"&&r!=null){for(f=i;f.parentNode;)f=f.parentNode;for(f=f.querySelectorAll('input[name="'+wt(""+r)+'"][type="radio"]'),r=0;r<f.length;r++){var m=f[r];if(m!==i&&m.form===i.form){var x=m[I]||null;if(!x)throw Error(n(90));kn(m,x.value,x.defaultValue,x.defaultValue,x.checked,x.defaultChecked,x.type,x.name)}}for(r=0;r<f.length;r++)m=f[r],m.form===i.form&&gn(m)}break e;case"textarea":Jo(i,f.value,f.defaultValue);break e;case"select":r=f.value,r!=null&&Xn(i,!!f.multiple,r,!1)}}}var Nf=!1;function Bd(i,r,f){if(Nf)return i(r,f);Nf=!0;try{var m=i(r);return m}finally{if(Nf=!1,(el!==null||lo!==null)&&(j(),el&&(r=el,i=lo,lo=el=null,Id(r),i)))for(r=0;r<i.length;r++)Id(i[r])}}function tl(i,r){var f=i.stateNode;if(f===null)return null;var m=f[I]||null;if(m===null)return null;f=m[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(m=!m.disabled)||(i=i.type,m=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!m;break e;default:i=!1}if(i)return null;if(f&&typeof f!="function")throw Error(n(231,r,typeof f));return f}var ir=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Df=!1;if(ir)try{var tu={};Object.defineProperty(tu,"passive",{get:function(){Df=!0}}),window.addEventListener("test",tu,tu),window.removeEventListener("test",tu,tu)}catch{Df=!1}var co=null,Uf=null,uo=null;function Lf(){if(uo)return uo;var i,r=Uf,f=r.length,m,x="value"in co?co.value:co.textContent,E=x.length;for(i=0;i<f&&r[i]===x[i];i++);var L=f-i;for(m=1;m<=L&&r[f-m]===x[E-m];m++);return uo=x.slice(i,1<m?1-m:void 0)}function nl(i){var r=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&r===13&&(i=13)):i=r,i===10&&(i=13),32<=i||i===13?i:0}function nu(){return!0}function Pd(){return!1}function fa(i){function r(f,m,x,E,L){this._reactName=f,this._targetInst=x,this.type=m,this.nativeEvent=E,this.target=L,this.currentTarget=null;for(var X in i)i.hasOwnProperty(X)&&(f=i[X],this[X]=f?f(E):E[X]);return this.isDefaultPrevented=(E.defaultPrevented!=null?E.defaultPrevented:E.returnValue===!1)?nu:Pd,this.isPropagationStopped=Pd,this}return y(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var f=this.nativeEvent;f&&(f.preventDefault?f.preventDefault():typeof f.returnValue!="unknown"&&(f.returnValue=!1),this.isDefaultPrevented=nu)},stopPropagation:function(){var f=this.nativeEvent;f&&(f.stopPropagation?f.stopPropagation():typeof f.cancelBubble!="unknown"&&(f.cancelBubble=!0),this.isPropagationStopped=nu)},persist:function(){},isPersistent:nu}),r}var fo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},iu=fa(fo),Ps=y({},fo,{view:0,detail:0}),Of=fa(Ps),zf,au,Xl,su=y({},Ps,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ou,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==Xl&&(Xl&&i.type==="mousemove"?(zf=i.screenX-Xl.screenX,au=i.screenY-Xl.screenY):au=zf=0,Xl=i),zf)},movementY:function(i){return"movementY"in i?i.movementY:au}}),_g=fa(su),Ji=y({},su,{dataTransfer:0}),xg=fa(Ji),Sg=y({},Ps,{relatedTarget:0}),If=fa(Sg),bg=y({},fo,{animationName:0,elapsedTime:0,pseudoElement:0}),Mg=fa(bg),ru=y({},fo,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),Hd=fa(ru),Eg=y({},fo,{data:0}),Fd=fa(Eg),Tg={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"}
vendor: 1,077 bytes, line 48
48,Vd={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"},Gd={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ag(i){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(i):(i=Gd[i])?!!r[i]:!1}function ou(){return Ag}var kd=y({},Ps,{key:function(i){if(i.key){var r=Tg[i.key]||i.key;if(r!=="Unidentified")return r}return i.type==="keypress"?(i=nl(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?Vd[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ou,charCode:function(i){return i.type==="keypress"?nl(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0}
vendor: 4,811 bytes, line 48
48,which:function(i){return i.type==="keypress"?nl(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),Xd=fa(kd),wg=y({},su,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Bf=fa(wg),Rg=y({},Ps,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ou}),wr=fa(Rg),jd=y({},fo,{propertyName:0,elapsedTime:0,pseudoElement:0}),S_=fa(jd),Cg=y({},su,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),ho=fa(Cg),Rr=y({},fo,{newState:0,oldState:0}),qd=fa(Rr),Yd=[9,13,27,32],il=ir&&"CompositionEvent"in window,po=null;ir&&"documentMode"in document&&(po=document.documentMode);var al=ir&&"TextEvent"in window&&!po,$i=ir&&(!il||po&&8<po&&11>=po),lu=" ",Wd=!1;function Pf(i,r){switch(i){case"keyup":return Yd.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function jl(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var mo=!1;function Hf(i,r){switch(i){case"compositionend":return jl(r);case"keypress":return r.which!==32?null:(Wd=!0,lu);case"textInput":return i=r.data,i===lu&&Wd?null:i;default:return null}}function Ng(i,r){if(mo)return i==="compositionend"||!il&&Pf(i,r)?(i=Lf(),uo=Uf=co=null,mo=!1,i):null;switch(i){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 $i&&r.locale!=="ko"?null:r.data;default:return null}}var ns={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 Zd(i){var r=i&&i.nodeName&&i.nodeName.toLowerCase();return r==="input"?!!ns[i.type]:r==="textarea"}function Ff(i,r,f,m){el?lo?lo.push(m):lo=[m]:el=m,r=Sv(r,"onChange"),0<r.length&&(f=new iu("onChange","change",null,f,m),i.push({event:f,listeners:r}))}var ql=null,Yl=null;function Kd(i){T1(i,0)}function Wl(i){var r=ae(i);if(gn(r))return i}function Qd(i,r){if(i==="change")return r}var cu=!1;if(ir){var sl;if(ir){var oi="oninput"in document;if(!oi){var Dg=document.createElement("div");Dg.setAttribute("oninput","return;"),oi=typeof Dg.oninput=="function"}sl=oi}else sl=!1;cu=sl&&(!document.documentMode||9<document.documentMode)}function Ug(){ql&&(ql.detachEvent("onpropertychange",Jd),Yl=ql=null)}function Jd(i){if(i.propertyName==="value"&&Wl(Yl)){var r=[];Ff(r,Yl,i,Cf(i)),Bd(Kd,r)}}function uu(i,r,f){i==="focusin"?(Ug(),ql=r,Yl=f,ql.attachEvent("onpropertychange",Jd)):i==="focusout"&&Ug()}function go(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Wl(Yl)}function Lg(i,r){if(i==="click")return Wl(r)}function Og(i,r){if(i==="input"||i==="change")return Wl(r)}function rl(i,r){return i===r&&(i!==0||1/i===1/r)||i!==i&&r!==r}var li=typeof Object.is=="function"?Object.is:rl;function Zl(i,r){if(li(i,r))return!0;if(typeof i!="object"||i===null||typeof r!="object"||r===null)return!1;var f=Object.keys(i),m=Object.keys(r);if(f.length!==m.length)return!1;for(m=0;m<f.length;m++){var x=f[m];if(!it.call(r,x)||!li(i[x],r[x]))return!1}return!0}function $d(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function ep(i,r){var f=$d(i);i=0;for(var m;f;){if(f.nodeType===3){if(m=i+f.textContent.length,i<=r&&m>=r)return{node:f,offset:r-i};i=m}e:{for(;f;){if(f.nextSibling){f=f.nextSibling;break e}f=f.parentNode}f=void 0}f=$d(f)}}function Vf(i,r){return i&&r?i===r?!0:i&&i.nodeType===3?!1:r&&r.nodeType===3?Vf(i,r.parentNode):"contains"in i?i.contains(r):i.compareDocumentPosition?!!(i.compareDocumentPosition(r)&16):!1:!1}function Gf(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var r=yn(i.document);r instanceof i.HTMLIFrameElement;){try{var f=typeof r.contentWindow.location.href=="string"}catch{f=!1}if(f)i=r.contentWindow;else break;r=yn(i.document)}return r}function Kl(i){var r=i&&i.nodeName&&i.nodeName.toLowerCase();return r&&(r==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||r==="textarea"||i.contentEditable==="true")}var zg=ir&&"documentMode"in document&&11>=document.documentMode,Ql=null,kf=null,Jl=null,is=!1;function Xf(i,r,f){var m=f.window===f?f.document:f.nodeType===9?f:f.ownerDocument;is||Ql==null||Ql!==yn(m)||(m=Ql,"selectionStart"in m&&Kl(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focu
vendor: 20,535 bytes, line 48
48sNode:m.focusNode,focusOffset:m.focusOffset}),Jl&&Zl(Jl,m)||(Jl=m,m=Sv(kf,"onSelect"),0<m.length&&(r=new iu("onSelect","select",null,r,f),i.push({event:r,listeners:m}),r.target=Ql)))}function vo(i,r){var f={};return f[i.toLowerCase()]=r.toLowerCase(),f["Webkit"+i]="webkit"+r,f["Moz"+i]="moz"+r,f}var $l={animationend:vo("Animation","AnimationEnd"),animationiteration:vo("Animation","AnimationIteration"),animationstart:vo("Animation","AnimationStart"),transitionrun:vo("Transition","TransitionRun"),transitionstart:vo("Transition","TransitionStart"),transitioncancel:vo("Transition","TransitionCancel"),transitionend:vo("Transition","TransitionEnd")},fu={},Ta={};ir&&(Ta=document.createElement("div").style,"AnimationEvent"in window||(delete $l.animationend.animation,delete $l.animationiteration.animation,delete $l.animationstart.animation),"TransitionEvent"in window||delete $l.transitionend.transition);function yo(i){if(fu[i])return fu[i];if(!$l[i])return i;var r=$l[i],f;for(f in r)if(r.hasOwnProperty(f)&&f in Ta)return fu[i]=r[f];return i}var za=yo("animationend"),tp=yo("animationiteration"),ar=yo("animationstart"),ec=yo("transitionrun"),_o=yo("transitionstart"),np=yo("transitioncancel"),jf=yo("transitionend"),Cr=new Map,qf="abort auxClick beforeToggle 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(" ");qf.push("scrollEnd");function ha(i,r){Cr.set(i,r),qe(r,[i])}var xo=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},ji=[],ol=0,Yf=0;function So(){for(var i=ol,r=Yf=ol=0;r<i;){var f=ji[r];ji[r++]=null;var m=ji[r];ji[r++]=null;var x=ji[r];ji[r++]=null;var E=ji[r];if(ji[r++]=null,m!==null&&x!==null){var L=m.pending;L===null?x.next=x:(x.next=L.next,L.next=x),m.pending=x}E!==0&&Wf(f,x,E)}}function hu(i,r,f,m){ji[ol++]=i,ji[ol++]=r,ji[ol++]=f,ji[ol++]=m,Yf|=m,i.lanes|=m,i=i.alternate,i!==null&&(i.lanes|=m)}function tc(i,r,f,m){return hu(i,r,f,m),nc(i)}function bo(i,r){return hu(i,null,null,r),nc(i)}function Wf(i,r,f){i.lanes|=f;var m=i.alternate;m!==null&&(m.lanes|=f);for(var x=!1,E=i.return;E!==null;)E.childLanes|=f,m=E.alternate,m!==null&&(m.childLanes|=f),E.tag===22&&(i=E.stateNode,i===null||i._visibility&1||(x=!0)),i=E,E=E.return;return i.tag===3?(E=i.stateNode,x&&r!==null&&(x=31-vt(f),i=E.hiddenUpdates,m=i[x],m===null?i[x]=[r]:m.push(r),r.lane=f|536870912),E):null}function nc(i){if(50<El)throw El=0,Tl=null,Error(n(185));for(var r=i.return;r!==null;)i=r,r=i.return;return i.tag===3?i.stateNode:null}var Mo={};function Ig(i,r,f,m){this.tag=i,this.key=f,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Aa(i,r,f,m){return new Ig(i,r,f,m)}function wa(i){return i=i.prototype,!(!i||!i.isReactComponent)}function sr(i,r){var f=i.alternate;return f===null?(f=Aa(i.tag,r,i.key,i.mode),f.elementType=i.elementType,f.type=i.type,f.stateNode=i.stateNode,f.alternate=i,i.alternate=f):(f.pendingProps=r,f.type=i.type,f.flags=0,f.subtreeFlags=0,f.deletions=null),f.flags=i.flags&65011712,f.childLanes=i.childLanes,f.lanes=i.lanes,f.child=i.child,f.memoizedProps=i.memoizedProps,f.memoizedState=i.memoizedState,f.updateQueue=i.updateQueue,r=i.dependencies,f.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},f.sibling=i.sibling,f.index=i.index,f.ref=i.ref,f.refCleanup=i.refCleanup,f}function da(i,r){i.flags&=65011714;var f=i.alternate;return f===null?(i.childLanes=0,i.lanes=r,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=f.childLanes,i.lanes=f.lanes,i.child=f.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=f.memoizedProps,i.memoizedState=f.memoizedState,i.updateQueue=f.updateQueue,i.type=f.type,r=f.dependencies,i.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),i}function du(i,r,f,m,x,E){var L=0;if(m=i,typeof i=="function")wa(i)&&(L=1);else if(typeof i=="string")L=gR(i,f,Le.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case O:return i=Aa(31,f,r,x),i.elementType=O,i.lanes=E,i;case R:return Nr(f.children,x,E,r);case A:L=8,x|=24;break;case M:return i=Aa(12,f,r,x|2),i.elementType=M,i.lanes=E,i;case H:return i=Aa(13,f,r,x),i.elementType=H,i.lanes=E,i;case F:return i=Aa(19,f,r,x),i.elementType=F,i.lanes=E,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case D:L=10;break e;case C:L=9;break e;case U:L=11;break e;case G:L=14;break e;case V:L=16,m=null;break e}L=29,f=Error(n(130,i===null?"null":typeof i,"")),m=null}return r=Aa(L,f,r,x),r.elementType=i,r.type=m,r.lanes=E,r}function Nr(i,r,f,m){return i=Aa(7,i,m,r),i.lanes=f,i}function Zf(i,r,f){return i=Aa(6,i,null,r),i.lanes=f,i}function Bg(i){var r=Aa(18,null,null,0);return r.stateNode=i,r}function Hs(i,r,f){return r=Aa(4,i.children!==null?i.children:[],i.key,r),r.lanes=f,r.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},r}var ip=new WeakMap;function Ia(i,r){if(typeof i=="object"&&i!==null){var f=ip.get(i);return f!==void 0?f:(r={value:i,source:r,stack:dt(r)},ip.set(i,r),r)}return{value:i,source:r,stack:dt(r)}}var Fs=[],ll=0,pu=null,ic=0,as=[],Ba=0,rr=null,or=1,lr="";function Dr(i,r){Fs[ll++]=ic,Fs[ll++]=pu,pu=i,ic=r}function ap(i,r,f){as[Ba++]=or,as[Ba++]=lr,as[Ba++]=rr,rr=i;var m=or;i=lr;var x=32-vt(m)-1;m&=~(1<<x),f+=1;var E=32-vt(r)+x;if(30<E){var L=x-x%5;E=(m&(1<<L)-1).toString(32),m>>=L,x-=L,or=1<<32-vt(r)+x|f<<x|m,lr=E+i}else or=1<<E|f<<x|m,lr=i}function Kf(i){i.return!==null&&(Dr(i,1),ap(i,1,0))}function Eo(i){for(;i===pu;)pu=Fs[--ll],Fs[ll]=null,ic=Fs[--ll],Fs[ll]=null;for(;i===rr;)rr=as[--Ba],as[Ba]=null,lr=as[--Ba],as[Ba]=null,or=as[--Ba],as[Ba]=null}function mu(i,r){as[Ba++]=or,as[Ba++]=lr,as[Ba++]=rr,or=r.id,lr=r.overflow,rr=i}var qi=null,ii=null,En=!1,Ur=null,Yi=!1,Qf=Error(n(519));function Sn(i){var r=Error(n(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw gu(Ia(r,i)),Qf}function Jf(i){var r=i.stateNode,f=i.type,m=i.memoizedProps;switch(r[nn]=i,r[I]=m,f){case"dialog":Tn("cancel",r),Tn("close",r);break;case"iframe":case"object":case"embed":Tn("load",r);break;case"video":case"audio":for(f=0;f<Kp.length;f++)Tn(Kp[f],r);break;case"source":Tn("error",r);break;case"img":case"image":case"link":Tn("error",r),Tn("load",r);break;case"details":Tn("toggle",r);break;case"input":Tn("invalid",r),fi(r,m.value,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name,!0);break;case"select":Tn("invalid",r);break;case"textarea":Tn("invalid",r),Ea(r,m.value,m.defaultValue,m.children)}f=m.children,typeof f!="string"&&typeof f!="number"&&typeof f!="bigint"||r.textContent===""+f||m.suppressHydrationWarning===!0||C1(r.textContent,f)?(m.popover!=null&&(Tn("beforetoggle",r),Tn("toggle",r)),m.onScroll!=null&&Tn("scroll",r),m.onScrollEnd!=null&&Tn("scrollend",r),m.onClick!=null&&(r.onclick=nr),r=!0):r=!1,r||Sn(i,!0)}function Pg(i){for(qi=i.return;qi;)switch(qi.tag){case 5:case 31:case 13:Yi=!1;return;case 27:case 3:Yi=!0;return;default:qi=qi.return}}function cl(i){if(i!==qi)return!1;if(!En)return Pg(i),En=!0,!1;var r=i.tag,f;if((f=r!==3&&r!==27)&&((f=r===5)&&(f=i.type,f=!(f!=="form"&&f!=="button")||V_(i.type,i.memoizedProps)),f=!f),f&&ii&&Sn(i),Pg(i),r===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));ii=P1(i)}else if(r===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));ii=P1(i)}else r===27?(r=ii,bc(i.type)?(i=q_,q_=null,ii=i):ii=r):ii=qi?_r(i.stateNode.nextSibling):null;return!0}function ul(){ii=qi=null,En=!1}function sp(){var i=Ur;return i!==null&&(_a===null?_a=i:_a.push.apply(_a,i),Ur=null),i}function gu(i){Ur===null?Ur=[i]:Ur.push(i)}var rp=W(null),Lr=null,pa=null;function Or(i,r,f){Ce(rp,r._currentValue),r._currentValue=f}function As(i){i._currentValue=rp.current,fe(rp)}function zr(i,r,f){for(;i!==null;){var m=i.alternate;if((i.childLanes&r)!==r?(i.childLanes|=r,m!==null&&(m.childLanes|=r)):m!==null&&(m.childLanes&r)!==r&&(m.childLanes|=r),i===f)break;i=i.return}}function $f(i,r,f,m){var x=i.child;for(x!==null&&(x.return=i);x!==null;){var E=x.dependencies;if(E!==null){var L=x.child;E=E.firstContext;e:for(;E!==null;){var X=E;E=x;for(var oe=0;oe<r.length;oe++)if(X.context===r[oe]){E.lanes|=f,X=E.alternate,X!==null&&(X.lanes|=f),zr(E.return,f,i),m||(L=null);break e}E=X.next}}else if(x.tag===18){if(L=x.return,L===null)throw Error(n(341));L.lanes|=f,E=L.alternate,E!==null&&(E.lanes|=f),zr(L,f,i),L=null}else L=x.child;if(L!==null)L.return=x;else for(L=x;L!==null;){if(L===i){L=null;break}if(x=L.sibling,x!==null){x.return=L.return,L=x;break}L=L.return}x=L}}function To(i,r,f,m){i=null;for(var x=r,E=!1;x!==null;){if(!E){if((x.flags&524288)!==0)E=!0;else if((x.flags&262144)!==0)break}if(x.tag===10){var L=x.alternate;if(L===null)throw Error(n(387));if(L=L.memoizedProps,L!==null){var X=x.type;li(x.pendingProps.value,L.value)||(i!==null?i.push(X):i=[X])}}else if(x===De.current){if(L=x.alternate,L===null)throw Error(n(387));L.memoizedState.memoizedState!==x.memoizedState.memoizedState&&(i!==null?i.push(tm):i=[tm])}x=x.return}i!==null&&$f(r,i,f,m),r.flags|=262144}function ac(i){for(i=i.firstContext;i!==null;){if(!li(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function fl(i){Lr=i,pa=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function Wi(i){return op(Lr,i)}function vu(i,r){return Lr===null&&fl(i),op(i,r)}function op(i,r){var f=r._currentValue;if(r={context:r,memoizedValue:f,next:null},pa===null){if(i===null)throw Error(n(308));pa=r,i.dependencies={lanes:0,firstContext:r},i.flags|=524288}else pa=pa.next=r;return f}var Hg=typeof AbortController<"u"?AbortController:function(){var i=[],r=this.signal={aborted:!1,addEventListener:function(f,m){i.push(m)}};this.abort=function(){r.aborted=!0,i.forEach(function(f){return f()})}},Fg=s.unstable_scheduleCallback,lp=s.unstable_NormalPriority,Pt={$$typeof:D,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function cp(){return{controller:new Hg,data:new Map,refCount:0}}function ea(i){i.refCount--,i.refCount===0&&Fg(lp,function(){i.controller.abort()})}var hl=null,up=0,Ir=0,Vs=null;function sc(i,r){if(hl===null){var f=hl=[];up=0,Ir=U_(),Vs={status:"pending",value:void 0,then:function(m){f.push(m)}}}return up++,r.then(fp,fp),r}function fp(){if(--up===0&&hl!==null){Vs!==null&&(Vs.status="fulfilled");var i=hl;hl=null,Ir=0,Vs=null;for(var r=0;r<i.length;r++)(0,i[r])()}}function hp(i,r){var f=[],m={status:"pending",value:null,reason:null,then:function(x){f.push(x)}};return i.then(function(){m.status="fulfilled",m.value=r;for(var x=0;x<f.length;x++)(0,f[x])(r)},function(x){for(m.status="rejected",m.reason=x,x=0;x<f.length;x++)(0,f[x])(void 0)}),m}var Vg=P.S;P.S=function(i,r){_c=k(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&sc(i,r),Vg!==null&&Vg(i,r)};var Ao=W(null);function cr(){var i=Ao.current;return i!==null?i:qn.pooledCache}function rc(i,r){r===null?Ce(Ao,Ao.current):Ce(Ao,r.pool)}function eh(){var i=cr();return i===null?null:{parent:Pt._currentValue,pool:i}}var wo=Error(n(460)),yu=Error(n(474)),Gs=Error(n(542)),_u={then:function(){}};function Gg(i){return i=i.status,i==="fulfilled"||i==="rejected"}function dp(i,r,f){switch(f=i[f],f===void 0?i.push(r):f!==r&&(r.then(nr,nr),r=f),r.status){case"fulfilled":return r.value;case"rejected":throw i=r.reason,pp(i),i;default:if(typeof r.status=="string")r.then(nr,nr);else{if(i=qn,i!==null&&100<i.shellSuspendCounter)throw Error(n(482));i=r,i.status="pending",i.then(function(m){if(r.status==="pending"){var x=r;x.status="fulfilled",x.value=m}},function(m){if(r.status==="pending"){var x=r;x.status="rejected",x.reason=m}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw i=r.reason,pp(i),i}throw kt=r,wo}}function dl(i){try{var r=i._init;return r(i._payload)}catch(f){throw f!==null&&typeof f=="object"&&typeof f.then=="function"?(kt=f,wo):f}}var kt=null;function th(){if(kt===null)throw Error(n(459));var i=kt;return kt=null,i}function pp(i){if(i===wo||i===Gs)throw Error(n(483))}var Ro=null,Co=0;function nh(i){var r=Co;return Co+=1,Ro===null&&(Ro=[]),dp(Ro,i,r)}function xu(i,r){r=r.props.ref,i.ref=r!==void 0?r:null}function Su(i,r){throw r.$$typeof===_?Error(n(525)):(i=Object.prototype.toString.call(r),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":i)))}function oc(i){function r(_e,de){if(i){var Ee=_e.deletions;Ee===null?(_e.deletions=[de],_e.flags|=16):Ee.push(de)}}function f(_e,de){if(!i)return null;for(;de!==null;)r(_e,de),de=de.sibling;return null}function m(_e){for(var de=new Map;_e!==null;)_e.key!==null?de.set(_e.key,_e):de.set(_e.index,_e),_e=_e.sibling;return de}function x(_e,de){return _e=sr(_e,de),_e.index=0,_e.sibling=null,_e}function E(_e,de,Ee){return _e.index=Ee,i?(Ee=_e.alternate,Ee!==null?(Ee=Ee.index,Ee<de?(_e.flags|=67108866,de):Ee):(_e.flags|=67108866,de)):(_e.flags|=1048576,de)}function L(_e){return i&&_e.alternate===null&&(_e.flags|=67108866),_e}function X(_e,de,Ee,Ye){return de===null||de.tag!==6?(de=Zf(Ee,_e.mode,Ye),de.return=_e,de):(de=x(de,Ee),de.return=_e,de)}function oe(_e,de,Ee,Ye){var Gt=Ee.type;return Gt===R?Ve(_e,de,Ee.props.children,Ye,Ee.key):de!==null&&(de.elementType===Gt||typeof Gt=="object"&&Gt!==null&&Gt.$$typeof===V&&dl(Gt)===de.type)?(de=x(de,Ee.props),xu(de,Ee),de.return=_e,de):(de=du(Ee.type,Ee.key,Ee.props,null,_e.mode,Ye),xu(de,Ee),de.return=_e,de)}function Te(_e,de,Ee,Ye){return de===null||de.tag!==4||de.stateNode.containerInfo!==Ee.containerInfo||de.stateNode.implementation!==Ee.implementation?(de=Hs(Ee,_e.mode,Ye),de.return=_e,de):(de=x(de,Ee.children||[]),de.return=_e,de)}function Ve(_e,de,Ee,Ye,Gt){return de===null||de.tag!==7?(de=Nr(Ee,_e.mode,Ye,Gt),de.return=_e,de):(de=x(de,Ee),de.return=_e,de)}function Ke(_e,de,Ee){if(typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint")return de=Zf(""+de,_e.mode,Ee),de.return=_e,de;if(typeof de=="object"&&de!==null){switch(de.$$typeof){case b:return Ee=du(de.type,de.key,de.props,null,_e.mode,Ee),xu(Ee,de),Ee.return=_e,Ee;case T:return de=Hs(de,_e.mode,Ee),de.return=_e,de;case V:return de=dl(de),Ke(_e,de,Ee)}if(me(de)||se(de))return de=Nr(de,_e.mode,Ee,null),de.return=_e,de;if(typeof de.then=="function")return Ke(_e,nh(de),Ee);if(de.$$typeof===D)return Ke(_e,vu(_e,de),Ee);Su(_e,de)}return null}function Re(_e,de,Ee,Ye){var Gt=de!==null?de.key:null;if(typeof Ee=="string"&&Ee!==""||typeof Ee=="number"||typeof Ee=="bigint")return Gt!==null?null:X(_e,de,""+Ee,Ye);if(typeof Ee=="object"&&Ee!==null){switch(Ee.$$typeof){case b:return Ee.key===Gt?oe(_e,de,Ee,Ye):null;case T:return Ee.key===Gt?Te(_e,de,Ee,Ye):null;case V:return Ee=dl(Ee),Re(_e,de,Ee,Ye)}if(me(Ee)||se(Ee))return Gt!==null?null:Ve(_e,de,Ee,Ye,null);if(typeof Ee.then=="function")return Re(_e,de,nh(Ee),Ye);if(Ee.$$typeof===D)return Re(_e,de,vu(_e,Ee),Ye);Su(_e,Ee)}return null}function Oe(_e,de,Ee,Ye,Gt){if(typeof Ye=="string"&&Ye!==""||typeof Ye=="number"||typeof Ye=="bigint")return _e=_e.get(Ee)||null,X(de,_e,""+Ye,Gt);if(typeof Ye=="object"&&Ye!==null){switch(Ye.$$typeof){case b:return _e=_e.get(Ye.key===null?Ee:Ye.key)||null,oe(de,_e,Ye,Gt);case T:return _e=_e.get(Ye.key===null?Ee:Ye.key)||null,Te(de,_e,Ye,Gt);case V:return Ye=dl(Ye),Oe(_e,de,Ee,Ye,Gt)}if(me(Ye)||se(Ye))return _e=_e.get(Ee)||null,Ve(de,_e,Ye,Gt,null);if(typeof Ye.then=="function")return Oe(_e,de,Ee,nh(Ye),Gt);if(Ye.$$typeof===D)return Oe(_e,de,Ee,vu(de,Ye),Gt);Su(de,Ye)}return null}function Lt(_e,de,Ee,Ye){for(var Gt=null,Wn=null,It=de,pn=de=0,Dn=null;It!==null&&pn<Ee.length;pn++){It.index>pn?(Dn=It,It=null):Dn=It.sibling;var Zn=Re(_e,It,Ee[pn],Ye);if(Zn===null){It===null&&(It=Dn);break}i&&It&&Zn.alternate===null&&r(_e,It),de=E(Zn,de,pn),Wn===null?Gt=Zn:Wn.sibling=Zn,Wn=Zn,It=Dn}if(pn===Ee.length)return f(_e,It),En&&Dr(_e,pn),Gt;if(It===null){for(;pn<Ee.length;pn++)It=Ke(_e,Ee[pn],Ye),It!==null&&(de=E(It,de,pn),Wn===null?Gt=It:Wn.sibling=It,Wn=It);return En&&Dr(_e,pn),Gt}for(It=m(It);pn<Ee.length;pn++)Dn=Oe(It,_e,pn,Ee[pn],Ye),Dn!==null&&(i&&Dn.alternate!==null&&It.delete(Dn.key===null?pn:Dn.key),de=E(Dn,de,pn),Wn===null?Gt=Dn:Wn.sibling=Dn,Wn=Dn);return i&&It.forEach(function(wc){return r(_e,wc)}),En&&Dr(_e,pn),Gt}function Wt(_e,de,Ee,Ye){if(Ee==null)throw Error(n(151));for(var Gt=null,Wn=null,It=de,pn=de=0,Dn=null,Zn=Ee.next();It!==null&&!Zn.done;pn++,Zn=Ee.next()){It.index>pn?(Dn=It,It=null):Dn=It.sibling;var wc=Re(_e,It,Zn.value,Ye);if(wc===null){It===null&&(It=Dn);break}i&&It&&wc.alternate===null&&r(_e,It),de=E(wc,de,pn),Wn===null?Gt=wc:Wn.sibling=wc,Wn=wc,It=Dn}if(Zn.done)return f(_e,It),En&&Dr(_e,pn),Gt;if(It===null){for(;!Zn.done;pn++,Zn=Ee.next())Zn=Ke(_e,Zn.value,Ye),Zn!==null&&(de=E(Zn,de,pn),Wn===null?Gt=Zn:Wn.sibling=Zn,Wn=Zn);return En&&Dr(_e,pn),Gt}for(It=m(It);!Zn.done;pn++,Zn=Ee.next())Zn=Oe(It,_e,pn,Zn.value,Ye),Zn!==null&&(i&&Zn.alternate!==null&&It.delete(Zn.key===null?pn:Zn.key),de=E(Zn,de,pn),Wn===null?Gt=Zn:Wn.sibling=Zn,Wn=Zn);return i&&It.forEach(function(wR){return r(_e,wR)}),En&&Dr(_e,pn),Gt}function ri(_e,de,Ee,Ye){if(typeof Ee=="object"&&Ee!==null&&Ee.type===R&&Ee.key===null&&(Ee=Ee.props.children),typeof Ee=="object"&&Ee!==null){switch(Ee.$$typeof){case b:e:{for(var Gt=Ee.key;de!==null;){if(de.key===Gt){if(Gt=Ee.type,Gt===R){if(de.tag===7){f(_e,de.sibling),Ye=x(de,Ee.props.children),Ye.return=_e,_e=Ye;break e}}else if(de.elementType===Gt||typeof Gt=="object"&&Gt!==null&&Gt.$$typeof===V&&dl(Gt)===de.type){f(_e,de.sibling),Ye=x(de,Ee.props),xu(Ye,Ee),Ye.return=_e,_e=Ye;break e}f(_e,de);break}else r(_e,de);de=de.sibling}Ee.type===R?(Ye=Nr(Ee.props.children,_e.mode,Ye,Ee.key),Ye.return=_e,_e=Ye):(Ye=du(Ee.type,Ee.key,Ee.props,null,_e.mode,Ye),xu(Ye,Ee),Ye.return=_e,_e=Ye)}return L(_e);case T:e:{for(Gt=Ee.key;de!==null;){if(de.key===Gt)if(de.tag===4&&de.stateNode.containerInfo===Ee.containerInfo&&de.stateNode.implementation===Ee.implementation){f(_e,de.sibling),Ye=x(de,Ee.children||[]),Ye.return=_e,_e=Ye;break e}else{f(_e,de);break}else r(_e,de);de=de.sibling}Ye=Hs(Ee,_e.mode,Ye),Ye.return=_e,_e=Ye}return L(_e);case V:return Ee=dl(Ee),ri(_e,de,Ee,Ye)}if(me(Ee))return Lt(_e,de,Ee,Ye);if(se(Ee)){if(Gt=se(Ee),typeof Gt!="function")throw Error(n(150));return Ee=Gt.call(Ee),Wt(_e,de,Ee,Ye)}if(typeof Ee.then=="function")return ri(_e,de,nh(Ee),Ye);if(Ee.$$typeof===D)return ri(_e,de,vu(_e,Ee),Ye);Su(_e,Ee)}return typeof Ee=="string"&&Ee!==""||typeof Ee=="number"||typeof Ee=="bigint"?(Ee=""+Ee,de!==null&&de.tag===6?(f(_e,de.sibling),Ye=x(de,Ee),Ye.return=_e,_e=Ye):(f(_e,de),Ye=Zf(Ee,_e.mode,Ye),Ye.return=_e,_e=Ye),L(_e)):f(_e,de)}return function(_e,de,Ee,Ye){try{Co=0;var Gt=ri(_e,de,Ee,Ye);return Ro=null,Gt}catch(It){if(It===wo||It===Gs)throw It;var Wn=Aa(29,It,null,_e.mode);return Wn.lanes=Ye,Wn.return=_e,Wn}finally{}}}var pl=oc(!0),kg=oc(!1),No=!1;function mp(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function gp(i,r){i=i.updateQueue,r.updateQueue===i&&(r.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function ur(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Br(i,r,f){var m=i.updateQueue;if(m===null)return null;if(m=m.shared,(Cn&2)!==0){var x=m.pending;
vendor: 6,656 bytes, line 48
48return x===null?r.next=r:(r.next=x.next,x.next=r),m.pending=r,r=nc(i),Wf(i,null,f),r}return hu(i,m,r,f),nc(i)}function Do(i,r,f){if(r=r.updateQueue,r!==null&&(r=r.shared,(f&4194048)!==0)){var m=r.lanes;m&=i.pendingLanes,f|=m,r.lanes=f,Oa(i,f)}}function ih(i,r){var f=i.updateQueue,m=i.alternate;if(m!==null&&(m=m.updateQueue,f===m)){var x=null,E=null;if(f=f.firstBaseUpdate,f!==null){do{var L={lane:f.lane,tag:f.tag,payload:f.payload,callback:null,next:null};E===null?x=E=L:E=E.next=L,f=f.next}while(f!==null);E===null?x=E=r:E=E.next=r}else x=E=r;f={baseState:m.baseState,firstBaseUpdate:x,lastBaseUpdate:E,shared:m.shared,callbacks:m.callbacks},i.updateQueue=f;return}i=f.lastBaseUpdate,i===null?f.firstBaseUpdate=r:i.next=r,f.lastBaseUpdate=r}var vp=!1;function bu(){if(vp){var i=Vs;if(i!==null)throw i}}function ml(i,r,f,m){vp=!1;var x=i.updateQueue;No=!1;var E=x.firstBaseUpdate,L=x.lastBaseUpdate,X=x.shared.pending;if(X!==null){x.shared.pending=null;var oe=X,Te=oe.next;oe.next=null,L===null?E=Te:L.next=Te,L=oe;var Ve=i.alternate;Ve!==null&&(Ve=Ve.updateQueue,X=Ve.lastBaseUpdate,X!==L&&(X===null?Ve.firstBaseUpdate=Te:X.next=Te,Ve.lastBaseUpdate=oe))}if(E!==null){var Ke=x.baseState;L=0,Ve=Te=oe=null,X=E;do{var Re=X.lane&-536870913,Oe=Re!==X.lane;if(Oe?(bn&Re)===Re:(m&Re)===Re){Re!==0&&Re===Ir&&(vp=!0),Ve!==null&&(Ve=Ve.next={lane:0,tag:X.tag,payload:X.payload,callback:null,next:null});e:{var Lt=i,Wt=X;Re=r;var ri=f;switch(Wt.tag){case 1:if(Lt=Wt.payload,typeof Lt=="function"){Ke=Lt.call(ri,Ke,Re);break e}Ke=Lt;break e;case 3:Lt.flags=Lt.flags&-65537|128;case 0:if(Lt=Wt.payload,Re=typeof Lt=="function"?Lt.call(ri,Ke,Re):Lt,Re==null)break e;Ke=y({},Ke,Re);break e;case 2:No=!0}}Re=X.callback,Re!==null&&(i.flags|=64,Oe&&(i.flags|=8192),Oe=x.callbacks,Oe===null?x.callbacks=[Re]:Oe.push(Re))}else Oe={lane:Re,tag:X.tag,payload:X.payload,callback:X.callback,next:null},Ve===null?(Te=Ve=Oe,oe=Ke):Ve=Ve.next=Oe,L|=Re;if(X=X.next,X===null){if(X=x.shared.pending,X===null)break;Oe=X,X=Oe.next,Oe.next=null,x.lastBaseUpdate=Oe,x.shared.pending=null}}while(!0);Ve===null&&(oe=Ke),x.baseState=oe,x.firstBaseUpdate=Te,x.lastBaseUpdate=Ve,E===null&&(x.shared.lanes=0),ms|=L,i.lanes=L,i.memoizedState=Ke}}function fr(i,r){if(typeof i!="function")throw Error(n(191,i));i.call(r)}function ta(i,r){var f=i.callbacks;if(f!==null)for(i.callbacks=null,i=0;i<f.length;i++)fr(f[i],r)}var ss=W(null),Ra=W(0);function yp(i,r){i=Ri,Ce(Ra,i),Ce(ss,r),Ri=i|r.baseLanes}function _p(){Ce(Ra,Ri),Ce(ss,ss.current)}function ma(){Ri=Ra.current,fe(ss),fe(Ra)}var Pi=W(null),ws=null;function Uo(i){var r=i.alternate;Ce(mi,mi.current&1),Ce(Pi,i),ws===null&&(r===null||ss.current!==null||r.memoizedState!==null)&&(ws=i)}function xp(i){Ce(mi,mi.current),Ce(Pi,i),ws===null&&(ws=i)}function Xg(i){i.tag===22?(Ce(mi,mi.current),Ce(Pi,i),ws===null&&(ws=i)):Pr()}function Pr(){Ce(mi,mi.current),Ce(Pi,Pi.current)}function rs(i){fe(Pi),ws===i&&(ws=null),fe(mi)}var mi=W(0);function ah(i){for(var r=i;r!==null;){if(r.tag===13){var f=r.memoizedState;if(f!==null&&(f=f.dehydrated,f===null||X_(f)||j_(f)))return r}else if(r.tag===19&&(r.memoizedProps.revealOrder==="forwards"||r.memoizedProps.revealOrder==="backwards"||r.memoizedProps.revealOrder==="unstable_legacy-backwards"||r.memoizedProps.revealOrder==="together")){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===i)break;for(;r.sibling===null;){if(r.return===null||r.return===i)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var Pa=0,Kt=null,Jn=null,Ui=null,sh=!1,hr=!1,gl=!1,rh=0,Mu=0,dr=null,b_=0;function gi(){throw Error(n(321))}function Sp(i,r){if(r===null)return!1;for(var f=0;f<r.length&&f<i.length;f++)if(!li(i[f],r[f]))return!1;return!0}function bp(i,r,f,m,x,E){return Pa=E,Kt=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,P.H=i===null||i.memoizedState===null?uv:uc,gl=!1,E=f(m,x),gl=!1,hr&&(E=qg(r,f,m,x)),jg(i),E}function jg(i){P.H=Ru;var r=Jn!==null&&Jn.next!==null;if(Pa=0,Ui=Jn=Kt=null,sh=!1,Mu=0,dr=null,r)throw Error(n(300));i===null||ci||(i=i.dependencies,i!==null&&ac(i)&&(ci=!0))}function qg(i,r,f,m){Kt=i;var x=0;do{if(hr&&(dr=null),Mu=0,hr=!1,25<=x)throw Error(n(301));if(x+=1,Ui=Jn=null,i.updateQueue!=null){var E=i.updateQueue;E.lastEffect=null,E.events=null,E.stores=null,E.memoCache!=null&&(E.memoCache.index=0)}P.H=Cu,E=r(f,m)}while(hr);return E}function M_(){var i=P.H,r=i.useState()[0];return r=typeof r.then=="function"?Tu(r):r,i=i.useState()[0],(Jn!==null?Jn.memoizedState:null)!==i&&(Kt.flags|=1024),r}function Mp(){var i=rh!==0;return rh=0,i}function Ep(i,r,f){r.updateQueue=i.updateQueue,r.flags&=-2053,i.lanes&=~f}function Tp(i){if(sh){for(i=i.memoizedState;i!==null;){var r=i.queue;r!==null&&(r.pending=null),i=i.next}sh=!1}Pa=0,Ui=Jn=Kt=null,hr=!1,Mu=rh=0,dr=null}function Ca(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ui===null?Kt.memoizedState=Ui=i:Ui=Ui.next=i,Ui}function Ei(){if(Jn===null){var i=Kt.alternate;i=i!==null?i.memoizedState:null}else i=Jn.next;var r=Ui===null?Kt.memoizedState:Ui.next;if(r!==null)Ui=r,Jn=i;else{if(i===null)throw Kt.alternate===null?Error(n(467)):Error(n(310));Jn=i,i={memoizedState:Jn.memoizedState,baseState:Jn.baseState,baseQueue:Jn.baseQueue,queue:Jn.queue,next:null},Ui===null?Kt.memoizedState=Ui=i:Ui=Ui.next=i}return Ui}function Eu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Tu(i){var r=Mu;return Mu+=1,dr===null&&(dr=[]),i=dp(dr,i,r),r=Kt,(Ui===null?r.memoizedState:Ui.next)===null&&(r=r.alternate,P.H=r===null||r.memoizedState===null?uv:uc),i}function oh(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return Tu(i);if(i.$$typeof===D)return Wi(i)}throw Error(n(438,String(i)))}function Ap(i){var r=null,f=Kt.updateQueue;if(f!==null&&(r=f.memoCache),r==null){var m=Kt.alternate;m!==null&&(m=m.updateQueue,m!==null&&(m=m.memoCache,m!=null&&(r={data:m.data.map(function(x){return x.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),f===null&&(f=Eu(),Kt.updateQueue=f),f.memoCache=r,f=r.data[r.index],f===void 0)for(f=r.data[r.index]=Array(i),m=0;m<i;m++)f[m]=z;return r.index++,f}function Hr(i,r){return typeof r=="function"?r(i):r}function lh(i){var r=Ei();return wp(r,Jn,i)}function wp(i,r,f){var m=i.queue;if(m===null)throw Error(n(311));m.lastRenderedReducer=f;var x=i.baseQueue,E=m.pending;if(E!==null){if(x!==null){var L=x.next;x.next=E.next,E.next=L}r.baseQueue=x=E,m.pending=null}if(E=i.baseState,x===null)i.memoizedState=E;else{r=x.next;var X=L=null,oe=null,Te=r,Ve=!1;do{var Ke=Te.lane&-536870913;if(Ke!==Te.lane?(bn&Ke)===Ke:(Pa&Ke)===Ke){var Re=Te.revertLane;
vendor: 15,966 bytes, line 48
48if(Re===0)oe!==null&&(oe=oe.next={lane:0,revertLane:0,gesture:null,action:Te.action,hasEagerState:Te.hasEagerState,eagerState:Te.eagerState,next:null}),Ke===Ir&&(Ve=!0);else if((Pa&Re)===Re){Te=Te.next,Re===Ir&&(Ve=!0);continue}else Ke={lane:0,revertLane:Te.revertLane,gesture:null,action:Te.action,hasEagerState:Te.hasEagerState,eagerState:Te.eagerState,next:null},oe===null?(X=oe=Ke,L=E):oe=oe.next=Ke,Kt.lanes|=Re,ms|=Re;Ke=Te.action,gl&&f(E,Ke),E=Te.hasEagerState?Te.eagerState:f(E,Ke)}else Re={lane:Ke,revertLane:Te.revertLane,gesture:Te.gesture,action:Te.action,hasEagerState:Te.hasEagerState,eagerState:Te.eagerState,next:null},oe===null?(X=oe=Re,L=E):oe=oe.next=Re,Kt.lanes|=Ke,ms|=Ke;Te=Te.next}while(Te!==null&&Te!==r);if(oe===null?L=E:oe.next=X,!li(E,i.memoizedState)&&(ci=!0,Ve&&(f=Vs,f!==null)))throw f;i.memoizedState=E,i.baseState=L,i.baseQueue=oe,m.lastRenderedState=E}return x===null&&(m.lanes=0),[i.memoizedState,m.dispatch]}function ch(i){var r=Ei(),f=r.queue;if(f===null)throw Error(n(311));f.lastRenderedReducer=i;var m=f.dispatch,x=f.pending,E=r.memoizedState;if(x!==null){f.pending=null;var L=x=x.next;do E=i(E,L.action),L=L.next;while(L!==x);li(E,r.memoizedState)||(ci=!0),r.memoizedState=E,r.baseQueue===null&&(r.baseState=E),f.lastRenderedState=E}return[E,m]}function Rp(i,r,f){var m=Kt,x=Ei(),E=En;if(E){if(f===void 0)throw Error(n(407));f=f()}else f=r();var L=!li((Jn||x).memoizedState,f);if(L&&(x.memoizedState=f,ci=!0),x=x.queue,Lp(Np.bind(null,m,x,i),[i]),x.getSnapshot!==r||L||Ui!==null&&Ui.memoizedState.tag&1){if(m.flags|=2048,lc(9,{destroy:void 0},Cp.bind(null,m,x,f,r),null),qn===null)throw Error(n(349));E||(Pa&127)!==0||Yg(m,r,f)}return f}function Yg(i,r,f){i.flags|=16384,i={getSnapshot:r,value:f},r=Kt.updateQueue,r===null?(r=Eu(),Kt.updateQueue=r,r.stores=[i]):(f=r.stores,f===null?r.stores=[i]:f.push(i))}function Cp(i,r,f,m){r.value=f,r.getSnapshot=m,Dp(r)&&uh(i)}function Np(i,r,f){return f(function(){Dp(r)&&uh(i)})}function Dp(i){var r=i.getSnapshot;i=i.value;try{var f=r();return!li(i,f)}catch{return!0}}function uh(i){var r=bo(i,2);r!==null&&u(r,i,2)}function Au(i){var r=Ca();if(typeof i=="function"){var f=i;if(i=f(),gl){Dt(!0);try{f()}finally{Dt(!1)}}}return r.memoizedState=r.baseState=i,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hr,lastRenderedState:i},r}function Wg(i,r,f,m){return i.baseState=f,wp(i,Jn,typeof m=="function"?m:Hr)}function E_(i,r,f,m,x){if(Fr(i))throw Error(n(485));if(i=r.action,i!==null){var E={payload:x,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(L){E.listeners.push(L)}};P.T!==null?f(!0):E.isTransition=!1,m(E),f=r.pending,f===null?(E.next=r.pending=E,Zg(r,E)):(E.next=f.next,r.pending=f.next=E)}}function Zg(i,r){var f=r.action,m=r.payload,x=i.state;if(r.isTransition){var E=P.T,L={};P.T=L;try{var X=f(x,m),oe=P.S;oe!==null&&oe(L,X),Kg(i,r,X)}catch(Te){fh(i,r,Te)}finally{E!==null&&L.types!==null&&(E.types=L.types),P.T=E}}else try{E=f(x,m),Kg(i,r,E)}catch(Te){fh(i,r,Te)}}function Kg(i,r,f){f!==null&&typeof f=="object"&&typeof f.then=="function"?f.then(function(m){Up(i,r,m)},function(m){return fh(i,r,m)}):Up(i,r,f)}function Up(i,r,f){r.status="fulfilled",r.value=f,Qg(r),i.state=f,r=i.pending,r!==null&&(f=r.next,f===r?i.pending=null:(f=f.next,r.next=f,Zg(i,f)))}function fh(i,r,f){var m=i.pending;if(i.pending=null,m!==null){m=m.next;do r.status="rejected",r.reason=f,Qg(r),r=r.next;while(r!==m)}i.action=null}function Qg(i){i=i.listeners;for(var r=0;r<i.length;r++)(0,i[r])()}function Jg(i,r){return r}function $g(i,r){if(En){var f=qn.formState;if(f!==null){e:{var m=Kt;if(En){if(ii){t:{for(var x=ii,E=Yi;x.nodeType!==8;){if(!E){x=null;break t}if(x=_r(x.nextSibling),x===null){x=null;break t}}E=x.data,x=E==="F!"||E==="F"?x:null}if(x){ii=_r(x.nextSibling),m=x.data==="F!";break e}}Sn(m)}m=!1}m&&(r=f[0])}}return f=Ca(),f.memoizedState=f.baseState=r,m={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jg,lastRenderedState:r},f.queue=m,f=cv.bind(null,Kt,m),m.dispatch=f,m=Au(!1),E=wu.bind(null,Kt,!1,m.queue),m=Ca(),x={state:r,dispatch:null,action:i,pending:null},m.queue=x,f=E_.bind(null,Kt,x,E,f),x.dispatch=f,m.memoizedState=i,[r,f,!1]}function ev(i){var r=Ei();return tv(r,Jn,i)}function tv(i,r,f){if(r=wp(i,r,Jg)[0],i=lh(Hr)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var m=Tu(r)}catch(L){throw L===wo?Gs:L}else m=r;r=Ei();var x=r.queue,E=x.dispatch;return f!==r.memoizedState&&(Kt.flags|=2048,lc(9,{destroy:void 0},T_.bind(null,x,f),null)),[m,E,i]}function T_(i,r){i.action=r}function nv(i){var r=Ei(),f=Jn;if(f!==null)return tv(r,f,i);Ei(),r=r.memoizedState,f=Ei();var m=f.queue.dispatch;return f.memoizedState=i,[r,m,!1]}function lc(i,r,f,m){return i={tag:i,create:f,deps:m,inst:r,next:null},r=Kt.updateQueue,r===null&&(r=Eu(),Kt.updateQueue=r),f=r.lastEffect,f===null?r.lastEffect=i.next=i:(m=f.next,f.next=i,i.next=m,r.lastEffect=i),i}function iv(){return Ei().memoizedState}function hh(i,r,f,m){var x=Ca();Kt.flags|=i,x.memoizedState=lc(1|r,{destroy:void 0},f,m===void 0?null:m)}function dh(i,r,f,m){var x=Ei();m=m===void 0?null:m;var E=x.memoizedState.inst;Jn!==null&&m!==null&&Sp(m,Jn.memoizedState.deps)?x.memoizedState=lc(r,E,f,m):(Kt.flags|=i,x.memoizedState=lc(1|r,E,f,m))}function av(i,r){hh(8390656,8,i,r)}function Lp(i,r){dh(2048,8,i,r)}function sv(i){Kt.flags|=4;var r=Kt.updateQueue;if(r===null)r=Eu(),Kt.updateQueue=r,r.events=[i];else{var f=r.events;f===null?r.events=[i]:f.push(i)}}function rv(i){var r=Ei().memoizedState;return sv({ref:r,nextImpl:i}),function(){if((Cn&2)!==0)throw Error(n(440));return r.impl.apply(void 0,arguments)}}function ov(i,r){return dh(4,2,i,r)}function os(i,r){return dh(4,4,i,r)}function Op(i,r){if(typeof r=="function"){i=i();var f=r(i);return function(){typeof f=="function"?f():r(null)}}if(r!=null)return i=i(),r.current=i,function(){r.current=null}}function ph(i,r,f){f=f!=null?f.concat([i]):null,dh(4,4,Op.bind(null,r,i),f)}function mh(){}function zp(i,r){var f=Ei();r=r===void 0?null:r;var m=f.memoizedState;return r!==null&&Sp(r,m[1])?m[0]:(f.memoizedState=[i,r],i)}function Ip(i,r){var f=Ei();r=r===void 0?null:r;var m=f.memoizedState;if(r!==null&&Sp(r,m[1]))return m[0];if(m=i(),gl){Dt(!0);try{i()}finally{Dt(!1)}}return f.memoizedState=[m,r],m}function Bp(i,r,f){return f===void 0||(Pa&1073741824)!==0&&(bn&261930)===0?i.memoizedState=r:(i.memoizedState=f,i=l(),Kt.lanes|=i,ms|=i,f)}function Pp(i,r,f,m){return li(f,r)?f:ss.current!==null?(i=Bp(i,f,m),li(i,r)||(ci=!0),i):(Pa&42)===0||(Pa&1073741824)!==0&&(bn&261930)===0?(ci=!0,i.memoizedState=f):(i=l(),Kt.lanes|=i,ms|=i,r)}function Hp(i,r,f,m,x){var E=Q.p;Q.p=E!==0&&8>E?E:8;var L=P.T,X={};P.T=X,wu(i,!1,r,f);try{var oe=x(),Te=P.S;if(Te!==null&&Te(X,oe),oe!==null&&typeof oe=="object"&&typeof oe.then=="function"){var Ve=hp(oe,m);cc(i,r,Ve,Da(i))}else cc(i,r,m,Da(i))}catch(Ke){cc(i,r,{then:function(){},status:"rejected",reason:Ke},Da())}finally{Q.p=E,L!==null&&X.types!==null&&(L.types=X.types),P.T=L}}function A_(){}function Fp(i,r,f,m){if(i.tag!==5)throw Error(n(476));var x=lv(i).queue;Hp(i,x,r,ee,f===null?A_:function(){return Vp(i),f(m)})}function lv(i){var r=i.memoizedState;if(r!==null)return r;r={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hr,lastRenderedState:ee},next:null};var f={};return r.next={memoizedState:f,baseState:f,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hr,lastRenderedState:f},next:null},i.memoizedState=r,i=i.alternate,i!==null&&(i.memoizedState=r),r}function Vp(i){var r=lv(i);r.next===null&&(r=i.alternate.memoizedState),cc(i,r.next.queue,{},Da())}function Gp(){return Wi(tm)}function na(){return Ei().memoizedState}function kp(){return Ei().memoizedState}function w_(i){for(var r=i.return;r!==null;){switch(r.tag){case 24:case 3:var f=Da();i=ur(f);var m=Br(r,i,f);m!==null&&(u(m,r,f),Do(m,r,f)),r={cache:cp()},i.payload=r;return}r=r.return}}function R_(i,r,f){var m=Da();f={lane:m,revertLane:0,gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null},Fr(i)?vl(r,f):(f=tc(i,r,f,m),f!==null&&(u(f,i,m),Ha(f,r,m)))}function cv(i,r,f){var m=Da();cc(i,r,f,m)}function cc(i,r,f,m){var x={lane:m,revertLane:0,gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null};if(Fr(i))vl(r,x);else{var E=i.alternate;if(i.lanes===0&&(E===null||E.lanes===0)&&(E=r.lastRenderedReducer,E!==null))try{var L=r.lastRenderedState,X=E(L,f);if(x.hasEagerState=!0,x.eagerState=X,li(X,L))return hu(i,r,x,0),qn===null&&So(),!1}catch{}finally{}if(f=tc(i,r,x,m),f!==null)return u(f,i,m),Ha(f,r,m),!0}return!1}function wu(i,r,f,m){if(m={lane:2,revertLane:U_(),gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},Fr(i)){if(r)throw Error(n(479))}else r=tc(i,f,m,2),r!==null&&u(r,i,2)}function Fr(i){var r=i.alternate;return i===Kt||r!==null&&r===Kt}function vl(i,r){hr=sh=!0;var f=i.pending;f===null?r.next=r:(r.next=f.next,f.next=r),i.pending=r}function Ha(i,r,f){if((f&4194048)!==0){var m=r.lanes;m&=i.pendingLanes,f|=m,r.lanes=f,Oa(i,f)}}var Ru={readContext:Wi,use:oh,useCallback:gi,useContext:gi,useEffect:gi,useImperativeHandle:gi,useLayoutEffect:gi,useInsertionEffect:gi,useMemo:gi,useReducer:gi,useRef:gi,useState:gi,useDebugValue:gi,useDeferredValue:gi,useTransition:gi,useSyncExternalStore:gi,useId:gi,useHostTransitionStatus:gi,useFormState:gi,useActionState:gi,useOptimistic:gi,useMemoCache:gi,useCacheRefresh:gi};Ru.useEffectEvent=gi;var uv={readContext:Wi,use:oh,useCallback:function(i,r){return Ca().memoizedState=[i,r===void 0?null:r],i},useContext:Wi,useEffect:av,useImperativeHandle:function(i,r,f){f=f!=null?f.concat([i]):null,hh(4194308,4,Op.bind(null,r,i),f)},useLayoutEffect:function(i,r){return hh(4194308,4,i,r)},useInsertionEffect:function(i,r){hh(4,2,i,r)},useMemo:function(i,r){var f=Ca();r=r===void 0?null:r;var m=i();if(gl){Dt(!0);try{i()}finally{Dt(!1)}}return f.memoizedState=[m,r],m},useReducer:function(i,r,f){var m=Ca();if(f!==void 0){var x=f(r);if(gl){Dt(!0);try{f(r)}finally{Dt(!1)}}}else x=r;return m.memoizedState=m.baseState=x,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:x},m.queue=i,i=i.dispatch=R_.bind(null,Kt,i),[m.memoizedState,i]},useRef:function(i){var r=Ca();return i={current:i},r.memoizedState=i},useState:function(i){i=Au(i);var r=i.queue,f=cv.bind(null,Kt,r);return r.dispatch=f,[i.memoizedState,f]},useDebugValue:mh,useDeferredValue:function(i,r){var f=Ca();return Bp(f,i,r)},useTransition:function(){var i=Au(!1);return i=Hp.bind(null,Kt,i.queue,!0,!1),Ca().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,r,f){var m=Kt,x=Ca();if(En){if(f===void 0)throw Error(n(407));f=f()}else{if(f=r(),qn===null)throw Error(n(349));(bn&127)!==0||Yg(m,r,f)}x.memoizedState=f;var E={value:f,getSnapshot:r};return x.queue=E,av(Np.bind(null,m,E,i),[i]),m.flags|=2048,lc(9,{destroy:void 0},Cp.bind(null,m,E,f,r),null),f},useId:function(){var i=Ca(),r=qn.identifierPrefix;if(En){var f=lr,m=or;f=(m&~(1<<32-vt(m)-1)).toString(32)+f,r="_"+r+"R_"+f,f=rh++,0<f&&(r+="H"+f.toString(32)),r+="_"}else f=b_++,r="_"+r+"r_"+f.toString(32)+"_";return i.memoizedState=r},useHostTransitionStatus:Gp,useFormState:$g,useActionState:$g,useOptimistic:function(i){var r=Ca();r.memoizedState=r.baseState=i;var f={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=f,r=wu.bind(null,Kt,!0,f),f.dispatch=r,[i,r]},useMemoCache:Ap,useCacheRefresh:function(){return Ca().memoizedState=w_.bind(null,Kt)},useEffectEvent:function(i){var r=Ca(),f={impl:i};return r.memoizedState=f,function(){if((Cn&2)!==0)throw Error(n(440));return f.impl.apply(void 0,arguments)}}},uc={readContext:Wi,use:oh,useCallback:zp,useContext:Wi,useEffect:Lp,useImperativeHandle:ph,useInsertionEffect:ov,useLayoutEffect:os,useMemo:Ip,useReducer:lh,useRef:iv,useState:function(){return lh(Hr)},useDebugValue:mh,useDeferredValue:function(i,r){var f=Ei();return Pp(f,Jn.memoizedState,i,r)},useTransition:function(){var i=lh(Hr)[0],r=Ei().memoizedState;return[typeof i=="boolean"?i:Tu(i),r]},useSyncExternalStore:Rp,useId:na,useHostTransitionStatus:Gp,useFormState:ev,useActionState:ev,useOptimistic:function(i,r){var f=Ei();return Wg(f,Jn,i,r)},useMemoCache:Ap,useCacheRefresh:kp};uc.useEffectEvent=rv;var Cu={readContext:Wi,use:oh,useCallback:zp,useContext:Wi,useEffect:Lp,useImperativeHandle:ph,useInsertionEffect:ov,useLayoutEffect:os,useMemo:Ip,useReducer:ch,useRef:iv,useState:function(){return ch(Hr)},useDebugValue:mh,useDeferredValue:function(i,r){var f=Ei();return Jn===null?Bp(f,i,r):Pp(f,Jn.memoizedState,i,r)},useTransition:function(){var i=ch(Hr)[0],r=Ei().memoizedState;return[typeof i=="boolean"?i:Tu(i),r]},useSyncExternalStore:Rp,useId:na,useHostTransitionStatus:Gp,useFormState:nv,useActionState:nv,useOptimistic:function(i,r){var f=Ei();return Jn!==null?Wg(f,Jn,i,r):(f.baseState=i,[i,f.queue.dispatch])},useMemoCache:Ap,useCacheRefresh:kp};Cu.useEffectEvent=rv;function fc(i,r,f,m){r=i.memoizedState,f=f(m,r),f=f==null?r:y({},r,f),i.memoizedState=f,i.lanes===0&&(i.updateQueue.baseState=f)}var Nu={enqueueSetState:function(i,r,f){i=i._reactInternals;var m=Da(),x=ur(m);x.payload=r,f!=null&&(x.callback=f),r=Br(i,x,m),r!==null&&(u(r,i,m),Do(r,i,m))},enqueueReplaceState:function(i,r,f){i=i._reactInternals;var m=Da(),x=ur(m);x.tag=1,x.payload=r,f!=null&&(x.callback=f),r=Br(i,x,m),r!==null&&(u(r,i,m),Do(r,i,m))},enqueueForceUpdate:function(i,r){i=i._reactInternals;var f=Da(),m=ur(f);m.tag=2,r!=null&&(m.callback=r),r=Br(i,m,f),r!==null&&(u(r,i,f),Do(r,i,f))}};function fv(i,r,f,m,x,E,L){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(m,E,L):r.prototype&&r.prototype.isPureReactComponent?!Zl(f,m)||!Zl(x,E):!0}function hv(i,r,f,m){i=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(f,m),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(f,m),r.state!==i&&Nu.enqueueReplaceState(r,r.state,null)}function ia(i,r){var f=r;if("ref"in r){f={};for(var m in r)m!=="ref"&&(f[m]=r[m])}if(i=i.defaultProps){f===r&&(f=y({},f));for(var x in i)f[x]===void 0&&(f[x]=i[x])}return f}function Xp(i){xo(i)}function dv(i){console.error(i)}function gh(i){xo(i)}function vh(i,r){try{var f=i.onUncaughtError;f(r.value,{componentStack:r.stack})}catch(m){setTimeout(function(){throw m})}}function pv(i,r,f){try{var m=i.onCaughtError;m(f.value,{componentStack:f.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(x){setTimeout(function(){throw x})}}function jp(i,r,f){return f=ur(f),f.tag=3,f.payload={element:null},f.callback=function(){vh(i,r)},f}function hc(i){return i=ur(i),i.tag=3,i}function Fa(i,r,f,m){var x=f.type.getDerivedStateFromError;if(typeof x=="function"){var E=m.value;i.payload=function(){return x(E)},i.callback=function(){pv(r,f,m)}}var L=f.stateNode;L!==null&&typeof L.componentDidCatch=="function"&&(i.callback=function(){pv(r,f,m),typeof x!="function"&&(yr===null?yr=new Set([this]):yr.add(this));var X=m.stack;this.componentDidCatch(m.value,{componentStack:X!==null?X:""})})}function ls(i,r,f,m,x){if(f.flags|=32768,m!==null&&typeof m=="object"&&typeof m.then=="function"){if(r=f.alternate,r!==null&&To(r,f,x,!0),f=Pi.current,f!==null){switch(f.tag){case 31:case 13:return ws===null?en():f.alternate===null&&Yn===0&&(Yn=3),f.flags&=-257,f.flags|=65536,f.lanes=x,m===_u?f.flags|=16384:(r=f.updateQueue,r===null?f.updateQueue=new Set([m]):r.add(m),C_(i,m,x)),!1;case 22:return f.flags|=65536,m===_u?f.flags|=16384:(r=f.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([m])},f.updateQueue=r):(f=r.retryQueue,f===null?r.retryQueue=new Set([m]):f.add(m)),C_(i,m,x)),!1}throw Error(n(435,f.tag))}return C_(i,m,x),en(),!1}if(En)return r=Pi.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=x,m!==Qf&&(i=Error(n(422),{cause:m}),gu(Ia(i,f)))):(m!==Qf&&(r=Error(n(423),{cause:m}
vendor: 10,695 bytes, line 48
48),gu(Ia(r,f))),i=i.current.alternate,i.flags|=65536,x&=-x,i.lanes|=x,m=Ia(m,f),x=jp(i.stateNode,m,x),ih(i,x),Yn!==4&&(Yn=2)),!1;var E=Error(n(520),{cause:m});if(E=Ia(E,f),Ys===null?Ys=[E]:Ys.push(E),Yn!==4&&(Yn=2),r===null)return!0;m=Ia(m,f),f=r;do{switch(f.tag){case 3:return f.flags|=65536,i=x&-x,f.lanes|=i,i=jp(f.stateNode,m,i),ih(f,i),!1;case 1:if(r=f.type,E=f.stateNode,(f.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||E!==null&&typeof E.componentDidCatch=="function"&&(yr===null||!yr.has(E))))return f.flags|=65536,x&=-x,f.lanes|=x,x=hc(x),Fa(x,i,f,m),ih(f,x),!1}f=f.return}while(f!==null);return!1}var yh=Error(n(461)),ci=!1;function vi(i,r,f,m){r.child=i===null?kg(r,null,f,m):pl(r,i.child,f,m)}function Du(i,r,f,m,x){f=f.render;var E=r.ref;if("ref"in m){var L={};for(var X in m)X!=="ref"&&(L[X]=m[X])}else L=m;return fl(r),m=bp(i,r,f,L,E,x),X=Mp(),i!==null&&!ci?(Ep(i,r,x),js(i,r,x)):(En&&X&&Kf(r),r.flags|=1,vi(i,r,m,x),r.child)}function Uu(i,r,f,m,x){if(i===null){var E=f.type;return typeof E=="function"&&!wa(E)&&E.defaultProps===void 0&&f.compare===null?(r.tag=15,r.type=E,cs(i,r,E,m,x)):(i=du(f.type,null,m,r,r.mode,x),i.ref=r.ref,i.return=r,r.child=i)}if(E=i.child,!Oo(i,x)){var L=E.memoizedProps;if(f=f.compare,f=f!==null?f:Zl,f(L,m)&&i.ref===r.ref)return js(i,r,x)}return r.flags|=1,i=sr(E,m),i.ref=r.ref,i.return=r,r.child=i}function cs(i,r,f,m,x){if(i!==null){var E=i.memoizedProps;if(Zl(E,m)&&i.ref===r.ref)if(ci=!1,r.pendingProps=m=E,Oo(i,x))(i.flags&131072)!==0&&(ci=!0);else return r.lanes=i.lanes,js(i,r,x)}return dc(i,r,f,m,x)}function us(i,r,f,m){var x=m.children,E=i!==null?i.memoizedState:null;if(i===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),m.mode==="hidden"){if((r.flags&128)!==0){if(E=E!==null?E.baseLanes|f:f,i!==null){for(m=r.child=i.child,x=0;m!==null;)x=x|m.lanes|m.childLanes,m=m.sibling;m=x&~E}else m=0,r.child=null;return pr(i,r,E,f,m)}if((f&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},i!==null&&rc(r,E!==null?E.cachePool:null),E!==null?yp(r,E):_p(),Xg(r);else return m=r.lanes=536870912,pr(i,r,E!==null?E.baseLanes|f:f,f,m)}else E!==null?(rc(r,E.cachePool),yp(r,E),Pr(),r.memoizedState=null):(i!==null&&rc(r,null),_p(),Pr());return vi(i,r,x,f),r.child}function ks(i,r){return i!==null&&i.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function pr(i,r,f,m,x){var E=cr();return E=E===null?null:{parent:Pt._currentValue,pool:E},r.memoizedState={baseLanes:f,cachePool:E},i!==null&&rc(r,null),_p(),Xg(r),i!==null&&To(i,r,m,!0),r.childLanes=x,null}function Rs(i,r){return r=pc({mode:r.mode,children:r.children},i.mode),r.ref=i.ref,i.child=r,r.return=i,r}function Zi(i,r,f){return pl(r,i.child,null,f),i=Rs(r,r.pendingProps),i.flags|=2,rs(r),r.memoizedState=null,i}function Lu(i,r,f){var m=r.pendingProps,x=(r.flags&128)!==0;if(r.flags&=-129,i===null){if(En){if(m.mode==="hidden")return i=Rs(r,m),r.lanes=536870912,ks(null,i);if(xp(r),(i=ii)?(i=B1(i,Yi),i=i!==null&&i.data==="&"?i:null,i!==null&&(r.memoizedState={dehydrated:i,treeContext:rr!==null?{id:or,overflow:lr}:null,retryLane:536870912,hydrationErrors:null},f=Bg(i),f.return=r,r.child=f,qi=r,ii=null)):i=null,i===null)throw Sn(r);return r.lanes=536870912,null}return Rs(r,m)}var E=i.memoizedState;if(E!==null){var L=E.dehydrated;if(xp(r),x)if(r.flags&256)r.flags&=-257,r=Zi(i,r,f);else if(r.memoizedState!==null)r.child=i.child,r.flags|=128,r=null;else throw Error(n(558));else if(ci||To(i,r,f,!1),x=(f&i.childLanes)!==0,ci||x){if(m=qn,m!==null&&(L=es(m,f),L!==0&&L!==E.retryLane))throw E.retryLane=L,bo(i,L),u(m,i,L),yh;en(),r=Zi(i,r,f)}else i=E.treeContext,ii=_r(L.nextSibling),qi=r,En=!0,Ur=null,Yi=!1,i!==null&&mu(r,i),r=Rs(r,m),r.flags|=4096;return r}return i=sr(i.child,{mode:m.mode,children:m.children}),i.ref=r.ref,r.child=i,i.return=r,i}function Xs(i,r){var f=r.ref;if(f===null)i!==null&&i.ref!==null&&(r.flags|=4194816);else{if(typeof f!="function"&&typeof f!="object")throw Error(n(284));(i===null||i.ref!==f)&&(r.flags|=4194816)}}function dc(i,r,f,m,x){return fl(r),f=bp(i,r,f,m,void 0,x),m=Mp(),i!==null&&!ci?(Ep(i,r,x),js(i,r,x)):(En&&m&&Kf(r),r.flags|=1,vi(i,r,f,x),r.child)}function ga(i,r,f,m,x,E){return fl(r),r.updateQueue=null,f=qg(r,m,f,x),jg(i),m=Mp(),i!==null&&!ci?(Ep(i,r,E),js(i,r,E)):(En&&m&&Kf(r),r.flags|=1,vi(i,r,f,E),r.child)}function aa(i,r,f,m,x){if(fl(r),r.stateNode===null){var E=Mo,L=f.contextType;typeof L=="object"&&L!==null&&(E=Wi(L)),E=new f(m,E),r.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,E.updater=Nu,r.stateNode=E,E._reactInternals=r,E=r.stateNode,E.props=m,E.state=r.memoizedState,E.refs={},mp(r),L=f.contextType,E.context=typeof L=="object"&&L!==null?Wi(L):Mo,E.state=r.memoizedState,L=f.getDerivedStateFromProps,typeof L=="function"&&(fc(r,f,L,m),E.state=r.memoizedState),typeof f.getDerivedStateFromProps=="function"||typeof E.getSnapshotBeforeUpdate=="function"||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(L=E.state,typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount(),L!==E.state&&Nu.enqueueReplaceState(E,E.state,null),ml(r,m,E,x),bu(),E.state=r.memoizedState),typeof E.componentDidMount=="function"&&(r.flags|=4194308),m=!0}else if(i===null){E=r.stateNode;var X=r.memoizedProps,oe=ia(f,X);E.props=oe;var Te=E.context,Ve=f.contextType;L=Mo,typeof Ve=="object"&&Ve!==null&&(L=Wi(Ve));var Ke=f.getDerivedStateFromProps;Ve=typeof Ke=="function"||typeof E.getSnapshotBeforeUpdate=="function",X=r.pendingProps!==X,Ve||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||(X||Te!==L)&&hv(r,E,m,L),No=!1;var Re=r.memoizedState;E.state=Re,ml(r,m,E,x),bu(),Te=r.memoizedState,X||Re!==Te||No?(typeof Ke=="function"&&(fc(r,f,Ke,m),Te=r.memoizedState),(oe=No||fv(r,f,oe,m,Re,Te,L))?(Ve||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount()),typeof E.componentDidMount=="function"&&(r.flags|=4194308)):(typeof E.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=m,r.memoizedState=Te),E.props=m,E.state=Te,E.context=L,m=oe):(typeof E.componentDidMount=="function"&&(r.flags|=4194308),m=!1)}else{E=r.stateNode,gp(i,r),L=r.memoizedProps,Ve=ia(f,L),E.props=Ve,Ke=r.pendingProps,Re=E.context,Te=f.contextType,oe=Mo,typeof Te=="object"&&Te!==null&&(oe=Wi(Te)),X=f.getDerivedStateFromProps,(Te=typeof X=="function"||typeof E.getSnapshotBeforeUpdate=="function")||typeof E.UNSAFE_componentWillReceiveProps!="function"&&typeof E.componentWillReceiveProps!="function"||(L!==Ke||Re!==oe)&&hv(r,E,m,oe),No=!1,Re=r.memoizedState,E.state=Re,ml(r,m,E,x),bu();var Oe=r.memoizedState;L!==Ke||Re!==Oe||No||i!==null&&i.dependencies!==null&&ac(i.dependencies)?(typeof X=="function"&&(fc(r,f,X,m),Oe=r.memoizedState),(Ve=No||fv(r,f,Ve,m,Re,Oe,oe)||i!==null&&i.dependencies!==null&&ac(i.dependencies))?(Te||typeof E.UNSAFE_componentWillUpdate!="function"&&typeof E.componentWillUpdate!="function"||(typeof E.componentWillUpdate=="function"&&E.componentWillUpdate(m,Oe,oe),typeof E.UNSAFE_componentWillUpdate=="function"&&E.UNSAFE_componentWillUpdate(m,Oe,oe)),typeof E.componentDidUpdate=="function"&&(r.flags|=4),typeof E.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof E.componentDidUpdate!="function"||L===i.memoizedProps&&Re===i.memoizedState||(r.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||L===i.memoizedProps&&Re===i.memoizedState||(r.flags|=1024),r.memoizedProps=m,r.memoizedState=Oe),E.props=m,E.state=Oe,E.context=oe,m=Ve):(typeof E.componentDidUpdate!="function"||L===i.memoizedProps&&Re===i.memoizedState||(r.flags|=4),typeof E.getSnapshotBeforeUpdate!="function"||L===i.memoizedProps&&Re===i.memoizedState||(r.flags|=1024),m=!1)}return E=m,Xs(i,r),m=(r.flags&128)!==0,E||m?(E=r.stateNode,f=m&&typeof f.getDerivedStateFromError!="function"?null:E.render(),r.flags|=1,i!==null&&m?(r.child=pl(r,i.child,null,x),r.child=pl(r,null,f,x)):vi(i,r,f,x),r.memoizedState=E.state,i=r.child):i=js(i,r,x),i}function Ln(i,r,f,m){return ul(),r.flags|=256,vi(i,r,f,m),r.child}var fs={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Cs(i){return{baseLanes:i,cachePool:eh()}}function Ou(i,r,f){return i=i!==null?i.childLanes&~f:0,r&&(i|=Nn),i}function hs(i,r,f){var m=r.pendingProps,x=!1,E=(r.flags&128)!==0,L;if((L=E)||(L=i!==null&&i.memoizedState===null?!1:(mi.current&2)!==0),L&&(x=!0,r.flags&=-129),L=(r.flags&32)!==0,r.flags&=-33,i===null){if(En){if(x?Uo(r):Pr(),(i=ii)?(i=B1(i,Yi),i=i!==null&&i.data!=="&"?i:null,i!==null&&(r.memoizedState={dehydrated:i,treeContext:rr!==null?{id:or,overflow:lr}:null,retryLane:536870912,hydrationErrors:null},f=Bg(i),f.return=r,r.child=f,qi=r,ii=null)):i=null,i===null)throw Sn(r);return j_(i)?r.lanes=32:r.lanes=536870912,null}var X=m.children;return m=m.fallback,x?(Pr(),x=r.mode,X=pc({mode:"hidden",children:X},x),m=Nr(m,x,f,null),X.return=r,m.return=r,X.sibling=m,r.child=X,m=r.child,m.memoizedState=Cs(f),m.childLanes=Ou(i,L,f),r.memoizedState=fs,ks(null,m)):(Uo(r),Lo(r,X))}var oe=i.memoizedState;if(oe!==null&&(X=oe.dehydrated,X!==null)){if(E)r.flags&256?(Uo(r),r.flags&=-257,r=mc(i,r,f)):r.memoizedState!==null?(Pr(),r.child=i.child,r.flags|=128,r=null):(Pr(),X=m.fallback,x=r.mode,m=pc({mode:"visible",children:m.children},x),X=Nr(X,x,f,null),X.flags|=2,m.return=r,X.return=r,m.sibling=X,r.child=m,pl(r,i.child,null,f),m=r.child,m.memoizedState=Cs(f),m.childLanes=Ou(i,L,f),r.memoizedState=fs,r=ks(null,m));else if(Uo(r),j_(X)){if(L=X.nextSibling&&X.nextSibling.dataset,L)var Te=L.dgst;L=Te,m=Error(n(419)),m.stack="",m.digest=L,gu({value:m,source:null,stack:null}),r=mc(i,r,f)}else if(ci||To(i,r,f,!1),L=(f&i.childLanes)!==0,ci||L){if(L=qn,L!==null&&(m=es(L,f),m!==0&&m!==oe.retryLane))throw oe.retryLane=m,bo(i,m),u(L,i,m),yh;X_(X)||en(),r=mc(i,r,f)}else X_(X)?(r.flags|=192,r.child=i.child,r=null):(i=oe.treeContext,ii=_r(X.nextSibling),qi=r,En=!0,Ur=null,Yi=!1,i!==null&&mu(r,i),r=Lo(r,m.children),r.flags|=4096);return r}return x?(Pr(),X=m.fallback,x=r.mode,oe=i.child,Te=oe.sibling,m=sr(oe,{mode:"hidden",children:m.children}),m.subtreeFlags=oe.subtreeFlags&65011712,Te!==null?X=sr(Te,X):(X=Nr(X,x,f,null),X.flags|=2),X.return=r,m.return=r,m.sibling=X,r.child=m,ks(null,m),m=r.child,X=i.child.memoizedState,X===null?X=Cs(f):(x=X.cachePool,x!==null?(oe=Pt._currentValue,x=x.parent!==oe?{parent:oe,pool:oe}
vendor: 4,842 bytes, line 48
48:x):x=eh(),X={baseLanes:X.baseLanes|f,cachePool:x}),m.memoizedState=X,m.childLanes=Ou(i,L,f),r.memoizedState=fs,ks(i.child,m)):(Uo(r),f=i.child,i=f.sibling,f=sr(f,{mode:"visible",children:m.children}),f.return=r,f.sibling=null,i!==null&&(L=r.deletions,L===null?(r.deletions=[i],r.flags|=16):L.push(i)),r.child=f,r.memoizedState=null,f)}function Lo(i,r){return r=pc({mode:"visible",children:r},i.mode),r.return=i,i.child=r}function pc(i,r){return i=Aa(22,i,null,r),i.lanes=0,i}function mc(i,r,f){return pl(r,i.child,null,f),i=Lo(r,r.pendingProps.children),i.flags|=2,r.memoizedState=null,i}function yl(i,r,f){i.lanes|=r;var m=i.alternate;m!==null&&(m.lanes|=r),zr(i.return,r,f)}function zu(i,r,f,m,x,E){var L=i.memoizedState;L===null?i.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:m,tail:f,tailMode:x,treeForkCount:E}:(L.isBackwards=r,L.rendering=null,L.renderingStartTime=0,L.last=m,L.tail=f,L.tailMode=x,L.treeForkCount=E)}function Iu(i,r,f){var m=r.pendingProps,x=m.revealOrder,E=m.tail;m=m.children;var L=mi.current,X=(L&2)!==0;if(X?(L=L&1|2,r.flags|=128):L&=1,Ce(mi,L),vi(i,r,m,f),m=En?ic:0,!X&&i!==null&&(i.flags&128)!==0)e:for(i=r.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&yl(i,f,r);else if(i.tag===19)yl(i,f,r);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break e;for(;i.sibling===null;){if(i.return===null||i.return===r)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}switch(x){case"forwards":for(f=r.child,x=null;f!==null;)i=f.alternate,i!==null&&ah(i)===null&&(x=f),f=f.sibling;f=x,f===null?(x=r.child,r.child=null):(x=f.sibling,f.sibling=null),zu(r,!1,x,f,E,m);break;case"backwards":case"unstable_legacy-backwards":for(f=null,x=r.child,r.child=null;x!==null;){if(i=x.alternate,i!==null&&ah(i)===null){r.child=x;break}i=x.sibling,x.sibling=f,f=x,x=i}zu(r,!0,f,null,E,m);break;case"together":zu(r,!1,null,null,void 0,m);break;default:r.memoizedState=null}return r.child}function js(i,r,f){if(i!==null&&(r.dependencies=i.dependencies),ms|=r.lanes,(f&r.childLanes)===0)if(i!==null){if(To(i,r,f,!1),(f&r.childLanes)===0)return null}else return null;if(i!==null&&r.child!==i.child)throw Error(n(153));if(r.child!==null){for(i=r.child,f=sr(i,i.pendingProps),r.child=f,f.return=r;i.sibling!==null;)i=i.sibling,f=f.sibling=sr(i,i.pendingProps),f.return=r;f.sibling=null}return r.child}function Oo(i,r){return(i.lanes&r)!==0?!0:(i=i.dependencies,!!(i!==null&&ac(i)))}function Bu(i,r,f){switch(r.tag){case 3:ot(r,r.stateNode.containerInfo),Or(r,Pt,i.memoizedState.cache),ul();break;case 27:case 5:Et(r);break;case 4:ot(r,r.stateNode.containerInfo);break;case 10:Or(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,xp(r),null;break;case 13:var m=r.memoizedState;if(m!==null)return m.dehydrated!==null?(Uo(r),r.flags|=128,null):(f&r.child.childLanes)!==0?hs(i,r,f):(Uo(r),i=js(i,r,f),i!==null?i.sibling:null);Uo(r);break;case 19:var x=(i.flags&128)!==0;if(m=(f&r.childLanes)!==0,m||(To(i,r,f,!1),m=(f&r.childLanes)!==0),x){if(m)return Iu(i,r,f);r.flags|=128}if(x=r.memoizedState,x!==null&&(x.rendering=null,x.tail=null,x.lastEffect=null),Ce(mi,mi.current),m)break;return null;case 22:return r.lanes=0,us(i,r,f,r.pendingProps);case 24:Or(r,Pt,i.memoizedState.cache)}return js(i,r,f)}function _h(i,r,f){if(i!==null)if(i.memoizedProps!==r.pendingProps)ci=!0;else{if(!Oo(i,f)&&(r.flags&128)===0)return ci=!1,Bu(i,r,f);ci=(i.flags&131072)!==0}else ci=!1,En&&(r.flags&1048576)!==0&&ap(r,ic,r.index);switch(r.lanes=0,r.tag){case 16:e:{var m=r.pendingProps;if(i=dl(r.elementType),r.type=i,typeof i=="function")wa(i)?(m=ia(i,m),r.tag=1,r=aa(null,r,i,m,f)):(r.tag=0,r=dc(null,r,i,m,f));else{if(i!=null){var x=i.$$typeof;if(x===U){r.tag=11,r=Du(null,r,i,m,f);break e}else if(x===G){r.tag=14,r=Uu(null,r,i,m,f);break e}}throw r=he(i)||i,Error(n(306,r,""))}}return r;case 0:return dc(i,r,r.type,r.pendingProps,f);case 1:return m=r.type,x=ia(m,r.pendingProps),aa(i,r,m,x,f);case 3:e:{if(ot(r,r.stateNode.containerInfo),i===null)throw Error(n(387));m=r.pendingProps;var E=r.memoizedState;x=E.element,gp(i,r),ml(r,m,null,f);var L=r.memoizedState;if(m=L.cache,Or(r,Pt,m),m!==E.cache&&$f(r,[Pt],f,!0),bu(),m=L.element,E.isDehydrated)if(E={element:m,isDehydrated:!1,cache:L.cache},r.updateQueue.baseState=E,r.memoizedState=E,r.flags&256){r=Ln(i,r,m,f);break e}else if(m!==x){x=Ia(Error(n(424)),r),gu(x),r=Ln(i,r,m,f);break e}else{switch(i=r.stateNode.containerInfo,i.nodeType){case 9:i=i.body;break;default:i=i.nodeName==="HTML"?i.ownerDocument.body:i}for(ii=_r(i.firstChild),qi=r,En=!0,Ur=null,Yi=!0,f=kg(r,null,m,f),r.child=f;f;)f.flags=f.flags&-3|4096,f=f.sibling}else{if(ul(),m===x){r=js(i,r,f);break e}vi(i,r,m,f)}r=r.child}return r;case 26:return Xs(i,r),i===null?(f=k1(r.type,null,r.pendingProps,null))?r.memoizedState=f:En||(f=r.type,i=r.pen
vendor: 4,956 bytes, line 48
48dingProps,m=bv(ve.current).createElement(f),m[nn]=r,m[I]=i,Ua(m,f,i),Be(m),r.stateNode=m):r.memoizedState=k1(r.type,i.memoizedProps,r.pendingProps,i.memoizedState),null;case 27:return Et(r),i===null&&En&&(m=r.stateNode=F1(r.type,r.pendingProps,ve.current),qi=r,Yi=!0,x=ii,bc(r.type)?(q_=x,ii=_r(m.firstChild)):ii=x),vi(i,r,r.pendingProps.children,f),Xs(i,r),i===null&&(r.flags|=4194304),r.child;case 5:return i===null&&En&&((x=m=ii)&&(m=iR(m,r.type,r.pendingProps,Yi),m!==null?(r.stateNode=m,qi=r,ii=_r(m.firstChild),Yi=!1,x=!0):x=!1),x||Sn(r)),Et(r),x=r.type,E=r.pendingProps,L=i!==null?i.memoizedProps:null,m=E.children,V_(x,E)?m=null:L!==null&&V_(x,L)&&(r.flags|=32),r.memoizedState!==null&&(x=bp(i,r,M_,null,null,f),tm._currentValue=x),Xs(i,r),vi(i,r,m,f),r.child;case 6:return i===null&&En&&((i=f=ii)&&(f=aR(f,r.pendingProps,Yi),f!==null?(r.stateNode=f,qi=r,ii=null,i=!0):i=!1),i||Sn(r)),null;case 13:return hs(i,r,f);case 4:return ot(r,r.stateNode.containerInfo),m=r.pendingProps,i===null?r.child=pl(r,null,m,f):vi(i,r,m,f),r.child;case 11:return Du(i,r,r.type,r.pendingProps,f);case 7:return vi(i,r,r.pendingProps,f),r.child;case 8:return vi(i,r,r.pendingProps.children,f),r.child;case 12:return vi(i,r,r.pendingProps.children,f),r.child;case 10:return m=r.pendingProps,Or(r,r.type,m.value),vi(i,r,m.children,f),r.child;case 9:return x=r.type._context,m=r.pendingProps.children,fl(r),x=Wi(x),m=m(x),r.flags|=1,vi(i,r,m,f),r.child;case 14:return Uu(i,r,r.type,r.pendingProps,f);case 15:return cs(i,r,r.type,r.pendingProps,f);case 19:return Iu(i,r,f);case 31:return Lu(i,r,f);case 22:return us(i,r,f,r.pendingProps);case 24:return fl(r),m=Wi(Pt),i===null?(x=cr(),x===null&&(x=qn,E=cp(),x.pooledCache=E,E.refCount++,E!==null&&(x.pooledCacheLanes|=f),x=E),r.memoizedState={parent:m,cache:x},mp(r),Or(r,Pt,x)):((i.lanes&f)!==0&&(gp(i,r),ml(r,null,null,f),bu()),x=i.memoizedState,E=r.memoizedState,x.parent!==m?(x={parent:m,cache:m},r.memoizedState=x,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=x),Or(r,Pt,m)):(m=E.cache,Or(r,Pt,m),m!==x.cache&&$f(r,[Pt],f,!0))),vi(i,r,r.pendingProps.children,f),r.child;case 29:throw r.pendingProps}throw Error(n(156,r.tag))}function Va(i){i.flags|=4}function zo(i,r,f,m,x){if((r=(i.mode&32)!==0)&&(r=!1),r){if(i.flags|=16777216,(x&335544128)===x)if(i.stateNode.complete)i.flags|=8192;else if(ht())i.flags|=8192;else throw kt=_u,yu}else i.flags&=-16777217}function Vr(i,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!W1(r))if(ht())i.flags|=8192;else throw kt=_u,yu}function gc(i,r){r!==null&&(i.flags|=4),i.flags&16384&&(r=i.tag!==22?Mn():536870912,i.lanes|=r,gs|=r)}function Pu(i,r){if(!En)switch(i.tailMode){case"hidden":r=i.tail;for(var f=null;r!==null;)r.alternate!==null&&(f=r),r=r.sibling;f===null?i.tail=null:f.sibling=null;break;case"collapsed":f=i.tail;for(var m=null;f!==null;)f.alternate!==null&&(m=f),f=f.sibling;m===null?r||i.tail===null?i.tail=null:i.tail.sibling=null:m.sibling=null}}function Kn(i){var r=i.alternate!==null&&i.alternate.child===i.child,f=0,m=0;if(r)for(var x=i.child;x!==null;)f|=x.lanes|x.childLanes,m|=x.subtreeFlags&65011712,m|=x.flags&65011712,x.return=i,x=x.sibling;else for(x=i.child;x!==null;)f|=x.lanes|x.childLanes,m|=x.subtreeFlags,m|=x.flags,x.return=i,x=x.sibling;return i.subtreeFlags|=m,i.childLanes=f,r}function qp(i,r,f){var m=r.pendingProps;switch(Eo(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Kn(r),null;case 1:return Kn(r),null;case 3:return f=r.stateNode,m=null,i!==null&&(m=i.memoizedState.cache),r.memoizedState.cache!==m&&(r.flags|=2048),As(Pt),gt(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(i===null||i.child===null)&&(cl(r)?Va(r):i===null||i.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,sp())),Kn(r),null;case 26:var x=r.type,E=r.memoizedState;return i===null?(Va(r),E!==null?(Kn(r),Vr(r,E)):(Kn(r),zo(r,x,null,m,f))):E?E!==i.memoizedState?(Va(r),Kn(r),Vr(r,E)):(Kn(r),r.flags&=-16777217):(i=i.memoizedProps,i!==m&&Va(r),Kn(r),zo(r,x,i,m,f)),null;case 27:if(Zt(r),f=ve.current,x=r.type,i!==null&&r.stateNode!=null)i.memoizedProps!==m&&Va(r);else{if(!m){if(r.stateNode===null)throw Error(n(166));return Kn(r),null}i=Le.current,cl(r)?Jf(r):(i=F1(x,m,f),r.stateNode=i,Va(r))}return Kn(r),null;case 5:if(Zt(r),x=r.type,i!==null&&r.stateNode!=null)i.memoizedProps!==m&&Va(r);else{if(!m){if(r.stateNode===null)throw Error(n(166));return Kn(r),null}if(E=Le.current,cl(r))Jf(r);else{var L=bv(ve.current);switch(E){case 1:E=L.createElementNS("http://www.w3.org/2000/svg",x);break;case 2:E=L.createElementNS("http://www.w3.org/1998/Math/MathML",x);break;default:switch(x){case"svg":E=L.createElementNS("http://www.w3.org/2000/svg",x);break;case"math":E=L.createElementNS("http://www.w3.org/1998/Math/MathML",x);break;case"script":E=L.createElement("div"),E.innerHTML="<script><\/script>",E=E.removeChild(E.firstChild);break;
vendor: 24,696 bytes, line 48
48case"select":E=typeof m.is=="string"?L.createElement("select",{is:m.is}):L.createElement("select"),m.multiple?E.multiple=!0:m.size&&(E.size=m.size);break;default:E=typeof m.is=="string"?L.createElement(x,{is:m.is}):L.createElement(x)}}E[nn]=r,E[I]=m;e:for(L=r.child;L!==null;){if(L.tag===5||L.tag===6)E.appendChild(L.stateNode);else if(L.tag!==4&&L.tag!==27&&L.child!==null){L.child.return=L,L=L.child;continue}if(L===r)break e;for(;L.sibling===null;){if(L.return===null||L.return===r)break e;L=L.return}L.sibling.return=L.return,L=L.sibling}r.stateNode=E;e:switch(Ua(E,x,m),x){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break e;case"img":m=!0;break e;default:m=!1}m&&Va(r)}}return Kn(r),zo(r,r.type,i===null?null:i.memoizedProps,r.pendingProps,f),null;case 6:if(i&&r.stateNode!=null)i.memoizedProps!==m&&Va(r);else{if(typeof m!="string"&&r.stateNode===null)throw Error(n(166));if(i=ve.current,cl(r)){if(i=r.stateNode,f=r.memoizedProps,m=null,x=qi,x!==null)switch(x.tag){case 27:case 5:m=x.memoizedProps}i[nn]=r,i=!!(i.nodeValue===f||m!==null&&m.suppressHydrationWarning===!0||C1(i.nodeValue,f)),i||Sn(r,!0)}else i=bv(i).createTextNode(m),i[nn]=r,r.stateNode=i}return Kn(r),null;case 31:if(f=r.memoizedState,i===null||i.memoizedState!==null){if(m=cl(r),f!==null){if(i===null){if(!m)throw Error(n(318));if(i=r.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(557));i[nn]=r}else ul(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Kn(r),i=!1}else f=sp(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=f),i=!0;if(!i)return r.flags&256?(rs(r),r):(rs(r),null);if((r.flags&128)!==0)throw Error(n(558))}return Kn(r),null;case 13:if(m=r.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(x=cl(r),m!==null&&m.dehydrated!==null){if(i===null){if(!x)throw Error(n(318));if(x=r.memoizedState,x=x!==null?x.dehydrated:null,!x)throw Error(n(317));x[nn]=r}else ul(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Kn(r),x=!1}else x=sp(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=x),x=!0;if(!x)return r.flags&256?(rs(r),r):(rs(r),null)}return rs(r),(r.flags&128)!==0?(r.lanes=f,r):(f=m!==null,i=i!==null&&i.memoizedState!==null,f&&(m=r.child,x=null,m.alternate!==null&&m.alternate.memoizedState!==null&&m.alternate.memoizedState.cachePool!==null&&(x=m.alternate.memoizedState.cachePool.pool),E=null,m.memoizedState!==null&&m.memoizedState.cachePool!==null&&(E=m.memoizedState.cachePool.pool),E!==x&&(m.flags|=2048)),f!==i&&f&&(r.child.flags|=8192),gc(r,r.updateQueue),Kn(r),null);case 4:return gt(),i===null&&I_(r.stateNode.containerInfo),Kn(r),null;case 10:return As(r.type),Kn(r),null;case 19:if(fe(mi),m=r.memoizedState,m===null)return Kn(r),null;if(x=(r.flags&128)!==0,E=m.rendering,E===null)if(x)Pu(m,!1);else{if(Yn!==0||i!==null&&(i.flags&128)!==0)for(i=r.child;i!==null;){if(E=ah(i),E!==null){for(r.flags|=128,Pu(m,!1),i=E.updateQueue,r.updateQueue=i,gc(r,i),r.subtreeFlags=0,i=f,f=r.child;f!==null;)da(f,i),f=f.sibling;return Ce(mi,mi.current&1|2),En&&Dr(r,m.treeForkCount),r.child}i=i.sibling}m.tail!==null&&k()>vs&&(r.flags|=128,x=!0,Pu(m,!1),r.lanes=4194304)}else{if(!x)if(i=ah(E),i!==null){if(r.flags|=128,x=!0,i=i.updateQueue,r.updateQueue=i,gc(r,i),Pu(m,!0),m.tail===null&&m.tailMode==="hidden"&&!E.alternate&&!En)return Kn(r),null}else 2*k()-m.renderingStartTime>vs&&f!==536870912&&(r.flags|=128,x=!0,Pu(m,!1),r.lanes=4194304);m.isBackwards?(E.sibling=r.child,r.child=E):(i=m.last,i!==null?i.sibling=E:r.child=E,m.last=E)}return m.tail!==null?(i=m.tail,m.rendering=i,m.tail=i.sibling,m.renderingStartTime=k(),i.sibling=null,f=mi.current,Ce(mi,x?f&1|2:f&1),En&&Dr(r,m.treeForkCount),i):(Kn(r),null);case 22:case 23:return rs(r),ma(),m=r.memoizedState!==null,i!==null?i.memoizedState!==null!==m&&(r.flags|=8192):m&&(r.flags|=8192),m?(f&536870912)!==0&&(r.flags&128)===0&&(Kn(r),r.subtreeFlags&6&&(r.flags|=8192)):Kn(r),f=r.updateQueue,f!==null&&gc(r,f.retryQueue),f=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(f=i.memoizedState.cachePool.pool),m=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(m=r.memoizedState.cachePool.pool),m!==f&&(r.flags|=2048),i!==null&&fe(Ao),null;case 24:return f=null,i!==null&&(f=i.memoizedState.cache),r.memoizedState.cache!==f&&(r.flags|=2048),As(Pt),Kn(r),null;case 25:return null;case 30:return null}throw Error(n(156,r.tag))}function xh(i,r){switch(Eo(r),r.tag){case 1:return i=r.flags,i&65536?(r.flags=i&-65537|128,r):null;case 3:return As(Pt),gt(),i=r.flags,(i&65536)!==0&&(i&128)===0?(r.flags=i&-65537|128,r):null;case 26:case 27:case 5:return Zt(r),null;case 31:if(r.memoizedState!==null){if(rs(r),r.alternate===null)throw Error(n(340));ul()}return i=r.flags,i&65536?(r.flags=i&-65537|128,r):null;case 13:if(rs(r),i=r.memoizedState,i!==null&&i.dehydrated!==null){if(r.alternate===null)throw Error(n(340));ul()}return i=r.flags,i&65536?(r.flags=i&-65537|128,r):null;case 19:return fe(mi),null;case 4:return gt(),null;case 10:return As(r.type),null;case 22:case 23:return rs(r),ma(),i!==null&&fe(Ao),i=r.flags,i&65536?(r.flags=i&-65537|128,r):null;case 24:return As(Pt),null;case 25:return null;default:return null}}function _l(i,r){switch(Eo(r),r.tag){case 3:As(Pt),gt();break;case 26:case 27:case 5:Zt(r);break;case 4:gt();break;case 31:r.memoizedState!==null&&rs(r);break;case 13:rs(r);break;case 19:fe(mi);break;case 10:As(r.type);break;case 22:case 23:rs(r),ma(),i!==null&&fe(Ao);break;case 24:As(Pt)}}function mr(i,r){try{var f=r.updateQueue,m=f!==null?f.lastEffect:null;if(m!==null){var x=m.next;f=x;do{if((f.tag&i)===i){m=void 0;var E=f.create,L=f.inst;m=E(),L.destroy=m}f=f.next}while(f!==x)}}catch(X){ti(r,r.return,X)}}function Ns(i,r,f){try{var m=r.updateQueue,x=m!==null?m.lastEffect:null;if(x!==null){var E=x.next;m=E;do{if((m.tag&i)===i){var L=m.inst,X=L.destroy;if(X!==void 0){L.destroy=void 0,x=r;var oe=f,Te=X;try{Te()}catch(Ve){ti(x,oe,Ve)}}}m=m.next}while(m!==E)}}catch(Ve){ti(r,r.return,Ve)}}function Io(i){var r=i.updateQueue;if(r!==null){var f=i.stateNode;try{ta(r,f)}catch(m){ti(i,i.return,m)}}}function Yp(i,r,f){f.props=ia(i.type,i.memoizedProps),f.state=i.memoizedState;try{f.componentWillUnmount()}catch(m){ti(i,r,m)}}function gr(i,r){try{var f=i.ref;if(f!==null){switch(i.tag){case 26:case 27:case 5:var m=i.stateNode;break;case 30:m=i.stateNode;break;default:m=i.stateNode}typeof f=="function"?i.refCleanup=f(m):f.current=m}}catch(x){ti(i,r,x)}}function ds(i,r){var f=i.ref,m=i.refCleanup;if(f!==null)if(typeof m=="function")try{m()}catch(x){ti(i,r,x)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof f=="function")try{f(null)}catch(x){ti(i,r,x)}else f.current=null}function ps(i){var r=i.type,f=i.memoizedProps,m=i.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":f.autoFocus&&m.focus();break e;case"img":f.src?m.src=f.src:f.srcSet&&(m.srcset=f.srcSet)}}catch(x){ti(i,i.return,x)}}function Ds(i,r,f){try{var m=i.stateNode;Qw(m,i.type,f,r),m[I]=r}catch(x){ti(i,i.return,x)}}function Li(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&bc(i.type)||i.tag===4}function vr(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||Li(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&bc(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function on(i,r,f){var m=i.tag;if(m===5||m===6)i=i.stateNode,r?(f.nodeType===9?f.body:f.nodeName==="HTML"?f.ownerDocument.body:f).insertBefore(i,r):(r=f.nodeType===9?f.body:f.nodeName==="HTML"?f.ownerDocument.body:f,r.appendChild(i),f=f._reactRootContainer,f!=null||r.onclick!==null||(r.onclick=nr));else if(m!==4&&(m===27&&bc(i.type)&&(f=i.stateNode,r=null),i=i.child,i!==null))for(on(i,r,f),i=i.sibling;i!==null;)on(i,r,f),i=i.sibling}function Vn(i,r,f){var m=i.tag;if(m===5||m===6)i=i.stateNode,r?f.insertBefore(i,r):f.appendChild(i);else if(m!==4&&(m===27&&bc(i.type)&&(f=i.stateNode),i=i.child,i!==null))for(Vn(i,r,f),i=i.sibling;i!==null;)Vn(i,r,f),i=i.sibling}function Ti(i){var r=i.stateNode,f=i.memoizedProps;try{for(var m=i.type,x=r.attributes;x.length;)r.removeAttributeNode(x[0]);Ua(r,m,f),r[nn]=i,r[I]=f}catch(E){ti(i,i.return,E)}}var Us=!1,ui=!1,Gr=!1,Hu=typeof WeakSet=="function"?WeakSet:Set,yi=null;function vc(i,r){if(i=i.containerInfo,H_=Cv,i=Gf(i),Kl(i)){if("selectionStart"in i)var f={start:i.selectionStart,end:i.selectionEnd};else e:{f=(f=i.ownerDocument)&&f.defaultView||window;var m=f.getSelection&&f.getSelection();if(m&&m.rangeCount!==0){f=m.anchorNode;var x=m.anchorOffset,E=m.focusNode;m=m.focusOffset;try{f.nodeType,E.nodeType}catch{f=null;break e}var L=0,X=-1,oe=-1,Te=0,Ve=0,Ke=i,Re=null;t:for(;;){for(var Oe;Ke!==f||x!==0&&Ke.nodeType!==3||(X=L+x),Ke!==E||m!==0&&Ke.nodeType!==3||(oe=L+m),Ke.nodeType===3&&(L+=Ke.nodeValue.length),(Oe=Ke.firstChild)!==null;)Re=Ke,Ke=Oe;for(;;){if(Ke===i)break t;if(Re===f&&++Te===x&&(X=L),Re===E&&++Ve===m&&(oe=L),(Oe=Ke.nextSibling)!==null)break;Ke=Re,Re=Ke.parentNode}Ke=Oe}f=X===-1||oe===-1?null:{start:X,end:oe}}else f=null}f=f||{start:0,end:0}}else f=null;for(F_={focusedElem:i,selectionRange:f},Cv=!1,yi=r;yi!==null;)if(r=yi,i=r.child,(r.subtreeFlags&1028)!==0&&i!==null)i.return=r,yi=i;else for(;yi!==null;){switch(r=yi,E=r.alternate,i=r.flags,r.tag){case 0:if((i&4)!==0&&(i=r.updateQueue,i=i!==null?i.events:null,i!==null))for(f=0;f<i.length;f++)x=i[f],x.ref.impl=x.nextImpl;break;case 11:case 15:break;case 1:if((i&1024)!==0&&E!==null){i=void 0,f=r,x=E.memoizedProps,E=E.memoizedState,m=f.stateNode;try{var Lt=ia(f.type,x);i=m.getSnapshotBeforeUpdate(Lt,E),m.__reactInternalSnapshotBeforeUpdate=i}catch(Wt){ti(f,f.return,Wt)}}break;case 3:if((i&1024)!==0){if(i=r.stateNode.containerInfo,f=i.nodeType,f===9)k_(i);else if(f===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":k_(i);break;default:i.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((i&1024)!==0)throw Error(n(163))}if(i=r.sibling,i!==null){i.return=r.return,yi=i;break}yi=r.return}}function mv(i,r,f){var m=f.flags;switch(f.tag){case 0:case 11:case 15:kr(i,f),m&4&&mr(5,f);break;case 1:if(kr(i,f),m&4)if(i=f.stateNode,r===null)try{i.componentDidMount()}catch(L){ti(f,f.return,L)}else{var x=ia(f.type,r.memoizedProps);r=r.memoizedState;try{i.componentDidUpdate(x,r,i.__reactInternalSnapshotBeforeUpdate)}catch(L){ti(f,f.return,L)}}m&64&&Io(f),m&512&&gr(f,f.return);break;case 3:if(kr(i,f),m&64&&(i=f.updateQueue,i!==null)){if(r=null,f.child!==null)switch(f.child.tag){case 27:case 5:r=f.child.stateNode;break;case 1:r=f.child.stateNode}try{ta(i,r)}catch(L){ti(f,f.return,L)}}break;case 27:r===null&&m&4&&Ti(f);case 26:case 5:kr(i,f),r===null&&m&4&&ps(f),m&512&&gr(f,f.return);break;case 12:kr(i,f);break;case 31:kr(i,f),m&4&&bh(i,f);break;case 13:kr(i,f),m&4&&Wp(i,f),m&64&&(i=f.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(f=Hw.bind(null,f),sR(i,f))));break;case 22:if(m=f.memoizedState!==null||Us,!m){r=r!==null&&r.memoizedState!==null||ui,x=Us;var E=ui;Us=m,(ui=r)&&!E?jn(i,f,(f.subtreeFlags&8772)!==0):kr(i,f),Us=x,ui=E}break;case 30:break;default:kr(i,f)}}function Sh(i){var r=i.alternate;r!==null&&(i.alternate=null,Sh(r)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(r=i.stateNode,r!==null&&B(r)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}var On=null,Oi=!1;function va(i,r,f){for(f=f.child;f!==null;)Bo(i,r,f),f=f.sibling}function Bo(i,r,f){if(et&&typeof et.onCommitFiberUnmount=="function")try{et.onCommitFiberUnmount(Qe,f)}catch{}switch(f.tag){case 26:ui||ds(f,r),va(i,r,f),f.memoizedState?f.memoizedState.count--:f.stateNode&&(f=f.stateNode,f.parentNode.removeChild(f));break;case 27:ui||ds(f,r);var m=On,x=Oi;bc(f.type)&&(On=f.stateNode,Oi=!1),va(i,r,f),Jp(f.stateNode),On=m,Oi=x;break;case 5:ui||ds(f,r);case 6:if(m=On,x=Oi,On=null,va(i,r,f),On=m,Oi=x,On!==null)if(Oi)try{(On.nodeType===9?On.body:On.nodeName==="HTML"?On.ownerDocument.body:On).removeChild(f.stateNode)}catch(E){ti(f,r,E)}else try{On.removeChild(f.stateNode)}catch(E){ti(f,r,E)}break;case 18:On!==null&&(Oi?(i=On,z1(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,f.stateNode),Lh(i)):z1(On,f.stateNode));break;case 4:m=On,x=Oi,On=f.stateNode.containerInfo,Oi=!0,va(i,r,f),On=m,Oi=x;break;case 0:case 11:case 14:case 15:Ns(2,f,r),ui||Ns(4,f,r),va(i,r,f);break;case 1:ui||(ds(f,r),m=f.stateNode,typeof m.componentWillUnmount=="function"&&Yp(f,r,m)),va(i,r,f);break;case 21:va(i,r,f);break;case 22:ui=(m=ui)||f.memoizedState!==null,va(i,r,f),ui=m;break;default:va(i,r,f)}}function bh(i,r){if(r.memoizedState===null&&(i=r.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{Lh(i)}catch(f){ti(r,r.return,f)}}}function Wp(i,r){if(r.memoizedState===null&&(i=r.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{Lh(i)}catch(f){ti(r,r.return,f)}}function gv(i){switch(i.tag){case 31:case 13:case 19:var r=i.stateNode;return r===null&&(r=i.stateNode=new Hu),r;case 22:return i=i.stateNode,r=i._retryCache,r===null&&(r=i._retryCache=new Hu),r;default:throw Error(n(435,i.tag))}}function Ai(i,r){var f=gv(i);r.forEach(function(m){if(!f.has(m)){f.add(m);var x=Fw.bind(null,i,m);m.then(x,x)}})}function ya(i,r){var f=r.deletions;if(f!==null)for(var m=0;m<f.length;m++){var x=f[m],E=i,L=r,X=L;e:for(;X!==null;){switch(X.tag){case 27:if(bc(X.type)){On=X.stateNode,Oi=!1;break e}break;case 5:On=X.stateNode,Oi=!1;break e;case 3:case 4:On=X.stateNode.containerInfo,Oi=!0;break e}X=X.return}if(On===null)throw Error(n(160));Bo(E,L,x),On=null,Oi=!1,E=x.alternate,E!==null&&(E.return=null),x.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)Po(r,i),r=r.sibling}var Ga=null;function Po(i,r){var f=i.alternate,m=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:ya(r,i),_i(i),m&4&&(Ns(3,i,i.return),mr(3,i),Ns(5,i,i.return));break;case 1:ya(r,i),_i(i),m&512&&(ui||f===null||ds(f,f.return)),m&64&&Us&&(i=i.updateQueue,i!==null&&(m=i.callbacks,m!==null&&(f=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=f===null?m:f.concat(m))));break;case 26:var x=Ga;if(ya(r,i),_i(i),m&512&&(ui||f===null||ds(f,f.return)),m&4){var E=f!==null?f.memoizedState:null;if(m=i.memoizedState,f===null)if(m===null)if(i.stateNode===null){e:{m=i.type,f=i.memoizedProps,x=x.ownerDocument||x;t:switch(m){case"title":E=x.getElementsByTagName("title")[0],(!E||E[at]||E[nn]||E.namespaceURI==="http://www.w3.org/2000/svg"||E.hasAttribute("itemprop"))&&(E=x.createElement(m),x.head.insertBefore(E,x.querySelector("head > title"))),Ua(E,m,f),E[nn]=i,Be(E),m=E;break e;case"link":var L=q1("link","href",x).get(m+(f.href||""));if(L){for(var X=0;X<L.length;X++)if(E=L[X],E.getAttribute("href")===(f.href==null||f.href===""?null:f.href)&&E.getAttribute("rel")===(f.rel==null?null:f.rel)&&E.getAttribute("title")===(f.title==null?null:f.title)&&E.getAttribute("crossorigin")===(f.crossOrigin==null?null:f.crossOrigin)){L.splice(X,1);break t}}E=x.createElement(m),Ua(E,m,f),x.head.appendChild(E);break;case"meta":if(L=q1("meta","content",x).get(m+(f.content||""))){for(X=0;X<L.length;X++)if(E=L[X],E.getAttribute("content")===(f.content==null?null:""+f.content)&&E.getAttribute("name")===(f.name==null?null:f.name)&&E.getAttribute("property")===(f.property==null?null:f.property)&&E.getAttribute("http-equiv")===(f.httpEquiv==null?null:f.httpEquiv)&&E.getAttribute("charset")===(f.charSet==null?null:f.charSet)){L.splice(X,1);break t}}E=x.createElement(m),Ua(E,m,f),x.head.appendChild(E);break;default:throw Error(n(468,m))}E[nn]=i,Be(E),m=E}i.stateNode=m}else Y1(x,i.type,i.stateNode);else i.stateNode=j1(x,m,i.memoizedProps);else E!==m?(E===null?f.stateNode!==null&&(f=f.stateNode,f.parentNode.removeChild(f)):E.count--,m===null?Y1(x,i.type,i.stateNode):j1(x,m,i.memoizedProps)):m===null&&i.stateNode!==null&&Ds(i,i.memoizedProps,f.memoizedProps)}break;case 27:ya(r,i),_i(i),m&512&&(ui||f===null||ds(f,f.return)),f!==null&&m&4&&Ds(i,i.memoizedProps,f.memoizedProps);break;case 5:if(ya(r,i),_i(i),m&512&&(ui||f===null||ds(f,f.return)),i.flags&32){x=i.stateNode;try{$o(x,"")}catch(Lt){ti(i,i.return,Lt)}}m&4&&i.stateNode!=null&&(x=i.memoizedProps,Ds(i,x,f!==null?f.memoizedProps:x)),m&1024&&(Gr=!0);break;case 6:if(ya(r,i),_i(i),m&4){if(i.stateNode===null)throw Error(n(162));m=i.memoizedProps,f=i.stateNode;try{f.nodeValue=m}catch(Lt){ti(i,i.return,Lt)}}break;case 3:if(Tv=null,x=Ga,Ga=Mv(r.containerInfo),ya(r,i),Ga=x,_i(i),m&4&&f!==null&&f.memoizedState.isDehydrated)try{Lh(r.containerInfo)}catch(Lt){ti(i,i.return,Lt)}Gr&&(Gr=!1,vv(i));break;case 4:m=Ga,Ga=Mv(i.stateNode.containerInfo),ya(r,i),_i(i),Ga=m;break;case 12:ya(r,i),_i(i);break;case 31:ya(r,i),_i(i),m&4&&(m=i.updateQueue,m!==null&&(i.updateQueue=null,Ai(i,m)));break;case 13:ya(r,i),_i(i),i.child.flags&8192&&i.memoizedState!==null!=(f!==null&&f.memoizedState!==null)&&(qr=k()),m&4&&(m=i.updateQueue,m!==null&&(i.updateQueue=null,Ai(i,m)));break;case 22:x=i.memoizedState!==null;var oe=f!==null&&f.memoizedState!==null,Te=Us,Ve=ui;if(Us=Te||x,ui=Ve||oe,ya(r,i),ui=Ve,Us=Te,_i(i),m&8192)e:for(r=i.stateNode,r._visibility=x?r._visibility&-2:r._visibility|1,x&&(f===null||oe||Us||ui||xl(i)),f=null,r=i;;){if(r.tag===5||r.tag===26){if(f===null){oe=f=r;try{if(E=oe.stateNode,x)L=E.style,typeof L.setProperty=="function"?L.setProperty("display","none","important"):L.display="none";else{X=oe.stateNode;var Ke=oe.memoizedProps.style,Re=Ke!=null&&Ke.hasOwnProperty("display")?Ke.display:null;X.style.display=Re==null||typeof Re=="boolean"?"":(""+Re).trim()}}catch(Lt){ti(oe,oe.return,Lt)}}}else if(r.tag===6){if(f===null){oe=r;try{oe.stateNode.nodeValue=x?"":oe.memoizedProps}catch(Lt){ti(oe,oe.return,Lt)}}}else if(r.tag===18){if(f===null){oe=r;try{var Oe=oe.stateNode;x?I1(Oe,!0):I1(oe.stateNode,!1)}catch(Lt){ti(oe,oe.return,Lt)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===i)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===i)break e;for(;r.sibling===null;){if(r.return===null||r.return===i)break e;f===r&&(f=null),r=r.return}f===r&&(f=null),r.sibling.return=r.return,r=r.sibling}m&4&&(m=i.updateQueue,m!==null&&(f=m.retryQueue,f!==null&&(m.retryQueue=null,Ai(i,f))));break;case 19:ya(r,i),_i(i),m&4&&(m=i.updateQueue,m!==null&&(i.updateQueue=null,Ai(i,m)));break;case 30:break;case 21:break;default:ya(r,i),_i(i)}}function _i(i){var r=i.flags;if(r&2){try{for(var f,m=i.return;m!==null;){if(Li(m)){f=m;break}m=m.return}if(f==null)throw Error(n(160));switch(f.tag){case 27:var x=f.stateNode,E=vr(i);Vn(i,E,x);break;case 5:var L=f.stateNode;f.flags&32&&($o(L,""),f.flags&=-33);var X=vr(i);Vn(i,X,L);break;case 3:case 4:var oe=f.stateNode.containerInfo,Te=vr(i);on(i,Te,oe);break;default:throw Error(n(161))}}catch(Ve){ti(i,i.return,Ve)}i.flags&=-3}r&4096&&(i.flags&=-4097)}function vv(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var r=i;vv(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),i=i.sibling}}function kr(i,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)mv(i,r.alternate,r),r=r.sibling}function xl(i){for(i=i.child;i!==null;){var r=i;switch(r.tag){case 0:case 11:case 14:case 15:Ns(4,r,r.return),xl(r);break;case 1:ds(r,r.return);var f=r.stateNode;typeof f.componentWillUnmount=="function"&&Yp(r,r.return,f),xl(r);break;case 27:Jp(r.stateNode);case 26:case 5:ds(r,r.return),xl(r);break;case 22:r.memoizedState===null&&xl(r);break;case 30:xl(r);break;default:xl(r)}i=i.sibling}}function jn(i,r,f){for(f=f&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var m=r.alternate,x=i,E=r,L=E.flags;switch(E.tag){case 0:case 11:case 15:jn(x,E,f),mr(4,E);break;case 1:if(jn(x,E,f),m=E,x=m.stateNode,typeof x.componentDidMount=="function")try{x.componentDidMount()}catch(Te){ti(m,m.return,Te)}if(m=E,x=m.updateQueue,x!==null){var X=m.stateNode;try{var oe=x.shared.hiddenCallbacks;if(oe!==null)for(x.shared.hiddenCallbacks=null,x=0;x<oe.length;x++)fr(oe[x],X)}catch(Te){ti(m,m.return,Te)}}f&&L&64&&Io(E),gr(E,E.return);break;case 27:Ti(E);case 26:case 5:jn(x,E,f),f&&m===null&&L&4&&ps(E),gr(E,E.return);break;case 12:jn(x,E,f);break;case 31:jn(x,E,f),f&&L&4&&bh(x,E);break;case 13:jn(x,E,f),f&&L&4&&Wp(x,E);break;case 22:E.memoizedState===null&&jn(x,E,f),gr(E,E.return);break;case 30:break;default:jn(x,E,f)}r=r.sibling}}function Mh(i,r){var f=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(f=i.memoizedState.cachePool.pool),i=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(i=r.memoizedState.cachePool.pool),i!==f&&(i!=null&&i.refCount++,f!=null&&ea(f))}function Xr(i,r){i=null,r.alternate!==null&&(i=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==i&&(r.refCount++,i!=null&&ea(i))}function Hi(i,r,f,m){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)hi(i,r,f,m),r=r.sibling}function hi(i,r,f,m){var x=r.flags;switch(r.tag){case 0:case 11:case 15:Hi(i,r,f,m),x&2048&&mr(9,r);break;case 1:Hi(i,r,f,m);break;case 3:Hi(i,r,f,m),x&2048&&(i=null,r.alternate!==null&&(i=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==i&&(r.refCount++,i!=null&&ea(i)));break;case 12:if(x&2048){Hi(i,r,f,m),i=r.stateNode;try{var E=r.memoizedProps,L=E.id,X=E.onPostCommit;typeof X=="function"&&X(L,r.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(oe){ti(r,r.return,oe)}}else Hi(i,r,f,m);break;case 31:Hi(i,r,f,m);break;case 13:Hi(i,r,f,m);break;case 23:break;case 22:E=r.stateNode,L=r.alternate,r.memoizedState!==null?E._visibility&2?Hi(i,r,f,m):yc(i,r):E._visibility&2?Hi(i,r,f,m):(E._visibility|=2,Ho(i,r,f,m,(r.subtreeFlags&10256)!==0||!1)),x&2048&&Mh(L,r);break;case 24:Hi(i,r,f,m),x&2048&&Xr(r.alternate,r);break;default:Hi(i,r,f,m)}}function Ho(i,r,f,m,x){for(x=x&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var E=i,L=r,X=f,oe=m,Te=L.flags;switch(L.tag){case 0:case 11:case 15:Ho(E,L,X,oe,x),mr(8,L);break;case 23:break;case 22:var Ve=L.stateNode;L.memoizedState!==null?Ve._visibility&2?Ho(E,L,X,oe,x):yc(E,L):(Ve._visibility|=2,Ho(E,L,X,oe,x)),x&&Te&2048&&Mh(L.alternate,L);break;case 24:Ho(E,L,X,oe,x),x&&Te&2048&&Xr(L.alternate,L);break;default:Ho(E,L,X,oe,x)}r=r.sibling}}function yc(i,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var f=i,m=r,x=m.flags;switch(m.tag){case 22:yc(f,m),x&2048&&Mh(m.alternate,m);break;case 24:yc(f,m),x&2048&&Xr(m.alternate,m);break;default:yc(f,m)}r=r.sibling}}var xi=8192;function Sl(i,r,f){if(i.subtreeFlags&xi)for(i=i.child;i!==null;)wi(i,r,f),i=i.sibling}function wi(i,r,f){switch(i.tag){case 26:Sl(i,r,f),i.flags&xi&&i.memoizedState!==null&&vR(f,Ga,i.memoizedState,i.memoizedProps);break;case 5:Sl(i,r,f);break;case 3:case 4:var m=Ga;Ga=Mv(i.stateNode.containerInfo),Sl(i,r,f),Ga=m;break;case 22:i.memoizedState===null&&(m=i.alternate,m!==null&&m.memoizedState!==null?(m=xi,xi=16777216,Sl(i,r,f),xi=m):Sl(i,r,f));break;default:Sl(i,r,f)}}function ka(i){var r=i.alternate;if(r!==null&&(i=r.child,i!==null)){r.child=null;do r=i.sibling,i.sibling=null,i=r;while(i!==null)}}function Na(i){var r=i.deletions;if((i.flags&16)!==0){if(r!==null)for(var f=0;f<r.length;f++){var m=r[f];yi=m,Fu(m,i)}ka(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)bl(i),i=i.sibling}function bl(i){switch(i.tag){case 0:case 11:case 15:Na(i),i.flags&2048&&Ns(9,i,i.return);break;case 3:Na(i);break;case 12:Na(i);break;case 22:var r=i.stateNode;i.memoizedState!==null&&r._visibility&2&&(i.return===null||i.return.tag!==13)?(r._visibility&=-3,Eh(i)):Na(i);break;default:Na(i)}}function Eh(i){var r=i.deletions;if((i.flags&16)!==0){if(r!==null)for(var f=0;f<r.length;f++){var m=r[f];yi=m,Fu(m,i)}ka(i)}for(i=i.child;i!==null;){switch(r=i,r.tag){case 0:case 11:case 15:Ns(8,r,r.return),Eh(r);break;case 22:f=r.stateNode,f._visibility&2&&(f._visibility&=-3,Eh(r));break;default:Eh(r)}i=i.sibling}}function Fu(i,r){for(;yi!==null;){var f=yi;switch(f.tag){case 0:case 11:case 15:Ns(8,f,r);break;case 23:case 22:if(f.memoizedState!==null&&f.memoizedState.cachePool!==null){var m=f.memoizedState.cachePool.pool;m!=null&&m.refCount++}break;case 24:ea(f.memoizedState.cache)}if(m=f.child,m!==null)m.return=f,yi=m;else e:for(f=i;yi!==null;){m=yi;var x=m.sibling,E=m.return;if(Sh(m),m===f){yi=null;break e}if(x!==null){x.return=E,yi=x;break e}yi=E}}}var Th={getCacheForType:function(i){var r=Wi(Pt),f=r.data.get(i);return f===void 0&&(f=i(),r.data.set(i,f)),f},cacheSignal:function(){return Wi(Pt).controller.signal}},Ah=typeof WeakMap=="function"?WeakMap:Map,Cn=0,qn=null,ln=null,bn=0,Ht=0,vn=null,tn=!1,dn=!1,$n=!1,Ri=0,Yn=0,ms=0,jr=0,qs=0,Nn=0,gs=0,Ys=null,_a=null,Xa=!1,qr=0,_c=0,vs=1/0,xc=null,yr=null,di=0,Ws=null,ys=null,
vendor: 12,227 bytes, line 48
48Ls=0,Yr=0,Ml=null,wh=null,El=0,Tl=null;function Da(){return(Cn&2)!==0&&bn!==0?bn&-bn:P.T!==null?U_():Di()}function l(){if(Nn===0)if((bn&536870912)===0||En){var i=ct;ct<<=1,(ct&3932160)===0&&(ct=262144),Nn=i}else Nn=536870912;return i=Pi.current,i!==null&&(i.flags|=32),Nn}function u(i,r,f){(i===qn&&(Ht===2||Ht===9)||i.cancelPendingCommit!==null)&&(xe(i,0),N(i,bn,Nn,!1)),Xi(i,f),((Cn&2)===0||i!==qn)&&(i===qn&&((Cn&2)===0&&(jr|=f),Yn===4&&N(i,bn,Nn,!1)),Fo(i))}function g(i,r,f){if((Cn&6)!==0)throw Error(n(327));var m=!f&&(r&127)===0&&(r&i.expiredLanes)===0||Tt(i,r),x=m?Al(i,r):ja(i,r,!0),E=m;do{if(x===0){dn&&!m&&N(i,r,0,!1);break}else{if(f=i.current.alternate,E&&!w(f)){x=ja(i,r,!1),E=!1;continue}if(x===2){if(E=r,i.errorRecoveryDisabledLanes&E)var L=0;else L=i.pendingLanes&-536870913,L=L!==0?L:L&536870912?536870912:0;if(L!==0){r=L;e:{var X=i;x=Ys;var oe=X.current.memoizedState.isDehydrated;if(oe&&(xe(X,L).flags|=256),L=ja(X,L,!1),L!==2){if($n&&!oe){X.errorRecoveryDisabledLanes|=E,jr|=E,x=4;break e}E=_a,_a=x,E!==null&&(_a===null?_a=E:_a.push.apply(_a,E))}x=L}if(E=!1,x!==2)continue}}if(x===1){xe(i,0),N(i,r,0,!0);break}e:{switch(m=i,E=x,E){case 0:case 1:throw Error(n(345));case 4:if((r&4194048)!==r)break;case 6:N(m,r,Nn,!tn);break e;case 2:_a=null;break;case 3:case 5:break;default:throw Error(n(329))}if((r&62914560)===r&&(x=qr+300-k(),10<x)){if(N(m,r,Nn,!tn),We(m,0,!0)!==0)break e;Ls=r,m.timeoutHandle=L1(S.bind(null,m,f,_a,xc,Xa,r,Nn,jr,gs,tn,E,"Throttled",-0,0),x);break e}S(m,f,_a,xc,Xa,r,Nn,jr,gs,tn,E,null,-0,0)}}break}while(!0);Fo(i)}function S(i,r,f,m,x,E,L,X,oe,Te,Ve,Ke,Re,Oe){if(i.timeoutHandle=-1,Ke=r.subtreeFlags,Ke&8192||(Ke&16785408)===16785408){Ke={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:nr},wi(r,E,Ke);var Lt=(E&62914560)===E?qr-k():(E&4194048)===E?_c-k():0;if(Lt=yR(Ke,Lt),Lt!==null){Ls=E,i.cancelPendingCommit=Lt(Qt.bind(null,i,r,E,f,m,x,L,X,oe,Ve,Ke,null,Re,Oe)),N(i,E,L,!Te);return}}Qt(i,r,E,f,m,x,L,X,oe)}function w(i){for(var r=i;;){var f=r.tag;if((f===0||f===11||f===15)&&r.flags&16384&&(f=r.updateQueue,f!==null&&(f=f.stores,f!==null)))for(var m=0;m<f.length;m++){var x=f[m],E=x.getSnapshot;x=x.value;try{if(!li(E(),x))return!1}catch{return!1}}if(f=r.child,r.subtreeFlags&16384&&f!==null)f.return=r,r=f;else{if(r===i)break;for(;r.sibling===null;){if(r.return===null||r.return===i)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function N(i,r,f,m){r&=~qs,r&=~jr,i.suspendedLanes|=r,i.pingedLanes&=~r,m&&(i.warmLanes|=r),m=i.expirationTimes;for(var x=r;0<x;){var E=31-vt(x),L=1<<E;m[E]=-1,x&=~L}f!==0&&oo(i,f,r)}function j(){return(Cn&6)===0?(Zp(0),!1):!0}function re(){if(ln!==null){if(Ht===0)var i=ln.return;else i=ln,pa=Lr=null,Tp(i),Ro=null,Co=0,i=ln;for(;i!==null;)_l(i.alternate,i),i=i.return;ln=null}}function xe(i,r){var f=i.timeoutHandle;f!==-1&&(i.timeoutHandle=-1,eR(f)),f=i.cancelPendingCommit,f!==null&&(i.cancelPendingCommit=null,f()),Ls=0,re(),qn=i,ln=f=sr(i.current,null),bn=r,Ht=0,vn=null,tn=!1,dn=Tt(i,r),$n=!1,gs=Nn=qs=jr=ms=Yn=0,_a=Ys=null,Xa=!1,(r&8)!==0&&(r|=r&32);var m=i.entangledLanes;if(m!==0)for(i=i.entanglements,m&=r;0<m;){var x=31-vt(m),E=1<<x;r|=i[x],m&=~E}return Ri=r,So(),f}function Xe(i,r){Kt=null,P.H=Ru,r===wo||r===Gs?(r=th(),Ht=3):r===yu?(r=th(),Ht=4):Ht=r===yh?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,vn=r,ln===null&&(Yn=1,vh(i,Ia(r,i.current)))}function ht(){var i=Pi.current;return i===null?!0:(bn&4194048)===bn?ws===null:(bn&62914560)===bn||(bn&536870912)!==0?i===ws:!1}function xt(){var i=P.H;return P.H=Ru,i===null?Ru:i}function Mt(){var i=P.A;return P.A=Th,i}function en(){Yn=4,tn||(bn&4194048)!==bn&&Pi.current!==null||(dn=!0),(ms&134217727)===0&&(jr&134217727)===0||qn===null||N(qn,bn,Nn,!1)}function ja(i,r,f){var m=Cn;Cn|=2;var x=xt(),E=Mt();(qn!==i||bn!==r)&&(xc=null,xe(i,r)),r=!1;var L=Yn;e:do try{if(Ht!==0&&ln!==null){var X=ln,oe=vn;switch(Ht){case 8:re(),L=6;break e;case 3:case 2:case 9:case 6:Pi.current===null&&(r=!0);var Te=Ht;if(Ht=0,vn=null,rt(i,X,oe,Te),f&&dn){L=0;break e}break;default:Te=Ht,Ht=0,vn=null,rt(i,X,oe,Te)}}Vu(),L=Yn;break}catch(Ve){Xe(i,Ve)}while(!0);return r&&i.shellSuspendCounter++,pa=Lr=null,Cn=m,P.H=x,P.A=E,ln===null&&(qn=null,bn=0,So()),L}function Vu(){for(;ln!==null;)ye(ln)}function Al(i,r){var f=Cn;Cn|=2;var m=xt(),x=Mt();qn!==i||bn!==r?(xc=null,vs=k()+500,xe(i,r)):dn=Tt(i,r);e:do try{if(Ht!==0&&ln!==null){r=ln;var E=vn;t:switch(Ht){case 1:Ht=0,vn=null,rt(i,r,E,1);break;case 2:case 9:if(Gg(E)){Ht=0,vn=null,Ne(r);break}r=function(){Ht!==2&&Ht!==9||qn!==i||(Ht=7),Fo(i)},E.then(r,r);break e;case 3:Ht=7;break e;case 4:Ht=5;break e;case 7:Gg(E)?(Ht=0,vn=null,Ne(r)):(Ht=0,vn=null,rt(i,r,E,7));break;case 5:var L=null;switch(ln.tag){case 26:L=ln.memoizedState;case 5:case 27:var X=ln;if(L?W1(L):X.stateNode.complete){Ht=0,vn=null;var oe=X.sibling;if(oe!==null)ln=oe;else{var Te=X.return;Te!==null?(ln=Te,Bt(Te)):ln=null}break t}}Ht=0,vn=null,rt(i,r,E,5);break;case 6:Ht=0,vn=null,rt(i,r,E,6);break;case 8:re(),Yn=6;break e;default:throw Error(n(462))}}Ae();break}catch(Ve){Xe(i,Ve)}while(!0);return pa=Lr=null,P.H=m,P.A=x,Cn=f,ln!==null?0:(qn=null,bn=0,So(),Yn)}function Ae(){for(;ln!==null&&!qt();)ye(ln)}function ye(i){var r=_h(i.alternate,i,Ri);i.memoizedProps=i.pendingProps,r===null?Bt(i):ln=r}function Ne(i){var r=i,f=r.alternate;switch(r.tag){case 15:case 0:r=ga(f,r,r.pendingProps,r.type,void 0,bn);break;case 11:r=ga(f,r,r.pendingProps,r.type.render,r.ref,bn);break;case 5:Tp(r);default:_l(f,r),r=ln=da(r,Ri),r=_h(f,r,Ri)}i.memoizedProps=i.pendingProps,r===null?Bt(i):ln=r}function rt(i,r,f,m){pa=Lr=null,Tp(r),Ro=null,Co=0;var x=r.return;try{if(ls(i,x,r,f,bn)){Yn=1,vh(i,Ia(f,i.current)),ln=null;return}}catch(E){if(x!==null)throw ln=x,E;Yn=1,vh(i,Ia(f,i.current)),ln=null;return}r.flags&32768?(En||m===1?i=!0:dn||(bn&536870912)!==0?i=!1:(tn=i=!0,(m===2||m===9||m===3||m===6)&&(m=Pi.current,m!==null&&m.tag===13&&(m.flags|=16384))),ai(r,i)):Bt(r)}function Bt(i){var r=i;do{if((r.flags&32768)!==0){ai(r,tn);return}i=r.return;var f=qp(r.alternate,r,Ri);if(f!==null){ln=f;return}if(r=r.sibling,r!==null){ln=r;return}ln=r=i}while(r!==null);Yn===0&&(Yn=5)}function ai(i,r){do{var f=xh(i.alternate,i);if(f!==null){f.flags&=32767,ln=f;return}if(f=i.return,f!==null&&(f.flags|=32768,f.subtreeFlags=0,f.deletions=null),!r&&(i=i.sibling,i!==null)){ln=i;return}ln=i=f}while(i!==null);Yn=6,ln=null}function Qt(i,r,f,m,x,E,L,X,oe){i.cancelPendingCommit=null;do Rh();while(di!==0);if((Cn&6)!==0)throw Error(n(327));if(r!==null){if(r===i.current)throw Error(n(177));if(E=r.lanes|r.childLanes,E|=Yf,ba(i,f,E,L,X,oe),i===qn&&(ln=qn=null,bn=0),ys=r,Ws=i,Ls=f,Yr=E,Ml=x,wh=m,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,Vw(Pe,function(){return g1(),null})):(i.callbackNode=null,i.callbackPriority=0),m=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||m){m=P.T,P.T=null,x=Q.p,Q.p=2,L=Cn,Cn|=4;try{vc(i,r,f)}finally{Cn=L,Q.p=x,P.T=m}}di=1,zn(),Fi(),In()}}function zn(){if(di===1){di=0;var i=Ws,r=ys,f=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||f){f=P.T,P.T=null;var m=Q.p;Q.p=2;var x=Cn;Cn|=4;try{Po(r,i);var E=F_,L=Gf(i.containerInfo),X=E.focusedElem,oe=E.selectionRange;if(L!==X&&X&&X.ownerDocument&&Vf(X.ownerDocument.documentElement,X)){if(oe!==null&&Kl(X)){var Te=oe.start,Ve=oe.end;if(Ve===void 0&&(Ve=Te),"selectionStart"in X)X.selectionStart=Te,X.selectionEnd=Math.min(Ve,X.value.length);else{var Ke=X.ownerDocument||document,Re=Ke&&Ke.defaultView||window;if(Re.getSelection){var Oe=Re.getSelection(),Lt=X.textContent.length,Wt=Math.min(oe.start,Lt),ri=oe.end===void 0?Wt:Math.min(oe.end,Lt);!Oe.extend&&Wt>ri&&(L=ri,ri=Wt,Wt=L);var _e=ep(X,Wt),de=ep(X,ri);if(_e&&de&&(Oe.rangeCount!==1||Oe.anchorNode!==_e.node||Oe.anchorOffset!==_e.offset||Oe.focusNode!==de.node||Oe.focusOffset!==de.offset)){var Ee=Ke.createRange();Ee.setStart(_e.node,_e.offset),Oe.removeAllRanges(),Wt>ri?(Oe.addRange(Ee),Oe.extend(de.node,de.offset)):(Ee.setEnd(de.node,de.offset),Oe.addRange(Ee))}}}}for(Ke=[],Oe=X;Oe=Oe.parentNode;)Oe.nodeType===1&&Ke.push({element:Oe,left:Oe.scrollLeft,top:Oe.scrollTop});for(typeof X.focus=="function"&&X.focus(),X=0;X<Ke.length;X++){var Ye=Ke[X];Ye.element.scrollLeft=Ye.left,Ye.element.scrollTop=Ye.top}}Cv=!!H_,F_=H_=null}finally{Cn=x,Q.p=m,P.T=f}}i.current=r,di=2}}function Fi(){if(di===2){di=0;var i=Ws,r=ys,f=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||f){f=P.T,P.T=null;var m=Q.p;Q.p=2;var x=Cn;Cn|=4;try{mv(i,r.alternate,r)}finally{Cn=x,Q.p=m,P.T=f}}di=3}}function In(){if(di===4||di===3){di=0,J();var i=Ws,r=ys,f=Ls,m=wh;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?di=5:(di=0,ys=Ws=null,Wr(i,i.pendingLanes));var x=i.pendingLanes;if(x===0&&(yr=null),ts(f),r=r.stateNode,et&&typeof et.onCommitFiberRoot=="function")try{et.onCommitFiberRoot(Qe,r,void 0,(r.current.flags&128)===128)}catch{}if(m!==null){r=P.T,x=Q.p,Q.p=2,P.T=null;try{for(var E=i.onRecoverableError,L=0;L<m.length;L++){var X=m[L];E(X.value,{componentStack:X.stack})}}finally{P.T=r,Q.p=x}}(Ls&3)!==0&&Rh(),Fo(i),x=i.pendingLanes,(f&261930)!==0&&(x&42)!==0?i===Tl?El++:(El=0,Tl=i):El=0,Zp(0)}}function Wr(i,r){(i.pooledCacheLanes&=r)===0&&(r=i.pooledCache,r!=null&&(i.pooledCache=null,ea(r)))}function Rh(){return zn(),Fi(),In(),g1()}function g1(){if(di!==5)return!1;var i=Ws,r=Yr;Yr=0;var f=ts(Ls),m=P.T,x=Q.p;try{Q.p=32>f?32:f,P.T=null,f=Ml,Ml=null;var E=Ws,L=Ls;if(di=0,ys=Ws=null,Ls=0,(Cn&6)!==0)throw Error(n(331));var X=Cn;if(Cn|=4,bl(E.current),hi(E,E.current,L,f),Cn=X,Zp(0,!1),et&&typeof et.onPostCommitFiberRoot=="function")try{et.onPostCommitFiberRoot(Qe,E)}catch{}return!0}finally{Q.p=x,P.T=m,Wr(i,r)}}function v1(i,r,f){r=Ia(f,r),r=jp(i.stateNode,r,2),i=Br(i,r,2),i!==null&&(Xi(i,2),Fo(i))}function ti(i,r,f){if(i.tag===3)v1(i,i,f);else for(;r!==null;){if(r.tag===3){v1(r,i,f);break}else if(r.tag===1){var m=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(yr===null||!yr.has(m))){i=Ia(f,i),f=hc(2),m=Br(r,f,2),m!==null&&(Fa(f,m,r,i),Xi(m,2),Fo(m));break}}r=r.return}}function C_(i,r,f){var m=i.pingCache;if(m===null){m=i.pingCache=new Ah;var x=new Set;m.set(r,x)}else x=m.get(r),x===void 0&&(x=new Set,m.set(r,x));x.has(f)||($n=!0,x.add(f),i=Pw.bind(null,i,r,f),r.then(i,i))}function Pw(i,r,f){var m=i.pingCache;m!==null&&m.delete(r),i.pingedLanes|=i.suspendedLanes&f,i.warmLanes&=~f,qn===i&&(bn&f)===f&&(Yn===4||Yn===3&&(bn&62914560)===bn&&300>k()-qr?(Cn&2)===0&&xe(i,0):qs|=f,gs===bn&&(gs=0)),Fo(i)}function y1(i,r){r===0&&(r=Mn()),i=bo(i,r),i!==null&&(Xi(i,r),Fo(i))}function Hw(i){var r=i.memoizedState,f=0;r!==null&&(f=r.retryLane),y1(i,f)}function Fw(i,r){var f=0;switch(i.tag){case 31:case 13:var m=i.stateNode,x=i.memoizedState;x!==null&&(f=x.retryLane);break;case 19:m=i.stateNode;break;case 22:m=i.stateNode._retryCache;break;default:throw Error(n(314))}m!==null&&m.delete(r),y1(i,f)}function Vw(i,r){return lt(i,r)}var yv=null,Ch=null,N_=!1,_v=!1,D_=!1,Sc=0;function Fo(i){i!==Ch&&i.next===null&&(Ch===null?yv=Ch=i:Ch=Ch.next=i),_v=!0,N_||(N_=!0,kw())}function Zp(i,r){if(!D_&&_v){D_=!0;do for(var f=!1,m=yv;m!==null;){if(i!==0){var x=m.pendingLanes;if(x===0)var E=0;else{var L=m.suspendedLanes,X=m.pingedLanes;E=(1<<31-vt(42|i)+1)-1,E&=x&~(L&~X),E=E&201326741?E&201326741|1:E?E|2:0}E!==0&&(f=!0,b1(m,E))}else E=bn,E=We(m,m===qn?E:0,m.cancelPendingCommit!==null||m.timeoutHandle!==-1),(E&3)===0||Tt(m,E)||(f=!0,b1(m,E));m=m.next}while(f);D_=!1}}function Gw(){_1()}function _1(){_v=N_=!1;var i=0;Sc!==0&&$w()&&(i=Sc);for(var r=k(),f=null,m=yv;m!==null;){var x=m.next,E=x1(m,r);E===0?(m.next=null,f===null?yv=x:f.next=x,x===null&&(Ch=f)):(f=m,(i!==0||(E&3)!==0)&&(_v=!0)),m=x}di!==0&&di!==5||Zp(i),Sc!==0&&(Sc=0)}function x1(i,r){for(var f=i.suspendedLanes,m=i.pingedLanes,x=i.expirationTimes,E=i.pendingLanes&-62914561;0<E;){var L=31-vt(E),X=1<<L,oe=x[L];oe===-1?((X&f)===0||(X&m)!==0)&&(x[L]=Xt(X,r)):oe<=r&&(i.expiredLanes|=X),E&=~X}if(r=qn,f=bn,f=We(i,i===r?f:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),m=i.callbackNode,f===0||i===r&&(Ht===2||Ht===9)||i.cancelPendingCommit!==null)return m!==null&&m!==null&&Vt(m),i.callbackNode=null,i.c
vendor: 1,536 bytes, line 48
48allbackPriority=0;if((f&3)===0||Tt(i,f)){if(r=f&-f,r===i.callbackPriority)return r;switch(m!==null&&Vt(m),ts(f)){case 2:case 8:f=$e;break;case 32:f=Pe;break;case 268435456:f=ft;break;default:f=Pe}return m=S1.bind(null,i),f=lt(f,m),i.callbackPriority=r,i.callbackNode=f,r}return m!==null&&m!==null&&Vt(m),i.callbackPriority=2,i.callbackNode=null,2}function S1(i,r){if(di!==0&&di!==5)return i.callbackNode=null,i.callbackPriority=0,null;var f=i.callbackNode;if(Rh()&&i.callbackNode!==f)return null;var m=bn;return m=We(i,i===qn?m:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),m===0?null:(g(i,m,r),x1(i,k()),i.callbackNode!=null&&i.callbackNode===f?S1.bind(null,i):null)}function b1(i,r){if(Rh())return null;g(i,r,!0)}function kw(){tR(function(){(Cn&6)!==0?lt(ze,Gw):_1()})}function U_(){if(Sc===0){var i=Ir;i===0&&(i=Me,Me<<=1,(Me&261888)===0&&(Me=256)),Sc=i}return Sc}function M1(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:$c(""+i)}function E1(i,r){var f=r.ownerDocument.createElement("input");return f.name=r.name,f.value=r.value,i.id&&f.setAttribute("form",i.id),r.parentNode.insertBefore(f,r),i=new FormData(i),f.parentNode.removeChild(f),i}function Xw(i,r,f,m,x){if(r==="submit"&&f&&f.stateNode===x){var E=M1((x[I]||null).action),L=m.submitter;L&&(r=(r=L[I]||null)?M1(r.formAction):L.getAttribute("formAction"),r!==null&&(E=r,L=null));var X=new iu("action","action",null,m,x);i.push({event:X,listeners:[{instance:null,listener:function(){if(m.defaultPrevented){if(Sc!==0){var oe=L?
vendor: 4,610 bytes, line 48
48E1(x,L):new FormData(x);Fp(f,{pending:!0,data:oe,method:x.method,action:E},null,oe)}}else typeof E=="function"&&(X.preventDefault(),oe=L?E1(x,L):new FormData(x),Fp(f,{pending:!0,data:oe,method:x.method,action:E},E,oe))},currentTarget:x}]})}}for(var L_=0;L_<qf.length;L_++){var O_=qf[L_],jw=O_.toLowerCase(),qw=O_[0].toUpperCase()+O_.slice(1);ha(jw,"on"+qw)}ha(za,"onAnimationEnd"),ha(tp,"onAnimationIteration"),ha(ar,"onAnimationStart"),ha("dblclick","onDoubleClick"),ha("focusin","onFocus"),ha("focusout","onBlur"),ha(ec,"onTransitionRun"),ha(_o,"onTransitionStart"),ha(np,"onTransitionCancel"),ha(jf,"onTransitionEnd"),st("onMouseEnter",["mouseout","mouseover"]),st("onMouseLeave",["mouseout","mouseover"]),st("onPointerEnter",["pointerout","pointerover"]),st("onPointerLeave",["pointerout","pointerover"]),qe("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),qe("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),qe("onBeforeInput",["compositionend","keypress","textInput","paste"]),qe("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),qe("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),qe("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Kp="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(" "),Yw=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Kp));function T1(i,r){r=(r&4)!==0;for(var f=0;f<i.length;f++){var m=i[f],x=m.event;m=m.listeners;e:{var E=void 0;if(r)for(var L=m.length-1;0<=L;L--){var X=m[L],oe=X.instance,Te=X.currentTarget;if(X=X.listener,oe!==E&&x.isPropagationStopped())break e;E=X,x.currentTarget=Te;try{E(x)}catch(Ve){xo(Ve)}x.currentTarget=null,E=oe}else for(L=0;L<m.length;L++){if(X=m[L],oe=X.instance,Te=X.currentTarget,X=X.listener,oe!==E&&x.isPropagationStopped())break e;E=X,x.currentTarget=Te;try{E(x)}catch(Ve){xo(Ve)}x.currentTarget=null,E=oe}}}}function Tn(i,r){var f=r[ue];f===void 0&&(f=r[ue]=new Set);var m=i+"__bubble";f.has(m)||(A1(r,i,2,!1),f.add(m))}function z_(i,r,f){var m=0;r&&(m|=4),A1(f,i,m,r)}var xv="_reactListening"+Math.random().toString(36).slice(2);function I_(i){if(!i[xv]){i[xv]=!0,Ue.forEach(function(f){f!=="selectionchange"&&(Yw.has(f)||z_(f,!1,i),z_(f,!0,i))});var r=i.nodeType===9?i:i.ownerDocument;r===null||r[xv]||(r[xv]=!0,z_("selectionchange",!1,r))}}function A1(i,r,f,m){switch(tM(r)){case 2:var x=SR;break;case 8:x=bR;break;default:x=Q_}f=x.bind(null,r,f,i),x=void 0,!Df||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(x=!0),m?x!==void 0?i.addEventListener(r,f,{capture:!0,passive:x}):i.addEventListener(r,f,!0):x!==void 0?i.addEventListener(r,f,{passive:x}):i.addEventListener(r,f,!1)}function B_(i,r,f,m,x){var E=m;if((r&1)===0&&(r&2)===0&&m!==null)e:for(;;){if(m===null)return;var L=m.tag;if(L===3||L===4){var X=m.stateNode.containerInfo;if(X===x)break;if(L===4)for(L=m.return;L!==null;){var oe=L.tag;if((oe===3||oe===4)&&L.stateNode.containerInfo===x)return;L=L.return}for(;X!==null;){if(L=$(X),L===null)return;if(oe=L.tag,oe===5||oe===6||oe===26||oe===27){m=E=L;continue e}X=X.parentNode}}m=m.return}Bd(function(){var Te=E,Ve=Cf(f),Ke=[];e:{var Re=Cr.get(i);if(Re!==void 0){var Oe=iu,Lt=i;switch(i){case"keypress":if(nl(f)===0)break e;case"keydown":case"keyup":Oe=Xd;break;case"focusin":Lt="focus",Oe=If;break;case"focusout":Lt="blur",Oe=If;break;case"beforeblur":case"afterblur":Oe=If;break;case"click":if(f.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Oe=_g;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Oe=xg;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Oe=wr;break;case za:case tp:case ar:Oe=Mg;break;case jf:Oe=S_;break;case"scroll":case"scrollend":Oe=Of;break;case"wheel":Oe=ho;break;case"copy":case"cut":case"paste":Oe=Hd;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Oe=Bf;break;case"toggle":case"beforetoggle":Oe=qd}var Wt=(r&4)!==0,ri=!Wt&&(i==="scroll"||i==="scrollend"),_e=Wt?Re!==null?Re+"Capture":null:Re;Wt=[];for(var de=Te,Ee;de!==null;){var Ye=de;
vendor: 1,349 bytes, line 48
48if(Ee=Ye.stateNode,Ye=Ye.tag,Ye!==5&&Ye!==26&&Ye!==27||Ee===null||_e===null||(Ye=tl(de,_e),Ye!=null&&Wt.push(Qp(de,Ye,Ee))),ri)break;de=de.return}0<Wt.length&&(Re=new Oe(Re,Lt,null,f,Ve),Ke.push({event:Re,listeners:Wt}))}}if((r&7)===0){e:{if(Re=i==="mouseover"||i==="pointerover",Oe=i==="mouseout"||i==="pointerout",Re&&f!==eu&&(Lt=f.relatedTarget||f.fromElement)&&($(Lt)||Lt[q]))break e;if((Oe||Re)&&(Re=Ve.window===Ve?Ve:(Re=Ve.ownerDocument)?Re.defaultView||Re.parentWindow:window,Oe?(Lt=f.relatedTarget||f.toElement,Oe=Te,Lt=Lt?$(Lt):null,Lt!==null&&(ri=o(Lt),Wt=Lt.tag,Lt!==ri||Wt!==5&&Wt!==27&&Wt!==6)&&(Lt=null)):(Oe=null,Lt=Te),Oe!==Lt)){if(Wt=_g,Ye="onMouseLeave",_e="onMouseEnter",de="mouse",(i==="pointerout"||i==="pointerover")&&(Wt=Bf,Ye="onPointerLeave",_e="onPointerEnter",de="pointer"),ri=Oe==null?Re:ae(Oe),Ee=Lt==null?Re:ae(Lt),Re=new Wt(Ye,de+"leave",Oe,f,Ve),Re.target=ri,Re.relatedTarget=Ee,Ye=null,$(Ve)===Te&&(Wt=new Wt(_e,de+"enter",Lt,f,Ve),Wt.target=Ee,Wt.relatedTarget=ri,Ye=Wt),ri=Ye,Oe&&Lt)t:{for(Wt=Ww,_e=Oe,de=Lt,Ee=0,Ye=_e;Ye;Ye=Wt(Ye))Ee++;Ye=0;for(var Gt=de;Gt;Gt=Wt(Gt))Ye++;for(;0<Ee-Ye;)_e=Wt(_e),Ee--;for(;0<Ye-Ee;)de=Wt(de),Ye--;for(;Ee--;){if(_e===de||de!==null&&_e===de.alternate){Wt=_e;break t}_e=Wt(_e),de=Wt(de)}Wt=null}else Wt=null;Oe!==null&&w1(Ke,Re,Oe,Wt,!1),Lt!==null&&ri!==null&&w1(Ke,ri,Lt,Wt,!0)}}
vendor: 5,250 bytes, lines 48-49
48e:{if(Re=Te?ae(Te):window,Oe=Re.nodeName&&Re.nodeName.toLowerCase(),Oe==="select"||Oe==="input"&&Re.type==="file")var Wn=Qd;else if(Zd(Re))if(cu)Wn=Og;else{Wn=go;var It=uu}else Oe=Re.nodeName,!Oe||Oe.toLowerCase()!=="input"||Re.type!=="checkbox"&&Re.type!=="radio"?Te&&Jc(Te.elementType)&&(Wn=Qd):Wn=Lg;if(Wn&&(Wn=Wn(i,Te))){Ff(Ke,Wn,f,Ve);break e}It&&It(i,Re,Te),i==="focusout"&&Te&&Re.type==="number"&&Te.memoizedProps.value!=null&&Rn(Re,"number",Re.value)}switch(It=Te?ae(Te):window,i){case"focusin":(Zd(It)||It.contentEditable==="true")&&(Ql=It,kf=Te,Jl=null);break;case"focusout":Jl=kf=Ql=null;break;case"mousedown":is=!0;break;case"contextmenu":case"mouseup":case"dragend":is=!1,Xf(Ke,f,Ve);break;case"selectionchange":if(zg)break;case"keydown":case"keyup":Xf(Ke,f,Ve)}var pn;if(il)e:{switch(i){case"compositionstart":var Dn="onCompositionStart";break e;case"compositionend":Dn="onCompositionEnd";break e;case"compositionupdate":Dn="onCompositionUpdate";break e}Dn=void 0}else mo?Pf(i,f)&&(Dn="onCompositionEnd"):i==="keydown"&&f.keyCode===229&&(Dn="onCompositionStart");Dn&&($i&&f.locale!=="ko"&&(mo||Dn!=="onCompositionStart"?Dn==="onCompositionEnd"&&mo&&(pn=Lf()):(co=Ve,Uf="value"in co?co.value:co.textContent,mo=!0)),It=Sv(Te,Dn),0<It.length&&(Dn=new Fd(Dn,i,null,f,Ve),Ke.push({event:Dn,listeners:It}),pn?Dn.data=pn:(pn=jl(f),pn!==null&&(Dn.data=pn)))),(pn=al?Hf(i,f):Ng(i,f))&&(Dn=Sv(Te,"onBeforeInput"),0<Dn.length&&(It=new Fd("onBeforeInput","beforeinput",null,f,Ve),Ke.push({event:It,listeners:Dn}),It.data=pn)),Xw(Ke,i,Te,f,Ve)}T1(Ke,r)})}function Qp(i,r,f){return{instance:i,listener:r,currentTarget:f}}function Sv(i,r){for(var f=r+"Capture",m=[];i!==null;){var x=i,E=x.stateNode;if(x=x.tag,x!==5&&x!==26&&x!==27||E===null||(x=tl(i,f),x!=null&&m.unshift(Qp(i,x,E)),x=tl(i,r),x!=null&&m.push(Qp(i,x,E))),i.tag===3)return m;i=i.return}return[]}function Ww(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function w1(i,r,f,m,x){for(var E=r._reactName,L=[];f!==null&&f!==m;){var X=f,oe=X.alternate,Te=X.stateNode;if(X=X.tag,oe!==null&&oe===m)break;X!==5&&X!==26&&X!==27||Te===null||(oe=Te,x?(Te=tl(f,E),Te!=null&&L.unshift(Qp(f,Te,oe))):x||(Te=tl(f,E),Te!=null&&L.push(Qp(f,Te,oe)))),f=f.return}L.length!==0&&i.push({event:r,listeners:L})}var Zw=/\r\n?/g,Kw=/\u0000|\uFFFD/g;function R1(i){return(typeof i=="string"?i:""+i).replace(Zw,`
49`).replace(Kw,"")}function C1(i,r){return r=R1(r),R1(i)===r}function si(i,r,f,m,x,E){switch(f){case"children":typeof m=="string"?r==="body"||r==="textarea"&&m===""||$o(i,m):(typeof m=="number"||typeof m=="bigint")&&r!=="body"&&$o(i,""+m);break;case"className":an(i,"class",m);break;case"tabIndex":an(i,"tabindex",m);break;case"dir":case"role":case"viewBox":case"width":case"height":an(i,f,m);break;case"style":zd(i,m,E);break;case"data":if(r!=="object"){an(i,"data",m);break}case"src":case"href":if(m===""&&(r!=="a"||f!=="href")){i.removeAttribute(f);break}if(m==null||typeof m=="function"||typeof m=="symbol"||typeof m=="boolean"){i.removeAttribute(f);break}m=$c(""+m),i.setAttribute(f,m);break;case"action":case"formAction":if(typeof m=="function"){i.setAttribute(f,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof E=="function"&&(f==="formAction"?(r!=="input"&&si(i,r,"name",x.name,x,null),si(i,r,"formEncType",x.formEncType,x,null),si(i,r,"formMethod",x.formMethod,x,null),si(i,r,"formTarget",x.formTarget,x,null)):(si(i,r,"encType",x.encType,x,null),si(i,r,"method",x.method,x,null),si(i,r,"target",x.target,x,null)));if(m==null||typeof m=="symbol"||typeof m=="boolean"){i.removeAttribute(f);break}m=$c(""+m),i.setAttribute(f,m);break;case"onClick":m!=null&&(i.onclick=nr);break;case"onScroll":m!=null&&Tn("scroll",i);break;case"onScrollEnd":m!=null&&Tn("scrollend",i);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(n(61));if(f=m.__html,f!=null){if(x.children!=null)throw Error(n(60));i.innerHTML=f}}break;case"multiple":i.multiple=m&&typeof m!="function"&&typeof m!="symbol";break;case"muted":i.muted=m&&typeof m!="function"&&typeof m!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(m==null||typeof m=="function"||typeof m=="boolean"||typeof m=="symbol"){i.removeAttribute("xlink:href");break}f=$c(""+m),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",f);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":m!=null&&typeof m!="function"&&typeof m!="symbol"?i.setAttribute(f,""+m):i.removeAttribute(f);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInl
49ine":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":m&&typeof m!="function"&&typeof m!="symbol"?i.setAttribute(f,""):i.removeAttribute(f);break;case"capture":case"download":m===!0?i.setAttribute(f,""):m!==!1&&m!=null&&typeof m!="function"&&typeof m!="symbol"?i.setAttribute(f,m):i.removeAttribute(f);break;case"cols":case"rows":case"size":case"span":m!=null&&typeof m!="function"&&typeof m!="symbol"&&!isNaN(m)&&1<=m?i.setAttribute(f,m):i.removeAttribute(f);break;case"rowSpan":case"start":m==null||typeof m=="function"||typeof m=="symbol"||isNaN(m)?i.removeAttribute(f):i.setAttribute(f,m);break;case"popover":Tn("beforetoggle",i),Tn("toggle",i),Ft(i,"popover",m);break;case"xlinkActuate":Nt(i,"http://www.w3.org/1999/xlink","xlink:actuate",m);break;case"xlinkArcrole":Nt(i,"http://www.w3.org/1999/xlink","xlink:arcrole",m);break;case"xlinkRole":Nt(i,"http://www.w3.org/1999/xlink","xlink:role",m);break;case"xlinkShow":Nt(i,"http://www.w3.org/1999/xlink","xlink:show",m);break;case"xlinkTitle":Nt(i,"http://www.w3.org/1999/xlink","xlink:title",m);break;case"xlinkType":Nt(i,"http://www.w3.org/1999/xlink","xlink:type",m);break;case"xmlBase":Nt(i,"http://www.w3.org/XML/1998/namespace","xml:base",m);break;case"xmlLang":Nt(i,"http://www.w3.org/XML/1998/namespace","xml:lang",m);break;case"xmlSpace":Nt(i,"http://www.w3.org/XML/1998/namespace","xml:space",m);break;case"is":Ft(i,"is",m);break;case"innerText":case"textContent":break;default:(!(2<f.length)||f[0]!=="o"&&f[0]!=="O"||f[1]!=="n"&&f[1]!=="N")&&(f=vg.get(f)||f,Ft(i,f,m))}}function P_(i,r,f,m,x,E){switch(f){case"style":zd(i,m,E);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(n(61));if(f=m.__html,f!=null){if(x.children!=null)throw Error(n(60));i.innerHTML=f}}break;case"children":typeof m=="string"?$o(i,m):(typeof m=="number"||typeof m=="bigint")&&$o(i,""+m);break;case"onScroll":m!=null&&Tn("scroll",i);break;case"onScrollEnd":m!=null&&Tn("scrollend",i);break;case"onClick":m!=null&&(i.onclick=nr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ge.hasOwnProperty(f))e:{if(f[0]==="o"&&f[1]==="n"&&(x=f.endsWith("Capture"),r=f.slice(2,x?f.length-7:void 0),E=i[I]||null,E=E!=null?E[f]:null,typeof E=="function"&&i.removeEventListener(r,E,x),typeof m=="function")){typeof E!="function"&&E!==null&&(f in i?i[f]=null:i.hasAttribute(f)&&i.removeAttribute(f)),i.addEventListener(r,m,x);break e}f in i?i[f]=m:m===!0?i.setAttribute(f,""):Ft(i,f,m)}}}function Ua(i,r,f){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Tn("error",i),Tn("load",i);var m=!1,x=!1,E;for(E in f)if(f.hasOwnProperty(E)){var L=f[E];if(L!=null)switch(E){case"src":m=!0;break;case"srcSet":x=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(n(137,r));default:si(i,r,E,L,f,null)}}x&&si(i,r,"srcSet",f.srcSet,f,null),m&&si(i,r,"src",f.src,f,null);return;case"input":Tn("invalid",i);var X=E=L=x=null,oe=null,Te=null;for(m in f)if(f.hasOwnProperty(m)){var Ve=f[m];if(Ve!=null)switch(m){case"name":x=Ve;break;case"type":L=Ve;break;case"checked":oe=Ve;break;case"defaultChecked":Te=Ve;break;case"value":E=Ve;break;case"defaultValue":X=Ve;break;case"children":case"dangerouslySetInnerHTML":if(Ve!=null)throw Error(n(137,r));break;default:si(i,r,m,Ve,f,null)}}fi(i,E,X,oe,Te,L,x,!1);return;case"select":Tn("invalid",i),m=L=E=null;for(x in f)if(f.hasOwnProperty(x)&&(X=f[x],X!=null))switch(x){case"value":E=X;break;case"defaultValue":L=X;break;case"multiple":m=X;default:si(i,r,x,X,f,null)}r=E,f=L,i.multiple=!!m,r!=null?Xn(i,!!m,r,!1):f!=null&&Xn(i,!!m,f,!0);return;case"textarea":Tn("invalid",i),E=x=m=null;for(L in f)if(f.hasOwnProperty(L)&&(X=f[L],X!=null))switch(L){case"value":m=X;break;case"defaultValue":x=X;break;case"children":E=X;break;case"dangerouslySetInnerHTML":if(X!=null)throw Error(n(91));break;default:si(i,r,L,X,f,null)}Ea(i,m,x,E);return;case"option":for(oe in f)if(f.hasOwnProperty(oe)&&(m=f[oe],m!=null))switch(oe){case"selected":i.selected=m&&typeof m!="function"&&typeof m!="symbol";break;default:si(i,r,oe,m,f,null)}return;case"dialog":Tn("beforetoggle",i),Tn("toggle",i),Tn("cancel",i),Tn("close",i);break;case"iframe":case"object":Tn("load",i);break;case"video":case"audio":for(m=0;m<Kp.length;m++)Tn(Kp[m],i);break;case"image":Tn("error",i),Tn("load",i);break;case"details":Tn("toggle",i);break;case"embed":case"source":case"link":Tn("error",i),Tn("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Te in f)if(f.hasOwnProperty(Te)&&(m=f[Te],m!=null))switch(Te){case"children":case"dangerouslySetInnerHTML":throw Error(n(137,r));default:si(i,r,Te,m,f,null)}return;default:if(Jc(r)){for(Ve in f)f.hasOwnProperty(Ve)&&(m=f[Ve],m!==void 0&&P_(i,r,Ve,m,f,void 0));return}}for(X in f)f.hasOwnProperty(X)&&(m=f[X],m!=null&&si(i,r,X,m,f,null))}function Qw(i,r,f,m){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var x=null,E=null,L=null,X=null,oe=null,Te=null,Ve=null;for(Oe in f){var Ke=f[Oe];if(f.hasOwnProperty(Oe)&&Ke!=null)switch(Oe){case"checked":break;case"value":break;case"defaultValue":oe=Ke;default:m.hasOwnProperty(Oe)||si(i,r,Oe,null,m,Ke)}}for(var Re in m){var Oe=m[Re];if(Ke=f[Re],m.hasOwnProperty(Re)&&(Oe!=null||Ke!=null))switch(Re){case"type":E=Oe;break;case"name":x=Oe;break;case"checked":Te=Oe;break;case"defaultChecked":Ve=Oe;break;case"value":L=Oe;break;case"defaultValue":X=Oe;break;case"children":case"dangerouslySetInnerHTML":if(Oe!=null)throw Error(n(137,r));break;default:Oe!==Ke&&si(i,r,Re,Oe,m,Ke)}}kn(i,L,X,oe,Te,Ve,E,x);return;case"select":Oe=L=X=Re=null;for(E in f)if(oe=f[E],f.hasOwnProperty(E)&&oe!=null)switch(E){case"value":break;case"multiple":Oe=oe;default:m.hasOwnProperty(E)||si(i,r,E,null,m,oe)}for(x in m)if(E=m[x],oe=f[x],m.hasOwnProperty(x)&&(E!=null||oe!=null))switch(x){case"value":Re=E;break;case"defaultValue":X=E;break;case"multiple":L=E;default:E!==oe&&si(i,r,x,E,m,oe)}r=X,f=L,m=Oe,Re!=null?Xn(i,!!f,Re,!1):!!m!=!!f&&(r!=null?Xn(i,!!f,r,!0):Xn(i,!!f,f?[]:"",!1));return;case"textarea":Oe=Re=null;for(X in f)if(x=f[X],f.hasOwnProperty(X)&&x!=null&&!m.hasOwnProperty(X))switch(X){case"value":break;case"children":break;default:si(i,r,X,null,m,x)}for(L in m)if(x=m[L],E=f[L],m.hasOwnProperty(L)&&(x!=null||E!=null))switch(L){case"value":Re=x;break;case"defaultValue":Oe=x;break;case"children":break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(n(91));break;default:x!==E&&si(i,r,L,x,m,E)}Jo(i,Re,Oe);return;case"option":for(var Lt in f)if(Re=f[Lt],f.hasOwnProperty(Lt)&&Re!=null&&!m.hasOwnProperty(Lt))switch(Lt){case"selected":i.selected=!1;break;default:si(i,r,Lt,null,m,Re)}for(oe in m)if(Re=m[oe],Oe=f[oe],m.hasOwnProperty(oe)&&Re!==Oe&&(Re!=null||Oe!=null))switch(oe){case"selected":i.selected=Re&&typeof Re!="function"&&typeof Re!="symbol";break;default:si(i,r,oe,Re,m,Oe)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Wt in f)Re=f[Wt],f.hasOwnProperty(Wt)&&Re!=null&&!m.hasOwnProperty(Wt)&&si(i,r,Wt,null,m,Re);for(Te in m)if(Re=m[Te],Oe=f[Te],m.hasOwnProperty(Te)&&Re!==Oe&&(Re!=null||Oe!=null))switch(Te){case"children":case"dangerouslySetInnerHTML":if(Re!=null)throw Error(n(137,r));break;default:si(i,r,Te,Re,m,Oe)}return;default:if(Jc(r)){for(var ri in f)Re=f[ri],f.hasOwnProperty(ri)&&Re!==void 0&&!m.hasOwnProperty(ri)&&P_(i,r,ri,void 0,m,Re);for(Ve in m)Re=m[Ve],Oe=f[Ve],!m.hasOwnProperty(Ve)||Re===Oe||Re===void 0&&Oe===void 0||P_(i,r,Ve,Re,m,Oe);return}}for(var _e in f)Re=f[_e],f.hasOwnProperty(_e)&&Re!=null&&!m.hasOwnProperty(_e)&&si(i,r,_e,null,m,Re);for(Ke in m)Re=m[Ke],Oe=f[Ke],!m.hasOwnProperty(Ke)||Re===Oe||Re==null&&Oe==null||si(i,r,Ke,Re,m,Oe)}function N1(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Jw(){if(typeof performance.getEntriesByType=="function"){for(var i=0,r=0,f=performance.getEntriesByType("resource"),m=0;m<f.length;m++){var x=f[m],E=x.transferSize,L=x.initiatorType,X=x.duration;if(E&&X&&N1(L)){for(L=0,X=x.responseEnd,m+=1;m<f.length;m++){var oe=f[m],Te=oe.startTime;if(Te>X)break;var Ve=oe.transferSize,Ke=oe.initiatorType;Ve&&N1(Ke)&&(oe=oe.responseEnd,L+=Ve*(oe<X?1:(X-Te)/(oe-Te)))}if(--m,r+=8*(E+L)/(x.duration/1e3),i++,10<i)break}}if(0<i)return r/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}var H_=null,F_=null;function bv(i){return i.nodeType===9?i:i.ownerDocument}function D1(i){switch(i){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function U1(i,r){if(i===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&r==="foreignObject"?0:i}function V_(i,r){return i==="textarea"||i==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var G_=null;function $w(){var i=window.event;return i&&i.type==="popstate"?i===G_?!1:(G_=i,!0):(G_=null,!1)}var L1=typeof setTimeout=="function"?setTimeout:void 0,eR=typeof clearTimeout=="function"?clearTimeout:void 0,O1=typeof Promise=="function"?Promise:void 0,tR=typeof queueMicrotask=="function"?queueMicrotask:typeof O1<"u"?function(i){return O1.resolve(null).then(i).catch(nR)}:L1;function nR(i){setTimeout(function(){throw i})}function bc(i){return i==="head"}function z1(i,r){var f=r,m=0;do{var x=f.nextSibling;if(i.removeChild(f),x&&x.nodeType===8)if(f=x.data,f==="/$"||f==="/&"){if(m===0){i.removeChild(x),Lh(r);return}m--}else if(f==="$"||f==="$?"||f==="$~"||f==="$!"||f==="&")m++;else if(f==="html")Jp(i.ownerDocument.documentElement);else if(f==="head"){f=i.ownerDocument.head,Jp(f);for(var E=f.firstChild;E;){var L=E.nextSibling,X=E.nodeName;E[at]||X==="SCRIPT"||X==="STYLE"||X==="LINK"&&E.rel.toLowerCase()==="stylesheet"||f.removeChild(E),E=L}}else f==="body"&&Jp(i.ownerDocument.body);f=x}while(f);Lh(r)}function I1(i,r){var f=i;i=0;do{var m=f.nextSibling;if(f.nodeType===1?r?(f._stashedDisplay=f.style.display,f.style.display="none"):(f.style.display=f._stashedDisplay||"",f.getAttribute("style")===""&&f.removeAttribute("style")):f.nodeType===3&&(r?(f._stashedText=f.nodeValue,f.nodeValue=""):f.nodeValue=f._stashedText||""),m&&m.nodeType===8)if(f=m.data,f==="/$"){if(i===0)break;i--}else f!=="$"&&f!=="$?"&&f!=="$~"&&f!=="$!"||i++;f=m}while(f)}function k_(i){var r=i.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var f=r;switch(r=r.nextSibling,f.nodeName){case"HTML":case"HEAD":case"BODY":k_(f),B(f);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(f.rel.toLowerCase()==="stylesheet")continue}i.removeChild(f)}}function iR(i,r,f,m){for(;i.nodeType===1;){var x=f;if(i.nodeName.toLowerCase()!==r.toLowerCase()){if(!m&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(m){if(!i[at])switch(r){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(E=i.getAttribute("rel"),E==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(E!==x.rel||i.getAttribute("href")!==(x.href==null||x.href===""?null:x.href)||i.getAttribute("crossorigin")!==(x.crossOrigin==null?null:x.crossOrigin)||i.getAttribute("title")!==(x.title==null?null:x.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(E=i.getAttribute("src"),(E!==(x.src==null?null:x.src)||i.getAttribute("type")!==(x.type==null?null:x.type)||i.getAttribute("crossorigin")!==(x.crossOrigin==null?null:x.crossOrigin))&&E&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(r==="input"&&i.type==="hidden"){var E=x.name==null?null:""+x.name;if(x.type==="hidden"&&i.getAttribute("name")===E)return i}else return i;if(i=_r(i.nextSibling),i===null)break}return null}function aR(i,r,f){if(r==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!f||(i=_r(i.nextSibling),i===null))return null;return i}function B1(i,r){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!r||(i=_r(i.nextSibling),i===null))return null;return i}function X_(i){return i.data==="$?"||i.data==="$~"}function j_(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function sR(i,r){var f=i.ownerDocument;if(i.data==="$~")i._reactRetry=r;else if(i.data!=="$?"||f.readyState!=="loading")r();else{var m=function(){r(),f.removeEventListener("DOMContentLoaded",m)};f.addEventListener("DOMContentLoaded",m),i._reactRetry=m}}function _r(i){for(;i!=null;i=i.nextSibling){var r=i.nodeType;if(r===1||r===3)break;if(r===8){if(r=i.data,r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"||r==="F!"||r==="F")break;
vendor: 9,499 bytes, line 49
49if(r==="/$"||r==="/&")return null}}return i}var q_=null;function P1(i){i=i.nextSibling;for(var r=0;i;){if(i.nodeType===8){var f=i.data;if(f==="/$"||f==="/&"){if(r===0)return _r(i.nextSibling);r--}else f!=="$"&&f!=="$!"&&f!=="$?"&&f!=="$~"&&f!=="&"||r++}i=i.nextSibling}return null}function H1(i){i=i.previousSibling;for(var r=0;i;){if(i.nodeType===8){var f=i.data;if(f==="$"||f==="$!"||f==="$?"||f==="$~"||f==="&"){if(r===0)return i;r--}else f!=="/$"&&f!=="/&"||r++}i=i.previousSibling}return null}function F1(i,r,f){switch(r=bv(f),i){case"html":if(i=r.documentElement,!i)throw Error(n(452));return i;case"head":if(i=r.head,!i)throw Error(n(453));return i;case"body":if(i=r.body,!i)throw Error(n(454));return i;default:throw Error(n(451))}}function Jp(i){for(var r=i.attributes;r.length;)i.removeAttributeNode(r[0]);B(i)}var xr=new Map,V1=new Set;function Mv(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var wl=Q.d;Q.d={f:rR,r:oR,D:lR,C:cR,L:uR,m:fR,X:dR,S:hR,M:pR};function rR(){var i=wl.f(),r=j();return i||r}function oR(i){var r=ne(i);r!==null&&r.tag===5&&r.type==="form"?Vp(r):wl.r(i)}var Nh=typeof document>"u"?null:document;function G1(i,r,f){var m=Nh;if(m&&typeof r=="string"&&r){var x=wt(r);x='link[rel="'+i+'"][href="'+x+'"]',typeof f=="string"&&(x+='[crossorigin="'+f+'"]'),V1.has(x)||(V1.add(x),i={rel:i,crossOrigin:f,href:r},m.querySelector(x)===null&&(r=m.createElement("link"),Ua(r,"link",i),Be(r),m.head.appendChild(r)))}}function lR(i){wl.D(i),G1("dns-prefetch",i,null)}function cR(i,r){wl.C(i,r),G1("preconnect",i,r)}function uR(i,r,f){wl.L(i,r,f);var m=Nh;if(m&&i&&r){var x='link[rel="preload"][as="'+wt(r)+'"]';r==="image"&&f&&f.imageSrcSet?(x+='[imagesrcset="'+wt(f.imageSrcSet)+'"]',typeof f.imageSizes=="string"&&(x+='[imagesizes="'+wt(f.imageSizes)+'"]')):x+='[href="'+wt(i)+'"]';var E=x;switch(r){case"style":E=Dh(i);break;case"script":E=Uh(i)}xr.has(E)||(i=y({rel:"preload",href:r==="image"&&f&&f.imageSrcSet?void 0:i,as:r},f),xr.set(E,i),m.querySelector(x)!==null||r==="style"&&m.querySelector($p(E))||r==="script"&&m.querySelector(em(E))||(r=m.createElement("link"),Ua(r,"link",i),Be(r),m.head.appendChild(r)))}}function fR(i,r){wl.m(i,r);var f=Nh;if(f&&i){var m=r&&typeof r.as=="string"?r.as:"script",x='link[rel="modulepreload"][as="'+wt(m)+'"][href="'+wt(i)+'"]',E=x;switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":E=Uh(i)}if(!xr.has(E)&&(i=y({rel:"modulepreload",href:i},r),xr.set(E,i),f.querySelector(x)===null)){switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(f.querySelector(em(E)))return}m=f.createElement("link"),Ua(m,"link",i),Be(m),f.head.appendChild(m)}}}function hR(i,r,f){wl.S(i,r,f);var m=Nh;if(m&&i){var x=te(m).hoistableStyles,E=Dh(i);r=r||"default";var L=x.get(E);if(!L){var X={loading:0,preload:null};if(L=m.querySelector($p(E)))X.loading=5;else{i=y({rel:"stylesheet",href:i,"data-precedence":r},f),(f=xr.get(E))&&Y_(i,f);var oe=L=m.createElement("link");Be(oe),Ua(oe,"link",i),oe._p=new Promise(function(Te,Ve){oe.onload=Te,oe.onerror=Ve}),oe.addEventListener("load",function(){X.loading|=1}),oe.addEventListener("error",function(){X.loading|=2}),X.loading|=4,Ev(L,r,m)}L={type:"stylesheet",instance:L,count:1,state:X},x.set(E,L)}}}function dR(i,r){wl.X(i,r);var f=Nh;if(f&&i){var m=te(f).hoistableScripts,x=Uh(i),E=m.get(x);E||(E=f.querySelector(em(x)),E||(i=y({src:i,async:!0},r),(r=xr.get(x))&&W_(i,r),E=f.createElement("script"),Be(E),Ua(E,"link",i),f.head.appendChild(E)),E={type:"script",instance:E,count:1,state:null},m.set(x,E))}}function pR(i,r){wl.M(i,r);var f=Nh;if(f&&i){var m=te(f).hoistableScripts,x=Uh(i),E=m.get(x);E||(E=f.querySelector(em(x)),E||(i=y({src:i,async:!0,type:"module"},r),(r=xr.get(x))&&W_(i,r),E=f.createElement("script"),Be(E),Ua(E,"link",i),f.head.appendChild(E)),E={type:"script",instance:E,count:1,state:null},m.set(x,E))}}function k1(i,r,f,m){var x=(x=ve.current)?Mv(x):null;if(!x)throw Error(n(446));switch(i){case"meta":case"title":return null;case"style":return typeof f.precedence=="string"&&typeof f.href=="string"?(r=Dh(f.href),f=te(x).hoistableStyles,m=f.get(r),m||(m={type:"style",instance:null,count:0,state:null},f.set(r,m)),m):{type:"void",instance:null,count:0,state:null};case"link":if(f.rel==="stylesheet"&&typeof f.href=="string"&&typeof f.precedence=="string"){i=Dh(f.href);var E=te(x).hoistableStyles,L=E.get(i);if(L||(x=x.ownerDocument||x,L={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},E.set(i,L),(E=x.querySelector($p(i)))&&!E._p&&(L.instance=E,L.state.loading=5),xr.has(i)||(f={rel:"preload",as:"style",href:f.href,crossOrigin:f.crossOrigin,integrity:f.integrity,media:f.media,hrefLang:f.hrefLang,referrerPolicy:f.referrerPolicy},xr.set(i,f),E||mR(x,i,f,L.state))),r&&m===null)throw Error(n(528,""));return L}if(r&&m!==null)throw Error(n(529,""));return null;case"script":return r=f.async,f=f.src,typeof f=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=Uh(f),f=te(x).hoistableScripts,m=f.get(r),m||(m={type:"script",instance:null,count:0,state:null},f.set(r,m)),m):{type:"void",instance:null,count:0,state:null};default:throw Error(n(444,i))}}function Dh(i){return'href="'+wt(i)+'"'}function $p(i){return'link[rel="stylesheet"]['+i+"]"}function X1(i){return y({},i,{"data-precedence":i.precedence,precedence:null})}function mR(i,r,f,m){i.querySelector('link[rel="preload"][as="style"]['+r+"]")?m.loading=1:(r=i.createElement("link"),m.preload=r,r.addEventListener("load",function(){return m.loading|=1}),r.addEventListener("error",function(){return m.loading|=2}),Ua(r,"link",f),Be(r),i.head.appendChild(r))}function Uh(i){return'[src="'+wt(i)+'"]'}function em(i){return"script[async]"+i}function j1(i,r,f){if(r.count++,r.instance===null)switch(r.type){case"style":var m=i.querySelector('style[data-href~="'+wt(f.href)+'"]');if(m)return r.instance=m,Be(m),m;var x=y({},f,{"data-href":f.href,"data-precedence":f.precedence,href:null,precedence:null});return m=(i.ownerDocument||i).createElement("style"),Be(m),Ua(m,"style",x),Ev(m,f.precedence,i),r.instance=m;case"stylesheet":x=Dh(f.href);var E=i.querySelector($p(x));if(E)return r.state.loading|=4,r.instance=E,Be(E),E;m=X1(f),(x=xr.get(x))&&Y_(m,x),E=(i.ownerDocument||i).createElement("link"),Be(E);var L=E;return L._p=new Promise(function(X,oe){L.onload=X,L.onerror=oe}),Ua(E,"link",m),r.state.loading|=4,Ev(E,f.precedence,i),r.instance=E;case"script":return E=Uh(f.src),(x=i.querySelector(em(E)))?(r.instance=x,Be(x),x):(m=f,(x=xr.get(E))&&(m=y({},f),W_(m,x)),i=i.ownerDocument||i,x=i.createElement("script"),Be(x),Ua(x,"link",m),i.head.appendChild(x),r.instance=x);case"void":return null;default:throw Error(n(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(m=r.instance,r.state.loading|=4,Ev(m,f.precedence,i));return r.instance}function Ev(i,r,f){for(var m=f.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),x=m.length?m[m.length-1]:null,E=x,L=0;L<m.length;L++){var X=m[L];if(X.dataset.precedence===r)E=X;else if(E!==x)break}E?E.parentNode.insertBefore(i,E.nextSibling):(r=f.nodeType===9?f.head:f,r.insertBefore(i,r.firstChild))}function Y_(i,r){i.crossOrigin==null&&(i.crossOrigin=r.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=r.referrerPolicy),i.title==null&&(i.title=r.title)}function W_(i,r){i.crossOrigin==null&&(i.crossOrigin=r.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=r.referrerPolicy),i.integrity==null&&(i.integrity=r.integrity)}var Tv=null;function q1(i,r,f){if(Tv===null){var m=new Map,x=Tv=new Map;x.set(f,m)}else x=Tv,m=x.get(f),m||(m=new Map,x.set(f,m));if(m.has(i))return m;for(m.set(i,null),f=f.getElementsByTagName(i),x=0;x<f.length;x++){var E=f[x];if(!(E[at]||E[nn]||i==="link"&&E.getAttribute("rel")==="stylesheet")&&E.namespaceURI!=="http://www.w3.org/2000/svg"){var L=E.getAttribute(r)||"";L=i+L;var X=m.get(L);X?X.push(E):m.set(L,[E])}}return m}function Y1(i,r,f){i=i.ownerDocument||i,i.head.insertBefore(f,r==="title"?i.querySelector("head > title"):null)}function gR(i,r,f){if(f===1||r.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;switch(r.rel){case"stylesheet":return i=r.disabled,typeof r.precedence=="string"&&i==null;default:return!0}case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function W1(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function vR(i,r,f,m){if(f.type==="stylesheet"&&(typeof m.media!="string"||matchMedia(m.media).matches!==!1)&&(f.state.loading&4)===0){if(f.instance===null){var x=Dh(m.href),E=r.querySelector($p(x));if(E){r=E._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(i.count++,i=Av.bind(i),r.then(i,i)),f.state.loading|=4,f.instance=E,Be(E);return}E=r.ownerDocument||r,m=X1(m),(x=xr.get(x))&&Y_(m,x),E=E.createElement("link"),Be(E);var L=E;L._p=new Promise(function(X,oe){L.onload=X,L.onerror=oe}),Ua(E,"link",m),f.instance=E}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(f,r),(r=f.state.preload)&&(f.state.loading&3)===0&&(i.count++,f=Av.bind(i),r.addEventListener("load",f),r.addEventListener("error",f))}}var Z_=0;
vendor: 10,709 bytes, line 49
49function yR(i,r){return i.stylesheets&&i.count===0&&Rv(i,i.stylesheets),0<i.count||0<i.imgCount?function(f){var m=setTimeout(function(){if(i.stylesheets&&Rv(i,i.stylesheets),i.unsuspend){var E=i.unsuspend;i.unsuspend=null,E()}},6e4+r);0<i.imgBytes&&Z_===0&&(Z_=62500*Jw());var x=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&Rv(i,i.stylesheets),i.unsuspend)){var E=i.unsuspend;i.unsuspend=null,E()}},(i.imgBytes>Z_?50:800)+r);return i.unsuspend=f,function(){i.unsuspend=null,clearTimeout(m),clearTimeout(x)}}:null}function Av(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Rv(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var wv=null;function Rv(i,r){i.stylesheets=null,i.unsuspend!==null&&(i.count++,wv=new Map,r.forEach(_R,i),wv=null,Av.call(i))}function _R(i,r){if(!(r.state.loading&4)){var f=wv.get(i);if(f)var m=f.get(null);else{f=new Map,wv.set(i,f);for(var x=i.querySelectorAll("link[data-precedence],style[data-precedence]"),E=0;E<x.length;E++){var L=x[E];(L.nodeName==="LINK"||L.getAttribute("media")!=="not all")&&(f.set(L.dataset.precedence,L),m=L)}m&&f.set(null,m)}x=r.instance,L=x.getAttribute("data-precedence"),E=f.get(L)||m,E===m&&f.set(null,x),f.set(L,x),this.count++,m=Av.bind(this),x.addEventListener("load",m),x.addEventListener("error",m),E?E.parentNode.insertBefore(x,E.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(x,i.firstChild)),r.state.loading|=4}}var tm={$$typeof:D,Provider:null,Consumer:null,_currentValue:ee,_currentValue2:ee,_threadCount:0};function xR(i,r,f,m,x,E,L,X,oe){this.tag=1,this.containerInfo=i,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=hn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=hn(0),this.hiddenUpdates=hn(null),this.identifierPrefix=m,this.onUncaughtError=x,this.onCaughtError=E,this.onRecoverableError=L,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=oe,this.incompleteTransitions=new Map}function Z1(i,r,f,m,x,E,L,X,oe,Te,Ve,Ke){return i=new xR(i,r,f,L,oe,Te,Ve,Ke,X),r=1,E===!0&&(r|=24),E=Aa(3,null,null,r),i.current=E,E.stateNode=i,r=cp(),r.refCount++,i.pooledCache=r,r.refCount++,E.memoizedState={element:m,isDehydrated:f,cache:r},mp(E),i}function K1(i){return i?(i=Mo,i):Mo}function Q1(i,r,f,m,x,E){x=K1(x),m.context===null?m.context=x:m.pendingContext=x,m=ur(r),m.payload={element:f},E=E===void 0?null:E,E!==null&&(m.callback=E),f=Br(i,m,r),f!==null&&(u(f,i,r),Do(f,i,r))}function J1(i,r){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var f=i.retryLane;i.retryLane=f!==0&&f<r?f:r}}function K_(i,r){J1(i,r),(i=i.alternate)&&J1(i,r)}function $1(i){if(i.tag===13||i.tag===31){var r=bo(i,67108864);r!==null&&u(r,i,67108864),K_(i,67108864)}}function eM(i){if(i.tag===13||i.tag===31){var r=Da();r=Ma(r);var f=bo(i,r);f!==null&&u(f,i,r),K_(i,r)}}var Cv=!0;function SR(i,r,f,m){var x=P.T;P.T=null;var E=Q.p;try{Q.p=2,Q_(i,r,f,m)}finally{Q.p=E,P.T=x}}function bR(i,r,f,m){var x=P.T;P.T=null;var E=Q.p;try{Q.p=8,Q_(i,r,f,m)}finally{Q.p=E,P.T=x}}function Q_(i,r,f,m){if(Cv){var x=J_(m);if(x===null)B_(i,r,m,Nv,f),nM(i,m);else if(ER(x,i,r,f,m))m.stopPropagation();else if(nM(i,m),r&4&&-1<MR.indexOf(i)){for(;x!==null;){var E=ne(x);if(E!==null)switch(E.tag){case 3:if(E=E.stateNode,E.current.memoizedState.isDehydrated){var L=tt(E.pendingLanes);if(L!==0){var X=E;for(X.pendingLanes|=2,X.entangledLanes|=2;L;){var oe=1<<31-vt(L);X.entanglements[1]|=oe,L&=~oe}Fo(E),(Cn&6)===0&&(vs=k()+500,Zp(0))}}break;case 31:case 13:X=bo(E,2),X!==null&&u(X,E,2),j(),K_(E,2)}if(E=J_(m),E===null&&B_(i,r,m,Nv,f),E===x)break;x=E}x!==null&&m.stopPropagation()}else B_(i,r,m,null,f)}}function J_(i){return i=Cf(i),$_(i)}var Nv=null;function $_(i){if(Nv=null,i=$(i),i!==null){var r=o(i);if(r===null)i=null;else{var f=r.tag;if(f===13){if(i=c(r),i!==null)return i;i=null}else if(f===31){if(i=h(r),i!==null)return i;i=null}else if(f===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;i=null}else r!==i&&(i=null)}}return Nv=i,null}function tM(i){switch(i){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(be()){case ze:return 2;case $e:return 8;case Pe:case At:return 32;case ft:return 268435456;default:return 32}default:return 32}}var ex=!1,Mc=null,Ec=null,Tc=null,nm=new Map,im=new Map,Ac=[],MR="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".split(" ");function nM(i,r){switch(i){case"focusin":case"focusout":Mc=null;break;case"dragenter":case"dragleave":Ec=null;break;case"mouseover":case"mouseout":Tc=null;break;case"pointerover":case"pointerout":nm.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":im.delete(r.pointerId)}}function am(i,r,f,m,x,E){return i===null||i.nativeEvent!==E?(i={blockedOn:r,domEventName:f,eventSystemFlags:m,nativeEvent:E,targetContainers:[x]},r!==null&&(r=ne(r),r!==null&&$1(r)),i):(i.eventSystemFlags|=m,r=i.targetContainers,x!==null&&r.indexOf(x)===-1&&r.push(x),i)}function ER(i,r,f,m,x){switch(r){case"focusin":return Mc=am(Mc,i,r,f,m,x),!0;case"dragenter":return Ec=am(Ec,i,r,f,m,x),!0;case"mouseover":return Tc=am(Tc,i,r,f,m,x),!0;case"pointerover":var E=x.pointerId;return nm.set(E,am(nm.get(E)||null,i,r,f,m,x)),!0;case"gotpointercapture":return E=x.pointerId,im.set(E,am(im.get(E)||null,i,r,f,m,x)),!0}return!1}function iM(i){var r=$(i.target);if(r!==null){var f=o(r);if(f!==null){if(r=f.tag,r===13){if(r=c(f),r!==null){i.blockedOn=r,Yt(i.priority,function(){eM(f)});return}}else if(r===31){if(r=h(f),r!==null){i.blockedOn=r,Yt(i.priority,function(){eM(f)});return}}else if(r===3&&f.stateNode.current.memoizedState.isDehydrated){i.blockedOn=f.tag===3?f.stateNode.containerInfo:null;return}}}i.blockedOn=null}function Dv(i){if(i.blockedOn!==null)return!1;for(var r=i.targetContainers;0<r.length;){var f=J_(i.nativeEvent);if(f===null){f=i.nativeEvent;var m=new f.constructor(f.type,f);eu=m,f.target.dispatchEvent(m),eu=null}else return r=ne(f),r!==null&&$1(r),i.blockedOn=f,!1;r.shift()}return!0}function aM(i,r,f){Dv(i)&&f.delete(r)}function TR(){ex=!1,Mc!==null&&Dv(Mc)&&(Mc=null),Ec!==null&&Dv(Ec)&&(Ec=null),Tc!==null&&Dv(Tc)&&(Tc=null),nm.forEach(aM),im.forEach(aM)}function Uv(i,r){i.blockedOn===r&&(i.blockedOn=null,ex||(ex=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,TR)))}var Lv=null;function sM(i){Lv!==i&&(Lv=i,s.unstable_scheduleCallback(s.unstable_NormalPriority,function(){Lv===i&&(Lv=null);for(var r=0;r<i.length;r+=3){var f=i[r],m=i[r+1],x=i[r+2];if(typeof m!="function"){if($_(m||f)===null)continue;break}var E=ne(f);E!==null&&(i.splice(r,3),r-=3,Fp(E,{pending:!0,data:x,method:f.method,action:m},m,x))}}))}function Lh(i){function r(oe){return Uv(oe,i)}Mc!==null&&Uv(Mc,i),Ec!==null&&Uv(Ec,i),Tc!==null&&Uv(Tc,i),nm.forEach(r),im.forEach(r);for(var f=0;f<Ac.length;f++){var m=Ac[f];m.blockedOn===i&&(m.blockedOn=null)}for(;0<Ac.length&&(f=Ac[0],f.blockedOn===null);)iM(f),f.blockedOn===null&&Ac.shift();if(f=(i.ownerDocument||i).$$reactFormReplay,f!=null)for(m=0;m<f.length;m+=3){var x=f[m],E=f[m+1],L=x[I]||null;if(typeof E=="function")L||sM(f);else if(L){var X=null;if(E&&E.hasAttribute("formAction")){if(x=E,L=E[I]||null)X=L.formAction;else if($_(x)!==null)continue}else X=L.action;typeof X=="function"?f[m+1]=X:(f.splice(m,3),m-=3),sM(f)}}}function rM(){function i(E){E.canIntercept&&E.info==="react-transition"&&E.intercept({handler:function(){return new Promise(function(L){return x=L})},focusReset:"manual",scroll:"manual"})}function r(){x!==null&&(x(),x=null),m||setTimeout(f,20)}function f(){if(!m&&!navigation.transition){var E=navigation.currentEntry;E&&E.url!=null&&navigation.navigate(E.url,{state:E.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var m=!1,x=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(f,100),function(){m=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),x!==null&&(x(),x=null)}}}function tx(i){this._internalRoot=i}Ov.prototype.render=tx.prototype.render=function(i){var r=this._internalRoot;if(r===null)throw Error(n(409));var f=r.current,m=Da();Q1(f,m,i,r,null,null)},Ov.prototype.unmount=tx.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var r=i.containerInfo;Q1(i.current,2,null,i,null,null),j(),r[q]=null}};function Ov(i){this._internalRoot=i}Ov.prototype.unstable_scheduleHydration=function(i){if(i){var r=Di();i={blockedOn:null,target:i,priority:r};for(var f=0;f<Ac.length&&r!==0&&r<Ac[f].priority;f++);Ac.splice(f,0,i),f===0&&iM(i)}};var oM=e.version;if(oM!=="19.2.0")throw Error(n(527,oM,"19.2.0"));Q.findDOMNode=function(i){var r=i._reactInternals;if(r===void 0)throw typeof i.render=="function"?Error(n(188)):(i=Object.keys(i).join(","),Error(n(268,i)));return i=p(r),i=i!==null?v(i):null,i=i===null?null:i.stateNode,i};var AR={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:P,reconcilerVersion:"19.2.0"};
49if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var zv=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zv.isDisabled&&zv.supportsFiber)try{Qe=zv.inject(AR),et=zv}catch{}}return rm.createRoot=function(i,r){if(!a(i))throw Error(n(299));var f=!1,m="",x=Xp,E=dv,L=gh;return r!=null&&(r.unstable_strictMode===!0&&(f=!0),r.identifierPrefix!==void 0&&(m=r.identifierPrefix),r.onUncaughtError!==void 0&&(x=r.onUncaughtError),r.onCaughtError!==void 0&&(E=r.onCaughtError),r.onRecoverableError!==void 0&&(L=r.onRecoverableError)),r=Z1(i,1,!1,null,null,f,m,null,x,E,L,rM),i[q]=r.current,I_(i),new tx(r)},rm.hydrateRoot=function(i,r,f){if(!a(i))throw Error(n(299));var m=!1,x="",E=Xp,L=dv,X=gh,oe=null;return f!=null&&(f.unstable_strictMode===!0&&(m=!0),f.identifierPrefix!==void 0&&(x=f.identifierPrefix),f.onUncaughtError!==void 0&&(E=f.onUncaughtError),f.onCaughtError!==void 0&&(L=f.onCaughtError),f.onRecoverableError!==void 0&&(X=f.onRecoverableError),f.formState!==void 0&&(oe=f.formState)),r=Z1(i,1,!0,r,f??null,m,x,oe,E,L,X,rM),r.context=K1(null),f=r.current,m=Da(),m=Ma(m),x=ur(m),x.callback=null,Br(f,x,m),f=m,r.current.lanes=f,Xi(r,f),Fo(r),i[q]=r.current,I_(i),new Ov(r)},rm.version="19.2.0",rm}var vM;function IR(){if(vM)return ax.exports;vM=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(e){console.error(e)}}return s(),ax.exports=zR(),ax.exports}var BR=IR();/**
50 * react-router v7.9.5
51 *
52 * Copyright (c) Remix Software Inc.
53 *
54 * This source code is licensed under the MIT license found in the
55 * LICENSE.md file in the root directory of this source tree.
56 *
57 * @license MIT
58 */var yM="popstate";function PR(s={}){function e(n,a){let{pathname:o,search:c,hash:h}=n.location;return TS("",{pathname:o,search:c,hash:h},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function t(n,a){return typeof a=="string"?a:Pm(a)}return FR(e,t,null,s)}function Ni(s,e){if(s===!1||s===null||typeof s>"u")throw new Error(e)}function Yo(s,e){if(!s){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function HR(){return Math.random().toString(36).substring(2,10)}function _M(s,e){return{usr:s.state,key:s.key,idx:e}}function TS(s,e,t=null,n){return{pathname:typeof s=="string"?s:s.pathname,search:"",hash:"",...typeof e=="string"?wd(e):e,state:t,key:e&&e.key||n||HR()}}function Pm({pathname:s="/",search:e="",hash:t=""}){return e&&e!=="?"&&(s+=e.charAt(0)==="?"?e:"?"+e),t&&t!=="#"&&(s+=t.charAt(0)==="#"?t:"#"+t),s}function wd(s){let e={};if(s){let t=s.indexOf("#");t>=0&&(e.hash=s.substring(t),s=s.substring(0,t));let n=s.indexOf("?");n>=0&&(e.search=s.substring(n),s=s.substring(0,n)),s&&(e.pathname=s)}return e}function FR(s,e,t,n={}){let{window:a=document.defaultView,v5Compat:o=!1}=n,c=a.history,h="POP",d=null,p=v();p==null&&(p=0,c.replaceState({...c.state,idx:p},""));function v(){return(c.state||{idx:null}).idx}function y(){h="POP";let A=v(),M=A==null?null:A-p;p=A,d&&d({action:h,location:R.location,delta:M})}function _(A,M){h="PUSH";let C=TS(R.location,A,M);p=v()+1;let D=_M(C,p),U=R.createHref(C);try{c.pushState(D,"",U)}catch(H){if(H instanceof DOMException&&H.name==="DataCloneError")throw H;a.location.assign(U)}o&&d&&d({action:h,location:R.location,delta:1})}function b(A,M){h="REPLACE";let C=TS(R.location,A,M);p=v();let D=_M(C,p),U=R.createHref(C);c.replaceState(D,"",U),o&&d&&d({action:h,location:R.location,delta:0})}function T(A){return VR(A)}let R={get action(){return h},get location(){return s(a,c)},listen(A){if(d)throw new Error("A history only accepts one active listener");return a.addEventListener(yM,y),d=A,()=>{a.removeEventListener(yM,y),d=null}},createHref(A){return e(a,A)},createURL:T,encodeLocation(A){let M=T(A);return{pathname:M.pathname,search:M.search,hash:M.hash}},push:_,replace:b,go(A){return c.go(A)}};return R}function VR(s,e=!1){let t="http://localhost";
58typeof window<"u"&&(t=window.location.origin!=="null"?window.location.origin:window.location.href),Ni(t,"No window.location.(origin|href) available to create URL");let n=typeof s=="string"?s:Pm(s);return n=n.replace(/ $/,"%20"),!e&&n.startsWith("//")&&(n=t+n),new URL(n,t)}function IT(s,e,t="/"){return GR(s,e,t,!1)}function GR(s,e,t,n){let a=typeof e=="string"?wd(e):e,o=Fl(a.pathname||"/",t);if(o==null)return null;let c=BT(s);kR(c);let h=null;for(let d=0;h==null&&d<c.length;++d){let p=eC(o);h=JR(c[d],p,n)}return h}function BT(s,e=[],t=[],n="",a=!1){let o=(c,h,d=a,p)=>{let v={relativePath:p===void 0?c.path||"":p,caseSensitive:c.caseSensitive===!0,childrenIndex:h,route:c};if(v.relativePath.startsWith("/")){if(!v.relativePath.startsWith(n)&&d)return;Ni(v.relativePath.startsWith(n),`Absolute route path "${v.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),v.relativePath=v.relativePath.slice(n.length)}let y=Pl([n,v.relativePath]),_=t.concat(v);c.children&&c.children.length>0&&(Ni(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),BT(c.children,e,_,y,d)),!(c.path==null&&!c.index)&&e.push({path:y,score:KR(y,c.index),routesMeta:_})};return s.forEach((c,h)=>{if(c.path===""||!c.path?.includes("?"))o(c,h);else for(let d of PT(c.path))o(c,h,!0,d)}),e}function PT(s){let e=s.split("/");if(e.length===0)return[];let[t,...n]=e,a=t.endsWith("?"),o=t.replace(/\?$/,"");if(n.length===0)return a?[o,""]:[o];let c=PT(n.join("/")),h=[];return h.push(...c.map(d=>d===""?o:[o,d].join("/"))),a&&h.push(...c),h.map(d=>s.startsWith("/")&&d===""?"/":d)}function kR(s){s.sort((e,t)=>e.score!==t.score?t.score-e.score:QR(e.routesMeta.map(n=>n.childrenIndex),t.routesMeta.map(n=>n.childrenIndex)))}var XR=/^:[\w-]+$/,jR=3,qR=2,YR=1,WR=10,ZR=-2,xM=s=>s==="*";function KR(s,e){let t=s.split("/"),n=t.length;return t.some(xM)&&(n+=ZR),e&&(n+=qR),t.filter(a=>!xM(a)).reduce((a,o)=>a+(XR.test(o)?jR:o===""?YR:WR),n)}function QR(s,e){return s.length===e.length&&s.slice(0,-1).every((n,a)=>n===e[a])?s[s.length-1]-e[e.length-1]:0}function JR(s,e,t=!1){let{routesMeta:n}=s,a={},o="/",c=[];for(let h=0;h<n.length;++h){let d=n[h],p=h===n.length-1,v=o==="/"?e:e.slice(o.length)||"/",y=F0({path:d.relativePath,caseSensitive:d.caseSensitive,end:p},v),_=d.route;if(!y&&p&&t&&!n[n.length-1].route.index&&(y=F0({path:d.relativePath,caseSensitive:d.caseSensitive,end:!1},v)),!y)return null;
58Object.assign(a,y.params),c.push({params:a,pathname:Pl([o,y.pathname]),pathnameBase:aC(Pl([o,y.pathnameBase])),route:_}),y.pathnameBase!=="/"&&(o=Pl([o,y.pathnameBase]))}return c}function F0(s,e){typeof s=="string"&&(s={path:s,caseSensitive:!1,end:!0});let[t,n]=$R(s.path,s.caseSensitive,s.end),a=e.match(t);if(!a)return null;let o=a[0],c=o.replace(/(.)\/+$/,"$1"),h=a.slice(1);return{params:n.reduce((p,{paramName:v,isOptional:y},_)=>{if(v==="*"){let T=h[_]||"";c=o.slice(0,o.length-T.length).replace(/(.)\/+$/,"$1")}const b=h[_];return y&&!b?p[v]=void 0:p[v]=(b||"").replace(/%2F/g,"/"),p},{}),pathname:o,pathnameBase:c,pattern:s}}function $R(s,e=!1,t=!0){Yo(s==="*"||!s.endsWith("*")||s.endsWith("/*"),`Route path "${s}" will be treated as if it were "${s.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${s.replace(/\*$/,"/*")}".`);let n=[],a="^"+s.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,h,d)=>(n.push({paramName:h,isOptional:d!=null}),d?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return s.endsWith("*")?(n.push({paramName:"*"}),a+=s==="*"||s==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):t?a+="\\/*$":s!==""&&s!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,e?void 0:"i"),n]}function eC(s){try{return s.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return Yo(!1,`The URL path "${s}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${e}).`),s}}function Fl(s,e){if(e==="/")return s;if(!s.toLowerCase().startsWith(e.toLowerCase()))return null;let t=e.endsWith("/")?e.length-1:e.length,n=s.charAt(t);return n&&n!=="/"?null:s.slice(t)||"/"}function tC(s,e="/"){let{pathname:t,search:n="",hash:a=""}=typeof s=="string"?wd(s):s;return{pathname:t?t.startsWith("/")?t:nC(t,e):e,search:sC(n),hash:rC(a)}}function nC(s,e){let t=e.replace(/\/+$/,"").split("/");return s.split("/").forEach(a=>{a===".."?t.length>1&&t.pop():a!=="."&&t.push(a)}),t.length>1?t.join("/"):"/"}function lx(s,e,t,n){return`Cannot include a '${s}' character in a manually specified \`to.${e}\` field [${JSON.stringify(n)}].  Please separate it out to the \`to.${t}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function iC(s){return s.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function HT(s){let e=iC(s);return e.map((t,n)=>n===e.length-1?t.pathname:t.pathnameBase)}function FT(s,e,t,n=!1){let a;typeof s=="string"?a=wd(s):(a={...s},Ni(!a.pathname||!a.pathname.includes("?"),lx("?","pathname","search",a)),Ni(!a.pathname||!a.pathname.includes("#"),lx("#","pathname","hash",a)),Ni(!a.search||!a.search.includes("#"),lx("#","search","hash",a)));let o=s===""||a.pathname==="",c=o?"/":a.pathname,h;if(c==null)h=t;else{let y=e.length-1;if(!n&&c.startsWith("..")){let _=c.split("/");for(;_[0]==="..";)_.shift(),y-=1;a.pathname=_.join("/")}h=y>=0?e[y]:"/"}let d=tC(a,h),p=c&&c!=="/"&&c.endsWith("/"),v=(o||c===".")&&t.endsWith("/");return!d.pathname.endsWith("/")&&(p||v)&&(d.pathname+="/"),d}var Pl=s=>s.join("/").replace(/\/\/+/g,"/"),aC=s=>s.replace(/\/+$/,"").replace(/^\/*/,"/"),sC=s=>!s||s==="?"?"":s.startsWith("?")?s:"?"+s,rC=s=>!s||s==="#"?"":s.startsWith("#")?s:"#"+s;function oC(s){return s!=null&&typeof s.status=="number"&&typeof s.statusText=="string"&&typeof s.internal=="boolean"&&"data"in s}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var VT=["POST","PUT","PATCH","DELETE"];new Set(VT);var lC=["GET",...VT];new Set(lC);var Rd=le.createContext(null);Rd.displayName="DataRouter";var zy=le.createContext(null);zy.displayName="DataRouterState";le.createContext(!1);var GT=le.createContext({isTransitioning:!1});GT.displayName="ViewTransition";var cC=le.createContext(new Map);cC.displayName="Fetchers";var uC=le.createContext(null);uC.displayName="Await";var Ko=le.createContext(null);Ko.displayName="Navigation";var Qm=le.createContext(null);Qm.displayName="Location";var Gl=le.createContext({outlet:null,matches:[],isDataRoute:!1});Gl.displayName="Route";var nb=le.createContext(null);nb.displayName="RouteError";function fC(s,{relative:e}={}){Ni(Jm(),"useHref() may be used only in the context of a <Router> component.");let{basename:t,navigator:n}=le.useContext(Ko),{hash:a,pathname:o,search:c}=$m(s,{relative:e}),h=o;return t!=="/"&&(h=o==="/"?t:Pl([t,o])),n.createHref({pathname:h,search:c,hash:a})}function Jm(){return le.useContext(Qm)!=null}function kl(){return Ni(Jm(),"useLocation() may be used only in the context of a <Router> component."),le.useContext(Qm).location}var kT="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function XT(s){le.useContext(Ko).static||le.useLayoutEffect(s)}function jT(){let{isDataRoute:s}=le.useContext(Gl);return s?EC():hC()}function hC(){Ni(Jm(),"useNavigate() may be used only in the context of a <Router> component.");let s=le.useContext(Rd),{basename:e,navigator:t}=le.useContext(Ko),{matches:n}=le.useContext(Gl),{pathname:a}=kl(),o=JSON.stringify(HT(n)),c=le.useRef(!1);return XT(()=>{c.current=!0}),le.useCallback((d,p={})=>
58{if(Yo(c.current,kT),!c.current)return;if(typeof d=="number"){t.go(d);return}let v=FT(d,JSON.parse(o),a,p.relative==="path");s==null&&e!=="/"&&(v.pathname=v.pathname==="/"?e:Pl([e,v.pathname])),(p.replace?t.replace:t.push)(v,p.state,p)},[e,t,o,a,s])}le.createContext(null);function $m(s,{relative:e}={}){let{matches:t}=le.useContext(Gl),{pathname:n}=kl(),a=JSON.stringify(HT(t));return le.useMemo(()=>FT(s,JSON.parse(a),n,e==="path"),[s,a,n,e])}function dC(s,e){return qT(s,e)}function qT(s,e,t,n,a){Ni(Jm(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=le.useContext(Ko),{matches:c}=le.useContext(Gl),h=c[c.length-1],d=h?h.params:{},p=h?h.pathname:"/",v=h?h.pathnameBase:"/",y=h&&h.route;{let C=y&&y.path||"";YT(p,!y||C.endsWith("*")||C.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${C}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
59
60Please change the parent <Route path="${C}"> to <Route path="${C==="/"?"*":`${C}/*`}">.`)}let _=kl(),b;if(e){let C=typeof e=="string"?wd(e):e;Ni(v==="/"||C.pathname?.startsWith(v),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${v}" but pathname "${C.pathname}" was given in the \`location\` prop.`),b=C}else b=_;let T=b.pathname||"/",R=T;if(v!=="/"){let C=v.replace(/^\//,"").split("/");R="/"+T.replace(/^\//,"").split("/").slice(C.length).join("/")}let A=IT(s,{pathname:R});Yo(y||A!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),Yo(A==null||A[A.length-1].route.element!==void 0||A[A.length-1].route.Component!==void 0||A[A.length-1].route.lazy!==void 0,`Matched leaf route at location "${b.pathname}${b.search}${b.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let M=yC(A&&A.map(C=>Object.assign({},C,{params:Object.assign({},d,C.params),pathname:Pl([v,o.encodeLocation?o.encodeLocation(C.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:C.pathname]),pathnameBase:C.pathnameBase==="/"?v:Pl([v,o.encodeLocation?o.encodeLocation(C.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:C.pathnameBase])})),c,t,n,a);return e&&M?le.createElement(Qm.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...b},navigationType:"POP"}},M):M}function pC(){let s=MC(),e=oC(s)?`${s.status} ${s.statusText}`:s instanceof Error?s.message:JSON.stringify(s),t=s instanceof Error?s.stack:null,n="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:n},o={padding:"2px 4px",backgroundColor:n},c=null;return console.error("Error handled by React Router default ErrorBoundary:",s),c=le.createElement(le.Fragment,null,le.createElement("p",null,"💿 Hey developer 👋"),le.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",le.createElement("code",{style:o},"ErrorBoundary")," or"," ",le.createElement("code",{style:o},"errorElement")," prop on your route.")),le.createElement(le.Fragment,null,le.createElement("h2",null,"Unexpected Application Error!"),le.createElement("h3",{style:{fontStyle:"italic"}},e),t?le.createElement("pre",{style:a},t):null,c)}var mC=le.createElement(pC,null),gC=class extends le.Component{constructor(s){super(s),this.state={location:s.location,revalidation:s.revalidation,error:s.error}}static getDerivedStateFromError(s){return{error:s}}static getDerivedStateFromProps(s,e){return e.location!==s.location||e.revalidation!=="idle"&&s.revalidation==="idle"?{error:s.error,location:s.location,revalidation:s.revalidation}:{error:s.error!==void 0?s.error:e.error,location:e.location,revalidation:s.revalidation||e.revalidation}}componentDidCatch(s,e){this.props.unstable_onError?this.props.unstable_onError(s,e):console.error("React Router caught the following error during render",s)}render(){return this.state.error!==void 0?le.createElement(Gl.Provider,{value:this.props.routeContext},le.createElement(nb.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function vC({routeContext:s,match:e,children:t}){let n=le.useContext(Rd);return n&&n.static&&n.staticContext&&(e.route.errorElement||e.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=e.route.id),le.createElement(Gl.Provider,{value:s},t)}function yC(s,e=[],t=null,n=null,a=null){if(s==null){if(!t)return null;if(t.errors)s=t.matches;else if(e.length===0&&!t.initialized&&t.matches.length>0)s=t.matches;else return null}let o=s,c=t?.errors;if(c!=null){let p=o.findIndex(v=>v.route.id&&c?.[v.route.id]!==void 0);Ni(p>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(c).join(",")}`),o=o.slice(0,Math.min(o.length,p+1))}let h=!1,d=-1;if(t)for(let p=0;p<o.length;p++){let v=o[p];if((v.route.HydrateFallback||v.route.hydrateFallbackElement)&&(d=p),v.route.id){let{loaderData:y,errors:_}
60=t,b=v.route.loader&&!y.hasOwnProperty(v.route.id)&&(!_||_[v.route.id]===void 0);if(v.route.lazy||b){h=!0,d>=0?o=o.slice(0,d+1):o=[o[0]];break}}}return o.reduceRight((p,v,y)=>{let _,b=!1,T=null,R=null;t&&(_=c&&v.route.id?c[v.route.id]:void 0,T=v.route.errorElement||mC,h&&(d<0&&y===0?(YT("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),b=!0,R=null):d===y&&(b=!0,R=v.route.hydrateFallbackElement||null)));let A=e.concat(o.slice(0,y+1)),M=()=>{let C;return _?C=T:b?C=R:v.route.Component?C=le.createElement(v.route.Component,null):v.route.element?C=v.route.element:C=p,le.createElement(vC,{match:v,routeContext:{outlet:p,matches:A,isDataRoute:t!=null},children:C})};return t&&(v.route.ErrorBoundary||v.route.errorElement||y===0)?le.createElement(gC,{location:t.location,revalidation:t.revalidation,component:T,error:_,children:M(),routeContext:{outlet:null,matches:A,isDataRoute:!0},unstable_onError:n}):M()},null)}function ib(s){return`${s} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function _C(s){let e=le.useContext(Rd);return Ni(e,ib(s)),e}function xC(s){let e=le.useContext(zy);return Ni(e,ib(s)),e}function SC(s){let e=le.useContext(Gl);return Ni(e,ib(s)),e}function ab(s){let e=SC(s),t=e.matches[e.matches.length-1];return Ni(t.route.id,`${s} can only be used on routes that contain a unique "id"`),t.route.id}function bC(){return ab("useRouteId")}function MC(){let s=le.useContext(nb),e=xC("useRouteError"),t=ab("useRouteError");return s!==void 0?s:e.errors?.[t]}function EC(){let{router:s}=_C("useNavigate"),e=ab("useNavigate"),t=le.useRef(!1);return XT(()=>{t.current=!0}),le.useCallback(async(a,o={})=>{Yo(t.current,kT),t.current&&(typeof a=="number"?s.navigate(a):await s.navigate(a,{fromRouteId:e,...o}))},[s,e])}var SM={};function YT(s,e,t){!e&&!SM[s]&&(SM[s]=!0,Yo(!1,t))}le.memo(TC);function TC({routes:s,future:e,state:t,unstable_onError:n}){return qT(s,void 0,t,n,e)}function AS(s){Ni(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function AC({basename:s="/",children:e=null,location:t,navigationType:n="POP",navigator:a,static:o=!1}){Ni(!Jm(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let c=s.replace(/^\/*/,"/"),h=le.useMemo(()=>({basename:c,navigator:a,static:o,future:{}}),[c,a,o]);typeof t=="string"&&(t=wd(t));let{pathname:d="/",search:p="",hash:v="",state:y=null,key:_="default"}=t,b=le.useMemo(()=>{let T=Fl(d,c);return T==null?null:{location:{pathname:T,search:p,hash:v,state:y,key:_},navigationType:n}},[c,d,p,v,y,_,n]);return Yo(b!=null,`<Router basename="${c}"> is not able to match the URL "${d}${p}${v}" because it does not start with the basename, so the <Router> won't render anything.`),b==null?null:le.createElement(Ko.Provider,{value:h},le.createElement(Qm.Provider,{children:e,value:b}))}function wC({children:s,location:e}){return dC(wS(s),e)}function wS(s,e=[]){let t=[];return le.Children.forEach(s,(n,a)=>{if(!le.isValidElement(n))return;let o=[...e,a];if(n.type===le.Fragment){t.push.apply(t,wS(n.props.children,o));return}Ni(n.type===AS,`[${typeof n.type=="string"?n.type:n.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ni(!n.props.index||!n.props.children,"An index route cannot have child routes.");let c={id:n.props.id||o.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,middleware:n.props.middleware,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(c.children=wS(n.props.children,o)),t.push(c)}),t}var U0="get",L0="application/x-www-form-urlencoded";function Iy(s){return s!=null&&typeof s.tagName=="string"}function RC(s){return Iy(s)&&s.tagName.toLowerCase()==="button"}function CC(s){return Iy(s)&&s.tagName.toLowerCase()==="form"}function NC(s){return Iy(s)&&s.tagName.toLowerCase()==="input"}function DC(s){return!!(s.metaKey||s.altKey||s.ctrlKey||s.shiftKey)}function UC(s,e){return s.button===0&&(!e||e==="_self")&&!DC(s)}var Iv=null;function LC(){if(Iv===null)try{new FormData(document.createElement("form"),0),Iv=!1}catch{Iv=!0}return Iv}var OC=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function cx(s){return s!=null&&!OC.has(s)?(Yo(!1,`"${s}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${L0}"`),null):s}function zC(s,e){let t,n,a,o,c;if(CC(s)){let h=s.getAttribute("action");n=h?Fl(h,e):null,t=s.getAttribute("method")||U0,a=cx(s.getAttribute("enctype"))||L0,o=new FormData(s)}else if(RC(s)||NC(s)&&(s.type==="submit"||s.type==="image")){let h=s.form;if(h==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let d=s.getAttribute("formaction")||h.getAttribute("action");if(n=d?Fl(d,e):null,t=s.getAttribute("formmethod")||h.getAttribute("method")||U0,a=cx(s.getAttribute("formenctype"))||cx(h.getAttribute("enctype"))||L0,o=new FormData(h,s),!LC()){let{name:p,type:v,value:y}=s;if(v==="image"){let _=p?`${p}.`:"";o.append(`${_}x`,"0"),o.append(`${_}y`,"0")}
60else p&&o.append(p,y)}}else{if(Iy(s))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');t=U0,n=null,a=L0,c=s}return o&&a==="text/plain"&&(c=o,o=void 0),{action:n,method:t.toLowerCase(),encType:a,formData:o,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function sb(s,e){if(s===!1||s===null||typeof s>"u")throw new Error(e)}function IC(s,e,t){let n=typeof s=="string"?new URL(s,typeof window>"u"?"server://singlefetch/":window.location.origin):s;return n.pathname==="/"?n.pathname=`_root.${t}`:e&&Fl(n.pathname,e)==="/"?n.pathname=`${e.replace(/\/$/,"")}/_root.${t}`:n.pathname=`${n.pathname.replace(/\/$/,"")}.${t}`,n}async function BC(s,e){if(s.id in e)return e[s.id];try{let t=await import(s.module);return e[s.id]=t,t}catch(t){return console.error(`Error loading route module \`${s.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function PC(s){return s==null?!1:s.href==null?s.rel==="preload"&&typeof s.imageSrcSet=="string"&&typeof s.imageSizes=="string":typeof s.rel=="string"&&typeof s.href=="string"}async function HC(s,e,t){let n=await Promise.all(s.map(async a=>{let o=e.routes[a.route.id];if(o){let c=await BC(o,t);return c.links?c.links():[]}return[]}));return kC(n.flat(1).filter(PC).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function bM(s,e,t,n,a,o){let c=(d,p)=>t[p]?d.route.id!==t[p].route.id:!0,h=(d,p)=>t[p].pathname!==d.pathname||t[p].route.path?.endsWith("*")&&t[p].params["*"]!==d.params["*"];return o==="assets"?e.filter((d,p)=>c(d,p)||h(d,p)):o==="data"?e.filter((d,p)=>{let v=n.routes[d.route.id];if(!v||!v.hasLoader)return!1;if(c(d,p)||h(d,p))return!0;if(d.route.shouldRevalidate){let y=d.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:t[0]?.params||{},nextUrl:new URL(s,window.origin),nextParams:d.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}function FC(s,e,{includeHydrateFallback:t}={}){return VC(s.map(n=>{let a=e.routes[n.route.id];if(!a)return[];let o=[a.module];return a.clientActionModule&&(o=o.concat(a.clientActionModule)),a.clientLoaderModule&&(o=o.concat(a.clientLoaderModule)),t&&a.hydrateFallbackModule&&(o=o.concat(a.hydrateFallbackModule)),a.imports&&(o=o.concat(a.imports)),o}).flat(1))}function VC(s){return[...new Set(s)]}function GC(s){let e={},t=Object.keys(s).sort();for(let n of t)e[n]=s[n];return e}function kC(s,e){let t=new Set;return new Set(e),s.reduce((n,a)=>{let o=JSON.stringify(GC(a));return t.has(o)||(t.add(o),n.push({key:o,link:a})),n},[])}function WT(){let s=le.useContext(Rd);return sb(s,"You must render this element inside a <DataRouterContext.Provider> element"),s}function XC(){let s=le.useContext(zy);return sb(s,"You must render this element inside a <DataRouterStateContext.Provider> element"),s}var rb=le.createContext(void 0);rb.displayName="FrameworkContext";function ZT(){let s=le.useContext(rb);return sb(s,"You must render this element inside a <HydratedRouter> element"),s}function jC(s,e){let t=le.useContext(rb),[n,a]=le.useState(!1),[o,c]=le.useState(!1),{onFocus:h,onBlur:d,onMouseEnter:p,onMouseLeave:v,onTouchStart:y}=e,_=le.useRef(null);le.useEffect(()=>{if(s==="render"&&c(!0),s==="viewport"){let R=M=>{M.forEach(C=>{c(C.isIntersecting)})},A=new IntersectionObserver(R,{threshold:.5});return _.current&&A.observe(_.current),()=>{A.disconnect()}}},[s]),le.useEffect(()=>{if(n){let R=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(R)}}},[n]);let b=()=>{a(!0)},T=()=>{a(!1),c(!1)};return t?s!=="intent"?[o,_,{}]:[o,_,{onFocus:om(h,b),onBlur:om(d,T),onMouseEnter:om(p,b),onMouseLeave:om(v,T),onTouchStart:om(y,b)}]:[!1,_,{}]}function om(s,e){return t=>{s&&s(t),t.defaultPrevented||e(t)}}function qC({page:s,...e}){let{router:t}=WT(),n=le.useMemo(()=>IT(t.routes,s,t.basename),[t.routes,s,t.basename]);return n?le.createElement(WC,{page:s,matches:n,...e}):null}function YC(s){let{manifest:e,routeModules:t}=ZT(),[n,a]=le.useState([]);return le.useEffect(()=>{let o=!1;return HC(s,e,t).then(c=>{o||a(c)}),()=>{o=!0}},[s,e,t]),n}function WC({page:s,matches:e,...t}){let n=kl(),{manifest:a,routeModules:o}=ZT(),{basename:c}
60=WT(),{loaderData:h,matches:d}=XC(),p=le.useMemo(()=>bM(s,e,d,a,n,"data"),[s,e,d,a,n]),v=le.useMemo(()=>bM(s,e,d,a,n,"assets"),[s,e,d,a,n]),y=le.useMemo(()=>{if(s===n.pathname+n.search+n.hash)return[];let T=new Set,R=!1;if(e.forEach(M=>{let C=a.routes[M.route.id];!C||!C.hasLoader||(!p.some(D=>D.route.id===M.route.id)&&M.route.id in h&&o[M.route.id]?.shouldRevalidate||C.hasClientLoader?R=!0:T.add(M.route.id))}),T.size===0)return[];let A=IC(s,c,"data");return R&&T.size>0&&A.searchParams.set("_routes",e.filter(M=>T.has(M.route.id)).map(M=>M.route.id).join(",")),[A.pathname+A.search]},[c,h,n,a,p,e,s,o]),_=le.useMemo(()=>FC(v,a),[v,a]),b=YC(v);return le.createElement(le.Fragment,null,y.map(T=>le.createElement("link",{key:T,rel:"prefetch",as:"fetch",href:T,...t})),_.map(T=>le.createElement("link",{key:T,rel:"modulepreload",href:T,...t})),b.map(({key:T,link:R})=>le.createElement("link",{key:T,nonce:t.nonce,...R})))}function ZC(...s){return e=>{s.forEach(t=>{typeof t=="function"?t(e):t!=null&&(t.current=e)})}}var KT=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{KT&&(window.__reactRouterVersion="7.9.5")}catch{}function KC({basename:s,children:e,window:t}){let n=le.useRef();n.current==null&&(n.current=PR({window:t,v5Compat:!0}));let a=n.current,[o,c]=le.useState({action:a.action,location:a.location}),h=le.useCallback(d=>{le.startTransition(()=>c(d))},[c]);return le.useLayoutEffect(()=>a.listen(h),[a,h]),le.createElement(AC,{basename:s,children:e,location:o.location,navigationType:o.action,navigator:a})}var QT=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,By=le.forwardRef(function({onClick:e,discover:t="render",prefetch:n="none",relative:a,reloadDocument:o,replace:c,state:h,target:d,to:p,preventScrollReset:v,viewTransition:y,..._},b){let{basename:T}=le.useContext(Ko),R=typeof p=="string"&&QT.test(p),A,M=!1;if(typeof p=="string"&&R&&(A=p,KT))try{let O=new URL(window.location.href),z=p.startsWith("//")?new URL(O.protocol+p):new URL(p),Y=Fl(z.pathname,T);z.origin===O.origin&&Y!=null?p=Y+z.search+z.hash:M=!0}catch{Yo(!1,`<Link to="${p}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let C=fC(p,{relative:a}),[D,U,H]=jC(n,_),F=$C(p,{replace:c,state:h,target:d,preventScrollReset:v,relative:a,viewTransition:y});function G(O){e&&e(O),O.defaultPrevented||F(O)}let V=le.createElement("a",{..._,...H,href:A||C,onClick:M||o?e:G,ref:ZC(b,U),target:d,"data-discover":!R&&t==="render"?"true":void 0});return D&&!R?le.createElement(le.Fragment,null,V,le.createElement(qC,{page:C})):V});By.displayName="Link";var ob=le.forwardRef(function({"aria-current":e="page",caseSensitive:t=!1,className:n="",end:a=!1,style:o,to:c,viewTransition:h,children:d,...p},v){let y=$m(c,{relative:p.relative}),_=kl(),b=le.useContext(zy),{navigator:T,basename:R}=le.useContext(Ko),A=b!=null&&a3(y)&&h===!0,M=T.encodeLocation?T.encodeLocation(y).pathname:y.pathname,C=_.pathname,D=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;t||(C=C.toLowerCase(),D=D?D.toLowerCase():null,M=M.toLowerCase()),D&&R&&(D=Fl(D,R)||D);const U=M!=="/"&&M.endsWith("/")?M.length-1:M.length;let H=C===M||!a&&C.startsWith(M)&&C.charAt(U)==="/",F=D!=null&&(D===M||!a&&D.startsWith(M)&&D.charAt(M.length)==="/"),G={isActive:H,isPending:F,isTransitioning:A},V=H?e:void 0,O;typeof n=="function"?O=n(G):O=[n,H?"active":null,F?"pending":null,A?"transitioning":null].filter(Boolean).join(" ");let z=typeof o=="function"?o(G):o;return le.createElement(By,{...p,"aria-current":V,className:O,ref:v,style:z,to:c,viewTransition:h},typeof d=="function"?d(G):d)});ob.displayName="NavLink";var QC=le.forwardRef(({discover:s="render",fetcherKey:e,navigate:t,reloadDocument:n,replace:a,state:o,method:c=U0,action:h,onSubmit:d,relative:p,preventScrollReset:v,viewTransition:y,..._},b)=>{let T=n3(),R=i3(h,{relative:p}),A=c.toLowerCase()==="get"?"get":"post",M=typeof h=="string"&&QT.test(h),C=D=>{if(d&&d(D),D.defaultPrevented)return;D.preventDefault();let U=D.nativeEvent.submitter,H=U?.getAttribute("formmethod")||c;T(U||D.currentTarget,{fetcherKey:e,method:H,navigate:t,replace:a,state:o,relative:p,preventScrollReset:v,viewTransition:y})};return le.createElement("form",{ref:b,method:A,action:R,onSubmit:n?d:C,..._,"data-discover":!M&&s==="render"?"true":void 0})});QC.displayName="Form";function JC(s){return`${s} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function JT(s){let e=le.useContext(Rd);return Ni(e,JC(s)),e}function $C(s,{target:e,replace:t,state:n,preventScrollReset:a,relative:o,viewTransition:c}={}){let h=jT(),d=kl(),p=$m(s,{relative:o});return le.useCallback(v=>{if(UC(v,e)){v.preventDefault();let y=t!==void 0?t:Pm(d)===Pm(p);h(s,{replace:y,state:n,preventScrollReset:a,relative:o,viewTransition:c})}},[d,h,p,t,n,e,s,a,o,c])}var e3=0,t3=()=>`__${String(++e3)}__`;function n3(){let{router:s}=JT("useSubmit"),{basename:e}=le.useContext(Ko),t=bC();return le.useCallback(async(n,a={})=>{let{action:o,method:c,encType:h,formData:d,body:p}=zC(n,e);if(a.navigate===!1){let v=a.fetcherKey||t3();await s.fetch(v,t,a.action||o,{preventScrollReset:a.preventScrollReset,formData:d,body:p,formMethod:a.method||c,formEncType:a.encType||h,flushSync:a.flushSync})}else await s.navigate(a.action||o,{preventScrollReset:a.preventScrollReset,formData:d,body:p,formMethod:a.method||c,formEncType:a.encType||h,replace:a.replace,state:a.state,fromRouteId:t,flushSync:a.flushSync,viewTransition:a.viewTransition})},[s,e,t])}function i3(s,{relative:e}={}){let{basename:t}=le.useContext(Ko),n=le.useContext(Gl);Ni(n,"useFormAction must be used inside a RouteContext");let[a]=n.matches.slice(-1),o={...$m(s||".",{relative:e})},c=kl();if(s==null){o.search=c.search;let h=new URLSearchParams(o.search),d=h.getAll("index");if(d.some(v=>v==="")){h.delete("index"),d.filter(y=>
60y).forEach(y=>h.append("index",y));let v=h.toString();o.search=v?`?${v}`:""}}return(!s||s===".")&&a.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),t!=="/"&&(o.pathname=o.pathname==="/"?t:Pl([t,o.pathname])),Pm(o)}function a3(s,{relative:e}={}){let t=le.useContext(GT);Ni(t!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=JT("useViewTransitionState"),a=$m(s,{relative:e});if(!t.isTransitioning)return!1;let o=Fl(t.currentLocation.pathname,n)||t.currentLocation.pathname,c=Fl(t.nextLocation.pathname,n)||t.nextLocation.pathname;return F0(a.pathname,c)!=null||F0(a.pathname,o)!=null}var MM={},s3="@vercel/analytics",r3="1.6.1",o3=()=>{window.va||(window.va=function(...e){(window.vaq=window.vaq||[]).push(e)})};function $T(){return typeof window<"u"}function eA(){try{const s="production"}catch{}return"production"}function l3(s="auto"){if(s==="auto"){window.vam=eA();return}window.vam=s}function c3(){return($T()?window.vam:eA())||"production"}function RS(){return c3()==="development"}function u3(s){return s.scriptSrc?s.scriptSrc:RS()?"https://va.vercel-scripts.com/v1/script.debug.js":s.basePath?`${s.basePath}/insights/script.js`:"/_vercel/insights/script.js"}function f3(s={debug:!0}){var e;if(!$T())return;l3(s.mode),o3(),s.beforeSend&&((e=window.va)==null||e.call(window,"beforeSend",s.beforeSend));const t=u3(s);if(document.head.querySelector(`script[src*="${t}"]`))return;const n=document.createElement("script");n.src=t,n.defer=!0,n.dataset.sdkn=s3+(s.framework?`/${s.framework}`:""),n.dataset.sdkv=r3,s.disableAutoTrack&&(n.dataset.disableAutoTrack="1"),s.endpoint?n.dataset.endpoint=s.endpoint:s.basePath&&(n.dataset.endpoint=`${s.basePath}/insights`),s.dsn&&(n.dataset.dsn=s.dsn),n.onerror=()=>{const a=RS()?"Please check if any ad blockers are enabled and try again.":"Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.";console.log(`[Vercel Web Analytics] Failed to load script from ${t}. ${a}`)},RS()&&s.debug===!1&&(n.dataset.debug="false"),document.head.appendChild(n)}function h3({route:s,path:e}){var t;(t=window.va)==null||t.call(window,"pageview",{route:s,path:e})}function d3(){if(!(typeof process>"u"||typeof MM>"u"))return MM.REACT_APP_VERCEL_OBSERVABILITY_BASEPATH}function p3(s){return le.useEffect(()=>{var e;s.beforeSend&&((e=window.va)==null||e.call(window,"beforeSend",s.beforeSend))},[s.beforeSend]),le.useEffect(()=>{f3({framework:s.framework||"react",basePath:s.basePath??d3(),...s.route!==void 0&&{disableAutoTrack:!0},...s})},[]),le.useEffect(()=>{s.route&&s.path&&h3({route:s.route,path:s.path})},[s.route,s.path]),null}var EM={},m3="@vercel/speed-insights",g3="1.3.1",v3=()=>{window.si||(window.si=function(...e){(window.siq=window.siq||[]).push(e)})};function y3(){return typeof window<"u"}function _3(){try{const s="production"}catch{}return"production"}function tA(){return _3()==="development"}function x3(s){return s.scriptSrc?s.scriptSrc:tA()?"https://va.vercel-scripts.com/v1/speed-insights/script.debug.js":s.dsn?"https://va.vercel-scripts.com/v1/speed-insights/script.js":s.basePath?`${s.basePath}/speed-insights/script.js`:"/_vercel/speed-insights/script.js"}function S3(s={}){var e;if(!y3()||s.route===null)return null;v3();const t=x3(s);if(document.head.querySelector(`script[src*="${t}"]`))return null;s.beforeSend&&((e=window.si)==null||e.call(window,"beforeSend",s.beforeSend));const n=document.createElement("script");return n.src=t,n.defer=!0,n.dataset.sdkn=m3+(s.framework?`/${s.framework}`:""),n.dataset.sdkv=g3,s.sampleRate&&(n.dataset.sampleRate=s.sampleRate.toString()),s.route&&(n.dataset.route=s.route),s.endpoint?n.dataset.endpoint=s.endpoint:s.basePath&&(n.dataset.endpoint=`${s.basePath}/speed-insights/vitals`),s.dsn&&(n.dataset.dsn=s.dsn),tA()&&s.debug===!1&&(n.dataset.debug="false"),n.onerror=()=>{console.log(`[Vercel Speed Insights] Failed to load script from ${t}. Please check if any content blockers are enabled and try again.`)},document.head.appendChild(n),{setRoute:a=>{n.dataset.route=a??void 0}}}function b3(){if(!(typeof process>"u"||typeof EM>"u"))return EM.REACT_APP_VERCEL_OBSERVABILITY_BASEPATH}function M3(s){le.useEffect(()=>{var t;s.beforeSend&&((t=window.si)==null||t.call(window,"beforeSend",s.beforeSend))},[s.beforeSend]);const e=le.useRef(null);return le.useEffect(()=>{if(e.current)s.route&&e.current(s.route);else{const t=S3({framework:s.framework??"react",basePath:s.basePath??b3(),...s});t&&(e.current=t.setRoute)}},[s.route]),null}const E3="/assets/pexels-googledeepmind-17483868-Djk0YEkd.jpg",T3="/assets/pexels-thisisengineering-3861951-Dw-YPbTH.jpg";function V0(){return V0=Object.assign?Object.assign.bind():function(s){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)({}).hasOwnProperty.call(t,n)&&(s[n]=t[n])}return s},V0.apply(null,arguments)}/**
61 * @license
62 * Copyright 2010-2025 Three.js Authors
63 * SPDX-License-Identifier: MIT
64 */const eg="180",A3={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},w3={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},nA=0,CS=1,iA=2,R3=3,aA=0,Py=1,Am=2,$r=3,ao=0,Ka=1,Mr=2,qo=0,df=1,NS=2,DS=3,US=4,sA=5,Pc=100,rA=101,oA=102,lA=103,cA=104,uA=200,fA=201,hA=202,dA=203,G0=204,k0=205,pA=206,mA=207,gA=208,vA=209,yA=210,_A=211,xA
vendor: 7,220 bytes, line 64
64=212,SA=213,bA=214,X0=0,j0=1,q0=2,gf=3,Y0=4,W0=5,Z0=6,K0=7,tg=0,MA=1,EA=2,no=0,TA=1,AA=2,wA=3,lb=4,RA=5,CA=6,NA=7,LS="attached",DA="detached",Gc=300,Wo=301,kc=302,fd=303,Hm=304,Cd=306,Xc=1e3,Gi=1001,hd=1002,oa=1003,Hy=1004,C3=1004,of=1005,N3=1005,Hn=1006,rd=1007,D3=1007,Tr=1008,OS=1008,Es=1009,Fy=1010,Vy=1011,dd=1012,ng=1013,Zo=1014,bi=1015,ra=1016,Gy=1017,ky=1018,pd=1020,cb=35902,ub=35899,fb=1021,hb=1022,ki=1023,md=1026,gd=1027,ig=1028,ag=1029,db=1030,Xy=1031,U3=1032,jy=1033,wm=33776,Rm=33777,Cm=33778,Nm=33779,Q0=35840,J0=35841,$0=35842,ey=35843,ty=36196,ny=37492,iy=37496,ay=37808,sy=37809,ry=37810,oy=37811,ly=37812,cy=37813,uy=37814,fy=37815,hy=37816,dy=37817,py=37818,my=37819,gy=37820,vy=37821,yy=36492,_y=36494,xy=36495,Sy=36283,by=36284,My=36285,Ey=36286,UA=2200,LA=2201,OA=2202,vd=2300,yd=2301,O0=2302,lf=2400,cf=2401,Fm=2402,qy=2500,pb=2501,zA=0,mb=1,Ty=2,IA=3200,BA=3201,L3=3202,O3=3203,Yc=0,PA=1,zl="",Ii="srgb",Qi="srgb-linear",Vm="linear",ni="srgb",z3=0,af=7680,I3=7681,B3=7682,P3=7683,H3=34055,F3=34056,V3=5386,G3=512,k3=513,X3=514,j3=515,q3=516,Y3=517,W3=518,zS=519,HA=512,FA=513,VA=514,gb=515,GA=516,kA=517,XA=518,jA=519,Gm=35044,Z3=35048,K3=35040,Q3=35045,J3=35049,$3=35041,eN=35046,tN=35050,nN=35042,iN="100",IS="300 es",Qs=2e3,_d=2001,aN={COMPUTE:"compute",RENDER:"render"},sN={PERSPECTIVE:"perspective",LINEAR:"linear",FLAT:"flat"},rN={NORMAL:"normal",CENTROID:"centroid",SAMPLE:"sample",FIRST:"first",EITHER:"either"};class Qo{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});const n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)}hasEventListener(e,t){const n=this._listeners;return n===void 0?!1:n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){const n=this._listeners;if(n===void 0)return;const a=n[e];if(a!==void 0){const o=a.indexOf(t);o!==-1&&a.splice(o,1)}}dispatchEvent(e){const t=this._listeners;if(t===void 0)return;const n=t[e.type];if(n!==void 0){e.target=this;const a=n.slice(0);for(let o=0,c=a.length;o<c;o++)a[o].call(this,e);e.target=null}}}const Ya=["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","55","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 TM=1234567;const pf=Math.PI/180,xd=180/Math.PI;function Js(){const s=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,n=Math.random()*4294967295|0;return(Ya[s&255]+Ya[s>>8&255]+Ya[s>>16&255]+Ya[s>>24&255]+"-"+Ya[e&255]+Ya[e>>8&255]+"-"+Ya[e>>16&15|64]+Ya[e>>24&255]+"-"+Ya[t&63|128]+Ya[t>>8&255]+"-"+Ya[t>>16&255]+Ya[t>>24&255]+Ya[n&255]+Ya[n>>8&255]+Ya[n>>16&255]+Ya[n>>24&255]).toLowerCase()}function $t(s,e,t){return Math.max(e,Math.min(t,s))}function vb(s,e){return(s%e+e)%e}function oN(s,e,t,n,a){return n+(s-e)*(a-n)/(t-e)}function lN(s,e,t){return s!==e?(t-s)/(e-s):0}function Dm(s,e,t){return(1-t)*s+t*e}function cN(s,e,t,n){return Dm(s,e,1-Math.exp(-t*n))}function uN(s,e=1){return e-Math.abs(vb(s,e*2)-e)}function fN(s,e,t){return s<=e?0:s>=t?1:(s=(s-e)/(t-e),s*s*(3-2*s))}function hN(s,e,t){return s<=e?0:s>=t?1:(s=(s-e)/(t-e),s*s*s*(s*(s*6-15)+10))}function dN(s,e){return s+Math.floor(Math.random()*(e-s+1))}function pN(s,e){return s+Math.random()*(e-s)}function mN(s){return s*(.5-Math.random())}function gN(s){s!==void 0&&(TM=s);let e=TM+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function vN(s){return s*pf}function yN(s){return s*xd}function _N(s){return(s&s-1)===0&&s!==0}function xN(s){return Math.pow(2,Math.ceil(Math.log(s)/Math.LN2))}function SN(s){return Math.pow(2,Math.floor(Math.log(s)/Math.LN2))}function bN(s,e,t,n,a){const o=Math.cos,c=Math.sin,h=o(t/2),d=c(t/2),p=o((e+n)/2),v=c((e+n)/2),y=o((e-n)/2),_=c((e-n)/2),b=o((n-e)/2),T=c((n-e)/2);switch(a){case"XYX":s.set(h*v,d*y,d*_,h*p);break;case"YZY":s.set(d*_,h*v,d*y,h*p);break;case"ZXZ":s.set(d*y,d*_,h*v,h*p);break;case"XZX":s.set(h*v,d*T,d*b,h*p);break;case"YXY":s.set(d*b,h*v,d*T,h*p);break;case"ZYZ":s.set(d*T,d*b,h*v,h*p);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+a)}}function bs(s,e){switch(e.constructor){case Float32Array:return s;case Uint32Array:return s/4294967295;case Uint16Array:return s/65535;case Uint8Array:return s/255;case Int32Array:return Math.max(s/2147483647,-1);case Int16Array:return Math.max(s/32767,-1);case Int8Array:return Math.max(s/127,-1);default:throw new Error("Invalid component type.")}}function fn(s,e){switch(e.constructor){case Float32Array:return s;case Uint32Array:return Math.round(s*4294967295);case Uint16Array:return Math.round(s*65535);case Uint8Array:return Math.round(s*255);case Int32Array:return Math.round(s*2147483647);case Int16Array:return Math.round(s*32767);case Int8Array:return Math.round(s*127);default:throw new Error("Invalid component type.")}}const yb={DEG2RAD:pf,RAD2DEG:xd,generateUUID:Js,clamp:$t,euclideanModulo:vb,mapLinear:oN,inverseLerp:lN,lerp:Dm,damp:cN,pingpong:uN,smoothstep:fN,smootherstep:hN,randInt:dN,randFloat:pN,randFloatSpread:mN,seededRandom:gN,degToRad:vN,radToDeg:yN,isPowerOfTwo:_N,ceilPowerOfTwo:xN,floorPowerOfTwo:SN,setQuaternionFromProperEuler:bN,normalize:fn,denormalize:bs};class Je{constructor(e=0,t=0){Je.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}
vendor: 5,042 bytes, line 64
64sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,n=this.y,a=e.elements;return this.x=a[0]*t+a[3]*n+a[6],this.y=a[1]*t+a[4]*n+a[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=$t(this.x,e.x,t.x),this.y=$t(this.y,e.y,t.y),this}clampScalar(e,t){return this.x=$t(this.x,e,t),this.y=$t(this.y,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar($t(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const n=this.dot(e)/t;return Math.acos($t(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const n=Math.cos(t),a=Math.sin(t),o=this.x-e.x,c=this.y-e.y;return this.x=o*n-c*a+e.x,this.y=o*a+c*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Qa{constructor(e=0,t=0,n=0,a=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=n,this._w=a}static slerpFlat(e,t,n,a,o,c,h){let d=n[a+0],p=n[a+1],v=n[a+2],y=n[a+3];const _=o[c+0],b=o[c+1],T=o[c+2],R=o[c+3];if(h===0){e[t+0]=d,e[t+1]=p,e[t+2]=v,e[t+3]=y;return}if(h===1){e[t+0]=_,e[t+1]=b,e[t+2]=T,e[t+3]=R;return}if(y!==R||d!==_||p!==b||v!==T){let A=1-h;const M=d*_+p*b+v*T+y*R,C=M>=0?1:-1,D=1-M*M;if(D>Number.EPSILON){const H=Math.sqrt(D),F=Math.atan2(H,M*C);A=Math.sin(A*F)/H,h=Math.sin(h*F)/H}const U=h*C;if(d=d*A+_*U,p=p*A+b*U,v=v*A+T*U,y=y*A+R*U,A===1-h){const H=1/Math.sqrt(d*d+p*p+v*v+y*y);d*=H,p*=H,v*=H,y*=H}}e[t]=d,e[t+1]=p,e[t+2]=v,e[t+3]=y}static multiplyQuaternionsFlat(e,t,n,a,o,c){const h=n[a],d=n[a+1],p=n[a+2],v=n[a+3],y=o[c],_=o[c+1],b=o[c+2],T=o[c+3];return e[t]=h*T+v*y+d*b-p*_,e[t+1]=d*T+v*_+p*y-h*b,e[t+2]=p*T+v*b+h*_-d*y,e[t+3]=v*T-h*y-d*_-p*b,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,a){return this._x=e,this._y=t,this._z=n,this._w=a,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){const n=e._x,a=e._y,o=e._z,c=e._order,h=Math.cos,d=Math.sin,p=h(n/2),v=h(a/2),y=h(o/2),_=d(n/2),b=d(a/2),T=d(o/2);switch(c){case"XYZ":this._x=_*v*y+p*b*T,this._y=p*b*y-_*v*T,this._z=p*v*T+_*b*y,this._w=p*v*y-_*b*T;break;case"YXZ":this._x=_*v*y+p*b*T,this._y=p*b*y-_*v*T,this._z=p*v*T-_*b*y,this._w=p*v*y+_*b*T;break;case"ZXY":this._x=_*v*y-p*b*T,this._y=p*b*y+_*v*T,this._z=p*v*T+_*b*y,this._w=p*v*y-_*b*T;break;case"ZYX":this._x=_*v*y-p*b*T,this._y=p*b*y+_*v*T,this._z=p*v*T-_*b*y,this._w=p*v*y+_*b*T;break;case"YZX":this._x=_*v*y+p*b*T,this._y=p*b*y+_*v*T,this._z=p*v*T-_*b*y,this._w=p*v*y-_*b*T;break;case"XZY":this._x=_*v*y-p*b*T,this._y=p*b*y-_*v*T,this._z=p*v*T+_*b*y,this._w=p*v*y+_*b*T;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+c)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const n=t/2,a=Math.sin(n);return this._x=e.x*a,this._y=e.y*a,this._z=e.z*a,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,n=t[0],a=t[4],o=t[8],c=t[1],h=t[5],d=t[9],p=t[2],v=t[6],y=t[10],_=n+h+y;
vendor: 4,273 bytes, line 64
64if(_>0){const b=.5/Math.sqrt(_+1);this._w=.25/b,this._x=(v-d)*b,this._y=(o-p)*b,this._z=(c-a)*b}else if(n>h&&n>y){const b=2*Math.sqrt(1+n-h-y);this._w=(v-d)/b,this._x=.25*b,this._y=(a+c)/b,this._z=(o+p)/b}else if(h>y){const b=2*Math.sqrt(1+h-n-y);this._w=(o-p)/b,this._x=(a+c)/b,this._y=.25*b,this._z=(d+v)/b}else{const b=2*Math.sqrt(1+y-n-h);this._w=(c-a)/b,this._x=(o+p)/b,this._y=(d+v)/b,this._z=.25*b}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<1e-8?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs($t(this.dot(e),-1,1)))}rotateTowards(e,t){const n=this.angleTo(e);if(n===0)return this;const a=Math.min(1,t/n);return this.slerp(e,a),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const n=e._x,a=e._y,o=e._z,c=e._w,h=t._x,d=t._y,p=t._z,v=t._w;return this._x=n*v+c*h+a*p-o*d,this._y=a*v+c*d+o*h-n*p,this._z=o*v+c*p+n*d-a*h,this._w=c*v-n*h-a*d-o*p,this._onChangeCallback(),this}slerp(e,t){if(t===0)return this;if(t===1)return this.copy(e);const n=this._x,a=this._y,o=this._z,c=this._w;let h=c*e._w+n*e._x+a*e._y+o*e._z;if(h<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,h=-h):this.copy(e),h>=1)return this._w=c,this._x=n,this._y=a,this._z=o,this;const d=1-h*h;if(d<=Number.EPSILON){const b=1-t;return this._w=b*c+t*this._w,this._x=b*n+t*this._x,this._y=b*a+t*this._y,this._z=b*o+t*this._z,this.normalize(),this}const p=Math.sqrt(d),v=Math.atan2(p,h),y=Math.sin((1-t)*v)/p,_=Math.sin(t*v)/p;return this._w=c*y+this._w*_,this._x=n*y+this._x*_,this._y=a*y+this._y*_,this._z=o*y+this._z*_,this._onChangeCallback(),this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){const e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),n=Math.random(),a=Math.sqrt(1-n),o=Math.sqrt(n);return this.set(a*Math.sin(e),a*Math.cos(e),o*Math.sin(t),o*Math.cos(t))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class K{constructor(e=0,t=0,n=0){K.prototype.isVector3=!0,this.x=e,this.y=t,this.z=n}set(e,t,n){return n===void 0&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}
vendor: 8,852 bytes, line 64
64sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(AM.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(AM.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,n=this.y,a=this.z,o=e.elements;return this.x=o[0]*t+o[3]*n+o[6]*a,this.y=o[1]*t+o[4]*n+o[7]*a,this.z=o[2]*t+o[5]*n+o[8]*a,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,n=this.y,a=this.z,o=e.elements,c=1/(o[3]*t+o[7]*n+o[11]*a+o[15]);return this.x=(o[0]*t+o[4]*n+o[8]*a+o[12])*c,this.y=(o[1]*t+o[5]*n+o[9]*a+o[13])*c,this.z=(o[2]*t+o[6]*n+o[10]*a+o[14])*c,this}applyQuaternion(e){const t=this.x,n=this.y,a=this.z,o=e.x,c=e.y,h=e.z,d=e.w,p=2*(c*a-h*n),v=2*(h*t-o*a),y=2*(o*n-c*t);return this.x=t+d*p+c*y-h*v,this.y=n+d*v+h*p-o*y,this.z=a+d*y+o*v-c*p,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,n=this.y,a=this.z,o=e.elements;return this.x=o[0]*t+o[4]*n+o[8]*a,this.y=o[1]*t+o[5]*n+o[9]*a,this.z=o[2]*t+o[6]*n+o[10]*a,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=$t(this.x,e.x,t.x),this.y=$t(this.y,e.y,t.y),this.z=$t(this.z,e.z,t.z),this}clampScalar(e,t){return this.x=$t(this.x,e,t),this.y=$t(this.y,e,t),this.z=$t(this.z,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar($t(n,e,t))}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(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const n=e.x,a=e.y,o=e.z,c=t.x,h=t.y,d=t.z;return this.x=a*d-o*h,this.y=o*c-n*d,this.z=n*h-a*c,this}projectOnVector(e){const t=e.lengthSq();if(t===0)return this.set(0,0,0);const n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return ux.copy(this).projectOnVector(e),this.sub(ux)}reflect(e){return this.sub(ux.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const n=this.dot(e)/t;return Math.acos($t(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y,a=this.z-e.z;return t*t+n*n+a*a}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){const a=Math.sin(t)*e;return this.x=a*Math.sin(n),this.y=Math.cos(t)*e,this.z=a*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),a=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=a,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=Math.random()*Math.PI*2,t=Math.random()*2-1,n=Math.sqrt(1-t*t);return this.x=n*Math.cos(e),this.y=t,this.z=n*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const ux=new K,AM=new Qa;class cn{constructor(e,t,n,a,o,c,h,d,p){cn.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,n,a,o,c,h,d,p)}set(e,t,n,a,o,c,h,d,p){const v=this.elements;return v[0]=e,v[1]=a,v[2]=h,v[3]=t,v[4]=o,v[5]=d,v[6]=n,v[7]=c,v[8]=p,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,a=t.elements,o=this.elements,c=n[0],h=n[3],d=n[6],p=n[1],v=n[4],y=n[7],_=n[2],b=n[5],T=n[8],R=a[0],A=a[3],M=a[6],C=a[1],D=a[4],U=a[7],H=a[2],F=a[5],G=a[8];return o[0]=c*R+h*C+d*H,o[3]=c*A+h*D+d*F,o[6]=c*M+h*U+d*G,o[1]=p*R+v*C+y*H,o[4]=p*A+v*D+y*F,o[7]=p*M+v*U+y*G,o[2]=_*R+b*C+T*H,o[5]=_*A+b*D+T*F,o[8]=_*M+b*U+T*G,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[1],a=e[2],o=e[3],c=e[4],h=e[5],d=e[6],p=e[7],v=e[8];return t*c*v-t*h*p-n*o*v+n*h*d+a*o*p-a*c*d}invert(){const e=this.elements,t=e[0],n=e[1],a=e[2],o=e[3],c=e[4],h=e[5],d=e[6],p=e[7],v=e[8],y=v*c-h*p,_=h*d-v*o,b=p*o-c*d,T=t*y+n*_+a*b;if(T===0)return this.set(0,0,0,0,0,0,0,0,0);const R=1/T;return e[0]=y*R,e[1]=(a*p-v*n)*R,e[2]=(h*n-a*c)*R,e[3]=_*R,e[4]=(v*t-a*d)*R,e[5]=(a*o-h*t)*R,e[6]=b*R,e[7]=(n*d-p*t)*R,e[8]=(c*t-n*o)*R,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,a,o,c,h){const d=Math.cos(o),p=Math.sin(o);return this.set(n*d,n*p,-n*(d*c+p*h)+c+e,-a*p,a*d,-a*(-p*c+d*h)+h+t,0,0,1),this}scale(e,t){return this.premultiply(fx.makeScale(e,t)),this}rotate(e){return this.premultiply(fx.makeRotation(-e)),this}translate(e,t){return this.premultiply(fx.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,n,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,n=e.elements;for(let a=0;a<9;a++)if(t[a]!==n[a])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const fx=new cn;function qA(s){for(let e=s.length-1;e>=0;--e)if(s[e]>=65535)return!0;return!1}const MN={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function ad(s,e){return new MN[s](e)}function km(s){return document.createElementNS("http://www.w3.org/1999/xhtml",s)}
vendor: 29,697 bytes, line 64
64function YA(){const s=km("canvas");return s.style.display="block",s}const wM={};function Xm(s){s in wM||(wM[s]=!0,console.warn(s))}function EN(s,e,t){return new Promise(function(n,a){function o(){switch(s.clientWaitSync(e,s.SYNC_FLUSH_COMMANDS_BIT,0)){case s.WAIT_FAILED:a();break;case s.TIMEOUT_EXPIRED:setTimeout(o,t);break;default:n()}}setTimeout(o,t)})}const RM=new cn().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),CM=new cn().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function TN(){const s={enabled:!0,workingColorSpace:Qi,spaces:{},convert:function(a,o,c){return this.enabled===!1||o===c||!o||!c||(this.spaces[o].transfer===ni&&(a.r=Hl(a.r),a.g=Hl(a.g),a.b=Hl(a.b)),this.spaces[o].primaries!==this.spaces[c].primaries&&(a.applyMatrix3(this.spaces[o].toXYZ),a.applyMatrix3(this.spaces[c].fromXYZ)),this.spaces[c].transfer===ni&&(a.r=od(a.r),a.g=od(a.g),a.b=od(a.b))),a},workingToColorSpace:function(a,o){return this.convert(a,this.workingColorSpace,o)},colorSpaceToWorking:function(a,o){return this.convert(a,o,this.workingColorSpace)},getPrimaries:function(a){return this.spaces[a].primaries},getTransfer:function(a){return a===zl?Vm:this.spaces[a].transfer},getToneMappingMode:function(a){return this.spaces[a].outputColorSpaceConfig.toneMappingMode||"standard"},getLuminanceCoefficients:function(a,o=this.workingColorSpace){return a.fromArray(this.spaces[o].luminanceCoefficients)},define:function(a){Object.assign(this.spaces,a)},_getMatrix:function(a,o,c){return a.copy(this.spaces[o].toXYZ).multiply(this.spaces[c].fromXYZ)},_getDrawingBufferColorSpace:function(a){return this.spaces[a].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(a=this.workingColorSpace){return this.spaces[a].workingColorSpaceConfig.unpackColorSpace},fromWorkingColorSpace:function(a,o){return Xm("THREE.ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."),s.workingToColorSpace(a,o)},toWorkingColorSpace:function(a,o){return Xm("THREE.ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."),s.colorSpaceToWorking(a,o)}},e=[.64,.33,.3,.6,.15,.06],t=[.2126,.7152,.0722],n=[.3127,.329];return s.define({[Qi]:{primaries:e,whitePoint:n,transfer:Vm,toXYZ:RM,fromXYZ:CM,luminanceCoefficients:t,workingColorSpaceConfig:{unpackColorSpace:Ii},outputColorSpaceConfig:{drawingBufferColorSpace:Ii}},[Ii]:{primaries:e,whitePoint:n,transfer:ni,toXYZ:RM,fromXYZ:CM,luminanceCoefficients:t,outputColorSpaceConfig:{drawingBufferColorSpace:Ii}}}),s}const An=TN();function Hl(s){return s<.04045?s*.0773993808:Math.pow(s*.9478672986+.0521327014,2.4)}function od(s){return s<.0031308?s*12.92:1.055*Math.pow(s,.41666)-.055}let Oh;class WA{static getDataURL(e,t="image/png"){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{Oh===void 0&&(Oh=km("canvas")),Oh.width=e.width,Oh.height=e.height;const a=Oh.getContext("2d");e instanceof ImageData?a.putImageData(e,0,0):a.drawImage(e,0,0,e.width,e.height),n=Oh}return n.toDataURL(t)}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const t=km("canvas");t.width=e.width,t.height=e.height;const n=t.getContext("2d");n.drawImage(e,0,0,e.width,e.height);const a=n.getImageData(0,0,e.width,e.height),o=a.data;for(let c=0;c<o.length;c++)o[c]=Hl(o[c]/255)*255;return n.putImageData(a,0,0),t}else if(e.data){const t=e.data.slice(0);for(let n=0;n<t.length;n++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[n]=Math.floor(Hl(t[n]/255)*255):t[n]=Hl(t[n]);return{data:t,width:e.width,height:e.height}}else return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}}let AN=0;class Hc{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:AN++}),this.uuid=Js(),this.data=e,this.dataReady=!0,this.version=0}getSize(e){const t=this.data;return typeof HTMLVideoElement<"u"&&t instanceof HTMLVideoElement?e.set(t.videoWidth,t.videoHeight,0):t instanceof VideoFrame?e.set(t.displayHeight,t.displayWidth,0):t!==null?e.set(t.width,t.height,t.depth||0):e.set(0,0,0),e}set needsUpdate(e){e===!0&&this.version++}toJSON(e){const t=e===void 0||typeof e=="string";if(!t&&e.images[this.uuid]!==void 0)return e.images[this.uuid];const n={uuid:this.uuid,url:""},a=this.data;if(a!==null){let o;if(Array.isArray(a)){o=[];for(let c=0,h=a.length;c<h;c++)a[c].isDataTexture?o.push(hx(a[c].image)):o.push(hx(a[c]))}else o=hx(a);n.url=o}return t||(e.images[this.uuid]=n),n}}function hx(s){return typeof HTMLImageElement<"u"&&s instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&s instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&s instanceof ImageBitmap?WA.getDataURL(s):s.data?{data:Array.from(s.data),width:s.width,height:s.height,type:s.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}let wN=0;const dx=new K;class ei extends Qo{constructor(e=ei.DEFAULT_IMAGE,t=ei.DEFAULT_MAPPING,n=Gi,a=Gi,o=Hn,c=Tr,h=ki,d=Es,p=ei.DEFAULT_ANISOTROPY,v=zl){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:wN++}),this.uuid=Js(),this.name="",this.source=new Hc(e),this.mipmaps=[],this.mapping=t,this.channel=0,this.wrapS=n,this.wrapT=a,this.magFilter=o,this.minFilter=c,this.anisotropy=p,this.format=h,this.internalFormat=null,this.type=d,this.offset=new Je(0,0),this.repeat=new Je(1,1),this.center=new Je(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new cn,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=v,this.userData={},this.updateRanges=[],this.version=0,this.onUpdate=null,this.renderTarget=null,this.isRenderTargetTexture=!1,this.isArrayTexture=!!(e&&e.depth&&e.depth>1),this.pmremVersion=0}get width(){return this.source.getSize(dx).x}get height(){return this.source.getSize(dx).y}get depth(){return this.source.getSize(dx).z}get image(){return this.source.data}set image(e=null){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}clone(){return new this.constructor().copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.colorSpace=e.colorSpace,this.renderTarget=e.renderTarget,this.isRenderTargetTexture=e.isRenderTargetTexture,this.isArrayTexture=e.isArrayTexture,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}setValues(e){for(const t in e){const n=e[t];if(n===void 0){console.warn(`THREE.Texture.setValues(): parameter '${t}' has value of undefined.`);continue}const a=this[t];if(a===void 0){console.warn(`THREE.Texture.setValues(): property '${t}' does not exist.`);continue}a&&n&&a.isVector2&&n.isVector2||a&&n&&a.isVector3&&n.isVector3||a&&n&&a.isMatrix3&&n.isMatrix3?a.copy(n):this[t]=n}}toJSON(e){const t=e===void 0||typeof e=="string";if(!t&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];const n={metadata:{version:4.7,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).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&&(n.userData=this.userData),t||(e.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==Gc)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case Xc:e.x=e.x-Math.floor(e.x);break;case Gi:e.x=e.x<0?0:1;break;case hd:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case Xc:e.y=e.y-Math.floor(e.y);break;case Gi:e.y=e.y<0?0:1;break;case hd:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){e===!0&&this.pmremVersion++}}ei.DEFAULT_IMAGE=null;ei.DEFAULT_MAPPING=Gc;ei.DEFAULT_ANISOTROPY=1;class Gn{constructor(e=0,t=0,n=0,a=1){Gn.prototype.isVector4=!0,this.x=e,this.y=t,this.z=n,this.w=a}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,a){return this.x=e,this.y=t,this.z=n,this.w=a,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,n=this.y,a=this.z,o=this.w,c=e.elements;return this.x=c[0]*t+c[4]*n+c[8]*a+c[12]*o,this.y=c[1]*t+c[5]*n+c[9]*a+c[13]*o,this.z=c[2]*t+c[6]*n+c[10]*a+c[14]*o,this.w=c[3]*t+c[7]*n+c[11]*a+c[15]*o,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,a,o;const d=e.elements,p=d[0],v=d[4],y=d[8],_=d[1],b=d[5],T=d[9],R=d[2],A=d[6],M=d[10];if(Math.abs(v-_)<.01&&Math.abs(y-R)<.01&&Math.abs(T-A)<.01){if(Math.abs(v+_)<.1&&Math.abs(y+R)<.1&&Math.abs(T+A)<.1&&Math.abs(p+b+M-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const D=(p+1)/2,U=(b+1)/2,H=(M+1)/2,F=(v+_)/4,G=(y+R)/4,V=(T+A)/4;return D>U&&D>H?D<.01?(n=0,a=.707106781,o=.707106781):(n=Math.sqrt(D),a=F/n,o=G/n):U>H?U<.01?(n=.707106781,a=0,o=.707106781):(a=Math.sqrt(U),n=F/a,o=V/a):H<.01?(n=.707106781,a=.707106781,o=0):(o=Math.sqrt(H),n=G/o,a=V/o),this.set(n,a,o,t),this}let C=Math.sqrt((A-T)*(A-T)+(y-R)*(y-R)+(_-v)*(_-v));return Math.abs(C)<.001&&(C=1),this.x=(A-T)/C,this.y=(y-R)/C,this.z=(_-v)/C,this.w=Math.acos((p+b+M-1)/2),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this.w=t[15],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=$t(this.x,e.x,t.x),this.y=$t(this.y,e.y,t.y),this.z=$t(this.z,e.z,t.z),this.w=$t(this.w,e.w,t.w),this}clampScalar(e,t){return this.x=$t(this.x,e,t),this.y=$t(this.y,e,t),this.z=$t(this.z,e,t),this.w=$t(this.w,e,t),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar($t(n,e,t))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=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(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class _b extends Qo{constructor(e=1,t=1,n={}){super(),n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:Hn,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1,depth:1,multiview:!1},n),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=n.depth,this.scissor=new Gn(0,0,e,t),this.scissorTest=!1,this.viewport=new Gn(0,0,e,t);const a={width:e,height:t,depth:n.depth},o=new ei(a);this.textures=[];const c=n.count;for(let h=0;h<c;h++)this.textures[h]=o.clone(),this.textures[h].isRenderTargetTexture=!0,this.textures[h].renderTarget=this;this._setTextureOptions(n),this.depthBuffer=n.depthBuffer,this.stencilBuffer=n.stencilBuffer,this.resolveDepthBuffer=n.resolveDepthBuffer,this.resolveStencilBuffer=n.resolveStencilBuffer,this._depthTexture=null,this.depthTexture=n.depthTexture,this.samples=n.samples,this.multiview=n.multiview}_setTextureOptions(e={}){const t={minFilter:Hn,generateMipmaps:!1,flipY:!1,internalFormat:null};e.mapping!==void 0&&(t.mapping=e.mapping),e.wrapS!==void 0&&(t.wrapS=e.wrapS),e.wrapT!==void 0&&(t.wrapT=e.wrapT),e.wrapR!==void 0&&(t.wrapR=e.wrapR),e.magFilter!==void 0&&(t.magFilter=e.magFilter),e.minFilter!==void 0&&(t.minFilter=e.minFilter),e.format!==void 0&&(t.format=e.format),e.type!==void 0&&(t.type=e.type),e.anisotropy!==void 0&&(t.anisotropy=e.anisotropy),e.colorSpace!==void 0&&(t.colorSpace=e.colorSpace),e.flipY!==void 0&&(t.flipY=e.flipY),e.generateMipmaps!==void 0&&(t.generateMipmaps=e.generateMipmaps),e.internalFormat!==void 0&&(t.internalFormat=e.internalFormat);for(let n=0;n<this.textures.length;n++)this.textures[n].setValues(t)}get texture(){return this.textures[0]}set texture(e){this.textures[0]=e}set depthTexture(e){this._depthTexture!==null&&(this._depthTexture.renderTarget=null),e!==null&&(e.renderTarget=this),this._depthTexture=e}get depthTexture(){return this._depthTexture}setSize(e,t,n=1){if(this.width!==e||this.height!==t||this.depth!==n){this.width=e,this.height=t,this.depth=n;for(let a=0,o=this.textures.length;a<o;a++)this.textures[a].image.width=e,this.textures[a].image.height=t,this.textures[a].image.depth=n,this.textures[a].isArrayTexture=this.textures[a].image.depth>1;this.dispose()}this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.textures.length=0;for(let t=0,n=e.textures.length;t<n;t++){this.textures[t]=e.textures[t].clone(),this.textures[t].isRenderTargetTexture=!0,this.textures[t].renderTarget=this;const a=Object.assign({},e.textures[t].image);this.textures[t].source=new Hc(a)}return this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.resolveDepthBuffer=e.resolveDepthBuffer,this.resolveStencilBuffer=e.resolveStencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class $s extends _b{constructor(e=1,t=1,n={}){super(e,t,n),this.isWebGLRenderTarget=!0}}class Yy extends ei{constructor(e=null,t=1,n=1,a=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:n,depth:a},this.magFilter=oa,this.minFilter=oa,this.wrapR=Gi,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class RN extends $s{constructor(e=1,t=1,n=1,a={}){super(e,t,a),this.isWebGLArrayRenderTarget=!0,this.depth=n,this.texture=new Yy(null,e,t,n),this._setTextureOptions(a),this.texture.isRenderTargetTexture=!0}}class Wy extends ei{constructor(e=null,t=1,n=1,a=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:n,depth:a},this.magFilter=oa,this.minFilter=oa,this.wrapR=Gi,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class CN extends $s{constructor(e=1,t=1,n=1,a={}){super(e,t,a),this.isWebGL3DRenderTarget=!0,this.depth=n,this.texture=new Wy(null,e,t,n),this._setTextureOptions(a),this.texture.isRenderTargetTexture=!0}}class La{constructor(e=new K(1/0,1/0,1/0),t=new K(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t+=3)this.expandByPoint(Zr.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,n=e.count;t<n;t++)this.expandByPoint(Zr.fromBufferAttribute(e,t));return this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const n=Zr.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}setFromObject(e,t=!1){return this.makeEmpty(),this.expandByObject(e,t)}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.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(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,t=!1){e.updateWorldMatrix(!1,!1);const n=e.geometry;if(n!==void 0){const o=n.getAttribute("position");if(t===!0&&o!==void 0&&e.isInstancedMesh!==!0)for(let c=0,h=o.count;c<h;c++)e.isMesh===!0?e.getVertexPosition(c,Zr):Zr.fromBufferAttribute(o,c),Zr.applyMatrix4(e.matrixWorld),this.expandByPoint(Zr);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),Bv.copy(e.boundingBox)):(n.boundingBox===null&&n.computeBoundingBox(),Bv.copy(n.boundingBox)),Bv.applyMatrix4(e.matrixWorld),this.union(Bv)}const a=e.children;for(let o=0,c=a.length;o<c;o++)this.expandByObject(a[o],t);return this}containsPoint(e){return e.x>=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.max.z}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,Zr),Zr.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(lm),Pv.subVectors(this.max,lm),zh.subVectors(e.a,lm),Ih.subVectors(e.b,lm),Bh.subVectors(e.c,lm),Rc.subVectors(Ih,zh),Cc.subVectors(Bh,Ih),Gu.subVectors(zh,Bh);let t=[0,-Rc.z,Rc.y,0,-Cc.z,Cc.y,0,-Gu.z,Gu.y,Rc.z,0,-Rc.x,Cc.z,0,-Cc.x,Gu.z,0,-Gu.x,-Rc.y,Rc.x,0,-Cc.y,Cc.x,0,-Gu.y,Gu.x,0];return!px(t,zh,Ih,Bh,Pv)||(t=[1,0,0,0,1,0,0,0,1],!px(t,zh,Ih,Bh,Pv))?!1:(Hv.crossVectors(Rc,Cc),t=[Hv.x,Hv.y,Hv.z],px(t,zh,Ih,Bh,Pv))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Zr).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Zr).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(Rl[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Rl[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Rl[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Rl[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Rl[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Rl[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Rl[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Rl[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Rl),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}toJSON(){return{min:this.min.toArray(),max:this.max.toArray()}}fromJSON(e){return this.min.fromArray(e.min),this.max.fromArray(e.max),this}}const Rl=[new K,new K,new K,new K,new K,new K,new K,new K],Zr=new K,Bv=new La,zh=new K,Ih=new K,Bh=new K,Rc=new K,Cc=new K,Gu=new K,lm=new K,Pv=new K,Hv=new K,ku=new K;function px(s,e,t,n,a){for(let o=0,c=s.length-3;o<=c;o+=3){ku.fromArray(s,o);const h=a.x*Math.abs(ku.x)+a.y*Math.abs(ku.y)+a.z*Math.abs(ku.z),d=e.dot(ku),p=t.dot(ku),v=n.dot(ku);if(Math.max(-Math.max(d,p,v),Math.min(d,p,v))>h)return!1}return!0}const NN=new La,cm=new K,mx=new K;class Sa{constructor(e=new K,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const n=this.center;t!==void 0?n.copy(t):NN.setFromPoints(e).getCenter(n);let a=0;for(let o=0,c=e.length;o<c;o++)a=Math.max(a,n.distanceToSquared(e[o]));return this.radius=Math.sqrt(a),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){const t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){const n=this.center.distanceToSquared(e);return t.copy(e),n>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;cm.subVectors(e,this.center);const t=cm.lengthSq();if(t>this.radius*this.radius){const n=Math.sqrt(t),a=(n-this.radius)*.5;this.center.addScaledVector(cm,a/n),this.radius+=a}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(mx.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(cm.copy(e.center).add(mx)),this.expandByPoint(cm.copy(e.center).sub(mx))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}toJSON(){return{radius:this.radius,center:this.center.toArray()}}fromJSON(e){return this.radius=e.radius,this.center.fromArray(e.center),this}}const Cl=new K,gx=new K,Fv=new K,Nc=new K,vx=new K,Vv=new K,yx=new K;class Nd{constructor(e=new K,t=new K(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,Cl)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=Cl.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Cl.copy(this.origin).addScaledVector(this.direction,t),Cl.distanceToSquared(e))}distanceSqToSegment(e,t,n,a){gx.copy(e).add(t).multiplyScalar(.5),Fv.copy(t).sub(e).normalize(),Nc.copy(this.origin).sub(gx);const o=e.distanceTo(t)*.5,c=-this.direction.dot(Fv),h=Nc.dot(this.direction),d=-Nc.dot(Fv),p=Nc.lengthSq(),v=Math.abs(1-c*c);let y,_,b,T;if(v>0)if(y=c*d-h,_=c*h-d,T=o*v,y>=0)if(_>=-T)if(_<=T){const R=1/v;y*=R,_*=R,b=y*(y+c*_+2*h)+_*(c*y+_+2*d)+p}else _=o,y=Math.max(0,-(c*_+h)),b=-y*y+_*(_+2*d)+p;else _=-o,y=Math.max(0,-(c*_+h)),b=-y*y+_*(_+2*d)+p;else _<=-T?(y=Math.max(0,-(-c*o+h)),_=y>0?-o:Math.min(Math.max(-o,-d),o),b=-y*y+_*(_+2*d)+p):_<=T?(y=0,_=Math.min(Math.max(-o,-d),o),b=_*(_+2*d)+p):(y=Math.max(0,-(c*o+h)),_=y>0?o:Math.min(Math.max(-o,-d),o),b=-y*y+_*(_+2*d)+p);else _=c>0?-o:o,y=Math.max(0,-(c*_+h)),b=-y*y+_*(_+2*d)+p;return n&&n.copy(this.origin).addScaledVector(this.direction,y),a&&a.copy(gx).addScaledVector(Fv,_),b}intersectSphere(e,t){Cl.subVectors(e.center,this.origin);const n=Cl.dot(this.direction),a=Cl.dot(Cl)-n*n,o=e.radius*e.radius;if(a>o)return null;const c=Math.sqrt(o-a),h=n-c,d=n+c;return d<0?null:h<0?this.at(d,t):this.at(h,t)}intersectsSphere(e){return e.radius<0?!1:this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;const n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){const n=this.distanceToPlane(e);return n===null?null:this.at(n,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,a,o,c,h,d;const p=1/this.direction.x,v=1/this.direction.y,y=1/this.direction.z,_=this.origin;return p>=0?(n=(e.min.x-_.x)*p,a=(e.max.x-_.x)*p):(n=(e.max.x-_.x)*p,a=(e.min.x-_.x)*p),v>=0?(o=(e.min.y-_.y)*v,c=(e.max.y-_.y)*v):(o=(e.max.y-_.y)*v,c=(e.min.y-_.y)*v),n>c||o>a||((o>n||isNaN(n))&&(n=o),(c<a||isNaN(a))&&(a=c),y>=0?(h=(e.min.z-_.z)*y,d=(e.max.z-_.z)*y):(h=(e.max.z-_.z)*y,d=(e.min.z-_.z)*y),n>d||h>a)||((h>n||n!==n)&&(n=h),(d<a||a!==a)&&(a=d),a<0)?null:this.at(n>=0?n:a,t)}intersectsBox(e){return this.intersectBox(e,Cl)!==null}intersectTriangle(e,t,n,a,o){vx.subVectors(t,e),Vv.subVectors(n,e),yx.crossVectors(vx,Vv);let c=this.direction.dot(yx),h;if(c>0){if(a)return null;h=1}else if(c<0)h=-1,c=-c;else return null;Nc.subVectors(this.origin,e);const d=h*this.direction.dot(Vv.crossVectors(Nc,Vv));if(d<0)return null;const p=h*this.direction.dot(vx.cross(Nc));if(p<0||d+p>c)return null;const v=-h*Nc.dot(yx);
vendor: 5,556 bytes, line 64
64return v<0?null:this.at(v/c,o)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class jt{constructor(e,t,n,a,o,c,h,d,p,v,y,_,b,T,R,A){jt.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,t,n,a,o,c,h,d,p,v,y,_,b,T,R,A)}set(e,t,n,a,o,c,h,d,p,v,y,_,b,T,R,A){const M=this.elements;return M[0]=e,M[4]=t,M[8]=n,M[12]=a,M[1]=o,M[5]=c,M[9]=h,M[13]=d,M[2]=p,M[6]=v,M[10]=y,M[14]=_,M[3]=b,M[7]=T,M[11]=R,M[15]=A,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 jt().fromArray(this.elements)}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){const t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,n=e.elements,a=1/Ph.setFromMatrixColumn(e,0).length(),o=1/Ph.setFromMatrixColumn(e,1).length(),c=1/Ph.setFromMatrixColumn(e,2).length();return t[0]=n[0]*a,t[1]=n[1]*a,t[2]=n[2]*a,t[3]=0,t[4]=n[4]*o,t[5]=n[5]*o,t[6]=n[6]*o,t[7]=0,t[8]=n[8]*c,t[9]=n[9]*c,t[10]=n[10]*c,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,n=e.x,a=e.y,o=e.z,c=Math.cos(n),h=Math.sin(n),d=Math.cos(a),p=Math.sin(a),v=Math.cos(o),y=Math.sin(o);if(e.order==="XYZ"){const _=c*v,b=c*y,T=h*v,R=h*y;t[0]=d*v,t[4]=-d*y,t[8]=p,t[1]=b+T*p,t[5]=_-R*p,t[9]=-h*d,t[2]=R-_*p,t[6]=T+b*p,t[10]=c*d}else if(e.order==="YXZ"){const _=d*v,b=d*y,T=p*v,R=p*y;t[0]=_+R*h,t[4]=T*h-b,t[8]=c*p,t[1]=c*y,t[5]=c*v,t[9]=-h,t[2]=b*h-T,t[6]=R+_*h,t[10]=c*d}else if(e.order==="ZXY"){const _=d*v,b=d*y,T=p*v,R=p*y;t[0]=_-R*h,t[4]=-c*y,t[8]=T+b*h,t[1]=b+T*h,t[5]=c*v,t[9]=R-_*h,t[2]=-c*p,t[6]=h,t[10]=c*d}else if(e.order==="ZYX"){const _=c*v,b=c*y,T=h*v,R=h*y;t[0]=d*v,t[4]=T*p-b,t[8]=_*p+R,t[1]=d*y,t[5]=R*p+_,t[9]=b*p-T,t[2]=-p,t[6]=h*d,t[10]=c*d}else if(e.order==="YZX"){const _=c*d,b=c*p,T=h*d,R=h*p;t[0]=d*v,t[4]=R-_*y,t[8]=T*y+b,t[1]=y,t[5]=c*v,t[9]=-h*v,t[2]=-p*v,t[6]=b*y+T,t[10]=_-R*y}else if(e.order==="XZY"){const _=c*d,b=c*p,T=h*d,R=h*p;t[0]=d*v,t[4]=-y,t[8]=p*v,t[1]=_*y+R,t[5]=c*v,t[9]=b*y-T,t[2]=T*y-b,t[6]=h*v,t[10]=R*y+_}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(DN,e,UN)}lookAt(e,t,n){const a=this.elements;return Zs.subVectors(e,t),Zs.lengthSq()===0&&(Zs.z=1),Zs.normalize(),Dc.crossVectors(n,Zs),Dc.lengthSq()===0&&(Math.abs(n.z)===1?Zs.x+=1e-4:Zs.z+=1e-4,Zs.normalize(),Dc.crossVectors(n,Zs)),Dc.normalize(),Gv.crossVectors(Zs,Dc),a[0]=Dc.x,a[4]=Gv.x,a[8]=Zs.x,a[1]=Dc.y,a[5]=Gv.y,a[9]=Zs.y,a[2]=Dc.z,a[6]=Gv.z,a[10]=Zs.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,a=t.elements,o=this.elements,c=n[0],h=n[4],d=n[8],p=n[12],v=n[1],y=n[5],_=n[9],b=n[13],T=n[2],R=n[6],A=n[10],M=n[14],C=n[3],D=n[7],U=n[11],H=n[15],F=a[0],G=a[4],V=a[8],O=a[12],z=a[1],Y=a[5],se=a[9],ce=a[13],he=a[2],me=a[6],P=a[10],Q=a[14],ee=a[3],ge=a[7],Se=a[11],W=a[15];return o[0]=c*F+h*z+d*he+p*ee,o[4]=c*G+h*Y+d*me+p*ge,o[8]=c*V+h*se+d*P+p*Se,o[12]=c*O+h*ce+d*Q+p*W,o[1]=v*F+y*z+_*he+b*ee,o[5]=v*G+y*Y+_*me+b*ge,o[9]=v*V+y*se+_*P+b*Se,o[13]=v*O+y*ce+_*Q+b*W,o[2]=T*F+R*z+A*he+M*ee,o[6]=T*G+R*Y+A*me+M*ge,o[10]=T*V+R*se+A*P+M*Se,o[14]=T*O+R*ce+A*Q+M*W,o[3]=C*F+D*z+U*he+H*ee,o[7]=C*G+D*Y+U*me+H*ge,o[11]=C*V+D*se+U*P+H*Se,o[15]=C*O+D*ce+U*Q+H*W,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[4],a=e[8],o=e[12],c=e[1],h=e[5],d=e[9],p=e[13],v=e[2],y=e[6],_=e[10],b=e[14],T=e[3],R=e[7],A=e[11],M=e[15];return T*(+o*d*y-a*p*y-o*h*_+n*p*_+a*h*b-n*d*b)+R*(+t*d*b-t*p*_+o*c*_-a*c*b+a*p*v-o*d*v)+A*(+t*p*y-t*h*b-o*c*y+n*c*b+o*h*v-n*p*v)+M*(-a*h*v-t*d*y+t*h*_+a*c*y-n*c*_+n*d*v)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,n){const a=this.elements;return e.isVector3?(a[12]=e.x,a[13]=e.y,a[14]=e.z):(a[12]=e,a[13]=t,a[14]=n),this}invert(){const e=this.elements,t=e[0],n=e[1],a=e[2],o=e[3],c=e[4],h=e[5],d=e[6],p=e[7],v=e[8],y=e[9],_=e[10],b=e[11],T=e[12],R=e[13],A=e[14],M=e[15],C=y*A*p-R*_*p+R*d*b-h*A*b-y*d*M+h*_*M,D=T*_*p-v*A*p-T*d*b+c*A*b+v*d*M-c*_*M,U=v*R*p-T*y*p+T*h*b-c*R*b-v*h*M+c*y*M,H=T*y*d-v*R*d-T*h*_+c*R*_+v*h*A-c*y*A,F=t*C+n*D+a*U+o*H;if(F===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const G=1/F;return e[0]=C*G,e[1]=(R*_*o-y*A*o-R*a*b+n*A*b+y*a*M-n*_*M)*G,e[2]=(h*A*o-R*d*o+R*a*p-n*A*p-h*a*M+n*d*M)*G,e[3]=(y*d*o-h*_*o-y*a*p+n*_*p+h*a*b-n*d*b)*G,e[4]=D*G,e[5]=(v*A*o-T*_*o+T*a*b-t*A*b-v*a*M+t*_*M)*G,e[6]=(T*d*o-c*A*o-T*a*p+t*A*p+c*a*M-t*d*M)*G,e[7]=(c*_*o-v*d*o+v*a*p-t*_*p-c*a*b+t*d
vendor: 6,534 bytes, line 64
64*b)*G,e[8]=U*G,e[9]=(T*y*o-v*R*o-T*n*b+t*R*b+v*n*M-t*y*M)*G,e[10]=(c*R*o-T*h*o+T*n*p-t*R*p-c*n*M+t*h*M)*G,e[11]=(v*h*o-c*y*o-v*n*p+t*y*p+c*n*b-t*h*b)*G,e[12]=H*G,e[13]=(v*R*a-T*y*a+T*n*_-t*R*_-v*n*A+t*y*A)*G,e[14]=(T*h*a-c*R*a-T*n*d+t*R*d+c*n*A-t*h*A)*G,e[15]=(c*y*a-v*h*a+v*n*d-t*y*d-c*n*_+t*h*_)*G,this}scale(e){const t=this.elements,n=e.x,a=e.y,o=e.z;return t[0]*=n,t[4]*=a,t[8]*=o,t[1]*=n,t[5]*=a,t[9]*=o,t[2]*=n,t[6]*=a,t[10]*=o,t[3]*=n,t[7]*=a,t[11]*=o,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],a=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,a))}makeTranslation(e,t,n){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const n=Math.cos(t),a=Math.sin(t),o=1-n,c=e.x,h=e.y,d=e.z,p=o*c,v=o*h;return this.set(p*c+n,p*h-a*d,p*d+a*h,0,p*h+a*d,v*h+n,v*d-a*c,0,p*d-a*h,v*d+a*c,o*d*d+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,a,o,c){return this.set(1,n,o,0,e,1,c,0,t,a,1,0,0,0,0,1),this}compose(e,t,n){const a=this.elements,o=t._x,c=t._y,h=t._z,d=t._w,p=o+o,v=c+c,y=h+h,_=o*p,b=o*v,T=o*y,R=c*v,A=c*y,M=h*y,C=d*p,D=d*v,U=d*y,H=n.x,F=n.y,G=n.z;return a[0]=(1-(R+M))*H,a[1]=(b+U)*H,a[2]=(T-D)*H,a[3]=0,a[4]=(b-U)*F,a[5]=(1-(_+M))*F,a[6]=(A+C)*F,a[7]=0,a[8]=(T+D)*G,a[9]=(A-C)*G,a[10]=(1-(_+R))*G,a[11]=0,a[12]=e.x,a[13]=e.y,a[14]=e.z,a[15]=1,this}decompose(e,t,n){const a=this.elements;let o=Ph.set(a[0],a[1],a[2]).length();const c=Ph.set(a[4],a[5],a[6]).length(),h=Ph.set(a[8],a[9],a[10]).length();this.determinant()<0&&(o=-o),e.x=a[12],e.y=a[13],e.z=a[14],Kr.copy(this);const p=1/o,v=1/c,y=1/h;return Kr.elements[0]*=p,Kr.elements[1]*=p,Kr.elements[2]*=p,Kr.elements[4]*=v,Kr.elements[5]*=v,Kr.elements[6]*=v,Kr.elements[8]*=y,Kr.elements[9]*=y,Kr.elements[10]*=y,t.setFromRotationMatrix(Kr),n.x=o,n.y=c,n.z=h,this}makePerspective(e,t,n,a,o,c,h=Qs,d=!1){const p=this.elements,v=2*o/(t-e),y=2*o/(n-a),_=(t+e)/(t-e),b=(n+a)/(n-a);let T,R;if(d)T=o/(c-o),R=c*o/(c-o);else if(h===Qs)T=-(c+o)/(c-o),R=-2*c*o/(c-o);else if(h===_d)T=-c/(c-o),R=-c*o/(c-o);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+h);return p[0]=v,p[4]=0,p[8]=_,p[12]=0,p[1]=0,p[5]=y,p[9]=b,p[13]=0,p[2]=0,p[6]=0,p[10]=T,p[14]=R,p[3]=0,p[7]=0,p[11]=-1,p[15]=0,this}makeOrthographic(e,t,n,a,o,c,h=Qs,d=!1){const p=this.elements,v=2/(t-e),y=2/(n-a),_=-(t+e)/(t-e),b=-(n+a)/(n-a);let T,R;if(d)T=1/(c-o),R=c/(c-o);else if(h===Qs)T=-2/(c-o),R=-(c+o)/(c-o);else if(h===_d)T=-1/(c-o),R=-o/(c-o);else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+h);return p[0]=v,p[4]=0,p[8]=0,p[12]=_,p[1]=0,p[5]=y,p[9]=0,p[13]=b,p[2]=0,p[6]=0,p[10]=T,p[14]=R,p[3]=0,p[7]=0,p[11]=0,p[15]=1,this}equals(e){const t=this.elements,n=e.elements;for(let a=0;a<16;a++)if(t[a]!==n[a])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}}const Ph=new K,Kr=new jt,DN=new K(0,0,0),UN=new K(1,1,1),Dc=new K,Gv=new K,Zs=new K,NM=new jt,DM=new Qa;class er{constructor(e=0,t=0,n=0,a=er.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=n,this._order=a}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,n,a=this._order){return this._x=e,this._y=t,this._z=n,this._order=a,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,n=!0){const a=e.elements,o=a[0],c=a[4],h=a[8],d=a[1],p=a[5],v=a[9],y=a[2],_=a[6],b=a[10];switch(t){case"XYZ":this._y=Math.asin($t(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(-v,b),this._z=Math.atan2(-c,o)):(this._x=Math.atan2(_,p),this._z=0);break;case"YXZ":this._x=Math.asin(-$t(v,-1,1)),Math.abs(v)<.9999999?(this._y=Math.atan2(h,b),this._z=Math.atan2(d,p)):(this._y=Math.atan2(-y,o),this._z=0);break;case"ZXY":this._x=Math.asin($t(_,-1,1)),Math.abs(_)<.9999999?(this._y=Math.atan2(-y,b),this._z=Math.atan2(-c,p)):(this._y=0,this._z=Math.atan2(d,o));break;case"ZYX":this._y=Math.asin(-$t(y,-1,1)),Math.abs(y)<.9999999?(this._x=Math.atan2(_,b),this._z=Math.atan2(d,o)):(this._x=0,this._z=Math.atan2(-c,p));break;case"YZX":this._z=Math.asin($t(d,-1,1)),Math.abs(d)<.9999999?(this._x=Math.atan2(-v,p),this._y=Math.atan2(-y,o)):(this._x=0,this._y=Math.atan2(h,b));break;case"XZY":this._z=Math.asin(-$t(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(_,p),this._y=Math.atan2(h,o)):(this._x=Math.atan2(-v,b),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,n===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return NM.makeRotationFromQuaternion(e),this.setFromRotationMatrix(NM,t,n)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return DM.setFromEuler(this),this.setFromQuaternion(DM,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}er.DEFAULT_ORDER="XYZ";class Sd{constructor(){this.mask=1}set(e){this.mask=(1<<e|0)>>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return(this.mask&e.mask)!==0}
vendor: 5,642 bytes, line 64
64isEnabled(e){return(this.mask&(1<<e|0))!==0}}let LN=0;const UM=new K,Hh=new Qa,Nl=new jt,kv=new K,um=new K,ON=new K,zN=new Qa,LM=new K(1,0,0),OM=new K(0,1,0),zM=new K(0,0,1),IM={type:"added"},IN={type:"removed"},Fh={type:"childadded",child:null},_x={type:"childremoved",child:null};class Bn extends Qo{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:LN++}),this.uuid=Js(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Bn.DEFAULT_UP.clone();const e=new K,t=new er,n=new Qa,a=new K(1,1,1);function o(){n.setFromEuler(t,!1)}function c(){t.setFromQuaternion(n,void 0,!1)}t._onChange(o),n._onChange(c),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:n},scale:{configurable:!0,enumerable:!0,value:a},modelViewMatrix:{value:new jt},normalMatrix:{value:new cn}}),this.matrix=new jt,this.matrixWorld=new jt,this.matrixAutoUpdate=Bn.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=Bn.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new Sd,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.customDepthMaterial=void 0,this.customDistanceMaterial=void 0,this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,t){this.quaternion.setFromAxisAngle(e,t)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return Hh.setFromAxisAngle(e,t),this.quaternion.multiply(Hh),this}rotateOnWorldAxis(e,t){return Hh.setFromAxisAngle(e,t),this.quaternion.premultiply(Hh),this}rotateX(e){return this.rotateOnAxis(LM,e)}rotateY(e){return this.rotateOnAxis(OM,e)}rotateZ(e){return this.rotateOnAxis(zM,e)}translateOnAxis(e,t){return UM.copy(e).applyQuaternion(this.quaternion),this.position.add(UM.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(LM,e)}translateY(e){return this.translateOnAxis(OM,e)}translateZ(e){return this.translateOnAxis(zM,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(Nl.copy(this.matrixWorld).invert())}lookAt(e,t,n){e.isVector3?kv.copy(e):kv.set(e,t,n);const a=this.parent;this.updateWorldMatrix(!0,!1),um.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?Nl.lookAt(um,kv,this.up):Nl.lookAt(kv,um,this.up),this.quaternion.setFromRotationMatrix(Nl),a&&(Nl.extractRotation(a.matrixWorld),Hh.setFromRotationMatrix(Nl),this.quaternion.premultiply(Hh.invert()))}add(e){if(arguments.length>1){for(let t=0;t<arguments.length;t++)this.add(arguments[t]);return this}return e===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(e.removeFromParent(),e.parent=this,this.children.push(e),e.dispatchEvent(IM),Fh.child=e,this.dispatchEvent(Fh),Fh.child=null):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let n=0;n<arguments.length;n++)this.remove(arguments[n]);return this}const t=this.children.indexOf(e);return t!==-1&&(e.parent=null,this.children.splice(t,1),e.dispatchEvent(IN),_x.child=e,this.dispatchEvent(_x),_x.child=null),this}removeFromParent(){const e=this.parent;return e!==null&&e.remove(this),this}clear(){return this.remove(...this.children)}attach(e){return this.updateWorldMatrix(!0,!1),Nl.copy(this.matrixWorld).invert(),e.parent!==null&&(e.parent.updateWorldMatrix(!0,!1),Nl.multiply(e.parent.matrixWorld)),e.applyMatrix4(Nl),e.removeFromParent(),e.parent=this,this.children.push(e),e.updateWorldMatrix(!1,!0),e.dispatchEvent(IM),Fh.child=e,this.dispatchEvent(Fh),Fh.child=null,this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,t){if(this[e]===t)return this;for(let n=0,a=this.children.length;n<a;n++){const c=this.children[n].getObjectByProperty(e,t);if(c!==void 0)return c}}getObjectsByProperty(e,t,n=[]){this[e]===t&&n.push(this);const a=this.children;for(let o=0,c=a.length;o<c;o++)a[o].getObjectsByProperty(e,t,n);return n}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(um,e,ON),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(um,zN,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let n=0,a=t.length;n<a;n++)t[n].traverse(e)}traverseVisible(e){if(this.visible===!1)return;e(this);const t=this.children;for(let n=0,a=t.length;n<a;n++)t[n].traverseVisible(e)}traverseAncestors(e){const t=this.parent;t!==null&&(e(t),t.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix
vendor: 11,588 bytes, line 64
64):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,e=!0);const t=this.children;for(let n=0,a=t.length;n<a;n++)t[n].updateMatrixWorld(e)}updateWorldMatrix(e,t){const n=this.parent;if(e===!0&&n!==null&&n.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)),t===!0){const a=this.children;for(let o=0,c=a.length;o<c;o++)a[o].updateWorldMatrix(!1,!0)}}toJSON(e){const t=e===void 0||typeof e=="string",n={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},n.metadata={version:4.7,type:"Object",generator:"Object3D.toJSON"});const a={};a.uuid=this.uuid,a.type=this.type,this.name!==""&&(a.name=this.name),this.castShadow===!0&&(a.castShadow=!0),this.receiveShadow===!0&&(a.receiveShadow=!0),this.visible===!1&&(a.visible=!1),this.frustumCulled===!1&&(a.frustumCulled=!1),this.renderOrder!==0&&(a.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(a.userData=this.userData),a.layers=this.layers.mask,a.matrix=this.matrix.toArray(),a.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(a.matrixAutoUpdate=!1),this.isInstancedMesh&&(a.type="InstancedMesh",a.count=this.count,a.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(a.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(a.type="BatchedMesh",a.perObjectFrustumCulled=this.perObjectFrustumCulled,a.sortObjects=this.sortObjects,a.drawRanges=this._drawRanges,a.reservedRanges=this._reservedRanges,a.geometryInfo=this._geometryInfo.map(h=>({...h,boundingBox:h.boundingBox?h.boundingBox.toJSON():void 0,boundingSphere:h.boundingSphere?h.boundingSphere.toJSON():void 0})),a.instanceInfo=this._instanceInfo.map(h=>({...h})),a.availableInstanceIds=this._availableInstanceIds.slice(),a.availableGeometryIds=this._availableGeometryIds.slice(),a.nextIndexStart=this._nextIndexStart,a.nextVertexStart=this._nextVertexStart,a.geometryCount=this._geometryCount,a.maxInstanceCount=this._maxInstanceCount,a.maxVertexCount=this._maxVertexCount,a.maxIndexCount=this._maxIndexCount,a.geometryInitialized=this._geometryInitialized,a.matricesTexture=this._matricesTexture.toJSON(e),a.indirectTexture=this._indirectTexture.toJSON(e),this._colorsTexture!==null&&(a.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(a.boundingSphere=this.boundingSphere.toJSON()),this.boundingBox!==null&&(a.boundingBox=this.boundingBox.toJSON()));function o(h,d){return h[d.uuid]===void 0&&(h[d.uuid]=d.toJSON(e)),d.uuid}if(this.isScene)this.background&&(this.background.isColor?a.background=this.background.toJSON():this.background.isTexture&&(a.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(a.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){a.geometry=o(e.geometries,this.geometry);const h=this.geometry.parameters;if(h!==void 0&&h.shapes!==void 0){const d=h.shapes;if(Array.isArray(d))for(let p=0,v=d.length;p<v;p++){const y=d[p];o(e.shapes,y)}else o(e.shapes,d)}}if(this.isSkinnedMesh&&(a.bindMode=this.bindMode,a.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(o(e.skeletons,this.skeleton),a.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){const h=[];for(let d=0,p=this.material.length;d<p;d++)h.push(o(e.materials,this.material[d]));a.material=h}else a.material=o(e.materials,this.material);if(this.children.length>0){a.children=[];for(let h=0;h<this.children.length;h++)a.children.push(this.children[h].toJSON(e).object)}if(this.animations.length>0){a.animations=[];for(let h=0;h<this.animations.length;h++){const d=this.animations[h];a.animations.push(o(e.animations,d))}}if(t){const h=c(e.geometries),d=c(e.materials),p=c(e.textures),v=c(e.images),y=c(e.shapes),_=c(e.skeletons),b=c(e.animations),T=c(e.nodes);h.length>0&&(n.geometries=h),d.length>0&&(n.materials=d),p.length>0&&(n.textures=p),v.length>0&&(n.images=v),y.length>0&&(n.shapes=y),_.length>0&&(n.skeletons=_),b.length>0&&(n.animations=b),T.length>0&&(n.nodes=T)}return n.object=a,n;function c(h){const d=[];for(const p in h){const v=h[p];delete v.metadata,d.push(v)}return d}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let n=0;n<e.children.length;n++){const a=e.children[n];this.add(a.clone())}return this}}Bn.DEFAULT_UP=new K(0,1,0);Bn.DEFAULT_MATRIX_AUTO_UPDATE=!0;Bn.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;const Qr=new K,Dl=new K,xx=new K,Ul=new K,Vh=new K,Gh=new K,BM=new K,Sx=new K,bx=new K,Mx=new K,Ex=new Gn,Tx=new Gn,Ax=new Gn;class Is{constructor(e=new K,t=new K,n=new K){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,a){a.subVectors(n,t),Qr.subVectors(e,t),a.cross(Qr);const o=a.lengthSq();return o>0?a.multiplyScalar(1/Math.sqrt(o)):a.set(0,0,0)}static getBarycoord(e,t,n,a,o){Qr.subVectors(a,t),Dl.subVectors(n,t),xx.subVectors(e,t);const c=Qr.dot(Qr),h=Qr.dot(Dl),d=Qr.dot(xx),p=Dl.dot(Dl),v=Dl.dot(xx),y=c*p-h*h;if(y===0)return o.set(0,0,0),null;const _=1/y,b=(p*d-h*v)*_,T=(c*v-h*d)*_;return o.set(1-b-T,T,b)}static containsPoint(e,t,n,a){return this.getBarycoord(e,t,n,a,Ul)===null?!1:Ul.x>=0&&Ul.y>=0&&Ul.x+Ul.y<=1}static getInterpolation(e,t,n,a,o,c,h,d){return this.getBarycoord(e,t,n,a,Ul)===null?(d.x=0,d.y=0,"z"in d&&(d.z=0),"w"in d&&(d.w=0),null):(d.setScalar(0),d.addScaledVector(o,Ul.x),d.addScaledVector(c,Ul.y),d.addScaledVector(h,Ul.z),d)}static getInterpolatedAttribute(e,t,n,a,o,c){return Ex.setScalar(0),Tx.setScalar(0),Ax.setScalar(0),Ex.fromBufferAttribute(e,t),Tx.fromBufferAttribute(e,n),Ax.fromBufferAttribute(e,a),c.setScalar(0),c.addScaledVector(Ex,o.x),c.addScaledVector(Tx,o.y),c.addScaledVector(Ax,o.z),c}static isFrontFacing(e,t,n,a){return Qr.subVectors(n,t),Dl.subVectors(e,t),Qr.cross(Dl).dot(a)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,a){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[a]),this}setFromAttributeAndIndices(e,t,n,a){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,a),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Qr.subVectors(this.c,this.b),Dl.subVectors(this.a,this.b),Qr.cross(Dl).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Is.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return Is.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,n,a,o){return Is.getInterpolation(e,this.a,this.b,this.c,t,n,a,o)}containsPoint(e){return Is.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Is.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const n=this.a,a=this.b,o=this.c;let c,h;Vh.subVectors(a,n),Gh.subVectors(o,n),Sx.subVectors(e,n);const d=Vh.dot(Sx),p=Gh.dot(Sx);if(d<=0&&p<=0)return t.copy(n);bx.subVectors(e,a);const v=Vh.dot(bx),y=Gh.dot(bx);if(v>=0&&y<=v)return t.copy(a);const _=d*y-v*p;if(_<=0&&d>=0&&v<=0)return c=d/(d-v),t.copy(n).addScaledVector(Vh,c);Mx.subVectors(e,o);const b=Vh.dot(Mx),T=Gh.dot(Mx);if(T>=0&&b<=T)return t.copy(o);const R=b*p-d*T;if(R<=0&&p>=0&&T<=0)return h=p/(p-T),t.copy(n).addScaledVector(Gh,h);const A=v*T-b*y;if(A<=0&&y-v>=0&&b-T>=0)return BM.subVectors(o,a),h=(y-v)/(y-v+(b-T)),t.copy(a).addScaledVector(BM,h);const M=1/(A+R+_);return c=R*M,h=_*M,t.copy(n).addScaledVector(Vh,c).addScaledVector(Gh,h)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const ZA={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},Uc={h:0,s:0,l:0},Xv={h:0,s:0,l:0};function wx(s,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?s+(e-s)*6*t:t<1/2?e:t<2/3?s+(e-s)*6*(2/3-t):s}class _t{constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,n)}set(e,t,n){if(t===void 0&&n===void 0){const a=e;a&&a.isColor?this.copy(a):typeof a=="number"?this.setHex(a):typeof a=="str
64ing"&&this.setStyle(a)}else this.setRGB(e,t,n);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=Ii){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,An.colorSpaceToWorking(this,t),this}setRGB(e,t,n,a=An.workingColorSpace){return this.r=e,this.g=t,this.b=n,An.colorSpaceToWorking(this,a),this}setHSL(e,t,n,a=An.workingColorSpace){if(e=vb(e,1),t=$t(t,0,1),n=$t(n,0,1),t===0)this.r=this.g=this.b=n;else{const o=n<=.5?n*(1+t):n+t-n*t,c=2*n-o;this.r=wx(c,o,e+1/3),this.g=wx(c,o,e),this.b=wx(c,o,e-1/3)}return An.colorSpaceToWorking(this,a),this}setStyle(e,t=Ii){function n(o){o!==void 0&&parseFloat(o)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let a;if(a=/^(\w+)\(([^\)]*)\)/.exec(e)){let o;const c=a[1],h=a[2];switch(c){case"rgb":case"rgba":if(o=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(h))return n(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,t);if(o=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(h))return n(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,t);break;case"hsl":case"hsla":if(o=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(h))return n(o[4]),this.setHSL(parseFloat(o[1])/360,parseFloat(o[2])/100,parseFloat(o[3])/100,t);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(a=/^\#([A-Fa-f\d]+)$/.exec(e)){const o=a[1],c=o.length;if(c===3)return this.setRGB(parseInt(o.charAt(0),16)/15,parseInt(o.charAt(1),16)/15,parseInt(o.charAt(2),16)/15,t);if(c===6)return this.setHex(parseInt(o,16),t);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=Ii){const n=ZA[e.toLowerCase()];return n!==void 0?this.setHex(n,t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Hl(e.r),this.g=Hl(e.g),this.b=Hl(e.b),this}copyLinearToSRGB(e){return this.r=od(e.r),this.g=od(e.g),this.b=od(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Ii){return An.workingToColorSpace(Wa.copy(this),e),Math.round($t(Wa.r*255,0,255))*65536+Math.round($t(Wa.g*255,0,255))*256+Math.round($t(Wa.b*255,0,255))}getHexString(e=Ii){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=An.workingColorSpace){An.workingToColorSpace(Wa.copy(this),t);const n=Wa.r,a=Wa.g,o=Wa.b,c=Math.max(n,a,o),h=Math.min(n,a,o);let d,p;const v=(h+c)/2;if(h===c)d=0,p=0;else{const y=c-h;switch(p=v<=.5?y/(c+h):y/(2-c-h),c){case n:d=(a-o)/y+(a<o?6:0);break;case a:d=(o-n)/y+2;break;case o:d=(n-a)/y+4;break}d/=6}return e.h=d,e.s=p,e.l=v,e}getRGB(e,t=An.workingColorSpace){return An.workingToColorSpace(Wa.copy(this),t),e.r=Wa.r,e.g=Wa.g,e.b=Wa.b,e}getStyle(e=Ii){An.workingToColorSpace(Wa.copy(this),e);const t=Wa.r,n=Wa.g,a=Wa.b;return e!==Ii?`color(${e} ${t.toFixed(3)} ${n.toFixed(3)} ${a.toFixed(3)})`:`rgb(${Math.round(t*255)},${Math.round(n*255)},${Math.round(a*255)})`}offsetHSL(e,t,n){return this.getHSL(Uc),this.setHSL(Uc.h+e,Uc.s+t,Uc.l+n)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this}lerpHSL(e,t){this.getHSL(Uc),e.getHSL(Xv);const n=Dm(Uc.h,Xv.h,t),a=Dm(Uc.s,Xv.s,t),o=Dm(Uc.l,Xv.l,t);return this.setHSL(n,a,o),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){const t=this.r,n=this.g,a=this.b,o=e.elements;return this.r=o[0]*t+o[3]*n+o[6]*a,this.g=o[1]*t+o[4]*n+o[7]*a,this.b=o[2]*t+o[5]*n+o[8]*a,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const Wa=new _t;_t.NAMES=ZA;let BN=0;class la extends Qo{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:BN++}),this.uuid=Js(),this.name="",this.type="Material",this.blending=df,this.side=ao,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=G0,this.blendDst=k0,this.blendEquation=Pc,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new _t(0,0,0),this.blendAlpha=0,this.depthFunc=gf,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=zS,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=af,this.stencilZFail=af,this.stencilZPass=af,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.allowOverride=!0,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const t in e){const n=e[t];if(n===void 0){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}const a=this[t];if(a===void 0){console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`);continue}a&&a.isColor?a.set(n):a&&a.isVector3&&n&&n.isVector3?a.copy(n):this[t]=n}}toJSON(e){const t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});const n={metadata:{version:4.7,type:"Material",generator:"Material.toJSON"}};
vendor: 8,935 bytes, line 64
64n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.sheen!==void 0&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearcoat!==void 0&&(n.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.sheenColorMap&&this.sheenColorMap.isTexture&&(n.sheenColorMap=this.sheenColorMap.toJSON(e).uuid),this.sheenRoughnessMap&&this.sheenRoughnessMap.isTexture&&(n.sheenRoughnessMap=this.sheenRoughnessMap.toJSON(e).uuid),this.dispersion!==void 0&&(n.dispersion=this.dispersion),this.iridescence!==void 0&&(n.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(n.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(n.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(n.combine=this.combine)),this.envMapRotation!==void 0&&(n.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(n.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(n.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(n.size=this.size),this.shadowSide!==null&&(n.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==df&&(n.blending=this.blending),this.side!==ao&&(n.side=this.side),this.vertexColors===!0&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=!0),this.blendSrc!==G0&&(n.blendSrc=this.blendSrc),this.blendDst!==k0&&(n.blendDst=this.blendDst),this.blendEquation!==Pc&&(n.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(n.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(n.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(n.blendAlpha=this.blendAlpha),this.depthFunc!==gf&&(n.depthFunc=this.depthFunc),this.depthTest===!1&&(n.depthTest=this.depthTest),this.depthWrite===!1&&(n.depthWrite=this.depthWrite),this.colorWrite===!1&&(n.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(n.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==zS&&(n.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(n.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==af&&(n.stencilFail=this.stencilFail),this.stencilZFail!==af&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==af&&(n.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(n.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),this.alphaHash===!0&&(n.alphaHash=!0),this.alphaToCoverage===!0&&(n.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=!0),this.forceSinglePass===!0&&(n.forceSinglePass=!0),this.wireframe===!0&&(n.wireframe=!0),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(n.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(n.flatShading=!0),this.visible===!1&&(n.visible=!1),this.toneMapped===!1&&(n.toneMapped=!1),this.fog===!1&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData);function a(o){const c=[];for(const h in o){const d=o[h];delete d.metadata,c.push(d)}return c}if(t){const o=a(e.textures),c=a(e.images);o.length>0&&(n.textures=o),c.length>0&&(n.images=c)}return n}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let n=null;if(t!==null){const a=t.length;n=new Array(a);for(let o=0;o!==a;
vendor: 4,115 bytes, line 64
64++o)n[o]=t[o].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}class Bs extends la{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new _t(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 er,this.combine=tg,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const Il=PN();function PN(){const s=new ArrayBuffer(4),e=new Float32Array(s),t=new Uint32Array(s),n=new Uint32Array(512),a=new Uint32Array(512);for(let d=0;d<256;++d){const p=d-127;p<-27?(n[d]=0,n[d|256]=32768,a[d]=24,a[d|256]=24):p<-14?(n[d]=1024>>-p-14,n[d|256]=1024>>-p-14|32768,a[d]=-p-1,a[d|256]=-p-1):p<=15?(n[d]=p+15<<10,n[d|256]=p+15<<10|32768,a[d]=13,a[d|256]=13):p<128?(n[d]=31744,n[d|256]=64512,a[d]=24,a[d|256]=24):(n[d]=31744,n[d|256]=64512,a[d]=13,a[d|256]=13)}const o=new Uint32Array(2048),c=new Uint32Array(64),h=new Uint32Array(64);for(let d=1;d<1024;++d){let p=d<<13,v=0;for(;(p&8388608)===0;)p<<=1,v-=8388608;p&=-8388609,v+=947912704,o[d]=p|v}for(let d=1024;d<2048;++d)o[d]=939524096+(d-1024<<13);for(let d=1;d<31;++d)c[d]=d<<23;c[31]=1199570944,c[32]=2147483648;for(let d=33;d<63;++d)c[d]=2147483648+(d-32<<23);c[63]=3347054592;for(let d=1;d<64;++d)d!==32&&(h[d]=1024);return{floatView:e,uint32View:t,baseTable:n,shiftTable:a,mantissaTable:o,exponentTable:c,offsetTable:h}}function zs(s){Math.abs(s)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),s=$t(s,-65504,65504),Il.floatView[0]=s;const e=Il.uint32View[0],t=e>>23&511;return Il.baseTable[t]+((e&8388607)>>Il.shiftTable[t])}function Mm(s){const e=s>>10;return Il.uint32View[0]=Il.mantissaTable[Il.offsetTable[e]+(s&1023)]+Il.exponentTable[e],Il.floatView[0]}class uf{static toHalfFloat(e){return zs(e)}static fromHalfFloat(e){return Mm(e)}}const Ki=new K,jv=new Je;let HN=0;class Qn{constructor(e,t,n=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:HN++}),this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=n,this.usage=Gm,this.updateRanges=[],this.gpuType=bi,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;
vendor: 4,689 bytes, line 64
64for(let a=0,o=this.itemSize;a<o;a++)this.array[e+a]=t.array[n+a];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let t=0,n=this.count;t<n;t++)jv.fromBufferAttribute(this,t),jv.applyMatrix3(e),this.setXY(t,jv.x,jv.y);else if(this.itemSize===3)for(let t=0,n=this.count;t<n;t++)Ki.fromBufferAttribute(this,t),Ki.applyMatrix3(e),this.setXYZ(t,Ki.x,Ki.y,Ki.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t<n;t++)Ki.fromBufferAttribute(this,t),Ki.applyMatrix4(e),this.setXYZ(t,Ki.x,Ki.y,Ki.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)Ki.fromBufferAttribute(this,t),Ki.applyNormalMatrix(e),this.setXYZ(t,Ki.x,Ki.y,Ki.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)Ki.fromBufferAttribute(this,t),Ki.transformDirection(e),this.setXYZ(t,Ki.x,Ki.y,Ki.z);return this}set(e,t=0){return this.array.set(e,t),this}getComponent(e,t){let n=this.array[e*this.itemSize+t];return this.normalized&&(n=bs(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=fn(n,this.array)),this.array[e*this.itemSize+t]=n,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=bs(t,this.array)),t}setX(e,t){return this.normalized&&(t=fn(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=bs(t,this.array)),t}setY(e,t){return this.normalized&&(t=fn(t,this.array)),this.array[e*this.itemSize+1]=t,this}getZ(e){let t=this.array[e*this.itemSize+2];return this.normalized&&(t=bs(t,this.array)),t}setZ(e,t){return this.normalized&&(t=fn(t,this.array)),this.array[e*this.itemSize+2]=t,this}getW(e){let t=this.array[e*this.itemSize+3];return this.normalized&&(t=bs(t,this.array)),t}setW(e,t){return this.normalized&&(t=fn(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=fn(t,this.array),n=fn(n,this.array)),this.array[e+0]=t,this.array[e+1]=n,this}setXYZ(e,t,n,a){return e*=this.itemSize,this.normalized&&(t=fn(t,this.array),n=fn(n,this.array),a=fn(a,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=a,this}setXYZW(e,t,n,a,o){return e*=this.itemSize,this.normalized&&(t=fn(t,this.array),n=fn(n,this.array),a=fn(a,this.array),o=fn(o,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=a,this.array[e+3]=o,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==""&&(e.name=this.name),this.usage!==Gm&&(e.usage=this.usage),e}}class FN extends Qn{constructor(e,t,n){super(new Int8Array(e),t,n)}}class VN extends Qn{constructor(e,t,n){super(new Uint8Array(e),t,n)}}class GN extends Qn{constructor(e,t,n){super(new Uint8ClampedArray(e),t,n)}}class kN extends Qn{constructor(e,t,n){super(new Int16Array(e),t,n)}}class xb extends Qn{constructor(e,t,n){super(new Uint16Array(e),t,n)}}class XN extends Qn{constructor(e,t,n){super(new Int32Array(e),t,n)}}class Sb extends Qn{constructor(e,t,n){super(new Uint32Array(e),t,n)}}class jN extends Qn{constructor(e,t,n){super(new Uint16Array(e),t,n),this.isFloat16BufferAttribute=!0}getX(e){let t=Mm(this.array[e*this.itemSize]);return this.normalized&&(t=bs(t,this.array)),t}setX(e,t){return this.normalized&&(t=fn(t,this.array)),this.array[e*this.itemSize]=zs(t),this}getY(e){let t=Mm(this.array[e*this.itemSize+1]);return this.normalized&&(t=bs(t,this.array)),t}setY(e,t){return this.normalized&&(t=fn(t,this.array)),this.array[e*this.itemSize+1]=zs(t),this}getZ(e){let t=Mm(this.array[e*this.itemSize+2]);return this.normalized&&(t=bs(t,this.array)),t}setZ(e,t){return this.normalized&&(t=fn(t,this.array)),this.array[e*this.itemSize+2]=zs(t),this}getW(e){let t=Mm(this.array[e*this.itemSize+3]);return this.normalized&&(t=bs(t,this.array)),t}setW(e,t){return this.normalized&&(t=fn(t,this.array)),this.array[e*this.itemSize+3]=zs(t),this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=fn(t,this.array),n=fn(n,this.array)),this.array[e+0]=zs(t),this.array[e+1]=zs(n),this}setXYZ(e,t,n,a){return e*=this.itemSize,this.normalized&&(t=fn(t,this.array),n=fn(n,this.array),a=fn(a,this.array)),this.array[e+0]=zs(t),this.array[e+1]=zs(n),this.array[e+2]=zs(a),this}setXYZW(e,t,n,a,o){return e*=this.itemSize,this.normalized&&(t=fn(t,this.array),n=fn(n,this.array),a=fn(a,this.array),o=fn(o,this.array)),this.array[e+0]=zs(t),this.array[e+1]=zs(n),this.array[e+2]=zs(a),this.array[e+3]=zs(o),this}}class Ot extends Qn{constructor(e,t,n){super(new Float32Array(e),t,n)}}let qN=0;
vendor: 4,106 bytes, line 64
64const Sr=new jt,Rx=new Bn,kh=new K,Ks=new La,fm=new La,xa=new K;class un extends Qo{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:qN++}),this.uuid=Js(),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(e){return Array.isArray(e)?this.index=new(qA(e)?Sb:xb)(e,1):this.index=e,this}setIndirect(e){return this.indirect=e,this}getIndirect(){return this.indirect}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,t,n=0){this.groups.push({start:e,count:t,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){const t=this.attributes.position;t!==void 0&&(t.applyMatrix4(e),t.needsUpdate=!0);const n=this.attributes.normal;if(n!==void 0){const o=new cn().getNormalMatrix(e);n.applyNormalMatrix(o),n.needsUpdate=!0}const a=this.attributes.tangent;return a!==void 0&&(a.transformDirection(e),a.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return Sr.makeRotationFromQuaternion(e),this.applyMatrix4(Sr),this}rotateX(e){return Sr.makeRotationX(e),this.applyMatrix4(Sr),this}rotateY(e){return Sr.makeRotationY(e),this.applyMatrix4(Sr),this}rotateZ(e){return Sr.makeRotationZ(e),this.applyMatrix4(Sr),this}translate(e,t,n){return Sr.makeTranslation(e,t,n),this.applyMatrix4(Sr),this}scale(e,t,n){return Sr.makeScale(e,t,n),this.applyMatrix4(Sr),this}lookAt(e){return Rx.lookAt(e),Rx.updateMatrix(),this.applyMatrix4(Rx.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(kh).negate(),this.translate(kh.x,kh.y,kh.z),this}setFromPoints(e){const t=this.getAttribute("position");if(t===void 0){const n=[];for(let a=0,o=e.length;a<o;a++){const c=e[a];n.push(c.x,c.y,c.z||0)}this.setAttribute("position",new Ot(n,3))}else{const n=Math.min(e.length,t.count);for(let a=0;a<n;a++){const o=e[a];t.setXYZ(a,o.x,o.y,o.z||0)}e.length>t.count&&console.warn("THREE.BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),t.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new La);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new K(-1/0,-1/0,-1/0),new K(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let n=0,a=t.length;n<a;n++){const o=t[n];Ks.setFromBufferAttribute(o),this.morphTargetsRelative?(xa.addVectors(this.boundingBox.min,Ks.min),this.boundingBox.expandByPoint(xa),xa.addVectors(this.boundingBox.max,Ks.max),this.boundingBox.expandByPoint(xa)):(this.boundingBox.expandByPoint(Ks.min),this.boundingBox.expandByPoint(Ks.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 Sa);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new K,1/0);return}if(e){const n=this.boundingSphere.center;if(Ks.setFromBufferAttribute(e),t)for(let o=0,c=t.length;o<c;o++){const h=t[o];fm.setFromBufferAttribute(h),this.morphTargetsRelative?(xa.addVectors(Ks.min,fm.min),Ks.exp
vendor: 4,393 bytes, line 64
64andByPoint(xa),xa.addVectors(Ks.max,fm.max),Ks.expandByPoint(xa)):(Ks.expandByPoint(fm.min),Ks.expandByPoint(fm.max))}Ks.getCenter(n);let a=0;for(let o=0,c=e.count;o<c;o++)xa.fromBufferAttribute(e,o),a=Math.max(a,n.distanceToSquared(xa));if(t)for(let o=0,c=t.length;o<c;o++){const h=t[o],d=this.morphTargetsRelative;for(let p=0,v=h.count;p<v;p++)xa.fromBufferAttribute(h,p),d&&(kh.fromBufferAttribute(e,p),xa.add(kh)),a=Math.max(a,n.distanceToSquared(xa))}this.boundingSphere.radius=Math.sqrt(a),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 e=this.index,t=this.attributes;if(e===null||t.position===void 0||t.normal===void 0||t.uv===void 0){console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}const n=t.position,a=t.normal,o=t.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new Qn(new Float32Array(4*n.count),4));const c=this.getAttribute("tangent"),h=[],d=[];for(let V=0;V<n.count;V++)h[V]=new K,d[V]=new K;const p=new K,v=new K,y=new K,_=new Je,b=new Je,T=new Je,R=new K,A=new K;function M(V,O,z){p.fromBufferAttribute(n,V),v.fromBufferAttribute(n,O),y.fromBufferAttribute(n,z),_.fromBufferAttribute(o,V),b.fromBufferAttribute(o,O),T.fromBufferAttribute(o,z),v.sub(p),y.sub(p),b.sub(_),T.sub(_);const Y=1/(b.x*T.y-T.x*b.y);isFinite(Y)&&(R.copy(v).multiplyScalar(T.y).addScaledVector(y,-b.y).multiplyScalar(Y),A.copy(y).multiplyScalar(b.x).addScaledVector(v,-T.x).multiplyScalar(Y),h[V].add(R),h[O].add(R),h[z].add(R),d[V].add(A),d[O].add(A),d[z].add(A))}let C=this.groups;C.length===0&&(C=[{start:0,count:e.count}]);for(let V=0,O=C.length;V<O;++V){const z=C[V],Y=z.start,se=z.count;for(let ce=Y,he=Y+se;ce<he;ce+=3)M(e.getX(ce+0),e.getX(ce+1),e.getX(ce+2))}const D=new K,U=new K,H=new K,F=new K;function G(V){H.fromBufferAttribute(a,V),F.copy(H);const O=h[V];D.copy(O),D.sub(H.multiplyScalar(H.dot(O))).normalize(),U.crossVectors(F,O);const Y=U.dot(d[V])<0?-1:1;c.setXYZW(V,D.x,D.y,D.z,Y)}for(let V=0,O=C.length;V<O;++V){const z=C[V],Y=z.start,se=z.count;for(let ce=Y,he=Y+se;ce<he;ce+=3)G(e.getX(ce+0)),G(e.getX(ce+1)),G(e.getX(ce+2))}}computeVertexNormals(){const e=this.index,t=this.getAttribute("position");if(t!==void 0){let n=this.getAttribute("normal");if(n===void 0)n=new Qn(new Float32Array(t.count*3),3),this.setAttribute("normal",n);else for(let _=0,b=n.count;_<b;_++)n.setXYZ(_,0,0,0);const a=new K,o=new K,c=new K,h=new K,d=new K,p=new K,v=new K,y=new K;if(e)for(let _=0,b=e.count;_<b;_+=3){const T=e.getX(_+0),R=e.getX(_+1),A=e.getX(_+2);a.fromBufferAttribute(t,T),o.fromBufferAttribute(t,R),c.fromBufferAttribute(t,A),v.subVectors(c,o),y.subVectors(a,o),v.cross(y),h.fromBufferAttribute(n,T),d.fromBufferAttribute(n,R),p.fromBufferAttribute(n,A),h.add(v),d.add(v),p.add(v),n.setXYZ(T,h.x,h.y,h.z),n.setXYZ(R,d.x,d.y,d.z),n.setXYZ(A,p.x,p.y,p.z)}else for(let _=0,b=t.count;_<b;_+=3)a.fromBufferAttribute(t,_+0),o.fromBufferAttribute(t,_+1),c.fromBufferAttribute(t,_+2),v.subVectors(c,o),y.subVectors(a,o),v.cross(y),n.setXYZ(_+0,v.x,v.y,v.z),n.setXYZ(_+1,v.x,v.y,v.z),n.setXYZ(_+2,v.x,v.y,v.z);this.normalizeNormals(),n.needsUpdate=!0}}normalizeNormals(){const e=this.attributes.normal;for(let t=0,n=e.count;t<n;t++)xa.fromBufferAttribute(e,t),xa.normalize(),e.setXYZ(t,xa.x,xa.y,xa.z)}toNonIndexed(){function e(h,d){const p=h.array,v=h.itemSize,y=h.normalized,_=new p.constructor(d.length*v);let b=0,T=0;for(let R=0,A=d.length;R<A;R++){h.isInterleavedBufferAttribute?b=d[R]*h.data.stride+h.offset:b=d[R]*v;for(let M=0;M<v;M++)_[T++]=p[b++]}return new Qn(_,v,y)}if(this.index===null)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const t=new un,n=this.index.array,a=this.attributes;for(const h in a){const d=a[h],p=e(d,n);t.setAttribute(h,p)}const o=this.morphAttributes;for(const h in o){const d=[],p=o[h];for(let v=0,y=p.length;v<y;v++){const _=p[v],b=e(_,n);d.push(b)}t.morphAttributes[h]=d}t.morphTargetsRelative=this.morphTargetsRelative;const c=this.groups;for(let h=0,d=c.length;h<d;h++){const p=c[h];t.addGroup(p.start,p.count,p.materialIndex)}return t}toJSON(){const e={metadata:{version:4.7,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};
vendor: 5,151 bytes, line 64
64if(e.uuid=this.uuid,e.type=this.type,this.name!==""&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),this.parameters!==void 0){const d=this.parameters;for(const p in d)d[p]!==void 0&&(e[p]=d[p]);return e}e.data={attributes:{}};const t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const n=this.attributes;for(const d in n){const p=n[d];e.data.attributes[d]=p.toJSON(e.data)}const a={};let o=!1;for(const d in this.morphAttributes){const p=this.morphAttributes[d],v=[];for(let y=0,_=p.length;y<_;y++){const b=p[y];v.push(b.toJSON(e.data))}v.length>0&&(a[d]=v,o=!0)}o&&(e.data.morphAttributes=a,e.data.morphTargetsRelative=this.morphTargetsRelative);const c=this.groups;c.length>0&&(e.data.groups=JSON.parse(JSON.stringify(c)));const h=this.boundingSphere;return h!==null&&(e.data.boundingSphere=h.toJSON()),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const n=e.index;n!==null&&this.setIndex(n.clone());const a=e.attributes;for(const p in a){const v=a[p];this.setAttribute(p,v.clone(t))}const o=e.morphAttributes;for(const p in o){const v=[],y=o[p];for(let _=0,b=y.length;_<b;_++)v.push(y[_].clone(t));this.morphAttributes[p]=v}this.morphTargetsRelative=e.morphTargetsRelative;const c=e.groups;for(let p=0,v=c.length;p<v;p++){const y=c[p];this.addGroup(y.start,y.count,y.materialIndex)}const h=e.boundingBox;h!==null&&(this.boundingBox=h.clone());const d=e.boundingSphere;return d!==null&&(this.boundingSphere=d.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}const PM=new jt,Xu=new Nd,qv=new Sa,HM=new K,Yv=new K,Wv=new K,Zv=new K,Cx=new K,Kv=new K,FM=new K,Qv=new K;class Mi extends Bn{constructor(e=new un,t=new Bs){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.count=1,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),e.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){const t=this.geometry.morphAttributes,n=Object.keys(t);if(n.length>0){const a=t[n[0]];if(a!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,c=a.length;o<c;o++){const h=a[o].name||String(o);this.morphTargetInfluences.push(0),this.morphTargetDictionary[h]=o}}}}getVertexPosition(e,t){const n=this.geometry,a=n.attributes.position,o=n.morphAttributes.position,c=n.morphTargetsRelative;t.fromBufferAttribute(a,e);const h=this.morphTargetInfluences;if(o&&h){Kv.set(0,0,0);for(let d=0,p=o.length;d<p;d++){const v=h[d],y=o[d];v!==0&&(Cx.fromBufferAttribute(y,e),c?Kv.addScaledVector(Cx,v):Kv.addScaledVector(Cx.sub(t),v))}t.add(Kv)}return t}raycast(e,t){const n=this.geometry,a=this.material,o=this.matrixWorld;a!==void 0&&(n.boundingSphere===null&&n.computeBoundingSphere(),qv.copy(n.boundingSphere),qv.applyMatrix4(o),Xu.copy(e.ray).recast(e.near),!(qv.containsPoint(Xu.origin)===!1&&(Xu.intersectSphere(qv,HM)===null||Xu.origin.distanceToSquared(HM)>(e.far-e.near)**2))&&(PM.copy(o).invert(),Xu.copy(e.ray).applyMatrix4(PM),!(n.boundingBox!==null&&Xu.intersectsBox(n.boundingBox)===!1)&&this._computeIntersections(e,t,Xu)))}_computeIntersections(e,t,n){let a;const o=this.geometry,c=this.material,h=o.index,d=o.attributes.position,p=o.attributes.uv,v=o.attributes.uv1,y=o.attributes.normal,_=o.groups,b=o.drawRange;if(h!==null)if(Array.isArray(c))for(let T=0,R=_.length;T<R;T++){const A=_[T],M=c[A.materialIndex],C=Math.max(A.start,b.start),D=Math.min(h.count,Math.min(A.start+A.count,b.start+b.count));for(let U=C,H=D;U<H;U+=3){const F=h.getX(U),G=h.getX(U+1),V=h.getX(U+2);a=Jv(this,M,e,n,p,v,y,F,G,V),a&&(a.faceIndex=Math.floor(U/3),a.face.materialIndex=A.materialIndex,t.push(a))}}else{const T=Math.max(0,b.start),R=Math.min(h.count,b.start+b.count);for(let A=T,M=R;A<M;A+=3){const C=h.getX(A),D=h.getX(A+1),U=h.getX(A+2);a=Jv(this,c,e,n,p,v,y,C,D,U),a&&(a.faceIndex=Math.floor(A/3),t.push(a))}}else if(d!==void 0)if(Array.isArray(c))for(let T=0,R=_.length;T<R;T++){const A=_[T],M=c[A.materialIndex],C=Math.max(A.start,b.start),D=Math.min(d.count,Math.min(A.start+A.count,b.start+b.count));for(let U=C,H=D;U<H;U+=3){const F=U,G=U+1,V=U+2;a=Jv(this,M,e,n,p,v,y,F,G,V),a&&(a.faceIndex=Math.floor(U/3),a.face.materialIndex=A.materialIndex,t.push(a))}}else{const T=Math.max(0,b.start),R=Math.min(d.count,b.start+b.count);for(let A=T,M=R;A<M;A+=3){const C=A,D=A+1,U=A+2;a=Jv(this,c,e,n,p,v,y,C,D,U),a&&(a.faceIndex=Math.floor(A/3),t.push(a))}}}}function YN(s,e,t,n,a,o,c,h){let d;if(e.side===Ka?d=n.intersectTriangle(c,o,a,!0,h):d=n.intersectTriangle(a,o,c,e.side===ao,h),d===null)return null;
vendor: 6,409 bytes, lines 64-68
64Qv.copy(h),Qv.applyMatrix4(s.matrixWorld);const p=t.ray.origin.distanceTo(Qv);return p<t.near||p>t.far?null:{distance:p,point:Qv.clone(),object:s}}function Jv(s,e,t,n,a,o,c,h,d,p){s.getVertexPosition(h,Yv),s.getVertexPosition(d,Wv),s.getVertexPosition(p,Zv);const v=YN(s,e,t,n,Yv,Wv,Zv,FM);if(v){const y=new K;Is.getBarycoord(FM,Yv,Wv,Zv,y),a&&(v.uv=Is.getInterpolatedAttribute(a,h,d,p,y,new Je)),o&&(v.uv1=Is.getInterpolatedAttribute(o,h,d,p,y,new Je)),c&&(v.normal=Is.getInterpolatedAttribute(c,h,d,p,y,new K),v.normal.dot(n.direction)>0&&v.normal.multiplyScalar(-1));const _={a:h,b:d,c:p,normal:new K,materialIndex:0};Is.getNormal(Yv,Wv,Zv,_.normal),v.face=_,v.barycoord=y}return v}class Ef extends un{constructor(e=1,t=1,n=1,a=1,o=1,c=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:a,heightSegments:o,depthSegments:c};const h=this;a=Math.floor(a),o=Math.floor(o),c=Math.floor(c);const d=[],p=[],v=[],y=[];let _=0,b=0;T("z","y","x",-1,-1,n,t,e,c,o,0),T("z","y","x",1,-1,n,t,-e,c,o,1),T("x","z","y",1,1,e,n,t,a,c,2),T("x","z","y",1,-1,e,n,-t,a,c,3),T("x","y","z",1,-1,e,t,n,a,o,4),T("x","y","z",-1,-1,e,t,-n,a,o,5),this.setIndex(d),this.setAttribute("position",new Ot(p,3)),this.setAttribute("normal",new Ot(v,3)),this.setAttribute("uv",new Ot(y,2));function T(R,A,M,C,D,U,H,F,G,V,O){const z=U/G,Y=H/V,se=U/2,ce=H/2,he=F/2,me=G+1,P=V+1;let Q=0,ee=0;const ge=new K;for(let Se=0;Se<P;Se++){const W=Se*Y-ce;for(let fe=0;fe<me;fe++){const Ce=fe*z-se;ge[R]=Ce*C,ge[A]=W*D,ge[M]=he,p.push(ge.x,ge.y,ge.z),ge[R]=0,ge[A]=0,ge[M]=F>0?1:-1,v.push(ge.x,ge.y,ge.z),y.push(fe/G),y.push(1-Se/V),Q+=1}}for(let Se=0;Se<V;Se++)for(let W=0;W<G;W++){const fe=_+W+me*Se,Ce=_+W+me*(Se+1),Le=_+(W+1)+me*(Se+1),nt=_+(W+1)+me*Se;d.push(fe,Ce,nt),d.push(Ce,Le,nt),ee+=6}h.addGroup(b,ee,O),b+=ee,_+=Q}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Ef(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}function bd(s){const e={};for(const t in s){e[t]={};for(const n in s[t]){const a=s[t][n];a&&(a.isColor||a.isMatrix3||a.isMatrix4||a.isVector2||a.isVector3||a.isVector4||a.isTexture||a.isQuaternion)?a.isRenderTargetTexture?(console.warn("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),e[t][n]=null):e[t][n]=a.clone():Array.isArray(a)?e[t][n]=a.slice():e[t][n]=a}}return e}function xs(s){const e={};for(let t=0;t<s.length;t++){const n=bd(s[t]);for(const a in n)e[a]=n[a]}return e}function WN(s){const e=[];for(let t=0;t<s.length;t++)e.push(s[t].clone());return e}function KA(s){const e=s.getRenderTarget();return e===null?s.outputColorSpace:e.isXRRenderTarget===!0?e.texture.colorSpace:An.workingColorSpace}const bb={clone:bd,merge:xs};var ZN=`void main() {
65	gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
66}`,KN=`void main() {
67	gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );
68}`;class Ts extends la{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=ZN,this.fragmentShader=KN,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,e!==void 0&&this.setValues(e)}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=bd(e.uniforms),this.uniformsGroups=WN(e.uniformsGroups),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.fog=e.fog,this.lights=e.lights,this.clipping=e.clipping,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this}toJSON(e){const t=super.toJSON(e);t.glslVersion=this.glslVersion,t.uniforms={};for(const a in this.uniforms){const c=this.uniforms[a].value;c&&c.isTexture?t.uniforms[a]={type:"t",value:c.toJSON(e).uuid}:c&&c.isColor?t.uniforms[a]={type:"c",value:c.getHex()}:c&&c.isVector2?t.uniforms[a]={type:"v2",value:c.toArray()}:c&&c.isVector3?t.uniforms[a]={type:"v3",value:c.toArray()}:c&&c.isVector4?t.uniforms[a]={type:"v4",value:c.toArray()}:c&&c.isMatrix3?t.uniforms[a]={type:"m3",value:c.toArray()}:c&&c.isMatrix4?t.uniforms[a]={type:"m4",value:c.toArray()}:t.uniforms[a]={value:c}}Object.keys(this.defines).length>0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;const n={};for(const a in this.extensions)this.extensions[a]===!0&&(n[a]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}}class Zy extends Bn{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new jt,this.projectionMatrix=new jt,this.projectionMatrixInverse=new jt,this.coordinateSystem=Qs,this._reversedDepth=!1}get reversedDepth(){return this._reversedDepth}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}const Lc=new K,VM=new Je,GM=new Je;class sa extends Zy{constructor(e=50,t=1,n=.1,a=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=n,this.far=a,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=xd*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(pf*.5*this.fov);return .5*this.getFilmHeight()/e}
vendor: 4,175 bytes, line 68
68getEffectiveFOV(){return xd*2*Math.atan(Math.tan(pf*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(e,t,n){Lc.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),t.set(Lc.x,Lc.y).multiplyScalar(-e/Lc.z),Lc.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(Lc.x,Lc.y).multiplyScalar(-e/Lc.z)}getViewSize(e,t){return this.getViewBounds(e,VM,GM),t.subVectors(GM,VM)}setViewOffset(e,t,n,a,o,c){this.aspect=e/t,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=a,this.view.width=o,this.view.height=c,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(pf*.5*this.fov)/this.zoom,n=2*t,a=this.aspect*n,o=-.5*a;const c=this.view;if(this.view!==null&&this.view.enabled){const d=c.fullWidth,p=c.fullHeight;o+=c.offsetX*a/d,t-=c.offsetY*n/p,a*=c.width/d,n*=c.height/p}const h=this.filmOffset;h!==0&&(o+=e*h/this.getFilmWidth()),this.projectionMatrix.makePerspective(o,o+a,t,t-n,e,this.far,this.coordinateSystem,this.reversedDepth),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,this.view!==null&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}const Xh=-90,jh=1;class QA extends Bn{constructor(e,t,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;const a=new sa(Xh,jh,e,t);a.layers=this.layers,this.add(a);const o=new sa(Xh,jh,e,t);o.layers=this.layers,this.add(o);const c=new sa(Xh,jh,e,t);c.layers=this.layers,this.add(c);const h=new sa(Xh,jh,e,t);h.layers=this.layers,this.add(h);const d=new sa(Xh,jh,e,t);d.layers=this.layers,this.add(d);const p=new sa(Xh,jh,e,t);p.layers=this.layers,this.add(p)}updateCoordinateSystem(){const e=this.coordinateSystem,t=this.children.concat(),[n,a,o,c,h,d]=t;for(const p of t)this.remove(p);if(e===Qs)n.up.set(0,1,0),n.lookAt(1,0,0),a.up.set(0,1,0),a.lookAt(-1,0,0),o.up.set(0,0,-1),o.lookAt(0,1,0),c.up.set(0,0,1),c.lookAt(0,-1,0),h.up.set(0,1,0),h.lookAt(0,0,1),d.up.set(0,1,0),d.lookAt(0,0,-1);else if(e===_d)n.up.set(0,-1,0),n.lookAt(-1,0,0),a.up.set(0,-1,0),a.lookAt(1,0,0),o.up.set(0,0,1),o.lookAt(0,1,0),c.up.set(0,0,-1),c.lookAt(0,-1,0),h.up.set(0,-1,0),h.lookAt(0,0,1),d.up.set(0,-1,0),d.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(const p of t)this.add(p),p.updateMatrixWorld()}update(e,t){this.parent===null&&this.updateMatrixWorld();const{renderTarget:n,activeMipmapLevel:a}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[o,c,h,d,p,v]=this.children,y=e.getRenderTarget(),_=e.getActiveCubeFace(),b=e.getActiveMipmapLevel(),T=e.xr.enabled;e.xr.enabled=!1;const R=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,e.setRenderTarget(n,0,a),e.render(t,o),e.setRenderTarget(n,1,a),e.render(t,c),e.setRenderTarget(n,2,a),e.render(t,h),e.setRenderTarget(n,3,a),e.render(t,d),e.setRenderTarget(n,4,a),e.render(t,p),n.texture.generateMipmaps=R,e.setRenderTarget(n,5,a),e.render(t,v),e.setRenderTarget(y,_,b),e.xr.enabled=T,n.texture.needsPMREMUpdate=!0}}class sg extends ei{constructor(e=[],t=Wo,n,a,o,c,h,d,p,v){super(e,t,n,a,o,c,h,d,p,v),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class Mb extends $s{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const n={width:e,height:e,depth:1},a=[n,n,n,n,n,n];this.texture=new sg(a),this._setTextureOptions(t),this.texture.isRenderTargetTexture=!0}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.colorSpace
vendor: 4,296 bytes, lines 68-103
68=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const n={uniforms:{tEquirect:{value:null}},vertexShader:`
69
70				varying vec3 vWorldDirection;
71
72				vec3 transformDirection( in vec3 dir, in mat4 matrix ) {
73
74					return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );
75
76				}
77
78				void main() {
79
80					vWorldDirection = transformDirection( position, modelMatrix );
81
82					#include <begin_vertex>
83					#include <project_vertex>
84
85				}
86			`,fragmentShader:`
87
88				uniform sampler2D tEquirect;
89
90				varying vec3 vWorldDirection;
91
92				#include <common>
93
94				void main() {
95
96					vec3 direction = normalize( vWorldDirection );
97
98					vec2 sampleUV = equirectUv( direction );
99
100					gl_FragColor = texture2D( tEquirect, sampleUV );
101
102				}
103			`},a=new Ef(5,5,5),o=new Ts({name:"CubemapFromEquirect",uniforms:bd(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:Ka,blending:qo});o.uniforms.tEquirect.value=t;const c=new Mi(a,o),h=t.minFilter;return t.minFilter===Tr&&(t.minFilter=Hn),new QA(1,10,this).update(e,c),t.minFilter=h,c.geometry.dispose(),c.material.dispose(),this}clear(e,t=!0,n=!0,a=!0){const o=e.getRenderTarget();for(let c=0;c<6;c++)e.setRenderTarget(this,c),e.clear(t,n,a);e.setRenderTarget(o)}}class Bl extends Bn{constructor(){super(),this.isGroup=!0,this.type="Group"}}const QN={type:"move"};class z0{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Bl,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new Bl,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new K,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new K),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Bl,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new K,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new K),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const t=this._hand;if(t)for(const n of e.hand.values())this._getHandJoint(t,n)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,t,n){let a=null,o=null,c=null;const h=this._targetRay,d=this._grip,p=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(p&&e.hand){c=!0;for(const R of e.hand.values()){const A=t.getJointPose(R,n),M=this._getHandJoint(p,R);A!==null&&(M.matrix.fromArray(A.transform.matrix),M.matrix.decompose(M.position,M.rotation,M.scale),M.matrixWorldNeedsUpdate=!0,M.jointRadius=A.radius),M.visible=A!==null}const v=p.joints["index-finger-tip"],y=p.joints["thumb-tip"],_=v.position.distanceTo(y.position),b=.02,T=.005;p.inputState.pinching&&_>b+T?(p.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!p.inputState.pinching&&_<=b-T&&(p.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else d!==null&&e.gripSpace&&(o=t.getPose(e.gripSpace,n),o!==null&&(d.matrix.fromArray(o.transform.matrix),d.matrix.decompose(d.position,d.rotation,d.scale),d.matrixWorldNeedsUpdate=!0,o.linearVelocity?(d.hasLinearVelocity=!0,d.linearVelocity.copy(o.linearVelocity)):d.hasLinearVelocity=!1,o.angularVelocity?(d.hasAngularVelocity=!0,d.angularVelocity.copy(o.angularVelocity)):d.hasAngularVelocity=!1));h!==null&&(a=t.getPose(e.targetRaySpace,n),a===null&&o!==null&&(a=o),a!==null&&(h.matrix.fromArray(a.transform.matrix),h.matrix.decompose(h.position,h.rotation,h.scale),h.matrixWorldNeedsUpdate=!0,a.linearVelocity?(h.hasLinearVelocity=!0,h.linearVelocity.copy(a.linearVelocity)):h.hasLinearVelocity=!1,a.angularVelocity?(h.hasA
vendor: 19,490 bytes, line 103
103ngularVelocity=!0,h.angularVelocity.copy(a.angularVelocity)):h.hasAngularVelocity=!1,this.dispatchEvent(QN)))}return h!==null&&(h.visible=a!==null),d!==null&&(d.visible=o!==null),p!==null&&(p.visible=c!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){const n=new Bl;n.matrixAutoUpdate=!1,n.visible=!1,e.joints[t.jointName]=n,e.add(n)}return e.joints[t.jointName]}}class Ky{constructor(e,t=25e-5){this.isFogExp2=!0,this.name="",this.color=new _t(e),this.density=t}clone(){return new Ky(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class Qy{constructor(e,t=1,n=1e3){this.isFog=!0,this.name="",this.color=new _t(e),this.near=t,this.far=n}clone(){return new Qy(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class rg extends Bn{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 er,this.environmentIntensity=1,this.environmentRotation=new er,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,this.backgroundRotation.copy(e.backgroundRotation),this.environmentIntensity=e.environmentIntensity,this.environmentRotation.copy(e.environmentRotation),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(t.object.backgroundIntensity=this.backgroundIntensity),t.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(t.object.environmentIntensity=this.environmentIntensity),t.object.environmentRotation=this.environmentRotation.toArray(),t}}class og{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=Gm,this.updateRanges=[],this.version=0,this.uuid=Js()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,n){e*=this.stride,n*=t.stride;for(let a=0,o=this.stride;a<o;a++)this.array[e+a]=t.array[n+a];return this}set(e,t=0){return this.array.set(e,t),this}clone(e){e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=Js()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const t=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),n=new this.constructor(t,this.stride);return n.setUsage(this.usage),n}onUpload(e){return this.onUploadCallback=e,this}toJSON(e){return e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=Js()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.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 _s=new K;class jc{constructor(e,t,n,a=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=e,this.itemSize=t,this.offset=n,this.normalized=a}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(e){this.data.needsUpdate=e}applyMatrix4(e){for(let t=0,n=this.data.count;t<n;t++)_s.fromBufferAttribute(this,t),_s.applyMatrix4(e),this.setXYZ(t,_s.x,_s.y,_s.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)_s.fromBufferAttribute(this,t),_s.applyNormalMatrix(e),this.setXYZ(t,_s.x,_s.y,_s.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)_s.fromBufferAttribute(this,t),_s.transformDirection(e),this.setXYZ(t,_s.x,_s.y,_s.z);return this}getComponent(e,t){let n=this.array[e*this.data.stride+this.offset+t];return this.normalized&&(n=bs(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=fn(n,this.array)),this.data.array[e*this.data.stride+this.offset+t]=n,this}setX(e,t){return this.normalized&&(t=fn(t,this.array)),this.data.array[e*this.data.stride+this.offset]=t,this}setY(e,t){return this.normalized&&(t=fn(t,this.array)),this.data.array[e*this.data.stride+this.offset+1]=t,this}setZ(e,t){return this.normalized&&(t=fn(t,this.array)),this.data.array[e*this.data.stride+this.offset+2]=t,this}setW(e,t){return this.normalized&&(t=fn(t,this.array)),this.data.array[e*this.data.stride+this.offset+3]=t,this}getX(e){let t=this.data.array[e*this.data.stride+this.offset];return this.normalized&&(t=bs(t,this.array)),t}getY(e){let t=this.data.array[e*this.data.stride+this.offset+1];return this.normalized&&(t=bs(t,this.array)),t}getZ(e){let t=this.data.array[e*this.data.stride+this.offset+2];return this.normalized&&(t=bs(t,this.array)),t}getW(e){let t=this.data.array[e*this.data.stride+this.offset+3];return this.normalized&&(t=bs(t,this.array)),t}setXY(e,t,n){return e=e*this.data.stride+this.offset,this.normalized&&(t=fn(t,this.array),n=fn(n,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this}setXYZ(e,t,n,a){return e=e*this.data.stride+this.offset,this.normalized&&(t=fn(t,this.array),n=fn(n,this.array),a=fn(a,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=a,this}setXYZW(e,t,n,a,o){return e=e*this.data.stride+this.offset,this.normalized&&(t=fn(t,this.array),n=fn(n,this.array),a=fn(a,this.array),o=fn(o,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=a,this.data.array[e+3]=o,this}clone(e){if(e===void 0){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");const t=[];for(let n=0;n<this.count;n++){const a=n*this.data.stride+this.offset;for(let o=0;o<this.itemSize;o++)t.push(this.data.array[a+o])}return new Qn(new this.array.constructor(t),this.itemSize,this.normalized)}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new jc(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(e){if(e===void 0){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");const t=[];for(let n=0;n<this.count;n++){const a=n*this.data.stride+this.offset;for(let o=0;o<this.itemSize;o++)t.push(this.data.array[a+o])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:t,normalized:this.normalized}}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}class Eb extends la{constructor(e){super(),this.isSpriteMaterial=!0,this.type="SpriteMaterial",this.color=new _t(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.rotation=e.rotation,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}let qh;const hm=new K,Yh=new K,Wh=new K,Zh=new Je,dm=new Je,JA=new jt,$v=new K,pm=new K,e0=new K,kM=new Je,Nx=new Je,XM=new Je;class $A extends Bn{constructor(e=new Eb){if(super(),this.isSprite=!0,this.type="Sprite",qh===void 0){qh=new un;const t=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),n=new og(t,5);qh.setIndex([0,1,2,0,2,3]),qh.setAttribute("position",new jc(n,3,0,!1)),qh.setAttribute("uv",new jc(n,2,3,!1))}this.geometry=qh,this.material=e,this.center=new Je(.5,.5),this.count=1}raycast(e,t){e.camera===null&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),Yh.setFromMatrixScale(this.matrixWorld),JA.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),Wh.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&this.material.sizeAttenuation===!1&&Yh.multiplyScalar(-Wh.z);const n=this.material.rotation;let a,o;n!==0&&(o=Math.cos(n),a=Math.sin(n));const c=this.center;t0($v.set(-.5,-.5,0),Wh,c,Yh,a,o),t0(pm.set(.5,-.5,0),Wh,c,Yh,a,o),t0(e0.set(.5,.5,0),Wh,c,Yh,a,o),kM.set(0,0),Nx.set(1,0),XM.set(1,1);let h=e.ray.intersectTriangle($v,pm,e0,!1,hm);if(h===null&&(t0(pm.set(-.5,.5,0),Wh,c,Yh,a,o),Nx.set(0,1),h=e.ray.intersectTriangle($v,e0,pm,!1,hm),h===null))return;const d=e.ray.origin.distanceTo(hm);d<e.near||d>e.far||t.push({distance:d,point:hm.clone(),uv:Is.getInterpolation(hm,$v,pm,e0,kM,Nx,XM,new Je),face:null,object:this})}copy(e,t){return super.copy(e,t),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}}function t0(s,e,t,n,a,o){Zh.subVectors(s,t).addScalar(.5).multiply(n),a!==void 0?(dm.x=o*Zh.x-a*Zh.y,dm.y=a*Zh.x+o*Zh.y):dm.copy(Zh),s.copy(e),s.x+=dm.x,s.y+=dm.y,s.applyMatrix4(JA)}const n0=new K,jM=new K;class e2 extends Bn{constructor(){super(),this.isLOD=!0,this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const t=e.levels;for(let n=0,a=t.length;n<a;n++){const o=t[n];this.addLevel(o.object.clone(),o.distance,o.hysteresis)}return this.autoUpdate=e.autoUpdate,this}addLevel(e,t=0,n=0){t=Math.abs(t);const a=this.levels;let o;for(o=0;o<a.length&&!(t<a[o].distance);o++);return a.splice(o,0,{distance:t,hysteresis:n,object:e}),this.add(e),this}removeLevel(e){const t=this.levels;for(let n=0;n<t.length;n++)if(t[n].distance===e){const a=t.splice(n,1);return this.remove(a[0].object),!0}return!1}getCurrentLevel(){return this._currentLevel}getObjectForDistance(e){const t=this.levels;if(t.length>0){let n,a;for(n=1,a=t.length;n<a;n++){let o=t[n].distance;if(t[n].object.visible&&(o-=o*t[n].hysteresis),e<o)break}return t[n-1].object}return null}raycast(e,t){if(this.levels.length>0){n0.setFromMatrixPosition(this.matrixWorld);const a=e.ray.origin.distanceTo(n0);this.getObjectForDistance(a).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){n0.setFromMatrixPosition(e.matrixWorld),jM.setFromMatrixPosition(this.matrixWorld);const n=n0.distanceTo(jM)/e.zoom;t[0].object.visible=!0;let a,o;for(a=1,o=t.length;a<o;a++){let c=t[a].distance;if(t[a].object.visible&&(c-=c*t[a].hysteresis),n>=c)t[a-1].object.visible=!1,t[a].object.visible=!0;else break}for(this._currentLevel=a-1;a<o;a++)t[a].object.visible=!1}}toJSON(e){const t=super.toJSON(e);this.autoUpdate===!1&&(t.object.autoUpdate=!1),t.object.levels=[];const n=this.levels;for(let a=0,o=n.length;a<o;a++){const c=n[a];t.object.levels.push({object:c.object.uuid,distance:c.distance,hysteresis:c.hysteresis})}return t}}const qM=new K,YM=new Gn,WM=new Gn,JN=new K,ZM=new jt,i0=new K,Dx=new Sa,KM=new jt,Ux=new Nd;class Tb extends Mi{constructor(e,t){super(e,t),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode=LS,this.bindMatrix=new jt,this.bindMatrixInverse=new jt,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){const e=this.geometry;this.boundingBox===null&&(this.boundingBox=new La),this.boundingBox.makeEmpty();const t=e.getAttribute("position");for(let n=0;n<t.count;n++)this.getVertexPosition(n,i0),this.boundingBox.expandByPoint(i0)}computeBoundingSphere(){const e=this.geometry;this.boundingSphere===null&&(this.boundingSphere=new Sa),this.boundingSphere.makeEmpty();const t=e.getAttribute("position");for(let n=0;n<t.count;n++)this.getVertexPosition(n,i0),this.boundingSphere.expandByPoint(i0)}copy(e,t){return super.copy(e,t),this.bindMode=e.bindMode,this.bindMatrix.copy(e.bindMatrix),this.bindMatrixInverse.copy(e.bindMatrixInverse),this.skeleton=e.skeleton,e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone()),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),this}raycast(e,t){const n=this.material,a=this.matrixWorld;n!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),Dx.copy(this.boundingSphere),Dx.applyMatrix4(a),e.ray.intersectsSphere(Dx)!==!1&&(KM.copy(a).invert(),Ux.copy(e.ray).applyMatrix4(KM),!(this.boundingBox!==null&&Ux.intersectsBox(this.boundingBox)===!1)&&this._computeIntersections(e,t,Ux)))}getVertexPosition(e,t){return super.getVertexPosition(e,t),this.applyBoneTransform(e,t),t}bind(e,t){this.skeleton=e,t===void 0&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.copy(t).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const e=new Gn,t=this.geometry.attributes.skinWeight;for(let n=0,a=t.count;n<a;n++){e.fromBufferAttribute(t,n);const o=1/e.manhattanLength();o!==1/0?e.multiplyScalar(o):e.set(1,0,0,0),t.setXYZW(n,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),this.bindMode===LS?this.bindMatrixInverse.copy(this.matrixWorld).invert():this.bindMode===DA?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}applyBoneTransform(e,t){const n=this.skeleton,a=this.geometry;YM.fromBufferAttribute(a.attributes.skinIndex,e),WM.fromBufferAttribute(a.attributes.skinWeight,e),qM.copy(t).applyMatrix4(this.bindMatrix),t.set(0,0,0);for(let o=0;o<4;o++){const c=WM.getComponent(o);if(c!==0){const h=YM.getComponent(o);ZM.multiplyMatrices(n.bones[h].matrixWorld,n.boneInverses[h]),t.addScaledVector(JN.copy(qM).applyMatrix4(ZM),c)}}return t.applyMatrix4(this.bindMatrixInverse)}}class Jy extends Bn{constructor(){super(),this.isBone=!0,this.type="Bone"}}class io extends ei{constructor(e=null,t=1,n=1,a,o,c,h,d,p=oa,v=oa,y,_){super(null,c,h,d,p,v,a,o,y,_),this.isDataTexture=!0,this.image={data:e,width:t,height:n},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}const QM=new jt,$N=new jt;class lg{constructor(e=[],t=[]){this.uuid=Js(),this.bones=e.slice(0),this.boneInverses=t,this.boneMatrices=null,this.boneTexture=null,this.init()}init(){const e=this.bones,t=this.boneInverses;if(this.boneMatrices=new Float32Array(e.length*16),t.length===0)this.calculateInverses();else if(e.length!==t.length){console.warn("THREE.Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let n=0,a=this.bones.length;n<a;n++)this.boneInverses.push(new jt)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,t=this.bones.length;e<t;e++){const n=new jt;this.bones[e]&&n.copy(this.bones[e].matrixWorld).invert(),this.boneInverses.push(n)}}pose(){for(let e=0,t=this.bones.length;e<t;e++){const n=this.bones[e];n&&n.matrixWorld.copy(this.boneInverses[e]).invert()}for(let e=0,t=this.bones.length;e<t;e++){const n=this.bones[e];n&&(n.parent&&n.parent.isBone?(n.matrix.copy(n.parent.matrixWorld).invert(),n.matrix.multiply(n.matrixWorld)):n.matrix.copy(n.matrixWorld),n.matrix.decompose(n.position,n.quaternion,n.scale))}}update(){const e=this.bones,t=this.boneInverses,n=this.boneMatrices,a=this.boneTexture;for(let o=0,c=e.length;o<c;o++){const h=e[o]?e[o].matrixWorld:$N;QM.multiplyMatrices(h,t[o]),QM.toArray(n,o*16)}a!==null&&(a.needsUpdate=!0)}clone(){return new lg(this.bones,this.boneInverses)}computeBoneTexture(){let e=Math.sqrt(this.bones.length*4);e=Math.ceil(e/4)*4,e=Math.max(e,4);const t=new Float32Array(e*e*4);t.set(this.boneMatrices);const n=new io(t,e,e,ki,bi);return n.needsUpdate=!0,this.boneMatrices=t,this.boneTexture=n,this}getBoneByName(e){for(let t=0,n=this.bones.length;t<n;t++){const a=this.bones[t];if(a.name===e)return a}}dispose(){this.boneTexture!==null&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(e,t){this.uuid=e.uuid;for(let n=0,a=e.bones.length;n<a;n++){const o=e.bones[n];let c=t[o];c===void 0&&(console.warn("THREE.Skeleton: No bone found with UUID:",o),c=new Jy),this.bones.push(c),this.boneInverses.push(new jt().fromArray(e.boneInverses[n]))}return this.init(),this}toJSON(){const e={metadata:{version:4.7,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};e.uuid=this.uuid;const t=this.bones,n=this.boneInverses;for(let a=0,o=t.length;a<o;a++){const c=t[a];e.bones.push(c.uuid);const h=n[a];e.boneInverses.push(h.toArray())}return e}}class vf extends Qn{constructor(e,t,n,a=1){super(e,t,n),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=a}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}toJSON(){const e=super.toJSON();return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}}const Kh=new jt,JM=new jt,a0=[],$M=new La,eD=new jt,mm=new Mi,gm=new Sa;class Ab extends Mi{constructor(e,t,n){super(e,t),this.isInstancedMesh=!0,this.instanceMatrix=new vf(new Float32Array(n*16),16),this.instanceColor=null,this.morphTexture=null,this.count=n,this.boundingBox=null,this.boundingSphere=null;for(let a=0;a<n;a++)this.setMatrixAt(a,eD)}computeBoundingBox(){const e=this.geometry,t=this.count;this.boundingBox===null&&(this.boundingBox=new La),e.boundingBox===null&&e.computeBoundingBox(),this.boundingBox.makeEmpty();for(let n=0;n<t;n++)this.getMatrixAt(n,Kh),$M.copy(e.boundingBox).applyMatrix4(Kh),this.boundingBox.union($M)}computeBoundingSphere(){const e=this.geometry,t=this.count;this.boundingSphere===null&&(this.boundingSphere=new Sa),e.boundingSphere===null&&e.computeBoundingSphere(),this.boundingSphere.makeEmpty();for(let n=0;n<t;n++)this.getMatrixAt(n,Kh),gm.copy(e.boundingSphere).applyMatrix4(Kh),this.boundingSphere.union(gm)}copy(e,t){return super.copy(e,t),this.instanceMatrix.copy(e.instanceMatrix),e.morphTexture!==null&&(this.morphTexture=e.morphTexture.clone()),e.instanceColor!==null&&(this.instanceColor=e.instanceColor.clone()),this.count=e.count,e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone()),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),this}getColorAt(e,t){t.fromArray(this.instanceColor.array,e*3)}getMatrixAt(e,t){t.fromArray(this.instanceMatrix.array,e*16)}getMorphAt(e,t){const n=t.morphTargetInfluences,a=this.morphTexture.source.data.data,o=n.length+1,c=e*o+1;for(let h=0;h<n.length;h++)n[h]=a[c+h]}raycast(e,t){const n=this.matrixWorld,a=this.count;if(mm.geometry=this.geometry,mm.material=this.material,mm.material!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),gm.copy(this.boundingSphere),gm.applyMatrix4(n),e.ray.intersectsSphere(gm)!==!1))for(let o=0;o<a;o++){this.getMatrixAt(o,Kh),JM.multiplyMatrices(n,Kh),mm.matrixWorld=JM,mm.raycast(e,a0);for(let c=0,h=a0.length;c<h;c++){const d=a0[c];d.instanceId=o,d.object=this,t.push(d)}a0.length=0}}setColorAt(e,t){this.instanceColor===null&&(this.instanceColor=new vf(ne
vendor: 3,947 bytes, line 103
103w Float32Array(this.instanceMatrix.count*3).fill(1),3)),t.toArray(this.instanceColor.array,e*3)}setMatrixAt(e,t){t.toArray(this.instanceMatrix.array,e*16)}setMorphAt(e,t){const n=t.morphTargetInfluences,a=n.length+1;this.morphTexture===null&&(this.morphTexture=new io(new Float32Array(a*this.count),a,this.count,ig,bi));const o=this.morphTexture.source.data.data;let c=0;for(let p=0;p<n.length;p++)c+=n[p];const h=this.geometry.morphTargetsRelative?1:1-c,d=a*e;o[d]=h,o.set(n,d+1)}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"}),this.morphTexture!==null&&(this.morphTexture.dispose(),this.morphTexture=null)}}const Lx=new K,tD=new K,nD=new cn;class Bc{constructor(e=new K(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,n,a){return this.normal.set(e,t,n),this.constant=a,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,n){const a=Lx.subVectors(n,t).cross(tD.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(a,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,t){const n=e.delta(Lx),a=this.normal.dot(n);if(a===0)return this.distanceToPoint(e.start)===0?t.copy(e.start):null;const o=-(e.start.dot(this.normal)+this.constant)/a;return o<0||o>1?null:t.copy(e.start).addScaledVector(n,o)}intersectsLine(e){const t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const n=t||nD.getNormalMatrix(e),a=this.coplanarPoint(Lx).applyMatrix4(e),o=this.normal.applyMatrix3(n).normalize();return this.constant=-a.dot(o),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}}const ju=new Sa,iD=new Je(.5,.5),s0=new K;class Dd{constructor(e=new Bc,t=new Bc,n=new Bc,a=new Bc,o=new Bc,c=new Bc){this.planes=[e,t,n,a,o,c]}set(e,t,n,a,o,c){const h=this.planes;return h[0].copy(e),h[1].copy(t),h[2].copy(n),h[3].copy(a),h[4].copy(o),h[5].copy(c),this}copy(e){const t=this.planes;for(let n=0;n<6;n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e,t=Qs,n=!1){const a=this.planes,o=e.elements,c=o[0],h=o[1],d=o[2],p=o[3],v=o[4],y=o[5],_=o[6],b=o[7],T=o[8],R=o[9],A=o[10],M=o[11],C=o[12],D=o[13],U=o[14],H=o[15];if(a[0].setComponents(p-c,b-v,M-T,H-C).normalize(),a[1].setComponents(p+c,b+v,M+T,H+C).normalize(),a[2].setComponents(p+h,b+y,M+R,H+D).normalize(),a[3].setComponents(p-h,b-y,M-R,H-D).normalize(),n)a[4].setComponents(d,_,A,U).normalize(),a[5].setComponents(p-d,b-_,M-A,H-U).normalize();else if(a[4].setComponents(p-d,b-_,M-A,H-U).normalize(),t===Qs)a[5].setComponents(p+d,b+_,M+A,H+U).normalize();else if(t===_d)a[5].setComponents(d,_,A,U).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),ju.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),ju.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(ju)}intersectsSprite(e){ju.center.set(0,0,0);const t=iD.distanceTo(e.center);
vendor: 4,672 bytes, line 103
103return ju.radius=.7071067811865476+t,ju.applyMatrix4(e.matrixWorld),this.intersectsSphere(ju)}intersectsSphere(e){const t=this.planes,n=e.center,a=-e.radius;for(let o=0;o<6;o++)if(t[o].distanceToPoint(n)<a)return!1;return!0}intersectsBox(e){const t=this.planes;for(let n=0;n<6;n++){const a=t[n];if(s0.x=a.normal.x>0?e.max.x:e.min.x,s0.y=a.normal.y>0?e.max.y:e.min.y,s0.z=a.normal.z>0?e.max.z:e.min.z,a.distanceToPoint(s0)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}const Vo=new jt,Go=new Dd;class $y{constructor(){this.coordinateSystem=Qs}intersectsObject(e,t){if(!t.isArrayCamera||t.cameras.length===0)return!1;for(let n=0;n<t.cameras.length;n++){const a=t.cameras[n];if(Vo.multiplyMatrices(a.projectionMatrix,a.matrixWorldInverse),Go.setFromProjectionMatrix(Vo,a.coordinateSystem,a.reversedDepth),Go.intersectsObject(e))return!0}return!1}intersectsSprite(e,t){if(!t||!t.cameras||t.cameras.length===0)return!1;for(let n=0;n<t.cameras.length;n++){const a=t.cameras[n];if(Vo.multiplyMatrices(a.projectionMatrix,a.matrixWorldInverse),Go.setFromProjectionMatrix(Vo,a.coordinateSystem,a.reversedDepth),Go.intersectsSprite(e))return!0}return!1}intersectsSphere(e,t){if(!t||!t.cameras||t.cameras.length===0)return!1;for(let n=0;n<t.cameras.length;n++){const a=t.cameras[n];if(Vo.multiplyMatrices(a.projectionMatrix,a.matrixWorldInverse),Go.setFromProjectionMatrix(Vo,a.coordinateSystem,a.reversedDepth),Go.intersectsSphere(e))return!0}return!1}intersectsBox(e,t){if(!t||!t.cameras||t.cameras.length===0)return!1;for(let n=0;n<t.cameras.length;n++){const a=t.cameras[n];if(Vo.multiplyMatrices(a.projectionMatrix,a.matrixWorldInverse),Go.setFromProjectionMatrix(Vo,a.coordinateSystem,a.reversedDepth),Go.intersectsBox(e))return!0}return!1}containsPoint(e,t){if(!t||!t.cameras||t.cameras.length===0)return!1;for(let n=0;n<t.cameras.length;n++){const a=t.cameras[n];if(Vo.multiplyMatrices(a.projectionMatrix,a.matrixWorldInverse),Go.setFromProjectionMatrix(Vo,a.coordinateSystem,a.reversedDepth),Go.containsPoint(e))return!0}return!1}clone(){return new $y}}function Ox(s,e){return s-e}function aD(s,e){return s.z-e.z}function sD(s,e){return e.z-s.z}class rD{constructor(){this.index=0,this.pool=[],this.list=[]}push(e,t,n,a){const o=this.pool,c=this.list;this.index>=o.length&&o.push({start:-1,count:-1,z:-1,index:-1});const h=o[this.index];c.push(h),this.index++,h.start=e,h.count=t,h.z=n,h.index=a}reset(){this.list.length=0,this.index=0}}const Os=new jt,oD=new _t(1,1,1),eE=new Dd,lD=new $y,r0=new La,qu=new Sa,vm=new K,tE=new K,cD=new K,zx=new rD,Za=new Mi,o0=[];function uD(s,e,t=0){const n=e.itemSize;if(s.isInterleavedBufferAttribute||s.array.constructor!==e.array.constructor){const a=s.count;for(let o=0;o<a;o++)for(let c=0;c<n;c++)e.setComponent(o+t,c,s.getComponent(o,c))}else e.array.set(s.array,t*n);e.needsUpdate=!0}function Yu(s,e){if(s.constructor!==e.constructor){const t=Math.min(s.length,e.length);for(let n=0;n<t;n++)e[n]=s[n]}else{const t=Math.min(s.length,e.length);e.set(new s.constructor(s.buffer,0,t))}}class t2 extends Mi{constructor(e,t,n=t*2,a){super(new un,a),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=e,this._maxVertexCount=t,this._maxIndexCount=n,this._multiDrawCounts=new Int32Array(e),this._multiDrawStarts=new Int32Array(e),this._multiDrawCount=0,this._multiDrawInstances=null,this._matricesTexture=null,this._indirectTexture=null,this._colorsTexture=null,this._initMatricesTexture(),this._initIndirectTexture()}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}_initMatricesTexture(){let e=Math.sqrt(this._maxInstanceCount*4);e=Math.ceil(e/4)*4,e=Math.max(e,4);const t=new Float32Array(e*e*4),n=new io(t,e,e,ki,bi);this._matricesTexture=n}_initIndirectTexture(){let e=Math.sqrt(this._maxInstanceCount);e=Math.ceil(e);const t=new Uint32Array(e*e),n=new io(t,e,e,ag,Zo);this._indirectTexture=n}_initColorsTexture(){let e=Math.sqrt(this._maxInstanceCount);e=Math.ceil(e);const t=new Float32Array(e*e*4).fill(1),n=new io(t,e,e,ki,bi);
103n.colorSpace=An.workingColorSpace,this._colorsTexture=n}_initializeGeometry(e){const t=this.geometry,n=this._maxVertexCount,a=this._maxIndexCount;if(this._geometryInitialized===!1){for(const o in e.attributes){const c=e.getAttribute(o),{array:h,itemSize:d,normalized:p}=c,v=new h.constructor(n*d),y=new Qn(v,d,p);t.setAttribute(o,y)}if(e.getIndex()!==null){const o=n>65535?new Uint32Array(a):new Uint16Array(a);t.setIndex(new Qn(o,1))}this._geometryInitialized=!0}}_validateGeometry(e){const t=this.geometry;if(!!e.getIndex()!=!!t.getIndex())throw new Error('THREE.BatchedMesh: All geometries must consistently have "index".');for(const n in t.attributes){if(!e.hasAttribute(n))throw new Error(`THREE.BatchedMesh: Added geometry missing "${n}". All geometries must have consistent attributes.`);const a=e.getAttribute(n),o=t.getAttribute(n);if(a.itemSize!==o.itemSize||a.normalized!==o.normalized)throw new Error("THREE.BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}validateInstanceId(e){const t=this._instanceInfo;if(e<0||e>=t.length||t[e].active===!1)throw new Error(`THREE.BatchedMesh: Invalid instanceId ${e}. Instance is either out of range or has been deleted.`)}validateGeometryId(e){const t=this._geometryInfo;if(e<0||e>=t.length||t[e].active===!1)throw new Error(`THREE.BatchedMesh: Invalid geometryId ${e}. Geometry is either out of range or has been deleted.`)}setCustomSort(e){return this.customSort=e,this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new La);const e=this.boundingBox,t=this._instanceInfo;e.makeEmpty();for(let n=0,a=t.length;n<a;n++){if(t[n].active===!1)continue;const o=t[n].geometryIndex;this.getMatrixAt(n,Os),this.getBoundingBoxAt(o,r0).applyMatrix4(Os),e.union(r0)}}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Sa);const e=this.boundingSphere,t=this._instanceInfo;e.makeEmpty();for(let n=0,a=t.length;n<a;n++){if(t[n].active===!1)continue;const o=t[n].geometryIndex;this.getMatrixAt(n,Os),this.getBoundingSphereAt(o,qu).applyMatrix4(Os),e.union(qu)}}addInstance(e){if(this._instanceInfo.length>=this.maxInstanceCount&&this._availableInstanceIds.length===0)throw new Error("THREE.BatchedMesh: Maximum item count reached.");const n={visible:!0,active:!0,geometryIndex:e};let a=null;this._availableInstanceIds.length>0?(this._availableInstanceIds.sort(Ox),a=this._availableInstanceIds.shift(),this._instanceInfo[a]=n):(a=this._instanceInfo.length,this._instanceInfo.push(n));const o=this._matricesTexture;Os.identity().toArray(o.image.data,a*16),o.needsUpdate=!0;const c=this._colorsTexture;return c&&(oD.toArray(c.image.data,a*4),c.needsUpdate=!0),this._visibilityChanged=!0,a}addGeometry(e,t=-1,n=-1){this._initializeGeometry(e),this._validateGeometry(e);const a={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;a.vertexStart=this._nextVertexStart,a.reservedVertexCount=t===-1?e.getAttribute("position").count:t;const c=e.getIndex();if(c!==null&&(a.indexStart=this._nextIndexStart,a.reservedIndexCount=n===-1?c.count:n),a.indexStart!==-1&&a.indexStart+a.reservedIndexCount>this._maxIndexCount||a.vertexStart+a.reservedVertexCount>this._maxVertexCount)throw new Error("THREE.BatchedMesh: Reserved space request exceeds the maximum buffer size.");let d;return this._availableGeometryIds.length>0?(this._availableGeometryIds.sort(Ox),d=this._availableGeometryIds.shift(),o[d]=a):(d=this._geometryCount,this._geometryCount++,o.push(a)),this.setGeometryAt(d,e),this._nextIndexStart=a.indexStart+a.reservedIndexCount,this._nextVertexStart=a.vertexStart+a.reservedVertexCount,d}setGeometryAt(e,t){if(e>=this._geometryCount)throw new Error("THREE.BatchedMesh: Maximum geometry count reached.");this._validateGeometry(t);const n=this.geometry,a=n.getIndex()!==null,o=n.getIndex(),c=t.getIndex(),h=this._geometryInfo[e];if(a&&c.count>h.reservedIndexCount||t.attributes.position.count>h.reservedVertexCount)throw new Error("THREE.BatchedMesh: Reserved space not large enough for provided geometry.");const d=h.vertexStart,p=h.reservedVertexCount;h.vertexCount=t.getAttribute("position").count;for(const v in n.attributes){const y=t.getAttribute(v),_=n.getAttribute(v);uD(y,_,d);const b=y.itemSize;
vendor: 16,384 bytes, line 103
103for(let T=y.count,R=p;T<R;T++){const A=d+T;for(let M=0;M<b;M++)_.setComponent(A,M,0)}_.needsUpdate=!0,_.addUpdateRange(d*b,p*b)}if(a){const v=h.indexStart,y=h.reservedIndexCount;h.indexCount=t.getIndex().count;for(let _=0;_<c.count;_++)o.setX(v+_,d+c.getX(_));for(let _=c.count,b=y;_<b;_++)o.setX(v+_,d);o.needsUpdate=!0,o.addUpdateRange(v,h.reservedIndexCount)}return h.start=a?h.indexStart:h.vertexStart,h.count=a?h.indexCount:h.vertexCount,h.boundingBox=null,t.boundingBox!==null&&(h.boundingBox=t.boundingBox.clone()),h.boundingSphere=null,t.boundingSphere!==null&&(h.boundingSphere=t.boundingSphere.clone()),this._visibilityChanged=!0,e}deleteGeometry(e){const t=this._geometryInfo;if(e>=t.length||t[e].active===!1)return this;const n=this._instanceInfo;for(let a=0,o=n.length;a<o;a++)n[a].active&&n[a].geometryIndex===e&&this.deleteInstance(a);return t[e].active=!1,this._availableGeometryIds.push(e),this._visibilityChanged=!0,this}deleteInstance(e){return this.validateInstanceId(e),this._instanceInfo[e].active=!1,this._availableInstanceIds.push(e),this._visibilityChanged=!0,this}optimize(){let e=0,t=0;const n=this._geometryInfo,a=n.map((c,h)=>h).sort((c,h)=>n[c].vertexStart-n[h].vertexStart),o=this.geometry;for(let c=0,h=n.length;c<h;c++){const d=a[c],p=n[d];if(p.active!==!1){if(o.index!==null){if(p.indexStart!==t){const{indexStart:v,vertexStart:y,reservedIndexCount:_}=p,b=o.index,T=b.array,R=e-y;for(let A=v;A<v+_;A++)T[A]=T[A]+R;b.array.copyWithin(t,v,v+_),b.addUpdateRange(t,_),p.indexStart=t}t+=p.reservedIndexCount}if(p.vertexStart!==e){const{vertexStart:v,reservedVertexCount:y}=p,_=o.attributes;for(const b in _){const T=_[b],{array:R,itemSize:A}=T;R.copyWithin(e*A,v*A,(v+y)*A),T.addUpdateRange(e*A,y*A)}p.vertexStart=e}e+=p.reservedVertexCount,p.start=o.index?p.indexStart:p.vertexStart,this._nextIndexStart=o.index?p.indexStart+p.reservedIndexCount:0,this._nextVertexStart=p.vertexStart+p.reservedVertexCount}}return this}getBoundingBoxAt(e,t){if(e>=this._geometryCount)return null;const n=this.geometry,a=this._geometryInfo[e];if(a.boundingBox===null){const o=new La,c=n.index,h=n.attributes.position;for(let d=a.start,p=a.start+a.count;d<p;d++){let v=d;c&&(v=c.getX(v)),o.expandByPoint(vm.fromBufferAttribute(h,v))}a.boundingBox=o}return t.copy(a.boundingBox),t}getBoundingSphereAt(e,t){if(e>=this._geometryCount)return null;const n=this.geometry,a=this._geometryInfo[e];if(a.boundingSphere===null){const o=new Sa;this.getBoundingBoxAt(e,r0),r0.getCenter(o.center);const c=n.index,h=n.attributes.position;let d=0;for(let p=a.start,v=a.start+a.count;p<v;p++){let y=p;c&&(y=c.getX(y)),vm.fromBufferAttribute(h,y),d=Math.max(d,o.center.distanceToSquared(vm))}o.radius=Math.sqrt(d),a.boundingSphere=o}return t.copy(a.boundingSphere),t}setMatrixAt(e,t){this.validateInstanceId(e);const n=this._matricesTexture,a=this._matricesTexture.image.data;return t.toArray(a,e*16),n.needsUpdate=!0,this}getMatrixAt(e,t){return this.validateInstanceId(e),t.fromArray(this._matricesTexture.image.data,e*16)}setColorAt(e,t){return this.validateInstanceId(e),this._colorsTexture===null&&this._initColorsTexture(),t.toArray(this._colorsTexture.image.data,e*4),this._colorsTexture.needsUpdate=!0,this}getColorAt(e,t){return this.validateInstanceId(e),t.fromArray(this._colorsTexture.image.data,e*4)}setVisibleAt(e,t){return this.validateInstanceId(e),this._instanceInfo[e].visible===t?this:(this._instanceInfo[e].visible=t,this._visibilityChanged=!0,this)}getVisibleAt(e){return this.validateInstanceId(e),this._instanceInfo[e].visible}setGeometryIdAt(e,t){return this.validateInstanceId(e),this.validateGeometryId(t),this._instanceInfo[e].geometryIndex=t,this}getGeometryIdAt(e){return this.validateInstanceId(e),this._instanceInfo[e].geometryIndex}getGeometryRangeAt(e,t={}){this.validateGeometryId(e);const n=this._geometryInfo[e];return t.vertexStart=n.vertexStart,t.vertexCount=n.vertexCount,t.reservedVertexCount=n.reservedVertexCount,t.indexStart=n.indexStart,t.indexCount=n.indexCount,t.reservedIndexCount=n.reservedIndexCount,t.start=n.start,t.count=n.count,t}setInstanceCount(e){const t=this._availableInstanceIds,n=this._instanceInfo;for(t.sort(Ox);t[t.length-1]===n.length-1;)n.pop(),t.pop();if(e<n.length)throw new Error(`BatchedMesh: Instance ids outside the range ${e} are being used. Cannot shrink instance count.`);const a=new Int32Array(e),o=new Int32Array(e);Yu(this._multiDrawCounts,a),Yu(this._multiDrawStarts,o),this._multiDrawCounts=a,this._multiDrawStarts=o,this._maxInstanceCount=e;const c=this._indirectTexture,h=this._matricesTexture,d=this._colorsTexture;c.dispose(),this._initIndirectTexture(),Yu(c.image.data,this._indirectTexture.image.data),h.dispose(),this._initMatricesTexture(),Yu(h.image.data,this._matricesTexture.image.data),d&&(d.dispose(),this._initColorsTexture(),Yu(d.image.data,this._colorsTexture.image.data))}setGeometrySize(e,t){const n=[...this._geometryInfo].filter(h=>h.active);if(Math.max(...n.map(h=>h.vertexStart+h.reservedVertexCount))>e)throw new Error(`BatchedMesh: Geometry vertex values are being used outside the range ${t}. Cannot shrink further.`);if(this.geometry.index&&Math.max(...n.map(d=>d.indexStart+d.reservedIndexCount))>t)throw new Error(`BatchedMesh: Geometry index values are being used outside the range ${t}. Cannot shrink further.`);const o=this.geometry;o.dispose(),this._maxVertexCount=e,this._maxIndexCount=t,this._geometryInitialized&&(this._geometryInitialized=!1,this.geometry=new un,this._initializeGeometry(o));const c=this.geometry;o.index&&Yu(o.index.array,c.index.array);for(const h in o.attributes)Yu(o.attributes[h].array,c.attributes[h].array)}raycast(e,t){const n=this._instanceInfo,a=this._geometryInfo,o=this.matrixWorld,c=this.geometry;Za.material=this.material,Za.geometry.index=c.index,Za.geometry.attributes=c.attributes,Za.geometry.boundingBox===null&&(Za.geometry.boundingBox=new La),Za.geometry.boundingSphere===null&&(Za.geometry.boundingSphere=new Sa);for(let h=0,d=n.length;h<d;h++){if(!n[h].visible||!n[h].active)continue;const p=n[h].geometryIndex,v=a[p];Za.geometry.setDrawRange(v.start,v.count),this.getMatrixAt(h,Za.matrixWorld).premultiply(o),this.getBoundingBoxAt(p,Za.geometry.boundingBox),this.getBoundingSphereAt(p,Za.geometry.boundingSphere),Za.raycast(e,o0);for(let y=0,_=o0.length;y<_;y++){const b=o0[y];b.object=this,b.batchId=h,t.push(b)}o0.length=0}Za.material=null,Za.geometry.index=null,Za.geometry.attributes={},Za.geometry.setDrawRange(0,1/0)}copy(e){return super.copy(e),this.geometry=e.geometry.clone(),this.perObjectFrustumCulled=e.perObjectFrustumCulled,this.sortObjects=e.sortObjects,this.boundingBox=e.boundingBox!==null?e.boundingBox.clone():null,this.boundingSphere=e.boundingSphere!==null?e.boundingSphere.clone():null,this._geometryInfo=e._geometryInfo.map(t=>({...t,boundingBox:t.boundingBox!==null?t.boundingBox.clone():null,boundingSphere:t.boundingSphere!==null?t.boundingSphere.clone():null})),this._instanceInfo=e._instanceInfo.map(t=>({...t})),this._availableInstanceIds=e._availableInstanceIds.slice(),this._availableGeometryIds=e._availableGeometryIds.slice(),this._nextIndexStart=e._nextIndexStart,this._nextVertexStart=e._nextVertexStart,this._geometryCount=e._geometryCount,this._maxInstanceCount=e._maxInstanceCount,this._maxVertexCount=e._maxVertexCount,this._maxIndexCount=e._maxIndexCount,this._geometryInitialized=e._geometryInitialized,this._multiDrawCounts=e._multiDrawCounts.slice(),this._multiDrawStarts=e._multiDrawStarts.slice(),this._indirectTexture=e._indirectTexture.clone(),this._indirectTexture.image.data=this._indirectTexture.image.data.slice(),this._matricesTexture=e._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.data.slice(),this._colorsTexture!==null&&(this._colorsTexture=e._colorsTexture.clone(),this._colorsTexture.image.data=this._colorsTexture.image.data.slice()),this}dispose(){this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this._indirectTexture.dispose(),this._indirectTexture=null,this._colorsTexture!==null&&(this._colorsTexture.dispose(),this._colorsTexture=null)}onBeforeRender(e,t,n,a,o){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;const c=a.getIndex(),h=c===null?1:c.array.BYTES_PER_ELEMENT,d=this._instanceInfo,p=this._multiDrawStarts,v=this._multiDrawCounts,y=this._geometryInfo,_=this.perObjectFrustumCulled,b=this._indirectTexture,T=b.image.data,R=n.isArrayCamera?lD:eE;_&&!n.isArrayCamera&&(Os.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse).multiply(this.matrixWorld),eE.setFromProjectionMatrix(Os,n.coordinateSystem,n.reversedDepth));let A=0;if(this.sortObjects){Os.copy(this.matrixWorld).invert(),vm.setFromMatrixPosition(n.matrixWorld).applyMatrix4(Os),tE.set(0,0,-1).transformDirection(n.matrixWorld).transformDirection(Os);for(let D=0,U=d.length;D<U;D++)if(d[D].visible&&d[D].active){const H=d[D].geometryIndex;this.getMatrixAt(D,Os),this.getBoundingSphereAt(H,qu).applyMatrix4(Os);let F=!1;if(_&&(F=!R.intersectsSphere(qu,n)),!F){const G=y[H],V=cD.subVectors(qu.center,vm).dot(tE);zx.push(G.start,G.count,V,D)}}const M=zx.list,C=this.customSort;C===null?M.sort(o.transparent?sD:aD):C.call(this,M,n);for(let D=0,U=M.length;D<U;D++){const H=M[D];p[A]=H.start*h,v[A]=H.count,T[A]=H.index,A++}zx.reset()}else for(let M=0,C=d.length;M<C;M++)if(d[M].visible&&d[M].active){const D=d[M].geometryIndex;let U=!1;if(_&&(this.getMatrixAt(M,Os),this.getBoundingSphereAt(D,qu).applyMatrix4(Os),U=!R.intersectsSphere(qu,n)),!U){const H=y[D];p[A]=H.start*h,v[A]=H.count,T[A]=M,A++}}b.needsUpdate=!0,this._multiDrawCount=A,this._visibilityChanged=!1}onBeforeShadow(e,t,n,a,o,c){this.onBeforeRender(e,null,a,o,c)}}class Ja extends la{constructor(e){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new _t(16777215),this.map=null,this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.fog=e.fog,this}}const Ay=new K,wy=new K,nE=new jt,ym=new Nd,l0=new Sa,Ix=new K,iE=new K;class Vl extends Bn{constructor(e=new un,t=new Ja){super(),this.isLine=!0,this.type="Line",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}computeLineDistances(){const e=this.geometry;if(e.index===null){const t=e.attributes.position,n=[0];for(let a=1,o=t.count;a<o;a++)Ay.fromBufferAttribute(t,a-1),wy.fromBufferAttribute(t,a),n[a]=n[a-1],n[a]+=Ay.distanceTo(wy);e.setAttribute("lineDistance",new Ot(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(e,t){const n=this.geometry,a=this.matrixWorld,o=e.params.Line.threshold,c=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),l0.copy(n.boundingSphere),l0.applyMatrix4(a),l0.radius+=o,e.ray.intersectsSphere(l0)===!1)return;nE.copy(a).invert(),ym.copy(e.ray).applyMatrix4(nE);const h=o/((this.scale.x+this.scale.y+this.scale.z)/3),d=h*h,p=this.isLineSegments?2:1,v=n.index,_=n.attributes.position;if(v!==null){const b=Math.max(0,c.start),T=Math.min(v.count,c.start+c.count);for(let R=b,A=T-1;R<A;R+=p){const M=v.getX(R),C=v.getX(R+1),D=c0(this,e,ym,d,M,C,R);D&&t.push(D)}if(this.isLineLoop){const R=v.getX(T-1),A=v.getX(b),M=c0(this,e,ym,d,R,A,T-1);M&&t.push(M)}}else{const b=Math.max(0,c.start),T=Math.min(_.count,c.start+c.count);for(let R=b,A=T-1;R<A;R+=p){const M=c0(this,e,ym,d,R,R+1,R);M&&t.push(M)}if(this.isLineLoop){const R=c0(this,e,ym,d,T-1,b,T-1);R&&t.push(R)}}}updateMorphTargets(){const t=this.geometry.morphAttributes,n=Object.keys(t);if(n.length>0){const a=t[n[0]];if(a!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,c=a.length;o<c;o++){const h=a[o].name||String(o);this.morphTargetInfluences.push(0),this.morphTargetDictionary[h]=o}}}}}function c0(s,e,t,n,a,o,c){const h=s.geometry.attributes.position;if(Ay.fromBufferAttribute(h,a),wy.fromBufferAttribute(h,o),t.distanceSqToSegment(Ay,wy,Ix,iE)>n)return;Ix.applyMatrix4(s.matrixWorld);const p=e.ray.origin.distanceTo(Ix);if(!(p<e.near||p>e.far))return{distance:p,point:iE.clone().applyMatrix4(s.matrixWorld),index:c,face:null,faceIndex:null,barycoord:null,object:s}}const aE=new K,sE=new K;class so extends Vl{constructor(e,t){super(e,t),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.index===null){const t=e.attributes.position,n=[];for(let a=0,o=t.count;a<o;a+=2)aE.fromBufferAttribute(t,a),sE.fromBufferAttribute(t,a+1),n[a]=a===0?0:n[a-1],n[a+1]=n[a]+aE.distanceTo(sE);e.setAttribute("lineDistance",new Ot(n,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class wb extends Vl{constructor(e,t){super(e,t),this.isLineLoop=!0,this.type="LineLoop"}}class e_ extends la{constructor(e){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new _t(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}const rE=new jt,BS=new Nd,u0=new Sa,f0=new K;class Rb extends Bn{constructor(e=new un,t=new e_){super(),this.isPoints=!0,this.type="Points",this.geometry=e,this.material=t,this.morphTargetDictionary=void 0,this.morphTargetInfluences=void 0,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}raycast(e,t){const n=this.geometry,a=this.matrixWorld,o=e.params.Points.threshold,c=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),u0.copy(n.boundingSphere),u0.applyMatrix4(a),u0.radius+=o,e.ray.intersectsSphere(u0)===!1)return;rE.copy(a).invert(),BS.copy(e.ray).applyMatrix4(rE);const h=o/((this.scale.x+this.scale.y+this.scale.z)/3),d=h*h,p=n.index,y=n.attributes.position;if(p!==null){const _=Math.max(0,c.start),b=Math.min(p.count,c.start+c.count);for(let T=_,R=b;T<R;T++){const A=p.getX(T);f0.fromBufferAttribute(y,A),oE(f0,A,d,a,e,t,this)}}else{const _=Math.max(0,c.start),b=Math.min(y.count,c.start+c.count);for(let T=_,R=b;T<R;T++)f0.fromBufferAttribute(y,T),oE(f0,T,d,a,e,t,this)}}updateMorphTargets(){const t=this.geometry.morphAttributes,n=Object.keys(t);if(n.length>0){const a=t[n[0]];if(a!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,c=a.length;o<c;o++){const h=a[o].name||String(o);this.morphTargetInfluences.push(0),this.morphTargetDictionary[h]=o}}}}}function oE(s,e,t,n,a,o,c){const h=BS.distanceSqToPoint(s);if(h<t){const d=new K;BS.closestPointToPoint(s,d),d.applyMatrix4(n);const p=a.ray.origin.distanceTo(d);if(p<a.near||p>a.far)return;o.push({distance:p,distanceToRay:Math.sqrt(h),point:d,index:e,face:null,faceIndex:null,barycoord:null,object:c})}}class n2 extends ei{constructor(e,t,n,a,o=Hn,c=Hn,h,d,p){super(e,t,n,a,o,c,h,d,p),this.isVideoTexture=!0,this.generateMipmaps=!1,this._requestVideoFrameCallbackId=0;const v=this;function y(){v.needsUpdate=!0,v._requestVideoFrameCallbackId=e.requestVideoFrameCallback(y)}"requestVideoFrameCallback"in e&&(this._requestVideoFrameCallbackId=e.requestVideoFrameCallback(y))}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;"requestVideoFrameCallback"in e===!1&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}dispose(){this._requestVideoFrameCallbackId!==0&&this.source.data.cancelVideoFrameCallback(this._requestVideoFrameCallbackId),super.dispose()}}class fD extends n2{constructor(e,t,n,a,o,c,h,d){super({},e,t,n,a,o,c,h,d),this.isVideoFrameTexture=!0}update(){}clone(){return new this.constructor().copy(this)}setFrame(e){this.image=e,this.needsUpdate=!0}}class hD extends ei{constructor(e,t){super({width:e,height:t}),this.isFramebufferTexture=!0,this.magFilter=oa,this.minFilter=oa,this.generateMipmaps=!1,this.needsUpdate=!0}}class t_ extends ei{constructor(e,t,n,a
vendor: 5,108 bytes, line 103
103,o,c,h,d,p,v,y,_){super(null,c,h,d,p,v,a,o,y,_),this.isCompressedTexture=!0,this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class dD extends t_{constructor(e,t,n,a,o,c){super(e,t,n,o,c),this.isCompressedArrayTexture=!0,this.image.depth=a,this.wrapR=Gi,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class pD extends t_{constructor(e,t,n){super(void 0,e[0].width,e[0].height,t,n,Wo),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}class mD extends ei{constructor(e,t,n,a,o,c,h,d,p){super(e,t,n,a,o,c,h,d,p),this.isCanvasTexture=!0,this.needsUpdate=!0}}class n_ extends ei{constructor(e,t,n=Zo,a,o,c,h=oa,d=oa,p,v=md,y=1){if(v!==md&&v!==gd)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");const _={width:e,height:t,depth:y};super(_,a,o,c,h,d,v,n,p),this.isDepthTexture=!0,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.source=new Hc(Object.assign({},e.image)),this.compareFunction=e.compareFunction,this}toJSON(e){const t=super.toJSON(e);return this.compareFunction!==null&&(t.compareFunction=this.compareFunction),t}}class Cb extends ei{constructor(e=null){super(),this.sourceTexture=e,this.isExternalTexture=!0}copy(e){return super.copy(e),this.sourceTexture=e.sourceTexture,this}}class i_ extends un{constructor(e=1,t=1,n=4,a=8,o=1){super(),this.type="CapsuleGeometry",this.parameters={radius:e,height:t,capSegments:n,radialSegments:a,heightSegments:o},t=Math.max(0,t),n=Math.max(1,Math.floor(n)),a=Math.max(3,Math.floor(a)),o=Math.max(1,Math.floor(o));const c=[],h=[],d=[],p=[],v=t/2,y=Math.PI/2*e,_=t,b=2*y+_,T=n*2+o,R=a+1,A=new K,M=new K;for(let C=0;C<=T;C++){let D=0,U=0,H=0,F=0;if(C<=n){const O=C/n,z=O*Math.PI/2;U=-v-e*Math.cos(z),H=e*Math.sin(z),F=-e*Math.cos(z),D=O*y}else if(C<=n+o){const O=(C-n)/o;U=-v+O*t,H=e,F=0,D=y+O*_}else{const O=(C-n-o)/n,z=O*Math.PI/2;U=v+e*Math.sin(z),H=e*Math.cos(z),F=e*Math.sin(z),D=y+_+O*y}const G=Math.max(0,Math.min(1,D/b));let V=0;C===0?V=.5/a:C===T&&(V=-.5/a);for(let O=0;O<=a;O++){const z=O/a,Y=z*Math.PI*2,se=Math.sin(Y),ce=Math.cos(Y);M.x=-H*ce,M.y=U,M.z=H*se,h.push(M.x,M.y,M.z),A.set(-H*ce,F,H*se),A.normalize(),d.push(A.x,A.y,A.z),p.push(z+V,G)}if(C>0){const O=(C-1)*R;for(let z=0;z<a;z++){const Y=O+z,se=O+z+1,ce=C*R+z,he=C*R+z+1;c.push(Y,se,ce),c.push(se,he,ce)}}}this.setIndex(c),this.setAttribute("position",new Ot(h,3)),this.setAttribute("normal",new Ot(d,3)),this.setAttribute("uv",new Ot(p,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new i_(e.radius,e.height,e.capSegments,e.radialSegments,e.heightSegments)}}class a_ extends un{constructor(e=1,t=32,n=0,a=Math.PI*2){super(),this.type="CircleGeometry",this.parameters={radius:e,segments:t,thetaStart:n,thetaLength:a},t=Math.max(3,t);const o=[],c=[],h=[],d=[],p=new K,v=new Je;c.push(0,0,0),h.push(0,0,1),d.push(.5,.5);for(let y=0,_=3;y<=t;y++,_+=3){const b=n+y/t*a;p.x=e*Math.cos(b),p.y=e*Math.sin(b),c.push(p.x,p.y,p.z),h.push(0,0,1),v.x=(c[_]/e+1)/2,v.y=(c[_+1]/e+1)/2,d.push(v.x,v.y)}for(let y=1;y<=t;y++)o.push(y,y+1,0);this.setIndex(o),this.setAttribute("position",new Ot(c,3)),this.setAttribute("normal",new Ot(h,3)),this.setAttribute("uv",new Ot(d,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new a_(e.radius,e.segments,e.thetaStart,e.thetaLength)}}class cg extends un{constructor(e=1,t=1,n=1,a=32,o=1,c=!1,h=0,d=Math.PI*2){super(),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:n,radialSegments:a,heightSegments:o,openEnded:c,thetaStart:h,thetaLength:d};const p=this;a=Math.floor(a),o=Math.floor(o);const v=[],y=[],_=[],b=[];let T=0;const R=[],A=n/2;let M=0;C(),c===!1&&(e>0&&D(!0),t>0&&D(!1)),this.setIndex(v),this.setAttribute("position",new Ot(y,3)),this.setAttribute("normal",new Ot(_,3)),this.setAttribute("uv",new Ot(b,2));function C(){const U=new K,H=new K;let F=0;const G=(t-e)/n;for(let V=0;V<=o;V++){const O=[],z=V/o,Y=z*(t-e)+e;for(let se=0;se<=a;se++){const ce=se/a,he=ce*d+h,me=Math.sin(he),P=Math.cos(he);H.x=Y*me,H.y=-z*n+A,H.z=Y*P,y.push(H.x,H.y,H.z),U.set(me,G,P).normalize(),_.push(U.x,U.y,U.z),b.push(ce,1-z),O.push(T++)}R.push(O)}for(let V=0;V<a;V++)for(let O=0;O<o;O++){const z=R[O][V],Y=R[O+1][V],se=R[O+1][V+1],ce=R[O][V+1];(e>0||O!==0)&&(v.push(z,Y,ce),F+=3),(t>0||O!==o-1)&&(v.push(Y,se,ce),F+=3)}p.addGroup(M,F,0),M+=F}function D(U){const H=T,F=new Je,G=new K;let V=0;const O=U===!0?e:t,z=U===!0?1:-1;for(let se=1;se<=a;se++)y.push(0,A*z,0),_.push(0,z,0),b.push(.5,.5),T++;const Y=T;for(let se=0;se<=a;se++){const he=se/a*d+h,me=Math.cos(he),P=Math.sin(he);G.x=O*P,G.y=A*z,G.z=O*me,y.push(G.x,G.y,G.z),_.push(0,z,0),F.x=me*.5+.5,F.y=P*.5*z+.5,b.push(F.x,F.y),T++}for(let se=0;se<a;se++){const ce=H+se,he=Y+se;U===!0?v.push(he,he+1,ce):v.push(he+1,he,ce),V+=3}p.addGroup(M,V,U===!0?1:2),M+=V}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}
vendor: 13,215 bytes, line 103
103static fromJSON(e){return new cg(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class ug extends cg{constructor(e=1,t=1,n=32,a=1,o=!1,c=0,h=Math.PI*2){super(0,e,t,n,a,o,c,h),this.type="ConeGeometry",this.parameters={radius:e,height:t,radialSegments:n,heightSegments:a,openEnded:o,thetaStart:c,thetaLength:h}}static fromJSON(e){return new ug(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class Wc extends un{constructor(e=[],t=[],n=1,a=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:e,indices:t,radius:n,detail:a};const o=[],c=[];h(a),p(n),v(),this.setAttribute("position",new Ot(o,3)),this.setAttribute("normal",new Ot(o.slice(),3)),this.setAttribute("uv",new Ot(c,2)),a===0?this.computeVertexNormals():this.normalizeNormals();function h(C){const D=new K,U=new K,H=new K;for(let F=0;F<t.length;F+=3)b(t[F+0],D),b(t[F+1],U),b(t[F+2],H),d(D,U,H,C)}function d(C,D,U,H){const F=H+1,G=[];for(let V=0;V<=F;V++){G[V]=[];const O=C.clone().lerp(U,V/F),z=D.clone().lerp(U,V/F),Y=F-V;for(let se=0;se<=Y;se++)se===0&&V===F?G[V][se]=O:G[V][se]=O.clone().lerp(z,se/Y)}for(let V=0;V<F;V++)for(let O=0;O<2*(F-V)-1;O++){const z=Math.floor(O/2);O%2===0?(_(G[V][z+1]),_(G[V+1][z]),_(G[V][z])):(_(G[V][z+1]),_(G[V+1][z+1]),_(G[V+1][z]))}}function p(C){const D=new K;for(let U=0;U<o.length;U+=3)D.x=o[U+0],D.y=o[U+1],D.z=o[U+2],D.normalize().multiplyScalar(C),o[U+0]=D.x,o[U+1]=D.y,o[U+2]=D.z}function v(){const C=new K;for(let D=0;D<o.length;D+=3){C.x=o[D+0],C.y=o[D+1],C.z=o[D+2];const U=A(C)/2/Math.PI+.5,H=M(C)/Math.PI+.5;c.push(U,1-H)}T(),y()}function y(){for(let C=0;C<c.length;C+=6){const D=c[C+0],U=c[C+2],H=c[C+4],F=Math.max(D,U,H),G=Math.min(D,U,H);F>.9&&G<.1&&(D<.2&&(c[C+0]+=1),U<.2&&(c[C+2]+=1),H<.2&&(c[C+4]+=1))}}function _(C){o.push(C.x,C.y,C.z)}function b(C,D){const U=C*3;D.x=e[U+0],D.y=e[U+1],D.z=e[U+2]}function T(){const C=new K,D=new K,U=new K,H=new K,F=new Je,G=new Je,V=new Je;for(let O=0,z=0;O<o.length;O+=9,z+=6){C.set(o[O+0],o[O+1],o[O+2]),D.set(o[O+3],o[O+4],o[O+5]),U.set(o[O+6],o[O+7],o[O+8]),F.set(c[z+0],c[z+1]),G.set(c[z+2],c[z+3]),V.set(c[z+4],c[z+5]),H.copy(C).add(D).add(U).divideScalar(3);const Y=A(H);R(F,z+0,C,Y),R(G,z+2,D,Y),R(V,z+4,U,Y)}}function R(C,D,U,H){H<0&&C.x===1&&(c[D]=C.x-1),U.x===0&&U.z===0&&(c[D]=H/2/Math.PI+.5)}function A(C){return Math.atan2(C.z,-C.x)}function M(C){return Math.atan2(-C.y,Math.sqrt(C.x*C.x+C.z*C.z))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Wc(e.vertices,e.indices,e.radius,e.details)}}class s_ extends Wc{constructor(e=1,t=0){const n=(1+Math.sqrt(5))/2,a=1/n,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,-a,-n,0,-a,n,0,a,-n,0,a,n,-a,-n,0,-a,n,0,a,-n,0,a,n,0,-n,0,-a,n,0,-a,-n,0,a,n,0,a],c=[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,c,e,t),this.type="DodecahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new s_(e.radius,e.detail)}}const h0=new K,d0=new K,Bx=new K,p0=new Is;class i2 extends un{constructor(e=null,t=1){if(super(),this.type="EdgesGeometry",this.parameters={geometry:e,thresholdAngle:t},e!==null){const a=Math.pow(10,4),o=Math.cos(pf*t),c=e.getIndex(),h=e.getAttribute("position"),d=c?c.count:h.count,p=[0,0,0],v=["a","b","c"],y=new Array(3),_={},b=[];for(let T=0;T<d;T+=3){c?(p[0]=c.getX(T),p[1]=c.getX(T+1),p[2]=c.getX(T+2)):(p[0]=T,p[1]=T+1,p[2]=T+2);const{a:R,b:A,c:M}=p0;if(R.fromBufferAttribute(h,p[0]),A.fromBufferAttribute(h,p[1]),M.fromBufferAttribute(h,p[2]),p0.getNormal(Bx),y[0]=`${Math.round(R.x*a)},${Math.round(R.y*a)},${Math.round(R.z*a)}`,y[1]=`${Math.round(A.x*a)},${Math.round(A.y*a)},${Math.round(A.z*a)}`,y[2]=`${Math.round(M.x*a)},${Math.round(M.y*a)},${Math.round(M.z*a)}`,!(y[0]===y[1]||y[1]===y[2]||y[2]===y[0]))for(let C=0;C<3;C++){const D=(C+1)%3,U=y[C],H=y[D],F=p0[v[C]],G=p0[v[D]],V=`${U}_${H}`,O=`${H}_${U}`;O in _&&_[O]?(Bx.dot(_[O].normal)<=o&&(b.push(F.x,F.y,F.z),b.push(G.x,G.y,G.z)),_[O]=null):V in _||(_[V]={index0:p[C],index1:p[D],normal:Bx.clone()})}}for(const T in _)if(_[T]){const{index0:R,index1:A}=_[T];h0.fromBufferAttribute(h,R),d0.fromBufferAttribute(h,A),b.push(h0.x,h0.y,h0.z),b.push(d0.x,d0.y,d0.z)}this.setAttribute("position",new Ot(b,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}class ro{constructor(){this.type="Curve",this.arcLengthDivisions=200,this.needsUpdate=!1,this.cacheArcLengths=null}getPoint(){console.warn("THREE.Curve: .getPoint() not implemented.")}getPointAt(e,t){const n=this.getUtoTmapping(e);return this.getPoint(n,t)}getPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return t}getSpacedPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPointAt(n/e));return t}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const t=[];let n,a=this.getPoint(0),o=0;t.push(0);for(let c=1;c<=e;c++)n=this.getPoint(c/e),o+=n.distanceTo(a),t.push(o),a=n;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t=null){const n=this.getLengths();let a=0;const o=n.length;let c;t?c=t:c=e*n[o-1];let h=0,d=o-1,p;for(;h<=d;)if(a=Math.floor(h+(d-h)/2),p=n[a]-c,p<0)h=a+1;else if(p>0)d=a-1;else{d=a;break}if(a=d,n[a]===c)return a/(o-1);const v=n[a],_=n[a+1]-v,b=(c-v)/_;return(a+b)/(o-1)}getTangent(e,t){let a=e-1e-4,o=e+1e-4;a<0&&(a=0),o>1&&(o=1);const c=this.getPoint(a),h=this.getPoint(o),d=t||(c.isVector2?new Je:new K);return d.copy(h).sub(c).normalize(),d}getTangentAt(e,t){const n=this.getUtoTmapping(e);return this.getTangent(n,t)}computeFrenetFrames(e,t=!1){const n=new K,a=[],o=[],c=[],h=new K,d=new jt;for(let b=0;b<=e;b++){const T=b/e;a[b]=this.getTangentAt(T,new K)}o[0]=new K,c[0]=new K;let p=Number.MAX_VALUE;const v=Math.abs(a[0].x),y=Math.abs(a[0].y),_=Math.abs(a[0].z);v<=p&&(p=v,n.set(1,0,0)),y<=p&&(p=y,n.set(0,1,0)),_<=p&&n.set(0,0,1),h.crossVectors(a[0],n).normalize(),o[0].crossVectors(a[0],h),c[0].crossVectors(a[0],o[0]);for(let b=1;b<=e;b++){if(o[b]=o[b-1].clone(),c[b]=c[b-1].clone(),h.crossVectors(a[b-1],a[b]),h.length()>Number.EPSILON){h.normalize();const T=Math.acos($t(a[b-1].dot(a[b]),-1,1));o[b].applyMatrix4(d.makeRotationAxis(h,T))}c[b].crossVectors(a[b],o[b])}if(t===!0){let b=Math.acos($t(o[0].dot(o[e]),-1,1));b/=e,a[0].dot(h.crossVectors(o[0],o[e]))>0&&(b=-b);for(let T=1;T<=e;T++)o[T].applyMatrix4(d.makeRotationAxis(a[T],b*T)),c[T].crossVectors(a[T],o[T])}return{tangents:a,normals:o,binormals:c}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.7,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class r_ extends ro{constructor(e=0,t=0,n=1,a=1,o=0,c=Math.PI*2,h=!1,d=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=n,this.yRadius=a,this.aStartAngle=o,this.aEndAngle=c,this.aClockwise=h,this.aRotation=d}getPoint(e,t=new Je){const n=t,a=Math.PI*2;let o=this.aEndAngle-this.aStartAngle;const c=Math.abs(o)<Number.EPSILON;for(;o<0;)o+=a;for(;o>a;)o-=a;o<Number.EPSILON&&(c?o=0:o=a),this.aClockwise===!0&&!c&&(o===a?o=-a:o=o-a);const h=this.aStartAngle+e*o;let d=this.aX+this.xRadius*Math.cos(h),p=this.aY+this.yRadius*Math.sin(h);if(this.aRotation!==0){const v=Math.cos(this.aRotation),y=Math.sin(this.aRotation),_=d-this.aX,b=p-this.aY;d=_*v-b*y+this.aX,p=_*y+b*v+this.aY}return n.set(d,p)}copy(e){return super.copy(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}toJSON(){const e=super.toJSON();return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e}fromJSON(e){return super.fromJSON(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}}class a2 extends r_{constructor(e,t,n,a,o,c){super(e,t,n,n,a,o,c),this.isArcCurve=!0,this.type="ArcCurve"}}function Nb(){let s=0,e=0,t=0,n=0;function a(o,c,h,d){s=o,e=h,t=-3*o+3*c-2*h-d,n=2*o-2*c+h+d}return{initCatmullRom:function(o,c,h,d,p){a(c,h,p*(h-o),p*(d-c))},initNonuniformCatmullRom:function(o,c,h,d,p,v,y){let _=(c-o)/p-(h-o)/(p+v)+(h-c)/v,b=(h-c)/v-(d-c)/(v+y)+(d-h)/y;_*=v,b*=v,a(c,h,_,b)},calc:function(o){const c=o*o,h=c*o;return s+e*o+t*c+n*h}}}const m0=new K,Px=new Nb,Hx=new Nb,Fx=new Nb;class s2 extends ro{constructor(e=[],t=!1,n="centripetal",a=.5){super(),this.isCatmullRomCurve3=!0,this.type="CatmullRomCurve3",this.points=e,this.closed=t,this.curveType=n,this.tension=a}getPoint(e,t=new K){const n=t,a=this.points,o=a.length,c=(o-(this.closed?0:1))*e;let h=Math.floor(c),d=c-h;this.closed?h+=h>0?0:(Math.floor(Math.abs(h)/o)+1)*o:d===0&&h===o-1&&(h=o-2,d=1);let p,v;this.closed||h>0?p=a[(h-1)%o]:(m0.subVectors(a[0],a[1]).add(a[0]),p=m0);const y=a[h%o],_=a[(h+1)%o];if(this.closed||h+2<o?v=a[(h+2)%o]:(m0.subVectors(a[o-1],a[o-2]).add(a[o-1]),v=m0),this.curveType==="centripetal"||this.curveType==="chordal"){const b=this.curveType==="chordal"?.5:.25;let T=Math.pow(p.distanceToSquared(y),b),R=Math.pow(y.distanceToSquared(_),b),A=Math.pow(_.distanceToSquared(v),b);R<1e-4&&(R=1),T<1e-4&&(T=R),A<1e-4&&(A=R),Px.initNonuniformCatmullRom(p.x,y.x,_.x,v.x,T,R,A),Hx.initNonuniformCatmullRom(p.y,y.y,_.y,v.y,T,R,A),Fx.initNonuniformCatmullRom(p.z,y.z,_.z,v.z,T,R,A)}else this.curveType==="catmullrom"&&(Px.initCatmullRom(p.x,y.x,_.x,v.x,this.tension),Hx.initCatmullRom(p.y,y.y,_.y,v.y,this.tension),Fx.initCatmullRom(p.z,y.z,_.z,v.z,this.tension));return n.set(Px.calc(d),Hx.calc(d),Fx.calc(d)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const a=e.points[t];this.points.push(a.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){const a=this.points[t];e.points.push(a.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const a=e.points[t];this.points.push(new K().fromArray(a))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}}function lE(s,e,t,n,a){const o=(n-e)*.5,c=(a-t)*.5,h=s*s,d=s*h;return(2*t-2*n+o+c)*d+(-3*t+3*n-2*o-c)*h+o*s+t}function gD(s,e){const t=1-s;return t*t*e}function vD(s,e){return 2*(1-s)*s*e}function yD(s,e){return s*s*e}function Um(s,e,t,n){return gD(s,e)+vD(s,t)+yD(s,n)}function _D(s,e){const t=1-s;return t*t*t*e}function xD(s,e){const t=1-s;return 3*t*t*s*e}function SD(s,e){return 3*(1-s)*s*s*e}function bD(s,e){return s*s*s*e}function Lm(s,e,t,n,a){return _D(s,e)+xD(s,t)+SD(s,n)+bD(s,a)}class Db extends ro{constructor(e=new Je,t=new Je,n=new Je,a=new Je){super(),this.isCubicBezierCurve=!0,this.type="CubicBezierCurve",this.v0=e,this.v1=t,this.v2=n,this.v3=a}getPoint(e,t=new Je){const n=t,a=this.v0,o=this.v1,c=this.v2,h=this.v3;return n.set(Lm(e,a.x,o.x,c.x,h.x),Lm(e,a.y,o.y,c.y,h.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class r2 extends ro{constructor(e=new K,t=new K,n=new K,a=new K){super(),this.isCubicBezierCurve3=!0,this.type="CubicBezierCurve3",this.v0=e,this.v1=t,this.v2=n,this.v3=a}getPoint(e,t=new K){const n=t,a=this.v0,o=this.v1,c=this.v2,h=this.v3;return n.set(Lm(e,a.x,o.x,c.x,h.x),Lm(e,a.y,o.y,c.y,h.y),Lm(e,a.z,o.z,c.z,h.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class Ub extends ro{constructor(e=new Je,t=new Je){super(),this.isLineCurve=!0,this.type="LineCurve",this.v1=e,this.v2=t}getPoint(e,t=new Je){const n=t;return e===1?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}
vendor: 13,956 bytes, line 103
103getTangent(e,t=new Je){return t.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,t){return this.getTangent(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class o2 extends ro{constructor(e=new K,t=new K){super(),this.isLineCurve3=!0,this.type="LineCurve3",this.v1=e,this.v2=t}getPoint(e,t=new K){const n=t;return e===1?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e,t=new K){return t.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,t){return this.getTangent(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class Lb extends ro{constructor(e=new Je,t=new Je,n=new Je){super(),this.isQuadraticBezierCurve=!0,this.type="QuadraticBezierCurve",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new Je){const n=t,a=this.v0,o=this.v1,c=this.v2;return n.set(Um(e,a.x,o.x,c.x),Um(e,a.y,o.y,c.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class Ob extends ro{constructor(e=new K,t=new K,n=new K){super(),this.isQuadraticBezierCurve3=!0,this.type="QuadraticBezierCurve3",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new K){const n=t,a=this.v0,o=this.v1,c=this.v2;return n.set(Um(e,a.x,o.x,c.x),Um(e,a.y,o.y,c.y),Um(e,a.z,o.z,c.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class zb extends ro{constructor(e=[]){super(),this.isSplineCurve=!0,this.type="SplineCurve",this.points=e}getPoint(e,t=new Je){const n=t,a=this.points,o=(a.length-1)*e,c=Math.floor(o),h=o-c,d=a[c===0?c:c-1],p=a[c],v=a[c>a.length-2?a.length-1:c+1],y=a[c>a.length-3?a.length-1:c+2];return n.set(lE(h,d.x,p.x,v.x,y.x),lE(h,d.y,p.y,v.y,y.y)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const a=e.points[t];this.points.push(a.clone())}return this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){const a=this.points[t];e.points.push(a.toArray())}return e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const a=e.points[t];this.points.push(new Je().fromArray(a))}return this}}var Ry=Object.freeze({__proto__:null,ArcCurve:a2,CatmullRomCurve3:s2,CubicBezierCurve:Db,CubicBezierCurve3:r2,EllipseCurve:r_,LineCurve:Ub,LineCurve3:o2,QuadraticBezierCurve:Lb,QuadraticBezierCurve3:Ob,SplineCurve:zb});class l2 extends ro{constructor(){super(),this.type="CurvePath",this.curves=[],this.autoClose=!1}add(e){this.curves.push(e)}closePath(){const e=this.curves[0].getPoint(0),t=this.curves[this.curves.length-1].getPoint(1);if(!e.equals(t)){const n=e.isVector2===!0?"LineCurve":"LineCurve3";this.curves.push(new Ry[n](t,e))}return this}getPoint(e,t){const n=e*this.getLength(),a=this.getCurveLengths();let o=0;for(;o<a.length;){if(a[o]>=n){const c=a[o]-n,h=this.curves[o],d=h.getLength(),p=d===0?0:1-c/d;return h.getPointAt(p,t)}o++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let t=0;for(let n=0,a=this.curves.length;n<a;n++)t+=this.curves[n].getLength(),e.push(t);return this.cacheLengths=e,e}getSpacedPoints(e=40){const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return this.autoClose&&t.push(t[0]),t}getPoints(e=12){const t=[];let n;for(let a=0,o=this.curves;a<o.length;a++){const c=o[a],h=c.isEllipseCurve?e*2:c.isLineCurve||c.isLineCurve3?1:c.isSplineCurve?e*c.points.length:e,d=c.getPoints(h);for(let p=0;p<d.length;p++){const v=d[p];n&&n.equals(v)||(t.push(v),n=v)}}return this.autoClose&&t.length>1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,n=e.curves.length;t<n;t++){const a=e.curves[t];this.curves.push(a.clone())}return this.autoClose=e.autoClose,this}toJSON(){const e=super.toJSON();e.autoClose=this.autoClose,e.curves=[];for(let t=0,n=this.curves.length;t<n;t++){const a=this.curves[t];e.curves.push(a.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.autoClose=e.autoClose,this.curves=[];for(let t=0,n=e.curves.length;t<n;t++){const a=e.curves[t];this.curves.push(new Ry[a.type]().fromJSON(a))}return this}}class Cy extends l2{constructor(e){super(),this.type="Path",this.currentPoint=new Je,e&&this.setFromPoints(e)}setFromPoints(e){this.moveTo(e[0].x,e[0].y);for(let t=1,n=e.length;t<n;t++)this.lineTo(e[t].x,e[t].y);return this}moveTo(e,t){return this.currentPoint.set(e,t),this}lineTo(e,t){const n=new Ub(this.currentPoint.clone(),new Je(e,t));return this.curves.push(n),this.currentPoint.set(e,t),this}quadraticCurveTo(e,t,n,a){const o=new Lb(this.currentPoint.clone(),new Je(e,t),new Je(n,a));return this.curves.push(o),this.currentPoint.set(n,a),this}bezierCurveTo(e,t,n,a,o,c){const h=new Db(this.currentPoint.clone(),new Je(e,t),new Je(n,a),new Je(o,c));return this.curves.push(h),this.currentPoint.set(o,c),this}splineThru(e){const t=[this.currentPoint.clone()].concat(e),n=new zb(t);return this.curves.push(n),this.currentPoint.copy(e[e.length-1]),this}arc(e,t,n,a,o,c){const h=this.currentPoint.x,d=this.currentPoint.y;return this.absarc(e+h,t+d,n,a,o,c),this}absarc(e,t,n,a,o,c){return this.absellipse(e,t,n,n,a,o,c),this}ellipse(e,t,n,a,o,c,h,d){const p=this.currentPoint.x,v=this.currentPoint.y;return this.absellipse(e+p,t+v,n,a,o,c,h,d),this}absellipse(e,t,n,a,o,c,h,d){const p=new r_(e,t,n,a,o,c,h,d);if(this.curves.length>0){const y=p.getPoint(0);y.equals(this.currentPoint)||this.lineTo(y.x,y.y)}this.curves.push(p);const v=p.getPoint(1);return this.currentPoint.copy(v),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class mf extends Cy{constructor(e){super(e),this.uuid=Js(),this.type="Shape",this.holes=[]}getPointsHoles(e){const t=[];for(let n=0,a=this.holes.length;n<a;n++)t[n]=this.holes[n].getPoints(e);return t}extractPoints(e){return{shape:this.getPoints(e),holes:this.getPointsHoles(e)}}copy(e){super.copy(e),this.holes=[];for(let t=0,n=e.holes.length;t<n;t++){const a=e.holes[t];this.holes.push(a.clone())}return this}toJSON(){const e=super.toJSON();e.uuid=this.uuid,e.holes=[];for(let t=0,n=this.holes.length;t<n;t++){const a=this.holes[t];e.holes.push(a.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.uuid=e.uuid,this.holes=[];for(let t=0,n=e.holes.length;t<n;t++){const a=e.holes[t];this.holes.push(new Cy().fromJSON(a))}return this}}function MD(s,e,t=2){const n=e&&e.length,a=n?e[0]*t:s.length;let o=c2(s,0,a,t,!0);const c=[];if(!o||o.next===o.prev)return c;let h,d,p;if(n&&(o=RD(s,e,o,t)),s.length>80*t){h=1/0,d=1/0;let v=-1/0,y=-1/0;for(let _=t;_<a;_+=t){const b=s[_],T=s[_+1];b<h&&(h=b),T<d&&(d=T),b>v&&(v=b),T>y&&(y=T)}p=Math.max(v-h,y-d),p=p!==0?32767/p:0}return jm(o,c,t,h,d,p,0),c}function c2(s,e,t,n,a){let o;if(a===HD(s,e,t,n)>0)for(let c=e;c<t;c+=n)o=cE(c/n|0,s[c],s[c+1],o);else for(let c=t-n;c>=e;c-=n)o=cE(c/n|0,s[c],s[c+1],o);return o&&Md(o,o.next)&&(Ym(o),o=o.next),o}function yf(s,e){if(!s)return s;e||(e=s);let t=s,n;do if(n=!1,!t.steiner&&(Md(t,t.next)||Ci(t.prev,t,t.next)===0)){if(Ym(t),t=e=t.prev,t===t.next)break;n=!0}else t=t.next;while(n||t!==e);return e}function jm(s,e,t,n,a,o,c){if(!s)return;!c&&o&&LD(s,n,a,o);let h=s;for(;s.prev!==s.next;){const d=s.prev,p=s.next;if(o?TD(s,n,a,o):ED(s)){e.push(d.i,s.i,p.i),Ym(s),s=p.next,h=p.next;continue}if(s=p,s===h){c?c===1?(s=AD(yf(s),e),jm(s,e,t,n,a,o,2)):c===2&&wD(s,e,t,n,a,o):jm(yf(s),e,t,n,a,o,1);break}}}function ED(s){const e=s.prev,t=s,n=s.next;if(Ci(e,t,n)>=0)return!1;const a=e.x,o=t.x,c=n.x,h=e.y,d=t.y,p=n.y,v=Math.min(a,o,c),y=Math.min(h,d,p),_=Math.max(a,o,c),b=Math.max(h,d,p);let T=n.next;for(;T!==e;){if(T.x>=v&&T.x<=_&&T.y>=y&&T.y<=b&&Em(a,h,o,d,c,p,T.x,T.y)&&Ci(T.prev,T,T.next)>=0)return!1;T=T.next}return!0}function TD(s,e,t,n){const a=s.prev,o=s,c=s.next;if(Ci(a,o,c)>=0)return!1;const h=a.x,d=o.x,p=c.x,v=a.y,y=o.y,_=c.y,b=Math.min(h,d,p),T=Math.min(v,y,_),R=Math.max(h,d,p),A=Math.max(v,y,_),M=PS(b,T,e,t,n),C=PS(R,A,e,t,n);let D=s.prevZ,U=s.nextZ;for(;D&&D.z>=M&&U&&U.z<=C;){if(D.x>=b&&D.x<=R&&D.y>=T&&D.y<=A&&D!==a&&D!==c&&Em(h,v,d,y,p,_,D.x,D.y)&&Ci(D.prev,D,D.next)>=0||(D=D.prevZ,U.x>=b&&U.x<=R&&U.y>=T&&U.y<=A&&U!==a&&U!==c&&Em(h,v,d,y,p,_,U.x,U.y)&&Ci(U.prev,U,U.next)>=0))return!1;U=U.nextZ}for(;D&&D.z>=M;){if(D.x>=b&&D.x<=R&&D.y>=T&&D.y<=A&&D!==a&&D!==c&&Em(h,v,d,y,p,_,D.x,D.y)&&Ci(D.prev,D,D.next)>=0)return!1;D=D.prevZ}for(;U&&U.z<=C;){if(U.x>=b&&U.x<=R&&U.y>=T&&U.y<=A&&U!==a&&U!==c&&Em(h,v,d,y,p,_,U.x,U.y)&&Ci(U.prev,U,U.next)>=0)return!1;U=U.nextZ}return!0}function AD(s,e){let t=s;do{const n=t.prev,a=t.next.next;!Md(n,a)&&f2(n,t,t.next,a)&&qm(n,a)&&qm(a,n)&&(e.push(n.i,t.i,a.i),Ym(t),Ym(t.next),t=s=a),t=t.next}while(t!==s);return yf(t)}function wD(s,e,t,n,a,o){let c=s;do{let h=c.next.next;for(;h!==c.prev;){if(c.i!==h.i&&ID(c,h)){let d=h2(c,h);c=yf(c,c.next),d=yf(d,d.next),jm(c,e,t,n,a,o,0),jm(d,e,t,n,a,o,0);return}h=h.next}c=c.next}while(c!==s)}function RD(s,e,t,n){const a=[];for(let o=0,c=e.length;o<c;o++){const h=e[o]*n,d=o<c-1?e[o+1]*n:s.length,p=c2(s,h,d,n,!1);p===p.next&&(p.steiner=!0),a.push(zD(p))}a.sort(CD);for(let o=0;o<a.length;o++)t=ND(a[o],t);return t}function CD(s,e){let t=s.x-e.x;if(t===0&&(t=s.y-e.y,t===0)){const n=(s.next.y-s.y)/(s.next.x-s.x),a=(e.next.y-e.y)/(e.next.x-e.x);t=n-a}return t}function ND(s,e){const t=DD(s,e);if(!t)return e;const n=h2(t,s);return yf(n,n.next),yf(t,t.next)}function DD(s,e){let t=e;const n=s.x,a=s.y;let o=-1/0,c;if(Md(s,t))return t;do{if(Md(s,t.next))return t.next;if(a<=t.y&&a>=t.next.y&&t.next.y!==t.y){const y=t.x+(a-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(y<=n&&y>o&&(o=y,c=t.x<t.next.x?t:t.next,y===n))return c}t=t.next}while(t!==e);if(!c)return null;const h=c,d=c.x,p=c.y;let v=1/0;t=c;do{if(n>=t.x&&t.x>=d&&n!==t.x&&u2(a<p?n:o,a,d,p,a<p?o:n,a,t.x,t.y)){const y=Math.abs(a-t.y)/(n-t.x);qm(t,s)&&(y<v||y===v&&(t.x>c.x||t.x===c.x&&UD(c,t)))&&(c=t,v=y)}t=t.next}while(t!==h);return c}function UD(s,e){return Ci(s.prev,s,e.prev)<0&&Ci(e.next,s,s.next)<0}function LD(s,e,t,n){let a=s;do a.z===0&&(a.z=PS(a.x,a.y,e,t,n)),a.prevZ=a.prev,a.nextZ=a.next,a=a.next;while(a!==s);a.prevZ.nextZ=null,a.prevZ=null,OD(a)}function OD(s){let e,t=1;do{let n=s,a;s=null;let o=null;for(e=0;n;){e++;let c=n,h=0;for(let p=0;p<t&&(h++,c=c.nextZ,!!c);p++);let d=t;for(;h>0||d>0&&c;)h!==0&&(d===0||!c||n.z<=c.z)?(a=n,n=n.nextZ,h--):(a=c,c=c.nextZ,d--),o?o.nextZ=a:s=a,a.prevZ=o,o=a;n=c}o.nextZ=null,t*=2}while(e>1);return s}function PS(s,e,t,n,a){return s=(s-t)*a|0,e=(e-n)*a|0,s=(s|s<<8)&16711935,s=(s|s<<4)&252645135,s=(s|s<<2)&858993459,s=(s|s<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,s|e<<1}function zD(s){let e=s,t=s;do(e.x<t.x||e.x===t.x&&e.y<t.y)&&(t=e),e=e.next;while(e!==s);return t}function u2(s,e,t,n,a,o,c,h){return(a-c)*(e-h)>=(s-c)*(o-h)&&(s-c)*(n-h)>=(t-c)*(e-h)&&(t-c)*(o-h)>=(a-c)*(n-h)}function Em(s,e,t,n,a,o,c,h){return!(s===c&&e===h)&&u2(s,e,t,n,a,o,c,h)}function ID(s,e){return s.next.i!==e.i&&s.prev.i!==e.i&&!BD(s,e)&&(qm(s,e)&&qm(e,s)&&PD(s,e)&&(Ci(s.prev,s,e.prev)||Ci(s,e.prev,e))||Md(s,e)&&Ci(s.prev,s,s.next)>0&&Ci(e.prev,e,e.next)>0)}function Ci(s,e,t){return(e.y-s.y)*(t.x-e.x)-(e.x-s.x)*(t.y-e.y)}function Md(s,e){return s.x===e.x&&s.y===e.y}function f2(s,e,t,n){const a=v0(Ci(s,e,t)),o=v0(Ci(s,e,n)),c=v0(Ci(t,n,s)),h=v0(Ci(t,n,e));return!!(a!==o&&c!==h||a===0&&g0(s,t,e)||o===0&&g0(s,n,e)||c===0&&g0(t,s,n)||h===0&&g0(t,e,n))}function g0(s,e,t){return e.x<=Math.max(s.x,t.x)&&e.x>=Math.min(s.x,t.x)&&e.y<=Math.max(s.y,t.y)&&e.y>=Math.min(s.y,t.y)}function v0(s){return s>0?1:s<0?-1:0}function BD(s,e){let t=s;do{if(t.i!==s.i&&t.next.i!==s.i&&t.i!==e.i&&t.next.i!==e.i&&f2(t,t.next,s,e))return!0;t=t.next}while(t!==s);return!1}function qm(s,e){return Ci(s.prev,s,s.next)<0?Ci(s,e,s.next)>=0&&Ci(s,s.prev,e)>=0:Ci(s,e,s.prev)<0||Ci(s,s.next,e)<0}function PD(s,e){let t=s,n=!1;const a=(s.x+e.x)/2,o=(s.y+e.y)/2;do t.y>o!=t.next.y>o&&t.next.y!==t.y&&a<(t.next.x-t.x)*(o-t.y)/(t.next.y-t.y)+t.x&&(n=!n),t=t.next;while(t!==s);return n}function h2(s,e){const t=HS(s.i,s.x,s.y),n=HS(e.i,e.x,e.y),a=s.next,o=e.prev;return s.next=e,e.prev=s,t.next=a,a.prev=t,n.next=t,t.prev=n,o.next=n,n.prev=o,n}function cE(s,e,t,n){const a=HS(s,e,t);return n?(a.next=n.next,a.prev=n,n.next.prev=a,n.next=a):(a.prev=a,a.next=a),a}function Ym(s){s.next.prev=s.prev,s.prev.next=s.next,s.prevZ&&(s.prevZ.nextZ=s.nextZ),s.nextZ&&(s.nextZ.prevZ=s.prevZ)}function HS(s,e,t){return{i:s,x:e,y:t,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function HD(s,e,t,n){let a=0;for(let o=e,c=t-n;o<t;o+=n)a+=(s[c]-s[o])*(s[o+1]+s[c+1]),c=o;return a}class FD{static triangulate(e,t,n=2){return MD(e,t,n)}}class to{static area(e){const t=e.length;let n=0;for(let a=t-1,o=0;o<t;a=o++)n+=e[a].x*e[o].y-e[o].x*e[a].y;return n*.5}static isClockWise(e){return to.area(e)<0}
vendor: 44,981 bytes, line 103
103static triangulateShape(e,t){const n=[],a=[],o=[];uE(e),fE(n,e);let c=e.length;t.forEach(uE);for(let d=0;d<t.length;d++)a.push(c),c+=t[d].length,fE(n,t[d]);const h=FD.triangulate(n,a);for(let d=0;d<h.length;d+=3)o.push(h.slice(d,d+3));return o}}function uE(s){const e=s.length;e>2&&s[e-1].equals(s[0])&&s.pop()}function fE(s,e){for(let t=0;t<e.length;t++)s.push(e[t].x),s.push(e[t].y)}class o_ extends un{constructor(e=new mf([new Je(.5,.5),new Je(-.5,.5),new Je(-.5,-.5),new Je(.5,-.5)]),t={}){super(),this.type="ExtrudeGeometry",this.parameters={shapes:e,options:t},e=Array.isArray(e)?e:[e];const n=this,a=[],o=[];for(let h=0,d=e.length;h<d;h++){const p=e[h];c(p)}this.setAttribute("position",new Ot(a,3)),this.setAttribute("uv",new Ot(o,2)),this.computeVertexNormals();function c(h){const d=[],p=t.curveSegments!==void 0?t.curveSegments:12,v=t.steps!==void 0?t.steps:1,y=t.depth!==void 0?t.depth:1;let _=t.bevelEnabled!==void 0?t.bevelEnabled:!0,b=t.bevelThickness!==void 0?t.bevelThickness:.2,T=t.bevelSize!==void 0?t.bevelSize:b-.1,R=t.bevelOffset!==void 0?t.bevelOffset:0,A=t.bevelSegments!==void 0?t.bevelSegments:3;const M=t.extrudePath,C=t.UVGenerator!==void 0?t.UVGenerator:VD;let D,U=!1,H,F,G,V;M&&(D=M.getSpacedPoints(v),U=!0,_=!1,H=M.computeFrenetFrames(v,!1),F=new K,G=new K,V=new K),_||(A=0,b=0,T=0,R=0);const O=h.extractPoints(p);let z=O.shape;const Y=O.holes;if(!to.isClockWise(z)){z=z.reverse();for(let Ze=0,je=Y.length;Ze<je;Ze++){const ke=Y[Ze];to.isClockWise(ke)&&(Y[Ze]=ke.reverse())}}function ce(Ze){const ke=10000000000000001e-36;let Fe=Ze[0];for(let dt=1;dt<=Ze.length;dt++){const it=dt%Ze.length,lt=Ze[it],Vt=lt.x-Fe.x,qt=lt.y-Fe.y,J=Vt*Vt+qt*qt,k=Math.max(Math.abs(lt.x),Math.abs(lt.y),Math.abs(Fe.x),Math.abs(Fe.y)),be=ke*k*k;if(J<=be){Ze.splice(it,1),dt--;continue}Fe=lt}}ce(z),Y.forEach(ce);const he=Y.length,me=z;for(let Ze=0;Ze<he;Ze++){const je=Y[Ze];z=z.concat(je)}function P(Ze,je,ke){return je||console.error("THREE.ExtrudeGeometry: vec does not exist"),Ze.clone().addScaledVector(je,ke)}const Q=z.length;function ee(Ze,je,ke){let Fe,dt,it;const lt=Ze.x-je.x,Vt=Ze.y-je.y,qt=ke.x-Ze.x,J=ke.y-Ze.y,k=lt*lt+Vt*Vt,be=lt*J-Vt*qt;if(Math.abs(be)>Number.EPSILON){const ze=Math.sqrt(k),$e=Math.sqrt(qt*qt+J*J),Pe=je.x-Vt/ze,At=je.y+lt/ze,ft=ke.x-J/$e,Rt=ke.y+qt/$e,Ct=((ft-Pe)*J-(Rt-At)*qt)/(lt*J-Vt*qt);Fe=Pe+lt*Ct-Ze.x,dt=At+Vt*Ct-Ze.y;const Qe=Fe*Fe+dt*dt;if(Qe<=2)return new Je(Fe,dt);it=Math.sqrt(Qe/2)}else{let ze=!1;lt>Number.EPSILON?qt>Number.EPSILON&&(ze=!0):lt<-Number.EPSILON?qt<-Number.EPSILON&&(ze=!0):Math.sign(Vt)===Math.sign(J)&&(ze=!0),ze?(Fe=-Vt,dt=lt,it=Math.sqrt(k)):(Fe=lt,dt=Vt,it=Math.sqrt(k/2))}return new Je(Fe/it,dt/it)}const ge=[];for(let Ze=0,je=me.length,ke=je-1,Fe=Ze+1;Ze<je;Ze++,ke++,Fe++)ke===je&&(ke=0),Fe===je&&(Fe=0),ge[Ze]=ee(me[Ze],me[ke],me[Fe]);const Se=[];let W,fe=ge.concat();for(let Ze=0,je=he;Ze<je;Ze++){const ke=Y[Ze];W=[];for(let Fe=0,dt=ke.length,it=dt-1,lt=Fe+1;Fe<dt;Fe++,it++,lt++)it===dt&&(it=0),lt===dt&&(lt=0),W[Fe]=ee(ke[Fe],ke[it],ke[lt]);Se.push(W),fe=fe.concat(W)}let Ce;if(A===0)Ce=to.triangulateShape(me,Y);else{const Ze=[],je=[];for(let ke=0;ke<A;ke++){const Fe=ke/A,dt=b*Math.cos(Fe*Math.PI/2),it=T*Math.sin(Fe*Math.PI/2)+R;for(let lt=0,Vt=me.length;lt<Vt;lt++){const qt=P(me[lt],ge[lt],it);gt(qt.x,qt.y,-dt),Fe===0&&Ze.push(qt)}for(let lt=0,Vt=he;lt<Vt;lt++){const qt=Y[lt];W=Se[lt];const J=[];for(let k=0,be=qt.length;k<be;k++){const ze=P(qt[k],W[k],it);gt(ze.x,ze.y,-dt),Fe===0&&J.push(ze)}Fe===0&&je.push(J)}}Ce=to.triangulateShape(Ze,je)}const Le=Ce.length,nt=T+R;for(let Ze=0;Ze<Q;Ze++){const je=_?P(z[Ze],fe[Ze],nt):z[Ze];U?(G.copy(H.normals[0]).multiplyScalar(je.x),F.copy(H.binormals[0]).multiplyScalar(je.y),V.copy(D[0]).add(G).add(F),gt(V.x,V.y,V.z)):gt(je.x,je.y,0)}for(let Ze=1;Ze<=v;Ze++)for(let je=0;je<Q;je++){const ke=_?P(z[je],fe[je],nt):z[je];U?(G.copy(H.normals[Ze]).multiplyScalar(ke.x),F.copy(H.binormals[Ze]).multiplyScalar(ke.y),V.copy(D[Ze]).add(G).add(F),gt(V.x,V.y,V.z)):gt(ke.x,ke.y,y/v*Ze)}for(let Ze=A-1;Ze>=0;Ze--){const je=Ze/A,ke=b*Math.cos(je*Math.PI/2),Fe=T*Math.sin(je*Math.PI/2)+R;for(let dt=0,it=me.length;dt<it;dt++){const lt=P(me[dt],ge[dt],Fe);gt(lt.x,lt.y,y+ke)}for(let dt=0,it=Y.length;dt<it;dt++){const lt=Y[dt];W=Se[dt];for(let Vt=0,qt=lt.length;Vt<qt;Vt++){const J=P(lt[Vt],W[Vt],Fe);U?gt(J.x,J.y+D[v-1].y,D[v-1].x+ke):gt(J.x,J.y,y+ke)}}}ve(),De();function ve(){const Ze=a.length/3;if(_){let je=0,ke=Q*je;for(let Fe=0;Fe<Le;Fe++){const dt=Ce[Fe];Et(dt[2]+ke,dt[1]+ke,dt[0]+ke)}je=v+A*2,ke=Q*je;for(let Fe=0;Fe<Le;Fe++){const dt=Ce[Fe];Et(dt[0]+ke,dt[1]+ke,dt[2]+ke)}}else{for(let je=0;je<Le;je++){const ke=Ce[je];Et(ke[2],ke[1],ke[0])}for(let je=0;je<Le;je++){const ke=Ce[je];Et(ke[0]+Q*v,ke[1]+Q*v,ke[2]+Q*v)}}n.addGroup(Ze,a.length/3-Ze,0)}function De(){const Ze=a.length/3;let je=0;ot(me,je),je+=me.length;for(let ke=0,Fe=Y.length;ke<Fe;ke++){const dt=Y[ke];ot(dt,je),je+=dt.length}n.addGroup(Ze,a.length/3-Ze,1)}function ot(Ze,je){let ke=Ze.length;for(;--ke>=0;){const Fe=ke;let dt=ke-1;dt<0&&(dt=Ze.length-1);for(let it=0,lt=v+A*2;it<lt;it++){const Vt=Q*it,qt=Q*(it+1),J=je+Fe+Vt,k=je+dt+Vt,be=je+dt+qt,ze=je+Fe+qt;Zt(J,k,be,ze)}}}function gt(Ze,je,ke){d.push(Ze),d.push(je),d.push(ke)}function Et(Ze,je,ke){_n(Ze),_n(je),_n(ke);const Fe=a.length/3,dt=C.generateTopUV(n,a,Fe-3,Fe-2,Fe-1);ie(dt[0]),ie(dt[1]),ie(dt[2])}function Zt(Ze,je,ke,Fe){_n(Ze),_n(je),_n(Fe),_n(je),_n(ke),_n(Fe);const dt=a.length/3,it=C.generateSideWallUV(n,a,dt-6,dt-3,dt-2,dt-1);ie(it[0]),ie(it[1]),ie(it[3]),ie(it[1]),ie(it[2]),ie(it[3])}function _n(Ze){a.push(d[Ze*3+0]),a.push(d[Ze*3+1]),a.push(d[Ze*3+2])}function ie(Ze){o.push(Ze.x),o.push(Ze.y)}}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON(),t=this.parameters.shapes,n=this.parameters.options;return GD(t,n,e)}static fromJSON(e,t){const n=[];for(let o=0,c=e.shapes.length;o<c;o++){const h=t[e.shapes[o]];n.push(h)}const a=e.options.extrudePath;return a!==void 0&&(e.options.extrudePath=new Ry[a.type]().fromJSON(a)),new o_(n,e.options)}}const VD={generateTopUV:function(s,e,t,n,a){const o=e[t*3],c=e[t*3+1],h=e[n*3],d=e[n*3+1],p=e[a*3],v=e[a*3+1];return[new Je(o,c),new Je(h,d),new Je(p,v)]},generateSideWallUV:function(s,e,t,n,a,o){const c=e[t*3],h=e[t*3+1],d=e[t*3+2],p=e[n*3],v=e[n*3+1],y=e[n*3+2],_=e[a*3],b=e[a*3+1],T=e[a*3+2],R=e[o*3],A=e[o*3+1],M=e[o*3+2];return Math.abs(h-v)<Math.abs(c-p)?[new Je(c,1-d),new Je(p,1-y),new Je(_,1-T),new Je(R,1-M)]:[new Je(h,1-d),new Je(v,1-y),new Je(b,1-T),new Je(A,1-M)]}};function GD(s,e,t){if(t.shapes=[],Array.isArray(s))for(let n=0,a=s.length;n<a;n++){const o=s[n];t.shapes.push(o.uuid)}else t.shapes.push(s.uuid);return t.options=Object.assign({},e),e.extrudePath!==void 0&&(t.options.extrudePath=e.extrudePath.toJSON()),t}class fg extends Wc{constructor(e=1,t=0){const n=(1+Math.sqrt(5))/2,a=[-1,n,0,1,n,0,-1,-n,0,1,-n,0,0,-1,n,0,1,n,0,-1,-n,0,1,-n,n,0,-1,n,0,1,-n,0,-1,-n,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(a,o,e,t),this.type="IcosahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new fg(e.radius,e.detail)}}class l_ extends un{constructor(e=[new Je(0,-.5),new Je(.5,0),new Je(0,.5)],t=12,n=0,a=Math.PI*2){super(),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:n,phiLength:a},t=Math.floor(t),a=$t(a,0,Math.PI*2);const o=[],c=[],h=[],d=[],p=[],v=1/t,y=new K,_=new Je,b=new K,T=new K,R=new K;let A=0,M=0;for(let C=0;C<=e.length-1;C++)switch(C){case 0:A=e[C+1].x-e[C].x,M=e[C+1].y-e[C].y,b.x=M*1,b.y=-A,b.z=M*0,R.copy(b),b.normalize(),d.push(b.x,b.y,b.z);break;case e.length-1:d.push(R.x,R.y,R.z);break;default:A=e[C+1].x-e[C].x,M=e[C+1].y-e[C].y,b.x=M*1,b.y=-A,b.z=M*0,T.copy(b),b.x+=R.x,b.y+=R.y,b.z+=R.z,b.normalize(),d.push(b.x,b.y,b.z),R.copy(T)}for(let C=0;C<=t;C++){const D=n+C*v*a,U=Math.sin(D),H=Math.cos(D);for(let F=0;F<=e.length-1;F++){y.x=e[F].x*U,y.y=e[F].y,y.z=e[F].x*H,c.push(y.x,y.y,y.z),_.x=C/t,_.y=F/(e.length-1),h.push(_.x,_.y);const G=d[3*F+0]*U,V=d[3*F+1],O=d[3*F+0]*H;p.push(G,V,O)}}for(let C=0;C<t;C++)for(let D=0;D<e.length-1;D++){const U=D+C*e.length,H=U,F=U+e.length,G=U+e.length+1,V=U+1;o.push(H,F,V),o.push(G,V,F)}this.setIndex(o),this.setAttribute("position",new Ot(c,3)),this.setAttribute("uv",new Ot(h,2)),this.setAttribute("normal",new Ot(p,3))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new l_(e.points,e.segments,e.phiStart,e.phiLength)}}class hg extends Wc{constructor(e=1,t=0){const n=[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],a=[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(n,a,e,t),this.type="OctahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new hg(e.radius,e.detail)}}class Zc extends un{constructor(e=1,t=1,n=1,a=1){super(),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:n,heightSegments:a};const o=e/2,c=t/2,h=Math.floor(n),d=Math.floor(a),p=h+1,v=d+1,y=e/h,_=t/d,b=[],T=[],R=[],A=[];for(let M=0;M<v;M++){const C=M*_-c;for(let D=0;D<p;D++){const U=D*y-o;T.push(U,-C,0),R.push(0,0,1),A.push(D/h),A.push(1-M/d)}}for(let M=0;M<d;M++)for(let C=0;C<h;C++){const D=C+p*M,U=C+p*(M+1),H=C+1+p*(M+1),F=C+1+p*M;b.push(D,U,F),b.push(U,H,F)}this.setIndex(b),this.setAttribute("position",new Ot(T,3)),this.setAttribute("normal",new Ot(R,3)),this.setAttribute("uv",new Ot(A,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Zc(e.width,e.height,e.widthSegments,e.heightSegments)}}class c_ extends un{constructor(e=.5,t=1,n=32,a=1,o=0,c=Math.PI*2){super(),this.type="RingGeometry",this.parameters={innerRadius:e,outerRadius:t,thetaSegments:n,phiSegments:a,thetaStart:o,thetaLength:c},n=Math.max(3,n),a=Math.max(1,a);const h=[],d=[],p=[],v=[];let y=e;const _=(t-e)/a,b=new K,T=new Je;for(let R=0;R<=a;R++){for(let A=0;A<=n;A++){const M=o+A/n*c;b.x=y*Math.cos(M),b.y=y*Math.sin(M),d.push(b.x,b.y,b.z),p.push(0,0,1),T.x=(b.x/t+1)/2,T.y=(b.y/t+1)/2,v.push(T.x,T.y)}y+=_}for(let R=0;R<a;R++){const A=R*(n+1);for(let M=0;M<n;M++){const C=M+A,D=C,U=C+n+1,H=C+n+2,F=C+1;h.push(D,U,F),h.push(U,H,F)}}this.setIndex(h),this.setAttribute("position",new Ot(d,3)),this.setAttribute("normal",new Ot(p,3)),this.setAttribute("uv",new Ot(v,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new c_(e.innerRadius,e.outerRadius,e.thetaSegments,e.phiSegments,e.thetaStart,e.thetaLength)}}class u_ extends un{constructor(e=new mf([new Je(0,.5),new Je(-.5,-.5),new Je(.5,-.5)]),t=12){super(),this.type="ShapeGeometry",this.parameters={shapes:e,curveSegments:t};const n=[],a=[],o=[],c=[];let h=0,d=0;if(Array.isArray(e)===!1)p(e);else for(let v=0;v<e.length;v++)p(e[v]),this.addGroup(h,d,v),h+=d,d=0;this.setIndex(n),this.setAttribute("position",new Ot(a,3)),this.setAttribute("normal",new Ot(o,3)),this.setAttribute("uv",new Ot(c,2));function p(v){const y=a.length/3,_=v.extractPoints(t);let b=_.shape;const T=_.holes;to.isClockWise(b)===!1&&(b=b.reverse());for(let A=0,M=T.length;A<M;A++){const C=T[A];to.isClockWise(C)===!0&&(T[A]=C.reverse())}const R=to.triangulateShape(b,T);for(let A=0,M=T.length;A<M;A++){const C=T[A];b=b.concat(C)}for(let A=0,M=b.length;A<M;A++){const C=b[A];a.push(C.x,C.y,0),o.push(0,0,1),c.push(C.x,C.y)}for(let A=0,M=R.length;A<M;A++){const C=R[A],D=C[0]+y,U=C[1]+y,H=C[2]+y;n.push(D,U,H),d+=3}}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON(),t=this.parameters.shapes;return kD(t,e)}static fromJSON(e,t){const n=[];for(let a=0,o=e.shapes.length;a<o;a++){const c=t[e.shapes[a]];n.push(c)}return new u_(n,e.curveSegments)}}function kD(s,e){if(e.shapes=[],Array.isArray(s))for(let t=0,n=s.length;t<n;t++){const a=s[t];e.shapes.push(a.uuid)}else e.shapes.push(s.uuid);return e}class dg extends un{constructor(e=1,t=32,n=16,a=0,o=Math.PI*2,c=0,h=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:n,phiStart:a,phiLength:o,thetaStart:c,thetaLength:h},t=Math.max(3,Math.floor(t)),n=Math.max(2,Math.floor(n));const d=Math.min(c+h,Math.PI);let p=0;const v=[],y=new K,_=new K,b=[],T=[],R=[],A=[];for(let M=0;M<=n;M++){const C=[],D=M/n;let U=0;M===0&&c===0?U=.5/t:M===n&&d===Math.PI&&(U=-.5/t);for(let H=0;H<=t;H++){const F=H/t;y.x=-e*Math.cos(a+F*o)*Math.sin(c+D*h),y.y=e*Math.cos(c+D*h),y.z=e*Math.sin(a+F*o)*Math.sin(c+D*h),T.push(y.x,y.y,y.z),_.copy(y).normalize(),R.push(_.x,_.y,_.z),A.push(F+U,1-D),C.push(p++)}v.push(C)}for(let M=0;M<n;M++)for(let C=0;C<t;C++){const D=v[M][C+1],U=v[M][C],H=v[M+1][C],F=v[M+1][C+1];(M!==0||c>0)&&b.push(D,U,F),(M!==n-1||d<Math.PI)&&b.push(U,H,F)}this.setIndex(b),this.setAttribute("position",new Ot(T,3)),this.setAttribute("normal",new Ot(R,3)),this.setAttribute("uv",new Ot(A,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new dg(e.radius,e.widthSegments,e.heightSegments,e.phiStart,e.phiLength,e.thetaStart,e.thetaLength)}}class f_ extends Wc{constructor(e=1,t=0){const n=[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],a=[2,1,0,0,3,2,1,3,0,2,3,1];super(n,a,e,t),this.type="TetrahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new f_(e.radius,e.detail)}}class h_ extends un{constructor(e=1,t=.4,n=12,a=48,o=Math.PI*2){super(),this.type="TorusGeometry",this.parameters={radius:e,tube:t,radialSegments:n,tubularSegments:a,arc:o},n=Math.floor(n),a=Math.floor(a);const c=[],h=[],d=[],p=[],v=new K,y=new K,_=new K;for(let b=0;b<=n;b++)for(let T=0;T<=a;T++){const R=T/a*o,A=b/n*Math.PI*2;y.x=(e+t*Math.cos(A))*Math.cos(R),y.y=(e+t*Math.cos(A))*Math.sin(R),y.z=t*Math.sin(A),h.push(y.x,y.y,y.z),v.x=e*Math.cos(R),v.y=e*Math.sin(R),_.subVectors(y,v).normalize(),d.push(_.x,_.y,_.z),p.push(T/a),p.push(b/n)}for(let b=1;b<=n;b++)for(let T=1;T<=a;T++){const R=(a+1)*b+T-1,A=(a+1)*(b-1)+T-1,M=(a+1)*(b-1)+T,C=(a+1)*b+T;c.push(R,A,C),c.push(A,M,C)}this.setIndex(c),this.setAttribute("position",new Ot(h,3)),this.setAttribute("normal",new Ot(d,3)),this.setAttribute("uv",new Ot(p,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new h_(e.radius,e.tube,e.radialSegments,e.tubularSegments,e.arc)}}class d_ extends un{constructor(e=1,t=.4,n=64,a=8,o=2,c=3){super(),this.type="TorusKnotGeometry",this.parameters={radius:e,tube:t,tubularSegments:n,radialSegments:a,p:o,q:c},n=Math.floor(n),a=Math.floor(a);const h=[],d=[],p=[],v=[],y=new K,_=new K,b=new K,T=new K,R=new K,A=new K,M=new K;for(let D=0;D<=n;++D){const U=D/n*o*Math.PI*2;C(U,o,c,e,b),C(U+.01,o,c,e,T),A.subVectors(T,b),M.addVectors(T,b),R.crossVectors(A,M),M.crossVectors(R,A),R.normalize(),M.normalize();for(let H=0;H<=a;++H){const F=H/a*Math.PI*2,G=-t*Math.cos(F),V=t*Math.sin(F);y.x=b.x+(G*M.x+V*R.x),y.y=b.y+(G*M.y+V*R.y),y.z=b.z+(G*M.z+V*R.z),d.push(y.x,y.y,y.z),_.subVectors(y,b).normalize(),p.push(_.x,_.y,_.z),v.push(D/n),v.push(H/a)}}for(let D=1;D<=n;D++)for(let U=1;U<=a;U++){const H=(a+1)*(D-1)+(U-1),F=(a+1)*D+(U-1),G=(a+1)*D+U,V=(a+1)*(D-1)+U;h.push(H,F,V),h.push(F,G,V)}this.setIndex(h),this.setAttribute("position",new Ot(d,3)),this.setAttribute("normal",new Ot(p,3)),this.setAttribute("uv",new Ot(v,2));function C(D,U,H,F,G){const V=Math.cos(D),O=Math.sin(D),z=H/U*D,Y=Math.cos(z);G.x=F*(2+Y)*.5*V,G.y=F*(2+Y)*O*.5,G.z=F*Math.sin(z)*.5}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new d_(e.radius,e.tube,e.tubularSegments,e.radialSegments,e.p,e.q)}}class p_ extends un{constructor(e=new Ob(new K(-1,-1,0),new K(-1,1,0),new K(1,1,0)),t=64,n=1,a=8,o=!1){super(),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:t,radius:n,radialSegments:a,closed:o};const c=e.computeFrenetFrames(t,o);this.tangents=c.tangents,this.normals=c.normals,this.binormals=c.binormals;const h=new K,d=new K,p=new Je;let v=new K;const y=[],_=[],b=[],T=[];R(),this.setIndex(T),this.setAttribute("position",new Ot(y,3)),this.setAttribute("normal",new Ot(_,3)),this.setAttribute("uv",new Ot(b,2));function R(){for(let D=0;D<t;D++)A(D);A(o===!1?t:0),C(),M()}function A(D){v=e.getPointAt(D/t,v);const U=c.normals[D],H=c.binormals[D];for(let F=0;F<=a;F++){const G=F/a*Math.PI*2,V=Math.sin(G),O=-Math.cos(G);d.x=O*U.x+V*H.x,d.y=O*U.y+V*H.y,d.z=O*U.z+V*H.z,d.normalize(),_.push(d.x,d.y,d.z),h.x=v.x+n*d.x,h.y=v.y+n*d.y,h.z=v.z+n*d.z,y.push(h.x,h.y,h.z)}}function M(){for(let D=1;D<=t;D++)for(let U=1;U<=a;U++){const H=(a+1)*(D-1)+(U-1),F=(a+1)*D+(U-1),G=(a+1)*D+U,V=(a+1)*(D-1)+U;T.push(H,F,V),T.push(F,G,V)}}function C(){for(let D=0;D<=t;D++)for(let U=0;U<=a;U++)p.x=D/t,p.y=U/a,b.push(p.x,p.y)}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON();return e.path=this.parameters.path.toJSON(),e}static fromJSON(e){return new p_(new Ry[e.path.type]().fromJSON(e.path),e.tubularSegments,e.radius,e.radialSegments,e.closed)}}class d2 extends un{constructor(e=null){if(super(),this.type="WireframeGeometry",this.parameters={geometry:e},e!==null){const t=[],n=new Set,a=new K,o=new K;if(e.index!==null){const c=e.attributes.position,h=e.index;let d=e.groups;d.length===0&&(d=[{start:0,count:h.count,materialIndex:0}]);for(let p=0,v=d.length;p<v;++p){const y=d[p],_=y.start,b=y.count;for(let T=_,R=_+b;T<R;T+=3)for(let A=0;A<3;A++){const M=h.getX(T+A),C=h.getX(T+(A+1)%3);a.fromBufferAttribute(c,M),o.fromBufferAttribute(c,C),hE(a,o,n)===!0&&(t.push(a.x,a.y,a.z),t.push(o.x,o.y,o.z))}}}else{const c=e.attributes.position;for(let h=0,d=c.count/3;h<d;h++)for(let p=0;p<3;p++){const v=3*h+p,y=3*h+(p+1)%3;a.fromBufferAttribute(c,v),o.fromBufferAttribute(c,y),hE(a,o,n)===!0&&(t.push(a.x,a.y,a.z),t.push(o.x,o.y,o.z))}}this.setAttribute("position",new Ot(t,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}function hE(s,e,t){const n=`${s.x},${s.y},${s.z}-${e.x},${e.y},${e.z}`,a=`${e.x},${e.y},${e.z}-${s.x},${s.y},${s.z}`;return t.has(n)===!0||t.has(a)===!0?!1:(t.add(n),t.add(a),!0)}var dE=Object.freeze({__proto__:null,BoxGeometry:Ef,CapsuleGeometry:i_,CircleGeometry:a_,ConeGeometry:ug,CylinderGeometry:cg,DodecahedronGeometry:s_,EdgesGeometry:i2,ExtrudeGeometry:o_,IcosahedronGeometry:fg,LatheGeometry:l_,OctahedronGeometry:hg,PlaneGeometry:Zc,PolyhedronGeometry:Wc,RingGeometry:c_,ShapeGeometry:u_,SphereGeometry:dg,TetrahedronGeometry:f_,TorusGeometry:h_,TorusKnotGeometry:d_,TubeGeometry:p_,WireframeGeometry:d2});class p2 extends la{constructor(e){super(),this.isShadowMaterial=!0,this.type="ShadowMaterial",this.color=new _t(0),this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.fog=e.fog,this}}class m2 extends Ts{constructor(e){super(e),this.isRawShaderMaterial=!0,this.type="RawShaderMaterial"}}class pg extends la{constructor(e){super(),this.isMeshStandardMaterial=!0,this.type="MeshStandardMaterial",this.defines={STANDARD:""},this.color=new _t(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 _t(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Yc,this.normalScale=new Je(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 er,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.envMapIntensity=e.envMapIntensity,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class tr extends pg{constructor(e){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 Je(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return $t(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(t){this.ior=(1+.4*t)/(1-.4*t)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new _t(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 _t(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new _t(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(e)}get anisotropy(){return this._anisotropy}set anisotropy(e){this._anisotropy>0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get dispersion(){return this._dispersion}set dispersion(e){this._dispersion>0!=e>0&&this.version++,this._dispersion=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.dispersion=e.dispersion,this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class g2 extends la{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new _t(16777215),this.specular=new _t(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new _t(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Yc,this.normalScale=new Je(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new er,this.combine=tg,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class v2 extends la{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new _t(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new _t(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Yc,this.normalScale=new Je(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}class y2 extends la{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Yc,this.normalScale=new Je(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}}class _2 extends la{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new _t(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new _t(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Yc,this.normalScale=new Je(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new er,this.combine=tg,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class Ib extends la{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=IA,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class Bb extends la{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}class x2 extends la{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new _t(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Yc,this.normalScale=new Je(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.flatShading=e.flatShading,this.fog=e.fog,this}}class S2 extends Ja{constructor(e){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}}function ff(s,e){return!s||s.constructor===e?s:typeof e.BYTES_PER_ELEMENT=="number"?new e(s):Array.prototype.slice.call(s)}function b2(s){return ArrayBuffer.isView(s)&&!(s instanceof DataView)}function M2(s){function e(a,o){return s[a]-s[o]}const t=s.length,n=new Array(t);for(let a=0;a!==t;++a)n[a]=a;return n.sort(e),n}function FS(s,e,t){const n=s.length,a=new s.constructor(n);for(let o=0,c=0;c!==n;++o){const h=t[o]*e;for(let d=0;d!==e;++d)a[c++]=s[h+d]}return a}function Pb(s,e,t,n){let a=1,o=s[0];for(;o!==void 0&&o[n]===void 0;)o=s[a++];if(o===void 0)return;let c=o[n];if(c!==void 0)if(Array.isArray(c))do c=o[n],c!==void 0&&(e.push(o.time),t.push(...c)),o=s[a++];while(o!==void 0);else if(c.toArray!==void 0)do c=o[n],c!==void 0&&(e.push(o.time),c.toArray(t,t.length)),o=s[a++];while(o!==void 0);else do c=o[n],c!==void 0&&(e.push(o.time),t.push(c)),o=s[a++];while(o!==void 0)}function XD(s,e,t,n,a=30){const o=s.clone();o.name=e;const c=[];for(let d=0;d<o.tracks.length;++d){const p=o.tracks[d],v=p.getValueSize(),y=[],_=[];for(let b=0;b<p.times.length;++b){const T=p.times[b]*a;if(!(T<t||T>=n)){y.push(p.times[b]);for(let R=0;R<v;++R)_.push(p.values[b*v+R])}}y.length!==0&&(p.times=ff(y,p.times.constructor),p.values=ff(_,p.values.constructor),c.push(p))}o.tracks=c;let h=1/0;for(let d=0;d<o.tracks.length;++d)h>o.tracks[d].times[0]&&(h=o.tracks[d].times[0]);for(let d=0;d<o.tracks.length;++d)o.tracks[d].shift(-1*h);return o.resetDuration(),o}function jD(s,e=0,t=s,n=30){n<=0&&(n=30);const a=t.tracks.length,o=e/n;for(let c=0;c<a;++c){const h=t.tracks[c],d=h.ValueTypeName;if(d==="bool"||d==="string")continue;const p=s.tracks.find(function(M){return M.name===h.name&&M.ValueTypeName===d});if(p===void 0)continue;let v=0;const y=h.getValueSize();h.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(v=y/3);let _=0;const b=p.getValueSize();p.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(_=b/3);const T=h.times.length-1;let R;if(o<=h.times[0]){const M=v,C=y-v;R=h.values.slice(M,C)}else if(o>=h.times[T]){const M=T*y+v,C=M+y-v;R=h.values.slice(M,C)}else{const M=h.createInterpolant(),C=v,D=y-v;M.evaluate(o),R=M.resultBuffer.slice(C,D)}d==="quaternion"&&new Qa().fromArray(R).normalize().conjugate().toArray(R);const A=p.times.length;for(let M=0;M<A;++M){const C=M*b+_;if(d==="quaternion")Qa.multiplyQuaternionsFlat(p.values,C,R,0,p.values,C);else{const D=b-_*2;for(let U=0;U<D;++U)p.values[C+U]-=R[U]}}}return s.blendMode=pb,s}class qD{static convertArray(e,t){return ff(e,t)}static isTypedArray(e){return b2(e)}static getKeyframeOrder(e){return M2(e)}static sortedArray(e,t,n){return FS(e,t,n)}static flattenJSON(e,t,n,a){Pb(e,t,n,a)}static subclip(e,t,n,a,o=30){return XD(e,t,n,a,o)}static makeClipAdditive(e,t=0,n=e,a=30){return jD(e,t,n,a)}}class Ud{constructor(e,t,n,a){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=a!==void 0?a:new t.constructor(n),this.sampleValues=t,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(e){const t=this.parameterPositions;let n=this._cachedIndex,a=t[n],o=t[n-1];e:{t:{let c;n:{i:if(!(e<a)){for(let h=n+2;;){if(a===void 0){if(e<o)break i;return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}if(n===h)break;if(o=a,a=t[++n],e<a)break t}c=t.length;break n}if(!(e>=o)){const h=t[1];e<h&&(n=2,o=h);for(let d=n-2;;){if(o===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(n===d)break;if(a=o,o=t[--n-1],e>=o)break t}c=n,n=0;break n}break e}for(;n<c;){const h=n+c>>>1;e<t[h]?c=h:n=h+1}if(a=t[n],o=t[n-1],o===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(a===void 0)return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}this._cachedIndex=n,this.intervalChanged_(n,o,a)}return this.interpolate_(n,o,e,a)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,a=this.valueSize,o=e*a;for(let c=0;c!==a;++c)t[c]=n[o+c];return t}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}class E2 extends Ud{constructor(e,t,n,a){super(e,t,n,a),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:lf,endingEnd:lf}}intervalChanged_(e,t,n){const a=this.parameterPositions;let o=e-2,c=e+1,h=a[o],d=a[c];if(h===void 0)switch(this.getSettings_().endingStart){case cf:o=e,h=2*t-n;break;case Fm:o=a.length-2,h=t+a[o]-a[o+1];break;default:o=e,h=n}if(d===void 0)switch(this.getSettings_().endingEnd){case cf:c=e,d=2*n-t;break;case Fm:c=1,d=n+a[1]-a[0];break;default:c=e-1,d=t}const p=(n-t)*.5,v=this.valueSize;this._weightPrev=p/(t-h),this._weightNext=p/(d-n),this._offsetPrev=o*v,this._offsetNext=c*v}interpolate_(e,t,n,a){const o=this.resultBuffer,c=this.sampleValues,h=this.valueSize,d=e*h,p=d-h,v=this._offsetPrev,y=this._offsetNext,_=this._weightPrev,b=this._weightNext,T=(n-t)/(a-t),R=T*T,A=R*T,M=-_*A+2*_*R-_*T,C=(1+_)*A+(-1.5-2*_)*R+(-.5+_)*T+1,D=(-1-b)*A+(1.5+b)*R+.5*T,U=b*A-b*R;for(let H=0;H!==h;++H)o[H]=M*c[v+H]+C*c[p+H]+D*c[d+H]+U*c[y+H];return o}}class Hb extends Ud{constructor(e,t,n,a){super(e,t,n,a)}interpolate_(e,t,n,a){const o=this.resultBuffer,c=this.sampleValues,h=this.valueSize,d=e*h,p=d-h,v=(n-t)/(a-t),y=1-v;for(let _=0;_!==h;++_)o[_]=c[p+_]*y+c[d+_]*v;return o}}class T2 extends Ud{constructor(e,t,n,a){super(e,t,n,a)}interpolate_(e){return this.copySampleValue_(e-1)}}class Ar{constructor(e,t,n,a){if(e===void 0)throw new Error("THREE.KeyframeTrack: track name is undefined");if(t===void 0||t.length===0)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=ff(t,this.TimeBufferType),this.values=ff(n,this.ValueBufferType),this.setInterpolation(a||this.DefaultInterpolation)}static toJSON(e){const t=e.constructor;let n;if(t.toJSON!==this.toJSON)n=t.toJSON(e);else{n={name:e.name,times:ff(e.times,Array),values:ff(e.values,Array)};const a=e.getInterpolation();a!==e.DefaultInterpolation&&(n.interpolation=a)}return n.type=e.ValueTypeName,n}InterpolantFactoryMethodDiscrete(e){return new T2(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new Hb(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new E2(this.times,this.values,this.getValueSize(),e)}setInterpolation(e){let t;switch(e){case vd:t=this.InterpolantFactoryMethodDiscrete;break;case yd:t=this.InterpolantFactoryMethodLinear;break;case O0:t=this.InterpolantFactoryMethodSmooth;break}if(t===void 0){const n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(this.createInterpolant===void 0)if(e!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw new Error(n);return console.warn("THREE.KeyframeTrack:",n),this}return this.createInterpolant=t,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return vd;case this.InterpolantFactoryMethodLinear:return yd;case this.InterpolantFactoryMethodSmooth:return O0}}getValueSize(){return this.values.length/this.times.length}shift(e){if(e!==0){const t=this.times;for(let n=0,a=t.length;n!==a;++n)t[n]+=e}return this}scale(e){if(e!==1){const t=this.times;for(let n=0,a=t.length;n!==a;++n)t[n]*=e}return this}trim(e,t){const n=this.times,a=n.length;let o=0,c=a-1;for(;o!==a&&n[o]<e;)++o;for(;c!==-1&&n[c]>t;)--c;if(++c,o!==0||c!==a){o>=c&&(c=Math.max(c,1),o=c-1);const h=this.getValueSize();this.times=n.slice(o,c),this.values=this.values.slice(o*h,c*h)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const n=this.times,a=this.values,o=n.length;o===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let c=null;for(let h=0;h!==o;h++){const d=n[h];if(typeof d=="number"&&isNaN(d)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,h,d),e=!1;break}if(c!==null&&c>d){console.error("THREE.KeyframeTrack: Out of order keys.",this,h,d,c),e=!1;break}c=d}if(a!==void 0&&b2(a))for(let h=0,d=a.length;h!==d;++h){const p=a[h];if(isNaN(p)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,h,p),e=!1;break}}return e}optimize(){const e=this.times.slice(),t=this.values.slice(),n=this.getValueSize(),a=this.getInterpolation()===O0,o=e.length-1;let c=1;for(let h=1;h<o;++h){let d=!1;const p=e[h],v=e[h+1];if(p!==v&&(h!==1||p!==e[0]))if(a)d=!0;else{const y=h*n,_=y-n,b=y+n;for(let T=0;T!==n;++T){const R=t[y+T];if(R!==t[_+T]||R!==t[b+T]){d=!0;break}}}if(d){if(h!==c){e[c]=e[h];const y=h*n,_=c*n;for(let b=0;b!==n;++b)t[_+b]=t[y+b]}++c}}if(o>0){e[c]=e[o];for(let h=o*n,d=c*n,p=0;p!==n;++p)t[d+p]=t[h+p];++c}return c!==e.length?(this.times=e.slice(0,c),this.values=t.slice(0,c*n)):(this.times=e,this.values=t),this}clone(){const e=this.times.slice(),t=this.values.slice(),n=this.constructor,a=new n(this.name,e,t);return a.createInterpolant=this.createInterpolant,a}}Ar.prototype.ValueTypeName="";Ar.prototype.TimeBufferType=Float32Array;Ar.prototype.ValueBufferType=Float32Array;Ar.prototype.DefaultInterpolation=yd;class Tf extends Ar{constructor(e,t,n){super(e,t,n)}}Tf.prototype.ValueTypeName="bool";Tf.prototype.ValueBufferType=Array;Tf.prototype.DefaultInterpolation=vd;Tf.prototype.InterpolantFactoryMethodLinear=void 0;Tf.prototype.InterpolantFactoryMethodSmooth=void 0;class Fb extends Ar{constructor(e,t,n,a){super(e,t,n,a)}}Fb.prototype.ValueTypeName="color";class _f extends Ar{constructor(e,t,n,a){super(e,t,n,a)}}_f.prototype.ValueTypeName="number";class A2 extends Ud{constructor(e,t,n,a){super(e,t,n,a)}interpolate_(e,t,n,a){const o=this.resultBuffer,c=this.sampleValues,h=this.valueSize,d=(n-t)/(a-t);let p=e*h;for(let v=p+h;p!==v;p+=4)Qa.slerpFlat(o,0,c,p-h,c,p,d);return o}}class xf extends Ar{constructor(e,t,n,a){super(e,t,n,a)}InterpolantFactoryMethodLinear(e){return new A2(this.times,this.values,this.getValueSize(),e)}}xf.prototype.ValueTypeName="quaternion";xf.prototype.InterpolantFactoryMethodSmooth=void 0;class Af extends Ar{constructor(e,t,n){super(e,t,n)}}Af.prototype.ValueTypeName="string";Af.prototype.ValueBufferType=Array;Af.prototype.DefaultInterpolation=vd;Af.prototype.InterpolantFactoryMethodLinear=void 0;Af.prototype.InterpolantFactoryMethodSmooth=void 0;class Sf extends Ar{constructor(e,t,n,a){super(e,t,n,a)}}Sf.prototype.ValueTypeName="vector";class Ed{constructor(e="",t=-1,n=[],a=qy){this.name=e,this.tracks=n,this.duration=t,this.blendMode=a,this.uuid=Js(),this.userData={},this.duration<0&&this.resetDuration()}static parse(e){const t=[],n=e.tracks,a=1/(e.fps||1);for(let c=0,h=n.length;c!==h;++c)t.push(WD(n[c]).scale(a));const o=new this(e.name,e.duration,t,e.blendMode);return o.uuid=e.uuid,o.userData=JSON.parse(e.userData||"{}"),o}static toJSON(e){const t=[],n=e.tracks,a={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode,userData:JSON.stringify(e.userData)};for(let o=0,c=n.length;o!==c;++o)t.push(Ar.toJSON(n[o]));return a}static CreateFromMorphTargetSequence(e,t,n,a){const o=t.length,c=[];for(let h=0;h<o;h++){let d=[],p=[];d.push((h+o-1)%o,h,(h+1)%o),p.push(0,1,0);const v=M2(d);d=FS(d,1,v),p=FS(p,1,v),!a&&d[0]===0&&(d.push(o),p.push(p[0])),c.push(new _f(".morphTargetInfluences["+t[h].name+"]",d,p).scale(1/n))}return new this(e,-1,c)}static findByName(e,t){let n=e;if(!Array.isArray(e)){const a=e;n=a.geometry&&a.geometry.animations||a.animations}for(let a=0;a<n.length;a++)if(n[a].name===t)return n[a];return null}static CreateClipsFromMorphTargetSequences(e,t,n){const a={},o=/^([\w-]*?)([\d]+)$/;for(let h=0,d=e.length;h<d;h++){const p=e[h],v=p.name.match(o);if(v&&v.length>1){const y=v[1];let _=a[y];_||(a[y]=_=[]),_.push(p)}}const c=[];for(const h in a)c.push(this.CreateFromMorphTargetSequence(h,a[h],t,n));return c}static parseAnimation(e,t){if(console.warn("THREE.AnimationClip: parseAnimation() is deprecated and will be removed with r185"),!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const n=function(y,_,b,T,R){if(b.length!==0){const A=[],M=[];Pb(b,A,M,T),A.length!==0&&R.push(new y(_,A,M))}},a=[],o=e.name||"default",c=e.fps||30,h=e.blendMode;let d=e.length||-1;const p=e.hierarchy||[];for(let y=0;y<p.length;y++){const _=p[y].keys;if(!(!_||_.length===0))if(_[0].morphTargets){const b={};let T;for(T=0;T<_.length;T++)if(_[T].morphTargets)for(let R=0;R<_[T].morphTargets.length;R++)b[_[T].morphTargets[R]]=-1;for(const R in b){const A=[],M=[];for(let C=0;C!==_[T].morphTargets.length;++C){const D=_[T];A.push(D.time),M.push(D.morphTarget===R?1:0)}a.push(new _f(".morphTargetInfluence["+R+"]",A,M))}d=b.length*c}else{const b=".bones["+t[y].name+"]";n(Sf,b+".position",_,"pos",a),n(xf,b+".quaternion",_,"rot",a),n(Sf,b+".scale",_,"scl",a)}}return a.length===0?null:new this(o,d,a,h)}resetDuration(){const e=this.tracks;let t=0;for(let n=0,a=e.length;n!==a;++n){const o=this.tracks[n];
vendor: 5,136 bytes, line 103
103t=Math.max(t,o.times[o.times.length-1])}return this.duration=t,this}trim(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this}validate(){let e=!0;for(let t=0;t<this.tracks.length;t++)e=e&&this.tracks[t].validate();return e}optimize(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this}clone(){const e=[];for(let n=0;n<this.tracks.length;n++)e.push(this.tracks[n].clone());const t=new this.constructor(this.name,this.duration,e,this.blendMode);return t.userData=JSON.parse(JSON.stringify(this.userData)),t}toJSON(){return this.constructor.toJSON(this)}}function YD(s){switch(s.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return _f;case"vector":case"vector2":case"vector3":case"vector4":return Sf;case"color":return Fb;case"quaternion":return xf;case"bool":case"boolean":return Tf;case"string":return Af}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+s)}function WD(s){if(s.type===void 0)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const e=YD(s.type);if(s.times===void 0){const t=[],n=[];Pb(s.keys,t,n,"value"),s.times=t,s.values=n}return e.parse!==void 0?e.parse(s):new e(s.name,s.times,s.values,s.interpolation)}const jo={enabled:!1,files:{},add:function(s,e){this.enabled!==!1&&(this.files[s]=e)},get:function(s){if(this.enabled!==!1)return this.files[s]},remove:function(s){delete this.files[s]},clear:function(){this.files={}}};class m_{constructor(e,t,n){const a=this;let o=!1,c=0,h=0,d;const p=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this.abortController=new AbortController,this.itemStart=function(v){h++,o===!1&&a.onStart!==void 0&&a.onStart(v,c,h),o=!0},this.itemEnd=function(v){c++,a.onProgress!==void 0&&a.onProgress(v,c,h),c===h&&(o=!1,a.onLoad!==void 0&&a.onLoad())},this.itemError=function(v){a.onError!==void 0&&a.onError(v)},this.resolveURL=function(v){return d?d(v):v},this.setURLModifier=function(v){return d=v,this},this.addHandler=function(v,y){return p.push(v,y),this},this.removeHandler=function(v){const y=p.indexOf(v);return y!==-1&&p.splice(y,2),this},this.getHandler=function(v){for(let y=0,_=p.length;y<_;y+=2){const b=p[y],T=p[y+1];if(b.global&&(b.lastIndex=0),b.test(v))return T}return null},this.abort=function(){return this.abortController.abort(),this.abortController=new AbortController,this}}}const w2=new m_;class $a{constructor(e){this.manager=e!==void 0?e:w2,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(e,t){const n=this;return new Promise(function(a,o){n.load(e,a,t,o)})}parse(){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}abort(){return this}}$a.DEFAULT_MATERIAL_NAME="__DEFAULT";const Ll={};class ZD extends Error{constructor(e,t){super(e),this.response=t}}class Ms extends $a{constructor(e){super(e),this.mimeType="",this.responseType="",this._abortController=new AbortController}load(e,t,n,a){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const o=jo.get(`file:${e}`);if(o!==void 0)return this.manager.itemStart(e),setTimeout(()=>{t&&t(o),this.manager.itemEnd(e)},0),o;if(Ll[e]!==void 0){Ll[e].push({onLoad:t,onProgress:n,onError:a});return}Ll[e]=[],Ll[e].push({onLoad:t,onProgress:n,onError:a});const c=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin",signal:typeof AbortSignal.any=="function"?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal}),h=this.mimeType,d=this.responseType;fetch(c).then(p=>{if(p.status===200||p.status===0){if(p.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||p.body===void 0||p.body.getReader===void 0)return p;const v=Ll[e],y=p.body.getReader(),_=p.headers.get("X-File-Size")||p.headers.get("Content-Length"),b=_?parseInt(_):0,T=b!==0;let R=0;const A=new ReadableStream({start(M){C();function C(){y.read().then(({done:D,value:U})=>{if(D)M.close();else{R+=U.byteLength;const H=new ProgressEvent("progress",{lengthComputable:T,loaded:R,total:b});for(let F=0,G=v.length;F<G;F++){const V=v[F];V.onProgress&&V.onProgress(H)}M.enqueue(U),C()}},D=>{M.error(D)})}}});return new Response(A)}else throw new ZD(`fetch for "${p.url}" responded with ${p.status}: ${p.statusText}`,p)}).then(p=>{switch(d){case"arraybuffer":return p.arrayBuffer();case"blob":return p.blob();case"document":return p.text().then(v=>new DOMParser().parseFromString(v,h));case"json":return p.json();default:if(h==="")return p.text();{const y=/charset="?([^;"\s]*)"?/i.exec(h),_=y&&y[1]?y[1].toLowerCase():void 0,b=new TextDecoder(_);return p.arrayBuffer().then(T=>b.decode(T))}}}).then(p=>{jo.add(`file:${e}`,p);const v=Ll[e];delete Ll[e];for(let y=0,_=v.length;y<_;y++){const b=v[y];b.onLoad&&b.onLoad(p)}}).catch(p=>{const v=Ll[e];
vendor: 6,739 bytes, line 103
103if(v===void 0)throw this.manager.itemError(e),p;delete Ll[e];for(let y=0,_=v.length;y<_;y++){const b=v[y];b.onError&&b.onError(p)}this.manager.itemError(e)}).finally(()=>{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}}class KD extends $a{constructor(e){super(e)}load(e,t,n,a){const o=this,c=new Ms(this.manager);c.setPath(this.path),c.setRequestHeader(this.requestHeader),c.setWithCredentials(this.withCredentials),c.load(e,function(h){try{t(o.parse(JSON.parse(h)))}catch(d){a?a(d):console.error(d),o.manager.itemError(e)}},n,a)}parse(e){const t=[];for(let n=0;n<e.length;n++){const a=Ed.parse(e[n]);t.push(a)}return t}}class QD extends $a{constructor(e){super(e)}load(e,t,n,a){const o=this,c=[],h=new t_,d=new Ms(this.manager);d.setPath(this.path),d.setResponseType("arraybuffer"),d.setRequestHeader(this.requestHeader),d.setWithCredentials(o.withCredentials);let p=0;function v(y){d.load(e[y],function(_){const b=o.parse(_,!0);c[y]={width:b.width,height:b.height,format:b.format,mipmaps:b.mipmaps},p+=1,p===6&&(b.mipmapCount===1&&(h.minFilter=Hn),h.image=c,h.format=b.format,h.needsUpdate=!0,t&&t(h))},n,a)}if(Array.isArray(e))for(let y=0,_=e.length;y<_;++y)v(y);else d.load(e,function(y){const _=o.parse(y,!0);if(_.isCubemap){const b=_.mipmaps.length/_.mipmapCount;for(let T=0;T<b;T++){c[T]={mipmaps:[]};for(let R=0;R<_.mipmapCount;R++)c[T].mipmaps.push(_.mipmaps[T*_.mipmapCount+R]),c[T].format=_.format,c[T].width=_.width,c[T].height=_.height}h.image=c}else h.image.width=_.width,h.image.height=_.height,h.mipmaps=_.mipmaps;_.mipmapCount===1&&(h.minFilter=Hn),h.format=_.format,h.needsUpdate=!0,t&&t(h)},n,a);return h}}const Qh=new WeakMap;class Wm extends $a{constructor(e){super(e)}load(e,t,n,a){this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const o=this,c=jo.get(`image:${e}`);if(c!==void 0){if(c.complete===!0)o.manager.itemStart(e),setTimeout(function(){t&&t(c),o.manager.itemEnd(e)},0);else{let y=Qh.get(c);y===void 0&&(y=[],Qh.set(c,y)),y.push({onLoad:t,onError:a})}return c}const h=km("img");function d(){v(),t&&t(this);const y=Qh.get(this)||[];for(let _=0;_<y.length;_++){const b=y[_];b.onLoad&&b.onLoad(this)}Qh.delete(this),o.manager.itemEnd(e)}function p(y){v(),a&&a(y),jo.remove(`image:${e}`);const _=Qh.get(this)||[];for(let b=0;b<_.length;b++){const T=_[b];T.onError&&T.onError(y)}Qh.delete(this),o.manager.itemError(e),o.manager.itemEnd(e)}function v(){h.removeEventListener("load",d,!1),h.removeEventListener("error",p,!1)}return h.addEventListener("load",d,!1),h.addEventListener("error",p,!1),e.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(h.crossOrigin=this.crossOrigin),jo.add(`image:${e}`,h),o.manager.itemStart(e),h.src=e,h}}class R2 extends $a{constructor(e){super(e)}load(e,t,n,a){const o=new sg;o.colorSpace=Ii;const c=new Wm(this.manager);c.setCrossOrigin(this.crossOrigin),c.setPath(this.path);let h=0;function d(p){c.load(e[p],function(v){o.images[p]=v,h++,h===6&&(o.needsUpdate=!0,t&&t(o))},void 0,a)}for(let p=0;p<e.length;++p)d(p);return o}}class Vb extends $a{constructor(e){super(e)}load(e,t,n,a){const o=this,c=new io,h=new Ms(this.manager);return h.setResponseType("arraybuffer"),h.setRequestHeader(this.requestHeader),h.setPath(this.path),h.setWithCredentials(o.withCredentials),h.load(e,function(d){let p;try{p=o.parse(d)}catch(v){if(a!==void 0)a(v);else{console.error(v);return}}p.image!==void 0?c.image=p.image:p.data!==void 0&&(c.image.width=p.width,c.image.height=p.height,c.image.data=p.data),c.wrapS=p.wrapS!==void 0?p.wrapS:Gi,c.wrapT=p.wrapT!==void 0?p.wrapT:Gi,c.magFilter=p.magFilter!==void 0?p.magFilter:Hn,c.minFilter=p.minFilter!==void 0?p.minFilter:Hn,c.anisotropy=p.anisotropy!==void 0?p.anisotropy:1,p.colorSpace!==void 0&&(c.colorSpace=p.colorSpace),p.flipY!==void 0&&(c.flipY=p.flipY),p.format!==void 0&&(c.format=p.format),p.type!==void 0&&(c.type=p.type),p.mipmaps!==void 0&&(c.mipmaps=p.mipmaps,c.minFilter=Tr),p.mipmapCount===1&&(c.minFilter=Hn),p.generateMipmaps!==void 0&&(c.generateMipmaps=p.generateMipmaps),c.needsUpdate=!0,t&&t(c,p)},n,a),c}}class C2 extends $a{constructor(e){super(e)}load(e,t,n,a){const o=new ei,c=new Wm(this.manager);return c.setCrossOrigin(this.crossOrigin),c.setPath(this.path),c.load(e,function(h){o.image=h,o.needsUpdate=!0,t!==void 0&&t(o)},n,a),o}}class Kc extends Bn{constructor(e,t=1){super(),this.isLight=!0,this.type="Light",this.color=new _t(e),this.intensity=t}dispose(){}copy(e,t){return super.copy(e,t),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const t=super.toJSON(e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,this.groundColor!==void 0&&(t.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(t.object.distance=this.distance),this.angle!==void 0&&(t.object.angle=this.angle),this.decay!==void 0&&(t.object.decay=this.decay),this.penumbra!==void 0&&(t.object.penumbra=this.penumbra),this.shadow!==void 0&&(t.object.shadow=this.shadow.toJSON()),this.target!==void 0&&(t.object.target=this.target.uuid),t}}class N2 extends Kc{constructor(e,t,n){super(e,n),this.isHemisphereLight=!0,this.type="HemisphereLight",this.position.copy(Bn.DEFAULT_UP),this.updateMatrix(),this.groundColor=new _t(t)}copy(e,t){return super.copy(e,t),this.groundColor.copy(e.groundColor),this}}const Vx=new jt,pE=new K,mE=new K;class Gb{constructor(e){this.camera=e,this.intensity=1,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new Je(512,512),this.mapType=Es,this.map=null,this.mapPass=null,this.matrix=new jt,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new Dd,this._frameExtents=new Je(1,1),this._viewportCount=1,this._viewports=[new Gn(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,n=this.matrix;pE.setFromMatrixPosition(e.matrixWorld),t.position.copy(pE),mE.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(mE),t.updateMatrixWorld(),Vx.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Vx,t.coordinateSystem,t.reversedDepth),t.reversedDepth?n.set(.5,0,0,.5,0,.5,0,.5,0,0,1,0,0,0,0,1):n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(Vx)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.intensity=e.intensity,this.bias=e.bias,this.radius=e.radius,this.autoUpdate=e.autoUpdate,this.needsUpdate=e.needsUpdate,this.normalBias=e.n
vendor: 4,117 bytes, line 103
103ormalBias,this.blurSamples=e.blurSamples,this.mapSize.copy(e.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){const e={};return this.intensity!==1&&(e.intensity=this.intensity),this.bias!==0&&(e.bias=this.bias),this.normalBias!==0&&(e.normalBias=this.normalBias),this.radius!==1&&(e.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class JD extends Gb{constructor(){super(new sa(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1,this.aspect=1}updateMatrices(e){const t=this.camera,n=xd*2*e.angle*this.focus,a=this.mapSize.width/this.mapSize.height*this.aspect,o=e.distance||t.far;(n!==t.fov||a!==t.aspect||o!==t.far)&&(t.fov=n,t.aspect=a,t.far=o,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class kb extends Kc{constructor(e,t,n=0,a=Math.PI/3,o=0,c=2){super(e,t),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(Bn.DEFAULT_UP),this.updateMatrix(),this.target=new Bn,this.distance=n,this.angle=a,this.penumbra=o,this.decay=c,this.map=null,this.shadow=new JD}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}const gE=new jt,_m=new K,Gx=new K;class $D extends Gb{constructor(){super(new sa(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new Je(4,2),this._viewportCount=6,this._viewports=[new Gn(2,1,1,1),new Gn(0,1,1,1),new Gn(3,1,1,1),new Gn(1,1,1,1),new Gn(3,0,1,1),new Gn(1,0,1,1)],this._cubeDirections=[new K(1,0,0),new K(-1,0,0),new K(0,0,1),new K(0,0,-1),new K(0,1,0),new K(0,-1,0)],this._cubeUps=[new K(0,1,0),new K(0,1,0),new K(0,1,0),new K(0,1,0),new K(0,0,1),new K(0,0,-1)]}updateMatrices(e,t=0){const n=this.camera,a=this.matrix,o=e.distance||n.far;o!==n.far&&(n.far=o,n.updateProjectionMatrix()),_m.setFromMatrixPosition(e.matrixWorld),n.position.copy(_m),Gx.copy(n.position),Gx.add(this._cubeDirections[t]),n.up.copy(this._cubeUps[t]),n.lookAt(Gx),n.updateMatrixWorld(),a.makeTranslation(-_m.x,-_m.y,-_m.z),gE.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(gE,n.coordinateSystem,n.reversedDepth)}}class Xb extends Kc{constructor(e,t,n=0,a=2){super(e,t),this.isPointLight=!0,this.type="PointLight",this.distance=n,this.decay=a,this.shadow=new $D}get power(){return this.intensity*4*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}class wf extends Zy{constructor(e=-1,t=1,n=1,a=-1,o=.1,c=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=a,this.near=o,this.far=c,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,t,n,a,o,c){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=a,this.view.width=o,this.view.height=c,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,a=(this.top+this.bottom)/2;let o=n-e,c=n+e,h=a+t,d=a-t;if(this.view!==null&&this.view.enabled){const p=(this.right-this.left)/this.view.fullWidth/this.zoom,v=(this.top-this.bottom)/this.view.fullHeight/this.zoom;o+=p*this.view.offsetX,c=o+p*this.view.width,h-=v*this.view.offsetY,d=h-v*this.view.height}
vendor: 52,067 bytes, line 103
103this.projectionMatrix.makeOrthographic(o,c,h,d,this.near,this.far,this.coordinateSystem,this.reversedDepth),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}}class eU extends Gb{constructor(){super(new wf(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class jb extends Kc{constructor(e,t){super(e,t),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Bn.DEFAULT_UP),this.updateMatrix(),this.target=new Bn,this.shadow=new eU}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class D2 extends Kc{constructor(e,t){super(e,t),this.isAmbientLight=!0,this.type="AmbientLight"}}class U2 extends Kc{constructor(e,t,n=10,a=10){super(e,t),this.isRectAreaLight=!0,this.type="RectAreaLight",this.width=n,this.height=a}get power(){return this.intensity*this.width*this.height*Math.PI}set power(e){this.intensity=e/(this.width*this.height*Math.PI)}copy(e){return super.copy(e),this.width=e.width,this.height=e.height,this}toJSON(e){const t=super.toJSON(e);return t.object.width=this.width,t.object.height=this.height,t}}class L2{constructor(){this.isSphericalHarmonics3=!0,this.coefficients=[];for(let e=0;e<9;e++)this.coefficients.push(new K)}set(e){for(let t=0;t<9;t++)this.coefficients[t].copy(e[t]);return this}zero(){for(let e=0;e<9;e++)this.coefficients[e].set(0,0,0);return this}getAt(e,t){const n=e.x,a=e.y,o=e.z,c=this.coefficients;return t.copy(c[0]).multiplyScalar(.282095),t.addScaledVector(c[1],.488603*a),t.addScaledVector(c[2],.488603*o),t.addScaledVector(c[3],.488603*n),t.addScaledVector(c[4],1.092548*(n*a)),t.addScaledVector(c[5],1.092548*(a*o)),t.addScaledVector(c[6],.315392*(3*o*o-1)),t.addScaledVector(c[7],1.092548*(n*o)),t.addScaledVector(c[8],.546274*(n*n-a*a)),t}getIrradianceAt(e,t){const n=e.x,a=e.y,o=e.z,c=this.coefficients;return t.copy(c[0]).multiplyScalar(.886227),t.addScaledVector(c[1],2*.511664*a),t.addScaledVector(c[2],2*.511664*o),t.addScaledVector(c[3],2*.511664*n),t.addScaledVector(c[4],2*.429043*n*a),t.addScaledVector(c[5],2*.429043*a*o),t.addScaledVector(c[6],.743125*o*o-.247708),t.addScaledVector(c[7],2*.429043*n*o),t.addScaledVector(c[8],.429043*(n*n-a*a)),t}add(e){for(let t=0;t<9;t++)this.coefficients[t].add(e.coefficients[t]);return this}addScaledSH(e,t){for(let n=0;n<9;n++)this.coefficients[n].addScaledVector(e.coefficients[n],t);return this}scale(e){for(let t=0;t<9;t++)this.coefficients[t].multiplyScalar(e);return this}lerp(e,t){for(let n=0;n<9;n++)this.coefficients[n].lerp(e.coefficients[n],t);return this}equals(e){for(let t=0;t<9;t++)if(!this.coefficients[t].equals(e.coefficients[t]))return!1;return!0}copy(e){return this.set(e.coefficients)}clone(){return new this.constructor().copy(this)}fromArray(e,t=0){const n=this.coefficients;for(let a=0;a<9;a++)n[a].fromArray(e,t+a*3);return this}toArray(e=[],t=0){const n=this.coefficients;for(let a=0;a<9;a++)n[a].toArray(e,t+a*3);return e}static getBasisAt(e,t){const n=e.x,a=e.y,o=e.z;t[0]=.282095,t[1]=.488603*a,t[2]=.488603*o,t[3]=.488603*n,t[4]=1.092548*n*a,t[5]=1.092548*a*o,t[6]=.315392*(3*o*o-1),t[7]=1.092548*n*o,t[8]=.546274*(n*n-a*a)}}class O2 extends Kc{constructor(e=new L2,t=1){super(void 0,t),this.isLightProbe=!0,this.sh=e}copy(e){return super.copy(e),this.sh.copy(e.sh),this}fromJSON(e){return this.intensity=e.intensity,this.sh.fromArray(e.sh),this}toJSON(e){const t=super.toJSON(e);return t.object.sh=this.sh.toArray(),t}}class g_ extends $a{constructor(e){super(e),this.textures={}}load(e,t,n,a){const o=this,c=new Ms(o.manager);c.setPath(o.path),c.setRequestHeader(o.requestHeader),c.setWithCredentials(o.withCredentials),c.load(e,function(h){try{t(o.parse(JSON.parse(h)))}catch(d){a?a(d):console.error(d),o.manager.itemError(e)}},n,a)}parse(e){const t=this.textures;function n(o){return t[o]===void 0&&console.warn("THREE.MaterialLoader: Undefined texture",o),t[o]}const a=this.createMaterialFromType(e.type);if(e.uuid!==void 0&&(a.uuid=e.uuid),e.name!==void 0&&(a.name=e.name),e.color!==void 0&&a.color!==void 0&&a.color.setHex(e.color),e.roughness!==void 0&&(a.roughness=e.roughness),e.metalness!==void 0&&(a.metalness=e.metalness),e.sheen!==void 0&&(a.sheen=e.sheen),e.sheenColor!==void 0&&(a.sheenColor=new _t().setHex(e.sheenColor)),e.sheenRoughness!==void 0&&(a.sheenRoughness=e.sheenRoughness),e.emissive!==void 0&&a.emissive!==void 0&&a.emissive.setHex(e.emissive),e.specular!==void 0&&a.specular!==void 0&&a.specular.setHex(e.specular),e.specularIntensity!==void 0&&(a.specularIntensity=e.specularIntensity),e.specularColor!==void 0&&a.specularColor!==void 0&&a.specularColor.setHex(e.specularColor),e.shininess!==void 0&&(a.shininess=e.shininess),e.clearcoat!==void 0&&(a.clearcoat=e.clearcoat),e.clearcoatRoughness!==void 0&&(a.clearcoatRoughness=e.clearcoatRoughness),e.dispersion!==void 0&&(a.dispersion=e.dispersion),e.iridescence!==void 0&&(a.iridescence=e.iridescence),e.iridescenceIOR!==void 0&&(a.iridescenceIOR=e.iridescenceIOR),e.iridescenceThicknessRange!==void 0&&(a.iridescenceThicknessRange=e.iridescenceThicknessRange),e.transmission!==void 0&&(a.transmission=e.transmission),e.thickness!==void 0&&(a.thickness=e.thickness),e.attenuationDistance!==void 0&&(a.attenuationDistance=e.attenuationDistance),e.attenuationColor!==void 0&&a.attenuationColor!==void 0&&a.attenuationColor.setHex(e.attenuationColor),e.anisotropy!==void 0&&(a.anisotropy=e.anisotropy),e.anisotropyRotation!==void 0&&(a.anisotropyRotation=e.anisotropyRotation),e.fog!==void 0&&(a.fog=e.fog),e.flatShading!==void 0&&(a.flatShading=e.flatShading),e.blending!==void 0&&(a.blending=e.blending),e.combine!==void 0&&(a.combine=e.combine),e.side!==void 0&&(a.side=e.side),e.shadowSide!==void 0&&(a.shadowSide=e.shadowSide),e.opacity!==void 0&&(a.opacity=e.opacity),e.transparent!==void 0&&(a.transparent=e.transparent),e.alphaTest!==void 0&&(a.alphaTest=e.alphaTest),e.alphaHash!==void 0&&(a.alphaHash=e.alphaHash),e.depthFunc!==void 0&&(a.depthFunc=e.depthFunc),e.depthTest!==void 0&&(a.depthTest=e.depthTest),e.depthWrite!==void 0&&(a.depthWrite=e.depthWrite),e.colorWrite!==void 0&&(a.colorWrite=e.colorWrite),e.blendSrc!==void 0&&(a.blendSrc=e.blendSrc),e.blendDst!==void 0&&(a.blendDst=e.blendDst),e.blendEquation!==void 0&&(a.blendEquation=e.blendEquation),e.blendSrcAlpha!==void 0&&(a.blendSrcAlpha=e.blendSrcAlpha),e.blendDstAlpha!==void 0&&(a.blendDstAlpha=e.blendDstAlpha),e.blendEquationAlpha!==void 0&&(a.blendEquationAlpha=e.blendEquationAlpha),e.blendColor!==void 0&&a.blendColor!==void 0&&a.blendColor.setHex(e.blendColor),e.blendAlpha!==void 0&&(a.blendAlpha=e.blendAlpha),e.stencilWriteMask!==void 0&&(a.stencilWriteMask=e.stencilWriteMask),e.stencilFunc!==void 0&&(a.stencilFunc=e.stencilFunc),e.stencilRef!==void 0&&(a.stencilRef=e.stencilRef),e.stencilFuncMask!==void 0&&(a.stencilFuncMask=e.stencilFuncMask),e.stencilFail!==void 0&&(a.stencilFail=e.stencilFail),e.stencilZFail!==void 0&&(a.stencilZFail=e.stencilZFail),e.stencilZPass!==void 0&&(a.stencilZPass=e.stencilZPass),e.stencilWrite!==void 0&&(a.stencilWrite=e.stencilWrite),e.wireframe!==void 0&&(a.wireframe=e.wireframe),e.wireframeLinewidth!==void 0&&(a.wireframeLinewidth=e.wireframeLinewidth),e.wireframeLinecap!==void 0&&(a.wireframeLinecap=e.wireframeLinecap),e.wireframeLinejoin!==void 0&&(a.wireframeLinejoin=e.wireframeLinejoin),e.rotation!==void 0&&(a.rotation=e.rotation),e.linewidth!==void 0&&(a.linewidth=e.linewidth),e.dashSize!==void 0&&(a.dashSize=e.dashSize),e.gapSize!==void 0&&(a.gapSize=e.gapSize),e.scale!==void 0&&(a.scale=e.scale),e.polygonOffset!==void 0&&(a.polygonOffset=e.polygonOffset),e.polygonOffsetFactor!==void 0&&(a.polygonOffsetFactor=e.polygonOffsetFactor),e.polygonOffsetUnits!==void 0&&(a.polygonOffsetUnits=e.polygonOffsetUnits),e.dithering!==void 0&&(a.dithering=e.dithering),e.alphaToCoverage!==void 0&&(a.alphaToCoverage=e.alphaToCoverage),e.premultipliedAlpha!==void 0&&(a.premultipliedAlpha=e.premultipliedAlpha),e.forceSinglePass!==void 0&&(a.forceSinglePass=e.forceSinglePass),e.visible!==void 0&&(a.visible=e.visible),e.toneMapped!==void 0&&(a.toneMapped=e.toneMapped),e.userData!==void 0&&(a.userData=e.userData),e.vertexColors!==void 0&&(typeof e.vertexColors=="number"?a.vertexColors=e.vertexColors>0:a.vertexColors=e.vertexColors),e.uniforms!==void 0)for(const o in e.uniforms){const c=e.uniforms[o];switch(a.uniforms[o]={},c.type){case"t":a.uniforms[o].value=n(c.value);break;case"c":a.uniforms[o].value=new _t().setHex(c.value);break;case"v2":a.uniforms[o].value=new Je().fromArray(c.value);break;case"v3":a.uniforms[o].value=new K().fromArray(c.value);break;case"v4":a.uniforms[o].value=new Gn().fromArray(c.value);break;case"m3":a.uniforms[o].value=new cn().fromArray(c.value);break;case"m4":a.uniforms[o].value=new jt().fromArray(c.value);break;default:a.uniforms[o].value=c.value}}if(e.defines!==void 0&&(a.defines=e.defines),e.vertexShader!==void 0&&(a.vertexShader=e.vertexShader),e.fragmentShader!==void 0&&(a.fragmentShader=e.fragmentShader),e.glslVersion!==void 0&&(a.glslVersion=e.glslVersion),e.extensions!==void 0)for(const o in e.extensions)a.extensions[o]=e.extensions[o];if(e.lights!==void 0&&(a.lights=e.lights),e.clipping!==void 0&&(a.clipping=e.clipping),e.size!==void 0&&(a.size=e.size),e.sizeAttenuation!==void 0&&(a.sizeAttenuation=e.sizeAttenuation),e.map!==void 0&&(a.map=n(e.map)),e.matcap!==void 0&&(a.matcap=n(e.matcap)),e.alphaMap!==void 0&&(a.alphaMap=n(e.alphaMap)),e.bumpMap!==void 0&&(a.bumpMap=n(e.bumpMap)),e.bumpScale!==void 0&&(a.bumpScale=e.bumpScale),e.normalMap!==void 0&&(a.normalMap=n(e.normalMap)),e.normalMapType!==void 0&&(a.normalMapType=e.normalMapType),e.normalScale!==void 0){let o=e.normalScale;Array.isArray(o)===!1&&(o=[o,o]),a.normalScale=new Je().fromArray(o)}return e.displacementMap!==void 0&&(a.displacementMap=n(e.displacementMap)),e.displacementScale!==void 0&&(a.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(a.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(a.roughnessMap=n(e.roughnessMap)),e.metalnessMap!==void 0&&(a.metalnessMap=n(e.metalnessMap)),e.emissiveMap!==void 0&&(a.emissiveMap=n(e.emissiveMap)),e.emissiveIntensity!==void 0&&(a.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(a.specularMap=n(e.specularMap)),e.specularIntensityMap!==void 0&&(a.specularIntensityMap=n(e.specularIntensityMap)),e.specularColorMap!==void 0&&(a.specularColorMap=n(e.specularColorMap)),e.envMap!==void 0&&(a.envMap=n(e.envMap)),e.envMapRotation!==void 0&&a.envMapRotation.fromArray(e.envMapRotation),e.envMapIntensity!==void 0&&(a.envMapIntensity=e.envMapIntensity),e.reflectivity!==void 0&&(a.reflectivity=e.reflectivity),e.refractionRatio!==void 0&&(a.refractionRatio=e.refractionRatio),e.lightMap!==void 0&&(a.lightMap=n(e.lightMap)),e.lightMapIntensity!==void 0&&(a.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(a.aoMap=n(e.aoMap)),e.aoMapIntensity!==void 0&&(a.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(a.gradientMap=n(e.gradientMap)),e.clearcoatMap!==void 0&&(a.clearcoatMap=n(e.clearcoatMap)),e.clearcoatRoughnessMap!==void 0&&(a.clearcoatRoughnessMap=n(e.clearcoatRoughnessMap)),e.clearcoatNormalMap!==void 0&&(a.clearcoatNormalMap=n(e.clearcoatNormalMap)),e.clearcoatNormalScale!==void 0&&(a.clearcoatNormalScale=new Je().fromArray(e.clearcoatNormalScale)),e.iridescenceMap!==void 0&&(a.iridescenceMap=n(e.iridescenceMap)),e.iridescenceThicknessMap!==void 0&&(a.iridescenceThicknessMap=n(e.iridescenceThicknessMap)),e.transmissionMap!==void 0&&(a.transmissionMap=n(e.transmissionMap)),e.thicknessMap!==void 0&&(a.thicknessMap=n(e.thicknessMap)),e.anisotropyMap!==void 0&&(a.anisotropyMap=n(e.anisotropyMap)),e.sheenColorMap!==void 0&&(a.sheenColorMap=n(e.sheenColorMap)),e.sheenRoughnessMap!==void 0&&(a.sheenRoughnessMap=n(e.sheenRoughnessMap)),a}setTextures(e){return this.textures=e,this}createMaterialFromType(e){return g_.createMaterialFromType(e)}static createMaterialFromType(e){const t={ShadowMaterial:p2,SpriteMaterial:Eb,RawShaderMaterial:m2,ShaderMaterial:Ts,PointsMaterial:e_,MeshPhysicalMaterial:tr,MeshStandardMaterial:pg,MeshPhongMaterial:g2,MeshToonMaterial:v2,MeshNormalMaterial:y2,MeshLambertMaterial:_2,MeshDepthMaterial:Ib,MeshDistanceMaterial:Bb,MeshBasicMaterial:Bs,MeshMatcapMaterial:x2,LineDashedMaterial:S2,LineBasicMaterial:Ja,Material:la};return new t[e]}}class Vc{static extractUrlBase(e){const t=e.lastIndexOf("/");return t===-1?"./":e.slice(0,t+1)}static resolveURL(e,t){return typeof e!="string"||e===""?"":(/^https?:\/\//i.test(t)&&/^\//.test(e)&&(t=t.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:t+e)}}class z2 extends un{constructor(){super(),this.isInstancedBufferGeometry=!0,this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(e){return super.copy(e),this.instanceCount=e.instanceCount,this}toJSON(){const e=super.toJSON();return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}}class I2 extends $a{constructor(e){super(e)}load(e,t,n,a){const o=this,c=new Ms(o.manager);c.setPath(o.path),c.setRequestHeader(o.requestHeader),c.setWithCredentials(o.withCredentials),c.load(e,function(h){try{t(o.parse(JSON.parse(h)))}catch(d){a?a(d):console.error(d),o.manager.itemError(e)}},n,a)}parse(e){const t={},n={};function a(b,T){if(t[T]!==void 0)return t[T];const A=b.interleavedBuffers[T],M=o(b,A.buffer),C=ad(A.type,M),D=new og(C,A.stride);return D.uuid=A.uuid,t[T]=D,D}function o(b,T){if(n[T]!==void 0)return n[T];const A=b.arrayBuffers[T],M=new Uint32Array(A).buffer;return n[T]=M,M}const c=e.isInstancedBufferGeometry?new z2:new un,h=e.data.index;if(h!==void 0){const b=ad(h.type,h.array);c.setIndex(new Qn(b,1))}const d=e.data.attributes;for(const b in d){const T=d[b];let R;if(T.isInterleavedBufferAttribute){const A=a(e.data,T.data);R=new jc(A,T.itemSize,T.offset,T.normalized)}else{const A=ad(T.type,T.array),M=T.isInstancedBufferAttribute?vf:Qn;R=new M(A,T.itemSize,T.normalized)}T.name!==void 0&&(R.name=T.name),T.usage!==void 0&&R.setUsage(T.usage),c.setAttribute(b,R)}const p=e.data.morphAttributes;if(p)for(const b in p){const T=p[b],R=[];for(let A=0,M=T.length;A<M;A++){const C=T[A];let D;if(C.isInterleavedBufferAttribute){const U=a(e.data,C.data);D=new jc(U,C.itemSize,C.offset,C.normalized)}else{const U=ad(C.type,C.array);D=new Qn(U,C.itemSize,C.normalized)}C.name!==void 0&&(D.name=C.name),R.push(D)}c.morphAttributes[b]=R}e.data.morphTargetsRelative&&(c.morphTargetsRelative=!0);const y=e.data.groups||e.data.drawcalls||e.data.offsets;if(y!==void 0)for(let b=0,T=y.length;b!==T;++b){const R=y[b];c.addGroup(R.start,R.count,R.materialIndex)}const _=e.data.boundingSphere;return _!==void 0&&(c.boundingSphere=new Sa().fromJSON(_)),e.name&&(c.name=e.name),e.userData&&(c.userData=e.userData),c}}class tU extends $a{constructor(e){super(e)}load(e,t,n,a){const o=this,c=this.path===""?Vc.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||c;const h=new Ms(this.manager);h.setPath(this.path),h.setRequestHeader(this.requestHeader),h.setWithCredentials(this.withCredentials),h.load(e,function(d){let p=null;try{p=JSON.parse(d)}catch(y){a!==void 0&&a(y),console.error("THREE:ObjectLoader: Can't parse "+e+".",y.message);return}const v=p.metadata;if(v===void 0||v.type===void 0||v.type.toLowerCase()==="geometry"){a!==void 0&&a(new Error("THREE.ObjectLoader: Can't load "+e)),console.error("THREE.ObjectLoader: Can't load "+e);return}o.parse(p,t)},n,a)}async loadAsync(e,t){const n=this,a=this.path===""?Vc.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||a;const o=new Ms(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials);const c=await o.loadAsync(e,t),h=JSON.parse(c),d=h.metadata;if(d===void 0||d.type===void 0||d.type.toLowerCase()==="geometry")throw new Error("THREE.ObjectLoader: Can't load "+e);return await n.parseAsync(h)}parse(e,t){const n=this.parseAnimations(e.animations),a=this.parseShapes(e.shapes),o=this.parseGeometries(e.geometries,a),c=this.parseImages(e.images,function(){t!==void 0&&t(p)}),h=this.parseTextures(e.textures,c),d=this.parseMaterials(e.materials,h),p=this.parseObject(e.object,o,d,h,n),v=this.parseSkeletons(e.skeletons,p);if(this.bindSkeletons(p,v),this.bindLightTargets(p),t!==void 0){let y=!1;for(const _ in c)if(c[_].data instanceof HTMLImageElement){y=!0;break}y===!1&&t(p)}return p}async parseAsync(e){const t=this.parseAnimations(e.animations),n=this.parseShapes(e.shapes),a=this.parseGeometries(e.geometries,n),o=await this.parseImagesAsync(e.images),c=this.parseTextures(e.textures,o),h=this.parseMaterials(e.materials,c),d=this.parseObject(e.object,a,h,c,t),p=this.parseSkeletons(e.skeletons,d);return this.bindSkeletons(d,p),this.bindLightTargets(d),d}parseShapes(e){const t={};if(e!==void 0)for(let n=0,a=e.length;n<a;n++){const o=new mf().fromJSON(e[n]);t[o.uuid]=o}return t}parseSkeletons(e,t){const n={},a={};if(t.traverse(function(o){o.isBone&&(a[o.uuid]=o)}),e!==void 0)for(let o=0,c=e.length;o<c;o++){const h=new lg().fromJSON(e[o],a);n[h.uuid]=h}return n}parseGeometries(e,t){const n={};if(e!==void 0){const a=new I2;for(let o=0,c=e.length;o<c;o++){let h;const d=e[o];switch(d.type){case"BufferGeometry":case"InstancedBufferGeometry":h=a.parse(d);break;default:d.type in dE?h=dE[d.type].fromJSON(d,t):console.warn(`THREE.ObjectLoader: Unsupported geometry type "${d.type}"`)}h.uuid=d.uuid,d.name!==void 0&&(h.name=d.name),d.userData!==void 0&&(h.userData=d.userData),n[d.uuid]=h}}return n}parseMaterials(e,t){const n={},a={};if(e!==void 0){const o=new g_;o.setTextures(t);for(let c=0,h=e.length;c<h;c++){const d=e[c];n[d.uuid]===void 0&&(n[d.uuid]=o.parse(d)),a[d.uuid]=n[d.uuid]}}return a}parseAnimations(e){const t={};if(e!==void 0)for(let n=0;n<e.length;n++){const a=e[n],o=Ed.parse(a);t[o.uuid]=o}return t}parseImages(e,t){const n=this,a={};let o;function c(d){return n.manager.itemStart(d),o.load(d,function(){n.manager.itemEnd(d)},void 0,function(){n.manager.itemError(d),n.manager.itemEnd(d)})}function h(d){if(typeof d=="string"){const p=d,v=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(p)?p:n.resourcePath+p;return c(v)}else return d.data?{data:ad(d.type,d.data),width:d.width,height:d.height}:null}if(e!==void 0&&e.length>0){const d=new m_(t);o=new Wm(d),o.setCrossOrigin(this.crossOrigin);for(let p=0,v=e.length;p<v;p++){const y=e[p],_=y.url;if(Array.isArray(_)){const b=[];for(let T=0,R=_.length;T<R;T++){const A=_[T],M=h(A);M!==null&&(M instanceof HTMLImageElement?b.push(M):b.push(new io(M.data,M.width,M.height)))}a[y.uuid]=new Hc(b)}else{const b=h(y.url);a[y.uuid]=new Hc(b)}}}return a}async parseImagesAsync(e){const t=this,n={};let a;async function o(c){if(typeof c=="string"){const h=c,d=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(h)?h:t.resourcePath+h;return await a.loadAsync(d)}else return c.data?{data:ad(c.type,c.data),width:c.width,height:c.height}:null}if(e!==void 0&&e.length>0){a=new Wm(this.manager),a.setCrossOrigin(this.crossOrigin);for(let c=0,h=e.length;c<h;c++){const d=e[c],p=d.url;if(Array.isArray(p)){const v=[];for(let y=0,_=p.length;y<_;y++){const b=p[y],T=await o(b);T!==null&&(T instanceof HTMLImageElement?v.push(T):v.push(new io(T.data,T.width,T.height)))}n[d.uuid]=new Hc(v)}else{const v=await o(d.url);n[d.uuid]=new Hc(v)}}}return n}parseTextures(e,t){function n(o,c){return typeof o=="number"?o:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",o),c[o])}const a={};if(e!==void 0)for(let o=0,c=e.length;o<c;o++){const h=e[o];h.image===void 0&&console.warn('THREE.ObjectLoader: No "image" specified for',h.uuid),t[h.image]===void 0&&console.warn("THREE.ObjectLoader: Undefined image",h.image);const d=t[h.image],p=d.data;let v;Array.isArray(p)?(v=new sg,p.length===6&&(v.needsUpdate=!0)):(p&&p.data?v=new io:v=new ei,p&&(v.needsUpdate=!0)),v.source=d,v.uuid=h.uuid,h.name!==void 0&&(v.name=h.name),h.mapping!==void 0&&(v.mapping=n(h.mapping,nU)),h.channel!==void 0&&(v.channel=h.channel),h.offset!==void 0&&v.offset.fromArray(h.offset),h.repeat!==void 0&&v.repeat.fromArray(h.repeat),h.center!==void 0&&v.center.fromArray(h.center),h.rotation!==void 0&&(v.rotation=h.rotation),h.wrap!==void 0&&(v.wrapS=n(h.wrap[0],vE),v.wrapT=n(h.wrap[1],vE)),h.format!==void 0&&(v.format=h.format),h.internalFormat!==void 0&&(v.internalFormat=h.internalFormat),h.type!==void 0&&(v.type=h.type),h.colorSpace!==void 0&&(v.colorSpace=h.colorSpace),h.minFilter!==void 0&&(v.minFilter=n(h.minFilter,yE)),h.magFilter!==void 0&&(v.magFilter=n(h.magFilter,yE)),h.anisotropy!==void 0&&(v.anisotropy=h.anisotropy),h.flipY!==void 0&&(v.flipY=h.flipY),h.generateMipmaps!==void 0&&(v.generateMipmaps=h.generateMipmaps),h.premultiplyAlpha!==void 0&&(v.premultiplyAlpha=h.premultiplyAlpha),h.unpackAlignment!==void 0&&(v.unpackAlignment=h.unpackAlignment),h.compareFunction!==void 0&&(v.compareFunction=h.compareFunction),h.userData!==void 0&&(v.userData=h.userData),a[h.uuid]=v}return a}parseObject(e,t,n,a,o){let c;function h(_){return t[_]===void 0&&console.warn("THREE.ObjectLoader: Undefined geometry",_),t[_]}function d(_){if(_!==void 0){if(Array.isArray(_)){const b=[];for(let T=0,R=_.length;T<R;T++){const A=_[T];n[A]===void 0&&console.warn("THREE.ObjectLoader: Undefined material",A),b.push(n[A])}return b}return n[_]===void 0&&console.warn("THREE.ObjectLoader: Undefined material",_),n[_]}}function p(_){return a[_]===void 0&&console.warn("THREE.ObjectLoader: Undefined texture",_),a[_]}let v,y;switch(e.type){case"Scene":c=new rg,e.background!==void 0&&(Number.isInteger(e.background)?c.background=new _t(e.background):c.background=p(e.background)),e.environment!==void 0&&(c.environment=p(e.environment)),e.fog!==void 0&&(e.fog.type==="Fog"?c.fog=new Qy(e.fog.color,e.fog.near,e.fog.far):e.fog.type==="FogExp2"&&(c.fog=new Ky(e.fog.color,e.fog.density)),e.fog.name!==""&&(c.fog.name=e.fog.name)),e.backgroundBlurriness!==void 0&&(c.backgroundBlurriness=e.backgroundBlurriness),e.backgroundIntensity!==void 0&&(c.backgroundIntensity=e.backgroundIntensity),e.backgroundRotation!==void 0&&c.backgroundRotation.fromArray(e.backgroundRotation),e.environmentIntensity!==void 0&&(c.environmentIntensity=e.environmentIntensity),e.environmentRotation!==void 0&&c.environmentRotation.fromArray(e.environmentRotation);break;case"PerspectiveCamera":c=new sa(e.fov,e.aspect,e.near,e.far),e.focus!==void 0&&(c.focus=e.focus),e.zoom!==void 0&&(c.zoom=e.zoom),e.filmGauge!==void 0&&(c.filmGauge=e.filmGauge),e.filmOffset!==void 0&&(c.filmOffset=e.filmOffset),e.view!==void 0&&(c.view=Object.assign({},e.view));break;case"OrthographicCamera":c=new wf(e.left,e.right,e.top,e.bottom,e.near,e.far),e.zoom!==void 0&&(c.zoom=e.zoom),e.view!==void 0&&(c.view=Object.assign({},e.view));break;case"AmbientLight":c=new D2(e.color,e.intensity);break;case"DirectionalLight":c=new jb(e.color,e.intensity),c.target=e.target||"";break;case"PointLight":c=new Xb(e.color,e.intensity,e.distance,e.decay);break;case"RectAreaLight":c=new U2(e.color,e.intensity,e.width,e.height);break;case"SpotLight":c=new kb(e.color,e.intensity,e.distance,e.angle,e.penumbra,e.decay),c.target=e.target||"";break;case"HemisphereLight":c=new N2(e.color,e.groundColor,e.intensity);break;case"LightProbe":c=new O2().fromJSON(e);break;case"SkinnedMesh":v=h(e.geometry),y=d(e.material),c=new Tb(v,y),e.bindMode!==void 0&&(c.bindMode=e.bindMode),e.bindMatrix!==void 0&&c.bindMatrix.fromArray(e.bindMatrix),e.skeleton!==void 0&&(c.skeleton=e.skeleton);break;case"Mesh":v=h(e.geometry),y=d(e.material),c=new Mi(v,y);break;case"InstancedMesh":v=h(e.geometry),y=d(e.material);const _=e.count,b=e.instanceMatrix,T=e.instanceColor;c=new Ab(v,y,_),c.instanceMatrix=new vf(new Float32Array(b.array),16),T!==void 0&&(c.instanceColor=new vf(new Float32Array(T.array),T.itemSize));break;case"BatchedMesh":v=h(e.geometry),y=d(e.material),c=new t2(e.maxInstanceCount,e.maxVertexCount,e.maxIndexCount,y),c.geometry=v,c.perObjectFrustumCulled=e.perObjectFrustumCulled,c.sortObjects=e.sortObjects,c._drawRanges=e.drawRanges,c._reservedRanges=e.reservedRanges,c._geometryInfo=e.geometryInfo.map(R=>{let A=null,M=null;return R.boundingBox!==void 0&&(A=new La().fromJSON(R.boundingBox)),R.boundingSphere!==void 0&&(M=new Sa().fromJSON(R.boundingSphere)),{...R,boundingBox:A,boundingSphere:M}}),c._instanceInfo=e.instanceInfo,c._availableInstanceIds=e._availableInstanceIds,c._availableGeometryIds=e._availableGeometryIds,c._nextIndexStart=e.nextIndexStart,c._nextVertexStart=e.nextVertexStart,c._geometryCount=e.geometryCount,c._maxInstanceCount=e.maxInstanceCount,c._maxVertexCount=e.maxVertexCount,c._maxIndexCount=e.maxIndexCount,c._geometryInitialized=e.geometryInitialized,c._matricesTexture=p(e.matricesTexture.uuid),c._indirectTexture=p(e.indirectTexture.uuid),e.colorsTexture!==void 0&&(c._colorsTexture=p(e.colorsTexture.uuid)),e.boundingSphere!==void 0&&(c.boundingSphere=new Sa().fromJSON(e.boundingSphere)),e.boundingBox!==void 0&&(c.boundingBox=new La().fromJSON(e.boundingBox));break;case"LOD":c=new e2;break;case"Line":c=new Vl(h(e.geometry),d(e.material));break;case"LineLoop":c=new wb(h(e.geometry),d(e.material));break;case"LineSegments":c=new so(h(e.geometry),d(e.material));break;case"PointCloud":case"Points":c=new Rb(h(e.geometry),d(e.material));break;case"Sprite":c=new $A(d(e.material));break;case"Group":c=new Bl;break;case"Bone":c=new Jy;break;default:c=new Bn}if(c.uuid=e.uuid,e.name!==void 0&&(c.name=e.name),e.matrix!==void 0?(c.matrix.fromArray(e.matrix),e.matrixAutoUpdate!==void 0&&(c.matrixAutoUpdate=e.matrixAutoUpdate),c.matrixAutoUpdate&&c.matrix.decompose(c.position,c.quaternion,c.scale)):(e.position!==void 0&&c.position.fromArray(e.position),e.rotation!==void 0&&c.rotation.fromArray(e.rotation),e.quaternion!==void 0&&c.quaternion.fromArray(e.quaternion),e.scale!==void 0&&c.scale.fromArray(e.scale)),e.up!==void 0&&c.up.fromArray(e.up),e.castShadow!==void 0&&(c.castShadow=e.castShadow),e.receiveShadow!==void 0&&(c.receiveShadow=e.receiveShadow),e.shadow&&(e.shadow.intensity!==void 0&&(c.shadow.intensity=e.shadow.intensity),e.shadow.bias!==void 0&&(c.shadow.bias=e.shadow.bias),e.shadow.normalBias!==void 0&&(c.shadow.normalBias=e.shadow.normalBias),e.shadow.radius!==void 0&&(c.shadow.radius=e.shadow.radius),e.shadow.mapSize!==void 0&&c.shadow.mapSize.fromArray(e.shadow.mapSize),e.shadow.camera!==void 0&&(c.shadow.camera=this.parseObject(e.shadow.camera))),e.visible!==void 0&&(c.visible=e.visible),e.frustumCulled!==void 0&&(c.frustumCulled=e.frustumCulled),e.renderOrder!==void 0&&(c.renderOrder=e.renderOrder),e.userData!==void 0&&(c.userData=e.userData),e.layers!==void 0&&(c.layers.mask=e.layers),e.children!==void 0){const _=e.children;for(let b=0;b<_.length;b++)c.add(this.parseObject(_[b],t,n,a,o))}if(e.animations!==void 0){const _=e.animations;for(let b=0;b<_.length;b++){const T=_[b];c.animations.push(o[T])}}if(e.type==="LOD"){e.autoUpdate!==void 0&&(c.autoUpdate=e.autoUpdate);const _=e.levels;for(let b=0;b<_.length;b++){const T=_[b],R=c.getObjectByProperty("uuid",T.object);R!==void 0&&c.addLevel(R,T.distance,T.hysteresis)}}return c}bindSkeletons(e,t){Object.keys(t).length!==0&&e.traverse(function(n){if(n.isSkinnedMesh===!0&&n.skeleton!==void 0){const a=t[n.skeleton];a===void 0?console.warn("THREE.ObjectLoader: No skeleton found with UUID:",n.skeleton):n.bind(a,n.bindMatrix)}})}bindLightTargets(e){e.traverse(function(t){if(t.isDirectionalLight||t.isSpotLight){const n=t.target,a=e.getObjectByProperty("uuid",n);a!==void 0?t.target=a:t.target=new Bn}})}}const nU={UVMapping:Gc,CubeReflectionMapping:Wo,CubeRefractionMapping:kc,EquirectangularReflectionMapping:fd,EquirectangularRefractionMapping:Hm,CubeUVReflectionMapping:Cd},vE={RepeatWrapping:Xc,ClampToEdgeWrapping:Gi,MirroredRepeatWrapping:hd},yE={NearestFilter:oa,NearestMipmapNearestFilter:Hy,NearestMipmapLinearFilter:of,LinearFilter:Hn,LinearMipmapNearestFilter:rd,LinearMipmapLinearFilter:Tr},kx=new WeakMap;class B2 extends $a{constructor(e){super(e),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"},this._abortController=new AbortController}setOptions(e){return this.options=e,this}load(e,t,n,a){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const o=this,c=jo.get(`image-bitmap:${e}`);if(c!==void 0){if(o.manager.itemStart(e),c.then){c.then(p=>{if(kx.has(c)===!0)a&&a(kx.get(c)),o.manager.itemError(e),o.manager.itemEnd(e);else return t&&t(p),o.manager.itemEnd(e),p});return}return setTimeout(function(){t&&t(c),o.manager.itemEnd(e)},0),c}const h={};h.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",h.headers=this.requestHeader,h.signal=typeof AbortSignal.any=="function"?AbortSignal.any([this._abortController.signal,this.manager.abortController.signal]):this._abortController.signal;const d=fetch(e,h).then(function(p){return p.blob()}).then(function(p){return createImageBitmap(p,Object.assign(o.options,{colorSpaceConversion:"none"}))}).then(function(p){return jo.add(`image-bitmap:${e}`,p),t&&t(p),o.manager.itemEnd(e),p}).catch(function(p){a&&a(p),kx.set(d,p),jo.remove(`image-bitmap:${e}`),o.manager.itemError(e),o.manager.itemEnd(e)});jo.add(`image-bitmap:${e}`,d),o.manager.itemStart(e)}abort(){return this._abortController.abort(),this._abortController=new AbortController,this}}let y0;class qb{static getContext(){return y0===void 0&&(y0=new(window.AudioContext||window.webkitAudioContext)),y0}static setContext(e){y0=e}}class iU extends $a{constructor(e){super(e)}load(e,t,n,a){const o=this,c=new Ms(this.manager);c.setResponseType("arraybuffer"),c.setPath(this.path),c.setRequestHeader(this.requestHeader),c.setWithCredentials(this.withCredentials),c.load(e,function(d){try{const p=d.slice(0);qb.getContext().decodeAudioData(p,function(y){t(y)}).catch(h)}catch(p){h(p)}},n,a);function h(d){a?a(d):console.error(d),o.manager.itemError(e)}}}const _E=new jt,xE=new jt,Wu=new jt;class aU{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new sa,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new sa,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(e){const t=this._cache;if(t.focus!==e.focus||t.fov!==e.fov||t.aspect!==e.aspect*this.aspect||t.near!==e.near||t.far!==e.far||t.zoom!==e.zoom||t.eyeSep!==this.eyeSep){t.focus=e.focus,t.fov=e.fov,t.aspect=e.aspect*this.aspect,t.near=e.near,t.far=e.far,t.zoom=e.zoom,t.eyeSep=this.eyeSep,Wu.copy(e.projectionMatrix);const a=t.eyeSep/2,o=a*t.near/t.focus,c=t.near*Math.tan(pf*t.fov*.5)/t.zoom;let h,d;xE.elements[12]=-a,_E.elements[12]=a,h=-c*t.aspect+o,d=c*t.aspect+o,Wu.elements[0]=2*t.near/(d-h),Wu.elements[8]=(d+h)/(d-h),this.cameraL.projectionMatrix.copy(Wu),h=-c*t.aspect-o,d=c*t.aspect-o,Wu.elements[0]=2*t.near/(d-h),Wu.elements[8]=(d+h)/(d-h),this.cameraR.projectionMatrix.copy(Wu)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(xE),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(_E)}}class P2 extends sa{constructor(e=[]){super(),this.isArrayCamera=!0,this.isMultiViewCamera=!1,this.cameras=e}}class Yb{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=performance.now(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const t=performance.now();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}const Zu=new K,Xx=new Qa,sU=new K,Ku=new K,Qu=new K;class rU extends Bn{constructor(){super(),this.type="AudioListener",this.context=qb.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new Yb}getInput(){return this.gain}removeFilter(){return this.filter!==null&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(e){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}updateMatrixWorld(e){super.updateMatrixWorld(e);const t=this.context.listener;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(Zu,Xx,sU),Ku.set(0,0,-1).applyQuaternion(Xx),Qu.set(0,1,0).applyQuaternion(Xx),t.positionX){const n=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(Zu.x,n),t.positionY.linearRampToValueAtTime(Zu.y,n),t.positionZ.linearRampToValueAtTime(Zu.z,n),t.forwardX.linearRampToValueAtTime(Ku.x,n),t.forwardY.linearRampToValueAtTime(Ku.y,n),t.forwardZ.linearRampToValueAtTime(Ku.z,n),t.upX.linearRampToValueAtTime(Qu.x,n),t.upY.linearRampToValueAtTime(Qu.y,n),t.upZ.linearRampToValueAtTime(Qu.z,n)}else t.setPosition(Zu.x,Zu.y,Zu.z),t.setOrientation(Ku.x,Ku.y,Ku.z,Qu.x,Qu.y,Qu.z)}}class H2 extends Bn{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(e=0){if(this.isPlaying===!0){console.warn("THREE.Audio: Audio is already playing.");return}if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}this._startedAt=this.context.currentTime+e;const t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.loopStart=this.loopStart,t.loopEnd=this.loopEnd,t.onended=this.onEnded.bind(this),t.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=t,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this}stop(e=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+e),this.source.onended=null),this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,t=this.filters.length;e<t;e++)this.filters[e-1].connect(this.filters[e]);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 e=1,t=this.filters.length;e<t;e++)this.filters[e-1].disconnect(this.filters[e]);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(e){return e||(e=[]),this._connected===!0?(this.disconnect(),this.filters=e.slice(),this.connect()):this.filters=e.slice(),this}setDetune(e){return this.detune=e,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(e){return this.setFilters(e?[e]:[])}setPlaybackRate(e){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.playbackRate=e,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(e){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.loop=e,this.isPlaying===!0&&(this.source.loop=this.loop),this}setLoopStart(e){return this.loopStart=e,this}setLoopEnd(e){return this.loopEnd=e,this}getVolume(){return this.gain.gain.value}setVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}copy(e,t){return super.copy(e,t),e.sourceType!=="buffer"?(console.warn("THREE.Audio: Audio source type cannot be copied."),this):(this.autoplay=e.autoplay,this.buffer=e.buffer,this.detune=e.detune,this.loop=e.loop,this.loopStart=e.loopStart,this.loopEnd=e.loopEnd,this.offset=e.offset,this.duration=e.duration,this.playbackRate=e.playbackRate,this.hasPlaybackControl=e.hasPlaybackControl,this.sourceType=e.sourceType,this.filters=e.filters.slice(),this)}clone(e){return new this.constructor(this.listener).copy(this,e)}}const Ju=new K,SE=new Qa,oU=new K,$u=new K;class lU extends H2{constructor(e){super(e),this.panner=this.context.createPanner(),this.panner.panningModel="HRTF",this.panner.connect(this.gain)}connect(){return super.connect(),this.panner.connect(this.gain),this}disconnect(){return super.disconnect(),this.panner.disconnect(this.gain),this}getOutput(){return this.panner}getRefDistance(){return this.panner.refDistance}setRefDistance(e){return this.panner.refDistance=e,this}getRolloffFactor(){return this.panner.rolloffFactor}setRolloffFactor(e){return this.panner.rolloffFactor=e,this}getDistanceModel(){return this.panner.distanceModel}setDistanceModel(e){return this.panner.distanceModel=e,this}getMaxDistance(){return this.panner.maxDistance}setMaxDistance(e){return this.panner.maxDistance=e,this}setDirectionalCone(e,t,n){return this.panner.coneInnerAngle=e,this.panner.coneOuterAngle=t,this.panner.coneOuterGain=n,this}updateMatrixWorld(e){if(super.updateMatrixWorld(e),this.hasPlaybackControl===!0&&this.isPlaying===!1)return;this.matrixWorld.decompose(Ju,SE,oU),$u.set(0,0,1).applyQuaternion(SE);const t=this.panner;if(t.positionX){const n=this.context.currentTime+this.listener.timeDelta;t.positionX.linearRampToValueAtTime(Ju.x,n),t.positionY.linearRampToValueAtTime(Ju.y,n),t.positionZ.linearRampToValueAtTime(Ju.z,n),t.orientationX.linearRampToValueAtTime($u.x,n),t.orientationY.linearRampToValueAtTime($u.y,n),t.orientationZ.linearRampToValueAtTime($u.z,n)}else t.setPosition(Ju.x,Ju.y,Ju.z),t.setOrientation($u.x,$u.y,$u.z)}}class cU{constructor(e,t=2048){this.analyser=e.context.createAnalyser(),this.analyser.fftSize=t,this.data=new Uint8Array(this.analyser.frequencyBinCount),e.getOutput().connect(this.analyser)}getFrequencyData(){return this.analyser.getByteFrequencyData(this.data),this.data}getAverageFrequency(){let e=0;const t=this.getFrequencyData();for(let n=0;n<t.length;n++)e+=t[n];return e/t.length}}class F2{constructor(e,t,n){this.binding=e,this.valueSize=n;let a,o,c;switch(t){case"quaternion":a=this._slerp,o=this._slerpAdditive,c=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(n*6),this._workIndex=5;break;case"string":case"bool":a=this._select,o=this._select,c=this._setAdditiveIdentityOther,this.buffer=new Array(n*5);break;default:a=this._lerp,o=this._lerpAdditive,c=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(n*5)}this._mixBufferRegion=a,this._mixBufferRegionAdditive=o,this._setIdentity=c,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}accumulate(e,t){const n=this.buffer,a=this.valueSize,o=e*a+a;let c=this.cumulativeWeight;if(c===0){for(let h=0;h!==a;++h)n[o+h]=n[h];c=t}else{c+=t;const h=t/c;this._mixBufferRegion(n,o,0,h,a)}this.cumulativeWeight=c}accumulateAdditive(e){const t=this.buffer,n=this.valueSize,a=n*this._addIndex;this.cumulativeWeightAdditive===0&&this._setIdentity(),this._mixBufferRegionAdditive(t,a,0,e,n),this.cumulativeWeightAdditive+=e}apply(e){const t=this.valueSize,n=this.buffer,a=e*t+t,o=this.cumulativeWeight,c=this.cumulativeWeightAdditive,h=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,o<1){const d=t*this._origIndex;this._mixBufferRegion(n,a,d,1-o,t)}c>0&&this._mixBufferRegionAdditive(n,a,this._addIndex*t,1,t);for(let d=t,p=t+t;d!==p;++d)if(n[d]!==n[d+t]){h.setValue(n,a);break}}saveOriginalState(){const e=this.binding,t=this.buffer,n=this.valueSize,a=n*this._origIndex;e.getValue(t,a);for(let o=n,c=a;o!==c;++o)t[o]=t[a+o%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=this.valueSize*3;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let n=e;n<t;n++)this.buffer[n]=0}_setAdditiveIdentityQuaternion(){this._setAdditiveIdentityNumeric(),this.buffer[this._addIndex*this.valueSize+3]=1}_setAdditiveIdentityOther(){const e=this._origIndex*this.valueSize,t=this._addIndex*this.valueSize;for(let n=0;n<this.valueSize;n++)this.buffer[t+n]=this.buffer[e+n]}_select(e,t,n,a,o){if(a>=.5)for(let c=0;c!==o;++c)e[t+c]=e[n+c]}_slerp(e,t,n,a){Qa.slerpFlat(e,t,e,t,e,n,a)}_slerpAdditive(e,t,n,a,o){const c=this._workIndex*o;Qa.multiplyQuaternionsFlat(e,c,e,t,e,n),Qa.slerpFlat(e,t,e,t,e,c,a)}_lerp(e,t,n,a,o){const c=1-a;for(let h=0;h!==o;++h){const d=t+h;e[d]=e[d]*c+e[n+h]*a}}_lerpAdditive(e,t,n,a,o){for(let c=0;c!==o;++c){const h=t+c;e[h]=e[h]+e[n+c]*a}}}const Wb="\\[\\]\\.:\\/",uU=new RegExp("["+Wb+"]","g"),Zb="[^"+Wb+"]",fU="[^"+Wb.replace("\\.","")+"]",hU=/((?:WC+[\/:])*)/.source.replace("WC",Zb),dU=/(WCOD+)?/.source.replace("WCOD",fU),pU=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Zb),mU=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Zb),gU=new RegExp("^"+hU+dU+pU+mU+"$"),vU=["material","materials","bones","map"];class yU{constructor(e,t,n){const a=n||Pn.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,a)}getValue(e,t){this.bind();const n=this._targetGroup.nCachedObjects_,a=this._bindings[n];a!==void 0&&a.getValue(e,t)}setValue(e,t){const n=this._bindings;for(let a=this._targetGroup.nCachedObjects_,o=n.length;a!==o;++a)n[a].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].unbind()}}class Pn{constructor(e,t,n){this.path=t,this.parsedPath=n||Pn.parseTrackName(t),this.node=Pn.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,n){return e&&e.isAnimationObjectGroup?new Pn.Composite(e,t,n):new Pn(e,t,n)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(uU,"")}static parseTrackName(e){const t=gU.exec(e);if(t===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const n={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},a=n.nodeName&&n.nodeName.lastIndexOf(".");if(a!==void 0&&a!==-1){const o=n.nodeName.substring(a+1);vU.indexOf(o)!==-1&&(n.nodeName=n.nodeName.substring(0,a),n.objectName=o)}if(n.propertyName===null||n.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return n}static findNode(e,t){if(t===void 0||t===""||t==="."||t===-1||t===e.name||t===e.uuid)return e;if(e.skeleton){const n=e.skeleton.getBoneByName(t);if(n!==void 0)return n}if(e.children){const n=function(o){for(let c=0;c<o.length;c++){const h=o[c];if(h.name===t||h.uuid===t)return h;const d=n(h.children);if(d)return d}return null},a=n(e.children);if(a)return a}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(e,t){e[t]=this.targetObject[this.propertyName]}_getValue_array(e,t){const n=this.resolvedProperty;for(let a=0,o=n.length;a!==o;++a)e[t++]=n[a]}_getValue_arrayElement(e,t){e[t]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(e,t){this.resolvedProperty.toArray(e,t)}_setValue_direct(e,t){this.targetObject[this.propertyName]=e[t]}_setValue_direct_setNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(e,t){const n=this.resolvedProperty;for(let a=0,o=n.length;a!==o;++a)n[a]=e[t++]}_setValue_array_setNeedsUpdate(e,t){const n=this.resolvedProperty;for(let a=0,o=n.length;a!==o;++a)n[a]=e[t++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(e,t){const n=this.resolvedProperty;for(let a=0,o=n.length;a!==o;++a)n[a]=e[t++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(e,t){this.resolvedProperty[this.propertyIndex]=e[t]}_setValue_arrayElement_setNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(e,t){this.resolvedProperty.fromArray(e,t)}_setValue_fromArray_setNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(e,t){this.bind(),this.getValue(e,t)}_setValue_unbound(e,t){this.bind(),this.setValue(e,t)}bind(){let e=this.node;const t=this.parsedPath,n=t.objectName,a=t.propertyName;let o=t.propertyIndex;if(e||(e=Pn.findNode(this.rootNode,t.nodeName),this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!e){console.warn("THREE.PropertyBinding: No target node found for track: "+this.path+".");return}if(n){let p=t.objectIndex;switch(n){case"materials":if(!e.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!e.material.materials){console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);return}e=e.material.materials;break;case"bones":if(!e.skeleton){console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);return}e=e.skeleton.bones;for(let v=0;v<e.length;v++)if(e[v].name===p){p=v;break}break;case"map":if("map"in e){e=e.map;break}if(!e.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!e.material.map){console.error("THREE.PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);return}e=e.material.map;break;default:if(e[n]===void 0){console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);return}e=e[n]}if(p!==void 0){if(e[p]===void 0){console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);return}e=e[p]}}const c=e[a];if(c===void 0){const p=t.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+p+"."+a+" but it wasn't found.",e);return}let h=this.Versioning.None;this.targetObject=e,e.isMaterial===!0?h=this.Versioning.NeedsUpdate:e.isObject3D===!0&&(h=this.Versioning.MatrixWorldNeedsUpdate);let d=this.BindingType.Direct;if(o!==void 0){if(a==="morphTargetInfluences"){if(!e.geometry){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);return}if(!e.geometry.morphAttributes){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);return}e.morphTargetDictionary[o]!==void 0&&(o=e.morphTargetDictionary[o])}d=this.BindingType.ArrayElement,this.resolvedProperty=c,this.propertyIndex=o}else c.fromArray!==void 0&&c.toArray!==void 0?(d=this.BindingType.HasFromToArray,this.resolvedProperty=c):Array.isArray(c)?(d=this.BindingType.EntireArray,this.resolvedProperty=c):this.propertyName=a;this.getValue=this.GetterByBindingType[d],this.setValue=this.SetterByBindingTypeAndVersioning[d][h]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}Pn.Composite=yU;Pn.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3};Pn.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2};Pn.prototype.GetterByBindingType=[Pn.prototype._getValue_direct,Pn.prototype._getValue_array,Pn.prototype._getValue_arrayElement,Pn.prototype._getValue_toArray];Pn.prototype.SetterByBindingTypeAndVersioning=[[Pn.prototype._setValue_direct,Pn.prototype._setValue_direct_setNeedsUpdate,Pn.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[Pn.prototype._setValue_array,Pn.prototype._setValue_array_setNeedsUpdate,Pn.prototype._setValue_array_setMatrixWorldNeedsUpdate],[Pn.prototype._setValue_arrayElement,Pn.prototype._setValue_arrayElement_setNeedsUpdate,Pn.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[Pn.prototype._setValue_fromArray,Pn.prototype._setValue_fromArray_setNeedsUpdate,Pn.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];class _U{constructor(){this.isAnimationObjectGroup=!0,this.uuid=Js(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;const e={};this._indicesByUUID=e;for(let n=0,a=arguments.length;n!==a;++n)e[arguments[n].uuid]=n;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};const t=this;this.stats={objects:{get total(){return t._objects.length},get inUse(){return this.total-t.nCachedObjects_}},get bindingsPerObject(){return t._bindings.length}}}add(){const e=this._objects,t=this._indicesByUUID,n=this._paths,a=this._parsedPaths,o=this._bindings,c=o.length;let h,d=e.length,p=this.nCachedObjects_;for(let v=0,y=arguments.length;v!==y;++v){const _=arguments[v],b=_.uuid;let T=t[b];if(T===void 0){T=d++,t[b]=T,e.push(_);for(let R=0,A=c;R!==A;++R)o[R].push(new Pn(_,n[R],a[R]))}else if(T<p){h=e[T];const R=--p,A=e[R];t[A.uuid]=T,e[T]=A,t[b]=R,e[R]=_;for(let M=0,C=c;M!==C;++M){const D=o[M],U=D[R];let H=D[T];D[T]=U,H===void 0&&(H=new Pn(_,n[M],a[M])),D[R]=H}}else e[T]!==h&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastru
103cture when reloading scenes.")}this.nCachedObjects_=p}remove(){const e=this._objects,t=this._indicesByUUID,n=this._bindings,a=n.length;let o=this.nCachedObjects_;for(let c=0,h=arguments.length;c!==h;++c){const d=arguments[c],p=d.uuid,v=t[p];if(v!==void 0&&v>=o){const y=o++,_=e[y];t[_.uuid]=v,e[v]=_,t[p]=y,e[y]=d;for(let b=0,T=a;b!==T;++b){const R=n[b],A=R[y],M=R[v];R[v]=A,R[y]=M}}}this.nCachedObjects_=o}uncache(){const e=this._objects,t=this._indicesByUUID,n=this._bindings,a=n.length;let o=this.nCachedObjects_,c=e.length;for(let h=0,d=arguments.length;h!==d;++h){const p=arguments[h],v=p.uuid,y=t[v];if(y!==void 0)if(delete t[v],y<o){const _=--o,b=e[_],T=--c,R=e[T];t[b.uuid]=y,e[y]=b,t[R.uuid]=_,e[_]=R,e.pop();for(let A=0,M=a;A!==M;++A){const C=n[A],D=C[_],U=C[T];C[y]=D,C[_]=U,C.pop()}}else{const _=--c,b=e[_];_>0&&(t[b.uuid]=y),e[y]=b,e.pop();for(let T=0,R=a;T!==R;++T){const A=n[T];A[y]=A[_],A.pop()}}}this.nCachedObjects_=o}subscribe_(e,t){const n=this._bindingsIndicesByPath;let a=n[e];const o=this._bindings;if(a!==void 0)return o[a];const c=this._paths,h=this._parsedPaths,d=this._objects,p=d.length,v=this.nCachedObjects_,y=new Array(p);a=o.length,n[e]=a,c.push(e),h.push(t),o.push(y);for(let _=v,b=d.length;_!==b;++_){const T=d[_];y[_]=new Pn(T,e,t)}return y}unsubscribe_(e){const t=this._bindingsIndicesByPath,n=t[e];if(n!==void 0){const a=this._paths,o=this._parsedPaths,c=this._bindings,h=c.length-1,d=c[h],p=e[h];t[p]=n,c[n]=d,c.pop(),o[n]=o[h],o.pop(),a[n]=a[h],a.pop()}}}class V2{constructor(e,t,n=null,a=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=n,this.blendMode=a;const o=t.tracks,c=o.length,h=new Array(c),d={endingStart:lf,endingEnd:lf};for(let p=0;p!==c;++p){const v=o[p].createInterpolant(null);h[p]=v,v.settings=d}this._interpolantSettings=d,this._interpolants=h,this._propertyBindings=new Array(c),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=LA,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,n=!1){if(e.fadeOut(t),this.fadeIn(t),n===!0){const a=this._clip.duration,o=e._clip.duration,c=o/a,h=a/o;e.warp(1,c,t),this.warp(h,1,t)}return this}crossFadeTo(e,t,n=!1){return e.crossFadeFrom(this,t,n)}stopFading(){const e=this._weightInterpolant;return e!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,n){const a=this._mixer,o=a.time,c=this.timeScale;let h=this._timeScaleInterpolant;h===null&&(h=a._lendControlInterpolant(),this._timeScaleInterpolant=h);const d=h.parameterPositions,p=h.sampleValues;return d[0]=o,d[1]=o+n,p[0]=e/c,p[1]=t/c,this}stopWarping(){const e=this._timeScaleInterpolant;return e!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,n,a){if(!this.enabled){this._updateWeight(e);return}const o=this._startTime;if(o!==null){const d=(e-o)*n;d<0||n===0?t=0:(this._startTime=null,t=n*d)}t*=this._updateTimeScale(e);const c=this._updateTime(t),h=this._updateWeight(e);if(h>0){const d=this._interpolants,p=this._propertyBindings;switch(this.blendMode){case pb:for(let v=0,y=d.length;v!==y;++v)d[v].evaluate(c),p[v].accumulateAdditive(h);break;case qy:default:for(let v=0,y=d.length;v!==y;++v)d[v].evaluate(c),p[v].accumulate(a,h)}}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;const n=this._weightInterpolant;if(n!==null){const a=n.evaluate(e)[0];t*=a,e>n.parameterPositions[1]&&(this.stopFading(),a===0&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;const n=this._timeScaleInterpolant;if(n!==null){const a=n.evaluate(e)[0];t*=a,e>n.parameterPositions[1]&&(this.stopWarping(),t===0?this.paused=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t}_updateTime(e){const t=this._clip.duration,n=this.loop;let a=this.time+e,o=this._loopCount;const c=n===OA;if(e===0)return o===-1?a:c&&(o&1)===1?t-a:a;if(n===UA){o===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(a>=t)a=t;else if(a<0)a=0;else{this.time=a;break e}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=a,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(o===-1&&(e>=0?(o=0,this._setEndings(!0,this.repetitions===0,c)):this._setEndings(this.repetitions===0,!0,c)),a>=t||a<0){const h=Math.floor(a/t);a-=t*h,o+=Math.abs(h);const d=this.repetitions-o;if(d<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,a=e>0?t:0,this.time=a,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(d===1){const p=e<0;
vendor: 9,182 bytes, line 103
103this._setEndings(p,!p,c)}else this._setEndings(!1,!1,c);this._loopCount=o,this.time=a,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:h})}}else this.time=a;if(c&&(o&1)===1)return t-a}return a}_setEndings(e,t,n){const a=this._interpolantSettings;n?(a.endingStart=cf,a.endingEnd=cf):(e?a.endingStart=this.zeroSlopeAtStart?cf:lf:a.endingStart=Fm,t?a.endingEnd=this.zeroSlopeAtEnd?cf:lf:a.endingEnd=Fm)}_scheduleFading(e,t,n){const a=this._mixer,o=a.time;let c=this._weightInterpolant;c===null&&(c=a._lendControlInterpolant(),this._weightInterpolant=c);const h=c.parameterPositions,d=c.sampleValues;return h[0]=o,d[0]=t,h[1]=o+e,d[1]=n,this}}const xU=new Float32Array(1);class SU extends Qo{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){const n=e._localRoot||this._root,a=e._clip.tracks,o=a.length,c=e._propertyBindings,h=e._interpolants,d=n.uuid,p=this._bindingsByRootAndName;let v=p[d];v===void 0&&(v={},p[d]=v);for(let y=0;y!==o;++y){const _=a[y],b=_.name;let T=v[b];if(T!==void 0)++T.referenceCount,c[y]=T;else{if(T=c[y],T!==void 0){T._cacheIndex===null&&(++T.referenceCount,this._addInactiveBinding(T,d,b));continue}const R=t&&t._propertyBindings[y].binding.parsedPath;T=new F2(Pn.create(n,b,R),_.ValueTypeName,_.getValueSize()),++T.referenceCount,this._addInactiveBinding(T,d,b),c[y]=T}h[y].resultBuffer=T.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){const n=(e._localRoot||this._root).uuid,a=e._clip.uuid,o=this._actionsByClip[a];this._bindAction(e,o&&o.knownActions[0]),this._addInactiveAction(e,a,n)}const t=e._propertyBindings;for(let n=0,a=t.length;n!==a;++n){const o=t[n];o.useCount++===0&&(this._lendBinding(o),o.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const t=e._propertyBindings;for(let n=0,a=t.length;n!==a;++n){const o=t[n];--o.useCount===0&&(o.restoreOriginalState(),this._takeBackBinding(o))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const t=e._cacheIndex;return t!==null&&t<this._nActiveActions}_addInactiveAction(e,t,n){const a=this._actions,o=this._actionsByClip;let c=o[t];if(c===void 0)c={knownActions:[e],actionByRoot:{}},e._byClipCacheIndex=0,o[t]=c;else{const h=c.knownActions;e._byClipCacheIndex=h.length,h.push(e)}e._cacheIndex=a.length,a.push(e),c.actionByRoot[n]=e}_removeInactiveAction(e){const t=this._actions,n=t[t.length-1],a=e._cacheIndex;n._cacheIndex=a,t[a]=n,t.pop(),e._cacheIndex=null;const o=e._clip.uuid,c=this._actionsByClip,h=c[o],d=h.knownActions,p=d[d.length-1],v=e._byClipCacheIndex;p._byClipCacheIndex=v,d[v]=p,d.pop(),e._byClipCacheIndex=null;const y=h.actionByRoot,_=(e._localRoot||this._root).uuid;delete y[_],d.length===0&&delete c[o],this._removeInactiveBindingsForAction(e)}_removeInactiveBindingsForAction(e){const t=e._propertyBindings;for(let n=0,a=t.length;n!==a;++n){const o=t[n];--o.referenceCount===0&&this._removeInactiveBinding(o)}}_lendAction(e){const t=this._actions,n=e._cacheIndex,a=this._nActiveActions++,o=t[a];e._cacheIndex=a,t[a]=e,o._cacheIndex=n,t[n]=o}_takeBackAction(e){const t=this._actions,n=e._cacheIndex,a=--this._nActiveActions,o=t[a];e._cacheIndex=a,t[a]=e,o._cacheIndex=n,t[n]=o}_addInactiveBinding(e,t,n){const a=this._bindingsByRootAndName,o=this._bindings;let c=a[t];c===void 0&&(c={},a[t]=c),c[n]=e,e._cacheIndex=o.length,o.push(e)}_removeInactiveBinding(e){const t=this._bindings,n=e.binding,a=n.rootNode.uuid,o=n.path,c=this._bindingsByRootAndName,h=c[a],d=t[t.length-1],p=e._cacheIndex;d._cacheIndex=p,t[p]=d,t.pop(),delete h[o],Object.keys(h).length===0&&delete c[a]}_lendBinding(e){const t=this._bindings,n=e._cacheIndex,a=this._nActiveBindings++,o=t[a];e._cacheIndex=a,t[a]=e,o._cacheIndex=n,t[n]=o}_takeBackBinding(e){const t=this._bindings,n=e._cacheIndex,a=--this._nActiveBindings,o=t[a];e._cacheIndex=a,t[a]=e,o._cacheIndex=n,t[n]=o}_lendControlInterpolant(){const e=this._controlInterpolants,t=this._nActiveControlInterpolants++;let n=e[t];return n===void 0&&(n=new Hb(new Float32Array(2),new Float32Array(2),1,xU),n.__cacheIndex=t,e[t]=n),n}_takeBackControlInterpolant(e){const t=this._controlInterpolants,n=e.__cacheIndex,a=--this._nActiveControlInterpolants,o=t[a];e.__cacheIndex=a,t[a]=e,o.__cacheIndex=n,t[n]=o}clipAction(e,t,n){const a=t||this._root,o=a.uuid;let c=typeof e=="string"?Ed.findByName(a,e):e;const h=c!==null?c.uuid:e,d=this._actionsByClip[h];let p=null;if(n===void 0&&(c!==null?n=c.blendMode:n=qy),d!==void 0){const y=d.actionByRoot[o];if(y!==void 0&&y.blendMode===n)return y;p=d.knownActions[0],c===null&&(c=p._clip)}if(c===null)return null;const v=new V2(this,c,t,n);return this._bindAction(v,p),this._addInactiveAction(v,h,o),v}existingAction(e,t){const n=t||this._root,a=n.uuid,o=typeof e=="string"?Ed.findByName(n,e):e,c=o?o.uuid:e,h=this._actionsByClip[c];return h!==void 0&&h.actionByRoot[a]||null}stopAllAction(){const e=this._actions,t=this._nActiveActions;for(let n=t-1;n>=0;--n)e[n].stop();return this}update(e){e*=this.timeScale;const t=this._actions,n=this._nActiveActions,a=this.time+=e,o=Math.sign(e),c=this._accuIndex^=1;for(let p=0;p!==n;++p)t[p]._update(a,e,o,c);const h=this._bindings,d=this._nActiveBindings;for(let p=0;p!==d;++p)h[p].apply(c);return this}setTime(e){this.time=0;for(let t=0;t<this._actions.length;t++)this._actions[t].time=0;return this.update(e)}getRoot(){return this._root}uncacheClip(e){const t=this._actions,n=e.uuid,a=this._actionsByClip,o=a[n];if(o!==void 0){const c=o.knownActions;for(let h=0,d=c.length;h!==d;++h){const p=c[h];this._deactivateAction(p);const v=p._cacheIndex,y=t[t.length-1];p._cacheIndex=null,p._byClipCacheIndex=null,y._cacheIndex=v,t[v]=y,t.pop(),this._removeInactiveBindingsForAction(p)}delete a[n]}}uncacheRoot(e){const t=e.uuid,n=this._actionsByClip;for(const c in n){const h=n[c].actionByRoot,d=h[t];d!==void 0&&(this._deactivateAction(d),this._removeInactiveAction(d))}const a=this._bindingsByRootAndName,o=a[t];if(o!==void 0)for(const c in o){const h=o[c];h.restoreOriginalState(),this._removeInactiveBinding(h)}}uncacheAction(e,t){const n=this.existingAction(e,t);n!==null&&(this._deactivateAction(n),this._removeInactiveAction(n))}}class bU extends _b{constructor(e=1,t=1,n=1,a={}){super(e,t,a),this.isRenderTarget3D=!0,this.depth=n,this.texture=new Wy(null,e,t,n),this._setTextureOptions(a),this.texture.isRenderTargetTexture=!0}}class v_{constructor(e){this.value=e}clone(){return new v_(this.value.clone===void 0?this.value:this.value.clone())}}let MU=0;class EU extends Qo{constructor(){super(),this.isUniformsGroup=!0,Object.defineProperty(this,"id",{value:MU++}),this.name="",this.usage=Gm,this.uniforms=[]}add(e){return this.uniforms.push(e),this}remove(e){const t=this.uniforms.indexOf(e);return t!==-1&&this.uniforms.splice(t,1),this}setName(e){return this.name=e,this}setUsage(e){return this.usage=e,this}dispose(){this.dispatchEvent({type:"dispose"})}copy(e){this.name=e.name,this.usage=e.usage;const t=e.uniforms;this.uniforms.length=0;for(let n=0,a=t.length;n<a;n++){const o=Array.isArray(t[n])?t[n]:[t[n]];for(let c=0;c<o.length;c++)this.uniforms.push(o[c].clone())}return this}clone(){return new this.constructor().copy(this)}}class TU extends og{constructor(e,t,n=1){super(e,t),this.isInstancedInterleavedBuffer=!0,this.meshPerAttribute=n}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}clone(e){const t=super.clone(e);return t.meshPerAttribute=this.meshPerAttribute,t}toJSON(e){const t=super.toJSON(e);return t.isInstancedInterleavedBuffer=!0,t.meshPerAttribute=this.meshPerAttribute,t}}class AU{constructor(e,t,n,a,o,c=!1){this.isGLBufferAttribute=!0,this.name="",this.buffer=e,this.type=t,this.itemSize=n,this.elementSize=a,this.count=o,this.normalized=c,this.version=0}set needsUpdate(e){e===!0&&this.version++}setBuffer(e){return this.buffer=e,this}setType(e,t){return this.type=e,this.elementSize=t,this}setItemSize(e){return this.itemSize=e,this}setCount(e){return this.count=e,this}}const bE=new jt;class Kb{constructor(e,t,n=0,a=1/0){this.ray=new Nd(e,t),this.near=n,this.far=a,this.camera=null,this.layers=new Sd,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(e,t){this.ray.set(e,t)}setFromCamera(e,t){t.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(t.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(t).sub(this.ray.origin).normalize(),this.camera=t):t.isOrthographicCamera?(this.ray.origin.set(e.x,e.y,(t.near+t.far)/(t.near-t.far)).unproject(t),this.ray.direction.set(0,0,-1).transformDirection(t.matrixWorld),this.camera=t):console.error("THREE.Raycaster: 
103Unsupported camera type: "+t.type)}setFromXRController(e){return bE.identity().extractRotation(e.matrixWorld),this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(0,0,-1).applyMatrix4(bE),this}intersectObject(e,t=!0,n=[]){return VS(e,this,n,t),n.sort(ME),n}intersectObjects(e,t=!0,n=[]){for(let a=0,o=e.length;a<o;a++)VS(e[a],this,n,t);return n.sort(ME),n}}function ME(s,e){return s.distance-e.distance}function VS(s,e,t,n){let a=!0;if(s.layers.test(e.layers)&&s.raycast(e,t)===!1&&(a=!1),a===!0&&n===!0){const o=s.children;for(let c=0,h=o.length;c<h;c++)VS(o[c],e,t,!0)}}class wU{constructor(){this._previousTime=0,this._currentTime=0,this._startTime=performance.now(),this._delta=0,this._elapsed=0,this._timescale=1,this._document=null,this._pageVisibilityHandler=null}connect(e){this._document=e,e.hidden!==void 0&&(this._pageVisibilityHandler=RU.bind(this),e.addEventListener("visibilitychange",this._pageVisibilityHandler,!1))}disconnect(){this._pageVisibilityHandler!==null&&(this._document.removeEventListener("visibilitychange",this._pageVisibilityHandler),this._pageVisibilityHandler=null),this._document=null}getDelta(){return this._delta/1e3}getElapsed(){return this._elapsed/1e3}getTimescale(){return this._timescale}setTimescale(e){return this._timescale=e,this}reset(){return this._currentTime=performance.now()-this._startTime,this}dispose(){this.disconnect()}update(e){return this._pageVisibilityHandler!==null&&this._document.hidden===!0?this._delta=0:(this._previousTime=this._currentTime,this._currentTime=(e!==void 0?e:performance.now())-this._startTime,this._delta=(this._currentTime-this._previousTime)*this._timescale,this._elapsed+=this._delta),this}}function RU(){this._document.hidden===!1&&this.reset()}class CU{constructor(e=1,t=0,n=0){this.radius=e,this.phi=t,this.theta=n}set(e,t,n){return this.radius=e,this.phi=t,this.theta=n,this}copy(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this}makeSafe(){return this.phi=$t(this.phi,1e-6,Math.PI-1e-6),this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,n){return this.radius=Math.sqrt(e*e+t*t+n*n),this.radius===0?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,n),this.phi=Math.acos($t(t/this.radius,-1,1))),this}clone(){return new this.constructor().copy(this)}}class NU{constructor(e=1,t=0,n=0){this.radius=e,this.theta=t,this.y=n}set(e,t,n){return this.radius=e,this.theta=t,this.y=n,this}copy(e){return this.radius=e.radius,this.theta=e.theta,this.y=e.y,this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,n){return this.radius=Math.sqrt(e*e+n*n),this.theta=Math.atan2(e,n),this.y=t,this}clone(){return new this.constructor().copy(this)}}class Qb{constructor(e,t,n,a){Qb.prototype.isMatrix2=!0,this.elements=[1,0,0,1],e!==void 0&&this.set(e,t,n,a)}identity(){return this.set(1,0,0,1),this}fromArray(e,t=0){for(let n=0;n<4;n++)this.elements[n]=e[n+t];return this}set(e,t,n,a){const o=this.elements;return o[0]=e,o[2]=t,o[1]=n,o[3]=a,this}}const EE=new Je;class DU{constructor(e=new Je(1/0,1/0),t=new Je(-1/0,-1/0)){this.isBox2=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const n=EE.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.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(e){return this.isEmpty()?e.set(0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}containsPoint(e){return e.x>=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,EE).distanceTo(e)}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const TE=new K,_0=new K,Jh=new K,$h=new K,jx=new K,UU=new K,LU=new K;class OU{constructor(e=new K,t=new K){this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){TE.subVectors(e,this.start),_0.subVectors(this.end,this.start);const n=_0.dot(_0);let o=_0.dot(TE)/n;return t&&(o=$t(o,0,1)),o}closestPointToPoint(e,t,n){const a=this.closestPointToPointParameter(e,t);return this.delta(n).multiplyScalar(a).add(this.start)}
vendor: 7,246 bytes, line 103
103distanceSqToLine3(e,t=UU,n=LU){const a=10000000000000001e-32;let o,c;const h=this.start,d=e.start,p=this.end,v=e.end;Jh.subVectors(p,h),$h.subVectors(v,d),jx.subVectors(h,d);const y=Jh.dot(Jh),_=$h.dot($h),b=$h.dot(jx);if(y<=a&&_<=a)return t.copy(h),n.copy(d),t.sub(n),t.dot(t);if(y<=a)o=0,c=b/_,c=$t(c,0,1);else{const T=Jh.dot(jx);if(_<=a)c=0,o=$t(-T/y,0,1);else{const R=Jh.dot($h),A=y*_-R*R;A!==0?o=$t((R*b-T*_)/A,0,1):o=0,c=(R*o+b)/_,c<0?(c=0,o=$t(-T/y,0,1)):c>1&&(c=1,o=$t((R-T)/y,0,1))}}return t.copy(h).add(Jh.multiplyScalar(o)),n.copy(d).add($h.multiplyScalar(c)),t.sub(n),t.dot(t)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}const AE=new K;class zU extends Bn{constructor(e,t){super(),this.light=e,this.matrixAutoUpdate=!1,this.color=t,this.type="SpotLightHelper";const n=new un,a=[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 c=0,h=1,d=32;c<d;c++,h++){const p=c/d*Math.PI*2,v=h/d*Math.PI*2;a.push(Math.cos(p),Math.sin(p),1,Math.cos(v),Math.sin(v),1)}n.setAttribute("position",new Ot(a,3));const o=new Ja({fog:!1,toneMapped:!1});this.cone=new so(n,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 e=this.light.distance?this.light.distance:1e3,t=e*Math.tan(this.light.angle);this.cone.scale.set(t,t,e),AE.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(AE),this.color!==void 0?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}const Oc=new K,x0=new jt,qx=new jt;class IU extends so{constructor(e){const t=G2(e),n=new un,a=[],o=[];for(let p=0;p<t.length;p++){const v=t[p];v.parent&&v.parent.isBone&&(a.push(0,0,0),a.push(0,0,0),o.push(0,0,0),o.push(0,0,0))}n.setAttribute("position",new Ot(a,3)),n.setAttribute("color",new Ot(o,3));const c=new Ja({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0});super(n,c),this.isSkeletonHelper=!0,this.type="SkeletonHelper",this.root=e,this.bones=t,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1;const h=new _t(255),d=new _t(65280);this.setColors(h,d)}updateMatrixWorld(e){const t=this.bones,n=this.geometry,a=n.getAttribute("position");qx.copy(this.root.matrixWorld).invert();for(let o=0,c=0;o<t.length;o++){const h=t[o];h.parent&&h.parent.isBone&&(x0.multiplyMatrices(qx,h.matrixWorld),Oc.setFromMatrixPosition(x0),a.setXYZ(c,Oc.x,Oc.y,Oc.z),x0.multiplyMatrices(qx,h.parent.matrixWorld),Oc.setFromMatrixPosition(x0),a.setXYZ(c+1,Oc.x,Oc.y,Oc.z),c+=2)}n.getAttribute("position").needsUpdate=!0,super.updateMatrixWorld(e)}setColors(e,t){const a=this.geometry.getAttribute("color");for(let o=0;o<a.count;o+=2)a.setXYZ(o,e.r,e.g,e.b),a.setXYZ(o+1,t.r,t.g,t.b);return a.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}function G2(s){const e=[];s.isBone===!0&&e.push(s);for(let t=0;t<s.children.length;t++)e.push(...G2(s.children[t]));return e}class BU extends Mi{constructor(e,t,n){const a=new dg(t,4,2),o=new Bs({wireframe:!0,fog:!1,toneMapped:!1});super(a,o),this.light=e,this.color=n,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 PU=new K,wE=new _t,RE=new _t;class HU extends Bn{constructor(e,t,n){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,this.type="HemisphereLightHelper";const a=new hg(t);a.rotateY(Math.PI*.5),this.material=new Bs({wireframe:!0,fog:!1,toneMapped:!1}),this.color===void 0&&(this.material.vertexColors=!0);const o=a.getAttribute("position"),c=new Float32Array(o.count*3);a.setAttribute("color",new Qn(c,3)),this.add(new Mi(a,this.material)),this.update()}dispose(){this.children[0].geometry.dispose(),this.children[0].material.dispose()}update(){const e=this.children[0];if(this.color!==void 0)this.material.color.set(this.color);else{const t=e.geometry.getAttribute("color");wE.copy(this.light.color),RE.copy(this.light.groundColor);for(let n=0,a=t.count;n<a;n++){const o=n<a/2?wE:RE;t.setXYZ(n,o.r,o.g,o.b)}t.needsUpdate=!0}this.light.updateWorldMatrix(!0,!1),e.lookAt(PU.setFromMatrixPosition(this.light.matrixWorld).negate())}}class FU extends so{constructor(e=10,t=10,n=4473924,a=8947848){n=new _t(n),a=new _t(a);const o=t/2,c=e/t,h=e/2,d=[],p=[];for(let _=0,b=0,T=-h;_<=t;_++,T+=c){d.push(-h,0,T,h,0,T),d.push(T,0,-h,T,0,h);const R=_===o?n:a;R.toArray(p,b),b+=3,R.toArray(p,b),b+=3,R.toArray(p,b),b+=3,R.toArray(p,b),b+=3}const v=new un;v.setAttribute("position",new Ot(d,3)),v.setAttribute("color",new Ot(p,3));const y=new Ja({vertexColors:!0,toneMapped:!1});super(v,y),this.type="GridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}}class VU extends so{constructor(e=10,t=16,n=8,a=64,o=4473924,c=8947848){o=new _t(o),c=new _t(c);const h=[],d=[];if(t>1)for(let y=0;y<t;y++){const _=y/t*(Math.PI*2),b=Math.sin(_)*e,T=Math.cos(_)*e;h.push(0,0,0),h.push(b,0,T);const R=y&1?o:c;d.push(R.r,R.g,R.b),d.push(R.r,R.g,R.b)}for(let y=0;y<n;y++){const _=y&1?o:c,b=e-e/n*y;for(let T=0;T<a;T++){let R=T/a*(Math.PI*2),A=Math.sin(R)*b,M=Math.cos(R)*b;h.push(A,0,M),d.push(_.r,_.g,_.b),R=(T+1)/a*(Math.PI*2),A=Math.sin(R)*b,M=Math.cos(R)*b,h.push(A,0,M),d.push(_.r,_.g,_.b)}}const p=new un;p.setAttribute("position",new Ot(h,3)),p.setAttribute("color",new Ot(d,3));const v=new Ja({vertexColors:!0,toneMapped:!1});super(p,v),this.type="PolarGridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}}const CE=new K,S0=new K,NE=new K;class GU extends Bn{constructor(e,t,n){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,this.type="DirectionalLightHelper",t===void 0&&(t=1);let a=new un;a.setAttribute("position",new Ot([-t,t,0,t,t,0,t,-t,0,-t,-t,0,-t,t,0],3));const o=new Ja({fog:!1,toneMapped:!1});this.lightPlane=new Vl(a,o),this.add(this.lightPlane),a=new un,a.setAttribute("position",new Ot([0,0,0,0,0,1],3)),this.targetLine=new Vl(a,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),CE.setFromMatrixPosition(this.light.matrixWorld),S0.setFromMatrixPosition(this.light.target.matrixWorld),NE.subVectors(S0,CE),this.lightPlane.lookAt(S0),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(S0),this.targetLine.scale.z
vendor: 4,221 bytes, line 103
103=NE.length()}}const b0=new K,zi=new Zy;class kU extends so{constructor(e){const t=new un,n=new Ja({color:16777215,vertexColors:!0,toneMapped:!1}),a=[],o=[],c={};h("n1","n2"),h("n2","n4"),h("n4","n3"),h("n3","n1"),h("f1","f2"),h("f2","f4"),h("f4","f3"),h("f3","f1"),h("n1","f1"),h("n2","f2"),h("n3","f3"),h("n4","f4"),h("p","n1"),h("p","n2"),h("p","n3"),h("p","n4"),h("u1","u2"),h("u2","u3"),h("u3","u1"),h("c","t"),h("p","c"),h("cn1","cn2"),h("cn3","cn4"),h("cf1","cf2"),h("cf3","cf4");function h(T,R){d(T),d(R)}function d(T){a.push(0,0,0),o.push(0,0,0),c[T]===void 0&&(c[T]=[]),c[T].push(a.length/3-1)}t.setAttribute("position",new Ot(a,3)),t.setAttribute("color",new Ot(o,3)),super(t,n),this.type="CameraHelper",this.camera=e,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=c,this.update();const p=new _t(16755200),v=new _t(16711680),y=new _t(43775),_=new _t(16777215),b=new _t(3355443);this.setColors(p,v,y,_,b)}setColors(e,t,n,a,o){const h=this.geometry.getAttribute("color");return h.setXYZ(0,e.r,e.g,e.b),h.setXYZ(1,e.r,e.g,e.b),h.setXYZ(2,e.r,e.g,e.b),h.setXYZ(3,e.r,e.g,e.b),h.setXYZ(4,e.r,e.g,e.b),h.setXYZ(5,e.r,e.g,e.b),h.setXYZ(6,e.r,e.g,e.b),h.setXYZ(7,e.r,e.g,e.b),h.setXYZ(8,e.r,e.g,e.b),h.setXYZ(9,e.r,e.g,e.b),h.setXYZ(10,e.r,e.g,e.b),h.setXYZ(11,e.r,e.g,e.b),h.setXYZ(12,e.r,e.g,e.b),h.setXYZ(13,e.r,e.g,e.b),h.setXYZ(14,e.r,e.g,e.b),h.setXYZ(15,e.r,e.g,e.b),h.setXYZ(16,e.r,e.g,e.b),h.setXYZ(17,e.r,e.g,e.b),h.setXYZ(18,e.r,e.g,e.b),h.setXYZ(19,e.r,e.g,e.b),h.setXYZ(20,e.r,e.g,e.b),h.setXYZ(21,e.r,e.g,e.b),h.setXYZ(22,e.r,e.g,e.b),h.setXYZ(23,e.r,e.g,e.b),h.setXYZ(24,t.r,t.g,t.b),h.setXYZ(25,t.r,t.g,t.b),h.setXYZ(26,t.r,t.g,t.b),h.setXYZ(27,t.r,t.g,t.b),h.setXYZ(28,t.r,t.g,t.b),h.setXYZ(29,t.r,t.g,t.b),h.setXYZ(30,t.r,t.g,t.b),h.setXYZ(31,t.r,t.g,t.b),h.setXYZ(32,n.r,n.g,n.b),h.setXYZ(33,n.r,n.g,n.b),h.setXYZ(34,n.r,n.g,n.b),h.setXYZ(35,n.r,n.g,n.b),h.setXYZ(36,n.r,n.g,n.b),h.setXYZ(37,n.r,n.g,n.b),h.setXYZ(38,a.r,a.g,a.b),h.setXYZ(39,a.r,a.g,a.b),h.setXYZ(40,o.r,o.g,o.b),h.setXYZ(41,o.r,o.g,o.b),h.setXYZ(42,o.r,o.g,o.b),h.setXYZ(43,o.r,o.g,o.b),h.setXYZ(44,o.r,o.g,o.b),h.setXYZ(45,o.r,o.g,o.b),h.setXYZ(46,o.r,o.g,o.b),h.setXYZ(47,o.r,o.g,o.b),h.setXYZ(48,o.r,o.g,o.b),h.setXYZ(49,o.r,o.g,o.b),h.needsUpdate=!0,this}update(){const e=this.geometry,t=this.pointMap,n=1,a=1;let o,c;if(zi.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse),this.camera.reversedDepth===!0)o=1,c=0;else if(this.camera.coordinateSystem===Qs)o=-1,c=1;else if(this.camera.coordinateSystem===_d)o=0,c=1;else throw new Error("THREE.CameraHelper.update(): Invalid coordinate system: "+this.camera.coordinateSystem);Vi("c",t,e,zi,0,0,o),Vi("t",t,e,zi,0,0,c),Vi("n1",t,e,zi,-n,-a,o),Vi("n2",t,e,zi,n,-a,o),Vi("n3",t,e,zi,-n,a,o),Vi("n4",t,e,zi,n,a,o),Vi("f1",t,e,zi,-n,-a,c),Vi("f2",t,e,zi,n,-a,c),Vi("f3",t,e,zi,-n,a,c),Vi("f4",t,e,zi,n,a,c),Vi("u1",t,e,zi,n*.7,a*1.1,o),Vi("u2",t,e,zi,-n*.7,a*1.1,o),Vi("u3",t,e,zi,0,a*2,o),Vi("cf1",t,e,zi,-n,0,c),Vi("cf2",t,e,zi,n,0,c),Vi("cf3",t,e,zi,0,-a,c),Vi("cf4",t,e,zi,0,a,c),Vi("cn1",t,e,zi,-n,0,o),Vi("cn2",t,e,zi,n,0,o),Vi("cn3",t,e,zi,0,-a,o),Vi("cn4",t,e,zi,0,a,o),e.getAttribute("position").needsUpdate=!0}dispose(){this.geometry.dispose(),this.material.dispose()}}function Vi(s,e,t,n,a,o,c){b0.set(a,o,c).unproject(n);const h=e[s];if(h!==void 0){const d=t.getAttribute("position");for(let p=0,v=h.length;p<v;p++)d.setXYZ(h[p],b0.x,b0.y,b0.z)}}const M0=new La;class XU extends so{constructor(e,t=16776960){const n=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]),a=new Float32Array(24),o=new un;o.setIndex(new Qn(n,1)),o.setAttribute("position",new Qn(a,3)),super(o,new Ja({color:t,toneMapped:!1})),this.object=e,this.type="BoxHelper",this.matrixAutoUpdate=!1,this.update()}update(){if(this.object!==void 0&&M0.setFromObject(this.object),M0.isEmpty())return;const e=M0.min,t=M0.max,n=this.geometry.attributes.position,a=n.array;a[0]=t.x,a[1]=t.y,a[2]=t.z,a[3]=e.x,a[4]=t.y,a[5]=t.z,a[6]=e.x,a[7]=e.y,a[8]=t.z,a[9]=t.x,a[10]=e.y,a[11]=t.z,a[12]=t.x,a[13]=t.y,a[14]=e.z,a[15]=e.x,a[16]=t.y,a[17]=e.z,a[18]=e.x,a[19]=e.y,a[20]=e.z,a[21]=t.x,a[22]=e.
vendor: 4,360 bytes, line 103
103y,a[23]=e.z,n.needsUpdate=!0,this.geometry.computeBoundingSphere()}setFromObject(e){return this.object=e,this.update(),this}copy(e,t){return super.copy(e,t),this.object=e.object,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class jU extends so{constructor(e,t=16776960){const n=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]),a=[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 un;o.setIndex(new Qn(n,1)),o.setAttribute("position",new Ot(a,3)),super(o,new Ja({color:t,toneMapped:!1})),this.box=e,this.type="Box3Helper",this.geometry.computeBoundingSphere()}updateMatrixWorld(e){const t=this.box;t.isEmpty()||(t.getCenter(this.position),t.getSize(this.scale),this.scale.multiplyScalar(.5),super.updateMatrixWorld(e))}dispose(){this.geometry.dispose(),this.material.dispose()}}class qU extends Vl{constructor(e,t=1,n=16776960){const a=n,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],c=new un;c.setAttribute("position",new Ot(o,3)),c.computeBoundingSphere(),super(c,new Ja({color:a,toneMapped:!1})),this.type="PlaneHelper",this.plane=e,this.size=t;const h=[1,1,0,-1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,-1,0],d=new un;d.setAttribute("position",new Ot(h,3)),d.computeBoundingSphere(),this.add(new Mi(d,new Bs({color:a,opacity:.2,transparent:!0,depthWrite:!1,toneMapped:!1})))}updateMatrixWorld(e){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(e)}dispose(){this.geometry.dispose(),this.material.dispose(),this.children[0].geometry.dispose(),this.children[0].material.dispose()}}const DE=new K;let E0,Yx;class YU extends Bn{constructor(e=new K(0,0,1),t=new K(0,0,0),n=1,a=16776960,o=n*.2,c=o*.2){super(),this.type="ArrowHelper",E0===void 0&&(E0=new un,E0.setAttribute("position",new Ot([0,0,0,0,1,0],3)),Yx=new ug(.5,1,5,1),Yx.translate(0,-.5,0)),this.position.copy(t),this.line=new Vl(E0,new Ja({color:a,toneMapped:!1})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new Mi(Yx,new Bs({color:a,toneMapped:!1})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(e),this.setLength(n,o,c)}setDirection(e){if(e.y>.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{DE.set(e.z,0,-e.x).normalize();const t=Math.acos(e.y);this.quaternion.setFromAxisAngle(DE,t)}}setLength(e,t=e*.2,n=t*.2){this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(n,t,n),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class WU extends so{constructor(e=1){const t=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],n=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],a=new un;a.setAttribute("position",new Ot(t,3)),a.setAttribute("color",new Ot(n,3));const o=new Ja({vertexColors:!0,toneMapped:!1});super(a,o),this.type="AxesHelper"}setColors(e,t,n){const a=new _t,o=this.geometry.attributes.color.array;return a.set(e),a.toArray(o,0),a.toArray(o,3),a.set(t),a.toArray(o,6),a.toArray(o,9),a.set(n),a.toArray(o,12),a.toArray(o,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class ZU{constructor(){this.type="ShapePath",this.color=new _t,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new Cy,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,n,a){return this.currentPath.quadraticCurveTo(e,t,n,a),this}bezierCurveTo(e,t,n,a,o,c){return this.currentPath.bezierCurveTo(e,t,n,a,o,c),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function t(M){const C=[];for(let D=0,U=M.length;D<U;D++){const H=M[D],F=new mf;F.curves=H.curves,C.push(F)}return C}function n(M,C){const D=C.length;let U=!1;for(let H=D-1,F=0;F<D;H=F++){let G=C[H],V=C[F],O=V.x-G.x,z=V.y-G.y;if(Math.abs(z)>Number.EPSILON){if(z<0&&(G=C[F],O=-O,V=C[H],z=-z),M.y<G.y||M.y>V.y)continue;if(M.y===G.y){if(M.x===G.x)return!0}else{const Y=z*(M.x-G.x)-O*(M.y-G.y);if(Y===0)return!0;
vendor: 4,725 bytes, lines 103-107
103if(Y<0)continue;U=!U}}else{if(M.y!==G.y)continue;if(V.x<=M.x&&M.x<=G.x||G.x<=M.x&&M.x<=V.x)return!0}}return U}const a=to.isClockWise,o=this.subPaths;if(o.length===0)return[];let c,h,d;const p=[];if(o.length===1)return h=o[0],d=new mf,d.curves=h.curves,p.push(d),p;let v=!a(o[0].getPoints());v=e?!v:v;const y=[],_=[];let b=[],T=0,R;_[T]=void 0,b[T]=[];for(let M=0,C=o.length;M<C;M++)h=o[M],R=h.getPoints(),c=a(R),c=e?!c:c,c?(!v&&_[T]&&T++,_[T]={s:new mf,p:R},_[T].s.curves=h.curves,v&&T++,b[T]=[]):b[T].push({h,p:R[0]});if(!_[0])return t(o);if(_.length>1){let M=!1,C=0;for(let D=0,U=_.length;D<U;D++)y[D]=[];for(let D=0,U=_.length;D<U;D++){const H=b[D];for(let F=0;F<H.length;F++){const G=H[F];let V=!0;for(let O=0;O<_.length;O++)n(G.p,_[O].p)&&(D!==O&&C++,V?(V=!1,y[O].push(G)):M=!0);V&&y[D].push(G)}}C>0&&M===!1&&(b=y)}let A;for(let M=0,C=_.length;M<C;M++){d=_[M].s,p.push(d),A=b[M];for(let D=0,U=A.length;D<U;D++)d.holes.push(A[D].h)}return p}}class KU extends Qo{constructor(e,t=null){super(),this.object=e,this.domElement=t,this.enabled=!0,this.state=-1,this.keys={},this.mouseButtons={LEFT:null,MIDDLE:null,RIGHT:null},this.touches={ONE:null,TWO:null}}connect(e){if(e===void 0){console.warn("THREE.Controls: connect() now requires an element.");return}this.domElement!==null&&this.disconnect(),this.domElement=e}disconnect(){}dispose(){}update(){}}function QU(s,e){const t=s.image&&s.image.width?s.image.width/s.image.height:1;return t>e?(s.repeat.x=1,s.repeat.y=t/e,s.offset.x=0,s.offset.y=(1-s.repeat.y)/2):(s.repeat.x=e/t,s.repeat.y=1,s.offset.x=(1-s.repeat.x)/2,s.offset.y=0),s}function JU(s,e){const t=s.image&&s.image.width?s.image.width/s.image.height:1;return t>e?(s.repeat.x=e/t,s.repeat.y=1,s.offset.x=(1-s.repeat.x)/2,s.offset.y=0):(s.repeat.x=1,s.repeat.y=t/e,s.offset.x=0,s.offset.y=(1-s.repeat.y)/2),s}function $U(s){return s.repeat.x=1,s.repeat.y=1,s.offset.x=0,s.offset.y=0,s}function GS(s,e,t,n){const a=eL(n);switch(t){case fb:return s*e;case ig:return s*e/a.components*a.byteLength;case ag:return s*e/a.components*a.byteLength;case db:return s*e*2/a.components*a.byteLength;case Xy:return s*e*2/a.components*a.byteLength;case hb:return s*e*3/a.components*a.byteLength;case ki:return s*e*4/a.components*a.byteLength;case jy:return s*e*4/a.components*a.byteLength;case wm:case Rm:return Math.floor((s+3)/4)*Math.floor((e+3)/4)*8;case Cm:case Nm:return Math.floor((s+3)/4)*Math.floor((e+3)/4)*16;case J0:case ey:return Math.max(s,16)*Math.max(e,8)/4;case Q0:case $0:return Math.max(s,8)*Math.max(e,8)/2;case ty:case ny:return Math.floor((s+3)/4)*Math.floor((e+3)/4)*8;case iy:return Math.floor((s+3)/4)*Math.floor((e+3)/4)*16;case ay:return Math.floor((s+3)/4)*Math.floor((e+3)/4)*16;case sy:return Math.floor((s+4)/5)*Math.floor((e+3)/4)*16;case ry:return Math.floor((s+4)/5)*Math.floor((e+4)/5)*16;case oy:return Math.floor((s+5)/6)*Math.floor((e+4)/5)*16;case ly:return Math.floor((s+5)/6)*Math.floor((e+5)/6)*16;case cy:return Math.floor((s+7)/8)*Math.floor((e+4)/5)*16;case uy:return Math.floor((s+7)/8)*Math.floor((e+5)/6)*16;case fy:return Math.floor((s+7)/8)*Math.floor((e+7)/8)*16;case hy:return Math.floor((s+9)/10)*Math.floor((e+4)/5)*16;case dy:return Math.floor((s+9)/10)*Math.floor((e+5)/6)*16;case py:return Math.floor((s+9)/10)*Math.floor((e+7)/8)*16;case my:return Math.floor((s+9)/10)*Math.floor((e+9)/10)*16;case gy:return Math.floor((s+11)/12)*Math.floor((e+9)/10)*16;case vy:return Math.floor((s+11)/12)*Math.floor((e+11)/12)*16;case yy:case _y:case xy:return Math.ceil(s/4)*Math.ceil(e/4)*16;case Sy:case by:return Math.ceil(s/4)*Math.ceil(e/4)*8;case My:case Ey:return Math.ceil(s/4)*Math.ceil(e/4)*16}throw new Error(`Unable to determine texture byte length for ${t} format.`)}function eL(s){switch(s){case Es:case Fy:return{byteLength:1,components:1};case dd:case Vy:case ra:return{byteLength:2,components:1};case Gy:case ky:return{byteLength:2,components:4};case Zo:case ng:case bi:return{byteLength:4,components:1};case cb:case ub:return{byteLength:4,components:3}}throw new Error(`Unknown texture type ${s}.`)}class tL{static contain(e,t){return QU(e,t)}static cover(e,t){return JU(e,t)}static fill(e){return $U(e)}static getByteLength(e,t,n,a){return GS(e,t,n,a)}}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:eg}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=eg);/**
104 * @license
105 * Copyright 2010-2025 Three.js Authors
106 * SPDX-License-Identifier: MIT
107 */function k2(){let s=null,e=!1,t=null,n=null;function a(o,c){t(o,c),n=s.requestAnimationFrame(a)}return{start:function(){e!==!0&&t!==null&&(n=s.requestAnimationFrame(a),e=!0)}
vendor: 4,316 bytes, lines 107-166
107,stop:function(){s.cancelAnimationFrame(n),e=!1},setAnimationLoop:function(o){t=o},setContext:function(o){s=o}}}function nL(s){const e=new WeakMap;function t(h,d){const p=h.array,v=h.usage,y=p.byteLength,_=s.createBuffer();s.bindBuffer(d,_),s.bufferData(d,p,v),h.onUploadCallback();let b;if(p instanceof Float32Array)b=s.FLOAT;else if(typeof Float16Array<"u"&&p instanceof Float16Array)b=s.HALF_FLOAT;else if(p instanceof Uint16Array)h.isFloat16BufferAttribute?b=s.HALF_FLOAT:b=s.UNSIGNED_SHORT;else if(p instanceof Int16Array)b=s.SHORT;else if(p instanceof Uint32Array)b=s.UNSIGNED_INT;else if(p instanceof Int32Array)b=s.INT;else if(p instanceof Int8Array)b=s.BYTE;else if(p instanceof Uint8Array)b=s.UNSIGNED_BYTE;else if(p instanceof Uint8ClampedArray)b=s.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+p);return{buffer:_,type:b,bytesPerElement:p.BYTES_PER_ELEMENT,version:h.version,size:y}}function n(h,d,p){const v=d.array,y=d.updateRanges;if(s.bindBuffer(p,h),y.length===0)s.bufferSubData(p,0,v);else{y.sort((b,T)=>b.start-T.start);let _=0;for(let b=1;b<y.length;b++){const T=y[_],R=y[b];R.start<=T.start+T.count+1?T.count=Math.max(T.count,R.start+R.count-T.start):(++_,y[_]=R)}y.length=_+1;for(let b=0,T=y.length;b<T;b++){const R=y[b];s.bufferSubData(p,R.start*v.BYTES_PER_ELEMENT,v,R.start,R.count)}d.clearUpdateRanges()}d.onUploadCallback()}function a(h){return h.isInterleavedBufferAttribute&&(h=h.data),e.get(h)}function o(h){h.isInterleavedBufferAttribute&&(h=h.data);const d=e.get(h);d&&(s.deleteBuffer(d.buffer),e.delete(h))}function c(h,d){if(h.isInterleavedBufferAttribute&&(h=h.data),h.isGLBufferAttribute){const v=e.get(h);(!v||v.version<h.version)&&e.set(h,{buffer:h.buffer,type:h.type,bytesPerElement:h.elementSize,version:h.version});return}const p=e.get(h);if(p===void 0)e.set(h,t(h,d));else if(p.version<h.version){if(p.size!==h.array.byteLength)throw new Error("THREE.WebGLAttributes: The size of the buffer attribute's array buffer does not match the original size. Resizing buffer attributes is not supported.");n(p.buffer,h,d),p.version=h.version}}return{get:a,remove:o,update:c}}var iL=`#ifdef USE_ALPHAHASH
108	if ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard;
109#endif`,aL=`#ifdef USE_ALPHAHASH
110	const float ALPHA_HASH_SCALE = 0.05;
111	float hash2D( vec2 value ) {
112		return fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) );
113	}
114	float hash3D( vec3 value ) {
115		return hash2D( vec2( hash2D( value.xy ), value.z ) );
116	}
117	float getAlphaHashThreshold( vec3 position ) {
118		float maxDeriv = max(
119			length( dFdx( position.xyz ) ),
120			length( dFdy( position.xyz ) )
121		);
122		float pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv );
123		vec2 pixScales = vec2(
124			exp2( floor( log2( pixScale ) ) ),
125			exp2( ceil( log2( pixScale ) ) )
126		);
127		vec2 alpha = vec2(
128			hash3D( floor( pixScales.x * position.xyz ) ),
129			hash3D( floor( pixScales.y * position.xyz ) )
130		);
131		float lerpFactor = fract( log2( pixScale ) );
132		float x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y;
133		float a = min( lerpFactor, 1.0 - lerpFactor );
134		vec3 cases = vec3(
135			x * x / ( 2.0 * a * ( 1.0 - a ) ),
136			( x - 0.5 * a ) / ( 1.0 - a ),
137			1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) )
138		);
139		float threshold = ( x < ( 1.0 - a ) )
140			? ( ( x < a ) ? cases.x : cases.y )
141			: cases.z;
142		return clamp( threshold , 1.0e-6, 1.0 );
143	}
144#endif`,sL=`#ifdef USE_ALPHAMAP
145	diffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g;
146#endif`,rL=`#ifdef USE_ALPHAMAP
147	uniform sampler2D alphaMap;
148#endif`,oL=`#ifdef USE_ALPHATEST
149	#ifdef ALPHA_TO_COVERAGE
150	diffuseColor.a = smoothstep( alphaTest, alphaTest + fwidth( diffuseColor.a ), diffuseColor.a );
151	if ( diffuseColor.a == 0.0 ) discard;
152	#else
153	if ( diffuseColor.a < alphaTest ) discard;
154	#endif
155#endif`,lL=`#ifdef USE_ALPHATEST
156	uniform float alphaTest;
157#endif`,cL=`#ifdef USE_AOMAP
158	float ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0;
159	reflectedLight.indirectDiffuse *= ambientOcclusion;
160	#if defined( USE_CLEARCOAT ) 
161		clearcoatSpecularIndirect *= ambientOcclusion;
162	#endif
163	#if defined( USE_SHEEN ) 
164		sheenSpecularIndirect *= ambientOcclusion;
165	#endif
166	#if defined( USE_ENVMAP ) && defined( STANDARD )
167		float dotNV = saturate( dot( geometryNormal, geometryViewDir ) );
168		reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );
169	#endif
170#endif`,uL=`#ifdef USE_AOMAP
171	uniform sampler2D aoMap;
172	uniform float aoMapIntensity;
173#endif`,fL=`#ifdef USE_BATCHING
174	#if ! defined( GL_ANGLE_multi_draw )
175	#define gl_DrawID _gl_DrawID
176	uniform int _gl_DrawID;
177	#endif
178	uniform highp sampler2D batchingTexture;
179	uniform highp usampler2D batchingIdTexture;
180	mat4 getBatchingMatrix( const in float i ) {
181		int size = textureSize( batchingTexture, 0 ).x;
182		int j = int( i ) * 4;
183		int x = j % size;
184		int y = j / size;
185		vec4 v1 = texelFetch( batchingTexture, ivec2( x, y ), 0 );
186		vec4 v2 = texelFetch( batchingTexture, ivec2( x + 1, y ), 0 );
187		vec4 v3 = texelFetch( batchingTexture, ivec2( x + 2, y ), 0 );
188		vec4 v4 = texelFetch( batchingTexture, ivec2( x + 3, y ), 0 );
189		return mat4( v1, v2, v3, v4 );
190	}
191	float getIndirectIndex( const in int i ) {
192		int size = textureSize( batchingIdTexture, 0 ).x;
193		int x = i % size;
194		int y = i / size;
195		return float( texelFetch( batchingIdTexture, ivec2( x, y ), 0 ).r );
196	}
197#endif
198#ifdef USE_BATCHING_COLOR
199	uniform sampler2D batchingColorTexture;
200	vec3 getBatchingColor( const in float i ) {
201		int size = textureSize( batchingColorTexture, 0 ).x;
202		int j = int( i );
203		int x = j % size;
204		int y = j / size;
205		return texelFetch( batchingColorTexture, ivec2( x, y ), 0 ).rgb;
206	}
207#endif`,hL=`#ifdef USE_BATCHING
208	mat4 batchingMatrix = getBatchingMatrix( getIndirectIndex( gl_DrawID ) );
209#endif`,dL=`vec3 transformed = vec3( position );
210#ifdef USE_ALPHAHASH
211	vPosition = vec3( position );
212#endif`,pL=`vec3 objectNormal = vec3( normal );
213#ifdef USE_TANGENT
214	vec3 objectTangent = vec3( tangent.xyz );
215#endif`,mL=`float G_BlinnPhong_Implicit( ) {
216	return 0.25;
217}
218float D_BlinnPhong( const in float shininess, const in float dotNH ) {
219	return RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );
220}
221vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {
222	vec3 halfDir = normalize( lightDir + viewDir );
223	float dotNH = saturate( dot( normal, halfDir ) );
224	float dotVH = saturate( dot( viewDir, halfDir ) );
225	vec3 F = F_Schlick( specularColor, 1.0, dotVH );
226	float G = G_BlinnPhong_Implicit( );
227	float D = D_BlinnPhong( shininess, dotNH );
228	return F * ( G * D );
229} // validated`,gL=`#ifdef USE_IRIDESCENCE
230	const mat3 XYZ_TO_REC709 = mat3(
231		 3.2404542, -0.9692660,  0.0556434,
232		-1.5371385,  1.8760108, -0.2040259,
233		-0.4985314,  0.0415560,  1.0572252
234	);
235	vec3 Fresnel0ToIor( vec3 fresnel0 ) {
236		vec3 sqrtF0 = sqrt( fresnel0 );
237		return ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );
238	}
239	vec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {
240		return pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );
241	}
242	float IorToFresnel0( float transmittedIor, float incidentIor ) {
243		return pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));
244	}
245	vec3 evalSensitivity( float OPD, vec3 shift ) {
246		float phase = 2.0 * PI * OPD * 1.0e-9;
247		vec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );
248		vec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );
249		vec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );
250		vec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );
251		xyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) );
252		xyz /= 1.0685e-7;
253		vec3 rgb = XYZ_TO_REC709 * xyz;
254		return rgb;
255	}
256	vec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {
257		vec3 I;
258		float iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );
259		float sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );
260		float cosTheta2Sq = 1.0 - sinTheta2Sq;
261		if ( cosTheta2Sq < 0.0 ) {
262			return vec3( 1.0 );
263		}
264		float cosTheta2 = sqrt( cosTheta2Sq );
265		float R0 = IorToFresnel0( iridescenceIOR, outsideIOR );
266		float R12 = F_Schlick( R0, 1.0, cosTheta1 );
267		float T121 = 1.0 - R12;
268		float phi12 = 0.0;
269		if ( iridescenceIOR < outsideIOR ) phi12 = PI;
270		float phi21 = PI - phi12;
271		vec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) );		vec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );
272		vec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );
273		vec3 phi23 = vec3( 0.0 );
274		if ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;
275		if ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;
276		if ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;
277		float OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;
278		vec3 phi = vec3( phi21 ) + phi23;
279		vec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );
280		vec3 r123 = sqrt( R123 );
281		vec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );
282		vec3 C0 = R12 + Rs;
283		I = C0;
284		vec3 Cm = Rs - T121;
285		for ( int m = 1; m <= 2; ++ m ) {
286			Cm *= r123;
287			vec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );
288			I += Cm * Sm;
289		}
290		return max( I, vec3( 0.0 ) );
291	}
292#endif`,vL=`#ifdef USE_BUMPMAP
293	uniform sampler2D bumpMap;
294	uniform float bumpScale;
295	vec2 dHdxy_fwd() {
296		vec2 dSTdx = dFdx( vBumpMapUv );
297		vec2 dSTdy = dFdy( vBumpMapUv );
298		float Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x;
299		float dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll;
300		float dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll;
301		return vec2( dBx, dBy );
302	}
303	vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {
304		vec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) );
305		vec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) );
306		vec3 vN = surf_norm;
307		vec3 R1 = cross( vSigmaY, vN );
308		vec3 R2 = cross( vN, vSigmaX );
309		float fDet = dot( vSigmaX, R1 ) * faceDirection;
310		vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );
311		return normalize( abs( fDet ) * surf_norm - vGrad );
312	}
313#endif`,yL=`#if NUM_CLIPPING_PLANES > 0
314	vec4 plane;
315	#ifdef ALPHA_TO_COVERAGE
316		float distanceToPlane, distanceGradient;
317		float clipOpacity = 1.0;
318		#pragma unroll_loop_start
319		for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {
320			plane = clippingPlanes[ i ];
321			distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;
322			distanceGradient = fwidth( distanceToPlane ) / 2.0;
323			clipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane );
324			if ( clipOpacity == 0.0 ) discard;
325		}
326		#pragma unroll_loop_end
327		#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES
328			float unionClipOpacity = 1.0;
329			#pragma unroll_loop_start
330			for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {
331				plane = clippingPlanes[ i ];
332				distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;
333				distanceGradient = fwidth( distanceToPlane ) / 2.0;
334				unionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane );
335			}
336			#pragma unroll_loop_end
337			clipOpacity *= 1.0 - unionClipOpacity;
338		#endif
339		diffuseColor.a *= clipOpacity;
340		if ( diffuseColor.a == 0.0 ) discard;
341	#else
342		#pragma unroll_loop_start
343		for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {
344			plane = clippingPlanes[ i ];
345			if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;
346		}
347		#pragma unroll_loop_end
348		#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES
349			bool clipped = true;
350			#pragma unroll_loop_start
351			for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {
352				plane = clippingPlanes[ i ];
353				clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;
354			}
355			#pragma unroll_loop_end
356			if ( clipped ) discard;
357		#endif
358	#endif
359#endif`,_L=`#if NUM_CLIPPING_PLANES > 0
360	varying vec3 vClipPosition;
361	uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];
362#endif`,xL=`#if NUM_CLIPPING_PLANES > 0
363	varying vec3 vClipPosition;
364#endif`,SL=`#if NUM_CLIPPING_PLANES > 0
365	vClipPosition = - mvPosition.xyz;
366#endif`,bL=`#if defined( USE_COLOR_ALPHA )
367	diffuseColor *= vColor;
368#elif defined( USE_COLOR )
369	diffuseColor.rgb *= vColor;
370#endif`,ML=`#if defined( USE_COLOR_ALPHA )
371	varying vec4 vColor;
372#elif defined( USE_COLOR )
373	varying vec3 vColor;
374#endif`,EL=`#if defined( USE_COLOR_ALPHA )
375	varying vec4 vColor;
376#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )
377	varying vec3 vColor;
378#endif`,TL=`#if defined( USE_COLOR_ALPHA )
379	vColor = vec4( 1.0 );
380#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )
381	vColor = vec3( 1.0 );
382#endif
383#ifdef USE_COLOR
384	vColor *= color;
385#endif
386#ifdef USE_INSTANCING_COLOR
387	vColor.xyz *= instanceColor.xyz;
388#endif
389#ifdef USE_BATCHING_COLOR
390	vec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) );
391	vColor.xyz *= batchingColor.xyz;
392#endif`,AL=`#define PI 3.141592653589793
393#define PI2 6.283185307179586
394#define PI_HALF 1.5707963267948966
395#define RECIPROCAL_PI 0.3183098861837907
396#define RECIPROCAL_PI2 0.15915494309189535
397#define EPSILON 1e-6
398#ifndef saturate
399#define saturate( a ) clamp( a, 0.0, 1.0 )
400#endif
401#define whiteComplement( a ) ( 1.0 - saturate( a ) )
402float pow2( const in float x ) { return x*x; }
403vec3 pow2( const in vec3 x ) { return x*x; }
404float pow3( const in float x ) { return x*x*x; }
405float pow4( const in float x ) { float x2 = x*x; return x2*x2; }
406float max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }
407float average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }
408highp float rand( const in vec2 uv ) {
409	const highp float a = 12.9898, b = 78.233, c = 43758.5453;
410	highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );
411	return fract( sin( sn ) * c );
412}
413#ifdef HIGH_PRECISION
414	float precisionSafeLength( vec3 v ) { return length( v ); }
415#else
416	float precisionSafeLength( vec3 v ) {
417		float maxComponent = max3( abs( v ) );
418		return length( v / maxComponent ) * maxComponent;
419	}
420#endif
421struct IncidentLight {
422	vec3 color;
423	vec3 direction;
424	bool visible;
425};
426struct ReflectedLight {
427	vec3 directDiffuse;
428	vec3 directSpecular;
429	vec3 indirectDiffuse;
430	vec3 indirectSpecular;
431};
432#ifdef USE_ALPHAHASH
433	varying vec3 vPosition;
434#endif
435vec3 transformDirection( in vec3 dir, in mat4 matrix ) {
436	return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );
437}
438vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {
439	return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );
440}
441mat3 transposeMat3( const in mat3 m ) {
442	mat3 tmp;
443	tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );
444	tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );
445	tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );
446	return tmp;
447}
448bool isPerspectiveMatrix( mat4 m ) {
449	return m[ 2 ][ 3 ] == - 1.0;
450}
451vec2 equirectUv( in vec3 dir ) {
452	float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;
453	float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;
454	return vec2( u, v );
455}
456vec3 BRDF_Lambert( const in vec3 diffuseColor ) {
457	return RECIPROCAL_PI * diffuseColor;
458}
459vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {
460	float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );
461	return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );
462}
463float F_Schlick( const in float f0, const in float f90, const in float dotVH ) {
464	float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );
465	return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );
466} // validated`,wL=`#ifdef ENVMAP_TYPE_CUBE_UV
467	#define cubeUV_minMipLevel 4.0
468	#define cubeUV_minTileSize 16.0
469	float getFace( vec3 direction ) {
470		vec3 absDirection = abs( direction );
471		float face = - 1.0;
472		if ( absDirection.x > absDirection.z ) {
473			if ( absDirection.x > absDirection.y )
474				face = direction.x > 0.0 ? 0.0 : 3.0;
475			else
476				face = direction.y > 0.0 ? 1.0 : 4.0;
477		} else {
478			if ( absDirection.z > absDirection.y )
479				face = direction.z > 0.0 ? 2.0 : 5.0;
480			else
481				face = direction.y > 0.0 ? 1.0 : 4.0;
482		}
483		return face;
484	}
485	vec2 getUV( vec3 direction, float face ) {
486		vec2 uv;
487		if ( face == 0.0 ) {
488			uv = vec2( direction.z, direction.y ) / abs( direction.x );
489		} else if ( face == 1.0 ) {
490			uv = vec2( - direction.x, - direction.z ) / abs( direction.y );
491		} else if ( face == 2.0 ) {
492			uv = vec2( - direction.x, direction.y ) / abs( direction.z );
493		} else if ( face == 3.0 ) {
494			uv = vec2( - direction.z, direction.y ) / abs( direction.x );
495		} else if ( face == 4.0 ) {
496			uv = vec2( - direction.x, direction.z ) / abs( direction.y );
497		} else {
498			uv = vec2( direction.x, direction.y ) / abs( direction.z );
499		}
500		return 0.5 * ( uv + 1.0 );
501	}
502	vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {
503		float face = getFace( direction );
504		float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );
505		mipInt = max( mipInt, cubeUV_minMipLevel );
506		float faceSize = exp2( mipInt );
507		highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;
508		if ( face > 2.0 ) {
509			uv.y += faceSize;
510			face -= 3.0;
511		}
512		uv.x += face * faceSize;
513		uv.x += filterInt * 3.0 * cubeUV_minTileSize;
514		uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );
515		uv.x *= CUBEUV_TEXEL_WIDTH;
516		uv.y *= CUBEUV_TEXEL_HEIGHT;
517		#ifdef texture2DGradEXT
518			return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;
519		#else
520			return texture2D( envMap, uv ).rgb;
521		#endif
522	}
523	#define cubeUV_r0 1.0
524	#define cubeUV_m0 - 2.0
525	#define cubeUV_r1 0.8
526	#define cubeUV_m1 - 1.0
527	#define cubeUV_r4 0.4
528	#define cubeUV_m4 2.0
529	#define cubeUV_r5 0.305
530	#define cubeUV_m5 3.0
531	#define cubeUV_r6 0.21
532	#define cubeUV_m6 4.0
533	float roughnessToMip( float roughness ) {
534		float mip = 0.0;
535		if ( roughness >= cubeUV_r1 ) {
536			mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;
537		} else if ( roughness >= cubeUV_r4 ) {
538			mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;
539		} else if ( roughness >= cubeUV_r5 ) {
540			mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;
541		} else if ( roughness >= cubeUV_r6 ) {
542			mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;
543		} else {
544			mip = - 2.0 * log2( 1.16 * roughness );		}
545		return mip;
546	}
547	vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {
548		float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );
549		float mipF = fract( mip );
550		float mipInt = floor( mip );
551		vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );
552		if ( mipF == 0.0 ) {
553			return vec4( color0, 1.0 );
554		} else {
555			vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );
556			return vec4( mix( color0, color1, mipF ), 1.0 );
557		}
558	}
559#endif`,RL=`vec3 transformedNormal = objectNormal;
560#ifdef USE_TANGENT
561	vec3 transformedTangent = objectTangent;
562#endif
563#ifdef USE_BATCHING
564	mat3 bm = mat3( batchingMatrix );
565	transformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) );
566	transformedNormal = bm * transformedNormal;
567	#ifdef USE_TANGENT
568		transformedTangent = bm * transformedTangent;
569	#endif
570#endif
571#ifdef USE_INSTANCING
572	mat3 im = mat3( instanceMatrix );
573	transformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) );
574	transformedNormal = im * transformedNormal;
575	#ifdef USE_TANGENT
576		transformedTangent = im * transformedTangent;
577	#endif
578#endif
579transformedNormal = normalMatrix * transformedNormal;
580#ifdef FLIP_SIDED
581	transformedNormal = - transformedNormal;
582#endif
583#ifdef USE_TANGENT
584	transformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz;
585	#ifdef FLIP_SIDED
586		transformedTangent = - transformedTangent;
587	#endif
588#endif`,CL=`#ifdef USE_DISPLACEMENTMAP
589	uniform sampler2D displacementMap;
590	uniform float displacementScale;
591	uniform float displacementBias;
592#endif`,NL=`#ifdef USE_DISPLACEMENTMAP
593	transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + dis
593placementBias );
594#endif`,DL=`#ifdef USE_EMISSIVEMAP
595	vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );
596	#ifdef DECODE_VIDEO_TEXTURE_EMISSIVE
597		emissiveColor = sRGBTransferEOTF( emissiveColor );
598	#endif
599	totalEmissiveRadiance *= emissiveColor.rgb;
600#endif`,UL=`#ifdef USE_EMISSIVEMAP
601	uniform sampler2D emissiveMap;
602#endif`,LL="gl_FragColor = linearToOutputTexel( gl_FragColor );",OL=`vec4 LinearTransferOETF( in vec4 value ) {
603	return value;
604}
605vec4 sRGBTransferEOTF( in vec4 value ) {
606	return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );
607}
608vec4 sRGBTransferOETF( in vec4 value ) {
609	return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );
610}`,zL=`#ifdef USE_ENVMAP
611	#ifdef ENV_WORLDPOS
612		vec3 cameraToFrag;
613		if ( isOrthographic ) {
614			cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );
615		} else {
616			cameraToFrag = normalize( vWorldPosition - cameraPosition );
617		}
618		vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );
619		#ifdef ENVMAP_MODE_REFLECTION
620			vec3 reflectVec = reflect( cameraToFrag, worldNormal );
621		#else
622			vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );
623		#endif
624	#else
625		vec3 reflectVec = vReflect;
626	#endif
627	#ifdef ENVMAP_TYPE_CUBE
628		vec4 envColor = textureCube( envMap, envMapRotation * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );
629	#else
630		vec4 envColor = vec4( 0.0 );
631	#endif
632	#ifdef ENVMAP_BLENDING_MULTIPLY
633		outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );
634	#elif defined( ENVMAP_BLENDING_MIX )
635		outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );
636	#elif defined( ENVMAP_BLENDING_ADD )
637		outgoingLight += envColor.xyz * specularStrength * reflectivity;
638	#endif
639#endif`,IL=`#ifdef USE_ENVMAP
640	uniform float envMapIntensity;
641	uniform float flipEnvMap;
642	uniform mat3 envMapRotation;
643	#ifdef ENVMAP_TYPE_CUBE
644		uniform samplerCube envMap;
645	#else
646		uniform sampler2D envMap;
647	#endif
648	
649#endif`,BL=`#ifdef USE_ENVMAP
650	uniform float reflectivity;
651	#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )
652		#define ENV_WORLDPOS
653	#endif
654	#ifdef ENV_WORLDPOS
655		varying vec3 vWorldPosition;
656		uniform float refractionRatio;
657	#else
658		varying vec3 vReflect;
659	#endif
660#endif`,PL=`#ifdef USE_ENVMAP
661	#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )
662		#define ENV_WORLDPOS
663	#endif
664	#ifdef ENV_WORLDPOS
665		
666		varying vec3 vWorldPosition;
667	#else
668		varying vec3 vReflect;
669		uniform float refractionRatio;
670	#endif
671#endif`,HL=`#ifdef USE_ENVMAP
672	#ifdef ENV_WORLDPOS
673		vWorldPosition = worldPosition.xyz;
674	#else
675		vec3 cameraToVertex;
676		if ( isOrthographic ) {
677			cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );
678		} else {
679			cameraToVertex = normalize( worldPosition.xyz - cameraPosition );
680		}
681		vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );
682		#ifdef ENVMAP_MODE_REFLECTION
683			vReflect = reflect( cameraToVertex, worldNormal );
684		#else
685			vReflect = refract( cameraToVertex, worldNormal, refractionRatio );
686		#endif
687	#endif
688#endif`,FL=`#ifdef USE_FOG
689	vFogDepth = - mvPosition.z;
690#endif`,VL=`#ifdef USE_FOG
691	varying float vFogDepth;
692#endif`,GL=`#ifdef USE_FOG
693	#ifdef FOG_EXP2
694		float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );
695	#else
696		float fogFactor = smoothstep( fogNear, fogFar, vFogDepth );
697	#endif
698	gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );
699#endif`,kL=`#ifdef USE_FOG
700	uniform vec3 fogColor;
701	varying float vFogDepth;
702	#ifdef FOG_EXP2
703		uniform float fogDensity;
704	#else
705		uniform float fogNear;
706		uniform float fogFar;
707	#endif
708#endif`,XL=`#ifdef USE_GRADIENTMAP
709	uniform sampler2D gradientMap;
710#endif
711vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {
712	float dotNL = dot( normal, lightDirection );
713	vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );
714	#ifdef USE_GRADIENTMAP
715		return vec3( texture2D( gradientMap, coord ).r );
716	#else
717		vec2 fw = fwidth( coord ) * 0.5;
718		return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );
719	#endif
720}`,jL=`#ifdef USE_LIGHTMAP
721	uniform sampler2D lightMap;
722	uniform float lightMapIntensity;
723#endif`,qL=`LambertMaterial material;
724material.diffuseColor = diffuseColor.rgb;
725material.specularStrength = specularStrength;`,YL=`varying vec3 vViewPosition;
726struct LambertMaterial {
727	vec3 diffuseColor;
728	float specularStrength;
729};
730void RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {
731	float dotNL = saturate( dot( geometryNormal, directLight.direction ) );
732	vec3 irradiance = dotNL * directLight.color;
733	reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
734}
735void RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {
736	reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
737}
738#define RE_Direct				RE_Direct_Lambert
739#define RE_IndirectDiffuse		RE_IndirectDiffuse_Lambert`,WL=`uniform bool receiveShadow;
740uniform vec3 ambientLightColor;
741#if defined( USE_LIGHT_PROBES )
742	uniform vec3 lightProbe[ 9 ];
743#endif
744vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {
745	float x = normal.x, y = normal.y, z = normal.z;
746	vec3 result = shCoefficients[ 0 ] * 0.886227;
747	result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;
748	result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;
749	result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;
750	result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;
751	result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;
752	result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );
753	result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;
754	result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );
755	return result;
756}
757vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {
758	vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );
759	vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );
760	return irradiance;
761}
762vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {
763	vec3 irradiance = ambientLightColor;
764	return irradiance;
765}
766float getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {
767	float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );
768	if ( cutoffDistance > 0.0 ) {
769		distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );
770	}
771	return distanceFalloff;
772}
773float getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {
774	return smoothstep( coneCosine, penumbraCosine, angleCosine );
775}
776#if NUM_DIR_LIGHTS > 0
777	struct DirectionalLight {
778		vec3 direction;
779		vec3 color;
780	};
781	uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];
782	void getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {
783		light.color = directionalLight.color;
784		light.direction = directionalLight.direction;
785		light.visible = true;
786	}
787#endif
788#if NUM_POINT_LIGHTS > 0
789	struct PointLight {
790		vec3 position;
791		vec3 color;
792		float distance;
793		float decay;
794	};
795	uniform PointLight pointLights[ NUM_POINT_LIGHTS ];
796	void getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {
797		vec3 lVector = pointLight.position - geometryPosition;
798		light.direction = normalize( lVector );
799		float lightDistance = length( lVector );
800		light.color = pointLight.color;
801		light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );
802		light.visible = ( light.color != vec3( 0.0 ) );
803	}
804#endif
805#if NUM_SPOT_LIGHTS > 0
806	struct SpotLight {
807		vec3 position;
808		vec3 direction;
809		vec3 color;
810		float distance;
811		float decay;
812		float coneCos;
813		float penumbraCos;
814	};
815	uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];
816	void getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {
817		vec3 lVector = spotLight.position - geometryPosition;
818		light.direction = normalize( lVector );
819		float angleCos = dot( light.direction, spotLight.direction );
820		float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );
821		if ( spotAttenuation > 0.0 ) {
822			float lightDistance = length( lVector );
823			light.color = spotLight.color * spotAttenuation;
824			light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );
825			light.visible = ( light.color != vec3( 0.0 ) );
826		} else {
827			light.color = vec3( 0.0 );
828			light.visible = false;
829		}
830	}
831#endif
832#if NUM_RECT_AREA_LIGHTS > 0
833	struct RectAreaLight {
834		vec3 color;
835		vec3 position;
836		vec3 halfWidth;
837		vec3 halfHeight;
838	};
839	uniform sampler2D ltc_1;	uniform sampler2D ltc_2;
840	uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];
841#endif
842#if NUM_HEMI_LIGHTS > 0
843	struct HemisphereLight {
844		vec3 direction;
845		vec3 skyColor;
846		vec3 groundColor;
847	};
848	uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];
849	vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {
850		float dotNL = dot( normal, hemiLight.direction );
851		float hemiDiffuseWeight = 0.5 * dotNL + 0.5;
852		vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );
853		return irradiance;
854	}
855#endif`,ZL=`#ifdef USE_ENVMAP
856	vec3 getIBLIrradiance( const in vec3 normal ) {
857		#ifdef ENVMAP_TYPE_CUBE_UV
858			vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );
859			vec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 );
860			return PI * envMapColor.rgb * envMapIntensity;
861		#else
862			return vec3( 0.0 );
863		#endif
864	}
865	vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {
866		#ifdef ENVMAP_TYPE_CUBE_UV
867			vec3 reflectVec = reflect( - viewDir, normal );
868			reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );
869			reflectVec = inverseTransformDirection( reflectVec, viewMatrix );
870			vec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness );
871			return envMapColor.rgb * envMapIntensity;
872		#else
873			return vec3( 0.0 );
874		#endif
875	}
876	#ifdef USE_ANISOTROPY
877		vec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {
878			#ifdef ENVMAP_TYPE_CUBE_UV
879				vec3 bentNormal = cross( bitangent, viewDir );
880				bentNormal = normalize( cross( bentNormal, bitangent ) );
881				bentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );
882				return getIBLRadiance( viewDir, bentNormal, roughness );
883			#else
884				return vec3( 0.0 );
885			#endif
886		}
887	#endif
888#endif`,KL=`ToonMaterial material;
889material.diffuseColor = diffuseColor.rgb;`,QL=`varying vec3 vViewPosition;
890struct ToonMaterial {
891	vec3 diffuseColor;
892};
893void RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {
894	vec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;
895	reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
896}
897void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {
898	reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
899}
900#define RE_Direct				RE_Direct_Toon
901#define RE_IndirectDiffuse		RE_IndirectDiffuse_Toon`,JL=`BlinnPhongMaterial material;
902material.diffuseColor = diffuseColor.rgb;
903material.specularColor = specular;
904material.specularShininess = shininess;
905material.specularStrength = specularStrength;`,$L=`varying vec3 vViewPosition;
906struct BlinnPhongMaterial {
907	vec3 diffuseColor;
908	vec3 specularColor;
909	float specularShininess;
910	float specularStrength;
911};
912void RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {
913	float dotNL = saturate( dot( geometryNormal, directLight.direction ) );
914	vec3 irradiance = dotNL * directLight.color;
915	reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
916	reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;
917}
918void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {
919	reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
920}
921#define RE_Direct				RE_Direct_BlinnPhong
922#define RE_IndirectDiffuse		RE_IndirectDiffuse_BlinnPhong`,eO=`PhysicalMaterial material;
923material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );
924vec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );
925float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );
926material.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;
927material.roughness = min( material.roughness, 1.0 );
928#ifdef IOR
929	material.ior = ior;
930	#ifdef USE_SPECULAR
931		float specularIntensityFactor = specularIntensity;
932		vec3 specularColorFactor = specularColor;
933		#ifdef USE_SPECULAR_COLORMAP
934			specularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;
935		#endif
936		#ifdef USE_SPECULAR_INTENSITYMAP
937			specularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;
938		#endif
939		material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );
940	#else
941		float specularIntensityFactor = 1.0;
942		vec3 specularColorFactor = vec3( 1.0 );
943		material.specularF90 = 1.0;
944	#endif
945	material.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );
946#else
947	material.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );
948	material.specularF90 = 1.0;
949#endif
950#ifdef USE_CLEARCOAT
951	material.clearcoat = clearcoat;
952	material.clearcoatRoughness = clearcoatRoughness;
953	material.clearcoatF0 = vec3( 0.04 );
954	material.clearcoatF90 = 1.0;
955	#ifdef USE_CLEARCOATMAP
956		material.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;
957	#endif
958	#ifdef USE_CLEARCOAT_ROUGHNESSMAP
959		material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;
960	#endif
961	material.clearcoat = saturate( material.clearcoat );	material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );
962	material.clearcoatRoughness += geometryRoughness;
963	material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );
964#endif
965#ifdef USE_DISPERSION
966	material.dispersion = dispersion;
967#endif
968#ifdef USE_IRIDESCENCE
969	material.iridescence = iridescence;
970	material.iridescenceIOR = iridescenceIOR;
971	#ifdef USE_IRIDESCENCEMAP
972		material.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;
973	#endif
974	#ifdef USE_IRIDESCENCE_THICKNESSMAP
975		material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;
976	#else
977		material.iridescenceThickness = iridescenceThicknessMaximum;
978	#endif
979#endif
980#ifdef USE_SHEEN
981	material.sheenColor = sheenColor;
982	#ifdef USE_SHEEN_COLORMAP
983		material.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;
984	#endif
985	material.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );
986	#ifdef USE_SHEEN_ROUGHNESSMAP
987		material.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;
988	#endif
989#endif
990#ifdef USE_ANISOTROPY
991	#ifdef USE_ANISOTROPYMAP
992		mat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );
993		vec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;
994		vec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;
995	#else
996		vec2 anisotropyV = anisotropyVector;
997	#endif
998	material.anisotropy = length( anisotropyV );
999	if( material.anisotropy == 0.0 ) {
1000		anisotropyV = vec2( 1.0, 0.0 );
1001	} else {
1002		anisotropyV /= material.anisotropy;
1003		material.anisotropy = saturate( material.anisotropy );
1004	}
1005	material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );
1006	material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y;
1007	material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y;
1008#endif`,tO
vendor: 14,687 bytes, lines 1008-1309
1008=`struct PhysicalMaterial {
1009	vec3 diffuseColor;
1010	float roughness;
1011	vec3 specularColor;
1012	float specularF90;
1013	float dispersion;
1014	#ifdef USE_CLEARCOAT
1015		float clearcoat;
1016		float clearcoatRoughness;
1017		vec3 clearcoatF0;
1018		float clearcoatF90;
1019	#endif
1020	#ifdef USE_IRIDESCENCE
1021		float iridescence;
1022		float iridescenceIOR;
1023		float iridescenceThickness;
1024		vec3 iridescenceFresnel;
1025		vec3 iridescenceF0;
1026	#endif
1027	#ifdef USE_SHEEN
1028		vec3 sheenColor;
1029		float sheenRoughness;
1030	#endif
1031	#ifdef IOR
1032		float ior;
1033	#endif
1034	#ifdef USE_TRANSMISSION
1035		float transmission;
1036		float transmissionAlpha;
1037		float thickness;
1038		float attenuationDistance;
1039		vec3 attenuationColor;
1040	#endif
1041	#ifdef USE_ANISOTROPY
1042		float anisotropy;
1043		float alphaT;
1044		vec3 anisotropyT;
1045		vec3 anisotropyB;
1046	#endif
1047};
1048vec3 clearcoatSpecularDirect = vec3( 0.0 );
1049vec3 clearcoatSpecularIndirect = vec3( 0.0 );
1050vec3 sheenSpecularDirect = vec3( 0.0 );
1051vec3 sheenSpecularIndirect = vec3(0.0 );
1052vec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {
1053    float x = clamp( 1.0 - dotVH, 0.0, 1.0 );
1054    float x2 = x * x;
1055    float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );
1056    return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );
1057}
1058float V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {
1059	float a2 = pow2( alpha );
1060	float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );
1061	float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );
1062	return 0.5 / max( gv + gl, EPSILON );
1063}
1064float D_GGX( const in float alpha, const in float dotNH ) {
1065	float a2 = pow2( alpha );
1066	float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;
1067	return RECIPROCAL_PI * a2 / pow2( denom );
1068}
1069#ifdef USE_ANISOTROPY
1070	float V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) {
1071		float gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );
1072		float gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );
1073		float v = 0.5 / ( gv + gl );
1074		return saturate(v);
1075	}
1076	float D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {
1077		float a2 = alphaT * alphaB;
1078		highp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );
1079		highp float v2 = dot( v, v );
1080		float w2 = a2 / v2;
1081		return RECIPROCAL_PI * a2 * pow2 ( w2 );
1082	}
1083#endif
1084#ifdef USE_CLEARCOAT
1085	vec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {
1086		vec3 f0 = material.clearcoatF0;
1087		float f90 = material.clearcoatF90;
1088		float roughness = material.clearcoatRoughness;
1089		float alpha = pow2( roughness );
1090		vec3 halfDir = normalize( lightDir + viewDir );
1091		float dotNL = saturate( dot( normal, lightDir ) );
1092		float dotNV = saturate( dot( normal, viewDir ) );
1093		float dotNH = saturate( dot( normal, halfDir ) );
1094		float dotVH = saturate( dot( viewDir, halfDir ) );
1095		vec3 F = F_Schlick( f0, f90, dotVH );
1096		float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );
1097		float D = D_GGX( alpha, dotNH );
1098		return F * ( V * D );
1099	}
1100#endif
1101vec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {
1102	vec3 f0 = material.specularColor;
1103	float f90 = material.specularF90;
1104	float roughness = material.roughness;
1105	float alpha = pow2( roughness );
1106	vec3 halfDir = normalize( lightDir + viewDir );
1107	float dotNL = saturate( dot( normal, lightDir ) );
1108	float dotNV = saturate( dot( normal, viewDir ) );
1109	float dotNH = saturate( dot( normal, halfDir ) );
1110	float dotVH = saturate( dot( viewDir, halfDir ) );
1111	vec3 F = F_Schlick( f0, f90, dotVH );
1112	#ifdef USE_IRIDESCENCE
1113		F = mix( F, material.iridescenceFresnel, material.iridescence );
1114	#endif
1115	#ifdef USE_ANISOTROPY
1116		float dotTL = dot( material.anisotropyT, lightDir );
1117		float dotTV = dot( material.anisotropyT, viewDir );
1118		float dotTH = dot( material.anisotropyT, halfDir );
1119		float dotBL = dot( material.anisotropyB, lightDir );
1120		float dotBV = dot( material.anisotropyB, viewDir );
1121		float dotBH = dot( material.anisotropyB, halfDir );
1122		float V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );
1123		float D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );
1124	#else
1125		float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );
1126		float D = D_GGX( alpha, dotNH );
1127	#endif
1128	return F * ( V * D );
1129}
1130vec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {
1131	const float LUT_SIZE = 64.0;
1132	const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;
1133	const float LUT_BIAS = 0.5 / LUT_SIZE;
1134	float dotNV = saturate( dot( N, V ) );
1135	vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );
1136	uv = uv * LUT_SCALE + LUT_BIAS;
1137	return uv;
1138}
1139float LTC_ClippedSphereFormFactor( const in vec3 f ) {
1140	float l = length( f );
1141	return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );
1142}
1143vec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {
1144	float x = dot( v1, v2 );
1145	float y = abs( x );
1146	float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;
1147	float b = 3.4175940 + ( 4.1616724 + y ) * y;
1148	float v = a / b;
1149	float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;
1150	return cross( v1, v2 ) * theta_sintheta;
1151}
1152vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {
1153	vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];
1154	vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];
1155	vec3 lightNormal = cross( v1, v2 );
1156	if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );
1157	vec3 T1, T2;
1158	T1 = normalize( V - N * dot( V, N ) );
1159	T2 = - cross( N, T1 );
1160	mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );
1161	vec3 coords[ 4 ];
1162	coords[ 0 ] = mat * ( rectCoords[ 0 ] - P );
1163	coords[ 1 ] = mat * ( rectCoords[ 1 ] - P );
1164	coords[ 2 ] = mat * ( rectCoords[ 2 ] - P );
1165	coords[ 3 ] = mat * ( rectCoords[ 3 ] - P );
1166	coords[ 0 ] = normalize( coords[ 0 ] );
1167	coords[ 1 ] = normalize( coords[ 1 ] );
1168	coords[ 2 ] = normalize( coords[ 2 ] );
1169	coords[ 3 ] = normalize( coords[ 3 ] );
1170	vec3 vectorFormFactor = vec3( 0.0 );
1171	vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );
1172	vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );
1173	vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );
1174	vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );
1175	float result = LTC_ClippedSphereFormFactor( vectorFormFactor );
1176	return vec3( result );
1177}
1178#if defined( USE_SHEEN )
1179float D_Charlie( float roughness, float dotNH ) {
1180	float alpha = pow2( roughness );
1181	float invAlpha = 1.0 / alpha;
1182	float cos2h = dotNH * dotNH;
1183	float sin2h = max( 1.0 - cos2h, 0.0078125 );
1184	return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );
1185}
1186float V_Neubelt( float dotNV, float dotNL ) {
1187	return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );
1188}
1189vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {
1190	vec3 halfDir = normalize( lightDir + viewDir );
1191	float dotNL = saturate( dot( normal, lightDir ) );
1192	float dotNV = saturate( dot( normal, viewDir ) );
1193	float dotNH = saturate( dot( normal, halfDir ) );
1194	float D = D_Charlie( sheenRoughness, dotNH );
1195	float V = V_Neubelt( dotNV, dotNL );
1196	return sheenColor * ( D * V );
1197}
1198#endif
1199float IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {
1200	float dotNV = saturate( dot( normal, viewDir ) );
1201	float r2 = roughness * roughness;
1202	float a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;
1203	float b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;
1204	float DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );
1205	return saturate( DG * RECIPROCAL_PI );
1206}
1207vec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {
1208	float dotNV = saturate( dot( normal, viewDir ) );
1209	const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );
1210	const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );
1211	vec4 r = roughness * c0 + c1;
1212	float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;
1213	vec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;
1214	return fab;
1215}
1216vec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {
1217	vec2 fab = DFGApprox( normal, viewDir, roughness );
1218	return specularColor * fab.x + specularF90 * fab.y;
1219}
1220#ifdef USE_IRIDESCENCE
1221void computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {
1222#else
1223void computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {
1224#endif
1225	vec2 fab = DFGApprox( normal, viewDir, roughness );
1226	#ifdef USE_IRIDESCENCE
1227		vec3 Fr = mix( specularColor, iridescenceF0, iridescence );
1228	#else
1229		vec3 Fr = specularColor;
1230	#endif
1231	vec3 FssEss = Fr * fab.x + specularF90 * fab.y;
1232	float Ess = fab.x + fab.y;
1233	float Ems = 1.0 - Ess;
1234	vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;	vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );
1235	singleScatter += FssEss;
1236	multiScatter += Fms * Ems;
1237}
1238#if NUM_RECT_AREA_LIGHTS > 0
1239	void RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {
1240		vec3 normal = geometryNormal;
1241		vec3 viewDir = geometryViewDir;
1242		vec3 position = geometryPosition;
1243		vec3 lightPos = rectAreaLight.position;
1244		vec3 halfWidth = rectAreaLight.halfWidth;
1245		vec3 halfHeight = rectAreaLight.halfHeight;
1246		vec3 lightColor = rectAreaLight.color;
1247		float roughness = material.roughness;
1248		vec3 rectCoords[ 4 ];
1249		rectCoords[ 0 ] = lightPos + halfWidth - halfHeight;		rectCoords[ 1 ] = lightPos - halfWidth - halfHeight;
1250		rectCoords[ 2 ] = lightPos - halfWidth + halfHeight;
1251		rectCoords[ 3 ] = lightPos + halfWidth + halfHeight;
1252		vec2 uv = LTC_Uv( normal, viewDir, roughness );
1253		vec4 t1 = texture2D( ltc_1, uv );
1254		vec4 t2 = texture2D( ltc_2, uv );
1255		mat3 mInv = mat3(
1256			vec3( t1.x, 0, t1.y ),
1257			vec3(    0, 1,    0 ),
1258			vec3( t1.z, 0, t1.w )
1259		);
1260		vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );
1261		reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );
1262		reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );
1263	}
1264#endif
1265void RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {
1266	float dotNL = saturate( dot( geometryNormal, directLight.direction ) );
1267	vec3 irradiance = dotNL * directLight.color;
1268	#ifdef USE_CLEARCOAT
1269		float dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );
1270		vec3 ccIrradiance = dotNLcc * directLight.color;
1271		clearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );
1272	#endif
1273	#ifdef USE_SHEEN
1274		sheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );
1275	#endif
1276	reflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material );
1277	reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
1278}
1279void RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {
1280	reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
1281}
1282void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {
1283	#ifdef USE_CLEARCOAT
1284		clearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );
1285	#endif
1286	#ifdef USE_SHEEN
1287		sheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );
1288	#endif
1289	vec3 singleScattering = vec3( 0.0 );
1290	vec3 multiScattering = vec3( 0.0 );
1291	vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;
1292	#ifdef USE_IRIDESCENCE
1293		computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );
1294	#else
1295		computeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );
1296	#endif
1297	vec3 totalScattering = singleScattering + multiScattering;
1298	vec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );
1299	reflectedLight.indirectSpecular += radiance * singleScattering;
1300	reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;
1301	reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;
1302}
1303#define RE_Direct				RE_Direct_Physical
1304#define RE_Direct_RectArea		RE_Direct_RectArea_Physical
1305#define RE_IndirectDiffuse		RE_IndirectDiffuse_Physical
1306#define RE_IndirectSpecular		RE_IndirectSpecular_Physical
1307float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {
1308	return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );
1309}`,
1309nO=`
1310vec3 geometryPosition = - vViewPosition;
1311vec3 geometryNormal = normal;
1312vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );
1313vec3 geometryClearcoatNormal = vec3( 0.0 );
1314#ifdef USE_CLEARCOAT
1315	geometryClearcoatNormal = clearcoatNormal;
1316#endif
1317#ifdef USE_IRIDESCENCE
1318	float dotNVi = saturate( dot( normal, geometryViewDir ) );
1319	if ( material.iridescenceThickness == 0.0 ) {
1320		material.iridescence = 0.0;
1321	} else {
1322		material.iridescence = saturate( material.iridescence );
1323	}
1324	if ( material.iridescence > 0.0 ) {
1325		material.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );
1326		material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );
1327	}
1328#endif
1329IncidentLight directLight;
1330#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )
1331	PointLight pointLight;
1332	#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0
1333	PointLightShadow pointLightShadow;
1334	#endif
1335	#pragma unroll_loop_start
1336	for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {
1337		pointLight = pointLights[ i ];
1338		getPointLightInfo( pointLight, geometryPosition, directLight );
1339		#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )
1340		pointLightShadow = pointLightShadows[ i ];
1341		directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowIntensity, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;
1342		#endif
1343		RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
1344	}
1345	#pragma unroll_loop_end
1346#endif
1347#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )
1348	SpotLight spotLight;
1349	vec4 spotColor;
1350	vec3 spotLightCoord;
1351	bool inSpotLightMap;
1352	#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0
1353	SpotLightShadow spotLightShadow;
1354	#endif
1355	#pragma unroll_loop_start
1356	for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {
1357		spotLight = spotLights[ i ];
1358		getSpotLightInfo( spotLight, geometryPosition, directLight );
1359		#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )
1360		#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX
1361		#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )
1362		#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS
1363		#else
1364		#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )
1365		#endif
1366		#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )
1367			spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;
1368			inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );
1369			spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );
1370			directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;
1371		#endif
1372		#undef SPOT_LIGHT_MAP_INDEX
1373		#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )
1374		spotLightShadow = spotLightShadows[ i ];
1375		directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowIntensity, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;
1376		#endif
1377		RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
1378	}
1379	#pragma unroll_loop_end
1380#endif
1381#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )
1382	DirectionalLight directionalLight;
1383	#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0
1384	DirectionalLightShadow directionalLightShadow;
1385	#endif
1386	#pragma unroll_loop_start
1387	for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {
1388		directionalLight = directionalLights[ i ];
1389		getDirectionalLightInfo( directionalLight, directLight );
1390		#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )
1391		directionalLightShadow = directionalLightShadows[ i ];
1392		directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowIntensity, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;
1393		#endif
1394		RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
1395	}
1396	#pragma unroll_loop_end
1397#endif
1398#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )
1399	RectAreaLight rectAreaLight;
1400	#pragma unroll_loop_start
1401	for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {
1402		rectAreaLight = rectAreaLights[ i ];
1403		RE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
1404	}
1405	#pragma unroll_loop_end
1406#endif
1407#if defined( RE_IndirectDiffuse )
1408	vec3 iblIrradiance = vec3( 0.0 );
1409	vec3 irradiance = getAmbientLightIrradiance( ambientLightColor );
1410	#if defined( USE_LIGHT_PROBES )
1411		irradiance += getLightProbeIrradiance( lightProbe, geometryNormal );
1412	#endif
1413	#if ( NUM_HEMI_LIGHTS > 0 )
1414		#pragma unroll_loop_start
1415		for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {
1416			irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );
1417		}
1418		#pragma unroll_loop_end
1419	#endif
1420#endif
1421#if defined( RE_IndirectSpecular )
1422	vec3 radiance = vec3( 0.0 );
1423	vec3 clearcoatRadiance = vec3( 0.0 );
1424#endif`,iO=`#if defined( RE_IndirectDiffuse )
1425	#ifdef USE_LIGHTMAP
1426		vec4 lightMapTexel = texture2D( lightMap, vLightMapUv );
1427		vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;
1428		irradiance += lightMapIrradiance;
1429	#endif
1430	#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )
1431		iblIrradiance += getIBLIrradiance( geometryNormal );
1432	#endif
1433#endif
1434#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )
1435	#ifdef USE_ANISOTROPY
1436		radiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );
1437	#else
1438		radiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );
1439	#endif
1440	#ifdef USE_CLEARCOAT
1441		clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );
1442	#endif
1443#endif`,aO=`#if defined( RE_IndirectDiffuse )
1444	RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
1445#endif
1446#if defined( RE_IndirectSpecular )
1447	RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );
1448#endif`,sO=`#if defined( USE_LOGARITHMIC_DEPTH_BUFFER )
1449	gl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;
1450#endif`,rO=`#if defined( USE_LOGARITHMIC_DEPTH_BUFFER )
1451	uniform float logDepthBufFC;
1452	varying float vFragDepth;
1453	varying float vIsPerspective;
1454#endif`,oO=`#ifdef USE_LOGARITHMIC_DEPTH_BUFFER
1455	varying float vFragDepth;
1456	varying float vIsPerspective;
1457#endif`,lO=`#ifdef USE_LOGARITHMIC_DEPTH_BUFFER
1458	vFragDepth = 1.0 + gl_Position.w;
1459	vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );
1460#endif`,cO=`#ifdef USE_MAP
1461	vec4 sampledDiffuseColor = texture2D( map, vMapUv );
1462	#ifdef DECODE_VIDEO_TEXTURE
1463		sampledDiffuseColor = sRGBTransferEOTF( sampledDiffuseColor );
1464	#endif
1465	diffuseColor *= sampledDiffuseColor;
1466#endif`,uO=`#ifdef USE_MAP
1467	uniform sampler2D map;
1468#endif`,fO=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP )
1469	#if defined( USE_POINTS_UV )
1470		vec2 uv = vUv;
1471	#else
1472		vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;
1473	#endif
1474#endif
1475#ifdef USE_MAP
1476	diffuseColor *= texture2D( map, uv );
1477#endif
1478#ifdef USE_ALPHAMAP
1479	diffuseColor.a *= texture2D( alphaMap, uv ).g;
1480#endif`,hO=`#if defined( USE_POINTS_UV )
1481	varying vec2 vUv;
1482#else
1483	#if defined( USE_MAP ) || defined( USE_ALPHAMAP )
1484		uniform mat3 uvTransform;
1485	#endif
1486#endif
1487#ifdef USE_MAP
1488	uniform sampler2D map;
1489#endif
1490#ifdef USE_ALPHAMAP
1491	uniform sampler2D alphaMap;
1492#endif`,dO=`float metalnessFactor = metalness;
1493#ifdef USE_METALNESSMAP
1494	vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );
1495	metalnessFactor *= texelMetalness.b;
1496#endif`,pO=`#ifdef USE_METALNESSMAP
1497	uniform sampler2D metalnessMap;
1498#endif`,mO=`#ifdef USE_INSTANCING_MORPH
1499	float morphTargetInfluences[ MORPHTARGETS_COUNT ];
1500	float morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r;
1501	for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
1502		morphTargetInfluences[i] =  texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r;
1503	}
1504#endif`,gO=`#if defined( USE_MORPHCOLORS )
1505	vColor *= morphTargetBaseInfluence;
1506	for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
1507		#if defined( USE_COLOR_ALPHA )
1508			if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];
1509		#elif defined( USE_COLOR )
1510			if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];
1511		#endif
1512	}
1513#endif`,vO=`#ifdef USE_MORPHNORMALS
1514	objectNormal *= morphTargetBaseInfluence;
1515	for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
1516		if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];
1517	}
1518#endif`,yO=`#ifdef USE_MORPHTARGETS
1519	#ifndef USE_INSTANCING_MORPH
1520		uniform float morphTargetBaseInfluence;
1521		uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];
1522	#endif
1523	uniform sampler2DArray morphTargetsTexture;
1524	uniform ivec2 morphTargetsTextureSize;
1525	vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {
1526		int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;
1527		int y = texelIndex / morphTargetsTextureSize.x;
1528		int x = texelIndex - y * morphTargetsTextureSize.x;
1529		ivec3 morphUV = ivec3( x, y, morphTargetIndex );
1530		return texelFetch( morphTargetsTexture, morphUV, 0 );
1531	}
1532#endif`,_O=`#ifdef USE_MORPHTARGETS
1533	transformed *= morphTargetBaseInfluence;
1534	for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
1535		if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];
1536	}
1537#endif`,xO=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;
1538#ifdef FLAT_SHADED
1539	vec3 fdx = dFdx( vViewPosition );
1540	vec3 fdy = dFdy( vViewPosition );
1541	vec3 normal = normalize( cross( fdx, fdy ) );
1542#else
1543	vec3 normal = normalize( vNormal );
1544	#ifdef DOUBLE_SIDED
1545		normal *= faceDirection;
1546	#endif
1547#endif
1548#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )
1549	#ifdef USE_TANGENT
1550		mat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );
1551	#else
1552		mat3 tbn = getTangentFrame( - vViewPosition, normal,
1553		#if defined( USE_NORMALMAP )
1554			vNormalMapUv
1555		#elif defined( USE_CLEARCOAT_NORMALMAP )
1556			vClearcoatNormalMapUv
1557		#else
1558			vUv
1559		#endif
1560		);
1561	#endif
1562	#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )
1563		tbn[0] *= faceDirection;
1564		tbn[1] *= faceDirection;
1565	#endif
1566#endif
1567#ifdef USE_CLEARCOAT_NORMALMAP
1568	#ifdef USE_TANGENT
1569		mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );
1570	#else
1571		mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );
1572	#endif
1573	#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )
1574		tbn2[0] *= faceDirection;
1575		tbn2[1] *= faceDirection;
1576	#endif
1577#endif
1578vec3 nonPerturbedNormal = normal;`,SO=`#ifdef USE_NORMALMAP_OBJECTSPACE
1579	normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;
1580	#ifdef FLIP_SIDED
1581		normal = - normal;
1582	#endif
1583	#ifdef DOUBLE_SIDED
1584		normal = normal * faceDirection;
1585	#endif
1586	normal = normalize( normalMatrix * normal );
1587#elif defined( USE_NORMALMAP_TANGENTSPACE )
1588	vec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;
1589	mapN.xy *= normalScale;
1590	normal = normalize( tbn * mapN );
1591#elif defined( USE_BUMPMAP )
1592	normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );
1593#endif`,bO=`#ifndef FLAT_SHADED
1594	varying vec3 vNormal;
1595	#ifdef USE_TANGENT
1596		varying vec3 vTangent;
1597		varying vec3 vBitangent;
1598	#endif
1599#endif`,MO=`#ifndef FLAT_SHADED
1600	varying vec3 vNormal;
1601	#ifdef USE_TANGENT
1602		varying vec3 vTangent;
1603		varying vec3 vBitangent;
1604	#endif
1605#endif`,EO=`#ifndef FLAT_SHADED
1606	vNormal = normalize( transformedNormal );
1607	#ifdef USE_TANGENT
1608		vTangent = normalize( transformedTangent );
1609		vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );
1610	#endif
1611#endif`,TO=`#ifdef USE_NORMALMAP
1612	uniform sampler2D normalMap;
1613	uniform vec2 normalScale;
1614#endif
1615#ifdef USE_NORMALMAP_OBJECTSPACE
1616	uniform mat3 normalMatrix;
1617#endif
1618#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )
1619	mat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {
1620		vec3 q0 = dFdx( eye_pos.xyz );
1621		vec3 q1 = dFdy( eye_pos.xyz );
1622		vec2 st0 = dFdx( uv.st );
1623		vec2 st1 = dFdy( uv.st );
1624		vec3 N = surf_norm;
1625		vec3 q1perp = cross( q1, N );
1626		vec3 q0perp = cross( N, q0 );
1627		vec3 T = q1perp * st0.x + q0perp * st1.x;
1628		vec3 B = q1perp * st0.y + q0perp * st1.y;
1629		float det = max( dot( T, T ), dot( B, B ) );
1630		float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );
1631		return mat3( T * scale, B * scale, N );
1632	}
1633#endif`,AO=`#ifdef USE_CLEARCOAT
1634	vec3 clearcoatNormal = nonPerturbedNormal;
1635#endif`,wO=`#ifdef USE_CLEARCOAT_NORMALMAP
1636	vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;
1637	clearcoatMapN.xy *= clearcoatNormalScale;
1638	clearcoatNormal = normalize( tbn2 * clearcoatMapN );
1639#endif`,RO=`#ifdef USE_CLEARCOATMAP
1640	uniform sampler2D clearcoatMap;
1641#endif
1642#ifdef USE_CLEARCOAT_NORMALMAP
1643	uniform sampler2D clearcoatNormalMap;
1644	uniform vec2 clearcoatNormalScale;
1645#endif
1646#ifdef USE_CLEARCOAT_ROUGHNESSMAP
1647	uniform sampler2D clearcoatRoughnessMap;
1648#endif`,CO=`#ifdef USE_IRIDESCENCEMAP
1649	uniform sampler2D iridescenceMap;
1650#endif
1651#ifdef USE_IRIDESCENCE_THICKNESSMAP
1652	uniform sampler2D iridescenceThicknessMap;
1653#endif`,NO=`#ifdef OPAQUE
1654diffuseColor.a = 1.0;
1655#endif
1656#ifdef USE_TRANSMISSION
1657diffuseColor.a *= material.transmissionAlpha;
1658#endif
1659gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,DO=`vec3 packNormalToRGB( const in vec3 normal ) {
1660	return normalize( normal ) * 0.5 + 0.5;
1661}
1662vec3 unpackRGBToNormal( const in vec3 rgb ) {
1663	return 2.0 * rgb.xyz - 1.0;
1664}
1665const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;const float ShiftRight8 = 1. / 256.;
1666const float Inv255 = 1. / 255.;
1667const vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 );
1668const vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g );
1669const vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b );
1670const vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a );
1671vec4 packDepthToRGBA( const in float v ) {
1672	if( v <= 0.0 )
1673		return vec4( 0., 0., 0., 0. );
1674	if( v >= 1.0 )
1675		return vec4( 1., 1., 1., 1. );
1676	float vuf;
1677	float af = modf( v * PackFactors.a, vuf );
1678	float bf = modf( vuf * ShiftRight8, vuf );
1679	float gf = modf( vuf * ShiftRight8, vuf );
1680	return vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af );
1681}
1682vec3 packDepthToRGB( const in float v ) {
1683	if( v <= 0.0 )
1684		return vec3( 0., 0., 0. );
1685	if( v >= 1.0 )
1686		return vec3( 1., 1., 1. );
1687	float vuf;
1688	float bf = modf( v * PackFactors.b, vuf );
1689	float gf = modf( vuf * ShiftRight8, vuf );
1690	return vec3( vuf * Inv255, gf * PackUpscale, bf );
1691}
1692vec2 packDepthToRG( const in float v ) {
1693	if( v <= 0.0 )
1694		return vec2( 0., 0. );
1695	if( v >= 1.0 )
1696		return vec2( 1., 1. );
1697	float vuf;
1698	float gf = modf( v * 256., vuf );
1699	return vec2( vuf * Inv255, gf );
1700}
1701float unpackRGBAToDepth( const in vec4 v ) {
1702	return dot( v, UnpackFactors4 );
1703}
1704float unpackRGBToDepth( const in vec3 v ) {
1705	return dot( v, UnpackFactors3 );
1706}
1707float unpackRGToDepth( const in vec2 v ) {
1708	return v.r * UnpackFactors2.r + v.g * UnpackFactors2.g;
1709}
1710vec4 pack2HalfToRGBA( const in vec2 v ) {
1711	vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );
1712	return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );
1713}
1714vec2 unpackRGBATo2Half( const in vec4 v ) {
1715	return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );
1716}
1717float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {
1718	return ( viewZ + near ) / ( near - far );
1719}
1720float orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {
1721	return depth * ( near - far ) - near;
1722}
1723float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {
1724	return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );
1725}
1726float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {
1727	return ( near * far ) / ( ( far - near ) * depth - far );
1728}`,UO=`#ifdef PREMULTIPLIED_ALPHA
1729	gl_FragColor.rgb *= gl_FragColor.a;
1730#endif`,LO=`vec4 mvPosition = vec4( transformed, 1.0 );
1731#ifdef USE_BATCHING
1732	mvPosition = batchingMatrix * mvPosition;
1733#endif
1734#ifdef USE_INSTANCING
1735	mvPosition = instanceMatrix * mvPosition;
1736#endif
1737mvPosition = modelViewMatrix * mvPosition;
1738gl_Position = projectionMatrix * mvPosition;`,OO=`#ifdef DITHERING
1739	gl_FragColor.rgb = dithering( gl_FragColor.rgb );
1740#endif`,zO=`#ifdef DITHERING
1741	vec3 dithering( vec3 color ) {
1742		float grid_position = rand( gl_FragCoord.xy );
1743		vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );
1744		dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );
1745		return color + dither_shift_RGB;
1746	}
1747#endif`,IO=`float roughnessFactor = roughness;
1748#ifdef USE_ROUGHNESSMAP
1749	vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );
1750	roughnessFactor *= texelRoughness.g;
1751#endif`,BO=`#ifdef USE_ROUGHNESSMAP
1752	uniform sampler2D roughnessMap;
1753#endif`,PO=`#if NUM_SPOT_LIGHT_COORDS > 0
1754	varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];
1755#endif
1756#if NUM_SPOT_LIGHT_MAPS > 0
1757	uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];
1758#endif
1759#ifdef USE_SHADOWMAP
1760	#if NUM_DIR_LIGHT_SHADOWS > 0
1761		uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];
1762		varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];
1763		struct DirectionalLightShadow {
1764			float shadowIntensity;
1765			float shadowBias;
1766			float shadowNormalBias;
1767			float shadowRadius;
1768			vec2 shadowMapSize;
1769		};
1770		uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];
1771	#endif
1772	#if NUM_SPOT_LIGHT_SHADOWS > 0
1773		uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];
1774		struct SpotLightShadow {
1775			float shadowIntensity;
1776			float shadowBias;
1777			float shadowNormalBias;
1778			float shadowRadius;
1779			vec2 shadowMapSize;
1780		};
1781		uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];
1782	#endif
1783	#if NUM_POINT_LIGHT_SHADOWS > 0
1784		uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];
1785		varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];
1786		struct PointLightShadow {
1787			float shadowIntensity;
1788			float shadowBias;
1789			float shadowNormalBias;
1790			float shadowRadius;
1791			vec2 shadowMapSize;
1792			float shadowCameraNear;
1793			float shadowCameraFar;
1794		};
1795		uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];
1796	#endif
1797	float texture2DCompare( sampler2D depths, vec2 uv, float compare ) {
1798		float depth = unpackRGBAToDepth( texture2D( depths, uv ) );
1799		#ifdef USE_REVERSED_DEPTH_BUFFER
1800			return step( depth, compare );
1801		#else
1802			return step( compare, depth );
1803		#endif
1804	}
1805	vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {
1806		return unpackRGBATo2Half( texture2D( shadow, uv ) );
1807	}
1808	float VSMShadow( sampler2D shadow, vec2 uv, float compare ) {
1809		float occlusion = 1.0;
1810		vec2 distribution = texture2DDistribution( shadow, uv );
1811		#ifdef USE_REVERSED_DEPTH_BUFFER
1812			float hard_shadow = step( distribution.x, compare );
1813		#else
1814			float hard_shadow = step( compare, distribution.x );
1815		#endif
1816		if ( hard_shadow != 1.0 ) {
1817			float distance = compare - distribution.x
vendor: 6,963 bytes, lines 1817-1948
1817;
1818			float variance = max( 0.00000, distribution.y * distribution.y );
1819			float softness_probability = variance / (variance + distance * distance );			softness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );			occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );
1820		}
1821		return occlusion;
1822	}
1823	float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) {
1824		float shadow = 1.0;
1825		shadowCoord.xyz /= shadowCoord.w;
1826		shadowCoord.z += shadowBias;
1827		bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;
1828		bool frustumTest = inFrustum && shadowCoord.z <= 1.0;
1829		if ( frustumTest ) {
1830		#if defined( SHADOWMAP_TYPE_PCF )
1831			vec2 texelSize = vec2( 1.0 ) / shadowMapSize;
1832			float dx0 = - texelSize.x * shadowRadius;
1833			float dy0 = - texelSize.y * shadowRadius;
1834			float dx1 = + texelSize.x * shadowRadius;
1835			float dy1 = + texelSize.y * shadowRadius;
1836			float dx2 = dx0 / 2.0;
1837			float dy2 = dy0 / 2.0;
1838			float dx3 = dx1 / 2.0;
1839			float dy3 = dy1 / 2.0;
1840			shadow = (
1841				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +
1842				texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +
1843				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +
1844				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +
1845				texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +
1846				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +
1847				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +
1848				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +
1849				texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +
1850				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +
1851				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +
1852				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +
1853				texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +
1854				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +
1855				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +
1856				texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +
1857				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )
1858			) * ( 1.0 / 17.0 );
1859		#elif defined( SHADOWMAP_TYPE_PCF_SOFT )
1860			vec2 texelSize = vec2( 1.0 ) / shadowMapSize;
1861			float dx = texelSize.x;
1862			float dy = texelSize.y;
1863			vec2 uv = shadowCoord.xy;
1864			vec2 f = fract( uv * shadowMapSize + 0.5 );
1865			uv -= f * texelSize;
1866			shadow = (
1867				texture2DCompare( shadowMap, uv, shadowCoord.z ) +
1868				texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +
1869				texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +
1870				texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +
1871				mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),
1872					 texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),
1873					 f.x ) +
1874				mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),
1875					 texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),
1876					 f.x ) +
1877				mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),
1878					 texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),
1879					 f.y ) +
1880				mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),
1881					 texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),
1882					 f.y ) +
1883				mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),
1884						  texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),
1885						  f.x ),
1886					 mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),
1887						  texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),
1888						  f.x ),
1889					 f.y )
1890			) * ( 1.0 / 9.0 );
1891		#elif defined( SHADOWMAP_TYPE_VSM )
1892			shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );
1893		#else
1894			shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );
1895		#endif
1896		}
1897		return mix( 1.0, shadow, shadowIntensity );
1898	}
1899	vec2 cubeToUV( vec3 v, float texelSizeY ) {
1900		vec3 absV = abs( v );
1901		float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );
1902		absV *= scaleToCube;
1903		v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );
1904		vec2 planar = v.xy;
1905		float almostATexel = 1.5 * texelSizeY;
1906		float almostOne = 1.0 - almostATexel;
1907		if ( absV.z >= almostOne ) {
1908			if ( v.z > 0.0 )
1909				planar.x = 4.0 - v.x;
1910		} else if ( absV.x >= almostOne ) {
1911			float signX = sign( v.x );
1912			planar.x = v.z * signX + 2.0 * signX;
1913		} else if ( absV.y >= almostOne ) {
1914			float signY = sign( v.y );
1915			planar.x = v.x + 2.0 * signY + 2.0;
1916			planar.y = v.z * signY - 2.0;
1917		}
1918		return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );
1919	}
1920	float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {
1921		float shadow = 1.0;
1922		vec3 lightToPosition = shadowCoord.xyz;
1923		
1924		float lightToPositionLength = length( lightToPosition );
1925		if ( lightToPositionLength - shadowCameraFar <= 0.0 && lightToPositionLength - shadowCameraNear >= 0.0 ) {
1926			float dp = ( lightToPositionLength - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );			dp += shadowBias;
1927			vec3 bd3D = normalize( lightToPosition );
1928			vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );
1929			#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )
1930				vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;
1931				shadow = (
1932					texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +
1933					texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +
1934					texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +
1935					texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +
1936					texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +
1937					texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +
1938					texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +
1939					texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +
1940					texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )
1941				) * ( 1.0 / 9.0 );
1942			#else
1943				shadow = texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );
1944			#endif
1945		}
1946		return mix( 1.0, shadow, shadowIntensity );
1947	}
1948#endif`,
1948HO=`#if NUM_SPOT_LIGHT_COORDS > 0
1949	uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];
1950	varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];
1951#endif
1952#ifdef USE_SHADOWMAP
1953	#if NUM_DIR_LIGHT_SHADOWS > 0
1954		uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];
1955		varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];
1956		struct DirectionalLightShadow {
1957			float shadowIntensity;
1958			float shadowBias;
1959			float shadowNormalBias;
1960			float shadowRadius;
1961			vec2 shadowMapSize;
1962		};
1963		uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];
1964	#endif
1965	#if NUM_SPOT_LIGHT_SHADOWS > 0
1966		struct SpotLightShadow {
1967			float shadowIntensity;
1968			float shadowBias;
1969			float shadowNormalBias;
1970			float shadowRadius;
1971			vec2 shadowMapSize;
1972		};
1973		uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];
1974	#endif
1975	#if NUM_POINT_LIGHT_SHADOWS > 0
1976		uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];
1977		varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];
1978		struct PointLightShadow {
1979			float shadowIntensity;
1980			float shadowBias;
1981			float shadowNormalBias;
1982			float shadowRadius;
1983			vec2 shadowMapSize;
1984			float shadowCameraNear;
1985			float shadowCameraFar;
1986		};
1987		uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];
1988	#endif
1989#endif`,FO=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )
1990	vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );
1991	vec4 shadowWorldPosition;
1992#endif
1993#if defined( USE_SHADOWMAP )
1994	#if NUM_DIR_LIGHT_SHADOWS > 0
1995		#pragma unroll_loop_start
1996		for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {
1997			shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );
1998			vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;
1999		}
2000		#pragma unroll_loop_end
2001	#endif
2002	#if NUM_POINT_LIGHT_SHADOWS > 0
2003		#pragma unroll_loop_start
2004		for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {
2005			shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );
2006			vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;
2007		}
2008		#pragma unroll_loop_end
2009	#endif
2010#endif
2011#if NUM_SPOT_LIGHT_COORDS > 0
2012	#pragma unroll_loop_start
2013	for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {
2014		shadowWorldPosition = worldPosition;
2015		#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )
2016			shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;
2017		#endif
2018		vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;
2019	}
2020	#pragma unroll_loop_end
2021#endif`,VO=`float getShadowMask() {
2022	float shadow = 1.0;
2023	#ifdef USE_SHADOWMAP
2024	#if NUM_DIR_LIGHT_SHADOWS > 0
2025	DirectionalLightShadow directionalLight;
2026	#pragma unroll_loop_start
2027	for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {
2028		directionalLight = directionalLightShadows[ i ];
2029		shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowIntensity, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;
2030	}
2031	#pragma unroll_loop_end
2032	#endif
2033	#if NUM_SPOT_LIGHT_SHADOWS > 0
2034	SpotLightShadow spotLight;
2035	#pragma unroll_loop_start
2036	for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {
2037		spotLight = spotLightShadows[ i ];
2038		shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowIntensity, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;
2039	}
2040	#pragma unroll_loop_end
2041	#endif
2042	#if NUM_POINT_LIGHT_SHADOWS > 0
2043	PointLightShadow pointLight;
2044	#pragma unroll_loop_start
2045	for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {
2046		pointLight = pointLightShadows[ i ];
2047		shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowIntensity, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;
2048	}
2049	#pragma unroll_loop_end
2050	#endif
2051	#endif
2052	return shadow;
2053}`,GO=`#ifdef USE_SKINNING
2054	mat4 boneMatX = getBoneMatrix( skinIndex.x );
2055	mat4 boneMatY = getBoneMatrix( skinIndex.y );
2056	mat4 boneMatZ = getBoneMatrix( skinIndex.z );
2057	mat4 boneMatW = getBoneMatrix( skinIndex.w );
2058#endif`,kO=`#ifdef USE_SKINNING
2059	uniform mat4 bindMatrix;
2060	uniform mat4 bindMatrixInverse;
2061	uniform highp sampler2D boneTexture;
2062	mat4 getBoneMatrix( const in float i ) {
2063		int size = textureSize( boneTexture, 0 ).x;
2064		int j = int( i ) * 4;
2065		int x = j % size;
2066		int y = j / size;
2067		vec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 );
2068		vec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 );
2069		vec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 );
2070		vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 );
2071		return mat4( v1, v2, v3, v4 );
2072	}
2073#endif`,XO=`#ifdef USE_SKINNING
2074	vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );
2075	vec4 skinned = vec4( 0.0 );
2076	skinned += boneMatX * skinVertex * skinWeight.x;
2077	skinned += boneMatY * skinVertex * skinWeight.y;
2078	skinned += boneMatZ * skinVertex * skinWeight.z;
2079	skinned += boneMatW * skinVertex * skinWeight.w;
2080	transformed = ( bindMatrixInverse * skinned ).xyz;
2081#endif`,jO=`#ifdef USE_SKINNING
2082	mat4 skinMatrix = mat4( 0.0 );
2083	skinMatrix += skinWeight.x * boneMatX;
2084	skinMatrix += skinWeight.y * boneMatY;
2085	skinMatrix += skinWeight.z * boneMatZ;
2086	skinMatrix += skinWeight.w * boneMatW;
2087	skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;
2088	objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;
2089	#ifdef USE_TANGENT
2090		objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;
2091	#endif
2092#endif`,qO=`float specularStrength;
2093#ifdef USE_SPECULARMAP
2094	vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );
2095	specularStrength = texelSpecular.r;
2096#else
2097	specularStrength = 1.0;
2098#endif`,YO=`#ifdef USE_SPECULARMAP
2099	uniform sampler2D specularMap;
2100#endif`,WO=`#if defined( TONE_MAPPING )
2101	gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );
2102#endif`,ZO=`#ifndef saturate
2103#define saturate( a ) clamp( a, 0.0, 1.0 )
2104#endif
2105uniform float toneMappingExposure;
2106vec3 LinearToneMapping( vec3 color ) {
2107	return saturate( toneMappingExposure * color );
2108}
2109vec3 ReinhardToneMapping( vec3 color ) {
2110	color *= toneMappingExposure;
2111	return saturate( color / ( vec3( 1.0 ) + color ) );
2112}
2113vec3 CineonToneMapping( vec3 color ) {
2114	color *= toneMappingExposure;
2115	color = max( vec3( 0.0 ), color - 0.004 );
2116	return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );
2117}
2118vec3 RRTAndODTFit( vec3 v ) {
2119	vec3 a = v * ( v + 0.0245786 ) - 0.000090537;
2120	vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;
2121	return a / b;
2122}
2123vec3 ACESFilmicToneMapping( vec3 color ) {
2124	const mat3 ACESInputMat = mat3(
2125		vec3( 0.59719, 0.07600, 0.02840 ),		vec3( 0.35458, 0.90834, 0.13383 ),
2126		vec3( 0.04823, 0.01566, 0.83777 )
2127	);
2128	const mat3 ACESOutputMat = mat3(
2129		vec3(  1.60475, -0.10208, -0.00327 ),		vec3( -0.53108,  1.10813, -0.07276 ),
2130		vec3( -0.07367, -0.00605,  1.07602 )
2131	);
2132	color *= toneMappingExposure / 0.6;
2133	color = ACESInputMat * color;
2134	color = RRTAndODTFit( color );
2135	color = ACESOutputMat * color;
2136	return saturate( color );
2137}
2138const mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3(
2139	vec3( 1.6605, - 0.1246, - 0.0182 ),
2140	vec3( - 0.5876, 1.1329, - 0.1006 ),
2141	vec3( - 0.0728, - 0.0083, 1.1187 )
2142);
2143const mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3(
2144	vec3( 0.6274, 0.0691, 0.0164 ),
2145	vec3( 0.3293, 0.9195, 0.0880 ),
2146	vec3( 0.0433, 0.0113, 0.8956 )
2147);
2148vec3 agxDefaultContrastApprox( vec3 x ) {
2149	vec3 x2 = x * x;
2150	vec3 x4 = x2 * x2;
2151	return + 15.5 * x4 * x2
2152		- 40.14 * x4 * x
2153		+ 31.96 * x4
2154		- 6.868 * x2 * x
2155		+ 0.4298 * x2
2156		+ 0.1191 * x
2157		- 0.00232;
2158}
2159vec3 AgXToneMapping( vec3 color ) {
2160	const mat3 AgXInsetMatrix = mat3(
2161		vec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ),
2162		vec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ),
2163		vec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 )
2164	);
2165	const mat3 AgXOutsetMatrix = mat3(
2166		vec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ),
2167		vec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ),
2168		vec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 )
2169	);
2170	const float AgxMinEv = - 12.47393;	const float AgxMaxEv = 4.026069;
2171	color *= toneMappingExposure;
2172	color = LINEAR_SRGB_TO_LINEAR_REC2020 * color;
2173	color = AgXInsetMatrix * color;
2174	color = max( color, 1e-10 );	color = log2( color );
2175	color = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv );
2176	color = clamp( color, 0.0, 1.0 );
2177	color = agxDefaultContrastApprox( color );
2178	color = AgXOutsetMatrix * color;
2179	color = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) );
2180	color = LINEAR_REC2020_TO_LINEAR_SRGB * color;
2181	color = clamp( color, 0.0, 1.0 );
2182	return color;
2183}
2184vec3 NeutralToneMapping( vec3 color ) {
2185	const float StartCompression = 0.8 - 0.04;
2186	const float Desaturation = 0.15;
2187	color *= toneMappingExposure;
2188	float x = min( color.r, min( color.g, color.b ) );
2189	float offset = x < 0.08 ? x - 6.25 * x * x : 0.04;
2190	color -= offset;
2191	float peak = max( color.r, max( color.g, color.b ) );
2192	if ( peak < StartCompression ) return color;
2193	float d = 1. - StartCompression;
2194	float newPeak = 1. - d * d / ( peak + d - StartCompression );
2195	color *= newPeak / peak;
2196	float g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. );
2197	return mix( color, vec3( newPeak ), g );
2198}
2199vec3 CustomToneMapping( vec3 color ) { return color; }`,KO=`#ifdef USE_TRANSMISSION
2200	material.transmission = transmission;
2201	material.transmissionAlpha = 1.0;
2202	material.thickness = thickness;
2203	material.attenuationDistance = attenuationDistance;
2204	material.attenuationColor = attenuationColor;
2205	#ifdef USE_TRANSMISSIONMAP
2206		material.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;
2207	#endif
2208	#ifdef USE_THICKNESSMAP
2209		material.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;
2210	#endif
2211	vec3 pos = vWorldPosition;
2212	vec3 v = normalize( cameraPosition - pos );
2213	vec3 n = inverseTransformDirection( normal, viewMatrix );
2214	vec4 transmitted = getIBLVolumeRefraction(
2215		n, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,
2216		pos, modelMatrix, viewMatrix, projectionMatrix, material.dispersion, material.ior, material.thickness,
2217		material.attenuationColor, material.attenuationDistance );
2218	material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );
2219	totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );
2220#endif`,QO=`#ifdef USE_TRANSMISSION
2221	uniform float transmission;
2222	uniform float thickness;
2223	uniform float attenuationDistance;
2224	uniform vec3 attenuationColor;
2225	#ifdef USE_TRANSMISSIONMAP
2226		uniform sampler2D transmissionMap;
2227	#endif
2228	#ifdef USE_THICKNESSMAP
2229		uniform sampler2D thicknessMap;
2230	#endif
2231	uniform vec2 transmissionSamplerSize;
2232	uniform sampler2D transmissionSamplerMap;
2233	uniform mat4 modelMatrix;
2234	uniform mat4 projectionMatrix;
2235	varying vec3 vWorldPosition;
2236	float w0( float a ) {
2237		return ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );
2238	}
2239	float w1( float a ) {
2240		return ( 1.0 / 6.0 ) * ( a *  a * ( 3.0 * a - 6.0 ) + 4.0 );
2241	}
2242	float w2( float a ){
2243		return ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );
2244	}
2245	float w3( float a ) {
2246		return ( 1.0 / 6.0 ) * ( a * a * a );
2247	}
2248	float g0( float a ) {
2249		return w0( a ) + w1( a );
2250	}
2251	float g1( float a ) {
2252		return w2( a ) + w3( a );
2253	}
2254	float h0( float a ) {
2255		return - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );
2256	}
2257	float h1( float a ) {
2258		return 1.0 + w3( a ) / ( w2( a ) + w3( a ) );
2259	}
2260	vec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {
2261		uv = uv * texelSize.zw + 0.5;
2262		vec2 iuv = floor( uv );
2263		vec2 fuv = fract( uv );
2264		float g0x = g0( fuv.x );
2265		float g1x = g1( fuv.x );
2266		float h0x = h0( fuv.x );
2267		float h1x = h1( fuv.x );
2268		float h0y = h0( fuv.y );
2269		float h1y = h1( fuv.y );
2270		vec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;
2271		vec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;
2272		vec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;
2273		vec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;
2274		return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +
2275			g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );
2276	}
2277	vec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {
2278		vec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );
2279		vec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );
2280		vec2 fLodSizeInv = 1.0 / fLodSize;
2281		vec2 cLodSizeInv = 1.0 / cLodSize;
2282		vec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );
2283		vec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );
2284		return mix( fSample, cSample, fract( lod ) );
2285	}
2286	vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {
2287		vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );
2288		vec3 modelScale;
2289		modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );
2290		modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );
2291		modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );
2292		return normalize( refractionVector ) * thickness * modelScale;
2293	}
2294	float applyIorToRoughness( const in float roughness, const in float ior ) {
2295		return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );
2296	}
2297	vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {
2298		float lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );
2299		return textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );
2300	}
2301	vec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {
2302		if ( isinf( attenuationDistance ) ) {
2303			return vec3( 1.0 );
2304		} else {
2305			vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;
2306			vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );			return transmittance;
2307		}
2308	}
2309	vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,
2310		const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,
2311		const in mat4 viewMatrix, const in mat4 projMatrix, const in float dispersion, const in float ior, const in float thickness,
2312		const in vec3 attenuationColor, const in float attenuationDistance ) {
2313		vec4 transmittedLight;
2314		vec3 transmittance;
2315		#ifdef USE_DISPERSION
2316			float halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;
2317			vec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );
2318			for ( int i = 0; i < 3; i ++ ) {
2319				vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );
2320				vec3 refractedRayExit = position + transmissionRay;
2321				vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );
2322				vec2 refractionCoords = ndcPos.xy / ndcPos.w;
2323				refractionCoords += 1.0;
2324				refractionCoords /= 2.0;
2325				vec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );
2326				transmittedLight[ i ] = transmissionSample[ i ];
2327				transmittedLight.a += transmissionSample.a;
2328				transmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];
2329			}
2330			transmittedLight.a /= 3.0;
2331		#else
2332			vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );
2333			vec3 refractedRayExit = position + transmissionRay;
2334			vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );
2335			vec2 refractionCoords = ndcPos.xy / ndcPos.w;
2336			refractionCoords += 1.0;
2337			refractionCoords /= 2.0;
2338			transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );
2339			transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );
2340		#endif
2341		vec3 attenuatedColor = transmittance * transmittedLight.rgb;
2342		vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );
2343		float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;
2344		return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );
2345	}
2346#endif`,JO=`#if defined( USE_UV ) || defined( USE_ANISOTROPY )
2347	varying vec2 vUv;
2348#endif
2349#ifdef USE_MAP
2350	varying vec2 vMapUv;
2351#endif
2352#ifdef USE_ALPHAMAP
2353	varying vec2 vAlphaMapUv;
2354#endif
2355#ifdef USE_LIGHTMAP
2356	varying vec2 vLightMapUv;
2357#endif
2358#ifdef USE_AOMAP
2359	varying vec2 vAoMapUv;
2360#endif
2361#ifdef USE_BUMPMAP
2362	varying vec2 vBumpMapUv;
2363#endif
2364#ifdef USE_NORMALMAP
2365	varying vec2 vNormalMapUv;
2366#endif
2367#ifdef USE_EMISSIVEMAP
2368	varying vec2 vEmissiveMapUv;
2369#endif
2370#ifdef USE_METALNESSMAP
2371	varying vec2 vMetalnessMapUv;
2372#endif
2373#ifdef USE_ROUGHNESSMAP
2374	varying vec2 vRoughnessMapUv;
2375#endif
2376#ifdef USE_ANISOTROPYMAP
2377	varying vec2 vAnisotropyMapUv;
2378#endif
2379#ifdef USE_CLEARCOATMAP
2380	varying vec2 vClearcoatMapUv;
2381#endif
2382#ifdef USE_CLEARCOAT_NORMALMAP
2383	varying vec2 vClearcoatNormalMapUv;
2384#endif
2385#ifdef USE_CLEARCOAT_ROUGHNESSMAP
2386	varying vec2 vClearcoatRoughnessMapUv;
2387#endif
2388#ifdef USE_IRIDESCENCEMAP
2389	varying vec2 vIridescenceMapUv;
2390#endif
2391#ifdef USE_IRIDESCENCE_THICKNESSMAP
2392	varying vec2 vIridescenceThicknessMapUv;
2393#endif
2394#ifdef USE_SHEEN_COLORMAP
2395	varying vec2 vSheenColorMapUv;
2396#endif
2397#ifdef USE_SHEEN_ROUGHNESSMAP
2398	varying vec2 vSheenRoughnessMapUv;
2399#endif
2400#ifdef USE_SPECULARMAP
2401	varying vec2 vSpecularMapUv;
2402#endif
2403#ifdef USE_SPECULAR_COLORMAP
2404	varying vec2 vSpecularColorMapUv;
2405#endif
2406#ifdef USE_SPECULAR_INTENSITYMAP
2407	varying vec2 vSpecularIntensityMapUv;
2408#endif
2409#ifdef USE_TRANSMISSIONMAP
2410	uniform mat3 transmissionMapTransform;
2411	varying vec2 vTransmissionMapUv;
2412#endif
2413#ifdef USE_THICKNESSMAP
2414	uniform mat3 thicknessMapTransform;
2415	varying vec2 vThicknessMapUv;
2416#endif`,$O=`#if defined( USE_UV ) || defined( USE_ANISOTROPY )
2417	varying vec2 vUv;
2418#endif
2419#ifdef USE_MAP
2420	uniform mat3 mapTransform;
2421	varying vec2 vMapUv;
2422#endif
2423#ifdef USE_ALPHAMAP
2424	uniform mat3 alphaMapTransform;
2425	varying vec2 vAlphaMapUv;
2426#endif
2427#ifdef USE_LIGHTMAP
2428	uniform mat3 lightMapTransform;
2429	varying vec2 vLightMapUv;
2430#endif
2431#ifdef USE_AOMAP
2432	uniform mat3 aoMapTransform;
2433	varying vec2 vAoMapUv;
2434#endif
2435#ifdef USE_BUMPMAP
2436	uniform mat3 bumpMapTransform;
2437	varying vec2 vBumpMapUv;
2438#endif
2439#ifdef USE_NORMALMAP
2440	uniform mat3 normalMapTransform;
2441	varying vec2 vNormalMapUv;
2442#endif
2443#ifdef USE_DISPLACEMENTMAP
2444	uniform mat3 displacementMapTransform;
2445	varying vec2 vDisplacementMapUv;
2446#endif
2447#ifdef USE_EMISSIVEMAP
2448	uniform mat3 emissiveMapTransform;
2449	varying vec2 vEmissiveMapUv;
2450#endif
2451#ifdef USE_METALNESSMAP
2452	uniform mat3 metalnessMapTransform;
2453	varying vec2 vMetalnessMapUv;
2454#endif
2455#ifdef USE_ROUGHNESSMAP
2456	uniform mat3 roughnessMapTransform;
2457	varying vec2 vRoughnessMapUv;
2458#endif
2459#ifdef USE_ANISOTROPYMAP
2460	uniform mat3 anisotropyMapTransform;
2461	varying vec2 vAnisotropyMapUv;
2462#endif
2463#ifdef USE_CLEARCOATMAP
2464	uniform mat3 clearcoatMapTransform;
2465	varying vec2 vClearcoatMapUv;
2466#endif
2467#ifdef USE_CLEARCOAT_NORMALMAP
2468	uniform mat3 clearcoatNormalMapTransform;
2469	varying vec2 vClearcoatNormalMapUv;
2470#endif
2471#ifdef USE_CLEARCOAT_ROUGHNESSMAP
2472	uniform mat3 clearcoatRoughnessMapTransform;
2473	varying vec2 vClearcoatRoughnessMapUv;
2474#endif
2475#ifdef USE_SHEEN_COLORMAP
2476	uniform mat3 sheenColorMapTransform;
2477	varying vec2 vSheenColorMapUv;
2478#endif
2479#ifdef USE_SHEEN_ROUGHNESSMAP
2480	uniform mat3 sheenRoughnessMapTransform;
2481	varying vec2 vSheenRoughnessMapUv;
2482#endif
2483#ifdef USE_IRIDESCENCEMAP
2484	uniform mat3 iridescenceMapTransform;
2485	varying vec2 vIridescenceMapUv;
2486#endif
2487#ifdef USE_IRIDESCENCE_THICKNESSMAP
2488	uniform mat3 iridescenceThicknessMapTransform;
2489	varying vec2 vIridescenceThicknessMapUv;
2490#endif
2491#ifdef USE_SPECULARMAP
2492	uniform mat3 specularMapTransform;
2493	varying vec2 vSpecularMapUv;
2494#endif
2495#ifdef USE_SPECULAR_COLORMAP
2496	uniform mat3 specularColorMapTransform;
2497	varying vec2 vSpecularColorMapUv;
2498#endif
2499#ifdef USE_SPECULAR_INTENSITYMAP
2500	uniform mat3 specularIntensityMapTransform;
2501	varying vec2 vSpecularIntensityMapUv;
2502#endif
2503#ifdef USE_TRANSMISSIONMAP
2504	uniform mat3 transmissionMapTransform;
2505	varying vec2 vTransmissionMapUv;
2506#endif
2507#ifdef USE_THICKNESSMAP
2508	uniform mat3 thicknessMapTransform;
2509	varying vec2 vThicknessMapUv;
2510#endif`,ez=`#if defined( USE_UV ) || defined( USE_ANISOTROPY )
2511	vUv = vec3( uv, 1 ).xy;
2512#endif
2513#ifdef USE_MAP
2514	vMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;
2515#endif
2516#ifdef USE_ALPHAMAP
2517	vAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;
2518#endif
2519#ifdef USE_LIGHTMAP
2520	vLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;
2521#endif
2522#ifdef USE_AOMAP
2523	vAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;
2524#endif
2525#ifdef USE_BUMPMAP
2526	vBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;
2527#endif
2528#ifdef USE_NORMALMAP
2529	vNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;
2530#endif
2531#ifdef USE_DISPLACEMENTMAP
2532	vDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;
2533#endif
2534#ifdef USE_EMISSIVEMAP
2535	vEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;
2536#endif
2537#ifdef USE_METALNESSMAP
2538	vMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;
2539#endif
2540#ifdef USE_ROUGHNESSMAP
2541	vRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;
2542#endif
2543#ifdef USE_ANISOTROPYMAP
2544	vAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;
2545#endif
2546#ifdef USE_CLEARCOATMAP
2547	vClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;
2548#endif
2549#ifdef USE_CLEARCOAT_NORMALMAP
2550	vClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;
2551#endif
2552#ifdef USE_CLEARCOAT_ROUGHNESSMAP
2553	vClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;
2554#endif
2555#ifdef USE_IRIDESCENCEMAP
2556	vIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;
2557#endif
2558#ifdef USE_IRIDESCENCE_THICKNESSMAP
2559	vIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;
2560#endif
2561#ifdef USE_SHEEN_COLORMAP
2562	vSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;
2563#endif
2564#ifdef USE_SHEEN_ROUGHNESSMAP
2565	vSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;
2566#endif
2567#ifdef USE_SPECULARMAP
2568	vSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;
2569#endif
2570#ifdef USE_SPECULAR_COLORMAP
2571	vSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;
2572#endif
2573#ifdef USE_SPECULAR_INTENSITYMAP
2574	vSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;
2575#endif
2576#ifdef USE_TRANSMISSIONMAP
2577	vTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;
2578#endif
2579#ifdef USE_THICKNESSMAP
2580	vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;
2581#endif`,tz=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0
2582	vec4 worldPosition = vec4( transformed, 1.0 );
2583	#ifdef USE_BATCHING
2584		worldPosition = batchingMatrix * worldPosition;
2585	#endif
2586	#ifdef USE_INSTANCING
2587		worldPosition = instanceMatrix * worldPosition;
2588	#endif
2589	worldPosition = modelMatrix * worldPosition;
2590#endif`;const nz=`varying vec2 vUv;
2591uniform mat3 uvTransform;
2592void main() {
2593	vUv = ( uvTransform * vec3( uv, 1 ) ).xy;
2594	gl_Position = vec4( position.xy, 1.0, 1.0 );
2595}`,iz=`uniform sampler2D t2D;
2596uniform float backgroundIntensity;
2597varying vec2 vUv;
2598void main() {
2599	vec4 texColor = texture2D( t2D, vUv );
2600	#ifdef DECODE_VIDEO_TEXTURE
2601		texColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );
2602	#endif
2603	texColor.rgb *= backgroundIntensity;
2604	gl_FragColor = texColor;
2605	#include <tonemapping_fragment>
2606	#include <colorspace_fragment>
2607}`,az=`varying vec3 vWorldDirection;
2608#include <common>
2609void main() {
2610	vWorldDirection = transformDirection( position, modelMatrix );
2611	#include <begin_vertex>
2612	#include <project_vertex>
2613	gl_Position.z = gl_Position.w;
2614}`,sz=`#ifdef ENVMAP_TYPE_CUBE
2615	uniform samplerCube envMap;
2616#elif defined( ENVMAP_TYPE_CUBE_UV )
2617	uniform sampler2D envMap;
2618#endif
2619uniform float flipEnvMap;
2620uniform float backgroundBlurriness;
2621uniform float backgroundIntensity;
2622uniform mat3 backgroundRotation;
2623varying vec3 vWorldDirection;
2624#include <cube_uv_reflection_fragment>
2625void main() {
2626	#ifdef ENVMAP_TYPE_CUBE
2627		vec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );
2628	#elif defined( ENVMAP_TYPE_CUBE_UV )
2629		vec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness );
2630	#else
2631		vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );
2632	#endif
2633	texColor.rgb *= backgroundIntensity;
2634	gl_FragColor = texColor;
2635	#include <tonemapping_fragment>
2636	#include <colorspace_fragment>
2637}`,rz=`varying vec3 vWorldDirection;
2638#include <common>
2639void main() {
2640	vWorldDirection = transformDirection( position, modelMatrix );
2641	#include <begin_vertex>
2642	#include <project_vertex>
2643	gl_Position.z = gl_Position.w;
2644}`,oz=`uniform samplerCube tCube;
2645uniform float tFlip;
2646uniform float opacity;
2647varying vec3 vWorldDirection;
2648void main() {
2649	vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );
2650	gl_FragColor = texColor;
2651	gl_FragColor.a *= opacity;
2652	#include <tonemapping_fragment>
2653	#include <colorspace_fragment>
2654}`,lz=`#include <common>
2655#include <batching_pars_vertex>
2656#include <uv_pars_vertex>
2657#include <displacementmap_pars_vertex>
2658#include <morphtarget_pars_vertex>
2659#include <skinning_pars_vertex>
2660#include <logdepthbuf_pars_vertex>
2661#include <clipping_planes_pars_vertex>
2662varying vec2 vHighPrecisionZW;
2663void main() {
2664	#include <uv_vertex>
2665	#include <batching_vertex>
2666	#include <skinbase_vertex>
2667	#include <morphinstance_vertex>
2668	#ifdef USE_DISPLACEMENTMAP
2669		#include <beginnormal_vertex>
2670		#include <morphnormal_vertex>
2671		#include <skinnormal_vertex>
2672	#endif
2673	#include <begin_vertex>
2674	#include <morphtarget_vertex>
2675	#include <skinning_vertex>
2676	#include <displacementmap_vertex>
2677	#include <project_vertex>
2678	#include <logdepthbuf_vertex>
2679	#include <clipping_planes_vertex>
2680	vHighPrecisionZW = gl_Position.zw;
2681}`,cz=`#if DEPTH_PACKING == 3200
2682	uniform float opacity;
2683#endif
2684#include <common>
2685#include <packing>
2686#include <uv_pars_fragment>
2687#include <map_pars_fragment>
2688#include <alphamap_pars_fragment>
2689#include <alphatest_pars_fragment>
2690#include <alphahash_pars_fragment>
2691#include <logdepthbuf_pars_fragment>
2692#include <clipping_planes_pars_fragment>
2693varying vec2 vHighPrecisionZW;
2694void main() {
2695	vec4 diffuseColor = vec4( 1.0 );
2696	#include <clipping_planes_fragment>
2697	#if DEPTH_PACKING == 3200
2698		diffuseColor.a = opacity;
2699	#endif
2700	#include <map_fragment>
2701	#include <alphamap_fragment>
2702	#include <alphatest_fragment>
2703	#include <alphahash_fragment>
2704	#include <logdepthbuf_fragment>
2705	#ifdef USE_REVERSED_DEPTH_BUFFER
2706		float fragCoordZ = vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ];
2707	#else
2708		float fragCoordZ = 0.5 * vHighPrecisionZW[ 0 ] / vHighPrecisionZW[ 1 ] + 0.5;
2709	#endif
2710	#if DEPTH_PACKING == 3200
2711		gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );
2712	#elif DEPTH_PACKING == 3201
2713		gl_FragColor = packDepthToRGBA( fragCoordZ );
2714	#elif DEPTH_PACKING == 3202
2715		gl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 );
2716	#elif DEPTH_PACKING == 3203
2717		gl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 );
2718	#endif
2719}`,uz=`#define DISTANCE
2720varying vec3 vWorldPosition;
2721#include <common>
2722#include <batching_pars_vertex>
2723#include <uv_pars_vertex>
2724#include <displacementmap_pars_vertex>
2725#include <morphtarget_pars_vertex>
2726#include <skinning_pars_vertex>
2727#include <clipping_planes_pars_vertex>
2728void main() {
2729	#include <uv_vertex>
2730	#include <batching_vertex>
2731	#include <skinbase_vertex>
2732	#include <morphinstance_vertex>
2733	#ifdef USE_DISPLACEMENTMAP
2734		#include <beginnormal_vertex>
2735		#include <morphnormal_vertex>
2736		#include <skinnormal_vertex>
2737	#endif
2738	#include <begin_vertex>
2739	#include <morphtarget_vertex>
2740	#include <skinning_vertex>
2741	#include <displacementmap_vertex>
2742	#include <project_vertex>
2743	#include <worldpos_vertex>
2744	#include <clipping_planes_vertex>
2745	vWorldPosition = worldPosition.xyz;
2746}`,fz=`#define DISTANCE
2747uniform vec3 referencePosition;
2748uniform float nearDistance;
2749uniform float farDistance;
2750varying vec3 vWorldPosition;
2751#include <common>
2752#include <packing>
2753#include <uv_pars_fragment>
2754#include <map_pars_fragment>
2755#include <alphamap_pars_fragment>
2756#include <alphatest_pars_fragment>
2757#include <alphahash_pars_fragment>
2758#include <clipping_planes_pars_fragment>
2759void main () {
2760	vec4 diffuseColor = vec4( 1.0 );
2761	#include <clipping_planes_fragment>
2762	#include <map_fragment>
2763	#include <alphamap_fragment>
2764	#include <alphatest_fragment>
2765	#include <alphahash_fragment>
2766	float dist = length( vWorldPosition - referencePosition );
2767	dist = ( dist - nearDistance ) / ( farDistance - nearDistance );
2768	dist = saturate( dist );
2769	gl_FragColor = packDepthToRGBA( dist );
2770}`,hz=`varying vec3 vWorldDirection;
2771#include <common>
2772void main() {
2773	vWorldDirection = transformDirection( position, modelMatrix );
2774	#include <begin_vertex>
2775	#include <project_vertex>
2776}`,dz=`uniform sampler2D tEquirect;
2777varying vec3 vWorldDirection;
2778#include <common>
2779void main() {
2780	vec3 direction = normalize( vWorldDirection );
2781	vec2 sampleUV = equirectUv( direction );
2782	gl_FragColor = texture2D( tEquirect, sampleUV );
2783	#include <tonemapping_fragment>
2784	#include <colorspace_fragment>
2785}`,pz=`uniform float scale;
2786attribute float lineDistance;
2787varying float vLineDistance;
2788#include <common>
2789#include <uv_pars_vertex>
2790#include <color_pars_vertex>
2791#include <fog_pars_vertex>
2792#include <morphtarget_pars_vertex>
2793#include <logdepthbuf_pars_vertex>
2794#include <clipping_planes_pars_vertex>
2795void main() {
2796	vLineDistance = scale * lineDistance;
2797	#include <uv_vertex>
2798	#include <color_vertex>
2799	#include <morphinstance_vertex>
2800	#include <morphcolor_vertex>
2801	#include <begin_vertex>
2802	#include <morphtarget_vertex>
2803	#include <project_vertex>
2804	#include <logdepthbuf_vertex>
2805	#include <clipping_planes_vertex>
2806	#include <fog_vertex>
2807}`,mz=`uniform vec3 diffuse;
2808uniform float opacity;
2809uniform float dashSize;
2810uniform float totalSize;
2811varying float vLineDistance;
2812#include <common>
2813#include <color_pars_fragment>
2814#include <uv_pars_fragment>
2815#include <map_pars_fragment>
2816#include <fog_pars_fragment>
2817#include <logdepthbuf_pars_fragment>
2818#include <clipping_planes_pars_fragment>
2819void main() {
2820	vec4 diffuseColor = vec4( diffuse, opacity );
2821	#include <clipping_planes_fragment>
2822	if ( mod( vLineDistance, totalSize ) > dashSize ) {
2823		discard;
2824	}
2825	vec3 outgoingLight = vec3( 0.0 );
2826	#include <logdepthbuf_fragment>
2827	#include <map_fragment>
2828	#include <color_fragment>
2829	outgoingLight = diffuseColor.rgb;
2830	#include <opaque_fragment>
2831	#include <tonemapping_fragment>
2832	#include <colorspace_fragment>
2833	#include <fog_fragment>
2834	#include <premultiplied_alpha_fragment>
2835}`,gz=`#include <common>
2836#include <batching_pars_vertex>
2837#include <uv_pars_vertex>
2838#include <envmap_pars_vertex>
2839#include <color_pars_vertex>
2840#include <fog_pars_vertex>
2841#include <morphtarget_pars_vertex>
2842#include <skinning_pars_vertex>
2843#include <logdepthbuf_pars_vertex>
2844#include <clipping_planes_pars_vertex>
2845void main() {
2846	#include <uv_vertex>
2847	#include <color_vertex>
2848	#include <morphinstance_vertex>
2849	#include <morphcolor_vertex>
2850	#include <batching_vertex>
2851	#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )
2852		#include <beginnormal_vertex>
2853		#include <morphnormal_vertex>
2854		#include <skinbase_vertex>
2855		#include <skinnormal_vertex>
2856		#include <defaultnormal_vertex>
2857	#endif
2858	#include <begin_vertex>
2859	#include <morphtarget_vertex>
2860	#include <skinning_vertex>
2861	#include <project_vertex>
2862	#include <logdepthbuf_vertex>
2863	#include <clipping_planes_vertex>
2864	#include <worldpos_vertex>
2865	#include <envmap_vertex>
2866	#include <fog_vertex>
2867}`,vz=`uniform vec3 diffuse;
2868uniform float opacity;
2869#ifndef FLAT_SHADED
2870	varying vec3 vNormal;
2871#endif
2872#include <common>
2873#include <dithering_pars_fragment>
2874#include <color_pars_fragment>
2875#include <uv_pars_fragment>
2876#include <map_pars_fragment>
2877#include <alphamap_pars_fragment>
2878#include <alphatest_pars_fragment>
2879#include <alphahash_pars_fragment>
2880#include <aomap_pars_fragment>
2881#include <lightmap_pars_fragment>
2882#include <envmap_common_pars_fragment>
2883#include <envmap_pars_fragment>
2884#include <fog_pars_fragment>
2885#include <specularmap_pars_fragment>
2886#include <logdepthbuf_pars_fragment>
2887#include <clipping_planes_pars_fragment>
2888void main() {
2889	vec4 diffuseColor = vec4( diffuse, opacity );
2890	#include <clipping_planes_fragment>
2891	#include <logdepthbuf_fragment>
2892	#include <map_fragment>
2893	#include <color_fragment>
2894	#include <alphamap_fragment>
2895	#include <alphatest_fragment>
2896	#include <alphahash_fragment>
2897	#include <specularmap_fragment>
2898	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
2899	#ifdef USE_LIGHTMAP
2900		vec4 lightMapTexel = texture2D( lightMap, vLightMapUv );
2901		reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;
2902	#else
2903		reflectedLight.indirectDiffuse += vec3( 1.0 );
2904	#endif
2905	#include <aomap_fragment>
2906	reflectedLight.indirectDiffuse *= diffuseColor.rgb;
2907	vec3 outgoingLight = reflectedLight.indirectDiffuse;
2908	#include <envmap_fragment>
2909	#include <opaque_fragment>
2910	#include <tonemapping_fragment>
2911	#include <colorspace_fragment>
2912	#include <fog_fragment>
2913	#include <premultiplied_alpha_fragment>
2914	#include <dithering_fragment>
2915}`,yz=`#define LAMBERT
2916varying vec3 vViewPosition;
2917#include <common>
2918#include <batching_pars_vertex>
2919#include <uv_pars_vertex>
2920#include <displacementmap_pars_vertex>
2921#include <envmap_pars_vertex>
2922#include <color_pars_vertex>
2923#include <fog_pars_vertex>
2924#include <normal_pars_vertex>
2925#include <morphtarget_pars_vertex>
2926#include <skinning_pars_vertex>
2927#include <shadowmap_pars_vertex>
2928#include <logdepthbuf_pars_vertex>
2929#include <clipping_planes_pars_vertex>
2930void main() {
2931	#include <uv_vertex>
2932	#include <color_vertex>
2933	#include <morphinstance_vertex>
2934	#include <morphcolor_vertex>
2935	#include <batching_vertex>
2936	#include <beginnormal_vertex>
2937	#include <morphnormal_vertex>
2938	#include <skinbase_vertex>
2939	#include <skinnormal_vertex>
2940	#include <defaultnormal_vertex>
2941	#include <normal_vertex>
2942	#include <begin_vertex>
2943	#include <morphtarget_vertex>
2944	#include <skinning_vertex>
2945	#include <displacementmap_vertex>
2946	#include <project_vertex>
2947	#include <logdepthbuf_vertex>
2948	#include <clipping_planes_vertex>
2949	vViewPosition = - mvPosition.xyz;
2950	#include <worldpos_vertex>
2951	#include <envmap_vertex>
2952	#include <shadowmap_vertex>
2953	#include <fog_vertex>
2954}`,_z=`#define LAMBERT
2955uniform vec3 diffuse;
2956uniform vec3 emissive;
2957uniform float opacity;
2958#include <common>
2959#include <packing>
2960#include <dithering_pars_fragment>
2961#include <color_pars_fragment>
2962#include <uv_pars_fragment>
2963#include <map_pars_fragment>
2964#include <alphamap_pars_fragment>
2965#include <alphatest_pars_fragment>
2966#include <alphahash_pars_fragment>
2967#include <aomap_pars_fragment>
2968#include <lightmap_pars_fragment>
2969#include <emissivemap_pars_fragment>
2970#include <envmap_common_pars_fragment>
2971#include <envmap_pars_fragment>
2972#include <fog_pars_fragment>
2973#include <bsdfs>
2974#include <lights_pars_begin>
2975#include <normal_pars_fragment>
2976#include <lights_lambert_pars_fragment>
2977#include <shadowmap_pars_fragment>
2978#include <bumpmap_pars_fragment>
2979#include <normalmap_pars_fragment>
2980#include <specularmap_pars_fragment>
2981#include <logdepthbuf_pars_fragment>
2982#include <clipping_planes_pars_fragment>
2983void main() {
2984	vec4 diffuseColor = vec4( diffuse, opacity );
2985	#include <clipping_planes_fragment>
2986	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
2987	vec3 totalEmissiveRadiance = emissive;
2988	#include <logdepthbuf_fragment>
2989	#include <map_fragment>
2990	#include <color_fragment>
2991	#include <alphamap_fragment>
2992	#include <alphatest_fragment>
2993	#include <alphahash_fragment>
2994	#include <specularmap_fragment>
2995	#include <normal_fragment_begin>
2996	#include <normal_fragment_maps>
2997	#include <emissivemap_fragment>
2998	#include <lights_lambert_fragment>
2999	#include <lights_fragment_begin>
3000	#include <lights_fragment_maps>
3001	#include <lights_fragment_end>
3002	#include <aomap_fragment>
3003	vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;
3004	#include <envmap_fragment>
3005	#include <opaque_fragment>
3006	#include <tonemapping_fragment>
3007	#include <colorspace_fragment>
3008	#include <fog_fragment>
3009	#include <premultiplied_alpha_fragment>
3010	#include <dithering_fragment>
3011}`,xz=`#define MATCAP
3012varying vec3 vViewPosition;
3013#include <common>
3014#include <batching_pars_vertex>
3015#include <uv_pars_vertex>
3016#include <color_pars_vertex>
3017#include <displacementmap_pars_vertex>
3018#include <fog_pars_vertex>
3019#include <normal_pars_vertex>
3020#include <morphtarget_pars_vertex>
3021#include <skinning_pars_vertex>
3022#include <logdepthbuf_pars_vertex>
3023#include <clipping_planes_pars_vertex>
3024void main() {
3025	#include <uv_vertex>
3026	#include <color_vertex>
3027	#include <morphinstance_vertex>
3028	#include <morphcolor_vertex>
3029	#include <batching_vertex>
3030	#include <beginnormal_vertex>
3031	#include <morphnormal_vertex>
3032	#include <skinbase_vertex>
3033	#include <skinnormal_vertex>
3034	#include <defaultnormal_vertex>
3035	#include <normal_vertex>
3036	#include <begin_vertex>
3037	#include <morphtarget_vertex>
3038	#include <skinning_vertex>
3039	#include <displacementmap_vertex>
3040	#include <project_vertex>
3041	#include <logdepthbuf_vertex>
3042	#include <clipping_planes_vertex>
3043	#include <fog_vertex>
3044	vViewPosition = - mvPosition.xyz;
3045}`,Sz=`#define MATCAP
3046uniform vec3 diffuse;
3047uniform float opacity;
3048uniform sampler2D matcap;
3049varying vec3 vViewPosition;
3050#include <common>
3051#include <dithering_pars_fragment>
3052#include <color_pars_fragment>
3053#include <uv_pars_fragment>
3054#include <map_pars_fragment>
3055#include <alphamap_pars_fragment>
3056#include <alphatest_pars_fragment>
3057#include <alphahash_pars_fragment>
3058#include <fog_pars_fragment>
3059#include <normal_pars_fragment>
3060#include <bumpmap_pars_fragment>
3061#include
3061 <normalmap_pars_fragment>
3062#include <logdepthbuf_pars_fragment>
3063#include <clipping_planes_pars_fragment>
3064void main() {
3065	vec4 diffuseColor = vec4( diffuse, opacity );
3066	#include <clipping_planes_fragment>
3067	#include <logdepthbuf_fragment>
3068	#include <map_fragment>
3069	#include <color_fragment>
3070	#include <alphamap_fragment>
3071	#include <alphatest_fragment>
3072	#include <alphahash_fragment>
3073	#include <normal_fragment_begin>
3074	#include <normal_fragment_maps>
3075	vec3 viewDir = normalize( vViewPosition );
3076	vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );
3077	vec3 y = cross( viewDir, x );
3078	vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;
3079	#ifdef USE_MATCAP
3080		vec4 matcapColor = texture2D( matcap, uv );
3081	#else
3082		vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );
3083	#endif
3084	vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;
3085	#include <opaque_fragment>
3086	#include <tonemapping_fragment>
3087	#include <colorspace_fragment>
3088	#include <fog_fragment>
3089	#include <premultiplied_alpha_fragment>
3090	#include <dithering_fragment>
3091}`,bz=`#define NORMAL
3092#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )
3093	varying vec3 vViewPosition;
3094#endif
3095#include <common>
3096#include <batching_pars_vertex>
3097#include <uv_pars_vertex>
3098#include <displacementmap_pars_vertex>
3099#include <normal_pars_vertex>
3100#include <morphtarget_pars_vertex>
3101#include <skinning_pars_vertex>
3102#include <logdepthbuf_pars_vertex>
3103#include <clipping_planes_pars_vertex>
3104void main() {
3105	#include <uv_vertex>
3106	#include <batching_vertex>
3107	#include <beginnormal_vertex>
3108	#include <morphinstance_vertex>
3109	#include <morphnormal_vertex>
3110	#include <skinbase_vertex>
3111	#include <skinnormal_vertex>
3112	#include <defaultnormal_vertex>
3113	#include <normal_vertex>
3114	#include <begin_vertex>
3115	#include <morphtarget_vertex>
3116	#include <skinning_vertex>
3117	#include <displacementmap_vertex>
3118	#include <project_vertex>
3119	#include <logdepthbuf_vertex>
3120	#include <clipping_planes_vertex>
3121#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )
3122	vViewPosition = - mvPosition.xyz;
3123#endif
3124}`,Mz=`#define NORMAL
3125uniform float opacity;
3126#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )
3127	varying vec3 vViewPosition;
3128#endif
3129#include <packing>
3130#include <uv_pars_fragment>
3131#include <normal_pars_fragment>
3132#include <bumpmap_pars_fragment>
3133#include <normalmap_pars_fragment>
3134#include <logdepthbuf_pars_fragment>
3135#include <clipping_planes_pars_fragment>
3136void main() {
3137	vec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity );
3138	#include <clipping_planes_fragment>
3139	#include <logdepthbuf_fragment>
3140	#include <normal_fragment_begin>
3141	#include <normal_fragment_maps>
3142	gl_FragColor = vec4( packNormalToRGB( normal ), diffuseColor.a );
3143	#ifdef OPAQUE
3144		gl_FragColor.a = 1.0;
3145	#endif
3146}`,Ez=`#define PHONG
3147varying vec3 vViewPosition;
3148#include <common>
3149#include <batching_pars_vertex>
3150#include <uv_pars_vertex>
3151#include <displacementmap_pars_vertex>
3152#include <envmap_pars_vertex>
3153#include <color_pars_vertex>
3154#include <fog_pars_vertex>
3155#include <normal_pars_vertex>
3156#include <morphtarget_pars_vertex>
3157#include <skinning_pars_vertex>
3158#include <shadowmap_pars_vertex>
3159#include <logdepthbuf_pars_vertex>
3160#include <clipping_planes_pars_vertex>
3161void main() {
3162	#include <uv_vertex>
3163	#include <color_vertex>
3164	#include <morphcolor_vertex>
3165	#include <batching_vertex>
3166	#include <beginnormal_vertex>
3167	#include <morphinstance_vertex>
3168	#include <morphnormal_vertex>
3169	#include <skinbase_vertex>
3170	#include <skinnormal_vertex>
3171	#include <defaultnormal_vertex>
3172	#include <normal_vertex>
3173	#include <begin_vertex>
3174	#include <morphtarget_vertex>
3175	#include <skinning_vertex>
3176	#include <displacementmap_vertex>
3177	#include <project_vertex>
3178	#include <logdepthbuf_vertex>
3179	#include <clipping_planes_vertex>
3180	vViewPosition = - mvPosition.xyz;
3181	#include <worldpos_vertex>
3182	#include <envmap_vertex>
3183	#include <shadowmap_vertex>
3184	#include <fog_vertex>
3185}`,Tz=`#define PHONG
3186uniform vec3 diffuse;
3187uniform vec3 emissive;
3188uniform vec3 specular;
3189uniform float shininess;
3190uniform float opacity;
3191#include <common>
3192#include <packing>
3193#include <dithering_pars_fragment>
3194#include <color_pars_fragment>
3195#include <uv_pars_fragment>
3196#include <map_pars_fragment>
3197#include <alphamap_pars_fragment>
3198#include <alphatest_pars_fragment>
3199#include <alphahash_pars_fragment>
3200#include <aomap_pars_fragment>
3201#include <lightmap_pars_fragment>
3202#include <emissivemap_pars_fragment>
3203#include <envmap_common_pars_fragment>
3204#include <envmap_pars_fragment>
3205#include <fog_pars_fragment>
3206#include <bsdfs>
3207#include <lights_pars_begin>
3208#include <normal_pars_fragment>
3209#include <lights_phong_pars_fragment>
3210#include <shadowmap_pars_fragment>
3211#include <bumpmap_pars_fragment>
3212#include <normalmap_pars_fragment>
3213#include <specularmap_pars_fragment>
3214#include <logdepthbuf_pars_fragment>
3215#include <clipping_planes_pars_fragment>
3216void main() {
3217	vec4 diffuseColor = vec4( diffuse, opacity );
3218	#include <clipping_planes_fragment>
3219	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
3220	vec3 totalEmissiveRadiance = emissive;
3221	#include <logdepthbuf_fragment>
3222	#include <map_fragment>
3223	#include <color_fragment>
3224	#include <alphamap_fragment>
3225	#include <alphatest_fragment>
3226	#include <alphahash_fragment>
3227	#include <specularmap_fragment>
3228	#include <normal_fragment_begin>
3229	#include <normal_fragment_maps>
3230	#include <emissivemap_fragment>
3231	#include <lights_phong_fragment>
3232	#include <lights_fragment_begin>
3233	#include <lights_fragment_maps>
3234	#include <lights_fragment_end>
3235	#include <aomap_fragment>
3236	vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;
3237	#include <envmap_fragment>
3238	#include <opaque_fragment>
3239	#include <tonemapping_fragment>
3240	#include <colorspace_fragment>
3241	#include <fog_fragment>
3242	#include <premultiplied_alpha_fragment>
3243	#include <dithering_fragment>
3244}`,Az=`#define STANDARD
3245varying vec3 vViewPosition;
3246#ifdef USE_TRANSMISSION
3247	varying vec3 vWorldPosition;
3248#endif
3249#include <common>
3250#include <batching_pars_vertex>
3251#include <uv_pars_vertex>
3252#include <displacementmap_pars_vertex>
3253#include <color_pars_vertex>
3254#include <fog_pars_vertex>
3255#include <normal_pars_vertex>
3256#include <morphtarget_pars_vertex>
3257#include <skinning_pars_vertex>
3258#include <shadowmap_pars_vertex>
3259#include <logdepthbuf_pars_vertex>
3260#include <clipping_planes_pars_vertex>
3261void main() {
3262	#include <uv_vertex>
3263	#include <color_vertex>
3264	#include <morphinstance_vertex>
3265	#include <morphcolor_vertex>
3266	#include <batching_vertex>
3267	#include <beginnormal_vertex>
3268	#include <morphnormal_vertex>
3269	#include <skinbase_vertex>
3270	#include <skinnormal_vertex>
3271	#include <defaultnormal_vertex>
3272	#include <normal_vertex>
3273	#include <begin_vertex>
3274	#include <morphtarget_vertex>
3275	#include <skinning_vertex>
3276	#include <displacementmap_vertex>
3277	#include <project_vertex>
3278	#include <logdepthbuf_vertex>
3279	#include <clipping_planes_vertex>
3280	vViewPosition = - mvPosition.xyz;
3281	#include <worldpos_vertex>
3282	#include <shadowmap_vertex>
3283	#include <fog_vertex>
3284#ifdef USE_TRANSMISSION
3285	vWorldPosition = worldPosition.xyz;
3286#endif
3287}`,wz=`#define STANDARD
3288#ifdef PHYSICAL
3289	#define IOR
3290	#define USE_SPECULAR
3291#endif
3292uniform vec3 diffuse;
3293uniform vec3 emissive;
3294uniform float roughness;
3295uniform float metalness;
3296uniform float opacity;
3297#ifdef IOR
3298	uniform float ior;
3299#endif
3300#ifdef USE_SPECULAR
3301	uniform float specularIntensity;
3302	uniform vec3 specularColor;
3303	#ifdef USE_SPECULAR_COLORMAP
3304		uniform sampler2D specularColorMap;
3305	#endif
3306	#ifdef USE_SPECULAR_INTENSITYMAP
3307		uniform sampler2D specularIntensityMap;
3308	#endif
3309#endif
3310#ifdef USE_CLEARCOAT
3311	uniform float clearcoat;
3312	uniform float clearcoatRoughness;
3313#endif
3314#ifdef USE_DISPERSION
3315	uniform float dispersion;
3316#endif
3317#ifdef USE_IRIDESCENCE
3318	uniform float iridescence;
3319	uniform float iridescenceIOR;
3320	uniform float iridescenceThicknessMinimum;
3321	uniform float iridescenceThicknessMaximum;
3322#endif
3323#ifdef USE_SHEEN
3324	uniform vec3 sheenColor;
3325	uniform float sheenRoughness;
3326	#ifdef USE_SHEEN_COLORMAP
3327		uniform sampler2D sheenColorMap;
3328	#endif
3329	#ifdef USE_SHEEN_ROUGHNESSMAP
3330		uniform sampler2D sheenRoughnessMap;
3331	#endif
3332#endif
3333#ifdef USE_ANISOTROPY
3334	uniform vec2 anisotropyVector;
3335	#ifdef USE_ANISOTROPYMAP
3336		uniform sampler2D anisotropyMap;
3337	#endif
3338#endif
3339varying vec3 vViewPosition;
3340#include <common>
3341#include <packing>
3342#include <dithering_pars_fragment>
3343#include <color_pars_fragment>
3344#include <uv_pars_fragment>
3345#include <map_pars_fragment>
3346#include <alphamap_pars_fragment>
3347#include <alphatest_pars_fragment>
3348#include <alphahash_pars_fragment>
3349#include <aomap_pars_fragment>
3350#include <lightmap_pars_fragment>
3351#include <emissivemap_pars_fragment>
3352#include <iridescence_fragment>
3353#include <cube_uv_reflection_fragment>
3354#include <envmap_common_pars_fragment>
3355#include <envmap_physical_pars_fragment>
3356#include <fog_pars_fragment>
3357#include <lights_pars_begin>
3358#include <normal_pars_fragment>
3359#include <lights_physical_pars_fragment>
3360#include <transmission_pars_fragment>
3361#include <shadowmap_pars_fragment>
3362#include <bumpmap_pars_fragment>
3363#include <normalmap_pars_fragment>
3364#include <clearcoat_pars_fragment>
3365#include <iridescence_pars_fragment>
3366#include <roughnessmap_pars_fragment>
3367#include <metalnessmap_pars_fragment>
3368#include <logdepthbuf_pars_fragment>
3369#include <clipping_planes_pars_fragment>
3370void main() {
3371	vec4 diffuseColor = vec4( diffuse, opacity );
3372	#include <clipping_planes_fragment>
3373	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
3374	vec3 totalEmissiveRadiance = emissive;
3375	#include <logdepthbuf_fragment>
3376	#include <map_fragment>
3377	#include <color_fragment>
3378	#include <alphamap_fragment>
3379	#include <alphatest_fragment>
3380	#include <alphahash_fragment>
3381	#include <roughnessmap_fragment>
3382	#include <metalnessmap_fragment>
3383	#include <normal_fragment_begin>
3384	#include <normal_fragment_maps>
3385	#include <clearcoat_normal_fragment_begin>
3386	#include <clearcoat_normal_fragment_maps>
3387	#include <emissivemap_fragment>
3388	#include <lights_physical_fragment>
3389	#include <lights_fragment_begin>
3390	#include <lights_fragment_maps>
3391	#include <lights_fragment_end>
3392	#include <aomap_fragment>
3393	vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;
3394	vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;
3395	#include <transmission_fragment>
3396	vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;
3397	#ifdef USE_SHEEN
3398		float sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );
3399		outgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;
3400	#endif
3401	#ifdef USE_CLEARCOAT
3402		float dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );
3403		vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );
3404		outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;
3405	#endif
3406	#include <opaque_fragment>
3407	#include <tonemapping_fragment>
3408	#include <colorspace_fragment>
3409	#include <fog_fragment>
3410	#include <premultiplied_alpha_fragment>
3411	#include <dithering_fragment>
3412}`,Rz=`#define TOON
3413varying vec3 vViewPosition;
3414#include <common>
3415#include <batching_pars_vertex>
3416#include <uv_pars_vertex>
3417#include <displacementmap_pars_vertex>
3418#include <color_pars_vertex>
3419#include <fog_pars_vertex>
3420#include <normal_pars_vertex>
3421#include <morphtarget_pars_vertex>
3422#include <skinning_pars_vertex>
3423#include <shadowmap_pars_vertex>
3424#include <logdepthbuf_pars_vertex>
3425#include <clipping_planes_pars_vertex>
3426void main() {
3427	#include <uv_vertex>
3428	#include <color_vertex>
3429	#include <morphinstance_vertex>
3430	#include <morphcolor_vertex>
3431	#include <batching_vertex>
3432	#include <beginnormal_vertex>
3433	#include <morphnormal_vertex>
3434	#include <skinbase_vertex>
3435	#include <skinnormal_vertex>
3436	#include <defaultnormal_vertex>
3437	#include <normal_vertex>
3438	#include <begin_vertex>
3439	#include <morphtarget_vertex>
3440	#include <skinning_vertex>
3441	#include <displacementmap_vertex>
3442	#include <project_vertex>
3443	#include <logdepthbuf_vertex>
3444	#include <clipping_planes_vertex>
3445	vViewPosition = - mvPosition.xyz;
3446	#include <worldpos_vertex>
3447	#include <shadowmap_vertex>
3448	#include <fog_vertex>
3449}`,Cz=`#define TOON
3450uniform vec3 diffuse;
3451uniform vec3 emissive;
3452uniform float opacity;
3453#include <common>
3454#include <packing>
3455#include <dithering_pars_fragment>
3456#include <color_pars_fragment>
3457#include <uv_pars_fragment>
3458#include <map_pars_fragment>
3459#include <alphamap_pars_fragment>
3460#include <alphatest_pars_fragment>
3461#include <alphahash_pars_fragment>
3462#include <aomap_pars_fragment>
3463#include <lightmap_pars_fragment>
3464#include <emissivemap_pars_fragment>
3465#include <gradientmap_pars_fragment>
3466#include <fog_pars_fragment>
3467#include <bsdfs>
3468#include <lights_pars_begin>
3469#include <normal_pars_fragment>
3470#include <lights_toon_pars_fragment>
3471#include <shadowmap_pars_fragment>
3472#include <bumpmap_pars_fragment>
3473#include <normalmap_pars_fragment>
3474#include <logdepthbuf_pars_fragment>
3475#include <clipping_planes_pars_fragment>
3476void main() {
3477	vec4 diffuseColor = vec4( diffuse, opacity );
3478	#include <clipping_planes_fragment>
3479	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
3480	vec3 totalEmissiveRadiance = emissive;
3481	#include <logdepthbuf_fragment>
3482	#include <map_fragment>
3483	#include <color_fragment>
3484	#include <alphamap_fragment>
3485	#include <alphatest_fragment>
3486	#include <alphahash_fragment>
3487	#include <normal_fragment_begin>
3488	#include <normal_fragment_maps>
3489	#include <emissivemap_fragment>
3490	#include <lights_toon_fragment>
3491	#include <lights_fragment_begin>
3492	#include <lights_fragment_maps>
3493	#include <lights_fragment_end>
3494	#include <aomap_fragment>
3495	vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;
3496	#include <opaque_fragment>
3497	#include <tonemapping_fragment>
3498	#include <colorspace_fragment>
3499	#include <fog_fragment>
3500	#include <premultiplied_alpha_fragment>
3501	#include <dithering_fragment>
3502}`,Nz=`uniform float size;
3503uniform float scale;
3504#include <common>
3505#include <color_pars_vertex>
3506#include <fog_pars_vertex>
3507#include <morphtarget_pars_vertex>
3508#include <logdepthbuf_pars_vertex>
3509#include <clipping_planes_pars_vertex>
3510#ifdef USE_POINTS_UV
3511	varying vec2 vUv;
3512	uniform mat3 uvTransform;
3513#endif
3514void main() {
3515	#ifdef USE_POINTS_UV
3516		vUv = ( uvTransform * vec3( uv, 1 ) ).xy;
3517	#endif
3518	#include <color_vertex>
3519	#include <morphinstance_vertex>
3520	#include <morphcolor_vertex>
3521	#include <begin_vertex>
3522	#include <morphtarget_vertex>
3523	#include <project_vertex>
3524	gl_PointSize = size;
3525	#ifdef USE_SIZEATTENUATION
3526		bool isPerspective = isPerspectiveMatrix( projectionMatrix );
3527		if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );
3528	#endif
3529	#include <logdepthbuf_vertex>
3530	#include <clipping_planes_vertex>
3531	#include <worldpos_vertex>
3532	#include <fog_vertex>
3533}`,Dz=`uniform vec3 diffuse;
3534uniform float opacity;
3535#include <common>
3536#include <color_pars_fragment>
3537#include <map_particle_pars_fragment>
3538#include <alphatest_pars_fragment>
3539#include <alphahash_pars_fragment>
3540#include <fog_pars_fragment>
3541#include <logdepthbuf_pars_fragment>
3542#include <clipping_planes_pars_fragment>
3543void main() {
3544	vec4 diffuseColor = vec4( diffuse, opacity );
3545	#include <clipping_planes_fragment>
3546	vec3 outgoingLight = vec3( 0.0 );
3547	#include <logdepthbuf_fragment>
3548	#include <map_particle_fragment>
3549	#include <color_fragment>
3550	#include <alphatest_fragment>
3551	#include <alphahash_fragment>
3552	outgoingLight = diffuseColor.rgb;
3553	#include <opaque_fragment>
3554	#include <tonemapping_fragment>
3555	#include <colorspace_fragment>
3556	#include <fog_fragment>
3557	#include <premultiplied_alpha_fragment>
3558}`,Uz=`#include <common>
3559#include <batching_pars_vertex>
3560#include <fog_pars_vertex>
3561#include <morphtarget_pars_vertex>
3562#include <skinning_pars_vertex>
3563#include <logdepthbuf_pars_vertex>
3564#include <shadowmap_pars_vertex>
3565void main() {
3566	#include <batching_vertex>
3567	#include <beginnormal_vertex>
3568	#include <morphinstance_vertex>
3569	#include <morphnormal_vertex>
3570	#include <skinbase_vertex>
3571	#include <skinnormal_vertex>
3572	#include <defaultnormal_vertex>
3573	#include <begin_vertex>
3574	#include <morphtarget_vertex>
3575	#include <skinning_vertex>
3576	#include <project_vertex>
3577	#include <logdepthbuf_vertex>
3578	#include <worldpos_vertex>
3579	#include <shadowmap_vertex>
3580	#include <fog_vertex>
3581}`,Lz=`uniform vec3 color;
3582uniform float opacity;
3583#include <common>
3584#include <packing>
3585#include <fog_pars_fragment>
3586#include <bsdfs>
3587#include <lights_pars_begin>
3588#include <logdepthbuf_pars_fragment>
3589#include <shadowmap_pars_fragment>
3590#include <shadowmask_pars_fragment>
3591void main() {
3592	#include <logdepthbuf_fragment>
3593	gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );
3594	#include <tonemapping_fragment>
3595	#include <colorspace_fragment>
3596	#include <fog_fragment>
3597}`,Oz=`uniform float rotation;
3598uniform vec2 center;
3599#include <common>
3600#include <uv_pars_vertex>
3601#include <fog_pars_vertex>
3602#include <logdepthbuf_pars_vertex>
3603#include <clipping_planes_pars_vertex>
3604void main() {
3605	#include <uv_vertex>
3606	vec4 mvPosition = modelViewMatrix[ 3 ];
3607	vec2 scale = vec2( length( modelMatrix[ 0 ].xyz ), length( modelMatrix[ 1 ].xyz ) );
3608	#ifndef USE_SIZEATTENUATION
3609		bool isPerspective = isPerspectiveMatrix( projectionMatrix );
3610		if ( isPerspective ) scale *= - mvPosition.z;
3611	#endif
3612	vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;
3613	vec2 rotatedPosition;
3614	rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;
3615	rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;
3616	mvPosition.xy += rotatedPosition;
3617	gl_Position = projectionMatrix * mvPosition;
3618	#include <logdepthbuf_vertex>
3619	#include <clipping_planes_vertex>
3620	#include <fog_vertex>
3621}`,zz=`uniform vec3 diffuse;
3622uniform float opacity;
3623#include <common>
3624#include <uv_pars_fragment>
3625#include <map_pars_fragment>
3626#include <alphamap_pars_fragment>
3627#include <alphatest_pars_fragment>
3628#include <alphahash_pars_fragment>
3629#include <fog_pars_fragment>
3630#include <logdepthbuf_pars_fragment>
3631#include <clipping_planes_pars_fragment>
3632void main() {
3633	vec4 diffuseColor = vec4( diffuse, opacity );
3634	#include <clipping_planes_fragment>
3635	vec3 outgoingLight = vec3( 0.0 );
3636	#include <logdepthbuf_fragment>
3637	#include <map_fragment>
3638	#include <alphamap_fragment>
3639	#include <alphatest_fragment>
3640	#include <alphahash_fragment>
3641	outgoingLight = diffuseColor.rgb;
3642	#include <opaque_fragment>
3643	#include <tonemapping_fragment>
3644	#include <colorspace_fragment>
3645	#include <fog_fragment>
3646}`,mn={alphahash_fragment:iL,alphahash_pars_fragment:aL,alphamap_fragment:sL,alphamap_pars_fragment:rL,alph
vendor: 7,299 bytes, line 3646
3646atest_fragment:oL,alphatest_pars_fragment:lL,aomap_fragment:cL,aomap_pars_fragment:uL,batching_pars_vertex:fL,batching_vertex:hL,begin_vertex:dL,beginnormal_vertex:pL,bsdfs:mL,iridescence_fragment:gL,bumpmap_pars_fragment:vL,clipping_planes_fragment:yL,clipping_planes_pars_fragment:_L,clipping_planes_pars_vertex:xL,clipping_planes_vertex:SL,color_fragment:bL,color_pars_fragment:ML,color_pars_vertex:EL,color_vertex:TL,common:AL,cube_uv_reflection_fragment:wL,defaultnormal_vertex:RL,displacementmap_pars_vertex:CL,displacementmap_vertex:NL,emissivemap_fragment:DL,emissivemap_pars_fragment:UL,colorspace_fragment:LL,colorspace_pars_fragment:OL,envmap_fragment:zL,envmap_common_pars_fragment:IL,envmap_pars_fragment:BL,envmap_pars_vertex:PL,envmap_physical_pars_fragment:ZL,envmap_vertex:HL,fog_vertex:FL,fog_pars_vertex:VL,fog_fragment:GL,fog_pars_fragment:kL,gradientmap_pars_fragment:XL,lightmap_pars_fragment:jL,lights_lambert_fragment:qL,lights_lambert_pars_fragment:YL,lights_pars_begin:WL,lights_toon_fragment:KL,lights_toon_pars_fragment:QL,lights_phong_fragment:JL,lights_phong_pars_fragment:$L,lights_physical_fragment:eO,lights_physical_pars_fragment:tO,lights_fragment_begin:nO,lights_fragment_maps:iO,lights_fragment_end:aO,logdepthbuf_fragment:sO,logdepthbuf_pars_fragment:rO,logdepthbuf_pars_vertex:oO,logdepthbuf_vertex:lO,map_fragment:cO,map_pars_fragment:uO,map_particle_fragment:fO,map_particle_pars_fragment:hO,metalnessmap_fragment:dO,metalnessmap_pars_fragment:pO,morphinstance_vertex:mO,morphcolor_vertex:gO,morphnormal_vertex:vO,morphtarget_pars_vertex:yO,morphtarget_vertex:_O,normal_fragment_begin:xO,normal_fragment_maps:SO,normal_pars_fragment:bO,normal_pars_vertex:MO,normal_vertex:EO,normalmap_pars_fragment:TO,clearcoat_normal_fragment_begin:AO,clearcoat_normal_fragment_maps:wO,clearcoat_pars_fragment:RO,iridescence_pars_fragment:CO,opaque_fragment:NO,packing:DO,premultiplied_alpha_fragment:UO,project_vertex:LO,dithering_fragment:OO,dithering_pars_fragment:zO,roughnessmap_fragment:IO,roughnessmap_pars_fragment:BO,shadowmap_pars_fragment:PO,shadowmap_pars_vertex:HO,shadowmap_vertex:FO,shadowmask_pars_fragment:VO,skinbase_vertex:GO,skinning_pars_vertex:kO,skinning_vertex:XO,skinnormal_vertex:jO,specularmap_fragment:qO,specularmap_pars_fragment:YO,tonemapping_fragment:WO,tonemapping_pars_fragment:ZO,transmission_fragment:KO,transmission_pars_fragment:QO,uv_pars_fragment:JO,uv_pars_vertex:$O,uv_vertex:ez,worldpos_vertex:tz,background_vert:nz,background_frag:iz,backgroundCube_vert:az,backgroundCube_frag:sz,cube_vert:rz,cube_frag:oz,depth_vert:lz,depth_frag:cz,distanceRGBA_vert:uz,distanceRGBA_frag:fz,equirect_vert:hz,equirect_frag:dz,linedashed_vert:pz,linedashed_frag:mz,meshbasic_vert:gz,meshbasic_frag:vz,meshlambert_vert:yz,meshlambert_frag:_z,meshmatcap_vert:xz,meshmatcap_frag:Sz,meshnormal_vert:bz,meshnormal_frag:Mz,meshphong_vert:Ez,meshphong_frag:Tz,meshphysical_vert:Az,meshphysical_frag:wz,meshtoon_vert:Rz,meshtoon_frag:Cz,points_vert:Nz,points_frag:Dz,shadow_vert:Uz,shadow_frag:Lz,sprite_vert:Oz,sprite_frag:zz},St={common:{diffuse:{value:new _t(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new cn},alphaMap:{value:null},alphaMapTransform:{value:new cn},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new cn}},envmap:{envMap:{value:null},envMapRotation:{value:new cn},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new cn}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new cn}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new cn},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new cn},normalScale:{value:new Je(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new cn},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new cn}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new cn}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new cn}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new _t(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new _t(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new cn},alphaTest:{value:0},uvTransform:{value:new cn}},sprite:{diffuse:{value:new _t(16777215)},opacity:{value:1},center:{value:new Je(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new cn},alphaMap:{value:null},alphaMapTransform:{value:new cn},alphaTest:{value:0}}},eo={basic:{uniforms:xs([St.common,St.specularmap,St.envmap,St.aomap,St.lightmap,St.fog]),vertexShader:mn.meshbasic_vert,fragmentShader:mn.meshbasic_frag},lambert:{uniforms:xs([St.common,St.specularmap,St.envmap,St.aomap,St.lightmap,St.emissivemap,St.bumpmap,St.normalmap,St.displacementmap,St.fog,St.lights,{emissive:{value:new _t(0)}}]),vertexShader:mn.meshlambert_vert,fragmentShader:mn.meshlambert_frag},phong:{uniforms:xs([St.common,St.specularmap,St.envmap,St.aomap,St.lightmap,St.emissivemap,St.bumpmap,St.normalmap,St.displacementmap,St.fog,St.lights,{emissive:{value:new _t(0)},specular:{value:new _t(1118481)},shininess:{value:30}}]),vertexShader:mn.meshphong_vert,fragmentShader:mn.meshphong_frag},standard:{uniforms:xs([St.common,St.envmap,St.aomap,St.lightmap,St.emissivemap,St.bumpmap,St.normalmap,St.displacementmap,St.roughnessmap,St.metalnessmap,St.fog,St.lights,{emissive:{value:new _t(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:mn.meshphysical_vert,fragmentShader:mn.meshphysical_frag},toon:{uniforms:xs([St.common,St.aomap,St.lightmap,St.emissivemap,St.bumpmap,St.normalmap,St.displacementmap,St.gradientmap,St.fog,St.lights,{emissive:{value:new _t(0)}}]),vertexShader:mn.meshtoon_vert,fragmentShader:mn.meshtoon_frag},matcap:{uniforms:xs([St.common,St.bumpmap,St.normalmap,St.displacementmap,St.fog,{matc
vendor: 5,280 bytes, line 3646
3646ap:{value:null}}]),vertexShader:mn.meshmatcap_vert,fragmentShader:mn.meshmatcap_frag},points:{uniforms:xs([St.points,St.fog]),vertexShader:mn.points_vert,fragmentShader:mn.points_frag},dashed:{uniforms:xs([St.common,St.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:mn.linedashed_vert,fragmentShader:mn.linedashed_frag},depth:{uniforms:xs([St.common,St.displacementmap]),vertexShader:mn.depth_vert,fragmentShader:mn.depth_frag},normal:{uniforms:xs([St.common,St.bumpmap,St.normalmap,St.displacementmap,{opacity:{value:1}}]),vertexShader:mn.meshnormal_vert,fragmentShader:mn.meshnormal_frag},sprite:{uniforms:xs([St.sprite,St.fog]),vertexShader:mn.sprite_vert,fragmentShader:mn.sprite_frag},background:{uniforms:{uvTransform:{value:new cn},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:mn.background_vert,fragmentShader:mn.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new cn}},vertexShader:mn.backgroundCube_vert,fragmentShader:mn.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:mn.cube_vert,fragmentShader:mn.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:mn.equirect_vert,fragmentShader:mn.equirect_frag},distanceRGBA:{uniforms:xs([St.common,St.displacementmap,{referencePosition:{value:new K},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:mn.distanceRGBA_vert,fragmentShader:mn.distanceRGBA_frag},shadow:{uniforms:xs([St.lights,St.fog,{color:{value:new _t(0)},opacity:{value:1}}]),vertexShader:mn.shadow_vert,fragmentShader:mn.shadow_frag}};eo.physical={uniforms:xs([eo.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new cn},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new cn},clearcoatNormalScale:{value:new Je(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new cn},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new cn},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new cn},sheen:{value:0},sheenColor:{value:new _t(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new cn},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new cn},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new cn},transmissionSamplerSize:{value:new Je},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new cn},attenuationDistance:{value:0},attenuationColor:{value:new _t(0)},specularColor:{value:new _t(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new cn},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new cn},anisotropyVector:{value:new Je},anisotropyMap:{value:null},anisotropyMapTransform:{value:new cn}}]),vertexShader:mn.meshphysical_vert,fragmentShader:mn.meshphysical_frag};const T0={r:0,b:0,g:0},ef=new er,Iz=new jt;function Bz(s,e,t,n,a,o,c){const h=new _t(0);let d=o===!0?0:1,p,v,y=null,_=0,b=null;function T(D){let U=D.isScene===!0?D.background:null;return U&&U.isTexture&&(U=(D.backgroundBlurriness>0?t:e).get(U)),U}function R(D){let U=!1;const H=T(D);H===null?M(h,d):H&&H.isColor&&(M(H,1),U=!0);const F=s.xr.getEnvironmentBlendMode();F==="additive"?n.buffers.color.setClear(0,0,0,1,c):F==="alpha-blend"&&n.buffers.color.setClear(0,0,0,0,c),(s.autoClear||U)&&(n.buffers.depth.setTest(!0),n.buffers.depth.setMask(!0),n.buffers.color.setMask(!0),s.clear(s.autoClearColor,s.autoClearDepth,s.autoClearStencil))}function A(D,U){const H=T(U);H&&(H.isCubeTexture||H.mapping===Cd)?(v===void 0&&(v=new Mi(new Ef(1,1,1),new Ts({name:"BackgroundCubeMaterial",uniforms:bd(eo.backgroundCube.uniforms),vertexShader:eo.backgroundCube.vertexShader,fragmentShader:eo.backgroundCube.fragmentShader,side:Ka,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),v.geometry.deleteAttribute("normal"),v.geometry.deleteAttribute("uv"),v.onBeforeRender=function(F,G,V){this.matrixWorld.copyPosition(V.matrixWorld)},Object.defineProperty(v.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),a.update(v)),ef.copy(U.backgroundRotation),ef.x*=-1,ef.y*=-1,ef.z*=-1,H.isCubeTexture&&H.isRenderTargetTexture===!1&&(ef.y*=-1,ef.z*=-1),v.material.uniforms.envMap.value=H,v.material.uniforms.flipEnvMap.value=H.isCubeTexture&&H.isRenderTargetTexture===!1?-1:1,v.material.uniforms.backgroundBlurriness.value=U.backgroundBlurriness,v.material.uniforms.backgroundIntensity.value=U.backgroundIntensity,v.material.uniforms.backgroundRotation.value.setFromMatrix4(Iz.makeRotationFromEuler(ef)),v.material.toneMapped=An.getTransfer(H.colorSpace)!==ni,(y!==H||_!==H.version||b!==s.toneMapping)&&(v.material.needsUpdate=!0,y=H,_=H.version,b=s.toneMapping),v.layers.enableAll(),D.unshift(v,v.geometry,v.material,0,0,null)):H&&H.isTexture&&(p===void 0&&(p=new Mi(new Zc(2,2),new Ts({name:"Backgroun
3646dMaterial",uniforms:bd(eo.background.uniforms),vertexShader:eo.background.vertexShader,fragmentShader:eo.background.fragmentShader,side:ao,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1})),p.geometry.deleteAttribute("normal"),Object.defineProperty(p.material,"map",{get:function(){return this.uniforms.t2D.value}}),a.update(p)),p.material.uniforms.t2D.value=H,p.material.uniforms.backgroundIntensity.value=U.backgroundIntensity,p.material.toneMapped=An.getTransfer(H.colorSpace)!==ni,H.matrixAutoUpdate===!0&&H.updateMatrix(),p.material.uniforms.uvTransform.value.copy(H.matrix),(y!==H||_!==H.version||b!==s.toneMapping)&&(p.material.needsUpdate=!0,y=H,_=H.version,b=s.toneMapping),p.layers.enableAll(),D.unshift(p,p.geometry,p.material,0,0,null))}function M(D,U){D.getRGB(T0,KA(s)),n.buffers.color.setClear(T0.r,T0.g,T0.b,U,c)}function C(){v!==void 0&&(v.geometry.dispose(),v.material.dispose(),v=void 0),p!==void 0&&(p.geometry.dispose(),p.material.dispose(),p=void 0)}return{getClearColor:function(){return h},setClearColor:function(D,U=1){h.set(D),d=U,M(h,d)},getClearAlpha:function(){return d},setClearAlpha:function(D){d=D,M(h,d)},render:R,addToRenderList:A,dispose:C}}function Pz(s,e){const t=s.getParameter(s.MAX_VERTEX_ATTRIBS),n={},a=_(null);let o=a,c=!1;function h(z,Y,se,ce,he){let me=!1;const P=y(ce,se,Y);o!==P&&(o=P,p(o.object)),me=b(z,ce,se,he),me&&T(z,ce,se,he),he!==null&&e.update(he,s.ELEMENT_ARRAY_BUFFER),(me||c)&&(c=!1,U(z,Y,se,ce),he!==null&&s.bindBuffer(s.ELEMENT_ARRAY_BUFFER,e.get(he).buffer))}function d(){return s.createVertexArray()}function p(z){return s.bindVertexArray(z)}function v(z){return s.deleteVertexArray(z)}function y(z,Y,se){const ce=se.wireframe===!0;let he=n[z.id];he===void 0&&(he={},n[z.id]=he);let me=he[Y.id];me===void 0&&(me={},he[Y.id]=me);let P=me[ce];return P===void 0&&(P=_(d()),me[ce]=P),P}function _(z){const Y=[],se=[],ce=[];for(let he=0;he<t;he++)Y[he]=0,se[he]=0,ce[he]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:Y,enabledAttributes:se,attributeDivisors:ce,object:z,attributes:{},index:null}}function b(z,Y,se,ce){const he=o.attributes,me=Y.attributes;let P=0;const Q=se.getAttributes();for(const ee in Q)if(Q[ee].location>=0){const Se=he[ee];let W=me[ee];if(W===void 0&&(ee==="instanceMatrix"&&z.instanceMatrix&&(W=z.instanceMatrix),ee==="instanceColor"&&z.instanceColor&&(W=z.instanceColor)),Se===void 0||Se.attribute!==W||W&&Se.data!==W.data)return!0;P++}return o.attributesNum!==P||o.index!==ce}function T(z,Y,se,ce){const he={},me=Y.attributes;let P=0;const Q=se.getAttributes();for(const ee in Q)if(Q[ee].location>=0){let Se=me[ee];Se===void 0&&(ee==="instanceMatrix"&&z.instanceMatrix&&(Se=z.instanceMatrix),ee==="instanceColor"&&z.instanceColor&&(Se=z.instanceColor));const W={};W.attribute=Se,Se&&Se.data&&(W.data=Se.data),he[ee]=W,P++}o.attributes=he,o.attributesNum=P,o.index=ce}function R(){const z=o.newAttributes;for(let Y=0,se=z.length;Y<se;Y++)z[Y]=0}function A(z){M(z,0)}function M(z,Y){const se=o.newAttributes,ce=o.enabledAttributes,he=o.attributeDivisors;se[z]=1,ce[z]===0&&(s.enableVertexAttribArray(z),ce[z]=1),he[z]!==Y&&(s.vertexAttribDivisor(z,Y),he[z]=Y)}function C(){const z=o.newAttributes,Y=o.enabledAttributes;for(let se=0,ce=Y.length;se<ce;se++)Y[se]!==z[se]&&(s.disableVertexAttribArray(se),Y[se]=0)}function D(z,Y,se,ce,he,me,P){P===!0?s.vertexAttribIPointer(z,Y,se,he,me):s.vertexAttribPointer(z,Y,se,ce,he,me)}function U(z,Y,se,ce){R();const he=ce.attributes,me=se.getAttributes(),P=Y.defaultAttributeValues;for(const Q in me){const ee=me[Q];if(ee.location>=0){let ge=he[Q];if(ge===void 0&&(Q==="instanceMatrix"&&z.instanceMatrix&&(ge=z.instanceMatrix),Q==="instanceColor"&&z.instanceColor&&(ge=z.instanceColor)),ge!==void 0){const Se=ge.normalized,W=ge.itemSize,fe=e.get(ge);if(fe===void 0)continue;const Ce=fe.buffer,Le=fe.type,nt=fe.bytesPerElement,ve=Le===s.INT||Le===s.UNSIGNED_INT||ge.gpuType===ng;if(ge.isInterleavedBufferAttribute){const De=ge.data,ot=De.stride,gt=ge.offset;if(De.isInstancedInterleavedBuffer){for(let Et=0;Et<ee.locationSize;Et++)M(ee.location+Et,De.meshPerAttribute);z.isInstancedMesh!==!0&&ce._maxInstanceCount===void 0&&(ce._maxInstanceCount=De.meshPerAttribute*De.count)}else for(let Et=0;Et<ee.locationSize;Et++)A(ee.location+Et);s.bindBuffer(s.ARRAY_BUFFER,Ce);for(let Et=0;Et<ee.locationSize;Et++)D(ee.location+Et,W/ee.locationSize,Le,Se,ot*nt,(gt+W/ee.locationSize*Et)*nt,ve)}else{if(ge.isInstancedBufferAttribute){for(let De=0;De<ee.locationSize;De++)M(ee.location+De,ge.meshPerAttribute);z.isInstancedMesh!==!0&&ce._maxInstanceCount===void 0&&(ce._maxInstanceCount=ge.meshPerAttribute*ge.count)}else for(let De=0;De<ee.locationSize;De++)A(ee.location+De);s.bindBuffer(s.ARRAY_BUFFER,Ce);for(let De=0;De<ee.locationSize;De++)D(ee.location+De,W/ee.locationSize,Le,Se,W*nt,W/ee.locationSize*De*nt,ve)}}else if(P!==void 0){const Se=P[Q];if(Se!==void 0)switch(Se.length){case 2:s.vertexAttrib2fv(ee.location,Se);break;case 3:s.vertexAttrib3fv(ee.location,Se);break;case 4:s.vertexAttrib4fv(ee.location,Se);break;default:s.vertexAttrib1fv(ee.location,Se)}}}}C()}function H(){V();for(const z in n){const Y=n[z];for(const se in Y){const ce=Y[se];for(const he in ce)v(ce[he].object),delete ce[he];delete Y[se]}delete n[z]}}function F(z){if(n[z.id]===void 0)return;const Y=n[z.id];for(const se in Y){const ce=Y[se];for(const he in ce)v(ce[he].object),delete ce[he];delete Y[se]}delete n[z.id]}function G(z){for(const Y in n){const se=n[Y];
vendor: 4,884 bytes, line 3646
3646if(se[z.id]===void 0)continue;const ce=se[z.id];for(const he in ce)v(ce[he].object),delete ce[he];delete se[z.id]}}function V(){O(),c=!0,o!==a&&(o=a,p(o.object))}function O(){a.geometry=null,a.program=null,a.wireframe=!1}return{setup:h,reset:V,resetDefaultState:O,dispose:H,releaseStatesOfGeometry:F,releaseStatesOfProgram:G,initAttributes:R,enableAttribute:A,disableUnusedAttributes:C}}function Hz(s,e,t){let n;function a(p){n=p}function o(p,v){s.drawArrays(n,p,v),t.update(v,n,1)}function c(p,v,y){y!==0&&(s.drawArraysInstanced(n,p,v,y),t.update(v,n,y))}function h(p,v,y){if(y===0)return;e.get("WEBGL_multi_draw").multiDrawArraysWEBGL(n,p,0,v,0,y);let b=0;for(let T=0;T<y;T++)b+=v[T];t.update(b,n,1)}function d(p,v,y,_){if(y===0)return;const b=e.get("WEBGL_multi_draw");if(b===null)for(let T=0;T<p.length;T++)c(p[T],v[T],_[T]);else{b.multiDrawArraysInstancedWEBGL(n,p,0,v,0,_,0,y);let T=0;for(let R=0;R<y;R++)T+=v[R]*_[R];t.update(T,n,1)}}this.setMode=a,this.render=o,this.renderInstances=c,this.renderMultiDraw=h,this.renderMultiDrawInstances=d}function Fz(s,e,t,n){let a;function o(){if(a!==void 0)return a;if(e.has("EXT_texture_filter_anisotropic")===!0){const G=e.get("EXT_texture_filter_anisotropic");a=s.getParameter(G.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else a=0;return a}function c(G){return!(G!==ki&&n.convert(G)!==s.getParameter(s.IMPLEMENTATION_COLOR_READ_FORMAT))}function h(G){const V=G===ra&&(e.has("EXT_color_buffer_half_float")||e.has("EXT_color_buffer_float"));return!(G!==Es&&n.convert(G)!==s.getParameter(s.IMPLEMENTATION_COLOR_READ_TYPE)&&G!==bi&&!V)}function d(G){if(G==="highp"){if(s.getShaderPrecisionFormat(s.VERTEX_SHADER,s.HIGH_FLOAT).precision>0&&s.getShaderPrecisionFormat(s.FRAGMENT_SHADER,s.HIGH_FLOAT).precision>0)return"highp";G="mediump"}return G==="mediump"&&s.getShaderPrecisionFormat(s.VERTEX_SHADER,s.MEDIUM_FLOAT).precision>0&&s.getShaderPrecisionFormat(s.FRAGMENT_SHADER,s.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let p=t.precision!==void 0?t.precision:"highp";const v=d(p);v!==p&&(console.warn("THREE.WebGLRenderer:",p,"not supported, using",v,"instead."),p=v);const y=t.logarithmicDepthBuffer===!0,_=t.reversedDepthBuffer===!0&&e.has("EXT_clip_control"),b=s.getParameter(s.MAX_TEXTURE_IMAGE_UNITS),T=s.getParameter(s.MAX_VERTEX_TEXTURE_IMAGE_UNITS),R=s.getParameter(s.MAX_TEXTURE_SIZE),A=s.getParameter(s.MAX_CUBE_MAP_TEXTURE_SIZE),M=s.getParameter(s.MAX_VERTEX_ATTRIBS),C=s.getParameter(s.MAX_VERTEX_UNIFORM_VECTORS),D=s.getParameter(s.MAX_VARYING_VECTORS),U=s.getParameter(s.MAX_FRAGMENT_UNIFORM_VECTORS),H=T>0,F=s.getParameter(s.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:o,getMaxPrecision:d,textureFormatReadable:c,textureTypeReadable:h,precision:p,logarithmicDepthBuffer:y,reversedDepthBuffer:_,maxTextures:b,maxVertexTextures:T,maxTextureSize:R,maxCubemapSize:A,maxAttributes:M,maxVertexUniforms:C,maxVaryings:D,maxFragmentUniforms:U,vertexTextures:H,maxSamples:F}}function Vz(s){const e=this;let t=null,n=0,a=!1,o=!1;const c=new Bc,h=new cn,d={value:null,needsUpdate:!1};this.uniform=d,this.numPlanes=0,this.numIntersection=0,this.init=function(y,_){const b=y.length!==0||_||n!==0||a;return a=_,n=y.length,b},this.beginShadows=function(){o=!0,v(null)},this.endShadows=function(){o=!1},this.setGlobalState=function(y,_){t=v(y,_,0)},this.setState=function(y,_,b){const T=y.clippingPlanes,R=y.clipIntersection,A=y.clipShadows,M=s.get(y);if(!a||T===null||T.length===0||o&&!A)o?v(null):p();else{const C=o?0:n,D=C*4;let U=M.clippingState||null;d.value=U,U=v(T,_,D,b);for(let H=0;H!==D;++H)U[H]=t[H];M.clippingState=U,this.numIntersection=R?this.numPlanes:0,this.numPlanes+=C}};function p(){d.value!==t&&(d.value=t,d.needsUpdate=n>0),e.numPlanes=n,e.numIntersection=0}function v(y,_,b,T){const R=y!==null?y.length:0;let A=null;if(R!==0){if(A=d.value,T!==!0||A===null){const M=b+R*4,C=_.matrixWorldInverse;h.getNormalMatrix(C),(A===null||A.length<M)&&(A=new Float32Array(M));for(let D=0,U=b;D!==R;++D,U+=4)c.copy(y[D]).applyMatrix4(C,h),c.normal.toArray(A,U),A[U+3]=c.constant}d.value=A,d.needsUpdate=!0}return e.numPlanes=R,e.numIntersection=0,A}}function Gz(s){let e=new WeakMap;function t(c,h){return h===fd?c.mapping=Wo:h===Hm&&(c.mapping=kc),c}function n(c){if(c&&c.isTexture){const h=c.mapping;if(h===fd||h===Hm)if(e.has(c)){const d=e.get(c).texture;return t(d,c.mapping)}else{const d=c.image;if(d&&d.height>0){const p=new Mb(d.height);return p.fromEquirectangularTexture(s,c),e.set(c,p),c.addEventListener("dispose",a),t(p.texture,c.mapping)}else return null}}return c}function a(c){const h=c.target;h.removeEventListener("dispose",a);const d=e.get(h);d!==void 0&&(e.delete(h),d.dispose())}function o(){e=new WeakMap}return{get:n,dispose:o}}const sd=4,UE=[.125,.215,.35,.446,.526,.582],rf=20,Wx=new wf,LE=new _t;let Zx=null,Kx=0,Qx=0,Jx=!1;const sf=(1+Math.sqrt(5))/2,ed=1/sf,OE=[new K(-sf,ed,0),new K(sf,ed,0),new K(-ed,0,sf),new 
vendor: 8,613 bytes, lines 3646-3721
3646K(ed,0,sf),new K(0,sf,-ed),new K(0,sf,ed),new K(-1,1,-1),new K(1,1,-1),new K(-1,1,1),new K(1,1,1)],kz=new K;class kS{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,n=.1,a=100,o={}){const{size:c=256,position:h=kz}=o;Zx=this._renderer.getRenderTarget(),Kx=this._renderer.getActiveCubeFace(),Qx=this._renderer.getActiveMipmapLevel(),Jx=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(c);const d=this._allocateTargets();return d.depthBuffer=!0,this._sceneToCubeUV(e,n,a,d,h),t>0&&this._blur(d,0,0,t),this._applyPMREM(d),this._cleanup(d),d}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=BE(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=IE(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e<this._lodPlanes.length;e++)this._lodPlanes[e].dispose()}_cleanup(e){this._renderer.setRenderTarget(Zx,Kx,Qx),this._renderer.xr.enabled=Jx,e.scissorTest=!1,A0(e,0,0,e.width,e.height)}_fromTexture(e,t){e.mapping===Wo||e.mapping===kc?this._setSize(e.image.length===0?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4),Zx=this._renderer.getRenderTarget(),Kx=this._renderer.getActiveCubeFace(),Qx=this._renderer.getActiveMipmapLevel(),Jx=this._renderer.xr.enabled,this._renderer.xr.enabled=!1;const n=t||this._allocateTargets();return this._textureToCubeUV(e,n),this._applyPMREM(n),this._cleanup(n),n}_allocateTargets(){const e=3*Math.max(this._cubeSize,112),t=4*this._cubeSize,n={magFilter:Hn,minFilter:Hn,generateMipmaps:!1,type:ra,format:ki,colorSpace:Qi,depthBuffer:!1},a=zE(e,t,n);if(this._pingPongRenderTarget===null||this._pingPongRenderTarget.width!==e||this._pingPongRenderTarget.height!==t){this._pingPongRenderTarget!==null&&this._dispose(),this._pingPongRenderTarget=zE(e,t,n);const{_lodMax:o}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=Xz(o)),this._blurMaterial=jz(o,e,t)}return a}_compileMaterial(e){const t=new Mi(this._lodPlanes[0],e);this._renderer.compile(t,Wx)}_sceneToCubeUV(e,t,n,a,o){const d=new sa(90,1,t,n),p=[1,-1,1,1,1,1],v=[1,1,1,-1,-1,-1],y=this._renderer,_=y.autoClear,b=y.toneMapping;y.getClearColor(LE),y.toneMapping=no,y.autoClear=!1,y.state.buffers.depth.getReversed()&&(y.setRenderTarget(a),y.clearDepth(),y.setRenderTarget(null));const R=new Bs({name:"PMREM.Background",side:Ka,depthWrite:!1,depthTest:!1}),A=new Mi(new Ef,R);let M=!1;const C=e.background;C?C.isColor&&(R.color.copy(C),e.background=null,M=!0):(R.color.copy(LE),M=!0);for(let D=0;D<6;D++){const U=D%3;U===0?(d.up.set(0,p[D],0),d.position.set(o.x,o.y,o.z),d.lookAt(o.x+v[D],o.y,o.z)):U===1?(d.up.set(0,0,p[D]),d.position.set(o.x,o.y,o.z),d.lookAt(o.x,o.y+v[D],o.z)):(d.up.set(0,p[D],0),d.position.set(o.x,o.y,o.z),d.lookAt(o.x,o.y,o.z+v[D]));const H=this._cubeSize;A0(a,U*H,D>2?H:0,H,H),y.setRenderTarget(a),M&&y.render(A,d),y.render(e,d)}A.geometry.dispose(),A.material.dispose(),y.toneMapping=b,y.autoClear=_,e.background=C}_textureToCubeUV(e,t){const n=this._renderer,a=e.mapping===Wo||e.mapping===kc;a?(this._cubemapMaterial===null&&(this._cubemapMaterial=BE()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=IE());const o=a?this._cubemapMaterial:this._equirectMaterial,c=new Mi(this._lodPlanes[0],o),h=o.uniforms;h.envMap.value=e;const d=this._cubeSize;A0(t,0,0,3*d,2*d),n.setRenderTarget(t),n.render(c,Wx)}_applyPMREM(e){const t=this._renderer,n=t.autoClear;t.autoClear=!1;const a=this._lodPlanes.length;for(let o=1;o<a;o++){const c=Math.sqrt(this._sigmas[o]*this._sigmas[o]-this._sigmas[o-1]*this._sigmas[o-1]),h=OE[(a-o-1)%OE.length];this._blur(e,o-1,o,c,h)}t.autoClear=n}_blur(e,t,n,a,o){const c=this._pingPongRenderTarget;this._halfBlur(e,c,t,n,a,"latitudinal",o),this._halfBlur(c,e,n,n,a,"longitudinal",o)}_halfBlur(e,t,n,a,o,c,h){const d=this._renderer,p=this._blurMaterial;c!=="latitudinal"&&c!=="longitudinal"&&console.error("blur direction must be either latitudinal or longitudinal!");const v=3,y=new Mi(this._lodPlanes[a],p),_=p.uniforms,b=this._sizeLods[n]-1,T=isFinite(o)?Math.PI/(2*b):2*Math.PI/(2*rf-1),R=o/T,A=isFinite(o)?1+Math.floor(v*R):rf;A>rf&&console.warn(`sigmaRadians, ${o}, is too large and will clip, as it requested ${A} samples when the maximum is set to ${rf}`);const M=[];let C=0;for(let G=0;G<rf;++G){const V=G/R,O=Math.exp(-V*V/2);M.push(O),G===0?C+=O:G<A&&(C+=2*O)}for(let G=0;G<M.length;G++)M[G]=M[G]/C;_.envMap.value=e.texture,_.samples.value=A,_.weights.value=M,_.latitudinal.value=c==="latitudinal",h&&(_.poleAxis.value=h);const{_lodMax:D}=this;_.dTheta.value=T,_.mipInt.value=D-n;const U=this._sizeLods[a],H=3*U*(a>D-sd?a-D+sd:0),F=4*(this._cubeSize-U);A0(t,H,F,3*U,2*U),d.setRenderTarget(t),d.render(y,Wx)}}function Xz(s){const e=[],t=[],n=[];let a=s;const o=s-sd+1+UE.length;for(let c=0;c<o;c++){const h=Math.pow(2,a);t.push(h);let d=1/h;c>s-sd?d=UE[c-s+sd-1]:c===0&&(d=0),n.push(d);const p=1/(h-2),v=-p,y=1+p,_=[v,v,y,v,y,y,v,v,y,y,v,y],b=6,T=6,R=3,A=2,M=1,C=new Float32Array(R*T*b),D=new Float32Array(A*T*b),U=new Float32Array(M*T*b);for(let F=0;F<b;F++){const G=F%3*2/3-1,V=F>2?0:-1,O=[G,V,0,G+2/3,V,0,G+2/3,V+1,0,G,V,0,G+2/3,V+1,0,G,V+1,0];C.set(O,R*T*F),D.set(_,A*T*F);const z=[F,F,F,F,F,F];U.set(z,M*T*F)}const H=new un;H.setAttribute("position",new Qn(C,R)),H.setAttribute("uv",new Qn(D,A)),H.setAttribute("faceIndex",new Qn(U,M)),e.push(H),a>sd&&a--}return{lodPlanes:e,sizeLods:t,sigmas:n}}function zE(s,e,t){const n=new $s(s,e,t);return n.texture.mapping=Cd,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function A0(s,e,t,n,a){s.viewport.set(e,t,n,a),s.scissor.set(e,t,n,a)}function jz(s,e,t){const n=new Float32Array(rf),a=new K(0,1,0);return new Ts({name:"SphericalGaussianBlur",defines:{n:rf,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${s}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:n},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:a}},vertexShader:Jb(),fragmentShader:`
3647
3648			precision mediump float;
3649			precision mediump int;
3650
3651			varying vec3 vOutputDirection;
3652
3653			uniform sampler2D envMap;
3654			uniform int samples;
3655			uniform float weights[ n ];
3656			uniform bool latitudinal;
3657			uniform float dTheta;
3658			uniform float mipInt;
3659			uniform vec3 poleAxis;
3660
3661			#define ENVMAP_TYPE_CUBE_UV
3662			#include <cube_uv_reflection_fragment>
3663
3664			vec3 getSample( float theta, vec3 axis ) {
3665
3666				float cosTheta = cos( theta );
3667				// Rodrigues' axis-angle rotation
3668				vec3 sampleDirection = vOutputDirection * cosTheta
3669					+ cross( axis, vOutputDirection ) * sin( theta )
3670					+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );
3671
3672				return bilinearCubeUV( envMap, sampleDirection, mipInt );
3673
3674			}
3675
3676			void main() {
3677
3678				vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );
3679
3680				if ( all( equal( axis, vec3( 0.0 ) ) ) ) {
3681
3682					axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );
3683
3684				}
3685
3686				axis = normalize( axis );
3687
3688				gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );
3689				gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );
3690
3691				for ( int i = 1; i < n; i++ ) {
3692
3693					if ( i >= samples ) {
3694
3695						break;
3696
3697					}
3698
3699					float theta = dTheta * float( i );
3700					gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );
3701					gl_FragColor.rgb += weights[ i ] * getSample( theta, axis );
3702
3703				}
3704
3705			}
3706		`,blending:qo,depthTest:!1,depthWrite:!1})}function IE(){return new Ts({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:Jb(),fragmentShader:`
3707
3708			precision mediump float;
3709			precision mediump int;
3710
3711			varying vec3 vOutputDirection;
3712
3713			uniform sampler2D envMap;
3714
3715			#include <common>
3716
3717			void main() {
3718
3719				vec3 outputDirection = normalize( vOutputDirection );
3720				vec2 uv = equirectUv( outputDirection );
3721
3722				gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );
3723
3724			}
3725		`,blending:qo,depthTest:!1,depthWrite:!1})}function BE(){return new Ts({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:Jb(),fragmentShader:`
3726
3727			precision mediump float;
3728			precision mediump int;
3729
3730			uniform float flipEnvMap;
3731
3732			varying vec3 vOutputDirection;
3733
3734			uniform samplerCube envMap;
3735
3736			void main() {
3737
3738				gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );
3739
3740			}
3741		`,blending:qo,depthTest:!1,depthWrite:!1})}function Jb(){return`
3742
3743		precision mediump float;
3744		precision mediump int;
3745
3746		attribute float faceIndex;
3747
3748		varying vec3 vOutputDirection;
3749
3750		// RH coordinate system; PMREM face-indexing convention
3751		vec3 getDirection( vec2 uv, float face ) {
3752
3753			uv = 2.0 * uv - 1.0;
3754
3755			vec3 direction = vec3( uv, 1.0 );
3756
3757			if ( face == 0.0 ) {
3758
3759				direction = direction.zyx; // ( 1, v, u ) pos x
3760
3761			} else if ( face == 1.0 ) {
3762
3763				direction = direction.xzy;
3764				direction.xz *= -1.0; // ( -u, 1, -v ) pos y
3765
3766			} else if ( face == 2.0 ) {
3767
3768				direction.x *= -1.0; // ( -u, v, 1 ) pos z
3769
3770			} else if ( face == 3.0 ) {
3771
3772				direction = direction.zyx;
3773				direction.xz *= -1.0; // ( -1, v, -u ) neg x
3774
3775			} else if ( face == 4.0 ) {
3776
3777				direction = direction.xzy;
3778				direction.xy *= -1.0; // ( -u, -1, v ) neg y
3779
3780			} else if ( face == 5.0 ) {
3781
3782				direction.z *= -1.0; // ( u, v, -1 ) neg z
3783
3784			}
3785
3786			return direction;
3787
3788		}
3789
3790		void main() {
3791
3792			vOutputDirection = getDirection( uv, faceIndex );
3793			gl_Position = vec4( position, 1.0 );
3794
3795		}
3796	`}function qz(s){let e=new WeakMap,t=null;function n(h){if(h&&h.isTexture){const d=h.mapping,p=d===fd||d===Hm,v=d===Wo||d===kc;if(p||v){let y=e.get(h);const _=y!==void 0?y.texture.pmremVersion:0;if(h.isRenderTargetTexture&&h.pmremVersion!==_)return t===null&&(t=new kS(s)),y=p?t.fromEquirectangular(h,y):t.fromCubemap(h,y),y.texture.pmremVersion=h.pmremVersion,e.set(h,y),y.texture;if(y!==void 0)return y.texture;{const b=h.image;return p&&b&&b.height>0||v&&b&&a(b)?(t===null&&(t=new kS(s)),y=p?t.fromEquirectangular(h):t.fromCubemap(h),y.texture.pmremVersion=h.pmremVersion,e.set(h,y),h.addEventListener("dispose",o),y.texture):null}}}return h}function a(h){let d=0;const p=6;for(let v=0;v<p;v++)h[v]!==void 0&&d++;return d===p}function o(h){const d=h.target;d.removeEventListener("dispose",o);const p=e.get(d);p!==void 0&&(e.delete(d),p.dispose())}function c(){e=new WeakMap,t!==null&&(t.dispose(),t=null)}return{get:n,dispose:c}}function Yz(s){const e={};function t(n){if(e[n]!==void 0)return e[n];let a;switch(n){case"WEBGL_depth_texture":a=s.getExtension("WEBGL_depth_texture")||s.getExtension("MOZ_WEBGL_depth_texture")||s.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":a=s.getExtension("EXT_texture_filter_anisotropic")||s.getExtension("MOZ_EXT_texture_filter_anisotropic")||s.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":a=s.getExtension("WEBGL_compressed_texture_s3tc")||s.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||s.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":a=s.getExtension("WEBGL_compressed_texture_pvrtc")||s.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:a=s.getExtension(n)}return e[n]=a,a}return{has:function(n){return t(n)!==null},init:function(){t("EXT_color_buffer_float"),t("WEBGL_clip_cull_distance"),t("OES_texture_float_linear"),t("EXT_color_buffer_half_float"),t("WEBGL_multisampled_render_to_texture"),t("WEBGL_render_shared_exponent")},get:function(n){const a=t(n);return a===null&&Xm("THREE.WebGLRenderer: "+n+" extension not supported."),a}}}function Wz(s,e,t,n){const a={},o=new WeakMap;function c(y){const _=y.target;_.index!==null&&e.remove(_.index);for(const T in _.attributes)e.remove(_.attributes[T]);_.removeEventListener("dispose",c),delete a[_.id];const b=o.get(_);b&&(e.remove(b),o.delete(_)),n.releaseStatesOfGeometry(_),_.isInstancedBufferGeometry===!0&&delete _._maxInstanceCount,t.memory.geometries--}function h(y,_){return a[_.id]===!0||(_.addEventListener("dispose",c),a[_.id]=!0,t.memory.geometries++),_}function d(y){const _=y.attributes;for(const b in _)e.update(_[b],s.ARRAY_BUFFER)}function p(y){const _=[],b=y.index,T=y.attributes.position;let R=0;if(b!==null){const C=b.array;
vendor: 19,537 bytes, lines 3796-3831
3796R=b.version;for(let D=0,U=C.length;D<U;D+=3){const H=C[D+0],F=C[D+1],G=C[D+2];_.push(H,F,F,G,G,H)}}else if(T!==void 0){const C=T.array;R=T.version;for(let D=0,U=C.length/3-1;D<U;D+=3){const H=D+0,F=D+1,G=D+2;_.push(H,F,F,G,G,H)}}else return;const A=new(qA(_)?Sb:xb)(_,1);A.version=R;const M=o.get(y);M&&e.remove(M),o.set(y,A)}function v(y){const _=o.get(y);if(_){const b=y.index;b!==null&&_.version<b.version&&p(y)}else p(y);return o.get(y)}return{get:h,update:d,getWireframeAttribute:v}}function Zz(s,e,t){let n;function a(_){n=_}let o,c;function h(_){o=_.type,c=_.bytesPerElement}function d(_,b){s.drawElements(n,b,o,_*c),t.update(b,n,1)}function p(_,b,T){T!==0&&(s.drawElementsInstanced(n,b,o,_*c,T),t.update(b,n,T))}function v(_,b,T){if(T===0)return;e.get("WEBGL_multi_draw").multiDrawElementsWEBGL(n,b,0,o,_,0,T);let A=0;for(let M=0;M<T;M++)A+=b[M];t.update(A,n,1)}function y(_,b,T,R){if(T===0)return;const A=e.get("WEBGL_multi_draw");if(A===null)for(let M=0;M<_.length;M++)p(_[M]/c,b[M],R[M]);else{A.multiDrawElementsInstancedWEBGL(n,b,0,o,_,0,R,0,T);let M=0;for(let C=0;C<T;C++)M+=b[C]*R[C];t.update(M,n,1)}}this.setMode=a,this.setIndex=h,this.render=d,this.renderInstances=p,this.renderMultiDraw=v,this.renderMultiDrawInstances=y}function Kz(s){const e={geometries:0,textures:0},t={frame:0,calls:0,triangles:0,points:0,lines:0};function n(o,c,h){switch(t.calls++,c){case s.TRIANGLES:t.triangles+=h*(o/3);break;case s.LINES:t.lines+=h*(o/2);break;case s.LINE_STRIP:t.lines+=h*(o-1);break;case s.LINE_LOOP:t.lines+=h*o;break;case s.POINTS:t.points+=h*o;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",c);break}}function a(){t.calls=0,t.triangles=0,t.points=0,t.lines=0}return{memory:e,render:t,programs:null,autoReset:!0,reset:a,update:n}}function Qz(s,e,t){const n=new WeakMap,a=new Gn;function o(c,h,d){const p=c.morphTargetInfluences,v=h.morphAttributes.position||h.morphAttributes.normal||h.morphAttributes.color,y=v!==void 0?v.length:0;let _=n.get(h);if(_===void 0||_.count!==y){let z=function(){V.dispose(),n.delete(h),h.removeEventListener("dispose",z)};var b=z;_!==void 0&&_.texture.dispose();const T=h.morphAttributes.position!==void 0,R=h.morphAttributes.normal!==void 0,A=h.morphAttributes.color!==void 0,M=h.morphAttributes.position||[],C=h.morphAttributes.normal||[],D=h.morphAttributes.color||[];let U=0;T===!0&&(U=1),R===!0&&(U=2),A===!0&&(U=3);let H=h.attributes.position.count*U,F=1;H>e.maxTextureSize&&(F=Math.ceil(H/e.maxTextureSize),H=e.maxTextureSize);const G=new Float32Array(H*F*4*y),V=new Yy(G,H,F,y);V.type=bi,V.needsUpdate=!0;const O=U*4;for(let Y=0;Y<y;Y++){const se=M[Y],ce=C[Y],he=D[Y],me=H*F*4*Y;for(let P=0;P<se.count;P++){const Q=P*O;T===!0&&(a.fromBufferAttribute(se,P),G[me+Q+0]=a.x,G[me+Q+1]=a.y,G[me+Q+2]=a.z,G[me+Q+3]=0),R===!0&&(a.fromBufferAttribute(ce,P),G[me+Q+4]=a.x,G[me+Q+5]=a.y,G[me+Q+6]=a.z,G[me+Q+7]=0),A===!0&&(a.fromBufferAttribute(he,P),G[me+Q+8]=a.x,G[me+Q+9]=a.y,G[me+Q+10]=a.z,G[me+Q+11]=he.itemSize===4?a.w:1)}}_={count:y,texture:V,size:new Je(H,F)},n.set(h,_),h.addEventListener("dispose",z)}if(c.isInstancedMesh===!0&&c.morphTexture!==null)d.getUniforms().setValue(s,"morphTexture",c.morphTexture,t);else{let T=0;for(let A=0;A<p.length;A++)T+=p[A];const R=h.morphTargetsRelative?1:1-T;d.getUniforms().setValue(s,"morphTargetBaseInfluence",R),d.getUniforms().setValue(s,"morphTargetInfluences",p)}d.getUniforms().setValue(s,"morphTargetsTexture",_.texture,t),d.getUniforms().setValue(s,"morphTargetsTextureSize",_.size)}return{update:o}}function Jz(s,e,t,n){let a=new WeakMap;function o(d){const p=n.render.frame,v=d.geometry,y=e.get(d,v);if(a.get(y)!==p&&(e.update(y),a.set(y,p)),d.isInstancedMesh&&(d.hasEventListener("dispose",h)===!1&&d.addEventListener("dispose",h),a.get(d)!==p&&(t.update(d.instanceMatrix,s.ARRAY_BUFFER),d.instanceColor!==null&&t.update(d.instanceColor,s.ARRAY_BUFFER),a.set(d,p))),d.isSkinnedMesh){const _=d.skeleton;a.get(_)!==p&&(_.update(),a.set(_,p))}return y}function c(){a=new WeakMap}function h(d){const p=d.target;p.removeEventListener("dispose",h),t.remove(p.instanceMatrix),p.instanceColor!==null&&t.remove(p.instanceColor)}return{update:o,dispose:c}}const X2=new ei,PE=new n_(1,1),j2=new Yy,q2=new Wy,Y2=new sg,HE=[],FE=[],VE=new Float32Array(16),GE=new Float32Array(9),kE=new Float32Array(4);function Ld(s,e,t){const n=s[0];if(n<=0||n>0)return s;const a=e*t;let o=HE[a];if(o===void 0&&(o=new Float32Array(a),HE[a]=o),e!==0){n.toArray(o,0);for(let c=1,h=0;c!==e;++c)h+=t,s[c].toArray(o,h)}return o}function ca(s,e){if(s.length!==e.length)return!1;for(let t=0,n=s.length;t<n;t++)if(s[t]!==e[t])return!1;return!0}function ua(s,e){for(let t=0,n=e.length;t<n;t++)s[t]=e[t]}function y_(s,e){let t=FE[e];t===void 0&&(t=new Int32Array(e),FE[e]=t);for(let n=0;n!==e;++n)t[n]=s.allocateTextureUnit();return t}function $z(s,e){const t=this.cache;t[0]!==e&&(s.uniform1f(this.addr,e),t[0]=e)}function e4(s,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y)&&(s.uniform2f(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(ca(t,e))return;s.uniform2fv(this.addr,e),ua(t,e)}}function t4(s,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(s.uniform3f(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else if(e.r!==void 0)(t[0]!==e.r||t[1]!==e.g||t[2]!==e.b)&&(s.uniform3f(this.addr,e.r,e.g,e.b),t[0]=e.r,t[1]=e.g,t[2]=e.b);else{if(ca(t,e))return;s.uniform3fv(this.addr,e),ua(t,e)}}function n4(s,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z||t[3]!==e.w)&&(s.uniform4f(this.addr,e.x,e.y,e.z,e.w),t[0]=e.x,t[1]=e.y,t[2]=e.z,t[3]=e.w);else{if(ca(t,e))return;s.uniform4fv(this.addr,e),ua(t,e)}}function i4(s,e){const t=this.cache,n=e.elements;if(n===void 0){if(ca(t,e))return;s.uniformMatrix2fv(this.addr,!1,e),ua(t,e)}else{if(ca(t,n))return;kE.set(n),s.uniformMatrix2fv(this.addr,!1,kE),ua(t,n)}}function a4(s,e){const t=this.cache,n=e.elements;if(n===void 0){if(ca(t,e))return;s.uniformMatrix3fv(this.addr,!1,e),ua(t,e)}else{if(ca(t,n))return;GE.set(n),s.uniformMatrix3fv(this.addr,!1,GE),ua(t,n)}}function s4(s,e){const t=this.cache,n=e.elements;if(n===void 0){if(ca(t,e))return;s.uniformMatrix4fv(this.addr,!1,e),ua(t,e)}else{if(ca(t,n))return;VE.set(n),s.uniformMatrix4fv(this.addr,!1,VE),ua(t,n)}}function r4(s,e){const t=this.cache;t[0]!==e&&(s.uniform1i(this.addr,e),t[0]=e)}function o4(s,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y)&&(s.uniform2i(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(ca(t,e))return;s.uniform2iv(this.addr,e),ua(t,e)}}function l4(s,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(s.uniform3i(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else{if(ca(t,e))return;s.uniform3iv(this.addr,e),ua(t,e)}}function c4(s,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z||t[3]!==e.w)&&(s.uniform4i(this.addr,e.x,e.y,e.z,e.w),t[0]=e.x,t[1]=e.y,t[2]=e.z,t[3]=e.w);else{if(ca(t,e))return;s.uniform4iv(this.addr,e),ua(t,e)}}function u4(s,e){const t=this.cache;t[0]!==e&&(s.uniform1ui(this.addr,e),t[0]=e)}function f4(s,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y)&&(s.uniform2ui(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(ca(t,e))return;s.uniform2uiv(this.addr,e),ua(t,e)}}function h4(s,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(s.uniform3ui(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else{if(ca(t,e))return;s.uniform3uiv(this.addr,e),ua(t,e)}}function d4(s,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z||t[3]!==e.w)&&(s.uniform4ui(this.addr,e.x,e.y,e.z,e.w),t[0]=e.x,t[1]=e.y,t[2]=e.z,t[3]=e.w);else{if(ca(t,e))return;s.uniform4uiv(this.addr,e),ua(t,e)}}function p4(s,e,t){const n=this.cache,a=t.allocateTextureUnit();n[0]!==a&&(s.uniform1i(this.addr,a),n[0]=a);let o;this.type===s.SAMPLER_2D_SHADOW?(PE.compareFunction=gb,o=PE):o=X2,t.setTexture2D(e||o,a)}function m4(s,e,t){const n=this.cache,a=t.allocateTextureUnit();n[0]!==a&&(s.uniform1i(this.addr,a),n[0]=a),t.setTexture3D(e||q2,a)}function g4(s,e,t){const n=this.cache,a=t.allocateTextureUnit();n[0]!==a&&(s.uniform1i(this.addr,a),n[0]=a),t.setTextureCube(e||Y2,a)}function v4(s,e,t){const n=this.cache,a=t.allocateTextureUnit();n[0]!==a&&(s.uniform1i(this.addr,a),n[0]=a),t.setTexture2DArray(e||j2,a)}function y4(s){switch(s){case 5126:return $z;case 35664:return e4;case 35665:return t4;case 35666:return n4;case 35674:return i4;case 35675:return a4;case 35676:return s4;case 5124:case 35670:return r4;case 35667:case 35671:return o4;case 35668:case 35672:return l4;case 35669:case 35673:return c4;case 5125:return u4;case 36294:return f4;case 36295:return h4;case 36296:return d4;case 35678:case 36198:case 36298:case 36306:case 35682:return p4;case 35679:case 36299:case 36307:return m4;case 35680:case 36300:case 36308:case 36293:return g4;case 36289:case 36303:case 36311:case 36292:return v4}}function _4(s,e){s.uniform1fv(this.addr,e)}function x4(s,e){const t=Ld(e,this.size,2);s.uniform2fv(this.addr,t)}function S4(s,e){const t=Ld(e,this.size,3);s.uniform3fv(this.addr,t)}function b4(s,e){const t=Ld(e,this.size,4);s.uniform4fv(this.addr,t)}function M4(s,e){const t=Ld(e,this.size,4);s.uniformMatrix2fv(this.addr,!1,t)}function E4(s,e){const t=Ld(e,this.size,9);s.uniformMatrix3fv(this.addr,!1,t)}function T4(s,e){const t=Ld(e,this.size,16);s.uniformMatrix4fv(this.addr,!1,t)}function A4(s,e){s.uniform1iv(this.addr,e)}function w4(s,e){s.uniform2iv(this.addr,e)}function R4(s,e){s.uniform3iv(this.addr,e)}function C4(s,e){s.uniform4iv(this.addr,e)}function N4(s,e){s.uniform1uiv(this.addr,e)}function D4(s,e){s.uniform2uiv(this.addr,e)}function U4(s,e){s.uniform3uiv(this.addr,e)}function L4(s,e){s.uniform4uiv(this.addr,e)}function O4(s,e,t){const n=this.cache,a=e.length,o=y_(t,a);ca(n,o)||(s.uniform1iv(this.addr,o),ua(n,o));for(let c=0;c!==a;++c)t.setTexture2D(e[c]||X2,o[c])}function z4(s,e,t){const n=this.cache,a=e.length,o=y_(t,a);ca(n,o)||(s.uniform1iv(this.addr,o),ua(n,o));for(let c=0;c!==a;++c)t.setTexture3D(e[c]||q2,o[c])}function I4(s,e,t){const n=this.cache,a=e.length,o=y_(t,a);ca(n,o)||(s.uniform1iv(this.addr,o),ua(n,o));for(let c=0;c!==a;++c)t.setTextureCube(e[c]||Y2,o[c])}function B4(s,e,t){const n=this.cache,a=e.length,o=y_(t,a);ca(n,o)||(s.uniform1iv(this.addr,o),ua(n,o));for(let c=0;c!==a;++c)t.setTexture2DArray(e[c]||j2,o[c])}function P4(s){switch(s){case 5126:return _4;case 35664:return x4;case 35665:return S4;case 35666:return b4;case 35674:return M4;case 35675:return E4;case 35676:return T4;case 5124:case 35670:return A4;case 35667:case 35671:return w4;case 35668:case 35672:return R4;case 35669:case 35673:return C4;case 5125:return N4;case 36294:return D4;case 36295:return U4;case 36296:return L4;case 35678:case 36198:case 36298:case 36306:case 35682:return O4;case 35679:case 36299:case 36307:return z4;case 35680:case 36300:case 36308:case 36293:return I4;case 36289:case 36303:case 36311:case 36292:return B4}}class H4{constructor(e,t,n){this.id=e,this.addr=n,this.cache=[],this.type=t.type,this.setValue=y4(t.type)}}class F4{constructor(e,t,n){this.id=e,this.addr=n,this.cache=[],this.type=t.type,this.size=t.size,this.setValue=P4(t.type)}}class V4{constructor(e){this.id=e,this.seq=[],this.map={}}setValue(e,t,n){const a=this.seq;for(let o=0,c=a.length;o!==c;++o){const h=a[o];h.setValue(e,t[h.id],n)}}}const $x=/(\w+)(\])?(\[|\.)?/g;function XE(s,e){s.seq.push(e),s.map[e.id]=e}function G4(s,e,t){const n=s.name,a=n.length;for($x.lastIndex=0;;){const o=$x.exec(n),c=$x.lastIndex;let h=o[1];const d=o[2]==="]",p=o[3];if(d&&(h=h|0),p===void 0||p==="["&&c+2===a){XE(t,p===void 0?new H4(h,s,e):new F4(h,s,e));break}else{let y=t.map[h];y===void 0&&(y=new V4(h),XE(t,y)),t=y}}}class I0{constructor(e,t){this.seq=[],this.map={};const n=e.getProgramParameter(t,e.ACTIVE_UNIFORMS);for(let a=0;a<n;++a){const o=e.getActiveUniform(t,a),c=e.getUniformLocation(t,o.name);G4(o,c,this)}}setValue(e,t,n,a){const o=this.map[t];o!==void 0&&o.setValue(e,n,a)}setOptional(e,t,n){const a=t[n];a!==void 0&&this.setValue(e,n,a)}static upload(e,t,n,a){for(let o=0,c=t.length;o!==c;++o){const h=t[o],d=n[h.id];d.needsUpdate!==!1&&h.setValue(e,d.value,a)}}static seqWithValue(e,t){const n=[];for(let a=0,o=e.length;a!==o;++a){const c=e[a];c.id in t&&n.push(c)}return n}}function jE(s,e,t){const n=s.createShader(e);return s.shaderSource(n,t),s.compileShader(n),n}const k4=37297;let X4=0;function j4(s,e){const t=s.split(`
3797`),n=[],a=Math.max(e-6,0),o=Math.min(e+6,t.length);for(let c=a;c<o;c++){const h=c+1;n.push(`${h===e?">":" "} ${h}: ${t[c]}`)}return n.join(`
3798`)}const qE=new cn;function q4(s){An._getMatrix(qE,An.workingColorSpace,s);const e=`mat3( ${qE.elements.map(t=>t.toFixed(4))} )`;switch(An.getTransfer(s)){case Vm:return[e,"LinearTransferOETF"];case ni:return[e,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space: ",s),[e,"LinearTransferOETF"]}}function YE(s,e,t){const n=s.getShaderParameter(e,s.COMPILE_STATUS),o=(s.getShaderInfoLog(e)||"").trim();if(n&&o==="")return"";const c=/ERROR: 0:(\d+)/.exec(o);if(c){const h=parseInt(c[1]);return t.toUpperCase()+`
3799
3800`+o+`
3801
3802`+j4(s.getShaderSource(e),h)}else return o}function Y4(s,e){const t=q4(e);return[`vec4 ${s}( vec4 value ) {`,`	return ${t[1]}( vec4( value.rgb * ${t[0]}, value.a ) );`,"}"].join(`
3803`)}function W4(s,e){let t;switch(e){case TA:t="Linear";break;case AA:t="Reinhard";break;case wA:t="Cineon";break;case lb:t="ACESFilmic";break;case CA:t="AgX";break;case NA:t="Neutral";break;case RA:t="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),t="Linear"}return"vec3 "+s+"( vec3 color ) { return "+t+"ToneMapping( color ); }"}const w0=new K;function Z4(){An.getLuminanceCoefficients(w0);const s=w0.x.toFixed(4),e=w0.y.toFixed(4),t=w0.z.toFixed(4);return["float luminance( const in vec3 rgb ) {",`	const vec3 weights = vec3( ${s}, ${e}, ${t} );`,"	return dot( weights, rgb );","}"].join(`
3804`)}function K4(s){return[s.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",s.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(Tm).join(`
3805`)}function Q4(s){const e=[];for(const t in s){const n=s[t];n!==!1&&e.push("#define "+t+" "+n)}return e.join(`
3806`)}function J4(s,e){const t={},n=s.getProgramParameter(e,s.ACTIVE_ATTRIBUTES);for(let a=0;a<n;a++){const o=s.getActiveAttrib(e,a),c=o.name;let h=1;o.type===s.FLOAT_MAT2&&(h=2),o.type===s.FLOAT_MAT3&&(h=3),o.type===s.FLOAT_MAT4&&(h=4),t[c]={type:o.type,location:s.getAttribLocation(e,c),locationSize:h}}return t}function Tm(s){return s!==""}function WE(s,e){const t=e.numSpotLightShadows+e.numSpotLightMaps-e.numSpotLightShadowsWithMaps;return s.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,e.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,t).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,e.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,e.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,e.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,e.numPointLightShadows)}function ZE(s,e){return s.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}const $4=/^[ \t]*#include +<([\w\d./]+)>/gm;function XS(s){return s.replace($4,tI)}const eI=new Map;function tI(s,e){let t=mn[e];if(t===void 0){const n=eI.get(e);if(n!==void 0)t=mn[n],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,n);else throw new Error("Can not resolve #include <"+e+">")}return XS(t)}const nI=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function KE(s){return s.replace(nI,iI)}function iI(s,e,t,n){let a="";for(let o=parseInt(e);o<parseInt(t);o++)a+=n.replace(/\[\s*i\s*\]/g,"[ "+o+" ]").replace(/UNROLLED_LOOP_INDEX/g,o);return a}function QE(s){let e=`precision ${s.precision} float;
3807	precision ${s.precision} int;
3808	precision ${s.precision} sampler2D;
3809	precision ${s.precision} samplerCube;
3810	precision ${s.precision} sampler3D;
3811	precision ${s.precision} sampler2DArray;
3812	precision ${s.precision} sampler2DShadow;
3813	precision ${s.precision} samplerCubeShadow;
3814	precision ${s.precision} sampler2DArrayShadow;
3815	precision ${s.precision} isampler2D;
3816	precision ${s.precision} isampler3D;
3817	precision ${s.precision} isamplerCube;
3818	precision ${s.precision} isampler2DArray;
3819	precision ${s.precision} usampler2D;
3820	precision ${s.precision} usampler3D;
3821	precision ${s.precision} usamplerCube;
3822	precision ${s.precision} usampler2DArray;
3823	`;return s.precision==="highp"?e+=`
3824#define HIGH_PRECISION`:s.precision==="mediump"?e+=`
3825#define MEDIUM_PRECISION`:s.precision==="lowp"&&(e+=`
3826#define LOW_PRECISION`),e}function aI(s){let e="SHADOWMAP_TYPE_BASIC";return s.shadowMapType===Py?e="SHADOWMAP_TYPE_PCF":s.shadowMapType===Am?e="SHADOWMAP_TYPE_PCF_SOFT":s.shadowMapType===$r&&(e="SHADOWMAP_TYPE_VSM"),e}function sI(s){let e="ENVMAP_TYPE_CUBE";if(s.envMap)switch(s.envMapMode){case Wo:case kc:e="ENVMAP_TYPE_CUBE";break;case Cd:e="ENVMAP_TYPE_CUBE_UV";break}return e}function rI(s){let e="ENVMAP_MODE_REFLECTION";if(s.envMap)switch(s.envMapMode){case kc:e="ENVMAP_MODE_REFRACTION";break}return e}function oI(s){let e="ENVMAP_BLENDING_NONE";if(s.envMap)switch(s.combine){case tg:e="ENVMAP_BLENDING_MULTIPLY";break;case MA:e="ENVMAP_BLENDING_MIX";break;case EA:e="ENVMAP_BLENDING_ADD";break}return e}function lI(s){const e=s.envMapCubeUVHeight;if(e===null)return null;const t=Math.log2(e)-2,n=1/e;return{texelWidth:1/(3*Math.max(Math.pow(2,t),112)),texelHeight:n,maxMip:t}}function cI(s,e,t,n){const a=s.getContext(),o=t.defines;let c=t.vertexShader,h=t.fragmentShader;const d=aI(t),p=sI(t),v=rI(t),y=oI(t),_=lI(t),b=K4(t),T=Q4(o),R=a.createProgram();let A,M,C=t.glslVersion?"#version "+t.glslVersion+`
3827`:"";t.isRawShaderMaterial?(A=["#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,T].filter(Tm).join(`
3828`),A.length>0&&(A+=`
3829`),M=["#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,T].filter(Tm).join(`
3830`),M.length>0&&(M+=`
3831`)):(A=[QE(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,T,t.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",t.batching?"#define USE_BATCHING":"",t.batchingColor?"#define USE_BATCHING_COLOR":"",t.instancing?"#define USE_INSTANCING":"",t.instancingColor?"#define USE_INSTANCING_COLOR":"",t.instancingMorph?"#define USE_INSTANCING_MORPH":"",t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+v:"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.displacementMap?"#define USE_DISPLACEMENTMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescenceMap?"#define USE_IR
3831IDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.mapUv?"#define MAP_UV "+t.mapUv:"",t.alphaMapUv?"#define ALPHAMAP_UV "+t.alphaMapUv:"",t.lightMapUv?"#define LIGHTMAP_UV "+t.lightMapUv:"",t.aoMapUv?"#define AOMAP_UV "+t.aoMapUv:"",t.emissiveMapUv?"#define EMISSIVEMAP_UV "+t.emissiveMapUv:"",t.bumpMapUv?"#define BUMPMAP_UV "+t.bumpMapUv:"",t.normalMapUv?"#define NORMALMAP_UV "+t.normalMapUv:"",t.displacementMapUv?"#define DISPLACEMENTMAP_UV "+t.displacementMapUv:"",t.metalnessMapUv?"#define METALNESSMAP_UV "+t.metalnessMapUv:"",t.roughnessMapUv?"#define ROUGHNESSMAP_UV "+t.roughnessMapUv:"",t.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+t.anisotropyMapUv:"",t.clearcoatMapUv?"#define CLEARCOATMAP_UV "+t.clearcoatMapUv:"",t.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+t.clearcoatNormalMapUv:"",t.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+t.clearcoatRoughnessMapUv:"",t.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+t.iridescenceMapUv:"",t.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+t.iridescenceThicknessMapUv:"",t.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+t.sheenColorMapUv:"",t.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+t.sheenRoughnessMapUv:"",t.specularMapUv?"#define SPECULARMAP_UV "+t.specularMapUv:"",t.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+t.specularColorMapUv:"",t.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+t.specularIntensityMapUv:"",t.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+t.transmissionMapUv:"",t.thicknessMapUv?"#define THICKNESSMAP_UV "+t.thicknessMapUv:"",t.vertexTangents&&t.flatShading===!1?"#define USE_TANGENT":"",t.vertexColors?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.flatShading?"#define FLAT_SHADED":"",t.skinning?"#define USE_SKINNING":"",t.morphTargets?"#define USE_MORPHTARGETS":"",t.morphNormals&&t.flatShading===!1?"#define USE_MORPHNORMALS":"",t.morphColors?"#define USE_MORPHCOLORS":"",t.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE_STRIDE "+t.morphTextureStride:"",t.morphTargetsCount>0?"#define MORPHTARGETS_COUNT "+t.morphTargetsCount:"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+d:"",t.sizeAttenuation?"#define USE_SIZEATTENUATION":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.logarithmicDepthBuffer?"#define USE_LOGARITHMIC_DEPTH_BUFFER":"",t.reversedDepthBuffer?"#define USE_REVERSED_DEPTH_BUFFER":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","	attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","	attribute vec3 instanceColor;","#endif","#ifdef USE_INSTANCING_MORPH","	uniform sampler2D morphTexture;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1","	attribute vec2 uv1;","#endif","#ifdef USE_UV2","	attribute vec2 uv2;","#endif","#ifdef USE_UV3","	attribute vec2 uv3;","#endif","#ifdef USE_TANGENT","	attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","	attribute vec4 color;","#elif defined( USE_COLOR )","	attribute vec3 color;","#endif","#ifdef USE_SKINNING","	attribute vec4 skinIndex;","	attribute vec4 skinWeight;","#endif",`
3832`].filter(Tm).join(`
3833`),M=[QE(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,T,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",t.map?"#define USE_MAP":"",t.matcap?"#define USE_MATCAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+p:"",t.envMap?"#define "+v:"",t.envMap?"#define "+y:"",_?"#define CUBEUV_TEXEL_WIDTH "+_.texelWidth:"",_?"#define CUBEUV_TEXEL_HEIGHT "+_.texelHeight:"",_?"#define CUBEUV_MAX_MIP "+_.maxMip+".0":"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoat?"#define USE_CLEARCOAT":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.dispersion?"#define USE_DISPERSION":"",t.iridescence?"#define USE_IR
3833IDESCENCE":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaTest?"#define USE_ALPHATEST":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.sheen?"#define USE_SHEEN":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.vertexTangents&&t.flatShading===!1?"#define USE_TANGENT":"",t.vertexColors||t.instancingColor||t.batchingColor?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.gradientMap?"#define USE_GRADIENTMAP":"",t.flatShading?"#define FLAT_SHADED":"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+d:"",t.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",t.decodeVideoTextureEmissive?"#define DECODE_VIDEO_TEXTURE_EMISSIVE":"",t.logarithmicDepthBuffer?"#define USE_LOGARITHMIC_DEPTH_BUFFER":"",t.reversedDepthBuffer?"#define USE_REVERSED_DEPTH_BUFFER":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",t.toneMapping!==no?"#define TONE_MAPPING":"",t.toneMapping!==no?mn.tonemapping_pars_fragment:"",t.toneMapping!==no?W4("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.opaque?"#define OPAQUE":"",mn.colorspace_pars_fragment,Y4("linearToOutputTexel",t.outputColorSpace),Z4(),t.useDepthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",`
3834`].filter(Tm).join(`
3835`)),c=XS(c),c=WE(c,t),c=ZE(c,t),h=XS(h),h=WE(h,t),h=ZE(h,t),c=KE(c),h=KE(h),t.isRawShaderMaterial!==!0&&(C=`#version 300 es
3836`,A=[b,"#define attribute in","#define varying out","#define texture2D texture"].join(`
3837`)+`
3838`+A,M=["#define varying in",t.glslVersion===IS?"":"layout(location = 0) out highp vec4 pc_fragColor;",t.glslVersion===IS?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(`
3839`)+`
3840`+M);const D=C+A+c,U=C+M+h,H=jE(a,a.VERTEX_SHADER,D),F=jE(a,a.FRAGMENT_SHADER,U);a.attachShader(R,H),a.attachShader(R,F),t.index0AttributeName!==void 0?a.bindAttribLocation(R,0,t.index0AttributeName):t.morphTargets===!0&&a.bindAttribLocation(R,0,"position"),a.linkProgram(R);function G(Y){if(s.debug.checkShaderErrors){const se=a.getProgramInfoLog(R)||"",ce=a.getShaderInfoLog(H)||"",he=a.getShaderInfoLog(F)||"",me=se.trim(),P=ce.trim(),Q=he.trim();let ee=!0,ge=!0;if(a.getProgramParameter(R,a.LINK_STATUS)===!1)if(ee=!1,typeof s.debug.onShaderError=="function")s.debug.onShaderError(a,R,H,F);else{const Se=YE(a,H,"vertex"),W=YE(a,F,"fragment");console.error("THREE.WebGLProgram: Shader Error "+a.getError()+" - VALIDATE_STATUS "+a.getProgramParameter(R,a.VALIDATE_STATUS)+`
3841
3842Material Name: `+Y.name+`
3843Material Type: `+Y.type+`
3844
3845Program Info Log: `+me+`
3846`+Se+`
3847`+W)}else me!==""?console.warn("THREE.WebGLProgram: Program Info Log:",me):(P===""||Q==="")&&(ge=!1);ge&&(Y.diagnostics={runnable:ee,programLog:me,vertexShader:{log:P,prefix:A},fragmentShader:{log:Q,prefix:M}})}a.deleteShader(H),a.deleteShader(F),V=new I0(a,R),O=J4(a,R)}let V;this.getUniforms=function(){return V===void 0&&G(this),V};let O;this.getAttributes=function(){return O===void 0&&G(this),O};let z=t.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return z===!1&&(z=a.getProgramParameter(R,k4)),z},this.destroy=function(){n.releaseStatesOfProgram(this),a.deleteProgram(R),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=X4++,this.cacheKey=e,this.usedTimes=1,this.program=R,this.vertexShader=H,this.fragmentShader=F,this}let uI=0;class fI{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,n=e.fragmentShader,a=this._getShaderStage(t),o=this._getShaderStage(n),c=this._getShaderCacheForMaterial(e);return c.has(a)===!1&&(c.add(a),a.usedTimes++),c.has(o)===!1&&(c.add(o),o.usedTimes++),this}remove(e){const t=this.materialCache.get(e);for(const n of t)n.usedTimes--,n.usedTimes===0&&this.shaderCache.delete(n.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const t=this.materialCache;let n=t.get(e);return n===void 0&&(n=new Set,t.set(e,n)),n}_getShaderStage(e){const t=this.shaderCache;let n=t.get(e);return n===void 0&&(n=new hI(e),t.set(e,n)),n}}class hI{constructor(e){this.id=uI++,this.code=e,this.usedTimes=0}}
vendor: 19,107 bytes, lines 3847-3853
3847function dI(s,e,t,n,a,o,c){const h=new Sd,d=new fI,p=new Set,v=[],y=a.logarithmicDepthBuffer,_=a.vertexTextures;let b=a.precision;const T={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function R(O){return p.add(O),O===0?"uv":`uv${O}`}function A(O,z,Y,se,ce){const he=se.fog,me=ce.geometry,P=O.isMeshStandardMaterial?se.environment:null,Q=(O.isMeshStandardMaterial?t:e).get(O.envMap||P),ee=Q&&Q.mapping===Cd?Q.image.height:null,ge=T[O.type];O.precision!==null&&(b=a.getMaxPrecision(O.precision),b!==O.precision&&console.warn("THREE.WebGLProgram.getParameters:",O.precision,"not supported, using",b,"instead."));const Se=me.morphAttributes.position||me.morphAttributes.normal||me.morphAttributes.color,W=Se!==void 0?Se.length:0;let fe=0;me.morphAttributes.position!==void 0&&(fe=1),me.morphAttributes.normal!==void 0&&(fe=2),me.morphAttributes.color!==void 0&&(fe=3);let Ce,Le,nt,ve;if(ge){const hn=eo[ge];Ce=hn.vertexShader,Le=hn.fragmentShader}else Ce=O.vertexShader,Le=O.fragmentShader,d.update(O),nt=d.getVertexShaderID(O),ve=d.getFragmentShaderID(O);const De=s.getRenderTarget(),ot=s.state.buffers.depth.getReversed(),gt=ce.isInstancedMesh===!0,Et=ce.isBatchedMesh===!0,Zt=!!O.map,_n=!!O.matcap,ie=!!Q,Ze=!!O.aoMap,je=!!O.lightMap,ke=!!O.bumpMap,Fe=!!O.normalMap,dt=!!O.displacementMap,it=!!O.emissiveMap,lt=!!O.metalnessMap,Vt=!!O.roughnessMap,qt=O.anisotropy>0,J=O.clearcoat>0,k=O.dispersion>0,be=O.iridescence>0,ze=O.sheen>0,$e=O.transmission>0,Pe=qt&&!!O.anisotropyMap,At=J&&!!O.clearcoatMap,ft=J&&!!O.clearcoatNormalMap,Rt=J&&!!O.clearcoatRoughnessMap,Ct=be&&!!O.iridescenceMap,Qe=be&&!!O.iridescenceThicknessMap,et=ze&&!!O.sheenColorMap,Dt=ze&&!!O.sheenRoughnessMap,vt=!!O.specularMap,ut=!!O.specularColorMap,Ut=!!O.specularIntensityMap,pe=$e&&!!O.transmissionMap,Me=$e&&!!O.thicknessMap,ct=!!O.gradientMap,bt=!!O.alphaMap,tt=O.alphaTest>0,We=!!O.alphaHash,Tt=!!O.extensions;let Xt=no;O.toneMapped&&(De===null||De.isXRRenderTarget===!0)&&(Xt=s.toneMapping);const Mn={shaderID:ge,shaderType:O.type,shaderName:O.name,vertexShader:Ce,fragmentShader:Le,defines:O.defines,customVertexShaderID:nt,customFragmentShaderID:ve,isRawShaderMaterial:O.isRawShaderMaterial===!0,glslVersion:O.glslVersion,precision:b,batching:Et,batchingColor:Et&&ce._colorsTexture!==null,instancing:gt,instancingColor:gt&&ce.instanceColor!==null,instancingMorph:gt&&ce.morphTexture!==null,supportsVertexTextures:_,outputColorSpace:De===null?s.outputColorSpace:De.isXRRenderTarget===!0?De.texture.colorSpace:Qi,alphaToCoverage:!!O.alphaToCoverage,map:Zt,matcap:_n,envMap:ie,envMapMode:ie&&Q.mapping,envMapCubeUVHeight:ee,aoMap:Ze,lightMap:je,bumpMap:ke,normalMap:Fe,displacementMap:_&&dt,emissiveMap:it,normalMapObjectSpace:Fe&&O.normalMapType===PA,normalMapTangentSpace:Fe&&O.normalMapType===Yc,metalnessMap:lt,roughnessMap:Vt,anisotropy:qt,anisotropyMap:Pe,clearcoat:J,clearcoatMap:At,clearcoatNormalMap:ft,clearcoatRoughnessMap:Rt,dispersion:k,iridescence:be,iridescenceMap:Ct,iridescenceThicknessMap:Qe,sheen:ze,sheenColorMap:et,sheenRoughnessMap:Dt,specularMap:vt,specularColorMap:ut,specularIntensityMap:Ut,transmission:$e,transmissionMap:pe,thicknessMap:Me,gradientMap:ct,opaque:O.transparent===!1&&O.blending===df&&O.alphaToCoverage===!1,alphaMap:bt,alphaTest:tt,alphaHash:We,combine:O.combine,mapUv:Zt&&R(O.map.channel),aoMapUv:Ze&&R(O.aoMap.channel),lightMapUv:je&&R(O.lightMap.channel),bumpMapUv:ke&&R(O.bumpMap.channel),normalMapUv:Fe&&R(O.normalMap.channel),displacementMapUv:dt&&R(O.displacementMap.channel),emissiveMapUv:it&&R(O.emissiveMap.channel),metalnessMapUv:lt&&R(O.metalnessMap.channel),roughnessMapUv:Vt&&R(O.roughnessMap.channel),anisotropyMapUv:Pe&&R(O.anisotropyMap.channel),clearcoatMapUv:At&&R(O.clearcoatMap.channel),clearcoatNormalMapUv:ft&&R(O.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Rt&&R(O.clearcoatRoughnessMap.channel),iridescenceMapUv:Ct&&R(O.iridescenceMap.channel),iridescenceThicknessMapUv:Qe&&R(O.iridescenceThicknessMap.channel),sheenColorMapUv:et&&R(O.sheenColorMap.channel),sheenRoughnessMapUv:Dt&&R(O.sheenRoughnessMap.channel),specularMapUv:vt&&R(O.specularMap.channel),specularColorMapUv:ut&&R(O.specularColorMap.channel),specularIntensityMapUv:Ut&&R(O.specularIntensityMap.channel),transmissionMapUv:pe&&R(O.transmissionMap.channel),thicknessMapUv:Me&&R(O.thicknessMap.channel),alphaMapUv:bt&&R(O.alphaMap.channel),vertexTangents:!!me.attributes.tangent&&(Fe||qt),vertexColors:O.vertexColors,vertexAlphas:O.vertexColors===!0&&!!me.attributes.color&&me.attributes.color.itemSize===4,pointsUvs:ce.isPoints===!0&&!!me.attributes.uv&&(Zt||bt),fog:!!he,useFog:O.fog===!0,fogExp2:!!he&&he.isFogExp2,flatShading:O.flatShading===!0&&O.wireframe===!1,sizeAttenuation:O.sizeAttenuation===!0,logarithmicDepthBuffer:y,reversedDepthBuffer:ot,skinning:ce.isSkinnedMesh===!0,morphTargets:me.morphAttributes.position!==void 0,morphNormals:me.morphAttributes.normal!==void 0,morphColors:me.morphAttributes.color!==void 0,morphTargetsCount:W,morphTextureStride:fe,numDirLights:z.directional.length,numPointLights:z.point.length,numSpotLights:z.spot.length,numSpotLightMaps:z.spotLightMap.length,numRectAreaLights:z.rectArea.length,numHemiLights:z.hemi.length,numDirLightShadows:z.directionalShadowMap.length,numPointLightShadows:z.pointShadowMap.length,numSpotLightShadows:z.spotShadowMap.length,numSpotLightShadowsWithMaps:z.numSpotLightShadowsWithMaps,numLightProbes:z.numLightProbes,numClippingPlanes:c.numPlanes,numClipIntersection:c.numIntersection,dithering:O.dithering,shadowMapEnabled:s.shadowMap.enabled&&Y.length>0,shadowMapType:s.shadowMap.type,toneMapping:Xt,decodeVideoTexture:Zt&&O.map.isVideoTexture===!0&&An.getTransfer(O.map.colorSpace)===ni,decodeVideoTextureEmissive:it&&O.emissiveMap.isVideoTexture===!0&&An.getTransfer(O.emissiveMap.colorSpace)===ni,premultipliedAlpha:O.premultipliedAlpha,doubleSided:O.side===Mr,flipSided:O.side===Ka,useDepthPacking:O.depthPacking>=0,depthPacking:O.depthPacking||0,index0AttributeName:O.index0AttributeName,extensionClipCullDistance:Tt&&O.extensions.clipCullDistance===!0&&n.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(Tt&&O.extensions.multiDraw===!0||Et)&&n.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:O.customProgramCacheKey()};return Mn.vertexUv1s=p.has(1),Mn.vertexUv2s=p.has(2),Mn.vertexUv3s=p.has(3),p.clear(),Mn}function M(O){const z=[];if(O.shaderID?z.push(O.shaderID):(z.push(O.customVertexShaderID),z.push(O.customFragmentShaderID)),O.defines!==void 0)for(const Y in O.defines)z.push(Y),z.push(O.defines[Y]);return O.isRawShaderMaterial===!1&&(C(z,O),D(z,O),z.push(s.outputColorSpace)),z.push(O.customProgramCacheKey),z.join()}function C(O,z){O.push(z.precision),O.push(z.outputColorSpace),O.push(z.envMapMode),O.push(z.envMapCubeUVHeight),O.push(z.mapUv),O.push(z.alphaMapUv),O.push(z.lightMapUv),O.push(z.aoMapUv),O.push(z.bumpMapUv),O.push(z.normalMapUv),O.push(z.displacementMapUv),O.push(z.emissiveMapUv),O.push(z.metalnessMapUv),O.push(z.roughnessMapUv),O.push(z.anisotropyMapUv),O.push(z.clearcoatMapUv),O.push(z.clearcoatNormalMapUv),O.push(z.clearcoatRoughnessMapUv),O.push(z.iridescenceMapUv),O.push(z.iridescenceThicknessMapUv),O.push(z.sheenColorMapUv),O.push(z.sheenRoughnessMapUv),O.push(z.specularMapUv),O.push(z.specularColorMapUv),O.push(z.specularIntensityMapUv),O.push(z.transmissionMapUv),O.push(z.thicknessMapUv),O.push(z.combine),O.push(z.fogExp2),O.push(z.sizeAttenuation),O.push(z.morphTargetsCount),O.push(z.morphAttributeCount),O.push(z.numDirLights),O.push(z.numPointLights),O.push(z.numSpotLights),O.push(z.numSpotLightMaps),O.push(z.numHemiLights),O.push(z.numRectAreaLights),O.push(z.numDirLightShadows),O.push(z.numPointLightShadows),O.push(z.numSpotLightShadows),O.push(z.numSpotLightShadowsWithMaps),O.push(z.numLightProbes),O.push(z.shadowMapType),O.push(z.toneMapping),O.push(z.numClippingPlanes),O.push(z.numClipIntersection),O.push(z.depthPacking)}function D(O,z){h.disableAll(),z.supportsVertexTextures&&h.enable(0),z.instancing&&h.enable(1),z.instancingColor&&h.enable(2),z.instancingMorph&&h.enable(3),z.matcap&&h.enable(4),z.envMap&&h.enable(5),z.normalMapObjectSpace&&h.enable(6),z.normalMapTangentSpace&&h.enable(7),z.clearcoat&&h.enable(8),z.iridescence&&h.enable(9),z.alphaTest&&h.enable(10),z.vertexColors&&h.enable(11),z.vertexAlphas&&h.enable(12),z.vertexUv1s&&h.enable(13),z.vertexUv2s&&h.enable(14),z.vertexUv3s&&h.enable(15),z.vertexTangents&&h.enable(16),z.anisotropy&&h.enable(17),z.alphaHash&&h.enable(18),z.batching&&h.enable(19),z.dispersion&&h.enable(20),z.batchingColor&&h.enable(21),z.gradientMap&&h.enable(22),O.push(h.mask),h.disableAll(),z.fog&&h.enable(0),z.useFog&&h.enable(1),z.flatShading&&h.enable(2),z.logarithmicDepthBuffer&&h.enable(3),z.reversedDepthBuffer&&h.enable(4),z.skinning&&h.enable(5),z.morphTargets&&h.enable(6),z.morphNormals&&h.enable(7),z.morphColors&&h.enable(8),z.premultipliedAlpha&&h.enable(9),z.shadowMapEnabled&&h.enable(10),z.doubleSided&&h.enable(11),z.flipSided&&h.enable(12),z.useDepthPacking&&h.enable(13),z.dithering&&h.enable(14),z.transmission&&h.enable(15),z.sheen&&h.enable(16),z.opaque&&h.enable(17),z.pointsUvs&&h.enable(18),z.decodeVideoTexture&&h.enable(19),z.decodeVideoTextureEmissive&&h.enable(20),z.alphaToCoverage&&h.enable(21),O.push(h.mask)}function U(O){const z=T[O.type];let Y;if(z){const se=eo[z];Y=bb.clone(se.uniforms)}else Y=O.uniforms;return Y}function H(O,z){let Y;for(let se=0,ce=v.length;se<ce;se++){const he=v[se];if(he.cacheKey===z){Y=he,++Y.usedTimes;break}}return Y===void 0&&(Y=new cI(s,z,O,o),v.push(Y)),Y}function F(O){if(--O.usedTimes===0){const z=v.indexOf(O);v[z]=v[v.length-1],v.pop(),O.destroy()}}function G(O){d.remove(O)}function V(){d.dispose()}return{getParameters:A,getProgramCacheKey:M,getUniforms:U,acquireProgram:H,releaseProgram:F,releaseShaderCache:G,programs:v,dispose:V}}function pI(){let s=new WeakMap;function e(c){return s.has(c)}function t(c){let h=s.get(c);return h===void 0&&(h={},s.set(c,h)),h}function n(c){s.delete(c)}function a(c,h,d){s.get(c)[h]=d}function o(){s=new WeakMap}return{has:e,get:t,remove:n,update:a,dispose:o}}function mI(s,e){return s.groupOrder!==e.groupOrder?s.groupOrder-e.groupOrder:s.renderOrder!==e.renderOrder?s.renderOrder-e.renderOrder:s.material.id!==e.material.id?s.material.id-e.material.id:s.z!==e.z?s.z-e.z:s.id-e.id}function JE(s,e){return s.groupOrder!==e.groupOrder?s.groupOrder-e.groupOrder:s.renderOrder!==e.renderOrder?s.renderOrder-e.renderOrder:s.z!==e.z?e.z-s.z:s.id-e.id}function $E(){const s=[];let e=0;const t=[],n=[],a=[];function o(){e=0,t.length=0,n.length=0,a.length=0}function c(y,_,b,T,R,A){let M=s[e];return M===void 0?(M={id:y.id,object:y,geometry:_,material:b,groupOrder:T,renderOrder:y.renderOrder,z:R,group:A},s[e]=M):(M.id=y.id,M.object=y,M.geometry=_,M.material=b,M.groupOrder=T,M.renderOrder=y.renderOrder,M.z=R,M.group=A),e++,M}function h(y,_,b,T,R,A){const M=c(y,_,b,T,R,A);b.transmission>0?n.push(M):b.transparent===!0?a.push(M):t.push(M)}function d(y,_,b,T,R,A){const M=c(y,_,b,T,R,A);b.transmission>0?n.unshift(M):b.transparent===!0?a.unshift(M):t.unshift(M)}function p(y,_){t.length>1&&t.sort(y||mI),n.length>1&&n.sort(_||JE),a.length>1&&a.sort(_||JE)}function v(){for(let y=e,_=s.length;y<_;y++){const b=s[y];if(b.id===null)break;b.id=null,b.object=null,b.geometry=null,b.material=null,b.group=null}}return{opaque:t,transmissive:n,transparent:a,init:o,push:h,unshift:d,finish:v,sort:p}}function gI(){let s=new WeakMap;function e(n,a){const o=s.get(n);let c;return o===void 0?(c=new $E,s.set(n,[c])):a>=o.length?(c=new $E,o.push(c)):c=o[a],c}function t(){s=new WeakMap}return{get:e,dispose:t}}function vI(){const s={};return{get:function(e){if(s[e.id]!==void 0)return s[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new K,color:new _t};break;case"SpotLight":t={position:new K,direction:new K,color:new _t,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new K,color:new _t,distance:0,decay:0};break;case"HemisphereLight":t={direction:new K,skyColor:new _t,groundColor:new _t};break;case"RectAreaLight":t={color:new _t,position:new K,halfWidth:new K,halfHeight:new K};break}return s[e.id]=t,t}}}function yI(){const s={};return{get:function(e){if(s[e.id]!==void 0)return s[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Je};break;case"SpotLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Je};break;case"PointLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Je,shadowCameraNear:1,shadowCameraFar:1e3};break}return s[e.id]=t,t}}}let _I=0;function xI(s,e){return(e.castShadow?2:0)-(s.castShadow?2:0)+(e.map?1:0)-(s.map?1:0)}function SI(s){const e=new vI,t=yI(),n={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let p=0;p<9;p++)n.probe.push(new K);const a=new K,o=new jt,c=new jt;function h(p){let v=0,y=0,_=0;for(let O=0;O<9;O++)n.probe[O].set(0,0,0);let b=0,T=0,R=0,A=0,M=0,C=0,D=0,U=0,H=0,F=0,G=0;p.sort(xI);for(let O=0,z=p.length;O<z;O++){const Y=p[O],se=Y.color,ce=Y.intensity,he=Y.distance,me=Y.shadow&&Y.shadow.map?Y.shadow.map.texture:null;if(Y.isAmbientLight)v+=se.r*ce,y+=se.g*ce,_+=se.b*ce;else if(Y.isLightProbe){for(let P=0;P<9;P++)n.probe[P].addScaledVector(Y.sh.coefficients[P],ce);G++}else if(Y.isDirectionalLight){const P=e.get(Y);if(P.color.copy(Y.color).multiplyScalar(Y.intensity),Y.castShadow){const Q=Y.shadow,ee=t.get(Y);ee.shadowIntensity=Q.intensity,ee.shadowBias=Q.bias,ee.shadowNormalBias=Q.normalBias,ee.shadowRadius=Q.radius,ee.shadowMapSize=Q.mapSize,n.directionalShadow[b]=ee,n.directionalShadowMap[b]=me,n.directionalShadowMatrix[b]=Y.shadow.matrix,C++}n.directional[b]=P,b++}else if(Y.isSpotLight){const P=e.get(Y);P.position.setFromMatrixPosition(Y.matrixWorld),P.color.copy(se).multiplyScalar(ce),P.distance=he,P.coneCos=Math.cos(Y.angle),P.penumbraCos=Math.cos(Y.angle*(1-Y.penumbra)),P.decay=Y.decay,n.spot[R]=P;const Q=Y.shadow;if(Y.map&&(n.spotLightMap[H]=Y.map,H++,Q.updateMatrices(Y),Y.castShadow&&F++),n.spotLightMatrix[R]=Q.matrix,Y.castShadow){const ee=t.get(Y);ee.shadowIntensity=Q.intensity,ee.shadowBias=Q.bias,ee.shadowNormalBias=Q.normalBias,ee.shadowRadius=Q.radius,ee.shadowMapSize=Q.mapSize,n.spotShadow[R]=ee,n.spotShadowMap[R]=me,U++}R++}else if(Y.isRectAreaLight){const P=e.get(Y);P.color.copy(se).multiplyScalar(ce),P.halfWidth.set(Y.width*.5,0,0),P.halfHeight.set(0,Y.height*.5,0),n.rectArea[A]=P,A++}else if(Y.isPointLight){const P=e.get(Y);if(P.color.copy(Y.color).multiplyScalar(Y.intensity),P.distance=Y.distance,P.decay=Y.decay,Y.castShadow){const Q=Y.shadow,ee=t.get(Y);ee.shadowIntensity=Q.intensity,ee.shadowBias=Q.bias,ee.shadowNormalBias=Q.normalBias,ee.shadowRadius=Q.radius,ee.shadowMapSize=Q.mapSize,ee.shadowCameraNear=Q.camera.near,ee.shadowCameraFar=Q.camera.far,n.pointShadow[T]=ee,n.pointShadowMap[T]=me,n.pointShadowMatrix[T]=Y.shadow.matrix,D++}n.point[T]=P,T++}else if(Y.isHemisphereLight){const P=e.get(Y);P.skyColor.copy(Y.color).multiplyScalar(ce),P.groundColor.copy(Y.groundColor).multiplyScalar(ce),n.hemi[M]=P,M++}}A>0&&(s.has("OES_texture_float_linear")===!0?(n.rectAreaLTC1=St.LTC_FLOAT_1,n.rectAreaLTC2=St.LTC_FLOAT_2):(n.rectAreaLTC1=St.LTC_HALF_1,n.rectAreaLTC2=St.LTC_HALF_2)),n.ambient[0]=v,n.ambient[1]=y,n.ambient[2]=_;const V=n.hash;(V.directionalLength!==b||V.pointLength!==T||V.spotLength!==R||V.rectAreaLength!==A||V.hemiLength!==M||V.numDirectionalShadows!==C||V.numPointShadows!==D||V.numSpotShadows!==U||V.numSpotMaps!==H||V.numLightProbes!==G)&&(n.directional.length=b,n.spot.length=R,n.rectArea.length=A,n.point.length=T,n.hemi.length=M,n.directionalShadow.length=C,n.directionalShadowMap.length=C,n.pointShadow.length=D,n.pointShadowMap.length=D,n.spotShadow.length=U,n.spotShadowMap.length=U,n.directionalShadowMatrix.length=C,n.pointShadowMatrix.length=D,n.spotLightMatrix.length=U+H-F,n.spotLightMap.length=H,n.numSpotLightShadowsWithMaps=F,n.numLightProbes=G,V.directionalLength=b,V.pointLength=T,V.spotLength=R,V.rectAreaLength=A,V.hemiLength=M,V.numDirectionalShadows=C,V.numPointShadows=D,V.numSpotShadows=U,V.numSpotMaps=H,V.numLightProbes=G,n.version=_I++)}function d(p,v){let y=0,_=0,b=0,T=0,R=0;const A=v.matrixWorldInverse;for(let M=0,C=p.length;M<C;M++){const D=p[M];if(D.isDirectionalLight){const U=n.directional[y];U.direction.setFromMatrixPosition(D.matrixWorld),a.setFromMatrixPosition(D.target.matrixWorld),U.direction.sub(a),U.direction.transformDirection(A),y++}else if(D.isSpotLight){const U=n.spot[b];U.position.setFromMatrixPosition(D.matrixWorld),U.position.applyMatrix4(A),U.direction.setFromMatrixPosition(D.matrixWorld),a.setFromMatrixPosition(D.target.matrixWorld),U.direction.sub(a),U.direction.transformDirection(A),b++}else if(D.isRectAreaLight){const U=n.rectArea[T];U.position.setFromMatrixPosition(D.matrixWorld),U.position.applyMatrix4(A),c.identity(),o.copy(D.matrixWorld),o.premultiply(A),c.extractRotation(o),U.halfWidth.set(D.width*.5,0,0),U.halfHeight.set(0,D.height*.5,0),U.halfWidth.applyMatrix4(c),U.halfHeight.applyMatrix4(c),T++}else if(D.isPointLight){const U=n.point[_];U.position.setFromMatrixPosition(D.matrixWorld),U.position.applyMatrix4(A),_++}else if(D.isHemisphereLight){const U=n.hemi[R];U.direction.setFromMatrixPosition(D.matrixWorld),U.direction.transformDirection(A),R++}}}return{setup:h,setupView:d,state:n}}function eT(s){const e=new SI(s),t=[],n=[];function a(v){p.camera=v,t.length=0,n.length=0}function o(v){t.push(v)}function c(v){n.push(v)}function h(){e.setup(t)}function d(v){e.setupView(t,v)}const p={lightsArray:t,shadowsArray:n,camera:null,lights:e,transmissionRenderTarget:{}};return{init:a,state:p,setupLights:h,setupLightsView:d,pushLight:o,pushShadow:c}}function bI(s){let e=new WeakMap;function t(a,o=0){const c=e.get(a);let h;return c===void 0?(h=new eT(s),e.set(a,[h])):o>=c.length?(h=new eT(s),c.push(h)):h=c[o],h}function n(){e=new WeakMap}return{get:t,dispose:n}}const MI=`void main() {
3848	gl_Position = vec4( position, 1.0 );
3849}`,EI=`uniform sampler2D shadow_pass;
3850uniform vec2 resolution;
3851uniform float radius;
3852#include <packing>
3853void main() {
3854	const float samples = float( VSM_SAMPLES );
3855	float mean = 0.0;
3856	float squared_mean = 0.0;
3857	float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );
3858	float uvStart = samples <= 1.0 ? 0.0 : - 1.0;
3859	for ( float i = 0.0; i < samples; i ++ ) {
3860		float uvOffset = uvStart + i * uvStride;
3861		#ifdef HORIZONTAL_PASS
3862			vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );
3863			mean += distribution.x;
3864			squared_mean += distribution.y * distribution.y + distribution.x * distribution.x;
3865		#else
3866			float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );
3867			mean += depth;
3868			squared_mean += depth * depth;
3869		#endif
3870	}
3871	mean = mean / samples;
3872	squared_mean = squared_mean / samples;
3873	float std_dev = sqrt( squared_mean - mean * mean );
3874	gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );
3875}`;function TI(s,e,t){let n=new Dd;const a=new Je,o=new Je,c=new Gn,h=new Ib({depthPacking:BA}),d=new Bb,p={},v=t.maxTextureSize,y={[ao]:Ka,[Ka]:ao,[Mr]:Mr},_=new Ts({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Je},radius:{value:4}},vertexShader:MI,fragmentShader:EI}),b=_.clone();b.defines.HORIZONTAL_PASS=1;const T=new un;T.setAttribute("position",new Qn(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const R=new Mi(T,_),A=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=Py;let M=this.type;this.render=function(F,G,V){if(A.enabled===!1||A.autoUpdate===!1&&A.needsUpdate===!1||F.length===0)return;const O=s.getRenderTarget(),z=s.getActiveCubeFace(),Y=s.getActiveMipmapLevel(),se=s.state;se.setBlending(qo),se.buffers.depth.getReversed()===!0?se.buffers.color.setClear(0,0,0,0):se.buffers.color.setClear(1,1,1,1),se.buffers.depth.setTest(!0),se.setScissorTest(!1);const ce=M!==$r&&this.type===$r,he=M===$r&&this.type!==$r;for(let me=0,P=F.length;me<P;me++){const Q=F[me],ee=Q.shadow;if(ee===void 0){console.warn("THREE.WebGLShadowMap:",Q,"has no shadow.");continue}if(ee.autoUpdate===!1&&ee.needsUpdate===!1)continue;a.copy(ee.mapSize);const ge=ee.getFrameExtents();if(a.multiply(ge),o.copy(ee.mapSize),(a.x>v||a.y>v)&&(a.x>v&&(o.x=Math.floor(v/ge.x),a.x=o.x*ge.x,ee.mapSize.x=o.x),a.y>v&&(o.y=Math.floor(v/ge.y),a.y=o.y*ge.y,ee.mapSize.y=o.y)),ee.map===null||ce===!0||he===!0){const W=this.type!==$r?{minFilter:oa,magFilter:oa}:{};ee.map!==null&&ee.map.dispose(),ee.map=new $s(a.x,a.y,W),ee.map.texture.name=Q.name+".shadowMap",ee.camera.updateProjectionMatrix()}s.setRenderTarget(ee.map),s.clear();const Se=ee.getViewportCount();for(let W=0;W<Se;W++){const fe=ee.getViewport(W);c.set(o.x*fe.x,o.y*fe.y,o.x*fe.z,o.y*fe.w),se.viewport(c),ee.updateMatrices(Q,W),n=ee.getFrustum(),U(G,V,ee.camera,Q,this.type)}ee.isPointLightShadow!==!0&&this.type===$r&&C(ee,V),ee.needsUpdate=!1}M=this.type,A.needsUpdate=!1,s.setRenderTarget(O,z,Y)};function C(F,G){const V=e.update(R);_.defines.VSM_SAMPLES!==F.blurSamples&&(_.defines.VSM_SAMPLES=F.blurSamples,b.defines.VSM_SAMPLES=F.blurSamples,_.needsUpdate=!0,b.needsUpdate=!0),F.mapPass===null&&(F.mapPass=new $s(a.x,a.y)),_.uniforms.shadow_pass.value=F.map.texture,_.uniforms.resolution.value=F.mapSize,_.uniforms.radius.value=F.radius,s.setRenderTarget(F.mapPass),s.clear(),s.renderBufferDirect(G,null,V,_,R,null),b.uniforms.shadow_pass.value=F.mapPass.texture,b.uniforms.resolution.value=F.mapSize,b.uniforms.radius.value=F.radius,s.setRenderTarget(F.map),s.clear(),s.renderBufferDirect(G,null,V,b,R,null)}function D(F,G,V,O){let z=null;const Y=V.isPointLight===!0?F.customDistanceMaterial:F.customDepthMaterial;if(Y!==void 0)z=Y;else if(z=V.isPointLight===!0?d:h,s.localClippingEnabled&&G.clipShadows===!0&&Array.isArray(G.clippingPlanes)&&G.clippingPlanes.length!==0||G.displacementMap&&G.displacementScale!==0||G.alphaMap&&G.alphaTest>0||G.map&&G.alphaTest>0||G.alphaToCoverage===!0){const se=z.uuid,ce=G.uuid;let he=p[se];he===void 0&&(he={},p[se]=he);let me=he[ce];me===void 0&&(me=z.clone(),he[ce]=me,G.addEventListener("dispose",H)),z=me}if(z.visible=G.visible,z.wireframe=G.wireframe,O===$r?z.side=G.shadowSide!==null?G.shadowSide:G.side:z.side=G.shadowSide!==null?G.shadowSide:y[G.side],z.alphaMap=G.alphaMap,z.alphaTest=G.alphaToCoverage===!0?.5:G.alphaTest,z.map=G.map,z.clipSh
vendor: 7,117 bytes, line 3875
3875adows=G.clipShadows,z.clippingPlanes=G.clippingPlanes,z.clipIntersection=G.clipIntersection,z.displacementMap=G.displacementMap,z.displacementScale=G.displacementScale,z.displacementBias=G.displacementBias,z.wireframeLinewidth=G.wireframeLinewidth,z.linewidth=G.linewidth,V.isPointLight===!0&&z.isMeshDistanceMaterial===!0){const se=s.properties.get(z);se.light=V}return z}function U(F,G,V,O,z){if(F.visible===!1)return;if(F.layers.test(G.layers)&&(F.isMesh||F.isLine||F.isPoints)&&(F.castShadow||F.receiveShadow&&z===$r)&&(!F.frustumCulled||n.intersectsObject(F))){F.modelViewMatrix.multiplyMatrices(V.matrixWorldInverse,F.matrixWorld);const ce=e.update(F),he=F.material;if(Array.isArray(he)){const me=ce.groups;for(let P=0,Q=me.length;P<Q;P++){const ee=me[P],ge=he[ee.materialIndex];if(ge&&ge.visible){const Se=D(F,ge,O,z);F.onBeforeShadow(s,F,G,V,ce,Se,ee),s.renderBufferDirect(V,null,ce,Se,F,ee),F.onAfterShadow(s,F,G,V,ce,Se,ee)}}}else if(he.visible){const me=D(F,he,O,z);F.onBeforeShadow(s,F,G,V,ce,me,null),s.renderBufferDirect(V,null,ce,me,F,null),F.onAfterShadow(s,F,G,V,ce,me,null)}}const se=F.children;for(let ce=0,he=se.length;ce<he;ce++)U(se[ce],G,V,O,z)}function H(F){F.target.removeEventListener("dispose",H);for(const V in p){const O=p[V],z=F.target.uuid;z in O&&(O[z].dispose(),delete O[z])}}}const AI={[X0]:j0,[q0]:Z0,[Y0]:K0,[gf]:W0,[j0]:X0,[Z0]:q0,[K0]:Y0,[W0]:gf};function wI(s,e){function t(){let pe=!1;const Me=new Gn;let ct=null;const bt=new Gn(0,0,0,0);return{setMask:function(tt){ct!==tt&&!pe&&(s.colorMask(tt,tt,tt,tt),ct=tt)},setLocked:function(tt){pe=tt},setClear:function(tt,We,Tt,Xt,Mn){Mn===!0&&(tt*=Xt,We*=Xt,Tt*=Xt),Me.set(tt,We,Tt,Xt),bt.equals(Me)===!1&&(s.clearColor(tt,We,Tt,Xt),bt.copy(Me))},reset:function(){pe=!1,ct=null,bt.set(-1,0,0,0)}}}function n(){let pe=!1,Me=!1,ct=null,bt=null,tt=null;return{setReversed:function(We){if(Me!==We){const Tt=e.get("EXT_clip_control");We?Tt.clipControlEXT(Tt.LOWER_LEFT_EXT,Tt.ZERO_TO_ONE_EXT):Tt.clipControlEXT(Tt.LOWER_LEFT_EXT,Tt.NEGATIVE_ONE_TO_ONE_EXT),Me=We;const Xt=tt;tt=null,this.setClear(Xt)}},getReversed:function(){return Me},setTest:function(We){We?De(s.DEPTH_TEST):ot(s.DEPTH_TEST)},setMask:function(We){ct!==We&&!pe&&(s.depthMask(We),ct=We)},setFunc:function(We){if(Me&&(We=AI[We]),bt!==We){switch(We){case X0:s.depthFunc(s.NEVER);break;case j0:s.depthFunc(s.ALWAYS);break;case q0:s.depthFunc(s.LESS);break;case gf:s.depthFunc(s.LEQUAL);break;case Y0:s.depthFunc(s.EQUAL);break;case W0:s.depthFunc(s.GEQUAL);break;case Z0:s.depthFunc(s.GREATER);break;case K0:s.depthFunc(s.NOTEQUAL);break;default:s.depthFunc(s.LEQUAL)}bt=We}},setLocked:function(We){pe=We},setClear:function(We){tt!==We&&(Me&&(We=1-We),s.clearDepth(We),tt=We)},reset:function(){pe=!1,ct=null,bt=null,tt=null,Me=!1}}}function a(){let pe=!1,Me=null,ct=null,bt=null,tt=null,We=null,Tt=null,Xt=null,Mn=null;return{setTest:function(hn){pe||(hn?De(s.STENCIL_TEST):ot(s.STENCIL_TEST))},setMask:function(hn){Me!==hn&&!pe&&(s.stencilMask(hn),Me=hn)},setFunc:function(hn,Xi,ba){(ct!==hn||bt!==Xi||tt!==ba)&&(s.stencilFunc(hn,Xi,ba),ct=hn,bt=Xi,tt=ba)},setOp:function(hn,Xi,ba){(We!==hn||Tt!==Xi||Xt!==ba)&&(s.stencilOp(hn,Xi,ba),We=hn,Tt=Xi,Xt=ba)},setLocked:function(hn){pe=hn},setClear:function(hn){Mn!==hn&&(s.clearStencil(hn),Mn=hn)},reset:function(){pe=!1,Me=null,ct=null,bt=null,tt=null,We=null,Tt=null,Xt=null,Mn=null}}}const o=new t,c=new n,h=new a,d=new WeakMap,p=new WeakMap;let v={},y={},_=new WeakMap,b=[],T=null,R=!1,A=null,M=null,C=null,D=null,U=null,H=null,F=null,G=new _t(0,0,0),V=0,O=!1,z=null,Y=null,se=null,ce=null,he=null;const me=s.getParameter(s.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let P=!1,Q=0;const ee=s.getParameter(s.VERSION);ee.indexOf("WebGL")!==-1?(Q=parseFloat(/^WebGL (\d)/.exec(ee)[1]),P=Q>=1):ee.indexOf("OpenGL ES")!==-1&&(Q=parseFloat(/^OpenGL ES (\d)/.exec(ee)[1]),P=Q>=2);let ge=null,Se={};const W=s.getParameter(s.SCISSOR_BOX),fe=s.getParameter(s.VIEWPORT),Ce=new Gn().fromArray(W),Le=new Gn().fromArray(fe);function nt(pe,Me,ct,bt){const tt=new Uint8Array(4),We=s.createTexture();s.bindTexture(pe,We),s.texParameteri(pe,s.TEXTURE_MIN_FILTER,s.NEAREST),s.texParameteri(pe,s.TEXTURE_MAG_FILTER,s.NEAREST);for(let Tt=0;Tt<ct;Tt++)pe===s.TEXTURE_3D||pe===s.TEXTURE_2D_ARRAY?s.texImage3D(Me,0,s.RGBA,1,1,bt,0,s.RGBA,s.UNSIGNED_BYTE,tt):s.texImage2D(Me+Tt,0,s.RGBA,1,1,0,s.RGBA,s.UNSIGNED_BYTE,tt);return We}const ve={};ve[s.TEXTURE_2D]=nt(s.TEXTURE_2D,s.TEXTURE_2D,1),ve[s.TEXTURE_CUBE_MAP]=nt(s.TEXTURE_CUBE_MAP,s.TEXTURE_CUBE_MAP_POSITIVE_X,6),ve[s.TEXTURE_2D_ARRAY]=nt(s.TEXTURE_2D_ARRAY,s.TEXTURE_2D_ARRAY,1,1),ve[s.TEXTURE_3D]=nt(s.TEXTURE_3D,s.TEXTURE_3D,1,1),o.setClear(0,0,0,1),c.setClear(1),h.setClear(0),De(s.DEPTH_TEST),c.setFunc(gf),ke(!1),Fe(CS),De(s.CULL_FACE),Ze(qo);function De(pe){v[pe]!==!0&&(s.enable(pe),v[pe]=!0)}function ot(pe){v[pe]!==!1&&(s.disable(pe),v[pe]=!1)}function gt(pe,Me){return y[pe]!==Me?(s.bindFramebuffer(pe,Me),y[pe]=Me,pe===s.DRAW_FRAMEBUFFER&&(y[s.FRAMEBUFFER]=Me),pe===s.FRAMEBUFFER&&(y[s.DRAW_FRAMEBUFFER]=Me),!0):!1}function Et(pe,Me){let ct=b,bt=!1;if(pe){ct=_.get(Me),ct===void 0&&(ct=[],_.set(Me,ct));const tt=pe.textures;if(ct.length!==tt.length||ct[0]!==s.COLOR_ATTACHMENT0){for(let We=0,Tt=tt.length;We<Tt;We++)ct[We]=s.COLOR_ATTACHMENT0+We;ct.length=tt.length,bt=!0}}else ct[0]!==s.BACK&&(ct[0]=s.BACK,bt=!0);bt&&s.drawBuffers(ct)}function Zt(pe){return T!==pe?(s.useProgram(pe),T=pe,!0):!1}const _n={[Pc]:s.FUNC_ADD,[rA]:s.FUNC_SUBTRACT,[oA]:s.FUNC_REVERSE_SUBTRACT};_n[lA]=s.MIN,_n[cA]=s.MAX;const ie={[uA]:s.ZERO,[fA]:s.ONE,[hA]:s.SRC_COLOR,[G0]:s.SRC_ALPHA,[yA]:s.SRC_ALPHA_SATURATE,[gA]:s.DST_COLOR,[pA]:s.DST_ALPHA,[dA]:s.ONE_MINUS_SRC_COLOR,[k0]:s.ONE_MINUS_SRC_ALPHA,[vA]:s.ONE_MINUS_DST_COLOR,[mA]:s.ONE_MINUS_DST_ALPHA,[_A]:s.CONSTANT_COLOR,[xA]:s.ONE_MINUS_CONSTANT_COLOR,[SA]:s.CONSTANT_ALPHA,[bA]:s.ONE_MINUS_CONSTANT_ALPHA};function Ze(pe,Me,ct,bt,tt,We,Tt,Xt,Mn,hn){if(pe===qo){R===!0&&(ot(s.BLEND),R=!1);return}if(R===!1&&(De(s.BLEND),R=!0),pe!==sA){if(pe!==A||hn!==O){if((M!==Pc||U!==Pc)&&(s.blendEquation(s.FUNC_ADD),M=Pc,U=Pc),hn)switch(pe){case df:s.blendFuncSeparate(s.ONE,s.ONE_MINUS_SRC_ALPHA,s.ONE,s.ONE_MINUS_SRC_ALPHA);break;case NS:s.blendFunc(s.ONE,s.ONE);break;case DS:s.blendFuncSeparate(s.ZERO,s.ONE_MINUS_SRC_COLOR,s.ZERO,s.ONE);break;case US:s.blendFuncSeparate(s.DST_COLOR,s.ONE_MINUS_SRC_ALPHA,s.ZERO,s.ONE);break;default:console.error("THREE.WebGLState: Invalid blending: ",pe);break}else switch(pe){case df:s.blendFuncSeparate(s.SRC_ALPHA,s.ONE_MINUS_SRC_ALPHA,s.ONE,s.ONE_MINUS_SRC_ALPHA);break;case NS:s.blendFuncSeparate(s.SRC_ALPHA,s.ONE,s.ONE,s.ONE);break;case DS:console.error("THREE.WebGLState: SubtractiveBlending requires material.premultipliedAlpha = true");break;case US:console.error("THREE.WebGLState: MultiplyBlending requires material.premultipliedAlpha = true");break;default:console.error("THREE.WebGLState: Invalid blending: ",pe);break}C=null,D=null,H=null,F=null,G.set(0,0,0),V=0,A=pe,O=hn}return}tt=tt||Me,We=We||ct,Tt=Tt||bt,(Me!==M||tt!==U)&&(s.blendEquationSeparate(_n[Me],_n[tt]),M=Me,U=tt),(ct!==C||bt!==D||We!==H||Tt!==F
vendor: 3,635 bytes, line 3875
3875)&&(s.blendFuncSeparate(ie[ct],ie[bt],ie[We],ie[Tt]),C=ct,D=bt,H=We,F=Tt),(Xt.equals(G)===!1||Mn!==V)&&(s.blendColor(Xt.r,Xt.g,Xt.b,Mn),G.copy(Xt),V=Mn),A=pe,O=!1}function je(pe,Me){pe.side===Mr?ot(s.CULL_FACE):De(s.CULL_FACE);let ct=pe.side===Ka;Me&&(ct=!ct),ke(ct),pe.blending===df&&pe.transparent===!1?Ze(qo):Ze(pe.blending,pe.blendEquation,pe.blendSrc,pe.blendDst,pe.blendEquationAlpha,pe.blendSrcAlpha,pe.blendDstAlpha,pe.blendColor,pe.blendAlpha,pe.premultipliedAlpha),c.setFunc(pe.depthFunc),c.setTest(pe.depthTest),c.setMask(pe.depthWrite),o.setMask(pe.colorWrite);const bt=pe.stencilWrite;h.setTest(bt),bt&&(h.setMask(pe.stencilWriteMask),h.setFunc(pe.stencilFunc,pe.stencilRef,pe.stencilFuncMask),h.setOp(pe.stencilFail,pe.stencilZFail,pe.stencilZPass)),it(pe.polygonOffset,pe.polygonOffsetFactor,pe.polygonOffsetUnits),pe.alphaToCoverage===!0?De(s.SAMPLE_ALPHA_TO_COVERAGE):ot(s.SAMPLE_ALPHA_TO_COVERAGE)}function ke(pe){z!==pe&&(pe?s.frontFace(s.CW):s.frontFace(s.CCW),z=pe)}function Fe(pe){pe!==nA?(De(s.CULL_FACE),pe!==Y&&(pe===CS?s.cullFace(s.BACK):pe===iA?s.cullFace(s.FRONT):s.cullFace(s.FRONT_AND_BACK))):ot(s.CULL_FACE),Y=pe}function dt(pe){pe!==se&&(P&&s.lineWidth(pe),se=pe)}function it(pe,Me,ct){pe?(De(s.POLYGON_OFFSET_FILL),(ce!==Me||he!==ct)&&(s.polygonOffset(Me,ct),ce=Me,he=ct)):ot(s.POLYGON_OFFSET_FILL)}function lt(pe){pe?De(s.SCISSOR_TEST):ot(s.SCISSOR_TEST)}function Vt(pe){pe===void 0&&(pe=s.TEXTURE0+me-1),ge!==pe&&(s.activeTexture(pe),ge=pe)}function qt(pe,Me,ct){ct===void 0&&(ge===null?ct=s.TEXTURE0+me-1:ct=ge);let bt=Se[ct];bt===void 0&&(bt={type:void 0,texture:void 0},Se[ct]=bt),(bt.type!==pe||bt.texture!==Me)&&(ge!==ct&&(s.activeTexture(ct),ge=ct),s.bindTexture(pe,Me||ve[pe]),bt.type=pe,bt.texture=Me)}function J(){const pe=Se[ge];pe!==void 0&&pe.type!==void 0&&(s.bindTexture(pe.type,null),pe.type=void 0,pe.texture=void 0)}function k(){try{s.compressedTexImage2D(...arguments)}catch(pe){console.error("THREE.WebGLState:",pe)}}function be(){try{s.compressedTexImage3D(...arguments)}catch(pe){console.error("THREE.WebGLState:",pe)}}function ze(){try{s.texSubImage2D(...arguments)}catch(pe){console.error("THREE.WebGLState:",pe)}}function $e(){try{s.texSubImage3D(...arguments)}catch(pe){console.error("THREE.WebGLState:",pe)}}function Pe(){try{s.compressedTexSubImage2D(...arguments)}catch(pe){console.error("THREE.WebGLState:",pe)}}function At(){try{s.compressedTexSubImage3D(...arguments)}catch(pe){console.error("THREE.WebGLState:",pe)}}function ft(){try{s.texStorage2D(...arguments)}catch(pe){console.error("THREE.WebGLState:",pe)}}function Rt(){try{s.texStorage3D(...arguments)}catch(pe){console.error("THREE.WebGLState:",pe)}}function Ct(){try{s.texImage2D(...arguments)}catch(pe){console.error("THREE.WebGLState:",pe)}}function Qe(){try{s.texImage3D(...arguments)}catch(pe){console.error("THREE.WebGLState:",pe)}}function et(pe){Ce.equals(pe)===!1&&(s.scissor(pe.x,pe.y,pe.z,pe.w),Ce.copy(pe))}function Dt(pe){Le.equals(pe)===!1&&(s.viewport(pe.x,pe.y,pe.z,pe.w),Le.copy(pe))}function vt(pe,Me){let ct=p.get(Me);ct===void 0&&(ct=new WeakMap,p.set(Me,ct));let bt=ct.get(pe);bt===void 0&&(bt=s.getUniformBlockIndex(Me,pe.name),ct.set(pe,bt))}function ut(pe,Me){const bt=p.get(Me).get(pe);d.get(Me)!==bt&&(s.uniformBlockBinding(Me,bt,pe.__bindingPointIndex),d.set(Me,bt))}function Ut(){s.disable(s.BLEND),s.disable(s.CULL_FACE),s.disable(s.DEPTH_TEST),s.disable(s.POLYGON_OFFSET_FILL),s.disable(s.SCISSOR_TEST),s.disable(s.STENCIL_TEST),s.disable(s.SAMPLE_ALPHA_TO_COVERAGE),s.blendEquation(s.FUNC_ADD),s.blendFunc(s.ONE,s.ZERO),s.blendFuncSeparate(s.ONE,s.ZERO,s.ONE,s.ZERO),s.blendColor
vendor: 6,508 bytes, line 3875
3875(0,0,0,0),s.colorMask(!0,!0,!0,!0),s.clearColor(0,0,0,0),s.depthMask(!0),s.depthFunc(s.LESS),c.setReversed(!1),s.clearDepth(1),s.stencilMask(4294967295),s.stencilFunc(s.ALWAYS,0,4294967295),s.stencilOp(s.KEEP,s.KEEP,s.KEEP),s.clearStencil(0),s.cullFace(s.BACK),s.frontFace(s.CCW),s.polygonOffset(0,0),s.activeTexture(s.TEXTURE0),s.bindFramebuffer(s.FRAMEBUFFER,null),s.bindFramebuffer(s.DRAW_FRAMEBUFFER,null),s.bindFramebuffer(s.READ_FRAMEBUFFER,null),s.useProgram(null),s.lineWidth(1),s.scissor(0,0,s.canvas.width,s.canvas.height),s.viewport(0,0,s.canvas.width,s.canvas.height),v={},ge=null,Se={},y={},_=new WeakMap,b=[],T=null,R=!1,A=null,M=null,C=null,D=null,U=null,H=null,F=null,G=new _t(0,0,0),V=0,O=!1,z=null,Y=null,se=null,ce=null,he=null,Ce.set(0,0,s.canvas.width,s.canvas.height),Le.set(0,0,s.canvas.width,s.canvas.height),o.reset(),c.reset(),h.reset()}return{buffers:{color:o,depth:c,stencil:h},enable:De,disable:ot,bindFramebuffer:gt,drawBuffers:Et,useProgram:Zt,setBlending:Ze,setMaterial:je,setFlipSided:ke,setCullFace:Fe,setLineWidth:dt,setPolygonOffset:it,setScissorTest:lt,activeTexture:Vt,bindTexture:qt,unbindTexture:J,compressedTexImage2D:k,compressedTexImage3D:be,texImage2D:Ct,texImage3D:Qe,updateUBOMapping:vt,uniformBlockBinding:ut,texStorage2D:ft,texStorage3D:Rt,texSubImage2D:ze,texSubImage3D:$e,compressedTexSubImage2D:Pe,compressedTexSubImage3D:At,scissor:et,viewport:Dt,reset:Ut}}function RI(s,e,t,n,a,o,c){const h=e.has("WEBGL_multisampled_render_to_texture")?e.get("WEBGL_multisampled_render_to_texture"):null,d=typeof navigator>"u"?!1:/OculusBrowser/g.test(navigator.userAgent),p=new Je,v=new WeakMap;let y;const _=new WeakMap;let b=!1;try{b=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function T(J,k){return b?new OffscreenCanvas(J,k):km("canvas")}function R(J,k,be){let ze=1;const $e=qt(J);if(($e.width>be||$e.height>be)&&(ze=be/Math.max($e.width,$e.height)),ze<1)if(typeof HTMLImageElement<"u"&&J instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&J instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&J instanceof ImageBitmap||typeof VideoFrame<"u"&&J instanceof VideoFrame){const Pe=Math.floor(ze*$e.width),At=Math.floor(ze*$e.height);y===void 0&&(y=T(Pe,At));const ft=k?T(Pe,At):y;return ft.width=Pe,ft.height=At,ft.getContext("2d").drawImage(J,0,0,Pe,At),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+$e.width+"x"+$e.height+") to ("+Pe+"x"+At+")."),ft}else return"data"in J&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+$e.width+"x"+$e.height+")."),J;return J}function A(J){return J.generateMipmaps}function M(J){s.generateMipmap(J)}function C(J){return J.isWebGLCubeRenderTarget?s.TEXTURE_CUBE_MAP:J.isWebGL3DRenderTarget?s.TEXTURE_3D:J.isWebGLArrayRenderTarget||J.isCompressedArrayTexture?s.TEXTURE_2D_ARRAY:s.TEXTURE_2D}function D(J,k,be,ze,$e=!1){if(J!==null){if(s[J]!==void 0)return s[J];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+J+"'")}let Pe=k;if(k===s.RED&&(be===s.FLOAT&&(Pe=s.R32F),be===s.HALF_FLOAT&&(Pe=s.R16F),be===s.UNSIGNED_BYTE&&(Pe=s.R8)),k===s.RED_INTEGER&&(be===s.UNSIGNED_BYTE&&(Pe=s.R8UI),be===s.UNSIGNED_SHORT&&(Pe=s.R16UI),be===s.UNSIGNED_INT&&(Pe=s.R32UI),be===s.BYTE&&(Pe=s.R8I),be===s.SHORT&&(Pe=s.R16I),be===s.INT&&(Pe=s.R32I)),k===s.RG&&(be===s.FLOAT&&(Pe=s.RG32F),be===s.HALF_FLOAT&&(Pe=s.RG16F),be===s.UNSIGNED_BYTE&&(Pe=s.RG8)),k===s.RG_INTEGER&&(be===s.UNSIGNED_BYTE&&(Pe=s.RG8UI),be===s.UNSIGNED_SHORT&&(Pe=s.RG16UI),be===s.UNSIGNED_INT&&(Pe=s.RG32UI),be===s.BYTE&&(Pe=s.RG8I),be===s.SHORT&&(Pe=s.RG16I),be===s.INT&&(Pe=s.RG32I)),k===s.RGB_INTEGER&&(be===s.UNSIGNED_BYTE&&(Pe=s.RGB8UI),be===s.UNSIGNED_SHORT&&(Pe=s.RGB16UI),be===s.UNSIGNED_INT&&(Pe=s.RGB32UI),be===s.BYTE&&(Pe=s.RGB8I),be===s.SHORT&&(Pe=s.RGB16I),be===s.INT&&(Pe=s.RGB32I)),k===s.RGBA_INTEGER&&(be===s.UNSIGNED_BYTE&&(Pe=s.RGBA8UI),be===s.UNSIGNED_SHORT&&(Pe=s.RGBA16UI),be===s.UNSIGNED_INT&&(Pe=s.RGBA32UI),be===s.BYTE&&(Pe=s.RGBA8I),be===s.SHORT&&(Pe=s.RGBA16I),be===s.INT&&(Pe=s.RGBA32I)),k===s.RGB&&(be===s.UNSIGNED_INT_5_9_9_9_REV&&(Pe=s.RGB9_E5),be===s.UNSIGNED_INT_10F_11F_11F_REV&&(Pe=s.R11F_G11F_B10F)),k===s.RGBA){const At=$e?Vm:An.getTransfer(ze);be===s.FLOAT&&(Pe=s.RGBA32F),be===s.HALF_FLOAT&&(Pe=s.RGBA16F),be===s.UNSIGNED_BYTE&&(Pe=At===ni?s.SRGB8_ALPHA8:s.RGBA8),be===s.UNSIGNED_SHORT_4_4_4_4&&(Pe=s.RGBA4),be===s.UNSIGNED_SHORT_5_5_5_1&&(Pe=s.RGB5_A1)}return(Pe===s.R16F||Pe===s.R32F||Pe===s.RG16F||Pe===s.RG32F||Pe===s.RGBA16F||Pe===s.RGBA32F)&&e.get("EXT_color_buffer_float"),Pe}function U(J,k){let be;return J?k===null||k===Zo||k===pd?be=s.DEPTH24_STENCIL8:k===bi?be=s.DEPTH32F_STENCIL8:k===dd&&(be=s.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):k===null||k===Zo||k===pd?be=s.DEPTH_COMPONENT24:k===bi?be=s.DEPTH_COMPONENT32F:k===dd&&(be=s.DEPTH_COMPONENT16),be}function H(J,k){return A(J)===!0||J.isFramebufferTexture&&J.minFilter!==oa&&J.minFilter!==Hn?Math.log2(Math.max(k.width,k.height))+1:J.mipmaps!==void 0&&J.mipmaps.length>0?J.mipmaps.length:J.isCompressedTexture&&Array.isArray(J.image)?k.mipmaps.length:1}function F(J){const k=J.target;k.removeEventListener("dispose",F),V(k),k.isVideoTexture&&v.delete(k)}function G(J){const k=J.target;k.removeEventListener("dispose",G),z(k)}function V(J){const k=n.get(J);if(k.__webglInit===void 0)return;const be=J.source,ze=_.get(be);if(ze){const $e=ze[k.__cacheKey];$e.usedTimes--,$e.usedTimes===0&&O(J),Object.keys(ze).length===0&&_.delete(be)}n.remove(J)}function O(J){const k=n.get(J);s.deleteTexture(k.__webglTexture);const be=J.source,ze=_.get(be);delete ze[k.__cacheKey],c.memory.textures--}function z(J){const k=n.get(J);if(J.depthTexture&&(J.depthTexture.dispose(),n.remove(J.depthTexture)),J.isWebGLCubeRenderTarget)for(let ze=0;ze<6;ze++){if(Array.isArray(k.__webglFramebuffer[ze]))for(let $e=0;$e<k.__webglFramebuffer[ze].length;$e++)s.deleteFramebuffer(k.__webglFramebuffer[ze][$e]);else s.deleteFramebuffer(k.__webglFramebuffer[ze]);k.__webglDepthbuffer&&s.deleteRenderbuffer(k.__webglDepthbuffer[ze])}else{if(Array.isArray(k.__webglFramebuffer))for(let ze=0;ze<k.__webglFramebuffer.length;ze++)s.deleteFramebuffer(k.__webglFramebuffer[ze]);else s.deleteFramebuffer(k.__webglFramebuffer);if(k.__webglDepthbuffer&&s.deleteRenderbuffer(k.__webglDepthbuffer),k.__webglMultisampledFramebuffer&&s.deleteFramebuffer(k.__webglMultisampledFramebuffer),k.__webglColorRen
vendor: 10,235 bytes, line 3875
3875derbuffer)for(let ze=0;ze<k.__webglColorRenderbuffer.length;ze++)k.__webglColorRenderbuffer[ze]&&s.deleteRenderbuffer(k.__webglColorRenderbuffer[ze]);k.__webglDepthRenderbuffer&&s.deleteRenderbuffer(k.__webglDepthRenderbuffer)}const be=J.textures;for(let ze=0,$e=be.length;ze<$e;ze++){const Pe=n.get(be[ze]);Pe.__webglTexture&&(s.deleteTexture(Pe.__webglTexture),c.memory.textures--),n.remove(be[ze])}n.remove(J)}let Y=0;function se(){Y=0}function ce(){const J=Y;return J>=a.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+J+" texture units while this GPU supports only "+a.maxTextures),Y+=1,J}function he(J){const k=[];return k.push(J.wrapS),k.push(J.wrapT),k.push(J.wrapR||0),k.push(J.magFilter),k.push(J.minFilter),k.push(J.anisotropy),k.push(J.internalFormat),k.push(J.format),k.push(J.type),k.push(J.generateMipmaps),k.push(J.premultiplyAlpha),k.push(J.flipY),k.push(J.unpackAlignment),k.push(J.colorSpace),k.join()}function me(J,k){const be=n.get(J);if(J.isVideoTexture&&lt(J),J.isRenderTargetTexture===!1&&J.isExternalTexture!==!0&&J.version>0&&be.__version!==J.version){const ze=J.image;if(ze===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(ze.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{ve(be,J,k);return}}else J.isExternalTexture&&(be.__webglTexture=J.sourceTexture?J.sourceTexture:null);t.bindTexture(s.TEXTURE_2D,be.__webglTexture,s.TEXTURE0+k)}function P(J,k){const be=n.get(J);if(J.isRenderTargetTexture===!1&&J.version>0&&be.__version!==J.version){ve(be,J,k);return}t.bindTexture(s.TEXTURE_2D_ARRAY,be.__webglTexture,s.TEXTURE0+k)}function Q(J,k){const be=n.get(J);if(J.isRenderTargetTexture===!1&&J.version>0&&be.__version!==J.version){ve(be,J,k);return}t.bindTexture(s.TEXTURE_3D,be.__webglTexture,s.TEXTURE0+k)}function ee(J,k){const be=n.get(J);if(J.version>0&&be.__version!==J.version){De(be,J,k);return}t.bindTexture(s.TEXTURE_CUBE_MAP,be.__webglTexture,s.TEXTURE0+k)}const ge={[Xc]:s.REPEAT,[Gi]:s.CLAMP_TO_EDGE,[hd]:s.MIRRORED_REPEAT},Se={[oa]:s.NEAREST,[Hy]:s.NEAREST_MIPMAP_NEAREST,[of]:s.NEAREST_MIPMAP_LINEAR,[Hn]:s.LINEAR,[rd]:s.LINEAR_MIPMAP_NEAREST,[Tr]:s.LINEAR_MIPMAP_LINEAR},W={[HA]:s.NEVER,[jA]:s.ALWAYS,[FA]:s.LESS,[gb]:s.LEQUAL,[VA]:s.EQUAL,[XA]:s.GEQUAL,[GA]:s.GREATER,[kA]:s.NOTEQUAL};function fe(J,k){if(k.type===bi&&e.has("OES_texture_float_linear")===!1&&(k.magFilter===Hn||k.magFilter===rd||k.magFilter===of||k.magFilter===Tr||k.minFilter===Hn||k.minFilter===rd||k.minFilter===of||k.minFilter===Tr)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),s.texParameteri(J,s.TEXTURE_WRAP_S,ge[k.wrapS]),s.texParameteri(J,s.TEXTURE_WRAP_T,ge[k.wrapT]),(J===s.TEXTURE_3D||J===s.TEXTURE_2D_ARRAY)&&s.texParameteri(J,s.TEXTURE_WRAP_R,ge[k.wrapR]),s.texParameteri(J,s.TEXTURE_MAG_FILTER,Se[k.magFilter]),s.texParameteri(J,s.TEXTURE_MIN_FILTER,Se[k.minFilter]),k.compareFunction&&(s.texParameteri(J,s.TEXTURE_COMPARE_MODE,s.COMPARE_REF_TO_TEXTURE),s.texParameteri(J,s.TEXTURE_COMPARE_FUNC,W[k.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(k.magFilter===oa||k.minFilter!==of&&k.minFilter!==Tr||k.type===bi&&e.has("OES_texture_float_linear")===!1)return;if(k.anisotropy>1||n.get(k).__currentAnisotropy){const be=e.get("EXT_texture_filter_anisotropic");s.texParameterf(J,be.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(k.anisotropy,a.getMaxAnisotropy())),n.get(k).__currentAnisotropy=k.anisotropy}}}function Ce(J,k){let be=!1;J.__webglInit===void 0&&(J.__webglInit=!0,k.addEventListener("dispose",F));const ze=k.source;let $e=_.get(ze);$e===void 0&&($e={},_.set(ze,$e));const Pe=he(k);if(Pe!==J.__cacheKey){$e[Pe]===void 0&&($e[Pe]={texture:s.createTexture(),usedTimes:0},c.memory.textures++,be=!0),$e[Pe].usedTimes++;const At=$e[J.__cacheKey];At!==void 0&&($e[J.__cacheKey].usedTimes--,At.usedTimes===0&&O(k)),J.__cacheKey=Pe,J.__webglTexture=$e[Pe].texture}return be}function Le(J,k,be){return Math.floor(Math.floor(J/be)/k)}function nt(J,k,be,ze){const Pe=J.updateRanges;if(Pe.length===0)t.texSubImage2D(s.TEXTURE_2D,0,0,0,k.width,k.height,be,ze,k.data);else{Pe.sort((Qe,et)=>Qe.start-et.start);let At=0;for(let Qe=1;Qe<Pe.length;Qe++){const et=Pe[At],Dt=Pe[Qe],vt=et.start+et.count,ut=Le(Dt.start,k.width,4),Ut=Le(et.start,k.width,4);Dt.start<=vt+1&&ut===Ut&&Le(Dt.start+Dt.count-1,k.width,4)===ut?et.count=Math.max(et.count,Dt.start+Dt.count-et.start):(++At,Pe[At]=Dt)}Pe.length=At+1;const ft=s.getParameter(s.UNPACK_ROW_LENGTH),Rt=s.getParameter(s.UNPACK_SKIP_PIXELS),Ct=s.getParameter(s.UNPACK_SKIP_ROWS);s.pixelStorei(s.UNPACK_ROW_LENGTH,k.width);for(let Qe=0,et=Pe.length;Qe<et;Qe++){const Dt=Pe[Qe],vt=Math.floor(Dt.start/4),ut=Math.ceil(Dt.count/4),Ut=vt%k.width,pe=Math.floor(vt/k.width),Me=ut,ct=1;s.pixelStorei(s.UNPACK_SKIP_PIXELS,Ut),s.pixelStorei(s.UNPACK_SKIP_ROWS,pe),t.texSubImage2D(s.TEXTURE_2D,0,Ut,pe,Me,ct,be,ze,k.data)}J.clearUpdateRanges(),s.pixelStorei(s.UNPACK_ROW_LENGTH,ft),s.pixelStorei(s.UNPACK_SKIP_PIXELS,Rt),s.pixelStorei(s.UNPACK_SKIP_ROWS,Ct)}}function ve(J,k,be){let ze=s.TEXTURE_2D;(k.isDataArrayTexture||k.isCompressedArrayTexture)&&(ze=s.TEXTURE_2D_ARRAY),k.isData3DTexture&&(ze=s.TEXTURE_3D);const $e=Ce(J,k),Pe=k.source;t.bindTexture(ze,J.__webglTexture,s.TEXTURE0+be);const At=n.get(Pe);if(Pe.version!==At.__version||$e===!0){t.activeTexture(s.TEXTURE0+be);const ft=An.getPrimaries(An.workingColorSpace),Rt=k.colorSpace===zl?null:An.getPrimaries(k.colorSpace),Ct=k.colorSpace===zl||ft===Rt?s.NONE:s.BROWSER_DEFAULT_WEBGL;s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,k.flipY),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,k.premultiplyAlpha),s.pixelStorei(s.UNPACK_ALIGNMENT,k.unpackAlignment),s.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL,Ct);let Qe=R(k.image,!1,a.maxTextureSize);Qe=Vt(k,Qe);const et=o.convert(k.format,k.colorSpace),Dt=o.convert(k.type);let vt=D(k.internalFormat,et,Dt,k.colorSpace,k.isVideoTexture);fe(ze,k);let ut;const Ut=k.mipmaps,pe=k.isVideoTexture!==!0,Me=At.__version===void 0||$e===!0,ct=Pe.dataReady,bt=H(k,Qe);if(k.isDepthTexture)vt=U(k.format===gd,k.type),Me&&(pe?t.texStorage2D(s.TEXTURE_2D,1,vt,Qe.width,Qe.height):t.texImage2D(s.TEXTURE_2D,0,vt,Qe.width,Qe.height,0,et,Dt,null));else if(k.isDataTexture)if(Ut.length>0){pe&&Me&&t.texStorage2D(s.TEXTURE_2D,bt,vt,Ut[0].width,Ut[0].height);for(let tt=0,We=Ut.length;tt<We;tt++)ut=Ut[tt],pe?ct&&t.texSubImage2D(s.TEXTURE_2D,tt,0,0,ut.width,ut.height,et,Dt,ut.data):t.texImage2D(s.TEXTURE_2D,tt,vt,ut.width,ut.height,0,et,Dt,ut.data);k.generateMipmaps=!1}else pe?(Me&&t.texStorage2D(s.TEXTURE_2D,bt,vt,Qe.width,Qe.height),ct&&nt(k,Qe,et,Dt)):t.texImage2D(s.TEXTURE_2D,0,vt,Qe.width,Qe.height,0,et,Dt,Qe.data);else if(k.isCompressedTexture)if(k.isCompressedArrayTexture){pe&&Me&&t.texStorage3D(s.TEXTURE_2D_ARRAY,bt,vt,Ut[0].width,Ut[0].height,Qe.depth);for(let tt=0,We=Ut.length;tt<We;tt++)if(ut=Ut[tt],k.format!==ki)if(et!==null)if(pe){if(ct)if(k.layerUpdates.size>0){const Tt=GS(ut.width,ut.height,k.format,k.type);for(const Xt of k.layerUpdates){const Mn=ut.data.subarray(Xt*Tt/ut.data.BYTES_PER_ELEMENT,(Xt+1)*Tt/ut.data.BYTES_PER_ELEMENT);t.compressedTexSubImage3D(s.TEXTURE_2D_ARRAY,tt,0,0,Xt,ut.width,ut.height,1,et,Mn)}k.clearLayerUpdates()}else t.compressedTexSubImage3D(s.TEXTURE_2D_ARRAY,tt,0,0,0,ut.width,ut.height,Qe.depth,et,ut.data)}else t.compressedTexImage3D(s.TEXTURE_2D_ARRAY,tt,vt,ut.width,ut.height,Qe.depth,0,ut.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else pe?ct&&t.texSubImage3D(s.TEXTURE_2D_ARRAY,tt,0,0,0,ut.width,ut.height,Qe.depth,et,Dt,ut.data):t.texImage3D(s.TEXTURE_2D_ARRAY,tt,vt,ut.width,ut.height,Qe.depth,0,et,Dt,ut.data)}else{pe&&Me&&t.texStorage2D(s.TEXTURE_2D,bt,vt,Ut[0].width,Ut[0].height);for(let tt=0,We=Ut.length;tt<We;tt++)ut=Ut[tt],k.format!==ki?et!==null?pe?ct&&t.compressedTexSubImage2D(s.TEXTURE_2D,tt,0,0,ut.width,ut.height,et,ut.data):t.compressedTexImage2D(s.TEXTURE_2D,tt,vt,ut.width,ut.height,0,ut.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):pe?ct&&t.texSubImage2D(s.TEXTURE_2D,tt,0,0,ut.width,ut.height,et,Dt,ut.data):t.texImage2D(s.TEXTURE_2D,tt,vt,ut.width,ut.height,0,et,Dt,ut.data)}else if(k.isDataArrayTexture)if(pe){if(Me&&t.texStorage3D(s.TEXTURE_2D_ARRAY,bt,vt,Qe.width,Qe.height,Qe.depth),ct)if(k.layerUpdates.size>0){const tt=GS(Qe.width,Qe.height,k.format,k.type);for(const We of k.layerUpdates){const Tt=Qe.data.subarray(We*tt/Qe.data.BYTES_PER_ELEMENT,(We+1)*tt/Qe.data.BYTES_PER_ELEMENT);t.texSubImage3D(s.TEXTURE_2D_ARRAY,0,0,0,We,Qe.width,Qe.height,1,et,Dt,Tt)}k.clearLayerUpdates()}else t.texSubImage3D(s.TEXTURE_2D_ARRAY,0,0,0,0,Qe.width,Qe.height,Qe.depth,et,Dt,Qe.data)}else t.texImage3D(s.TEXTURE_2D_ARRAY,0,vt,Qe.width,Qe.height,Qe.depth,0,et,Dt,Qe.data);else if(k.isData3DTexture)pe?(Me&&t.texStorage3D(s.TEXTURE_3D,bt,vt,Qe.width,Qe.height,Qe.depth),ct&&t.texSubImage3D(s.TEXTURE_3D,0,0,0,0,Qe.width,Qe.height,Qe.depth,et,Dt,Qe.data)):t.texImage3D(s.TEXTURE_3D,0,vt,Qe.width,Qe.height,Qe.depth,0,et,Dt,Qe.data);else if(k.isFramebufferTexture){if(Me)if(pe)t.texStorage2D(s.TEXTURE_2D,bt,vt,Qe.width,Qe.height);else{let tt=Qe.width,We=Qe.height;for(let Tt=0;Tt<bt;Tt++)t.texImage2D(s.TEXTURE_2D,Tt,vt,tt,We,0,et,Dt,null),tt>>=1,We>>=1}}else if(Ut.length>0){if(pe&&Me){const tt=qt(Ut[0]);t.texStorage2D(s.TEXTURE_2D,bt,vt,tt.width,tt.height)}for(let tt=0,We=Ut.length;tt<We;tt++)ut=Ut[tt],pe?ct&&t.texSubImage2D(s.TEXTURE_2D,tt,0,0,et,Dt,ut):t.texImage2D(s.TEXTURE_2D,tt,vt,et,Dt,ut);k.generateMipmaps=!1}else if(pe){if(Me){const tt=qt(Qe);t.texStorage2D(s.TEXTURE_2D,bt,vt,tt.width,tt.height)}ct&&t.texSubImage2D(s.TEXTURE_2D,0,0,0,et,Dt,Qe)}else t.texImage2D(s.TEXTURE_2D,0,vt,et,Dt,Qe);A(k)&&M(ze),At.__version=Pe.version,k.onUpdate&&k.onUpdate(k)}J.__version=k.version}function De(J,k,be){if(k.image.length!==6)return;const ze=Ce(J,k),$e=k.source;t.bindTexture(s.TEXTURE_CUBE_MAP,J.__webglTexture,s.TEXTURE0+be);const Pe=n.get($e);if($e.version!==Pe.__version||ze===!0){t.activeTexture(s.TEXTURE0+be);
vendor: 8,661 bytes, line 3875
3875const At=An.getPrimaries(An.workingColorSpace),ft=k.colorSpace===zl?null:An.getPrimaries(k.colorSpace),Rt=k.colorSpace===zl||At===ft?s.NONE:s.BROWSER_DEFAULT_WEBGL;s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL,k.flipY),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,k.premultiplyAlpha),s.pixelStorei(s.UNPACK_ALIGNMENT,k.unpackAlignment),s.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL,Rt);const Ct=k.isCompressedTexture||k.image[0].isCompressedTexture,Qe=k.image[0]&&k.image[0].isDataTexture,et=[];for(let We=0;We<6;We++)!Ct&&!Qe?et[We]=R(k.image[We],!0,a.maxCubemapSize):et[We]=Qe?k.image[We].image:k.image[We],et[We]=Vt(k,et[We]);const Dt=et[0],vt=o.convert(k.format,k.colorSpace),ut=o.convert(k.type),Ut=D(k.internalFormat,vt,ut,k.colorSpace),pe=k.isVideoTexture!==!0,Me=Pe.__version===void 0||ze===!0,ct=$e.dataReady;let bt=H(k,Dt);fe(s.TEXTURE_CUBE_MAP,k);let tt;if(Ct){pe&&Me&&t.texStorage2D(s.TEXTURE_CUBE_MAP,bt,Ut,Dt.width,Dt.height);for(let We=0;We<6;We++){tt=et[We].mipmaps;for(let Tt=0;Tt<tt.length;Tt++){const Xt=tt[Tt];k.format!==ki?vt!==null?pe?ct&&t.compressedTexSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+We,Tt,0,0,Xt.width,Xt.height,vt,Xt.data):t.compressedTexImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+We,Tt,Ut,Xt.width,Xt.height,0,Xt.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):pe?ct&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+We,Tt,0,0,Xt.width,Xt.height,vt,ut,Xt.data):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+We,Tt,Ut,Xt.width,Xt.height,0,vt,ut,Xt.data)}}}else{if(tt=k.mipmaps,pe&&Me){tt.length>0&&bt++;const We=qt(et[0]);t.texStorage2D(s.TEXTURE_CUBE_MAP,bt,Ut,We.width,We.height)}for(let We=0;We<6;We++)if(Qe){pe?ct&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+We,0,0,0,et[We].width,et[We].height,vt,ut,et[We].data):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+We,0,Ut,et[We].width,et[We].height,0,vt,ut,et[We].data);for(let Tt=0;Tt<tt.length;Tt++){const Mn=tt[Tt].image[We].image;pe?ct&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+We,Tt+1,0,0,Mn.width,Mn.height,vt,ut,Mn.data):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+We,Tt+1,Ut,Mn.width,Mn.height,0,vt,ut,Mn.data)}}else{pe?ct&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+We,0,0,0,vt,ut,et[We]):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+We,0,Ut,vt,ut,et[We]);for(let Tt=0;Tt<tt.length;Tt++){const Xt=tt[Tt];pe?ct&&t.texSubImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+We,Tt+1,0,0,vt,ut,Xt.image[We]):t.texImage2D(s.TEXTURE_CUBE_MAP_POSITIVE_X+We,Tt+1,Ut,vt,ut,Xt.image[We])}}}A(k)&&M(s.TEXTURE_CUBE_MAP),Pe.__version=$e.version,k.onUpdate&&k.onUpdate(k)}J.__version=k.version}function ot(J,k,be,ze,$e,Pe){const At=o.convert(be.format,be.colorSpace),ft=o.convert(be.type),Rt=D(be.internalFormat,At,ft,be.colorSpace),Ct=n.get(k),Qe=n.get(be);if(Qe.__renderTarget=k,!Ct.__hasExternalTextures){const et=Math.max(1,k.width>>Pe),Dt=Math.max(1,k.height>>Pe);$e===s.TEXTURE_3D||$e===s.TEXTURE_2D_ARRAY?t.texImage3D($e,Pe,Rt,et,Dt,k.depth,0,At,ft,null):t.texImage2D($e,Pe,Rt,et,Dt,0,At,ft,null)}t.bindFramebuffer(s.FRAMEBUFFER,J),it(k)?h.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER,ze,$e,Qe.__webglTexture,0,dt(k)):($e===s.TEXTURE_2D||$e>=s.TEXTURE_CUBE_MAP_POSITIVE_X&&$e<=s.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&s.framebufferTexture2D(s.FRAMEBUFFER,ze,$e,Qe.__webglTexture,Pe),t.bindFramebuffer(s.FRAMEBUFFER,null)}function gt(J,k,be){if(s.bindRenderbuffer(s.RENDERBUFFER,J),k.depthBuffer){const ze=k.depthTexture,$e=ze&&ze.isDepthTexture?ze.type:null,Pe=U(k.stencilBuffer,$e),At=k.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT,ft=dt(k);it(k)?h.renderbufferStorageMultisampleEXT(s.RENDERBUFFER,ft,Pe,k.width,k.height):be?s.renderbufferStorageMultisample(s.RENDERBUFFER,ft,Pe,k.width,k.height):s.renderbufferStorage(s.RENDERBUFFER,Pe,k.width,k.height),s.framebufferRenderbuffer(s.FRAMEBUFFER,At,s.RENDERBUFFER,J)}else{const ze=k.textures;for(let $e=0;$e<ze.length;$e++){const Pe=ze[$e],At=o.convert(Pe.format,Pe.colorSpace),ft=o.convert(Pe.type),Rt=D(Pe.internalFormat,At,ft,Pe.colorSpace),Ct=dt(k);be&&it(k)===!1?s.renderbufferStorageMultisample(s.RENDERBUFFER,Ct,Rt,k.width,k.height):it(k)?h.renderbufferStorageMultisampleEXT(s.RENDERBUFFER,Ct,Rt,k.width,k.height):s.renderbufferStorage(s.RENDERBUFFER,Rt,k.width,k.height)}}s.bindRenderbuffer(s.RENDERBUFFER,null)}function Et(J,k){if(k&&k.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(s.FRAMEBUFFER,J),!(k.depthTexture&&k.depthTexture.isDepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");const ze=n.get(k.depthTexture);ze.__renderTarget=k,(!ze.__webglTexture||k.depthTexture.image.width!==k.width||k.depthTexture.image.height!==k.height)&&(k.depthTexture.image.width=k.width,k.depthTexture.image.height=k.height,k.depthTexture.needsUpdate=!0),me(k.depthTexture,0);const $e=ze.__webglTexture,Pe=dt(k);if(k.depthTexture.format===md)it(k)?h.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER,s.DEPTH_ATTACHMENT,s.TEXTURE_2D,$e,0,Pe):s.framebufferTexture2D(s.FRAMEBUFFER,s.DEPTH_ATTACHMENT,s.TEXTURE_2D,$e,0);else if(k.depthTexture.format===gd)it(k)?h.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER,s.DEPTH_STENCIL_ATTACHMENT,s.TEXTURE_2D,$e,0,Pe):s.framebufferTexture2D(s.FRAMEBUFFER,s.DEPTH_STENCIL_ATTACHMENT,s.TEXTURE_2D,$e,0);else throw new Error("Unknown depthTexture format")}function Zt(J){const k=n.get(J),be=J.isWebGLCubeRenderTarget===!0;if(k.__boundDepthTexture!==J.depthTexture){const ze=J.depthTexture;if(k.__depthDisposeCallback&&k.__depthDisposeCallback(),ze){const $e=()=>{delete k.__boundDepthTexture,delete k.__depthDisposeCallback,ze.removeEventListener("dispose",$e)};ze.addEventListener("dispose",$e),k.__depthDisposeCallback=$e}k.__boundDepthTexture=ze}if(J.depthTexture&&!k.__autoAllocateDepthBuffer){if(be)throw new Error("target.depthTexture not supported in Cube render targets");const ze=J.texture.mipmaps;ze&&ze.length>0?Et(k.__webglFramebuffer[0],J):Et(k.__webglFramebuffer,J)}else if(be){k.__webglDepthbuffer=[];for(let ze=0;ze<6;ze++)if(t.bindFramebuffer(s.FRAMEBUFFER,k.__webglFramebuffer[ze]),k.__webglDepthbuffer[ze]===void 0)k.__webglDepthbuffer[ze]=s.createRenderbuffer(),gt(k.__webglDepthbuffer[ze],J,!1);else{const $e=J.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT,Pe=k.__webglDepthbuffer[ze];s.bindRenderbuffer(s.RENDERBUFFER,Pe),s.framebufferRenderbuffer(s.FRAMEBUFFER,$e,s.RENDERBUFFER,Pe)}}else{const ze=J.texture.mipmaps;if(ze&&ze.length>0?t.bindFramebuffer(s.FRAMEBUFFER,k.__webglFramebuffer[0]):t.bindFramebuffer(s.FRAMEBUFFER,k.__webglFramebuffer),k.__webglDepthbuffer===void 0)k.__webglDepthbuffer=s.createRenderbuffer(),gt(k.__webglDepthbuffer,J,!1);else{const $e=J.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT,Pe=k.__webglDepthbuffer;s.bindRenderbuffer(s.RENDERBUFFER,Pe),s.framebufferRenderbuffer(s.FRAMEBUFFER,$e,s.RENDERBUFFER,Pe)}}t.bindFramebuffer(s.FRAMEBUFFER,null)}function _n(J,k,be){const ze=n.get(J);k!==void 0&&ot(ze.__webglFramebuffer,J,J.texture,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,0),be!==void 0&&Zt(J)}function ie(J){const k=J.texture,be=n.get(J),ze=n.get(k);J.addEventListener("dispose",G);const $e=J.textures,Pe=J.isWebGLCubeRenderTarget===!0,At=$e.length>1;if(At||(ze.__webglTexture===void 0&&(ze.__webglTexture=s.createTexture()),ze.__version=k.version,c.memory.textures++),Pe){be.__webglFramebuffer=[];for(let ft=0;ft<6;ft++)if(k.mipmaps&&k.mipmaps.length>0){be.__webglFramebuffer[ft]=[];for(let Rt=0;Rt<k.mipmaps.length;Rt++)be.__webglFramebuffer[ft][Rt]=s.createFramebuffer()}else be.__webglFramebuffer[ft]=s.createFramebuffer()}else{if(k.mipmaps&&k.mipmaps.length>0){be.__webglFramebuffer=[];for(let ft=0;ft<k.mipmaps.length;ft++)be.__webglFramebuffer[ft]=s.createFramebuffer()}else be.__webglFramebuffer=s.createFramebuffer();if(At)for(let ft=0,Rt=$e.length;ft<Rt;ft++){const Ct=n.get($e[ft]);Ct.__webglTexture===void 0&&(Ct.__webglTexture=s.createTexture(),c.memory.textures++)}if(J.samples>0&&it(J)===!1){be.__webglMultisampledFramebuffer=s.createFramebuffer(),be.__webglColorRenderbuffer=[],t.bindFramebuffer(s.FRAMEBUFFER,be.__webglMultisampledFramebuffer);for(let ft=0;ft<$e.length;ft++){const Rt=$e[ft];be.__webglColorRenderbuffer[ft]=s.createRenderbuffer(),s.bindRenderbuffer(s.RENDERBUFFER,be.__webglColorRenderbuffer[ft]);const Ct=o.convert(Rt.format,Rt.colorSpace),Qe=o.convert(Rt.type),et=D(Rt.internalFormat,Ct,Qe,Rt.colorSpace,J.isXRRenderTarget===!0),Dt=dt(J);s.renderbufferStorageMultisample(s.RENDERBUFFER,Dt,et,J.width,J.height),s.framebufferRenderbuffer(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0+ft,s.RENDERBUFFER,be.__webglColorRen
vendor: 4,500 bytes, line 3875
3875derbuffer[ft])}s.bindRenderbuffer(s.RENDERBUFFER,null),J.depthBuffer&&(be.__webglDepthRenderbuffer=s.createRenderbuffer(),gt(be.__webglDepthRenderbuffer,J,!0)),t.bindFramebuffer(s.FRAMEBUFFER,null)}}if(Pe){t.bindTexture(s.TEXTURE_CUBE_MAP,ze.__webglTexture),fe(s.TEXTURE_CUBE_MAP,k);for(let ft=0;ft<6;ft++)if(k.mipmaps&&k.mipmaps.length>0)for(let Rt=0;Rt<k.mipmaps.length;Rt++)ot(be.__webglFramebuffer[ft][Rt],J,k,s.COLOR_ATTACHMENT0,s.TEXTURE_CUBE_MAP_POSITIVE_X+ft,Rt);else ot(be.__webglFramebuffer[ft],J,k,s.COLOR_ATTACHMENT0,s.TEXTURE_CUBE_MAP_POSITIVE_X+ft,0);A(k)&&M(s.TEXTURE_CUBE_MAP),t.unbindTexture()}else if(At){for(let ft=0,Rt=$e.length;ft<Rt;ft++){const Ct=$e[ft],Qe=n.get(Ct);let et=s.TEXTURE_2D;(J.isWebGL3DRenderTarget||J.isWebGLArrayRenderTarget)&&(et=J.isWebGL3DRenderTarget?s.TEXTURE_3D:s.TEXTURE_2D_ARRAY),t.bindTexture(et,Qe.__webglTexture),fe(et,Ct),ot(be.__webglFramebuffer,J,Ct,s.COLOR_ATTACHMENT0+ft,et,0),A(Ct)&&M(et)}t.unbindTexture()}else{let ft=s.TEXTURE_2D;if((J.isWebGL3DRenderTarget||J.isWebGLArrayRenderTarget)&&(ft=J.isWebGL3DRenderTarget?s.TEXTURE_3D:s.TEXTURE_2D_ARRAY),t.bindTexture(ft,ze.__webglTexture),fe(ft,k),k.mipmaps&&k.mipmaps.length>0)for(let Rt=0;Rt<k.mipmaps.length;Rt++)ot(be.__webglFramebuffer[Rt],J,k,s.COLOR_ATTACHMENT0,ft,Rt);else ot(be.__webglFramebuffer,J,k,s.COLOR_ATTACHMENT0,ft,0);A(k)&&M(ft),t.unbindTexture()}J.depthBuffer&&Zt(J)}function Ze(J){const k=J.textures;for(let be=0,ze=k.length;be<ze;be++){const $e=k[be];if(A($e)){const Pe=C(J),At=n.get($e).__webglTexture;t.bindTexture(Pe,At),M(Pe),t.unbindTexture()}}}const je=[],ke=[];function Fe(J){if(J.samples>0){if(it(J)===!1){const k=J.textures,be=J.width,ze=J.height;let $e=s.COLOR_BUFFER_BIT;const Pe=J.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT,At=n.get(J),ft=k.length>1;if(ft)for(let Ct=0;Ct<k.length;Ct++)t.bindFramebuffer(s.FRAMEBUFFER,At.__webglMultisampledFramebuffer),s.framebufferRenderbuffer(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0+Ct,s.RENDERBUFFER,null),t.bindFramebuffer(s.FRAMEBUFFER,At.__webglFramebuffer),s.framebufferTexture2D(s.DRAW_FRAMEBUFFER,s.COLOR_ATTACHMENT0+Ct,s.TEXTURE_2D,null,0);t.bindFramebuffer(s.READ_FRAMEBUFFER,At.__webglMultisampledFramebuffer);const Rt=J.texture.mipmaps;Rt&&Rt.length>0?t.bindFramebuffer(s.DRAW_FRAMEBUFFER,At.__webglFramebuffer[0]):t.bindFramebuffer(s.DRAW_FRAMEBUFFER,At.__webglFramebuffer);for(let Ct=0;Ct<k.length;Ct++){if(J.resolveDepthBuffer&&(J.depthBuffer&&($e|=s.DEPTH_BUFFER_BIT),J.stencilBuffer&&J.resolveStencilBuffer&&($e|=s.STENCIL_BUFFER_BIT)),ft){s.framebufferRenderbuffer(s.READ_FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.RENDERBUFFER,At.__webglColorRenderbuffer[Ct]);const Qe=n.get(k[Ct]).__webglTexture;s.framebufferTexture2D(s.DRAW_FRAMEBUFFER,s.COLOR_ATTACHMENT0,s.TEXTURE_2D,Qe,0)}s.blitFramebuffer(0,0,be,ze,0,0,be,ze,$e,s.NEAREST),d===!0&&(je.length=0,ke.length=0,je.push(s.COLOR_ATTACHMENT0+Ct),J.depthBuffer&&J.resolveDepthBuffer===!1&&(je.push(Pe),ke.push(Pe),s.invalidateFramebuffer(s.DRAW_FRAMEBUFFER,ke)),s.invalidateFramebuffer(s.READ_FRAMEBUFFER,je))}if(t.bindFramebuffer(s.READ_FRAMEBUFFER,null),t.bindFramebuffer(s.DRAW_FRAMEBUFFER,null),ft)for(let Ct=0;Ct<k.length;Ct++){t.bindFramebuffer(s.FRAMEBUFFER,At.__webglMultisampledFramebuffer),s.framebufferRenderbuffer(s.FRAMEBUFFER,s.COLOR_ATTACHMENT0+Ct,s.RENDERBUFFER,At.__webglColorRenderbuffer[Ct]);const Qe=n.get(k[Ct]).__webglTexture;t.bindFramebuffer(s.FRAMEBUFFER,At.__webglFramebuffer),s.framebufferTexture2D(s.DRAW_FRAMEBUFFER,s.COLOR_ATTACHMENT0+Ct,s.TEXTURE_2D,Qe,0)}t.bindFramebuffer(s.DRAW_FRAMEBUFFER,At.__webglMultisampledFramebuffer)}else if(J.depthBuffer&&J.resolveDepthBuffer===!1&&d){const k=J.stencilBuffer?s.DEPTH_STENCIL_ATTACHMENT:s.DEPTH_ATTACHMENT;s.invalidateFramebuffer(s.DRAW_FRAMEBUFFER,[k])}}}function dt(J){return Math.min(a.maxSamples,J.samples)}function it(J){const k=n.get(J);return J.samples>0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&k.__useRenderToTexture!==!1}function lt(J){const k=c.render.frame;v.get(J)!==k&&(v.set(J,k),J.update())}function Vt(J,k){const be=J.colorSpace,ze=J.format,$e=J.type;return J.isCompressedTexture===!0||J.isVideoTexture===!0||be!==Qi&&be!==zl&&(An.getTransfer(be)===ni?(ze!==ki||$e!==Es)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",be)),k}function qt(J){return typeof HTMLImageElement<"u"&&J instanceof HTMLImageElement?(p.width=J.naturalWi
vendor: 4,413 bytes, line 3875
3875dth||J.width,p.height=J.naturalHeight||J.height):typeof VideoFrame<"u"&&J instanceof VideoFrame?(p.width=J.displayWidth,p.height=J.displayHeight):(p.width=J.width,p.height=J.height),p}this.allocateTextureUnit=ce,this.resetTextureUnits=se,this.setTexture2D=me,this.setTexture2DArray=P,this.setTexture3D=Q,this.setTextureCube=ee,this.rebindTextures=_n,this.setupRenderTarget=ie,this.updateRenderTargetMipmap=Ze,this.updateMultisampleRenderTarget=Fe,this.setupDepthRenderbuffer=Zt,this.setupFrameBufferTexture=ot,this.useMultisampledRTT=it}function W2(s,e){function t(n,a=zl){let o;const c=An.getTransfer(a);if(n===Es)return s.UNSIGNED_BYTE;if(n===Gy)return s.UNSIGNED_SHORT_4_4_4_4;if(n===ky)return s.UNSIGNED_SHORT_5_5_5_1;if(n===cb)return s.UNSIGNED_INT_5_9_9_9_REV;if(n===ub)return s.UNSIGNED_INT_10F_11F_11F_REV;if(n===Fy)return s.BYTE;if(n===Vy)return s.SHORT;if(n===dd)return s.UNSIGNED_SHORT;if(n===ng)return s.INT;if(n===Zo)return s.UNSIGNED_INT;if(n===bi)return s.FLOAT;if(n===ra)return s.HALF_FLOAT;if(n===fb)return s.ALPHA;if(n===hb)return s.RGB;if(n===ki)return s.RGBA;if(n===md)return s.DEPTH_COMPONENT;if(n===gd)return s.DEPTH_STENCIL;if(n===ig)return s.RED;if(n===ag)return s.RED_INTEGER;if(n===db)return s.RG;if(n===Xy)return s.RG_INTEGER;if(n===jy)return s.RGBA_INTEGER;if(n===wm||n===Rm||n===Cm||n===Nm)if(c===ni)if(o=e.get("WEBGL_compressed_texture_s3tc_srgb"),o!==null){if(n===wm)return o.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(n===Rm)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(n===Cm)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(n===Nm)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(o=e.get("WEBGL_compressed_texture_s3tc"),o!==null){if(n===wm)return o.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===Rm)return o.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===Cm)return o.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===Nm)return o.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(n===Q0||n===J0||n===$0||n===ey)if(o=e.get("WEBGL_compressed_texture_pvrtc"),o!==null){if(n===Q0)return o.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===J0)return o.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===$0)return o.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===ey)return o.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(n===ty||n===ny||n===iy)if(o=e.get("WEBGL_compressed_texture_etc"),o!==null){if(n===ty||n===ny)return c===ni?o.COMPRESSED_SRGB8_ETC2:o.COMPRESSED_RGB8_ETC2;if(n===iy)return c===ni?o.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:o.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(n===ay||n===sy||n===ry||n===oy||n===ly||n===cy||n===uy||n===fy||n===hy||n===dy||n===py||n===my||n===gy||n===vy)if(o=e.get("WEBGL_compressed_texture_astc"),o!==null){if(n===ay)return c===ni?o.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:o.COMPRESSED_RGBA_ASTC_4x4_KHR;if(n===sy)return c===ni?o.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:o.COMPRESSED_RGBA_ASTC_5x4_KHR;if(n===ry)return c===ni?o.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:o.COMPRESSED_RGBA_ASTC_5x5_KHR;if(n===oy)return c===ni?o.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:o.COMPRESSED_RGBA_ASTC_6x5_KHR;if(n===ly)return c===ni?o.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:o.COMPRESSED_RGBA_ASTC_6x6_KHR;if(n===cy)return c===ni?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:o.COMPRESSED_RGBA_ASTC_8x5_KHR;if(n===uy)return c===ni?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:o.COMPRESSED_RGBA_ASTC_8x6_KHR;if(n===fy)return c===ni?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:o.COMPRESSED_RGBA_ASTC_8x8_KHR;if(n===hy)return c===ni?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:o.COMPRESSED_RGBA_ASTC_10x5_KHR;if(n===dy)return c===ni?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:o.COMPRESSED_RGBA_ASTC_10x6_KHR;if(n===py)return c===ni?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:o.COMPRESSED_RGBA_ASTC_10x8_KHR;if(n===my)return c===ni?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:o.COMPRESSED_RGBA_ASTC_10x10_KHR;if(n===gy)return c===ni?o.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:o.COMPRESSED_RGBA_ASTC_12x10_KHR;if(n===vy)return c===ni?o.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:o.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(n===yy||n===_y||n===xy)if(o=e.get("EXT_texture_compression_bptc"),o!==null){if(n===yy)return c===ni?o.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:o.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(n===_y)return o.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(n===xy)return o.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(n===Sy||n===by||n===My||n===Ey)if(o=e.get("EXT_texture_compression_rgtc"),o!==null){if(n===Sy)return o.COMPRESSED_RED_RGT
vendor: 16,360 bytes, lines 3875-3899
3875C1_EXT;if(n===by)return o.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(n===My)return o.COMPRESSED_RED_GREEN_RGTC2_EXT;if(n===Ey)return o.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return n===pd?s.UNSIGNED_INT_24_8:s[n]!==void 0?s[n]:null}return{convert:t}}const CI=`
3876void main() {
3877
3878	gl_Position = vec4( position, 1.0 );
3879
3880}`,NI=`
3881uniform sampler2DArray depthColor;
3882uniform float depthWidth;
3883uniform float depthHeight;
3884
3885void main() {
3886
3887	vec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight );
3888
3889	if ( coord.x >= 1.0 ) {
3890
3891		gl_FragDepth = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r;
3892
3893	} else {
3894
3895		gl_FragDepth = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r;
3896
3897	}
3898
3899}`;class DI{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t){if(this.texture===null){const n=new Cb(e.texture);(e.depthNear!==t.depthNear||e.depthFar!==t.depthFar)&&(this.depthNear=e.depthNear,this.depthFar=e.depthFar),this.texture=n}}getMesh(e){if(this.texture!==null&&this.mesh===null){const t=e.cameras[0].viewport,n=new Ts({vertexShader:CI,fragmentShader:NI,uniforms:{depthColor:{value:this.texture},depthWidth:{value:t.z},depthHeight:{value:t.w}}});this.mesh=new Mi(new Zc(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class UI extends Qo{constructor(e,t){super();const n=this;let a=null,o=1,c=null,h="local-floor",d=1,p=null,v=null,y=null,_=null,b=null,T=null;const R=typeof XRWebGLBinding<"u",A=new DI,M={},C=t.getContextAttributes();let D=null,U=null;const H=[],F=[],G=new Je;let V=null;const O=new sa;O.viewport=new Gn;const z=new sa;z.viewport=new Gn;const Y=[O,z],se=new P2;let ce=null,he=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(ve){let De=H[ve];return De===void 0&&(De=new z0,H[ve]=De),De.getTargetRaySpace()},this.getControllerGrip=function(ve){let De=H[ve];return De===void 0&&(De=new z0,H[ve]=De),De.getGripSpace()},this.getHand=function(ve){let De=H[ve];return De===void 0&&(De=new z0,H[ve]=De),De.getHandSpace()};function me(ve){const De=F.indexOf(ve.inputSource);if(De===-1)return;const ot=H[De];ot!==void 0&&(ot.update(ve.inputSource,ve.frame,p||c),ot.dispatchEvent({type:ve.type,data:ve.inputSource}))}function P(){a.removeEventListener("select",me),a.removeEventListener("selectstart",me),a.removeEventListener("selectend",me),a.removeEventListener("squeeze",me),a.removeEventListener("squeezestart",me),a.removeEventListener("squeezeend",me),a.removeEventListener("end",P),a.removeEventListener("inputsourceschange",Q);for(let ve=0;ve<H.length;ve++){const De=F[ve];De!==null&&(F[ve]=null,H[ve].disconnect(De))}ce=null,he=null,A.reset();for(const ve in M)delete M[ve];e.setRenderTarget(D),b=null,_=null,y=null,a=null,U=null,nt.stop(),n.isPresenting=!1,e.setPixelRatio(V),e.setSize(G.width,G.height,!1),n.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(ve){o=ve,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(ve){h=ve,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return p||c},this.setReferenceSpace=function(ve){p=ve},this.getBaseLayer=function(){return _!==null?_:b},this.getBinding=function(){return y===null&&R&&(y=new XRWebGLBinding(a,t)),y},this.getFrame=function(){return T},this.getSession=function(){return a},this.setSession=async function(ve){if(a=ve,a!==null){if(D=e.getRenderTarget(),a.addEventListener("select",me),a.addEventListener("selectstart",me),a.addEventListener("selectend",me),a.addEventListener("squeeze",me),a.addEventListener("squeezestart",me),a.addEventListener("squeezeend",me),a.addEventListener("end",P),a.addEventListener("inputsourceschange",Q),C.xrCompatible!==!0&&await t.makeXRCompatible(),V=e.getPixelRatio(),e.getSize(G),R&&"createProjectionLayer"in XRWebGLBinding.prototype){let ot=null,gt=null,Et=null;C.depth&&(Et=C.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,ot=C.stencil?gd:md,gt=C.stencil?pd:Zo);const Zt={colorFormat:t.RGBA8,depthFormat:Et,scaleFactor:o};y=this.getBinding(),_=y.createProjectionLayer(Zt),a.updateRenderState({layers:[_]}),e.setPixelRatio(1),e.setSize(_.textureWidth,_.textureHeight,!1),U=new $s(_.textureWidth,_.textureHeight,{format:ki,type:Es,depthTexture:new n_(_.textureWidth,_.textureHeight,gt,void 0,void 0,void 0,void 0,void 0,void 0,ot),stencilBuffer:C.stencil,colorSpace:e.outputColorSpace,samples:C.antialias?4:0,resolveDepthBuffer:_.ignoreDepthValues===!1,resolveStencilBuffer:_.ignoreDepthValues===!1})}else{const ot={antialias:C.antialias,alpha:!0,depth:C.depth,stencil:C.stencil,framebufferScaleFactor:o};b=new XRWebGLLayer(a,t,ot),a.updateRenderState({baseLayer:b}),e.setPixelRatio(1),e.setSize(b.framebufferWidth,b.framebufferHeight,!1),U=new $s(b.framebufferWidth,b.framebufferHeight,{format:ki,type:Es,colorSpace:e.outputColorSpace,stencilBuffer:C.stencil,resolveDepthBuffer:b.ignoreDepthValues===!1,resolveStencilBuffer:b.ignoreDepthValues===!1})}U.isXRRenderTarget=!0,this.setFoveation(d),p=null,c=await a.requestReferenceSpace(h),nt.setContext(a),nt.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(a!==null)return a.environmentBlendMode},this.getDepthTexture=function(){return A.getDepthTexture()};function Q(ve){for(let De=0;De<ve.removed.length;De++){const ot=ve.removed[De],gt=F.indexOf(ot);gt>=0&&(F[gt]=null,H[gt].disconnect(ot))}for(let De=0;De<ve.added.length;De++){const ot=ve.added[De];let gt=F.indexOf(ot);if(gt===-1){for(let Zt=0;Zt<H.length;Zt++)if(Zt>=F.length){F.push(ot),gt=Zt;break}else if(F[Zt]===null){F[Zt]=ot,gt=Zt;break}if(gt===-1)break}const Et=H[gt];Et&&Et.connect(ot)}}const ee=new K,ge=new K;function Se(ve,De,ot){ee.setFromMatrixPosition(De.matrixWorld),ge.setFromMatrixPosition(ot.matrixWorld);const gt=ee.distanceTo(ge),Et=De.projectionMatrix.elements,Zt=ot.projectionMatrix.elements,_n=Et[14]/(Et[10]-1),ie=Et[14]/(Et[10]+1),Ze=(Et[9]+1)/Et[5],je=(Et[9]-1)/Et[5],ke=(Et[8]-1)/Et[0],Fe=(Zt[8]+1)/Zt[0],dt=_n*ke,it=_n*Fe,lt=gt/(-ke+Fe),Vt=lt*-ke;if(De.matrixWorld.decompose(ve.position,ve.quaternion,ve.scale),ve.translateX(Vt),ve.translateZ(lt),ve.matrixWorld.compose(ve.position,ve.quaternion,ve.scale),ve.matrixWorldInverse.copy(ve.matrixWorld).invert(),Et[10]===-1)ve.projectionMatrix.copy(De.projectionMatrix),ve.projectionMatrixInverse.copy(De.projectionMatrixInverse);else{const qt=_n+lt,J=ie+lt,k=dt-Vt,be=it+(gt-Vt),ze=Ze*ie/J*qt,$e=je*ie/J*qt;ve.projectionMatrix.makePerspective(k,be,ze,$e,qt,J),ve.projectionMatrixInverse.copy(ve.projectionMatrix).invert()}}function W(ve,De){De===null?ve.matrixWorld.copy(ve.matrix):ve.matrixWorld.multiplyMatrices(De.matrixWorld,ve.matrix),ve.matrixWorldInverse.copy(ve.matrixWorld).invert()}this.updateCamera=function(ve){if(a===null)return;let De=ve.near,ot=ve.far;A.texture!==null&&(A.depthNear>0&&(De=A.depthNear),A.depthFar>0&&(ot=A.depthFar)),se.near=z.near=O.near=De,se.far=z.far=O.far=ot,(ce!==se.near||he!==se.far)&&(a.updateRenderState({depthNear:se.near,depthFar:se.far}),ce=se.near,he=se.far),se.layers.mask=ve.layers.mask|6,O.layers.mask=se.layers.mask&3,z.layers.mask=se.layers.mask&5;const gt=ve.parent,Et=se.cameras;W(se,gt);for(let Zt=0;Zt<Et.length;Zt++)W(Et[Zt],gt);Et.length===2?Se(se,O,z):se.projectionMatrix.copy(O.projectionMatrix),fe(ve,se,gt)};function fe(ve,De,ot){ot===null?ve.matrix.copy(De.matrixWorld):(ve.matrix.copy(ot.matrixWorld),ve.matrix.invert(),ve.matrix.multiply(De.matrixWorld)),ve.matrix.decompose(ve.position,ve.quaternion,ve.scale),ve.updateMatrixWorld(!0),ve.projectionMatrix.copy(De.projectionMatrix),ve.projectionMatrixInverse.copy(De.projectionMatrixInverse),ve.isPerspectiveCamera&&(ve.fov=xd*2*Math.atan(1/ve.projectionMatrix.elements[5]),ve.zoom=1)}this.getCamera=function(){return se},this.getFoveation=function(){if(!(_===null&&b===null))return d},this.setFoveation=function(ve){d=ve,_!==null&&(_.fixedFoveation=ve),b!==null&&b.fixedFoveation!==void 0&&(b.fixedFoveation=ve)},this.hasDepthSensing=function(){return A.texture!==null},this.getDepthSensingMesh=function(){return A.getMesh(se)},this.getCameraTexture=function(ve){return M[ve]};let Ce=null;function Le(ve,De){if(v=De.getViewerPose(p||c),T=De,v!==null){const ot=v.views;b!==null&&(e.setRenderTargetFramebuffer(U,b.framebuffer),e.setRenderTarget(U));let gt=!1;ot.length!==se.cameras.length&&(se.cameras.length=0,gt=!0);for(let ie=0;ie<ot.length;ie++){const Ze=ot[ie];let je=null;if(b!==null)je=b.getViewport(Ze);else{const Fe=y.getViewSubImage(_,Ze);je=Fe.viewport,ie===0&&(e.setRenderTargetTextures(U,Fe.colorTexture,Fe.depthStencilTexture),e.setRenderTarget(U))}let ke=Y[ie];ke===void 0&&(ke=new sa,ke.layers.enable(ie),ke.viewport=new Gn,Y[ie]=ke),ke.matrix.fromArray(Ze.transform.matrix),ke.matrix.decompose(ke.position,ke.quaternion,ke.scale),ke.projectionMatrix.fromArray(Ze.projectionMatrix),ke.projectionMatrixInverse.copy(ke.projectionMatrix).invert(),ke.viewport.set(je.x,je.y,je.width,je.height),ie===0&&(se.matrix.copy(ke.matrix),se.matrix.decompose(se.position,se.quaternion,se.scale)),gt===!0&&se.cameras.push(ke)}const Et=a.enabledFeatures;if(Et&&Et.includes("depth-sensing")&&a.depthUsage=="gpu-optimized"&&R){y=n.getBinding();const ie=y.getDepthInformation(ot[0]);ie&&ie.isValid&&ie.texture&&A.init(ie,a.renderState)}if(Et&&Et.includes("camera-access")&&R){e.state.unbindTexture(),y=n.getBinding();for(let ie=0;ie<ot.length;ie++){const Ze=ot[ie].camera;if(Ze){let je=M[Ze];je||(je=new Cb,M[Ze]=je);const ke=y.getCameraImage(Ze);je.sourceTexture=ke}}}}for(let ot=0;ot<H.length;ot++){const gt=F[ot],Et=H[ot];gt!==null&&Et!==void 0&&Et.update(gt,De,p||c)}Ce&&Ce(ve,De),De.detectedPlanes&&n.dispatchEvent({type:"planesdetected",data:De}),T=null}const nt=new k2;nt.setAnimationLoop(Le),this.setAnimationLoop=function(ve){Ce=ve},this.dispose=function(){}}}const tf=new er,LI=new jt;function OI(s,e){function t(A,M){A.matrixAutoUpdate===!0&&A.updateMatrix(),M.value.copy(A.matrix)}function n(A,M){M.color.getRGB(A.fogColor.value,KA(s)),M.isFog?(A.fogNear.value=M.near,A.fogFar.value=M.far):M.isFogExp2&&(A.fogDensity.value=M.density)}function a(A,M,C,D,U){M.isMeshBasicMaterial||M.isMeshLambertMaterial?o(A,M):M.isMeshToonMaterial?(o(A,M),y(A,M)):M.isMeshPhongMaterial?(o(A,M),v(A,M)):M.isMeshStandardMaterial?(o(A,M),_(A,M),M.isMeshPhysicalMaterial&&b(A,M,U)):M.isMeshMatcapMaterial?(o(A,M),T(A,M)):M.isMeshDepthMaterial?o(A,M):M.isMeshDistanceMaterial?(o(A,M),R(A,M)):M.isMeshNormalMaterial?o(A,M):M.isLineBasicMaterial?(c(A,M),M.isLineDashedMaterial&&h(A,M)):M.isPointsMaterial?d(A,M,C,D):M.isSpriteMaterial?p(A,M):M.isShadowMaterial?(A.color.value.copy(M.color),A.opacity.value=M.opacity):M.isShaderMaterial&&(M.uniformsNeedUpdate=!1)}function o(A,M){A.opacity.value=M.opacity,M.color&&A.diffuse.value.copy(M.color),M.emissive&&A.emissive.value.copy(M.emissive).multiplyScalar(M.emissiveIntensity),M.map&&(A.map.value=M.map,t(M.map,A.mapTransform)),M.alphaMap&&(A.alphaMap.value=M.alphaMap,t(M.alphaMap,A.alphaMapTransform)),M.bumpMap&&(A.bumpMap.value=M.bumpMap,t(M.bumpMap,A.bumpMapTransform),A.bumpScale.value=M.bumpScale,M.side===Ka&&(A.bumpScale.value*=-1)),M.normalMap&&(A.normalMap.value=M.normalMap,t(M.normalMap,A.normalMapTransform),A.normalScale.value.copy(M.normalScale),M.side===Ka&&A.normalScale.value.negate()),M.displacementMap&&(A.displacementMap.value=M.displacementMap,t(M.displacementMap,A.displacementMapTransform),A.displacementScale.value=M.displacementScale,A.displacementBias.value=M.displacementBias),M.emissiveMap&&(A.emissiveMap.value=M.emissiveMap,t(M.emissiveMap,A.emissiveMapTransform)),M.specularMap&&(A.specularMap.value=M.specularMap,t(M.specularMap,A.specularMapTransform)),M.alphaTest>0&&(A.alphaTest.value=M.alphaTest);const C=e.get(M),D=C.envMap,U=C.envMapRotation;D&&(A.envMap.value=D,tf.copy(U),tf.x*=-1,tf.y*=-1,tf.z*=-1,D.isCubeTexture&&D.isRenderTargetTexture===!1&&(tf.y*=-1,tf.z*=-1),A.envMapRotation.value.setFromMatrix4(LI.makeRotationFromEuler(tf)),A.flipEnvMap.value=D.isCubeTexture&&D.isRenderTargetTexture===!1?-1:1,A.reflectivity.value=M.reflectivity,A.ior.value=M.ior,A.refractionRatio.value=M.refractionRatio),M.lightMap&&(A.lightMap.value=M.lightMap,A.lightMapIntensity.value=M.lightMapIntensity,t(M.lightMap,A.lightMapTransform)),M.aoMap&&(A.aoMap.value=M.aoMap,A.aoMapIntensity.value=M.aoMapIntensity,t(M.aoMap,A.aoMapTransform))}function c(A,M){A.diffuse.value.copy(M.color),A.opacity.value=M.opacity,M.map&&(A.map.value=M.map,t(M.map,A.mapTransform))}function h(A,M){A.dashSize.value=M.dashSize,A.totalSize.value=M.dashSize+M.gapSize,A.scale.value=M.scale}function d(A,M,C,D){A.diffuse.value.copy(M.color),A.opacity.value=M.opacity,A.size.value=M.size*C,A.scale.value=D*.5,M.map&&(A.map.value=M.map,t(M.map,A.uvTransform)),M.alphaMap&&(A.alphaMap.value=M.alphaMap,t(M.alphaMap,A.alphaMapTransform)),M.alphaTest>0&&(A.alphaTest.value=M.alphaTest)}function p(A,M){A.diffuse.value.copy(M.color),A.opacity.value=M.opacity,A.rotation.value=M.rotation,M.map&&(A.map.value=M.map,t(M.map,A.mapTransform)),M.alphaMap&&(A.alphaMap.value=M.alphaMap,t(M.alphaMap,A.alphaMapTransform)),M.alphaTest>0&&(A.alphaTest.value=M.alphaTest)}function v(A,M){A.specular.value.copy(M.specular),A.shininess.value=Math.max(M.shininess,1e-4)}function y(A,M){M.gradientMap&&(A.gradientMap.value=M.gradientMap)}function _(A,M){A.metalness.value=M.metalness,M.metalnessMap&&(A.metalnessMap.value=M.metalnessMap,t(M.metalnessMap,A.metalnessMapTransform)),A.roughness.value=M.roughness,M.roughnessMap&&(A.roughnessMap.value=M.roughnessMap,t(M.roughnessMap,A.roughnessMapTransform)),M.envMap&&(A.envMapIntensity.value=M.envMapIntensity)}function b(A,M,C){A.ior.value=M.ior,M.sheen>0&&(A.sheenColor.value.copy(M.sheenColor).multiplyScalar(M.sheen),A.sheenRoughness.value=M.sheenRoughness,M.sheenColorMap&&(A.sheenColorMap.value=M.sheenColorMap,t(M.sheenColorMap,A.sheenColorMapTransform)),M.sheenRoughnessMap&&(A.sheenRoughnessMap.value=M.sheenRoughnessMap,t(M.sheenRoughnessMap,A.sheenRoughnessMapTransform))),M.clearcoat>0&&(A.clearcoat.value=M.clearcoat,A.clearcoatRoughness.value=M.clearcoatRoughness,M.clearcoatMap&&(A.clearcoatMap.value=M.clearcoatMap,t(M.clearcoatMap,A.clearcoatMapTransform)),M.clearcoatRoughnessMap&&(A.clearcoatRoughnessMap.value=M.clearcoatRoughnessMap,t(M.clearcoatRoughnessMap,A.clearcoatRoughnessMapTransform)),M.clearcoatNormalMap&&(A.clearcoatNormalMap.value=M.clearcoatNormalMap,t(M.clearcoatNormalMap,A.clearcoatNormalMapTransform),A.clearcoatNormalScale.value.copy(M.clearcoatNormalScale),M.side===Ka&&A.clearcoatNormalScale.value.negate())),M.dispersion>0&&(A.dispersion.value=M.dispersion),M.iridescence>0&&(A.iridescence.value=M.iridescence,A.iridescenceIOR.value=M.iridescenceIOR,A.iridescenceThicknessMinimum.value=M.iridescenceThicknessRange[0],A.iridescenceThicknessMaximum.value=M.iridescenceThicknessRange[1],M.iridescenceMap&&(A.iridescenceMap.value=M.iridescenceMap,t(M.iridescenceMap,A.iridescenceMapTransform)),M.iridescenceThicknessMap&&(A.iridescenceThicknessMap.value=M.iridescenceThicknessMap,t(M.iridescenceThicknessMap,A.iridescenceThicknessMapTransform))),M.transmission>0&&(A.transmission.value=M.transmission,A.transmissionSamplerMap.value=C.texture,A.transmissionSamplerSize.value.set(C.width,C.height),M.transmissionMap&&(A.transmissionMap.value=M.transmissionMap,t(M.transmissionMap,A.transmissionMapTransform)),A.thickness.value=M.thickness,M.thicknessMap&&(A.thicknessMap.value=M.thicknessMap,t(M.thicknessMap,A.thicknessMapTransform)),A.attenuationDistance.value=M.attenuationDistance,A.attenuationColor.value.copy(M.attenuationColor)),M.anisotropy>0&&(A.anisotropyVector.value.set(M.anisotropy*Math.cos(M.anisotropyRotation),M.anisotropy*Math.sin(M.anisotropyRotation)),M.anisotropyMap&&(A.anisotropyMap.value=M.anisotropyMap,t(M.anisotropyMap,A.anisotropyMapTransform))),A.specularIntensity.value=M.specularIntensity,A.specularColor.value.copy(M.specularColor),M.specularColorMap&&(A.specularColorMap.value=M.specularColorMap,t(M.specularColorMap,A.specularColorMapTransform)),M.specularIntensityMap&&(A.specularIntensityMap.value=M.specularIntensityMap,t(M.specularIntensityMap,A.specularIntensityMapTransform))}
vendor: 6,828 bytes, line 3899
3899function T(A,M){M.matcap&&(A.matcap.value=M.matcap)}function R(A,M){const C=e.get(M).light;A.referencePosition.value.setFromMatrixPosition(C.matrixWorld),A.nearDistance.value=C.shadow.camera.near,A.farDistance.value=C.shadow.camera.far}return{refreshFogUniforms:n,refreshMaterialUniforms:a}}function zI(s,e,t,n){let a={},o={},c=[];const h=s.getParameter(s.MAX_UNIFORM_BUFFER_BINDINGS);function d(C,D){const U=D.program;n.uniformBlockBinding(C,U)}function p(C,D){let U=a[C.id];U===void 0&&(T(C),U=v(C),a[C.id]=U,C.addEventListener("dispose",A));const H=D.program;n.updateUBOMapping(C,H);const F=e.render.frame;o[C.id]!==F&&(_(C),o[C.id]=F)}function v(C){const D=y();C.__bindingPointIndex=D;const U=s.createBuffer(),H=C.__size,F=C.usage;return s.bindBuffer(s.UNIFORM_BUFFER,U),s.bufferData(s.UNIFORM_BUFFER,H,F),s.bindBuffer(s.UNIFORM_BUFFER,null),s.bindBufferBase(s.UNIFORM_BUFFER,D,U),U}function y(){for(let C=0;C<h;C++)if(c.indexOf(C)===-1)return c.push(C),C;return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}function _(C){const D=a[C.id],U=C.uniforms,H=C.__cache;s.bindBuffer(s.UNIFORM_BUFFER,D);for(let F=0,G=U.length;F<G;F++){const V=Array.isArray(U[F])?U[F]:[U[F]];for(let O=0,z=V.length;O<z;O++){const Y=V[O];if(b(Y,F,O,H)===!0){const se=Y.__offset,ce=Array.isArray(Y.value)?Y.value:[Y.value];let he=0;for(let me=0;me<ce.length;me++){const P=ce[me],Q=R(P);typeof P=="number"||typeof P=="boolean"?(Y.__data[0]=P,s.bufferSubData(s.UNIFORM_BUFFER,se+he,Y.__data)):P.isMatrix3?(Y.__data[0]=P.elements[0],Y.__data[1]=P.elements[1],Y.__data[2]=P.elements[2],Y.__data[3]=0,Y.__data[4]=P.elements[3],Y.__data[5]=P.elements[4],Y.__data[6]=P.elements[5],Y.__data[7]=0,Y.__data[8]=P.elements[6],Y.__data[9]=P.elements[7],Y.__data[10]=P.elements[8],Y.__data[11]=0):(P.toArray(Y.__data,he),he+=Q.storage/Float32Array.BYTES_PER_ELEMENT)}s.bufferSubData(s.UNIFORM_BUFFER,se,Y.__data)}}}s.bindBuffer(s.UNIFORM_BUFFER,null)}function b(C,D,U,H){const F=C.value,G=D+"_"+U;if(H[G]===void 0)return typeof F=="number"||typeof F=="boolean"?H[G]=F:H[G]=F.clone(),!0;{const V=H[G];if(typeof F=="number"||typeof F=="boolean"){if(V!==F)return H[G]=F,!0}else if(V.equals(F)===!1)return V.copy(F),!0}return!1}function T(C){const D=C.uniforms;let U=0;const H=16;for(let G=0,V=D.length;G<V;G++){const O=Array.isArray(D[G])?D[G]:[D[G]];for(let z=0,Y=O.length;z<Y;z++){const se=O[z],ce=Array.isArray(se.value)?se.value:[se.value];for(let he=0,me=ce.length;he<me;he++){const P=ce[he],Q=R(P),ee=U%H,ge=ee%Q.boundary,Se=ee+ge;U+=ge,Se!==0&&H-Se<Q.storage&&(U+=H-Se),se.__data=new Float32Array(Q.storage/Float32Array.BYTES_PER_ELEMENT),se.__offset=U,U+=Q.storage}}}const F=U%H;return F>0&&(U+=H-F),C.__size=U,C.__cache={},this}function R(C){const D={boundary:0,storage:0};return typeof C=="number"||typeof C=="boolean"?(D.boundary=4,D.storage=4):C.isVector2?(D.boundary=8,D.storage=8):C.isVector3||C.isColor?(D.boundary=16,D.storage=12):C.isVector4?(D.boundary=16,D.storage=16):C.isMatrix3?(D.boundary=48,D.storage=48):C.isMatrix4?(D.boundary=64,D.storage=64):C.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",C),D}function A(C){const D=C.target;D.removeEventListener("dispose",A);const U=c.indexOf(D.__bindingPointIndex);c.splice(U,1),s.deleteBuffer(a[D.id]),delete a[D.id],delete o[D.id]}function M(){for(const C in a)s.deleteBuffer(a[C]);c=[],a={},o={}}return{bind:d,update:p,dispose:M}}class $b{constructor(e={}){const{canvas:t=YA(),context:n=null,depth:a=!0,stencil:o=!1,alpha:c=!1,antialias:h=!1,premultipliedAlpha:d=!0,preserveDrawingBuffer:p=!1,powerPreference:v="default",failIfMajorPerformanceCaveat:y=!1,reversedDepthBuffer:_=!1}=e;this.isWebGLRenderer=!0;let b;if(n!==null){if(typeof WebGLRenderingContext<"u"&&n instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");b=n.getContextAttributes().alpha}else b=c;const T=new Uint32Array(4),R=new Int32Array(4);let A=null,M=null;const C=[],D=[];this.domElement=t,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.toneMapping=no,this.toneMappingExposure=1,this.transmissionResolutionScale=1;const U=this;let H=!1;this._outputColorSpace=Ii;let F=0,G=0,V=null,O=-1,z=null;const Y=new Gn,se=new Gn;let ce=null;const he=new _t(0);let me=0,P=t.width,Q=t.height,ee=1,ge=null,Se=null;const W=new Gn(0,0,P,Q),fe=new Gn(0,0,P,Q);let Ce=!1;const Le=new Dd;let nt=!1,ve=!1;const De=new jt,ot=new K,gt=new Gn,Et={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let Zt=!1;function _n(){return V===null?ee:1}let ie=n;function Ze(B,$){return t.getContext(B,$)}try{const B={alpha:!0,depth:a,stencil:o,antialias:h,premultipliedAlpha:d,preserveDrawingBuffer:p,powerPreference:v,failIfMajorPerformanceCaveat:y};if("setAttribute"in t&&t.setAttribute("data-engine",`three.js r${eg}`),t.addEventListener("webglcontextlost",ct,!1),t.addEventListener("webglcontextrestored",bt,!1),t.addEventListener("webglcontextcreationerror",tt,!1),ie===null){const $="webgl2";if(ie=Ze($,B),ie===null)throw Ze($)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(B){throw console.error("THREE.WebGLRenderer: "+B.message),B}let je,ke,Fe,dt,it,lt,Vt,qt,J,k,be,ze,$e,Pe,At,ft,Rt,Ct,Qe,et,Dt,vt,ut,Ut;function pe(){je=new Yz(ie),je.init(),vt=new W2(ie,je),ke=new Fz(ie,je,e,vt),Fe=new wI(ie,je),ke.reversedDepthBuffer&&_&&Fe.buffers.depth.setReversed(!0),dt=new Kz(ie),it=new pI,lt=new RI(ie,je,Fe,it,ke,vt,dt),Vt=new Gz(U),qt=new qz(U),J=new nL(ie),ut=new Pz(ie,J),k=new Wz(ie,J,dt,ut),be=new Jz(ie,k,J,dt),Qe=new Qz(ie,ke,lt),ft=new Vz(it),ze=new dI(U,Vt,qt,je,ke,ut,ft),$e=new OI(U,it),Pe=new gI,At=new bI(je),Ct=new Bz(U,Vt,qt,Fe,be,b,d),Rt=new TI(U,be,ke),Ut=new zI(ie,dt,ke,Fe),et=new Hz(ie,je,dt),Dt=new Zz(ie,je,dt),dt.programs=ze.programs,U.capabilities=ke,U.extensions=je,U.properties=it,U.renderLists=Pe,U.shadowMap=Rt,U.state=Fe,U.info=dt}pe();const Me=new UI(U,ie);this.xr=Me,this.getContext=function(){return ie},this.getContextAttributes=function(){return ie.getContextAttributes()},this.forceContextLoss=function(){const B=je.get("WEBGL_lose_context");B&&B.loseContext()},this.forceContextRestore=function(){const B=je.get("WEBGL_lose_context");B&&B.restoreContext()},this.getPixelRatio=function(){return ee},this.setPixelRatio=function(B){B!==void 0&&(ee=B,this.setSize(P,Q,!1))},this.getSize=function(B){return B.set(P,Q)},this.setSize=function(B,$,ne=!0){if(Me.isPresenting){console.warn("THREE.WebGLRenderer: Can't 
3899change size while VR device is presenting.");return}P=B,Q=$,t.width=Math.floor(B*ee),t.height=Math.floor($*ee),ne===!0&&(t.style.width=B+"px",t.style.height=$+"px"),this.setViewport(0,0,B,$)},this.getDrawingBufferSize=function(B){return B.set(P*ee,Q*ee).floor()},this.setDrawingBufferSize=function(B,$,ne){P=B,Q=$,ee=ne,t.width=Math.floor(B*ne),t.height=Math.floor($*ne),this.setViewport(0,0,B,$)},this.getCurrentViewport=function(B){return B.copy(Y)},this.getViewport=function(B){return B.copy(W)},this.setViewport=function(B,$,ne,ae){B.isVector4?W.set(B.x,B.y,B.z,B.w):W.set(B,$,ne,ae),Fe.viewport(Y.copy(W).multiplyScalar(ee).round())},this.getScissor=function(B){return B.copy(fe)},this.setScissor=function(B,$,ne,ae){B.isVector4?fe.set(B.x,B.y,B.z,B.w):fe.set(B,$,ne,ae),Fe.scissor(se.copy(fe).multiplyScalar(ee).round())},this.getScissorTest=function(){return Ce},this.setScissorTest=function(B){Fe.setScissorTest(Ce=B)},this.setOpaqueSort=function(B){ge=B},this.setTransparentSort=function(B){Se=B},this.getClearColor=function(B){return B.copy(Ct.getClearColor())},this.setClearColor=function(){Ct.setClearColor(...arguments)},this.getClearAlpha=function(){return Ct.getClearAlpha()},this.setClearAlpha=function(){Ct.setClearAlpha(...arguments)},this.clear=function(B=!0,$=!0,ne=!0){let ae=0;if(B){let te=!1;if(V!==null){const Be=V.texture.format;te=Be===jy||Be===Xy||Be===ag}if(te){const Be=V.texture.type,Ue=Be===Es||Be===Zo||Be===dd||Be===pd||Be===Gy||Be===ky,Ge=Ct.getClearColor(),qe=Ct.getClearAlpha(),st=Ge.r,yt=Ge.g,pt=Ge.b;Ue?(T[0]=st,T[1]=yt,T[2]=pt,T[3]=qe,ie.clearBufferuiv(ie.COLOR,0,T)):(R[0]=st,R[1]=yt,R[2]=pt,R[3]=qe,ie.clearBufferiv(ie.COLOR,0,R))}else ae|=ie.COLOR_BUFFER_BIT}$&&(ae|=ie.DEPTH_BUFFER_BIT),ne&&(ae|=ie.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),ie.clear(ae)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){t.removeEventListener("webglcontextlost",ct,!1),t.removeEventListener("webglcontextrestored",bt,!1),t.removeEventListener("webglcontextcreationerror",tt,!1),Ct.dispose(),Pe.dispose(),At.dispose(),it.dispose(),Vt.dispose(),qt.dispose(),be.dispose(),ut.dispose(),Ut.dispose(),ze.dispose(),Me.dispose(),Me.removeEventListener("sessionstart",ba),Me.removeEventListener("sessionend",oo),Oa.stop()};function ct(B){B.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),H=!0}function bt(){console.log("THREE.WebGLRenderer: Context Restored."),H=!1;const B=dt.autoReset,$=Rt.enabled,ne=Rt.autoUpdate,ae=Rt.needsUpdate,te=Rt.type;pe(),dt.autoReset=B,Rt.enabled=$,Rt.autoUpdate=ne,Rt.needsUpdate=ae,Rt.type=te}function tt(B){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",B.statusMessage)}function We(B){const $=B.target;$.removeEventListener("dispose",We),Tt($)}function Tt(B){Xt(B),it.remove(B)}function Xt(B){const $=it.get(B).programs;$!==void 0&&($.forEach(function(ne){ze.releaseProgram(ne)}),B.isShaderMaterial&&ze.releaseShaderCache(B))}this.renderBufferDirect=function(B,$,ne,ae,te,Be){$===null&&($=Et);const Ue=te.isMesh&&te.matrixWorld.determinant()<0,Ge=q(B,$,ne,ae,te);Fe.setMaterial(ae,Ue);let qe=ne.index,st=1;if(ae.wireframe===!0){if(qe=k.getWireframeAttribute(ne),qe===void 0)return;st=2}const yt=ne.drawRange,pt=ne.attributes.position;let zt=yt.start*st,Jt=(yt.start+yt.count)*st;Be!==null&&(zt=Math.max(zt,Be.start*st),Jt=Math.min(Jt,(Be.start+Be.count)*st)),qe!==null?(zt=Math.max(zt,0),Jt=Math.min(Jt,qe.count)):pt!=null&&(zt=Math.max(zt,0),Jt=Math.min(Jt,pt.count));const Ft=Jt-zt;if(Ft<0||Ft===1/0)return;ut.setup(te,ae,Ge,ne,qe);let an,Nt=et;if(qe!==null&&(an=J.get(qe),Nt=Dt,Nt.setIndex(an)),te.isMesh)ae.wireframe===!0?(Fe.setLineWidth(ae.wireframeLinewidth*_n()),Nt.setMode(ie.LINES)):Nt.setMode(ie.TRIANGLES);else if(te.isLine){let mt=ae.linewidth;mt===void 0&&(mt=1),Fe.setLineWidth(mt*_n()),te.isLineSegments?Nt.setMode(ie.LINES):te.isLineLoop?Nt.setMode(ie.LINE_LOOP):Nt.setMode(ie.LINE_STRIP)}else te.isPoints?Nt.setMode(ie.POINTS):te.isSprite&&Nt.setMode(ie.TRIANGLES);if(te.isBatchedMesh)if(te._multiDrawInstances!==null)Xm("THREE.WebGLRenderer: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection."),Nt.renderMultiDrawInstances(te._multiDrawStarts,te._multiDrawCounts,te._multiDrawCount,te._multiDrawInstances);else if(je.get("WEBGL_multi_draw"))Nt.renderMultiDraw(te._multiDrawStarts,te._multiDrawCounts,te._multiDrawCount);else{const mt=te._multiDrawStarts,xn=te._multiDrawCounts,rn=te._multiDrawCount,Fn=qe?J.get(qe).bytesPerElement:1,gn=it.get(ae).currentProgram.getUniforms();for(let yn=0;yn<rn;yn++)gn.setValue(ie,"_gl_DrawID",yn),Nt.render(mt[yn]/Fn,xn[yn])}else if(te.isInstancedMesh)Nt.renderInstances(zt,Ft,te.count);else if(ne.isInstancedBufferGeometry){const mt=ne._maxInstanceCount!==void 0?ne._maxInstanceCount:1/0,xn=Math.min(ne.instanceCount,mt);Nt.renderInstances(zt,Ft,xn)}else Nt.render(zt,Ft)};function Mn(B,$,ne){B.transparent===!0&&B.side===Mr&&B.forceSinglePass===!1?(B.side=Ka,B.needsUpdate=!0,Bi(B,$,ne),B.side=ao,B.needsUpdate=!0,Bi(B,$,ne),B.side=Mr):Bi(B,$,ne)}this.compile=function(B,$,ne=null){ne===null&&(ne=B),M=At.get(ne),M.init($),D.push(M),ne.traverseVisible(function(te){te.isLight&&te.layers.test($.layers)&&(M.pushLight(te),te.castShadow&&M.pushShadow(te))}),B!==ne&&B.traverseVisible(function(te){te.isLight&&te.layers.test($.layers)&&(M.pushLight(te),te.castShadow&&M.pushShadow(te))}),M.setupLights();const ae=new Set;return B.traverse(function(te){if(!(te.isMesh||te.isPoints||te.isLine||te.isSprite))return;const Be=te.material;if(Be)if(Array.isArray(Be))for(let Ue=0;Ue<Be.length;Ue++){const Ge=Be[Ue];Mn(Ge,ne,te),ae.add(Ge)}else Mn(Be,ne,te),ae.add(Be)}),M=D.pop(),ae},this.compileAsync=function(B,$,ne=null){const ae=this.compile(B,$,ne);return new Promise(te=>{function Be(){if(ae.forEach(function(Ue){it.get(Ue).currentProgram.isReady()&&ae.delete(Ue)}),ae.size===0){te(B);return}setTimeout(Be,10)}je.get("KHR_parallel_shader_compile")!==null?Be():setTimeout(Be,10)})};let hn=null;function Xi(B){hn&&hn(B)}function ba(){Oa.stop()}function oo(){Oa.start()}const Oa=new k2;Oa.setAnimationLoop(Xi),typeof self<"u"&&Oa.setContext(self),this.setAnimationLoop=function(B){hn=B,Me.setAnimationLoop(B),B===null?Oa.stop():Oa.start()},Me.addEventListener("sessionstart",ba),Me.addEventListener("sessionend",oo),this.render=function(B,$){if($!==void 0&&$.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(H===!0)return;if(B.matrixWorldAutoUpdate===!0&&B.updateMatrixWorld(),$.parent===null&&$.matrixWorldAutoUpdate===!0&&$.updateMatrixWorld(),Me.enabled===!0&&Me.isPresenting===!0&&(Me.cameraAutoUpdate===!0&&Me.updateCamera($),$=Me.getCamera()),B.isScene===!0&&B.onBeforeRender(U,B,$,V),M=At.get(B,D.length),M.init($),D.push(M),De.multiplyMatrices($.projectionMatrix,$.matrixWorldInverse),Le.setFromProjectionMatrix(De,Qs,$.reversedDepth),ve=this.localClippingEnabled,nt=ft.init(this.clippingPlanes,ve),A=Pe.get(B,C.length),A.init(
vendor: 4,303 bytes, line 3899
3899),C.push(A),Me.enabled===!0&&Me.isPresenting===!0){const Be=U.xr.getDepthSensingMesh();Be!==null&&es(Be,$,-1/0,U.sortObjects)}es(B,$,0,U.sortObjects),A.finish(),U.sortObjects===!0&&A.sort(ge,Se),Zt=Me.enabled===!1||Me.isPresenting===!1||Me.hasDepthSensing()===!1,Zt&&Ct.addToRenderList(A,B),this.info.render.frame++,nt===!0&&ft.beginShadows();const ne=M.state.shadowsArray;Rt.render(ne,B,$),nt===!0&&ft.endShadows(),this.info.autoReset===!0&&this.info.reset();const ae=A.opaque,te=A.transmissive;if(M.setupLights(),$.isArrayCamera){const Be=$.cameras;if(te.length>0)for(let Ue=0,Ge=Be.length;Ue<Ge;Ue++){const qe=Be[Ue];ts(ae,te,B,qe)}Zt&&Ct.render(B);for(let Ue=0,Ge=Be.length;Ue<Ge;Ue++){const qe=Be[Ue];Ma(A,B,qe,qe.viewport)}}else te.length>0&&ts(ae,te,B,$),Zt&&Ct.render(B),Ma(A,B,$);V!==null&&G===0&&(lt.updateMultisampleRenderTarget(V),lt.updateRenderTargetMipmap(V)),B.isScene===!0&&B.onAfterRender(U,B,$),ut.resetDefaultState(),O=-1,z=null,D.pop(),D.length>0?(M=D[D.length-1],nt===!0&&ft.setGlobalState(U.clippingPlanes,M.state.camera)):M=null,C.pop(),C.length>0?A=C[C.length-1]:A=null};function es(B,$,ne,ae){if(B.visible===!1)return;if(B.layers.test($.layers)){if(B.isGroup)ne=B.renderOrder;else if(B.isLOD)B.autoUpdate===!0&&B.update($);else if(B.isLight)M.pushLight(B),B.castShadow&&M.pushShadow(B);else if(B.isSprite){if(!B.frustumCulled||Le.intersectsSprite(B)){ae&&gt.setFromMatrixPosition(B.matrixWorld).applyMatrix4(De);const Ue=be.update(B),Ge=B.material;Ge.visible&&A.push(B,Ue,Ge,ne,gt.z,null)}}else if((B.isMesh||B.isLine||B.isPoints)&&(!B.frustumCulled||Le.intersectsObject(B))){const Ue=be.update(B),Ge=B.material;if(ae&&(B.boundingSphere!==void 0?(B.boundingSphere===null&&B.computeBoundingSphere(),gt.copy(B.boundingSphere.center)):(Ue.boundingSphere===null&&Ue.computeBoundingSphere(),gt.copy(Ue.boundingSphere.center)),gt.applyMatrix4(B.matrixWorld).applyMatrix4(De)),Array.isArray(Ge)){const qe=Ue.groups;for(let st=0,yt=qe.length;st<yt;st++){const pt=qe[st],zt=Ge[pt.materialIndex];zt&&zt.visible&&A.push(B,Ue,zt,ne,gt.z,pt)}}else Ge.visible&&A.push(B,Ue,Ge,ne,gt.z,null)}}const Be=B.children;for(let Ue=0,Ge=Be.length;Ue<Ge;Ue++)es(Be[Ue],$,ne,ae)}function Ma(B,$,ne,ae){const te=B.opaque,Be=B.transmissive,Ue=B.transparent;M.setupLightsView(ne),nt===!0&&ft.setGlobalState(U.clippingPlanes,ne),ae&&Fe.viewport(Y.copy(ae)),te.length>0&&Di(te,$,ne),Be.length>0&&Di(Be,$,ne),Ue.length>0&&Di(Ue,$,ne),Fe.buffers.depth.setTest(!0),Fe.buffers.depth.setMask(!0),Fe.buffers.color.setMask(!0),Fe.setPolygonOffset(!1)}function ts(B,$,ne,ae){if((ne.isScene===!0?ne.overrideMaterial:null)!==null)return;M.state.transmissionRenderTarget[ae.id]===void 0&&(M.state.transmissionRenderTarget[ae.id]=new $s(1,1,{generateMipmaps:!0,type:je.has("EXT_color_buffer_half_float")||je.has("EXT_color_buffer_float")?ra:Es,minFilter:Tr,samples:4,stencilBuffer:o,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:An.workingColorSpace}));const Be=M.state.transmissionRenderTarget[ae.id],Ue=ae.viewport||Y;Be.setSize(Ue.z*U.transmissionResolutionScale,Ue.w*U.transmissionResolutionScale);const Ge=U.getRenderTarget(),qe=U.getActiveCubeFace(),st=U.getActiveMipmapLevel();U.setRenderTarget(Be),U.getClearColor(he),me=U.getClearAlpha(),me<1&&U.setClearColor(16777215,.5),U.clear(),Zt&&Ct.render(ne);const yt=U.toneMapping;U.toneMapping=no;const pt=ae.viewport;if(ae.viewport!==void 0&&(ae.viewport=void 0),M.setupLightsView(ae),nt===!0&&ft.setGlobalState(U.clippingPlanes,ae),Di(B,ne,ae),lt.updateMultisampleRenderTarget(Be),lt.updateRenderTargetMipmap(Be),je.has("WEBGL_multisampled_render_to_texture")===!1){let zt=!1;for(let Jt=0,Ft=$.length;Jt<Ft;Jt++){const an=$[Jt],Nt=an.object,mt=an.geometry,xn=an.material,rn=an.group;if(xn.side===Mr&&Nt.layers.test(ae.layers)){const Fn=xn.side;xn.side=Ka,xn.needsUpdate=!0,Yt(Nt,ne,ae,mt,xn,rn),xn.side=Fn,xn.needsUpdate=!0,zt=!0}}zt===!0&&(lt.updateMultisampleRenderTarget(Be),lt.updateRenderTargetMipmap(Be))}U.setRenderTarget(Ge,qe,st),U.setClearColor(he,me),pt!==void 0&&(ae.viewport=pt),U.toneMapping=yt}function Di(B,$,ne){const ae=$.isScene===!0?$.overrideMaterial:null;for(let te=0,Be=B.length;te<Be;te++){const Ue=B[te],Ge=Ue.object,qe=Ue.geometry,st=Ue.group;let yt=Ue.material;yt.allowOverride===!0&&ae!==null&&(yt=ae),Ge.layers.test(ne.layers
vendor: 2,759 bytes, line 3899
3899)&&Yt(Ge,$,ne,qe,yt,st)}}function Yt(B,$,ne,ae,te,Be){B.onBeforeRender(U,$,ne,ae,te,Be),B.modelViewMatrix.multiplyMatrices(ne.matrixWorldInverse,B.matrixWorld),B.normalMatrix.getNormalMatrix(B.modelViewMatrix),te.onBeforeRender(U,$,ne,ae,B,Be),te.transparent===!0&&te.side===Mr&&te.forceSinglePass===!1?(te.side=Ka,te.needsUpdate=!0,U.renderBufferDirect(ne,$,ae,te,B,Be),te.side=ao,te.needsUpdate=!0,U.renderBufferDirect(ne,$,ae,te,B,Be),te.side=Mr):U.renderBufferDirect(ne,$,ae,te,B,Be),B.onAfterRender(U,$,ne,ae,te,Be)}function Bi(B,$,ne){$.isScene!==!0&&($=Et);const ae=it.get(B),te=M.state.lights,Be=M.state.shadowsArray,Ue=te.state.version,Ge=ze.getParameters(B,te.state,Be,$,ne),qe=ze.getProgramCacheKey(Ge);let st=ae.programs;ae.environment=B.isMeshStandardMaterial?$.environment:null,ae.fog=$.fog,ae.envMap=(B.isMeshStandardMaterial?qt:Vt).get(B.envMap||ae.environment),ae.envMapRotation=ae.environment!==null&&B.envMap===null?$.environmentRotation:B.envMapRotation,st===void 0&&(B.addEventListener("dispose",We),st=new Map,ae.programs=st);let yt=st.get(qe);if(yt!==void 0){if(ae.currentProgram===yt&&ae.lightsStateVersion===Ue)return I(B,Ge),yt}else Ge.uniforms=ze.getUniforms(B),B.onBeforeCompile(Ge,U),yt=ze.acquireProgram(Ge,qe),st.set(qe,yt),ae.uniforms=Ge.uniforms;const pt=ae.uniforms;return(!B.isShaderMaterial&&!B.isRawShaderMaterial||B.clipping===!0)&&(pt.clippingPlanes=ft.uniform),I(B,Ge),ae.needsLights=we(B),ae.lightsStateVersion=Ue,ae.needsLights&&(pt.ambientLightColor.value=te.state.ambient,pt.lightProbe.value=te.state.probe,pt.directionalLights.value=te.state.directional,pt.directionalLightShadows.value=te.state.directionalShadow,pt.spotLights.value=te.state.spot,pt.spotLightShadows.value=te.state.spotShadow,pt.rectAreaLights.value=te.state.rectArea,pt.ltc_1.value=te.state.rectAreaLTC1,pt.ltc_2.value=te.state.rectAreaLTC2,pt.pointLights.value=te.state.point,pt.pointLightShadows.value=te.state.pointShadow,pt.hemisphereLights.value=te.state.hemi,pt.directionalShadowMap.value=te.state.directionalShadowMap,pt.directionalShadowMatrix.value=te.state.directionalShadowMatrix,pt.spotShadowMap.value=te.state.spotShadowMap,pt.spotLightMatrix.value=te.state.spotLightMatrix,pt.spotLightMap.value=te.state.spotLightMap,pt.pointShadowMap.value=te.state.pointShadowMap,pt.pointShadowMatrix.value=te.state.pointShadowMatrix),ae.currentProgram=yt,ae.uniformsList=null,yt}function nn(B){if(B.uniformsList===null){const $=B.currentProgram.getUniforms();B.uniformsList=I0.seqWithValue($.seq,B.uniforms)}return B.uniformsList}function I(B,$){const ne=it.get(B);ne.outputColorSpace=$.outputColorSpace,ne.batching=$.batching,ne.batchingColor=$.batchingColor,ne.instancing=$.instancing,ne.instancingColor=$.instancingColor,ne.instancingMorph=$.
vendor: 18,942 bytes, line 3899
3899instancingMorph,ne.skinning=$.skinning,ne.morphTargets=$.morphTargets,ne.morphNormals=$.morphNormals,ne.morphColors=$.morphColors,ne.morphTargetsCount=$.morphTargetsCount,ne.numClippingPlanes=$.numClippingPlanes,ne.numIntersection=$.numClipIntersection,ne.vertexAlphas=$.vertexAlphas,ne.vertexTangents=$.vertexTangents,ne.toneMapping=$.toneMapping}function q(B,$,ne,ae,te){$.isScene!==!0&&($=Et),lt.resetTextureUnits();const Be=$.fog,Ue=ae.isMeshStandardMaterial?$.environment:null,Ge=V===null?U.outputColorSpace:V.isXRRenderTarget===!0?V.texture.colorSpace:Qi,qe=(ae.isMeshStandardMaterial?qt:Vt).get(ae.envMap||Ue),st=ae.vertexColors===!0&&!!ne.attributes.color&&ne.attributes.color.itemSize===4,yt=!!ne.attributes.tangent&&(!!ae.normalMap||ae.anisotropy>0),pt=!!ne.morphAttributes.position,zt=!!ne.morphAttributes.normal,Jt=!!ne.morphAttributes.color;let Ft=no;ae.toneMapped&&(V===null||V.isXRRenderTarget===!0)&&(Ft=U.toneMapping);const an=ne.morphAttributes.position||ne.morphAttributes.normal||ne.morphAttributes.color,Nt=an!==void 0?an.length:0,mt=it.get(ae),xn=M.state.lights;if(nt===!0&&(ve===!0||B!==z)){const Rn=B===z&&ae.id===O;ft.setState(ae,B,Rn)}let rn=!1;ae.version===mt.__version?(mt.needsLights&&mt.lightsStateVersion!==xn.state.version||mt.outputColorSpace!==Ge||te.isBatchedMesh&&mt.batching===!1||!te.isBatchedMesh&&mt.batching===!0||te.isBatchedMesh&&mt.batchingColor===!0&&te.colorTexture===null||te.isBatchedMesh&&mt.batchingColor===!1&&te.colorTexture!==null||te.isInstancedMesh&&mt.instancing===!1||!te.isInstancedMesh&&mt.instancing===!0||te.isSkinnedMesh&&mt.skinning===!1||!te.isSkinnedMesh&&mt.skinning===!0||te.isInstancedMesh&&mt.instancingColor===!0&&te.instanceColor===null||te.isInstancedMesh&&mt.instancingColor===!1&&te.instanceColor!==null||te.isInstancedMesh&&mt.instancingMorph===!0&&te.morphTexture===null||te.isInstancedMesh&&mt.instancingMorph===!1&&te.morphTexture!==null||mt.envMap!==qe||ae.fog===!0&&mt.fog!==Be||mt.numClippingPlanes!==void 0&&(mt.numClippingPlanes!==ft.numPlanes||mt.numIntersection!==ft.numIntersection)||mt.vertexAlphas!==st||mt.vertexTangents!==yt||mt.morphTargets!==pt||mt.morphNormals!==zt||mt.morphColors!==Jt||mt.toneMapping!==Ft||mt.morphTargetsCount!==Nt)&&(rn=!0):(rn=!0,mt.__version=ae.version);let Fn=mt.currentProgram;rn===!0&&(Fn=Bi(ae,$,te));let gn=!1,yn=!1,Un=!1;const wt=Fn.getUniforms(),kn=mt.uniforms;if(Fe.useProgram(Fn.program)&&(gn=!0,yn=!0,Un=!0),ae.id!==O&&(O=ae.id,yn=!0),gn||z!==B){Fe.buffers.depth.getReversed()&&B.reversedDepth!==!0&&(B._reversedDepth=!0,B.updateProjectionMatrix()),wt.setValue(ie,"projectionMatrix",B.projectionMatrix),wt.setValue(ie,"viewMatrix",B.matrixWorldInverse);const Xn=wt.map.cameraPosition;Xn!==void 0&&Xn.setValue(ie,ot.setFromMatrixPosition(B.matrixWorld)),ke.logarithmicDepthBuffer&&wt.setValue(ie,"logDepthBufFC",2/(Math.log(B.far+1)/Math.LN2)),(ae.isMeshPhongMaterial||ae.isMeshToonMaterial||ae.isMeshLambertMaterial||ae.isMeshBasicMaterial||ae.isMeshStandardMaterial||ae.isShaderMaterial)&&wt.setValue(ie,"isOrthographic",B.isOrthographicCamera===!0),z!==B&&(z=B,yn=!0,Un=!0)}if(te.isSkinnedMesh){wt.setOptional(ie,te,"bindMatrix"),wt.setOptional(ie,te,"bindMatrixInverse");const Rn=te.skeleton;Rn&&(Rn.boneTexture===null&&Rn.computeBoneTexture(),wt.setValue(ie,"boneTexture",Rn.boneTexture,lt))}te.isBatchedMesh&&(wt.setOptional(ie,te,"batchingTexture"),wt.setValue(ie,"batchingTexture",te._matricesTexture,lt),wt.setOptional(ie,te,"batchingIdTexture"),wt.setValue(ie,"batchingIdTexture",te._indirectTexture,lt),wt.setOptional(ie,te,"batchingColorTexture"),te._colorsTexture!==null&&wt.setValue(ie,"batchingColorTexture",te._colorsTexture,lt));const fi=ne.morphAttributes;if((fi.position!==void 0||fi.normal!==void 0||fi.color!==void 0)&&Qe.update(te,ne,Fn),(yn||mt.receiveShadow!==te.receiveShadow)&&(mt.receiveShadow=te.receiveShadow,wt.setValue(ie,"receiveShadow",te.receiveShadow)),ae.isMeshGouraudMaterial&&ae.envMap!==null&&(kn.envMap.value=qe,kn.flipEnvMap.value=qe.isCubeTexture&&qe.isRenderTargetTexture===!1?-1:1),ae.isMeshStandardMaterial&&ae.envMap===null&&$.environment!==null&&(kn.envMapIntensity.value=$.environmentIntensity),yn&&(wt.setValue(ie,"toneMappingExposure",U.toneMappingExposure),mt.needsLights&&ue(kn,Un),Be&&ae.fog===!0&&$e.refreshFogUniforms(kn,Be),$e.refreshMaterialUniforms(kn,ae,ee,Q,M.state.transmissionRenderTarget[B.id]),I0.upload(ie,nn(mt),kn,lt)),ae.isShaderMaterial&&ae.uniformsNeedUpdate===!0&&(I0.upload(ie,nn(mt),kn,lt),ae.uniformsNeedUpdate=!1),ae.isSpriteMaterial&&wt.setValue(ie,"center",te.center),wt.setValue(ie,"modelViewMatrix",te.modelViewMatrix),wt.setValue(ie,"normalMatrix",te.normalMatrix),wt.setValue(ie,"modelMatrix",te.matrixWorld),ae.isShaderMaterial||ae.isRawShaderMaterial){const Rn=ae.uniformsGroups;for(let Xn=0,Jo=Rn.length;Xn<Jo;Xn++){const Ea=Rn[Xn];Ut.update(Ea,Fn),Ut.bind(Ea,Fn)}}return Fn}function ue(B,$){B.ambientLightColor.needsUpdate=$,B.lightProbe.needsUpdate=$,B.directionalLights.needsUpdate=$,B.directionalLightShadows.needsUpdate=$,B.pointLights.needsUpdate=$,B.pointLightShadows.needsUpdate=$,B.spotLights.needsUpdate=$,B.spotLightShadows.needsUpdate=$,B.rectAreaLights.needsUpdate=$,B.hemisphereLights.needsUpdate=$}function we(B){return B.isMeshLambertMaterial||B.isMeshToonMaterial||B.isMeshPhongMaterial||B.isMeshStandardMaterial||B.isShadowMaterial||B.isShaderMaterial&&B.lights===!0}this.getActiveCubeFace=function(){return F},this.getActiveMipmapLevel=function(){return G},this.getRenderTarget=function(){return V},this.setRenderTargetTextures=function(B,$,ne){const ae=it.get(B);ae.__autoAllocateDepthBuffer=B.resolveDepthBuffer===!1,ae.__autoAllocateDepthBuffer===!1&&(ae.__useRenderToTexture=!1),it.get(B.texture).__webglTexture=$,it.get(B.depthTexture).__webglTexture=ae.__autoAllocateDepthBuffer?void 0:ne,ae.__hasExternalTextures=!0},this.setRenderTargetFramebuffer=function(B,$){const ne=it.get(B);ne.__webglFramebuffer=$,ne.__useDefaultFramebuffer=$===void 0};const He=ie.createFramebuffer();this.setRenderTarget=function(B,$=0,ne=0){V=B,F=$,G=ne;let ae=!0,te=null,Be=!1,Ue=!1;if(B){const qe=it.get(B);if(qe.__useDefaultFramebuffer!==void 0)Fe.bindFramebuffer(ie.FRAMEBUFFER,null),ae=!1;else if(qe.__webglFramebuffer===void 0)lt.setupRenderTarget(B);else if(qe.__hasExternalTextures)lt.rebindTextures(B,it.get(B.texture).__webglTexture,it.get(B.depthTexture).__webglTexture);else if(B.depthBuffer){const pt=B.depthTexture;if(qe.__boundDepthTexture!==pt){if(pt!==null&&it.has(pt)&&(B.width!==pt.image.width||B.height!==pt.image.height))throw new Error("WebGLRenderTarget: Attached DepthTexture is initialized to the incorrect size.");lt.setupDepthRenderbuffer(B)}}const st=B.texture;(st.isData3DTexture||st.isDataArrayTexture||st.isCompressedArrayTexture)&&(Ue=!0);const yt=it.get(B).__webglFramebuffer;B.isWebGLCubeRenderTarget?(Array.isArray(yt[$])?te=yt[$][ne]:te=yt[$],Be=!0):B.samples>0&&lt.useMultisampledRTT(B)===!1?te=it.get(B).__webglMultisampledFramebuffer:Array.isArray(yt)?te=yt[ne]:te=yt,Y.copy(B.viewport),se.copy(B.scissor),ce=B.scissorTest}else Y.copy(W).multiplyScalar(ee).floor(),se.copy(fe).multiplyScalar(ee).floor(),ce=Ce;if(ne!==0&&(te=He),Fe.bindFramebuffer(ie.FRAMEBUFFER,te)&&ae&&Fe.drawBuffers(B,te),Fe.viewport(Y),Fe.scissor(se),Fe.setScissorTest(ce),Be){const qe=it.get(B.texture);ie.framebufferTexture2D(ie.FRAMEBUFFER,ie.COLOR_ATTACHMENT0,ie.TEXTURE_CUBE_MAP_POSITIVE_X+$,qe.__webglTexture,ne)}else if(Ue){const qe=$;for(let st=0;st<B.textures.length;st++){const yt=it.get(B.textures[st]);ie.framebufferTextureLayer(ie.FRAMEBUFFER,ie.COLOR_ATTACHMENT0+st,yt.__webglTexture,ne,qe)}}else if(B!==null&&ne!==0){const qe=it.get(B.texture);ie.framebufferTexture2D(ie.FRAMEBUFFER,ie.COLOR_ATTACHMENT0,ie.TEXTURE_2D,qe.__webglTexture,ne)}O=-1},this.readRenderTargetPixels=function(B,$,ne,ae,te,Be,Ue,Ge=0){if(!(B&&B.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let qe=it.get(B).__webglFramebuffer;if(B.isWebGLCubeRenderTarget&&Ue!==void 0&&(qe=qe[Ue]),qe){Fe.bindFramebuffer(ie.FRAMEBUFFER,qe);try{const st=B.textures[Ge],yt=st.format,pt=st.type;if(!ke.textureFormatReadable(yt)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!ke.textureTypeReadable(pt)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}$>=0&&$<=B.width-ae&&ne>=0&&ne<=B.height-te&&(B.textures.length>1&&ie.readBuffer(ie.COLOR_ATTACHMENT0+Ge),ie.readPixels($,ne,ae,te,vt.convert(yt),vt.convert(pt),Be))}finally{const st=V!==null?it.get(V).__webglFramebuffer:null;Fe.bindFramebuffer(ie.FRAMEBUFFER,st)}}},this.readRenderTargetPixelsAsync=async function(B,$,ne,ae,te,Be,Ue,Ge=0){if(!(B&&B.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let qe=it.get(B).__webglFramebuffer;if(B.isWebGLCubeRenderTarget&&Ue!==void 0&&(qe=qe[Ue]),qe)if($>=0&&$<=B.width-ae&&ne>=0&&ne<=B.height-te){Fe.bindFramebuffer(ie.FRAMEBUFFER,qe);const st=B.textures[Ge],yt=st.format,pt=st.type;if(!ke.textureFormatReadable(yt))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!ke.textureTypeReadable(pt))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");const zt=ie.createBuffer();ie.bindBuffer(ie.PIXEL_PACK_BUFFER,zt),ie.bufferData(ie.PIXEL_PACK_BUFFER,Be.byteLength,ie.STREAM_READ),B.textures.length>1&&ie.readBuffer(ie.COLOR_ATTACHMENT0+Ge),ie.readPixels($,ne,ae,te,vt.convert(yt),vt.convert(pt),0);const Jt=V!==null?it.get(V).__webglFramebuffer:null;Fe.bindFramebuffer(ie.FRAMEBUFFER,Jt);const Ft=ie.fenceSync(ie.SYNC_GPU_COMMANDS_COMPLETE,0);return ie.flush(),await EN(ie,Ft,4),ie.bindBuffer(ie.PIXEL_PACK_BUFFER,zt),ie.getBufferSubData(ie.PIXEL_PACK_BUFFER,0,Be),ie.deleteBuffer(zt),ie.deleteSync(Ft),Be}else throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")},this.copyFramebufferToTexture=function(B,$=null,ne=0){const ae=Math.pow(2,-ne),te=Math.floor(B.image.width*ae),Be=Math.floor(B.image.height*ae),Ue=$!==null?$.x:0,Ge=$!==null?$.y:0;lt.setTexture2D(B,0),ie.copyTexSubImage2D(ie.TEXTURE_2D,ne,0,0,Ue,Ge,te,Be),Fe.unbindTexture()};const Ie=ie.createFramebuffer(),at=ie.createFramebuffer();this.copyTextureToTexture=function(B,$,ne=null,ae=null,te=0,Be=null){Be===null&&(te!==0?(Xm("WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels."),Be=te,te=0):Be=0);let Ue,Ge,qe,st,yt,pt,zt,Jt,Ft;const an=B.isCompressedTexture?B.mipmaps[Be]:B.image;if(ne!==null)Ue=ne.max.x-ne.min.x,Ge=ne.max.y-ne.min.y,qe=ne.isBox3?ne.max.z-ne.min.z:1,st=ne.min.x,yt=ne.min.y,pt=ne.isBox3?ne.min.z:0;else{const fi=Math.pow(2,-te);Ue=Math.floor(an.width*fi),Ge=Math.floor(an.height*fi),B.isDataArrayTexture?qe=an.depth:B.isData3DTexture?qe=Math.floor(an.depth*fi):qe=1,st=0,yt=0,pt=0}ae!==null?(zt=ae.x,Jt=ae.y,Ft=ae.z):(zt=0,Jt=0,Ft=0);const Nt=vt.convert($.format),mt=vt.convert($.type);let xn;$.isData3DTexture?(lt.setTexture3D($,0),xn=ie.TEXTURE_3D):$.isDataArrayTexture||$.isCompressedArrayTexture?(lt.setTexture2DArray($,0),xn=ie.TEXTURE_2D_ARRAY):(lt.setTexture2D($,0),xn=ie.TEXTURE_2D),ie.pixelStorei(ie.UNPACK_FLIP_Y_WEBGL,$.flipY),ie.pixelStorei(ie.UNPACK_PREMULTIPLY_ALPHA_WEBGL,$.premultiplyAlpha),ie.pixelStorei(ie.UNPACK_ALIGNMENT,$.unpackAlignment);const rn=ie.getParameter(ie.UNPACK_ROW_LENGTH),Fn=ie.getParameter(ie.UNPACK_IMAGE_HEIGHT),gn=ie.getParameter(ie.UNPACK_SKIP_PIXELS),yn=ie.getParameter(ie.UNPACK_SKIP_ROWS),Un=ie.getParameter(ie.UNPACK_SKIP_IMAGES);ie.pixelStorei(ie.UNPACK_ROW_LENGTH,an.width),ie.pixelStorei(ie.UNPACK_IMAGE_HEIGHT,an.height),ie.pixelStorei(ie.UNPACK_SKIP_PIXELS,st),ie.pixelStorei(ie.UNPACK_SKIP_ROWS,yt),ie.pixelStorei(ie.UNPACK_SKIP_IMAGES,pt);const wt=B.isDataArrayTexture||B.isData3DTexture,kn=$.isDataArrayTexture||$.isData3DTexture;if(B.isDepthTexture){const fi=it.get(B),Rn=it.get($),Xn=it.get(fi.__renderTarget),Jo=it.get(Rn.__renderTarget);Fe.bindFramebuffer(ie.READ_FRAMEBUFFER,Xn.__webglFramebuffer),Fe.bindFramebuffer(ie.DRAW_FRAMEBUFFER,Jo.__webglFramebuffer);for(let Ea=0;Ea<qe;Ea++)wt&&(ie.framebufferTextureLayer(ie.READ_FRAMEBUFFER,ie.COLOR_ATTACHMENT0,it.get(B).__webglTexture,te,pt+Ea),ie.framebufferTextureLayer(ie.DRAW_FRAMEBUFFER,ie.COLOR_ATTACHMENT0,it.get($).__webglTexture,Be,Ft+Ea)),ie.blitFramebuffer(st,yt,Ue,Ge,zt,Jt,Ue,Ge,ie.DEPTH_BUFFER_BIT,ie.NEAREST);Fe.bindFramebuffer(ie.READ_FRAMEBUFFER,null),Fe.bindFramebuffer(ie.DRAW_FRAMEBUFFER,null)}else if(te!==0||B.isRenderTargetTexture||it.has(B)){const fi=it.get(B),Rn=it.get($);Fe.bindFramebuffer(ie.READ_FRAMEBUFFER,Ie),Fe.bindFramebuffer(ie.DRAW_FRAMEBUFFER,at);for(let Xn=0;Xn<qe;Xn++)wt?ie.framebufferTextureLayer(ie.READ_FRAMEBUFFER,ie.COLOR_ATTACHMENT0,fi.__webglTexture,te,pt+Xn):ie.framebufferTexture2D(ie.READ_FRAMEBUFFER,ie.COLOR_ATTACHMENT0,ie.TEXTURE_2D,fi.__webglTexture,te),kn?ie.framebufferTextureLayer(ie.DRAW_FRAMEBUFFER,ie.COLOR_ATTACHMENT0,Rn.__webglTexture,Be,Ft+Xn):ie.framebufferTexture2D(ie.DRAW_FRAMEBUFFER,ie.COLOR_ATTACHMENT0,ie.TEXTURE_2D,Rn.__webglTexture,Be),te!==0?ie.blitFramebuffer(st,yt,Ue,Ge,zt,Jt,Ue,Ge,ie.COLOR_BUFFER_BIT,ie.NEAREST):kn?ie.copyTexSubImage3D(xn,Be,zt,Jt,Ft+Xn,st,yt,Ue,Ge):ie.copyTexSubImage2D(xn,Be,zt,Jt,st,yt,Ue,Ge);Fe.bindFramebuffer(ie.READ_FRAMEBUFFER,null),Fe.bindFramebuffer(ie.DRAW_FRAMEBUFFER,null)}else kn?B.isDataTexture||B.isData3DTexture?ie.texSubImage3D(xn,Be,zt,Jt,Ft,Ue,Ge,qe,Nt,mt,an.data):$.isCompressedArrayTexture?ie.compressedTexSubImage3D(xn,Be,zt,Jt,Ft,Ue,Ge,qe,Nt,an.data):ie.texSubImage3D(xn,Be,zt,Jt,Ft,Ue,Ge,qe,Nt,mt,an):B.isDataTexture?ie.texSubImage2D(ie.TEXTURE_2D,Be,zt,Jt,Ue,Ge,Nt,mt,an.data):B.isCompressedTexture?ie.compressedTexSubImage2D(ie.TEXTURE_2D,Be,zt,Jt,an.width,an.height,Nt,an.data):ie.texSubImage2D(ie.TEXTURE_2D,Be,zt,Jt,Ue,Ge,Nt,mt,an);ie.pixelStorei(ie.UNPACK_ROW_LENGTH,rn),ie.pixelStorei(ie.UNPACK_IMAGE_HEIGHT,Fn),ie.pixelStorei(ie.UNPACK_SKIP_PIXELS,gn),ie.pixelStorei(ie.UNPACK_SKIP_ROWS,yn),ie.pixelStorei(ie.UNPACK_SKIP_IMAGES,Un),Be===0&&$.generateMipmaps&&ie.generateMipmap(xn),Fe.unbindTexture()},this.initRenderTarget=function(B){it.get(B).__webglFramebuffer===void 0&&lt.setupRenderTarget(B)},this.initTexture=function(B){B.isCubeTexture?lt.setTextureCube(B,0):B.isData3DTexture?lt.setTexture3D(B,0):B.isDataArrayTexture||B.isCompressedArrayTexture?lt.setTexture2DArray(B,0):lt.setTexture2D(B,0),Fe.unbindTexture()},this.resetState=function(){F=0,G=0,V=null,Fe.reset(),ut.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Qs}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const t=this.getContext();t.drawingBufferColorSpace=An._getDrawingBufferColorSpace(e),t.unpackColorSpace=An._getUnpackColorSpace()}}const II=Object.freeze(Object.defineProperty({__proto__:null,ACESFilmicToneMapping:lb,AddEquation:Pc,AddOperation:EA,AdditiveAnimationBlendMode:pb,AdditiveBlending:NS,AgXToneMapping:CA,AlphaFormat:fb,AlwaysCompare:jA,AlwaysDepth:j0,AlwaysStencilFunc:zS,AmbientLight:D2,AnimationAction:V2,AnimationClip:Ed,AnimationLoader:KD,AnimationMixer:SU,AnimationObjectGroup:_U,AnimationUtils:qD,ArcCurve:a2,ArrayCamera:P2,ArrowHelper:YU,AttachedBindMode:LS,Audio:H2,AudioAnalyser:cU,AudioContext:qb,AudioListener:rU,AudioLoader:iU,AxesHelper:WU,BackSide:Ka,BasicDepthPacking:IA,BasicShadowMap:aA,BatchedMesh:t2,Bone:Jy,BooleanKeyframeTrack:Tf,Box2:DU,Box3:La,Box3Helper:jU,BoxGeometry:Ef,BoxHelper:XU,BufferAttribute:Qn,BufferGeometry:un,BufferGeometryLoader:I2,ByteType:Fy,Cache:jo,Camera:Zy,CameraHelper:kU,CanvasTexture:mD,CapsuleGeometry:i_,CatmullRomCurve3:s2,CineonToneMapping:wA,CircleGeometry:a_,ClampToEdgeWrapping:Gi,Clock:Yb,Color:_t,ColorKeyframeTrack:Fb,ColorManagement:An,CompressedArrayTexture:dD,CompressedCubeTexture:pD,CompressedTexture:t_,CompressedTextureLoader:QD,ConeGeometry:ug,ConstantAlphaFactor:SA,ConstantColorFactor:_A,Controls:KU,CubeCamera:QA,CubeReflectionMapping:Wo,CubeRefractionMapping:kc,CubeTexture:sg,CubeTextureLoader:R2,CubeUVReflectionMapping:Cd,CubicBezierCurve:Db,CubicBezierCurve3:r2,CubicInterpolant:E2,CullFaceBack:CS,CullFaceFront:iA,CullFaceFrontBack:R3,CullFaceNone:nA,Curve:ro,CurvePath:l2,CustomBlending:sA,CustomToneMapping:RA,CylinderGeometry:cg,Cylindrical:NU,Data3DTexture:Wy,DataArrayTexture:Yy,DataTexture:io,DataTextureLoader:Vb,DataUtils:uf,DecrementStencilOp:P3,DecrementWrapStencilOp:F3,DefaultLoadingManager:w2,DepthFormat:md,DepthStencilFormat:gd,DepthTexture:n_,DetachedBindMode:DA,DirectionalLight:jb,DirectionalLightHelper:GU,DiscreteInterpolant:T2,DodecahedronGeometry:s_,DoubleSide:Mr,DstAlphaFactor:pA,DstColorFactor:gA,DynamicCopyUsage:tN,DynamicDrawUsage:Z3,DynamicReadUsage:J3,EdgesGeometry:i2,EllipseCurve:r_,EqualCompare:VA,EqualDepth:Y0,EqualStencilFunc:X3,EquirectangularReflectionMapping:fd,EquirectangularRefractionMapping:Hm,Euler:er,EventDispatcher:Qo,ExternalTexture:Cb,ExtrudeGeometry:o_,FileLoader:Ms,Float16BufferAttribute:jN,Float32BufferAttribute:Ot,FloatType:bi,Fog:Qy,FogExp2:Ky,FramebufferTexture:hD,FrontSide:ao,Frustum:Dd,FrustumArray:$y,GLBufferAttribute:AU,GLSL1:iN,GLSL3:IS,GreaterCompare:GA,GreaterDepth:Z0,GreaterEqualCompare:XA,GreaterEqualDepth:W0,GreaterEqualStencilFunc:W3,GreaterStencilFunc:q3,GridHelper:FU,Group:Bl,HalfFloatType:ra,HemisphereLight:N2,HemisphereLightHelper:HU,IcosahedronGeometry:fg,ImageBitmapLoader:B2,ImageLoader:Wm,ImageUtils:WA,IncrementStencilOp:B3,IncrementWrapStencilOp:H3,InstancedBufferAttribute:vf,InstancedBufferGeometry:z2,InstancedInterleavedBuffer:TU,InstancedMesh:Ab,Int16BufferAttribute:kN,Int32BufferAttribute:XN,Int8BufferAttribute:FN,IntType:ng,InterleavedBuffer:og,InterleavedBufferAttribute:jc,Interpolant:Ud,InterpolateDiscrete:vd,InterpolateLinear:yd,InterpolateSmooth:O0,InterpolationSamplingMode:rN,InterpolationSamplingType:sN,InvertStencilOp:V3,KeepStencilOp:af,KeyframeTrack:Ar,LOD:e2,LatheGeometry:l_,Layers:Sd,LessCompare:FA,LessDepth:q0,LessEqualCompare:gb,LessEqualDepth:gf,LessEqualStencilFunc:j3,LessStencilFunc:k3,Light:Kc,LightProbe:O2,Line:Vl,Line3:OU,LineBasicMaterial:Ja,LineCurve:Ub,LineCurve3:o2,LineDashedMaterial:S2,LineLoop:wb,LineSegments:so,LinearFilter:Hn,LinearInterpolant:Hb,LinearMipMapLinearFilter:OS,LinearMipMapNearestFilter:D3,LinearMipmapLinearFilter:Tr,LinearMipmapNearestFilter:rd,LinearSRGBColorSpace:Qi,LinearToneMapping:TA,LinearTransfer:Vm,Loader:$a,LoaderUtils:Vc,LoadingManager:m_,LoopOnce:UA,LoopPingPong:OA,LoopRepeat:LA,MOUSE:A3,Material:la,MaterialLoader:g_,MathUtils:yb,Matr
3899ix2:Qb,Matrix3:cn,Matrix4:jt,MaxEquation:cA,Mesh:Mi,MeshBasicMaterial:Bs,MeshDepthMaterial:Ib,MeshDistanceMaterial:Bb,MeshLambertMaterial:_2,MeshMatcapMaterial:x2,MeshNormalMaterial:y2,MeshPhongMaterial:g2,MeshPhysicalMaterial:tr,MeshStandardMaterial:pg,MeshToonMaterial:v2,MinEquation:lA,MirroredRepeatWrapping:hd,MixOperation:MA,MultiplyBlending:US,MultiplyOperation:tg,NearestFilter:oa,NearestMipMapLinearFilter:N3,NearestMipMapNearestFilter:C3,NearestMipmapLinearFilter:of,NearestMipmapNearestFilter:Hy,NeutralToneMapping:NA,NeverCompare:HA,NeverDepth:X0,NeverStencilFunc:G3,NoBlending:qo,NoColorSpace:zl,NoToneMapping:no,NormalAnimationBlendMode:qy,NormalBlending:df,NotEqualCompare:kA,NotEqualDepth:K0,NotEqualStencilFunc:Y3,NumberKeyframeTrack:_f,Object3D:Bn,ObjectLoader:tU,ObjectSpaceNormalMap:PA,OctahedronGeometry:hg,OneFactor:fA,OneMinusConstantAlphaFactor:bA,OneMinusConstantColorFactor:xA,OneMinusDstAlphaFactor:mA,OneMinusDstColorFactor:vA,OneMinusSrcAlphaFactor:k0,OneMinusSrcColorFactor:dA,OrthographicCamera:wf,PCFShadowMap:Py,PCFSoftShadowMap:Am,PMREMGenerator:kS,Path:Cy,PerspectiveCamera:sa,Plane:Bc,PlaneGeometry:Zc,PlaneHelper:qU,PointLight:Xb,PointLightHelper:BU,Points:Rb,PointsMaterial:e_,PolarGridHelper:VU,PolyhedronGeometry:Wc,PositionalAudio:lU,PropertyBinding:Pn,PropertyMixer:F2,QuadraticBezierCurve:Lb,QuadraticBezierCurve3:Ob,Quaternion:Qa,QuaternionKeyframeTrack:xf,QuaternionLinearInterpolant:A2,RED_GREEN_RGTC2_Format:My,RED_RGTC1_Format:Sy,REVISION:eg,RGBADepthPacking:BA,RGBAFormat:ki,RGBAIntegerFormat:jy,RGBA_ASTC_10x10_Format:my,RGBA_ASTC_10x5_Format:hy,RGBA_ASTC_10x6_Format:dy,RGBA_ASTC_10x8_Format:py,RGBA_ASTC_12x10_Format:gy,RGBA_ASTC_12x12_Format:vy,RGBA_ASTC_4x4_Format:ay,RGBA_ASTC_5x4_Format:sy,RGBA_ASTC_5x5_Format:ry,RGBA_ASTC_6x5_Format:oy,RGBA_ASTC_6x6_Format:ly,RGBA_ASTC_8x5_Format:cy,RGBA_ASTC_8x6_Format:uy,RGBA_ASTC_8x8_Format:fy,RGBA_BPTC_Format:yy,RGBA_ETC2_EAC_Format:iy,RGBA_PVRTC_2BPPV1_Format:ey,RGBA_PVRTC_4BPPV1_Format:$0,RGBA_S3TC_DXT1_Format:Rm,RGBA_S3TC_DXT3_Format:Cm,RGBA_S3TC_DXT5_Format:Nm,RGBDepthPacking:L3,RGBFormat:hb,RGBIntegerFormat:U3,RGB_BPTC_SIGNED_Format:_y,RGB_BPTC_UNSIGNED_Format:xy,RGB_ETC1_Format:ty,RGB_ETC2_Format:ny,RGB_PVRTC_2BPPV1_Format:J0,RGB_PVRTC_4BPPV1_Format:Q0,RGB_S3TC_DXT1_Format:wm,RGDepthPacking:O3,RGFormat:db,RGIntegerFormat:Xy,RawShaderMaterial:m2,Ray:Nd,Raycaster:Kb,RectAreaLight:U2,RedFormat:ig,RedIntegerFormat:ag,ReinhardToneMapping:AA,RenderTarget:_b,RenderTarget3D:bU,RepeatWrapping:Xc,ReplaceStencilOp:I3,ReverseSubtractEquation:oA,RingGeometry:c_,SIGNED_RED_GREEN_RGTC2_Format:Ey,SIGNED_RED_RGTC1_Format:by,SRGBColorSpace:Ii,SRGBTransfer:ni,Scene:rg,ShaderChunk:mn,ShaderLib:eo,ShaderMaterial:Ts,ShadowMaterial:p2,Shape:mf,ShapeGeometry:u_,ShapePath:ZU,ShapeUtils:to,ShortType:Vy,Skeleton:lg,SkeletonHelper:IU,SkinnedMesh:Tb,Source:Hc,Sphere:Sa,SphereGeometry:dg,Spherical:CU,SphericalHarmonics3:L2,SplineCurve:zb,SpotLight:kb,SpotLightHelper:zU,Sprite:$A,SpriteMaterial:Eb,SrcAlphaFactor:G0,SrcAlphaSaturateFactor:yA,SrcColorFactor:hA,StaticCopyUsage:eN,StaticDrawUsage:Gm,StaticReadUsage:Q3,StereoCamera:aU,StreamCopyUsage:nN,StreamDrawUsage:K3,StreamReadUsage:$3,StringKeyframeTrack:Af,SubtractEquation:rA,SubtractiveBlending:DS,TOUCH:w3,TangentSpaceNormalMap:Yc,TetrahedronGeometry:f_,Texture:ei,TextureLoader:C2,TextureUtils:tL,Timer:wU,TimestampQuery:aN,TorusGeometry:h_,TorusKnotGeometry:d_,Triangle:Is,TriangleFanDrawMode:Ty,TriangleStripDrawMode:mb,TrianglesDrawMode:zA,TubeGeometry:p_,UVMapping:Gc,Uint16BufferAttribute:xb,Uint32BufferAttribute:Sb,Uint8BufferAttribute:VN,Uint8ClampedBufferAttribute:GN,Uniform:v_,UniformsGroup:EU,UniformsLib:St,UniformsUtils:bb,UnsignedByteType:Es,UnsignedInt101111Type:ub,UnsignedInt248Type:pd,UnsignedInt5999Type:cb,UnsignedIntType:Zo,UnsignedShort4444Type:Gy,UnsignedShort5551Type:ky,UnsignedShortType:dd,VSMShadowMap:$r,Vector2:Je,Vector3:K,Vector4:Gn,VectorKeyframeTrack:Sf,VideoFrameTexture:fD,VideoTexture:n2,WebGL3DRenderTarget:CN,WebGLArrayRenderTarget:RN,WebGLCoordinateSystem:Qs,WebGLCubeRenderTarget:Mb,WebGLRenderTarget:$s,WebGLRenderer:$b,WebGLUtils:W2,WebGPUCoordinateSystem:_d,WebXRController:z0,WireframeGeometry:d2,WrapAroundEnding:Fm,ZeroCurvatureEnding:lf,ZeroFactor:uA,ZeroSlopeEnding:cf,ZeroStencilOp:z3,createCanvasElement:YA},Symbol.toStringTag,{value:"Module"}));var eS={exports:{}},Ol={};
3899/**
3900 * @license React
3901 * react-reconciler-constants.production.js
3902 *
3903 * Copyright (c) Meta Platforms, Inc. and affiliates.
3904 *
3905 * This source code is licensed under the MIT license found in the
3906 * LICENSE file in the root directory of this source tree.
3907 */var tT;function BI(){return tT||(tT=1,Ol.ConcurrentRoot=1,Ol.ContinuousEventPriority=8,Ol.DefaultEventPriority=32,Ol.DiscreteEventPriority=2,Ol.IdleEventPriority=268435456,Ol.LegacyRoot=0,Ol.NoEventPriority=0),Ol}var nT;function PI(){return nT||(nT=1,eS.exports=BI()),eS.exports}var B0=PI(),tS={exports:{}},nS={},iS={exports:{}},aS={};/**
3908 * @license React
3909 * use-sync-external-store-shim.production.js
3910 *
3911 * Copyright (c) Meta Platforms, Inc. and affiliates.
3912 *
3913 * This source code is licensed under the MIT license found in the
3914 * LICENSE file in the root directory of this source tree.
3915 */var iT;function HI(){if(iT)return aS;iT=1;var s=Ad();function e(y,_){return y===_&&(y!==0||1/y===1/_)||y!==y&&_!==_}var t=typeof Object.is=="function"?Object.is:e,n=s.useState,a=s.useEffect,o=s.useLayoutEffect,c=s.useDebugValue;function h(y,_){var b=_(),T=n({inst:{value:b,getSnapshot:_}}),R=T[0].inst,A=T[1];return o(function(){R.value=b,R.getSnapshot=_,d(R)&&A({inst:R})},[y,b,_]),a(function(){return d(R)&&A({inst:R}),y(function(){d(R)&&A({inst:R})})},[y]),c(b),b}function d(y){var _=y.getSnapshot;y=y.value;try{var b=_();return!t(y,b)}catch{return!0}}function p(y,_){return _()}var v=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:h;return aS.useSyncExternalStore=s.useSyncExternalStore!==void 0?s.useSyncExternalStore:v,aS}var aT;function FI(){return aT||(aT=1,iS.exports=HI()),iS.exports}/**
3916 * @license React
3917 * use-sync-external-store-shim/with-selector.production.js
3918 *
3919 * Copyright (c) Meta Platforms, Inc. and affiliates.
3920 *
3921 * This source code is licensed under the MIT license found in the
3922 * LICENSE file in the root directory of this source tree.
3923 */var sT;function VI(){if(sT)return nS;sT=1;var s=Ad(),e=FI();function t(p,v){return p===v&&(p!==0||1/p===1/v)||p!==p&&v!==v}var n=typeof Object.is=="function"?Object.is:t,a=e.useSyncExternalStore,o=s.useRef,c=s.useEffect,h=s.useMemo,d=s.useDebugValue;return nS.useSyncExternalStoreWithSelector=function(p,v,y,_,b){var T=o(null);if(T.current===null){var R={hasValue:!1,value:null};T.current=R}else R=T.current;T=h(function(){function M(F){if(!C){if(C=!0,D=F,F=_(F),b!==void 0&&R.hasValue){var G=R.value;if(b(G,F))return U=G}return U=F}if(G=U,n(D,F))return G;var V=_(F);return b!==void 0&&b(G,V)?(D=F,G):(D=F,U=V)}var C=!1,D,U,H=y===void 0?null:y;return[function(){return M(v())},H===null?void 0:function(){return M(H())}]},[v,y,_,b]);var A=a(p,T[0],T[1]);return c(function(){R.hasValue=!0,R.value=A},[A]),d(A),A},nS}var rT;function GI(){return rT||(rT=1,tS.exports=VI()),tS.exports}var kI=GI();const XI=tb(kI),oT=s=>{let e;const t=new Set,n=(p,v)=>{const y=typeof p=="function"?p(e):p;if(!Object.is(y,e)){const _=e;e=v??(typeof y!="object"||y===null)?y:Object.assign({},e,y),t.forEach(b=>b(e,_))}},a=()=>e,h={setState:n,getState:a,getInitialState:()=>d,subscribe:p=>(t.add(p),()=>t.delete(p))},d=e=s(n,a,h);return h},jI=(s=>s?oT(s):oT),{useSyncExternalStoreWithSelector:qI}=XI,YI=s=>s;function WI(s,e=YI,t){const n=qI(s.subscribe,s.getState,s.getInitialState,e,t);return ES.useDebugValue(n),n}const lT=(s,e)=>{const t=jI(s),n=(a,o=e)=>WI(t,a,o);return Object.assign(n,t),n},Z2=((s,e)=>s?lT(s,e):lT),ZI=s=>typeof s=="object"&&typeof s.then=="function",hf=[];function K2(s,e,t=(n,a)=>n===a){if(s===e)return!0;if(!s||!e)return!1;const n=s.length;if(e.length!==n)return!1;for(let a=0;a<n;a++)if(!t(s[a],e[a]))return!1;return!0}function Q2(s,e=null,t=!1,n={}){e===null&&(e=[s]);for(const o of hf)if(K2(e,o.keys,o.equal)){if(t)return;if(Object.prototype.hasOwnProperty.call(o,"error"))throw o.error;if(Object.prototype.hasOwnProperty.call(o,"response"))return n.lifespan&&n.lifespan>0&&(o.timeout&&clearTimeout(o.timeout),o.timeout=setTimeout(o.remove,n.lifespan)),o.response;if(!t)throw o.promise}const a={keys:e,equal:n.equal,remove:()=>{const o=hf.indexOf(a);o!==-1&&hf.splice(o,1)},promise:(ZI(s)?s:s(...e)).then(o=>{a.response=o,n.lifespan&&n.lifespan>0&&(a.timeout=setTimeout(a.remove,n.lifespan))}).catch(o=>a.error=o)};if(hf.push(a),!t)throw a.promise}const KI=(s,e,t)=>Q2(s,e,!1,t),QI=(s,e,t)=>void Q2(s,e,!0,t),JI=s=>
vendor: 11,791 bytes, lines 3923-3946
3923{if(s===void 0||s.length===0)hf.splice(0,hf.length);else{const e=hf.find(t=>K2(s,t.keys,t.equal));e&&e.remove()}};var sS={exports:{}},rS={exports:{}},oS={exports:{}},lS={};/**
3924 * @license React
3925 * scheduler.production.js
3926 *
3927 * Copyright (c) Meta Platforms, Inc. and affiliates.
3928 *
3929 * This source code is licensed under the MIT license found in the
3930 * LICENSE file in the root directory of this source tree.
3931 */var cT;function $I(){return cT||(cT=1,(function(s){function e(P,Q){var ee=P.length;P.push(Q);e:for(;0<ee;){var ge=ee-1>>>1,Se=P[ge];if(0<a(Se,Q))P[ge]=Q,P[ee]=Se,ee=ge;else break e}}function t(P){return P.length===0?null:P[0]}function n(P){if(P.length===0)return null;var Q=P[0],ee=P.pop();if(ee!==Q){P[0]=ee;e:for(var ge=0,Se=P.length,W=Se>>>1;ge<W;){var fe=2*(ge+1)-1,Ce=P[fe],Le=fe+1,nt=P[Le];if(0>a(Ce,ee))Le<Se&&0>a(nt,Ce)?(P[ge]=nt,P[Le]=ee,ge=Le):(P[ge]=Ce,P[fe]=ee,ge=fe);else if(Le<Se&&0>a(nt,ee))P[ge]=nt,P[Le]=ee,ge=Le;else break e}}return Q}function a(P,Q){var ee=P.sortIndex-Q.sortIndex;return ee!==0?ee:P.id-Q.id}if(s.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;s.unstable_now=function(){return o.now()}}else{var c=Date,h=c.now();s.unstable_now=function(){return c.now()-h}}var d=[],p=[],v=1,y=null,_=3,b=!1,T=!1,R=!1,A=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;function D(P){for(var Q=t(p);Q!==null;){if(Q.callback===null)n(p);else if(Q.startTime<=P)n(p),Q.sortIndex=Q.expirationTime,e(d,Q);else break;Q=t(p)}}function U(P){if(R=!1,D(P),!T)if(t(d)!==null)T=!0,he();else{var Q=t(p);Q!==null&&me(U,Q.startTime-P)}}var H=!1,F=-1,G=5,V=-1;function O(){return!(s.unstable_now()-V<G)}function z(){if(H){var P=s.unstable_now();V=P;var Q=!0;try{e:{T=!1,R&&(R=!1,M(F),F=-1),b=!0;var ee=_;try{t:{for(D(P),y=t(d);y!==null&&!(y.expirationTime>P&&O());){var ge=y.callback;if(typeof ge=="function"){y.callback=null,_=y.priorityLevel;var Se=ge(y.expirationTime<=P);if(P=s.unstable_now(),typeof Se=="function"){y.callback=Se,D(P),Q=!0;break t}y===t(d)&&n(d),D(P)}else n(d);y=t(d)}if(y!==null)Q=!0;else{var W=t(p);W!==null&&me(U,W.startTime-P),Q=!1}}break e}finally{y=null,_=ee,b=!1}Q=void 0}}finally{Q?Y():H=!1}}}var Y;if(typeof C=="function")Y=function(){C(z)};else if(typeof MessageChannel<"u"){var se=new MessageChannel,ce=se.port2;se.port1.onmessage=z,Y=function(){ce.postMessage(null)}}else Y=function(){A(z,0)};function he(){H||(H=!0,Y())}function me(P,Q){F=A(function(){P(s.unstable_now())},Q)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(P){P.callback=null},s.unstable_continueExecution=function(){T||b||(T=!0,he())},s.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):G=0<P?Math.floor(1e3/P):5},s.unstable_getCurrentPriorityLevel=function(){return _},s.unstable_getFirstCallbackNode=function(){return t(d)},s.unstable_next=function(P){switch(_){case 1:case 2:case 3:var Q=3;break;default:Q=_}var ee=_;_=Q;try{return P()}finally{_=ee}},s.unstable_pauseExecution=function(){},s.unstable_requestPaint=function(){},s.unstable_runWithPriority=function(P,Q){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var ee=_;_=P;try{return Q()}finally{_=ee}},s.unstable_scheduleCallback=function(P,Q,ee){var ge=s.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?ge+ee:ge):ee=ge,P){case 1:var Se=-1;break;case 2:Se=250;break;case 5:Se=1073741823;break;case 4:Se=1e4;break;default:Se=5e3}return Se=ee+Se,P={id:v++,callback:Q,priorityLevel:P,startTime:ee,expirationTime:Se,sortIndex:-1},ee>ge?(P.sortIndex=ee,e(p,P),t(d)===null&&P===t(p)&&(R?(M(F),F=-1):R=!0,me(U,ee-ge))):(P.sortIndex=Se,e(d,P),T||b||(T=!0,he())),P},s.unstable_shouldYield=O,s.unstable_wrapCallback=function(P){var Q=_;return function(){var ee=_;_=Q;try{return P.apply(this,arguments)}finally{_=ee}}}})(lS)),lS}var uT;function eB(){return uT||(uT=1,oS.exports=$I()),oS.exports}/**
3932 * @license React
3933 * react-reconciler.production.js
3934 *
3935 * Copyright (c) Meta Platforms, Inc. and affiliates.
3936 *
3937 * This source code is licensed under the MIT license found in the
3938 * LICENSE file in the root directory of this source tree.
3939 */var fT;function tB(){return fT||(fT=1,(function(s){s.exports=function(e){function t(l,u,g,S){return new rp(l,u,g,S)}function n(){}function a(l){var u="https://react.dev/errors/"+l;if(1<arguments.length){u+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)u+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+l+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(l){return l===null||typeof l!="object"?null:(l=dp&&l[dp]||l["@@iterator"],typeof l=="function"?l:null)}function c(l){if(l==null)return null;if(typeof l=="function")return l.$$typeof===dl?null:l.displayName||l.name||null;if(typeof l=="string")return l;switch(l){case sc:return"Fragment";case Vs:return"Portal";case hp:return"Profiler";case fp:return"StrictMode";case eh:return"Suspense";case wo:return"SuspenseList"}if(typeof l=="object")switch(l.$$typeof){case cr:return(l.displayName||"Context")+".Provider";case Ao:return(l._context.displayName||"Context")+".Consumer";case rc:var u=l.render;return l=l.displayName,l||(l=u.displayName||u.name||"",l=l!==""?"ForwardRef("+l+")":"ForwardRef"),l;case yu:return u=l.displayName||null,u!==null?u:c(l.type)||"Memo";case Gs:u=l._payload,l=l._init;try{return c(l(u))}catch{}}return null}function h(l){if(th===void 0)try{throw Error()}catch(g){var u=g.stack.trim().match(/\n( *(at )?)/);th=u&&u[1]||"",pp=-1<g.stack.indexOf(`
3940    at`)?" (<anonymous>)":-1<g.stack.indexOf("@")?"@unknown:0:0":""}return`
3941`+th+l+pp}function d(l,u){if(!l||Ro)return"";Ro=!0;var g=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var S={DetermineComponentFrameRoot:function(){try{if(u){var xt=function(){throw Error()};if(Object.defineProperty(xt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(xt,[])}catch(en){var Mt=en}Reflect.construct(l,[],xt)}else{try{xt.call()}catch(en){Mt=en}l.call(xt.prototype)}}else{try{throw Error()}catch(en){Mt=en}(xt=l())&&typeof xt.catch=="function"&&xt.catch(function(){})}}catch(en){if(en&&Mt&&typeof en.stack=="string")return[en.stack,Mt.stack]}return[null,null]}};S.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var w=Object.getOwnPropertyDescriptor(S.DetermineComponentFrameRoot,"name");w&&w.configurable&&Object.defineProperty(S.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var N=S.DetermineComponentFrameRoot(),j=N[0],re=N[1];if(j&&re){var xe=j.split(`
3942`),Xe=re.split(`
3943`);for(w=S=0;S<xe.length&&!xe[S].includes("DetermineComponentFrameRoot");)S++;for(;w<Xe.length&&!Xe[w].includes("DetermineComponentFrameRoot");)w++;if(S===xe.length||w===Xe.length)for(S=xe.length-1,w=Xe.length-1;1<=S&&0<=w&&xe[S]!==Xe[w];)w--;for(;1<=S&&0<=w;S--,w--)if(xe[S]!==Xe[w]){if(S!==1||w!==1)do if(S--,w--,0>w||xe[S]!==Xe[w]){var ht=`
3944`+xe[S].replace(" at new "," at ");return l.displayName&&ht.includes("<anonymous>")&&(ht=ht.replace("<anonymous>",l.displayName)),ht}while(1<=S&&0<=w);break}}}finally{Ro=!1,Error.prepareStackTrace=g}return(g=l?l.displayName||l.name:"")?h(g):""}function p(l){switch(l.tag){case 26:case 27:case 5:return h(l.type);case 16:return h("Lazy");case 13:return h("Suspense");case 19:return h("SuspenseList");case 0:case 15:return l=d(l.type,!1),l;case 11:return l=d(l.type.render,!1),l;case 1:return l=d(l.type,!0),l;default:return""}}function v(l){try{var u="";do u+=p(l),l=l.return;while(l);return u}catch(g){return`
3945Error generating stack: `+g.message+`
3946`+g.stack}}function y(l){var u=l,g=l;if(l.alternate)for(;u.return;)u=u.return;else{l=u;do u=l,(u.flags&4098)!==0&&(g=u.return),l=u.return;while(l)}return u.tag===3?g:null}function _(l){if(y(l)!==l)throw Error(a(188))}function b(l){var u=l.alternate;if(!u){if(u=y(l),u===null)throw Error(a(188));return u!==l?null:l}for(var g=l,S=u;;){var w=g.return;if(w===null)break;var N=w.alternate;if(N===null){if(S=w.return,S!==null){g=S;continue}break}if(w.child===N.child){for(N=w.child;N;){if(N===g)return _(w),l;if(N===S)return _(w),u;N=N.sibling}throw Error(a(188))}if(g.return!==S.return)g=w,S=N;else{for(var j=!1,re=w.child;re;){if(re===g){j=!0,g=w,S=N;break}if(re===S){j=!0,S=w,g=N;break}re=re.sibling}if(!j){for(re=N.child;re;){if(re===g){j=!0,g=N,S=w;break}if(re===S){j=!0,S=N,g=w;break}re=re.sibling}if(!j)throw Error(a(189))}}if(g.alternate!==S)throw Error(a(190))}if(g.tag!==3)throw Error(a(188));return g.stateNode.current===g?l:u}function T(l){var u=l.tag;if(u===5||u===26||u===27||u===6)return l;for(l=l.child;l!==null;){if(u=T(l),u!==null)return u;l=l.sibling}return null}function R(l){var u=l.tag;if(u===5||u===26||u===27||u===6)return l;for(l=l.child;l!==null;){if(l.tag!==4&&(u=R(l),u!==null))return u;l=l.sibling}return null}function A(l){return{current:l}}function M(l){0>Fr||(l.current=wu[Fr],wu[Fr]=null,Fr--)}function C(l,u){Fr++,wu[Fr]=l.current,l.current=u}function D(l){return l>>>=0,l===0?32:31-(Ru(l)/uv|0)|0}function U(l){var u=l&42;if(u!==0)return u;switch(l&-l){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l&4194176;case 4194304:case 8388608:case 16777216:case 33554432:return l&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return l}}function H(l,u){var g=l.pendingLanes;if(g===0)return 0;var S=0,w=l.suspendedLanes,N=l.pingedLanes,j=l.warmLanes;l=l.finishedLanes!==0;var re=g&134217727;return re!==0?(g=re&~w,g!==0?S=U(g):(N&=re,N!==0?S=U(N):l||(j=re&~j,j!==0&&(S=U(j))))):(re=g&~w,re!==0?S=U(re):N!==0?S=U(N):l||(j=g&~j,j!==0&&(S=U(j)))),S===0?0:u!==0&&u!==S&&(u&w)===0&&(w=S&-S,j=u&-u,w>=j||w===32&&(j&4194176)!==0)?u:S}function F(l,u){return(l.pendingLanes&~(l.suspendedLanes&~l.pingedLanes)&u)===0}function G(l,u){switch(l){case 1:case 2:case 4:case 8:return u+250;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 u+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function V(){var l=uc;return uc<<=1,(uc&4194176)===0&&(uc=128),l}function O(){var l=Cu;return Cu<<=1,(Cu&62914560)===0&&(Cu=4194304),l}function z(l){for(var u=[],g=0;31>g;g++)u.push(l);return u}function Y(l,u){l.pendingLanes|=u,u!==268435456&&(l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0)}function se(l,u,g,S,w,N){var j=l.pendingLanes;l.pendingLanes=g,l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0,l.expiredLanes&=g,l.entangledLanes&=g,l.errorRecoveryDisabledLanes&=g,l.shellSuspendCounter=0;var re=l.entanglements,xe=l.expirationTimes,Xe=l.hiddenUpdates;for(g=j&~g;0<g;){var ht=31-Ha(g),xt=1<<ht;re[ht]=0,xe[ht]=-1;var Mt=Xe[ht];if(Mt!==null)for(Xe[ht]=null,ht=0;ht<Mt.length;ht++){var en=Mt[ht];en!==null&&(en.lane&=-536870913)}g&=~xt}S!==0&&ce(l,S,0),N!==0&&w===0&&l.tag!==0&&(l.suspendedLanes|=N&~(j&~u))}
vendor: 4,201 bytes, line 3946
3946function ce(l,u,g){l.pendingLanes|=u,l.suspendedLanes&=~u;var S=31-Ha(u);l.entangledLanes|=u,l.entanglements[S]=l.entanglements[S]|1073741824|g&4194218}function he(l,u){var g=l.entangledLanes|=u;for(l=l.entanglements;g;){var S=31-Ha(g),w=1<<S;w&u|l[S]&u&&(l[S]|=u),g&=~w}}function me(l){return l&=-l,2<l?8<l?(l&134217727)!==0?32:268435456:8:2}function P(l){if(Fa&&typeof Fa.onCommitFiberRoot=="function")try{Fa.onCommitFiberRoot(hc,l,void 0,(l.current.flags&128)===128)}catch{}}function Q(l){if(typeof pv=="function"&&jp(l),Fa&&typeof Fa.setStrictMode=="function")try{Fa.setStrictMode(hc,l)}catch{}}function ee(l,u){return l===u&&(l!==0||1/l===1/u)||l!==l&&u!==u}function ge(l,u){if(typeof l=="object"&&l!==null){var g=yh.get(l);return g!==void 0?g:(u={value:l,source:u,stack:v(u)},yh.set(l,u),u)}return{value:l,source:u,stack:v(u)}}function Se(l,u){ci[vi++]=Uu,ci[vi++]=Du,Du=l,Uu=u}function W(l,u,g){cs[us++]=pr,cs[us++]=Rs,cs[us++]=ks,ks=l;var S=pr;l=Rs;var w=32-Ha(S)-1;S&=~(1<<w),g+=1;var N=32-Ha(u)+w;if(30<N){var j=w-w%5;N=(S&(1<<j)-1).toString(32),S>>=j,w-=j,pr=1<<32-Ha(u)+w|g<<w|S,Rs=N+l}else pr=1<<N|g<<w|S,Rs=l}function fe(l){l.return!==null&&(Se(l,1),W(l,1,0))}function Ce(l){for(;l===Du;)Du=ci[--vi],ci[vi]=null,Uu=ci[--vi],ci[vi]=null;for(;l===ks;)ks=cs[--us],cs[us]=null,Rs=cs[--us],cs[us]=null,pr=cs[--us],cs[us]=null}function Le(l,u){C(Xs,u),C(Lu,l),C(Zi,null),l=pl(u),M(Zi),C(Zi,l)}function nt(){M(Zi),M(Lu),M(Xs)}function ve(l){l.memoizedState!==null&&C(dc,l);var u=Zi.current,g=kg(u,l.type);u!==g&&(C(Lu,l),C(Zi,g))}function De(l){Lu.current===l&&(M(Zi),M(Lu)),dc.current===l&&(M(dc),fr?Kt._currentValue=Pa:Kt._currentValue2=Pa)}function ot(l){var u=Error(a(418,""));throw ie(ge(u,l)),Ou}function gt(l,u){if(!Ra)throw Error(a(175));T_(l.stateNode,l.type,l.memoizedProps,u,l)||ot(l)}function Et(l){for(ga=l.return;ga;)switch(ga.tag){case 3:case 27:Cs=!0;return;case 5:case 13:Cs=!1;return;default:ga=ga.return}}function Zt(l){if(!Ra||l!==ga)return!1;if(!Ln)return Et(l),Ln=!0,!1;var u=!1;if(na?l.tag!==3&&l.tag!==27&&(l.tag!==5||sv(l.type)&&!Do(l.type,l.memoizedProps))&&(u=!0):l.tag!==3&&(l.tag!==5||sv(l.type)&&!Do(l.type,l.memoizedProps))&&(u=!0),u&&aa&&ot(l),Et(l),l.tag===13){if(!Ra)throw Error(a(316));if(l=l.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(a(317));aa=iv(l)}else aa=ga?Up(l.stateNode):null;return!0}function _n(){Ra&&(aa=ga=null,Ln=!1)}function ie(l){fs===null?fs=[l]:fs.push(l)}function Ze(){for(var l=Lo,u=pc=Lo=0;u<l;){var g=hs[u];hs[u++]=null;var S=hs[u];hs[u++]=null;var w=hs[u];hs[u++]=null;var N=hs[u];if(hs[u++]=null,S!==null&&w!==null){var j=S.pending;j===null?w.next=w:(w.next=j.next,j.next=w),S.pending=w}N!==0&&dt(g,w,N)}}function je(l,u,g,S){hs[Lo++]=l,hs[Lo++]=u,hs[Lo++]=g,hs[Lo++]=S,pc|=S,l.lanes|=S,l=l.alternate,l!==null&&(l.lanes|=S)}function ke(l,u,g,S){return je(l,u,g,S),it(l)}function Fe(l,u){return je(l,null,null,u),it(l)}function dt(l,u,g){l.lanes|=g;var S=l.alternate;S!==null&&(S.lanes|=g);for(var w=!1,N=l.return;N!==null;)N.childLanes|=g,S=N.alternate,S!==null&&(S.childLanes|=g),N.tag===22&&(l=N.stateNode,l===null||l._visibility&1||(w=!0)),l=N,N=N.return;w&&u!==null&&l.tag===3&&(N=l.stateNode,w=31-Ha(g),N=N.hiddenUpdates,l=N[w],l===null?N[w]=[u]:l.push(u),u.lane=g|536870912)}function it(l){if(50<Tl)throw Tl=0,Da=null,Error(a(185));for(var u=l.return;u!==null;)l=u,u=l.return;return l.tag===3?l.stateNode:null}function lt(l){l!==yl&&l.next===null&&(yl===null?mc=yl=l:yl=yl.next=l),Iu=!0,zu||(zu=!0,ze(qt))}function Vt(l,u){if(!js&&Iu){js=!0;do for(var g=!1,S=mc;S!==null;){if(l!==0){var w=S.pendingLanes;if(w===0)var N=0;else{var j=S.suspendedLanes,re=S.pingedLanes;N=(1<<31-Ha(42|l)+1)-1,N&=w&~(j&~re),N=N&201326677?N&201326677|1:N?N|2:0}N!==0&&(g=!0,be(S,N))}else N=dn,N=H(S,S===vn?N:0),(N&3)===0||F(S,N)||(g=!0,be(S,N));S=S.next}while(g);js=!1}}function qt(){Iu=zu=!1;var l=0;Oo!==0&&(Uo()&&(l=Oo),Oo=0);for(var u=ia(),g=null,S=mc;S!==null;){var w=S.next,N=J(S,u);N===0?(S.next=null,g===null?mc=w:g.next=w,w===null&&(yl=g)):(g=S,(l!==0||(N&3)!==0)&&(Iu=!0)),S=w}Vt(l)}function J(l,u){for(var g=l.suspendedLanes,S=l.pingedLanes,w=l.expirationTimes,N=l.pendingLanes&-62914561;0<N;){var j=31-Ha(N),re=1<<j,xe=w[j];
vendor: 4,378 bytes, line 3946
3946xe===-1?((re&g)===0||(re&S)!==0)&&(w[j]=G(re,u)):xe<=u&&(l.expiredLanes|=re),N&=~re}if(u=vn,g=dn,g=H(l,l===u?g:0),S=l.callbackNode,g===0||l===u&&$n===2||l.cancelPendingCommit!==null)return S!==null&&S!==null&&Nu(S),l.callbackNode=null,l.callbackPriority=0;if((g&3)===0||F(l,g)){if(u=g&-g,u===l.callbackPriority)return u;switch(S!==null&&Nu(S),me(g)){case 2:case 8:g=dv;break;case 32:g=gh;break;case 268435456:g=vh;break;default:g=gh}return S=k.bind(null,l),g=fc(g,S),l.callbackPriority=u,l.callbackNode=g,u}return S!==null&&S!==null&&Nu(S),l.callbackPriority=2,l.callbackNode=null,2}function k(l,u){var g=l.callbackNode;if(Yi()&&l.callbackNode!==g)return null;var S=dn;return S=H(l,l===vn?S:0),S===0?null:(du(l,S,u),J(l,ia()),l.callbackNode!=null&&l.callbackNode===g?k.bind(null,l):null)}function be(l,u){if(Yi())return null;du(l,u,!0)}function ze(l){Ui?sh(function(){(Ht&6)!==0?fc(Xp,l):l()}):fc(Xp,l)}function $e(){return Oo===0&&(Oo=V()),Oo}function Pe(l,u){if(Bu===null){var g=Bu=[];_h=0,Va=$e(),zo={status:"pending",value:void 0,then:function(S){g.push(S)}}}return _h++,u.then(At,At),u}function At(){if(--_h===0&&Bu!==null){zo!==null&&(zo.status="fulfilled");var l=Bu;Bu=null,Va=0,zo=null;for(var u=0;u<l.length;u++)(0,l[u])()}}function ft(l,u){var g=[],S={status:"pending",value:null,reason:null,then:function(w){g.push(w)}};return l.then(function(){S.status="fulfilled",S.value=u;for(var w=0;w<g.length;w++)(0,g[w])(u)},function(w){for(S.status="rejected",S.reason=w,w=0;w<g.length;w++)(0,g[w])(void 0)}),S}function Rt(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ct(l,u){l=l.updateQueue,u.updateQueue===l&&(u.updateQueue={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,callbacks:null})}function Qe(l){return{lane:l,tag:0,payload:null,callback:null,next:null}}function et(l,u,g){var S=l.updateQueue;if(S===null)return null;if(S=S.shared,(Ht&2)!==0){var w=S.pending;return w===null?u.next=u:(u.next=w.next,w.next=u),S.pending=u,u=it(l),dt(l,null,g),u}return je(l,S,u,g),it(l)}function Dt(l,u,g){if(u=u.updateQueue,u!==null&&(u=u.shared,(g&4194176)!==0)){var S=u.lanes;S&=l.pendingLanes,g|=S,u.lanes=g,he(l,g)}}function vt(l,u){var g=l.updateQueue,S=l.alternate;if(S!==null&&(S=S.updateQueue,g===S)){var w=null,N=null;if(g=g.firstBaseUpdate,g!==null){do{var j={lane:g.lane,tag:g.tag,payload:g.payload,callback:null,next:null};N===null?w=N=j:N=N.next=j,g=g.next}while(g!==null);N===null?w=N=u:N=N.next=u}else w=N=u;g={baseState:S.baseState,firstBaseUpdate:w,lastBaseUpdate:N,shared:S.shared,callbacks:S.callbacks},l.updateQueue=g;return}l=g.lastBaseUpdate,l===null?g.firstBaseUpdate=u:l.next=u,g.lastBaseUpdate=u}function ut(){if(gc){var l=zo;if(l!==null)throw l}}function Ut(l,u,g,S){gc=!1;var w=l.updateQueue;Vr=!1;var N=w.firstBaseUpdate,j=w.lastBaseUpdate,re=w.shared.pending;if(re!==null){w.shared.pending=null;var xe=re,Xe=xe.next;xe.next=null,j===null?N=Xe:j.next=Xe,j=xe;var ht=l.alternate;ht!==null&&(ht=ht.updateQueue,re=ht.lastBaseUpdate,re!==j&&(re===null?ht.firstBaseUpdate=Xe:re.next=Xe,ht.lastBaseUpdate=xe))}if(N!==null){var xt=w.baseState;j=0,ht=Xe=xe=null,re=N;do{var Mt=re.lane&-536870913,en=Mt!==re.lane;if(en?(dn&Mt)===Mt:(S&Mt)===Mt){Mt!==0&&Mt===Va&&(gc=!0),ht!==null&&(ht=ht.next={lane:0,tag:re.tag,payload:re.payload,callback:null,next:null});e:{var ja=l,Vu=re;Mt=u;var Al=g;switch(Vu.tag){case 1:if(ja=Vu.payload,typeof ja=="function"){xt=ja.call(Al,xt,Mt);break e}xt=ja;break e;case 3:ja.flags=ja.flags&-65537|128;case 0:if(ja=Vu.payload,Mt=typeof ja=="function"?ja.call(Al,xt,Mt):ja,Mt==null)break e;xt=hl({},xt,Mt);break e;case 2:Vr=!0}}Mt=re.callback,Mt!==null&&(l.flags|=64,en&&(l.flags|=8192),en=w.callbacks,en===null?w.callbacks=[Mt]:en.push(Mt))}else en={lane:Mt,tag:re.tag,payload:re.payload,callback:re.callback,next:null},ht===null?(Xe=ht=en,xe=xt):ht=ht.next=en,j|=Mt;if(re=re.next,re===null){if(re=w.shared.pending,re===null)break;en=re,re=en.next,en.next=null,w.lastBaseUpdate=en,w.shared.pending=null}}while(!0);ht===null&&(xe=xt),w.baseState=xe,w.firstBaseUpdate=Xe,w.lastBaseUpdate=ht,N===null&&(w.shared.lanes=0),gs|=j,l.lanes=j,l.memoizedState=xt}}function pe(l,u){if(typeof l!="function")throw Error(a(191,l));l.call(u)}function Me(l,u){var g=l.callbacks;
vendor: 9,348 bytes, line 3946
3946if(g!==null)for(l.callbacks=null,l=0;l<g.length;l++)pe(g[l],u)}function ct(l,u){if(ls(l,u))return!0;if(typeof l!="object"||l===null||typeof u!="object"||u===null)return!1;var g=Object.keys(l),S=Object.keys(u);if(g.length!==S.length)return!1;for(S=0;S<g.length;S++){var w=g[S];if(!Pu.call(u,w)||!ls(l[w],u[w]))return!1}return!0}function bt(l){return l=l.status,l==="fulfilled"||l==="rejected"}function tt(){}function We(l,u,g){switch(g=l[g],g===void 0?l.push(u):g!==u&&(u.then(tt,tt),u=g),u.status){case"fulfilled":return u.value;case"rejected":throw l=u.reason,l===Kn?Error(a(483)):l;default:if(typeof u.status=="string")u.then(tt,tt);else{if(l=vn,l!==null&&100<l.shellSuspendCounter)throw Error(a(482));l=u,l.status="pending",l.then(function(S){if(u.status==="pending"){var w=u;w.status="fulfilled",w.value=S}},function(S){if(u.status==="pending"){var w=u;w.status="rejected",w.reason=S}})}switch(u.status){case"fulfilled":return u.value;case"rejected":throw l=u.reason,l===Kn?Error(a(483)):l}throw _l=u,Kn}}function Tt(){if(_l===null)throw Error(a(459));var l=_l;return _l=null,l}function Xt(l){var u=Ns;return Ns+=1,mr===null&&(mr=[]),We(mr,l,u)}function Mn(l,u){u=u.props.ref,l.ref=u!==void 0?u:null}function hn(l,u){throw u.$$typeof===up?Error(a(525)):(l=Object.prototype.toString.call(u),Error(a(31,l==="[object Object]"?"object with keys {"+Object.keys(u).join(", ")+"}":l)))}function Xi(l){var u=l._init;return u(l._payload)}function ba(l){function u(Ae,ye){if(l){var Ne=Ae.deletions;Ne===null?(Ae.deletions=[ye],Ae.flags|=16):Ne.push(ye)}}function g(Ae,ye){if(!l)return null;for(;ye!==null;)u(Ae,ye),ye=ye.sibling;return null}function S(Ae){for(var ye=new Map;Ae!==null;)Ae.key!==null?ye.set(Ae.key,Ae):ye.set(Ae.index,Ae),Ae=Ae.sibling;return ye}function w(Ae,ye){return Ae=pa(Ae,ye),Ae.index=0,Ae.sibling=null,Ae}function N(Ae,ye,Ne){return Ae.index=Ne,l?(Ne=Ae.alternate,Ne!==null?(Ne=Ne.index,Ne<ye?(Ae.flags|=33554434,ye):Ne):(Ae.flags|=33554434,ye)):(Ae.flags|=1048576,ye)}function j(Ae){return l&&Ae.alternate===null&&(Ae.flags|=33554434),Ae}function re(Ae,ye,Ne,rt){return ye===null||ye.tag!==6?(ye=To(Ne,Ae.mode,rt),ye.return=Ae,ye):(ye=w(ye,Ne),ye.return=Ae,ye)}function xe(Ae,ye,Ne,rt){var Bt=Ne.type;return Bt===sc?ht(Ae,ye,Ne.props.children,rt,Ne.key):ye!==null&&(ye.elementType===Bt||typeof Bt=="object"&&Bt!==null&&Bt.$$typeof===Gs&&Xi(Bt)===ye.type)?(ye=w(ye,Ne.props),Mn(ye,Ne),ye.return=Ae,ye):(ye=As(Ne.type,Ne.key,Ne.props,null,Ae.mode,rt),Mn(ye,Ne),ye.return=Ae,ye)}function Xe(Ae,ye,Ne,rt){return ye===null||ye.tag!==4||ye.stateNode.containerInfo!==Ne.containerInfo||ye.stateNode.implementation!==Ne.implementation?(ye=ac(Ne,Ae.mode,rt),ye.return=Ae,ye):(ye=w(ye,Ne.children||[]),ye.return=Ae,ye)}function ht(Ae,ye,Ne,rt,Bt){return ye===null||ye.tag!==7?(ye=zr(Ne,Ae.mode,rt,Bt),ye.return=Ae,ye):(ye=w(ye,Ne),ye.return=Ae,ye)}function xt(Ae,ye,Ne){if(typeof ye=="string"&&ye!==""||typeof ye=="number"||typeof ye=="bigint")return ye=To(""+ye,Ae.mode,Ne),ye.return=Ae,ye;if(typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case Ir:return Ne=As(ye.type,ye.key,ye.props,null,Ae.mode,Ne),Mn(Ne,ye),Ne.return=Ae,Ne;case Vs:return ye=ac(ye,Ae.mode,Ne),ye.return=Ae,ye;case Gs:var rt=ye._init;return ye=rt(ye._payload),xt(Ae,ye,Ne)}if(Co(ye)||o(ye))return ye=zr(ye,Ae.mode,Ne,null),ye.return=Ae,ye;if(typeof ye.then=="function")return xt(Ae,Xt(ye),Ne);if(ye.$$typeof===cr)return xt(Ae,lu(Ae,ye),Ne);hn(Ae,ye)}return null}function Mt(Ae,ye,Ne,rt){var Bt=ye!==null?ye.key:null;if(typeof Ne=="string"&&Ne!==""||typeof Ne=="number"||typeof Ne=="bigint")return Bt!==null?null:re(Ae,ye,""+Ne,rt);if(typeof Ne=="object"&&Ne!==null){switch(Ne.$$typeof){case Ir:return Ne.key===Bt?xe(Ae,ye,Ne,rt):null;case Vs:return Ne.key===Bt?Xe(Ae,ye,Ne,rt):null;case Gs:return Bt=Ne._init,Ne=Bt(Ne._payload),Mt(Ae,ye,Ne,rt)}if(Co(Ne)||o(Ne))return Bt!==null?null:ht(Ae,ye,Ne,rt,null);if(typeof Ne.then=="function")return Mt(Ae,ye,Xt(Ne),rt);if(Ne.$$typeof===cr)return Mt(Ae,ye,lu(Ae,Ne),rt);hn(Ae,Ne)}return null}function en(Ae,ye,Ne,rt,Bt){if(typeof rt=="string"&&rt!==""||typeof rt=="number"||typeof rt=="bigint")return Ae=Ae.get(Ne)||null,re(ye,Ae,""+rt,Bt);if(typeof rt=="object"&&rt!==null){switch(rt.$$typeof){case Ir:return Ae=Ae.get(rt.key===null?Ne:rt.key)||null,xe(ye,Ae,rt,Bt);case Vs:return Ae=Ae.get(rt.key===null?Ne:rt.key)||null,Xe(ye,Ae,rt,Bt);case Gs:var ai=rt._init;return rt=ai(rt._payload),en(Ae,ye,Ne,rt,Bt)}if(Co(rt)||o(rt))return Ae=Ae.get(Ne)||null,ht(ye,Ae,rt,Bt,null);if(typeof rt.then=="function")return en(Ae,ye,Ne,Xt(rt),Bt);if(rt.$$typeof===cr)return en(Ae,ye,Ne,lu(ye,rt),Bt);hn(ye,rt)}return null}function ja(Ae,ye,Ne,rt){for(var Bt=null,ai=null,Qt=ye,zn=ye=0,Fi=null;Qt!==null&&zn<Ne.length;zn++){Qt.index>zn?(Fi=Qt,Qt=null):Fi=Qt.sibling;var In=Mt(Ae,Qt,Ne[zn],rt);if(In===null){Qt===null&&(Qt=Fi);break}l&&Qt&&In.alternate===null&&u(Ae,Qt),ye=N(In,ye,zn),ai===null?Bt=In:ai.sibling=In,ai=In,Qt=Fi}if(zn===Ne.length)return g(Ae,Qt),Ln&&Se(Ae,zn),Bt;if(Qt===null){for(;zn<Ne.length;zn++)Qt=xt(Ae,Ne[zn],rt),Qt!==null&&(ye=N(Qt,ye,zn),ai===null?Bt=Qt:ai.sibling=Qt,ai=Qt);return Ln&&Se(Ae,zn),Bt}for(Qt=S(Qt);zn<Ne.length;zn++)Fi=en(Qt,Ae,zn,Ne[zn],rt),Fi!==null&&(l&&Fi.alternate!==null&&Qt.delete(Fi.key===null?zn:Fi.key),ye=N(Fi,ye,zn),ai===null?Bt=Fi:ai.sibling=Fi,ai=Fi);return l&&Qt.forEach(function(Wr){return u(Ae,Wr)}),Ln&&Se(Ae,zn),Bt}function Vu(Ae,ye,Ne,rt){if(Ne==null)throw Error(a(151));for(var Bt=null,ai=null,Qt=ye,zn=ye=0,Fi=null,In=Ne.next();Qt!==null&&!In.done;zn++,In=Ne.next()){Qt.index>zn?(Fi=Qt,Qt=null):Fi=Qt.sibling;var Wr=Mt(Ae,Qt,In.value,rt);if(Wr===null){Qt===null&&(Qt=Fi);break}l&&Qt&&Wr.alternate===null&&u(Ae,Qt),ye=N(Wr,ye,zn),ai===null?Bt=Wr:ai.sibling=Wr,ai=Wr,Qt=Fi}if(In.done)return g(Ae,Qt),Ln&&Se(Ae,zn),Bt;if(Qt===null){for(;!In.done;zn++,In=Ne.next())In=xt(Ae,In.value,rt),In!==null&&(ye=N(In,ye,zn),ai===null?Bt=In:ai.sibling=In,ai=In);return Ln&&Se(Ae,zn),Bt}for(Qt=S(Qt);!In.done;zn++,In=Ne.next())In=en(Qt,Ae,zn,In.value,rt),In!==null&&(l&&In.alternate!==null&&Qt.delete(In.key===null?zn:In.key),ye=N(In,ye,zn),ai===null?Bt=In:ai.sibling=In,ai=In);return l&&Qt.forEach(function(Rh){return u(Ae,Rh)}),Ln&&Se(Ae,zn),Bt}function Al(Ae,ye,Ne,rt){if(typeof Ne=="object"&&Ne!==null&&Ne.type===sc&&Ne.key===null&&(Ne=Ne.props.children),typeof Ne=="object"&&Ne!==null){switch(Ne.$$typeof){case Ir:e:{for(var Bt=Ne.key;ye!==null;){if(ye.key===Bt){if(Bt=Ne.type,Bt===sc){if(ye.tag===7){g(Ae,ye.sibling),rt=w(ye,Ne.props.children),rt.return=Ae,Ae=rt;break e}}else if(ye.elementType===Bt||typeof Bt=="object"&&Bt!==null&&Bt.$$typeof===Gs&&Xi(Bt)===ye.type){g(Ae,ye.sibling),rt=w(ye,Ne.props),Mn(rt,Ne),rt.return=Ae,Ae=rt;break e}g(Ae,ye);break}else u(Ae,ye);ye=ye.sibling}Ne.type===sc?(rt=zr(Ne.props.children,Ae.mode,rt,Ne.key),rt.return=Ae,Ae=rt):(rt=As(Ne.type,Ne.key,Ne.props,null,Ae.mode,rt),Mn(rt,Ne),rt.return=Ae,Ae=rt)}return j(Ae);case Vs:e:{for(Bt=Ne.key;ye!==null;){if(ye.key===Bt)if(ye.tag===4&&ye.stateNode.containerInfo===Ne.containerInfo&&ye.stateNode.implementation===Ne.implementation){g(Ae,ye.sibling),rt=w(ye,Ne.children||[]),rt.return=Ae,Ae=rt;break e}else{g(Ae,ye);break}else u(Ae,ye);ye=ye.sibling}rt=ac(Ne,Ae.mode,rt),rt.return=Ae,Ae=rt}return j(Ae);case Gs:return Bt=Ne._init,Ne=Bt(Ne._payload),Al(Ae,ye,Ne,rt)}if(Co(Ne))return ja(Ae,ye,Ne,rt);if(o(Ne)){if(Bt=o(Ne),typeof Bt!="function")throw Error(a(150));return Ne=Bt.call(Ne),Vu(Ae,ye,Ne,rt)}if(typeof Ne.then=="function")return Al(Ae,ye,Xt(Ne),rt);if(Ne.$$typeof===cr)return Al(Ae,ye,lu(Ae,Ne),rt);hn(Ae,Ne)}return typeof Ne=="string"&&Ne!==""||typeof Ne=="number"||typeof Ne=="bigint"?(Ne=""+Ne,ye!==null&&ye.tag===6?(g(Ae,ye.sibling),rt=w(ye,Ne),rt.return=Ae,Ae=rt):(g(Ae,ye),rt=To(Ne,Ae.mode,rt),rt.return=Ae,Ae=rt),j(Ae)):g(Ae,ye)}return function(Ae,ye,Ne,rt){try{Ns=0;var Bt=Al(Ae,ye,Ne,rt);return mr=null,Bt}catch(Qt){if(Qt===Kn)throw Qt;var ai=t(29,Qt,null,Ae.mode);return ai.lanes=rt,ai.return=Ae,ai}finally{}}}function oo(l,u){l=qs,C(ds,l),C(gr,u),qs=l|u.baseLanes}function Oa(){C(ds,qs),C(gr,gr.current)}function es(){qs=ds.current,M(gr),M(ds)}function Ma(l){var u=l.alternate;C(Li,Li.current&1),C(ps,l),Ds===null&&(u===null||gr.current!==null||u.memoizedState!==null)&&(Ds=l)}function ts(l){if(l.tag===22){if(C(Li,Li.current),C(ps,l),Ds===null){var u=l.alternate;u!==null&&u.memoizedState!==null&&(Ds=l)}}else Di()}function Di(){C(Li,Li.current),C(ps,ps.current)}function Yt(l){M(ps),Ds===l&&(Ds=null),M(Li)}function Bi(l){for(var u=l;u!==null;){if(u.tag===13){var g=u.memoizedState;if(g!==null&&(g=g.dehydrated,g===null||uh(g)||Au(g)))return u}else if(u.tag===19&&u.memoizedProps.revealOrder!==void 0){if((u.flags&128)!==0)return u}else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===l)break;for(;u.sibling===null;){if(u.return===null||u.return===l)return null;u=u.return}u.sibling.return=u.return,u=u.sibling}return null}function nn(){throw Error(a(321))}function I(l,u){if(u===null)return!1;for(var g=0;g<u.length&&g<l.length;g++)if(!ls(l[g],u[g]))return!1;return!0}function q(l,u,g,S,w,N){return vr=N,on=u,u.memoizedState=null,u.updateQueue=null,u.lanes=0,kt.H=l===null||l.memoizedState===null?Oi:va,Gr=!1,N=g(S,w),Gr=!1,ui&&(N=we(u,g,S,w)),ue(l),N}function ue(l){kt.H=On;var u=Vn!==null&&Vn.next!==null;if(vr=0,Ti=Vn=on=null,Us=!1,yi=0,vc=null,u)throw Error(a(300));
vendor: 7,528 bytes, line 3946
3946l===null||Ai||(l=l.dependencies,l!==null&&po(l)&&(Ai=!0))}function we(l,u,g,S){on=l;var w=0;do{if(ui&&(vc=null),yi=0,ui=!1,25<=w)throw Error(a(301));if(w+=1,Ti=Vn=null,l.updateQueue!=null){var N=l.updateQueue;N.lastEffect=null,N.events=null,N.stores=null,N.memoCache!=null&&(N.memoCache.index=0)}kt.H=Bo,N=u(g,S)}while(ui);return N}function He(){var l=kt.H,u=l.useState()[0];return u=typeof u.then=="function"?ae(u):u,l=l.useState()[0],(Vn!==null?Vn.memoizedState:null)!==l&&(on.flags|=1024),u}function Ie(){var l=Hu!==0;return Hu=0,l}function at(l,u,g){u.updateQueue=l.updateQueue,u.flags&=-2053,l.lanes&=~g}function B(l){if(Us){for(l=l.memoizedState;l!==null;){var u=l.queue;u!==null&&(u.pending=null),l=l.next}Us=!1}vr=0,Ti=Vn=on=null,ui=!1,yi=Hu=0,vc=null}function $(){var l={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ti===null?on.memoizedState=Ti=l:Ti=Ti.next=l,Ti}function ne(){if(Vn===null){var l=on.alternate;l=l!==null?l.memoizedState:null}else l=Vn.next;var u=Ti===null?on.memoizedState:Ti.next;if(u!==null)Ti=u,Vn=l;else{if(l===null)throw on.alternate===null?Error(a(467)):Error(a(310));Vn=l,l={memoizedState:Vn.memoizedState,baseState:Vn.baseState,baseQueue:Vn.baseQueue,queue:Vn.queue,next:null},Ti===null?on.memoizedState=Ti=l:Ti=Ti.next=l}return Ti}function ae(l){var u=yi;return yi+=1,vc===null&&(vc=[]),l=We(vc,l,u),u=on,(Ti===null?u.memoizedState:Ti.next)===null&&(u=u.alternate,kt.H=u===null||u.memoizedState===null?Oi:va),l}function te(l){if(l!==null&&typeof l=="object"){if(typeof l.then=="function")return ae(l);if(l.$$typeof===cr)return $i(l)}throw Error(a(438,String(l)))}function Be(l){var u=null,g=on.updateQueue;if(g!==null&&(u=g.memoCache),u==null){var S=on.alternate;S!==null&&(S=S.updateQueue,S!==null&&(S=S.memoCache,S!=null&&(u={data:S.data.map(function(w){return w.slice()}),index:0})))}if(u==null&&(u={data:[],index:0}),g===null&&(g=Sh(),on.updateQueue=g),g.memoCache=u,g=u.data[u.index],g===void 0)for(g=u.data[u.index]=Array(l),S=0;S<l;S++)g[S]=Gg;return u.index++,g}function Ue(l,u){return typeof u=="function"?u(l):u}function Ge(l){var u=ne();return qe(u,Vn,l)}function qe(l,u,g){var S=l.queue;if(S===null)throw Error(a(311));S.lastRenderedReducer=g;var w=l.baseQueue,N=S.pending;if(N!==null){if(w!==null){var j=w.next;w.next=N.next,N.next=j}u.baseQueue=w=N,S.pending=null}if(N=l.baseState,w===null)l.memoizedState=N;else{u=w.next;var re=j=null,xe=null,Xe=u,ht=!1;do{var xt=Xe.lane&-536870913;if(xt!==Xe.lane?(dn&xt)===xt:(vr&xt)===xt){var Mt=Xe.revertLane;if(Mt===0)xe!==null&&(xe=xe.next={lane:0,revertLane:0,action:Xe.action,hasEagerState:Xe.hasEagerState,eagerState:Xe.eagerState,next:null}),xt===Va&&(ht=!0);else if((vr&Mt)===Mt){Xe=Xe.next,Mt===Va&&(ht=!0);continue}else xt={lane:0,revertLane:Xe.revertLane,action:Xe.action,hasEagerState:Xe.hasEagerState,eagerState:Xe.eagerState,next:null},xe===null?(re=xe=xt,j=N):xe=xe.next=xt,on.lanes|=Mt,gs|=Mt;xt=Xe.action,Gr&&g(N,xt),N=Xe.hasEagerState?Xe.eagerState:g(N,xt)}else Mt={lane:xt,revertLane:Xe.revertLane,action:Xe.action,hasEagerState:Xe.hasEagerState,eagerState:Xe.eagerState,next:null},xe===null?(re=xe=Mt,j=N):xe=xe.next=Mt,on.lanes|=xt,gs|=xt;Xe=Xe.next}while(Xe!==null&&Xe!==u);if(xe===null?j=N:xe.next=re,!ls(N,l.memoizedState)&&(Ai=!0,ht&&(g=zo,g!==null)))throw g;l.memoizedState=N,l.baseState=j,l.baseQueue=xe,S.lastRenderedState=N}return w===null&&(S.lanes=0),[l.memoizedState,S.dispatch]}function st(l){var u=ne(),g=u.queue;if(g===null)throw Error(a(311));g.lastRenderedReducer=l;var S=g.dispatch,w=g.pending,N=u.memoizedState;if(w!==null){g.pending=null;var j=w=w.next;do N=l(N,j.action),j=j.next;while(j!==w);ls(N,u.memoizedState)||(Ai=!0),u.memoizedState=N,u.baseQueue===null&&(u.baseState=N),g.lastRenderedState=N}return[N,S]}function yt(l,u,g){var S=on,w=ne(),N=Ln;if(N){if(g===void 0)throw Error(a(407));g=g()}else g=u();var j=!ls((Vn||w).memoizedState,g);if(j&&(w.memoizedState=g,Ai=!0),w=w.queue,Jc(Jt.bind(null,S,w,l),[l]),w.getSnapshot!==u||j||Ti!==null&&Ti.memoizedState.tag&1){if(S.flags|=2048,Ea(9,zt.bind(null,S,w,g,u),{destroy:void 0},null),vn===null)throw Error(a(349));N||(vr&60)!==0||pt(S,u,g)}return g}function pt(l,u,g){l.flags|=16384,l={getSnapshot:u,value:g},u=on.updateQueue,u===null?(u=Sh(),on.updateQueue=u,u.stores=[l]):(g=u.stores,g===null?u.stores=[l]:g.push(l))}function zt(l,u,g,S){u.value=g,u.getSnapshot=S,Ft(u)&&an(l)}function Jt(l,u,g){return g(function(){Ft(u)&&an(l)})}function Ft(l){var u=l.getSnapshot;l=l.value;try{var g=u();return!ls(l,g)}catch{return!0}}function an(l){var u=Fe(l,2);u!==null&&da(u,l,2)}function Nt(l){var u=$();if(typeof l=="function"){var g=l;if(l=g(),Gr){Q(!0);try{g()}finally{Q(!1)}}}return u.memoizedState=u.baseState=l,u.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ue,lastRenderedState:l},u}function mt(l,u,g,S){return l.baseState=g,qe(l,Vn,typeof S=="function"?S:Ue)}function xn(l,u,g,S,w){if(nl(l))throw Error(a(485));if(l=u.action,l!==null){var N={payload:w,action:l,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(j){N.listeners.push(j)}};kt.T!==null?g(!0):N.isTransition=!1,S(N),g=u.pending,g===null?(N.next=u.pending=N,rn(u,N)):(N.next=g.next,u.pending=g.next=N)}}function rn(l,u){var g=u.action,S=u.payload,w=l.state;if(u.isTransition){var N=kt.T,j={};kt.T=j;try{var re=g(w,S),xe=kt.S;xe!==null&&xe(j,re),Fn(l,u,re)}catch(Xe){yn(l,u,Xe)}finally{kt.T=N}}else try{N=g(w,S),Fn(l,u,N)}catch(Xe){yn(l,u,Xe)}}function Fn(l,u,g){g!==null&&typeof g=="object"&&typeof g.then=="function"?g.then(function(S){gn(l,u,S)},function(S){return yn(l,u,S)}):gn(l,u,g)}function gn(l,u,g){u.status="fulfilled",u.value=g,Un(u),l.state=g,u=l.pending,u!==null&&(g=u.next,g===u?l.pending=null:(g=g.next,u.next=g,rn(l,g)))}function yn(l,u,g){var S=l.pending;if(l.pending=null,S!==null){S=S.next;do u.status="rejected",u.reason=g,Un(u),u=u.next;while(u!==S)}l.action=null}function Un(l){l=l.listeners;for(var u=0;u<l.length;u++)(0,l[u])()}function wt(l,u){return u}function kn(l,u){if(Ln){var g=vn.formState;if(g!==null){e:{var S=on;if(Ln){if(aa){var w=Zg(aa,Cs);if(w){aa=Up(w),S=Kg(w);break e}}ot(S)}S=!1}S&&(u=g[0])}}g=$(),g.memoizedState=g.baseState=u,S={pending:null,lanes:0,dispatch:null,lastRenderedReducer:wt,lastRenderedState:u},g.queue=S,g=Uf.bind(null,on,S),S.dispatch=g,S=Nt(!1);var N=Lf.bind(null,on,!1,S.queue);return S=$(),w={state:u,dispatch:null,action:l,pending:null},S.queue=w,g=xn.bind(null,on,w,N,g),w.dispatch=g,S.memoizedState=l,[u,g,!1]}function fi(l){var u=ne();return Rn(u,Vn,l)}function Rn(l,u,g){u=qe(l,u,wt)[0],l=Ge(Ue)[0],u=typeof u=="object"&&u!==null&&typeof u.then=="function"?ae(u):u;var S=ne(),w=S.queue,N=w.dispatch;return g!==S.memoizedState&&(on.flags|=2048,Ea(9,Xn.bind(null,w,g),{destroy:void 0},null)),[u,N,l]}function Xn(l,u){l.action=u}function Jo(l){var u=ne(),g=Vn;if(g!==null)return Rn(u,g,l);ne(),u=u.memoizedState,g=ne();var S=g.queue.dispatch;return g.memoizedState=l,[u,S,!1]}function Ea(l,u,g,S){return l={tag:l,create:u,inst:g,deps:S,next:null},u=on.updateQueue,u===null&&(u=Sh(),on.updateQueue=u),g=u.lastEffect,g===null?u.lastEffect=l.next=l:(S=g.next,g.next=l,l.next=S,u.lastEffect=l),l}function $o(){return ne().memoizedState}function Rf(l,u,g,S){var w=$();on.flags|=l,w.memoizedState=Ea(1|u,g,{destroy:void 0},S===void 0?null:S)}function Qc(l,u,g,S){var w=ne();S=S===void 0?null:S;var N=w.memoizedState.inst;Vn!==null&&S!==null&&I(S,Vn.memoizedState.deps)?w.memoizedState=Ea(u,g,N,S):(on.flags|=l,w.memoizedState=Ea(1|u,g,
vendor: 20,648 bytes, line 3946
3946N,S))}function zd(l,u){Rf(8390656,8,l,u)}function Jc(l,u){Qc(2048,8,l,u)}function vg(l,u){return Qc(4,2,l,u)}function yg(l,u){return Qc(4,4,l,u)}function $c(l,u){if(typeof u=="function"){l=l();var g=u(l);return function(){typeof g=="function"?g():u(null)}}if(u!=null)return l=l(),u.current=l,function(){u.current=null}}function nr(l,u,g){g=g!=null?g.concat([l]):null,Qc(4,4,$c.bind(null,u,l),g)}function eu(){}function Cf(l,u){var g=ne();u=u===void 0?null:u;var S=g.memoizedState;return u!==null&&I(u,S[1])?S[0]:(g.memoizedState=[l,u],l)}function el(l,u){var g=ne();u=u===void 0?null:u;var S=g.memoizedState;if(u!==null&&I(u,S[1]))return S[0];if(S=l(),Gr){Q(!0);try{l()}finally{Q(!1)}}return g.memoizedState=[S,u],S}function lo(l,u,g){return g===void 0||(vr&1073741824)!==0?l.memoizedState=u:(l.memoizedState=g,l=sr(),on.lanes|=l,gs|=l,g)}function Id(l,u,g,S){return ls(g,u)?g:gr.current!==null?(l=lo(l,g,S),ls(l,u)||(Ai=!0),l):(vr&42)===0?(Ai=!0,l.memoizedState=g):(l=sr(),on.lanes|=l,gs|=l,u)}function Nf(l,u,g,S,w){var N=Pi();ma(N!==0&&8>N?N:8);var j=kt.T,re={};kt.T=re,Lf(l,!1,u,g);try{var xe=w(),Xe=kt.S;if(Xe!==null&&Xe(re,xe),xe!==null&&typeof xe=="object"&&typeof xe.then=="function"){var ht=ft(xe,S);uo(l,u,ht,wa(l))}else uo(l,u,S,wa(l))}catch(xt){uo(l,u,{then:function(){},status:"rejected",reason:xt},wa())}finally{ma(N),kt.T=j}}function Bd(l){var u=l.memoizedState;if(u!==null)return u;u={memoizedState:Pa,baseState:Pa,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ue,lastRenderedState:Pa},next:null};var g={};return u.next={memoizedState:g,baseState:g,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ue,lastRenderedState:g},next:null},l.memoizedState=u,l=l.alternate,l!==null&&(l.memoizedState=u),u}function tl(){return $i(Kt)}function ir(){return ne().memoizedState}function Df(){return ne().memoizedState}function tu(l){for(var u=l.return;u!==null;){switch(u.tag){case 24:case 3:var g=wa();l=Qe(g);var S=et(u,l,g);S!==null&&(da(S,u,g),Dt(S,u,g)),u={cache:Pf()},l.payload=u;return}u=u.return}}function co(l,u,g){var S=wa();g={lane:S,revertLane:0,action:g,hasEagerState:!1,eagerState:null,next:null},nl(l)?nu(u,g):(g=ke(l,u,g,S),g!==null&&(da(g,l,S),Pd(g,u,S)))}function Uf(l,u,g){var S=wa();uo(l,u,g,S)}function uo(l,u,g,S){var w={lane:S,revertLane:0,action:g,hasEagerState:!1,eagerState:null,next:null};if(nl(l))nu(u,w);else{var N=l.alternate;if(l.lanes===0&&(N===null||N.lanes===0)&&(N=u.lastRenderedReducer,N!==null))try{var j=u.lastRenderedState,re=N(j,g);if(w.hasEagerState=!0,w.eagerState=re,ls(re,j))return je(l,u,w,0),vn===null&&Ze(),!1}catch{}finally{}if(g=ke(l,u,w,S),g!==null)return da(g,l,S),Pd(g,u,S),!0}return!1}function Lf(l,u,g,S){if(S={lane:2,revertLane:$e(),action:S,hasEagerState:!1,eagerState:null,next:null},nl(l)){if(u)throw Error(a(479))}else u=ke(l,g,S,2),u!==null&&da(u,l,2)}function nl(l){var u=l.alternate;return l===on||u!==null&&u===on}function nu(l,u){ui=Us=!0;var g=l.pending;g===null?u.next=u:(u.next=g.next,g.next=u),l.pending=u}function Pd(l,u,g){if((g&4194176)!==0){var S=u.lanes;S&=l.pendingLanes,g|=S,u.lanes=g,he(l,g)}}function fa(l,u,g,S){u=l.memoizedState,g=g(S,u),g=g==null?u:hl({},u,g),l.memoizedState=g,l.lanes===0&&(l.updateQueue.baseState=g)}function fo(l,u,g,S,w,N,j){return l=l.stateNode,typeof l.shouldComponentUpdate=="function"?l.shouldComponentUpdate(S,N,j):u.prototype&&u.prototype.isPureReactComponent?!ct(g,S)||!ct(w,N):!0}function iu(l,u,g,S){l=u.state,typeof u.componentWillReceiveProps=="function"&&u.componentWillReceiveProps(g,S),typeof u.UNSAFE_componentWillReceiveProps=="function"&&u.UNSAFE_componentWillReceiveProps(g,S),u.state!==l&&bh.enqueueReplaceState(u,u.state,null)}function Ps(l,u){var g=u;if("ref"in u){g={};for(var S in u)S!=="ref"&&(g[S]=u[S])}if(l=l.defaultProps){g===u&&(g=hl({},g));for(var w in l)g[w]===void 0&&(g[w]=l[w])}return g}function Of(l,u){try{var g=l.onUncaughtError;g(u.value,{componentStack:u.stack})}catch(S){setTimeout(function(){throw S})}}function zf(l,u,g){try{var S=l.onCaughtError;S(g.value,{componentStack:g.stack,errorBoundary:u.tag===1?u.stateNode:null})}catch(w){setTimeout(function(){throw w})}}function au(l,u,g){return g=Qe(g),g.tag=3,g.payload={element:null},g.callback=function(){Of(l,u)},g}function Xl(l){return l=Qe(l),l.tag=3,l}function su(l,u,g,S){var w=g.type.getDerivedStateFromError;if(typeof w=="function"){var N=S.value;l.payload=function(){return w(N)},l.callback=function(){zf(u,g,S)}}var j=g.stateNode;j!==null&&typeof j.componentDidCatch=="function"&&(l.callback=function(){zf(u,g,S),typeof w!="function"&&(ys===null?ys=new Set([this]):ys.add(this));var re=S.stack;this.componentDidCatch(S.value,{componentStack:re!==null?re:""})})}function _g(l,u,g,S,w){if(g.flags|=32768,S!==null&&typeof S=="object"&&typeof S.then=="function"){if(u=g.alternate,u!==null&&il(u,g,w,!0),g=ps.current,g!==null){switch(g.tag){case 13:return Ds===null?Ba():g.alternate===null&&Nn===0&&(Nn=3),g.flags&=-257,g.flags|=65536,g.lanes=w,S===xh?g.flags|=16384:(u=g.updateQueue,u===null?g.updateQueue=new Set([S]):u.add(S),Jf(l,S,w)),!1;case 22:return g.flags|=65536,S===xh?g.flags|=16384:(u=g.updateQueue,u===null?(u={transitions:null,markerInstances:null,retryQueue:new Set([S])},g.updateQueue=u):(g=u.retryQueue,g===null?u.retryQueue=new Set([S]):g.add(S)),Jf(l,S,w)),!1}throw Error(a(435,g.tag))}return Jf(l,S,w),Ba(),!1}if(Ln)return u=ps.current,u!==null?((u.flags&65536)===0&&(u.flags|=256),u.flags|=65536,u.lanes=w,S!==Ou&&(l=Error(a(422),{cause:S}),ie(ge(l,g)))):(S!==Ou&&(u=Error(a(423),{cause:S}),ie(ge(u,g))),l=l.current.alternate,l.flags|=65536,w&=-w,l.lanes|=w,S=ge(S,g),w=au(l.stateNode,S,w),vt(l,w),Nn!==4&&(Nn=2)),!1;var N=Error(a(520),{cause:S});if(N=ge(N,g),_c===null?_c=[N]:_c.push(N),Nn!==4&&(Nn=2),u===null)return!0;S=ge(S,g),g=u;do{switch(g.tag){case 3:return g.flags|=65536,l=w&-w,g.lanes|=l,l=au(g.stateNode,S,l),vt(g,l),!1;case 1:if(u=g.type,N=g.stateNode,(g.flags&128)===0&&(typeof u.getDerivedStateFromError=="function"||N!==null&&typeof N.componentDidCatch=="function"&&(ys===null||!ys.has(N))))return g.flags|=65536,w&=-w,g.lanes|=w,w=Xl(w),su(w,l,g,S),vt(g,w),!1}g=g.return}while(g!==null);return!1}function Ji(l,u,g,S){u.child=l===null?Yp(u,null,g,S):Io(u,l.child,g,S)}function xg(l,u,g,S,w){g=g.render;var N=u.ref;if("ref"in S){var j={};for(var re in S)re!=="ref"&&(j[re]=S[re])}else j=S;return al(u),S=q(l,u,g,j,N,w),re=Ie(),l!==null&&!Ai?(at(l,u,w),wr(l,u,w)):(Ln&&re&&fe(u),u.flags|=1,Ji(l,u,S,w),u.child)}function Sg(l,u,g,S,w){if(l===null){var N=g.type;return typeof N=="function"&&!Lr(N)&&N.defaultProps===void 0&&g.compare===null?(u.tag=15,u.type=N,If(l,u,N,S,w)):(l=As(g.type,null,S,u,u.mode,w),l.ref=u.ref,l.return=u,u.child=l)}if(N=l.child,!jd(l,w)){var j=N.memoizedProps;if(g=g.compare,g=g!==null?g:ct,g(j,S)&&l.ref===u.ref)return wr(l,u,w)}return u.flags|=1,l=pa(N,S),l.ref=u.ref,l.return=u,u.child=l}function If(l,u,g,S,w){if(l!==null){var N=l.memoizedProps;if(ct(N,S)&&l.ref===u.ref)if(Ai=!1,u.pendingProps=S=N,jd(l,w))(l.flags&131072)!==0&&(Ai=!0);else return u.lanes=l.lanes,wr(l,u,w)}return Hd(l,u,g,S,w)}function bg(l,u,g){var S=u.pendingProps,w=S.children,N=(u.stateNode._pendingVisibility&2)!==0,j=l!==null?l.memoizedState:null;if(ru(l,u),S.mode==="hidden"||N){if((u.flags&128)!==0){if(S=j!==null?j.baseLanes|g:g,l!==null){for(w=u.child=l.child,N=0;w!==null;)N=N|w.lanes|w.childLanes,w=w.sibling;u.childLanes=N&~S}else u.childLanes=0,u.child=null;return Mg(l,u,S,g)}if((g&536870912)!==0)u.memoizedState={baseLanes:0,cachePool:null},l!==null&&Hf(u,j!==null?j.cachePool:null),j!==null?oo(u,j):Oa(),ts(u);else return u.lanes=u.childLanes=536870912,Mg(l,u,j!==null?j.baseLanes|g:g,g)}else j!==null?(Hf(u,j.cachePool),oo(u,j),Di(),u.memoizedState=null):(l!==null&&Hf(u,null),Oa(),Di());return Ji(l,u,w,g),u.child}function Mg(l,u,g,S){var w=mo();return w=w===null?null:{parent:fr?jn._currentValue:jn._currentValue2,pool:w},u.memoizedState={baseLanes:g,cachePool:w},l!==null&&Hf(u,null),Oa(),ts(u),l!==null&&il(l,u,S,!0),null}function ru(l,u){var g=u.ref;if(g===null)l!==null&&l.ref!==null&&(u.flags|=2097664);else{if(typeof g!="function"&&typeof g!="object")throw Error(a(284));(l===null||l.ref!==g)&&(u.flags|=2097664)}}function Hd(l,u,g,S,w){return al(u),g=q(l,u,g,S,void 0,w),S=Ie(),l!==null&&!Ai?(at(l,u,w),wr(l,u,w)):(Ln&&S&&fe(u),u.flags|=1,Ji(l,u,g,w),u.child)}function Eg(l,u,g,S,w,N){return al(u),u.updateQueue=null,g=we(u,S,g,w),ue(l),S=Ie(),l!==null&&!Ai?(at(l,u,N),wr(l,u,N)):(Ln&&S&&fe(u),u.flags|=1,Ji(l,u,g,N),u.child)}function Fd(l,u,g,S,w){if(al(u),u.stateNode===null){var N=vl,j=g.contextType;typeof j=="object"&&j!==null&&(N=$i(j)),N=new g(S,N),u.memoizedState=N.state!==null&&N.state!==void 0?N.state:null,N.updater=bh,u.stateNode=N,N._reactInternals=u,N=u.stateNode,N.props=S,N.state=u.memoizedState,N.refs={},Rt(u),j=g.contextType,N.context=typeof j=="object"&&j!==null?$i(j):vl,N.state=u.memoizedState,j=g.getDerivedStateFromProps,typeof j=="function"&&(fa(u,g,j,S),N.state=u.memoizedState),typeof g.getDerivedStateFromProps=="function"||typeof N.getSnapshotBeforeUpdate=="function"||typeof N.UNSAFE_componentWillMount!="function"&&typeof N.componentWillMount!="function"||(j=N.state,typeof N.componentWillMount=="function"&&N.componentWillMount(),typeof N.UNSAFE_componentWillMount=="function"&&N.UNSAFE_componentWillMount(),j!==N.state&&bh.enqueueReplaceState(N,N.state,null),Ut(u,S,N,w),ut(),N.state=u.memoizedState),typeof N.componentDidMount=="function"&&(u.flags|=4194308),S=!0}else if(l===null){N=u.stateNode;var re=u.memoizedProps,xe=Ps(g,re);N.props=xe;var Xe=N.context,ht=g.contextType;j=vl,typeof ht=="object"&&ht!==null&&(j=$i(ht));var xt=g.getDerivedStateFromProps;ht=typeof xt=="function"||typeof N.getSnapshotBeforeUpdate=="function",re=u.pendingProps!==re,ht||typeof N.UNSAFE_componentWillReceiveProps!="function"&&typeof N.componentWillReceiveProps!="function"||(re||Xe!==j)&&iu(u,N,S,j),Vr=!1;var Mt=u.memoizedState;N.state=Mt,Ut(u,S,N,w),ut(),Xe=u.memoizedState,re||Mt!==Xe||Vr?(typeof xt=="function"&&(fa(u,g,xt,S),Xe=u.memoizedState),(xe=Vr||fo(u,g,xe,S,Mt,Xe,j))?(ht||typeof N.UNSAFE_componentWillMount!="function"&&typeof N.componentWillMount!="function"||(typeof N.componentWillMount=="function"&&N.componentWillMount(),typeof N.UNSAFE_componentWillMount=="function"&&N.UNSAFE_componentWillMount()),typeof N.componentDidMount=="function"&&(u.flags|=4194308)):(typeof N.componentDidMount=="function"&&(u.flags|=4194308),u.memoizedProps=S,u.memoizedState=Xe),N.props=S,N.state=Xe,N.context=j,S=xe):(typeof N.componentDidMount=="function"&&(u.flags|=4194308),S=!1)}else{N=u.stateNode,Ct(l,u),j=u.memoizedProps,ht=Ps(g,j),N.props=ht,xt=u.pendingProps,Mt=N.context,Xe=g.contextType,xe=vl,typeof Xe=="object"&&Xe!==null&&(xe=$i(Xe)),re=g.getDerivedStateFromProps,(Xe=typeof re=="function"||typeof N.getSnapshotBeforeUpdate=="function")||typeof N.UNSAFE_componentWillReceiveProps!="function"&&typeof N.componentWillReceiveProps!="function"||(j!==xt||Mt!==xe)&&iu(u,N,S,xe),Vr=!1,Mt=u.memoizedState,N.state=Mt,Ut(u,S,N,w),ut();var en=u.memoizedState;j!==xt||Mt!==en||Vr||l!==null&&l.dependencies!==null&&po(l.dependencies)?(typeof re=="function"&&(fa(u,g,re,S),en=u.memoizedState),(ht=Vr||fo(u,g,ht,S,Mt,en,xe)||l!==null&&l.dependencies!==null&&po(l.dependencies))?(Xe||typeof N.UNSAFE_componentWillUpdate!="function"&&typeof N.componentWillUpdate!="function"||(typeof N.componentWillUpdate=="function"&&N.componentWillUpdate(S,en,xe),typeof N.UNSAFE_componentWillUpdate=="function"&&N.UNSAFE_componentWillUpdate(S,en,xe)),typeof N.componentDidUpdate=="function"&&(u.flags|=4),typeof N.getSnapshotBeforeUpdate=="function"&&(u.flags|=1024)):(typeof N.componentDidUpdate!="function"||j===l.memoizedProps&&Mt===l.memoizedState||(u.flags|=4),typeof N.getSnapshotBeforeUpdate!="function"||j===l.memoizedProps&&Mt===l.memoizedState||(u.flags|=1024),u.memoizedProps=S,u.memoizedState=en),N.props=S,N.state=en,N.context=xe,S=ht):(typeof N.componentDidUpdate!="function"||j===l.memoizedProps&&Mt===l.memoizedState||(u.flags|=4),typeof N.getSnapshotBeforeUpdate!="function"||j===l.memoizedProps&&Mt===l.memoizedState||(u.flags|=1024),S=!1)}return N=S,ru(l,u),S=(u.flags&128)!==0,N||S?(N=u.stateNode,g=S&&typeof g.getDerivedStateFromError!="function"?null:N.render(),u.flags|=1,l!==null&&S?(u.child=Io(u,l.child,null,w),u.child=Io(u,null,g,w)):Ji(l,u,g,w),u.memoizedState=N.state,l=u.child):l=wr(l,u,w),l}function Tg(l,u,g,S){return _n(),u.flags|=256,Ji(l,u,g,S),u.child}function Vd(l){return{baseLanes:l,cachePool:Ng()}}function Gd(l,u,g){return l=l!==null?l.childLanes&~g:0,u&&(l|=Xa),l}function Ag(l,u,g){var S=u.pendingProps,w=!1,N=(u.flags&128)!==0,j;if((j=N)||(j=l!==null&&l.memoizedState===null?!1:(Li.current&2)!==0),j&&(w=!0,u.flags&=-129),j=(u.flags&32)!==0,u.flags&=-33,l===null){if(Ln){if(w?Ma(u):Di(),Ln){var re=aa,xe;(xe=re)&&(re=tv(re,Cs),re!==null?(u.memoizedState={dehydrated:re,treeContext:ks!==null?{id:pr,overflow:Rs}:null,retryLane:536870912},xe=t(18,null,null,0),xe.stateNode=re,xe.return=u,u.child=xe,ga=u,aa=null,xe=!0):xe=!1),xe||ot(u)}if(re=u.memoizedState,re!==null&&(re=re.dehydrated,re!==null))return Au(re)?u.lanes=16:u.lanes=536870912,null;Yt(u)}return re=S.children,S=S.fallback,w?(Di(),w=u.mode,re=kd({mode:"hidden",children:re},w),S=zr(S,w,g,null),re.return=u,S.return=u,re.sibling=S,u.child=re,w=u.child,w.memoizedState=Vd(g),w.childLanes=Gd(l,j,g),u.memoizedState=ya,S):(Ma(u),ou(u,re))}if(xe=l.memoizedState,xe!==null&&(re=xe.dehydrated,re!==null)){if(N)u.flags&256?(Ma(u),u.flags&=-257,u=Xd(l,u,g)):u.memoizedState!==null?(Di(),u.child=l.child,u.flags|=128,u=null):(Di(),w=S.fallback,re=u.mode,S=kd({mode:"visible",children:S.children},re),w=zr(w,re,g,null),w.flags|=2,S.return=u,w.return=u,S.sibling=w,u.child=S,Io(u,l.child,null,g),S=u.child,S.memoizedState=Vd(g),S.childLanes=Gd(l,j,g),u.memoizedState=ya,u=w);else if(Ma(u),Au(re))j=Wg(re).digest,S=Error(a(419)),S.stack="",S.digest=j,ie({value:S,source:null,stack:null}),u=Xd(l,u,g);else if(Ai||il(l,u,g,!1),j=(g&l.childLanes)!==0,Ai||j){if(j=vn,j!==null){if(S=g&-g,(S&42)!==0)S=1;else switch(S){case 2:S=1;break;case 8:S=4;break;case 32:S=16;break;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:S=64;break;case 268435456:S=134217728;break;default:S=0}if(S=(S&(j.suspendedLanes|g))!==0?0:S,S!==0&&S!==xe.retryLane)throw xe.retryLane=S,Fe(l,S),da(j,l,S),gv}uh(re)||Ba(),u=Xd(l,u,g)}else uh(re)?(u.flags|=128,u.child=l.child,u=ul.bind(null,l),E_(re,u),u=null):(l=xe.treeContext,Ra&&(aa=Jg(re),ga=u,Ln=!0,fs=null,Cs=!1,l!==null&&(cs[us++]=pr,cs[us++]=Rs,cs[us++]=ks,pr=l.id,Rs=l.overflow,ks=u)),u=ou(u,S.children),u.flags|=4096);return u}return w?(Di(),w=S.fallback,re=u.mode,xe=l.child,N=xe.sibling,S=pa(xe,{mode:"hidden",children:S.children}),S.subtreeFlags=xe.subtreeFlags&31457280,N!==null?w=pa(N,w):(w=zr(w,re,g,null),w.flags|=2),w.return=u,S.return=u,S.sibling=w,u.child=S,S=w,w=u.child,re=l.child.memoizedState,re===null?re=Vd(g):(xe=re.cachePool,xe!==null?(N=fr?jn._currentValue:jn._currentValue2,xe=xe.parent!==N?{parent:N,pool:N}:xe):xe=Ng(),re={baseLanes:re.baseLanes|g,cachePool:xe}),w.memoizedState=re,w.childLanes=Gd(l,j,g),u.memoizedState=ya,S):(Ma(u),g=l.child,l=g.sibling,g=pa(g,{mode:"visible",children:S.children}),g.return=u,g.sibling=null,l!==null&&(j=u.deletions,j===null?(u.deletions=[l],u.flags|=16):j.push(l)),u.child=g,u.memoizedState=null,g)}function ou(l,u){return u=kd({mode:"visible",children:u},l.mode),u.return=l,l.child=u}function kd(l,u){return $f(l,u,0,null)}function Xd(l,u,g){return Io(u,l.child,null,g),l=ou(u,u.pendingProps.children),l.flags|=2,u.memoizedState=null,l}function wg(l,u,g){l.lanes|=u;var S=l.alternate;S!==null&&(S.lanes|=u),qd(l.return,u,g)}function Bf(l,u,g,S,w){var N=l.memoizedState;N===null?l.memoizedState={isBackwards:u,rendering:null,renderingStartTime:0,last:S,tail:g,tailMode:w}:(N.isBackwards=u,N.rendering=null,N.renderingStartTime=0,N.last=S,N.tail=g,N.tailMode=w)}function Rg(l,u,g){var S=u.pendingProps,w=S.revealOrder,N=S.tail;if(Ji(l,u,S.children,g),S=Li.current,(S&2)!==0)S=S&1|2,u.flags|=128;else{if(l!==null&&(l.flags&128)!==0)e:for(l=u.child;l!==null;){if(l.tag===13)l.memoizedState!==null&&wg(l,g,u);else if(l.tag===19)wg(l,g,u);else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===u)break e;for(;l.sibling===null;){if(l.return===null||l.return===u)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}S&=1}switch(C(Li,S),w){case"forwards":for(g=u.child,w=null;g!==null;)l=g.alternate,l!==null&&Bi(l)===null&&(w=g),g=g.sibling;g=w,g===null?(w=u.child,u.child=null):(w=g.sibling,g.sibling=null),Bf(u,!1,w,g,N);break;case"backwards":for(g=null,w=u.child,u.child=null;w!==null;){if(l=w.alternate,l!==null&&Bi(l)===null){u.child=w;break}l=w.sibling,w.sibling=g,g=w,w=l}Bf(u,!0,g,null,N);break;case"together":Bf(u,!1,null,null,void 0);break;default:u.memoizedState=null}return u.child}function wr(l,u,g){if(l!==null&&(u.dependencies=l.dependencies),gs|=u.lanes,(g&u.childLanes)===0)if(l!==null){if(il(l,u,g,!1),(g&u.childLanes)===0)return null}else return null;if(l!==null&&u.child!==l.child)throw Error(a(153));if(u.child!==null){for(l=u.child,g=pa(l,l.pendingProps),u.child=g,g.return=u;l.sibling!==null;)l=l.sibling,g=g.sibling=pa(l,l.pendingProps),g.return=u;g.sibling=null}return u.child}function jd(l,u){return(l.lanes&u)!==0?!0:(l=l.dependencies,!!(l!==null&&po(l)))}function S_(l,u,g){switch(u.tag){case 3:Le(u,u.stateNode.containerInfo),ho(u,jn,l.memoizedState.cache),_n();break;case 27:case 5:ve(u);break;case 4:Le(u,u.stateNode.containerInfo);break;case 10:ho(u,u.type,u.memoizedProps.value);break;case 13:var S=u.memoizedState;if(S!==null)return S.dehydrated!==null?(Ma(u),u.flags|=128,null):(g&u.child.childLanes)!==0?Ag(l,u,g):(Ma(u),l=wr(l,u,g),l!==null?l.sibling:null);Ma(u);break;case 19:var w=(l.flags&128)!==0;if(S=(g&u.childLanes)!==0,S||(il(l,u,g,!1),S=(g&u.childLanes)!==0),w){if(S)return Rg(l,u,g);u.flags|=128}if(w=u.memoizedState,w!==null&&(w.rendering=null,w.tail=null,w.lastEffect=null),C(Li,Li.current),S)break;return null;case 22:case 23:return u.lanes=0,bg(l,u,g);case 24:ho(u,jn,l.memoizedState.cache)}return wr(l,u,g)}function Cg(l,u,g){if(l!==null)if(l.memoizedProps!==u.pendingProps)Ai=!0;else{if(!jd(l,g)&&(u.flags&128)===0)return Ai=!1,S_(l,u,g);Ai=(l.flags&131072)!==0}else Ai=!1,Ln&&(u.flags&1048576)!==0&&W(u,Uu,u.index);switch(u.lanes=0,u.tag){case 16:e:{l=u.pendingProps;var S=u.elementType,w=S._init;if(S=w(S._payload),u.type=S,typeof S=="function")Lr(S)?(l=Ps(S,l),u.tag=1,u=Fd(null,u,S,l,g)):(u.tag=0,u=Hd(null,u,S,l,g));else{if(S!=null){if(w=S.$$typeof,w===rc){u.tag=11,u=xg(null,u,S,l,g);break e}else if(w===yu){u.tag=14,u=Sg(null,u,S,l,g);break e}}throw u=c(S)||S,Error(a(306,u,""))}}return u;case 0:return Hd(l,u,u.type,u.pendingProps,g);case 1:return S=u.type,w=Ps(S,u.pendingProps),Fd(l,u,S,w,g);case 3:e:{if(Le(u,u.stateNode.containerInfo),l===null)throw Error(a(387));var N=u.pendingProps;w=u.memoizedState,S=w.element,Ct(l,u),Ut(u,N,null,g);var j=u.memoizedState;if(N=j.cache,ho(u,jn,N),N!==w.cache&&Yd(u,[jn],g,!0),ut(),N=j.element,Ra&&w.isDehydrated)if(w={element:N,isDehydrated:!1,cache:j.cache},u.updateQueue.baseState=w,u.memoizedState=w,u.flags&256){u=Tg(l,u,N,g);break e}else if(N!==S){S=ge(Error(a(424)),u),ie(S),u=Tg(l,u,N,g);break e}else for(Ra&&(aa=Qg(u.stateNode.containerInfo),ga=u,Ln=!0,fs=null,Cs=!0),g=Yp(u,null,N,g),u.child=g;g;)g.flags=g.flags&-3|4096,g=g.sibling;else{if(_n(),N===S){u=wr(l,u,g);break e}Ji(l,u,N,g)}u=u.child}return u;case 26:if(os)return ru(l,u),l===null?(g=mh(u.type,null,u.pendingProps,null))?u.memoizedState=g:Ln||(u.stateNode=A_(u.type,u.pendingProps,Xs.current,u)):u.memoizedState=mh(u.type,l.memoizedProps,u.pendingProps,l.memoizedState),null;case 27:if(na)return ve(u),l===null&&na&&Ln&&(S=u.stateNode=kp(u.type,u.pendingProps,Xs.current,Zi.current,!1),ga=u,Cs=!0,aa=fh(S)),S=u.pendingProps.children,l!==null||Ln?Ji(l,u,S,g):u.child=Io(u,null,S,g),ru(l,u),u.child;case 5:return l===null&&Ln&&(rv(u.type,u.pendingProps,Zi.current),(w=S=aa)&&(S=$g(S,u.type,u.pendingProps,Cs),S!==null?(u.stateNode=S,ga=u,aa=fh(S),Cs=!1,w=!0):w=!1),w||ot(u)),ve(u),w=u.type,N=u.pendingProps,j=l!==null?l.memoizedProps:null,S=N.children,Do(w,N)?S=null:j!==null&&Do(w,j)&&(u.flags|=32),u.memoizedState!==null&&(w=q(l,u,He,null,null,g),fr?Kt._currentValue=w:Kt._currentValue2=w),ru(l,u),Ji(l,u,S,g),u.child;case 6:return l===null&&Ln&&(ov(u.pendingProps,Zi.current),(l=g=aa)&&(g=ev(g,u.pen
3946dingProps,Cs),g!==null?(u.stateNode=g,ga=u,aa=null,l=!0):l=!1),l||ot(u)),null;case 13:return Ag(l,u,g);case 4:return Le(u,u.stateNode.containerInfo),S=u.pendingProps,l===null?u.child=Io(u,null,S,g):Ji(l,u,S,g),u.child;case 11:return xg(l,u,u.type,u.pendingProps,g);case 7:return Ji(l,u,u.pendingProps,g),u.child;case 8:return Ji(l,u,u.pendingProps.children,g),u.child;case 12:return Ji(l,u,u.pendingProps.children,g),u.child;case 10:return S=u.pendingProps,ho(u,u.type,S.value),Ji(l,u,S.children,g),u.child;case 9:return w=u.type._context,S=u.pendingProps.children,al(u),w=$i(w),S=S(w),u.flags|=1,Ji(l,u,S,g),u.child;case 14:return Sg(l,u,u.type,u.pendingProps,g);case 15:return If(l,u,u.type,u.pendingProps,g);case 19:return Rg(l,u,g);case 22:return bg(l,u,g);case 24:return al(u),S=$i(jn),l===null?(w=mo(),w===null&&(w=vn,N=Pf(),w.pooledCache=N,N.refCount++,N!==null&&(w.pooledCacheLanes|=g),w=N),u.memoizedState={parent:S,cache:w},Rt(u),ho(u,jn,w)):((l.lanes&g)!==0&&(Ct(l,u),Ut(u,null,null,g),ut()),w=l.memoizedState,N=u.memoizedState,w.parent!==S?(w={parent:S,cache:S},u.memoizedState=w,u.lanes===0&&(u.memoizedState=u.updateQueue.baseState=w),ho(u,jn,S)):(S=N.cache,ho(u,jn,S),S!==w.cache&&Yd(u,[jn],g,!0))),Ji(l,u,u.pendingProps.children,g),u.child;case 29:throw u.pendingProps}throw Error(a(156,u.tag))}function ho(l,u,g){fr?(C(Ga,u._currentValue),u._currentValue=g):(C(Ga,u._currentValue2),u._currentValue2=g)}function Rr(l){var u=Ga.current;fr?l._currentValue=u:l._currentValue2=u,M(Ga)}function qd(l,u,g){for(;l!==null;){var S=l.alternate;if((l.childLanes&u)!==u?(l.childLanes|=u,S!==null&&(S.childLanes|=u)):S!==null&&(S.childLanes&u)!==u&&(S.childLanes|=u),l===g)break;l=l.return}}function Yd(l,u,g,S){var w=l.child;for(w!==null&&(w.return=l);w!==null;){var N=w.dependencies;if(N!==null){var j=w.child;N=N.firstContext;e:for(;N!==null;){var re=N;N=w;for(var xe=0;xe<u.length;xe++)if(re.context===u[xe]){N.lanes|=g,re=N.alternate,re!==null&&(re.lanes|=g),qd(N.return,g,l),S||(j=null);break e}N=re.next}}else if(w.tag===18){if(j=w.return,j===null)throw Error(a(341));j.lanes|=g,N=j.alternate,N!==null&&(N.lanes|=g),qd(j,g,l),j=null}else j=w.child;if(j!==null)j.return=w;else for(j=w;j!==null;){if(j===l){j=null;break}if(w=j.sibling,w!==null){w.return=j.return,j=w;break}j=j.return}w=j}}function il(l,u,g,S){l=null;for(var w=u,N=!1;w!==null;){if(!N){if((w.flags&524288)!==0)N=!0;else if((w.flags&262144)!==0)break}if(w.tag===10){var j=w.alternate;if(j===null)throw Error(a(387));if(j=j.memoizedProps,j!==null){var re=w.type;ls(w.pendingProps.value,j.value)||(l!==null?l.push(re):l=[re])}}else if(w===dc.current){if(j=w.alternate,j===null)throw Error(a(387));j.memoizedState.memoizedState!==w.memoizedState.memoizedState&&(l!==null?l.push(Kt):l=[Kt])}w=w.return}l!==null&&Yd(u,l,g,S),u.flags|=262144}function po(l){for(l=l.firstContext;l!==null;){var u=l.context;if(!ls(fr?u._currentValue:u._currentValue2,l.memoizedValue))return!0;l=l.next}return!1}function al(l){Po=l,_i=null,l=l.dependencies,l!==null&&(l.firstContext=null)}function $i(l){return Wd(Po,l)}function lu(l,u){return Po===null&&al(l),Wd(l,u)}function Wd(l,u){var g=fr?u._currentValue:u._currentValue2;if(u={context:u,memoizedValue:g,next:null},_i===null){if(l===null)throw Error(a(308));_i=u,l.dependencies={lanes:0,firstContext:u},l.flags|=524288}else _i=_i.next=u;return g}function Pf(){return{controller:new vv,data:new Map,refCount:0}}function jl(l){l.refCount--,l.refCount===0&&kr(xl,function(){l.controller.abort()})}function mo(){var l=Xr.current;return l!==null?l:vn.pooledCache}function Hf(l,u){u===null?C(Xr,Xr.current):C(Xr,u.pool)}function Ng(){var l=mo();return l===null?null:{parent:fr?jn._currentValue:jn._currentValue2,pool:l}}function ns(l){l.flags|=4}function Zd(l,u){if(l!==null&&l.child===u.child)return!1;if((u.flags&16)!==0)return!0;for(l=u.child;l!==null;){if((l.flags&13878)!==0||(l.subtreeFlags&13878)!==0)return!0;l=l.sibling}return!1}function Ff(l,u,g,S){if(ta)for(g=u.child;g!==null;){if(g.tag===5||g.tag===6)ur(l,g.stateNode);else if(!(g.tag===4||na&&g.tag===27)&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===u)break;for(;g.sibling===null;){if(g.return===null||g.return===u)return;g=g.return}g.sibling.return=g.return,g=g.sibling}else if(ss)for(var w=u.child;w!==null;){if(w.tag===5){var N=w.stateNode;g&&S&&(N=Np(N,w.type,w.memoizedProps)),ur(l,N)}else if(w.tag===6)N=w.stateNode,g&&S&&(N=Dp(N,w.memoizedProps)),ur(l,N);else if(w.tag!==4){if(w.tag===22&&w.memoizedState!==null)N=w.child,N!==null&&(N.return=w),Ff(l,w,!0,!0);else if(w.child!==null){w.child.return=w,w=w.child;continue}}if(w===u)break;for(;w.sibling===null;){if(w.return===null||w.return===u)return;w=w.return}w.sibling.return=w.return,w=w.sibling}}function ql(l,u,g,S){if(ss)for(var w=u.child;w!==null;){if(w.tag===5){var N=w.stateNode;g&&S&&(N=Np(N,w.type,w.memoizedProps)),Rp(l,N)}else if(w.tag===6)N=w.stateNode,g&&S&&(N=Dp(N,w.memoizedProps)),Rp(l,N);else if(w.tag!==4){if(w.tag===22&&w.memoizedState!==null)N=w.child,N!==null&&(N.return=w),ql(l,w,!(w.memoizedProps!==null&&w.memoizedProps.mode==="manual"),!0);else if(w.child!==null){w.child.return=w,w=w.child;continue}}if(w===u)break;for(;w.sibling===null;){if(w.return===null||w.return===u)return;w=w.return}w.sibling.return=w.return,w=w.sibling}}function Yl(l,u){if(ss&&Zd(l,u)){l=u.stateNode;var g=l.containerInfo,S=ch();ql(S,u,!1,!1),l.pendingChildren=S,ns(u),Yg(g,S)}}function Kd(l,u,g,S){if(ta)l.memoizedProps!==S&&ns(u);else if(ss){var w=l.stateNode,N=l.memoizedProps;if((l=Zd(l,u))||N!==S){var j=Zi.current;N=wp(w,g,N,S,!l,null),N===w?u.stateNode=w:(Br(N,g,S,j)&&ns(u),u.stateNode=N,l?Ff(N,u,!1,!1):ns(u))}else u.stateNode=w}}function Wl(l,u,g){if(Xg(u,g)){if(l.flags|=16777216,!Pr(u,g))if(pu())l.flags|=8192;else throw _l=xh,qp}else l.flags&=-16777217}function Qd(l,u){if(lv(u)){if(l.flags|=16777216,!Vp(u))if(pu())l.flags|=8192;else throw _l=xh,qp}else l.flags&=-16777217}function cu(l,u){u!==null&&(l.flags|=4),l.flags&16384&&(u=l.tag!==22?O():536870912,l.lanes|=u,qr|=u)}function sl(l,u){if(!Ln)switch(l.tailMode){case"hidden":u=l.tail;for(var g=null;u!==null;)u.alternate!==null&&(g=u),u=u.sibling;g===null?l.tail=null:g.sibling=null;break;case"collapsed":g=l.tail;for(var S=null;g!==null;)g.alternate!==null&&(S=g),g=g.sibling;S===null?u||l.tail===null?l.tail=null:l.tail.sibling=null:S.sibling=null}}function oi(l){var u=l.alternate!==null&&l.alternate.child===l.child,g=0,S=0;if(u)for(var w=l.child;w!==null;)g|=w.lanes|w.childLanes,S|=w.subtreeFlags&31457280,S|=w.flags&31457280,w.return=l,w=w.sibling;else for(w=l.child;w!==null;)g|=w.lanes|w.childLanes,S|=w.subtreeFlags,S|=w.flags,w.return=l,w=w.sibling;return l.subtreeFlags|=S,l.childLanes=g,u}function Dg(l,u,g){var S=u.pendingProps;switch(Ce(u),u.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return oi(u),null;case 1:return oi(u),null;case 3:return g=u.stateNode,S=null,l!==null&&(S=l.memoizedState.cache),u.memoizedState.cache!==S&&(u.flags|=2048),Rr(jn),nt(),g.pendingContext&&(g.context=g.pen
3946dingContext,g.pendingContext=null),(l===null||l.child===null)&&(Zt(u)?ns(u):l===null||l.memoizedState.isDehydrated&&(u.flags&256)===0||(u.flags|=1024,fs!==null&&(Nr(fs),fs=null))),Yl(l,u),oi(u),null;case 26:if(os){g=u.type;var w=u.memoizedState;return l===null?(ns(u),w!==null?(oi(u),Qd(u,w)):(oi(u),Wl(u,g,S))):w?w!==l.memoizedState?(ns(u),oi(u),Qd(u,w)):(oi(u),u.flags&=-16777217):(ta?l.memoizedProps!==S&&ns(u):Kd(l,u,g,S),oi(u),Wl(u,g,S)),null}case 27:if(na){if(De(u),g=Xs.current,w=u.type,l!==null&&u.stateNode!=null)ta?l.memoizedProps!==S&&ns(u):Kd(l,u,w,S);else{if(!S){if(u.stateNode===null)throw Error(a(166));return oi(u),null}l=Zi.current,Zt(u)?gt(u,l):(l=kp(w,S,g,l,!0),u.stateNode=l,ns(u))}return oi(u),null}case 5:if(De(u),g=u.type,l!==null&&u.stateNode!=null)Kd(l,u,g,S);else{if(!S){if(u.stateNode===null)throw Error(a(166));return oi(u),null}l=Zi.current,Zt(u)?gt(u,l):(w=gp(g,S,Xs.current,l,u),Ff(w,u,!1,!1),u.stateNode=w,Br(w,g,S,l)&&ns(u))}return oi(u),Wl(u,u.type,u.pendingProps),null;case 6:if(l&&u.stateNode!=null)g=l.memoizedProps,ta?g!==S&&ns(u):ss&&(g!==S?(u.stateNode=ih(S,Xs.current,Zi.current,u),ns(u)):u.stateNode=l.stateNode);else{if(typeof S!="string"&&u.stateNode===null)throw Error(a(166));if(l=Xs.current,g=Zi.current,Zt(u)){if(!Ra)throw Error(a(176));if(l=u.stateNode,g=u.memoizedProps,S=null,w=ga,w!==null)switch(w.tag){case 27:case 5:S=w.memoizedProps}nv(l,g,u,S)||ot(u)}else u.stateNode=ih(S,l,g,u)}return oi(u),null;case 13:if(S=u.memoizedState,l===null||l.memoizedState!==null&&l.memoizedState.dehydrated!==null){if(w=Zt(u),S!==null&&S.dehydrated!==null){if(l===null){if(!w)throw Error(a(318));if(!Ra)throw Error(a(344));if(w=u.memoizedState,w=w!==null?w.dehydrated:null,!w)throw Error(a(317));lc(w,u)}else _n(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;oi(u),w=!1}else fs!==null&&(Nr(fs),fs=null),w=!0;if(!w)return u.flags&256?(Yt(u),u):(Yt(u),null)}if(Yt(u),(u.flags&128)!==0)return u.lanes=g,u;if(g=S!==null,l=l!==null&&l.memoizedState!==null,g){S=u.child,w=null,S.alternate!==null&&S.alternate.memoizedState!==null&&S.alternate.memoizedState.cachePool!==null&&(w=S.alternate.memoizedState.cachePool.pool);var N=null;S.memoizedState!==null&&S.memoizedState.cachePool!==null&&(N=S.memoizedState.cachePool.pool),N!==w&&(S.flags|=2048)}return g!==l&&g&&(u.child.flags|=8192),cu(u,u.updateQueue),oi(u),null;case 4:return nt(),Yl(l,u),l===null&&_p(u.stateNode.containerInfo),oi(u),null;case 10:return Rr(u.type),oi(u),null;case 19:if(M(Li),w=u.memoizedState,w===null)return oi(u),null;if(S=(u.flags&128)!==0,N=w.rendering,N===null)if(S)sl(w,!1);else{if(Nn!==0||l!==null&&(l.flags&128)!==0)for(l=u.child;l!==null;){if(N=Bi(l),N!==null){for(u.flags|=128,sl(w,!1),l=N.updateQueue,u.updateQueue=l,cu(u,l),u.subtreeFlags=0,l=g,g=u.child;g!==null;)Or(g,l),g=g.sibling;return C(Li,Li.current&1|2),u.child}l=l.sibling}w.tail!==null&&ia()>di&&(u.flags|=128,S=!0,sl(w,!1),u.lanes=4194304)}else{if(!S)if(l=Bi(N),l!==null){if(u.flags|=128,S=!0,l=l.updateQueue,u.updateQueue=l,cu(u,l),sl(w,!0),w.tail===null&&w.tailMode==="hidden"&&!N.alternate&&!Ln)return oi(u),null}else 2*ia()-w.renderingStartTime>di&&g!==536870912&&(u.flags|=128,S=!0,sl(w,!1),u.lanes=4194304);w.isBackwards?(N.sibling=u.child,u.child=N):(l=w.last,l!==null?l.sibling=N:u.child=N,w.last=N)}return w.tail!==null?(u=w.tail,w.rendering=u,w.tail=u.sibling,w.renderingStartTime=ia(),u.sibling=null,l=Li.current,C(Li,S?l&1|2:l&1),u):(oi(u),null);case 22:case 23:return Yt(u),es(),S=u.memoizedState!==null,l!==null?l.memoizedState!==null!==S&&(u.flags|=8192):S&&(u.flags|=8192),S?(g&536870912)!==0&&(u.flags&128)===0&&(oi(u),u.subtreeFlags&6&&(u.flags|=8192)):oi(u),g=u.updateQueue,g!==null&&cu(u,g.retryQueue),g=null,l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(g=l.memoizedState.cachePool.pool),S=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(S=u.memoizedState.cachePool.pool),S!==g&&(u.flags|=2048),l!==null&&M(Xr),null;case 24:return g=null,l!==null&&(g=l.memoizedState.cache),u.memoizedState.cache!==g&&(u.flags|=2048),Rr(jn),oi(u),null;case 25:return null}throw Error(a(156,u.tag))}function Ug(l,u){switch(Ce(u),u.tag){case 1:return l=u.flags,l&65536?(u.flags=l&-65537|128,u):null;
3946case 3:return Rr(jn),nt(),l=u.flags,(l&65536)!==0&&(l&128)===0?(u.flags=l&-65537|128,u):null;case 26:case 27:case 5:return De(u),null;case 13:if(Yt(u),l=u.memoizedState,l!==null&&l.dehydrated!==null){if(u.alternate===null)throw Error(a(340));_n()}return l=u.flags,l&65536?(u.flags=l&-65537|128,u):null;case 19:return M(Li),null;case 4:return nt(),null;case 10:return Rr(u.type),null;case 22:case 23:return Yt(u),es(),l!==null&&M(Xr),l=u.flags,l&65536?(u.flags=l&-65537|128,u):null;case 24:return Rr(jn),null;case 25:return null;default:return null}}function Jd(l,u){switch(Ce(u),u.tag){case 3:Rr(jn),nt();break;case 26:case 27:case 5:De(u);break;case 4:nt();break;case 13:Yt(u);break;case 19:M(Li);break;case 10:Rr(u.type);break;case 22:case 23:Yt(u),es(),l!==null&&M(Xr);break;case 24:Rr(jn)}}function uu(l,u){try{var g=u.updateQueue,S=g!==null?g.lastEffect:null;if(S!==null){var w=S.next;g=w;do{if((g.tag&l)===l){S=void 0;var N=g.create,j=g.inst;S=N(),j.destroy=S}g=g.next}while(g!==w)}}catch(re){Sn(u,u.return,re)}}function go(l,u,g){try{var S=u.updateQueue,w=S!==null?S.lastEffect:null;if(w!==null){var N=w.next;S=N;do{if((S.tag&l)===l){var j=S.inst,re=j.destroy;if(re!==void 0){j.destroy=void 0,w=u;var xe=g;try{re()}catch(Xe){Sn(w,xe,Xe)}}}S=S.next}while(S!==N)}}catch(Xe){Sn(u,u.return,Xe)}}function Lg(l){var u=l.updateQueue;if(u!==null){var g=l.stateNode;try{Me(u,g)}catch(S){Sn(l,l.return,S)}}}function Og(l,u,g){g.props=Ps(l.type,l.memoizedProps),g.state=l.memoizedState;try{g.componentWillUnmount()}catch(S){Sn(l,u,S)}}function rl(l,u){try{var g=l.ref;if(g!==null){var S=l.stateNode;switch(l.tag){case 26:case 27:case 5:var w=oc(S);break;default:w=S}typeof g=="function"?l.refCleanup=g(w):g.current=w}}catch(N){Sn(l,u,N)}}function li(l,u){var g=l.ref,S=l.refCleanup;if(g!==null)if(typeof S=="function")try{S()}catch(w){Sn(l,u,w)}finally{l.refCleanup=null,l=l.alternate,l!=null&&(l.refCleanup=null)}else if(typeof g=="function")try{g(null)}catch(w){Sn(l,u,w)}else g.current=null}function Zl(l){var u=l.type,g=l.memoizedProps,S=l.stateNode;try{M_(S,u,g,l)}catch(w){Sn(l,l.return,w)}}function $d(l,u,g){try{Mp(l.stateNode,l.type,g,u,l)}catch(S){Sn(l,l.return,S)}}function ep(l){return l.tag===5||l.tag===3||(os?l.tag===26:!1)||(na?l.tag===27:!1)||l.tag===4}function Vf(l){e:for(;;){for(;l.sibling===null;){if(l.return===null||ep(l.return))return null;l=l.return}for(l.sibling.return=l.return,l=l.sibling;l.tag!==5&&l.tag!==6&&(!na||l.tag!==27)&&l.tag!==18;){if(l.flags&2||l.child===null||l.tag===4)continue e;l.child.return=l,l=l.child}if(!(l.flags&2))return l.stateNode}}function Gf(l,u,g){var S=l.tag;if(S===5||S===6)l=l.stateNode,u?Tp(g,l,u):jg(g,l);else if(!(S===4||na&&S===27)&&(l=l.child,l!==null))for(Gf(l,u,g),l=l.sibling;l!==null;)Gf(l,u,g),l=l.sibling}function Kl(l,u,g){var S=l.tag;if(S===5||S===6)l=l.stateNode,u?Ep(g,l,u):bp(g,l);else if(!(S===4||na&&S===27)&&(l=l.child,l!==null))for(Kl(l,u,g),l=l.sibling;l!==null;)Kl(l,u,g),l=l.sibling}function zg(l,u,g){l=l.containerInfo;try{Cp(l,g)}catch(S){Sn(u,u.return,S)}}function Ql(l,u){for(No(l.containerInfo),xi=u;xi!==null;)if(l=xi,u=l.child,(l.subtreeFlags&1028)!==0&&u!==null)u.return=l,xi=u;else for(;xi!==null;){l=xi;var g=l.alternate;switch(u=l.flags,l.tag){case 0:break;case 11:case 15:break;case 1:if((u&1024)!==0&&g!==null){u=void 0;var S=l,w=g.memoizedProps;g=g.memoizedState;var N=S.stateNode;try{var j=Ps(S.type,w,S.elementType===S.type);u=N.getSnapshotBeforeUpdate(j,g),N.__reactInternalSnapshotBeforeUpdate=u}catch(re){Sn(S,S.return,re)}}break;case 3:(u&1024)!==0&&ta&&lh(l.stateNode.containerInfo);break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((u&1024)!==0)throw Error(a(163))}if(u=l.sibling,u!==null){u.return=l.return,xi=u;break}xi=l.return}return j=Sl,Sl=!1,j}function kf(l,u,g){var S=g.flags;switch(g.tag){case 0:case 11:case 15:ar(l,g),S&4&&uu(5,g);break;case 1:if(ar(l,g),S&4)if(l=g.stateNode,u===null)try{l.componentDidMount()}catch(re){Sn(g,g.return,re)}else{var w=Ps(g.type,u.memoizedProps);u=u.memoizedState;try{l.componentDidUpdate(w,u,l.__reactInternalSnapshotBeforeUpdate)}catch(re){Sn(g,g.return,re)}}S&64&&Lg(g),S&512&&rl(g,g.return);break;case 3:if(ar(l,g),S&64&&(S=g.updateQueue,S!==null)){if(l=null,g.child!==null)switch(g.child.tag){case 27:case 5:l=oc(g.child.stateNode);break;case 1:l=g.child.stateNode}try{Me(S,l)}catch(re){Sn(g,g.return,re)}}break;case 26:if(os){ar(l,g),S&512&&rl(g,g.return);break}case 27:case 5:ar(l,g),u===null&&S&4&&Zl(g),S&512&&rl(g,g.return);break;case 12:ar(l,g);break;case 13:ar(l,g),S&4&&vo(l,g);break;case 22:if(w=g.memoizedState!==null||Hi,!w){u=u!==null&&u.memoizedState!==null||hi;var N=Hi,j=hi;Hi=w,(hi=u)&&!j?_o(l,g,(g.subtreeFlags&8772)!==0):ar(l,g),Hi=N,hi=j}S&512&&(g.memoizedProps.mode==="manual"?rl(g,g.return):li(g,g.return));break;default:ar(l,g)}}function Jl(l){var u=l.alternate;u!==null&&(l.alternate=null,Jl(u)),l.child=null,l.deletions=null,l.sibling=null,l.tag===5&&(u=l.stateNode,u!==null&&xp(u)),l.stateNode=null,l.return=null,l.dependencies=null,l.memoizedProps=null,l.memoizedState=null,l.pendingProps=null,l.stateNode=null,l.updateQueue=null}function is(l,u,g){for(g=g.child;g!==null;)Xf(l,u,g),g=g.sibling}function Xf(l,u,g){if(Fa&&typeof Fa.onCommitFiberUnmount=="function")try{Fa.onCommitFiberUnmount(hc,g)}catch{}switch(g.tag){case 26:if(os){hi||li(g,u),is(l,u,g),g.memoizedState?Ip(g.memoizedState):g.stateNode&&Hp(g.stateNode);break}case 27:if(na){hi||li(g,u);var S=wi,w=ka;
3946wi=g.stateNode,is(l,u,g),cv(g.stateNode),wi=S,ka=w;break}case 5:hi||li(g,u);case 6:if(ta){if(S=wi,w=ka,wi=null,is(l,u,g),wi=S,ka=w,wi!==null)if(ka)try{Ei(wi,g.stateNode)}catch(N){Sn(g,u,N)}else try{Ca(wi,g.stateNode)}catch(N){Sn(g,u,N)}}else is(l,u,g);break;case 18:ta&&wi!==null&&(ka?Lp(wi,g.stateNode):av(wi,g.stateNode));break;case 4:ta?(S=wi,w=ka,wi=g.stateNode.containerInfo,ka=!0,is(l,u,g),wi=S,ka=w):(ss&&zg(g.stateNode,g,ch()),is(l,u,g));break;case 0:case 11:case 14:case 15:hi||go(2,g,u),hi||go(4,g,u),is(l,u,g);break;case 1:hi||(li(g,u),S=g.stateNode,typeof S.componentWillUnmount=="function"&&Og(g,u,S)),is(l,u,g);break;case 21:is(l,u,g);break;case 22:hi||li(g,u),hi=(S=hi)||g.memoizedState!==null,is(l,u,g),hi=S;break;default:is(l,u,g)}}function vo(l,u){if(Ra&&u.memoizedState===null&&(l=u.alternate,l!==null&&(l=l.memoizedState,l!==null&&(l=l.dehydrated,l!==null))))try{dh(l)}catch(g){Sn(u,u.return,g)}}function $l(l){switch(l.tag){case 13:case 19:var u=l.stateNode;return u===null&&(u=l.stateNode=new yc),u;case 22:return l=l.stateNode,u=l._retryCache,u===null&&(u=l._retryCache=new yc),u;default:throw Error(a(435,l.tag))}}function fu(l,u){var g=$l(l);u.forEach(function(S){var w=sp.bind(null,l,S);g.has(S)||(g.add(S),S.then(w,w))})}function Ta(l,u){var g=u.deletions;if(g!==null)for(var S=0;S<g.length;S++){var w=g[S],N=l,j=u;if(ta){var re=j;e:for(;re!==null;){switch(re.tag){case 27:case 5:wi=re.stateNode,ka=!1;break e;case 3:wi=re.stateNode.containerInfo,ka=!0;break e;case 4:wi=re.stateNode.containerInfo,ka=!0;break e}re=re.return}if(wi===null)throw Error(a(160));Xf(N,j,w),wi=null,ka=!1}else Xf(N,j,w);N=w.alternate,N!==null&&(N.return=null),w.return=null}if(u.subtreeFlags&13878)for(u=u.child;u!==null;)yo(u,l),u=u.sibling}function yo(l,u){var g=l.alternate,S=l.flags;switch(l.tag){case 0:case 11:case 14:case 15:Ta(u,l),za(l),S&4&&(go(3,l,l.return),uu(3,l),go(5,l,l.return));break;case 1:Ta(u,l),za(l),S&512&&(hi||g===null||li(g,g.return)),S&64&&Hi&&(l=l.updateQueue,l!==null&&(S=l.callbacks,S!==null&&(g=l.shared.hiddenCallbacks,l.shared.hiddenCallbacks=g===null?S:g.concat(S))));break;case 26:if(os){var w=Na;Ta(u,l),za(l),S&512&&(hi||g===null||li(g,g.return)),S&4&&(S=g!==null?g.memoizedState:null,u=l.memoizedState,g===null?u===null?l.stateNode===null?l.stateNode=Bp(w,l.type,l.memoizedProps,l):Pp(w,l.type,l.stateNode):l.stateNode=zp(w,u,l.memoizedProps):S!==u?(S===null?g.stateNode!==null&&Hp(g.stateNode):Ip(S),u===null?Pp(w,l.type,l.stateNode):zp(w,u,l.memoizedProps)):u===null&&l.stateNode!==null&&$d(l,l.memoizedProps,g.memoizedProps));break}case 27:if(na&&S&4&&l.alternate===null){w=l.stateNode;var N=l.memoizedProps;try{w_(w),R_(l.type,N,w,l)}catch(ht){Sn(l,l.return,ht)}}case 5:if(Ta(u,l),za(l),S&512&&(hi||g===null||li(g,g.return)),ta){if(l.flags&32){u=l.stateNode;try{Eu(u)}catch(ht){Sn(l,l.return,ht)}}S&4&&l.stateNode!=null&&(u=l.memoizedProps,$d(l,u,g!==null?g.memoizedProps:u)),S&1024&&(Ho=!0)}break;case 6:if(Ta(u,l),za(l),S&4&&ta){if(l.stateNode===null)throw Error(a(162));S=l.memoizedProps,g=g!==null?g.memoizedProps:S,u=l.stateNode;try{qg(u,g,S)}catch(ht){Sn(l,l.return,ht)}}break;case 3:if(os?(Fp(),w=Na,Na=ph(u.containerInfo),Ta(u,l),Na=w):Ta(u,l),za(l),S&4){if(ta&&Ra&&g!==null&&g.memoizedState.isDehydrated)try{hh(u.containerInfo)}catch(ht){Sn(l,l.return,ht)}if(ss){S=u.containerInfo,g=u.pendingChildren;try{Cp(S,g)}catch(ht){Sn(l,l.return,ht)}}}Ho&&(Ho=!1,tp(l));break;case 4:os?(g=Na,Na=ph(l.stateNode.containerInfo),Ta(u,l),za(l),Na=g):(Ta(u,l),za(l)),S&4&&ss&&zg(l.stateNode,l,l.stateNode.pendingChildren);break;case 12:Ta(u,l),za(l);break;case 13:Ta(u,l),za(l),l.child.flags&8192&&l.memoizedState!==null!=(g!==null&&g.memoizedState!==null)&&(yr=ia()),S&4&&(S=l.updateQueue,S!==null&&(l.updateQueue=null,fu(l,S)));break;case 22:S&512&&(hi||g===null||li(g,g.return)),w=l.memoizedState!==null;var j=g!==null&&g.memoizedState!==null,re=Hi,xe=hi;if(Hi=re||w,hi=xe||j,Ta(u,l),hi=xe,Hi=re,za(l),u=l.stateNode,u._current=l,u._visibility&=-3,u._visibility|=u._pendingVisibility&2,S&8192&&(u._visibility=w?u._visibility&-2:u._visibility|1,w&&(u=Hi||hi,g===null||j||u||ec(l)),ta&&(l.memoizedProps===null||l.memoizedProps.mode!=="manual"))){e:if(g=null,ta)for(u=l;;){if(u.tag===5||os&&u.tag===26||na&&u.tag===27){if(g===null){j=g=u;try{N=j.stateNode,w?Tu(N):Ap(j.stateNode,j.memoizedProps)}catch(ht){Sn(j,j.return,ht)}}}else if(u.tag===6){if(g===null){j=u;try{var Xe=j.stateNode;w?oh(Xe):Hr(Xe,j.memoizedProps)}catch(ht){Sn(j,j.return,ht)}}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===l)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===l)break e;for(;u.sibling===null;){if(u.return===null||u.return===l)break e;g===u&&(g=null),u=u.return}g===u&&(g=null),u.sibling.return=u.return,u=u.sibling}}S&4&&(S=l.updateQueue,S!==null&&(g=S.retryQueue,g!==null&&(S.retryQueue=null,fu(l,g))));break;case 19:Ta(u,l),za(l),S&4&&(S=l.updateQueue,S!==null&&(l.updateQueue=null,fu(l,S)));break;case 21:break;default:Ta(u,l),za(l)}}function za(l){var u=l.flags;if(u&2){try{if(ta&&(!na||l.tag!==27)){e:{for(var g=l.return;g!==null;){if(ep(g)){var S=g;break e}g=g.return}throw Error(a(160))}switch(S.tag){case 27:if(na){var w=S.stateNode,N=Vf(l);Kl(l,N,w);break}case 5:var j=S.stateNode;S.flags&32&&(Eu(j),S.flags&=-33);var re=Vf(l);Kl(l,re,j);break;case 3:case 4:var xe=S.stateNode.containerInfo,Xe=Vf(l);Gf(l,Xe,xe);break;default:throw Error(a(161))}}}catch(ht){Sn(l,l.return,ht)}l.flags&=-3}u&4096&&(l.flags&=-4097)}function tp(l){if(l.subtreeFlags&1024)for(l=l.child;l!==null;){var u=l;tp(u),u.tag===5&&u.flags&1024&&Jn(u.stateNode),l=l.sibling}}function ar(l,u){if(u.subtreeFlags&8772)for(u=u.child;u!==null;)kf(l,u.alternate,u),u=u.sibling}function ec(l){for(l=l.child;l!==null;){var u=l;switch(u.tag){case 0:case 11:case 14:case 15:go(4,u,u.return),ec(u);break;case 1:li(u,u.return);var g=u.stateNode;typeof g.componentWillUnmount=="function"&&Og(u,u.return,g),ec(u);break;case 26:case 27:case 5:li(u,u.return),ec(u);break;case 22:li(u,u.return),u.memoizedState===null&&ec(u);break;default:ec(u)}l=l.sibling}}function _o(l,u,g){for(g=g&&(u.subtreeFlags&8772)!==0,u=u.child;u!==null;){var S=u.alternate,w=l,N=u,j=N.flags;switch(N.tag){case 0:case 11:case 15:_o(w,N,g),uu(4,N);break;case 1:if(_o(w,N,g),S=N,w=S.stateNode,typeof w.componentDidMount=="function")try{w.componentDidMount()}catch(Xe){Sn(S,S.return,Xe)}if(S=N,w=S.updateQueue,w!==null){var re=S.stateNode;try{var xe=w.shared.hiddenCallbacks;
3946if(xe!==null)for(w.shared.hiddenCallbacks=null,w=0;w<xe.length;w++)pe(xe[w],re)}catch(Xe){Sn(S,S.return,Xe)}}g&&j&64&&Lg(N),rl(N,N.return);break;case 26:case 27:case 5:_o(w,N,g),g&&S===null&&j&4&&Zl(N),rl(N,N.return);break;case 12:_o(w,N,g);break;case 13:_o(w,N,g),g&&j&4&&vo(w,N);break;case 22:N.memoizedState===null&&_o(w,N,g),rl(N,N.return);break;default:_o(w,N,g)}u=u.sibling}}function np(l,u){var g=null;l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(g=l.memoizedState.cachePool.pool),l=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(l=u.memoizedState.cachePool.pool),l!==g&&(l!=null&&l.refCount++,g!=null&&jl(g))}function jf(l,u){l=null,u.alternate!==null&&(l=u.alternate.memoizedState.cache),u=u.memoizedState.cache,u!==l&&(u.refCount++,l!=null&&jl(l))}function Cr(l,u,g,S){if(u.subtreeFlags&10256)for(u=u.child;u!==null;)qf(l,u,g,S),u=u.sibling}function qf(l,u,g,S){var w=u.flags;switch(u.tag){case 0:case 11:case 15:Cr(l,u,g,S),w&2048&&uu(9,u);break;case 3:Cr(l,u,g,S),w&2048&&(l=null,u.alternate!==null&&(l=u.alternate.memoizedState.cache),u=u.memoizedState.cache,u!==l&&(u.refCount++,l!=null&&jl(l)));break;case 12:if(w&2048){Cr(l,u,g,S),l=u.stateNode;try{var N=u.memoizedProps,j=N.id,re=N.onPostCommit;typeof re=="function"&&re(j,u.alternate===null?"mount":"update",l.passiveEffectDuration,-0)}catch(xe){Sn(u,u.return,xe)}}else Cr(l,u,g,S);break;case 23:break;case 22:N=u.stateNode,u.memoizedState!==null?N._visibility&4?Cr(l,u,g,S):xo(l,u):N._visibility&4?Cr(l,u,g,S):(N._visibility|=4,ha(l,u,g,S,(u.subtreeFlags&10256)!==0)),w&2048&&np(u.alternate,u);break;case 24:Cr(l,u,g,S),w&2048&&jf(u.alternate,u);break;default:Cr(l,u,g,S)}}function ha(l,u,g,S,w){for(w=w&&(u.subtreeFlags&10256)!==0,u=u.child;u!==null;){var N=l,j=u,re=g,xe=S,Xe=j.flags;switch(j.tag){case 0:case 11:case 15:ha(N,j,re,xe,w),uu(8,j);break;case 23:break;case 22:var ht=j.stateNode;j.memoizedState!==null?ht._visibility&4?ha(N,j,re,xe,w):xo(N,j):(ht._visibility|=4,ha(N,j,re,xe,w)),w&&Xe&2048&&np(j.alternate,j);break;case 24:ha(N,j,re,xe,w),w&&Xe&2048&&jf(j.alternate,j);break;default:ha(N,j,re,xe,w)}u=u.sibling}}function xo(l,u){if(u.subtreeFlags&10256)for(u=u.child;u!==null;){var g=l,S=u,w=S.flags;switch(S.tag){case 22:xo(g,S),w&2048&&np(S.alternate,S);break;case 24:xo(g,S),w&2048&&jf(S.alternate,S);break;default:xo(g,S)}u=u.sibling}}function ji(l){if(l.subtreeFlags&bl)for(l=l.child;l!==null;)ol(l),l=l.sibling}function ol(l){switch(l.tag){case 26:ji(l),l.flags&bl&&(l.memoizedState!==null?Gp(Na,l.memoizedState,l.memoizedProps):mi(l.type,l.memoizedProps));break;case 5:ji(l),l.flags&bl&&mi(l.type,l.memoizedProps);break;case 3:case 4:if(os){var u=Na;Na=ph(l.stateNode.containerInfo),ji(l),Na=u}else ji(l);break;case 22:l.memoizedState===null&&(u=l.alternate,u!==null&&u.memoizedState!==null?(u=bl,bl=16777216,ji(l),bl=u):ji(l));break;default:ji(l)}}function Yf(l){var u=l.alternate;if(u!==null&&(l=u.child,l!==null)){u.child=null;do u=l.sibling,l.sibling=null,l=u;while(l!==null)}}function So(l){var u=l.deletions;if((l.flags&16)!==0){if(u!==null)for(var g=0;g<u.length;g++){var S=u[g];xi=S,bo(S,l)}Yf(l)}if(l.subtreeFlags&10256)for(l=l.child;l!==null;)hu(l),l=l.sibling}function hu(l){switch(l.tag){case 0:case 11:case 15:So(l),l.flags&2048&&go(9,l,l.return);break;case 3:So(l);break;case 12:So(l);break;case 22:var u=l.stateNode;l.memoizedState!==null&&u._visibility&4&&(l.return===null||l.return.tag!==13)?(u._visibility&=-5,tc(l)):So(l);break;default:So(l)}}function tc(l){var u=l.deletions;if((l.flags&16)!==0){if(u!==null)for(var g=0;g<u.length;g++){var S=u[g];xi=S,bo(S,l)}Yf(l)}for(l=l.child;l!==null;){switch(u=l,u.tag){case 0:case 11:case 15:go(8,u,u.return),tc(u);break;case 22:g=u.stateNode,g._visibility&4&&(g._visibility&=-5,tc(u));break;default:tc(u)}l=l.sibling}}function bo(l,u){for(;xi!==null;){var g=xi;switch(g.tag){case 0:case 11:case 15:go(8,g,u);break;case 23:case 22:if(g.memoizedState!==null&&g.memoizedState.cachePool!==null){var S=g.memoizedState.cachePool.pool;S!=null&&S.refCount++}break;case 24:jl(g.memoizedState.cache)}if(S=g.child,S!==null)S.return=g,xi=S;else e:for(g=l;xi!==null;){S=xi;var w=S.sibling,N=S.return;if(Jl(S),S===g){xi=null;break e}if(w!==null){w.return=N,xi=w;break e}xi=N}}}function Wf(l){var u=yp(l);if(u!=null){if(typeof u.memoizedProps["data-testname"]!="string")throw Error(a(364));return u}if(l=gl(l),l===null)throw Error(a(362));return l.stateNode.current}function nc(l,u){var g=l.tag;switch(u.$$typeof){case Fu:if(l.type===u.value)return!0;break;case Th:e:{for(u=u.value,l=[l,0],g=0;g<l.length;){var S=l[g++],w=S.tag,N=l[g++],j=u[N];if(w!==5&&w!==26&&w!==27||!dr(S)){for(;j!=null&&nc(S,j);)N++,j=u[N];if(N===u.length){u=!0;break e}else for(S=S.child;S!==null;)l.push(S,N),S=S.sibling}}u=!1}return u;case Ah:if((g===5||g===26||g===27)&&b_(l.stateNode,u.value))return!0;break;case qn:if((g===5||g===6||g===26||g===27)&&(l=Mu(l),l!==null&&0<=l.indexOf(u.value)))return!0;break;case Cn:if((g===5||g===26||g===27)&&(l=l.memoizedProps["data-testname"],typeof l=="string"&&l.toLowerCase()===u.value.toLowerCase()))return!0;break;default:throw Error(a(365))}return!1}function Mo(l){switch(l.$$typeof){case Fu:return"<"+(c(l.value)||"Unknown")+">";case Th:return":has("+(Mo(l)||"")+")";case Ah:return'[role="'+l.value+'"]';
3946case qn:return'"'+l.value+'"';case Cn:return'[data-testname="'+l.value+'"]';default:throw Error(a(365))}}function Ig(l,u){var g=[];l=[l,0];for(var S=0;S<l.length;){var w=l[S++],N=w.tag,j=l[S++],re=u[j];if(N!==5&&N!==26&&N!==27||!dr(w)){for(;re!=null&&nc(w,re);)j++,re=u[j];if(j===u.length)g.push(w);else for(w=w.child;w!==null;)l.push(w,j),w=w.sibling}}return g}function Aa(l,u){if(!hr)throw Error(a(363));l=Wf(l),l=Ig(l,u),u=[],l=Array.from(l);for(var g=0;g<l.length;){var S=l[g++],w=S.tag;if(w===5||w===26||w===27)dr(S)||u.push(S.stateNode);else for(S=S.child;S!==null;)l.push(S),S=S.sibling}return u}function wa(){if((Ht&2)!==0&&dn!==0)return dn&-dn;if(kt.T!==null){var l=Va;return l!==0?l:$e()}return ws()}function sr(){Xa===0&&(Xa=(dn&536870912)===0||Ln?V():536870912);var l=ps.current;return l!==null&&(l.flags|=32),Xa}function da(l,u,g){(l===vn&&$n===2||l.cancelPendingCommit!==null)&&(Fs(l,0),Hs(l,dn,Xa,!1)),Y(l,g),((Ht&2)===0||l!==vn)&&(l===vn&&((Ht&2)===0&&(Ys|=g),Nn===4&&Hs(l,dn,Xa,!1)),lt(l))}function du(l,u,g){if((Ht&6)!==0)throw Error(a(327));var S=!g&&(u&60)===0&&(u&l.expiredLanes)===0||F(l,u),w=S?lr(l,u):rr(l,u,!0),N=S;do{if(w===0){ms&&!S&&Hs(l,u,0,!1);break}else if(w===6)Hs(l,u,0,!Yn);else{if(g=l.current.alternate,N&&!Bg(g)){w=rr(l,u,!1),N=!1;continue}if(w===2){if(N=u,l.errorRecoveryDisabledLanes&N)var j=0;else j=l.pendingLanes&-536870913,j=j!==0?j:j&536870912?536870912:0;if(j!==0){u=j;e:{var re=l;w=_c;var xe=Ra&&re.current.memoizedState.isDehydrated;if(xe&&(Fs(re,j).flags|=256),j=rr(re,j,!1),j!==2){if(jr&&!xe){re.errorRecoveryDisabledLanes|=N,Ys|=N,w=4;break e}N=vs,vs=w,N!==null&&Nr(N)}w=j}if(N=!1,w!==2)continue}}if(w===1){Fs(l,0),Hs(l,u,0,!0);break}e:{switch(S=l,w){case 0:case 1:throw Error(a(345));case 4:if((u&4194176)===u){Hs(S,u,Xa,!Yn);break e}break;case 2:vs=null;break;case 3:case 5:break;default:throw Error(a(329))}if(S.finishedWork=g,S.finishedLanes=u,(u&62914560)===u&&(N=yr+300-ia(),10<N)){if(Hs(S,u,Xa,!Yn),H(S,0)!==0)break e;S.timeoutHandle=vp(Zf.bind(null,S,g,vs,Ws,xc,u,Xa,Ys,qr,Yn,2,-0,0),N);break e}Zf(S,g,vs,Ws,xc,u,Xa,Ys,qr,Yn,0,-0,0)}}break}while(!0);lt(l)}function Nr(l){vs===null?vs=l:vs.push.apply(vs,l)}function Zf(l,u,g,S,w,N,j,re,xe,Xe,ht,xt,Mt){var en=u.subtreeFlags;if((en&8192||(en&16785408)===16785408)&&(rs(),ol(u),u=ah(),u!==null)){l.cancelPendingCommit=u(ii.bind(null,l,g,S,w,j,re,xe,1,xt,Mt)),Hs(l,N,j,!Xe);return}ii(l,g,S,w,j,re,xe,ht,xt,Mt)}function Bg(l){for(var u=l;;){var g=u.tag;if((g===0||g===11||g===15)&&u.flags&16384&&(g=u.updateQueue,g!==null&&(g=g.stores,g!==null)))for(var S=0;S<g.length;S++){var w=g[S],N=w.getSnapshot;w=w.value;try{if(!ls(N(),w))return!1}catch{return!1}}if(g=u.child,u.subtreeFlags&16384&&g!==null)g.return=u,u=g;else{if(u===l)break;for(;u.sibling===null;){if(u.return===null||u.return===l)return!0;u=u.return}u.sibling.return=u.return,u=u.sibling}}return!0}function Hs(l,u,g,S){u&=~_a,u&=~Ys,l.suspendedLanes|=u,l.pingedLanes&=~u,S&&(l.warmLanes|=u),S=l.expirationTimes;for(var w=u;0<w;){var N=31-Ha(w),j=1<<N;S[N]=-1,w&=~j}g!==0&&ce(l,g,u)}function ip(){return(Ht&6)===0?(Vt(0),!1):!0}function Ia(){if(tn!==null){if($n===0)var l=tn.return;else l=tn,_i=Po=null,B(l),mr=null,Ns=0,l=tn;for(;l!==null;)Jd(l.alternate,l),l=l.return;tn=null}}function Fs(l,u){l.finishedWork=null,l.finishedLanes=0;var g=l.timeoutHandle;g!==ml&&(l.timeoutHandle=ml,bu(g)),g=l.cancelPendingCommit,g!==null&&(l.cancelPendingCommit=null,g()),Ia(),vn=l,tn=g=pa(l.current,null),dn=u,$n=0,Ri=null,Yn=!1,ms=F(l,u),jr=!1,qr=Xa=_a=Ys=gs=Nn=0,vs=_c=null,xc=!1,(u&8)!==0&&(u|=u&32);var S=l.entangledLanes;if(S!==0)for(l=l.entanglements,S&=u;0<S;){var w=31-Ha(S),N=1<<w;u|=l[w],S&=~N}return qs=u,Ze(),g}function ll(l,u){on=null,kt.H=On,u===Kn?(u=Tt(),$n=3):u===qp?(u=Tt(),$n=4):$n=u===gv?8:u!==null&&typeof u=="object"&&typeof u.then=="function"?6:1,Ri=u,tn===null&&(Nn=1,Of(l,ge(u,l.current)))}function pu(){var l=ps.current;return l===null?!0:(dn&4194176)===dn?Ds===null:(dn&62914560)===dn||(dn&536870912)!==0?l===Ds:!1}function ic(){var l=kt.H;return kt.H=On,l===null?On:l}function as(){var l=kt.A;return kt.A=Eh,l}function Ba(){Nn=4,Yn||(dn&4194176)!==dn&&ps.current!==null||(ms=!0),(gs&134217727)===0&&(Ys&134217727)===0||vn===null||Hs(vn,dn,Xa,!1)}function rr(l,u,g){var S=Ht;Ht|=2;var w=ic(),N=as();(vn!==l||dn!==u)&&(Ws=null,Fs(l,u)),u=!1;var j=Nn;e:do try{if($n!==0&&tn!==null){var re=tn,xe=Ri;switch($n){case 8:Ia(),j=6;break e;case 3:case 2:case 6:ps.current===null&&(u=!0);var Xe=$n;if($n=0,Ri=null,Eo(l,re,xe,Xe),g&&ms){j=0;break e}break;
3946default:Xe=$n,$n=0,Ri=null,Eo(l,re,xe,Xe)}}or(),j=Nn;break}catch(ht){ll(l,ht)}while(!0);return u&&l.shellSuspendCounter++,_i=Po=null,Ht=S,kt.H=w,kt.A=N,tn===null&&(vn=null,dn=0,Ze()),j}function or(){for(;tn!==null;)ap(tn)}function lr(l,u){var g=Ht;Ht|=2;var S=ic(),w=as();vn!==l||dn!==u?(Ws=null,di=ia()+500,Fs(l,u)):ms=F(l,u);e:do try{if($n!==0&&tn!==null){u=tn;var N=Ri;t:switch($n){case 1:$n=0,Ri=null,Eo(l,u,N,1);break;case 2:if(bt(N)){$n=0,Ri=null,Kf(u);break}u=function(){$n===2&&vn===l&&($n=7),lt(l)},N.then(u,u);break e;case 3:$n=7;break e;case 4:$n=5;break e;case 7:bt(N)?($n=0,Ri=null,Kf(u)):($n=0,Ri=null,Eo(l,u,N,7));break;case 5:var j=null;switch(tn.tag){case 26:j=tn.memoizedState;case 5:case 27:var re=tn,xe=re.type,Xe=re.pendingProps;if(j?Vp(j):Pr(xe,Xe)){$n=0,Ri=null;var ht=re.sibling;if(ht!==null)tn=ht;else{var xt=re.return;xt!==null?(tn=xt,mu(xt)):tn=null}break t}}$n=0,Ri=null,Eo(l,u,N,5);break;case 6:$n=0,Ri=null,Eo(l,u,N,6);break;case 8:Ia(),Nn=6;break e;default:throw Error(a(462))}}Dr();break}catch(Mt){ll(l,Mt)}while(!0);return _i=Po=null,kt.H=S,kt.A=w,Ht=g,tn!==null?0:(vn=null,dn=0,Ze(),Nn)}function Dr(){for(;tn!==null&&!fv();)ap(tn)}function ap(l){var u=Cg(l.alternate,l,qs);l.memoizedProps=l.pendingProps,u===null?mu(l):tn=u}function Kf(l){var u=l,g=u.alternate;switch(u.tag){case 15:case 0:u=Eg(g,u,u.pendingProps,u.type,void 0,dn);break;case 11:u=Eg(g,u,u.pendingProps,u.type.render,u.ref,dn);break;case 5:B(u);default:Jd(g,u),u=tn=Or(u,qs),u=Cg(g,u,qs)}l.memoizedProps=l.pendingProps,u===null?mu(l):tn=u}function Eo(l,u,g,S){_i=Po=null,B(u),mr=null,Ns=0;var w=u.return;try{if(_g(l,w,u,g,dn)){Nn=1,Of(l,ge(g,l.current)),tn=null;return}}catch(N){if(w!==null)throw tn=w,N;Nn=1,Of(l,ge(g,l.current)),tn=null;return}u.flags&32768?(Ln||S===1?l=!0:ms||(dn&536870912)!==0?l=!1:(Yn=l=!0,(S===2||S===3||S===6)&&(S=ps.current,S!==null&&S.tag===13&&(S.flags|=16384))),qi(u,l)):mu(u)}function mu(l){var u=l;do{if((u.flags&32768)!==0){qi(u,Yn);return}l=u.return;var g=Dg(u.alternate,u,qs);if(g!==null){tn=g;return}if(u=u.sibling,u!==null){tn=u;return}tn=u=l}while(u!==null);Nn===0&&(Nn=5)}function qi(l,u){do{var g=Ug(l.alternate,l);if(g!==null){g.flags&=32767,tn=g;return}if(g=l.return,g!==null&&(g.flags|=32768,g.subtreeFlags=0,g.deletions=null),!u&&(l=l.sibling,l!==null)){tn=l;return}tn=l=g}while(l!==null);Nn=6,tn=null}function ii(l,u,g,S,w,N,j,re,xe,Xe){var ht=kt.T,xt=Pi();try{ma(2),kt.T=null,En(l,u,g,S,xt,w,N,j,re,xe,Xe)}finally{kt.T=ht,ma(xt)}}function En(l,u,g,S,w,N,j,re){do Yi();while(Yr!==null);if((Ht&6)!==0)throw Error(a(327));var xe=l.finishedWork;if(S=l.finishedLanes,xe===null)return null;if(l.finishedWork=null,l.finishedLanes=0,xe===l.current)throw Error(a(177));l.callbackNode=null,l.callbackPriority=0,l.cancelPendingCommit=null;var Xe=xe.lanes|xe.childLanes;if(Xe|=pc,se(l,S,Xe,N,j,re),l===vn&&(tn=vn=null,dn=0),(xe.subtreeFlags&10256)===0&&(xe.flags&10256)===0||Ls||(Ls=!0,wh=Xe,El=g,gu(gh,function(){return Yi(),null})),g=(xe.flags&15990)!==0,(xe.subtreeFlags&15990)!==0||g?(g=kt.T,kt.T=null,N=Pi(),ma(2),j=Ht,Ht|=4,Ql(l,xe),yo(xe,l),mp(l.containerInfo),l.current=xe,kf(l,xe.alternate,xe),hv(),Ht=j,ma(N),kt.T=g):l.current=xe,Ls?(Ls=!1,Yr=l,Ml=S):Ur(l,Xe),Xe=l.pendingLanes,Xe===0&&(ys=null),P(xe.stateNode),lt(l),u!==null)for(w=l.onRecoverableError,xe=0;xe<u.length;xe++)Xe=u[xe],w(Xe.value,{componentStack:Xe.stack});return(Ml&3)!==0&&Yi(),Xe=l.pendingLanes,(S&4194218)!==0&&(Xe&42)!==0?l===Da?Tl++:(Tl=0,Da=l):Tl=0,Vt(0),null}function Ur(l,u){(l.pooledCacheLanes&=u)===0&&(u=l.pooledCache,u!=null&&(l.pooledCache=null,jl(u)))}function Yi(){if(Yr!==null){var l=Yr,u=wh;wh=0;var g=me(Ml),S=32>g?32:g;g=kt.T;var w=Pi();try{if(ma(S),kt.T=null,Yr===null)var N=!1;else{S=El,El=null;var j=Yr,re=Ml;if(Yr=null,Ml=0,(Ht&6)!==0)throw Error(a(331));var xe=Ht;if(Ht|=4,hu(j.current),qf(j,j.current,re,S),Ht=xe,Vt(0,!1),Fa&&typeof Fa.onPostCommitFiberRoot=="function")try{Fa.onPostCommitFiberRoot(hc,j)}catch{}N=!0}return N}finally{ma(w),kt.T=g,Ur(l,u)}}return!1}function Qf(l,u,g){u=ge(g,u),u=au(l.stateNode,u,2),l=et(l,u,2),l!==null&&(Y(l,2),lt(l))}function Sn(l,u,g){if(l.tag===3)Qf(l,l,g);else for(;u!==null;){if(u.tag===3){Qf(u,l,g);break}else if(u.tag===1){var S=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof S.componentDidCatch=="function"&&(ys===null||!ys.has(S))){l=ge(g,l),g=Xl(2),S=et(u,g,2),S!==null&&(su(g,S,u,l),Y(S,2),lt(S));break}}u=u.return}}function Jf(l,u,g){var S=l.pingCache;if(S===null){S=l.pingCache=new bn;var w=new Set;S.set(u,w)}else w=S.get(u),w===void 0&&(w=new Set,S.set(u,w));w.has(g)||(jr=!0,w.add(g),l=Pg.bind(null,l,u,g),u.then(l,l))}function Pg(l,u,g){var S=l.pingCache;S!==null&&S.delete(u),l.pingedLanes|=l.suspendedLanes&g,l.warmLanes&=~g,vn===l&&(dn&g)===g&&(Nn===4||Nn===3&&(dn&62914560)===dn&&300>ia()-yr?(Ht&2)===0&&Fs(l,0):_a|=g,qr===dn&&(qr=0)),lt(l)}function cl(l,u){u===0&&(u=O()),l=Fe(l,u),l!==null&&(Y(l,u),lt(l))}function ul(l){var u=l.memoizedState,g=0;u!==null&&(g=u.retryLane),cl(l,g)}function sp(l,u){var g=0;switch(l.tag){case 13:var S=l.stateNode,w=l.memoizedState;w!==null&&(g=w.retryLane);break;case 19:S=l.stateNode;break;case 22:S=l.stateNode._retryCache;break;default:throw Error(a(314))}S!==null&&S.delete(u),cl(l,g)}function gu(l,u){return fc(l,u)}function rp(l,u,g,S){this.tag=l,this.key=g,this.sibling=this.child=this.return=this.stateNode=this.t
3946ype=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=u,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=S,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Lr(l){return l=l.prototype,!(!l||!l.isReactComponent)}function pa(l,u){var g=l.alternate;return g===null?(g=t(l.tag,u,l.key,l.mode),g.elementType=l.elementType,g.type=l.type,g.stateNode=l.stateNode,g.alternate=l,l.alternate=g):(g.pendingProps=u,g.type=l.type,g.flags=0,g.subtreeFlags=0,g.deletions=null),g.flags=l.flags&31457280,g.childLanes=l.childLanes,g.lanes=l.lanes,g.child=l.child,g.memoizedProps=l.memoizedProps,g.memoizedState=l.memoizedState,g.updateQueue=l.updateQueue,u=l.dependencies,g.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext},g.sibling=l.sibling,g.index=l.index,g.ref=l.ref,g.refCleanup=l.refCleanup,g}function Or(l,u){l.flags&=31457282;var g=l.alternate;return g===null?(l.childLanes=0,l.lanes=u,l.child=null,l.subtreeFlags=0,l.memoizedProps=null,l.memoizedState=null,l.updateQueue=null,l.dependencies=null,l.stateNode=null):(l.childLanes=g.childLanes,l.lanes=g.lanes,l.child=g.child,l.subtreeFlags=0,l.deletions=null,l.memoizedProps=g.memoizedProps,l.memoizedState=g.memoizedState,l.updateQueue=g.updateQueue,l.type=g.type,u=g.dependencies,l.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext}),l}function As(l,u,g,S,w,N){var j=0;if(S=l,typeof l=="function")Lr(l)&&(j=1);else if(typeof l=="string")j=os&&na?Op(l,g,Zi.current)?26:cc(l)?27:5:os?Op(l,g,Zi.current)?26:5:na&&cc(l)?27:5;else e:switch(l){case sc:return zr(g.children,w,N,u);case fp:j=8,w|=24;break;case hp:return l=t(12,g,u,w|2),l.elementType=hp,l.lanes=N,l;case eh:return l=t(13,g,u,w),l.elementType=eh,l.lanes=N,l;case wo:return l=t(19,g,u,w),l.elementType=wo,l.lanes=N,l;case _u:return $f(g,w,N,u);default:if(typeof l=="object"&&l!==null)switch(l.$$typeof){case Vg:case cr:j=10;break e;case Ao:j=9;break e;case rc:j=11;break e;case yu:j=14;break e;case Gs:j=16,S=null;break e}j=29,g=Error(a(130,l===null?"null":typeof l,"")),S=null}return u=t(j,g,u,w),u.elementType=l,u.type=S,u.lanes=N,u}function zr(l,u,g,S){return l=t(7,l,S,u),l.lanes=g,l}function $f(l,u,g,S){l=t(22,l,S,u),l.elementType=_u,l.lanes=g;var w={_visibility:1,_pendingVisibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null,_current:null,detach:function(){var N=w._current;if(N===null)throw Error(a(456));if((w._pendingVisibility&2)===0){var j=Fe(N,2);j!==null&&(w._pendingVisibility|=2,da(j,N,2))}},attach:function(){var N=w._current;if(N===null)throw Error(a(456));if((w._pendingVisibility&2)!==0){var j=Fe(N,2);j!==null&&(w._pendingVisibility&=-3,da(j,N,2))}}};return l.stateNode=w,l}function To(l,u,g){return l=t(6,l,null,u),l.lanes=g,l}function ac(l,u,g){return u=t(4,l.children!==null?l.children:[],l.key,u),u.lanes=g,u.stateNode={containerInfo:l.containerInfo,pendingChildren:null,implementation:l.implementation},u}function fl(l,u,g,S,w,N,j,re){this.tag=1,this.containerInfo=l,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=ml,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=z(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.finishedLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=z(0),this.hiddenUpdates=z(null),this.identifierPrefix=S,this.onUncaughtError=w,this.onCaughtError=N,this.onRecoverableError=j,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=re,this.incompleteTransitions=new Map}function Wi(l,u,g,S,w,N,j,re,xe,Xe,ht,xt){return l=new fl(l,u,g,j,re,xe,Xe,xt),u=1,N===!0&&(u|=24),N=t(3,null,null,u),l.current=N,N.stateNode=l,u=Pf(),u.refCount++,l.pooledCache=u,u.refCount++,N.memoizedState={element:S,isDehydrated:g,cache:u},Rt(N),l}function vu(l){return l?(l=vl,l):vl}function op(l){var u=l._reactInternals;if(u===void 0)throw typeof l.render=="function"?Error(a(188)):(l=Object.keys(l).join(","),Error(a(268,l)));return l=b(u),l=l!==null?T(l):null,l===null?null:oc(l.stateNode)}function Hg(l,u,g,S,w,N){w=vu(w),S.context===null?S.context=w:S.pendingContext=w,S=Qe(u),S.payload={element:g},N=N===void 0?null:N,N!==null&&(S.callback=N),g=et(l,S,u),g!==null&&(da(g,l,u),Dt(g,l,u))}function Fg(l,u){if(l=l.memoizedState,l!==null&&l.dehydrated!==null){var g=l.retryLane;l.retryLane=g!==0&&g<u?g:u}}function lp(l,u){Fg(l,u),(l=l.alternate)&&Fg(l,u)}var Pt={},cp=Ad(),ea=eB(),hl=Object.assign,up=Symbol.for("react.element"),Ir=Symbol.for("react.transitional.element"),Vs=Symbol.for("react.portal"),sc=Symbol.for("react.fragment"),fp=Symbol.for("react.strict_mode"),hp=Symbol.for("react.profiler"),Vg=Symbol.for("react.provider"),Ao=Symbol.for("react.consumer"),cr=Symbol.for("react.context"),rc=Symbol.for("react.forward_ref"),eh=Symbol.for("react.suspense"),wo=Symbol.for("react.suspense_list"),yu=Symbol.for("react.memo"),Gs=Symbol.for("react.lazy"),_u=Symbol.for("react.offscreen"),Gg=Symbol.for("react.memo_cache_sentinel"),dp=Symbol.iterator,dl=Symbol.for("react.client.reference"),kt=cp.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,th,pp,Ro=!1,Co=Array.isArray,nh=e.rendererVersion,xu=e.rendererPackageName,Su=e.extraDevToolsConfig,oc=e.getPublicInstance,pl=e.getRootHostContext,kg=e.getChildHostContext,No=e.prepareForCommit,mp=e.resetAfterCommit,gp=e.createInstance,ur=e.appendInitialChild,Br=e.finalizeInitialChildren,Do=e.shouldSetTextContent,ih=e.createTextInstance,vp=e.scheduleTimeout,bu=e.cancelTimeout,ml=e.noTimeout,fr=e.isPrimaryRenderer;e.warnsIfNotActing;var ta=e.supportsMutation,ss=e.supportsPersistence,Ra=e.supportsHydration,yp=e.getInstanceFromNode;e.beforeActiveInstanceBlur,e.afterActiveInstanceBlur;var _p=e.preparePortalMount;
3946e.prepareScopeUpdate,e.getInstanceFromScope;var ma=e.setCurrentUpdatePriority,Pi=e.getCurrentUpdatePriority,ws=e.resolveUpdatePriority;e.resolveEventType,e.resolveEventTimeStamp;var Uo=e.shouldAttemptEagerTransition,xp=e.detachDeletedInstance;e.requestPostPaintCallback;var Xg=e.maySuspendCommit,Pr=e.preloadInstance,rs=e.startSuspendingCommit,mi=e.suspendInstance,ah=e.waitForCommitToBeReady,Pa=e.NotPendingTransition,Kt=e.HostTransitionContext,Jn=e.resetFormInstance;e.bindToConsole;var Ui=e.supportsMicrotasks,sh=e.scheduleMicrotask,hr=e.supportsTestSelectors,gl=e.findFiberRoot,rh=e.getBoundingRect,Mu=e.getTextContent,dr=e.isHiddenSubtree,b_=e.matchAccessibilityRole,gi=e.setFocusIfFocusable,Sp=e.setupIntersectionObserver,bp=e.appendChild,jg=e.appendChildToContainer,qg=e.commitTextUpdate,M_=e.commitMount,Mp=e.commitUpdate,Ep=e.insertBefore,Tp=e.insertInContainerBefore,Ca=e.removeChild,Ei=e.removeChildFromContainer,Eu=e.resetTextContent,Tu=e.hideInstance,oh=e.hideTextInstance,Ap=e.unhideInstance,Hr=e.unhideTextInstance,lh=e.clearContainer,wp=e.cloneInstance,ch=e.createContainerChildSet,Rp=e.appendChildToContainerChildSet,Yg=e.finalizeContainerChildren,Cp=e.replaceContainerChildren,Np=e.cloneHiddenInstance,Dp=e.cloneHiddenTextInstance,uh=e.isSuspenseInstancePending,Au=e.isSuspenseInstanceFallback,Wg=e.getSuspenseInstanceFallbackErrorDetails,E_=e.registerSuspenseInstanceRetry,Zg=e.canHydrateFormStateMarker,Kg=e.isFormStateMarkerMatching,Up=e.getNextHydratableSibling,fh=e.getFirstHydratableChild,Qg=e.getFirstHydratableChildWithinContainer,Jg=e.getFirstHydratableChildWithinSuspenseInstance,$g=e.canHydrateInstance,ev=e.canHydrateTextInstance,tv=e.canHydrateSuspenseInstance,T_=e.hydrateInstance,nv=e.hydrateTextInstance,lc=e.hydrateSuspenseInstance,iv=e.getNextHydratableInstanceAfterSuspenseInstance,hh=e.commitHydratedContainer,dh=e.commitHydratedSuspenseInstance,av=e.clearSuspenseBoundary,Lp=e.clearSuspenseBoundaryFromContainer,sv=e.shouldDeleteUnhydratedTailInstances;e.diffHydratedPropsForDevWarnings,e.diffHydratedTextForDevWarnings,e.describeHydratableInstanceForDevWarnings;var rv=e.validateHydratableInstance,ov=e.validateHydratableTextInstance,os=e.supportsResources,Op=e.isHostHoistableType,ph=e.getHoistableRoot,mh=e.getResource,zp=e.acquireResource,Ip=e.releaseResource,Bp=e.hydrateHoistable,Pp=e.mountHoistable,Hp=e.unmountHoistable,A_=e.createHoistableInstance,Fp=e.prepareToCommitHoistables,lv=e.mayResourceSuspendCommit,Vp=e.preloadResource,Gp=e.suspendResource,na=e.supportsSingletons,kp=e.resolveSingletonInstance,w_=e.clearSingleton,R_=e.acquireSingletonInstance,cv=e.releaseSingletonInstance,cc=e.isHostSingletonType,wu=[],Fr=-1,vl={},Ha=Math.clz32?Math.clz32:D,Ru=Math.log,uv=Math.LN2,uc=128,Cu=4194304,fc=ea.unstable_scheduleCallback,Nu=ea.unstable_cancelCallback,fv=ea.unstable_shouldYield,hv=ea.unstable_requestPaint,ia=ea.unstable_now,Xp=ea.unstable_ImmediatePriority,dv=ea.unstable_UserBlockingPriority,gh=ea.unstable_NormalPriority,vh=ea.unstable_IdlePriority,pv=ea.log,jp=ea.unstable_setDisableYieldValue,hc=null,Fa=null,ls=typeof Object.is=="function"?Object.is:ee,yh=new WeakMap,ci=[],vi=0,Du=null,Uu=0,cs=[],us=0,ks=null,pr=1,Rs="",Zi=A(null),Lu=A(null),Xs=A(null),dc=A(null),ga=null,aa=null,Ln=!1,fs=null,Cs=!1,Ou=Error(a(519)),hs=[],Lo=0,pc=0,mc=null,yl=null,zu=!1,Iu=!1,js=!1,Oo=0,Bu=null,_h=0,Va=0,zo=null,Vr=!1,gc=!1,Pu=Object.prototype.hasOwnProperty,Kn=Error(a(460)),qp=Error(a(474)),xh={then:function(){}},_l=null,mr=null,Ns=0,Io=ba(!0),Yp=ba(!1),gr=A(null),ds=A(0),ps=A(null),Ds=null,Li=A(0),vr=0,on=null,Vn=null,Ti=null,Us=!1,ui=!1,Gr=!1,Hu=0,yi=0,vc=null,mv=0,Sh=function(){return{lastEffect:null,events:null,stores:null,memoCache:null}},On={readContext:$i,use:te,useCallback:nn,useContext:nn,useEffect:nn,useImperativeHandle:nn,useLayoutEffect:nn,useInsertionEffect:nn,useMemo:nn,useReducer:nn,useRef:nn,useState:nn,useDebugValue:nn,useDeferredValue:nn,useTransition:nn,useSyncExternalStore:nn,useId:nn};On.useCacheRefresh=nn,On.useMemoCache=nn,On.useHostTransitionStatus=nn,On.useFormState=nn,On.useActionState=nn,On.useOptimistic=nn;var Oi={readContext:$i,use:te,useCallback:function(l,u){return $().memoizedState=[l,u===void 0?null:u],l},useContext:$i,useEffect:zd,useImperativeHandle:function(l,u,g){g=g!=null?g.concat([l]):null,Rf(4194308,4,$c.bind(null,u,l),g)},useLayoutEffect:function(l,u){return Rf(4194308,4,l,u)},useInsertionEffect:function(l,u){Rf(4,2,l,u)},useMemo:function(l,u){var g=$();u=u===void 0?null:u;var S=l();if(Gr){Q(!0);try{l()}finally{Q(!1)}}return g.memoizedState=[S,u],S},useReducer:function(l,u,g){var S=$();if(g!==void 0){var w=g(u);if(Gr){Q(!0);try{g(u)}finally{Q(!1)}}}else w=u;return S.memoizedState=S.baseState=w,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:w},S.queue=l,l=l.dispatch=co.bind(null,on,l),[S.memoizedState,l]}
3946,useRef:function(l){var u=$();return l={current:l},u.memoizedState=l},useState:function(l){l=Nt(l);var u=l.queue,g=Uf.bind(null,on,u);return u.dispatch=g,[l.memoizedState,g]},useDebugValue:eu,useDeferredValue:function(l,u){var g=$();return lo(g,l,u)},useTransition:function(){var l=Nt(!1);return l=Nf.bind(null,on,l.queue,!0,!1),$().memoizedState=l,[!1,l]},useSyncExternalStore:function(l,u,g){var S=on,w=$();if(Ln){if(g===void 0)throw Error(a(407));g=g()}else{if(g=u(),vn===null)throw Error(a(349));(dn&60)!==0||pt(S,u,g)}w.memoizedState=g;var N={value:g,getSnapshot:u};return w.queue=N,zd(Jt.bind(null,S,N,l),[l]),S.flags|=2048,Ea(9,zt.bind(null,S,N,g,u),{destroy:void 0},null),g},useId:function(){var l=$(),u=vn.identifierPrefix;if(Ln){var g=Rs,S=pr;g=(S&~(1<<32-Ha(S)-1)).toString(32)+g,u=":"+u+"R"+g,g=Hu++,0<g&&(u+="H"+g.toString(32)),u+=":"}else g=mv++,u=":"+u+"r"+g.toString(32)+":";return l.memoizedState=u},useCacheRefresh:function(){return $().memoizedState=tu.bind(null,on)}};Oi.useMemoCache=Be,Oi.useHostTransitionStatus=tl,Oi.useFormState=kn,Oi.useActionState=kn,Oi.useOptimistic=function(l){var u=$();u.memoizedState=u.baseState=l;var g={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return u.queue=g,u=Lf.bind(null,on,!0,g),g.dispatch=u,[l,u]};var va={readContext:$i,use:te,useCallback:Cf,useContext:$i,useEffect:Jc,useImperativeHandle:nr,useInsertionEffect:vg,useLayoutEffect:yg,useMemo:el,useReducer:Ge,useRef:$o,useState:function(){return Ge(Ue)},useDebugValue:eu,useDeferredValue:function(l,u){var g=ne();return Id(g,Vn.memoizedState,l,u)},useTransition:function(){var l=Ge(Ue)[0],u=ne().memoizedState;return[typeof l=="boolean"?l:ae(l),u]},useSyncExternalStore:yt,useId:ir};va.useCacheRefresh=Df,va.useMemoCache=Be,va.useHostTransitionStatus=tl,va.useFormState=fi,va.useActionState=fi,va.useOptimistic=function(l,u){var g=ne();return mt(g,Vn,l,u)};var Bo={readContext:$i,use:te,useCallback:Cf,useContext:$i,useEffect:Jc,useImperativeHandle:nr,useInsertionEffect:vg,useLayoutEffect:yg,useMemo:el,useReducer:st,useRef:$o,useState:function(){return st(Ue)},useDebugValue:eu,useDeferredValue:function(l,u){var g=ne();return Vn===null?lo(g,l,u):Id(g,Vn.memoizedState,l,u)},useTransition:function(){var l=st(Ue)[0],u=ne().memoizedState;return[typeof l=="boolean"?l:ae(l),u]},useSyncExternalStore:yt,useId:ir};Bo.useCacheRefresh=Df,Bo.useMemoCache=Be,Bo.useHostTransitionStatus=tl,Bo.useFormState=Jo,Bo.useActionState=Jo,Bo.useOptimistic=function(l,u){var g=ne();return Vn!==null?mt(g,Vn,l,u):(g.baseState=l,[l,g.queue.dispatch])};var bh={isMounted:function(l){return(l=l._reactInternals)?y(l)===l:!1},enqueueSetState:function(l,u,g){l=l._reactInternals;var S=wa(),w=Qe(S);w.payload=u,g!=null&&(w.callback=g),u=et(l,w,S),u!==null&&(da(u,l,S),Dt(u,l,S))},enqueueReplaceState:function(l,u,g){l=l._reactInternals;var S=wa(),w=Qe(S);w.tag=1,w.payload=u,g!=null&&(w.callback=g),u=et(l,w,S),u!==null&&(da(u,l,S),Dt(u,l,S))},enqueueForceUpdate:function(l,u){l=l._reactInternals;var g=wa(),S=Qe(g);S.tag=2,u!=null&&(S.callback=u),u=et(l,S,g),u!==null&&(da(u,l,g),Dt(u,l,g))}},Wp=typeof reportError=="function"?reportError:function(l){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var u=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof l=="object"&&l!==null&&typeof l.message=="string"?String(l.message):String(l),error:l});if(!window.dispatchEvent(u))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",l);return}console.error(l)},gv=Error(a(461)),Ai=!1,ya={dehydrated:null,treeContext:null,retryLane:0},Ga=A(null),Po=null,_i=null,vv=typeof AbortController<"u"?AbortController:function(){var l=[],u=this.signal={aborted:!1,addEventListener:function(g,S){l.push(S)}};this.abort=function(){u.aborted=!0,l.forEach(function(g){return g()})}},kr=ea.unstable_scheduleCallback,xl=ea.unstable_NormalPriority,jn={$$typeof:cr,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0},Mh=kt.S;kt.S=function(l,u){typeof u=="object"&&u!==null&&typeof u.then=="function"&&Pe(l,u),Mh!==null&&Mh(l,u)};var Xr=A(null),Hi=!1,hi=!1,Ho=!1,yc=typeof WeakSet=="function"?WeakSet:Set,xi=null,Sl=!1,wi=null,ka=!1,Na=null,bl=8192,Eh={getCacheForType:function(l){var u=$i(jn),g=u.data.get(l);return g===void 0&&(g=l(),u.data.set(l,g)),g}},Fu=0,Th=1,Ah=2,Cn=3,qn=4;if(typeof Symbol=="function"&&Symbol.for){var ln=Symbol.for;Fu=ln("selector.component"),Th=ln("selector.has_pseudo_class"),Ah=ln("selector.role"),Cn=ln("selector.test_id"),qn=ln("selector.text")}var bn=typeof WeakMap=="function"?WeakMap:Map,Ht=0,vn=null,tn=null,dn=0,$n=0,Ri=null,Yn=!1,ms=!1,jr=!1,qs=0,Nn=0,gs=0,Ys=0,_a=0,Xa=0,qr=0,_c=null,vs=null,xc=!1,yr=0,di=1/0,Ws=null,ys=null,
3946Ls=!1,Yr=null,Ml=0,wh=0,El=null,Tl=0,Da=null;return Pt.attemptContinuousHydration=function(l){if(l.tag===13){var u=Fe(l,67108864);u!==null&&da(u,l,67108864),lp(l,67108864)}},Pt.attemptHydrationAtCurrentPriority=function(l){if(l.tag===13){var u=wa(),g=Fe(l,u);g!==null&&da(g,l,u),lp(l,u)}},Pt.attemptSynchronousHydration=function(l){switch(l.tag){case 3:if(l=l.stateNode,l.current.memoizedState.isDehydrated){var u=U(l.pendingLanes);if(u!==0){for(l.pendingLanes|=2,l.entangledLanes|=2;u;){var g=1<<31-Ha(u);l.entanglements[1]|=g,u&=~g}lt(l),(Ht&6)===0&&(di=ia()+500,Vt(0))}}break;case 13:u=Fe(l,2),u!==null&&da(u,l,2),ip(),lp(l,2)}},Pt.batchedUpdates=function(l,u){return l(u)},Pt.createComponentSelector=function(l){return{$$typeof:Fu,value:l}},Pt.createContainer=function(l,u,g,S,w,N,j,re,xe,Xe){return Wi(l,u,!1,null,g,S,N,j,re,xe,Xe,null)},Pt.createHasPseudoClassSelector=function(l){return{$$typeof:Th,value:l}},Pt.createHydrationContainer=function(l,u,g,S,w,N,j,re,xe,Xe,ht,xt,Mt){return l=Wi(g,S,!0,l,w,N,re,xe,Xe,ht,xt,Mt),l.context=vu(null),g=l.current,S=wa(),w=Qe(S),w.callback=u??null,et(g,w,S),l.current.lanes=S,Y(l,S),lt(l),l},Pt.createPortal=function(l,u,g){var S=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Vs,key:S==null?null:""+S,children:l,containerInfo:u,implementation:g}},Pt.createRoleSelector=function(l){return{$$typeof:Ah,value:l}},Pt.createTestNameSelector=function(l){return{$$typeof:Cn,value:l}},Pt.createTextSelector=function(l){return{$$typeof:qn,value:l}},Pt.defaultOnCaughtError=function(l){console.error(l)},Pt.defaultOnRecoverableError=function(l){Wp(l)},Pt.defaultOnUncaughtError=function(l){Wp(l)},Pt.deferredUpdates=function(l){var u=kt.T,g=Pi();try{return ma(32),kt.T=null,l()}finally{ma(g),kt.T=u}},Pt.discreteUpdates=function(l,u,g,S,w){var N=kt.T,j=Pi();try{return ma(2),kt.T=null,l(u,g,S,w)}finally{ma(j),kt.T=N,Ht===0&&(di=ia()+500)}},Pt.findAllNodes=Aa,Pt.findBoundingRects=function(l,u){if(!hr)throw Error(a(363));u=Aa(l,u),l=[];for(var g=0;g<u.length;g++)l.push(rh(u[g]));for(u=l.length-1;0<u;u--){g=l[u];for(var S=g.x,w=S+g.width,N=g.y,j=N+g.height,re=u-1;0<=re;re--)if(u!==re){var xe=l[re],Xe=xe.x,ht=Xe+xe.width,xt=xe.y,Mt=xt+xe.height;if(S>=Xe&&N>=xt&&w<=ht&&j<=Mt){l.splice(u,1);break}else if(S!==Xe||g.width!==xe.width||Mt<N||xt>j){if(!(N!==xt||g.height!==xe.height||ht<S||Xe>w)){Xe>S&&(xe.width+=Xe-S,xe.x=S),ht<w&&(xe.width=w-Xe),l.splice(u,1);break}}else{xt>N&&(xe.height+=xt-N,xe.y=N),Mt<j&&(xe.height=j-xt),l.splice(u,1);break}}}return l},Pt.findHostInstance=op,Pt.findHostInstanceWithNoPortals=function(l){return l=b(l),l=l!==null?R(l):null,l===null?null:oc(l.stateNode)},Pt.findHostInstanceWithWarning=function(l){return op(l)},Pt.flushPassiveEffects=Yi,Pt.flushSyncFromReconciler=function(l){var u=Ht;Ht|=1;var g=kt.T,S=Pi();try{if(ma(2),kt.T=null,l)return l()}finally{ma(S),kt.T=g,Ht=u,(Ht&6)===0&&Vt(0)}},Pt.flushSyncWork=ip,Pt.focusWithin=function(l,u){if(!hr)throw Error(a(363));for(l=Wf(l),u=Ig(l,u),u=Array.from(u),l=0;l<u.length;){var g=u[l++],S=g.tag;if(!dr(g)){if((S===5||S===26||S===27)&&gi(g.stateNode))return!0;for(g=g.child;g!==null;)u.push(g),g=g.sibling}}return!1},Pt.getFindAllNodesFailureDescription=function(l,u){if(!hr)throw Error(a(363));var g=0,S=[];l=[Wf(l),0];for(var w=0;w<l.length;){var N=l[w++],j=N.tag,re=l[w++],xe=u[re];if((j!==5&&j!==26&&j!==27||!dr(N))&&(nc(N,xe)&&(S.push(Mo(xe)),re++,re>g&&(g=re)),re<u.length))for(N=N.child;N!==null;)l.push(N,re),N=N.sibling}if(g<u.length){for(l=[];g<u.length;g++)l.push(Mo(u[g]));return`findAllNodes was able to match part of the selector:
3947  `+(S.join(" > ")+`
3948
3949No matching component was found for:
3950  `)+l.join(" > ")}return null},Pt.getPublicRootInstance=function(l){if(l=l.current,!l.child)return null;switch(l.child.tag){case 27:case 5:return oc(l.child.stateNode);default:return l.child.stateNode}},Pt.injectIntoDevTools=function(){var l={bundleType:0,version:nh,rendererPackageName:xu,currentDispatcherRef:kt,findFiberByHostInstance:yp,reconcilerVersion:"19.0.0"};if(Su!==null&&(l.rendererConfig=Su),typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")l=!1;else{var u=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(u.isDisabled||!u.supportsFiber)l=!0;else{try{hc=u.inject(l),Fa=u}catch{}l=!!u.checkDCE}}return l},Pt.isAlreadyRendering=function(){return!1},Pt.observeVisibleRects=function(l,u,g,S){if(!hr)throw Error(a(363));l=Aa(l,u);var w=Sp(l,g,S).disconnect;return{disconnect:function(){w()}}},Pt.shouldError=function(){return null},Pt.shouldSuspend=function(){return!1},Pt.startHostTransition=function(l,u,g,S){if(l.tag!==5)throw Error(a(476));var w=Bd(l).queue;Nf(l,w,u,Pa,g===null?n:function(){var N=Bd(l).next.queue;return uo(l,N,{},wa()),g(S)})},Pt.updateContainer=function(l,u,g,S){var w=u.current,N=wa();return Hg(w,N,l,u,g,S),N},Pt.updateContainerSync=function(l,u,g,S){return u.tag===0&&Yi(),Hg(u.current,2,l,u,g,S),2},Pt},s.exports.default=s.exports,Object.defineProperty(s.exports,"__esModule",{value:!0})})(rS)),rS.exports}var hT;function nB(){return hT||(hT=1,sS.exports=tB()),sS.exports}var iB=nB();const aB=tb(iB);var cS={exports:{}},uS={};/**
3951 * @license React
3952 * scheduler.production.js
3953 *
3954 * Copyright (c) Meta Platforms, Inc. and affiliates.
3955 *
3956 * This source code is licensed under the MIT license found in the
3957 * LICENSE file in the root directory of this source tree.
3958 */var dT;function sB(){return dT||(dT=1,(function(s){function e(P,Q){var ee=P.length;P.push(Q);e:for(;0<ee;){var ge=ee-1>>>1,Se=P[ge];
3958if(0<a(Se,Q))P[ge]=Q,P[ee]=Se,ee=ge;else break e}}function t(P){return P.length===0?null:P[0]}function n(P){if(P.length===0)return null;var Q=P[0],ee=P.pop();if(ee!==Q){P[0]=ee;e:for(var ge=0,Se=P.length,W=Se>>>1;ge<W;){var fe=2*(ge+1)-1,Ce=P[fe],Le=fe+1,nt=P[Le];if(0>a(Ce,ee))Le<Se&&0>a(nt,Ce)?(P[ge]=nt,P[Le]=ee,ge=Le):(P[ge]=Ce,P[fe]=ee,ge=fe);else if(Le<Se&&0>a(nt,ee))P[ge]=nt,P[Le]=ee,ge=Le;else break e}}return Q}function a(P,Q){var ee=P.sortIndex-Q.sortIndex;return ee!==0?ee:P.id-Q.id}if(s.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;s.unstable_now=function(){return o.now()}}else{var c=Date,h=c.now();s.unstable_now=function(){return c.now()-h}}var d=[],p=[],v=1,y=null,_=3,b=!1,T=!1,R=!1,A=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate<"u"?setImmediate:null;function D(P){for(var Q=t(p);Q!==null;){if(Q.callback===null)n(p);else if(Q.startTime<=P)n(p),Q.sortIndex=Q.expirationTime,e(d,Q);else break;Q=t(p)}}function U(P){if(R=!1,D(P),!T)if(t(d)!==null)T=!0,he();else{var Q=t(p);Q!==null&&me(U,Q.startTime-P)}}var H=!1,F=-1,G=5,V=-1;function O(){return!(s.unstable_now()-V<G)}function z(){if(H){var P=s.unstable_now();V=P;var Q=!0;try{e:{T=!1,R&&(R=!1,M(F),F=-1),b=!0;var ee=_;try{t:{for(D(P),y=t(d);y!==null&&!(y.expirationTime>P&&O());){var ge=y.callback;if(typeof ge=="function"){y.callback=null,_=y.priorityLevel;var Se=ge(y.expirationTime<=P);if(P=s.unstable_now(),typeof Se=="function"){y.callback=Se,D(P),Q=!0;break t}y===t(d)&&n(d),D(P)}else n(d);y=t(d)}if(y!==null)Q=!0;else{var W=t(p);W!==null&&me(U,W.startTime-P),Q=!1}}break e}finally{y=null,_=ee,b=!1}Q=void 0}}finally{Q?Y():H=!1}}}var Y;if(typeof C=="function")Y=function(){C(z)};else if(typeof MessageChannel<"u"){var se=new MessageChannel,ce=se.port2;se.port1.onmessage=z,Y=function(){ce.postMessage(null)}}else Y=function(){A(z,0)};function he(){H||(H=!0,Y())}function me(P,Q){F=A(function(){P(s.unstable_now())},Q)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(P){P.callback=null},s.unstable_continueExecution=function(){T||b||(T=!0,he())},s.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):G=0<P?Math.floor(1e3/P):5},s.unstable_getCurrentPriorityLevel=function(){return _},s.unstable_getFirstCallbackNode=function(){return t(d)},s.unstable_next=function(P){switch(_){case 1:case 2:case 3:var Q=3;break;default:Q=_}var ee=_;_=Q;try{return P()}finally{_=ee}},s.unstable_pauseExecution=function(){},s.unstable_requestPaint=function(){},s.unstable_runWithPriority=function(P,Q){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var ee=_;_=P;try{return Q()}finally{_=ee}},s.unstable_scheduleCallback=function(P,Q,ee){var ge=s.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?ge+ee:ge):ee=ge,P){case 1:var Se=-1;break;case 2:Se=250;break;case 5:Se=1073741823;break;case 4:Se=1e4;break;default:Se=5e3}return Se=ee+Se,P={id:v++,callback:Q,priorityLevel:P,startTime:ee,expirationTime:Se,sortIndex:-1},ee>ge?(P.sortIndex=ee,e(p,P),t(d)===null&&P===t(p)&&(R?(M(F),F=-1):R=!0,me(U,ee-ge))):(P.sortIndex=Se,e(d,P),T||b||(T=!0,he())),P},s.unstable_shouldYield=O,s.unstable_wrapCallback=function(P){var Q=_;return function(){var ee=_;_=Q;try{return P.apply(this,arguments)}finally{_=ee}}}})(uS)),uS}var pT;function rB(){return pT||(pT=1,cS.exports=sB()),cS.exports}var mT=rB();function e1(s,e,t){if(!s)return;if(t(s)===!0)return s;let n=e?s.return:s.child;for(;n;){const a=e1(n,e,t);if(a)return a;n=e?null:n.sibling}}function J2(s){try{return Object.defineProperties(s,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return s}}const t1=J2(le.createContext(null));class $2 extends le.Component{render(){return le.createElement(t1.Provider,{value:this._reactInternals},this.props.children)}}function ew(){const s=le.useContext(t1);if(s===null)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const e=le.useId();return le.useMemo(()=>{for(const t of[s,s?.alternate]){if(!t)continue;const n=e1(t,!1,a=>{let o=a.memoizedState;for(;o;){if(o.memoizedState===e)return!0;o=o.next}});if(n)return n}},[s,e])}const oB=Symbol.for("react.context"),lB=s=>s!==null&&typeof s=="object"&&"$$typeof"in s&&s.$$typeof===oB;function cB(){const s=ew(),[e]=le.useState(()=>new Map);e.clear();let t=s;for(;t;){const n=t.type;lB(n)&&n!==t1&&!e.has(n)&&e.set(n,le.use(J2(n))),t=t.return}return e}function uB(){const s=cB();return le.useMemo(()=>Array.from(s.keys()).reduce((e,t)=>
3958n=>le.createElement(e,null,le.createElement(t.Provider,{...n,value:s.get(t)})),e=>le.createElement($2,{...e})),[s])}function tw(s){let e=s.root;for(;e.getState().previousRoot;)e=e.getState().previousRoot;return e}const nw=s=>s&&s.isOrthographicCamera,fB=s=>s&&s.hasOwnProperty("current"),hB=s=>s!=null&&(typeof s=="string"||typeof s=="number"||s.isColor),mg=((s,e)=>typeof window<"u"&&(((s=window.document)==null?void 0:s.createElement)||((e=window.navigator)==null?void 0:e.product)==="ReactNative"))()?le.useLayoutEffect:le.useEffect;function n1(s){const e=le.useRef(s);return mg(()=>void(e.current=s),[s]),e}function dB(){const s=ew(),e=uB();return le.useMemo(()=>({children:t})=>{const a=!!e1(s,!0,o=>o.type===le.StrictMode)?le.StrictMode:le.Fragment;return Z.jsx(a,{children:Z.jsx(e,{children:t})})},[s,e])}function pB({set:s}){return mg(()=>(s(new Promise(()=>null)),()=>s(!1)),[s]),null}const mB=(s=>(s=class extends le.Component{constructor(...t){super(...t),this.state={error:!1}}componentDidCatch(t){this.props.set(t)}render(){return this.state.error?null:this.props.children}},s.getDerivedStateFromError=()=>({error:!0}),s))();function iw(s){var e;const t=typeof window<"u"?(e=window.devicePixelRatio)!=null?e:2:1;return Array.isArray(s)?Math.min(Math.max(s[0],t),s[1]):s}function td(s){var e;return(e=s.__r3f)==null?void 0:e.root.getState()}const Si={obj:s=>s===Object(s)&&!Si.arr(s)&&typeof s!="function",fun:s=>typeof s=="function",str:s=>typeof s=="string",num:s=>typeof s=="number",boo:s=>typeof s=="boolean",und:s=>s===void 0,nul:s=>s===null,arr:s=>Array.isArray(s),equ(s,e,{arrays:t="shallow",objects:n="reference",strict:a=!0}={}){if(typeof s!=typeof e||!!s!=!!e)return!1;if(Si.str(s)||Si.num(s)||Si.boo(s))return s===e;const o=Si.obj(s);if(o&&n==="reference")return s===e;const c=Si.arr(s);if(c&&t==="reference")return s===e;if((c||o)&&s===e)return!0;let h;for(h in s)if(!(h in e))return!1;if(o&&t==="shallow"&&n==="shallow"){for(h in a?e:s)if(!Si.equ(s[h],e[h],{strict:a,objects:"reference"}))return!1}else for(h in a?e:s)if(s[h]!==e[h])return!1;if(Si.und(h)){if(c&&s.length===0&&e.length===0||o&&Object.keys(s).length===0&&Object.keys(e).length===0)return!0;if(s!==e)return!1}return!0}};function gB(s){const e={nodes:{},materials:{},meshes:{}};return s&&s.traverse(t=>{t.name&&(e.nodes[t.name]=t),t.material&&!e.materials[t.material.name]&&(e.materials[t.material.name]=t.material),t.isMesh&&!e.meshes[t.name]&&(e.meshes[t.name]=t)}),e}function vB(s){s.type!=="Scene"&&(s.dispose==null||s.dispose());for(const e in s){const t=s[e];t?.type!=="Scene"&&(t==null||t.dispose==null||t.dispose())}}const aw=["children","key","ref"];function yB(s){const e={};for(const t in s)aw.includes(t)||(e[t]=s[t]);return e}function Ny(s,e,t,n){const a=s;let o=a?.__r3f;return o||(o={root:e,type:t,parent:null,children:[],props:yB(n),object:a,eventCount:0,handlers:{},isHidden:!1},a&&(a.__r3f=o)),o}function Zm(s,e){if(!e.includes("-"))return{root:s,key:e,target:s[e]};if(e in s)return{root:s,key:e,target:s[e]};let t=s;const n=e.split("-");for(const a of n){if(typeof t!="object"||t===null){if(t!==void 0){const o=n.slice(n.indexOf(a)).join("-");return{root:t,key:o,target:void 0}}return{root:s,key:e,target:void 0}}e=a,s=t,t=t[e]}return{root:s,key:e,target:t}}const gT=/-\d+$/;function Dy(s,e){if(Si.str(e.props.attach)){if(gT.test(e.props.attach)){const a=e.props.attach.replace(gT,""),{root:o,key:c}=Zm(s.object,a);Array.isArray(o[c])||(o[c]=[])}const{root:t,key:n}=Zm(s.object,e.props.attach);e.previousAttach=t[n],t[n]=e.object}else Si.fun(e.props.attach)&&(e.previousAttach=e.props.attach(s.object,e.object))}function Uy(s,e){if(Si.str(e.props.attach)){const{root:t,key:n}=Zm(s.object,e.props.attach),a=e.previousAttach;a===void 0?delete t[n]:t[n]=a}else e.previousAttach==null||e.previousAttach(s.object,e.object);delete e.previousAttach}const jS=[...aw,"args","dispose","attach","object","onUpdate","dispose"],vT=new Map;function _B(s){let e=vT.get(s.constructor);try{e||(e=new s.constructor,vT.set(s.constructor,e))}catch{}return e}function xB(s,e){const t={};for(const n in e)if(!jS.includes(n)&&!Si.equ(e[n],s.props[n])){t[n]=e[n];for(const a in e)a.startsWith(`${n}-`)&&(t[a]=e[a])}for(const n in s.props){if(jS.includes(n)||e.hasOwnProperty(n))continue;const{root:a,key:o}=Zm(s.object,n);if(a.constructor&&a.constructor.length===0){const c=_B(a);Si.und(c)||(t[o]=c[o])}else t[o]=0}return t}const SB=["map","emissiveMap","sheenColorMap","specularColorMap","envMap"],bB=/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/;function Xo(s,e){var t;const n=s.__r3f,a=n&&tw(n).getState(),o=n?.eventCount;for(const h in e){let d=e[h];if(jS.includes(h))continue;if(n&&bB.test(h)){typeof d=="function"?n.handlers[h]=d:delete n.handlers[h],n.eventCount=Object.keys(n.handlers).length;continue}if(d===void 0)continue;let{root:p,key:v,target:y}=Zm(s,h);if(y===void 0&&(typeof p!="object"||p===null))throw Error(`R3F: Cannot set "${h}". Ensure it is an object before setting "${v}".`);if(y instanceof Sd&&d instanceof Sd)y.mask=d.mask;else if(y instanceof _t&&hB(d))y.set(d);else if(y!==null&&typeof y=="object"&&typeof y.set=="function"&&typeof y.copy=="function"&&d!=null&&d.constructor&&y.c
3958onstructor===d.constructor)y.copy(d);else if(y!==null&&typeof y=="object"&&typeof y.set=="function"&&Array.isArray(d))typeof y.fromArray=="function"?y.fromArray(d):y.set(...d);else if(y!==null&&typeof y=="object"&&typeof y.set=="function"&&typeof d=="number")typeof y.setScalar=="function"?y.setScalar(d):y.set(d);else{var c;p[v]=d,a&&!a.linear&&SB.includes(v)&&(c=p[v])!=null&&c.isTexture&&p[v].format===ki&&p[v].type===Es&&(p[v].colorSpace=Ii)}}if(n!=null&&n.parent&&a!=null&&a.internal&&(t=n.object)!=null&&t.isObject3D&&o!==n.eventCount){const h=n.object,d=a.internal.interaction.indexOf(h);d>-1&&a.internal.interaction.splice(d,1),n.eventCount&&h.raycast!==null&&a.internal.interaction.push(h)}return n&&n.props.attach===void 0&&(n.object.isBufferGeometry?n.props.attach="geometry":n.object.isMaterial&&(n.props.attach="material")),n&&Od(n),s}function Od(s){var e;if(!s.parent)return;s.props.onUpdate==null||s.props.onUpdate(s.object);const t=(e=s.root)==null||e.getState==null?void 0:e.getState();t&&t.internal.frames===0&&t.invalidate()}function sw(s,e){s.manual||(nw(s)?(s.left=e.width/-2,s.right=e.width/2,s.top=e.height/2,s.bottom=e.height/-2):s.aspect=e.width/e.height,s.updateProjectionMatrix())}const Ss=s=>s?.isObject3D;function R0(s){return(s.eventObject||s.object).uuid+"/"+s.index+s.instanceId}function rw(s,e,t,n){const a=t.get(e);a&&(t.delete(e),t.size===0&&(s.delete(n),a.target.releasePointerCapture(n)))}function MB(s,e){const{internal:t}=s.getState();t.interaction=t.interaction.filter(n=>n!==e),t.initialHits=t.initialHits.filter(n=>n!==e),t.hovered.forEach((n,a)=>{(n.eventObject===e||n.object===e)&&t.hovered.delete(a)}),t.capturedMap.forEach((n,a)=>{rw(t.capturedMap,e,n,a)})}function EB(s){function e(d){const{internal:p}=s.getState(),v=d.offsetX-p.initialClick[0],y=d.offsetY-p.initialClick[1];return Math.round(Math.sqrt(v*v+y*y))}function t(d){return d.filter(p=>["Move","Over","Enter","Out","Leave"].some(v=>{var y;return(y=p.__r3f)==null?void 0:y.handlers["onPointer"+v]}))}function n(d,p){const v=s.getState(),y=new Set,_=[],b=p?p(v.internal.interaction):v.internal.interaction;for(let M=0;M<b.length;M++){const C=td(b[M]);C&&(C.raycaster.camera=void 0)}v.previousRoot||v.events.compute==null||v.events.compute(d,v);function T(M){const C=td(M);if(!C||!C.events.enabled||C.raycaster.camera===null)return[];if(C.raycaster.camera===void 0){var D;C.events.compute==null||C.events.compute(d,C,(D=C.previousRoot)==null?void 0:D.getState()),C.raycaster.camera===void 0&&(C.raycaster.camera=null)}return C.raycaster.camera?C.raycaster.intersectObject(M,!0):[]}let R=b.flatMap(T).sort((M,C)=>{const D=td(M.object),U=td(C.object);return!D||!U?M.distance-C.distance:U.events.priority-D.events.priority||M.distance-C.distance}).filter(M=>{const C=R0(M);return y.has(C)?!1:(y.add(C),!0)});v.events.filter&&(R=v.events.filter(R,v));for(const M of R){let C=M.object;for(;C;){var A;(A=C.__r3f)!=null&&A.eventCount&&_.push({...M,eventObject:C}),C=C.parent}}if("pointerId"in d&&v.internal.capturedMap.has(d.pointerId))for(let M of v.internal.capturedMap.get(d.pointerId).values())y.has(R0(M.intersection))||_.push(M.intersection);return _}function a(d,p,v,y){if(d.length){const _={stopped:!1};for(const b of d){let T=td(b.object);if(T||b.object.traverseAncestors(R=>{const A=td(R);if(A)return T=A,!1}),T){const{raycaster:R,pointer:A,camera:M,internal:C}=T,D=new K(A.x,A.y,0).unproject(M),U=O=>{var z,Y;return(z=(Y=C.capturedMap.get(O))==null?void 0:Y.has(b.eventObject))!=null?z:!1},H=O=>{const z={intersection:b,target:p.target};C.capturedMap.has(O)?C.capturedMap.get(O).set(b.eventObject,z):C.capturedMap.set(O,new Map([[b.eventObject,z]])),p.target.setPointerCapture(O)},F=O=>{const z=C.capturedMap.get(O);z&&rw(C.capturedMap,b.eventObject,z,O)};let G={};for(let O in p){let z=p[O];typeof z!="function"&&(G[O]=z)}let V={...b,...G,pointer:A,intersections:d,stopped:_.stopped,delta:v,unprojectedPoint:D,ray:R.ray,camera:M,stopPropagation(){const O="pointerId"in p&&C.capturedMap.get(p.pointerId);if((!O||O.has(b.eventObject))&&(V.stopped=_.stopped=!0,C.hovered.size&&Array.from(C.hovered.values()).find(z=>z.eventObject===b.eventObject))){const z=d.slice(0,d.indexOf(b));o([...z,b])}},target:{hasPointerCapture:U,setPointerCapture:H,releasePointerCapture:F},currentTarget:{hasPointerCapture:U,setPointerCapture:H,releasePointerCapture:F},nativeEvent:p};if(y(V),_.stopped===!0)break}}}return d}function o(d){const{internal:p}=s.getState();for(const v of p.hovered.values())if(!d.length||!d.find(y=>y.object===v.object&&y.index===v.index&&y.instanceId===v.instanceId)){const _=v.eventObject.__r3f;if(p.hovered.delete(R0(v)),_!=null&&_.eventCount){const b=_.handlers,T={...v,intersections:d};b.onPointerOut==null||b.onPointerOut(T),b.onPointerLeave==null||b.onPointerLeave(T)}}}function c(d,p){for(let v=0;v<p.length;v++){const y=p[v].__r3f;y==null||y.handlers.onPointerMissed==null||y.handlers.onPointerMissed(d)}}function h(d){switch(d){case"onPointerLeave":case"onPointerCancel":return()=>o([]);case"onLostPointerCapture":return p=>{const{internal:v}
3958=s.getState();"pointerId"in p&&v.capturedMap.has(p.pointerId)&&requestAnimationFrame(()=>{v.capturedMap.has(p.pointerId)&&(v.capturedMap.delete(p.pointerId),o([]))})}}return function(v){const{onPointerMissed:y,internal:_}=s.getState();_.lastEvent.current=v;const b=d==="onPointerMove",T=d==="onClick"||d==="onContextMenu"||d==="onDoubleClick",A=n(v,b?t:void 0),M=T?e(v):0;d==="onPointerDown"&&(_.initialClick=[v.offsetX,v.offsetY],_.initialHits=A.map(D=>D.eventObject)),T&&!A.length&&M<=2&&(c(v,_.interaction),y&&y(v)),b&&o(A);function C(D){const U=D.eventObject,H=U.__r3f;if(!(H!=null&&H.eventCount))return;const F=H.handlers;if(b){if(F.onPointerOver||F.onPointerEnter||F.onPointerOut||F.onPointerLeave){const G=R0(D),V=_.hovered.get(G);V?V.stopped&&D.stopPropagation():(_.hovered.set(G,D),F.onPointerOver==null||F.onPointerOver(D),F.onPointerEnter==null||F.onPointerEnter(D))}F.onPointerMove==null||F.onPointerMove(D)}else{const G=F[d];G?(!T||_.initialHits.includes(U))&&(c(v,_.interaction.filter(V=>!_.initialHits.includes(V))),G(D)):T&&_.initialHits.includes(U)&&c(v,_.interaction.filter(V=>!_.initialHits.includes(V)))}}a(A,v,M,C)}}return{handlePointer:h}}const yT=s=>!!(s!=null&&s.render),i1=le.createContext(null),TB=(s,e)=>{const t=Z2((h,d)=>{const p=new K,v=new K,y=new K;function _(M=d().camera,C=v,D=d().size){const{width:U,height:H,top:F,left:G}=D,V=U/H;C.isVector3?y.copy(C):y.set(...C);const O=M.getWorldPosition(p).distanceTo(y);if(nw(M))return{width:U/M.zoom,height:H/M.zoom,top:F,left:G,factor:1,distance:O,aspect:V};{const z=M.fov*Math.PI/180,Y=2*Math.tan(z/2)*O,se=Y*(U/H);return{width:se,height:Y,top:F,left:G,factor:U/se,distance:O,aspect:V}}}let b;const T=M=>h(C=>({performance:{...C.performance,current:M}})),R=new Je;return{set:h,get:d,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},scene:null,xr:null,invalidate:(M=1)=>s(d(),M),advance:(M,C)=>e(M,C,d()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new Yb,pointer:R,mouse:R,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{const M=d();b&&clearTimeout(b),M.performance.current!==M.performance.min&&T(M.performance.min),b=setTimeout(()=>T(d().performance.max),M.performance.debounce)}},size:{width:0,height:0,top:0,left:0},viewport:{initialDpr:0,dpr:0,width:0,height:0,top:0,left:0,aspect:0,distance:0,factor:0,getCurrentViewport:_},setEvents:M=>h(C=>({...C,events:{...C.events,...M}})),setSize:(M,C,D=0,U=0)=>{const H=d().camera,F={width:M,height:C,top:D,left:U};h(G=>({size:F,viewport:{...G.viewport,..._(H,v,F)}}))},setDpr:M=>h(C=>{const D=iw(M);return{viewport:{...C.viewport,dpr:D,initialDpr:C.viewport.initialDpr||D}}}),setFrameloop:(M="always")=>{const C=d().clock;C.stop(),C.elapsedTime=0,M!=="never"&&(C.start(),C.elapsedTime=0),h(()=>({frameloop:M}))},previousRoot:void 0,internal:{interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,lastEvent:le.createRef(),active:!1,frames:0,priority:0,subscribe:(M,C,D)=>{const U=d().internal;return U.priority=U.priority+(C>0?1:0),U.subscribers.push({ref:M,priority:C,store:D}),U.subscribers=U.subscribers.sort((H,F)=>H.priority-F.priority),()=>{const H=d().internal;H!=null&&H.subscribers&&(H.priority=H.priority-(C>0?1:0),H.subscribers=H.subscribers.filter(F=>F.ref!==M))}}}}}),n=t.getState();let a=n.size,o=n.viewport.dpr,c=n.camera;return t.subscribe(()=>{const{camera:h,size:d,viewport:p,gl:v,set:y}=t.getState();if(d.width!==a.width||d.height!==a.height||p.dpr!==o){a=d,o=p.dpr,sw(h,d),p.dpr>0&&v.setPixelRatio(p.dpr);const _=typeof HTMLCanvasElement<"u"&&v.domElement instanceof HTMLCanvasElement;v.setSize(d.width,d.height,_)}h!==c&&(c=h,y(_=>({viewport:{..._.viewport,..._.viewport.getCurrentViewport(h)}})))}),t.subscribe(h=>s(h)),t};function a1(){const s=le.useContext(i1);if(!s)throw new Error("R3F: Hooks can only be used within the Canvas component!");return s}function bf(s=t=>t,e){return a1()(s,e)}function s1(s,e=0){const t=a1(),n=t.getState().internal.subscribe,a=n1(s);return mg(()=>n(a,e,t),[e,n,t]),null}const _T=new WeakMap,AB=s=>{var e;return typeof s=="function"&&(s==null||(e=s.prototype)==null?void 0:e.constructor)===s};function ow(s,e){return function(t,...n){let a;return AB(t)?(a=_T.get(t),a||(a=new t,_T.set(t,a))):a=t,s&&s(a),Promise.all(n.map(o=>new Promise((c,h)=>a.load(o,d=>{Ss(d?.scene)&&Object.assign(d,gB(d.scene)),c(d)},e,d=>h(new Error(`Could not load ${o}: ${d?.message}`))))))}}function qc(s,e,t,n){const a=Array.isArray(e)?e:[e],o=KI(ow(t,n),[s,...a],{equal:Si.equ});return Array.isArray(e)?o:o[0]}qc.preload=function(s,e,t){const n=Array.isArray(e)?e:[e];return QI(ow(t),[s,...n])};qc.clear=function(s,e){const t=Array.isArray(e)?e:[e];return JI([s,...t])};function wB(s){const e=aB(s);return e.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:le.version}),e}const lw=0,Td={},RB=/^three(?=[A-Z])/,__=s=>`${s[0].toUpperCase()}${s.slice(1)}`;let CB=0;const NB=s=>typeof s=="function";function r1(s){if(NB(s)){const e=`${CB++}`;return Td[e]=s,e}else Object.assign(Td,s)}function cw(s,e){const t=__(s),n=Td[t];if(s!=="primitive"&&!n)throw new Error(`R3F: ${t} is not part of the THREE namespace! Did you forget to extend? See: https://docs.pmnd.rs/react-three-fiber/api/objects#using-3rd-party-objects-declaratively`);if(s==="primitive"&&!e.object)throw new Error("R3F: Primitives without 'object' are invalid!");if(e.args!==void 0&&!Array.isArray(e.args))throw new Error("R3F: The args prop must be an array!")}function DB(s,e,t){var n;return s=__(s)in Td?s:s.replace(RB,""),cw(s,e),s==="primitive"&&(n=e.object)!=null&&n.__r3f&&delete e.object.__r3f,Ny(e.object,t,s,e)}function UB(s){if(!s.isHidden){var e;s.props.attach&&(e=s.parent)!=null&&e.object?Uy(s.parent,s):Ss(s.object)&&(s.object.visible=!1),s.isHidden=!0,Od(s)}}function uw(s){if(s.isHidden){var e;s.props.attach&&(e=s.parent)!=null&&e.object?Dy(s.parent,s):Ss(s.object)&&s.props.visible!==!1&&(s.object.visible=!0),s.isHidden=!1,Od(s)}}function o1(s,e,t){const n=e.root.getState();if(!(!s.parent&&s.object!==n.scene)){if(!e.object){var a,o;const c=Td[__(e.type)];
3958e.object=(a=e.props.object)!=null?a:new c(...(o=e.props.args)!=null?o:[]),e.object.__r3f=e}if(Xo(e.object,e.props),e.props.attach)Dy(s,e);else if(Ss(e.object)&&Ss(s.object)){const c=s.object.children.indexOf(t?.object);if(t&&c!==-1){const h=s.object.children.indexOf(e.object);if(h!==-1){s.object.children.splice(h,1);const d=h<c?c-1:c;s.object.children.splice(d,0,e.object)}else e.object.parent=s.object,s.object.children.splice(c,0,e.object),e.object.dispatchEvent({type:"added"}),s.object.dispatchEvent({type:"childadded",child:e.object})}else s.object.add(e.object)}for(const c of e.children)o1(e,c);Od(e)}}function fS(s,e){e&&(e.parent=s,s.children.push(e),o1(s,e))}function xT(s,e,t){if(!e||!t)return;e.parent=s;const n=s.children.indexOf(t);n!==-1?s.children.splice(n,0,e):s.children.push(e),o1(s,e,t)}function fw(s){if(typeof s.dispose=="function"){const e=()=>{try{s.dispose()}catch{}};typeof IS_REACT_ACT_ENVIRONMENT<"u"?e():mT.unstable_scheduleCallback(mT.unstable_IdlePriority,e)}}function qS(s,e,t){if(!e)return;e.parent=null;const n=s.children.indexOf(e);n!==-1&&s.children.splice(n,1),e.props.attach?Uy(s,e):Ss(e.object)&&Ss(s.object)&&(s.object.remove(e.object),MB(tw(e),e.object));const a=e.props.dispose!==null&&t!==!1;for(let o=e.children.length-1;o>=0;o--){const c=e.children[o];qS(e,c,a)}e.children.length=0,delete e.object.__r3f,a&&e.type!=="primitive"&&e.object.type!=="Scene"&&fw(e.object),t===void 0&&Od(e)}function LB(s,e){for(const t of[s,s.alternate])if(t!==null)if(typeof t.ref=="function"){t.refCleanup==null||t.refCleanup();const n=t.ref(e);typeof n=="function"&&(t.refCleanup=n)}else t.ref&&(t.ref.current=e)}const P0=[];function OB(){for(const[t]of P0){const n=t.parent;if(n){t.props.attach?Uy(n,t):Ss(t.object)&&Ss(n.object)&&n.object.remove(t.object);for(const a of t.children)a.props.attach?Uy(t,a):Ss(a.object)&&Ss(t.object)&&t.object.remove(a.object)}t.isHidden&&uw(t),t.object.__r3f&&delete t.object.__r3f,t.type!=="primitive"&&fw(t.object)}for(const[t,n,a]of P0){t.props=n;const o=t.parent;if(o){var s,e;const c=Td[__(t.type)];
3958t.object=(s=t.props.object)!=null?s:new c(...(e=t.props.args)!=null?e:[]),t.object.__r3f=t,LB(a,t.object),Xo(t.object,t.props),t.props.attach?Dy(o,t):Ss(t.object)&&Ss(o.object)&&o.object.add(t.object);for(const h of t.children)h.props.attach?Dy(t,h):Ss(h.object)&&Ss(t.object)&&t.object.add(h.object);Od(t)}}P0.length=0}const hS=()=>{},ST={};let C0=lw;const zB=0,IB=4,Ly=wB({isPrimaryRenderer:!1,warnsIfNotActing:!1,supportsMutation:!0,supportsPersistence:!1,supportsHydration:!1,createInstance:DB,removeChild:qS,appendChild:fS,appendInitialChild:fS,insertBefore:xT,appendChildToContainer(s,e){const t=s.getState().scene.__r3f;!e||!t||fS(t,e)},removeChildFromContainer(s,e){const t=s.getState().scene.__r3f;!e||!t||qS(t,e)},insertInContainerBefore(s,e,t){const n=s.getState().scene.__r3f;!e||!t||!n||xT(n,e,t)},getRootHostContext:()=>ST,getChildHostContext:()=>ST,commitUpdate(s,e,t,n,a){var o,c,h;cw(e,n);let d=!1;if((s.type==="primitive"&&t.object!==n.object||((o=n.args)==null?void 0:o.length)!==((c=t.args)==null?void 0:c.length)||(h=n.args)!=null&&h.some((v,y)=>{var _;return v!==((_=t.args)==null?void 0:_[y])}))&&(d=!0),d)P0.push([s,{...n},a]);else{const v=xB(s,n);Object.keys(v).length&&(Object.assign(s.props,v),Xo(s.object,v))}(a.sibling===null||(a.flags&IB)===zB)&&OB()},finalizeInitialChildren:()=>!1,commitMount(){},getPublicInstance:s=>s?.object,prepareForCommit:()=>null,preparePortalMount:s=>Ny(s.getState().scene,s,"",{}),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance:UB,unhideInstance:uw,createTextInstance:hS,hideTextInstance:hS,unhideTextInstance:hS,scheduleTimeout:typeof setTimeout=="function"?setTimeout:void 0,cancelTimeout:typeof clearTimeout=="function"?clearTimeout:void 0,noTimeout:-1,getInstanceFromNode:()=>null,beforeActiveInstanceBlur(){},afterActiveInstanceBlur(){},detachDeletedInstance(){},prepareScopeUpdate(){},getInstanceFromScope:()=>null,shouldAttemptEagerTransition:()=>!1,trackSchedulerEvent:()=>{},resolveEventType:()=>null,resolveEventTimeStamp:()=>-1.1,requestPostPaintCallback(){},maySuspendCommit:()=>!1,preloadInstance:()=>!0,startSuspendingCommit(){},suspendInstance(){},waitForCommitToBeReady:()=>null,NotPendingTransition:null,HostTransitionContext:le.createContext(null),setCurrentUpdatePriority(s){C0=s},getCurrentUpdatePriority(){return C0},resolveUpdatePriority(){var s;if(C0!==lw)return C0;switch(typeof window<"u"&&((s=window.event)==null?void 0:s.type)){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return B0.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return B0.ContinuousEventPriority;default:return B0.DefaultEventPriority}},resetFormInstance(){}}),Mf=new Map,nd={objects:"shallow",strict:!1};function BB(s,e){if(!e&&typeof HTMLCanvasElement<"u"&&s instanceof HTMLCanvasElement&&s.parentElement){const{width:t,height:n,top:a,left:o}=s.parentElement.getBoundingClientRect();return{width:t,height:n,top:a,left:o}}else if(!e&&typeof OffscreenCanvas<"u"&&s instanceof OffscreenCanvas)return{width:s.width,height:s.height,top:0,left:0};return{width:0,height:0,top:0,left:0,...e}}function PB(s){const e=Mf.get(s),t=e?.fiber,n=e?.store;e&&console.warn("R3F.createRoot should only be called once!");const a=typeof reportError=="function"?reportError:console.error,o=n||TB(ZS,MT),c=t||Ly.createContainer(o,B0.ConcurrentRoot,null,!1,null,"",a,a,a,null);e||Mf.set(s,{fiber:c,store:o});let h,d,p=!1,v=null;return{async configure(y={}){let _;v=new Promise(W=>_=W);let{gl:b,size:T,scene:R,events:A,onCreated:M,shadows:C=!1,linear:D=!1,flat:U=!1,legacy:H=!1,orthographic:F=!1,frameloop:G="always",dpr:V=[1,2],performance:O,raycaster:z,camera:Y,onPointerMissed:se}=y,ce=o.getState(),he=ce.gl;if(!ce.gl){const W={canvas:s,powerPreference:"high-performance",antialias:!0,alpha:!0},fe=typeof b=="function"?await b(W):b;yT(fe)?he=fe:he=new $b({...W,...b}),ce.set({gl:he})}let me=ce.raycaster;me||ce.set({raycaster:me=new Kb});const{params:P,...Q}=z||{};if(Si.equ(Q,me,nd)||Xo(me,{...Q}),Si.equ(P,me.params,nd)||Xo(me,{params:{...me.params,...P}}),!ce.camera||ce.camera===d&&!Si.equ(d,Y,nd)){d=Y;const W=Y?.isCamera,fe=W?Y:F?new wf(0,0,0,0,.1,1e3):new sa(75,0,.1,1e3);W||(fe.position.z=5,Y&&(Xo(fe,Y),fe.manual||("aspect"in Y||"left"in Y||"right"in Y||"bottom"in Y||"top"in Y)&&(fe.manual=!0,fe.updateProjectionMatrix())),!ce.camera&&!(Y!=null&&Y.rotation)&&fe.lookAt(0,0,0)),ce.set({camera:fe}),me.camera=fe}if(!ce.scene){let W;R!=null&&R.isScene?(W=R,Ny(W,o,"",{})):(W=new rg,Ny(W,o,"",{}),R&&Xo(W,R)),ce.set({scene:W})}A&&!ce.events.handlers&&ce.set({events:A(o)});const ee=BB(s,T);if(Si.equ(ee,ce.size,nd)||ce.setSize(ee.width,ee.height,ee.top,ee.left),V&&ce.viewport.dpr!==iw(V)&&ce.setDpr(V),ce.frameloop!==G&&ce.setFrameloop(G),
vendor: 1,294 bytes, line 3958
3958ce.onPointerMissed||ce.set({onPointerMissed:se}),O&&!Si.equ(O,ce.performance,nd)&&ce.set(W=>({performance:{...W.performance,...O}})),!ce.xr){var ge;const W=(Le,nt)=>{const ve=o.getState();ve.frameloop!=="never"&&MT(Le,!0,ve,nt)},fe=()=>{const Le=o.getState();Le.gl.xr.enabled=Le.gl.xr.isPresenting,Le.gl.xr.setAnimationLoop(Le.gl.xr.isPresenting?W:null),Le.gl.xr.isPresenting||ZS(Le)},Ce={connect(){const Le=o.getState().gl;Le.xr.addEventListener("sessionstart",fe),Le.xr.addEventListener("sessionend",fe)},disconnect(){const Le=o.getState().gl;Le.xr.removeEventListener("sessionstart",fe),Le.xr.removeEventListener("sessionend",fe)}};typeof((ge=he.xr)==null?void 0:ge.addEventListener)=="function"&&Ce.connect(),ce.set({xr:Ce})}if(he.shadowMap){const W=he.shadowMap.enabled,fe=he.shadowMap.type;if(he.shadowMap.enabled=!!C,Si.boo(C))he.shadowMap.type=Am;else if(Si.str(C)){var Se;const Ce={basic:aA,percentage:Py,soft:Am,variance:$r};he.shadowMap.type=(Se=Ce[C])!=null?Se:Am}else Si.obj(C)&&Object.assign(he.shadowMap,C);(W!==he.shadowMap.enabled||fe!==he.shadowMap.type)&&(he.shadowMap.needsUpdate=!0)}return An.enabled=!H,p||(he.outputColorSpace=D?Qi:Ii,he.toneMapping=U?no:lb),ce.legacy!==H&&ce.set(()=>({legacy:H})),ce.linear!==D&&ce.set(()=>({linear:D})),ce.flat!==U&&ce.set(()=>({flat:U}
3958)),b&&!Si.fun(b)&&!yT(b)&&!Si.equ(b,he,nd)&&Xo(he,b),h=M,p=!0,_(),this},render(y){return!p&&!v&&this.configure(),v.then(()=>{Ly.updateContainer(Z.jsx(HB,{store:o,children:y,onCreated:h,rootElement:s}),c,null,()=>{})}),o},unmount(){hw(s)}}}function HB({store:s,children:e,onCreated:t,rootElement:n}){return mg(()=>{const a=s.getState();a.set(o=>({internal:{...o.internal,active:!0}})),t&&t(a),s.getState().events.connected||a.events.connect==null||a.events.connect(n)},[]),Z.jsx(i1.Provider,{value:s,children:e})}function hw(s,e){const t=Mf.get(s),n=t?.fiber;if(n){const a=t?.store.getState();a&&(a.internal.active=!1),Ly.updateContainer(null,n,null,()=>{a&&setTimeout(()=>{try{var o,c,h,d;a.events.disconnect==null||a.events.disconnect(),(o=a.gl)==null||(c=o.renderLists)==null||c.dispose==null||c.dispose(),(h=a.gl)==null||h.forceContextLoss==null||h.forceContextLoss(),(d=a.gl)!=null&&d.xr&&a.xr.disconnect(),vB(a.scene),Mf.delete(s)}catch{}},500)})}}function FB(s,e,t){return Z.jsx(VB,{children:s,container:e,state:t})}function VB({state:s={},children:e,container:t}){const{events:n,size:a,...o}=s,c=a1(),[h]=le.useState(()=>new Kb),[d]=le.useState(()=>new Je),p=n1((y,_)=>{let b;if(_.camera&&a){const T=_.camera;b=y.viewport.getCurrentViewport(T,new K,a),T!==y.camera&&sw(T,a)}return{...y,..._,scene:t,raycaster:h,pointer:d,mouse:d,previousRoot:c,events:{...y.events,..._.events,...n},size:{...y.size,...a},viewport:{...y.viewport,...b},setEvents:T=>_.set(R=>({...R,events:{...R.events,...T}}))}}),v=le.useMemo(()=>{const y=Z2((b,T)=>({...o,set:b,get:T})),_=b=>y.setState(T=>p.current(b,T));return _(c.getState()),c.subscribe(_),y},[c,t]);return Z.jsx(Z.Fragment,{children:Ly.createPortal(Z.jsx(i1.Provider,{value:v,children:e}),v,null)})}const GB=new Set,kB=new Set,XB=new Set;function dS(s,e){if(s.size)for(const{callback:t}of s.values())t(e)}function Om(s,e){switch(s){case"before":return dS(GB,e);case"after":return dS(kB,e);case"tail":return dS(XB,e)}}let pS,mS;function YS(s,e,t){let n=e.clock.getDelta();e.frameloop==="never"&&typeof s=="number"&&(n=s-e.clock.elapsedTime,e.clock.oldTime=e.clock.elapsedTime,e.clock.elapsedTime=s),pS=e.internal.subscribers;for(let a=0;a<pS.length;a++)mS=pS[a],mS.ref.current(mS.store.getState(),n,t);return!e.internal.priority&&e.gl.render&&e.gl.render(e.scene,e.camera),e.internal.frames=Math.max(0,e.internal.frames-1),e.frameloop==="always"?1:e.internal.frames}let Oy=!1,WS=!1,gS,bT,id;function dw(s){bT=requestAnimationFrame(dw),Oy=!0,gS=0,Om("before",s),WS=!0;for(const t of Mf.values()){var e;id=t.store.getState(),id.internal.active&&(id.frameloop==="always"||id.internal.frames>0)&&!((e=id.gl.xr)!=null&&e.isPresenting)&&(gS+=YS(s,id))}if(WS=!1,Om("after",s),gS===0)return Om("tail",s),Oy=!1,cancelAnimationFrame(bT)}function ZS(s,e=1){var t;if(!s)return Mf.forEach(n=>ZS(n.store.getState(),e));(t=s.gl.xr)!=null&&t.isPresenting||!s.internal.active||s.frameloop==="never"||(e>1?s.internal.frames=Math.min(60,s.internal.frames+e):WS?s.internal.frames=2:s.internal.frames=1,Oy||(Oy=!0,requestAnimationFrame(dw)))}function MT(s,e=!0,t,n){if(e&&Om("before",s),t)YS(s,t,n);else for(const a of Mf.values())YS(s,a.store.getState());e&&Om("after",s)}const vS={onClick:["click",!1],onContextMenu:["contextmenu",!1],onDoubleClick:["dblclick",!1],onWheel:["wheel",!0],onPointerDown:["pointerdown",!0],onPointerUp:["pointerup",!0],onPointerLeave:["pointerleave",!0],onPointerMove:["pointermove",!0],onPointerCancel:["pointercancel",!0],onLostPointerCapture:["lostpointercapture",!0]};function jB(s){const{handlePointer:e}=EB(s);return{priority:1,enabled:!0,compute(t,n,a){n.pointer.set(t.offsetX/n.size.width*2-1,-(t.offsetY/n.size.height)*2+1),n.raycaster.setFromCamera(n.pointer,n.camera)},connected:void 0,handlers:Object.keys(vS).reduce((t,n)=>({...t,[n]:e(n)}),{}),update:()=>{var t;const{events:n,internal:a}=s.getState();(t=a.lastEvent)!=null&&t.current&&n.handlers&&n.handlers.onPointerMove(a.lastEvent.current)},connect:t=>{const{set:n,events:a}=s.getState();if(a.disconnect==null||a.disconnect(),n(o=>({events:{...o.events,connected:t}})),a.handlers)for(const o in a.handlers){const c=a.handlers[o],[h,d]=vS[o];t.addEventListener(h,c,{passive:d})}},disconnect:()=>{const{set:t,events:n}=s.getState();if(n.connected){if(n.handlers)for(const a in n.handlers){const o=n.handlers[a],[c]=vS[a];n.connected.removeEventListener(c,o)}t(a=>({events:{...a.events,connected:void 0}}))}}}}function ET(s,e){let t;return(...n)=>{window.clearTimeout(t),t=window.setTimeout(()=>s(...n),e)}}function qB({debounce:s,scroll:e,polyfill:t,offsetSize:n}={debounce:0,scroll:!1,offsetSize:!1}){const a=t||(typeof window>"u"?class{}:window.ResizeObserver);if(!a)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[o,c]=le.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}
vendor: 34,699 bytes, lines 3958-4043
3958),h=le.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:o,orientationHandler:null}),d=s?typeof s=="number"?s:s.scroll:null,p=s?typeof s=="number"?s:s.resize:null,v=le.useRef(!1);le.useEffect(()=>(v.current=!0,()=>void(v.current=!1)));const[y,_,b]=le.useMemo(()=>{const M=()=>{if(!h.current.element)return;const{left:C,top:D,width:U,height:H,bottom:F,right:G,x:V,y:O}=h.current.element.getBoundingClientRect(),z={left:C,top:D,width:U,height:H,bottom:F,right:G,x:V,y:O};h.current.element instanceof HTMLElement&&n&&(z.height=h.current.element.offsetHeight,z.width=h.current.element.offsetWidth),Object.freeze(z),v.current&&!KB(h.current.lastBounds,z)&&c(h.current.lastBounds=z)};return[M,p?ET(M,p):M,d?ET(M,d):M]},[c,n,d,p]);function T(){h.current.scrollContainers&&(h.current.scrollContainers.forEach(M=>M.removeEventListener("scroll",b,!0)),h.current.scrollContainers=null),h.current.resizeObserver&&(h.current.resizeObserver.disconnect(),h.current.resizeObserver=null),h.current.orientationHandler&&("orientation"in screen&&"removeEventListener"in screen.orientation?screen.orientation.removeEventListener("change",h.current.orientationHandler):"onorientationchange"in window&&window.removeEventListener("orientationchange",h.current.orientationHandler))}function R(){h.current.element&&(h.current.resizeObserver=new a(b),h.current.resizeObserver.observe(h.current.element),e&&h.current.scrollContainers&&h.current.scrollContainers.forEach(M=>M.addEventListener("scroll",b,{capture:!0,passive:!0})),h.current.orientationHandler=()=>{b()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",h.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",h.current.orientationHandler))}const A=M=>{!M||M===h.current.element||(T(),h.current.element=M,h.current.scrollContainers=pw(M),R())};return WB(b,!!e),YB(_),le.useEffect(()=>{T(),R()},[e,b,_]),le.useEffect(()=>T,[]),[A,o,y]}function YB(s){le.useEffect(()=>{const e=s;return window.addEventListener("resize",e),()=>void window.removeEventListener("resize",e)},[s])}function WB(s,e){le.useEffect(()=>{if(e){const t=s;return window.addEventListener("scroll",t,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",t,!0)}},[s,e])}function pw(s){const e=[];if(!s||s===document.body)return e;const{overflow:t,overflowX:n,overflowY:a}=window.getComputedStyle(s);return[t,n,a].some(o=>o==="auto"||o==="scroll")&&e.push(s),[...e,...pw(s.parentElement)]}const ZB=["x","y","top","bottom","left","right","width","height"],KB=(s,e)=>ZB.every(t=>s[t]===e[t]);function QB({ref:s,children:e,fallback:t,resize:n,style:a,gl:o,events:c=jB,eventSource:h,eventPrefix:d,shadows:p,linear:v,flat:y,legacy:_,orthographic:b,frameloop:T,dpr:R,performance:A,raycaster:M,camera:C,scene:D,onPointerMissed:U,onCreated:H,...F}){le.useMemo(()=>r1(II),[]);const G=dB(),[V,O]=qB({scroll:!0,debounce:{scroll:50,resize:0},...n}),z=le.useRef(null),Y=le.useRef(null);le.useImperativeHandle(s,()=>z.current);const se=n1(U),[ce,he]=le.useState(!1),[me,P]=le.useState(!1);if(ce)throw ce;if(me)throw me;const Q=le.useRef(null);mg(()=>{const ge=z.current;if(O.width>0&&O.height>0&&ge){Q.current||(Q.current=PB(ge));async function Se(){await Q.current.configure({gl:o,scene:D,events:c,shadows:p,linear:v,flat:y,legacy:_,orthographic:b,frameloop:T,dpr:R,performance:A,raycaster:M,camera:C,size:O,onPointerMissed:(...W)=>se.current==null?void 0:se.current(...W),onCreated:W=>{W.events.connect==null||W.events.connect(h?fB(h)?h.current:h:Y.current),d&&W.setEvents({compute:(fe,Ce)=>{const Le=fe[d+"X"],nt=fe[d+"Y"];Ce.pointer.set(Le/Ce.size.width*2-1,-(nt/Ce.size.height)*2+1),Ce.raycaster.setFromCamera(Ce.pointer,Ce.camera)}}),H?.(W)}}),Q.current.render(Z.jsx(G,{children:Z.jsx(mB,{set:P,children:Z.jsx(le.Suspense,{fallback:Z.jsx(pB,{set:he}),children:e??null})})}))}Se()}}),le.useEffect(()=>{const ge=z.current;if(ge)return()=>hw(ge)},[]);const ee=h?"none":"auto";return Z.jsx("div",{ref:Y,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:ee,...a},...F,children:Z.jsx("div",{ref:V,style:{width:"100%",height:"100%"},children:Z.jsx("canvas",{ref:z,style:{display:"block"},children:t})})})}function JB(s){return Z.jsx($2,{children:Z.jsx(QB,{...s})})}const mw=parseInt(eg.replace(/\D+/g,""));var Er=Uint8Array,Fc=Uint16Array,KS=Uint32Array,gw=new Er([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),vw=new Er([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),$B=new Er([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),yw=function(s,e){for(var t=new Fc(31),n=0;n<31;++n)t[n]=e+=1<<s[n-1];for(var a=new KS(t[30]),n=1;n<30;++n)for(var o=t[n];o<t[n+1];++o)a[o]=o-t[n]<<5|n;return[t,a]},_w=yw(gw,2),xw=_w[0],e5=_w[1];xw[28]=258,e5[258]=28;var t5=yw(vw,0),n5=t5[0],QS=new Fc(32768);for(var pi=0;pi<32768;++pi){var zc=(pi&43690)>>>1|(pi&21845)<<1;zc=(zc&52428)>>>2|(zc&13107)<<2,zc=(zc&61680)>>>4|(zc&3855)<<4,QS[pi]=((zc&65280)>>>8|(zc&255)<<8)>>>1}var zm=(function(s,e,t){for(var n=s.length,a=0,o=new Fc(e);a<n;++a)++o[s[a]-1];var c=new Fc(e);for(a=0;a<e;++a)c[a]=c[a-1]+o[a-1]<<1;var h;if(t){h=new Fc(1<<e);var d=15-e;for(a=0;a<n;++a)if(s[a])for(var p=a<<4|s[a],v=e-s[a],y=c[s[a]-1]++<<v,_=y|(1<<v)-1;y<=_;++y)h[QS[y]>>>d]=p}else for(h=new Fc(n),a=0;a<n;++a)s[a]&&(h[a]=QS[c[s[a]-1]++]>>>15-s[a]);return h}),gg=new Er(288);for(var pi=0;pi<144;++pi)gg[pi]=8;for(var pi=144;pi<256;++pi)gg[pi]=9;for(var pi=256;pi<280;++pi)gg[pi]=7;for(var pi=280;pi<288;++pi)gg[pi]=8;var Sw=new Er(32);for(var pi=0;pi<32;++pi)Sw[pi]=5;var i5=zm(gg,9,1),a5=zm(Sw,5,1),yS=function(s){for(var e=s[0],t=1;t<s.length;++t)s[t]>e&&(e=s[t]);return e},Jr=function(s,e,t){var n=e/8|0;return(s[n]|s[n+1]<<8)>>(e&7)&t},_S=function(s,e){var t=e/8|0;return(s[t]|s[t+1]<<8|s[t+2]<<16)>>(e&7)},s5=function(s){return(s/8|0)+(s&7&&1)},r5=function(s,e,t){(t==null||t>s.length)&&(t=s.length);var n=new(s instanceof Fc?Fc:s instanceof KS?KS:Er)(t-e);return n.set(s.subarray(e,t)),n},o5=function(s,e,t){var n=s.length;if(!n||t&&!t.l&&n<5)return e||new Er(0);var a=!e||t,o=!t||t.i;t||(t={}),e||(e=new Er(n*3));var c=function(ve){var De=e.length;if(ve>De){var ot=new Er(Math.max(De*2,ve));ot.set(e),e=ot}},h=t.f||0,d=t.p||0,p=t.b||0,v=t.l,y=t.d,_=t.m,b=t.n,T=n*8;do{if(!v){t.f=h=Jr(s,d,1);var R=Jr(s,d+1,3);if(d+=3,R)if(R==1)v=i5,y=a5,_=9,b=5;else if(R==2){var D=Jr(s,d,31)+257,U=Jr(s,d+10,15)+4,H=D+Jr(s,d+5,31)+1;d+=14;for(var F=new Er(H),G=new Er(19),V=0;V<U;++V)G[$B[V]]=Jr(s,d+V*3,7);d+=U*3;for(var O=yS(G),z=(1<<O)-1,Y=zm(G,O,1),V=0;V<H;){var se=Y[Jr(s,d,z)];d+=se&15;var A=se>>>4;if(A<16)F[V++]=A;else{var ce=0,he=0;for(A==16?(he=3+Jr(s,d,3),d+=2,ce=F[V-1]):A==17?(he=3+Jr(s,d,7),d+=3):A==18&&(he=11+Jr(s,d,127),d+=7);he--;)F[V++]=ce}}var me=F.subarray(0,D),P=F.subarray(D);_=yS(me),b=yS(P),v=zm(me,_,1),y=zm(P,b,1)}else throw"invalid block type";else{var A=s5(d)+4,M=s[A-4]|s[A-3]<<8,C=A+M;if(C>n){if(o)throw"unexpected EOF";break}a&&c(p+M),e.set(s.subarray(A,C),p),t.b=p+=M,t.p=d=C*8;continue}if(d>T){if(o)throw"unexpected EOF";break}}a&&c(p+131072);for(var Q=(1<<_)-1,ee=(1<<b)-1,ge=d;;ge=d){var ce=v[_S(s,d)&Q],Se=ce>>>4;if(d+=ce&15,d>T){if(o)throw"unexpected EOF";break}if(!ce)throw"invalid length/literal";if(Se<256)e[p++]=Se;else if(Se==256){ge=d,v=null;break}else{var W=Se-254;if(Se>264){var V=Se-257,fe=gw[V];W=Jr(s,d,(1<<fe)-1)+xw[V],d+=fe}var Ce=y[_S(s,d)&ee],Le=Ce>>>4;if(!Ce)throw"invalid distance";d+=Ce&15;var P=n5[Le];if(Le>3){var fe=vw[Le];P+=_S(s,d)&(1<<fe)-1,d+=fe}if(d>T){if(o)throw"unexpected EOF";break}a&&c(p+131072);for(var nt=p+W;p<nt;p+=4)e[p]=e[p-P],e[p+1]=e[p+1-P],e[p+2]=e[p+2-P],e[p+3]=e[p+3-P];p=nt}}t.l=v,t.p=ge,t.b=p,v&&(h=1,t.m=_,t.d=y,t.n=b)}while(!h);return p==e.length?e:r5(e,0,p)},l5=new Er(0),c5=function(s){if((s[0]&15)!=8||s[0]>>>4>7||(s[0]<<8|s[1])%31)throw"invalid zlib data";if(s[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function N0(s,e){return o5((c5(s),s.subarray(2,-4)),e)}var u5=typeof TextDecoder<"u"&&new TextDecoder,f5=0;try{u5.decode(l5,{stream:!0}),f5=1}catch{}const h5=s=>s&&s.isCubeTexture;class d5 extends Mi{constructor(e,t){var n,a;const o=h5(e),h=((a=o?(n=e.image[0])==null?void 0:n.width:e.image.width)!=null?a:1024)/4,d=Math.floor(Math.log2(h)),p=Math.pow(2,d),v=3*Math.max(p,112),y=4*p,_=[o?"#define ENVMAP_TYPE_CUBE":"",`#define CUBEUV_TEXEL_WIDTH ${1/v}`,`#define CUBEUV_TEXEL_HEIGHT ${1/y}`,`#define CUBEUV_MAX_MIP ${d}.0`],b=`
3959        varying vec3 vWorldPosition;
3960        void main() 
3961        {
3962            vec4 worldPosition = ( modelMatrix * vec4( position, 1.0 ) );
3963            vWorldPosition = worldPosition.xyz;
3964            
3965            gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
3966        }
3967        `,T=_.join(`
3968`)+`
3969        #define ENVMAP_TYPE_CUBE_UV
3970        varying vec3 vWorldPosition;
3971        uniform float radius;
3972        uniform float height;
3973        uniform float angle;
3974        #ifdef ENVMAP_TYPE_CUBE
3975            uniform samplerCube map;
3976        #else
3977            uniform sampler2D map;
3978        #endif
3979        // From: https://www.shadertoy.com/view/4tsBD7
3980        float diskIntersectWithBackFaceCulling( vec3 ro, vec3 rd, vec3 c, vec3 n, float r ) 
3981        {
3982            float d = dot ( rd, n );
3983            
3984            if( d > 0.0 ) { return 1e6; }
3985            
3986            vec3  o = ro - c;
3987            float t = - dot( n, o ) / d;
3988            vec3  q = o + rd * t;
3989            
3990            return ( dot( q, q ) < r * r ) ? t : 1e6;
3991        }
3992        // From: https://www.iquilezles.org/www/articles/intersectors/intersectors.htm
3993        float sphereIntersect( vec3 ro, vec3 rd, vec3 ce, float ra ) 
3994        {
3995            vec3 oc = ro - ce;
3996            float b = dot( oc, rd );
3997            float c = dot( oc, oc ) - ra * ra;
3998            float h = b * b - c;
3999            
4000            if( h < 0.0 ) { return -1.0; }
4001            
4002            h = sqrt( h );
4003            
4004            return - b + h;
4005        }
4006        vec3 project() 
4007        {
4008            vec3 p = normalize( vWorldPosition );
4009            vec3 camPos = cameraPosition;
4010            camPos.y -= height;
4011            float intersection = sphereIntersect( camPos, p, vec3( 0.0 ), radius );
4012            if( intersection > 0.0 ) {
4013                
4014                vec3 h = vec3( 0.0, - height, 0.0 );
4015                float intersection2 = diskIntersectWithBackFaceCulling( camPos, p, h, vec3( 0.0, 1.0, 0.0 ), radius );
4016                p = ( camPos + min( intersection, intersection2 ) * p ) / radius;
4017            } else {
4018                p = vec3( 0.0, 1.0, 0.0 );
4019            }
4020            return p;
4021        }
4022        #include <common>
4023        #include <cube_uv_reflection_fragment>
4024        void main() 
4025        {
4026            vec3 projectedWorldPosition = project();
4027            
4028            #ifdef ENVMAP_TYPE_CUBE
4029                vec3 outcolor = textureCube( map, projectedWorldPosition ).rgb;
4030            #else
4031                vec3 direction = normalize( projectedWorldPosition );
4032                vec2 uv = equirectUv( direction );
4033                vec3 outcolor = texture2D( map, uv ).rgb;
4034            #endif
4035            gl_FragColor = vec4( outcolor, 1.0 );
4036            #include <tonemapping_fragment>
4037            #include <${mw>=154?"colorspace_fragment":"encodings_fragment"}>
4038        }
4039        `,R={map:{value:e},height:{value:t?.height||15},radius:{value:t?.radius||100}},A=new fg(1,16),M=new Ts({uniforms:R,fragmentShader:T,vertexShader:b,side:Mr});super(A,M)}set radius(e){this.material.uniforms.radius.value=e}get radius(){return this.material.uniforms.radius.value}set height(e){this.material.uniforms.height.value=e}get height(){return this.material.uniforms.height.value}}class p5 extends Vb{constructor(e){super(e),this.type=ra}parse(e){const c=function(V,O){switch(V){case 1:throw new Error("THREE.RGBELoader: Read Error: "+(O||""));case 2:throw new Error("THREE.RGBELoader: Write Error: "+(O||""));case 3:throw new Error("THREE.RGBELoader: Bad File Format: "+(O||""));default:case 4:throw new Error("THREE.RGBELoader: Memory Error: "+(O||""))}},y=function(V,O,z){O=O||1024;let se=V.pos,ce=-1,he=0,me="",P=String.fromCharCode.apply(null,new Uint16Array(V.subarray(se,se+128)));for(;0>(ce=P.indexOf(`
4040`))&&he<O&&se<V.byteLength;)me+=P,he+=P.length,se+=128,P+=String.fromCharCode.apply(null,new Uint16Array(V.subarray(se,se+128)));return-1<ce?(V.pos+=he+ce+1,me+P.slice(0,ce)):!1},_=function(V){const O=/^#\?(\S+)/,z=/^\s*GAMMA\s*=\s*(\d+(\.\d+)?)\s*$/,Y=/^\s*EXPOSURE\s*=\s*(\d+(\.\d+)?)\s*$/,se=/^\s*FORMAT=(\S+)\s*$/,ce=/^\s*\-Y\s+(\d+)\s+\+X\s+(\d+)\s*$/,he={valid:0,string:"",comments:"",programtype:"RGBE",format:"",gamma:1,exposure:1,width:0,height:0};let me,P;for((V.pos>=V.byteLength||!(me=y(V)))&&c(1,"no header found"),(P=me.match(O))||c(3,"bad initial token"),he.valid|=1,he.programtype=P[1],he.string+=me+`
4041`;me=y(V),me!==!1;){if(he.string+=me+`
4042`,me.charAt(0)==="#"){he.comments+=me+`
4043`;continue}if((P=me.match(z))&&(he.gamma=parseFloat(P[1])),(P=me.match(Y))&&(he.exposure=parseFloat(P[1])),(P=me.match(se))&&(he.valid|=2,he.format=P[1]),(P=me.match(ce))&&(he.valid|=4,he.height=parseInt(P[1],10),he.width=parseInt(P[2],10)),he.valid&2&&he.valid&4)break}return he.valid&2||c(3,"missing format specifier"),he.valid&4||c(3,"missing image size specifier"),he},b=function(V,O,z){const Y=O;if(Y<8||Y>32767||V[0]!==2||V[1]!==2||V[2]&128)return new Uint8Array(V);Y!==(V[2]<<8|V[3])&&c(3,"wrong scanline width");const se=new Uint8Array(4*O*z);se.length||c(4,"unable to allocate buffer space");let ce=0,he=0;const me=4*Y,P=new Uint8Array(4),Q=new Uint8Array(me);let ee=z;for(;ee>0&&he<V.byteLength;){he+4>V.byteLength&&c(1),P[0]=V[he++],P[1]=V[he++],P[2]=V[he++],P[3]=V[he++],(P[0]!=2||P[1]!=2||(P[2]<<8|P[3])!=Y)&&c(3,"bad rgbe scanline format");let ge=0,Se;for(;ge<me&&he<V.byteLength;){Se=V[he++];const fe=Se>128;if(fe&&(Se-=128),(Se===0||ge+Se>me)&&c(3,"bad scanline data"),fe){const Ce=V[he++];for(let Le=0;Le<Se;Le++)Q[ge++]=Ce}else Q.set(V.subarray(he,he+Se),ge),ge+=Se,he+=Se}const W=Y;for(let fe=0;fe<W;fe++){let Ce=0;se[ce]=Q[fe+Ce],Ce+=Y,se[ce+1]=Q[fe+Ce],Ce+=Y,se[ce+2]=Q[fe+Ce],Ce+=Y,se[ce+3]=Q[fe+Ce],ce+=4}ee--}return se},T=function(V,O,z,Y){const se=V[O+3],ce=Math.pow(2,se-128)/255;z[Y+0]=V[O+0]*ce,z[Y+1]=V[O+1]*ce,z[Y+2]=V[O+2]*ce,z[Y+3]=1},R=function(V,O,z,Y){const se=V[O+3],ce=Math.pow(2,se-128)/255;z[Y+0]=uf.toHalfFloat(Math.min(V[O+0]*ce,65504)),z[Y+1]=uf.toHalfFloat(Math.min(V[O+1]*ce,65504)),z[Y+2]=uf.toHalfFloat(Math.min(V[O+2]*ce,65504)),z[Y+3]=uf.toHalfFloat(1)},A=new Uint8Array(e);A.pos=0;const M=_(A),C=M.width,D=M.height,U=b(A.subarray(A.pos),C,D);let H,F,G;switch(this.type){case bi:G=U.length/4;const V=new Float32Array(G*4);for(let z=0;z<G;z++)T(U,z*4,V,z*4);H=V,F=bi;break;case ra:G=U.length/4;const O=new Uint16Array(G*4);for(let z=0;z<G;z++)R(U,z*4,O,z*4);H=O,F=ra;break;default:throw new Error("THREE.RGBELoader: Unsupported type: "+this.type)}return{width:C,height:D,data:H,header:M.string,gamma:M.gamma,exposure:M.exposure,type:F}}setDataType(e){return this.type=e,this}load(e,t,n,a){function o(c,h){switch(c.type){case bi:case ra:"colorSpace"in c?c.colorSpace="srgb-linear":c.encoding=3e3,c.minFilter=Hn,c.magFilter=Hn,c.generateMipmaps=!1,c.flipY=!0;break}t&&t(c,h)}return super.load(e,o,n,a)}}const xm=mw>=152;class m5 extends Vb{constructor(e){super(e),this.type=ra}parse(e){const O=Math.pow(2.7182818,2.2);function z(I,q){for(var ue=0,we=0;we<65536;++we)(we==0||I[we>>3]&1<<(we&7))&&(q[ue++]=we);for(var He=ue-1;ue<65536;)q[ue++]=0;return He}function Y(I){for(var q=0;q<16384;q++)I[q]={},I[q].len=0,I[q].lit=0,I[q].p=null}const se={l:0,c:0,lc:0};function ce(I,q,ue,we,He){for(;ue<I;)q=q<<8|Dt(we,He),ue+=8;ue-=I,se.l=q>>ue&(1<<I)-1,se.c=q,se.lc=ue}const he=new Array(59);function me(I){for(var q=0;q<=58;++q)he[q]=0;for(var q=0;q<65537;++q)he[I[q]]+=1;for(var ue=0,q=58;q>0;--q){var we=ue+he[q]>>1;he[q]=ue,ue=we}for(var q=0;q<65537;++q){var He=I[q];He>0&&(I[q]=He|he[He]++<<6)}}function P(I,q,ue,we,He,Ie,at){for(var B=ue,$=0,ne=0;He<=Ie;He++){if(B.value-ue.value>we)return!1;ce(6,$,ne,I,B);var ae=se.l;if($=se.c,ne=se.lc,at[He]=ae,ae==63){if(B.value-ue.value>we)throw"Something wrong with hufUnpackEncTable";ce(8,$,ne,I,B);var te=se.l+6;if($=se.c,ne=se.lc,He+te>Ie+1)throw"Something wrong with hufUnpackEncTable";for(;te--;)at[He++]=0;He--}else if(ae>=59){var te=ae-59+2;if(He+te>Ie+1)throw"Something wrong with hufUnpackEncTable";for(;te--;)at[He++]=0;He--}}me(at)}function Q(I){return I&63}function ee(I){return I>>6}function ge(I,q,ue,we){for(;q<=ue;q++){var He=ee(I[q]),Ie=Q(I[q]);if(He>>Ie)throw"Invalid table entry";if(Ie>14){var at=we[He>>Ie-14];if(at.len)throw"Invalid table entry";if(at.lit++,at.p){var B=at.p;at.p=new Array(at.lit);for(var $=0;$<at.lit-1;++$)at.p[$]=B[$]}else at.p=new Array(1);at.p[at.lit-1]=q}else if(Ie)for(var ne=0,$=1<<14-Ie;$>0;$--){var at=we[(He<<14-Ie)+ne];if(at.len||at.p)throw"Invalid table entry";at.len=Ie,at.lit=q,ne++}}return!0}const Se={c:0,lc:0};function W(I,q,ue,we){I=I<<8|Dt(ue,we),q+=8,Se.c=I,Se.lc=q}const fe={c:0,lc:0};function Ce(I,q,ue,we,He,Ie,at,B,$,ne){if(I==q){we<8&&(W(ue,we,He,at),ue=Se.c,we=Se.lc),we-=8;var ae=ue>>we,ae=new Uint8Array([ae])[0];if($.value+ae>ne)return!1;for(var te=B[$.value-1];ae-- >0;)B[$.value++]=te}else if($.value<ne)B[$.value++]=I;else return!1;fe.c=ue,fe.lc=we}function Le(I){return I&65535}function nt(I){var q=Le(I);return q>32767?q-65536:q}const ve={a:0,b:0};function De(I,q){var ue=nt(I),we=nt(q),He=we,Ie=ue+(He&1)+(He>>1),at=Ie,B=Ie-He;ve.a=at,ve.b=B}function ot(I,q){var ue=Le(I),we=Le(q),He=ue-(we>>1)&65535,Ie=we+He-32768&65535;ve.a=Ie,ve.b=He}function gt(I,q,ue,we,He,Ie,at){for(var B=at<16384,$=ue>He?He:ue,ne=1,ae;ne<=$;)ne<<=1;for(ne>>=1,ae=ne,ne>>=1;ne>=1;){for(var te=0,Be=te+Ie*(He-ae),Ue=Ie*ne,Ge=Ie*ae,qe=we*ne,st=we*ae,yt,pt,zt,Jt;te<=Be;te+=Ge){for(var Ft=te,an=te+we*(ue-ae);Ft<=an;Ft+=st){var Nt=Ft+qe,mt=Ft+Ue,xn=mt+qe;B?(De(I[Ft+q],I[mt+q]),yt=ve.a,zt=ve.b,De(I[Nt+q],I[xn+q]),pt=ve.a,Jt=ve.b,De(yt,pt),I[Ft+q]=ve.a,I[Nt+q]=ve.b,De(zt,Jt),I[mt+q]=ve.a,I[xn+q]=ve.b):(ot(I[Ft+q],I[mt+q]),yt=ve.a,zt=ve.b,ot(I[Nt+q],I[xn+q]),pt=ve.a,Jt=ve.b,ot(yt,pt),I[Ft+q]=ve.a,I[Nt+q]=ve.b,ot(zt,Jt),I[mt+q]=ve.a,I[xn+q]=ve.b)}if(ue&ne){var mt=Ft+Ue;B?De(I[Ft+q],I[mt+q]):ot(I[Ft+q],I[mt+q]),yt=ve.a,I[mt+q]=ve.b,I[Ft+q]=yt}}if(He&ne)for(var Ft=te,an=te+we*(ue-ae);Ft<=an;Ft+=st){var Nt=Ft+qe;B?De(I[Ft+q],I[Nt+q]):ot(I[Ft+q],I[Nt+q]),yt=ve.a,I[Nt+q]=ve.b,I[Ft+q]=yt}ae=ne,ne>>=1}return te}function Et(I,q,ue,we,He,Ie,at,B,$,ne){for(var ae=0,te=0,Be=B,Ue=Math.trunc(He.value+(Ie+7)/8);He.value<Ue;)for(W(ae,te,ue,He),ae=Se.c,te=Se.lc;te>=14;){var Ge=ae>>te-14&16383,qe=q[Ge];if(qe.len)te-=qe.len,Ce(qe.lit,at,ae,te,ue,we,He,$,ne,Be),ae=fe.c,te=fe.lc;else{if(!qe.p)throw"hufDecode issues";var st;for(st=0;st<qe.lit;st++){for(var yt=Q(I[qe.p[st]]);te<yt&&He.value<Ue;)W(ae,te,ue,He),ae=Se.c,te=Se.lc;if(te>=yt&&ee(I[qe.p[st]])==(ae>>te-yt&(1<<yt)-1)){te-=yt,Ce(qe.p[st],at,ae,te,ue,we,He,$,ne,Be),ae=fe.c,te=fe.lc;break}}if(st==qe.lit)throw"hufDecode issues"}}var pt=8-Ie&7;for(ae>>=pt,te-=pt;te>0;){var qe=q[ae<<14-te&16383];if(qe.len)te-=qe.len,Ce(qe.lit,at,ae,te,ue,we,He,$,ne,Be),ae=fe.c,te=fe.lc;else throw"hufDecode issues"}return!0}function Zt(I,q,ue,we,He,Ie){var at={value:0},B=ue.value,$=et(q,ue),ne=et(q,ue);ue.value+=4;var ae=et(q,ue);if(ue.value+=4,$<0||$>=65537||ne<0||ne>=65537)throw"Something wrong with HUF_ENCSIZE";var te=new Array(65537),Be=new Array(16384);Y(Be);var Ue=we-(ue.value-B);if(P(I,q,ue,Ue,$,ne,te),ae>8*(we-(ue.value-B)))throw"Something wrong with hufUncompress";ge(te,$,ne,Be),Et(te,Be,I,q,ue,ae,ne,Ie,He,at)}function _n(I,q,ue){for(var we=0;we<ue;++we)q[we]=I[q[we]]}function ie(I){for(var q=1;q<I.length;q++){var ue=I[q-1]+I[q]-128;I[q]=ue}}function Ze(I,q){for(var ue=0,we=Math.floor((I.length+1)/2),He=0,Ie=I.length-1;!(He>Ie||(q[He++]=I[ue++],He>Ie));)q[He++]=I[we++]}function je(I){for(var q=I.byteLength,ue=new Array,we=0,He=new DataView(I);q>0;){var Ie=He.getInt8(we++);if(Ie<0){var at=-Ie;q-=at+1;for(var B=0;B<at;B++)ue.push(He.getUint8(we++))}else{var at=Ie;q-=2;for(var $=He.getUint8(we++),B=0;B<at+1;B++)ue.push($)}}return ue}function ke(I,q,ue,we,He,Ie){var Nt=new DataView(Ie.buffer),at=ue[I.idx[0]].width,B=ue[I.idx[0]].height,$=3,ne=Math.floor(at/8),ae=Math.ceil(at/8),te=Math.ceil(B/8),Be=at-(ae-1)*8,Ue=B-(te-1)*8,Ge={value:0},qe=new Array($),st=new Array($),yt=new Array($),pt=new Array($),zt=new Array($);for(let gn=0;gn<$;++gn)zt[gn]=q[I.idx[gn]],qe[gn]=gn<1?0:qe[gn-1]+ae*te,st[gn]=new Float32Array(64),yt[gn]=new Uint16Array(64),pt[gn]=new Uint16Array(ae*64);for(let gn=0;gn<te;++gn){var Jt=8;gn==te-1&&(Jt=Ue);var Ft=8;for(let Un=0;Un<ae;++Un){Un==ae-1&&(Ft=Be);for(let wt=0;wt<$;++wt)yt[wt].fill(0),yt[wt][0]=He[qe[wt]++],Fe(Ge,we,yt[wt]),dt(yt[wt],st[wt]),it(st[wt]);lt(st);for(let wt=0;wt<$;++wt)Vt(st[wt],pt[wt],Un*64)}let yn=0;for(let Un=0;Un<$;++Un){const wt=ue[I.idx[Un]].type;for(let kn=8*gn;kn<8*gn+Jt;++kn){yn=zt[Un][kn];for(let fi=0;fi<ne;++fi){const Rn=fi*64+(kn&7)*8;Nt.setUint16(yn+0*wt,pt[Un][Rn+0],!0),Nt.setUint16(yn+2*wt,pt[Un][Rn+1],!0),Nt.setUint16(yn+4*wt,pt[Un][Rn+2],!0),Nt.setUint16(yn+6*wt,pt[Un][Rn+3],!0),Nt.setUint16(yn+8*wt,pt[Un][Rn+4],!0),Nt.setUint16(yn+10*wt,pt[Un][Rn+5],!0),Nt.setUint16(yn+12*wt,pt[Un][Rn+6],!0),Nt.setUint16(yn+14*wt,pt[Un][Rn+7],!0),yn+=16*wt}}if(ne!=ae)for(let kn=8*gn;kn<8*gn+Jt;++kn){const fi=zt[Un][kn]+8*ne*2*wt,Rn=ne*64+(kn&7)*8;for(let Xn=0;Xn<Ft;++Xn)Nt.setUint16(fi+Xn*2*wt,pt[Un][Rn+Xn],!0)}}}for(var an=new Uint16Array(at),Nt=new DataView(Ie.buffer),mt=0;mt<$;++mt){ue[I.idx[mt]].decoded=!0;var xn=ue[I.idx[mt]].type;if(ue[mt].type==2)for(var rn=0;rn<B;++rn){const gn=zt[mt][rn];for(var Fn=0;Fn<at;++Fn)an[Fn]=Nt.getUint16(gn+Fn*2*xn,!0);for(var Fn=0;Fn<at;++Fn)Nt.setFloat32(gn+Fn*2*xn,Me(an[Fn]),!0)}}}function Fe(I,q,ue){for(var we,He=1;He<64;)we=q[I.value],we==65280?He=64:we>>8==255?He+=we&255:(ue[He]=we,He++),I.value++}function dt(I,q){q[0]=Me(I[0]),q[1]=Me(I[1]),q[2]=Me(I[5]),q[3]=Me(I[6]),q[4]=Me(I[14]),q[5]=Me(I[15]),q[6]=Me(I[27]),q[7]=Me(I[28]),q[8]=Me(I[2]),q[9]=Me(I[4]),q[10]=Me(I[7]),q[11]=Me(I[13]),q[12]=Me(I[16]),q[13]=Me(I[26]),q[14]=Me(I[29]),q[15]=Me(I[42]),q[16]=Me(I[3]),q[17]=Me(I[8]),q[18]=Me(I[12]),q[19]=Me(I[17]),q[20]=Me(I[25]),q[21]=Me(I[30]),q[22]=Me(I[41]),q[23]=Me(I[43]),q[24]=Me(I[9]),q[25]=Me(I[11]),q[26]=Me(I[18]),q[27]=Me(I[24]),q[28]=Me(I[31]),q[29]=Me(I[40]),q[30]=Me(I[44]),q[31]=Me(I[53]),q[32]=Me(I[10]),q[33]=Me(I[19]),q[34]=Me(I[23]),q[35]=Me(I[32]),q[36]=Me(I[39]),q[37]=Me(I[45]),q[38]=Me(I[52]),q[39]=Me(I[54]),q[40]=Me(I[20]),q[41]=Me(I[22]),q[42]=Me(I[33]),q[43]=Me(I[38]),q[44]=Me(I[46]),q[45]=Me(I[51]),q[46]=Me(I[55]),q[47]=Me(I[60]),q[48]=Me(I[21]),q[49]=Me(I[34]),q[50]=Me(I[37]),q[51]=Me(I[47]),q[52]=Me(I[50]),q[53]=Me(I[56]),q[54]=Me(I[59]),q[55]=Me(I[61]),q[56]=Me(I[35]),q[57]=Me(I[36]),q[58]=Me(I[48]),q[59]=Me(I[49]),q[60]=Me(I[57]),q[61]=Me(I[58]),q[62]=Me(I[62]),q[63]=Me(I[63])}function it(I){const q=.5*Math.cos(.7853975),ue=.5*Math.cos(3.14159/16),we=.5*Math.cos(3.14159/8),He=.5*Math.cos(3*3.14159/16),Ie=.5*Math.cos(5*3.14159/16),at=.5*Math.cos(3*3.14159/8),B=.5*Math.cos(7*3.14159/16);for(var $=new Array(4),ne=new Array(4),ae=new Array(4),te=new Array(4),Be=0;Be<8;++Be){var Ue=Be*8;$[0]=we*I[Ue+2],$[1]=at*I[Ue+2],$[2]=we*I[Ue+6],$[3]=at*I[Ue+6],ne[0]=ue*I[Ue+1]+He*I[Ue+3]+Ie*I[Ue+5]+B*I[Ue+7],ne[1]=He*I[Ue+1]-B*I[Ue+3]-ue*I[Ue+5]-Ie*I[Ue+7],ne[2]=Ie*I[Ue+1]-ue*I[Ue+3]+B*I[Ue+5]+He*I[Ue+7],ne[3]=B*I[Ue+1]-Ie*I[Ue+3]+He*I[Ue+5]-ue*I[Ue+7],ae[0]=q*(I[Ue+0]+I[Ue+4]),ae[3]=q*(I[Ue+0]-I[Ue+4]),ae[1]=$[0]+$[3],ae[2]=$[1]-$[2],te[0]=ae[0]+ae[1],te[1]=ae[3]+ae[2],te[2]=ae[3]-ae[2],te[3]=ae[0]-ae[1],I[Ue+0]=te[0]+ne[0],I[Ue+1]=te[1]+ne[1],I[Ue+2]=te[2]+ne[2],I[Ue+3]=te[3]+ne[3],I[Ue+4]=te[3]-ne[3],I[Ue+5]=te[2]-ne[2],I[Ue+6]=te[1]-ne[1],I[Ue+7]=te[0]-ne[0]}for(var Ge=0;Ge<8;++Ge)$[0]=we*I[16+Ge],$[1]=at*I[16+Ge],$[2]=we*I[48+Ge],$[3]=at*I[48+Ge],ne[0]=ue*I[8+Ge]+He*I[24+Ge]+Ie*I[40+Ge]+B*I[56+Ge],ne[1]=He*I[8+Ge]-B*I[24+Ge]-ue*I[40+Ge]-Ie*I[56+Ge],ne[2]=Ie*I[8+Ge]-ue*I[24+Ge]+B*I[40+Ge]+He*I[56+Ge],ne[3]=B*I[8+Ge]-Ie*I[24+Ge]+He*I[40+Ge]-ue*I[56+Ge],ae[0]=q*(I[Ge]+I[32+Ge]),ae[3]=q*(I[Ge]-I[32+Ge]),ae[1]=$[0]+$[3],ae[2]=$[1]-$[2],te[0]=ae[0]+ae[1],te[1]=ae[3]+ae[2],te[2]=ae[3]-ae[2],te[3]=ae[0]-ae[1],I[0+Ge]=te[0]+ne[0],I[8+Ge]=te[1]+ne[1],I[16+Ge]=te[2]+ne[2],I[24+Ge]=te[3]+ne[3],I[32+Ge]=te[3]-ne[3],I[40+Ge]=te[2]-ne[2],I[48+Ge]=te[1]-ne[1],I[56+Ge]=te[0]-ne[0]}function lt(I){for(var q=0;q<64;++q){var ue=I[0][q],we=I[1][q],He=I[2][q];I[0][q]=ue+1.5747*He,I[1][q]=ue-.1873*we-.4682*He,I[2][q]=ue+1.8556*we}}function Vt(I,q,ue){for(var we=0;we<64;++we)q[ue+we]=uf.toHalfFloat(qt(I[we]))}function qt(I){return I<=1?Math.sign(I)*Math.pow(Math.abs(I),2.2):Math.sign(I)*Math.pow(O,Math.abs(I)-1)}function J(I){return new DataView(I.array.buffer,I.offset.value,I.size)}function k(I){var q=I.viewer.buffer.slice(I.offset.value,I.offset.value+I.size),ue=new Uint8Array(je(q)),we=new Uint8Array(ue.length);return ie(ue),Ze(ue,we),new DataView(we.buffer)}function be(I){var q=I.array.slice(I.offset.value,I.offset.value+I.size),ue=N0(q),we=new Uint8Array(ue.length);return ie(ue),Ze(ue,we),new DataView(we.buffer)}function ze(I){for(var q=I.viewer,ue={value:I.offset.value},we=new Uint16Array(I.width*I.scanlineBlockSize*(I.channels*I.type)),He=new Uint8Array(8192),Ie=0,at=new Array(I.channels),B=0;B<I.channels;B++)at[B]={},at[B].start=Ie,at[B].end=at[B].start,at[B].nx=I.width,at[B].ny=I.lines,at[B].size=I.type,Ie+=at[B].nx*at[B].ny*at[B].size;var $=ct(q,ue),ne=ct(q,ue);if(ne>=8192)throw"Something is wrong with PIZ_COMPRESSION BITMAP_SIZE";if($<=ne)for(var B=0;B<ne-$+1;B++)He[B+$]=vt(q,ue);var ae=new Uint16Array(65536),te=z(He,ae),Be=et(q,ue);Zt(I.array,q,ue,Be,we,Ie);for(var B=0;B<I.channels;++B)for(var Ue=at[B],Ge=0;Ge<at[B].size;++Ge)gt(we,Ue.start+Ge,Ue.nx,Ue.size,Ue.ny,Ue.nx*Ue.size,te);_n(ae,we,Ie);for(var qe=0,st=new Uint8Array(we.buffer.byteLength),yt=0;yt<I.lines;yt++)for(var pt=0;pt<I.channels;pt++){var Ue=at[pt],zt=Ue.nx*Ue.size,Jt=new Uint8Array(we.buffer,Ue.end*2,zt*2);st.set(Jt,qe),qe+=zt*2,Ue.end+=zt}return new DataView(st.buffer)}function $e(I){var q=I.array.slice(I.offset.value,I.offset.value+I.size),ue=N0(q);const we=I.lines*I.channels*I.width,He=I.type==1?new Uint16Array(we):new Uint32Array(we);let Ie=0,at=0;const B=new Array(4);for(let $=0;$<I.lines;$++)for(let ne=0;ne<I.channels;ne++){let ae=0;switch(I.type){case 1:B[0]=Ie,B[1]=B[0]+I.width,Ie=B[1]+I.width;for(let te=0;te<I.width;++te){const Be=ue[B[0]++]<<8|ue[B[1]++];ae+=Be,He[at]=ae,at++}break;case 2:B[0]=Ie,B[1]=B[0]+I.width,B[2]=B[1]+I.width,Ie=B[2]+I.width;for(let te=0;te<I.width;++te){const Be=ue[B[0]++]<<24|ue[B[1]++]<<16|ue[B[2]++]<<8;ae+=Be,He[at]=ae,at++}break}}return new DataView(He.buffer)}function Pe(I){var q=I.viewer,ue={value:I.offset.value},we=new Uint8Array(I.width*I.lines*(I.channels*I.type*2)),He={version:ut(q,ue),unknownUncompressedSize:ut(q,ue),unknownCompressedSize:ut(q,ue),acCompressedSize:ut(q,ue),dcCompressedSize:ut(q,ue),rleCompressedSize:ut(q,ue),rleUncompressedSize:ut(q,ue),rleRawSize:ut(q,ue),totalAcUncompressedCount:ut(q,ue),totalDcUncompressedCount:ut(q,ue),acCompression:ut(q,ue)};if(He.version<2)throw"EXRLoader.parse: "+Di.compression+" version "+He.version+" is unsupported";for(var Ie=new Array,at=ct(q,ue)-2;at>0;){var B=At(q.buffer,ue),$=vt(q,ue),ne=$>>2&3,ae=($>>4)-1,te=new Int8Array([ae])[0],Be=vt(q,ue);Ie.push({name:B,index:te,type:Be,compression:ne}),at-=B.length+3}for(var Ue=Di.channels,Ge=new Array(I.channels),qe=0;qe<I.channels;++qe){var st=Ge[qe]={},yt=Ue[qe];st.name=yt.name,st.compression=0,st.decoded=!1,st.type=yt.pixelType,st.pLinear=yt.pLinear,st.width=I.width,st.height=I.lines}for(var pt={idx:new Array(3)},zt=0;zt<I.channels;++zt)for(var st=Ge[zt],qe=0;qe<Ie.length;++qe){var Jt=Ie[qe];st.name==Jt.name&&(st.compression=Jt.compression,Jt.index>=0&&(pt.idx[Jt.index]=zt),st.offset=zt)}if(He.acCompressedSize>0)switch(He.acCompression){case 0:var Nt=new Uint16Array(He.totalAcUncompressedCount);Zt(I.array,q,ue,He.acCompressedSize,Nt,He.totalAcUncompressedCount);break;case 1:var Ft=I.array.slice(ue.value,ue.value+He.totalAcUncompressedCount),an=N0(Ft),Nt=new Uint16Array(an.buffer);ue.value+=He.totalAcUncompressedCount;break}if(He.dcCompressedSize>0){var mt={array:I.array,offset:ue,size:He.dcCompressedSize},xn=new Uint16Array(be(mt).buffer);ue.value+=He.dcCompressedSize}if(He.rleRawSize>0){var Ft=I.array.slice(ue.value,ue.value+He.rleCompressedSize),an=N0(Ft),rn=je(an.buffer);ue.value+=He.rleCompressedSize}for(var Fn=0,gn=new Array(Ge.length),qe=0;qe<gn.length;++qe)gn[qe]=new Array;for(var yn=0;yn<I.lines;++yn)for(var Un=0;Un<Ge.length;++Un)gn[Un].push(Fn),Fn+=Ge[Un].width*I.type*2;ke(pt,gn,Ge,Nt,xn,we);for(var qe=0;qe<Ge.length;++qe){var st=Ge[qe];if(!st.decoded)switch(st.compression){case 2:for(var wt=0,kn=0,yn=0;yn<I.lines;++yn){for(var fi=gn[qe][wt],Rn=0;Rn<st.width;++Rn){for(var Xn=0;Xn<2*st.type;++Xn)we[fi++]=rn[kn+Xn*st.width*st.height];kn++}wt++}break;case 1:default:throw"EXRLoader.parse: unsupported channel compression"}}return new DataView(we.buffer)}function At(I,q){for(var ue=new Uint8Array(I),we=0;ue[q.value+we]!=0;)we+=1;var He=new TextDecoder().decode(ue.slice(q.value,q.value+we));return q.value=q.value+we+1,He}function ft(I,q,ue){var we=new TextDecoder().decode(new Uint8Array(I).slice(q.value,q.value+ue));return q.value=q.value+ue,we}function Rt(I,q){var ue=Qe(I,q),we=et(I,q);return[ue,we]}function Ct(I,q){var ue=et(I,q),we=et(I,q);return[ue,we]}function Qe(I,q){var ue=I.getInt32(q.value,!0);return q.value=q.value+4,ue}function et(I,q){var ue=I.getUint32(q.value,!0);return q.value=q.value+4,ue}function Dt(I,q){var ue=I[q.value];return q.value=q.value+1,ue}function vt(I,q){var ue=I.getUint8(q.value);return q.value=q.value+1,ue}const ut=function(I,q){let ue;return"getBigInt64"in DataView.prototype?ue=Number(I.getBigInt64(q.value,!0)):ue=I.getUint32(q.value+4,!0)+Number(I.getUint32(q.value,!0)<<32),q.value+=8,ue};function Ut(I,q){var ue=I.getFloat32(q.value,!0);return q.value+=4,ue}function pe(I,q){return uf.toHalfFloat(Ut(I,q))}function Me(I){var q=(I&31744)>>10,ue=I&1023;return(I>>15?-1:1)*(q?q===31?ue?NaN:1/0:Math.pow(2,q-15)*(1+ue/1024):6103515625e-14*(ue/1024))}function ct(I,q){var ue=I.getUint16(q.value,!0);return q.value+=2,ue}function bt(I,q){return Me(ct(I,q))}function tt(I,q,ue,we){for(var He=ue.value,Ie=[];ue.value<He+we-1;){var at=At(q,ue),B=Qe(I,ue),$=vt(I,ue);ue.value+=3;var ne=Qe(I,ue),ae=Qe(I,ue);Ie.push({name:at,pixelType:B,pLinear:$,xSampling:ne,ySampling:ae})}return ue.value+=1,Ie}function We(I,q){var ue=Ut(I,q),we=Ut(I,q),He=Ut(I,q),Ie=Ut(I,q),at=Ut(I,q),B=Ut(I,q),$=Ut(I,q),ne=Ut(I,q);return{redX:ue,redY:we,greenX:He,greenY:Ie,blueX:at,blueY:B,whiteX:$,whiteY:ne}}function Tt(I,q){var ue=["NO_COMPRESSION","RLE_COMPRESSION","ZIPS_COMPRESSION","ZIP_COMPRESSION","PIZ_COMPRESSION","PXR24_COMPRESSION","B44_COMPRESSION","B44A_COMPRESSION","DWAA_COMPRESSION","DWAB_COMPRESSION"],we=vt(I,q);return ue[we]}function Xt(I,q){var ue=et(I,q),we=et(I,q),He=et(I,q),Ie=et(I,q);return{xMin:ue,yMin:we,xMax:He,yMax:Ie}}function Mn(I,q){var ue=["INCREASING_Y"],we=vt(I,q);return ue[we]}function hn(I,q){var ue=Ut(I,q),we=Ut(I,q);return[ue,we]}function Xi(I,q){var ue=Ut(I,q),we=Ut(I,q),He=Ut(I,q);return[ue,we,He]}function ba(I,q,ue,we,He){if(we==="string"||we==="stringvector"||we==="iccProfile")return ft(q,ue,He);if(we==="chlist")return tt(I,q,ue,He);if(we==="chromaticities")return We(I,ue);if(we==="compression")return Tt(I,ue);if(we==="box2i")return Xt(I,ue);if(we==="lineOrder")return Mn(I,ue);if(we==="float")return Ut(I,ue);if(we==="v2f")return hn(I,ue);if(we==="v3f")return Xi(I,ue);if(we==="int")return Qe(I,ue);if(we==="rational")return Rt(I,ue);if(we==="timecode")return Ct(I,ue);if(we==="preview")return ue.value+=He,"skipped";ue.value+=He}function oo(I,q,ue){const we={};if(I.getUint32(0,!0)!=20000630)throw"THREE.EXRLoader: provided file doesn't appear to be in OpenEXR format.";we.version=I.getUint8(4);const He=I.getUint8(5);we.spec={singleTile:!!(He&2),longName:!!(He&4),deepFormat:!!(He&8),multiPart:!!(He&16)},ue.value=8;for(var Ie=!0;Ie;){var at=At(q,ue);if(at==0)Ie=!1;else{var B=At(q,ue),$=et(I,ue),ne=ba(I,q,ue,B,$);ne===void 0?console.warn(`EXRLoader.parse: skipped unknown header attribute type '${B}'.`):we[at]=ne}}if((He&-5)!=0)throw console.error("EXRHeader:",we),"THREE.EXRLoader: provided file is currently unsupported.";return we}function Oa(I,q,ue,we,He){const Ie={size:0,viewer:q,array:ue,offset:we,width:I.dataWindow.xMax-I.dataWindow.xMin+1,height:I.dataWindow.yMax-I.dataWindow.yMin+1,channels:I.channels.length,bytesPerLine:null,lines:null,inputSize:null,type:I.channels[0].pixelType,uncompress:null,getter:null,format:null,[xm?"colorSpace":"encoding"]:null};switch(I.compression){case"NO_COMPRESSION":Ie.lines=1,Ie.uncompress=J;break;case"RLE_COMPRESSION":Ie.lines=1,Ie.uncompress=k;break;case"ZIPS_COMPRESSION":Ie.lines=1,Ie.uncompress=be;break;case"ZIP_COMPRESSION":Ie.lines=16,Ie.uncompress=be;break;case"PIZ_COMPRESSION":Ie.lines=32,Ie.uncompress=ze;break;case"PXR24_COMPRESSION":Ie.lines=16,Ie.uncompress=$e;break;case"DWAA_COMPRESSION":Ie.lines=32,Ie.uncompress=Pe;break;case"DWAB_COMPRESSION":Ie.lines=256,Ie.uncompress=Pe;break;default:throw"EXRLoader.parse: "+I.compression+" is unsupported"}if(Ie.scanlineBlockSize=Ie.lines,Ie.type==1)switch(He){case bi:Ie.getter=bt,Ie.inputSize=2;break;case ra:Ie.getter=ct,Ie.inputSize=2;break}else if(Ie.type==2)switch(He){case bi:Ie.getter=Ut,Ie.inputSize=4;break;case ra:Ie.getter=pe,Ie.inputSize=4}else throw"EXRLoader.parse: unsupported pixelType "+Ie.type+" for "+I.compression+".";Ie.blockCount=(I.dataWindow.yMax+1)/Ie.scanlineBlockSize;for(var at=0;at<Ie.blockCount;at++)ut(q,we);Ie.outputChannels=Ie.channels==3?4:Ie.channels;const B=Ie.width*Ie.height*Ie.outputChannels;switch(He){case bi:Ie.byteArray=new Float32Array(B),Ie.channels<Ie.outputChannels&&Ie.byteArray.fill(1,0,B);break;case ra:Ie.byteArray=new Uint16Array(B),Ie.channels<Ie.outputChannels&&Ie.byteArray.fill(15360,0,B);break;default:console.error("THREE.EXRLoader: unsupported type: ",He);break}return Ie.bytesPerLine=Ie.width*Ie.inputSize*Ie.channels,Ie.outputChannels==4?Ie.format=ki:Ie.format=ig,xm?Ie.colorSpace="srgb-linear":Ie.encoding=3e3,Ie}const es=new DataView(e),Ma=new Uint8Array(e),ts={value:0},Di=oo(es,e,ts),Yt=Oa(Di,es,Ma,ts,this.type),Bi={value:0},nn={R:0,G:1,B:2,A:3,Y:0};for(let I=0;I<Yt.height/Yt.scanlineBlockSize;I++){const q=et(es,ts);Yt.size=et(es,ts),Yt.lines=q+Yt.scanlineBlockSize>Yt.height?Yt.height-q:Yt.scanlineBlockSize;
4043const we=Yt.size<Yt.lines*Yt.bytesPerLine?Yt.uncompress(Yt):J(Yt);ts.value+=Yt.size;for(let He=0;He<Yt.scanlineBlockSize;He++){const Ie=He+I*Yt.scanlineBlockSize;if(Ie>=Yt.height)break;for(let at=0;at<Yt.channels;at++){const B=nn[Di.channels[at].name];for(let $=0;$<Yt.width;$++){Bi.value=(He*(Yt.channels*Yt.width)+at*Yt.width+$)*Yt.inputSize;const ne=(Yt.height-1-Ie)*(Yt.width*Yt.outputChannels)+$*Yt.outputChannels+B;Yt.byteArray[ne]=Yt.getter(we,Bi)}}}}return{header:Di,width:Yt.width,height:Yt.height,data:Yt.byteArray,format:Yt.format,[xm?"colorSpace":"encoding"]:Yt[xm?"colorSpace":"encoding"],type:this.type}}setDataType(e){return this.type=e,this}load(e,t,n,a){function o(c,h){xm?c.colorSpace=h.colorSpace:c.encoding=h.encoding,c.minFilter=Hn,c.magFilter=Hn,c.generateMipmaps=!1,c.flipY=!1,t&&t(c,h)}return super.load(e,o,n,a)}}function g5(s,e,t,n){var a;return a=class extends Ts{constructor(o){super({vertexShader:e,fragmentShader:t,...o});for(const c in s)this.uniforms[c]=new v_(s[c]),Object.defineProperty(this,c,{get(){return this.uniforms[c].value},set(h){this.uniforms[c].value=h}});this.uniforms=bb.clone(this.uniforms)}},a.key=yb.generateUUID(),a}function TT(s,e,t){const n=bf(b=>b.size),a=bf(b=>b.viewport),o=typeof s=="number"?s:n.width*a.dpr,c=n.height*a.dpr,h=(typeof s=="number"?t:s)||{},{samples:d=0,depth:p,...v}=h,y=p??h.depthBuffer,_=le.useMemo(()=>{const b=new $s(o,c,{minFilter:Hn,magFilter:Hn,type:ra,...v});return y&&(b.depthTexture=new n_(o,c,bi)),b.samples=d,b},[]);return le.useLayoutEffect(()=>{_.setSize(o,c),d&&(_.samples=d)},[d,_,o,c]),le.useEffect(()=>()=>_.dispose(),[]),_}const v5=g5({},"void main() { }","void main() { gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); discard;  }");class y5 extends tr{constructor(e=6,t=!1){super(),this.uniforms={chromaticAberration:{value:.05},transmission:{value:0},_transmission:{value:1},transmissionMap:{value:null},roughness:{value:0},thickness:{value:0},thicknessMap:{value:null},attenuationDistance:{value:1/0},attenuationColor:{value:new _t("white")},anisotropicBlur:{value:.1},time:{value:0},distortion:{value:0},distortionScale:{value:.5},temporalDistortion:{value:0},buffer:{value:null}},this.onBeforeCompile=n=>{n.uniforms={...n.uniforms,...this.uniforms},this.anisotropy>0&&(n.defines.USE_ANISOTROPY=""),t?n.defines.USE_SAMPLER="":n.defines.USE_TRANSMISSION="",n.fragmentShader=`
4044      uniform float chromaticAberration;         
4045      uniform float anisotropicBlur;      
4046      uniform float time;
4047      uniform float distortion;
4048      uniform float distortionScale;
4049      uniform float temporalDistortion;
4050      uniform sampler2D buffer;
4051
4052      vec3 random3(vec3 c) {
4053        float j = 4096.0*sin(dot(c,vec3(17.0, 59.4, 15.0)));
4054        vec3 r;
4055        r.z = fract(512.0*j);
4056        j *= .125;
4057        r.x = fract(512.0*j);
4058        j *= .125;
4059        r.y = fract(512.0*j);
4060        return r-0.5;
4061      }
4062
4063      uint hash( uint x ) {
4064        x += ( x << 10u );
4065        x ^= ( x >>  6u );
4066        x += ( x <<  3u );
4067        x ^= ( x >> 11u );
4068        x += ( x << 15u );
4069        return x;
4070      }
4071
4072      // Compound versions of the hashing algorithm I whipped together.
4073      uint hash( uvec2 v ) { return hash( v.x ^ hash(v.y)                         ); }
4074      uint hash( uvec3 v ) { return hash( v.x ^ hash(v.y) ^ hash(v.z)             ); }
4075      uint hash( uvec4 v ) { return hash( v.x ^ hash(v.y) ^ hash(v.z) ^ hash(v.w) ); }
4076
4077      // Construct a float with half-open range [0:1] using low 23 bits.
4078      // All zeroes yields 0.0, all ones yields the next smallest representable value below 1.0.
4079      float floatConstruct( uint m ) {
4080        const uint ieeeMantissa = 0x007FFFFFu; // binary32 mantissa bitmask
4081        const uint ieeeOne      = 0x3F800000u; // 1.0 in IEEE binary32
4082        m &= ieeeMantissa;                     // Keep only mantissa bits (fractional part)
4083        m |= ieeeOne;                          // Add fractional part to 1.0
4084        float  f = uintBitsToFloat( m );       // Range [1:2]
4085        return f - 1.0;                        // Range [0:1]
4086      }
4087
4088      // Pseudo-random value in half-open range [0:1].
4089      float randomBase( float x ) { return floatConstruct(hash(floatBitsToUint(x))); }
4090      float randomBase( vec2  v ) { return floatConstruct(hash(floatBitsToUint(v))); }
4091      float randomBase( vec3  v ) { return floatConstruct(hash(floatBitsToUint(v))); }
4092      float randomBase( vec4  v ) { return floatConstruct(hash(floatBitsToUint(v))); }
4093      float rand(float seed) {
4094        float result = randomBase(vec3(gl_FragCoord.xy, seed));
4095        return result;
4096      }
4097
4098      const float F3 =  0.3333333;
4099      const float G3 =  0.1666667;
4100
4101      float snoise(vec3 p) {
4102        vec3 s = floor(p + dot(p, vec3(F3)));
4103        vec3 x = p - s + dot(s, vec3(G3));
4104        vec3 e = step(vec3(0.0), x - x.yzx);
4105        vec3 i1 = e*(1.0 - e.zxy);
4106        vec3 i2 = 1.0 - e.zxy*(1.0 - e);
4107        vec3 x1 = x - i1 + G3;
4108        vec3 x2 = x - i2 + 2.0*G3;
4109        vec3 x3 = x - 1.0 + 3.0*G3;
4110        vec4 w, d;
4111        w.x = dot(x, x);
4112        w.y = dot(x1, x1);
4113        w.z = dot(x2, x2);
4114        w.w = dot(x3, x3);
4115        w = max(0.6 - w, 0.0);
4116        d.x = dot(random3(s), x);
4117        d.y = dot(random3(s + i1), x1);
4118        d.z = dot(random3(s + i2), x2);
4119        d.w = dot(random3(s + 1.0), x3);
4120        w *= w;
4121        w *= w;
4122        d *= w;
4123        return dot(d, vec4(52.0));
4124      }
4125
4126      float snoiseFractal(vec3 m) {
4127        return 0.5333333* snoise(m)
4128              +0.2666667* snoise(2.0*m)
4129              +0.1333333* snoise(4.0*m)
4130              +0.0666667* snoise(8.0*m);
4131      }
4132`+n.fragmentShader,n.fragmentShader=n.fragmentShader.replace("#include <transmission_pars_fragment>",`
4133        #ifdef USE_TRANSMISSION
4134          // Transmission code is based on glTF-Sampler-Viewer
4135          // https://github.com/KhronosGroup/glTF-Sample-Viewer
4136          uniform float _transmission;
4137          uniform float thickness;
4138          uniform float attenuationDistance;
4139          uniform vec3 attenuationColor;
4140          #ifdef USE_TRANSMISSIONMAP
4141            uniform sampler2D transmissionMap;
4142          #endif
4143          #ifdef USE_THICKNESSMAP
4144            uniform sampler2D thicknessMap;
4145          #endif
4146          uniform vec2 transmissionSamplerSize;
4147          uniform sampler2D transmissionSamplerMap;
4148          uniform mat4 modelMatrix;
4149          uniform mat4 projectionMatrix;
4150          varying vec3 vWorldPosition;
4151          vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {
4152            // Direction of refracted light.
4153            vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );
4154            // Compute rotation-independant scaling of the model matrix.
4155            vec3 modelScale;
4156            modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );
4157            modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );
4158            modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );
4159            // The thickness is specified in local space.
4160            return normalize( refractionVector ) * thickness * modelScale;
4161          }
4162          float applyIorToRoughness( const in float roughness, const in float ior ) {
4163            // Scale roughness with IOR so that an IOR of 1.0 results in no microfacet refraction and
4164            // an IOR of 1.5 results in the default amount of microfacet refraction.
4165            return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );
4166          }
4167          vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {
4168            float framebufferLod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );            
4169            #ifdef USE_SAMPLER
4170              #ifdef texture2DLodEXT
4171                return texture2DLodEXT(transmissionSamplerMap, fragCoord.xy, framebufferLod);
4172              #else
4173                return texture2D(transmissionSamplerMap, fragCoord.xy, framebufferLod);
4174              #endif
4175            #else
4176              return texture2D(buffer, fragCoord.xy);
4177            #endif
4178          }
4179          vec3 applyVolumeAttenuation( const in vec3 radiance, const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {
4180            if ( isinf( attenuationDistance ) ) {
4181              // Attenuation distance is +∞, i.e. the transmitted color is not attenuated at all.
4182              return radiance;
4183            } else {
4184              // Compute light attenuation using Beer's law.
4185              vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;
4186              vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); // Beer's law
4187              return transmittance * radiance;
4188            }
4189          }
4190          vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,
4191            const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,
4192            const in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness,
4193            const in vec3 attenuationColor, const in float attenuationDistance ) {
4194            vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );
4195            vec3 refractedRayExit = position + transmissionRay;
4196            // Project refracted vector on the framebuffer, while mapping to normalized device coordinates.
4197            vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );
4198            vec2 refractionCoords = ndcPos.xy / ndcPos.w;
4199            refractionCoords += 1.0;
4200            refractionCoords /= 2.0;
4201            // Sample framebuffer to get pixel the refracted ray hits.
4202            vec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );
4203            vec3 attenuatedColor = applyVolumeAttenuation( transmittedLight.rgb, length( transmissionRay ), attenuationColor, attenuationDistance );
4204            // Get the specular component.
4205            vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );
4206            return vec4( ( 1.0 - F ) * attenuatedColor * diffuseColor, transmittedLight.a );
4207          }
4208        #endif
4209`),n.fragmentShader=n.fragmentShader.replace("#include <transmission_fragment>",`  
4210        // Improve the refraction to use the world pos
4211        material.transmission = _transmission;
4212        material.transmissionAlpha = 1.0;
4213        material.thickness = thickness;
4214        material.attenuationDistance = attenuationDistance;
4215        material.attenuationColor = attenuationColor;
4216        #ifdef USE_TRANSMISSIONMAP
4217          material.transmission *= texture2D( transmissionMap, vUv ).r;
4218        #endif
4219        #ifdef USE_THICKNESSMAP
4220          material.thickness *= texture2D( thicknessMap, vUv ).g;
4221        #endif
4222        
4223        vec3 pos = vWorldPosition;
4224        float runningSeed = 0.0;
4225        vec3 v = normalize( cameraPosition - pos );
4226        vec3 n = inverseTransformDirection( normal, viewMatrix );
4227        vec3 transmission = vec3(0.0);
4228        float transmissionR, transmissionB, transmissionG;
4229        float randomCoords = rand(runningSeed++);
4230        float thickness_smear = thickness * max(pow(roughnessFactor, 0.33), anisotropicBlur);
4231        vec3 distortionNormal = vec3(0.0);
4232        vec3 temporalOffset = vec3(time, -time, -time) * temporalDistortion;
4233        if (distortion > 0.0) {
4234          distortionNormal = distortion * vec3(snoiseFractal(vec3((pos * distortionScale + temporalOffset))), snoiseFractal(vec3(pos.zxy * distortionScale - temporalOffset)), snoiseFractal(vec3(pos.yxz * distortionScale + temporalOffset)));
4235        }
4236        for (float i = 0.0; i < ${e}.0; i ++) {
4237          vec3 sampleNorm = normalize(n + roughnessFactor * roughnessFactor * 2.0 * normalize(vec3(rand(runningSeed++) - 0.5, rand(runningSeed++) - 0.5, rand(runningSeed++) - 0.5)) * pow(rand(runningSeed++), 0.33) + distortionNormal);
4238          transmissionR = getIBLVolumeRefraction(
4239            sampleNorm, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,
4240            pos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness  + thickness_smear * (i + randomCoords) / float(${e}),
4241            material.attenuationColor, material.attenuationDistance
4242          ).r;
4243          transmissionG = getIBLVolumeRefraction(
4244            sampleNorm, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,
4245            pos, modelMatrix, viewMatrix, projectionMatrix, material.ior  * (1.0 + chromaticAberration * (i + randomCoords) / float(${e})) , material.thickness + thickness_smear * (i + randomCoords) / float(${e}),
4246            material.attenuationColor, material.attenuationDistance
4247          ).g;
4248          transmissionB = getIBLVolumeRefraction(
4249            sampleNorm, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,
4250            pos, modelMatrix, viewMatrix, projectionMatrix, material.ior * (1.0 + 2.0 * chromaticAberration * (i + randomCoords) / float(${e})), material.thickness + thickness_smear * (i + randomCoords) / float(${e}),
4251            material.attenuationColor, material.attenuationDistance
4252          ).b;
4253          transmission.r += transmissionR;
4254          transmission.g += transmissionG;
4255          transmission.b += transmissionB;
4256        }
4257        transmission /= ${e}.0;
4258        totalDiffuse = mix( totalDiffuse, transmission.rgb, material.transmission );
4259`)},Object.keys(this.uniforms).forEach(n=>Object.defineProperty(this,n,{get:()=>this.uniforms[n].value,set:a=>this.uniforms[n].value=a}))}}const _5=le.forwardRef(({buffer:s,transmissionSampler:e=!1,backside:t=!1,side:n=ao,transmission:a=1,thickness:o=0,backsideThickness:c=0,backsideEnvMapIntensity:h=1,samples:d=10,resolution:p,backsideResolution:v,background:y,anisotropy:_,anisotropicBlur:b,...T},R)=>{r1({MeshTransmissionMaterial:y5});const A=le.useRef(null),[M]=le.useState(()=>new v5),C=TT(v||p),D=TT(p);let U,H,F,G;return s1(V=>{if(A.current.time=V.clock.elapsedTime,A.current.buffer===D.texture&&!e){var O;G=(O=A.current.__r3f.parent)==null?void 0:O.object,G&&(F=V.gl.toneMapping,U=V.scene.background,H=A.current.envMapIntensity,V.gl.toneMapping=no,y&&(V.scene.background=y),G.material=M,t&&(V.gl.setRenderTarget(C),V.gl.render(V.scene,V.camera),G.material=A.current,G.material.buffer=C.texture,G.material.thickness=c,G.material.side=Ka,G.material.envMapIntensity=h),V.gl.setRenderTarget(D),V.gl.render(V.scene,V.camera),G.material=A.current,G.material.thickness=o,G.material.side=n,G.material.buffer=D.texture,G.material.envMapIntensity=H,V.scene.background=U,V.gl.setRenderTarget(null),V.gl.toneMapping=F)}}),le.useImperativeHandle(R,()=>A.current,[]),le.createElement("meshTransmissionMaterial",V0({args:[d,e],ref:A},T,{buffer:s||D.texture,_transmission:a,anisotropicBlur:b??_,transmission:e?a:0,thickness:o,side:n}))}),bw=(s,e,t)=>{let n;switch(s){case Es:n=new Uint8ClampedArray(e*t*4);break;case ra:n=new Uint16Array(e*t*4);break;case Zo:n=new Uint32Array(e*t*4);break;case Fy:n=new Int8Array(e*t*4);break;case Vy:n=new Int16Array(e*t*4);break;case ng:n=new Int32Array(e*t*4);break;case bi:n=new Float32Array(e*t*4);break;default:throw new Error("Unsupported data type")}return n};let D0;const x5=(s,e,t,n)=>{if(D0!==void 0)return D0;const a=new $s(1,1,n);e.setRenderTarget(a);const o=new Mi(new Zc,new Bs({color:16777215}));e.render(o,t),e.setRenderTarget(null);const c=bw(s,a.width,a.height);return e.readRenderTargetPixels(a,0,0,a.width,a.height,c),a.dispose(),o.geometry.dispose(),o.material.dispose(),D0=c[0]!==0,D0};class l1{constructor(e){var t,n,a,o,c,h,d,p,v,y,_,b,T,R,A,M;this._rendererIsDisposable=!1,this._supportsReadPixels=!0,this.render=()=>{this._renderer.setRenderTarget(this._renderTarget);try{this._renderer.render(this._scene,this._camera)}catch(D){throw this._renderer.setRenderTarget(null),D}this._renderer.setRenderTarget(null)},this._width=e.width,this._height=e.height,this._type=e.type,this._colorSpace
vendor: 6,851 bytes, lines 4259-4292
4259=e.colorSpace;const C={format:ki,depthBuffer:!1,stencilBuffer:!1,type:this._type,colorSpace:this._colorSpace,anisotropy:((t=e.renderTargetOptions)===null||t===void 0?void 0:t.anisotropy)!==void 0?(n=e.renderTargetOptions)===null||n===void 0?void 0:n.anisotropy:1,generateMipmaps:((a=e.renderTargetOptions)===null||a===void 0?void 0:a.generateMipmaps)!==void 0?(o=e.renderTargetOptions)===null||o===void 0?void 0:o.generateMipmaps:!1,magFilter:((c=e.renderTargetOptions)===null||c===void 0?void 0:c.magFilter)!==void 0?(h=e.renderTargetOptions)===null||h===void 0?void 0:h.magFilter:Hn,minFilter:((d=e.renderTargetOptions)===null||d===void 0?void 0:d.minFilter)!==void 0?(p=e.renderTargetOptions)===null||p===void 0?void 0:p.minFilter:Hn,samples:((v=e.renderTargetOptions)===null||v===void 0?void 0:v.samples)!==void 0?(y=e.renderTargetOptions)===null||y===void 0?void 0:y.samples:void 0,wrapS:((_=e.renderTargetOptions)===null||_===void 0?void 0:_.wrapS)!==void 0?(b=e.renderTargetOptions)===null||b===void 0?void 0:b.wrapS:Gi,wrapT:((T=e.renderTargetOptions)===null||T===void 0?void 0:T.wrapT)!==void 0?(R=e.renderTargetOptions)===null||R===void 0?void 0:R.wrapT:Gi};if(this._material=e.material,e.renderer?this._renderer=e.renderer:(this._renderer=l1.instantiateRenderer(),this._rendererIsDisposable=!0),this._scene=new rg,this._camera=new wf,this._camera.position.set(0,0,10),this._camera.left=-.5,this._camera.right=.5,this._camera.top=.5,this._camera.bottom=-.5,this._camera.updateProjectionMatrix(),!x5(this._type,this._renderer,this._camera,C)){let D;switch(this._type){case ra:D=this._renderer.extensions.has("EXT_color_buffer_float")?bi:void 0;break}D!==void 0?(console.warn(`This browser does not support reading pixels from ${this._type} RenderTargets, switching to ${bi}`),this._type=D):(this._supportsReadPixels=!1,console.warn("This browser dos not support toArray or toDataTexture, calls to those methods will result in an error thrown"))}this._quad=new Mi(new Zc,this._material),this._quad.geometry.computeBoundingBox(),this._scene.add(this._quad),this._renderTarget=new $s(this.width,this.height,C),this._renderTarget.texture.mapping=((A=e.renderTargetOptions)===null||A===void 0?void 0:A.mapping)!==void 0?(M=e.renderTargetOptions)===null||M===void 0?void 0:M.mapping:Gc}static instantiateRenderer(){const e=new $b;return e.setSize(128,128),e}toArray(){if(!this._supportsReadPixels)throw new Error("Can't read pixels in this browser");const e=bw(this._type,this._width,this._height);return this._renderer.readRenderTargetPixels(this._renderTarget,0,0,this._width,this._height,e),e}toDataTexture(e){const t=new io(this.toArray(),this.width,this.height,ki,this._type,e?.mapping||Gc,e?.wrapS||Gi,e?.wrapT||Gi,e?.magFilter||Hn,e?.minFilter||Hn,e?.anisotropy||1,Qi);return t.generateMipmaps=e?.generateMipmaps!==void 0?e?.generateMipmaps:!1,t}disposeOnDemandRenderer(){this._renderer.setRenderTarget(null),this._rendererIsDisposable&&(this._renderer.dispose(),this._renderer.forceContextLoss())}dispose(e){this.disposeOnDemandRenderer(),e&&this.renderTarget.dispose(),this.material instanceof Ts&&Object.values(this.material.uniforms).forEach(t=>{t.value instanceof ei&&t.value.dispose()}),Object.values(this.material).forEach(t=>{t instanceof ei&&t.dispose()}),this.material.dispose(),this._quad.geometry.dispose()}get width(){return this._width}set width(e){this._width=e,this._renderTarget.setSize(this._width,this._height)}get height(){return this._height}set height(e){this._height=e,this._renderTarget.setSize(this._width,this._height)}get renderer(){return this._renderer}get renderTarget(){return this._renderTarget}set renderTarget(e){this._renderTarget=e,this._width=e.width,this._height=e.height}get material(){return this._material}get type(){return this._type}get colorSpace(){return this._colorSpace}}const S5=`
4260varying vec2 vUv;
4261
4262void main() {
4263  vUv = uv;
4264  gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
4265}
4266`,b5=`
4267// min half float value
4268#define HALF_FLOAT_MIN vec3( -65504, -65504, -65504 )
4269// max half float value
4270#define HALF_FLOAT_MAX vec3( 65504, 65504, 65504 )
4271
4272uniform sampler2D sdr;
4273uniform sampler2D gainMap;
4274uniform vec3 gamma;
4275uniform vec3 offsetHdr;
4276uniform vec3 offsetSdr;
4277uniform vec3 gainMapMin;
4278uniform vec3 gainMapMax;
4279uniform float weightFactor;
4280
4281varying vec2 vUv;
4282
4283void main() {
4284  vec3 rgb = texture2D( sdr, vUv ).rgb;
4285  vec3 recovery = texture2D( gainMap, vUv ).rgb;
4286  vec3 logRecovery = pow( recovery, gamma );
4287  vec3 logBoost = gainMapMin * ( 1.0 - logRecovery ) + gainMapMax * logRecovery;
4288  vec3 hdrColor = (rgb + offsetSdr) * exp2( logBoost * weightFactor ) - offsetHdr;
4289  vec3 clampedHdrColor = max( HALF_FLOAT_MIN, min( HALF_FLOAT_MAX, hdrColor ));
4290  gl_FragColor = vec4( clampedHdrColor , 1.0 );
4291}
4292`;class M5 extends Ts{constructor({gamma:e,offsetHdr:t,offsetSdr:n,gainMapMin:a,gainMapMax:o,maxDisplayBoost:c,hdrCapacityMin:h,hdrCapacityMax:d,sdr:p,gainMap:v}){super({name:"GainMapDecoderMaterial",vertexShader:S5,fragmentShader:b5,uniforms:{sdr:{value:p},gainMap:{value:v},gamma:{value:new K(1/e[0],1/e[1],1/e[2])},offsetHdr:{value:new K().fromArray(t)},offsetSdr:{value:new K().fromArray(n)},gainMapMin:{value:new K().fromArray(a)},gainMapMax:{value:new K().fromArray(o)},weightFactor:{value:(Math.log2(c)-h)/(d-h)}},blending:qo,depthTest:!1,depthWrite:!1}),this._maxDisplayBoost=c,this._hdrCapacityMin=h,this._hdrCapacityMax=d,this.needsUpdate=!0,this.uniformsNeedUpdate=!0}get sdr(){return this.uniforms.sdr.value}set sdr(e){this.uniforms.sdr.value=e}get gainMap(){return this.uniforms.gainMap.value}set gainMap(e){this.uniforms.gainMap.value=e}get offsetHdr(){return this.uniforms.offsetHdr.value.toArray()}set offsetHdr(e){this.uniforms.offsetHdr.value.fromArray(e)}get offsetSdr(){return this.uniforms.offsetSdr.value.toArray()}set offsetSdr(e){this.uniforms.offsetSdr.value.fromArray(e)}get gainMapMin(){return this.uniforms.gainMapMin.value.toArray()}set gainMapMin(e){this.uniforms.gainMapMin.value.fromArray(e)}get gainMapMax(){return this.uniforms.gainMapMax.value.toArray()}set gainMapMax(e){this.uniforms.gainMapMax.value.fromArray(e)}get gamma(){const e=this.uniforms.gamma.value;return[1/e.x,1/e.y,1/e.z]}set gamma(e){const t=this.uniforms.gamma.value;t.x=1/e[0],t.y=1/e[1],t.z=1/e[2]}get hdrCapacityMin(){return this._hdrCapacityMin}set hdrCapacityMin(e){this._hdrCapacityMin=e,this.calculateWeight()}get hdrCapacityMax(){return this._hdrCapacityMax}set hdrCapacityMax(e){this._hdrCapacityMax=e,this.calculateWeight()}get maxDisplayBoost(){return this._maxDisplayBoost}set maxDisplayBoost(e){this._maxDisplayBoost=Math.max(1,Math.min(65504,e)),this.calculateWeight()}calculateWeight(){const e=(Math.log2(this._maxDisplayBoost)-this._hdrCapacityMin)/(this._hdrCapacityMax-this._hdrCapacityMin);this.uniforms.weightFactor.value=Math.max(0,Math.min(1,e))}}
vendor: 4,122 bytes, line 4292
4292class Mw extends Error{}class Ew extends Error{}const Sm=(s,e,t)=>{const n=new RegExp(`${e}="([^"]*)"`,"i").exec(s);if(n)return n[1];const a=new RegExp(`<${e}[^>]*>([\\s\\S]*?)</${e}>`,"i").exec(s);if(a){const o=a[1].match(/<rdf:li>([^<]*)<\/rdf:li>/g);return o&&o.length===3?o.map(c=>c.replace(/<\/?rdf:li>/g,"")):a[1].trim()}if(t!==void 0)return t;throw new Error(`Can't find ${e} in gainmap metadata`)},E5=s=>{let e;typeof TextDecoder<"u"?e=new TextDecoder().decode(s):e=s.toString();let t=e.indexOf("<x:xmpmeta");for(;t!==-1;){const n=e.indexOf("x:xmpmeta>",t),a=e.slice(t,n+10);try{const o=Sm(a,"hdrgm:GainMapMin","0"),c=Sm(a,"hdrgm:GainMapMax"),h=Sm(a,"hdrgm:Gamma","1"),d=Sm(a,"hdrgm:OffsetSDR","0.015625"),p=Sm(a,"hdrgm:OffsetHDR","0.015625"),v=/hdrgm:HDRCapacityMin="([^"]*)"/.exec(a),y=v?v[1]:"0",_=/hdrgm:HDRCapacityMax="([^"]*)"/.exec(a);if(!_)throw new Error("Incomplete gainmap metadata");const b=_[1];return{gainMapMin:Array.isArray(o)?o.map(T=>parseFloat(T)):[parseFloat(o),parseFloat(o),parseFloat(o)],gainMapMax:Array.isArray(c)?c.map(T=>parseFloat(T)):[parseFloat(c),parseFloat(c),parseFloat(c)],gamma:Array.isArray(h)?h.map(T=>parseFloat(T)):[parseFloat(h),parseFloat(h),parseFloat(h)],offsetSdr:Array.isArray(d)?d.map(T=>parseFloat(T)):[parseFloat(d),parseFloat(d),parseFloat(d)],offsetHdr:Array.isArray(p)?p.map(T=>parseFloat(T)):[parseFloat(p),parseFloat(p),parseFloat(p)],hdrCapacityMin:parseFloat(y),hdrCapacityMax:parseFloat(b)}}catch{}t=e.indexOf("<x:xmpmeta",n)}};class T5{constructor(e){this.options={debug:e&&e.debug!==void 0?e.debug:!1,extractFII:e&&e.extractFII!==void 0?e.extractFII:!0,extractNonFII:e&&e.extractNonFII!==void 0?e.extractNonFII:!0}}extract(e){return new Promise((t,n)=>{const a=this.options.debug,o=new DataView(e.buffer);if(o.getUint16(0)!==65496){n(new Error("Not a valid jpeg"));return}const c=o.byteLength;let h=2,d=0,p;for(;h<c;){if(++d>250){n(new Error(`Found no marker after ${d} loops 😵`));return}if(o.getUint8(h)!==255){n(new Error(`Not a valid marker at offset 0x${h.toString(16)}, found: 0x${o.getUint8(h).toString(16)}`));return}if(p=o.getUint8(h+1),a&&console.log(`Marker: ${p.toString(16)}`),p===226){a&&console.log("Found APP2 marker (0xffe2)");const v=h+4;if(o.getUint32(v)===1297106432){const y=v+4;let _;if(o.getUint16(y)===18761)_=!1;else if(o.getUint16(y)===19789)_=!0;else{n(new Error("No valid endianness marker found in TIFF header"));return}if(o.getUint16(y+2,!_)!==42){n(new Error("Not valid TIFF data! (no 0x002A marker)"));return}const b=o.getUint32(y+4,!_);if(b<8){n(new Error("Not valid TIFF data! (First offset less than 8)"));return}const T=y+b,R=o.getUint16(T,!_),A=T+2;let M=0;for(let H=A;H<A+12*R;H+=12)o.getUint16(H,!_)===45057&&(M=o.getUint32(H+8,!_));const D=T+2+R*12+4,U=[];for(let H=D;H<D+M*16;H+=16){const F={MPType:o.getUint32(H,!_),size:o.getUint32(H+4,!_),dataOffset:o.getUint32(H+8,!_),dependantImages:o.getUint32(H+12,!_),start:-1,end:-1,isFII:!1};F.dataOffset?(F.start=y+F.dataOffset,F.isFII=!1):(F.start=0,F.isFII=!0),F.end=F.start+F.size,U.push(F)}if(this.options.extractNonFII&&U.length){const H=new Blob([o]),F=[];for(const G of U){if(G.isFII&&!this.options.extractFII)continue;const V=H.slice(G.start,G.end+1,"image/jpeg");F.push(V)}t(F)}}}h+=2+o.getUint16(h+2)}})}}const A5=async s=>{const e=E5(s);if(!e)throw new Ew("Gain map XMP metadata not found");const n=await new T5({extractFII:!0,extractNonFII:!0}).extract(s);if(n.length!==2)throw new Mw("Gain map recovery image not found");return{sdr:new Uint8Array(await n[0].arrayBuffer()),gainMap:new Uint8Array(await n[1].arrayBuffer()),metadata:e}},AT=s=>new Promise((e,t)=>{const n=document.createElement("img");n.onload=()=>{e(n)},n.onerror=a=>{t(a)},n.src=URL.createObjectURL(s)});class Tw extends $a{constructor(e,t){super(t),e&&(this._renderer=e),this._internalLoadingManager=new m_}setRenderer(e){return this._renderer=e,this}setRenderTargetOptions(e){return this._renderTargetOptions=e,this}prepareQuadRenderer(){this._renderer||console.warn("WARNING: An existing WebGL Renderer was not passed to this Loader constructor or in setRenderer, the result of this Loa
4292der will need to be converted to a Data Texture with toDataTexture() before you can use it in your renderer.");const e=new M5({gainMapMax:[1,1,1],gainMapMin:[0,0,0],gamma:[1,1,1],offsetHdr:[1,1,1],offsetSdr:[1,1,1],hdrCapacityMax:1,hdrCapacityMin:0,maxDisplayBoost:1,gainMap:new ei,sdr:new ei});return new l1({width:16,height:16,type:ra,colorSpace:Qi,material:e,renderer:this._renderer,renderTargetOptions:this._renderTargetOptions})}async render(e,t,n,a){const o=a?new Blob([a],{type:"image/jpeg"}):void 0,c=new Blob([n],{type:"image/jpeg"});let h,d,p=!1;if(typeof createImageBitmap>"u"){const _=await Promise.all([o?AT(o):Promise.resolve(void 0),AT(c)]);d=_[0],h=_[1],p=!0}else{const _=await Promise.all([o?createImageBitmap(o,{imageOrientation:"flipY"}):Promise.resolve(void 0),createImageBitmap(c,{imageOrientation:"flipY"})]);d=_[0],h=_[1]}const v=new ei(d||new ImageData(2,2),Gc,Gi,Gi,Hn,OS,ki,Es,1,Qi);v.flipY=p,v.needsUpdate=!0;const y=new ei(h,Gc,Gi,Gi,Hn,OS,ki,Es,1,Ii);y.flipY=p,y.needsUpdate=!0,e.width=h.width,e.height=h.height,e.material.gainMap=v,e.material.sdr=y,e.material.gainMapMin=t.gainMapMin,e.material.gainMapMax=t.gainMapMax,e.material.offsetHdr=t.offsetHdr,e.material.offsetSdr=t.offsetSdr,e.material.gamma=t.gamma,e.material.hdrCapacityMin=t.hdrCapacityMin,e.material.hdrCapacityMax=t.hdrCapacityMax,e.material.maxDisplayBoost=Math.pow(2,t.hdrCapacityMax),e.material.needsUpdate=!0,e.render()}}class w5 extends Tw{load([e,t,n],a,o,c){const h=this.prepareQuadRenderer();let d,p,v;const y=async()=>{if(d&&p&&v){try{await this.render(h,v,d,p)}catch(O){this.manager.itemError(e),this.manager.itemError(t),this.manager.itemError(n),typeof c=="function"&&c(O),h.disposeOnDemandRenderer();return}typeof a=="function"&&a(h),this.manager.itemEnd(e),this.manager.itemEnd(t),this.manager.itemEnd(n),h.disposeOnDemandRenderer()}};let _=!0,b=0,T=0,R=!0,A=0,M=0,C=!0,D=0,U=0;const H=()=>{if(typeof o=="function"){const O=b+A+D,z=T+M+U,Y=_&&R&&C;o(new ProgressEvent("progress",{lengthComputable:Y,loaded:z,total:O}))}};this.manager.itemStart(e),this.manager.itemStart(t),this.manager.itemStart(n);const F=new Ms(this._internalLoadingManager);F.setResponseType("arraybuffer"),F.setRequestHeader(this.requestHeader),F.setPath(this.path),F.setWithCredentials(this.withCredentials),F.load(e,async O=>{if(typeof O=="string")throw new Error("Invalid sdr buffer");d=O,await y()},O=>{_=O.lengthComputable,T=O.loaded,b=O.total,H()},O=>{this.manager.itemError(e),typeof c=="function"&&c(O)});const G=new Ms(this._internalLoadingManager);G.setResponseType("arraybuffer"),G.setRequestHeader(this.requestHeader),G.setPath(this.path),G.setWithCredentials(this.withCredentials),G.load(t,async O=>{if(typeof O=="string")throw new Error("Invalid gainmap buffer");p=O,await y()},O=>{R=O.lengthComputable,M=O.loaded,A=O.total,H()},O=>{this.manager.itemError(t),typeof c=="function"&&c(O)});const V=new Ms(this._internalLoadingManager);return V.setRequestHeader(this.requestHeader),V.setPath(this.path),V.setWithCredentials(this.withCredentials),V.load(n,async O=>{if(typeof O!="string")throw new Error("Invalid metadata string");v=JSON.parse(O),await y()},O=>{C=O.lengthComputable,U=O.loaded,D=O.total,H()},O=>{this.manager.itemError(n),typeof c=="function"&&c(O)}),h}}class R5 extends Tw{load(e,t,n,a){const o=this.prepareQuadRenderer(),c=new Ms(this._internalLoadingManager);return c.setResponseType("arraybuffer"),c.setRequestHeader(this.requestHeader),c.setPath(this.path),c.setWithCredentials(this.withCredentials),this.manager.itemStart(e),c.load(e,async h=>{if(typeof h=="string")throw new Error("Invalid buffer, received [string], was expecting [ArrayBuffer]");const d=new Uint8Array(h);let p,v,y;try{const _=await A5(d);p=_.sdr,v=_.gainMap,y=_.metadata}catch(_){if(_ instanceof Ew||_ instanceof Mw)console.warn(`Failure to reconstruct an HDR image from ${e}: Gain map metadata not found in the file, HDRJPGLoader will render the SDR jpeg`),y={gainMapMin:[0,0,0],gainMapMax:[1,1,1],gamma:[1,1,1],hdrCapacityMin:0,hdrCapacityMax:1,offsetHdr:[0,0,0],offsetSdr:[0,0,0]},p=d;else throw _}try{await this.render(o,y,p,v)}catch(_){this.manager.itemError(e),typeof a=="function"&&a(_),o.disposeOnDemandRenderer();return}typeof t=="function"&&t(o),this.manager.itemEnd(e),o.disposeOnDemandRenderer()},n,h=>{this.manager.itemError(e),typeof a=="function"&&a(h)}),o}}const Km={apartment:"lebombo_1k.hdr",city:"potsdamer_platz_1k.hdr",dawn:"kiara_1_dawn_1k.hdr",forest:"forest_slope_1k.hdr",lobby:"st_fagans_interior_1k.hdr",night:"dikhololo_night_1k.hdr",park:"rooitou_park_1k.hdr",studio:"studio_small_03_1k.hdr",sunset:"venice_sunset_1k.hdr",warehouse:"empty_warehouse_01_1k.hdr"},Aw="https://raw.githack.com/pmndrs/drei-assets/456060a26bbeb8fdf79326f224b6d99b8bcce736/hdri/",ld=s=>Array.isArray(s),c1=["/px.png","/nx.png","/py.png","/ny.png","/pz.png","/nz.png"];function x_({files:s=c1,path:e="",preset:t=void 0,colorSpace:n=void 0,extensions:a}={}){t&&(u1(t),s=Km[t],e=Aw);const o=ld(s),{extension:c,isCubemap:h}=f1(s),d=h1(c);if(!d)throw new Error("useEnvironment: Unrecognized file extension: "+s);const p=bf(b=>b.gl);le.useLayoutEffect(()=>{if(c!=="webp"&&c!=="jpg"&&c!=="jpeg")return;function b(){qc.clear(d,o?[s]:s)}p.domElement.addEventListener("webglcontextlost",b,{once:!0})},[s,p.domElement]);const v=qc(d,o?[s]:s,b=>{(c==="webp"||c==="jpg"||c==="jpeg")&&b.setRenderer(p),b.setPath==null||b.setPath(e),a&&a(b)});let y=o?v[0]:v;if(c==="jpg"||c==="jpeg"||c==="webp"){var _;y=(_=y.renderTarget)==null?void 0:_.texture}
4292return y.mapping=h?Wo:fd,y.colorSpace=n??(h?"srgb":"srgb-linear"),y}const C5={files:c1,path:"",preset:void 0,extensions:void 0};x_.preload=s=>{const e={...C5,...s};let{files:t,path:n=""}=e;const{preset:a,extensions:o}=e;a&&(u1(a),t=Km[a],n=Aw);const{extension:c}=f1(t);if(c==="webp"||c==="jpg"||c==="jpeg")throw new Error("useEnvironment: Preloading gainmaps is not supported");const h=h1(c);if(!h)throw new Error("useEnvironment: Unrecognized file extension: "+t);qc.preload(h,ld(t)?[t]:t,d=>{d.setPath==null||d.setPath(n),o&&o(d)})};const N5={files:c1,preset:void 0};x_.clear=s=>{const e={...N5,...s};let{files:t}=e;const{preset:n}=e;n&&(u1(n),t=Km[n]);const{extension:a}=f1(t),o=h1(a);if(!o)throw new Error("useEnvironment: Unrecognized file extension: "+t);qc.clear(o,ld(t)?[t]:t)};function u1(s){if(!(s in Km))throw new Error("Preset must be one of: "+Object.keys(Km).join(", "))}function f1(s){var e;const t=ld(s)&&s.length===6,n=ld(s)&&s.length===3&&s.some(c=>c.endsWith("json")),a=ld(s)?s[0]:s;return{extension:t?"cube":n?"webp":a.startsWith("data:application/exr")?"exr":a.startsWith("data:application/hdr")?"hdr":a.startsWith("data:image/jpeg")?"jpg":(e=a.split(".").pop())==null||(e=e.split("?"))==null||(e=e.shift())==null?void 0:e.toLowerCase(),isCubemap:t,isGainmap:n}}function h1(s){return s==="cube"?R2:s==="hdr"?p5:s==="exr"?m5:s==="jpg"||s==="jpeg"?R5:s==="webp"?w5:null}const D5=s=>s.current&&s.current.isScene,U5=s=>D5(s)?s.current:s;function d1(s,e,t,n,a={}){var o,c,h,d;a={backgroundBlurriness:0,backgroundIntensity:1,backgroundRotation:[0,0,0],environmentIntensity:1,environmentRotation:[0,0,0],...a};const p=U5(e||t),v=p.background,y=p.environment,_={backgroundBlurriness:p.backgroundBlurriness,backgroundIntensity:p.backgroundIntensity,backgroundRotation:(o=(c=p.backgroundRotation)==null||c.clone==null?void 0:c.clone())!==null&&o!==void 0?o:[0,0,0],environmentIntensity:p.environmentIntensity,environmentRotation:(h=(d=p.environmentRotation)==null||d.clone==null?void 0:d.clone())!==null&&h!==void 0?h:[0,0,0]};return s!=="only"&&(p.environment=n),s&&(p.background=n),Xo(p,a),()=>{s!=="only"&&(p.environment=y),s&&(p.background=v),Xo(p,_)}}function p1({scene:s,background:e=!1,map:t,...n}){const a=bf(o=>o.scene);return le.useLayoutEffect(()=>{if(t)return d1(e,s,a,t,n)}),null}function ww({background:s=!1,scene:e,blur:t,backgroundBlurriness:n,backgroundIntensity:a,backgroundRotation:o,environmentIntensity:c,environmentRotation:h,...d}){const p=x_(d),v=bf(y=>y.scene);return le.useLayoutEffect(()=>d1(s,e,v,p,{backgroundBlurriness:t??n,backgroundIntensity:a,backgroundRotation:o,environmentIntensity:c,environmentRotation:h})),le.useEffect(()=>()=>{p.dispose()},[p]),null}function L5({children:s,near:e=.1,far:t=1e3,resolution:n=256,frames:a=1,map:o,background:c=!1,blur:h,backgroundBlurriness:d,backgroundIntensity:p,backgroundRotation:v,environmentIntensity:y,environmentRotation:_,scene:b,files:T,path:R,preset:A=void 0,extensions:M}){const C=bf(V=>V.gl),D=bf(V=>V.scene),U=le.useRef(null),[H]=le.useState(()=>new rg),F=le.useMemo(()=>{const V=new Mb(n);return V.texture.type=ra,V},[n]);le.useEffect(()=>()=>{F.dispose()},[F]),le.useLayoutEffect(()=>{if(a===1){const V=C.autoClear;C.autoClear=!0,U.current.update(C,H),C.autoClear=V}return d1(c,b,D,F.texture,{backgroundBlurriness:h??d,backgroundIntensity:p,backgroundRotation:v,environmentIntensity:y,environmentRotation:_})},[s,H,F.texture,b,D,c,a,C]);let G=1;return s1(()=>
vendor: 4,589 bytes, line 4292
4292{if(a===1/0||G<a){const V=C.autoClear;C.autoClear=!0,U.current.update(C,H),C.autoClear=V,G++}}),le.createElement(le.Fragment,null,FB(le.createElement(le.Fragment,null,s,le.createElement("cubeCamera",{ref:U,args:[e,t,F]}),T||A?le.createElement(ww,{background:!0,files:T,preset:A,path:R,extensions:M}):o?le.createElement(p1,{background:!0,map:o,extensions:M}):null),H))}function O5(s){var e,t,n,a;const o=x_(s),c=s.map||o;le.useMemo(()=>r1({GroundProjectedEnvImpl:d5}),[]),le.useEffect(()=>()=>{o.dispose()},[o]);const h=le.useMemo(()=>[c],[c]),d=(e=s.ground)==null?void 0:e.height,p=(t=s.ground)==null?void 0:t.radius,v=(n=(a=s.ground)==null?void 0:a.scale)!==null&&n!==void 0?n:1e3;return le.createElement(le.Fragment,null,le.createElement(p1,V0({},s,{map:c})),le.createElement("groundProjectedEnvImpl",{args:h,scale:v,height:d,radius:p}))}function z5(s){return s.ground?le.createElement(O5,s):s.map?le.createElement(p1,s):s.children?le.createElement(L5,s):le.createElement(ww,s)}function wT(s,e){if(e===zA)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),s;if(e===Ty||e===mb){let t=s.getIndex();if(t===null){const c=[],h=s.getAttribute("position");if(h!==void 0){for(let d=0;d<h.count;d++)c.push(d);s.setIndex(c),t=s.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),s}const n=t.count-2,a=[];if(e===Ty)for(let c=1;c<=n;c++)a.push(t.getX(0)),a.push(t.getX(c)),a.push(t.getX(c+1));else for(let c=0;c<n;c++)c%2===0?(a.push(t.getX(c)),a.push(t.getX(c+1)),a.push(t.getX(c+2))):(a.push(t.getX(c+2)),a.push(t.getX(c+1)),a.push(t.getX(c)));a.length/3!==n&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const o=s.clone();return o.setIndex(a),o.clearGroups(),o}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",e),s}class Rw extends $a{constructor(e){super(e),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(t){return new F5(t)}),this.register(function(t){return new V5(t)}),this.register(function(t){return new K5(t)}),this.register(function(t){return new Q5(t)}),this.register(function(t){return new J5(t)}),this.register(function(t){return new k5(t)}),this.register(function(t){return new X5(t)}),this.register(function(t){return new j5(t)}),this.register(function(t){return new q5(t)}),this.register(function(t){return new H5(t)}),this.register(function(t){return new Y5(t)}),this.register(function(t){return new G5(t)}),this.register(function(t){return new Z5(t)}),this.register(function(t){return new W5(t)}),this.register(function(t){return new B5(t)}),this.register(function(t){return new $5(t)}),this.register(function(t){return new eP(t)})}load(e,t,n,a){const o=this;let c;if(this.resourcePath!=="")c=this.resourcePath;else if(this.path!==""){const p=Vc.extractUrlBase(e);c=Vc.resolveURL(p,this.path)}else c=Vc.extractUrlBase(e);this.manager.itemStart(e);const h=function(p){a?a(p):console.error(p),o.manager.itemError(e),o.manager.itemEnd(e)},d=new Ms(this.manager);d.setPath(this.path),d.setResponseType("arraybuffer"),d.setRequestHeader(this.requestHeader),d.setWithCredentials(this.withCredentials),d.load(e,function(p){try{o.parse(p,c,function(v){t(v),o.manager.itemEnd(e)},h)}catch(v){h(v)}},n,h)}setDRACOLoader(e){return this.dracoLoader=e,this}setKTX2Loader(e){return this.ktx2Loader=e,this}setMeshoptDecoder(e){return this.meshoptDecoder=e,this}register(e){return this.pluginCallbacks.indexOf(e)===-1&&this.pluginCallbacks.push(e),this}unregister(e){return this.pluginCallbacks.indexOf(e)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,t,n,a){let o;const c={},h={},d=new TextDecoder;if(typeof e=="string")o=JSON.parse(e);else if(e instanceof ArrayBuffer)if(d.decode(new Uint8Array(e,0,4))===Cw){try{c[wn.KHR_BINARY_GLTF]=new tP(e)}catch(y){a&&a(y);return}o=JSON.parse(c[wn.KHR_BINARY_GLTF].content)}else o=JSON.parse(d.decode(e));else o=e;if(o.asset===void 0||o.asset.version[0]<2){a&&a(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}const p=new pP(o,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});p.fileLoader.setRequestHeader(this.requestHeader);for(let v=0;v<this.pluginCallbacks.length;v++){const y=this.pluginCallbacks[v](p);
vendor: 21,776 bytes, line 4292
4292y.name||console.error("THREE.GLTFLoader: Invalid plugin found: missing name"),h[y.name]=y,c[y.name]=!0}if(o.extensionsUsed)for(let v=0;v<o.extensionsUsed.length;++v){const y=o.extensionsUsed[v],_=o.extensionsRequired||[];switch(y){case wn.KHR_MATERIALS_UNLIT:c[y]=new P5;break;case wn.KHR_DRACO_MESH_COMPRESSION:c[y]=new nP(o,this.dracoLoader);break;case wn.KHR_TEXTURE_TRANSFORM:c[y]=new iP;break;case wn.KHR_MESH_QUANTIZATION:c[y]=new aP;break;default:_.indexOf(y)>=0&&h[y]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+y+'".')}}p.setExtensions(c),p.setPlugins(h),p.parse(n,a)}parseAsync(e,t){const n=this;return new Promise(function(a,o){n.parse(e,t,a,o)})}}function I5(){let s={};return{get:function(e){return s[e]},add:function(e,t){s[e]=t},remove:function(e){delete s[e]},removeAll:function(){s={}}}}const wn={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_DISPERSION:"KHR_materials_dispersion",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class B5{constructor(e){this.parser=e,this.name=wn.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,t=this.parser.json.nodes||[];for(let n=0,a=t.length;n<a;n++){const o=t[n];o.extensions&&o.extensions[this.name]&&o.extensions[this.name].light!==void 0&&e._addNodeRef(this.cache,o.extensions[this.name].light)}}_loadLight(e){const t=this.parser,n="light:"+e;let a=t.cache.get(n);if(a)return a;const o=t.json,d=((o.extensions&&o.extensions[this.name]||{}).lights||[])[e];let p;const v=new _t(16777215);d.color!==void 0&&v.setRGB(d.color[0],d.color[1],d.color[2],Qi);const y=d.range!==void 0?d.range:0;switch(d.type){case"directional":p=new jb(v),p.target.position.set(0,0,-1),p.add(p.target);break;case"point":p=new Xb(v),p.distance=y;break;case"spot":p=new kb(v),p.distance=y,d.spot=d.spot||{},d.spot.innerConeAngle=d.spot.innerConeAngle!==void 0?d.spot.innerConeAngle:0,d.spot.outerConeAngle=d.spot.outerConeAngle!==void 0?d.spot.outerConeAngle:Math.PI/4,p.angle=d.spot.outerConeAngle,p.penumbra=1-d.spot.innerConeAngle/d.spot.outerConeAngle,p.target.position.set(0,0,-1),p.add(p.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+d.type)}return p.position.set(0,0,0),ko(p,d),d.intensity!==void 0&&(p.intensity=d.intensity),p.name=t.createUniqueName(d.name||"light_"+e),a=Promise.resolve(p),t.cache.add(n,a),a}getDependency(e,t){if(e==="light")return this._loadLight(t)}createNodeAttachment(e){const t=this,n=this.parser,o=n.json.nodes[e],h=(o.extensions&&o.extensions[this.name]||{}).light;return h===void 0?null:this._loadLight(h).then(function(d){return n._getNodeRef(t.cache,h,d)})}}class P5{constructor(){this.name=wn.KHR_MATERIALS_UNLIT}getMaterialType(){return Bs}extendParams(e,t,n){const a=[];e.color=new _t(1,1,1),e.opacity=1;const o=t.pbrMetallicRoughness;if(o){if(Array.isArray(o.baseColorFactor)){const c=o.baseColorFactor;e.color.setRGB(c[0],c[1],c[2],Qi),e.opacity=c[3]}o.baseColorTexture!==void 0&&a.push(n.assignTexture(e,"map",o.baseColorTexture,Ii))}return Promise.all(a)}}class H5{constructor(e){this.parser=e,this.name=wn.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(e,t){const a=this.parser.json.materials[e];if(!a.extensions||!a.extensions[this.name])return Promise.resolve();const o=a.extensions[this.name].emissiveStrength;return o!==void 0&&(t.emissiveIntensity=o),Promise.resolve()}}class F5{constructor(e){this.parser=e,this.name=wn.KHR_MATERIALS_CLEARCOAT}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:tr}extendMaterialParams(e,t){const n=this.parser,a=n.json.materials[e];if(!a.extensions||!a.extensions[this.name])return Promise.resolve();const o=[],c=a.extensions[this.name];if(c.clearcoatFactor!==void 0&&(t.clearcoat=c.clearcoatFactor),c.clearcoatTexture!==void 0&&o.push(n.assignTexture(t,"clearcoatMap",c.clearcoatTexture)),c.clearcoatRoughnessFactor!==void 0&&(t.clearcoatRoughness=c.clearcoatRoughnessFactor),c.clearcoatRoughnessTexture!==void 0&&o.push(n.assignTexture(t,"clearcoatRoughnessMap",c.clearcoatRoughnessTexture)),c.clearcoatNormalTexture!==void 0&&(o.push(n.assignTexture(t,"clearcoatNormalMap",c.clearcoatNormalTexture)),c.clearcoatNormalTexture.scale!==void 0)){const h=c.clearcoatNormalTexture.scale;t.clearcoatNormalScale=new Je(h,h)}return Promise.all(o)}}class V5{constructor(e){this.parser=e,this.name=wn.KHR_MATERIALS_DISPERSION}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:tr}extendMaterialParams(e,t){const a=this.parser.json.materials[e];if(!a.extensions||!a.extensions[this.name])return Promise.resolve();const o=a.extensions[this.name];return t.dispersion=o.dispersion!==void 0?o.dispersion:0,Promise.resolve()}}class G5{constructor(e){this.parser=e,this.name=wn.KHR_MATERIALS_IRIDESCENCE}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:tr}extendMaterialParams(e,t){const n=this.parser,a=n.json.materials[e];if(!a.extensions||!a.extensions[this.name])return Promise.resolve();const o=[],c=a.extensions[this.name];return c.iridescenceFactor!==void 0&&(t.iridescence=c.iridescenceFactor),c.iridescenceTexture!==void 0&&o.push(n.assignTexture(t,"iridescenceMap",c.iridescenceTexture)),c.iridescenceIor!==void 0&&(t.iridescenceIOR=c.iridescenceIor),t.iridescenceThicknessRange===void 0&&(t.iridescenceThicknessRange=[100,400]),c.iridescenceThicknessMinimum!==void 0&&(t.iridescenceThicknessRange[0]=c.iridescenceThicknessMinimum),c.iridescenceThicknessMaximum!==void 0&&(t.iridescenceThicknessRange[1]=c.iridescenceThicknessMaximum),c.iridescenceThicknessTexture!==void 0&&o.push(n.assignTexture(t,"iridescenceThicknessMap",c.iridescenceThicknessTexture)),Promise.all(o)}}class k5{constructor(e){this.parser=e,this.name=wn.KHR_MATERIALS_SHEEN}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:tr}extendMaterialParams(e,t){const n=this.parser,a=n.json.materials[e];if(!a.extensions||!a.extensions[this.name])return Promise.resolve();const o=[];t.sheenColor=new _t(0,0,0),t.sheenRoughness=0,t.sheen=1;const c=a.extensions[this.name];if(c.sheenColorFactor!==void 0){const h=c.sheenColorFactor;t.sheenColor.setRGB(h[0],h[1],h[2],Qi)}return c.sheenRoughnessFactor!==void 0&&(t.sheenRoughness=c.sheenRoughnessFactor),c.sheenColorTexture!==void 0&&o.push(n.assignTexture(t,"sheenColorMap",c.sheenColorTexture,Ii)),c.sheenRoughnessTexture!==void 0&&o.push(n.assignTexture(t,"sheenRoughnessMap",c.sheenRoughnessTexture)),Promise.all(o)}}class X5{constructor(e){this.parser=e,this.name=wn.KHR_MATERIALS_TRANSMISSION}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:tr}extendMaterialParams(e,t){const n=this.parser,a=n.json.materials[e];if(!a.extensions||!a.extensions[this.name])return Promise.resolve();const o=[],c=a.extensions[this.name];return c.transmissionFactor!==void 0&&(t.transmission=c.transmissionFactor),c.transmissionTexture!==void 0&&o.push(n.assignTexture(t,"transmissionMap",c.transmissionTexture)),Promise.all(o)}}class j5{constructor(e){this.parser=e,this.name=wn.KHR_MATERIALS_VOLUME}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:tr}extendMaterialParams(e,t){const n=this.parser,a=n.json.materials[e];if(!a.extensions||!a.extensions[this.name])return Promise.resolve();const o=[],c=a.extensions[this.name];t.thickness=c.thicknessFactor!==void 0?c.thicknessFactor:0,c.thicknessTexture!==void 0&&o.push(n.assignTexture(t,"thicknessMap",c.thicknessTexture)),t.attenuationDistance=c.attenuationDistance||1/0;const h=c.attenuationColor||[1,1,1];return t.attenuationColor=new _t().setRGB(h[0],h[1],h[2],Qi),Promise.all(o)}}class q5{constructor(e){this.parser=e,this.name=wn.KHR_MATERIALS_IOR}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:tr}extendMaterialParams(e,t){const a=this.parser.json.materials[e];if(!a.extensions||!a.extensions[this.name])return Promise.resolve();const o=a.extensions[this.name];return t.ior=o.ior!==void 0?o.ior:1.5,Promise.resolve()}}class Y5{constructor(e){this.parser=e,this.name=wn.KHR_MATERIALS_SPECULAR}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:tr}extendMaterialParams(e,t){const n=this.parser,a=n.json.materials[e];if(!a.extensions||!a.extensions[this.name])return Promise.resolve();const o=[],c=a.extensions[this.name];t.specularIntensity=c.specularFactor!==void 0?c.specularFactor:1,c.specularTexture!==void 0&&o.push(n.assignTexture(t,"specularIntensityMap",c.specularTexture));const h=c.specularColorFactor||[1,1,1];return t.specularColor=new _t().setRGB(h[0],h[1],h[2],Qi),c.specularColorTexture!==void 0&&o.push(n.assignTexture(t,"specularColorMap",c.specularColorTexture,Ii)),Promise.all(o)}}class W5{constructor(e){this.parser=e,this.name=wn.EXT_MATERIALS_BUMP}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:tr}extendMaterialParams(e,t){const n=this.parser,a=n.json.materials[e];if(!a.extensions||!a.extensions[this.name])return Promise.resolve();const o=[],c=a.extensions[this.name];return t.bumpScale=c.bumpFactor!==void 0?c.bumpFactor:1,c.bumpTexture!==void 0&&o.push(n.assignTexture(t,"bumpMap",c.bumpTexture)),Promise.all(o)}}class Z5{constructor(e){this.parser=e,this.name=wn.KHR_MATERIALS_ANISOTROPY}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:tr}extendMaterialParams(e,t){const n=this.parser,a=n.json.materials[e];if(!a.extensions||!a.extensions[this.name])return Promise.resolve();const o=[],c=a.extensions[this.name];return c.anisotropyStrength!==void 0&&(t.anisotropy=c.anisotropyStrength),c.anisotropyRotation!==void 0&&(t.anisotropyRotation=c.anisotropyRotation),c.anisotropyTexture!==void 0&&o.push(n.assignTexture(t,"anisotropyMap",c.anisotropyTexture)),Promise.all(o)}}class K5{constructor(e){this.parser=e,this.name=wn.KHR_TEXTURE_BASISU}loadTexture(e){const t=this.parser,n=t.json,a=n.textures[e];if(!a.extensions||!a.extensions[this.name])return null;const o=a.extensions[this.name],c=t.options.ktx2Loader;if(!c){if(n.extensionsRequired&&n.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,o.source,c)}}class Q5{constructor(e){this.parser=e,this.name=wn.EXT_TEXTURE_WEBP}loadTexture(e){const t=this.name,n=this.parser,a=n.json,o=a.textures[e];if(!o.extensions||!o.extensions[t])return null;const c=o.extensions[t],h=a.images[c.source];let d=n.textureLoader;if(h.uri){const p=n.options.manager.getHandler(h.uri);p!==null&&(d=p)}return n.loadTextureImage(e,c.source,d)}}class J5{constructor(e){this.parser=e,this.name=wn.EXT_TEXTURE_AVIF}loadTexture(e){const t=this.name,n=this.parser,a=n.json,o=a.textures[e];if(!o.extensions||!o.extensions[t])return null;const c=o.extensions[t],h=a.images[c.source];let d=n.textureLoader;if(h.uri){const p=n.options.manager.getHandler(h.uri);p!==null&&(d=p)}return n.loadTextureImage(e,c.source,d)}}class $5{constructor(e){this.name=wn.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const t=this.parser.json,n=t.bufferViews[e];if(n.extensions&&n.extensions[this.name]){const a=n.extensions[this.name],o=this.parser.getDependency("buffer",a.buffer),c=this.parser.options.meshoptDecoder;if(!c||!c.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return o.then(function(h){const d=a.byteOffset||0,p=a.byteLength||0,v=a.count,y=a.byteStride,_=new Uint8Array(h,d,p);return c.decodeGltfBufferAsync?c.decodeGltfBufferAsync(v,y,_,a.mode,a.filter).then(function(b){return b.buffer}):c.ready.then(function(){const b=new ArrayBuffer(v*y);return c.decodeGltfBuffer(new Uint8Array(b),v,y,_,a.mode,a.filter),b})})}else return null}}class eP{constructor(e){this.name=wn.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const t=this.parser.json,n=t.nodes[e];if(!n.extensions||!n.extensions[this.name]||n.mesh===void 0)return null;const a=t.meshes[n.mesh];for(const p of a.primitives)if(p.mode!==br.TRIANGLES&&p.mode!==br.TRIANGLE_STRIP&&p.mode!==br.TRIANGLE_FAN&&p.mode!==void 0)return null;const c=n.extensions[this.name].attributes,h=[],d={};for(const p in c)h.push(this.parser.getDependency("accessor",c[p]).then(v=>(d[p]=v,d[p])));return h.length<1?null:(h.push(this.parser.createNodeMesh(e)),Promise.all(h).then(p=>{const v=p.pop(),y=v.isGroup?v.children:[v],_=p[0].count,b=[];for(const T of y){const R=new jt,A=new K,M=new Qa,C=new K(1,1,1),D=new Ab(T.geometry,T.material,_);for(let U=0;U<_;U++)d.TRANSLATION&&A.fromBufferAttribute(d.TRANSLATION,U),d.ROTATION&&M.fromBufferAttribute(d.ROTATION,U),d.SCALE&&C.fromBufferAttribute(d.SCALE,U),D.setMatrixAt(U,R.compose(A,M,C));for(const U in d)if(U==="_COLOR_0"){const H=d[U];D.instanceColor=new vf(H.array,H.itemSize,H.normalized)}else U!=="TRANSLATION"&&U!=="ROTATION"&&U!=="SCALE"&&T.geometry.setAttribute(U,d[U]);Bn.prototype.copy.call(D,T),this.parser.assignFinalMaterial(D),b.push(D)}return v.isGroup?(v.clear(),v.add(...b),v):b[0]}))}}const Cw="glTF",bm=12,RT={JSON:1313821514,BIN:5130562};class tP{constructor(e){this.name=wn.KHR_BINARY_GLTF,this.content=null,this.body=null;const t=new DataView(e,0,bm),n=new TextDecoder;if(this.header={magic:n.decode(new Uint8Array(e.slice(0,4))),version:t.getUint32(4,!0),length:t.getUint32(8,!0)},this.header.magic!==Cw)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const a=this.header.length-bm,o=new DataView(e,bm);let c=0;for(;c<a;){const h=o.getUint32(c,!0);c+=4;const d=o.getUint32(c,!0);if(c+=4,d===RT.JSON){const p=new Uint8Array(e,bm+c,h);this.content=n.decode(p)}else if(d===RT.BIN){const p=bm+c;this.body=e.slice(p,p+h)}c+=h}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class nP{constructor(e,t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=wn.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=t,this.dracoLoader.preload()}decodePrimitive(e,t){const n=this.json,a=this.dracoLoader,o=e.extensions[this.name].bufferView,c=e.extensions[this.name].attributes,h={},d={},p={};for(const v in c){const y=JS[v]||v.toLowerCase();h[y]=c[v]}for(const v in e.attributes){const y=JS[v]||v.toLowerCase();if(c[v]!==void 0){const _=n.accessors[e.attributes[v]],b=cd[_.componentType];p[y]=b.name,d[y]=_.normalized===!0}}return t.getDependency("bufferView",o).then(function(v){return new Promise(function(y,_){a.decodeDracoFile(v,function(b){for(const T in b.attributes){const R=b.attributes[T],A=d[T];A!==void 0&&(R.normalized=A)}y(b)},h,p,Qi,_)})})}}class iP{constructor(){this.name=wn.KHR_TEXTURE_TRANSFORM}extendTexture(e,t){return(t.texCoord===void 0||t.texCoord===e.channel)&&t.offset===void 0&&t.rotation===void 0&&t.scale===void 0||(e=e.clone(),t.texCoord!==void 0&&(e.channel=t.texCoord),t.offset!==void 0&&e.offset.fromArray(t.offset),t.rotation!==void 0&&(e.rotation=t.rotation),t.scale!==void 0&&e.repeat.fromArray(t.scale),e.needsUpdate=!0),e}}class aP{constructor(){this.name=wn.KHR_MESH_QUANTIZATION}}class Nw extends Ud{constructor(e,t,n,a){super(e,t,n,a)}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,a=this.valueSize,o=e*a*3+a;for(let c=0;c!==a;c++)t[c]=n[o+c];return t}interpolate_(e,t,n,a){const o=this.resultBuffer,c=this.sampleValues,h=this.valueSize,d=h*2,p=h*3,v=a-t,y=(n-t)/v,_=y*y,b=_*y,T=e*p,R=T-p,A=-2*b+3*_,M=b-_,C=1-A,D=M-_+y;for(let U=0;U!==h;U++){const H=c[R+U+h],F=c[R+U+d]*v,G=c[T+U+h],V=c[T+U]*v;o[U]=C*H+D*F+A*G+M*V}return o}}const sP=new Qa;class rP extends Nw{interpolate_(e,t,n,a){const o=super.interpolate_(e,t,n,a);return sP.fromArray(o).normalize().toArray(o),o}}const br={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6},cd={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},CT={9728:oa,9729:Hn,9984:Hy,9985:rd,9986:of,9987:Tr},NT={33071:Gi,33648:hd,10497:Xc},xS={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},JS={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},Ic={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},oP={CUBICSPLINE:void 0,LINEAR:yd,STEP:vd},SS={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function lP(s){return s.DefaultMaterial===void 0&&(s.DefaultMaterial=new pg({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:ao})),s.DefaultMaterial}function nf(s,e,t){for(const n in t.extensions)s[n]===void 0&&(e.userData.gltfExtensions=e.userData.gltfExtensions||{},e.userData.gltfExtensions[n]=t.extensions[n])}function ko(s,e){e.extras!==void 0&&(typeof e.extras=="object"?Object.assign(s.userData,e.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+e.extras))}function cP(s,e,t){let n=!1,a=!1,o=!1;for(let p=0,v=e.length;p<v;p++){const y=e[p];if(y.POSITION!==void 0&&(n=!0),y.NORMAL!==void 0&&(a=!0),y.COLOR_0!==void 0&&(o=!0),n&&a&&o)break}if(!n&&!a&&!o)return Promise.resolve(s);const c=[],h=[],d=[];for(let p=0,v=e.length;p<v;p++){const y=e[p];if(n){const _=y.POSITION!==void 0?t.getDependency("accessor",y.POSITION):s.attributes.position;c.push(_)}if(a){const _=y.NORMAL!==void 0?t.getDependency("accessor",y.NORMAL):s.attributes.normal;h.push(_)}if(o){const _=y.COLOR_0!==void 0?t.getDependency("accessor",y.COLOR_0):s.attributes.color;d.push(_)}}return Promise.all([Promise.all(c),Promise.all(h),Promise.all(d)]).then(function(p){const v=p[0],y=p[1],_=p[2];return n&&(s.morphAttributes.position=v),a&&(s.morphAttributes.normal=y),o&&(s.morphAttributes.color=_),s.morphTargetsRelative=!0,s})}function uP(s,e){if(s.updateMorphTargets(),e.weights!==void 0)for(let t=0,n=e.weights.length;t<n;t++)s.morphTargetInfluences[t]=e.weights[t];if(e.extras&&Array.isArray(e.extras.targetNames)){const t=e.extras.targetNames;if(s.morphTargetInfluences.length===t.length){s.morphTargetDictionary={};for(let n=0,a=t.length;n<a;n++)s.morphTargetDictionary[t[n]]=n}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function fP(s){let e;const t=s.extensions&&s.extensions[wn.KHR_DRACO_MESH_COMPRESSION];if(t?e="draco:"+t.bufferView+":"+t.indices+":"+bS(t.attributes):e=s.indices+":"+bS(s.attributes)+":"+s.mode,s.targets!==void 0)for(let n=0,a=s.targets.length;n<a;n++)e+=":"+bS(s.targets[n]);return e}function bS(s){let e="";const t=Object.keys(s).sort();for(let n=0,a=t.length;n<a;n++)e+=t[n]+":"+s[t[n]]+";";return e}function $S(s){switch(s){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}function hP(s){return s.search(/\.jpe?g($|\?)/i)>0||s.search(/^data\:image\/jpeg/)===0?"image/jpeg":s.search(/\.webp($|\?)/i)>0||s.search(/^data\:image\/webp/)===0?"image/webp":s.search(/\.ktx2($|\?)/i)>0||s.search(/^data\:image\/ktx2/)===0?"image/ktx2":"image/png"}const dP=new jt;class pP{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new I5,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let n=!1,a=-1,o=!1,c=-1;if(typeof navigator<"u"){const h=navigator.userAgent;n=/^((?!chrome|android).)*safari/i.test(h)===!0;const d=h.match(/Version\/(\d+)/);a=n&&d?parseInt(d[1],10):-1,o=h.indexOf("Firefox")>-1,c=o?h.match(/Firefox\/([0-9]+)\./)[1]:-1}typeof createImageBitmap>"u"||n&&a<17||o&&c<98?this.textureLoader=new C2(this.options.manager):this.textureLoader=new B2(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new Ms(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){const n=this,a=this.json,o=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(c){return c._markDefs&&c._markDefs()}),Promise.all(this._invokeAll(function(c){return c.beforeRoot&&c.beforeRoot()}
vendor: 4,196 bytes, line 4292
4292)).then(function(){return Promise.all([n.getDependencies("scene"),n.getDependencies("animation"),n.getDependencies("camera")])}).then(function(c){const h={scene:c[0][a.scene||0],scenes:c[0],animations:c[1],cameras:c[2],asset:a.asset,parser:n,userData:{}};return nf(o,h,a),ko(h,a),Promise.all(n._invokeAll(function(d){return d.afterRoot&&d.afterRoot(h)})).then(function(){for(const d of h.scenes)d.updateMatrixWorld();e(h)})}).catch(t)}_markDefs(){const e=this.json.nodes||[],t=this.json.skins||[],n=this.json.meshes||[];for(let a=0,o=t.length;a<o;a++){const c=t[a].joints;for(let h=0,d=c.length;h<d;h++)e[c[h]].isBone=!0}for(let a=0,o=e.length;a<o;a++){const c=e[a];c.mesh!==void 0&&(this._addNodeRef(this.meshCache,c.mesh),c.skin!==void 0&&(n[c.mesh].isSkinnedMesh=!0)),c.camera!==void 0&&this._addNodeRef(this.cameraCache,c.camera)}}_addNodeRef(e,t){t!==void 0&&(e.refs[t]===void 0&&(e.refs[t]=e.uses[t]=0),e.refs[t]++)}_getNodeRef(e,t,n){if(e.refs[t]<=1)return n;const a=n.clone(),o=(c,h)=>{const d=this.associations.get(c);d!=null&&this.associations.set(h,d);for(const[p,v]of c.children.entries())o(v,h.children[p])};return o(n,a),a.name+="_instance_"+e.uses[t]++,a}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let n=0;n<t.length;n++){const a=e(t[n]);if(a)return a}return null}_invokeAll(e){const t=Object.values(this.plugins);t.unshift(this);const n=[];for(let a=0;a<t.length;a++){const o=e(t[a]);o&&n.push(o)}return n}getDependency(e,t){const n=e+":"+t;let a=this.cache.get(n);if(!a){switch(e){case"scene":a=this.loadScene(t);break;case"node":a=this._invokeOne(function(o){return o.loadNode&&o.loadNode(t)});break;case"mesh":a=this._invokeOne(function(o){return o.loadMesh&&o.loadMesh(t)});break;case"accessor":a=this.loadAccessor(t);break;case"bufferView":a=this._invokeOne(function(o){return o.loadBufferView&&o.loadBufferView(t)});break;case"buffer":a=this.loadBuffer(t);break;case"material":a=this._invokeOne(function(o){return o.loadMaterial&&o.loadMaterial(t)});break;case"texture":a=this._invokeOne(function(o){return o.loadTexture&&o.loadTexture(t)});break;case"skin":a=this.loadSkin(t);break;case"animation":a=this._invokeOne(function(o){return o.loadAnimation&&o.loadAnimation(t)});break;case"camera":a=this.loadCamera(t);break;default:if(a=this._invokeOne(function(o){return o!=this&&o.getDependency&&o.getDependency(e,t)}),!a)throw new Error("Unknown type: "+e);break}this.cache.add(n,a)}return a}getDependencies(e){let t=this.cache.get(e);if(!t){const n=this,a=this.json[e+(e==="mesh"?"es":"s")]||[];t=Promise.all(a.map(function(o,c){return n.getDependency(e,c)})),this.cache.add(e,t)}return t}loadBuffer(e){const t=this.json.buffers[e],n=this.fileLoader;if(t.type&&t.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+t.type+" buffer type is not supported.");if(t.uri===void 0&&e===0)return Promise.resolve(this.extensions[wn.KHR_BINARY_GLTF].body);const a=this.options;return new Promise(function(o,c){n.load(Vc.resolveURL(t.uri,a.path),o,void 0,function(){c(new Error('THREE.GLTFLoader: Failed to load buffer "'+t.uri+'".'))})})}loadBufferView(e){const t=this.json.bufferViews[e];return this.getDependency("buffer",t.buffer).then(function(n){const a=t.byteLength||0,o=t.byteOffset||0;return n.slice(o,o+a)})}loadAccessor(e){const t=this,n=this.json,a=this.json.accessors[e];if(a.bufferView===void 0&&a.sparse===void 0){const c=xS[a.type],h=cd[a.componentType],d=a.normalized===!0,p=new h(a.count*c);return Promise.resolve(new Qn(p,c,d))}const o=[];return a.bufferView!==void 0?o.push(this.getDependency("bufferView",a.bufferView)):o.push(null),a.sparse!==void 0&&(o.push(this.getDependency("bufferView",a.sparse.indices.bufferView)),o.push(this.getDependency("bufferView",a.sparse.values.bufferView))),Promise.all(o).then(function(c){const h=c[0],d=xS[a.type],p=cd[a.componentType],v=p.BYTES_PER_ELEMENT,y=v*d,_=a.byteOffset||0,b=a.bufferView!==void 0?n.bufferViews[a.bufferView].byteStride:void 0,T=a.normalized===!0;let R,A;if(b&&b!==y){const M=Math.floor(_/b),C="InterleavedBuffer:"+a.bufferView+":"+a.componentType+":"+M+":"+a.count;let D=t.cache.get(C);D||(R=new p(h,M*b,a.count*b/v),D=new og(R,b/v),t.cache.add(C,D)),A=new jc(D,d,_%b/v,T)}
vendor: 4,724 bytes, line 4292
4292else h===null?R=new p(a.count*d):R=new p(h,_,a.count*d),A=new Qn(R,d,T);if(a.sparse!==void 0){const M=xS.SCALAR,C=cd[a.sparse.indices.componentType],D=a.sparse.indices.byteOffset||0,U=a.sparse.values.byteOffset||0,H=new C(c[1],D,a.sparse.count*M),F=new p(c[2],U,a.sparse.count*d);h!==null&&(A=new Qn(A.array.slice(),A.itemSize,A.normalized)),A.normalized=!1;for(let G=0,V=H.length;G<V;G++){const O=H[G];if(A.setX(O,F[G*d]),d>=2&&A.setY(O,F[G*d+1]),d>=3&&A.setZ(O,F[G*d+2]),d>=4&&A.setW(O,F[G*d+3]),d>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}A.normalized=T}return A})}loadTexture(e){const t=this.json,n=this.options,o=t.textures[e].source,c=t.images[o];let h=this.textureLoader;if(c.uri){const d=n.manager.getHandler(c.uri);d!==null&&(h=d)}return this.loadTextureImage(e,o,h)}loadTextureImage(e,t,n){const a=this,o=this.json,c=o.textures[e],h=o.images[t],d=(h.uri||h.bufferView)+":"+c.sampler;if(this.textureCache[d])return this.textureCache[d];const p=this.loadImageSource(t,n).then(function(v){v.flipY=!1,v.name=c.name||h.name||"",v.name===""&&typeof h.uri=="string"&&h.uri.startsWith("data:image/")===!1&&(v.name=h.uri);const _=(o.samplers||{})[c.sampler]||{};return v.magFilter=CT[_.magFilter]||Hn,v.minFilter=CT[_.minFilter]||Tr,v.wrapS=NT[_.wrapS]||Xc,v.wrapT=NT[_.wrapT]||Xc,v.generateMipmaps=!v.isCompressedTexture&&v.minFilter!==oa&&v.minFilter!==Hn,a.associations.set(v,{textures:e}),v}).catch(function(){return null});return this.textureCache[d]=p,p}loadImageSource(e,t){const n=this,a=this.json,o=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(y=>y.clone());const c=a.images[e],h=self.URL||self.webkitURL;let d=c.uri||"",p=!1;if(c.bufferView!==void 0)d=n.getDependency("bufferView",c.bufferView).then(function(y){p=!0;const _=new Blob([y],{type:c.mimeType});return d=h.createObjectURL(_),d});else if(c.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const v=Promise.resolve(d).then(function(y){return new Promise(function(_,b){let T=_;t.isImageBitmapLoader===!0&&(T=function(R){const A=new ei(R);A.needsUpdate=!0,_(A)}),t.load(Vc.resolveURL(y,o.path),T,void 0,b)})}).then(function(y){return p===!0&&h.revokeObjectURL(d),ko(y,c),y.userData.mimeType=c.mimeType||hP(c.uri),y}).catch(function(y){throw console.error("THREE.GLTFLoader: Couldn't load texture",d),y});return this.sourceCache[e]=v,v}assignTexture(e,t,n,a){const o=this;return this.getDependency("texture",n.index).then(function(c){if(!c)return null;if(n.texCoord!==void 0&&n.texCoord>0&&(c=c.clone(),c.channel=n.texCoord),o.extensions[wn.KHR_TEXTURE_TRANSFORM]){const h=n.extensions!==void 0?n.extensions[wn.KHR_TEXTURE_TRANSFORM]:void 0;if(h){const d=o.associations.get(c);c=o.extensions[wn.KHR_TEXTURE_TRANSFORM].extendTexture(c,h),o.associations.set(c,d)}}return a!==void 0&&(c.colorSpace=a),e[t]=c,c})}assignFinalMaterial(e){const t=e.geometry;let n=e.material;const a=t.attributes.tangent===void 0,o=t.attributes.color!==void 0,c=t.attributes.normal===void 0;if(e.isPoints){const h="PointsMaterial:"+n.uuid;let d=this.cache.get(h);d||(d=new e_,la.prototype.copy.call(d,n),d.color.copy(n.color),d.map=n.map,d.sizeAttenuation=!1,this.cache.add(h,d)),n=d}else if(e.isLine){const h="LineBasicMaterial:"+n.uuid;let d=this.cache.get(h);d||(d=new Ja,la.prototype.copy.call(d,n),d.color.copy(n.color),d.map=n.map,this.cache.add(h,d)),n=d}if(a||o||c){let h="ClonedMaterial:"+n.uuid+":";a&&(h+="derivative-tangents:"),o&&(h+="vertex-colors:"),c&&(h+="flat-shading:");let d=this.cache.get(h);d||(d=n.clone(),o&&(d.vertexColors=!0),c&&(d.flatShading=!0),a&&(d.normalScale&&(d.normalScale.y*=-1),d.clearcoatNormalScale&&(d.clearcoatNormalScale.y*=-1)),this.cache.add(h,d),this.associations.set(d,this.associations.get(n))),n=d}e.material=n}getMaterialType(){return pg}loadMaterial(e){const t=this,n=this.json,a=this.extensions,o=n.materials[e];let c;const h={},d=o.extensions||{},p=[];if(d[wn.KHR_MATERIALS_UNLIT]){const y=a[wn.KHR_MATERIALS_UNLIT];c=y.getMaterialType(),p.push(y.extendParams(h,o,t))}else{const y=o.pbrMetallicRoughness||{};if(h.color=new _t(1,1,1),h.opacity=1,Array.isArray(y.baseColorFactor)){const _=y.baseColorFactor;h.color.setRGB(_[0],_[1],_[2],Qi),h.opacity=_[3]}y.baseColorTexture!==void 0&&p.push(t.assignTexture(h,"map",y.baseColorTexture,Ii)),h.metalness=y.metallicFactor!==void 0?y.metallicFactor:1,h.roughness=y.roughnessFactor!==void 0?y.roughnessFactor:1,y.metallicRoughnessTexture!==void 0&&(p.push(t.assignTexture(h,"metalnessMap",y.metallicRoughnessTexture)),p.push(t.assignTexture(h,"roughnessMap",y.metallicRoughnessTexture))),c=this._invokeOne(function(_){return _.getMaterialType&&_.getMaterialType(e)}
vendor: 9,653 bytes, line 4292
4292),p.push(Promise.all(this._invokeAll(function(_){return _.extendMaterialParams&&_.extendMaterialParams(e,h)})))}o.doubleSided===!0&&(h.side=Mr);const v=o.alphaMode||SS.OPAQUE;if(v===SS.BLEND?(h.transparent=!0,h.depthWrite=!1):(h.transparent=!1,v===SS.MASK&&(h.alphaTest=o.alphaCutoff!==void 0?o.alphaCutoff:.5)),o.normalTexture!==void 0&&c!==Bs&&(p.push(t.assignTexture(h,"normalMap",o.normalTexture)),h.normalScale=new Je(1,1),o.normalTexture.scale!==void 0)){const y=o.normalTexture.scale;h.normalScale.set(y,y)}if(o.occlusionTexture!==void 0&&c!==Bs&&(p.push(t.assignTexture(h,"aoMap",o.occlusionTexture)),o.occlusionTexture.strength!==void 0&&(h.aoMapIntensity=o.occlusionTexture.strength)),o.emissiveFactor!==void 0&&c!==Bs){const y=o.emissiveFactor;h.emissive=new _t().setRGB(y[0],y[1],y[2],Qi)}return o.emissiveTexture!==void 0&&c!==Bs&&p.push(t.assignTexture(h,"emissiveMap",o.emissiveTexture,Ii)),Promise.all(p).then(function(){const y=new c(h);return o.name&&(y.name=o.name),ko(y,o),t.associations.set(y,{materials:e}),o.extensions&&nf(a,y,o),y})}createUniqueName(e){const t=Pn.sanitizeNodeName(e||"");return t in this.nodeNamesUsed?t+"_"+ ++this.nodeNamesUsed[t]:(this.nodeNamesUsed[t]=0,t)}loadGeometries(e){const t=this,n=this.extensions,a=this.primitiveCache;function o(h){return n[wn.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(h,t).then(function(d){return DT(d,h,t)})}const c=[];for(let h=0,d=e.length;h<d;h++){const p=e[h],v=fP(p),y=a[v];if(y)c.push(y.promise);else{let _;p.extensions&&p.extensions[wn.KHR_DRACO_MESH_COMPRESSION]?_=o(p):_=DT(new un,p,t),a[v]={primitive:p,promise:_},c.push(_)}}return Promise.all(c)}loadMesh(e){const t=this,n=this.json,a=this.extensions,o=n.meshes[e],c=o.primitives,h=[];for(let d=0,p=c.length;d<p;d++){const v=c[d].material===void 0?lP(this.cache):this.getDependency("material",c[d].material);h.push(v)}return h.push(t.loadGeometries(c)),Promise.all(h).then(function(d){const p=d.slice(0,d.length-1),v=d[d.length-1],y=[];for(let b=0,T=v.length;b<T;b++){const R=v[b],A=c[b];let M;const C=p[b];if(A.mode===br.TRIANGLES||A.mode===br.TRIANGLE_STRIP||A.mode===br.TRIANGLE_FAN||A.mode===void 0)M=o.isSkinnedMesh===!0?new Tb(R,C):new Mi(R,C),M.isSkinnedMesh===!0&&M.normalizeSkinWeights(),A.mode===br.TRIANGLE_STRIP?M.geometry=wT(M.geometry,mb):A.mode===br.TRIANGLE_FAN&&(M.geometry=wT(M.geometry,Ty));else if(A.mode===br.LINES)M=new so(R,C);else if(A.mode===br.LINE_STRIP)M=new Vl(R,C);else if(A.mode===br.LINE_LOOP)M=new wb(R,C);else if(A.mode===br.POINTS)M=new Rb(R,C);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+A.mode);Object.keys(M.geometry.morphAttributes).length>0&&uP(M,o),M.name=t.createUniqueName(o.name||"mesh_"+e),ko(M,o),A.extensions&&nf(a,M,A),t.assignFinalMaterial(M),y.push(M)}for(let b=0,T=y.length;b<T;b++)t.associations.set(y[b],{meshes:e,primitives:b});if(y.length===1)return o.extensions&&nf(a,y[0],o),y[0];const _=new Bl;o.extensions&&nf(a,_,o),t.associations.set(_,{meshes:e});for(let b=0,T=y.length;b<T;b++)_.add(y[b]);return _})}loadCamera(e){let t;const n=this.json.cameras[e],a=n[n.type];if(!a){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return n.type==="perspective"?t=new sa(yb.radToDeg(a.yfov),a.aspectRatio||1,a.znear||1,a.zfar||2e6):n.type==="orthographic"&&(t=new wf(-a.xmag,a.xmag,a.ymag,-a.ymag,a.znear,a.zfar)),n.name&&(t.name=this.createUniqueName(n.name)),ko(t,n),Promise.resolve(t)}loadSkin(e){const t=this.json.skins[e],n=[];for(let a=0,o=t.joints.length;a<o;a++)n.push(this._loadNodeShallow(t.joints[a]));return t.inverseBindMatrices!==void 0?n.push(this.getDependency("accessor",t.inverseBindMatrices)):n.push(null),Promise.all(n).then(function(a){const o=a.pop(),c=a,h=[],d=[];for(let p=0,v=c.length;p<v;p++){const y=c[p];if(y){h.push(y);const _=new jt;o!==null&&_.fromArray(o.array,p*16),d.push(_)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',t.joints[p])}return new lg(h,d)})}loadAnimation(e){const t=this.json,n=this,a=t.animations[e],o=a.name?a.name:"animation_"+e,c=[],h=[],d=[],p=[],v=[];for(let y=0,_=a.channels.length;y<_;y++){const b=a.channels[y],T=a.samplers[b.sampler],R=b.target,A=R.node,M=a.parameters!==void 0?a.parameters[T.input]:T.input,C=a.parameters!==void 0?a.parameters[T.output]:T.output;R.node!==void 0&&(c.push(this.getDependency("node",A)),h.push(this.getDependency("accessor",M)),d.push(this.getDependency("accessor",C)),p.push(T),v.push(R))}return Promise.all([Promise.all(c),Promise.all(h),Promise.all(d),Promise.all(p),Promise.all(v)]).then(function(y){const _=y[0],b=y[1],T=y[2],R=y[3],A=y[4],M=[];for(let D=0,U=_.length;D<U;D++){const H=_[D],F=b[D],G=T[D],V=R[D],O=A[D];if(H===void 0)continue;H.updateMatrix&&H.updateMatrix();const z=n._createAnimationTracks(H,F,G,V,O);if(z)for(let Y=0;Y<z.length;Y++)M.push(z[Y])}const C=new Ed(o,void 0,M);return ko(C,a),C})}createNodeMesh(e){const t=this.json,n=this,a=t.nodes[e];return a.mesh===void 0?null:n.getDependency("mesh",a.mesh).then(function(o){const c=n._getNodeRef(n.meshCache,a.mesh,o);return a.weights!==void 0&&c.traverse(function(h){if(h.isMesh)for(let d=0,p=a.weights.length;d<p;d++)h.morphTargetInfluences[d]=a.weights[d]}),c})}loadNode(e){const t=this.json,n=this,a=t.nodes[e],o=n._loadNodeShallow(e),c=[],h=a.children||[];for(let p=0,v=h.length;p<v;p++)c.push(n.getDependency("node",h[p]));const d=a.skin===void 0?Promise.resolve(null):n.getDependency("skin",a.skin);return Promise.all([o,Promise.all(c),d]).then(function(p){const v=p[0],y=p[1],_=p[2];_!==null&&v.traverse(function(b){b.isSkinnedMesh&&b.bind(_,dP)});for(let b=0,T=y.length;b<T;b++)v.add(y[b]);return v})}_loadNodeShallow(e){const t=this.json,n=this.extensions,a=this;if(this.nodeCache[e]!==void 0)return this.nodeCache[e];const o=t.nodes[e],c=o.name?a.createUniqueName(o.name):"",h=[],d=a._invokeOne(function(p){return p.createNodeMesh&&p.createNodeMesh(e)});return d&&h.push(d),o.camera!==void 0&&h.push(a.getDependency("camera",o.camera).then(function(p){return a._getNodeRef(a.cameraCache,o.camera,p)})),a._invokeAll(function(p){return p.createNodeAttachment&&p.createNodeAttachment(e)}).forEach(function(p){h.push(p)}),this.nodeCache[e]=Promise.all(h).then(function(p){let v;if(o.isBone===!0?v=new Jy:p.length>1?v=new Bl:p.length===1?v=p[0]:v=new Bn,v!==p[0])for(let y=0,_=p.length;y<_;y++)v.add(p[y]);if(o.name&&(v.userData.name=o.name,v.name=c),ko(v,o),o.extensions&&nf(n,v,o),o.matrix!==void 0){const y=new jt;y.fromArray(o.matrix),v.applyMatrix4(y)}else o.translation!==void 0&&v.position.fromArray(o.translation),o.rotation!==void 0&&v.quaternion.fromArray(o.rotation),o.scale!==void 0&&v.scale.fromArray(o.scale);if(!a.associations.has(v))a.associations.set(v,{});else if(o.mesh!==void 0&&a.meshCache.refs[o.mesh]>1){const y=a.associations.get(v);a.associations.set(v,{...y})}return a.associations.get(v).nodes=e,v}),this.nodeCache[e]}loadScene(e){const t=this.extensions,n=this.json.scenes[e],a=this,o=new Bl;n.name&&(o.name=a.createUniqueName(n.name)),ko(o,n),n.extensions&&nf(t,o,n);const c=n.nodes||[],h=[];for(let d=0,p=c.length;d<p;d++)h.push(a.getDependency("node",c[d]));return Promise.all(h).then(function(d){for(let v=0,y=d.length;v<y;v++)o.add(d[v]);const p=v=>{const y=new Map;for(const[_,b]of a.associations)(_ instanceof la||_ instanceof ei)&&y.set(_,b);return v.traverse(_=>{const b=a.associations.get(_);b!=null&&y.set(_,b)}),y};return a.associations=p(o),o})}_createAnimationTracks(e,t,n,a,o){const c=[],h=e.name?e.name:e.uuid,d=[];Ic[o.path]===Ic.weights?e.traverse(function(_){_.morphTargetInfluences&&d.push(_.name?_.name:_.uuid)}):d.push(h);let p;switch(Ic[o.path]){case Ic.weights:p=_f;break;case Ic.rotation:p=xf;break;case Ic.translation:case Ic.scale:p=Sf;break;default:switch(n.itemSize){case 1:p=_f;break;case 2:case 3:default:p=Sf;break}break}const v=a.interpolation!==void 0?oP[a.interpolation]:yd,y=this._getArrayFromAccessor(n);for(let _=0,b=d.length;_<b;_++){const T=new p(d[_]+"."+Ic[o.path],t.array,y,v);a.interpolation==="CUBICSPLINE"&&this._createCubicSplineTrackInterpolant(T),c.push(T)}return c}_getArrayFromAccessor(e){let t=e.array;if(e.normalized){const n=$S(t.constructor),a=new Float32Array(t.length);for(let o=0,c=t.length;o<c;o++)a[o]=t[o]*n;t=a}return t}_createCubicSplineTrackInterpolant(e){e.createInterpolant=function(n){const a=this instanceof xf?rP:Nw;return new a(this.times,this.values,this.getValueSize()/3,n)},e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}}function mP(s,e,t){const n=e.attributes,a=new La;if(n.POSITION!==void 0){const h=t.json.accessors[n.POSITION],d=h.min,p=h.max;if(d!==void 0&&p!==void 0){if(a.set(new K(d[0],d[1],d[2]),new K(p[0],p[1],p[2])),h.normalized){const v=$S(cd[h.componentType]);a.min.multiplyScalar(v),a.max.multiplyScalar(v)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;const o=e.targets;if(o!==void 0){const h=new K,d=new K;for(let p=0,v=o.length;p<v;p++){const y=o[p];if(y.POSITION!==void 0){const _=t.json.accessors[y.POSITION],b=_.min,T=_.max;if(b!==void 0&&T!==void 0){if(d.setX(Math.max(Math.abs(b[0]),Math.abs(T[0]))),d.setY(Math.max(Math.abs(b[1]),Math.abs(T[1]))),d.setZ(Math.max(Math.abs(b[2]),Math.abs(T[2]))),_.normalized){const R=$S(cd[_.componentType]);d.multiplyScalar(R)}h.max(d)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}a.expandByVector(h)}s.boundingBox=a;const c=new Sa;a.getCenter(c.center),c.radius=a.min.distanceTo(a.max)/2,s.boundingSphere=c}function DT(s,e,t){const n=e.attributes,a=[];function o(c,h){return t.getDependency("accessor",c).then(function(d){s.setAttribute(h,d)})}
4292for(const c in n){const h=JS[c]||c.toLowerCase();h in s.attributes||a.push(o(n[c],h))}if(e.indices!==void 0&&!s.index){const c=t.getDependency("accessor",e.indices).then(function(h){s.setIndex(h)});a.push(c)}return An.workingColorSpace!==Qi&&"COLOR_0"in n&&console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${An.workingColorSpace}" not supported.`),ko(s,e),mP(s,e,t),Promise.all(a).then(function(){return e.targets!==void 0?cP(s,e.targets,t):s})}function gP(){const s=qc(Rw,"./surface.glb"),e={meshPhysicalMaterial:!1,transmissionSampler:!1,backside:!1,samples:1,resolution:512,transmission:.7,roughness:.86,thickness:.3,ior:1.8,chromaticAberration:0,anisotropy:0,distortion:0,distortionScale:.15,temporalDistortion:.5,clearcoat:.08,clearcoatRoughness:.53,attenuationDistance:.5,attenuationColor:"#ffffff",color:"#77aa76",bg:"#69faff"};return Z.jsx(Z.Fragment,{children:s.scene.children.map(t=>Z.jsx("mesh",{geometry:t.geometry,children:Z.jsx(_5,{background:new _t(e.bg),...e})},t.uuid))})}function vP(){const s=qc(Rw,"./cartoon.glb");return Z.jsx("group",{rotation:[0,0,0],children:s.scene.children.map(e=>Z.jsx("mesh",{geometry:e.geometry,children:Z.jsx("meshStandardMaterial",{color:"#4A90E2",roughness:.2,metalness:.05,clearcoat:.3,clearcoatRoughness:.1})},e.uuid))})}function yP(){const s=le.useRef(),[e,t]=le.useState(!1),[n,a]=le.useState({x:0,y:0}),[o,c]=le.useState({x:0,y:0}),[h,d]=le.useState({x:0,y:0}),[p,v]=le.useState(!1);le.useEffect(()=>{const R=()=>{v(window.innerWidth<=768)};return R(),window.addEventListener("resize",R),()=>window.removeEventListener("resize",R)},[]);const y=()=>p?[.128,.128,.128]:[.048,.048,.048];s1((R,A)=>{if(s.current){const M=R.clock.getElapsedTime(),C=Math.sin(M*.4)*.3,D=Math.sin(M*.3+1.2)*.2,U=e?.1:.05;d(H=>({x:H.x+(o.x-H.x)*U,y:H.y+(o.y-H.y)*U})),s.current.rotation.y=C+h.x*.15,s.current.rotation.x=D+h.y*.15,e||c(H=>({x:H.x*.95,y:H.y*.95}))}});const _=R=>{t(!0),a({x:R.clientX,y:R.clientY})},b=R=>{if(!e||!s.current)return;const A=R.clientX-n.x,M=R.clientY-n.y;c(C=>({x:C.x+A*.05,y:C.y+M*.05})),a({x:R.clientX,y:R.clientY})},T=()=>{t(!1)};return Z.jsxs("group",{ref:s,scale:y(),position:[0,0,0],onPointerDown:_,onPointerMove:b,onPointerUp:T,onPointerLeave:T,style:{cursor:"pointer"},children:[Z.jsx(gP,{}),Z.jsx(vP,{})]})}function _P(){const[s,e]=le.useState(!1);le.useEffect(()=>{const n=()=>{e(window.innerWidth<=768)};return n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[]);const t=()=>s?{position:[0,0,18],fov:40}:{position:[0,0,15],fov:35};return Z.jsx("div",{className:"w-full h-[500px] md:h-[1600px] overflow-hidden rounded-lg",children:Z.jsxs(JB,{shadows:!0,camera:t(),className:"w-full h-full",gl:{alpha:!0},children:[Z.jsx("ambientLight",{intensity:.4}),Z.jsx("directionalLight",{position:[10,10,5],intensity:1}),Z.jsx("pointLight",{position:[-10,-10,-10],intensity:.5}),Z.jsx(le.Suspense,{fallback:null,children:Z.jsx(yP,{})}),Z.jsx(z5,{preset:"city",background:!1})]})})}const UT={"software-engineer":{title:"Software Engineer",location:"Munich, Germany",type:"Full-time",date:"01.01.26",description:"We are looking for a Software Engineer to join our team and help build cutting-edge solutions for life science and pharmaceutical companies.",details:["You will design and implement scalable software solutions for data analysis and visualization, collaborating closely with life science consultants to translate scientific requirements into robust technical specifications.","Your work will involve building and maintaining APIs and data pipelines for proteomics and genomics data. You'll contribute to open-source projects and internal tools while writing clean, maintainable code with comprehensive tests.","We're looking for someone with strong proficiency in Python and/or Rust, along with experience in data processing frameworks like Pandas, Polars, and NumPy. Familiarity with cloud platforms (AWS, GCP, or Azure) and CI/CD pipelines is essential.","Experience in life sciences or bioinformatics is a plus, as is knowledge of mass spectrometry data analysis. Above all, we value excellent problem-solving and communication skills.","We offer competitive salary and equity participation, flexible working hours with remote work options, a professional development budget, and the opportunity to work on impactful projects in drug discovery."]},"consultant-life-science":{title:"Consultant, Life Science",location:"Munich, Germany",type:"Full-time",date:"01.01.26",description:"We are seeking a Life Science Consultant to work with pharmaceutical and biotech clients on proteomics, drug discovery, and data-driven research strategies.",details:["You will partner with pharmaceutical and biotech clients to understand their scientific challenges and objectives. This includes designing and executing proteomics experiments and developing comprehensive data analysis workflows.","A key part of your role will be translating complex scientific findings into actionable insights for stakeholders. You'll develop and present strategic recommendations based on rigorous data analysis and collaborate with software engineers to improve analytical tools and pipelines.","We're looking for candidates with a PhD in Life Sciences, Biochemistry, Proteomics, or a related field. A strong background in mass spectrometry-based proteomics and experience with data analysis tools (Python, R, or similar) are essential.","Excellent presentation and client-facing communication skills are crucial, along with the ability to manage multiple projects and meet deadlines. Industry experience in pharmaceutical or biotech companies and experience with drug target identification and validation are a plus.","We offer competitive salary and equity participation, flexible working hours with remote work options, a professional development budget, and exposure to cutting-edge research and industry projects."]}},xP=[{title:"Software Engineer",location:"MUNICH, GERMANY",date:"01.01.26",slug:"softw
4292are-engineer"},{title:"Consultant, Life Science",location:"MUNICH, GERMANY",date:"01.01.26",slug:"consultant-life-science"}];function SP(){const[s,e]=le.useState(null),[t,n]=le.useState(!1),a=kl(),o=jT();le.useEffect(()=>{const h=a.hash;if(h.startsWith("#careers/")){const d=h.replace("#careers/","");UT[d]&&e(UT[d])}},[a.hash]);const c=()=>{n(!0),setTimeout(()=>{e(null),n(!1),o("#careers",{replace:!0})},300)};return Z.jsxs(Z.Fragment,{children:[s&&Z.jsxs("div",{className:"fixed inset-0 z-50 bg-white overflow-y-auto",style:{backgroundImage:"radial-gradient(circle, #d1d5db 1px, transparent 1px)",backgroundSize:"40px 40px",backgroundPosition:"0 0",animation:t?"fadeOut 0.3s ease-in-out":"fadeIn 0.3s ease-in-out"},children:[Z.jsx("div",{className:"fixed inset-0 pointer-events-none z-[51]",style:{background:"linear-gradient(to right, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.8) 25%, rgba(255,255,255,0.4) 33%, rgba(255,255,255,0.1) 50%, transparent 65%)"}}),Z.jsxs("div",{className:"max-w-[1600px] mx-auto relative z-[52] px-[20px] py-20",style:{animation:t?"slideDown 0.3s ease-in-out":"slideUp 0.3s ease-in-out"},children:[Z.jsxs("button",{type:"button",onClick:c,className:"mb-12 flex items-center gap-2 text-[#6b7280] hover:text-[#75bb2b] transition-colors duration-200 bg-transparent border-0 cursor-pointer text-lg",children:[Z.jsx("span",{children:"←"}),Z.jsx("span",{children:"Back to Careers"})]}),Z.jsxs("div",{className:"rounded-3xl p-12",children:[Z.jsxs("div",{className:"mb-12",children:[Z.jsx("h1",{className:"text-5xl text-[#1f2937] mb-4",children:s.title}),Z.jsxs("div",{className:"flex flex-wrap gap-4 text-lg text-[#6b7280]",children:[Z.jsx("span",{children:s.location}),Z.jsx("span",{children:"•"}),Z.jsx("span",{children:s.type}),Z.jsx("span",{children:"•"}),Z.jsxs("span",{children:["Posted ",s.date]})]})]}),Z.jsx("p",{className:"text-xl text-[#6b7280] leading-relaxed mb-12",children:s.description}),Z.jsx("section",{className:"mb-12 space-y-6",children:s.details.map(h=>Z.jsx("p",{className:"text-lg text-[#6b7280] leading-relaxed",children:h},h))}),Z.jsx("div",{className:"pt-8 border-t border-gray-200",children:Z.jsxs("a",{href:`mailto:[email protected]?subject=Application: ${s.title}`,className:"inline-flex items-center gap-2 bg-black text-white px-8 py-4 rounded-full text-lg font-medium hover:bg-gray-800 transition-colors duration-200",children:["Apply for this position",Z.jsx("span",{children:"→"})]})})]})]})]}),Z.jsx("section",{id:"careers",className:"mt-32 mb-32 bg-gray-50 rounded-3xl p-12 min-h-[400px]",children:Z.jsxs("div",{className:"flex flex-col md:flex-row gap-8",children:[Z.jsx("h2",{className:"text-5xl text-[#1f2937] md:w-1/3 flex-shrink-0",children:"Open Roles"}),Z.jsx("div",{className:"space-y-0 md:w-2/3 flex-1",children:xP.map(h=>Z.jsxs("div",{className:"w-full border-t border-dotted border-gray-300 py-6 flex flex-col md:flex-row justify-between items-start md:items-center gap-4 px-4 -mx-4 bg-transparent text-left",children:[Z.jsxs("div",{className:"flex flex-col text-sm text-[#6b7280] group-hover:text-[#75bb2b] transition-colors duration-200",children:[Z.jsx("span",{children:h.location}),Z.jsx("span",{children:h.date})]}),Z.jsx("h3",{className:"text-2xl md:text-3xl text-[#1f2937] md:text-right flex-1",children:h.title})]},h.title))})]})})]})}function LT({title:s,description:e,imagePosition:t="right",children:n,id:a}){return Z.jsxs("section",{id:a,className:"mt-32 flex flex-col md:flex-row gap-10 items-center",children:[Z.jsxs("div",{className:"flex-1 order-1",children:[Z.jsx("h3",{className:"text-4xl text-[#1f2937] mb-4",children:s}),Z.jsx("div",{className:"text-lg text-[#6b7280] leading-relaxed",children:e})]}),Z.jsx("div",{className:`w-full md:flex-1 rounded-2xl h-[400px] md:h-[600px] flex items-center justify-center overflow-hidden order-2 ${t==="left"?"md:order-first":""}`,children:n||Z.jsx("span",{className:"text-gray-400 text-xl",children:"Placeholder"})})]})}/*! *****************************************************************************
4293Copyright (c) Microsoft Corporation.
4294
4295Permission to use, copy, modify, and/or distribute this software for any
4296purpose with or without fee is hereby granted.
4297
4298THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
4299REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
4300AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
4301INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
4302LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
4303OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
4304PERFORMANCE OF THIS SOFTWARE.
4305***************************************************************************** */var eb=function(){return eb=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},eb.apply(this,arguments)};function bP(s,e){var t={};for(var n in s)Object.prototype.hasOwnProperty.call(s,n)&&e.indexOf(n)<0&&(t[n]=s[n]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,n=Object.getOwnPropertySymbols(s);a<n.length;a++)e.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(s,n[a])&&(t[n[a]]=s[n[a]]);return t}var ud="",Im=null,H0=null,Dw=null;function m1(){ud="",Im!==null&&Im.disconnect(),H0!==null&&(window.clearTimeout(H0),H0=null)}function OT(s){var e=["BUTTON","INPUT","SELECT","TEXTAREA"],t=["A","AREA"];return e.includes(s.tagName)&&!s.hasAttribute("disabled")||t.includes(s.tagName)&&s.hasAttribute("href")}function zT(){var s=null;if(ud==="#")s=document.body;else{var e=ud.replace("#","");s=document.getElementById(e),s===null&&ud==="#top"&&(s=document.body)}if(s!==null){Dw(s);var t=s.getAttribute("tabindex");return t===null&&!OT(s)&&s.setAttribute("tabindex",-1),s.focus({preventScroll:!0}),t===null&&!OT(s)&&(s.blur(),s.removeAttribute("tabindex")),m1(),!0}return!1}function MP(s){window.setTimeout(function(){zT()===!1&&(Im===null&&(Im=new MutationObserver(zT)),Im.observe(document,{attributes:!0,childList:!0,subtree:!0}),H0=window.setTimeout(function(){m1()},s||1e4))},0)}function Uw(s){return ES.forwardRef(function(e,t){var n="";typeof e.to=="string"&&e.to.includes("#")?n="#"+e.to.split("#").slice(1).join("#"):typeof e.to=="object"&&typeof e.to.hash=="string"&&(n=e.to.hash);var a={};s===ob&&(a.isActive=function(h,d){return h&&h.isExact&&d.hash===n});function o(h){m1(),ud=e.elementId?"#"+e.elementId:n,e.onClick&&e.onClick(h),ud!==""&&!h.defaultPrevented&&h.button===0&&(!e.target||e.target==="_self")&&!(h.metaKey||h.altKey||h.ctrlKey||h.shiftKey)&&(Dw=e.scroll||(function(d){return e.smooth?d.scrollIntoView({behavior:"smooth"}):d.scrollIntoView()}),MP(e.timeout))}var c=bP(e,["scroll","smooth","timeout","elementId"]);return ES.createElement(s,eb({},a,c,{onClick:o,ref:t}),e.children)})}var Bm=Uw(By);Uw(ob);const Lw="/assets/logo-CjgrkUAS.svg";function EP({className:s="w-5 h-5"}){return Z.jsxs("svg",{className:s,fill:"currentColor",viewBox:"0 0 24 24",children:[Z.jsx("title",{children:"LinkedIn"}),Z.jsx("path",{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"})]})}function Ow(){return Z.jsx("footer",{className:"bg-black text-white relative z-10",children:Z.jsxs("div",{className:"max-w-[1600px] mx-auto px-[20px] py-16",children:[Z.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-12 mb-12",children:[Z.jsxs("div",{children:[Z.jsx("img",{src:Lw,alt:"Logo",className:"h-16 mb-4 brightness-0 invert"}),Z.jsx("p",{className:"text-gray-400 text-sm leading-relaxed",children:"Bioinformatics Consulting for Life Science and Drug Discovery"})]}),Z.jsxs("div",{children:[Z.jsx("h4",{className:"text-white mb-4",children:"Qu
4305ick Links"}),Z.jsxs("ul",{className:"space-y-3",children:[Z.jsx("li",{children:Z.jsx(Bm,{smooth:!0,to:"/#bioinformatics",className:"text-gray-400 hover:text-white transition-colors text-sm",children:"What we do"})}),Z.jsx("li",{children:Z.jsx(Bm,{smooth:!0,to:"/#team",className:"text-gray-400 hover:text-white transition-colors text-sm",children:"Team"})}),Z.jsx("li",{children:Z.jsx(Bm,{smooth:!0,to:"/#careers",className:"text-gray-400 hover:text-white transition-colors text-sm",children:"Open Roles"})})]})]}),Z.jsxs("div",{children:[Z.jsx("h4",{className:"text-white mb-4",children:"Contact"}),Z.jsx("ul",{className:"space-y-3",children:Z.jsxs("li",{className:"text-gray-400 text-sm",children:["Türkenstraße 5",Z.jsx("br",{}),"80333 München, Germany"]})})]}),Z.jsxs("div",{children:[Z.jsx("h4",{className:"text-white mb-4",children:"Follow Us"}),Z.jsx("div",{className:"flex gap-4",children:Z.jsx("a",{href:"https://www.linkedin.com/company/aplusia",target:"_blank",rel:"noopener noreferrer",className:"w-10 h-10 bg-gray-800 rounded-full flex items-center justify-center hover:bg-[#75bb2b] transition-colors","aria-label":"LinkedIn",children:Z.jsx(EP,{className:"w-5 h-5"})})})]})]}),Z.jsxs("div",{className:"border-t border-gray-800 pt-8 flex flex-col md:flex-row justify-between items-center gap-4",children:[Z.jsxs("p",{className:"text-gray-400 text-sm",children:["© ",new Date().getFullYear()," Aplusia GmbH. All rights reserved."]}),Z.jsx("div",{className:"flex gap-6",children:Z.jsx("a",{href:"/impressum",className:"text-gray-400 hover:text-white transition-colors text-sm",children:"Impressum"})})]})]})})}function zw({user:s,domain:e,className:t=""}){const[n,a]=le.useState(!1),o=le.useRef(null),c=`${s}@${e}`;le.useEffect(()=>{o.current&&(o.current.textContent=c)},[c]);const h=()=>{navigator.clipboard.writeText(c),a(!0),setTimeout(()=>a(!1),2e3)};return Z.jsxs("button",{type:"button",onClick:h,className:`flex items-center gap-2 text-[#6b7280] hover:text-[#75bb2b] transition-colors duration-200 cursor-pointer relative ${t}`,"data-user":s,"data-domain":e,children:[n?Z.jsx("span",{children:"✓ Copied!"}):Z.jsx("span",{ref:o}),Z.jsxs("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[Z.jsx("title",{children:"Copy to clipboard"}),Z.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})]})]})}function Iw({isOpen:s,onClose:e}){return s?Z.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center backdrop-blur-sm",style:{backgroundColor:"color(srgb 1 1 1 / 0.35)"},onClick:e,onKeyDown:t=>t.key==="Escape"&&e(),role:"button",tabIndex:0,children:Z.jsxs("div",{className:"bg-white rounded-2xl p-8 max-w-md w-full mx-4 relative shadow-2xl z-[101]",onClick:t=>t.stopPropagation(),onKeyDown:t=>t.stopPropagation(),role:"dialog","aria-modal":"true",children:[Z.jsx("button",{type:"button",onClick:e,className:"absolute top-4 right-4 text-gray-400 hover:text-gray-600 text-2xl cursor-pointer","aria-label":"Close",children:"×"}),Z.jsx("h2",{className:"text-4xl font-bold text-[#1f2937] mb-8",children:"Get in Contact"}),Z.jsx("div",{className:"space-y-8",children:Z.jsxs("div",{children:[Z.jsx("h3",{className:"text-2xl font-semibold text-[#1f2937] mb-2",children:"Georg Wallmann, PhD"}),Z.jsx("p",{className:"text-base text-[#6b7280] mb-4",children:"Managing Director"}),Z.jsx(zw,{user:"georg",domain:"aplusia.com"})]})})]})}):null}function Bw({isMobile:s}){const[e,t]=le.useState(!1);return Z.jsxs(Z.Fragment,{children:[Z.jsxs("header",{className:`flex justify-between items-center ${s?"py-[15px] gap-[15px]":"gap-0 mt-[100px]"} flex-wrap`,children:[Z.jsx(By,{to:"/",className:"flex items-center",children:Z.jsx("img",{src:Lw,alt:"Logo",className:`${s?"h-16":"h-24"}`})}),Z.jsxs("nav",{className:`flex ${s?"gap-5":"gap-10"} items-center flex-wrap`,children:[Z.jsx(Bm,{smooth:!0,to:"/#bioinformatics",className:`text-[#6b7280] no-underline ${s?"text-sm":"text-base"} hover:text-[#1f2937] cursor-pointer`,style:{transition:"color 0.2s ease"},children:"What we do"}),Z.jsx(Bm,{smooth:!0,to:"/#team",className:`text-[#6b7280] no-u
4305nderline ${s?"text-sm":"text-base"} hover:text-[#1f2937] cursor-pointer`,style:{transition:"color 0.2s ease"},children:"Team"}),Z.jsx("button",{type:"button",onClick:()=>t(!0),className:`text-white bg-black no-underline ${s?"text-xs px-3 py-1":"text-sm px-4 py-1"} rounded-full cursor-pointer hover:bg-[#1f2937] border-0`,style:{transition:"background-color 0.2s ease"},children:"get in contact"})]})]}),Z.jsx(Iw,{isOpen:e,onClose:()=>t(!1)})]})}const TP="/assets/pexels-mucahttbeyhan-16313978_optimized-HCYRXnUU.jpg";function AP({isMobile:s}){return Z.jsxs("section",{className:`${s?"":"mt-10"} rounded-3xl overflow-hidden relative h-[600px] flex items-end`,children:[Z.jsx("div",{className:"absolute inset-0",style:{backgroundImage:`url(${TP})`,backgroundSize:"cover",backgroundPosition:"center",transform:"scaleX(-1)"}}),Z.jsxs("div",{className:"z-10 relative px-12 pb-12",children:[Z.jsx("h2",{className:"text-white text-5xl mb-4",children:"Bioinformatics Consulting"}),Z.jsx("p",{className:"text-white text-3xl leading-tight",children:"Life Science and Drug Discovery"})]})]})}const wP="/assets/christoph_crop_optimized-CU4O2Pxb.jpg",RP="/assets/constantin_crop_optimized-bIFwfyb7.jpg",CP="/assets/georg_crop_optimized-BuzWNtTf.jpg",NP="/assets/jamba_crop_optimized-DBLj8K7S.jpg",DP="/assets/luis_crop_optimized-BBVJco2Z.jpg",UP="/assets/paulyna_crop_optimized-C7g5K5JS.jpg",LP="/assets/team_optimized-DRbjUnRK.jpg",OP="/assets/tobias_crop_optimized-_XIBtdZ4.jpg",zP=[{name:"Christoph Wichmann, PhD",role:"Managing Director | Co-Founder",expertise:"Proteomics | Scientific Software Development",bio:["Dr. Christoph Wichmann co-founded Aplusia to bring advanced computational solutions to biotechnology and data-intensive industries. He combines deep expertise in computational proteomics with proven entrepreneurial experience, having led the Exist Project Harmonize to develop a flavor engineering platform for the food industry.","Before this, he earned his PhD in Theoretical Physics from Ludwig-Maximilians-Universität München and completed postdoctoral research at the Max Planck Institute of Biochemistry, where he contributed to MaxQuant and Perseus software development and created MaxQuant Live for real-time mass spectrometer control. With strong programming skills across multiple languages he brings proven expertise in translating cutting-edge research into practical software solutions."],social:{linkedin:"https://www.linkedin.com/in/dr-christoph-wichmann-47119b215/",github:"",twitter:""},email:{user:"christoph",domain:"aplusia.com"},image:wP},{name:"Georg Wallmann, PhD",role:"Managing Director | Co-Founder",expertise:"Artificial Intelligence | Scientific Software Development",bio:["Georg Wallmann founded Aplusia to support companies building robust data platforms, supporting every increasing data volumes in Biotech and Pharma. He brings extensive experience as a Scientific Software Engineer in Proteomics, working on transfer learning-based DIA search engines (alphaDIA). His particular interest lies at the intersection of large-scale data collection and custom artificial intelligence solutions for biological research.","Georg earned his Master's degree in Biochemistry from Ludwig-Maximilians-Universität München. His research experience includes previous work with Nikolai Slavov on DIA multiplexing, where he developed computational tools and algorithms for quantitative proteomics analysis. He also worked on high content processing platform, NMR and CryoEM data processing. Georg earned his PhD at the Max Planck Institute for Biochemistry at the Lab of Matthias Mann."],social:{linkedin:"https://www.linkedin.com/in/georg
4305-wallmann-926433189/",github:"",twitter:""},email:{user:"georg",domain:"aplusia.com"},image:CP},{name:"Constantin Ammar, PhD",role:"Consultant",expertise:"Bioinformatics | Proteomics | Transcriptomics",bio:["Dr. Constantin Ammar is a bioinformatics consultant specializing in proteomics and data science. He recently completed his postdoctoral research at the Max Planck Institute of Biochemistry in Munich, where he developed computational tools and algorithms for quantitative proteomics analysis in the Mann Lab.","Dr. Ammar earned his PhD in Bioinformatics from Ludwig-Maximilians-Universität München. He holds Master's and Bachelor's degrees in Physics and has international research experience from Harvard University's Department of Systems Biology. His research has focused on advanced quantification algorithms (AlphaQuant, RefQuant) and DIA multiplexing (mDIA), developing open-source software solutions for cutting-edge proteomics applications."],social:{linkedin:"https://www.linkedin.com/in/constantin-ammar-987084187/",github:"",twitter:""},image:RP},{name:"Paulyna Mendoza",role:"Head of People and Operations",readBio:!1,expertise:"",bio:["Expert in machine learning applications for proteomics and metabolomics."],social:{linkedin:"",github:"",twitter:""},image:UP},{name:"Jambaldorj Ochirpurev",role:"Software Engineer",expertise:"Full-Stack Development | UI/UX Design | Data Analytics",bio:["Jambaldorj Ochirpurev is a software engineer with expertise in building modern web applications and data-driven solutions. He holds a Master's degree in Computer Science from Technical University of Munich and a Bachelor's degree in Computer Science, cum laude, from Wabash College, Indiana.","His professional experience includes an internship at Intel Corporation, where he contributed to web application development and optimization. He brings strong technical skills in React, Vue, Django, and modern web technologies, combined with a passion for creating intuitive user experiences and efficient, maintainable code."],social:{linkedin:"https://de.linkedin.com/in/jambaldorj-ochirpurev-8466051b1",github:"",twitter:""},image:NP},{name:"Luis Vollmers, PhD",role:"Consultant",expertise:"Biophysics | Bioinformatics | Drug Discovery",bio:["Luis Vollmers is a Scientific Consultant working at the intersection of computational biophysics and scientific machine learning. He earned his Ph.D. from the Technische Universität München, conducting his research in the Zacharias Lab. During his doctoral studies, he specialized in method development for drug discovery, focusing on molecular glues using advanced physical simulation methods.","Luis earned his Master's and Bachelor's degrees from the Technical University of Darmstadt, and gained international research experience at the University of Cambridge. His expertise extends to deploying innovative software solutions and AI prediction models built on top of physics-based methods. With a background in molecular dynamics, quantum modeling, and scientific machine learning, he brings deep expertise in computational biophysics to the development of data processing and analysis tools for biotechnology companies."],social:{linkedin:"https://www.linkedin.com/in/luis-vollmers-phd/",github:"",twitter:""},image:DP},{name:"Tobias Kiermeyer",role:"Working Student",expertise:"Artificial Intelligence | Proteomics",bio:["Tobias Kiermeyer is a working student focused on AI/ML solutions for bioinformatics data. He is pursuing a PhD in theoretical quantum physics at the Technische Universität München, where he develops model-based reinforcement learning algorithms to precisely control quantum devices such as NMR instruments and quantum computers.","Tobias earned his Master's and Bachelor's degrees in Physics from Ludwig Maximilians-Universität München, where he conducted research in quantum many-body physics. He previously held a working-student role at the Max Planck Institute of Biochemistry, where he worked on analysis and physics-based simulations of proteomics data. He brings a strong foundation in machine learning and computational physics, along with a focus on applying it to complex biological data."],social:{linkedin:"https://www.linkedin.com/in/tkiermeyer/",github:"",twitter:""},image:OP}];function IP(){const[s,e]=le.useState(null),[t,n]=le.useState(!1),a=()=>{n(!0),setTimeout(()=>{e(null),n(!1)},300)};return Z.jsxs(Z.Fragment,{children:[s&&Z.jsxs("div",{className:"fixed inset-0 z-50 bg-white overflow-y-auto",style:{backgroundImage:"radial-gradient(circle, #d1d5db 1px, transparent 1px)",backgroundSize:"40px 40px",backgroundPosition:"0 0",animation:t?"fadeOut 0.3s ease-in-out":"fadeIn 0.3s ease-in-out"},children:[Z.jsx("div",{className:"fixed inset-0 pointer-events-none z-[51]",style:{background:"linear-gradient(to right, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.8) 25%, rgba(255,255,255,0.4) 33%, rgba(255,255,255,0.1) 50%, transparent 65%)"}}),Z.jsxs("div",{className:"max-w-[1600px] mx-auto relative z-[52] px-[20px] py-20",style:{animation:t?"slideDown 0.3s ease-in-out":"slide
4305Up 0.3s ease-in-out"},children:[Z.jsxs("button",{type:"button",onClick:a,className:"mb-12 flex items-center gap-2 text-[#6b7280] hover:text-[#75bb2b] transition-colors duration-200 bg-transparent border-0 cursor-pointer text-lg",children:[Z.jsx("span",{children:"←"}),Z.jsx("span",{children:"Back to Team"})]}),Z.jsxs("div",{className:"flex flex-col md:flex-row gap-12 items-start",children:[Z.jsx("div",{className:"w-full md:w-1/3",children:Z.jsx("div",{className:"aspect-square rounded-2xl overflow-hidden",children:Z.jsx("img",{src:s.image,alt:s.name,className:"w-full h-full object-cover"})})}),Z.jsxs("div",{className:"flex-1",children:[Z.jsx("h1",{className:"text-5xl text-[#1f2937] mb-4",children:s.name}),Z.jsx("p",{className:"text-2xl text-[#75bb2b] mb-8",children:s.role}),Z.jsx("div",{className:"mb-8",children:s.bio.map(o=>Z.jsx("p",{className:"text-xl text-[#6b7280] leading-relaxed mb-6 last:mb-0",children:o},o.slice(0,50)))}),s.expertise&&Z.jsxs("div",{className:"mt-8 pt-8 border-t border-gray-200",children:[Z.jsx("h3",{className:"text-meta text-[#1f2937] mb-3",children:"EXPERTISE"}),Z.jsx("p",{className:"text-lg text-[#6b7280]",children:s.expertise})]}),(s.email||s.social&&(s.social.linkedin||s.social.github||s.social.twitter))&&Z.jsxs("div",{className:"mt-8 pt-8 border-t border-gray-200",children:[Z.jsx("h3",{className:"text-meta text-[#1f2937] mb-4",children:"CONNECT"}),Z.jsxs("div",{className:"flex flex-wrap items-center gap-8",children:[s.email&&Z.jsx(zw,{user:s.email.user,domain:s.email.domain}),s.social.linkedin&&Z.jsxs("a",{href:s.social.linkedin,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-[#6b7280] hover:text-[#75bb2b] transition-colors duration-200",children:[Z.jsxs("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24","aria-label":"LinkedIn",children:[Z.jsx("title",{children:"LinkedIn"}),Z.jsx("path",{d:"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"})]}),"LinkedIn"]}),s.social.github&&Z.jsxs("a",{href:s.social.github,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-[#6b7280] hover:text-[#75bb2b] transition-colors duration-200",children:[Z.jsxs("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24","aria-label":"GitHub",children:[Z.jsx("title",{children:"GitHub"}),Z.jsx("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z"})]}),"GitHub"]}),s.social.twitter&&Z.jsxs("a",{href:s.social.twitter,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-[#6b7280] hover:text-[#75bb2b] transition-colors duration-200",children:[Z.jsxs("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24","aria-label":"Twitter",children:[Z.jsx("title",{children:"Twitter"}),Z.jsx("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})]}),"Twitter"]})]})]})]})]})]})]}),Z.jsxs("section",{id:"team",className:"mt-32",children:[Z.jsx("h2",{className:"text-5xl text-[#1f2937] mb-16",children:"OUR TEAM"}),Z.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8",children:[zP.map(o=>Z.jsxs("button",{type:"button",className:"flex flex-col group cursor-pointer text-left bg-transparent border-0 p-0 w-full",onClick:()=>o.readBio!==!1&&e(o),disabled:o.readBio===!1,children:[Z.jsx("div",{className:"w-full aspect-square bg-gray-200 rounded-2xl mb-4 flex items-center justify-center overflow-hidden",children:Z.jsx("img",{src:o.image,alt:o.name,className:"w-full h-full object-cover"})}),Z.jsx("h3",{className:`text-xl text-[#1f2937] mb-1 transition-colors duration-200 ${o.readBio!==!1?"group-hover:text-[#75bb2b]":""}`,children:o.name}),Z.jsx("p",{className:`text-meta text-[#6b7280] mb-3 transition-colors duration-200 ${o.readBio!==!1?"group-hover:text-[#75bb2b]":""}`,children:o.role}),o.readBio!==!1&&Z.jsx("span",{className:"font-mono text-sm text-[#6b7280] group-hover:text-[#75bb2b] transition-colors duration-200",children:"READ BIO"})]},o.name)),Z.jsx("div",{className:"flex flex-col items-center text-center group",children:Z.jsx("div",{className:"w-full aspect-square bg-gray-200 rounded-2xl overflow-hidden hover:shadow-lg transition-shadow duration-300",children:Z.jsx("img",{src:LP,alt:"Aplusia Team",className:"w-full h-full object-cover"})})})]})]})]})}const MS="/assets/pexels-diva-30335060_small-UoosbJgX.jpg";function BP(){const[s,e]=le.useState(!1);return Z.jsxs(Z.Fragment,{children:[Z.jsxs("section",{className:"mt-32 overflow-hidden rounded-3xl relative",children:[Z.jsx("div",{className:"absolute inset-0 bg-cover bg-center",style:{backgroundImage:`url(${MS})`,opacity:.1}}),Z.jsxs("div",{className:"relative py-16 px-8 md:px-16 lg:px-24 flex flex-col items-center gap-8",children:[Z.jsxs("h2",{className:"text-[60px] md:text-[90px] lg:text-[120px] text-center italic relative z-10 pb-8 pr-4 max-w-full",style:{letterSpacing:"-0.02em",fontWeight:100,lineHeight:.9,WebkitBackgroun
4305dClip:"text",WebkitTextFillColor:"transparent",backgroundImage:`url(${MS})`,backgroundSize:"cover",backgroundPosition:"center",backgroundAttachment:"fixed"},children:["Interested in",Z.jsx("br",{}),"working together?","    "]}),Z.jsxs("button",{type:"button",onClick:()=>e(!0),className:"text-white no-underline px-6 py-3 rounded-full cursor-pointer transition-all duration-200 z-10 relative flex items-center gap-2 border-0",style:{backgroundImage:`url(${MS})`,backgroundSize:"cover",backgroundPosition:"center",backgroundAttachment:"fixed",fontWeight:700},children:["Get in Contact",Z.jsx("span",{children:"→"})]})]})]}),Z.jsx(Iw,{isOpen:s,onClose:()=>e(!1)})]})}function PP(){const[s,e]=le.useState(!1),t=kl();return le.useEffect(()=>{const n=()=>{e(window.innerWidth<=768)};return n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[]),le.useEffect(()=>{if(t.hash){const n=t.hash.split("/")[0].replace("#",""),a=document.getElementById(n);a&&setTimeout(()=>{a.scrollIntoView({behavior:"smooth"})},100)}},[t.hash]),Z.jsxs("div",{className:"min-h-screen bg-white relative",children:[Z.jsx("div",{className:"fixed inset-0 z-0",style:{backgroundImage:"radial-gradient(circle, #d1d5db 1px, transparent 1px)",backgroundSize:"40px 40px",backgroundPosition:"0 0"}}),Z.jsx("div",{className:"fixed inset-0 pointer-events-none z-[1]",style:{background:s?"linear-gradient(to bottom, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.4) 50%, transparent 100%)":"linear-gradient(to right, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.8) 25%, rgba(255,255,255,0.4) 33%, rgba(255,255,255,0.1) 50%, transparent 65%)"}}),Z.jsxs("main",{className:"max-w-[1600px] mx-auto relative z-20 px-[20px]",children:[Z.jsx(Bw,{isMobile:s}),Z.jsx(AP,{isMobile:s}),Z.jsx(LT,{id:"bioinformatics",title:"Bioinformatics",description:Z.jsx("p",{className:"text-lg text-[#6b7280] leading-relaxed",children:"We consult on proteomics and chemoinformatics for drug discovery. Our experts help you design mass spectrometry workflows, target identification strategies, and compound screening pipelines that accelerate your research from hit to lead."}),imagePosition:"right",children:Z.jsx(_P,{})}),Z.jsx(LT,{title:"Machine Learning",description:Z.jsx("p",{className:"text-lg text-[#6b7280] leading-relaxed",children:"We consult on and build custom AI solutions for life science applications. From transfer learning models for mass spectrometry analysis to predictive algorithms for drug discovery, we bring cutting-edge machine learning expertise to your research challenges."}),imagePosition:"left",children:Z.jsx("img",{src:E3,alt:"Machine Learning visualization",className:"w-full h-full object-cover"})}),Z.jsxs("section",{className:"mt-32 flex flex-col md:flex-row gap-10 items-center",children:[Z.jsxs("div",{className:"flex-1",children:[Z.jsx("h3",{className:"text-4xl text-[#1f2937] mb-4",children:"Software Engineering"}),Z.jsx("p",{className:"text-lg text-[#6b7280] leading-relaxed",children:"We build production-ready platforms and data pipelines for life sciences. Our engineering team delivers scalable, maintainable systems that handle real-world data volumes while following best practices for testing, deployment, and documentation."})]}),Z.jsx("div",{className:"flex-1 bg-gray-200 rounded-2xl h-[400px] flex items-center justify-center overflow-hidden",children:Z.jsx("img",{src:T3,alt:"Software Engineering",className:"w-full h-full object-cover"})})]}),Z.jsx(IP,{}),Z.jsx(BP,{}),Z.jsx(SP,{})]}),Z.jsx(Ow,{})]})}function HP(){const[s,e]=le.useState(!1);return le.useEffect(()=>{const t=()=>{e(window.innerWidth<=768)};return t(),window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[]),Z.jsxs("div",{className:"min-h-screen bg-white relative",children:[Z.jsx("div",{className:"fixed inset-0 z-0",style:{backgroundImage:"radial-gradient(circle, #d1d5db 1px, transparent 1px)",backgroundSize:"40px 40px",backgroundPosition:"0 0"}}),Z.jsx("div",{className:"fixed inset-0 pointer-events-none z-[1]",style:{background:s?"linear-gradient(to bottom, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.4) 50%, transparent 100%)":"linear-gradient(to right, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.8) 25%, rgba(255,255,255,0.4) 33%, rgba(255,255,255,0.1) 50%, transparent 65%)"}}),Z.jsxs("main",{className:"max-w-[1600px] mx-auto relative z-20 px-[20px]",children:[Z.jsx(Bw,{isMobile:s}),Z.jsxs("div",{className:"py-24",children:[Z.jsx("h1",{className:"text-4xl font-bold mb-12",children:"Impressum"}),Z.jsxs("div",{className:"space-y-8 text-gray-800",children:[Z.jsxs("section",{children:[Z.jsx("h2",{className:"text-2xl font-semibold mb-4",children:"Angaben gemäß § 5 TMG"}),Z.jsx("p",{className:"mb-2",children:Z.jsx("strong",{children:"Aplusia GmbH"})}),Z.jsx("p",{className:"mb-2",children:"Türkenstraße 5"}),Z.jsx("p",{className:"mb-2",children:"80333 München, Germany"})]}),Z.jsxs("section",{children:[Z.jsx("h2",{className:"text-2xl font-semibold mb-4",children:"Handelsregister"}),Z.jsxs("p",{className:"mb-2",children:[Z.jsx("strong",{children:"Registergericht:"})," Amtsgericht München"]}),Z.jsxs("p",{className:"mb-2",children:[Z.jsx("strong",{children:"Registernummer:"})," HRB 301918"]})]}),Z.jsxs("section",{children:[Z.jsx("h2",{className:"text-2xl font-semibold mb-4",children:"Vertreten durch / Geschäftsführung"}
vendor: 5,432 bytes, lines 4305-4306
4305),Z.jsx("p",{className:"mb-2",children:"Dr. Christoph Wichmann"}),Z.jsx("p",{className:"mb-2",children:"Georg Wallmann"})]}),Z.jsxs("section",{children:[Z.jsx("h2",{className:"text-2xl font-semibold mb-4",children:"Kontakt"}),Z.jsxs("p",{className:"mb-2",children:[Z.jsx("strong",{children:"E-Mail:"})," [email protected]"]})]}),Z.jsxs("section",{children:[Z.jsx("h2",{className:"text-2xl font-semibold mb-4",children:"Umsatzsteuer-ID"}),Z.jsx("p",{className:"mb-2",children:"Umsatzsteuer-Identifikationsnummer gemäß § 27 a Umsatzsteuergesetz:"}),Z.jsxs("p",{className:"mb-2",children:[Z.jsx("strong",{children:"USt-IdNr.:"})," DE454815293"]}),Z.jsxs("p",{className:"mb-2",children:[Z.jsx("strong",{children:"Steuernummer:"})," 143/114/50876"]})]}),Z.jsxs("section",{children:[Z.jsx("h2",{className:"text-2xl font-semibold mb-4",children:"Verantwortlich für den Inhalt nach § 55 Abs. 2 RStV"}),Z.jsx("p",{className:"mb-2",children:"Georg Wallmann"}),Z.jsx("p",{className:"mb-2",children:"Türkenstraße 5"}),Z.jsx("p",{className:"mb-2",children:"80333 München, Germany"})]}),Z.jsxs("section",{children:[Z.jsx("h2",{className:"text-2xl font-semibold mb-4",children:"EU-Streitschlichtung"}),Z.jsx("p",{className:"mb-4",children:"Die Europäische Kommission stellt eine Plattform zur Online-Streitbeilegung (OS) bereit:"}),Z.jsx("p",{className:"mb-4",children:Z.jsx("a",{href:"https://ec.europa.eu/consumers/odr",target:"_blank",rel:"noopener noreferrer",className:"text-[#75bb2b] hover:underline",children:"https://ec.europa.eu/consumers/odr"})}),Z.jsx("p",{className:"mb-2",children:"Unsere E-Mail-Adresse finden Sie oben im Impressum."})]}),Z.jsxs("section",{children:[Z.jsx("h2",{className:"text-2xl font-semibold mb-4",children:"Verbraucherstreitbeilegung / Universalschlichtungsstelle"}),Z.jsx("p",{className:"mb-2",children:"Wir sind nicht bereit oder verpflichtet, an Streitbeilegungsverfahren vor einer Verbraucherschlichtungsstelle teilzunehmen."})]}),Z.jsxs("section",{children:[Z.jsx("h2",{className:"text-2xl font-semibold mb-4",children:"Haftung für Inhalte"}),Z.jsx("p",{className:"mb-4",children:"Als Diensteanbieter sind wir gemäß § 7 Abs.1 TMG für eigene Inhalte auf diesen Seiten nach den allgemeinen Gesetzen verantwortlich. Nach §§ 8 bis 10 TMG sind wir als Diensteanbieter jedoch nicht verpflichtet, übermittelte oder gespeicherte fremde Informationen zu überwachen oder nach Umständen zu forschen, die auf eine rechtswidrige Tätigkeit hinweisen."}),Z.jsx("p",{className:"mb-4",children:"Verpflichtungen zur Entfernung oder Sperrung der Nutzung von Informationen nach den allgemeinen Gesetzen bleiben hiervon unberührt. Eine diesbezügliche Haftung ist jedoch erst ab dem Zeitpunkt der Kenntnis einer konkreten Rechtsverletzung möglich. Bei Bekanntwerden von entsprechenden Rechtsverletzungen werden wir diese Inhalte umgehend entfernen."})]}),Z.jsxs("section",{children:[Z.jsx("h2",{className:"text-2xl font-semibold mb-4",children:"Haftung für Links"}),Z.jsx("p",{className:"mb-4",children:"Unser Angebot enthält Links zu externen Websites Dritter, auf deren Inhalte wir keinen Einfluss haben. Deshalb können wir für diese fremden Inhalte auch keine Gewähr übernehmen. Für die Inhalte der verlinkten Seiten ist stets der jeweilige Anbieter oder Betreiber der Seiten verantwortlich. Die verlinkten Seiten wurden zum Zeitpunkt der Verlinkung auf mögliche Rechtsverstöße überprüft. Rechtswidrige Inhalte waren zum Zeitpunkt der Verlinkung nicht erkennbar."}),Z.jsx("p",{className:"mb-4",children:"Eine permanente inhaltliche Kontrolle der verlinkten Seiten ist jedoch ohne konkrete Anhaltspunkte einer Rechtsverletzung nicht zumutbar. Bei Bekanntwerden von Rechtsverletzungen werden wir derartige Links umgehend entfernen."})]}),Z.jsxs("section",{children:[Z.jsx("h2",{className:"text-2xl font-semibold mb-4",children:"Urheberrecht"}),Z.jsx("p",{className:"mb-4",children:"Die durch die Seitenbetreiber erstellten Inhalte und Werke auf diesen Seiten unterliegen dem deutschen Urheberrecht. Die Vervielfältigung, Bearbeitung, Verbreitung und jede Art der Verwertung außerhalb der Grenzen des Urheberrechtes bedürfen der schriftlichen Zustimmung des jeweiligen Autors bzw. Erstellers. Downloads und Kopien dieser Seite sind nur für den privaten, nicht kommerziellen Gebrauch gestattet."}),Z.jsx("p",{className:"mb-4",children:"Soweit die Inhalte auf dieser Seite nicht vom Betreiber erstellt wurden, werden die Urheberrechte Dritter beachtet. Insbesondere werden Inhalte Dritter als solche gekennzeichnet. Sollten Sie trotzdem auf eine Urheberrechtsverletzung aufmerksam werden, bitten wir um einen entsprechenden Hinweis. Bei Bekanntwerden von Rechtsverletzungen werden wir derartige Inhalte umgehend entfernen."})]}),Z.jsxs("section",{children:[Z.jsx("h2",{className:"text-2xl font-semibold mb-4",children:"Anwendbares Recht"}),Z.jsx("p",{className:"mb-2",children:"Es gilt das Recht der Bundesrepublik Deutschland."})]})]})]})]}),Z.jsx(Ow,{})]})}const FP={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_PRODUCTION:"TRUE",VITE_VERCEL_BRANCH_URL:"aplusiawebsite-git-main-georgwas-projects.vercel.app",VITE_VERCEL_DEPLOYMENT_ID:"dpl_E98rCJ2K22kcBb3Xxb5hi12X3k6o",VITE_VERCEL_ENV:"production",VITE_VERCEL_GIT_COMMIT_AUTHOR_LOGIN:"GeorgWa",VITE_VERCEL_GIT_COMMIT_AUTHOR_NAME:"Georg Wallmann",VITE_VERCEL_GIT_COMMIT_MESSAGE:`Merge pull request #11 from Aplusia/remove-juan
4306
4307Remove Juan Restrepo from website`,VITE_VERCEL_GIT_COMMIT_REF:"main",VITE_VERCEL_GIT_COMMIT_SHA:"81b0ebe304b5f57dc8ae1a5dec519f46494e300b",VITE_VERCEL_GIT_PREVIOUS_SHA:"",VITE_VERCEL_GIT_PROVIDER:"github",VITE_VERCEL_GIT_PULL_REQUEST_ID:"",VITE_VERCEL_GIT_REPO_ID:"1093522110",VITE_VERCEL_GIT_REPO_OWNER:"Aplusia",VITE_VERCEL_GIT_REPO_SLUG:"website",VITE_VERCEL_OBSERVABILITY_CLIENT_CONFIG:'{"analytics":{"scriptSrc":"772b9742c15cfa39/script.js","viewEndpoint":"772b9742c15cfa39/view","eventEndpoint":"772b9742c15cfa39/event","sessionEndpoint":"772b9742c15cfa39/session"},"speedInsights":{"scriptSrc":"3341f1d8e4b6ab29/script.js","endpoint":"3341f1d8e4b6ab29/vitals"}}',VITE_VERCEL_PROJECT_ID:"prj_OIwlLgCW3Jnyk4b3vkUU5SIn7Bx6",VITE_VERCEL_PROJECT_PRODUCTION_URL:"www.aplusia.com",VITE_VERCEL_TARGET_ENV:"production",VITE_VERCEL_URL:"aplusiawebsite-l4pxkgyvr-georgwas-projects.vercel.app"};console.log("[BUILD TIME] VITE_PRODUCTION =","TRUE");console.log("[BUILD TIME] All env vars:",FP);function VP(){return Z.jsxs(Z.Fragment,{children:[Z.jsx(p3,{}),Z.jsx(M3,{}),Z.jsxs(wC,{children:[Z.jsx(AS,{path:"/",element:Z.jsx(PP,{})}),Z.jsx(AS,{path:"/impressum",element:Z.jsx(HP,{})})]})]})}BR.createRoot(document.getElementById("root")).render(Z.jsx(le.StrictMode,{children:Z.jsx(KC,{children:Z.jsx(VP,{})})}));

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.